@esri/solutions-components 0.8.39 → 0.8.40
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/t9n/solution-spatial-ref/resources.json +3 -3
- package/dist/assets/t9n/solution-spatial-ref/resources_en.json +2 -2
- package/dist/assets/t9n/solution-spatial-ref/resources_fr.json +2 -2
- package/dist/assets/t9n/solution-spatial-ref/resources_he.json +2 -2
- package/dist/cjs/_commonjsHelpers-baf43783.js +20 -0
- package/dist/cjs/basemap-gallery_7.cjs.entry.js +3 -2
- package/dist/cjs/buffer-tools_3.cjs.entry.js +3 -2
- package/dist/cjs/calcite-action-pad_2.cjs.entry.js +3 -2
- package/dist/cjs/calcite-alert_4.cjs.entry.js +7 -6
- package/dist/cjs/calcite-block_5.cjs.entry.js +5 -4
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +1 -1
- package/dist/cjs/calcite-dropdown-group_2.cjs.entry.js +3 -2
- package/dist/cjs/calcite-flow_6.cjs.entry.js +3 -2
- package/dist/cjs/calcite-pagination.cjs.entry.js +1 -1
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +9 -8
- package/dist/cjs/card-manager_3.cjs.entry.js +6 -5
- package/dist/cjs/{common-03600219.js → common-7ee7ad73.js} +1 -1
- package/dist/cjs/consent-manager.cjs.entry.js +3 -2
- package/dist/cjs/{core-b459e4f2.js → core-7f0bcc12.js} +1 -1
- package/dist/cjs/crowdsource-manager.cjs.entry.js +3 -2
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +3 -2
- package/dist/cjs/{downloadUtils-839a1425.js → downloadUtils-2e169425.js} +7 -7
- package/dist/cjs/{esri-loader-fce6a9cb.js → esri-loader-a56cbcbe.js} +2 -13
- package/dist/cjs/feature-list.cjs.entry.js +7 -6
- package/dist/cjs/{helpers-7cee3150.js → helpers-95c28cf3.js} +1 -1
- package/dist/cjs/{html2canvas-ef5cae40.js → html2canvas-29c6b9cc.js} +2 -2
- package/dist/cjs/{index.es-dd4d4842.js → index.es-301b8d18.js} +11 -10
- package/dist/cjs/instant-apps-ckeditor-wrapper_3.cjs.entry.js +6 -5
- package/dist/cjs/instant-apps-control-panel.cjs.entry.js +3 -2
- package/dist/cjs/instant-apps-create.cjs.entry.js +5 -4
- package/dist/cjs/instant-apps-export.cjs.entry.js +5 -4
- package/dist/cjs/instant-apps-header.cjs.entry.js +3 -2
- package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +5 -4
- package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +4 -3
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +4 -3
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +4 -3
- package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +6 -5
- package/dist/cjs/instant-apps-keyboard-shortcuts.cjs.entry.js +5 -4
- package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +7 -6
- package/dist/cjs/instant-apps-language-translator.cjs.entry.js +7 -6
- package/dist/cjs/instant-apps-measurement.cjs.entry.js +5 -4
- package/dist/cjs/instant-apps-popover.cjs.entry.js +5 -4
- package/dist/cjs/instant-apps-scoreboard.cjs.entry.js +5 -4
- package/dist/cjs/instant-apps-sign-in.cjs.entry.js +5 -4
- package/dist/cjs/instant-apps-splash.cjs.entry.js +5 -4
- package/dist/cjs/{languageSwitcher-1154d55d.js → languageSwitcher-f0bb94fa.js} +1 -1
- package/dist/cjs/{languageUtil-d23251cd.js → languageUtil-f22ce913.js} +1 -1
- package/dist/cjs/layout-manager.cjs.entry.js +3 -2
- package/dist/cjs/{loadModules-4189814e.js → loadModules-36d49819.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{locale-62f4cef2.js → locale-708985a1.js} +2 -2
- package/dist/cjs/{locale-6973733d.js → locale-f6fd03d2.js} +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +6 -5
- package/dist/cjs/{popupUtils-bae7f923.js → popupUtils-36e57a27.js} +2 -2
- package/dist/cjs/public-notification.cjs.entry.js +6 -5
- package/dist/cjs/{purify-4a0e9dfb.js → purify-17c0fc4a.js} +2 -2
- package/dist/cjs/{restHelpersGet-afc74285.js → restHelpersGet-be451f4a.js} +1 -1
- package/dist/cjs/solution-configuration.cjs.entry.js +10 -350
- package/dist/cjs/solution-contents_3.cjs.entry.js +58 -48
- package/dist/cjs/solution-resource-a09a6fe0.js +145 -0
- package/dist/cjs/{solution-store-c8bada29.js → solution-store-d9f3ea44.js} +8 -10
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/cjs/spatial-ref.cjs.entry.js +6 -5
- package/dist/cjs/store-manager.cjs.entry.js +17 -13
- package/dist/cjs/templates-f7a3bf48.js +401 -0
- package/dist/cjs/{utils-1de4eaa0.js → utils-31a22d49.js} +1 -1
- package/dist/collection/components/solution-item/solution-item.js +1 -1
- package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.css +11 -1
- package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +83 -47
- package/dist/collection/components/solution-spatial-ref/test/solution-spatial-ref.spec.js +25 -24
- package/dist/collection/components/solution-template-data/solution-template-data.js +1 -1
- package/dist/collection/components/solution-variables/solution-variables.js +1 -1
- package/dist/collection/components/spatial-ref/spatial-ref.js +1 -1
- package/dist/collection/components/store-manager/store-manager.js +11 -13
- package/dist/collection/demos/data/election-outreach.json +2981 -0
- package/dist/collection/demos/solution-item.html +7 -6
- package/dist/collection/demos/solution-spatial-ref.html +10 -4
- package/dist/collection/demos/solution-template-data.html +5 -5
- package/dist/collection/utils/interfaces.ts +0 -2
- package/dist/collection/utils/solution-store.js +6 -8
- package/dist/collection/utils/solution-store.ts +12 -13
- package/dist/collection/utils/templates.js +113 -26
- package/dist/collection/utils/templates.ts +125 -30
- package/dist/collection/utils/test/templates.e2e.js +2 -2
- package/dist/collection/utils/test/templates.e2e.ts +2 -2
- package/dist/components/_commonjsHelpers.js +16 -0
- package/dist/components/core.js +1 -1
- package/dist/components/downloadUtils.js +1 -1
- package/dist/components/esri-loader.js +2 -10
- package/dist/components/html2canvas.js +1 -1
- package/dist/components/index.es.js +1 -1
- package/dist/components/instant-apps-interactive-legend-classic2.js +1 -1
- package/dist/components/pagination.js +1 -1
- package/dist/components/purify.js +1 -1
- package/dist/components/solution-configuration.js +1 -342
- package/dist/components/solution-item2.js +1 -1
- package/dist/components/solution-resource.js +1 -1
- package/dist/components/solution-spatial-ref2.js +52 -44
- package/dist/components/solution-store.js +6 -8
- package/dist/components/solution-template-data2.js +1 -1
- package/dist/components/solution-variables2.js +1 -1
- package/dist/components/spatial-ref2.js +1 -1
- package/dist/components/store-manager.js +11 -13
- package/dist/components/templates.js +395 -0
- package/dist/esm/_commonjsHelpers-089957fe.js +16 -0
- package/dist/esm/basemap-gallery_7.entry.js +3 -2
- package/dist/esm/buffer-tools_3.entry.js +3 -2
- package/dist/esm/calcite-action-pad_2.entry.js +3 -2
- package/dist/esm/calcite-alert_4.entry.js +7 -6
- package/dist/esm/calcite-block_5.entry.js +5 -4
- package/dist/esm/calcite-combobox_3.entry.js +1 -1
- package/dist/esm/calcite-dropdown-group_2.entry.js +3 -2
- package/dist/esm/calcite-flow_6.entry.js +3 -2
- package/dist/esm/calcite-pagination.entry.js +1 -1
- package/dist/esm/calcite-shell-panel_14.entry.js +9 -8
- package/dist/esm/card-manager_3.entry.js +6 -5
- package/dist/esm/{common-8697fccd.js → common-96e3ddb0.js} +1 -1
- package/dist/esm/consent-manager.entry.js +3 -2
- package/dist/esm/{core-4bd4a70f.js → core-6a3c13ac.js} +1 -1
- package/dist/esm/crowdsource-manager.entry.js +3 -2
- package/dist/esm/crowdsource-reporter.entry.js +3 -2
- package/dist/esm/{downloadUtils-97acca92.js → downloadUtils-5fbd8a40.js} +6 -6
- package/dist/esm/{esri-loader-3080dcc0.js → esri-loader-781d738a.js} +2 -10
- package/dist/esm/feature-list.entry.js +7 -6
- package/dist/esm/{helpers-7c88b974.js → helpers-3d53560f.js} +1 -1
- package/dist/esm/{html2canvas-fd387d87.js → html2canvas-6443b68e.js} +1 -1
- package/dist/esm/{index.es-ee5497bc.js → index.es-66571353.js} +6 -5
- package/dist/esm/instant-apps-ckeditor-wrapper_3.entry.js +6 -5
- package/dist/esm/instant-apps-control-panel.entry.js +3 -2
- package/dist/esm/instant-apps-create.entry.js +5 -4
- package/dist/esm/instant-apps-export.entry.js +5 -4
- package/dist/esm/instant-apps-header.entry.js +3 -2
- package/dist/esm/instant-apps-interactive-legend-classic.entry.js +4 -3
- package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +4 -3
- package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +4 -3
- package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +4 -3
- package/dist/esm/instant-apps-interactive-legend.entry.js +6 -5
- package/dist/esm/instant-apps-keyboard-shortcuts.entry.js +5 -4
- package/dist/esm/instant-apps-language-switcher.entry.js +7 -6
- package/dist/esm/instant-apps-language-translator.entry.js +7 -6
- package/dist/esm/instant-apps-measurement.entry.js +5 -4
- package/dist/esm/instant-apps-popover.entry.js +5 -4
- package/dist/esm/instant-apps-scoreboard.entry.js +5 -4
- package/dist/esm/instant-apps-sign-in.entry.js +5 -4
- package/dist/esm/instant-apps-splash.entry.js +5 -4
- package/dist/esm/{languageSwitcher-0f693a04.js → languageSwitcher-b665499d.js} +1 -1
- package/dist/esm/{languageUtil-de206286.js → languageUtil-a3e6adf6.js} +1 -1
- package/dist/esm/layout-manager.entry.js +3 -2
- package/dist/esm/{loadModules-43119ac8.js → loadModules-9c062d08.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{locale-42369411.js → locale-28d48640.js} +1 -1
- package/dist/esm/{locale-70630b7c.js → locale-b4e7d56f.js} +2 -2
- package/dist/esm/map-select-tools_3.entry.js +6 -5
- package/dist/esm/{popupUtils-98ad70f3.js → popupUtils-4a91aa2a.js} +2 -2
- package/dist/esm/public-notification.entry.js +6 -5
- package/dist/esm/{purify-caded4cd.js → purify-72515357.js} +1 -1
- package/dist/esm/{restHelpersGet-dab84057.js → restHelpersGet-5c822bcd.js} +1 -1
- package/dist/esm/solution-configuration.entry.js +7 -347
- package/dist/esm/solution-contents_3.entry.js +58 -48
- package/dist/esm/{solution-resource-a2fff3bf.js → solution-resource-3108caf7.js} +1 -1
- package/dist/esm/{solution-store-30a19a45.js → solution-store-1c36ce1d.js} +8 -10
- package/dist/esm/solutions-components.js +1 -1
- package/dist/esm/spatial-ref.entry.js +6 -5
- package/dist/esm/store-manager.entry.js +17 -13
- package/dist/esm/templates-824ea028.js +395 -0
- package/dist/esm/{utils-9bb48951.js → utils-5484fcbf.js} +1 -1
- package/dist/solutions-components/demos/data/election-outreach.json +2981 -0
- package/dist/solutions-components/demos/solution-item.html +7 -6
- package/dist/solutions-components/demos/solution-spatial-ref.html +10 -4
- package/dist/solutions-components/demos/solution-template-data.html +5 -5
- package/dist/solutions-components/{p-3eb49703.js → p-00291b93.js} +3 -3
- package/dist/solutions-components/p-0cd87dca.entry.js +6 -0
- package/dist/solutions-components/p-13404ad7.entry.js +6 -0
- package/dist/solutions-components/{p-bf27cd5f.js → p-1c3c83a5.js} +1 -1
- package/dist/solutions-components/p-1e6c6ec4.entry.js +6 -0
- package/dist/solutions-components/p-219f209e.entry.js +6 -0
- package/dist/solutions-components/{p-b1abf15c.entry.js → p-2467b476.entry.js} +3 -3
- package/dist/solutions-components/p-295f850a.entry.js +6 -0
- package/dist/solutions-components/p-2961c63c.entry.js +6 -0
- package/dist/solutions-components/{p-946ee345.js → p-2afdcdfc.js} +2 -2
- package/dist/solutions-components/p-2d6d44b5.entry.js +6 -0
- package/dist/solutions-components/p-36e199e0.entry.js +6 -0
- package/dist/solutions-components/{p-d27ab863.js → p-3d7cff5e.js} +1 -1
- package/dist/solutions-components/{p-b2f11718.entry.js → p-3e8562b5.entry.js} +1 -1
- package/dist/solutions-components/{p-49250010.js → p-427b4593.js} +1 -1
- package/dist/solutions-components/{p-f1ae51dc.js → p-44fea43a.js} +1 -1
- package/dist/solutions-components/{p-afd2b67b.entry.js → p-4b27da06.entry.js} +1 -1
- package/dist/solutions-components/{p-7fe77355.js → p-5cc6eb18.js} +1 -1
- package/dist/solutions-components/p-61f88049.entry.js +6 -0
- package/dist/solutions-components/{p-d029b513.js → p-65581d83.js} +1 -1
- package/dist/solutions-components/p-6a68306c.js +6 -0
- package/dist/solutions-components/p-6c7a990a.entry.js +6 -0
- package/dist/solutions-components/p-6e6e6d23.entry.js +6 -0
- package/dist/solutions-components/p-7696af8e.entry.js +6 -0
- package/dist/solutions-components/{p-7afca6b4.js → p-7d1af07b.js} +1 -1
- package/dist/solutions-components/{p-6c7e34c1.entry.js → p-881ead62.entry.js} +2 -2
- package/dist/solutions-components/p-90864588.entry.js +6 -0
- package/dist/solutions-components/{p-59f016a1.js → p-91142a26.js} +1 -1
- package/dist/solutions-components/p-932d6f29.entry.js +6 -0
- package/dist/solutions-components/{p-71c212e6.entry.js → p-969828ab.entry.js} +1 -1
- package/dist/solutions-components/p-986ee365.entry.js +6 -0
- package/dist/solutions-components/p-9e3b0220.entry.js +6 -0
- package/dist/solutions-components/{p-7996f123.js → p-a0300d31.js} +1 -1
- package/dist/solutions-components/p-a8d62b7d.entry.js +6 -0
- package/dist/solutions-components/p-ae50581b.entry.js +6 -0
- package/dist/solutions-components/{p-89f6ff72.js → p-af2c8aa9.js} +1 -1
- package/dist/solutions-components/p-b7123452.entry.js +6 -0
- package/dist/solutions-components/p-b92e9047.entry.js +6 -0
- package/dist/solutions-components/p-bb7463ed.entry.js +6 -0
- package/dist/solutions-components/p-bbc7dd5e.entry.js +6 -0
- package/dist/solutions-components/p-bd871071.entry.js +21 -0
- package/dist/solutions-components/p-c6fd40f9.entry.js +6 -0
- package/dist/solutions-components/{p-42ea2581.js → p-c742acd9.js} +1 -1
- package/dist/solutions-components/p-cb4842dd.entry.js +6 -0
- package/dist/solutions-components/{p-bd459df3.entry.js → p-ccd1e256.entry.js} +2 -2
- package/dist/solutions-components/p-ce4b6931.entry.js +6 -0
- package/dist/solutions-components/p-d2de2b2a.entry.js +6 -0
- package/dist/solutions-components/p-d300430b.entry.js +6 -0
- package/dist/solutions-components/p-d4056c1c.js +6 -0
- package/dist/solutions-components/p-d73b90ab.entry.js +6 -0
- package/dist/solutions-components/{p-4e92c1ba.entry.js → p-dae9d5b3.entry.js} +1 -1
- package/dist/solutions-components/p-df56c019.entry.js +6 -0
- package/dist/solutions-components/p-e80751f4.entry.js +6 -0
- package/dist/solutions-components/{p-132b1138.entry.js → p-e8ed3fa6.entry.js} +2 -2
- package/dist/solutions-components/{p-1d369231.js → p-eed41e1a.js} +1 -1
- package/dist/solutions-components/p-fdd93685.js +22 -0
- package/dist/solutions-components/{p-6acf6c8f.js → p-ff87b9de.js} +1 -1
- package/dist/solutions-components/{p-c9b22653.js → p-ffd41e25.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/interfaces.ts +0 -2
- package/dist/solutions-components/utils/solution-store.ts +12 -13
- package/dist/solutions-components/utils/templates.ts +125 -30
- package/dist/solutions-components/utils/test/templates.e2e.ts +2 -2
- package/dist/solutions-components_commit.txt +8 -0
- package/dist/types/components/solution-spatial-ref/solution-spatial-ref.d.ts +21 -25
- package/dist/types/components/store-manager/store-manager.d.ts +3 -3
- package/dist/types/components.d.ts +10 -2
- package/dist/types/utils/templates.d.ts +35 -5
- package/package.json +5 -4
- package/dist/cjs/solution-resource-ffe3c333.js +0 -145
- package/dist/solutions-components/p-11b4cd1a.entry.js +0 -6
- package/dist/solutions-components/p-123fcb43.entry.js +0 -6
- package/dist/solutions-components/p-12b84e3b.entry.js +0 -36
- package/dist/solutions-components/p-1a8f7075.entry.js +0 -6
- package/dist/solutions-components/p-2a7111ad.entry.js +0 -6
- package/dist/solutions-components/p-36f5dee9.entry.js +0 -6
- package/dist/solutions-components/p-52bcd209.entry.js +0 -6
- package/dist/solutions-components/p-57961ae0.entry.js +0 -6
- package/dist/solutions-components/p-5b2d9899.entry.js +0 -6
- package/dist/solutions-components/p-5bd6a732.entry.js +0 -6
- package/dist/solutions-components/p-5fb4ddc2.entry.js +0 -6
- package/dist/solutions-components/p-622f33ee.entry.js +0 -6
- package/dist/solutions-components/p-652140aa.entry.js +0 -6
- package/dist/solutions-components/p-6d0404a6.entry.js +0 -6
- package/dist/solutions-components/p-789eb1c2.entry.js +0 -6
- package/dist/solutions-components/p-7a2f1801.entry.js +0 -6
- package/dist/solutions-components/p-7dcf6b16.entry.js +0 -6
- package/dist/solutions-components/p-8413a2ae.entry.js +0 -6
- package/dist/solutions-components/p-941e55f0.entry.js +0 -6
- package/dist/solutions-components/p-9b38e6a0.entry.js +0 -6
- package/dist/solutions-components/p-9c1fbf73.entry.js +0 -6
- package/dist/solutions-components/p-9d82f0e3.entry.js +0 -6
- package/dist/solutions-components/p-9fa1855f.entry.js +0 -6
- package/dist/solutions-components/p-a2390bee.entry.js +0 -6
- package/dist/solutions-components/p-a805c11f.entry.js +0 -6
- package/dist/solutions-components/p-af1c9389.entry.js +0 -6
- package/dist/solutions-components/p-b7d060b0.entry.js +0 -6
- package/dist/solutions-components/p-c4160bf7.js +0 -6
- package/dist/solutions-components/p-da75df88.entry.js +0 -6
- package/dist/solutions-components/p-e0277e0b.entry.js +0 -6
- package/dist/solutions-components/p-e11a4728.entry.js +0 -6
- package/dist/solutions-components/p-e89c05d6.entry.js +0 -6
- /package/dist/solutions-components/{p-8ad54f5c.js → p-e3196917.js} +0 -0
@@ -4,7 +4,7 @@
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
6
|
/** @license
|
7
|
-
* Copyright
|
7
|
+
* Copyright 2021 Esri
|
8
8
|
*
|
9
9
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
10
10
|
* you may not use this file except in compliance with the License.
|
@@ -18,9 +18,9 @@
|
|
18
18
|
* See the License for the specific language governing permissions and
|
19
19
|
* limitations under the License.
|
20
20
|
*/
|
21
|
+
import { h, Host } from "@stencil/core";
|
21
22
|
import "@esri/calcite-components";
|
22
23
|
import state from "../../utils/solution-store";
|
23
|
-
import { h, Host } from "@stencil/core";
|
24
24
|
import { getLocaleComponentStrings } from "../../utils/locale";
|
25
25
|
import { nodeListToArray } from "../../utils/common";
|
26
26
|
export class SolutionSpatialRef {
|
@@ -30,7 +30,6 @@ export class SolutionSpatialRef {
|
|
30
30
|
this.locked = true;
|
31
31
|
this.services = [];
|
32
32
|
this.value = this.defaultWkid.toString();
|
33
|
-
this._srSearchText = undefined;
|
34
33
|
this._translations = undefined;
|
35
34
|
}
|
36
35
|
lockedChanged(newLocked) {
|
@@ -53,17 +52,21 @@ export class SolutionSpatialRef {
|
|
53
52
|
componentWillLoad() {
|
54
53
|
return this._getTranslations();
|
55
54
|
}
|
56
|
-
/**
|
57
|
-
* Renders the component.
|
58
|
-
*/
|
59
55
|
render() {
|
60
|
-
return (h(Host, { key: '
|
56
|
+
return (h(Host, { key: '8c5f34b7d44429ed0395ae48956161caf7e62111' }, h("label", { key: '69f1178da58409888f0b5b15ae4ffd224bb999d4', class: "switch-label" }, h("calcite-switch", { key: '279795c5e21b914c595ea95219e3f589f7270ac4', checked: !this.locked, class: "spatial-ref-switch", onCalciteSwitchChange: (event) => this._updateLocked(event), scale: "m" }), this._translations.specifyParam), h("div", { key: '516e621ad3e2f6f881b0fbc0a80d98f1f3b7eecd', class: "spatial-ref-component", id: "spatialRefDefn" }, h("calcite-label", { key: '19b05ffa3e80d5e33521d0b6ee8438d882f9481d' }, this._translations.spatialReferenceInfo, h("label", { key: '0766edb36aa3e8853bfd4754b9ea7aa955d7d987', class: "spatial-ref-default" }, h("spatial-ref", { key: '9f1b37a12e18b5ba3c2d2b4b372f01a4f69ded28', defaultWkid: this.defaultWkid, disabled: this.locked, value: this.value }))), this._getFeatureServices(this.services))));
|
57
|
+
}
|
58
|
+
solutionStoreHasChanges() {
|
59
|
+
this.services = state.getStoreInfo("featureServices").map(service => service.name);
|
61
60
|
}
|
62
61
|
/**
|
63
62
|
* Saves changes to the embedded spatial reference value
|
64
63
|
*/
|
65
64
|
spatialReferenceChange(event) {
|
66
65
|
this.value = event.detail.newValue;
|
66
|
+
state.setStoreInfo("defaultWkid", event.detail.newValue);
|
67
|
+
const spatialReferenceInfo = state.getStoreInfo("spatialReferenceInfo");
|
68
|
+
spatialReferenceInfo.spatialReference = event.detail.newValue;
|
69
|
+
state.setStoreInfo("spatialReferenceInfo", spatialReferenceInfo);
|
67
70
|
}
|
68
71
|
//--------------------------------------------------------------------------
|
69
72
|
//
|
@@ -76,22 +79,19 @@ export class SolutionSpatialRef {
|
|
76
79
|
//
|
77
80
|
//--------------------------------------------------------------------------
|
78
81
|
/**
|
79
|
-
*
|
82
|
+
* Create a switch control for each of the services
|
83
|
+
*
|
84
|
+
* @param services List of feature services
|
85
|
+
* @returns a node to control each feature service
|
80
86
|
*/
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
// By default enable all Feature Services on first load
|
89
|
-
this._setFeatureServiceDefaults(this.services);
|
90
|
-
}
|
91
|
-
this.loaded = true;
|
92
|
-
}
|
87
|
+
_getFeatureServices(services) {
|
88
|
+
// verify they are in state
|
89
|
+
const spatialReferenceInfo = state.getStoreInfo("spatialReferenceInfo");
|
90
|
+
const _services = services.filter(serviceName => {
|
91
|
+
return Object.keys(spatialReferenceInfo.services).some(srefServiceName => srefServiceName === serviceName);
|
92
|
+
});
|
93
|
+
return _services.length > 0 ? (h("div", null, h("label", { class: "spatial-ref-item-title" }, this._translations.featureServicesHeading), h("ul", { class: "spatial-ref-services-list" }, _services.map(name => (h("li", { class: "spatial-ref-services-list-item" }, h("label", { class: "switch-label" }, h("calcite-switch", { checked: spatialReferenceInfo.services[name], class: "spatial-ref-item-switch", disabled: this.locked, onCalciteSwitchChange: (event) => this._updateEnabledServices(event, name), scale: "m" }), name))))))) : (null);
|
93
94
|
}
|
94
|
-
;
|
95
95
|
/**
|
96
96
|
* Enable spatial reference variable for all feature services.
|
97
97
|
*
|
@@ -104,19 +104,40 @@ export class SolutionSpatialRef {
|
|
104
104
|
services.forEach(name => this._updateEnabledServices({ detail: { switched: true } }, name));
|
105
105
|
}
|
106
106
|
/**
|
107
|
-
*
|
108
|
-
*
|
109
|
-
* @param services List of feature services
|
110
|
-
* @returns a node to control each feature service
|
107
|
+
* Updates the enabled/disabled state of the service in spatialReferenceInfo.
|
111
108
|
*/
|
112
|
-
|
113
|
-
|
109
|
+
_updateEnabledServices(event, name) {
|
110
|
+
var _a, _b;
|
114
111
|
const spatialReferenceInfo = state.getStoreInfo("spatialReferenceInfo");
|
115
|
-
const
|
116
|
-
|
112
|
+
const enabled = ((_a = event.detail) === null || _a === void 0 ? void 0 : _a.switched) !== undefined // internal event
|
113
|
+
? event.detail.switched
|
114
|
+
: ((_b = event.target) === null || _b === void 0 ? void 0 : _b.checked) !== undefined // calcite event
|
115
|
+
? event.target.checked
|
116
|
+
: true;
|
117
|
+
spatialReferenceInfo.services[name] = enabled;
|
118
|
+
state.setStoreInfo("spatialReferenceInfo", spatialReferenceInfo);
|
119
|
+
this.featureServiceSpatialReferenceChange.emit({
|
120
|
+
name,
|
121
|
+
enabled
|
117
122
|
});
|
118
|
-
return _services && _services.length > 0 ? (h("div", null, h("label", { class: "spatial-ref-item-title" }, this._translations.featureServicesHeading), _services.map(name => (h("label", { class: "switch-label" }, h("calcite-switch", { checked: spatialReferenceInfo.services[name], class: "spatial-ref-item-switch", disabled: this.locked, onCalciteSwitchChange: (event) => this._updateEnabledServices(event, name), scale: "m" }), name))))) : (null);
|
119
123
|
}
|
124
|
+
/**
|
125
|
+
* Toggles the ability to set the default spatial reference.
|
126
|
+
*/
|
127
|
+
_updateLocked(event) {
|
128
|
+
this.locked = !event.target.checked;
|
129
|
+
this._updateStore();
|
130
|
+
if (!this.loaded) {
|
131
|
+
// when this is switched on when loading we have reloaded a solution that
|
132
|
+
// has a custom wkid param and we should honor the settings they already have in the templates
|
133
|
+
if (event.target.checked) {
|
134
|
+
// By default enable all Feature Services on first load
|
135
|
+
this._setFeatureServiceDefaults(this.services);
|
136
|
+
}
|
137
|
+
this.loaded = true;
|
138
|
+
}
|
139
|
+
}
|
140
|
+
;
|
120
141
|
/**
|
121
142
|
* Updates the enabled and spatialReference prop in spatialReferenceInfo.
|
122
143
|
*/
|
@@ -126,18 +147,6 @@ export class SolutionSpatialRef {
|
|
126
147
|
spatialReferenceInfo.spatialReference = this.value;
|
127
148
|
state.setStoreInfo("spatialReferenceInfo", spatialReferenceInfo);
|
128
149
|
}
|
129
|
-
/**
|
130
|
-
* Updates the enabled/disabled state of the service in spatialReferenceInfo.
|
131
|
-
*/
|
132
|
-
_updateEnabledServices(event, name) {
|
133
|
-
const spatialReferenceInfo = state.getStoreInfo("spatialReferenceInfo");
|
134
|
-
spatialReferenceInfo.services[name] = event.target.checked;
|
135
|
-
state.setStoreInfo("spatialReferenceInfo", spatialReferenceInfo);
|
136
|
-
this.featureServiceSpatialReferenceChange.emit({
|
137
|
-
name,
|
138
|
-
enabled: event.target.checked
|
139
|
-
});
|
140
|
-
}
|
141
150
|
/**
|
142
151
|
* Fetches the component's translations
|
143
152
|
*
|
@@ -178,6 +187,24 @@ export class SolutionSpatialRef {
|
|
178
187
|
"reflect": true,
|
179
188
|
"defaultValue": "102100"
|
180
189
|
},
|
190
|
+
"loaded": {
|
191
|
+
"type": "boolean",
|
192
|
+
"mutable": true,
|
193
|
+
"complexType": {
|
194
|
+
"original": "boolean",
|
195
|
+
"resolved": "boolean",
|
196
|
+
"references": {}
|
197
|
+
},
|
198
|
+
"required": false,
|
199
|
+
"optional": false,
|
200
|
+
"docs": {
|
201
|
+
"tags": [],
|
202
|
+
"text": "Indicates if the control has been enabled.\r\nThe first time Spatial Reference has been enabled it should enable all feature services."
|
203
|
+
},
|
204
|
+
"attribute": "loaded",
|
205
|
+
"reflect": true,
|
206
|
+
"defaultValue": "false"
|
207
|
+
},
|
181
208
|
"locked": {
|
182
209
|
"type": "boolean",
|
183
210
|
"mutable": true,
|
@@ -234,8 +261,6 @@ export class SolutionSpatialRef {
|
|
234
261
|
}
|
235
262
|
static get states() {
|
236
263
|
return {
|
237
|
-
"loaded": {},
|
238
|
-
"_srSearchText": {},
|
239
264
|
"_translations": {}
|
240
265
|
};
|
241
266
|
}
|
@@ -251,9 +276,14 @@ export class SolutionSpatialRef {
|
|
251
276
|
"text": ""
|
252
277
|
},
|
253
278
|
"complexType": {
|
254
|
-
"original": "
|
255
|
-
"resolved": "
|
256
|
-
"references": {
|
279
|
+
"original": "IFeatureServiceSpatialReferenceChange",
|
280
|
+
"resolved": "IFeatureServiceSpatialReferenceChange",
|
281
|
+
"references": {
|
282
|
+
"IFeatureServiceSpatialReferenceChange": {
|
283
|
+
"location": "global",
|
284
|
+
"id": "global::IFeatureServiceSpatialReferenceChange"
|
285
|
+
}
|
286
|
+
}
|
257
287
|
}
|
258
288
|
}, {
|
259
289
|
"method": "lockedSpatialReferenceChange",
|
@@ -281,6 +311,12 @@ export class SolutionSpatialRef {
|
|
281
311
|
}
|
282
312
|
static get listeners() {
|
283
313
|
return [{
|
314
|
+
"name": "solutionStoreHasChanges",
|
315
|
+
"method": "solutionStoreHasChanges",
|
316
|
+
"target": "window",
|
317
|
+
"capture": false,
|
318
|
+
"passive": false
|
319
|
+
}, {
|
284
320
|
"name": "spatialReferenceChange",
|
285
321
|
"method": "spatialReferenceChange",
|
286
322
|
"target": "window",
|
@@ -47,30 +47,31 @@ describe('solution-spatial-ref', () => {
|
|
47
47
|
});
|
48
48
|
expect(page.root).toEqualHtml(`
|
49
49
|
<solution-spatial-ref default-wkid="102100" locked="" value="102100">
|
50
|
-
<
|
51
|
-
<
|
52
|
-
|
53
|
-
|
54
|
-
<
|
55
|
-
<
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
50
|
+
<label class="switch-label">
|
51
|
+
<calcite-switch class="spatial-ref-switch" scale="m"></calcite-switch>
|
52
|
+
</label>
|
53
|
+
<div class="spatial-ref-component" id="spatialRefDefn">
|
54
|
+
<calcite-label>
|
55
|
+
<label class="spatial-ref-default">
|
56
|
+
<spatial-ref defaultwkid="102100" disabled="" value="102100"></spatial-ref>
|
57
|
+
</label>
|
58
|
+
</calcite-label>
|
59
|
+
<div>
|
60
|
+
<label class="spatial-ref-item-title"></label>
|
61
|
+
<ul class="spatial-ref-services-list">
|
62
|
+
<li class="spatial-ref-services-list-item">
|
63
|
+
<label class="switch-label">
|
64
|
+
<calcite-switch checked="" class="spatial-ref-item-switch" disabled="" scale="m"></calcite-switch>
|
65
|
+
Feature Service 1
|
66
|
+
</label>
|
67
|
+
</li>
|
68
|
+
<li class="spatial-ref-services-list-item">
|
69
|
+
<label class="switch-label">
|
70
|
+
<calcite-switch class="spatial-ref-item-switch" disabled="" scale="m"></calcite-switch>
|
71
|
+
Feature Service 2
|
72
|
+
</label>
|
73
|
+
</li>
|
74
|
+
</ul>
|
74
75
|
</div>
|
75
76
|
</div>
|
76
77
|
</solution-spatial-ref>
|
@@ -72,7 +72,7 @@ export class SolutionTemplateData {
|
|
72
72
|
* Renders the component.
|
73
73
|
*/
|
74
74
|
render() {
|
75
|
-
return (h(Host, { key: '
|
75
|
+
return (h(Host, { key: '5a417f81d9b0d98ad28f9139406fee4b37204169' }, h("div", { key: '0dd5d77a961473bf45f7654ccb2e0507b492a6c7', class: "solution-data-container" }, h("calcite-shell", { key: '3b839b36a89f1a9db10a6ad8b3f7d088248770bc', class: "light var-container", dir: "ltr" }, h("calcite-panel", { key: '9f6ce42fdad56cf7a9f6b2f9ccac707eb655f4f1', class: "json-editor" }, h("div", { key: 'a1ba50c8fd13cf6d4934aa72083c0519c317721d', class: "solution-data-child-container calcite-match-height" }, h("json-editor", { key: '8f832aecde35b6b82e16b3d201b738fe202e86a3', class: "solution-data-editor-container", instanceid: this.itemId + "|" + this.instanceid, value: this.value }))), h("calcite-shell-panel", { key: 'c24f19fcc440884123f59842b392063925b5cbf6', "height-scale": "l", position: "end", slot: "contextual-panel", "width-scale": "xs" }, h("div", { key: '8d9c25baada3e2ca03ee192f44121d7bdab85432', class: this.varsOpen ? "solution-data-child-container" : "solution-data-child-container-collapsed" }, h("calcite-button", { key: '247b542336578c5404c7246552424c16030d90a7', appearance: "transparent", class: "collapse-btn", "icon-start": this.varsOpen ? "chevrons-right" : "chevrons-left", id: "collapse-vars", onClick: () => this._toggleVars(), scale: "s", title: this.varsOpen ? this._translations.collapse : this._translations.expand }), h("div", { key: '963c1802c7828557cec5493602c3a1669e21683c', class: this.varsOpen ? "org-vars" : "org-vars display-none", id: "orgVars" }, h("solution-organization-variables", { key: '566f672a97401d77ed7180d5fc7b2367027fcc57', value: this.organizationVariables })), h("div", { key: '79508bfcde2ac8507acd40bbc3edceb944c3e717', class: this.varsOpen ? "sol-vars" : "sol-vars display-none", id: "solVars" }, h("solution-variables", { key: '51756082f8d13c73d7ae1349fc5625994a3354bb', value: this.solutionVariables }))))))));
|
76
76
|
}
|
77
77
|
//--------------------------------------------------------------------------
|
78
78
|
//
|
@@ -44,7 +44,7 @@ export class SolutionVariables {
|
|
44
44
|
* Renders the component.
|
45
45
|
*/
|
46
46
|
render() {
|
47
|
-
return (h(Host, { key: '
|
47
|
+
return (h(Host, { key: '4367694cf20a2063b57679f1a955ef827eea1c05' }, h("div", { key: '875e6e1532e7406ddf6cca804e421980aa23b7cd' }, h("h4", { key: 'b6798506cf71d3c84e2c33a3d12a0729591a73a7', class: "org-var-header" }, this._translations.solVariables)), h("div", { key: '413d3c7ebae5afa05a8cb5c87f766db64f43e106', class: "container-border" }, h("calcite-tree", { key: 'ba5bf27e005ce7536cdfe0c8022c96cd0b4ad920', id: "variable-label" }, this._renderHierarchy(this._solutionVariables)))));
|
48
48
|
}
|
49
49
|
//--------------------------------------------------------------------------
|
50
50
|
//
|
@@ -64,7 +64,7 @@ export class SpatialRef {
|
|
64
64
|
* Renders the component.
|
65
65
|
*/
|
66
66
|
render() {
|
67
|
-
return (h(Host, { key: '
|
67
|
+
return (h(Host, { key: '23f3f6ff3d7eeeaeb8fb916532302a241fdbc078' }, h("div", { key: 'ea7631c0c26d451a72bd68e24ccb3ac757cf73f3' }, h("calcite-input", { key: '32d27336b3bc34ee6cd0d3c7ac3e52de7ee8011e', disabled: this.disabled, id: "calcite-sr-search", onKeyUp: (evt) => this._searchInputKeyDown(evt), placeholder: this._translations.spatialReferencePlaceholder }), h("calcite-tree", { key: '927f03277a45d5cf256306a2246bccffc0d296cb', id: "calcite-sr-tree", slot: "children" }, this._getTreeContent()))));
|
68
68
|
}
|
69
69
|
//--------------------------------------------------------------------------
|
70
70
|
//
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import state from "../../utils/solution-store";
|
2
|
+
import { getFeatureServices, /*getModels,*/ getSpatialReferenceInfo } from "../../utils/templates";
|
1
3
|
export class StoreManager {
|
2
4
|
constructor() {
|
3
5
|
this.value = "";
|
@@ -20,26 +22,22 @@ export class StoreManager {
|
|
20
22
|
}
|
21
23
|
/**
|
22
24
|
* Initialize the observer that will monitor and respond to changes in the value.
|
23
|
-
* When we get a new value we are
|
25
|
+
* When we get a new value we are dealing with a new solution and need to fetch the item's data and load the state.
|
24
26
|
*/
|
25
27
|
_initValueObserver() {
|
26
|
-
|
28
|
+
const self = this;
|
27
29
|
this._valueObserver = new MutationObserver(ml => {
|
28
30
|
ml.some(mutation => {
|
29
31
|
const newValue = mutation.target[mutation.attributeName];
|
30
32
|
if (mutation.type === 'attributes' && mutation.attributeName === "value" &&
|
31
33
|
newValue !== mutation.oldValue && newValue !== "") {
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
self.templates = v;
|
40
|
-
self.stateLoaded.emit(state);
|
41
|
-
});
|
42
|
-
*/
|
34
|
+
const solutionData = JSON.parse(newValue);
|
35
|
+
state.setStoreInfo("solutionData", solutionData);
|
36
|
+
const services = getFeatureServices(solutionData.templates);
|
37
|
+
state.setStoreInfo("featureServices", services);
|
38
|
+
state.setStoreInfo("spatialReferenceInfo", getSpatialReferenceInfo(services, solutionData));
|
39
|
+
//self.templates = solutionData;
|
40
|
+
self.stateLoaded.emit(state);
|
43
41
|
return true;
|
44
42
|
}
|
45
43
|
});
|