@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,190 @@
1
+ import { r as registerInstance, e as createEvent, h, g as getElement } from './index-d9a93dfb.js';
2
+ import { l as newLayersRouteLayer, m as newWidgetsDirections, 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 arcgisDirectionsCss = "";
7
+
8
+ const ArcgisDirections = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.widgetReady = createEvent(this, "widgetReady", 7);
12
+ this.referenceElement = undefined;
13
+ this.apiKey = undefined;
14
+ this.itemId = undefined;
15
+ this.lastRoute = undefined;
16
+ this.layer = undefined;
17
+ this.maxStops = undefined;
18
+ this.searchProperties = undefined;
19
+ this.unit = undefined;
20
+ this.position = "bottom-left";
21
+ this.expandable = false;
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
+ apiKeyWatcher(value) {
38
+ if (value && this.widget) {
39
+ this.widget.apiKey = value;
40
+ }
41
+ }
42
+ itemIdWatcher(value) {
43
+ if (value && this.widget) {
44
+ newLayersRouteLayer({
45
+ portalItem: {
46
+ id: value
47
+ }
48
+ }).then((layer) => {
49
+ this.layer = layer;
50
+ });
51
+ }
52
+ }
53
+ layerWatcher(value) {
54
+ if (value && this.widget) {
55
+ this.widget.layer = value;
56
+ this.view?.map.add(this.layer);
57
+ }
58
+ }
59
+ maxStopsWatcher(value) {
60
+ if (value && this.widget) {
61
+ this.widget.maxStops = value;
62
+ }
63
+ }
64
+ searchPropertiesWatcher(value) {
65
+ if (value && this.widget) {
66
+ this.widget.searchProperties = value;
67
+ }
68
+ }
69
+ unitWatcher(value) {
70
+ if (value && this.widget) {
71
+ this.widget.unit = value;
72
+ }
73
+ }
74
+ referenceElementWatcher(newValue) {
75
+ referenceElementHelper(this, newValue);
76
+ }
77
+ viewWatcher(newValue) {
78
+ if (newValue !== undefined && this.widget) {
79
+ this.widget.view = newValue;
80
+ if (this.layer) {
81
+ this.widget.view.map.add(this.layer);
82
+ }
83
+ }
84
+ }
85
+ //--------------------------------------------------------------------------
86
+ //
87
+ // Methods
88
+ //
89
+ //--------------------------------------------------------------------------
90
+ async getDirections() {
91
+ return this.widget?.getDirections();
92
+ }
93
+ async save() {
94
+ return this.widget?.save();
95
+ }
96
+ async saveAs(portalItem, options) {
97
+ return this.widget?.saveAs(portalItem, options);
98
+ }
99
+ async zoomToRoute() {
100
+ return this.widget?.zoomToRoute();
101
+ }
102
+ //--------------------------------------------------------------------------
103
+ //
104
+ // Lifecycle
105
+ //
106
+ //--------------------------------------------------------------------------
107
+ async componentDidLoad() {
108
+ const params = await this._createParams();
109
+ const widget = await newWidgetsDirections(params);
110
+ this.widget = widget;
111
+ await this._addWatchers();
112
+ this.widgetReady.emit(true);
113
+ checkForView(this);
114
+ }
115
+ disconnectedCallback() {
116
+ onDisconnectedHelper(this);
117
+ }
118
+ render() {
119
+ if (this.expandable) {
120
+ return (h("arcgis-expand", { position: this.position, ref: (el) => (this.expandElem = el) }, h("div", { ref: (el) => (this.childElem = el) })));
121
+ }
122
+ return h("div", { ref: (el) => (this.childElem = el) });
123
+ }
124
+ //--------------------------------------------------------------------------
125
+ //
126
+ // Private Methods
127
+ //
128
+ //--------------------------------------------------------------------------
129
+ async _addWatchers() {
130
+ const { watch } = await importCoreReactiveUtils();
131
+ watch(() => this.widget.lastRoute, (value) => (this.lastRoute = value), {
132
+ initial: true
133
+ });
134
+ }
135
+ async _createParams() {
136
+ const params = {
137
+ container: this.childElem
138
+ };
139
+ if (this.view) {
140
+ params.view = this.view;
141
+ }
142
+ if (this.apiKey) {
143
+ params.apiKey = this.apiKey;
144
+ }
145
+ if (this.itemId) {
146
+ params.layer = await newLayersRouteLayer({
147
+ portalItem: {
148
+ id: this.itemId
149
+ }
150
+ });
151
+ this.layer = params.layer;
152
+ }
153
+ else if (this.layer) {
154
+ params.layer = this.layer;
155
+ this.layer = params.layer;
156
+ }
157
+ else {
158
+ params.layer = await newLayersRouteLayer({});
159
+ this.layer = params.layer;
160
+ }
161
+ if (this.layer !== undefined) {
162
+ this.view?.map.add(this.layer);
163
+ }
164
+ if (this.maxStops !== undefined) {
165
+ params.maxStops = this.maxStops;
166
+ }
167
+ if (this.searchProperties) {
168
+ params.searchProperties = this.searchProperties;
169
+ }
170
+ if (this.unit) {
171
+ params.unit = this.unit;
172
+ }
173
+ return params;
174
+ }
175
+ get el() { return getElement(this); }
176
+ static get watchers() { return {
177
+ "position": ["positionWatcher"],
178
+ "apiKey": ["apiKeyWatcher"],
179
+ "itemId": ["itemIdWatcher"],
180
+ "layer": ["layerWatcher"],
181
+ "maxStops": ["maxStopsWatcher"],
182
+ "searchProperties": ["searchPropertiesWatcher"],
183
+ "unit": ["unitWatcher"],
184
+ "referenceElement": ["referenceElementWatcher"],
185
+ "view": ["viewWatcher"]
186
+ }; }
187
+ };
188
+ ArcgisDirections.style = arcgisDirectionsCss;
189
+
190
+ export { ArcgisDirections as arcgis_directions };
@@ -0,0 +1,110 @@
1
+ import { r as registerInstance, e as createEvent, h, g as getElement } from './index-d9a93dfb.js';
2
+ import { o as newWidgetsDirectLineMeasurement3D, 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 arcgisDirectlineMeasurement3dCss = "";
7
+
8
+ const ArcgisDirectLineMeasurement3d = 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.analysis = undefined;
16
+ this.unit = undefined;
17
+ this.unitOptions = undefined;
18
+ this.widget = undefined;
19
+ this.view = undefined;
20
+ }
21
+ //--------------------------------------------------------------------------
22
+ //
23
+ // Watchers
24
+ //
25
+ //--------------------------------------------------------------------------
26
+ positionWatcher(newValue) {
27
+ if (newValue !== undefined && this.widget) {
28
+ if (typeof this.view !== "string") {
29
+ this.view.ui.move(this.childElem, newValue);
30
+ }
31
+ }
32
+ }
33
+ unitWatcher(value) {
34
+ if (value && this.widget) {
35
+ this.widget.unit = value;
36
+ }
37
+ }
38
+ unitOptionsWatcher(value) {
39
+ if (value && this.widget) {
40
+ this.widget.unitOptions = value;
41
+ }
42
+ }
43
+ referenceElementWatcher(newValue) {
44
+ referenceElementHelper(this, newValue);
45
+ }
46
+ viewWatcher(newValue) {
47
+ if (newValue !== undefined && this.widget) {
48
+ this.widget.view = newValue;
49
+ }
50
+ }
51
+ //--------------------------------------------------------------------------
52
+ //
53
+ // Lifecycle
54
+ //
55
+ //--------------------------------------------------------------------------
56
+ async componentDidLoad() {
57
+ const params = this._createParams();
58
+ const widget = await newWidgetsDirectLineMeasurement3D(params);
59
+ this.widget = widget;
60
+ this._addWatchers();
61
+ this.widgetReady.emit(true);
62
+ checkForView(this);
63
+ }
64
+ disconnectedCallback() {
65
+ onDisconnectedHelper(this);
66
+ }
67
+ render() {
68
+ if (this.expandable) {
69
+ return (h("arcgis-expand", { position: this.position, ref: (el) => (this.expandElem = el) }, h("div", { ref: (el) => (this.childElem = el) })));
70
+ }
71
+ return h("div", { ref: (el) => (this.childElem = el) });
72
+ }
73
+ //--------------------------------------------------------------------------
74
+ //
75
+ // Private Methods
76
+ //
77
+ //--------------------------------------------------------------------------
78
+ async _addWatchers() {
79
+ const { watch } = await importCoreReactiveUtils();
80
+ watch(() => this.widget.analysis, (value) => (this.analysis = value), {
81
+ initial: true
82
+ });
83
+ }
84
+ _createParams() {
85
+ const params = {
86
+ container: this.childElem
87
+ };
88
+ if (this.view) {
89
+ params.view = this.view;
90
+ }
91
+ if (this.unit) {
92
+ params.unit = this.unit;
93
+ }
94
+ if (this.unitOptions) {
95
+ params.unitOptions = this.unitOptions;
96
+ }
97
+ return params;
98
+ }
99
+ get el() { return getElement(this); }
100
+ static get watchers() { return {
101
+ "position": ["positionWatcher"],
102
+ "unit": ["unitWatcher"],
103
+ "unitOptions": ["unitOptionsWatcher"],
104
+ "referenceElement": ["referenceElementWatcher"],
105
+ "view": ["viewWatcher"]
106
+ }; }
107
+ };
108
+ ArcgisDirectLineMeasurement3d.style = arcgisDirectlineMeasurement3dCss;
109
+
110
+ export { ArcgisDirectLineMeasurement3d as arcgis_directline_measurement_3d };
@@ -0,0 +1,102 @@
1
+ import { r as registerInstance, e as createEvent, h, g as getElement } from './index-d9a93dfb.js';
2
+ import { p as newWidgetsDistanceMeasurement2D } 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 arcgisDistanceMeasurement2dCss = "";
7
+
8
+ const ArcgisDistanceMeasurement2d = 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.widget = undefined;
18
+ this.view = 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
+ unitWatcher(value) {
33
+ if (value && this.widget) {
34
+ this.widget.unit = value;
35
+ }
36
+ }
37
+ unitOptionsWatcher(value) {
38
+ if (value && this.widget) {
39
+ this.widget.unitOptions = value;
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 newWidgetsDistanceMeasurement2D(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.view) {
81
+ params.view = this.view;
82
+ }
83
+ if (this.unit) {
84
+ params.unit = this.unit;
85
+ }
86
+ if (this.unitOptions) {
87
+ params.unitOptions = this.unitOptions;
88
+ }
89
+ return params;
90
+ }
91
+ get el() { return getElement(this); }
92
+ static get watchers() { return {
93
+ "position": ["positionWatcher"],
94
+ "unit": ["unitWatcher"],
95
+ "unitOptions": ["unitOptionsWatcher"],
96
+ "referenceElement": ["referenceElementWatcher"],
97
+ "view": ["viewWatcher"]
98
+ }; }
99
+ };
100
+ ArcgisDistanceMeasurement2d.style = arcgisDistanceMeasurement2dCss;
101
+
102
+ export { ArcgisDistanceMeasurement2d as arcgis_distance_measurement_2d };
@@ -0,0 +1,176 @@
1
+ import { r as registerInstance, e as createEvent, h, g as getElement } from './index-d9a93dfb.js';
2
+ import { q as newWidgetsEditor, 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 arcgisEditorCss = "";
7
+
8
+ const ArcgisEditor = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.widgetReady = createEvent(this, "widgetReady", 7);
12
+ this.referenceElement = undefined;
13
+ this.activeWorkflow = undefined;
14
+ this.allowedWorkflows = undefined;
15
+ this.labelOptions = undefined;
16
+ this.layerInfos = undefined;
17
+ this.snappingOptions = undefined;
18
+ this.supportingWidgetDefaults = undefined;
19
+ this.tooltipOptions = undefined;
20
+ this.position = "bottom-left";
21
+ this.expandable = false;
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
+ allowedWorkflowsWatcher(value) {
38
+ if (value && this.widget) {
39
+ this.widget.allowedWorkflows = value;
40
+ }
41
+ }
42
+ labelOptionsWatcher(value) {
43
+ if (value && this.widget) {
44
+ this.widget.labelOptions = value;
45
+ }
46
+ }
47
+ layerInfosWatcher(value) {
48
+ if (value && this.widget) {
49
+ this.widget.layerInfos = value;
50
+ }
51
+ }
52
+ snappingOptionsWatcher(value) {
53
+ if (value && this.widget) {
54
+ this.widget.snappingOptions = value;
55
+ }
56
+ }
57
+ supportingWidgetDefaultsWatcher(value) {
58
+ if (value && this.widget) {
59
+ this.widget.supportingWidgetDefaults = value;
60
+ }
61
+ }
62
+ tooltipOptionsWatcher(value) {
63
+ if (value && this.widget) {
64
+ this.widget.tooltipOptions = value;
65
+ }
66
+ }
67
+ referenceElementWatcher(newValue) {
68
+ referenceElementHelper(this, newValue);
69
+ }
70
+ viewWatcher(newValue) {
71
+ if (newValue !== undefined && this.widget) {
72
+ this.widget.view = newValue;
73
+ }
74
+ }
75
+ //--------------------------------------------------------------------------
76
+ //
77
+ // Methods
78
+ //
79
+ //--------------------------------------------------------------------------
80
+ async cancelWorkflow() {
81
+ return this.widget?.cancelWorkflow();
82
+ }
83
+ async deleteFeatureFromWorkflow() {
84
+ return this.widget?.deleteFeatureFromWorkflow();
85
+ }
86
+ async startCreateFeaturesWorkflowAtFeatureCreation(info) {
87
+ return this.widget?.startCreateFeaturesWorkflowAtFeatureCreation(info);
88
+ }
89
+ async startCreateFeaturesWorkflowAtFeatureTypeSelection() {
90
+ return this.widget?.startCreateFeaturesWorkflowAtFeatureTypeSelection();
91
+ }
92
+ async startUpdateWorkflowAtFeatureEdit(feature) {
93
+ return this.widget?.startUpdateWorkflowAtFeatureEdit(feature);
94
+ }
95
+ async startUpdateWorkflowAtFeatureSelection() {
96
+ return this.widget?.startUpdateWorkflowAtFeatureSelection();
97
+ }
98
+ async startUpdateWorkflowAtMultipleFeatureSelection(candidates) {
99
+ return this.widget?.startUpdateWorkflowAtMultipleFeatureSelection(candidates);
100
+ }
101
+ //--------------------------------------------------------------------------
102
+ //
103
+ // Lifecycle
104
+ //
105
+ //--------------------------------------------------------------------------
106
+ async componentDidLoad() {
107
+ const params = this._createParams();
108
+ const widget = await newWidgetsEditor(params);
109
+ this.widget = widget;
110
+ this._addWatchers();
111
+ this.widgetReady.emit(true);
112
+ checkForView(this);
113
+ }
114
+ disconnectedCallback() {
115
+ onDisconnectedHelper(this);
116
+ }
117
+ render() {
118
+ if (this.expandable) {
119
+ return (h("arcgis-expand", { position: this.position, ref: (el) => (this.expandElem = el) }, h("div", { ref: (el) => (this.childElem = el) })));
120
+ }
121
+ return h("div", { ref: (el) => (this.childElem = el) });
122
+ }
123
+ //--------------------------------------------------------------------------
124
+ //
125
+ // Private Methods
126
+ //
127
+ //--------------------------------------------------------------------------
128
+ async _addWatchers() {
129
+ const { watch } = await importCoreReactiveUtils();
130
+ watch(() => this.widget.activeWorkflow, (value) => (this.activeWorkflow = value), {
131
+ initial: true
132
+ });
133
+ }
134
+ _createParams() {
135
+ const params = {
136
+ container: this.childElem
137
+ };
138
+ if (this.allowedWorkflows) {
139
+ params.allowedWorkflows = this.allowedWorkflows;
140
+ }
141
+ if (this.labelOptions) {
142
+ params.labelOptions = this.labelOptions;
143
+ }
144
+ if (this.layerInfos) {
145
+ params.layerInfos = this.layerInfos;
146
+ }
147
+ if (this.snappingOptions) {
148
+ params.snappingOptions = this.snappingOptions;
149
+ }
150
+ if (this.supportingWidgetDefaults) {
151
+ params.supportingWidgetDefaults = this.supportingWidgetDefaults;
152
+ }
153
+ if (this.tooltipOptions) {
154
+ params.tooltipOptions = this.tooltipOptions;
155
+ }
156
+ if (this.view) {
157
+ params.view = this.view;
158
+ }
159
+ return params;
160
+ }
161
+ get el() { return getElement(this); }
162
+ static get watchers() { return {
163
+ "position": ["positionWatcher"],
164
+ "allowedWorkflows": ["allowedWorkflowsWatcher"],
165
+ "labelOptions": ["labelOptionsWatcher"],
166
+ "layerInfos": ["layerInfosWatcher"],
167
+ "snappingOptions": ["snappingOptionsWatcher"],
168
+ "supportingWidgetDefaults": ["supportingWidgetDefaultsWatcher"],
169
+ "tooltipOptions": ["tooltipOptionsWatcher"],
170
+ "referenceElement": ["referenceElementWatcher"],
171
+ "view": ["viewWatcher"]
172
+ }; }
173
+ };
174
+ ArcgisEditor.style = arcgisEditorCss;
175
+
176
+ export { ArcgisEditor as arcgis_editor };
@@ -0,0 +1,132 @@
1
+ import { r as registerInstance, e as createEvent, h, g as getElement } from './index-d9a93dfb.js';
2
+ import { r as newWidgetsElevationProfile } 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 arcgisElevationProfileCss = "";
7
+
8
+ const ArcgisElevationProfile = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.widgetReady = createEvent(this, "widgetReady", 7);
12
+ this.referenceElement = undefined;
13
+ this.geodesicDistanceThreshold = undefined;
14
+ this.input = undefined;
15
+ this.profiles = undefined;
16
+ this.position = "bottom-left";
17
+ this.expandable = false;
18
+ this.unit = undefined;
19
+ this.unitOptions = undefined;
20
+ this.view = undefined;
21
+ this.widget = undefined;
22
+ }
23
+ //--------------------------------------------------------------------------
24
+ //
25
+ // Watchers
26
+ //
27
+ //--------------------------------------------------------------------------
28
+ positionWatcher(newValue) {
29
+ if (newValue !== undefined && this.widget) {
30
+ if (typeof this.view !== "string") {
31
+ this.view.ui.move(this.childElem, newValue);
32
+ }
33
+ }
34
+ }
35
+ geodesicDistanceThresholdWatcher(value) {
36
+ if (value && this.widget) {
37
+ this.widget.geodesicDistanceThreshold = value;
38
+ }
39
+ }
40
+ inputWatcher(value) {
41
+ if (value && this.widget) {
42
+ this.widget.input = value;
43
+ }
44
+ }
45
+ profilesWatcher(value) {
46
+ if (value && this.widget) {
47
+ this.widget.profiles = value;
48
+ }
49
+ }
50
+ unitWatcher(value) {
51
+ if (value && this.widget) {
52
+ this.widget.unit = value;
53
+ }
54
+ }
55
+ unitOptionsWatcher(value) {
56
+ if (value && this.widget) {
57
+ this.widget.unitOptions = value;
58
+ }
59
+ }
60
+ referenceElementWatcher(newValue) {
61
+ 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 newWidgetsElevationProfile(params);
76
+ this.widget = widget;
77
+ this.widgetReady.emit(true);
78
+ checkForView(this);
79
+ }
80
+ disconnectedCallback() {
81
+ onDisconnectedHelper(this);
82
+ }
83
+ render() {
84
+ if (this.expandable) {
85
+ return (h("arcgis-expand", { position: this.position, ref: (el) => (this.expandElem = el) }, h("div", { ref: (el) => (this.childElem = el) })));
86
+ }
87
+ return h("div", { ref: (el) => (this.childElem = el) });
88
+ }
89
+ //--------------------------------------------------------------------------
90
+ //
91
+ // Private Methods
92
+ //
93
+ //--------------------------------------------------------------------------
94
+ _createParams() {
95
+ const params = {
96
+ container: this.childElem
97
+ };
98
+ if (this.view) {
99
+ params.view = this.view;
100
+ }
101
+ if (this.geodesicDistanceThreshold) {
102
+ params.geodesicDistanceThreshold = this.geodesicDistanceThreshold;
103
+ }
104
+ if (this.input) {
105
+ params.input = this.input;
106
+ }
107
+ if (this.profiles) {
108
+ params.profiles = this.profiles;
109
+ }
110
+ if (this.unit) {
111
+ params.unit = this.unit;
112
+ }
113
+ if (this.unitOptions) {
114
+ params.unitOptions = this.unitOptions;
115
+ }
116
+ return params;
117
+ }
118
+ get el() { return getElement(this); }
119
+ static get watchers() { return {
120
+ "position": ["positionWatcher"],
121
+ "geodesicDistanceThreshold": ["geodesicDistanceThresholdWatcher"],
122
+ "input": ["inputWatcher"],
123
+ "profiles": ["profilesWatcher"],
124
+ "unit": ["unitWatcher"],
125
+ "unitOptions": ["unitOptionsWatcher"],
126
+ "referenceElement": ["referenceElementWatcher"],
127
+ "view": ["viewWatcher"]
128
+ }; }
129
+ };
130
+ ArcgisElevationProfile.style = arcgisElevationProfileCss;
131
+
132
+ export { ArcgisElevationProfile as arcgis_elevation_profile };