@arcgis/map-components 4.29.0-beta.7 → 4.29.0-beta.8

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 (177) hide show
  1. package/dist/arcgis-map-components/arcgis-map-components.esm.js +1 -1
  2. package/dist/arcgis-map-components/{p-eb95717e.entry.js → p-05b8fbcd.entry.js} +1 -1
  3. package/dist/arcgis-map-components/{p-a1e2e59f.entry.js → p-0f5a8625.entry.js} +1 -1
  4. package/dist/arcgis-map-components/p-10474a49.entry.js +1 -0
  5. package/dist/arcgis-map-components/{p-ee1086de.entry.js → p-12b30d7d.entry.js} +1 -1
  6. package/dist/arcgis-map-components/{p-7084f84f.entry.js → p-13445e5a.entry.js} +1 -1
  7. package/dist/arcgis-map-components/{p-74b7f2c3.entry.js → p-13540ce3.entry.js} +1 -1
  8. package/dist/arcgis-map-components/{p-347dba98.entry.js → p-138dc92a.entry.js} +1 -1
  9. package/dist/arcgis-map-components/{p-5d2f53bd.entry.js → p-1f92d92f.entry.js} +1 -1
  10. package/dist/arcgis-map-components/{p-4722bbad.entry.js → p-2c488471.entry.js} +1 -1
  11. package/dist/arcgis-map-components/{p-86a82586.entry.js → p-330721c4.entry.js} +1 -1
  12. package/dist/arcgis-map-components/{p-8b4cf5da.entry.js → p-37df06ef.entry.js} +1 -1
  13. package/dist/arcgis-map-components/{p-a249c2fa.entry.js → p-42e299ec.entry.js} +1 -1
  14. package/dist/arcgis-map-components/{p-a89102b6.entry.js → p-480542ed.entry.js} +1 -1
  15. package/dist/arcgis-map-components/{p-c8516f87.entry.js → p-507fb647.entry.js} +1 -1
  16. package/dist/arcgis-map-components/{p-f28d6d27.js → p-50b0eec0.js} +1 -1
  17. package/dist/arcgis-map-components/{p-0d492ad6.entry.js → p-58e28dea.entry.js} +1 -1
  18. package/dist/arcgis-map-components/{p-e1201530.entry.js → p-5932858e.entry.js} +1 -1
  19. package/dist/arcgis-map-components/{p-ae96d72a.entry.js → p-5b2289ad.entry.js} +1 -1
  20. package/dist/arcgis-map-components/p-5cabdee7.js +1 -0
  21. package/dist/arcgis-map-components/{p-367c6986.entry.js → p-5dc1db1d.entry.js} +1 -1
  22. package/dist/arcgis-map-components/{p-658a2499.entry.js → p-5ea411af.entry.js} +1 -1
  23. package/dist/arcgis-map-components/{p-064bf907.entry.js → p-607f4c52.entry.js} +1 -1
  24. package/dist/arcgis-map-components/{p-f8353590.entry.js → p-60ad7f3f.entry.js} +1 -1
  25. package/dist/arcgis-map-components/{p-3b2623c6.entry.js → p-629bd6f2.entry.js} +1 -1
  26. package/dist/arcgis-map-components/{p-b813c9e6.js → p-671138da.js} +1 -1
  27. package/dist/arcgis-map-components/{p-a508d7c6.entry.js → p-6e0e9239.entry.js} +1 -1
  28. package/dist/arcgis-map-components/{p-9fdd4596.entry.js → p-77e11200.entry.js} +1 -1
  29. package/dist/arcgis-map-components/p-7b0c6659.entry.js +1 -0
  30. package/dist/arcgis-map-components/{p-ac7e9294.entry.js → p-819c583a.entry.js} +1 -1
  31. package/dist/arcgis-map-components/{p-d3f3affa.entry.js → p-8a09514f.entry.js} +1 -1
  32. package/dist/arcgis-map-components/{p-8a60074a.entry.js → p-8c6dbbdb.entry.js} +1 -1
  33. package/dist/arcgis-map-components/{p-d5ac71b2.entry.js → p-8ff78165.entry.js} +1 -1
  34. package/dist/arcgis-map-components/{p-a0f092fc.entry.js → p-975a4a2f.entry.js} +1 -1
  35. package/dist/arcgis-map-components/{p-922bbfed.entry.js → p-994d6830.entry.js} +1 -1
  36. package/dist/arcgis-map-components/{p-52c3388d.entry.js → p-a6202ee8.entry.js} +1 -1
  37. package/dist/arcgis-map-components/p-a736a82a.entry.js +1 -0
  38. package/dist/arcgis-map-components/{p-b026950f.entry.js → p-ab160cd1.entry.js} +1 -1
  39. package/dist/arcgis-map-components/{p-037a3bb6.entry.js → p-ab77a123.entry.js} +1 -1
  40. package/dist/arcgis-map-components/{p-3673ae6e.entry.js → p-accd62f0.entry.js} +1 -1
  41. package/dist/arcgis-map-components/{p-dcf3861b.entry.js → p-ad947551.entry.js} +1 -1
  42. package/dist/arcgis-map-components/{p-48c89578.entry.js → p-ba077eae.entry.js} +1 -1
  43. package/dist/arcgis-map-components/{p-adcfd40d.entry.js → p-babcad0b.entry.js} +1 -1
  44. package/dist/arcgis-map-components/{p-5299aa69.entry.js → p-c073e5d7.entry.js} +1 -1
  45. package/dist/arcgis-map-components/{p-1680f044.entry.js → p-c0d72072.entry.js} +1 -1
  46. package/dist/arcgis-map-components/{p-99d486cb.entry.js → p-c42935c8.entry.js} +1 -1
  47. package/dist/arcgis-map-components/p-c732b578.entry.js +1 -0
  48. package/dist/arcgis-map-components/{p-c57f270d.entry.js → p-caa6c93f.entry.js} +1 -1
  49. package/dist/arcgis-map-components/p-cd92070a.entry.js +1 -0
  50. package/dist/arcgis-map-components/{p-c63d9e91.entry.js → p-ce3bf43a.entry.js} +1 -1
  51. package/dist/arcgis-map-components/{p-0ee8ea5a.entry.js → p-eaa805c2.entry.js} +1 -1
  52. package/dist/arcgis-map-components/p-ee86773c.js +1 -0
  53. package/dist/arcgis-map-components/{p-29c81862.entry.js → p-f1431dd1.entry.js} +1 -1
  54. package/dist/arcgis-map-components/{p-932be58c.entry.js → p-f6aac535.entry.js} +1 -1
  55. package/dist/arcgis-map-components/{p-08015460.entry.js → p-faa0561b.entry.js} +1 -1
  56. package/dist/cjs/arcgis-area-measurement-2d.cjs.entry.js +2 -2
  57. package/dist/cjs/arcgis-area-measurement-3d.cjs.entry.js +2 -2
  58. package/dist/cjs/arcgis-attachments.cjs.entry.js +1 -1
  59. package/dist/cjs/arcgis-basemap-gallery.cjs.entry.js +2 -2
  60. package/dist/cjs/arcgis-basemap-layer-list.cjs.entry.js +2 -2
  61. package/dist/cjs/arcgis-basemap-toggle.cjs.entry.js +2 -2
  62. package/dist/cjs/arcgis-bookmarks.cjs.entry.js +2 -2
  63. package/dist/cjs/arcgis-building-explorer.cjs.entry.js +2 -2
  64. package/dist/cjs/arcgis-compass.cjs.entry.js +2 -2
  65. package/dist/cjs/arcgis-coordinate-conversion.cjs.entry.js +2 -2
  66. package/dist/cjs/arcgis-daylight.cjs.entry.js +2 -2
  67. package/dist/cjs/arcgis-directions.cjs.entry.js +2 -2
  68. package/dist/cjs/arcgis-directline-measurement-3d.cjs.entry.js +2 -2
  69. package/dist/cjs/arcgis-distance-measurement-2d.cjs.entry.js +2 -2
  70. package/dist/cjs/arcgis-editor.cjs.entry.js +2 -2
  71. package/dist/cjs/arcgis-elevation-profile.cjs.entry.js +2 -2
  72. package/dist/cjs/arcgis-expand_4.cjs.entry.js +125 -163
  73. package/dist/cjs/arcgis-feature-table.cjs.entry.js +2 -2
  74. package/dist/cjs/arcgis-feature-templates.cjs.entry.js +2 -2
  75. package/dist/cjs/arcgis-feature.cjs.entry.js +2 -2
  76. package/dist/cjs/arcgis-features.cjs.entry.js +2 -2
  77. package/dist/cjs/arcgis-floor-filter.cjs.entry.js +2 -2
  78. package/dist/cjs/arcgis-fullscreen.cjs.entry.js +2 -2
  79. package/dist/cjs/arcgis-histogram-range-slider.cjs.entry.js +2 -2
  80. package/dist/cjs/arcgis-home.cjs.entry.js +2 -2
  81. package/dist/cjs/arcgis-layer-list.cjs.entry.js +2 -2
  82. package/dist/cjs/arcgis-line-of-sight.cjs.entry.js +2 -2
  83. package/dist/cjs/arcgis-locate.cjs.entry.js +2 -2
  84. package/dist/cjs/arcgis-map-components.cjs.js +1 -1
  85. package/dist/cjs/arcgis-measurement.cjs.entry.js +2 -2
  86. package/dist/cjs/arcgis-navigation-toggle.cjs.entry.js +2 -2
  87. package/dist/cjs/arcgis-print.cjs.entry.js +2 -2
  88. package/dist/cjs/arcgis-scale-bar.cjs.entry.js +2 -2
  89. package/dist/cjs/arcgis-scale-range-slider.cjs.entry.js +2 -2
  90. package/dist/cjs/arcgis-scene.cjs.entry.js +148 -0
  91. package/dist/cjs/arcgis-shadow-cast.cjs.entry.js +2 -2
  92. package/dist/cjs/arcgis-sketch.cjs.entry.js +2 -2
  93. package/dist/cjs/arcgis-slice.cjs.entry.js +2 -2
  94. package/dist/cjs/arcgis-slider.cjs.entry.js +2 -2
  95. package/dist/cjs/arcgis-swipe.cjs.entry.js +2 -2
  96. package/dist/cjs/arcgis-table-list.cjs.entry.js +2 -2
  97. package/dist/cjs/arcgis-time-slider.cjs.entry.js +2 -2
  98. package/dist/cjs/arcgis-track.cjs.entry.js +2 -2
  99. package/dist/cjs/arcgis-utility-network-associations.cjs.entry.js +2 -2
  100. package/dist/cjs/arcgis-utility-network-trace.cjs.entry.js +2 -2
  101. package/dist/cjs/arcgis-utility-network-validate-topology.cjs.entry.js +2 -2
  102. package/dist/cjs/arcgis-value-picker.cjs.entry.js +2 -2
  103. package/dist/cjs/arcgis-weather.cjs.entry.js +2 -2
  104. package/dist/cjs/arcgis-zoom.cjs.entry.js +2 -2
  105. package/dist/cjs/{component-utils-cbd20e88.js → component-utils-74d4294a.js} +14 -1
  106. package/dist/cjs/index-6b51d5a0.js +4 -4
  107. package/dist/cjs/loader.cjs.js +1 -1
  108. package/dist/cjs/mapping-utils-c2c7b994.js +40 -0
  109. package/dist/components/arcgis-expand2.js +1 -0
  110. package/dist/components/disconnected.js +14 -1
  111. package/dist/esm/arcgis-area-measurement-2d.entry.js +3 -3
  112. package/dist/esm/arcgis-area-measurement-3d.entry.js +3 -3
  113. package/dist/esm/arcgis-attachments.entry.js +2 -2
  114. package/dist/esm/arcgis-basemap-gallery.entry.js +3 -3
  115. package/dist/esm/arcgis-basemap-layer-list.entry.js +3 -3
  116. package/dist/esm/arcgis-basemap-toggle.entry.js +3 -3
  117. package/dist/esm/arcgis-bookmarks.entry.js +3 -3
  118. package/dist/esm/arcgis-building-explorer.entry.js +3 -3
  119. package/dist/esm/arcgis-compass.entry.js +3 -3
  120. package/dist/esm/arcgis-coordinate-conversion.entry.js +3 -3
  121. package/dist/esm/arcgis-daylight.entry.js +3 -3
  122. package/dist/esm/arcgis-directions.entry.js +3 -3
  123. package/dist/esm/arcgis-directline-measurement-3d.entry.js +3 -3
  124. package/dist/esm/arcgis-distance-measurement-2d.entry.js +3 -3
  125. package/dist/esm/arcgis-editor.entry.js +3 -3
  126. package/dist/esm/arcgis-elevation-profile.entry.js +3 -3
  127. package/dist/esm/arcgis-expand_4.entry.js +125 -163
  128. package/dist/esm/arcgis-feature-form.entry.js +1 -1
  129. package/dist/esm/arcgis-feature-table.entry.js +3 -3
  130. package/dist/esm/arcgis-feature-templates.entry.js +3 -3
  131. package/dist/esm/arcgis-feature.entry.js +3 -3
  132. package/dist/esm/arcgis-features.entry.js +3 -3
  133. package/dist/esm/arcgis-floor-filter.entry.js +3 -3
  134. package/dist/esm/arcgis-fullscreen.entry.js +3 -3
  135. package/dist/esm/arcgis-histogram-range-slider.entry.js +3 -3
  136. package/dist/esm/arcgis-histogram.entry.js +1 -1
  137. package/dist/esm/arcgis-home.entry.js +3 -3
  138. package/dist/esm/arcgis-layer-list.entry.js +3 -3
  139. package/dist/esm/arcgis-line-of-sight.entry.js +3 -3
  140. package/dist/esm/arcgis-locate.entry.js +3 -3
  141. package/dist/esm/arcgis-map-components.js +1 -1
  142. package/dist/esm/arcgis-measurement.entry.js +3 -3
  143. package/dist/esm/arcgis-navigation-toggle.entry.js +3 -3
  144. package/dist/esm/arcgis-print.entry.js +3 -3
  145. package/dist/esm/arcgis-scale-bar.entry.js +3 -3
  146. package/dist/esm/arcgis-scale-range-slider.entry.js +3 -3
  147. package/dist/esm/arcgis-scene.entry.js +144 -0
  148. package/dist/esm/arcgis-shadow-cast.entry.js +3 -3
  149. package/dist/esm/arcgis-sketch.entry.js +3 -3
  150. package/dist/esm/arcgis-slice.entry.js +3 -3
  151. package/dist/esm/arcgis-slider.entry.js +3 -3
  152. package/dist/esm/arcgis-swipe.entry.js +3 -3
  153. package/dist/esm/arcgis-table-list.entry.js +3 -3
  154. package/dist/esm/arcgis-time-slider.entry.js +3 -3
  155. package/dist/esm/arcgis-track.entry.js +3 -3
  156. package/dist/esm/arcgis-utility-network-associations.entry.js +3 -3
  157. package/dist/esm/arcgis-utility-network-trace.entry.js +3 -3
  158. package/dist/esm/arcgis-utility-network-validate-topology.entry.js +3 -3
  159. package/dist/esm/arcgis-value-picker.entry.js +3 -3
  160. package/dist/esm/arcgis-weather.entry.js +3 -3
  161. package/dist/esm/arcgis-zoom.entry.js +3 -3
  162. package/dist/esm/{component-utils-2ebdae59.js → component-utils-7d77f5a9.js} +14 -1
  163. package/dist/esm/{index-334b0bde.js → index-365164b6.js} +1 -1
  164. package/dist/esm/index-eb3ead33.js +4 -4
  165. package/dist/esm/loader.js +1 -1
  166. package/dist/esm/mapping-utils-26beb904.js +38 -0
  167. package/package.json +4 -4
  168. package/dist/arcgis-map-components/p-11168df4.entry.js +0 -1
  169. package/dist/arcgis-map-components/p-1a6dcf6a.entry.js +0 -1
  170. package/dist/arcgis-map-components/p-2d3406f7.js +0 -1
  171. package/dist/arcgis-map-components/p-615399dd.entry.js +0 -1
  172. package/dist/arcgis-map-components/p-7031c422.entry.js +0 -1
  173. package/dist/arcgis-map-components/p-b5904340.entry.js +0 -1
  174. package/dist/cjs/arcgis-legend.cjs.entry.js +0 -146
  175. package/dist/esm/arcgis-legend.entry.js +0 -142
  176. package/dist/cjs/{disconnected-306cb220.js → disconnected-2309d7ed.js} +1 -1
  177. package/dist/esm/{disconnected-bc5fc8bc.js → disconnected-888f5a8f.js} +1 -1
@@ -1,7 +1,8 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-eb3ead33.js';
2
- import { n as newWidgetsExpand, i as importConfig, a as newWebMap, b as newViewsMapView, c as importCoreReactiveUtils, d as newWebScene, e as newViewsSceneView, f as newWidgetsSearch } from './index-334b0bde.js';
3
- import { r as referenceElementHelper, c as checkForView } from './component-utils-2ebdae59.js';
4
- import { o as onDisconnectedHelper } from './disconnected-bc5fc8bc.js';
2
+ import { n as newWidgetsExpand, a as newWidgetsLegend, i as importConfig, b as newWebMap, c as newViewsMapView, d as importCoreReactiveUtils, e as newWidgetsSearch } from './index-365164b6.js';
3
+ import { r as referenceElementHelper, c as checkForView } from './component-utils-7d77f5a9.js';
4
+ import { o as onDisconnectedHelper } from './disconnected-888f5a8f.js';
5
+ import { d as disableNavigation } from './mapping-utils-26beb904.js';
5
6
 
6
7
  const arcgisExpandCss = "arcgis-expand>.esri-expand__content--expanded{background-color:var(--calcite-ui-background)}";
7
8
 
@@ -69,6 +70,7 @@ const ArcgisExpand = class {
69
70
  }
70
71
  else if (viewRef) {
71
72
  const handler = () => {
73
+ viewRef.removeEventListener("viewReady", handler, false);
72
74
  this.view = viewRef.view;
73
75
  this.view.ui.add(this.childElem, this.position);
74
76
  this.widgetReady.emit({ widget: this.widget });
@@ -85,218 +87,167 @@ const ArcgisExpand = class {
85
87
  };
86
88
  ArcgisExpand.style = arcgisExpandCss;
87
89
 
88
- function disableNavigation(view) {
89
- if (view.type === '2d') {
90
- view.constraints.rotationEnabled = false;
91
- }
92
- view.popup.dockEnabled = true;
93
- // Removes the zoom action on the popup
94
- view.popup.actions.removeAll();
95
- view.popup.viewModel.includeDefaultActions = false;
96
- // stops propagation of default behavior when an event fires
97
- function stopEvtPropagation(event) {
98
- event.stopPropagation();
99
- }
100
- // exlude the zoom widget from the default UI
101
- view.ui.components = ['attribution'];
102
- // disable mouse wheel scroll zooming on the view
103
- view.on('mouse-wheel', stopEvtPropagation);
104
- // disable zooming via double-click on the view
105
- view.on('double-click', stopEvtPropagation);
106
- // disable zooming out via double-click + Control on the view
107
- view.on('double-click', ['Control'], stopEvtPropagation);
108
- // disables pinch-zoom and panning on the view
109
- view.on('drag', stopEvtPropagation);
110
- // disable the view's zoom box to prevent the Shift + drag
111
- // and Shift + Control + drag zoom gestures.
112
- view.on('drag', ['Shift'], stopEvtPropagation);
113
- view.on('drag', ['Shift', 'Control'], stopEvtPropagation);
114
- // prevents zooming with the + and - keys
115
- view.on('key-down', event => {
116
- const prohibitedKeys = ['+', '-', 'Shift', '_', '=', 'ArrowUp', 'ArrowDown', 'ArrowRight', 'ArrowLeft'];
117
- const keyPressed = event.key;
118
- if (prohibitedKeys.indexOf(keyPressed) !== -1) {
119
- event.stopPropagation();
120
- }
121
- });
122
- return view;
123
- }
90
+ const arcgisLegendCss = "";
124
91
 
125
- const arcgisMapCss = ".arcgis-map{padding:0;margin:0;height:100%;width:100%}";
126
-
127
- const ArcgisMap = class {
92
+ const ArcgisLegend = class {
128
93
  constructor(hostRef) {
129
94
  registerInstance(this, hostRef);
130
- this.viewReady = createEvent(this, "viewReady", 7);
131
- this.apiKey = undefined;
132
- this.basemap = undefined;
133
- this.backgroundColor = undefined;
134
- this.disableNavigation = false;
135
- this.itemId = undefined;
136
- this.portalUrl = undefined;
137
- this.scale = undefined;
138
- this.zoom = undefined;
139
- this.center = undefined;
95
+ this.widgetReady = createEvent(this, "widgetReady", 7);
96
+ this.referenceElement = undefined;
97
+ this.activeLayerInfos = undefined;
98
+ this.basemapLegendVisible = undefined;
99
+ this.hideLayersNotInCurrentView = undefined;
100
+ this.layerInfos = undefined;
101
+ this.respectLayerVisibility = undefined;
102
+ this.legendStyle = undefined;
103
+ this.position = "bottom-left";
104
+ this.expandable = false;
140
105
  this.view = undefined;
106
+ this.widget = undefined;
141
107
  }
142
- apiKeyWatcher(value) {
143
- this.config.apiKey = value;
108
+ //--------------------------------------------------------------------------
109
+ //
110
+ // Watchers
111
+ //
112
+ //--------------------------------------------------------------------------
113
+ positionWatcher(newValue) {
114
+ if (newValue !== undefined && this.widget) {
115
+ if (typeof this.view !== "string") {
116
+ this.view.ui.move(this.childElem, newValue);
117
+ }
118
+ }
144
119
  }
145
- backgroundColorWatcher(value) {
146
- this.view.background = {
147
- color: value
148
- };
120
+ activeLayerInfosWatcher(newValue) {
121
+ if (newValue !== undefined && this.widget) {
122
+ this.widget.activeLayerInfos = newValue;
123
+ }
149
124
  }
150
- itemIdWatcher(value, old) {
151
- if (value && value !== old) {
152
- this.loadMap();
125
+ basemapLegendVisibleWatcher(newValue) {
126
+ if (newValue !== undefined && this.widget) {
127
+ this.widget.basemapLegendVisible = newValue;
153
128
  }
154
129
  }
155
- scaleWatcher(value, old) {
156
- if (value != null && value !== old) {
157
- this.view.scale = value;
130
+ hideLayersNotInCurrentViewWatcher(newValue) {
131
+ if (newValue !== undefined && this.widget) {
132
+ this.widget.hideLayersNotInCurrentView = newValue;
158
133
  }
159
134
  }
160
- zoomWatcher(value, old) {
161
- if (value != null && value !== old) {
162
- this.view.zoom = value;
135
+ layerInfosWatcher(newValue) {
136
+ if (newValue !== undefined && this.widget) {
137
+ this.widget.layerInfos = newValue;
163
138
  }
164
139
  }
165
- //--------------------------------------------------------------------------
166
- //
167
- // Lifecycle
168
- //
169
- //--------------------------------------------------------------------------
170
- async componentWillLoad() {
171
- this.config = await importConfig();
172
- if (this.apiKey) {
173
- this.config.apiKey = this.apiKey;
140
+ respectLayerVisibilityWatcher(newValue) {
141
+ if (newValue !== undefined && this.widget) {
142
+ this.widget.respectLayerVisibility = newValue;
174
143
  }
175
- this.loadMap();
176
144
  }
177
- componentDidRender() {
178
- if (this.view) {
179
- this.view.container = this.el;
145
+ styleWatcher(newValue) {
146
+ if (newValue !== undefined && this.widget) {
147
+ this.widget.style = newValue;
180
148
  }
181
149
  }
182
- render() {
183
- return h("div", { class: "arcgis-map", ref: (el) => (this.el = el) });
150
+ referenceElementWatcher(newValue) {
151
+ referenceElementHelper(this, newValue);
152
+ }
153
+ viewWatcher(newValue) {
154
+ if (newValue !== undefined && this.widget) {
155
+ this.widget.view = newValue;
156
+ }
184
157
  }
185
158
  //--------------------------------------------------------------------------
186
159
  //
187
- // Private Methods
160
+ // Lifecycle
188
161
  //
189
162
  //--------------------------------------------------------------------------
190
- async loadMap() {
191
- const mapParams = {};
192
- if (this.itemId) {
193
- mapParams.portalItem = this._createPortalItem();
194
- }
195
- if (this.basemap) {
196
- mapParams.basemap = this.basemap;
197
- }
198
- const map = await newWebMap(mapParams);
199
- const params = this._createViewParams();
200
- const view = await newViewsMapView({
201
- map,
202
- ...params
203
- });
204
- this.view = view;
205
- this._addWatchers();
206
- if (this.disableNavigation) {
207
- disableNavigation(this.view);
163
+ async componentDidLoad() {
164
+ const params = this._createParams();
165
+ const widget = await newWidgetsLegend(params);
166
+ this.widget = widget;
167
+ this.widgetReady.emit({ widget: this.widget });
168
+ checkForView(this);
169
+ }
170
+ disconnectedCallback() {
171
+ onDisconnectedHelper(this);
172
+ }
173
+ render() {
174
+ if (this.expandable) {
175
+ return (h("arcgis-expand", { position: this.position, ref: (el) => (this.expandElem = el) }, h("div", { ref: (el) => (this.childElem = el) })));
208
176
  }
209
- this.view.when(() => {
210
- this.viewReady.emit({ view: this.view });
211
- });
177
+ return h("div", { ref: (el) => (this.childElem = el) });
212
178
  }
213
179
  //--------------------------------------------------------------------------
214
180
  //
215
181
  // Private Methods
216
182
  //
217
183
  //--------------------------------------------------------------------------
218
- async _addWatchers() {
219
- const { watch, when } = await importCoreReactiveUtils();
220
- watch(() => this.view.center, (center) => {
221
- const value = `${center.longitude},${center.latitude}`;
222
- this.center = value;
223
- });
224
- when(() => this.view.updating, () => {
225
- when(() => !this.view.updating, () => {
226
- if (this.zoom !== this.view.zoom) {
227
- this.zoom = this.view.zoom;
228
- }
229
- if (this.scale !== this.view.scale) {
230
- this.scale = this.view.scale;
231
- }
232
- }, { once: true });
233
- });
234
- }
235
- _createPortalItem() {
236
- const item = {};
237
- if (this.itemId) {
238
- item.id = this.itemId;
184
+ _createParams() {
185
+ const params = {
186
+ container: this.childElem
187
+ };
188
+ if (this.activeLayerInfos) {
189
+ params.activeLayerInfos = this.activeLayerInfos;
239
190
  }
240
- if (this.portalUrl) {
241
- item.portal = {
242
- url: this.portalUrl
243
- };
191
+ if (this.basemapLegendVisible !== undefined) {
192
+ params.basemapLegendVisible = this.basemapLegendVisible;
244
193
  }
245
- return item;
246
- }
247
- _createViewParams() {
248
- const params = {};
249
- if (this.backgroundColor) {
250
- params.background = {
251
- color: this.backgroundColor
252
- };
194
+ if (this.hideLayersNotInCurrentView !== undefined) {
195
+ params.hideLayersNotInCurrentView = this.hideLayersNotInCurrentView;
253
196
  }
254
- if (this.zoom !== undefined) {
255
- params.zoom = this.zoom;
197
+ if (this.layerInfos) {
198
+ params.layerInfos = this.layerInfos;
256
199
  }
257
- if (this.scale !== undefined) {
258
- params.scale = this.scale;
200
+ if (this.respectLayerVisibility !== undefined) {
201
+ params.respectLayerVisibility = this.respectLayerVisibility;
259
202
  }
260
- if (this.center) {
261
- if (typeof this.center === "string") {
262
- params.center = this.center.split(",").map((x) => Number(x));
263
- }
264
- else {
265
- params.center = this.center;
266
- }
203
+ if (this.legendStyle) {
204
+ params.style = this.legendStyle;
205
+ }
206
+ if (this.view) {
207
+ params.view = this.view;
267
208
  }
268
209
  return params;
269
210
  }
270
- get hostElem() { return getElement(this); }
211
+ get el() { return getElement(this); }
271
212
  static get watchers() { return {
272
- "apiKey": ["apiKeyWatcher"],
273
- "backgroundColor": ["backgroundColorWatcher"],
274
- "itemId": ["itemIdWatcher"],
275
- "scale": ["scaleWatcher"],
276
- "zoom": ["zoomWatcher"]
213
+ "position": ["positionWatcher"],
214
+ "activeLayerInfos": ["activeLayerInfosWatcher"],
215
+ "basemapLegendVisible": ["basemapLegendVisibleWatcher"],
216
+ "hideLayersNotInCurrentView": ["hideLayersNotInCurrentViewWatcher"],
217
+ "layerInfos": ["layerInfosWatcher"],
218
+ "respectLayerVisibility": ["respectLayerVisibilityWatcher"],
219
+ "legendStyle": ["styleWatcher"],
220
+ "referenceElement": ["referenceElementWatcher"],
221
+ "view": ["viewWatcher"]
277
222
  }; }
278
223
  };
279
- ArcgisMap.style = arcgisMapCss;
224
+ ArcgisLegend.style = arcgisLegendCss;
280
225
 
281
- const arcgisSceneCss = ".arcgis-scene{padding:0;margin:0;height:100%;width:100%}";
226
+ const arcgisMapCss = ".arcgis-map{padding:0;margin:0;height:100%;width:100%}";
282
227
 
283
- const ArcgisScene = class {
228
+ const ArcgisMap = class {
284
229
  constructor(hostRef) {
285
230
  registerInstance(this, hostRef);
286
231
  this.viewReady = createEvent(this, "viewReady", 7);
287
232
  this.apiKey = undefined;
288
233
  this.basemap = undefined;
234
+ this.backgroundColor = undefined;
235
+ this.disableNavigation = false;
289
236
  this.itemId = undefined;
290
237
  this.portalUrl = undefined;
291
238
  this.scale = undefined;
292
239
  this.zoom = undefined;
293
240
  this.center = undefined;
294
241
  this.view = undefined;
295
- this.disableNavigation = false;
296
242
  }
297
243
  apiKeyWatcher(value) {
298
244
  this.config.apiKey = value;
299
245
  }
246
+ backgroundColorWatcher(value) {
247
+ this.view.background = {
248
+ color: value
249
+ };
250
+ }
300
251
  itemIdWatcher(value, old) {
301
252
  if (value && value !== old) {
302
253
  this.loadMap();
@@ -330,7 +281,7 @@ const ArcgisScene = class {
330
281
  }
331
282
  }
332
283
  render() {
333
- return h("div", { class: "arcgis-scene", ref: (el) => (this.el = el) });
284
+ return h("div", { class: "arcgis-map", ref: (el) => (this.el = el) });
334
285
  }
335
286
  //--------------------------------------------------------------------------
336
287
  //
@@ -345,9 +296,9 @@ const ArcgisScene = class {
345
296
  if (this.basemap) {
346
297
  mapParams.basemap = this.basemap;
347
298
  }
348
- const map = await newWebScene(mapParams);
299
+ const map = await newWebMap(mapParams);
349
300
  const params = this._createViewParams();
350
- const view = await newViewsSceneView({
301
+ const view = await newViewsMapView({
351
302
  map,
352
303
  ...params
353
304
  });
@@ -360,6 +311,11 @@ const ArcgisScene = class {
360
311
  this.viewReady.emit({ view: this.view });
361
312
  });
362
313
  }
314
+ //--------------------------------------------------------------------------
315
+ //
316
+ // Private Methods
317
+ //
318
+ //--------------------------------------------------------------------------
363
319
  async _addWatchers() {
364
320
  const { watch, when } = await importCoreReactiveUtils();
365
321
  watch(() => this.view.center, (center) => {
@@ -391,6 +347,11 @@ const ArcgisScene = class {
391
347
  }
392
348
  _createViewParams() {
393
349
  const params = {};
350
+ if (this.backgroundColor) {
351
+ params.background = {
352
+ color: this.backgroundColor
353
+ };
354
+ }
394
355
  if (this.zoom !== undefined) {
395
356
  params.zoom = this.zoom;
396
357
  }
@@ -410,12 +371,13 @@ const ArcgisScene = class {
410
371
  get hostElem() { return getElement(this); }
411
372
  static get watchers() { return {
412
373
  "apiKey": ["apiKeyWatcher"],
374
+ "backgroundColor": ["backgroundColorWatcher"],
413
375
  "itemId": ["itemIdWatcher"],
414
376
  "scale": ["scaleWatcher"],
415
377
  "zoom": ["zoomWatcher"]
416
378
  }; }
417
379
  };
418
- ArcgisScene.style = arcgisSceneCss;
380
+ ArcgisMap.style = arcgisMapCss;
419
381
 
420
382
  const arcgisSearchCss = "";
421
383
 
@@ -683,4 +645,4 @@ const ArcgisSearch = class {
683
645
  };
684
646
  ArcgisSearch.style = arcgisSearchCss;
685
647
 
686
- export { ArcgisExpand as arcgis_expand, ArcgisMap as arcgis_map, ArcgisScene as arcgis_scene, ArcgisSearch as arcgis_search };
648
+ export { ArcgisExpand as arcgis_expand, ArcgisLegend as arcgis_legend, ArcgisMap as arcgis_map, ArcgisSearch as arcgis_search };
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, g as getElement } from './index-eb3ead33.js';
2
- import { A as newWidgetsFeatureForm } from './index-334b0bde.js';
2
+ import { z as newWidgetsFeatureForm } from './index-365164b6.js';
3
3
 
4
4
  const arcgisFeatureFormCss = "";
5
5
 
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-eb3ead33.js';
2
- import { B as newLayersFeatureLayer, C as newWidgetsFeatureTable, c as importCoreReactiveUtils } from './index-334b0bde.js';
3
- import { r as referenceElementHelper, c as checkForView } from './component-utils-2ebdae59.js';
4
- import { o as onDisconnectedHelper } from './disconnected-bc5fc8bc.js';
2
+ import { A as newLayersFeatureLayer, B as newWidgetsFeatureTable, d as importCoreReactiveUtils } from './index-365164b6.js';
3
+ import { r as referenceElementHelper, c as checkForView } from './component-utils-7d77f5a9.js';
4
+ import { o as onDisconnectedHelper } from './disconnected-888f5a8f.js';
5
5
 
6
6
  const arcgisFeatureTableCss = ".arcgis-feature-table{width:100%;height:100%}";
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-eb3ead33.js';
2
- import { D as newWidgetsFeatureTemplates } from './index-334b0bde.js';
3
- import { c as checkForView } from './component-utils-2ebdae59.js';
4
- import { o as onDisconnectedHelper } from './disconnected-bc5fc8bc.js';
2
+ import { C as newWidgetsFeatureTemplates } from './index-365164b6.js';
3
+ import { c as checkForView } from './component-utils-7d77f5a9.js';
4
+ import { o as onDisconnectedHelper } from './disconnected-888f5a8f.js';
5
5
 
6
6
  const arcgisFeatureTemplatesCss = "";
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-eb3ead33.js';
2
- import { z as newWidgetsFeature } from './index-334b0bde.js';
3
- import { r as referenceElementHelper, c as checkForView } from './component-utils-2ebdae59.js';
4
- import { o as onDisconnectedHelper } from './disconnected-bc5fc8bc.js';
2
+ import { y as newWidgetsFeature } from './index-365164b6.js';
3
+ import { r as referenceElementHelper, c as checkForView } from './component-utils-7d77f5a9.js';
4
+ import { o as onDisconnectedHelper } from './disconnected-888f5a8f.js';
5
5
 
6
6
  const arcgisFeatureCss = "";
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-eb3ead33.js';
2
- import { E as newWidgetsFeatures, c as importCoreReactiveUtils } from './index-334b0bde.js';
3
- import { r as referenceElementHelper, c as checkForView } from './component-utils-2ebdae59.js';
4
- import { o as onDisconnectedHelper } from './disconnected-bc5fc8bc.js';
2
+ import { D as newWidgetsFeatures, d as importCoreReactiveUtils } from './index-365164b6.js';
3
+ import { r as referenceElementHelper, c as checkForView } from './component-utils-7d77f5a9.js';
4
+ import { o as onDisconnectedHelper } from './disconnected-888f5a8f.js';
5
5
 
6
6
  const arcgisFeaturesCss = "arcgis-features{}";
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-eb3ead33.js';
2
- import { F as newWidgetsFloorFilter } from './index-334b0bde.js';
3
- import { r as referenceElementHelper, c as checkForView } from './component-utils-2ebdae59.js';
4
- import { o as onDisconnectedHelper } from './disconnected-bc5fc8bc.js';
2
+ import { E as newWidgetsFloorFilter } from './index-365164b6.js';
3
+ import { r as referenceElementHelper, c as checkForView } from './component-utils-7d77f5a9.js';
4
+ import { o as onDisconnectedHelper } from './disconnected-888f5a8f.js';
5
5
 
6
6
  const arcgisFloorFilterCss = "";
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-eb3ead33.js';
2
- import { G as newWidgetsFullscreen } from './index-334b0bde.js';
3
- import { r as referenceElementHelper, c as checkForView } from './component-utils-2ebdae59.js';
4
- import { o as onDisconnectedHelper } from './disconnected-bc5fc8bc.js';
2
+ import { F as newWidgetsFullscreen } from './index-365164b6.js';
3
+ import { r as referenceElementHelper, c as checkForView } from './component-utils-7d77f5a9.js';
4
+ import { o as onDisconnectedHelper } from './disconnected-888f5a8f.js';
5
5
 
6
6
  const arcgisFullscreenCss = "";
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-eb3ead33.js';
2
- import { I as newWidgetsHistogramRangeSlider } from './index-334b0bde.js';
3
- import { c as checkForView } from './component-utils-2ebdae59.js';
4
- import { o as onDisconnectedHelper } from './disconnected-bc5fc8bc.js';
2
+ import { H as newWidgetsHistogramRangeSlider } from './index-365164b6.js';
3
+ import { c as checkForView } from './component-utils-7d77f5a9.js';
4
+ import { o as onDisconnectedHelper } from './disconnected-888f5a8f.js';
5
5
 
6
6
  const arcgisHistogramRangeSliderCss = "arcgis-histogram-range-slider{}";
7
7
 
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, g as getElement } from './index-eb3ead33.js';
2
- import { H as newWidgetsHistogram } from './index-334b0bde.js';
2
+ import { G as newWidgetsHistogram } from './index-365164b6.js';
3
3
 
4
4
  const arcgisHistogramCss = "arcgis-histogram{}";
5
5
 
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-eb3ead33.js';
2
- import { J as newWidgetsHome } from './index-334b0bde.js';
3
- import { r as referenceElementHelper, c as checkForView } from './component-utils-2ebdae59.js';
4
- import { o as onDisconnectedHelper } from './disconnected-bc5fc8bc.js';
2
+ import { I as newWidgetsHome } from './index-365164b6.js';
3
+ import { r as referenceElementHelper, c as checkForView } from './component-utils-7d77f5a9.js';
4
+ import { o as onDisconnectedHelper } from './disconnected-888f5a8f.js';
5
5
 
6
6
  const arcgisHomeCss = "arcgis-home{}";
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-eb3ead33.js';
2
- import { K as newWidgetsLayerList, c as importCoreReactiveUtils } from './index-334b0bde.js';
3
- import { r as referenceElementHelper, c as checkForView } from './component-utils-2ebdae59.js';
4
- import { o as onDisconnectedHelper } from './disconnected-bc5fc8bc.js';
2
+ import { J as newWidgetsLayerList, d as importCoreReactiveUtils } from './index-365164b6.js';
3
+ import { r as referenceElementHelper, c as checkForView } from './component-utils-7d77f5a9.js';
4
+ import { o as onDisconnectedHelper } from './disconnected-888f5a8f.js';
5
5
 
6
6
  const arcgisLayerListCss = "";
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-eb3ead33.js';
2
- import { M as newWidgetsLineOfSight, c as importCoreReactiveUtils } from './index-334b0bde.js';
3
- import { r as referenceElementHelper, c as checkForView } from './component-utils-2ebdae59.js';
4
- import { o as onDisconnectedHelper } from './disconnected-bc5fc8bc.js';
2
+ import { K as newWidgetsLineOfSight, d as importCoreReactiveUtils } from './index-365164b6.js';
3
+ import { r as referenceElementHelper, c as checkForView } from './component-utils-7d77f5a9.js';
4
+ import { o as onDisconnectedHelper } from './disconnected-888f5a8f.js';
5
5
 
6
6
  const arcgisLineOfSightCss = "arcgis-line-of-sight{}";
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-eb3ead33.js';
2
- import { N as newWidgetsLocate } from './index-334b0bde.js';
3
- import { r as referenceElementHelper, c as checkForView } from './component-utils-2ebdae59.js';
4
- import { o as onDisconnectedHelper } from './disconnected-bc5fc8bc.js';
2
+ import { L as newWidgetsLocate } from './index-365164b6.js';
3
+ import { r as referenceElementHelper, c as checkForView } from './component-utils-7d77f5a9.js';
4
+ import { o as onDisconnectedHelper } from './disconnected-888f5a8f.js';
5
5
 
6
6
  const arcgisLocateCss = "arcgis-locate{}";
7
7