@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
@@ -4,8 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-6b51d5a0.js');
6
6
  const index$1 = require('./index-bfda1cdc.js');
7
- const componentUtils = require('./component-utils-cbd20e88.js');
8
- const disconnected = require('./disconnected-306cb220.js');
7
+ const componentUtils = require('./component-utils-74d4294a.js');
8
+ const disconnected = require('./disconnected-2309d7ed.js');
9
+ const mappingUtils = require('./mapping-utils-c2c7b994.js');
9
10
 
10
11
  const arcgisExpandCss = "arcgis-expand>.esri-expand__content--expanded{background-color:var(--calcite-ui-background)}";
11
12
 
@@ -73,6 +74,7 @@ const ArcgisExpand = class {
73
74
  }
74
75
  else if (viewRef) {
75
76
  const handler = () => {
77
+ viewRef.removeEventListener("viewReady", handler, false);
76
78
  this.view = viewRef.view;
77
79
  this.view.ui.add(this.childElem, this.position);
78
80
  this.widgetReady.emit({ widget: this.widget });
@@ -89,218 +91,167 @@ const ArcgisExpand = class {
89
91
  };
90
92
  ArcgisExpand.style = arcgisExpandCss;
91
93
 
92
- function disableNavigation(view) {
93
- if (view.type === '2d') {
94
- view.constraints.rotationEnabled = false;
95
- }
96
- view.popup.dockEnabled = true;
97
- // Removes the zoom action on the popup
98
- view.popup.actions.removeAll();
99
- view.popup.viewModel.includeDefaultActions = false;
100
- // stops propagation of default behavior when an event fires
101
- function stopEvtPropagation(event) {
102
- event.stopPropagation();
103
- }
104
- // exlude the zoom widget from the default UI
105
- view.ui.components = ['attribution'];
106
- // disable mouse wheel scroll zooming on the view
107
- view.on('mouse-wheel', stopEvtPropagation);
108
- // disable zooming via double-click on the view
109
- view.on('double-click', stopEvtPropagation);
110
- // disable zooming out via double-click + Control on the view
111
- view.on('double-click', ['Control'], stopEvtPropagation);
112
- // disables pinch-zoom and panning on the view
113
- view.on('drag', stopEvtPropagation);
114
- // disable the view's zoom box to prevent the Shift + drag
115
- // and Shift + Control + drag zoom gestures.
116
- view.on('drag', ['Shift'], stopEvtPropagation);
117
- view.on('drag', ['Shift', 'Control'], stopEvtPropagation);
118
- // prevents zooming with the + and - keys
119
- view.on('key-down', event => {
120
- const prohibitedKeys = ['+', '-', 'Shift', '_', '=', 'ArrowUp', 'ArrowDown', 'ArrowRight', 'ArrowLeft'];
121
- const keyPressed = event.key;
122
- if (prohibitedKeys.indexOf(keyPressed) !== -1) {
123
- event.stopPropagation();
124
- }
125
- });
126
- return view;
127
- }
94
+ const arcgisLegendCss = "";
128
95
 
129
- const arcgisMapCss = ".arcgis-map{padding:0;margin:0;height:100%;width:100%}";
130
-
131
- const ArcgisMap = class {
96
+ const ArcgisLegend = class {
132
97
  constructor(hostRef) {
133
98
  index.registerInstance(this, hostRef);
134
- this.viewReady = index.createEvent(this, "viewReady", 7);
135
- this.apiKey = undefined;
136
- this.basemap = undefined;
137
- this.backgroundColor = undefined;
138
- this.disableNavigation = false;
139
- this.itemId = undefined;
140
- this.portalUrl = undefined;
141
- this.scale = undefined;
142
- this.zoom = undefined;
143
- this.center = undefined;
99
+ this.widgetReady = index.createEvent(this, "widgetReady", 7);
100
+ this.referenceElement = undefined;
101
+ this.activeLayerInfos = undefined;
102
+ this.basemapLegendVisible = undefined;
103
+ this.hideLayersNotInCurrentView = undefined;
104
+ this.layerInfos = undefined;
105
+ this.respectLayerVisibility = undefined;
106
+ this.legendStyle = undefined;
107
+ this.position = "bottom-left";
108
+ this.expandable = false;
144
109
  this.view = undefined;
110
+ this.widget = undefined;
145
111
  }
146
- apiKeyWatcher(value) {
147
- this.config.apiKey = value;
112
+ //--------------------------------------------------------------------------
113
+ //
114
+ // Watchers
115
+ //
116
+ //--------------------------------------------------------------------------
117
+ positionWatcher(newValue) {
118
+ if (newValue !== undefined && this.widget) {
119
+ if (typeof this.view !== "string") {
120
+ this.view.ui.move(this.childElem, newValue);
121
+ }
122
+ }
148
123
  }
149
- backgroundColorWatcher(value) {
150
- this.view.background = {
151
- color: value
152
- };
124
+ activeLayerInfosWatcher(newValue) {
125
+ if (newValue !== undefined && this.widget) {
126
+ this.widget.activeLayerInfos = newValue;
127
+ }
153
128
  }
154
- itemIdWatcher(value, old) {
155
- if (value && value !== old) {
156
- this.loadMap();
129
+ basemapLegendVisibleWatcher(newValue) {
130
+ if (newValue !== undefined && this.widget) {
131
+ this.widget.basemapLegendVisible = newValue;
157
132
  }
158
133
  }
159
- scaleWatcher(value, old) {
160
- if (value != null && value !== old) {
161
- this.view.scale = value;
134
+ hideLayersNotInCurrentViewWatcher(newValue) {
135
+ if (newValue !== undefined && this.widget) {
136
+ this.widget.hideLayersNotInCurrentView = newValue;
162
137
  }
163
138
  }
164
- zoomWatcher(value, old) {
165
- if (value != null && value !== old) {
166
- this.view.zoom = value;
139
+ layerInfosWatcher(newValue) {
140
+ if (newValue !== undefined && this.widget) {
141
+ this.widget.layerInfos = newValue;
167
142
  }
168
143
  }
169
- //--------------------------------------------------------------------------
170
- //
171
- // Lifecycle
172
- //
173
- //--------------------------------------------------------------------------
174
- async componentWillLoad() {
175
- this.config = await index$1.importConfig();
176
- if (this.apiKey) {
177
- this.config.apiKey = this.apiKey;
144
+ respectLayerVisibilityWatcher(newValue) {
145
+ if (newValue !== undefined && this.widget) {
146
+ this.widget.respectLayerVisibility = newValue;
178
147
  }
179
- this.loadMap();
180
148
  }
181
- componentDidRender() {
182
- if (this.view) {
183
- this.view.container = this.el;
149
+ styleWatcher(newValue) {
150
+ if (newValue !== undefined && this.widget) {
151
+ this.widget.style = newValue;
184
152
  }
185
153
  }
186
- render() {
187
- return index.h("div", { class: "arcgis-map", ref: (el) => (this.el = el) });
154
+ referenceElementWatcher(newValue) {
155
+ componentUtils.referenceElementHelper(this, newValue);
156
+ }
157
+ viewWatcher(newValue) {
158
+ if (newValue !== undefined && this.widget) {
159
+ this.widget.view = newValue;
160
+ }
188
161
  }
189
162
  //--------------------------------------------------------------------------
190
163
  //
191
- // Private Methods
164
+ // Lifecycle
192
165
  //
193
166
  //--------------------------------------------------------------------------
194
- async loadMap() {
195
- const mapParams = {};
196
- if (this.itemId) {
197
- mapParams.portalItem = this._createPortalItem();
198
- }
199
- if (this.basemap) {
200
- mapParams.basemap = this.basemap;
201
- }
202
- const map = await index$1.newWebMap(mapParams);
203
- const params = this._createViewParams();
204
- const view = await index$1.newViewsMapView({
205
- map,
206
- ...params
207
- });
208
- this.view = view;
209
- this._addWatchers();
210
- if (this.disableNavigation) {
211
- disableNavigation(this.view);
167
+ async componentDidLoad() {
168
+ const params = this._createParams();
169
+ const widget = await index$1.newWidgetsLegend(params);
170
+ this.widget = widget;
171
+ this.widgetReady.emit({ widget: this.widget });
172
+ componentUtils.checkForView(this);
173
+ }
174
+ disconnectedCallback() {
175
+ disconnected.onDisconnectedHelper(this);
176
+ }
177
+ render() {
178
+ if (this.expandable) {
179
+ return (index.h("arcgis-expand", { position: this.position, ref: (el) => (this.expandElem = el) }, index.h("div", { ref: (el) => (this.childElem = el) })));
212
180
  }
213
- this.view.when(() => {
214
- this.viewReady.emit({ view: this.view });
215
- });
181
+ return index.h("div", { ref: (el) => (this.childElem = el) });
216
182
  }
217
183
  //--------------------------------------------------------------------------
218
184
  //
219
185
  // Private Methods
220
186
  //
221
187
  //--------------------------------------------------------------------------
222
- async _addWatchers() {
223
- const { watch, when } = await index$1.importCoreReactiveUtils();
224
- watch(() => this.view.center, (center) => {
225
- const value = `${center.longitude},${center.latitude}`;
226
- this.center = value;
227
- });
228
- when(() => this.view.updating, () => {
229
- when(() => !this.view.updating, () => {
230
- if (this.zoom !== this.view.zoom) {
231
- this.zoom = this.view.zoom;
232
- }
233
- if (this.scale !== this.view.scale) {
234
- this.scale = this.view.scale;
235
- }
236
- }, { once: true });
237
- });
238
- }
239
- _createPortalItem() {
240
- const item = {};
241
- if (this.itemId) {
242
- item.id = this.itemId;
188
+ _createParams() {
189
+ const params = {
190
+ container: this.childElem
191
+ };
192
+ if (this.activeLayerInfos) {
193
+ params.activeLayerInfos = this.activeLayerInfos;
243
194
  }
244
- if (this.portalUrl) {
245
- item.portal = {
246
- url: this.portalUrl
247
- };
195
+ if (this.basemapLegendVisible !== undefined) {
196
+ params.basemapLegendVisible = this.basemapLegendVisible;
248
197
  }
249
- return item;
250
- }
251
- _createViewParams() {
252
- const params = {};
253
- if (this.backgroundColor) {
254
- params.background = {
255
- color: this.backgroundColor
256
- };
198
+ if (this.hideLayersNotInCurrentView !== undefined) {
199
+ params.hideLayersNotInCurrentView = this.hideLayersNotInCurrentView;
257
200
  }
258
- if (this.zoom !== undefined) {
259
- params.zoom = this.zoom;
201
+ if (this.layerInfos) {
202
+ params.layerInfos = this.layerInfos;
260
203
  }
261
- if (this.scale !== undefined) {
262
- params.scale = this.scale;
204
+ if (this.respectLayerVisibility !== undefined) {
205
+ params.respectLayerVisibility = this.respectLayerVisibility;
263
206
  }
264
- if (this.center) {
265
- if (typeof this.center === "string") {
266
- params.center = this.center.split(",").map((x) => Number(x));
267
- }
268
- else {
269
- params.center = this.center;
270
- }
207
+ if (this.legendStyle) {
208
+ params.style = this.legendStyle;
209
+ }
210
+ if (this.view) {
211
+ params.view = this.view;
271
212
  }
272
213
  return params;
273
214
  }
274
- get hostElem() { return index.getElement(this); }
215
+ get el() { return index.getElement(this); }
275
216
  static get watchers() { return {
276
- "apiKey": ["apiKeyWatcher"],
277
- "backgroundColor": ["backgroundColorWatcher"],
278
- "itemId": ["itemIdWatcher"],
279
- "scale": ["scaleWatcher"],
280
- "zoom": ["zoomWatcher"]
217
+ "position": ["positionWatcher"],
218
+ "activeLayerInfos": ["activeLayerInfosWatcher"],
219
+ "basemapLegendVisible": ["basemapLegendVisibleWatcher"],
220
+ "hideLayersNotInCurrentView": ["hideLayersNotInCurrentViewWatcher"],
221
+ "layerInfos": ["layerInfosWatcher"],
222
+ "respectLayerVisibility": ["respectLayerVisibilityWatcher"],
223
+ "legendStyle": ["styleWatcher"],
224
+ "referenceElement": ["referenceElementWatcher"],
225
+ "view": ["viewWatcher"]
281
226
  }; }
282
227
  };
283
- ArcgisMap.style = arcgisMapCss;
228
+ ArcgisLegend.style = arcgisLegendCss;
284
229
 
285
- const arcgisSceneCss = ".arcgis-scene{padding:0;margin:0;height:100%;width:100%}";
230
+ const arcgisMapCss = ".arcgis-map{padding:0;margin:0;height:100%;width:100%}";
286
231
 
287
- const ArcgisScene = class {
232
+ const ArcgisMap = class {
288
233
  constructor(hostRef) {
289
234
  index.registerInstance(this, hostRef);
290
235
  this.viewReady = index.createEvent(this, "viewReady", 7);
291
236
  this.apiKey = undefined;
292
237
  this.basemap = undefined;
238
+ this.backgroundColor = undefined;
239
+ this.disableNavigation = false;
293
240
  this.itemId = undefined;
294
241
  this.portalUrl = undefined;
295
242
  this.scale = undefined;
296
243
  this.zoom = undefined;
297
244
  this.center = undefined;
298
245
  this.view = undefined;
299
- this.disableNavigation = false;
300
246
  }
301
247
  apiKeyWatcher(value) {
302
248
  this.config.apiKey = value;
303
249
  }
250
+ backgroundColorWatcher(value) {
251
+ this.view.background = {
252
+ color: value
253
+ };
254
+ }
304
255
  itemIdWatcher(value, old) {
305
256
  if (value && value !== old) {
306
257
  this.loadMap();
@@ -334,7 +285,7 @@ const ArcgisScene = class {
334
285
  }
335
286
  }
336
287
  render() {
337
- return index.h("div", { class: "arcgis-scene", ref: (el) => (this.el = el) });
288
+ return index.h("div", { class: "arcgis-map", ref: (el) => (this.el = el) });
338
289
  }
339
290
  //--------------------------------------------------------------------------
340
291
  //
@@ -349,21 +300,26 @@ const ArcgisScene = class {
349
300
  if (this.basemap) {
350
301
  mapParams.basemap = this.basemap;
351
302
  }
352
- const map = await index$1.newWebScene(mapParams);
303
+ const map = await index$1.newWebMap(mapParams);
353
304
  const params = this._createViewParams();
354
- const view = await index$1.newViewsSceneView({
305
+ const view = await index$1.newViewsMapView({
355
306
  map,
356
307
  ...params
357
308
  });
358
309
  this.view = view;
359
310
  this._addWatchers();
360
311
  if (this.disableNavigation) {
361
- disableNavigation(this.view);
312
+ mappingUtils.disableNavigation(this.view);
362
313
  }
363
314
  this.view.when(() => {
364
315
  this.viewReady.emit({ view: this.view });
365
316
  });
366
317
  }
318
+ //--------------------------------------------------------------------------
319
+ //
320
+ // Private Methods
321
+ //
322
+ //--------------------------------------------------------------------------
367
323
  async _addWatchers() {
368
324
  const { watch, when } = await index$1.importCoreReactiveUtils();
369
325
  watch(() => this.view.center, (center) => {
@@ -395,6 +351,11 @@ const ArcgisScene = class {
395
351
  }
396
352
  _createViewParams() {
397
353
  const params = {};
354
+ if (this.backgroundColor) {
355
+ params.background = {
356
+ color: this.backgroundColor
357
+ };
358
+ }
398
359
  if (this.zoom !== undefined) {
399
360
  params.zoom = this.zoom;
400
361
  }
@@ -414,12 +375,13 @@ const ArcgisScene = class {
414
375
  get hostElem() { return index.getElement(this); }
415
376
  static get watchers() { return {
416
377
  "apiKey": ["apiKeyWatcher"],
378
+ "backgroundColor": ["backgroundColorWatcher"],
417
379
  "itemId": ["itemIdWatcher"],
418
380
  "scale": ["scaleWatcher"],
419
381
  "zoom": ["zoomWatcher"]
420
382
  }; }
421
383
  };
422
- ArcgisScene.style = arcgisSceneCss;
384
+ ArcgisMap.style = arcgisMapCss;
423
385
 
424
386
  const arcgisSearchCss = "";
425
387
 
@@ -688,6 +650,6 @@ const ArcgisSearch = class {
688
650
  ArcgisSearch.style = arcgisSearchCss;
689
651
 
690
652
  exports.arcgis_expand = ArcgisExpand;
653
+ exports.arcgis_legend = ArcgisLegend;
691
654
  exports.arcgis_map = ArcgisMap;
692
- exports.arcgis_scene = ArcgisScene;
693
655
  exports.arcgis_search = ArcgisSearch;
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-6b51d5a0.js');
6
6
  const index$1 = require('./index-bfda1cdc.js');
7
- const componentUtils = require('./component-utils-cbd20e88.js');
8
- const disconnected = require('./disconnected-306cb220.js');
7
+ const componentUtils = require('./component-utils-74d4294a.js');
8
+ const disconnected = require('./disconnected-2309d7ed.js');
9
9
 
10
10
  const arcgisFeatureTableCss = ".arcgis-feature-table{width:100%;height:100%}";
11
11
 
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-6b51d5a0.js');
6
6
  const index$1 = require('./index-bfda1cdc.js');
7
- const componentUtils = require('./component-utils-cbd20e88.js');
8
- const disconnected = require('./disconnected-306cb220.js');
7
+ const componentUtils = require('./component-utils-74d4294a.js');
8
+ const disconnected = require('./disconnected-2309d7ed.js');
9
9
 
10
10
  const arcgisFeatureTemplatesCss = "";
11
11
 
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-6b51d5a0.js');
6
6
  const index$1 = require('./index-bfda1cdc.js');
7
- const componentUtils = require('./component-utils-cbd20e88.js');
8
- const disconnected = require('./disconnected-306cb220.js');
7
+ const componentUtils = require('./component-utils-74d4294a.js');
8
+ const disconnected = require('./disconnected-2309d7ed.js');
9
9
 
10
10
  const arcgisFeatureCss = "";
11
11
 
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-6b51d5a0.js');
6
6
  const index$1 = require('./index-bfda1cdc.js');
7
- const componentUtils = require('./component-utils-cbd20e88.js');
8
- const disconnected = require('./disconnected-306cb220.js');
7
+ const componentUtils = require('./component-utils-74d4294a.js');
8
+ const disconnected = require('./disconnected-2309d7ed.js');
9
9
 
10
10
  const arcgisFeaturesCss = "arcgis-features{}";
11
11
 
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-6b51d5a0.js');
6
6
  const index$1 = require('./index-bfda1cdc.js');
7
- const componentUtils = require('./component-utils-cbd20e88.js');
8
- const disconnected = require('./disconnected-306cb220.js');
7
+ const componentUtils = require('./component-utils-74d4294a.js');
8
+ const disconnected = require('./disconnected-2309d7ed.js');
9
9
 
10
10
  const arcgisFloorFilterCss = "";
11
11
 
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-6b51d5a0.js');
6
6
  const index$1 = require('./index-bfda1cdc.js');
7
- const componentUtils = require('./component-utils-cbd20e88.js');
8
- const disconnected = require('./disconnected-306cb220.js');
7
+ const componentUtils = require('./component-utils-74d4294a.js');
8
+ const disconnected = require('./disconnected-2309d7ed.js');
9
9
 
10
10
  const arcgisFullscreenCss = "";
11
11
 
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-6b51d5a0.js');
6
6
  const index$1 = require('./index-bfda1cdc.js');
7
- const componentUtils = require('./component-utils-cbd20e88.js');
8
- const disconnected = require('./disconnected-306cb220.js');
7
+ const componentUtils = require('./component-utils-74d4294a.js');
8
+ const disconnected = require('./disconnected-2309d7ed.js');
9
9
 
10
10
  const arcgisHistogramRangeSliderCss = "arcgis-histogram-range-slider{}";
11
11
 
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-6b51d5a0.js');
6
6
  const index$1 = require('./index-bfda1cdc.js');
7
- const componentUtils = require('./component-utils-cbd20e88.js');
8
- const disconnected = require('./disconnected-306cb220.js');
7
+ const componentUtils = require('./component-utils-74d4294a.js');
8
+ const disconnected = require('./disconnected-2309d7ed.js');
9
9
 
10
10
  const arcgisHomeCss = "arcgis-home{}";
11
11
 
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-6b51d5a0.js');
6
6
  const index$1 = require('./index-bfda1cdc.js');
7
- const componentUtils = require('./component-utils-cbd20e88.js');
8
- const disconnected = require('./disconnected-306cb220.js');
7
+ const componentUtils = require('./component-utils-74d4294a.js');
8
+ const disconnected = require('./disconnected-2309d7ed.js');
9
9
 
10
10
  const arcgisLayerListCss = "";
11
11
 
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-6b51d5a0.js');
6
6
  const index$1 = require('./index-bfda1cdc.js');
7
- const componentUtils = require('./component-utils-cbd20e88.js');
8
- const disconnected = require('./disconnected-306cb220.js');
7
+ const componentUtils = require('./component-utils-74d4294a.js');
8
+ const disconnected = require('./disconnected-2309d7ed.js');
9
9
 
10
10
  const arcgisLineOfSightCss = "arcgis-line-of-sight{}";
11
11
 
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-6b51d5a0.js');
6
6
  const index$1 = require('./index-bfda1cdc.js');
7
- const componentUtils = require('./component-utils-cbd20e88.js');
8
- const disconnected = require('./disconnected-306cb220.js');
7
+ const componentUtils = require('./component-utils-74d4294a.js');
8
+ const disconnected = require('./disconnected-2309d7ed.js');
9
9
 
10
10
  const arcgisLocateCss = "arcgis-locate{}";
11
11