@arcgis/map-components 1.0.0-beta.16 → 1.0.0-beta.18
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/app-globals-0f993ce5.js +3 -0
- package/dist/arcgis-map-components/arcgis-area-measurement-2d.entry.js +97 -0
- package/dist/arcgis-map-components/arcgis-area-measurement-3d.entry.js +90 -0
- package/dist/arcgis-map-components/arcgis-attachments.entry.js +69 -0
- package/dist/arcgis-map-components/arcgis-basemap-gallery.entry.js +93 -0
- package/dist/arcgis-map-components/arcgis-basemap-layer-list.entry.js +140 -0
- package/dist/arcgis-map-components/arcgis-basemap-toggle.entry.js +111 -0
- package/dist/arcgis-map-components/arcgis-bookmarks.entry.js +136 -0
- package/dist/arcgis-map-components/arcgis-building-explorer.entry.js +76 -0
- package/dist/arcgis-map-components/arcgis-compass.entry.js +86 -0
- package/dist/arcgis-map-components/arcgis-coordinate-conversion.entry.js +154 -0
- package/dist/arcgis-map-components/arcgis-daylight.entry.js +112 -0
- package/dist/arcgis-map-components/arcgis-directions.entry.js +190 -0
- package/dist/arcgis-map-components/arcgis-directline-measurement-3d.entry.js +110 -0
- package/dist/arcgis-map-components/arcgis-distance-measurement-2d.entry.js +102 -0
- package/dist/arcgis-map-components/arcgis-editor.entry.js +176 -0
- package/dist/arcgis-map-components/arcgis-elevation-profile.entry.js +132 -0
- package/dist/arcgis-map-components/arcgis-expand.entry.js +88 -0
- package/dist/arcgis-map-components/arcgis-feature-form.entry.js +32 -0
- package/dist/arcgis-map-components/arcgis-feature-table.entry.js +296 -0
- package/dist/arcgis-map-components/arcgis-feature-templates.entry.js +69 -0
- package/dist/arcgis-map-components/arcgis-feature.entry.js +102 -0
- package/dist/arcgis-map-components/arcgis-features.entry.js +129 -0
- package/dist/arcgis-map-components/arcgis-floor-filter.entry.js +130 -0
- package/dist/arcgis-map-components/arcgis-fullscreen.entry.js +88 -0
- package/dist/arcgis-map-components/arcgis-histogram-range-slider.entry.js +76 -0
- package/dist/arcgis-map-components/arcgis-histogram.entry.js +32 -0
- package/dist/arcgis-map-components/arcgis-home.entry.js +104 -0
- package/dist/arcgis-map-components/arcgis-layer-list.entry.js +124 -0
- package/dist/arcgis-map-components/arcgis-legend.entry.js +142 -0
- package/dist/arcgis-map-components/arcgis-line-of-sight.entry.js +90 -0
- package/dist/arcgis-map-components/arcgis-locate.entry.js +154 -0
- package/dist/arcgis-map-components/arcgis-map.entry.js +104 -0
- package/dist/arcgis-map-components/arcgis-measurement.entry.js +119 -0
- package/dist/arcgis-map-components/arcgis-navigation-toggle.entry.js +93 -0
- package/dist/arcgis-map-components/arcgis-print.entry.js +159 -0
- package/dist/arcgis-map-components/arcgis-scale-bar.entry.js +102 -0
- package/dist/arcgis-map-components/arcgis-scale-range-slider.entry.js +142 -0
- package/dist/arcgis-map-components/arcgis-scene.entry.js +102 -0
- package/dist/arcgis-map-components/arcgis-search.entry.js +272 -0
- package/dist/arcgis-map-components/arcgis-shadow-cast.entry.js +91 -0
- package/dist/arcgis-map-components/arcgis-sketch.entry.js +197 -0
- package/dist/arcgis-map-components/arcgis-slice.entry.js +99 -0
- package/dist/arcgis-map-components/arcgis-slider.entry.js +229 -0
- package/dist/arcgis-map-components/arcgis-swipe.entry.js +113 -0
- package/dist/arcgis-map-components/arcgis-table-list.entry.js +114 -0
- package/dist/arcgis-map-components/arcgis-time-slider.entry.js +212 -0
- package/dist/arcgis-map-components/arcgis-track.entry.js +143 -0
- package/dist/arcgis-map-components/arcgis-utility-network-trace.entry.js +158 -0
- package/dist/arcgis-map-components/arcgis-value-picker.entry.js +156 -0
- package/dist/arcgis-map-components/arcgis-weather.entry.js +82 -0
- package/dist/arcgis-map-components/arcgis-zoom.entry.js +96 -0
- package/dist/arcgis-map-components/component-utils-d3552de2.js +73 -0
- package/dist/arcgis-map-components/css-shim-b7d3d95f.js +4 -0
- package/dist/arcgis-map-components/disconnected-bc5fc8bc.js +52 -0
- package/dist/arcgis-map-components/dom-64053c71.js +73 -0
- package/dist/arcgis-map-components/index-82d260eb.js +8293 -0
- package/dist/arcgis-map-components/index-d9a93dfb.js +3371 -0
- package/dist/arcgis-map-components/mapping-utils-26beb904.js +38 -0
- package/dist/arcgis-map-components/shadow-css-008a49f5.js +387 -0
- package/package.json +3 -3
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, g as getElement } from './index-d9a93dfb.js';
|
|
2
|
+
import { n as newWidgetsAreaMeasurement2D, i as importCoreReactiveUtils } from './index-82d260eb.js';
|
|
3
|
+
import { r as referenceElementHelper, c as checkForView } from './component-utils-d3552de2.js';
|
|
4
|
+
import { o as onDisconnectedHelper } from './disconnected-bc5fc8bc.js';
|
|
5
|
+
|
|
6
|
+
const arcgisAreaMeasurement2dCss = "";
|
|
7
|
+
|
|
8
|
+
const ArcgisAreaMeasurement2d = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.widgetReady = createEvent(this, "widgetReady", 7);
|
|
12
|
+
this.referenceElement = undefined;
|
|
13
|
+
this.position = "bottom-left";
|
|
14
|
+
this.expandable = false;
|
|
15
|
+
this.unit = undefined;
|
|
16
|
+
this.unitOptions = undefined;
|
|
17
|
+
this.view = undefined;
|
|
18
|
+
this.widget = undefined;
|
|
19
|
+
}
|
|
20
|
+
//--------------------------------------------------------------------------
|
|
21
|
+
//
|
|
22
|
+
// Watchers
|
|
23
|
+
//
|
|
24
|
+
//--------------------------------------------------------------------------
|
|
25
|
+
positionWatcher(newValue) {
|
|
26
|
+
if (newValue !== undefined && this.widget) {
|
|
27
|
+
if (typeof this.view !== "string") {
|
|
28
|
+
this.view.ui.move(this.childElem, newValue);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
referenceElementWatcher(newValue) {
|
|
33
|
+
referenceElementHelper(this, newValue);
|
|
34
|
+
}
|
|
35
|
+
viewWatcher(newValue) {
|
|
36
|
+
if (newValue !== undefined && this.widget) {
|
|
37
|
+
this.widget.view = newValue;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//--------------------------------------------------------------------------
|
|
41
|
+
//
|
|
42
|
+
// Lifecycle
|
|
43
|
+
//
|
|
44
|
+
//--------------------------------------------------------------------------
|
|
45
|
+
async componentDidLoad() {
|
|
46
|
+
const params = this._createParams();
|
|
47
|
+
const widget = await newWidgetsAreaMeasurement2D(params);
|
|
48
|
+
this.widget = widget;
|
|
49
|
+
await this._addWatchers();
|
|
50
|
+
this.widgetReady.emit(true);
|
|
51
|
+
checkForView(this);
|
|
52
|
+
}
|
|
53
|
+
disconnectedCallback() {
|
|
54
|
+
onDisconnectedHelper(this);
|
|
55
|
+
}
|
|
56
|
+
render() {
|
|
57
|
+
if (this.expandable) {
|
|
58
|
+
return (h("arcgis-expand", { position: this.position, ref: (el) => (this.expandElem = el) }, h("div", { ref: (el) => (this.childElem = el) })));
|
|
59
|
+
}
|
|
60
|
+
return h("div", { ref: (el) => (this.childElem = el) });
|
|
61
|
+
}
|
|
62
|
+
//--------------------------------------------------------------------------
|
|
63
|
+
//
|
|
64
|
+
// Private Methods
|
|
65
|
+
//
|
|
66
|
+
//--------------------------------------------------------------------------
|
|
67
|
+
async _addWatchers() {
|
|
68
|
+
const { watch } = await importCoreReactiveUtils();
|
|
69
|
+
watch(() => this.widget.unit, (value) => (this.unit = value), {
|
|
70
|
+
initial: true
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
_createParams() {
|
|
74
|
+
const params = {
|
|
75
|
+
container: this.childElem
|
|
76
|
+
};
|
|
77
|
+
if (this.view) {
|
|
78
|
+
params.view = this.view;
|
|
79
|
+
}
|
|
80
|
+
if (this.unit) {
|
|
81
|
+
params.unit = this.unit;
|
|
82
|
+
}
|
|
83
|
+
if (this.unitOptions) {
|
|
84
|
+
params.unitOptions = this.unitOptions;
|
|
85
|
+
}
|
|
86
|
+
return params;
|
|
87
|
+
}
|
|
88
|
+
get el() { return getElement(this); }
|
|
89
|
+
static get watchers() { return {
|
|
90
|
+
"position": ["positionWatcher"],
|
|
91
|
+
"referenceElement": ["referenceElementWatcher"],
|
|
92
|
+
"view": ["viewWatcher"]
|
|
93
|
+
}; }
|
|
94
|
+
};
|
|
95
|
+
ArcgisAreaMeasurement2d.style = arcgisAreaMeasurement2dCss;
|
|
96
|
+
|
|
97
|
+
export { ArcgisAreaMeasurement2d as arcgis_area_measurement_2d };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, g as getElement } from './index-d9a93dfb.js';
|
|
2
|
+
import { a as newWidgetsAreaMeasurement3D } from './index-82d260eb.js';
|
|
3
|
+
import { r as referenceElementHelper, c as checkForView } from './component-utils-d3552de2.js';
|
|
4
|
+
import { o as onDisconnectedHelper } from './disconnected-bc5fc8bc.js';
|
|
5
|
+
|
|
6
|
+
const arcgisAreaMeasurement3dCss = "";
|
|
7
|
+
|
|
8
|
+
const ArcgisAreaMeasurement3d = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.widgetReady = createEvent(this, "widgetReady", 7);
|
|
12
|
+
this.referenceElement = undefined;
|
|
13
|
+
this.position = "bottom-left";
|
|
14
|
+
this.expandable = false;
|
|
15
|
+
this.unit = undefined;
|
|
16
|
+
this.unitOptions = undefined;
|
|
17
|
+
this.view = undefined;
|
|
18
|
+
this.widget = undefined;
|
|
19
|
+
}
|
|
20
|
+
//--------------------------------------------------------------------------
|
|
21
|
+
//
|
|
22
|
+
// Watchers
|
|
23
|
+
//
|
|
24
|
+
//--------------------------------------------------------------------------
|
|
25
|
+
positionWatcher(newValue) {
|
|
26
|
+
if (newValue !== undefined && this.widget) {
|
|
27
|
+
if (typeof this.view !== "string") {
|
|
28
|
+
this.view.ui.move(this.childElem, newValue);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
referenceElementWatcher(newValue) {
|
|
33
|
+
referenceElementHelper(this, newValue);
|
|
34
|
+
}
|
|
35
|
+
viewWatcher(newValue) {
|
|
36
|
+
if (newValue !== undefined && this.widget) {
|
|
37
|
+
this.widget.view = newValue;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//--------------------------------------------------------------------------
|
|
41
|
+
//
|
|
42
|
+
// Lifecycle
|
|
43
|
+
//
|
|
44
|
+
//--------------------------------------------------------------------------
|
|
45
|
+
async componentDidLoad() {
|
|
46
|
+
const params = this._createParams();
|
|
47
|
+
const widget = await newWidgetsAreaMeasurement3D(params);
|
|
48
|
+
this.widget = widget;
|
|
49
|
+
this.widgetReady.emit(true);
|
|
50
|
+
checkForView(this);
|
|
51
|
+
}
|
|
52
|
+
disconnectedCallback() {
|
|
53
|
+
onDisconnectedHelper(this);
|
|
54
|
+
}
|
|
55
|
+
render() {
|
|
56
|
+
if (this.expandable) {
|
|
57
|
+
return (h("arcgis-expand", { position: this.position, ref: (el) => (this.expandElem = el) }, h("div", { ref: (el) => (this.childElem = el) })));
|
|
58
|
+
}
|
|
59
|
+
return h("div", { ref: (el) => (this.childElem = el) });
|
|
60
|
+
}
|
|
61
|
+
//--------------------------------------------------------------------------
|
|
62
|
+
//
|
|
63
|
+
// Private Methods
|
|
64
|
+
//
|
|
65
|
+
//--------------------------------------------------------------------------
|
|
66
|
+
_createParams() {
|
|
67
|
+
const params = {
|
|
68
|
+
container: this.childElem
|
|
69
|
+
};
|
|
70
|
+
if (this.view) {
|
|
71
|
+
params.view = this.view;
|
|
72
|
+
}
|
|
73
|
+
if (this.unit) {
|
|
74
|
+
params.unit = this.unit;
|
|
75
|
+
}
|
|
76
|
+
if (this.unitOptions) {
|
|
77
|
+
params.unitOptions = this.unitOptions;
|
|
78
|
+
}
|
|
79
|
+
return params;
|
|
80
|
+
}
|
|
81
|
+
get el() { return getElement(this); }
|
|
82
|
+
static get watchers() { return {
|
|
83
|
+
"position": ["positionWatcher"],
|
|
84
|
+
"referenceElement": ["referenceElementWatcher"],
|
|
85
|
+
"view": ["viewWatcher"]
|
|
86
|
+
}; }
|
|
87
|
+
};
|
|
88
|
+
ArcgisAreaMeasurement3d.style = arcgisAreaMeasurement3dCss;
|
|
89
|
+
|
|
90
|
+
export { ArcgisAreaMeasurement3d as arcgis_area_measurement_3d };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, g as getElement } from './index-d9a93dfb.js';
|
|
2
|
+
import { b as newWidgetsAttachments } from './index-82d260eb.js';
|
|
3
|
+
import { c as checkForExpand, o as onDisconnectedHelper } from './disconnected-bc5fc8bc.js';
|
|
4
|
+
|
|
5
|
+
const arcgisAttachmentsCss = "";
|
|
6
|
+
|
|
7
|
+
const ArcgisAttachments = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.widgetReady = createEvent(this, "widgetReady", 7);
|
|
11
|
+
this.referenceElement = undefined;
|
|
12
|
+
this.position = "bottom-left";
|
|
13
|
+
this.expandable = false;
|
|
14
|
+
this.graphic = undefined;
|
|
15
|
+
this.widget = undefined;
|
|
16
|
+
}
|
|
17
|
+
//--------------------------------------------------------------------------
|
|
18
|
+
//
|
|
19
|
+
// Watchers
|
|
20
|
+
//
|
|
21
|
+
//--------------------------------------------------------------------------
|
|
22
|
+
graphicWatcher(newValue) {
|
|
23
|
+
if (newValue !== undefined && this.widget) {
|
|
24
|
+
this.widget.graphic = newValue;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//--------------------------------------------------------------------------
|
|
28
|
+
//
|
|
29
|
+
// Lifecycle
|
|
30
|
+
//
|
|
31
|
+
//--------------------------------------------------------------------------
|
|
32
|
+
async componentDidLoad() {
|
|
33
|
+
const params = this._createParams();
|
|
34
|
+
const widget = await newWidgetsAttachments(params);
|
|
35
|
+
this.widget = widget;
|
|
36
|
+
this.widgetReady.emit(true);
|
|
37
|
+
checkForExpand(this);
|
|
38
|
+
}
|
|
39
|
+
disconnectedCallback() {
|
|
40
|
+
onDisconnectedHelper(this);
|
|
41
|
+
}
|
|
42
|
+
render() {
|
|
43
|
+
if (this.expandable) {
|
|
44
|
+
return (h("arcgis-expand", { position: this.position, ref: (el) => (this.expandElem = el) }, h("div", { ref: (el) => (this.childElem = el) })));
|
|
45
|
+
}
|
|
46
|
+
return h("div", { ref: (el) => (this.childElem = el) });
|
|
47
|
+
}
|
|
48
|
+
//--------------------------------------------------------------------------
|
|
49
|
+
//
|
|
50
|
+
// Private Methods
|
|
51
|
+
//
|
|
52
|
+
//--------------------------------------------------------------------------
|
|
53
|
+
_createParams() {
|
|
54
|
+
const params = {
|
|
55
|
+
container: this.childElem
|
|
56
|
+
};
|
|
57
|
+
if (this.graphic) {
|
|
58
|
+
params.graphic = this.graphic;
|
|
59
|
+
}
|
|
60
|
+
return params;
|
|
61
|
+
}
|
|
62
|
+
get el() { return getElement(this); }
|
|
63
|
+
static get watchers() { return {
|
|
64
|
+
"graphic": ["graphicWatcher"]
|
|
65
|
+
}; }
|
|
66
|
+
};
|
|
67
|
+
ArcgisAttachments.style = arcgisAttachmentsCss;
|
|
68
|
+
|
|
69
|
+
export { ArcgisAttachments as arcgis_attachments };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, g as getElement } from './index-d9a93dfb.js';
|
|
2
|
+
import { c as newWidgetsBasemapGallery, i as importCoreReactiveUtils } from './index-82d260eb.js';
|
|
3
|
+
import { r as referenceElementHelper, c as checkForView } from './component-utils-d3552de2.js';
|
|
4
|
+
import { o as onDisconnectedHelper } from './disconnected-bc5fc8bc.js';
|
|
5
|
+
|
|
6
|
+
const arcgisBasemapGalleryCss = "";
|
|
7
|
+
|
|
8
|
+
const ArcgisBasemapGallery = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.widgetReady = createEvent(this, "widgetReady", 7);
|
|
12
|
+
this.referenceElement = undefined;
|
|
13
|
+
this.activeBasemap = undefined;
|
|
14
|
+
this.position = "bottom-left";
|
|
15
|
+
this.expandable = false;
|
|
16
|
+
this.source = undefined;
|
|
17
|
+
this.view = undefined;
|
|
18
|
+
this.widget = undefined;
|
|
19
|
+
}
|
|
20
|
+
//--------------------------------------------------------------------------
|
|
21
|
+
//
|
|
22
|
+
// Watchers
|
|
23
|
+
//
|
|
24
|
+
//--------------------------------------------------------------------------
|
|
25
|
+
positionWatcher(newValue) {
|
|
26
|
+
if (newValue !== undefined && this.widget) {
|
|
27
|
+
if (typeof this.view !== "string") {
|
|
28
|
+
this.view.ui.move(this.childElem, newValue);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
referenceElementWatcher(newValue) {
|
|
33
|
+
referenceElementHelper(this, newValue);
|
|
34
|
+
}
|
|
35
|
+
viewWatcher(newValue) {
|
|
36
|
+
if (newValue !== undefined && this.widget) {
|
|
37
|
+
this.widget.view = newValue;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//--------------------------------------------------------------------------
|
|
41
|
+
//
|
|
42
|
+
// Lifecycle
|
|
43
|
+
//
|
|
44
|
+
//--------------------------------------------------------------------------
|
|
45
|
+
async componentDidLoad() {
|
|
46
|
+
const params = this._createParams();
|
|
47
|
+
const widget = await newWidgetsBasemapGallery(params);
|
|
48
|
+
this.widget = widget;
|
|
49
|
+
this.widget.when(() => {
|
|
50
|
+
this.source = this.widget.source;
|
|
51
|
+
});
|
|
52
|
+
await this._addWatchers();
|
|
53
|
+
this.widgetReady.emit(true);
|
|
54
|
+
checkForView(this);
|
|
55
|
+
}
|
|
56
|
+
disconnectedCallback() {
|
|
57
|
+
onDisconnectedHelper(this);
|
|
58
|
+
}
|
|
59
|
+
render() {
|
|
60
|
+
if (this.expandable) {
|
|
61
|
+
return (h("arcgis-expand", { position: this.position, ref: (el) => (this.expandElem = el) }, h("div", { ref: (el) => (this.childElem = el) })));
|
|
62
|
+
}
|
|
63
|
+
return h("div", { ref: (el) => (this.childElem = el) });
|
|
64
|
+
}
|
|
65
|
+
//--------------------------------------------------------------------------
|
|
66
|
+
//
|
|
67
|
+
// Private Interal Methods
|
|
68
|
+
//
|
|
69
|
+
//--------------------------------------------------------------------------
|
|
70
|
+
async _addWatchers() {
|
|
71
|
+
const { watch } = await importCoreReactiveUtils();
|
|
72
|
+
watch(() => this.widget.source, () => (this.source = this.widget.source));
|
|
73
|
+
watch(() => this.widget.activeBasemap, (basemap) => (this.activeBasemap = basemap));
|
|
74
|
+
}
|
|
75
|
+
_createParams() {
|
|
76
|
+
const params = {
|
|
77
|
+
container: this.childElem
|
|
78
|
+
};
|
|
79
|
+
if (this.view) {
|
|
80
|
+
params.view = this.view;
|
|
81
|
+
}
|
|
82
|
+
return params;
|
|
83
|
+
}
|
|
84
|
+
get el() { return getElement(this); }
|
|
85
|
+
static get watchers() { return {
|
|
86
|
+
"position": ["positionWatcher"],
|
|
87
|
+
"referenceElement": ["referenceElementWatcher"],
|
|
88
|
+
"view": ["viewWatcher"]
|
|
89
|
+
}; }
|
|
90
|
+
};
|
|
91
|
+
ArcgisBasemapGallery.style = arcgisBasemapGalleryCss;
|
|
92
|
+
|
|
93
|
+
export { ArcgisBasemapGallery as arcgis_basemap_gallery };
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, g as getElement } from './index-d9a93dfb.js';
|
|
2
|
+
import { d as newWidgetsBasemapLayerList, i as importCoreReactiveUtils } from './index-82d260eb.js';
|
|
3
|
+
import { r as referenceElementHelper, c as checkForView } from './component-utils-d3552de2.js';
|
|
4
|
+
import { o as onDisconnectedHelper } from './disconnected-bc5fc8bc.js';
|
|
5
|
+
|
|
6
|
+
const arcgisBasemapLayerListCss = "";
|
|
7
|
+
|
|
8
|
+
const ArcgisBasemapLayerList = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.widgetReady = createEvent(this, "widgetReady", 7);
|
|
12
|
+
this.referenceElement = undefined;
|
|
13
|
+
this.basemapTitle = undefined;
|
|
14
|
+
this.baseItems = undefined;
|
|
15
|
+
this.editingEnabled = false;
|
|
16
|
+
this.mulitpleSelectionEnabled = false;
|
|
17
|
+
this.position = "bottom-left";
|
|
18
|
+
this.expandable = false;
|
|
19
|
+
this.referenceItems = undefined;
|
|
20
|
+
this.selectedItems = undefined;
|
|
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
|
+
basemapTitleWatcher(newValue) {
|
|
37
|
+
if (newValue !== undefined && this.widget) {
|
|
38
|
+
this.widget.basemapTitle = newValue;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
editingBasemapEnabledWatcher(newValue) {
|
|
42
|
+
if (newValue !== undefined && this.widget) {
|
|
43
|
+
this.widget.editingEnabled = newValue;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
multipleSelectionEnabledWatcher(newValue) {
|
|
47
|
+
if (newValue !== undefined && this.widget) {
|
|
48
|
+
this.widget.multipleSelectionEnabled = newValue;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
selectedItemsWatcher(newValue) {
|
|
52
|
+
if (newValue !== undefined && this.widget) {
|
|
53
|
+
this.widget.selectedItems = newValue;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
referenceElementWatcher(newValue) {
|
|
57
|
+
referenceElementHelper(this, newValue);
|
|
58
|
+
}
|
|
59
|
+
viewWatcher(newValue) {
|
|
60
|
+
if (newValue !== undefined && this.widget) {
|
|
61
|
+
this.widget.view = newValue;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
//--------------------------------------------------------------------------
|
|
65
|
+
//
|
|
66
|
+
// Lifecycle
|
|
67
|
+
//
|
|
68
|
+
//--------------------------------------------------------------------------
|
|
69
|
+
async componentDidLoad() {
|
|
70
|
+
const params = this._createParams();
|
|
71
|
+
const widget = await newWidgetsBasemapLayerList(params);
|
|
72
|
+
this.widget = widget;
|
|
73
|
+
await this._addWatchers();
|
|
74
|
+
this.widgetReady.emit(true);
|
|
75
|
+
checkForView(this);
|
|
76
|
+
}
|
|
77
|
+
disconnectedCallback() {
|
|
78
|
+
onDisconnectedHelper(this);
|
|
79
|
+
}
|
|
80
|
+
render() {
|
|
81
|
+
if (this.expandable) {
|
|
82
|
+
return (h("arcgis-expand", { position: this.position, ref: (el) => (this.expandElem = el) }, h("div", { ref: (el) => (this.childElem = el) })));
|
|
83
|
+
}
|
|
84
|
+
return h("div", { ref: (el) => (this.childElem = el) });
|
|
85
|
+
}
|
|
86
|
+
//--------------------------------------------------------------------------
|
|
87
|
+
//
|
|
88
|
+
// Private Methods
|
|
89
|
+
//
|
|
90
|
+
//--------------------------------------------------------------------------
|
|
91
|
+
_createParams() {
|
|
92
|
+
const params = {
|
|
93
|
+
container: this.childElem
|
|
94
|
+
};
|
|
95
|
+
if (this.basemapTitle) {
|
|
96
|
+
params.basemapTitle = this.basemapTitle;
|
|
97
|
+
}
|
|
98
|
+
if (this.editingEnabled !== undefined) {
|
|
99
|
+
params.editingEnabled = this.editingEnabled;
|
|
100
|
+
}
|
|
101
|
+
if (this.mulitpleSelectionEnabled !== undefined) {
|
|
102
|
+
params.multipleSelectionEnabled = this.mulitpleSelectionEnabled;
|
|
103
|
+
}
|
|
104
|
+
if (this.view) {
|
|
105
|
+
params.view = this.view;
|
|
106
|
+
}
|
|
107
|
+
return params;
|
|
108
|
+
}
|
|
109
|
+
async _addWatchers() {
|
|
110
|
+
const { watch } = await importCoreReactiveUtils();
|
|
111
|
+
watch(() => this.widget.basemapTitle, (value) => (this.basemapTitle = value), {
|
|
112
|
+
initial: true
|
|
113
|
+
});
|
|
114
|
+
watch(() => this.widget.editingEnabled, (value) => (this.editingEnabled = value), {
|
|
115
|
+
initial: true
|
|
116
|
+
});
|
|
117
|
+
watch(() => this.widget.multipleSelectionEnabled, (value) => (this.mulitpleSelectionEnabled = value), {
|
|
118
|
+
initial: true
|
|
119
|
+
});
|
|
120
|
+
watch(() => this.widget.referenceItems, (value) => (this.referenceItems = value), {
|
|
121
|
+
initial: true
|
|
122
|
+
});
|
|
123
|
+
watch(() => this.widget.selectedItems, (value) => (this.selectedItems = value), {
|
|
124
|
+
initial: true
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
get el() { return getElement(this); }
|
|
128
|
+
static get watchers() { return {
|
|
129
|
+
"position": ["positionWatcher"],
|
|
130
|
+
"basemapTitle": ["basemapTitleWatcher"],
|
|
131
|
+
"editingEnabled": ["editingBasemapEnabledWatcher"],
|
|
132
|
+
"mulitpleSelectionEnabled": ["multipleSelectionEnabledWatcher"],
|
|
133
|
+
"selectedItems": ["selectedItemsWatcher"],
|
|
134
|
+
"referenceElement": ["referenceElementWatcher"],
|
|
135
|
+
"view": ["viewWatcher"]
|
|
136
|
+
}; }
|
|
137
|
+
};
|
|
138
|
+
ArcgisBasemapLayerList.style = arcgisBasemapLayerListCss;
|
|
139
|
+
|
|
140
|
+
export { ArcgisBasemapLayerList as arcgis_basemap_layer_list };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, g as getElement } from './index-d9a93dfb.js';
|
|
2
|
+
import { e as newWidgetsBasemapToggle, i as importCoreReactiveUtils } from './index-82d260eb.js';
|
|
3
|
+
import { r as referenceElementHelper, c as checkForView } from './component-utils-d3552de2.js';
|
|
4
|
+
import { o as onDisconnectedHelper } from './disconnected-bc5fc8bc.js';
|
|
5
|
+
|
|
6
|
+
const arcgisBasemapToggleCss = "";
|
|
7
|
+
|
|
8
|
+
const ArcgisBasemapToggle = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.widgetReady = createEvent(this, "widgetReady", 7);
|
|
12
|
+
this.referenceElement = undefined;
|
|
13
|
+
this.activeBasemap = undefined;
|
|
14
|
+
this.nextBasemap = undefined;
|
|
15
|
+
this.position = "bottom-left";
|
|
16
|
+
this.expandable = false;
|
|
17
|
+
this.view = undefined;
|
|
18
|
+
this.widget = undefined;
|
|
19
|
+
}
|
|
20
|
+
//--------------------------------------------------------------------------
|
|
21
|
+
//
|
|
22
|
+
// Watchers
|
|
23
|
+
//
|
|
24
|
+
//--------------------------------------------------------------------------
|
|
25
|
+
positionWatcher(newValue) {
|
|
26
|
+
if (newValue !== undefined && this.widget) {
|
|
27
|
+
if (typeof this.view !== "string") {
|
|
28
|
+
this.view.ui.move(this.childElem, newValue);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
referenceElementWatcher(newValue) {
|
|
33
|
+
referenceElementHelper(this, newValue);
|
|
34
|
+
}
|
|
35
|
+
viewWatcher(newValue) {
|
|
36
|
+
if (newValue !== undefined && this.widget) {
|
|
37
|
+
this.widget.view = newValue;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
nextBasemapWatcher(value) {
|
|
41
|
+
if (value && this.widget) {
|
|
42
|
+
this.widget.nextBasemap = value;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//--------------------------------------------------------------------------
|
|
46
|
+
//
|
|
47
|
+
// Methods
|
|
48
|
+
//
|
|
49
|
+
//--------------------------------------------------------------------------
|
|
50
|
+
async toggle() {
|
|
51
|
+
return this.widget?.toggle();
|
|
52
|
+
}
|
|
53
|
+
//--------------------------------------------------------------------------
|
|
54
|
+
//
|
|
55
|
+
// Lifecycle
|
|
56
|
+
//
|
|
57
|
+
//--------------------------------------------------------------------------
|
|
58
|
+
async componentDidLoad() {
|
|
59
|
+
const params = this._createParams();
|
|
60
|
+
const widget = await newWidgetsBasemapToggle(params);
|
|
61
|
+
this.widget = widget;
|
|
62
|
+
await this._addWatchers();
|
|
63
|
+
this.widgetReady.emit(true);
|
|
64
|
+
checkForView(this);
|
|
65
|
+
}
|
|
66
|
+
disconnectedCallback() {
|
|
67
|
+
onDisconnectedHelper(this);
|
|
68
|
+
}
|
|
69
|
+
render() {
|
|
70
|
+
if (this.expandable) {
|
|
71
|
+
return (h("arcgis-expand", { position: this.position, ref: (el) => (this.expandElem = el) }, h("div", { ref: (el) => (this.childElem = el) })));
|
|
72
|
+
}
|
|
73
|
+
return h("div", { ref: (el) => (this.childElem = el) });
|
|
74
|
+
}
|
|
75
|
+
//--------------------------------------------------------------------------
|
|
76
|
+
//
|
|
77
|
+
// Private Methods
|
|
78
|
+
//
|
|
79
|
+
//--------------------------------------------------------------------------
|
|
80
|
+
_createParams() {
|
|
81
|
+
const params = {
|
|
82
|
+
container: this.childElem
|
|
83
|
+
};
|
|
84
|
+
if (this.nextBasemap) {
|
|
85
|
+
params.nextBasemap = this.nextBasemap;
|
|
86
|
+
}
|
|
87
|
+
if (this.view) {
|
|
88
|
+
params.view = this.view;
|
|
89
|
+
}
|
|
90
|
+
return params;
|
|
91
|
+
}
|
|
92
|
+
async _addWatchers() {
|
|
93
|
+
const { watch } = await importCoreReactiveUtils();
|
|
94
|
+
watch(() => this.widget.activeBasemap, (value) => (this.activeBasemap = value), {
|
|
95
|
+
initial: true
|
|
96
|
+
});
|
|
97
|
+
watch(() => this.widget.nextBasemap, (value) => (this.nextBasemap = value), {
|
|
98
|
+
initial: true
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
get el() { return getElement(this); }
|
|
102
|
+
static get watchers() { return {
|
|
103
|
+
"position": ["positionWatcher"],
|
|
104
|
+
"referenceElement": ["referenceElementWatcher"],
|
|
105
|
+
"view": ["viewWatcher"],
|
|
106
|
+
"nextBasemap": ["nextBasemapWatcher"]
|
|
107
|
+
}; }
|
|
108
|
+
};
|
|
109
|
+
ArcgisBasemapToggle.style = arcgisBasemapToggleCss;
|
|
110
|
+
|
|
111
|
+
export { ArcgisBasemapToggle as arcgis_basemap_toggle };
|