From 0eb889b20cc31f2eb9acf16b11ba75a596dacbd1 Mon Sep 17 00:00:00 2001 From: Praveen Ponnusamy Date: Wed, 11 Dec 2024 18:52:55 +0530 Subject: [PATCH 1/6] Cleanup: removed unused imports Minor update to .gitignore Issue: https://devtopia.esri.com/WebGIS/arcgis-portal-app-templates/issues/11222 --- .gitignore | 3 ++- src/baseClasses/ApplicationBase.ts | 5 ----- src/interfaces/applicationBase.ts | 3 --- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index bb486b8c..283c0811 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ dist distESM node_modules coverage -.vscode \ No newline at end of file +.vscode +.idea \ No newline at end of file diff --git a/src/baseClasses/ApplicationBase.ts b/src/baseClasses/ApplicationBase.ts index 3f249674..e1472fd3 100644 --- a/src/baseClasses/ApplicationBase.ts +++ b/src/baseClasses/ApplicationBase.ts @@ -19,7 +19,6 @@ import { ApplicationBaseSettings, ApplicationConfig, ApplicationConfigs, - ApplicationProxy, Direction, ILocalTestCase, } from "../interfaces/applicationBase"; @@ -752,10 +751,6 @@ export default class ApplicationBase { flowType: shouldUsePopup ? "authorization-code" : "auto", }); - if (!info) { - return; - } - IdentityManager.registerOAuthInfos([info]); } diff --git a/src/interfaces/applicationBase.ts b/src/interfaces/applicationBase.ts index 449ff5c4..48346a8c 100644 --- a/src/interfaces/applicationBase.ts +++ b/src/interfaces/applicationBase.ts @@ -3,9 +3,6 @@ import PortalItem from "esri/portal/PortalItem"; import PortalQueryResult from "esri/portal/PortalQueryResult"; import PortalQueryParams from "esri/portal/PortalQueryParams"; -import WebMap from "esri/WebMap"; -import WebScene from "esri/WebScene"; - export type Direction = "ltr" | "rtl"; export interface ApplicationBaseItemPromises { From c744296c17296a7139f838247636223180e1eb4f Mon Sep 17 00:00:00 2001 From: Praveen Ponnusamy Date: Wed, 11 Dec 2024 18:55:53 +0530 Subject: [PATCH 2/6] Add support for "General" instant app Add empty "generalConfigParams" for now. General app supports WebMap only at this time. Issue: https://devtopia.esri.com/WebGIS/arcgis-portal-app-templates/issues/11222 --- src/baseClasses/CompatibilityChecker.ts | 4 ++++ src/baseClasses/support/configParamsUtils.ts | 2 ++ src/configParamsJSON/generalConfigParams.json | 3 +++ 3 files changed, 9 insertions(+) create mode 100644 src/configParamsJSON/generalConfigParams.json diff --git a/src/baseClasses/CompatibilityChecker.ts b/src/baseClasses/CompatibilityChecker.ts index dc969483..430e205b 100644 --- a/src/baseClasses/CompatibilityChecker.ts +++ b/src/baseClasses/CompatibilityChecker.ts @@ -15,6 +15,7 @@ export enum EAppTemplateType { Compare = "/apps/instant/compare/index.html", Countdown = "/apps/instant/countdown/index.html", Exhibit = "/apps/instant/exhibit/index.html", + General = "/apps/instant/general/index.html", Insets = "/apps/instant/insets/index.html", InteractiveLegend = "/apps/instant/interactivelegend/index.html", ImageryApp = "/apps/instant/imageryviewer/index.html", @@ -62,6 +63,7 @@ const EResourceType_to_AppType_Mapping = { EAppTemplateType.Atlas, EAppTemplateType.CategoryGallery, EAppTemplateType.Charts, + EAppTemplateType.General, EAppTemplateType.ImageryApp, EAppTemplateType.Insets, EAppTemplateType.InteractiveLegend, @@ -83,6 +85,7 @@ const EResourceType_to_AppType_Mapping = { EAppTemplateType.Compare, EAppTemplateType.Countdown, EAppTemplateType.Exhibit, + EAppTemplateType.General, EAppTemplateType.ImageryApp, EAppTemplateType.Insets, EAppTemplateType.InteractiveLegend, @@ -177,6 +180,7 @@ export class CompatibilityChecker { [EAppTemplateType.Compare]: resourceMessages.WebmapOrWebscene, [EAppTemplateType.Countdown]: resourceMessages.WebmapOrWebscene, [EAppTemplateType.Exhibit]: resourceMessages.WebmapOrWebscene, + [EAppTemplateType.General]: resourceMessages.Webmap, [EAppTemplateType.ImageryApp]: resourceMessages.Webmap, [EAppTemplateType.Insets]: resourceMessages.Webmap, [EAppTemplateType.InteractiveLegend]: resourceMessages.Webmap, diff --git a/src/baseClasses/support/configParamsUtils.ts b/src/baseClasses/support/configParamsUtils.ts index 0577b268..1edec42a 100644 --- a/src/baseClasses/support/configParamsUtils.ts +++ b/src/baseClasses/support/configParamsUtils.ts @@ -6,6 +6,7 @@ import Charts from "dojo/text!../../configParamsJSON/chartsConfigParams.json"; import Compare from "dojo/text!../../configParamsJSON/compareConfigParams.json"; import Countdown from "dojo/text!../../configParamsJSON/countdownConfigParams.json"; import Exhibit from "dojo/text!../../configParamsJSON/exhibitConfigParams.json"; +import General from "dojo/text!../../configParamsJSON/generalConfigParams.json"; import Imagery from "dojo/text!../../configParamsJSON/imageryViewerConfig.json"; import Insets from "dojo/text!../../configParamsJSON/insetConfigParams.json"; import InteractiveLegend from "dojo/text!../../configParamsJSON/intLegendConfigParams.json"; @@ -34,6 +35,7 @@ const INSTANT_APPS_CONFIG_PARAMS_MAP = { [EAppTemplateType.Compare]: Compare, [EAppTemplateType.Countdown]: Countdown, [EAppTemplateType.Exhibit]: Exhibit, + [EAppTemplateType.General]: General, [EAppTemplateType.ImageryApp]: Imagery, [EAppTemplateType.InteractiveLegend]: InteractiveLegend, [EAppTemplateType.Insets]: Insets, diff --git a/src/configParamsJSON/generalConfigParams.json b/src/configParamsJSON/generalConfigParams.json new file mode 100644 index 00000000..c4d9139d --- /dev/null +++ b/src/configParamsJSON/generalConfigParams.json @@ -0,0 +1,3 @@ +{ + "config": [] +} \ No newline at end of file From c258af1ac71c0e3d556b625f9cb4f7e8feba8b50 Mon Sep 17 00:00:00 2001 From: Praveen Ponnusamy Date: Thu, 12 Dec 2024 12:52:39 +0530 Subject: [PATCH 3/6] configParams: convert JSON files to TS files configParamsUtils.ts: * Import TS files instead of JSON * getConfigParams: clone JSON object before returning it to the caller Related build changes: esmBuild.js: remove logic to replace "dojo/text" and "JSON.parse" usage as it is no longer needed. package.json: remove command to copy folder with JSON files as it does not contain JSON files anymore. Issue: https://devtopia.esri.com/WebGIS/arcgis-portal-app-templates/issues/11222 --- build/esmBuild.js | 5 +- package.json | 4 +- src/baseClasses/support/configParamsUtils.ts | 52 +- ...figParams.json => 3dViewerConfigParams.ts} | 4 +- ...ConfigParams.json => atlasConfigParams.ts} | 4 +- ...{avConfigParams.json => avConfigParams.ts} | 4 +- ...ConfigParams.json => basicConfigParams.ts} | 4 +- ...ms.json => categoryGalleryConfigParams.ts} | 4 +- ...onfigParams.json => chartsConfigParams.ts} | 4 +- ...nfigParams.json => compareConfigParams.ts} | 4 +- ...igParams.json => countdownConfigParams.ts} | 4 +- ...gParams.json => dataSliderConfigParams.ts} | 4 +- ...nfigParams.json => exhibitConfigParams.ts} | 4 +- src/configParamsJSON/generalConfigParams.json | 3 - src/configParamsJSON/generalConfigParams.ts | 3 + ...ewerConfig.json => imageryViewerConfig.ts} | 4 +- ...ConfigParams.json => insetConfigParams.ts} | 4 +- ...igParams.json => intLegendConfigParams.ts} | 4 +- ...onfigParams.json => lookupConfigParams.ts} | 4 +- ...nfigParams.json => managerConfigParams.ts} | 4 +- ...ConfigParams.json => mediaConfigParams.ts} | 4 +- ...gParams.json => minimalistConfigParams.ts} | 4 +- ...onfigParams.json => nearbyConfigParams.ts} | 4 +- ...onfigParams.json => notifyConfigParams.ts} | 4 +- ...figParams.json => observerConfigParams.ts} | 4 +- ...igParams.json => portfolioConfigParams.ts} | 4 +- ...figParams.json => reporterConfigParams.ts} | 4 +- ...nfigParams.json => sidebarConfigParams.ts} | 4 +- .../streamflowConfigParams.json | 580 ------------------ .../streamflowConfigParams.ts | 580 ++++++++++++++++++ 30 files changed, 658 insertions(+), 661 deletions(-) rename src/configParamsJSON/{3dViewerConfigParams.json => 3dViewerConfigParams.ts} (99%) rename src/configParamsJSON/{atlasConfigParams.json => atlasConfigParams.ts} (99%) rename src/configParamsJSON/{avConfigParams.json => avConfigParams.ts} (99%) rename src/configParamsJSON/{basicConfigParams.json => basicConfigParams.ts} (99%) rename src/configParamsJSON/{categoryGalleryConfigParams.json => categoryGalleryConfigParams.ts} (99%) rename src/configParamsJSON/{chartsConfigParams.json => chartsConfigParams.ts} (99%) rename src/configParamsJSON/{compareConfigParams.json => compareConfigParams.ts} (99%) rename src/configParamsJSON/{countdownConfigParams.json => countdownConfigParams.ts} (99%) rename src/configParamsJSON/{dataSliderConfigParams.json => dataSliderConfigParams.ts} (99%) rename src/configParamsJSON/{exhibitConfigParams.json => exhibitConfigParams.ts} (99%) delete mode 100644 src/configParamsJSON/generalConfigParams.json create mode 100644 src/configParamsJSON/generalConfigParams.ts rename src/configParamsJSON/{imageryViewerConfig.json => imageryViewerConfig.ts} (99%) rename src/configParamsJSON/{insetConfigParams.json => insetConfigParams.ts} (99%) rename src/configParamsJSON/{intLegendConfigParams.json => intLegendConfigParams.ts} (99%) rename src/configParamsJSON/{lookupConfigParams.json => lookupConfigParams.ts} (99%) rename src/configParamsJSON/{managerConfigParams.json => managerConfigParams.ts} (99%) rename src/configParamsJSON/{mediaConfigParams.json => mediaConfigParams.ts} (99%) rename src/configParamsJSON/{minimalistConfigParams.json => minimalistConfigParams.ts} (99%) rename src/configParamsJSON/{nearbyConfigParams.json => nearbyConfigParams.ts} (99%) rename src/configParamsJSON/{notifyConfigParams.json => notifyConfigParams.ts} (99%) rename src/configParamsJSON/{observerConfigParams.json => observerConfigParams.ts} (99%) rename src/configParamsJSON/{portfolioConfigParams.json => portfolioConfigParams.ts} (99%) rename src/configParamsJSON/{reporterConfigParams.json => reporterConfigParams.ts} (99%) rename src/configParamsJSON/{sidebarConfigParams.json => sidebarConfigParams.ts} (99%) delete mode 100644 src/configParamsJSON/streamflowConfigParams.json create mode 100644 src/configParamsJSON/streamflowConfigParams.ts diff --git a/build/esmBuild.js b/build/esmBuild.js index 6cf03a4c..775da75d 100644 --- a/build/esmBuild.js +++ b/build/esmBuild.js @@ -21,10 +21,7 @@ const updateFiles = (files) => { updatedFile = updatedFile.replaceAll("@@arcgis/core/", "@esri/"); // esm needs different telemetry file updatedFile = updatedFile.replaceAll("\"./telemetry.dojo.min\"", "\"./telemetry.min\""); - // Takes out the dojo logic for injecting json file info - updatedFile = updatedFile.replaceAll("dojo/text!", ""); - // Takes out the JSON.parse - esm apps don't need it - updatedFile = updatedFile.replaceAll("JSON.parse(INSTANT_APPS", "(INSTANT_APPS"); + return fse.writeFile(filePath, updatedFile); }); }); diff --git a/package.json b/package.json index 52500333..62ef30fc 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,8 @@ "generateTypes:amd": "dts-generator --prefix TemplatesCommonLib --project ./ --out ./dist/index.d.ts", "run:test": "npx intern serveOnly", "build:run:test": "npm run build:test && npm run run:test", - "filesCopy:amd": "npx cpy ./amd/package.json ./dist --flat && npx cpy ./README.md ./dist && npx cpy ./src/structuralFunctionality/telemetry/telemetry.dojo.min.js ./dist/structuralFunctionality/telemetry --flat && npx cpy ./src/configParamsJSON ./dist/configParamsJSON --flat", - "filesCopy:esm": "npx cpy ./esm/package.json ./distESM --flat && npx cpy ./README.md ./distESM && npx cpy ./src/structuralFunctionality/telemetry/telemetry.min.js ./distESM/structuralFunctionality/telemetry --flat && npx cpy ./src/configParamsJSON ./distESM/configParamsJSON --flat" + "filesCopy:amd": "npx cpy ./amd/package.json ./dist --flat && npx cpy ./README.md ./dist && npx cpy ./src/structuralFunctionality/telemetry/telemetry.dojo.min.js ./dist/structuralFunctionality/telemetry --flat", + "filesCopy:esm": "npx cpy ./esm/package.json ./distESM --flat && npx cpy ./README.md ./distESM && npx cpy ./src/structuralFunctionality/telemetry/telemetry.min.js ./distESM/structuralFunctionality/telemetry --flat" }, "author": "Cameron Smith (c.smith@esri.com)", "license": "ISC", diff --git a/src/baseClasses/support/configParamsUtils.ts b/src/baseClasses/support/configParamsUtils.ts index 1edec42a..b88d56d0 100644 --- a/src/baseClasses/support/configParamsUtils.ts +++ b/src/baseClasses/support/configParamsUtils.ts @@ -1,28 +1,28 @@ -import Atlas from "dojo/text!../../configParamsJSON/atlasConfigParams.json"; -import AttachmentViewer from "dojo/text!../../configParamsJSON/avConfigParams.json"; -import Basic from "dojo/text!../../configParamsJSON/basicConfigParams.json"; -import CategoryGallery from "dojo/text!../../configParamsJSON/categoryGalleryConfigParams.json"; -import Charts from "dojo/text!../../configParamsJSON/chartsConfigParams.json"; -import Compare from "dojo/text!../../configParamsJSON/compareConfigParams.json"; -import Countdown from "dojo/text!../../configParamsJSON/countdownConfigParams.json"; -import Exhibit from "dojo/text!../../configParamsJSON/exhibitConfigParams.json"; -import General from "dojo/text!../../configParamsJSON/generalConfigParams.json"; -import Imagery from "dojo/text!../../configParamsJSON/imageryViewerConfig.json"; -import Insets from "dojo/text!../../configParamsJSON/insetConfigParams.json"; -import InteractiveLegend from "dojo/text!../../configParamsJSON/intLegendConfigParams.json"; -import Manager from "dojo/text!../../configParamsJSON/managerConfigParams.json"; -import Media from "dojo/text!../../configParamsJSON/mediaConfigParams.json"; -import Minimalist from "dojo/text!../../configParamsJSON/minimalistConfigParams.json"; -import Nearby from "dojo/text!../../configParamsJSON/nearbyConfigParams.json"; -import Notify from "dojo/text!../../configParamsJSON/notifyConfigParams.json"; -import Observer from "dojo/text!../../configParamsJSON/observerConfigParams.json"; -import Portfolio from "dojo/text!../../configParamsJSON/portfolioConfigParams.json"; -import Reporter from "dojo/text!../../configParamsJSON/reporterConfigParams.json"; -import Sidebar from "dojo/text!../../configParamsJSON/sidebarConfigParams.json"; -import Slider from "dojo/text!../../configParamsJSON/dataSliderConfigParams.json"; -import Streamflow from "dojo/text!../../configParamsJSON/streamflowConfigParams.json"; -import ThreeDViewer from "dojo/text!../../configParamsJSON/3dViewerConfigParams.json"; -import ZoneLookup from "dojo/text!../../configParamsJSON/lookupConfigParams.json"; +import Atlas from "../../configParamsJSON/atlasConfigParams"; +import AttachmentViewer from "../../configParamsJSON/avConfigParams"; +import Basic from "../../configParamsJSON/basicConfigParams"; +import CategoryGallery from "../../configParamsJSON/categoryGalleryConfigParams"; +import Charts from "../../configParamsJSON/chartsConfigParams"; +import Compare from "../../configParamsJSON/compareConfigParams"; +import Countdown from "../../configParamsJSON/countdownConfigParams"; +import Exhibit from "../../configParamsJSON/exhibitConfigParams"; +import General from "../../configParamsJSON/generalConfigParams"; +import Imagery from "../../configParamsJSON/imageryViewerConfig"; +import Insets from "../../configParamsJSON/insetConfigParams"; +import InteractiveLegend from "../../configParamsJSON/intLegendConfigParams"; +import Manager from "../../configParamsJSON/managerConfigParams"; +import Media from "../../configParamsJSON/mediaConfigParams"; +import Minimalist from "../../configParamsJSON/minimalistConfigParams"; +import Nearby from "../../configParamsJSON/nearbyConfigParams"; +import Notify from "../../configParamsJSON/notifyConfigParams"; +import Observer from "../../configParamsJSON/observerConfigParams"; +import Portfolio from "../../configParamsJSON/portfolioConfigParams"; +import Reporter from "../../configParamsJSON/reporterConfigParams"; +import Sidebar from "../../configParamsJSON/sidebarConfigParams"; +import Slider from "../../configParamsJSON/dataSliderConfigParams"; +import Streamflow from "../../configParamsJSON/streamflowConfigParams"; +import ThreeDViewer from "../../configParamsJSON/3dViewerConfigParams"; +import ZoneLookup from "../../configParamsJSON/lookupConfigParams"; import { EAppTemplateType } from "../CompatibilityChecker"; @@ -55,7 +55,7 @@ const INSTANT_APPS_CONFIG_PARAMS_MAP = { }; export function getConfigParams(template: EAppTemplateType) { - return JSON.parse(INSTANT_APPS_CONFIG_PARAMS_MAP[template]); + return structuredClone(INSTANT_APPS_CONFIG_PARAMS_MAP[template]); } export function generateDefaultValuesObj(configParamsObj) { diff --git a/src/configParamsJSON/3dViewerConfigParams.json b/src/configParamsJSON/3dViewerConfigParams.ts similarity index 99% rename from src/configParamsJSON/3dViewerConfigParams.json rename to src/configParamsJSON/3dViewerConfigParams.ts index 28821ed2..d403cfe3 100644 --- a/src/configParamsJSON/3dViewerConfigParams.json +++ b/src/configParamsJSON/3dViewerConfigParams.ts @@ -1,4 +1,4 @@ -{ +export default { "config": [ { "type": "section", @@ -1153,4 +1153,4 @@ ] } ] -} \ No newline at end of file +}; \ No newline at end of file diff --git a/src/configParamsJSON/atlasConfigParams.json b/src/configParamsJSON/atlasConfigParams.ts similarity index 99% rename from src/configParamsJSON/atlasConfigParams.json rename to src/configParamsJSON/atlasConfigParams.ts index ec8c163b..c1130b6c 100644 --- a/src/configParamsJSON/atlasConfigParams.json +++ b/src/configParamsJSON/atlasConfigParams.ts @@ -1,4 +1,4 @@ -{ +export default { "config": [ { "type": "section", @@ -494,4 +494,4 @@ ] } ] -} \ No newline at end of file +}; \ No newline at end of file diff --git a/src/configParamsJSON/avConfigParams.json b/src/configParamsJSON/avConfigParams.ts similarity index 99% rename from src/configParamsJSON/avConfigParams.json rename to src/configParamsJSON/avConfigParams.ts index b5b4b5a8..c0371e9a 100644 --- a/src/configParamsJSON/avConfigParams.json +++ b/src/configParamsJSON/avConfigParams.ts @@ -1,4 +1,4 @@ -{ +export default { "config": [ { "type": "section", @@ -524,4 +524,4 @@ ] } ] -} +}; \ No newline at end of file diff --git a/src/configParamsJSON/basicConfigParams.json b/src/configParamsJSON/basicConfigParams.ts similarity index 99% rename from src/configParamsJSON/basicConfigParams.json rename to src/configParamsJSON/basicConfigParams.ts index ed469c8a..6efed1d7 100644 --- a/src/configParamsJSON/basicConfigParams.json +++ b/src/configParamsJSON/basicConfigParams.ts @@ -1,4 +1,4 @@ -{ +export default { "config": [ { "type": "section", @@ -550,4 +550,4 @@ ] } ] -} \ No newline at end of file +}; \ No newline at end of file diff --git a/src/configParamsJSON/categoryGalleryConfigParams.json b/src/configParamsJSON/categoryGalleryConfigParams.ts similarity index 99% rename from src/configParamsJSON/categoryGalleryConfigParams.json rename to src/configParamsJSON/categoryGalleryConfigParams.ts index d15a049d..65b8113b 100644 --- a/src/configParamsJSON/categoryGalleryConfigParams.json +++ b/src/configParamsJSON/categoryGalleryConfigParams.ts @@ -1,4 +1,4 @@ -{ +export default { "config": [ { "type": "section", @@ -365,4 +365,4 @@ ] } ] -} \ No newline at end of file +}; \ No newline at end of file diff --git a/src/configParamsJSON/chartsConfigParams.json b/src/configParamsJSON/chartsConfigParams.ts similarity index 99% rename from src/configParamsJSON/chartsConfigParams.json rename to src/configParamsJSON/chartsConfigParams.ts index d77ff551..7dc87500 100644 --- a/src/configParamsJSON/chartsConfigParams.json +++ b/src/configParamsJSON/chartsConfigParams.ts @@ -1,4 +1,4 @@ -{ +export default { "config": [ { "type": "section", @@ -557,4 +557,4 @@ ] } ] -} +}; \ No newline at end of file diff --git a/src/configParamsJSON/compareConfigParams.json b/src/configParamsJSON/compareConfigParams.ts similarity index 99% rename from src/configParamsJSON/compareConfigParams.json rename to src/configParamsJSON/compareConfigParams.ts index 7f36ccf7..c2010883 100644 --- a/src/configParamsJSON/compareConfigParams.json +++ b/src/configParamsJSON/compareConfigParams.ts @@ -1,4 +1,4 @@ -{ +export default { "config": [ { "type": "section", @@ -476,4 +476,4 @@ ] } ] -} +}; \ No newline at end of file diff --git a/src/configParamsJSON/countdownConfigParams.json b/src/configParamsJSON/countdownConfigParams.ts similarity index 99% rename from src/configParamsJSON/countdownConfigParams.json rename to src/configParamsJSON/countdownConfigParams.ts index 5449784e..c5ad9ff1 100644 --- a/src/configParamsJSON/countdownConfigParams.json +++ b/src/configParamsJSON/countdownConfigParams.ts @@ -1,4 +1,4 @@ -{ +export default { "config": [ { "type": "section", @@ -444,4 +444,4 @@ ] } ] -} \ No newline at end of file +}; \ No newline at end of file diff --git a/src/configParamsJSON/dataSliderConfigParams.json b/src/configParamsJSON/dataSliderConfigParams.ts similarity index 99% rename from src/configParamsJSON/dataSliderConfigParams.json rename to src/configParamsJSON/dataSliderConfigParams.ts index 9e6767b5..6a4aaef0 100644 --- a/src/configParamsJSON/dataSliderConfigParams.json +++ b/src/configParamsJSON/dataSliderConfigParams.ts @@ -1,4 +1,4 @@ -{ +export default { "config": [ { "type": "section", @@ -854,4 +854,4 @@ ] } ] -} \ No newline at end of file +}; \ No newline at end of file diff --git a/src/configParamsJSON/exhibitConfigParams.json b/src/configParamsJSON/exhibitConfigParams.ts similarity index 99% rename from src/configParamsJSON/exhibitConfigParams.json rename to src/configParamsJSON/exhibitConfigParams.ts index db847d8f..247f3802 100644 --- a/src/configParamsJSON/exhibitConfigParams.json +++ b/src/configParamsJSON/exhibitConfigParams.ts @@ -1,4 +1,4 @@ -{ +export default { "config": [ { "type": "section", @@ -494,4 +494,4 @@ ] } ] -} \ No newline at end of file +}; \ No newline at end of file diff --git a/src/configParamsJSON/generalConfigParams.json b/src/configParamsJSON/generalConfigParams.json deleted file mode 100644 index c4d9139d..00000000 --- a/src/configParamsJSON/generalConfigParams.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "config": [] -} \ No newline at end of file diff --git a/src/configParamsJSON/generalConfigParams.ts b/src/configParamsJSON/generalConfigParams.ts new file mode 100644 index 00000000..a8cfb27f --- /dev/null +++ b/src/configParamsJSON/generalConfigParams.ts @@ -0,0 +1,3 @@ +export default { + "config": [] +}; \ No newline at end of file diff --git a/src/configParamsJSON/imageryViewerConfig.json b/src/configParamsJSON/imageryViewerConfig.ts similarity index 99% rename from src/configParamsJSON/imageryViewerConfig.json rename to src/configParamsJSON/imageryViewerConfig.ts index 986dd6d7..bd9466a0 100644 --- a/src/configParamsJSON/imageryViewerConfig.json +++ b/src/configParamsJSON/imageryViewerConfig.ts @@ -1,4 +1,4 @@ -{ +export default { "config": [ { "type": "section", @@ -659,4 +659,4 @@ ] } ] -} +}; \ No newline at end of file diff --git a/src/configParamsJSON/insetConfigParams.json b/src/configParamsJSON/insetConfigParams.ts similarity index 99% rename from src/configParamsJSON/insetConfigParams.json rename to src/configParamsJSON/insetConfigParams.ts index b4dfe9fd..56fe9d33 100644 --- a/src/configParamsJSON/insetConfigParams.json +++ b/src/configParamsJSON/insetConfigParams.ts @@ -1,4 +1,4 @@ -{ +export default { "config": [ { "type": "section", @@ -564,4 +564,4 @@ ] } ] -} \ No newline at end of file +}; \ No newline at end of file diff --git a/src/configParamsJSON/intLegendConfigParams.json b/src/configParamsJSON/intLegendConfigParams.ts similarity index 99% rename from src/configParamsJSON/intLegendConfigParams.json rename to src/configParamsJSON/intLegendConfigParams.ts index 06ff83f6..16e6cb68 100644 --- a/src/configParamsJSON/intLegendConfigParams.json +++ b/src/configParamsJSON/intLegendConfigParams.ts @@ -1,4 +1,4 @@ -{ +export default { "config": [ { "type": "section", @@ -794,4 +794,4 @@ ] } ] -} +}; \ No newline at end of file diff --git a/src/configParamsJSON/lookupConfigParams.json b/src/configParamsJSON/lookupConfigParams.ts similarity index 99% rename from src/configParamsJSON/lookupConfigParams.json rename to src/configParamsJSON/lookupConfigParams.ts index b28ac3fb..ae14c583 100644 --- a/src/configParamsJSON/lookupConfigParams.json +++ b/src/configParamsJSON/lookupConfigParams.ts @@ -1,4 +1,4 @@ -{ +export default { "config": [ { "type": "section", @@ -1099,4 +1099,4 @@ ] } ] -} \ No newline at end of file +}; \ No newline at end of file diff --git a/src/configParamsJSON/managerConfigParams.json b/src/configParamsJSON/managerConfigParams.ts similarity index 99% rename from src/configParamsJSON/managerConfigParams.json rename to src/configParamsJSON/managerConfigParams.ts index 9695920c..468012d0 100644 --- a/src/configParamsJSON/managerConfigParams.json +++ b/src/configParamsJSON/managerConfigParams.ts @@ -1,4 +1,4 @@ -{ +export default { "config": [ { "type": "section", @@ -362,4 +362,4 @@ ] } ] -} \ No newline at end of file +}; \ No newline at end of file diff --git a/src/configParamsJSON/mediaConfigParams.json b/src/configParamsJSON/mediaConfigParams.ts similarity index 99% rename from src/configParamsJSON/mediaConfigParams.json rename to src/configParamsJSON/mediaConfigParams.ts index a605d34d..588e4e00 100644 --- a/src/configParamsJSON/mediaConfigParams.json +++ b/src/configParamsJSON/mediaConfigParams.ts @@ -1,4 +1,4 @@ -{ +export default { "config": [ { "type": "section", @@ -1133,4 +1133,4 @@ ] } ] -} \ No newline at end of file +}; \ No newline at end of file diff --git a/src/configParamsJSON/minimalistConfigParams.json b/src/configParamsJSON/minimalistConfigParams.ts similarity index 99% rename from src/configParamsJSON/minimalistConfigParams.json rename to src/configParamsJSON/minimalistConfigParams.ts index 59d62f43..49463228 100644 --- a/src/configParamsJSON/minimalistConfigParams.json +++ b/src/configParamsJSON/minimalistConfigParams.ts @@ -1,4 +1,4 @@ -{ +export default { "config": [ { "type": "section", @@ -425,4 +425,4 @@ ] } ] -} +}; \ No newline at end of file diff --git a/src/configParamsJSON/nearbyConfigParams.json b/src/configParamsJSON/nearbyConfigParams.ts similarity index 99% rename from src/configParamsJSON/nearbyConfigParams.json rename to src/configParamsJSON/nearbyConfigParams.ts index 4f0b0918..30563a23 100644 --- a/src/configParamsJSON/nearbyConfigParams.json +++ b/src/configParamsJSON/nearbyConfigParams.ts @@ -1,4 +1,4 @@ -{ +export default { "config": [ { "type": "section", @@ -1066,4 +1066,4 @@ ] } ] -} \ No newline at end of file +}; \ No newline at end of file diff --git a/src/configParamsJSON/notifyConfigParams.json b/src/configParamsJSON/notifyConfigParams.ts similarity index 99% rename from src/configParamsJSON/notifyConfigParams.json rename to src/configParamsJSON/notifyConfigParams.ts index b2608388..a230013f 100644 --- a/src/configParamsJSON/notifyConfigParams.json +++ b/src/configParamsJSON/notifyConfigParams.ts @@ -1,4 +1,4 @@ -{ +export default { "config": [ { "type": "section", @@ -657,4 +657,4 @@ ] } ] -} \ No newline at end of file +}; \ No newline at end of file diff --git a/src/configParamsJSON/observerConfigParams.json b/src/configParamsJSON/observerConfigParams.ts similarity index 99% rename from src/configParamsJSON/observerConfigParams.json rename to src/configParamsJSON/observerConfigParams.ts index 5bac841c..4c9964d3 100644 --- a/src/configParamsJSON/observerConfigParams.json +++ b/src/configParamsJSON/observerConfigParams.ts @@ -1,4 +1,4 @@ -{ +export default { "config": [ { "type": "section", @@ -425,4 +425,4 @@ ] } ] -} +}; \ No newline at end of file diff --git a/src/configParamsJSON/portfolioConfigParams.json b/src/configParamsJSON/portfolioConfigParams.ts similarity index 99% rename from src/configParamsJSON/portfolioConfigParams.json rename to src/configParamsJSON/portfolioConfigParams.ts index db39fc50..116d9d01 100644 --- a/src/configParamsJSON/portfolioConfigParams.json +++ b/src/configParamsJSON/portfolioConfigParams.ts @@ -1,4 +1,4 @@ -{ +export default { "config": [ { "type": "section", @@ -588,4 +588,4 @@ ] } ] -} +}; \ No newline at end of file diff --git a/src/configParamsJSON/reporterConfigParams.json b/src/configParamsJSON/reporterConfigParams.ts similarity index 99% rename from src/configParamsJSON/reporterConfigParams.json rename to src/configParamsJSON/reporterConfigParams.ts index f94a5536..41a44da6 100644 --- a/src/configParamsJSON/reporterConfigParams.json +++ b/src/configParamsJSON/reporterConfigParams.ts @@ -1,4 +1,4 @@ -{ +export default { "config": [ { "type": "section", @@ -671,4 +671,4 @@ ] } ] -} +}; \ No newline at end of file diff --git a/src/configParamsJSON/sidebarConfigParams.json b/src/configParamsJSON/sidebarConfigParams.ts similarity index 99% rename from src/configParamsJSON/sidebarConfigParams.json rename to src/configParamsJSON/sidebarConfigParams.ts index d27e40e7..65931754 100644 --- a/src/configParamsJSON/sidebarConfigParams.json +++ b/src/configParamsJSON/sidebarConfigParams.ts @@ -1,4 +1,4 @@ -{ +export default { "config": [ { "type": "section", @@ -970,4 +970,4 @@ ] } ] -} \ No newline at end of file +}; \ No newline at end of file diff --git a/src/configParamsJSON/streamflowConfigParams.json b/src/configParamsJSON/streamflowConfigParams.json deleted file mode 100644 index 19dce74e..00000000 --- a/src/configParamsJSON/streamflowConfigParams.json +++ /dev/null @@ -1,580 +0,0 @@ -{ - "config": [ - { - "type": "section", - "id": "map", - "config": { - "itemTypes": [ - "2d" - ] - }, - "content": [ - { - "type": "setting", - "id": "mapArea", - "express": false, - "content": [ - { - "type": "setting", - "id": "mapAreaConfig", - "express": false, - "defaultValue": null - } - ], - "defaultValue": false - } - ] - }, - { - "type": "section", - "id": "about", - "content": [ - { - "type": "subsection", - "id": "appComprehension", - "content": [ - { - "type": "group", - "id": "appComprehension", - "content": [ - { - "type": "setting", - "id": "title", - "express": true, - "defaultValue": "" - }, - { - "type": "setting", - "id": "titleLink", - "express": false, - "defaultValue": "" - }, - { - "type": "setting", - "id": "legend", - "defaultValue": true, - "content": [ - { - "type": "setting", - "id": "legendPosition", - "defaultValue": { - "position": "top-right", - "index": 0 - } - }, - { - "type": "setting", - "id": "legendOpenAtStart", - "defaultValue": false - } - ] - }, - { - "type": "setting", - "id": "popupFixed", - "defaultValue": true, - "express": true, - "content": [ - { - "type": "setting", - "id": "popupFixedPosition", - "defaultValue": "top-right" - } - ] - } - ] - }, - { - "type": "setting", - "id": "header", - "defaultValue": true, - "express": false - }, - { - "type": "setting", - "id": "help", - "defaultValue": true, - "express": true, - "content": [ - { - "type": "setting", - "id": "helpPosition", - "defaultValue": { - "position": "top-left", - "index": 0 - } - } - ] - }, - { - "type": "group", - "id": "mapA11y", - "content": [ - { - "type": "setting", - "id": "mapA11yDesc", - "express": true - }, - { - "type": "setting", - "id": "keyboardShortcuts", - "express": true, - "defaultValue": false, - "content": [ - { - "type": "setting", - "id": "keyboardShortcutsPosition", - "defaultValue": { - "position": "top-left", - "index": 0 - } - } - ] - } - ] - } - ] - }, - { - "type": "subsection", - "id": "coverPageOrSplash", - "content": [ - { - "type": "setting", - "id": "enableSplashOrCover", - "content": [ - { - "type": "setting", - "id": "splashModeType", - "config": { - "branches": [ - [ - "landingPageConfig" - ], - [ - "splashTitle", - "splashContent", - "splashButtonText", - "splashIsOpen" - ] - ] - }, - "content": [ - { - "type": "setting", - "id": "landingPageConfig", - "express": false, - "defaultValue": { - "titleText": "", - "subtitleText": "", - "descriptionText": "", - "entryButtonText": "", - "alignment": "center", - "backgroundType": "color", - "textColor": "#FFFFFF", - "entryButtonColor": "#0079C1", - "backgroundColor": "#0079C1", - "iconImage": null, - "iconImageScale": "m", - "backgroundImageSrc": null - } - }, - { - "type": "setting", - "id": "splashTitle", - "defaultValue": "" - }, - { - "type": "setting", - "id": "splashContent", - "defaultValue": "", - "config": { - "imageUpload": true - } - }, - { - "type": "setting", - "id": "splashButtonText", - "defaultValue": "" - } - ], - "defaultValue": { - "branchValue": "cover-page", - "branchOptionsFieldNames": [] - } - } - ] - } - ] - } - ] - }, - { - "type": "section", - "id": "streamflow", - "content": [ - { - "type": "setting", - "id": "streamflowServiceType", - "express": true, - "config": { - "branches": [] - }, - "content": [], - "defaultValue": "global" - } - ] - }, - { - "type": "section", - "id": "interactivity", - "content": [ - { - "type": "subsection", - "id": "exploreNavigate", - "content": [ - { - "type": "group", - "id": "explore", - "content": [ - { - "type": "setting", - "id": "bookmarks", - "defaultValue": false, - "express": false, - "content": [ - { - "type": "setting", - "id": "bookmarksPosition", - "defaultValue": { - "position": "top-right", - "index": 0 - } - } - ] - }, - { - "type": "setting", - "id": "mapZoom", - "express": false, - "defaultValue": true, - "content": [ - { - "type": "setting", - "id": "mapZoomPosition", - "defaultValue": { - "position": "top-left", - "index": 0 - } - } - ] - }, - { - "type": "setting", - "id": "home", - "express": false, - "defaultValue": true, - "content": [ - { - "type": "setting", - "id": "homePosition", - "defaultValue": { - "position": "top-left", - "index": 0 - } - } - ] - }, - { - "type": "setting", - "id": "compassWidget", - "express": false, - "defaultValue": false, - "content": [ - { - "type": "setting", - "id": "compassWidgetPosition", - "defaultValue": { - "position": "top-left", - "index": 1 - } - } - ] - }, - { - "type": "setting", - "id": "locateWidget", - "express": false, - "defaultValue": false, - "content": [ - { - "type": "setting", - "id": "locateWidgetPosition", - "defaultValue": { - "position": "top-right", - "index": 0 - } - } - ] - }, - { - "type": "setting", - "id": "measure", - "express": false, - "defaultValue": false, - "content": [ - { - "type": "setting", - "id": "measurePosition", - "defaultValue": { - "position": "top-right", - "index": 0 - } - }, - { - "type": "setting", - "id": "measureOpenAtStart", - "express": false, - "defaultValue": false - }, - { - "type": "setting", - "id": "coordinateFormats", - "express": false, - "defaultValue": "xy" - }, - { - "type": "setting", - "id": "measureAreaUnit", - "express": false - }, - { - "type": "setting", - "id": "measureLinearUnit", - "express": false - } - ] - } - ] - }, - { - "type": "group", - "id": "navigate", - "content": [ - { - "type": "setting", - "id": "scalebar", - "express": false, - "defaultValue": false, - "content": [ - { - "type": "setting", - "id": "scalebarPosition", - "defaultValue": { - "position": "bottom-left", - "index": 0 - } - }, - { - "type": "setting", - "id": "scalebarDualMode", - "defaultValue": false, - "express": false - } - ] - } - ] - } - ] - }, - { - "type": "subsection", - "id": "modify", - "content": [ - { - "type": "setting", - "id": "basemapToggle", - "express": false, - "defaultValue": false, - "content": [ - { - "type": "setting", - "id": "basemapTogglePosition", - "defaultValue": { - "position": "bottom-left", - "index": 0 - } - }, - { - "type": "setting", - "id": "basemapSelector", - "defaultValue": "streets-vector" - } - ] - }, - { - "type": "setting", - "id": "layerList", - "defaultValue": false, - "content": [ - { - "type": "setting", - "id": "layerListPosition", - "defaultValue": { - "position": "bottom-right", - "index": 0 - } - }, - { - "type": "setting", - "id": "layerListOpenAtStart", - "express": false, - "defaultValue": false - }, - { - "type": "setting", - "id": "visibilityIcon", - "express": false, - "defaultValue": "default" - } - ] - } - ] - }, - { - "type": "subsection", - "id": "share", - "content": [ - { - "type": "group", - "id": "share", - "content": [ - { - "type": "setting", - "id": "share", - "content": [ - { - "type": "setting", - "id": "shareIncludeEmbed", - "defaultValue": false, - "express": false - }, - { - "type": "setting", - "id": "shareIncludeSocial", - "defaultValue": true, - "express": false - }, - { - "type": "setting", - "id": "sharePosition", - "defaultValue": "top-right" - } - ], - "defaultValue": false - } - ] - } - ] - }, - { - "type": "subsection", - "id": "search", - "content": [ - { - "type": "setting", - "id": "search", - "express": true, - "defaultValue": true, - "content": [ - { - "type": "setting", - "id": "searchPosition", - "defaultValue": "top-right", - "express": true - }, - { - "type": "setting", - "id": "searchOpenAtStart", - "express": true, - "defaultValue": false - }, - { - "type": "setting", - "id": "searchConfiguration", - "express": true, - "defaultValue": null - } - ] - } - ] - } - ] - }, - { - "type": "section", - "id": "themeLayout", - "content": [ - { - "type": "subsection", - "id": "theme", - "content": [ - { - "type": "setting", - "id": "theme", - "defaultValue": "light", - "express": true - }, - { - "type": "group", - "id": "headerTheme", - "content": [ - { - "type": "setting", - "id": "customTheme", - "express": true, - "config": { - "numOfSections": 1, - "headerOnly": true, - "singleFont": false - }, - "defaultValue": null - } - ] - } - ] - }, - { - "type": "subsection", - "id": "logo", - "content": [ - { - "type": "group", - "id": "logo", - "content": [ - { - "type": "setting", - "id": "logo", - "express": false, - "defaultValue": null - } - ] - } - ] - }, - { - "type": "subsection", - "id": "positionManager", - "content": [ - { - "type": "setting", - "id": "positionManager", - "express": true, - "defaultValue": null - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/src/configParamsJSON/streamflowConfigParams.ts b/src/configParamsJSON/streamflowConfigParams.ts new file mode 100644 index 00000000..cece09a1 --- /dev/null +++ b/src/configParamsJSON/streamflowConfigParams.ts @@ -0,0 +1,580 @@ +export default { + "config": [ + { + "type": "section", + "id": "map", + "config": { + "itemTypes": [ + "2d" + ] + }, + "content": [ + { + "type": "setting", + "id": "mapArea", + "express": false, + "content": [ + { + "type": "setting", + "id": "mapAreaConfig", + "express": false, + "defaultValue": null + } + ], + "defaultValue": false + } + ] + }, + { + "type": "section", + "id": "about", + "content": [ + { + "type": "subsection", + "id": "appComprehension", + "content": [ + { + "type": "group", + "id": "appComprehension", + "content": [ + { + "type": "setting", + "id": "title", + "express": true, + "defaultValue": "" + }, + { + "type": "setting", + "id": "titleLink", + "express": false, + "defaultValue": "" + }, + { + "type": "setting", + "id": "legend", + "defaultValue": true, + "content": [ + { + "type": "setting", + "id": "legendPosition", + "defaultValue": { + "position": "top-right", + "index": 0 + } + }, + { + "type": "setting", + "id": "legendOpenAtStart", + "defaultValue": false + } + ] + }, + { + "type": "setting", + "id": "popupFixed", + "defaultValue": true, + "express": true, + "content": [ + { + "type": "setting", + "id": "popupFixedPosition", + "defaultValue": "top-right" + } + ] + } + ] + }, + { + "type": "setting", + "id": "header", + "defaultValue": true, + "express": false + }, + { + "type": "setting", + "id": "help", + "defaultValue": true, + "express": true, + "content": [ + { + "type": "setting", + "id": "helpPosition", + "defaultValue": { + "position": "top-left", + "index": 0 + } + } + ] + }, + { + "type": "group", + "id": "mapA11y", + "content": [ + { + "type": "setting", + "id": "mapA11yDesc", + "express": true + }, + { + "type": "setting", + "id": "keyboardShortcuts", + "express": true, + "defaultValue": false, + "content": [ + { + "type": "setting", + "id": "keyboardShortcutsPosition", + "defaultValue": { + "position": "top-left", + "index": 0 + } + } + ] + } + ] + } + ] + }, + { + "type": "subsection", + "id": "coverPageOrSplash", + "content": [ + { + "type": "setting", + "id": "enableSplashOrCover", + "content": [ + { + "type": "setting", + "id": "splashModeType", + "config": { + "branches": [ + [ + "landingPageConfig" + ], + [ + "splashTitle", + "splashContent", + "splashButtonText", + "splashIsOpen" + ] + ] + }, + "content": [ + { + "type": "setting", + "id": "landingPageConfig", + "express": false, + "defaultValue": { + "titleText": "", + "subtitleText": "", + "descriptionText": "", + "entryButtonText": "", + "alignment": "center", + "backgroundType": "color", + "textColor": "#FFFFFF", + "entryButtonColor": "#0079C1", + "backgroundColor": "#0079C1", + "iconImage": null, + "iconImageScale": "m", + "backgroundImageSrc": null + } + }, + { + "type": "setting", + "id": "splashTitle", + "defaultValue": "" + }, + { + "type": "setting", + "id": "splashContent", + "defaultValue": "", + "config": { + "imageUpload": true + } + }, + { + "type": "setting", + "id": "splashButtonText", + "defaultValue": "" + } + ], + "defaultValue": { + "branchValue": "cover-page", + "branchOptionsFieldNames": [] + } + } + ] + } + ] + } + ] + }, + { + "type": "section", + "id": "streamflow", + "content": [ + { + "type": "setting", + "id": "streamflowServiceType", + "express": true, + "config": { + "branches": [] + }, + "content": [], + "defaultValue": "global" + } + ] + }, + { + "type": "section", + "id": "interactivity", + "content": [ + { + "type": "subsection", + "id": "exploreNavigate", + "content": [ + { + "type": "group", + "id": "explore", + "content": [ + { + "type": "setting", + "id": "bookmarks", + "defaultValue": false, + "express": false, + "content": [ + { + "type": "setting", + "id": "bookmarksPosition", + "defaultValue": { + "position": "top-right", + "index": 0 + } + } + ] + }, + { + "type": "setting", + "id": "mapZoom", + "express": false, + "defaultValue": true, + "content": [ + { + "type": "setting", + "id": "mapZoomPosition", + "defaultValue": { + "position": "top-left", + "index": 0 + } + } + ] + }, + { + "type": "setting", + "id": "home", + "express": false, + "defaultValue": true, + "content": [ + { + "type": "setting", + "id": "homePosition", + "defaultValue": { + "position": "top-left", + "index": 0 + } + } + ] + }, + { + "type": "setting", + "id": "compassWidget", + "express": false, + "defaultValue": false, + "content": [ + { + "type": "setting", + "id": "compassWidgetPosition", + "defaultValue": { + "position": "top-left", + "index": 1 + } + } + ] + }, + { + "type": "setting", + "id": "locateWidget", + "express": false, + "defaultValue": false, + "content": [ + { + "type": "setting", + "id": "locateWidgetPosition", + "defaultValue": { + "position": "top-right", + "index": 0 + } + } + ] + }, + { + "type": "setting", + "id": "measure", + "express": false, + "defaultValue": false, + "content": [ + { + "type": "setting", + "id": "measurePosition", + "defaultValue": { + "position": "top-right", + "index": 0 + } + }, + { + "type": "setting", + "id": "measureOpenAtStart", + "express": false, + "defaultValue": false + }, + { + "type": "setting", + "id": "coordinateFormats", + "express": false, + "defaultValue": "xy" + }, + { + "type": "setting", + "id": "measureAreaUnit", + "express": false + }, + { + "type": "setting", + "id": "measureLinearUnit", + "express": false + } + ] + } + ] + }, + { + "type": "group", + "id": "navigate", + "content": [ + { + "type": "setting", + "id": "scalebar", + "express": false, + "defaultValue": false, + "content": [ + { + "type": "setting", + "id": "scalebarPosition", + "defaultValue": { + "position": "bottom-left", + "index": 0 + } + }, + { + "type": "setting", + "id": "scalebarDualMode", + "defaultValue": false, + "express": false + } + ] + } + ] + } + ] + }, + { + "type": "subsection", + "id": "modify", + "content": [ + { + "type": "setting", + "id": "basemapToggle", + "express": false, + "defaultValue": false, + "content": [ + { + "type": "setting", + "id": "basemapTogglePosition", + "defaultValue": { + "position": "bottom-left", + "index": 0 + } + }, + { + "type": "setting", + "id": "basemapSelector", + "defaultValue": "streets-vector" + } + ] + }, + { + "type": "setting", + "id": "layerList", + "defaultValue": false, + "content": [ + { + "type": "setting", + "id": "layerListPosition", + "defaultValue": { + "position": "bottom-right", + "index": 0 + } + }, + { + "type": "setting", + "id": "layerListOpenAtStart", + "express": false, + "defaultValue": false + }, + { + "type": "setting", + "id": "visibilityIcon", + "express": false, + "defaultValue": "default" + } + ] + } + ] + }, + { + "type": "subsection", + "id": "share", + "content": [ + { + "type": "group", + "id": "share", + "content": [ + { + "type": "setting", + "id": "share", + "content": [ + { + "type": "setting", + "id": "shareIncludeEmbed", + "defaultValue": false, + "express": false + }, + { + "type": "setting", + "id": "shareIncludeSocial", + "defaultValue": true, + "express": false + }, + { + "type": "setting", + "id": "sharePosition", + "defaultValue": "top-right" + } + ], + "defaultValue": false + } + ] + } + ] + }, + { + "type": "subsection", + "id": "search", + "content": [ + { + "type": "setting", + "id": "search", + "express": true, + "defaultValue": true, + "content": [ + { + "type": "setting", + "id": "searchPosition", + "defaultValue": "top-right", + "express": true + }, + { + "type": "setting", + "id": "searchOpenAtStart", + "express": true, + "defaultValue": false + }, + { + "type": "setting", + "id": "searchConfiguration", + "express": true, + "defaultValue": null + } + ] + } + ] + } + ] + }, + { + "type": "section", + "id": "themeLayout", + "content": [ + { + "type": "subsection", + "id": "theme", + "content": [ + { + "type": "setting", + "id": "theme", + "defaultValue": "light", + "express": true + }, + { + "type": "group", + "id": "headerTheme", + "content": [ + { + "type": "setting", + "id": "customTheme", + "express": true, + "config": { + "numOfSections": 1, + "headerOnly": true, + "singleFont": false + }, + "defaultValue": null + } + ] + } + ] + }, + { + "type": "subsection", + "id": "logo", + "content": [ + { + "type": "group", + "id": "logo", + "content": [ + { + "type": "setting", + "id": "logo", + "express": false, + "defaultValue": null + } + ] + } + ] + }, + { + "type": "subsection", + "id": "positionManager", + "content": [ + { + "type": "setting", + "id": "positionManager", + "express": true, + "defaultValue": null + } + ] + } + ] + } + ] +}; \ No newline at end of file From ceb7ac341920fa620a5fb4851e0b3ee83af85b92 Mon Sep 17 00:00:00 2001 From: Praveen Ponnusamy Date: Thu, 12 Dec 2024 13:05:57 +0530 Subject: [PATCH 4/6] esmBuild: Add JS extension to imported module paths To support buildless local development workflows, import statements in ES modules need to have .js file extension so that browsers can natively load them. Issue: https://devtopia.esri.com/WebGIS/arcgis-portal-app-templates/issues/11222 --- build/esmBuild.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/build/esmBuild.js b/build/esmBuild.js index 775da75d..86a6b159 100644 --- a/build/esmBuild.js +++ b/build/esmBuild.js @@ -17,8 +17,21 @@ const updateFiles = (files) => { .then(fileTxt => { // esm uses @arcgis/core package for JS API and the references are different let updatedFile = fileTxt.replaceAll(/esri\//g, "@arcgis/core/"); + // the previous line messes up "@esri/" imports. revert those back specifically updatedFile = updatedFile.replaceAll("@@arcgis/core/", "@esri/"); + + // Add .js extension to module specifiers that contain bare module names without file extension + // Ex: + // "@arcgis/core/core/promiseUtils" -> "@arcgis/core/core/promiseUtils.js" + updatedFile = updatedFile.replaceAll(/(from)\s+\"([^"\.]+)\";/g, "$1 \"$2.js\";"); + + // Add .js extension to module specifiers that contain a relative path without file extension + // Ex: + // "./support/configParser" -> "./support/configParser.js" + // "../functionality/configurationSettings" -> "../functionality/configurationSettings.js" + updatedFile = updatedFile.replaceAll(/(from)\s+\"(((\.\/)|(\.\.\/)+)([^"\.]+))\";/g, "$1 \"$2.js\";"); + // esm needs different telemetry file updatedFile = updatedFile.replaceAll("\"./telemetry.dojo.min\"", "\"./telemetry.min\""); From d9c69d82fa8b882639fadb33e9ddd9e894fbc3aa Mon Sep 17 00:00:00 2001 From: Praveen Ponnusamy Date: Thu, 12 Dec 2024 15:22:58 +0530 Subject: [PATCH 5/6] CompatibilityChecker: Fix Atlas app support Looks like Atlas app initially supported Group only, but later WebMap support was added. So, added a new property to "resourceMessages" to reflect the fact that Atlas app supports both WebMap and Group. Update tests Issue: https://devtopia.esri.com/WebGIS/arcgis-portal-app-templates/issues/11222 --- src/baseClasses/CompatibilityChecker.ts | 3 ++- .../CompatibilityChecker/compatibilityCheckerUT.ts | 9 ++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/baseClasses/CompatibilityChecker.ts b/src/baseClasses/CompatibilityChecker.ts index 430e205b..428ada20 100644 --- a/src/baseClasses/CompatibilityChecker.ts +++ b/src/baseClasses/CompatibilityChecker.ts @@ -118,6 +118,7 @@ export interface ICompatibilityCheckerProperties { resourceMessages: { Webmap: string; + WebmapOrGroup: string; Webscene: string; Group: string; WebmapOrWebscene: string; @@ -173,7 +174,7 @@ export class CompatibilityChecker { this._resourceMessagesMap = { [EAppTemplateType.AttachmentViewer]: resourceMessages.Webmap, - [EAppTemplateType.Atlas]: resourceMessages.Group, + [EAppTemplateType.Atlas]: resourceMessages.WebmapOrGroup, [EAppTemplateType.Basic]: resourceMessages.WebmapOrWebscene, [EAppTemplateType.CategoryGallery]: resourceMessages.Group, [EAppTemplateType.Charts]: resourceMessages.Webmap, diff --git a/tests/unit/baseClasses/CompatibilityChecker/compatibilityCheckerUT.ts b/tests/unit/baseClasses/CompatibilityChecker/compatibilityCheckerUT.ts index 9908383e..0da3304e 100644 --- a/tests/unit/baseClasses/CompatibilityChecker/compatibilityCheckerUT.ts +++ b/tests/unit/baseClasses/CompatibilityChecker/compatibilityCheckerUT.ts @@ -11,6 +11,7 @@ const { suite, test } = intern.getPlugin("interface.tdd"); enum ResourceResults { Webmap = "This app requires a webmap", + WebmapOrGroup = "This app requires a webmap or a group", Webscene = "This app requires a webscene", Group = "This app requires a group", WebmapOrWebscene = "This app requires a webmap or a webscene", @@ -23,6 +24,7 @@ class CompatibilityCheckerUT { new CompatibilityChecker.CompatibilityChecker({ resourceMessages: { Webmap: ResourceResults.Webmap, + WebmapOrGroup: ResourceResults.WebmapOrGroup, Webscene: ResourceResults.Webscene, Group: ResourceResults.Group, WebmapOrWebscene: ResourceResults.WebmapOrWebscene, @@ -69,10 +71,7 @@ class CompatibilityCheckerUT { CompatibilityChecker.EAppTemplateType.ThreeDViewer, ResourceResults.Webscene, ], - [ - CompatibilityChecker.EAppTemplateType.Atlas, - ResourceResults.Group, - ], + [CompatibilityChecker.EAppTemplateType.Atlas, null,], [CompatibilityChecker.EAppTemplateType.AttachmentViewer, null], [CompatibilityChecker.EAppTemplateType.Basic, null], [ @@ -141,7 +140,7 @@ class CompatibilityCheckerUT { [CompatibilityChecker.EAppTemplateType.ThreeDViewer, null], [ CompatibilityChecker.EAppTemplateType.Atlas, - ResourceResults.Group, + ResourceResults.WebmapOrGroup, ], [ CompatibilityChecker.EAppTemplateType.AttachmentViewer, From d13cbe586838b2bc85ff3ff3724fae0a8f8405ca Mon Sep 17 00:00:00 2001 From: Praveen Ponnusamy Date: Thu, 12 Dec 2024 15:24:39 +0530 Subject: [PATCH 6/6] Tests: add compatibility checks for General app Issue: https://devtopia.esri.com/WebGIS/arcgis-portal-app-templates/issues/11222 --- .../CompatibilityChecker/compatibilityCheckerUT.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/unit/baseClasses/CompatibilityChecker/compatibilityCheckerUT.ts b/tests/unit/baseClasses/CompatibilityChecker/compatibilityCheckerUT.ts index 0da3304e..a1969777 100644 --- a/tests/unit/baseClasses/CompatibilityChecker/compatibilityCheckerUT.ts +++ b/tests/unit/baseClasses/CompatibilityChecker/compatibilityCheckerUT.ts @@ -85,6 +85,7 @@ class CompatibilityCheckerUT { [CompatibilityChecker.EAppTemplateType.Compare, null], [CompatibilityChecker.EAppTemplateType.Countdown, null], [CompatibilityChecker.EAppTemplateType.Exhibit, null], + [CompatibilityChecker.EAppTemplateType.General, null], [CompatibilityChecker.EAppTemplateType.Insets, null], [ CompatibilityChecker.EAppTemplateType.InteractiveLegend, @@ -158,6 +159,10 @@ class CompatibilityCheckerUT { [CompatibilityChecker.EAppTemplateType.Compare, null], [CompatibilityChecker.EAppTemplateType.Countdown, null], [CompatibilityChecker.EAppTemplateType.Exhibit, null], + [ + CompatibilityChecker.EAppTemplateType.General, + ResourceResults.Webmap, + ], [ CompatibilityChecker.EAppTemplateType.Insets, ResourceResults.Webmap, @@ -251,6 +256,10 @@ class CompatibilityCheckerUT { CompatibilityChecker.EAppTemplateType.Exhibit, ResourceResults.WebmapOrWebscene, ], + [ + CompatibilityChecker.EAppTemplateType.General, + ResourceResults.Webmap, + ], [ CompatibilityChecker.EAppTemplateType.Insets, ResourceResults.Webmap,