@arcgis/map-components 1.0.0-beta.17 → 1.0.0-beta.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/arcgis-map-components/arcgis-map-components.esm.js +1 -148
- package/dist/arcgis-map-components/index.esm.js +0 -1
- package/dist/arcgis-map-components/p-021530fd.entry.js +1 -0
- package/dist/arcgis-map-components/p-0685d15c.entry.js +1 -0
- package/dist/arcgis-map-components/p-09e15a1f.entry.js +1 -0
- package/dist/arcgis-map-components/p-0d77ce8d.entry.js +1 -0
- package/dist/arcgis-map-components/p-0f83c24c.entry.js +1 -0
- package/dist/arcgis-map-components/p-177a536e.entry.js +1 -0
- package/dist/arcgis-map-components/p-1977344d.entry.js +1 -0
- package/dist/arcgis-map-components/p-1b9d7fb5.entry.js +1 -0
- package/dist/arcgis-map-components/p-1e5e5ed9.js +2 -0
- package/dist/arcgis-map-components/p-20c7de19.entry.js +1 -0
- package/dist/arcgis-map-components/p-23aebf98.entry.js +1 -0
- package/dist/arcgis-map-components/p-2bb7a744.entry.js +1 -0
- package/dist/arcgis-map-components/p-2d3406f7.js +1 -0
- package/dist/arcgis-map-components/p-2fdc27af.entry.js +1 -0
- package/dist/arcgis-map-components/p-34df1205.entry.js +1 -0
- package/dist/arcgis-map-components/p-39df01ce.entry.js +1 -0
- package/dist/arcgis-map-components/p-39eb103e.entry.js +1 -0
- package/dist/arcgis-map-components/p-4b213105.entry.js +1 -0
- package/dist/arcgis-map-components/p-53d8e476.entry.js +1 -0
- package/dist/arcgis-map-components/p-57259fd5.entry.js +1 -0
- package/dist/arcgis-map-components/p-5924285b.entry.js +1 -0
- package/dist/arcgis-map-components/p-5cabdee7.js +1 -0
- package/dist/arcgis-map-components/p-68a75dc8.entry.js +1 -0
- package/dist/arcgis-map-components/p-68f62c97.entry.js +1 -0
- package/dist/arcgis-map-components/p-6951ecc2.entry.js +1 -0
- package/dist/arcgis-map-components/p-69aaaa8c.entry.js +1 -0
- package/dist/arcgis-map-components/p-71ba5d8c.entry.js +1 -0
- package/dist/arcgis-map-components/p-796aa573.entry.js +1 -0
- package/dist/arcgis-map-components/p-7e3965a6.entry.js +1 -0
- package/dist/arcgis-map-components/p-85e5fcb4.entry.js +1 -0
- package/dist/arcgis-map-components/p-91b9e93f.entry.js +1 -0
- package/dist/arcgis-map-components/p-9566f3ac.entry.js +1 -0
- package/dist/arcgis-map-components/p-9767670f.entry.js +1 -0
- package/dist/arcgis-map-components/p-9d0e9668.entry.js +1 -0
- package/dist/arcgis-map-components/p-a2ba2654.entry.js +1 -0
- package/dist/arcgis-map-components/p-a47f9c9c.entry.js +1 -0
- package/dist/arcgis-map-components/p-ac2a93fb.entry.js +1 -0
- package/dist/arcgis-map-components/p-b35cd7c1.entry.js +1 -0
- package/dist/arcgis-map-components/p-b59cc744.entry.js +1 -0
- package/dist/arcgis-map-components/p-b699b1d2.entry.js +1 -0
- package/dist/arcgis-map-components/p-b813c9e6.js +1 -0
- package/dist/arcgis-map-components/p-c2d35c80.entry.js +1 -0
- package/dist/arcgis-map-components/p-c9f47845.entry.js +1 -0
- package/dist/arcgis-map-components/p-ca9109da.entry.js +1 -0
- package/dist/arcgis-map-components/p-cdf352de.entry.js +1 -0
- package/dist/arcgis-map-components/p-d360bf58.entry.js +1 -0
- package/dist/arcgis-map-components/p-d3b14bf9.entry.js +1 -0
- package/dist/arcgis-map-components/p-de286635.entry.js +1 -0
- package/dist/arcgis-map-components/p-e230d0a1.entry.js +1 -0
- package/dist/arcgis-map-components/p-e3a2afb4.entry.js +1 -0
- package/dist/arcgis-map-components/p-e8b09e23.entry.js +1 -0
- package/dist/arcgis-map-components/p-ea6ae338.entry.js +1 -0
- package/dist/arcgis-map-components/p-ef4d2a7e.entry.js +1 -0
- package/dist/arcgis-map-components/p-f37dec12.entry.js +1 -0
- package/dist/arcgis-map-components/p-f62ad08d.entry.js +1 -0
- package/dist/arcgis-map-components/p-f6bc527c.js +1 -0
- package/dist/arcgis-map-components/p-f8e2e2ed.entry.js +1 -0
- package/dist/cjs/arcgis-area-measurement-2d.cjs.entry.js +101 -0
- package/dist/cjs/arcgis-area-measurement-3d.cjs.entry.js +94 -0
- package/dist/cjs/arcgis-attachments.cjs.entry.js +73 -0
- package/dist/cjs/arcgis-basemap-gallery_3.cjs.entry.js +281 -0
- package/dist/cjs/arcgis-basemap-layer-list.cjs.entry.js +144 -0
- package/dist/cjs/arcgis-basemap-toggle.cjs.entry.js +115 -0
- package/dist/cjs/arcgis-bookmarks.cjs.entry.js +140 -0
- package/dist/cjs/arcgis-building-explorer.cjs.entry.js +80 -0
- package/dist/cjs/arcgis-compass.cjs.entry.js +90 -0
- package/dist/cjs/arcgis-coordinate-conversion.cjs.entry.js +158 -0
- package/dist/cjs/arcgis-daylight.cjs.entry.js +116 -0
- package/dist/cjs/arcgis-directional-pad.cjs.entry.js +100 -0
- package/dist/cjs/arcgis-directions.cjs.entry.js +194 -0
- package/dist/cjs/arcgis-directline-measurement-3d.cjs.entry.js +114 -0
- package/dist/cjs/arcgis-distance-measurement-2d.cjs.entry.js +106 -0
- package/dist/cjs/arcgis-editor.cjs.entry.js +180 -0
- package/dist/cjs/arcgis-elevation-profile.cjs.entry.js +136 -0
- package/dist/cjs/arcgis-feature-form.cjs.entry.js +36 -0
- package/dist/cjs/arcgis-feature-table.cjs.entry.js +300 -0
- package/dist/cjs/arcgis-feature-templates.cjs.entry.js +73 -0
- package/dist/cjs/arcgis-feature.cjs.entry.js +106 -0
- package/dist/cjs/arcgis-features.cjs.entry.js +133 -0
- package/dist/cjs/arcgis-floor-filter.cjs.entry.js +134 -0
- package/dist/cjs/arcgis-fullscreen.cjs.entry.js +92 -0
- package/dist/cjs/arcgis-histogram-range-slider.cjs.entry.js +80 -0
- package/dist/cjs/arcgis-histogram.cjs.entry.js +36 -0
- package/dist/cjs/arcgis-home.cjs.entry.js +108 -0
- package/dist/cjs/arcgis-layer-list.cjs.entry.js +128 -0
- package/dist/cjs/arcgis-legend.cjs.entry.js +146 -0
- package/dist/cjs/arcgis-line-of-sight.cjs.entry.js +94 -0
- package/dist/cjs/arcgis-locate.cjs.entry.js +158 -0
- package/dist/cjs/arcgis-map-components.cjs.js +23 -0
- package/dist/cjs/arcgis-measurement.cjs.entry.js +123 -0
- package/dist/cjs/arcgis-navigation-toggle.cjs.entry.js +97 -0
- package/dist/cjs/arcgis-print.cjs.entry.js +163 -0
- package/dist/cjs/arcgis-scale-bar.cjs.entry.js +106 -0
- package/dist/cjs/arcgis-scale-range-slider.cjs.entry.js +146 -0
- package/dist/cjs/arcgis-scene.cjs.entry.js +106 -0
- package/dist/cjs/arcgis-search.cjs.entry.js +276 -0
- package/dist/cjs/arcgis-shadow-cast.cjs.entry.js +95 -0
- package/dist/cjs/arcgis-sketch.cjs.entry.js +201 -0
- package/dist/cjs/arcgis-slice.cjs.entry.js +103 -0
- package/dist/cjs/arcgis-slider.cjs.entry.js +233 -0
- package/dist/cjs/arcgis-swipe.cjs.entry.js +117 -0
- package/dist/cjs/arcgis-table-list.cjs.entry.js +118 -0
- package/dist/cjs/arcgis-time-slider.cjs.entry.js +216 -0
- package/dist/cjs/arcgis-track.cjs.entry.js +147 -0
- package/dist/cjs/arcgis-utility-network-associations.cjs.entry.js +220 -0
- package/dist/cjs/arcgis-utility-network-trace.cjs.entry.js +162 -0
- package/dist/cjs/arcgis-utility-network-validate-topology.cjs.entry.js +110 -0
- package/dist/cjs/arcgis-value-picker.cjs.entry.js +160 -0
- package/dist/cjs/arcgis-weather.cjs.entry.js +86 -0
- package/dist/cjs/arcgis-zoom.cjs.entry.js +100 -0
- package/dist/cjs/component-utils-cbd20e88.js +77 -0
- package/dist/cjs/disconnected-306cb220.js +55 -0
- package/dist/cjs/index-6b51d5a0.js +1619 -0
- package/dist/cjs/index-fda6ecee.js +753 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +22 -0
- package/dist/cjs/mapping-utils-c2c7b994.js +40 -0
- package/dist/components/arcgis-area-measurement-2d.js +128 -0
- package/dist/components/arcgis-area-measurement-3d.js +121 -0
- package/dist/components/arcgis-attachments.js +99 -0
- package/dist/{arcgis-map-components/arcgis-basemap-gallery.entry.js → components/arcgis-basemap-gallery.js} +42 -11
- package/dist/components/arcgis-basemap-layer-list.js +175 -0
- package/dist/components/arcgis-basemap-toggle.js +143 -0
- package/dist/components/arcgis-bookmarks.js +169 -0
- package/dist/components/arcgis-building-explorer.js +105 -0
- package/dist/components/arcgis-compass.js +109 -0
- package/dist/components/arcgis-coordinate-conversion.js +193 -0
- package/dist/components/arcgis-daylight.js +144 -0
- package/dist/components/arcgis-directional-pad.d.ts +11 -0
- package/dist/components/arcgis-directional-pad.js +126 -0
- package/dist/components/arcgis-directions.js +230 -0
- package/dist/components/arcgis-directline-measurement-3d.js +142 -0
- package/dist/components/arcgis-distance-measurement-2d.js +133 -0
- package/dist/components/arcgis-editor.js +219 -0
- package/dist/components/arcgis-elevation-profile.js +166 -0
- package/dist/components/arcgis-expand.js +6 -0
- package/dist/{arcgis-map-components/arcgis-expand.entry.js → components/arcgis-expand2.js} +30 -11
- package/dist/components/arcgis-feature-form.js +55 -0
- package/dist/components/arcgis-feature-table.js +355 -0
- package/dist/components/arcgis-feature-templates.js +98 -0
- package/dist/components/arcgis-feature.js +133 -0
- package/dist/components/arcgis-features.js +169 -0
- package/dist/components/arcgis-floor-filter.js +164 -0
- package/dist/components/arcgis-fullscreen.js +111 -0
- package/dist/components/arcgis-histogram-range-slider.js +106 -0
- package/dist/components/arcgis-histogram.js +55 -0
- package/dist/components/arcgis-home.js +129 -0
- package/dist/components/arcgis-layer-list.js +158 -0
- package/dist/components/arcgis-legend.js +177 -0
- package/dist/components/arcgis-line-of-sight.js +120 -0
- package/dist/components/arcgis-locate.js +184 -0
- package/dist/{arcgis-map-components/arcgis-map.entry.js → components/arcgis-map.js} +36 -10
- package/dist/components/arcgis-measurement.js +153 -0
- package/dist/components/arcgis-navigation-toggle.js +117 -0
- package/dist/components/arcgis-print.js +197 -0
- package/dist/components/arcgis-scale-bar.js +133 -0
- package/dist/components/arcgis-scale-range-slider.js +177 -0
- package/dist/components/arcgis-scene.js +127 -0
- package/dist/components/arcgis-search.js +330 -0
- package/dist/components/arcgis-shadow-cast.js +121 -0
- package/dist/components/arcgis-sketch.js +238 -0
- package/dist/components/arcgis-slice.js +130 -0
- package/dist/components/arcgis-slider.js +281 -0
- package/dist/components/arcgis-swipe.js +140 -0
- package/dist/components/arcgis-table-list.js +147 -0
- package/dist/components/arcgis-time-slider.js +256 -0
- package/dist/components/arcgis-track.js +171 -0
- package/dist/components/arcgis-utility-network-associations.d.ts +11 -0
- package/dist/components/arcgis-utility-network-associations.js +258 -0
- package/dist/components/arcgis-utility-network-trace.js +197 -0
- package/dist/components/arcgis-utility-network-validate-topology.d.ts +11 -0
- package/dist/components/arcgis-utility-network-validate-topology.js +137 -0
- package/dist/components/arcgis-value-picker.js +198 -0
- package/dist/components/arcgis-weather.js +111 -0
- package/dist/components/arcgis-zoom.js +121 -0
- package/dist/components/disconnected.js +122 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +55 -0
- package/dist/components/index2.js +671 -0
- package/dist/{arcgis-map-components → esm}/arcgis-area-measurement-2d.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-area-measurement-3d.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-attachments.entry.js +2 -2
- package/dist/esm/arcgis-basemap-gallery_3.entry.js +275 -0
- package/dist/{arcgis-map-components → esm}/arcgis-basemap-layer-list.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-basemap-toggle.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-bookmarks.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-building-explorer.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-compass.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-coordinate-conversion.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-daylight.entry.js +3 -3
- package/dist/esm/arcgis-directional-pad.entry.js +96 -0
- package/dist/{arcgis-map-components → esm}/arcgis-directions.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-directline-measurement-3d.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-distance-measurement-2d.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-editor.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-elevation-profile.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-feature-form.entry.js +2 -2
- package/dist/{arcgis-map-components → esm}/arcgis-feature-table.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-feature-templates.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-feature.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-features.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-floor-filter.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-fullscreen.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-histogram-range-slider.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-histogram.entry.js +2 -2
- package/dist/{arcgis-map-components → esm}/arcgis-home.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-layer-list.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-legend.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-line-of-sight.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-locate.entry.js +3 -3
- package/dist/esm/arcgis-map-components.js +18 -0
- package/dist/{arcgis-map-components → esm}/arcgis-measurement.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-navigation-toggle.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-print.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-scale-bar.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-scale-range-slider.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-scene.entry.js +2 -2
- package/dist/{arcgis-map-components → esm}/arcgis-search.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-shadow-cast.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-sketch.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-slice.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-slider.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-swipe.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-table-list.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-time-slider.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-track.entry.js +3 -3
- package/dist/esm/arcgis-utility-network-associations.entry.js +216 -0
- package/dist/{arcgis-map-components → esm}/arcgis-utility-network-trace.entry.js +3 -3
- package/dist/esm/arcgis-utility-network-validate-topology.entry.js +106 -0
- package/dist/{arcgis-map-components → esm}/arcgis-value-picker.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-weather.entry.js +3 -3
- package/dist/{arcgis-map-components → esm}/arcgis-zoom.entry.js +3 -3
- package/dist/{arcgis-map-components/component-utils-d3552de2.js → esm/component-utils-2ebdae59.js} +1 -1
- package/dist/esm/index-98b79a87.js +671 -0
- package/dist/esm/index-eb3ead33.js +1591 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +18 -0
- package/dist/esm/mapping-utils-26beb904.js +38 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/loader/cdn.js +3 -0
- package/dist/loader/index.cjs.js +3 -0
- package/dist/loader/index.d.ts +21 -0
- package/dist/loader/index.es2017.js +3 -0
- package/dist/loader/index.js +4 -0
- package/dist/loader/package.json +11 -0
- package/dist/types/components/arcgis-directional-pad/arcgis-directional-pad.d.ts +27 -0
- package/dist/types/components/arcgis-utility-network-associations/arcgis-utility-network-associations.d.ts +50 -0
- package/dist/types/components/arcgis-utility-network-validate-topology/arcgis-utility-network-validate-topology.d.ts +28 -0
- package/dist/types/components.d.ts +119 -0
- package/package.json +7 -6
- package/dist/arcgis-map-components/app-globals-0f993ce5.js +0 -3
- package/dist/arcgis-map-components/css-shim-b7d3d95f.js +0 -4
- package/dist/arcgis-map-components/dom-64053c71.js +0 -73
- package/dist/arcgis-map-components/index-82d260eb.js +0 -8293
- package/dist/arcgis-map-components/index-d9a93dfb.js +0 -3371
- package/dist/arcgis-map-components/shadow-css-008a49f5.js +0 -387
- /package/dist/{arcgis-map-components/mapping-utils-26beb904.js → components/mapping-utils.js} +0 -0
- /package/dist/{arcgis-map-components → esm}/disconnected-bc5fc8bc.js +0 -0
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-6b51d5a0.js');
|
|
6
|
+
const index$1 = require('./index-fda6ecee.js');
|
|
7
|
+
const componentUtils = require('./component-utils-cbd20e88.js');
|
|
8
|
+
const disconnected = require('./disconnected-306cb220.js');
|
|
9
|
+
const mappingUtils = require('./mapping-utils-c2c7b994.js');
|
|
10
|
+
|
|
11
|
+
const arcgisBasemapGalleryCss = "";
|
|
12
|
+
|
|
13
|
+
const ArcgisBasemapGallery = class {
|
|
14
|
+
constructor(hostRef) {
|
|
15
|
+
index.registerInstance(this, hostRef);
|
|
16
|
+
this.widgetReady = index.createEvent(this, "widgetReady", 7);
|
|
17
|
+
this.referenceElement = undefined;
|
|
18
|
+
this.activeBasemap = undefined;
|
|
19
|
+
this.position = "bottom-left";
|
|
20
|
+
this.expandable = false;
|
|
21
|
+
this.source = undefined;
|
|
22
|
+
this.view = undefined;
|
|
23
|
+
this.widget = undefined;
|
|
24
|
+
}
|
|
25
|
+
//--------------------------------------------------------------------------
|
|
26
|
+
//
|
|
27
|
+
// Watchers
|
|
28
|
+
//
|
|
29
|
+
//--------------------------------------------------------------------------
|
|
30
|
+
positionWatcher(newValue) {
|
|
31
|
+
if (newValue !== undefined && this.widget) {
|
|
32
|
+
if (typeof this.view !== "string") {
|
|
33
|
+
this.view.ui.move(this.childElem, newValue);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
referenceElementWatcher(newValue) {
|
|
38
|
+
componentUtils.referenceElementHelper(this, newValue);
|
|
39
|
+
}
|
|
40
|
+
viewWatcher(newValue) {
|
|
41
|
+
if (newValue !== undefined && this.widget) {
|
|
42
|
+
this.widget.view = newValue;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//--------------------------------------------------------------------------
|
|
46
|
+
//
|
|
47
|
+
// Lifecycle
|
|
48
|
+
//
|
|
49
|
+
//--------------------------------------------------------------------------
|
|
50
|
+
async componentDidLoad() {
|
|
51
|
+
const params = this._createParams();
|
|
52
|
+
const widget = await index$1.newWidgetsBasemapGallery(params);
|
|
53
|
+
this.widget = widget;
|
|
54
|
+
this.widget.when(() => {
|
|
55
|
+
this.source = this.widget.source;
|
|
56
|
+
});
|
|
57
|
+
await this._addWatchers();
|
|
58
|
+
this.widgetReady.emit(true);
|
|
59
|
+
componentUtils.checkForView(this);
|
|
60
|
+
}
|
|
61
|
+
disconnectedCallback() {
|
|
62
|
+
disconnected.onDisconnectedHelper(this);
|
|
63
|
+
}
|
|
64
|
+
render() {
|
|
65
|
+
if (this.expandable) {
|
|
66
|
+
return (index.h("arcgis-expand", { position: this.position, ref: (el) => (this.expandElem = el) }, index.h("div", { ref: (el) => (this.childElem = el) })));
|
|
67
|
+
}
|
|
68
|
+
return index.h("div", { ref: (el) => (this.childElem = el) });
|
|
69
|
+
}
|
|
70
|
+
//--------------------------------------------------------------------------
|
|
71
|
+
//
|
|
72
|
+
// Private Interal Methods
|
|
73
|
+
//
|
|
74
|
+
//--------------------------------------------------------------------------
|
|
75
|
+
async _addWatchers() {
|
|
76
|
+
const { watch } = await index$1.importCoreReactiveUtils();
|
|
77
|
+
watch(() => this.widget.source, () => (this.source = this.widget.source));
|
|
78
|
+
watch(() => this.widget.activeBasemap, (basemap) => (this.activeBasemap = basemap));
|
|
79
|
+
}
|
|
80
|
+
_createParams() {
|
|
81
|
+
const params = {
|
|
82
|
+
container: this.childElem
|
|
83
|
+
};
|
|
84
|
+
if (this.view) {
|
|
85
|
+
params.view = this.view;
|
|
86
|
+
}
|
|
87
|
+
return params;
|
|
88
|
+
}
|
|
89
|
+
get el() { return index.getElement(this); }
|
|
90
|
+
static get watchers() { return {
|
|
91
|
+
"position": ["positionWatcher"],
|
|
92
|
+
"referenceElement": ["referenceElementWatcher"],
|
|
93
|
+
"view": ["viewWatcher"]
|
|
94
|
+
}; }
|
|
95
|
+
};
|
|
96
|
+
ArcgisBasemapGallery.style = arcgisBasemapGalleryCss;
|
|
97
|
+
|
|
98
|
+
const arcgisExpandCss = "arcgis-expand>.esri-expand__content--expanded{background-color:var(--calcite-ui-background)}";
|
|
99
|
+
|
|
100
|
+
const ArcgisExpand = class {
|
|
101
|
+
constructor(hostRef) {
|
|
102
|
+
index.registerInstance(this, hostRef);
|
|
103
|
+
this.widgetReady = index.createEvent(this, "widgetReady", 7);
|
|
104
|
+
this.referenceElement = undefined;
|
|
105
|
+
this.position = "top-right";
|
|
106
|
+
this.view = undefined;
|
|
107
|
+
this.widget = undefined;
|
|
108
|
+
}
|
|
109
|
+
//--------------------------------------------------------------------------
|
|
110
|
+
//
|
|
111
|
+
// Watchers
|
|
112
|
+
//
|
|
113
|
+
//--------------------------------------------------------------------------
|
|
114
|
+
positionWatcher(newValue) {
|
|
115
|
+
if (newValue !== undefined && this.widget) {
|
|
116
|
+
if (typeof this.view !== "string") {
|
|
117
|
+
this.view.ui.move(this.childElem, newValue);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
referenceElementWatcher(newValue) {
|
|
122
|
+
componentUtils.referenceElementHelper(this, newValue);
|
|
123
|
+
}
|
|
124
|
+
viewWatcher(newValue) {
|
|
125
|
+
if (newValue !== undefined && this.widget) {
|
|
126
|
+
this.widget.view = newValue;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
//--------------------------------------------------------------------------
|
|
130
|
+
//
|
|
131
|
+
// Lifecycle
|
|
132
|
+
//
|
|
133
|
+
//--------------------------------------------------------------------------
|
|
134
|
+
async componentDidLoad() {
|
|
135
|
+
const widget = await index$1.newWidgetsExpand({
|
|
136
|
+
container: this.childElem
|
|
137
|
+
});
|
|
138
|
+
this.widget = widget;
|
|
139
|
+
if (this.view) {
|
|
140
|
+
this.widget.view = this.view;
|
|
141
|
+
}
|
|
142
|
+
this._checkForView();
|
|
143
|
+
}
|
|
144
|
+
disconnectedCallback() {
|
|
145
|
+
disconnected.onDisconnectedHelper(this);
|
|
146
|
+
}
|
|
147
|
+
render() {
|
|
148
|
+
return index.h("div", { ref: (el) => (this.childElem = el) });
|
|
149
|
+
}
|
|
150
|
+
//--------------------------------------------------------------------------
|
|
151
|
+
//
|
|
152
|
+
// Private Internal Methods
|
|
153
|
+
//
|
|
154
|
+
//--------------------------------------------------------------------------
|
|
155
|
+
_checkForView() {
|
|
156
|
+
const viewRef = this.el.closest("arcgis-map") || this.el.closest("arcgis-scene");
|
|
157
|
+
if (viewRef?.view) {
|
|
158
|
+
this.view = viewRef.view;
|
|
159
|
+
this.view.ui.add(this.childElem, this.position);
|
|
160
|
+
this.widgetReady.emit(true);
|
|
161
|
+
}
|
|
162
|
+
else if (viewRef) {
|
|
163
|
+
const handler = () => {
|
|
164
|
+
this.view = viewRef.view;
|
|
165
|
+
this.view.ui.add(this.childElem, this.position);
|
|
166
|
+
this.widgetReady.emit(true);
|
|
167
|
+
};
|
|
168
|
+
viewRef.addEventListener("viewReady", handler, false);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
get el() { return index.getElement(this); }
|
|
172
|
+
static get watchers() { return {
|
|
173
|
+
"position": ["positionWatcher"],
|
|
174
|
+
"referenceElement": ["referenceElementWatcher"],
|
|
175
|
+
"view": ["viewWatcher"]
|
|
176
|
+
}; }
|
|
177
|
+
};
|
|
178
|
+
ArcgisExpand.style = arcgisExpandCss;
|
|
179
|
+
|
|
180
|
+
const arcgisMapCss = ".arcgis-map{padding:0;margin:0;height:100%;width:100%}";
|
|
181
|
+
|
|
182
|
+
const ArcgisMap = class {
|
|
183
|
+
constructor(hostRef) {
|
|
184
|
+
index.registerInstance(this, hostRef);
|
|
185
|
+
this.viewReady = index.createEvent(this, "viewReady", 7);
|
|
186
|
+
this.apiKey = undefined;
|
|
187
|
+
this.basemap = undefined;
|
|
188
|
+
this.disableNavigation = false;
|
|
189
|
+
this.itemId = undefined;
|
|
190
|
+
this.zoom = undefined;
|
|
191
|
+
this.center = undefined;
|
|
192
|
+
this.view = undefined;
|
|
193
|
+
}
|
|
194
|
+
//--------------------------------------------------------------------------
|
|
195
|
+
//
|
|
196
|
+
// Watchers
|
|
197
|
+
//
|
|
198
|
+
//--------------------------------------------------------------------------
|
|
199
|
+
apiKeyWatcher(value) {
|
|
200
|
+
this.config.apiKey = value;
|
|
201
|
+
}
|
|
202
|
+
itemIdWatcher(value, old) {
|
|
203
|
+
if (value && value !== old) {
|
|
204
|
+
this.loadMap();
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
//--------------------------------------------------------------------------
|
|
208
|
+
//
|
|
209
|
+
// Lifecycle
|
|
210
|
+
//
|
|
211
|
+
//--------------------------------------------------------------------------
|
|
212
|
+
async componentWillLoad() {
|
|
213
|
+
this.config = await index$1.importConfig();
|
|
214
|
+
if (this.apiKey) {
|
|
215
|
+
this.config.apiKey = this.apiKey;
|
|
216
|
+
}
|
|
217
|
+
await this.loadMap();
|
|
218
|
+
}
|
|
219
|
+
componentDidRender() {
|
|
220
|
+
if (this.view) {
|
|
221
|
+
this.view.container = this.el;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
render() {
|
|
225
|
+
return index.h("div", { class: "arcgis-map", ref: (el) => (this.el = el) });
|
|
226
|
+
}
|
|
227
|
+
//--------------------------------------------------------------------------
|
|
228
|
+
//
|
|
229
|
+
// Private Methods
|
|
230
|
+
//
|
|
231
|
+
//--------------------------------------------------------------------------
|
|
232
|
+
async loadMap() {
|
|
233
|
+
const mapParams = {};
|
|
234
|
+
if (this.itemId) {
|
|
235
|
+
mapParams.portalItem = {
|
|
236
|
+
id: this.itemId
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
if (this.basemap) {
|
|
240
|
+
mapParams.basemap = this.basemap;
|
|
241
|
+
}
|
|
242
|
+
const map = await index$1.newWebMap(mapParams);
|
|
243
|
+
const params = {};
|
|
244
|
+
if (this.zoom) {
|
|
245
|
+
params.zoom = this.zoom;
|
|
246
|
+
}
|
|
247
|
+
if (this.center) {
|
|
248
|
+
if (typeof this.center === "string") {
|
|
249
|
+
params.center = this.center.split(",").map((x) => Number(x));
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
params.center = this.center;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
const view = await index$1.newViewsMapView({
|
|
256
|
+
map,
|
|
257
|
+
...params
|
|
258
|
+
});
|
|
259
|
+
const { watch } = await index$1.importCoreReactiveUtils();
|
|
260
|
+
this.view = view;
|
|
261
|
+
watch(() => this.view.center, (center) => {
|
|
262
|
+
const value = `${center.longitude},${center.latitude}`;
|
|
263
|
+
this.center = value;
|
|
264
|
+
});
|
|
265
|
+
watch(() => this.view.zoom, (value) => (this.zoom = value));
|
|
266
|
+
if (this.disableNavigation) {
|
|
267
|
+
mappingUtils.disableNavigation(this.view);
|
|
268
|
+
}
|
|
269
|
+
this.viewReady.emit(true);
|
|
270
|
+
}
|
|
271
|
+
get hostElem() { return index.getElement(this); }
|
|
272
|
+
static get watchers() { return {
|
|
273
|
+
"apiKey": ["apiKeyWatcher"],
|
|
274
|
+
"itemId": ["itemIdWatcher"]
|
|
275
|
+
}; }
|
|
276
|
+
};
|
|
277
|
+
ArcgisMap.style = arcgisMapCss;
|
|
278
|
+
|
|
279
|
+
exports.arcgis_basemap_gallery = ArcgisBasemapGallery;
|
|
280
|
+
exports.arcgis_expand = ArcgisExpand;
|
|
281
|
+
exports.arcgis_map = ArcgisMap;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-6b51d5a0.js');
|
|
6
|
+
const index$1 = require('./index-fda6ecee.js');
|
|
7
|
+
const componentUtils = require('./component-utils-cbd20e88.js');
|
|
8
|
+
const disconnected = require('./disconnected-306cb220.js');
|
|
9
|
+
|
|
10
|
+
const arcgisBasemapLayerListCss = "";
|
|
11
|
+
|
|
12
|
+
const ArcgisBasemapLayerList = class {
|
|
13
|
+
constructor(hostRef) {
|
|
14
|
+
index.registerInstance(this, hostRef);
|
|
15
|
+
this.widgetReady = index.createEvent(this, "widgetReady", 7);
|
|
16
|
+
this.referenceElement = undefined;
|
|
17
|
+
this.basemapTitle = undefined;
|
|
18
|
+
this.baseItems = undefined;
|
|
19
|
+
this.editingEnabled = false;
|
|
20
|
+
this.mulitpleSelectionEnabled = false;
|
|
21
|
+
this.position = "bottom-left";
|
|
22
|
+
this.expandable = false;
|
|
23
|
+
this.referenceItems = undefined;
|
|
24
|
+
this.selectedItems = undefined;
|
|
25
|
+
this.view = undefined;
|
|
26
|
+
this.widget = undefined;
|
|
27
|
+
}
|
|
28
|
+
//--------------------------------------------------------------------------
|
|
29
|
+
//
|
|
30
|
+
// Watchers
|
|
31
|
+
//
|
|
32
|
+
//--------------------------------------------------------------------------
|
|
33
|
+
positionWatcher(newValue) {
|
|
34
|
+
if (newValue !== undefined && this.widget) {
|
|
35
|
+
if (typeof this.view !== "string") {
|
|
36
|
+
this.view.ui.move(this.childElem, newValue);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
basemapTitleWatcher(newValue) {
|
|
41
|
+
if (newValue !== undefined && this.widget) {
|
|
42
|
+
this.widget.basemapTitle = newValue;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
editingBasemapEnabledWatcher(newValue) {
|
|
46
|
+
if (newValue !== undefined && this.widget) {
|
|
47
|
+
this.widget.editingEnabled = newValue;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
multipleSelectionEnabledWatcher(newValue) {
|
|
51
|
+
if (newValue !== undefined && this.widget) {
|
|
52
|
+
this.widget.multipleSelectionEnabled = newValue;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
selectedItemsWatcher(newValue) {
|
|
56
|
+
if (newValue !== undefined && this.widget) {
|
|
57
|
+
this.widget.selectedItems = newValue;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
referenceElementWatcher(newValue) {
|
|
61
|
+
componentUtils.referenceElementHelper(this, newValue);
|
|
62
|
+
}
|
|
63
|
+
viewWatcher(newValue) {
|
|
64
|
+
if (newValue !== undefined && this.widget) {
|
|
65
|
+
this.widget.view = newValue;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
//--------------------------------------------------------------------------
|
|
69
|
+
//
|
|
70
|
+
// Lifecycle
|
|
71
|
+
//
|
|
72
|
+
//--------------------------------------------------------------------------
|
|
73
|
+
async componentDidLoad() {
|
|
74
|
+
const params = this._createParams();
|
|
75
|
+
const widget = await index$1.newWidgetsBasemapLayerList(params);
|
|
76
|
+
this.widget = widget;
|
|
77
|
+
await this._addWatchers();
|
|
78
|
+
this.widgetReady.emit(true);
|
|
79
|
+
componentUtils.checkForView(this);
|
|
80
|
+
}
|
|
81
|
+
disconnectedCallback() {
|
|
82
|
+
disconnected.onDisconnectedHelper(this);
|
|
83
|
+
}
|
|
84
|
+
render() {
|
|
85
|
+
if (this.expandable) {
|
|
86
|
+
return (index.h("arcgis-expand", { position: this.position, ref: (el) => (this.expandElem = el) }, index.h("div", { ref: (el) => (this.childElem = el) })));
|
|
87
|
+
}
|
|
88
|
+
return index.h("div", { ref: (el) => (this.childElem = el) });
|
|
89
|
+
}
|
|
90
|
+
//--------------------------------------------------------------------------
|
|
91
|
+
//
|
|
92
|
+
// Private Methods
|
|
93
|
+
//
|
|
94
|
+
//--------------------------------------------------------------------------
|
|
95
|
+
_createParams() {
|
|
96
|
+
const params = {
|
|
97
|
+
container: this.childElem
|
|
98
|
+
};
|
|
99
|
+
if (this.basemapTitle) {
|
|
100
|
+
params.basemapTitle = this.basemapTitle;
|
|
101
|
+
}
|
|
102
|
+
if (this.editingEnabled !== undefined) {
|
|
103
|
+
params.editingEnabled = this.editingEnabled;
|
|
104
|
+
}
|
|
105
|
+
if (this.mulitpleSelectionEnabled !== undefined) {
|
|
106
|
+
params.multipleSelectionEnabled = this.mulitpleSelectionEnabled;
|
|
107
|
+
}
|
|
108
|
+
if (this.view) {
|
|
109
|
+
params.view = this.view;
|
|
110
|
+
}
|
|
111
|
+
return params;
|
|
112
|
+
}
|
|
113
|
+
async _addWatchers() {
|
|
114
|
+
const { watch } = await index$1.importCoreReactiveUtils();
|
|
115
|
+
watch(() => this.widget.basemapTitle, (value) => (this.basemapTitle = value), {
|
|
116
|
+
initial: true
|
|
117
|
+
});
|
|
118
|
+
watch(() => this.widget.editingEnabled, (value) => (this.editingEnabled = value), {
|
|
119
|
+
initial: true
|
|
120
|
+
});
|
|
121
|
+
watch(() => this.widget.multipleSelectionEnabled, (value) => (this.mulitpleSelectionEnabled = value), {
|
|
122
|
+
initial: true
|
|
123
|
+
});
|
|
124
|
+
watch(() => this.widget.referenceItems, (value) => (this.referenceItems = value), {
|
|
125
|
+
initial: true
|
|
126
|
+
});
|
|
127
|
+
watch(() => this.widget.selectedItems, (value) => (this.selectedItems = value), {
|
|
128
|
+
initial: true
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
get el() { return index.getElement(this); }
|
|
132
|
+
static get watchers() { return {
|
|
133
|
+
"position": ["positionWatcher"],
|
|
134
|
+
"basemapTitle": ["basemapTitleWatcher"],
|
|
135
|
+
"editingEnabled": ["editingBasemapEnabledWatcher"],
|
|
136
|
+
"mulitpleSelectionEnabled": ["multipleSelectionEnabledWatcher"],
|
|
137
|
+
"selectedItems": ["selectedItemsWatcher"],
|
|
138
|
+
"referenceElement": ["referenceElementWatcher"],
|
|
139
|
+
"view": ["viewWatcher"]
|
|
140
|
+
}; }
|
|
141
|
+
};
|
|
142
|
+
ArcgisBasemapLayerList.style = arcgisBasemapLayerListCss;
|
|
143
|
+
|
|
144
|
+
exports.arcgis_basemap_layer_list = ArcgisBasemapLayerList;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-6b51d5a0.js');
|
|
6
|
+
const index$1 = require('./index-fda6ecee.js');
|
|
7
|
+
const componentUtils = require('./component-utils-cbd20e88.js');
|
|
8
|
+
const disconnected = require('./disconnected-306cb220.js');
|
|
9
|
+
|
|
10
|
+
const arcgisBasemapToggleCss = "";
|
|
11
|
+
|
|
12
|
+
const ArcgisBasemapToggle = class {
|
|
13
|
+
constructor(hostRef) {
|
|
14
|
+
index.registerInstance(this, hostRef);
|
|
15
|
+
this.widgetReady = index.createEvent(this, "widgetReady", 7);
|
|
16
|
+
this.referenceElement = undefined;
|
|
17
|
+
this.activeBasemap = undefined;
|
|
18
|
+
this.nextBasemap = undefined;
|
|
19
|
+
this.position = "bottom-left";
|
|
20
|
+
this.expandable = false;
|
|
21
|
+
this.view = undefined;
|
|
22
|
+
this.widget = undefined;
|
|
23
|
+
}
|
|
24
|
+
//--------------------------------------------------------------------------
|
|
25
|
+
//
|
|
26
|
+
// Watchers
|
|
27
|
+
//
|
|
28
|
+
//--------------------------------------------------------------------------
|
|
29
|
+
positionWatcher(newValue) {
|
|
30
|
+
if (newValue !== undefined && this.widget) {
|
|
31
|
+
if (typeof this.view !== "string") {
|
|
32
|
+
this.view.ui.move(this.childElem, newValue);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
referenceElementWatcher(newValue) {
|
|
37
|
+
componentUtils.referenceElementHelper(this, newValue);
|
|
38
|
+
}
|
|
39
|
+
viewWatcher(newValue) {
|
|
40
|
+
if (newValue !== undefined && this.widget) {
|
|
41
|
+
this.widget.view = newValue;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
nextBasemapWatcher(value) {
|
|
45
|
+
if (value && this.widget) {
|
|
46
|
+
this.widget.nextBasemap = value;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
//--------------------------------------------------------------------------
|
|
50
|
+
//
|
|
51
|
+
// Methods
|
|
52
|
+
//
|
|
53
|
+
//--------------------------------------------------------------------------
|
|
54
|
+
async toggle() {
|
|
55
|
+
return this.widget?.toggle();
|
|
56
|
+
}
|
|
57
|
+
//--------------------------------------------------------------------------
|
|
58
|
+
//
|
|
59
|
+
// Lifecycle
|
|
60
|
+
//
|
|
61
|
+
//--------------------------------------------------------------------------
|
|
62
|
+
async componentDidLoad() {
|
|
63
|
+
const params = this._createParams();
|
|
64
|
+
const widget = await index$1.newWidgetsBasemapToggle(params);
|
|
65
|
+
this.widget = widget;
|
|
66
|
+
await this._addWatchers();
|
|
67
|
+
this.widgetReady.emit(true);
|
|
68
|
+
componentUtils.checkForView(this);
|
|
69
|
+
}
|
|
70
|
+
disconnectedCallback() {
|
|
71
|
+
disconnected.onDisconnectedHelper(this);
|
|
72
|
+
}
|
|
73
|
+
render() {
|
|
74
|
+
if (this.expandable) {
|
|
75
|
+
return (index.h("arcgis-expand", { position: this.position, ref: (el) => (this.expandElem = el) }, index.h("div", { ref: (el) => (this.childElem = el) })));
|
|
76
|
+
}
|
|
77
|
+
return index.h("div", { ref: (el) => (this.childElem = el) });
|
|
78
|
+
}
|
|
79
|
+
//--------------------------------------------------------------------------
|
|
80
|
+
//
|
|
81
|
+
// Private Methods
|
|
82
|
+
//
|
|
83
|
+
//--------------------------------------------------------------------------
|
|
84
|
+
_createParams() {
|
|
85
|
+
const params = {
|
|
86
|
+
container: this.childElem
|
|
87
|
+
};
|
|
88
|
+
if (this.nextBasemap) {
|
|
89
|
+
params.nextBasemap = this.nextBasemap;
|
|
90
|
+
}
|
|
91
|
+
if (this.view) {
|
|
92
|
+
params.view = this.view;
|
|
93
|
+
}
|
|
94
|
+
return params;
|
|
95
|
+
}
|
|
96
|
+
async _addWatchers() {
|
|
97
|
+
const { watch } = await index$1.importCoreReactiveUtils();
|
|
98
|
+
watch(() => this.widget.activeBasemap, (value) => (this.activeBasemap = value), {
|
|
99
|
+
initial: true
|
|
100
|
+
});
|
|
101
|
+
watch(() => this.widget.nextBasemap, (value) => (this.nextBasemap = value), {
|
|
102
|
+
initial: true
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
get el() { return index.getElement(this); }
|
|
106
|
+
static get watchers() { return {
|
|
107
|
+
"position": ["positionWatcher"],
|
|
108
|
+
"referenceElement": ["referenceElementWatcher"],
|
|
109
|
+
"view": ["viewWatcher"],
|
|
110
|
+
"nextBasemap": ["nextBasemapWatcher"]
|
|
111
|
+
}; }
|
|
112
|
+
};
|
|
113
|
+
ArcgisBasemapToggle.style = arcgisBasemapToggleCss;
|
|
114
|
+
|
|
115
|
+
exports.arcgis_basemap_toggle = ArcgisBasemapToggle;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-6b51d5a0.js');
|
|
6
|
+
const index$1 = require('./index-fda6ecee.js');
|
|
7
|
+
const componentUtils = require('./component-utils-cbd20e88.js');
|
|
8
|
+
const disconnected = require('./disconnected-306cb220.js');
|
|
9
|
+
|
|
10
|
+
const arcgisBookmarksCss = "";
|
|
11
|
+
|
|
12
|
+
const ArcgisBookmarks = class {
|
|
13
|
+
constructor(hostRef) {
|
|
14
|
+
index.registerInstance(this, hostRef);
|
|
15
|
+
this.bookmarkEdit = index.createEvent(this, "bookmarkEdit", 7);
|
|
16
|
+
this.bookmarkSelect = index.createEvent(this, "bookmarkSelect", 7);
|
|
17
|
+
this.widgetReady = index.createEvent(this, "widgetReady", 7);
|
|
18
|
+
this.referenceElement = undefined;
|
|
19
|
+
this.bookmarks = undefined;
|
|
20
|
+
this.defaultCreateOptions = undefined;
|
|
21
|
+
this.defaultEditOptions = undefined;
|
|
22
|
+
this.editingEnabled = undefined;
|
|
23
|
+
this.position = "bottom-left";
|
|
24
|
+
this.expandable = false;
|
|
25
|
+
this.view = undefined;
|
|
26
|
+
this.widget = undefined;
|
|
27
|
+
}
|
|
28
|
+
//--------------------------------------------------------------------------
|
|
29
|
+
//
|
|
30
|
+
// Watchers
|
|
31
|
+
//
|
|
32
|
+
//--------------------------------------------------------------------------
|
|
33
|
+
positionWatcher(newValue) {
|
|
34
|
+
if (newValue !== undefined && this.widget) {
|
|
35
|
+
if (typeof this.view !== "string") {
|
|
36
|
+
this.view.ui.move(this.childElem, newValue);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
bookmarksWatcher(newValue) {
|
|
41
|
+
if (newValue !== undefined && this.widget) {
|
|
42
|
+
this.widget.bookmarks = newValue;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
defaultCreateOptionsWatcher(newValue) {
|
|
46
|
+
if (newValue !== undefined && this.widget) {
|
|
47
|
+
this.widget.defaultCreateOptions = newValue;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
defaultEditOptionsWatcher(newValue) {
|
|
51
|
+
if (newValue !== undefined && this.widget) {
|
|
52
|
+
this.widget.defaultEditOptions = newValue;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
editingEnabledWatcher(newValue) {
|
|
56
|
+
if (newValue !== undefined && this.widget) {
|
|
57
|
+
this.widget.editingEnabled = newValue;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
referenceElementWatcher(newValue) {
|
|
61
|
+
componentUtils.referenceElementHelper(this, newValue);
|
|
62
|
+
}
|
|
63
|
+
viewWatcher(newValue) {
|
|
64
|
+
if (newValue !== undefined && this.widget) {
|
|
65
|
+
this.widget.view = newValue;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
//--------------------------------------------------------------------------
|
|
69
|
+
//
|
|
70
|
+
// Lifecycle
|
|
71
|
+
//
|
|
72
|
+
//--------------------------------------------------------------------------
|
|
73
|
+
async componentDidLoad() {
|
|
74
|
+
const params = this._createParams();
|
|
75
|
+
const widget = await index$1.newWidgetsBookmarks(params);
|
|
76
|
+
this.widget = widget;
|
|
77
|
+
await this._addWatchers();
|
|
78
|
+
this._proxyEvents();
|
|
79
|
+
this.widgetReady.emit(true);
|
|
80
|
+
componentUtils.checkForView(this);
|
|
81
|
+
}
|
|
82
|
+
disconnectedCallback() {
|
|
83
|
+
disconnected.onDisconnectedHelper(this);
|
|
84
|
+
}
|
|
85
|
+
render() {
|
|
86
|
+
if (this.expandable) {
|
|
87
|
+
return (index.h("arcgis-expand", { position: this.position, ref: (el) => (this.expandElem = el) }, index.h("div", { ref: (el) => (this.childElem = el) })));
|
|
88
|
+
}
|
|
89
|
+
return index.h("div", { ref: (el) => (this.childElem = el) });
|
|
90
|
+
}
|
|
91
|
+
//--------------------------------------------------------------------------
|
|
92
|
+
//
|
|
93
|
+
// Private Methods
|
|
94
|
+
//
|
|
95
|
+
//--------------------------------------------------------------------------
|
|
96
|
+
async _addWatchers() {
|
|
97
|
+
const { watch } = await index$1.importCoreReactiveUtils();
|
|
98
|
+
watch(() => this.widget.editingEnabled, (value) => (this.editingEnabled = value), {
|
|
99
|
+
initial: true
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
_createParams() {
|
|
103
|
+
const params = {
|
|
104
|
+
container: this.childElem
|
|
105
|
+
};
|
|
106
|
+
if (this.view) {
|
|
107
|
+
params.view = this.view;
|
|
108
|
+
}
|
|
109
|
+
if (this.bookmarks) {
|
|
110
|
+
params.bookmarks = this.bookmarks;
|
|
111
|
+
}
|
|
112
|
+
if (this.defaultCreateOptions) {
|
|
113
|
+
params.defaultCreateOptions = this.defaultCreateOptions;
|
|
114
|
+
}
|
|
115
|
+
if (this.defaultEditOptions) {
|
|
116
|
+
params.defaultEditOptions = this.defaultEditOptions;
|
|
117
|
+
}
|
|
118
|
+
if (this.editingEnabled !== undefined) {
|
|
119
|
+
params.editingEnabled = this.editingEnabled;
|
|
120
|
+
}
|
|
121
|
+
return params;
|
|
122
|
+
}
|
|
123
|
+
_proxyEvents() {
|
|
124
|
+
this.widget.on("bookmark-edit", (e) => this.bookmarkEdit.emit(e));
|
|
125
|
+
this.widget.on("bookmark-select", (e) => this.bookmarkSelect.emit(e));
|
|
126
|
+
}
|
|
127
|
+
get el() { return index.getElement(this); }
|
|
128
|
+
static get watchers() { return {
|
|
129
|
+
"position": ["positionWatcher"],
|
|
130
|
+
"bookmarks": ["bookmarksWatcher"],
|
|
131
|
+
"defaultCreateOptions": ["defaultCreateOptionsWatcher"],
|
|
132
|
+
"defaultEditOptions": ["defaultEditOptionsWatcher"],
|
|
133
|
+
"editingEnabled": ["editingEnabledWatcher"],
|
|
134
|
+
"referenceElement": ["referenceElementWatcher"],
|
|
135
|
+
"view": ["viewWatcher"]
|
|
136
|
+
}; }
|
|
137
|
+
};
|
|
138
|
+
ArcgisBookmarks.style = arcgisBookmarksCss;
|
|
139
|
+
|
|
140
|
+
exports.arcgis_bookmarks = ArcgisBookmarks;
|