@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.
Files changed (61) hide show
  1. package/dist/arcgis-map-components/app-globals-0f993ce5.js +3 -0
  2. package/dist/arcgis-map-components/arcgis-area-measurement-2d.entry.js +97 -0
  3. package/dist/arcgis-map-components/arcgis-area-measurement-3d.entry.js +90 -0
  4. package/dist/arcgis-map-components/arcgis-attachments.entry.js +69 -0
  5. package/dist/arcgis-map-components/arcgis-basemap-gallery.entry.js +93 -0
  6. package/dist/arcgis-map-components/arcgis-basemap-layer-list.entry.js +140 -0
  7. package/dist/arcgis-map-components/arcgis-basemap-toggle.entry.js +111 -0
  8. package/dist/arcgis-map-components/arcgis-bookmarks.entry.js +136 -0
  9. package/dist/arcgis-map-components/arcgis-building-explorer.entry.js +76 -0
  10. package/dist/arcgis-map-components/arcgis-compass.entry.js +86 -0
  11. package/dist/arcgis-map-components/arcgis-coordinate-conversion.entry.js +154 -0
  12. package/dist/arcgis-map-components/arcgis-daylight.entry.js +112 -0
  13. package/dist/arcgis-map-components/arcgis-directions.entry.js +190 -0
  14. package/dist/arcgis-map-components/arcgis-directline-measurement-3d.entry.js +110 -0
  15. package/dist/arcgis-map-components/arcgis-distance-measurement-2d.entry.js +102 -0
  16. package/dist/arcgis-map-components/arcgis-editor.entry.js +176 -0
  17. package/dist/arcgis-map-components/arcgis-elevation-profile.entry.js +132 -0
  18. package/dist/arcgis-map-components/arcgis-expand.entry.js +88 -0
  19. package/dist/arcgis-map-components/arcgis-feature-form.entry.js +32 -0
  20. package/dist/arcgis-map-components/arcgis-feature-table.entry.js +296 -0
  21. package/dist/arcgis-map-components/arcgis-feature-templates.entry.js +69 -0
  22. package/dist/arcgis-map-components/arcgis-feature.entry.js +102 -0
  23. package/dist/arcgis-map-components/arcgis-features.entry.js +129 -0
  24. package/dist/arcgis-map-components/arcgis-floor-filter.entry.js +130 -0
  25. package/dist/arcgis-map-components/arcgis-fullscreen.entry.js +88 -0
  26. package/dist/arcgis-map-components/arcgis-histogram-range-slider.entry.js +76 -0
  27. package/dist/arcgis-map-components/arcgis-histogram.entry.js +32 -0
  28. package/dist/arcgis-map-components/arcgis-home.entry.js +104 -0
  29. package/dist/arcgis-map-components/arcgis-layer-list.entry.js +124 -0
  30. package/dist/arcgis-map-components/arcgis-legend.entry.js +142 -0
  31. package/dist/arcgis-map-components/arcgis-line-of-sight.entry.js +90 -0
  32. package/dist/arcgis-map-components/arcgis-locate.entry.js +154 -0
  33. package/dist/arcgis-map-components/arcgis-map.entry.js +104 -0
  34. package/dist/arcgis-map-components/arcgis-measurement.entry.js +119 -0
  35. package/dist/arcgis-map-components/arcgis-navigation-toggle.entry.js +93 -0
  36. package/dist/arcgis-map-components/arcgis-print.entry.js +159 -0
  37. package/dist/arcgis-map-components/arcgis-scale-bar.entry.js +102 -0
  38. package/dist/arcgis-map-components/arcgis-scale-range-slider.entry.js +142 -0
  39. package/dist/arcgis-map-components/arcgis-scene.entry.js +102 -0
  40. package/dist/arcgis-map-components/arcgis-search.entry.js +272 -0
  41. package/dist/arcgis-map-components/arcgis-shadow-cast.entry.js +91 -0
  42. package/dist/arcgis-map-components/arcgis-sketch.entry.js +197 -0
  43. package/dist/arcgis-map-components/arcgis-slice.entry.js +99 -0
  44. package/dist/arcgis-map-components/arcgis-slider.entry.js +229 -0
  45. package/dist/arcgis-map-components/arcgis-swipe.entry.js +113 -0
  46. package/dist/arcgis-map-components/arcgis-table-list.entry.js +114 -0
  47. package/dist/arcgis-map-components/arcgis-time-slider.entry.js +212 -0
  48. package/dist/arcgis-map-components/arcgis-track.entry.js +143 -0
  49. package/dist/arcgis-map-components/arcgis-utility-network-trace.entry.js +158 -0
  50. package/dist/arcgis-map-components/arcgis-value-picker.entry.js +156 -0
  51. package/dist/arcgis-map-components/arcgis-weather.entry.js +82 -0
  52. package/dist/arcgis-map-components/arcgis-zoom.entry.js +96 -0
  53. package/dist/arcgis-map-components/component-utils-d3552de2.js +73 -0
  54. package/dist/arcgis-map-components/css-shim-b7d3d95f.js +4 -0
  55. package/dist/arcgis-map-components/disconnected-bc5fc8bc.js +52 -0
  56. package/dist/arcgis-map-components/dom-64053c71.js +73 -0
  57. package/dist/arcgis-map-components/index-82d260eb.js +8293 -0
  58. package/dist/arcgis-map-components/index-d9a93dfb.js +3371 -0
  59. package/dist/arcgis-map-components/mapping-utils-26beb904.js +38 -0
  60. package/dist/arcgis-map-components/shadow-css-008a49f5.js +387 -0
  61. package/package.json +3 -3
@@ -0,0 +1,88 @@
1
+ import { r as registerInstance, e as createEvent, h, g as getElement } from './index-d9a93dfb.js';
2
+ import { a3 as newWidgetsExpand } from './index-82d260eb.js';
3
+ import { r as referenceElementHelper } from './component-utils-d3552de2.js';
4
+ import { o as onDisconnectedHelper } from './disconnected-bc5fc8bc.js';
5
+
6
+ const arcgisExpandCss = "arcgis-expand>.esri-expand__content--expanded{background-color:var(--calcite-ui-background)}";
7
+
8
+ const ArcgisExpand = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.widgetReady = createEvent(this, "widgetReady", 7);
12
+ this.referenceElement = undefined;
13
+ this.position = "top-right";
14
+ this.view = undefined;
15
+ this.widget = undefined;
16
+ }
17
+ //--------------------------------------------------------------------------
18
+ //
19
+ // Watchers
20
+ //
21
+ //--------------------------------------------------------------------------
22
+ positionWatcher(newValue) {
23
+ if (newValue !== undefined && this.widget) {
24
+ if (typeof this.view !== "string") {
25
+ this.view.ui.move(this.childElem, newValue);
26
+ }
27
+ }
28
+ }
29
+ referenceElementWatcher(newValue) {
30
+ referenceElementHelper(this, newValue);
31
+ }
32
+ viewWatcher(newValue) {
33
+ if (newValue !== undefined && this.widget) {
34
+ this.widget.view = newValue;
35
+ }
36
+ }
37
+ //--------------------------------------------------------------------------
38
+ //
39
+ // Lifecycle
40
+ //
41
+ //--------------------------------------------------------------------------
42
+ async componentDidLoad() {
43
+ const widget = await newWidgetsExpand({
44
+ container: this.childElem
45
+ });
46
+ this.widget = widget;
47
+ if (this.view) {
48
+ this.widget.view = this.view;
49
+ }
50
+ this._checkForView();
51
+ }
52
+ disconnectedCallback() {
53
+ onDisconnectedHelper(this);
54
+ }
55
+ render() {
56
+ return h("div", { ref: (el) => (this.childElem = el) });
57
+ }
58
+ //--------------------------------------------------------------------------
59
+ //
60
+ // Private Internal Methods
61
+ //
62
+ //--------------------------------------------------------------------------
63
+ _checkForView() {
64
+ const viewRef = this.el.closest("arcgis-map") || this.el.closest("arcgis-scene");
65
+ if (viewRef?.view) {
66
+ this.view = viewRef.view;
67
+ this.view.ui.add(this.childElem, this.position);
68
+ this.widgetReady.emit(true);
69
+ }
70
+ else if (viewRef) {
71
+ const handler = () => {
72
+ this.view = viewRef.view;
73
+ this.view.ui.add(this.childElem, this.position);
74
+ this.widgetReady.emit(true);
75
+ };
76
+ viewRef.addEventListener("viewReady", handler, false);
77
+ }
78
+ }
79
+ get el() { return getElement(this); }
80
+ static get watchers() { return {
81
+ "position": ["positionWatcher"],
82
+ "referenceElement": ["referenceElementWatcher"],
83
+ "view": ["viewWatcher"]
84
+ }; }
85
+ };
86
+ ArcgisExpand.style = arcgisExpandCss;
87
+
88
+ export { ArcgisExpand as arcgis_expand };
@@ -0,0 +1,32 @@
1
+ import { r as registerInstance, e as createEvent, g as getElement } from './index-d9a93dfb.js';
2
+ import { t as newWidgetsFeatureForm } from './index-82d260eb.js';
3
+
4
+ const arcgisFeatureFormCss = "";
5
+
6
+ const ArcgisFeatureForm = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.widgetReady = createEvent(this, "widgetReady", 7);
10
+ this.referenceElement = undefined;
11
+ this.position = "bottom-left";
12
+ this.expandable = false;
13
+ this.widget = undefined;
14
+ }
15
+ //--------------------------------------------------------------------------
16
+ //
17
+ // Lifecycle
18
+ //
19
+ //--------------------------------------------------------------------------
20
+ async componentDidLoad() {
21
+ const params = {
22
+ container: this.childElem
23
+ };
24
+ const widget = await newWidgetsFeatureForm(params);
25
+ this.widget = widget;
26
+ this.widgetReady.emit(true);
27
+ }
28
+ get el() { return getElement(this); }
29
+ };
30
+ ArcgisFeatureForm.style = arcgisFeatureFormCss;
31
+
32
+ export { ArcgisFeatureForm as arcgis_feature_form };
@@ -0,0 +1,296 @@
1
+ import { r as registerInstance, e as createEvent, h, g as getElement } from './index-d9a93dfb.js';
2
+ import { u as newLayersFeatureLayer, v as newWidgetsFeatureTable, 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 arcgisFeatureTableCss = "";
7
+
8
+ const ArcgisFeatureTable = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.rowSelectionChange = createEvent(this, "rowSelectionChange", 7);
12
+ this.widgetReady = createEvent(this, "widgetReady", 7);
13
+ this.referenceElement = undefined;
14
+ this.activeFilters = undefined;
15
+ this.activeSortOrders = undefined;
16
+ this.attachmentsEnabled = undefined;
17
+ this.autoRefreshEnabled = undefined;
18
+ this.columnReorderingEnabled = undefined;
19
+ this.columns = undefined;
20
+ this.editingEnabled = undefined;
21
+ this.filterGeometry = undefined;
22
+ this.hiddenFields = undefined;
23
+ this.highlightEnabled = undefined;
24
+ this.highlightIds = undefined;
25
+ this.layer = undefined;
26
+ this.menu = undefined;
27
+ this.menuConfig = undefined;
28
+ this.multiSortEnabled = undefined;
29
+ this.pageSize = undefined;
30
+ this.state = undefined;
31
+ this.tableTemplate = undefined;
32
+ this.itemId = undefined;
33
+ this.position = "bottom-left";
34
+ this.expandable = false;
35
+ this.url = undefined;
36
+ this.view = undefined;
37
+ this.widget = undefined;
38
+ }
39
+ //--------------------------------------------------------------------------
40
+ //
41
+ // Watchers
42
+ //
43
+ //--------------------------------------------------------------------------
44
+ positionWatcher(newValue) {
45
+ if (newValue !== undefined && this.widget) {
46
+ if (typeof this.view !== "string") {
47
+ this.view.ui.move(this.childElem, newValue);
48
+ }
49
+ }
50
+ }
51
+ attachmentsEnabledWatcher(value) {
52
+ if (value && this.widget) {
53
+ this.widget.attachmentsEnabled = value;
54
+ }
55
+ }
56
+ autoRefreshEnabledWatcher(value) {
57
+ if (value && this.widget) {
58
+ this.widget.autoRefreshEnabled = value;
59
+ }
60
+ }
61
+ columnReorderingEnabledWatcher(value) {
62
+ if (value && this.widget) {
63
+ this.widget.columnReorderingEnabled = value;
64
+ }
65
+ }
66
+ editingEnabledWatcher(value) {
67
+ if (value && this.widget) {
68
+ this.widget.editingEnabled = value;
69
+ }
70
+ }
71
+ filterGeometryWatcher(value) {
72
+ if (value && this.widget) {
73
+ this.widget.filterGeometry = value;
74
+ }
75
+ }
76
+ hiddenFieldsWatcher(value) {
77
+ if (value && this.widget) {
78
+ this.widget.hiddenFields = value;
79
+ }
80
+ }
81
+ highlightEnabledWatcher(value) {
82
+ if (value && this.widget) {
83
+ this.widget.highlightEnabled = value;
84
+ }
85
+ }
86
+ highlightIdsWatcher(value) {
87
+ if (value && this.widget) {
88
+ this.widget.highlightIds = value;
89
+ }
90
+ }
91
+ menuConfigWatcher(value) {
92
+ if (value && this.widget) {
93
+ this.widget.menuConfig = value;
94
+ }
95
+ }
96
+ multiSortEnabledWatcher(value) {
97
+ if (value && this.widget) {
98
+ this.widget.multiSortEnabled = value;
99
+ }
100
+ }
101
+ pageSizeWatcher(value) {
102
+ if (value && this.widget) {
103
+ this.widget.pageSize = value;
104
+ }
105
+ }
106
+ tableTemplateWatcher(value) {
107
+ if (value && this.widget) {
108
+ this.widget.tableTemplate = value;
109
+ }
110
+ }
111
+ async itemIdWatcher(value, old) {
112
+ if (value && value !== old) {
113
+ const layer = await newLayersFeatureLayer({
114
+ portalItem: {
115
+ id: value
116
+ }
117
+ });
118
+ this.layer = layer;
119
+ }
120
+ }
121
+ layerWatcher(value) {
122
+ if (value && this.widget) {
123
+ this.widget.layer = value;
124
+ }
125
+ }
126
+ async urlWatcher(value, old) {
127
+ if (value && value !== old) {
128
+ const layer = await newLayersFeatureLayer({ url: value });
129
+ this.layer = layer;
130
+ }
131
+ }
132
+ referenceElementWatcher(newValue) {
133
+ referenceElementHelper(this, newValue);
134
+ }
135
+ viewWatcher(newValue) {
136
+ if (newValue !== undefined && this.widget) {
137
+ this.widget.view = newValue;
138
+ }
139
+ }
140
+ //--------------------------------------------------------------------------
141
+ //
142
+ // Methods
143
+ //
144
+ //--------------------------------------------------------------------------
145
+ async clearSelectionFilter() {
146
+ return this.widget?.clearSelectionFilter();
147
+ }
148
+ async deleteSelection(showWarningPrompt) {
149
+ return this.widget?.deleteSelection(showWarningPrompt);
150
+ }
151
+ async filterBySelection() {
152
+ return this.widget?.filterBySelection();
153
+ }
154
+ async findColumn(fieldName) {
155
+ return this.widget?.findColumn(fieldName);
156
+ }
157
+ async hideColumn(fieldName) {
158
+ return this.widget?.hideColumn(fieldName);
159
+ }
160
+ async refresh() {
161
+ return this.widget?.refresh();
162
+ }
163
+ async scrollToIndex(index) {
164
+ return this.widget?.scrollToIndex(index);
165
+ }
166
+ async showAllColumns() {
167
+ return this.widget?.showAllColumns();
168
+ }
169
+ async showColumn(fieldName) {
170
+ return this.widget?.showColumn(fieldName);
171
+ }
172
+ async sortColumn(path, direction) {
173
+ return this.widget?.sortColumn(path, direction);
174
+ }
175
+ //--------------------------------------------------------------------------
176
+ //
177
+ // Lifecycle
178
+ //
179
+ //--------------------------------------------------------------------------
180
+ async componentDidLoad() {
181
+ const params = this._createParams();
182
+ const widget = await newWidgetsFeatureTable(params);
183
+ this.widget = widget;
184
+ await this._addWatchers();
185
+ this._proxyEvents();
186
+ this.widgetReady.emit(true);
187
+ checkForView(this);
188
+ }
189
+ disconnectedCallback() {
190
+ onDisconnectedHelper(this);
191
+ }
192
+ render() {
193
+ if (this.expandable) {
194
+ return (h("arcgis-expand", { position: this.position, ref: (el) => (this.expandElem = el) }, h("div", { ref: (el) => (this.childElem = el) })));
195
+ }
196
+ return h("div", { ref: (el) => (this.childElem = el) });
197
+ }
198
+ //--------------------------------------------------------------------------
199
+ //
200
+ // Private Methods
201
+ //
202
+ //--------------------------------------------------------------------------
203
+ async _addWatchers() {
204
+ const { watch } = await importCoreReactiveUtils();
205
+ watch(() => this.widget.activeFilters, (value) => (this.activeFilters = value), {
206
+ initial: true
207
+ });
208
+ watch(() => this.widget.activeSortOrders, (value) => (this.activeSortOrders = value), {
209
+ initial: true
210
+ });
211
+ watch(() => this.widget.columns, (value) => (this.columns = value), {
212
+ initial: true
213
+ });
214
+ watch(() => this.widget.menu, (value) => (this.menu = value), {
215
+ initial: true
216
+ });
217
+ watch(() => this.widget.state, (value) => (this.state = value), {
218
+ initial: true
219
+ });
220
+ }
221
+ _createParams() {
222
+ const params = {
223
+ container: this.childElem
224
+ };
225
+ if (this.view) {
226
+ params.view = this.view;
227
+ }
228
+ if (this.attachmentsEnabled !== undefined) {
229
+ params.attachmentsEnabled = this.attachmentsEnabled;
230
+ }
231
+ if (this.autoRefreshEnabled !== undefined) {
232
+ params.autoRefreshEnabled = this.autoRefreshEnabled;
233
+ }
234
+ if (this.columnReorderingEnabled !== undefined) {
235
+ params.columnReorderingEnabled = this.columnReorderingEnabled;
236
+ }
237
+ if (this.editingEnabled !== undefined) {
238
+ params.editingEnabled = this.editingEnabled;
239
+ }
240
+ if (this.filterGeometry !== undefined) {
241
+ params.filterGeometry = this.filterGeometry;
242
+ }
243
+ if (this.hiddenFields !== undefined) {
244
+ params.hiddenFields = this.hiddenFields;
245
+ }
246
+ if (this.highlightEnabled !== undefined) {
247
+ params.highlightEnabled = this.highlightEnabled;
248
+ }
249
+ if (this.highlightIds !== undefined) {
250
+ params.highlightIds = this.highlightIds;
251
+ }
252
+ if (this.layer !== undefined) {
253
+ params.layer = this.layer;
254
+ }
255
+ if (this.menuConfig !== undefined) {
256
+ params.menuConfig = this.menuConfig;
257
+ }
258
+ if (this.multiSortEnabled !== undefined) {
259
+ params.multiSortEnabled = this.multiSortEnabled;
260
+ }
261
+ if (this.pageSize !== undefined) {
262
+ params.pageSize = this.pageSize;
263
+ }
264
+ if (this.tableTemplate !== undefined) {
265
+ params.tableTemplate = this.tableTemplate;
266
+ }
267
+ return params;
268
+ }
269
+ async _proxyEvents() {
270
+ this.widget?.highlightIds.on("change", (e) => this.rowSelectionChange.emit(e));
271
+ }
272
+ get el() { return getElement(this); }
273
+ static get watchers() { return {
274
+ "position": ["positionWatcher"],
275
+ "attachmentsEnabled": ["attachmentsEnabledWatcher"],
276
+ "autoRefreshEnabled": ["autoRefreshEnabledWatcher"],
277
+ "columnReorderingEnabled": ["columnReorderingEnabledWatcher"],
278
+ "editingEnabled": ["editingEnabledWatcher"],
279
+ "filterGeometry": ["filterGeometryWatcher"],
280
+ "hiddenFields": ["hiddenFieldsWatcher"],
281
+ "highlightEnabled": ["highlightEnabledWatcher"],
282
+ "highlightIds": ["highlightIdsWatcher"],
283
+ "menuConfig": ["menuConfigWatcher"],
284
+ "multiSortEnabled": ["multiSortEnabledWatcher"],
285
+ "pageSize": ["pageSizeWatcher"],
286
+ "tableTemplate": ["tableTemplateWatcher"],
287
+ "itemId": ["itemIdWatcher"],
288
+ "layer": ["layerWatcher"],
289
+ "url": ["urlWatcher"],
290
+ "referenceElement": ["referenceElementWatcher"],
291
+ "view": ["viewWatcher"]
292
+ }; }
293
+ };
294
+ ArcgisFeatureTable.style = arcgisFeatureTableCss;
295
+
296
+ export { ArcgisFeatureTable as arcgis_feature_table };
@@ -0,0 +1,69 @@
1
+ import { r as registerInstance, e as createEvent, h, g as getElement } from './index-d9a93dfb.js';
2
+ import { w as newWidgetsFeatureTemplates } from './index-82d260eb.js';
3
+ import { c as checkForView } from './component-utils-d3552de2.js';
4
+ import { o as onDisconnectedHelper } from './disconnected-bc5fc8bc.js';
5
+
6
+ const arcgisFeatureTemplatesCss = "";
7
+
8
+ const ArcgisFeatureTemplates = 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.widget = undefined;
16
+ this.layers = undefined;
17
+ }
18
+ //--------------------------------------------------------------------------
19
+ //
20
+ // Watchers
21
+ //
22
+ //--------------------------------------------------------------------------
23
+ layersWatcher(newValue) {
24
+ if (newValue !== undefined && this.widget) {
25
+ this.widget.layers = newValue;
26
+ }
27
+ }
28
+ //--------------------------------------------------------------------------
29
+ //
30
+ // Lifecycle
31
+ //
32
+ //--------------------------------------------------------------------------
33
+ async componentDidLoad() {
34
+ const params = this._createParams();
35
+ const widget = await newWidgetsFeatureTemplates(params);
36
+ this.widget = widget;
37
+ checkForView(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.layers) {
58
+ params.layers = this.layers;
59
+ }
60
+ return params;
61
+ }
62
+ get el() { return getElement(this); }
63
+ static get watchers() { return {
64
+ "layers": ["layersWatcher"]
65
+ }; }
66
+ };
67
+ ArcgisFeatureTemplates.style = arcgisFeatureTemplatesCss;
68
+
69
+ export { ArcgisFeatureTemplates as arcgis_feature_templates };
@@ -0,0 +1,102 @@
1
+ import { r as registerInstance, e as createEvent, h, g as getElement } from './index-d9a93dfb.js';
2
+ import { s as newWidgetsFeature } 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 arcgisFeatureCss = "";
7
+
8
+ const ArcgisFeature = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.widgetReady = createEvent(this, "widgetReady", 7);
12
+ this.referenceElement = undefined;
13
+ this.defaultPopupTemplateEnabled = undefined;
14
+ this.graphic = 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
+ defaultPopupTemplateEnabledWatcher(newValue) {
33
+ if (newValue !== undefined && this.widget) {
34
+ this.widget.defaultPopupTemplateEnabled = newValue;
35
+ }
36
+ }
37
+ graphicWatcher(newValue) {
38
+ if (newValue !== undefined && this.widget) {
39
+ this.widget.graphic = newValue;
40
+ }
41
+ }
42
+ referenceElementWatcher(newValue) {
43
+ referenceElementHelper(this, newValue);
44
+ }
45
+ viewWatcher(newValue) {
46
+ if (newValue !== undefined && this.widget) {
47
+ this.widget.view = newValue;
48
+ }
49
+ }
50
+ //--------------------------------------------------------------------------
51
+ //
52
+ // Lifecycle
53
+ //
54
+ //--------------------------------------------------------------------------
55
+ async componentDidLoad() {
56
+ const params = this._createParams();
57
+ const widget = await newWidgetsFeature(params);
58
+ this.widget = widget;
59
+ this.widgetReady.emit(true);
60
+ checkForView(this);
61
+ }
62
+ disconnectedCallback() {
63
+ onDisconnectedHelper(this);
64
+ }
65
+ render() {
66
+ if (this.expandable) {
67
+ return (h("arcgis-expand", { position: this.position, ref: (el) => (this.expandElem = el) }, h("div", { ref: (el) => (this.childElem = el) })));
68
+ }
69
+ return h("div", { ref: (el) => (this.childElem = el) });
70
+ }
71
+ //--------------------------------------------------------------------------
72
+ //
73
+ // Private Methods
74
+ //
75
+ //--------------------------------------------------------------------------
76
+ _createParams() {
77
+ const params = {
78
+ container: this.childElem
79
+ };
80
+ if (this.defaultPopupTemplateEnabled !== undefined) {
81
+ params.defaultPopupTemplateEnabled = this.defaultPopupTemplateEnabled;
82
+ }
83
+ if (this.graphic) {
84
+ params.graphic = this.graphic;
85
+ }
86
+ if (this.view) {
87
+ params.view = this.view;
88
+ }
89
+ return params;
90
+ }
91
+ get el() { return getElement(this); }
92
+ static get watchers() { return {
93
+ "position": ["positionWatcher"],
94
+ "defaultPopupTemplateEnabled": ["defaultPopupTemplateEnabledWatcher"],
95
+ "graphic": ["graphicWatcher"],
96
+ "referenceElement": ["referenceElementWatcher"],
97
+ "view": ["viewWatcher"]
98
+ }; }
99
+ };
100
+ ArcgisFeature.style = arcgisFeatureCss;
101
+
102
+ export { ArcgisFeature as arcgis_feature };