@esri/solutions-components 0.10.7 → 0.10.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. package/dist/cjs/basemap-gallery_7.cjs.entry.js +24 -8
  2. package/dist/cjs/buffer-tools_3.cjs.entry.js +1 -1
  3. package/dist/cjs/calcite-combobox_3.cjs.entry.js +354 -967
  4. package/dist/cjs/calcite-graph_2.cjs.entry.js +1082 -0
  5. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +6 -6
  6. package/dist/cjs/calcite-tree_3.cjs.entry.js +1 -1
  7. package/dist/cjs/card-manager_3.cjs.entry.js +246 -18
  8. package/dist/cjs/crowdsource-manager.cjs.entry.js +171 -50
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/map-select-tools_3.cjs.entry.js +3 -3
  11. package/dist/cjs/pci-calculator.cjs.entry.js +1 -1
  12. package/dist/cjs/public-notification.cjs.entry.js +1 -1
  13. package/dist/cjs/refine-results-flow-item.cjs.entry.js +1 -1
  14. package/dist/cjs/share-item.cjs.entry.js +1 -1
  15. package/dist/cjs/solution-configuration.cjs.entry.js +3 -3
  16. package/dist/cjs/solution-contents_3.cjs.entry.js +3 -3
  17. package/dist/cjs/solutions-components.cjs.js +1 -1
  18. package/dist/cjs/spatial-ref.cjs.entry.js +1 -1
  19. package/dist/collection/assets/t9n/crowdsource-manager/resources.json +5 -1
  20. package/dist/collection/assets/t9n/crowdsource-manager/resources_en.json +5 -1
  21. package/dist/collection/assets/t9n/layer-table/resources.json +1 -0
  22. package/dist/collection/assets/t9n/layer-table/resources_en.json +1 -0
  23. package/dist/collection/assets/t9n/map-card/resources.json +6 -1
  24. package/dist/collection/assets/t9n/map-card/resources_en.json +6 -1
  25. package/dist/collection/components/card-manager/card-manager.js +34 -8
  26. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +176 -84
  27. package/dist/collection/components/layer-table/layer-table.js +175 -8
  28. package/dist/collection/components/map-card/map-card.css +4 -0
  29. package/dist/collection/components/map-card/map-card.js +368 -3
  30. package/dist/collection/components/map-draw-tools/map-draw-tools.js +1 -1
  31. package/dist/collection/components/map-fullscreen/map-fullscreen.js +1 -1
  32. package/dist/collection/components/map-layer-picker/map-layer-picker.js +9 -3
  33. package/dist/collection/components/map-legend/map-legend.js +1 -1
  34. package/dist/collection/components/map-picker/map-picker.css +8 -0
  35. package/dist/collection/components/map-picker/map-picker.js +74 -3
  36. package/dist/collection/components/map-search/map-search.js +1 -1
  37. package/dist/collection/components/map-select-tools/map-select-tools.js +1 -1
  38. package/dist/collection/components/map-tools/map-tools.js +1 -1
  39. package/dist/collection/components/pci-calculator/pci-calculator.js +1 -1
  40. package/dist/collection/components/pdf-download/pdf-download.js +1 -1
  41. package/dist/collection/components/public-notification/public-notification.js +1 -1
  42. package/dist/collection/components/refine-results-flow-item/refine-results-flow-item.js +1 -1
  43. package/dist/collection/components/refine-selection/refine-selection.js +1 -1
  44. package/dist/collection/components/share-item/share-item.js +1 -1
  45. package/dist/collection/components/solution-configuration/solution-configuration.js +3 -3
  46. package/dist/collection/components/solution-contents/solution-contents.js +1 -1
  47. package/dist/collection/components/solution-item/solution-item.js +1 -1
  48. package/dist/collection/components/solution-item-details/solution-item-details.js +1 -1
  49. package/dist/collection/components/solution-item-icon/solution-item-icon.js +1 -1
  50. package/dist/collection/components/solution-item-sharing/solution-item-sharing.js +1 -1
  51. package/dist/collection/components/solution-organization-variables/solution-organization-variables.js +1 -1
  52. package/dist/collection/components/solution-resource-item/solution-resource-item.js +1 -1
  53. package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +1 -1
  54. package/dist/collection/components/solution-template-data/solution-template-data.js +1 -1
  55. package/dist/collection/components/solution-variables/solution-variables.js +1 -1
  56. package/dist/collection/components/spatial-ref/spatial-ref.js +1 -1
  57. package/dist/collection/demos/crowdsource-manager.html +1 -0
  58. package/dist/components/card-manager2.js +20 -8
  59. package/dist/components/crowdsource-manager.js +175 -55
  60. package/dist/components/layer-table2.js +72 -10
  61. package/dist/components/map-card2.js +288 -47
  62. package/dist/components/map-draw-tools2.js +1 -1
  63. package/dist/components/map-fullscreen2.js +1 -1
  64. package/dist/components/map-layer-picker2.js +9 -3
  65. package/dist/components/map-legend2.js +1 -1
  66. package/dist/components/map-picker2.js +24 -5
  67. package/dist/components/map-search2.js +1 -1
  68. package/dist/components/map-select-tools2.js +1 -1
  69. package/dist/components/map-tools2.js +1 -1
  70. package/dist/components/pci-calculator.js +1 -1
  71. package/dist/components/pdf-download2.js +1 -1
  72. package/dist/components/public-notification.js +1 -1
  73. package/dist/components/refine-results-flow-item.js +1 -1
  74. package/dist/components/refine-selection2.js +1 -1
  75. package/dist/components/share-item.js +1 -1
  76. package/dist/components/solution-configuration.js +3 -3
  77. package/dist/components/solution-contents2.js +1 -1
  78. package/dist/components/solution-item-details2.js +1 -1
  79. package/dist/components/solution-item-icon2.js +1 -1
  80. package/dist/components/solution-item-sharing2.js +1 -1
  81. package/dist/components/solution-item2.js +1 -1
  82. package/dist/components/solution-organization-variables2.js +1 -1
  83. package/dist/components/solution-resource-item2.js +1 -1
  84. package/dist/components/solution-spatial-ref2.js +1 -1
  85. package/dist/components/solution-template-data2.js +1 -1
  86. package/dist/components/solution-variables2.js +1 -1
  87. package/dist/components/spatial-ref.js +1 -1
  88. package/dist/esm/basemap-gallery_7.entry.js +24 -8
  89. package/dist/esm/buffer-tools_3.entry.js +1 -1
  90. package/dist/esm/calcite-combobox_3.entry.js +369 -982
  91. package/dist/esm/calcite-graph_2.entry.js +1077 -0
  92. package/dist/esm/calcite-shell-panel_14.entry.js +6 -6
  93. package/dist/esm/calcite-tree_3.entry.js +1 -1
  94. package/dist/esm/card-manager_3.entry.js +248 -20
  95. package/dist/esm/crowdsource-manager.entry.js +172 -51
  96. package/dist/esm/loader.js +1 -1
  97. package/dist/esm/map-select-tools_3.entry.js +3 -3
  98. package/dist/esm/pci-calculator.entry.js +1 -1
  99. package/dist/esm/public-notification.entry.js +1 -1
  100. package/dist/esm/refine-results-flow-item.entry.js +1 -1
  101. package/dist/esm/share-item.entry.js +1 -1
  102. package/dist/esm/solution-configuration.entry.js +3 -3
  103. package/dist/esm/solution-contents_3.entry.js +3 -3
  104. package/dist/esm/solutions-components.js +1 -1
  105. package/dist/esm/spatial-ref.entry.js +1 -1
  106. package/dist/solutions-components/assets/t9n/crowdsource-manager/resources.json +5 -1
  107. package/dist/solutions-components/assets/t9n/crowdsource-manager/resources_en.json +5 -1
  108. package/dist/solutions-components/assets/t9n/layer-table/resources.json +1 -0
  109. package/dist/solutions-components/assets/t9n/layer-table/resources_en.json +1 -0
  110. package/dist/solutions-components/assets/t9n/map-card/resources.json +6 -1
  111. package/dist/solutions-components/assets/t9n/map-card/resources_en.json +6 -1
  112. package/dist/solutions-components/demos/crowdsource-manager.html +1 -0
  113. package/dist/solutions-components/p-0abc1354.entry.js +6 -0
  114. package/dist/solutions-components/p-0f7b5d36.entry.js +6 -0
  115. package/dist/solutions-components/{p-a9818be2.entry.js → p-20c465e9.entry.js} +1 -1
  116. package/dist/solutions-components/{p-db18bce8.entry.js → p-36b50b5b.entry.js} +1 -1
  117. package/dist/solutions-components/{p-85512ae3.entry.js → p-445213cf.entry.js} +1 -1
  118. package/dist/solutions-components/{p-d49f895d.entry.js → p-4a5f0a97.entry.js} +1 -1
  119. package/dist/solutions-components/{p-002c97df.entry.js → p-5d201016.entry.js} +1 -1
  120. package/dist/solutions-components/{p-b7cec3bd.entry.js → p-618bafec.entry.js} +1 -1
  121. package/dist/solutions-components/p-6a66d5a9.entry.js +6 -0
  122. package/dist/solutions-components/p-71a2d5b8.entry.js +6 -0
  123. package/dist/solutions-components/p-7a64b026.entry.js +17 -0
  124. package/dist/solutions-components/p-7d514d7f.entry.js +6 -0
  125. package/dist/solutions-components/p-85c25564.entry.js +6 -0
  126. package/dist/solutions-components/{p-235bf02e.entry.js → p-913413c3.entry.js} +1 -1
  127. package/dist/solutions-components/{p-49aa2929.entry.js → p-bebd4646.entry.js} +1 -1
  128. package/dist/solutions-components/p-ce454f5a.entry.js +11 -0
  129. package/dist/solutions-components/solutions-components.esm.js +1 -1
  130. package/dist/types/components/card-manager/card-manager.d.ts +11 -0
  131. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +88 -22
  132. package/dist/types/components/layer-table/layer-table.d.ts +30 -0
  133. package/dist/types/components/map-card/map-card.d.ts +124 -0
  134. package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +4 -0
  135. package/dist/types/components/map-picker/map-picker.d.ts +12 -0
  136. package/dist/types/components.d.ts +130 -8
  137. package/dist/types/preact.d.ts +4 -2
  138. package/package.json +5 -5
  139. package/dist/cjs/calcite-dropdown-group_2.cjs.entry.js +0 -453
  140. package/dist/esm/calcite-dropdown-group_2.entry.js +0 -448
  141. package/dist/solutions-components/p-129fd80e.entry.js +0 -6
  142. package/dist/solutions-components/p-3b426576.entry.js +0 -6
  143. package/dist/solutions-components/p-72b217f2.entry.js +0 -6
  144. package/dist/solutions-components/p-8b999a2b.entry.js +0 -6
  145. package/dist/solutions-components/p-973ff7b2.entry.js +0 -23
  146. package/dist/solutions-components/p-a001f9c9.entry.js +0 -6
  147. package/dist/solutions-components/p-c683b3fe.entry.js +0 -6
  148. package/dist/solutions-components/p-e9d049bd.entry.js +0 -6
@@ -18,9 +18,11 @@
18
18
  * See the License for the specific language governing permissions and
19
19
  * limitations under the License.
20
20
  */
21
- import { Host, h } from "@stencil/core";
21
+ import { Host, h, Fragment } from "@stencil/core";
22
22
  import { loadModules } from "../../utils/loadModules";
23
23
  import { joinAppProxies } from "templates-common-library-esm/functionality/proxy";
24
+ import { getLocaleComponentStrings } from "../../utils/locale";
25
+ import { getFeatureLayerView, goToSelection } from "../../utils/mapViewUtils";
24
26
  // TODO navigation and accessability isn't right for the map list
25
27
  // tab does not go into the list when it's open
26
28
  // focus is not set when it opens
@@ -31,6 +33,7 @@ export class MapCard {
31
33
  constructor() {
32
34
  this.appProxies = undefined;
33
35
  this.defaultWebmapId = "";
36
+ this.defaultLayerId = undefined;
34
37
  this.enableHome = undefined;
35
38
  this.enableLegend = undefined;
36
39
  this.enableFloorFilter = undefined;
@@ -51,8 +54,17 @@ export class MapCard {
51
54
  this.stackTools = true;
52
55
  this.theme = undefined;
53
56
  this.toolOrder = undefined;
57
+ this.isMapLayout = undefined;
58
+ this.selectedFeaturesIds = undefined;
59
+ this.selectedLayer = undefined;
60
+ this.zoomToScale = undefined;
61
+ this.onlyShowUpdatableLayers = undefined;
62
+ this.isMobile = undefined;
63
+ this.mapInfo = undefined;
64
+ this._translations = undefined;
54
65
  this._searchConfiguration = undefined;
55
66
  this._webMapInfo = undefined;
67
+ this._showHideOpen = false;
56
68
  }
57
69
  //--------------------------------------------------------------------------
58
70
  //
@@ -105,6 +117,22 @@ export class MapCard {
105
117
  * HTMLMapToolsElement: the container div for the map tools
106
118
  */
107
119
  _mapTools;
120
+ /**
121
+ * HTMLCalciteDropdownElement: Dropdown the will support overflow tools that won't fit in the current display
122
+ */
123
+ _moreDropdown;
124
+ /**
125
+ * boolean: When true the show/hide fields list is forced open
126
+ */
127
+ _mapListExpanded = false;
128
+ /**
129
+ * boolean: When true an indicator will be shown on the action
130
+ */
131
+ _filterActive = false;
132
+ /**
133
+ * string: The current layers definition expression
134
+ */
135
+ _definitionExpression;
108
136
  //--------------------------------------------------------------------------
109
137
  //
110
138
  // Watch handlers
@@ -116,11 +144,31 @@ export class MapCard {
116
144
  enableHomeWatchHandler() {
117
145
  this._initHome();
118
146
  }
147
+ /**
148
+ * watch for changes in layer view and verify if it has editing enabled
149
+ */
150
+ async selectedLayerWatchHandler() {
151
+ await this.selectedLayer?.when(async () => {
152
+ this._definitionExpression = this.selectedLayer.definitionExpression;
153
+ });
154
+ }
119
155
  //--------------------------------------------------------------------------
120
156
  //
121
157
  // Methods (public)
122
158
  //
123
159
  //--------------------------------------------------------------------------
160
+ /**
161
+ * Reset the filter
162
+ */
163
+ async filterReset() {
164
+ this._filterActive = false;
165
+ }
166
+ /**
167
+ * updates the filter
168
+ */
169
+ async updateFilter() {
170
+ this._filterActive = this._definitionExpression !== this.selectedLayer.definitionExpression;
171
+ }
124
172
  //--------------------------------------------------------------------------
125
173
  //
126
174
  // Events (public)
@@ -134,12 +182,23 @@ export class MapCard {
134
182
  * Emitted before a new map is loaded
135
183
  */
136
184
  beforeMapChanged;
185
+ /**
186
+ * Emitted on demand when filter action is clicked
187
+ */
188
+ toggleFilter;
137
189
  /**
138
190
  * Listen for changes to map info and load the appropriate map
139
191
  */
140
192
  async mapInfoChange(evt) {
141
193
  await this._loadMap(evt.detail);
142
194
  }
195
+ /**
196
+ * Listen for change when mapview doesn't contain any layer
197
+ */
198
+ noLayersFound() {
199
+ this.selectedLayer = undefined;
200
+ this.selectedFeaturesIds = [];
201
+ }
143
202
  //--------------------------------------------------------------------------
144
203
  //
145
204
  // Functions (lifecycle)
@@ -149,17 +208,28 @@ export class MapCard {
149
208
  * StencilJS: Called once just after the component is first connected to the DOM.
150
209
  */
151
210
  async componentWillLoad() {
211
+ await this._getTranslations();
152
212
  await this._initModules();
153
213
  }
154
214
  /**
155
215
  * Renders the component.
156
216
  */
157
217
  render() {
218
+ const mapContainerClass = this.isMapLayout ? "display-flex height-50-px" : "";
158
219
  const mapClass = this.hidden ? "visibility-hidden-1" : "";
159
220
  const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
160
221
  const mapPickerClass = this.mapInfos?.length > 1 ? "" : "display-none";
161
222
  const mapHeightClass = this.mapInfos?.length > 1 ? "map-height" : "height-full";
162
- return (h(Host, { key: '4f5c0cd408f92856ceb2ba281a02856064ef6a5a' }, h("map-picker", { key: 'f69742384dc5ba13bbf257592cc8c35de77590f0', class: mapPickerClass, mapInfos: this.mapInfos, ref: (el) => this._mapPicker = el }), h("div", { key: '3ddddf3f674d49ae59fe627af1c67ec59718c9a3', class: `${mapHeightClass} ${mapClass}`, ref: (el) => (this._mapDiv = el) }), h("map-tools", { key: '6cb9518e74af0594ab6b657f0caec3598c250cb2', basemapConfig: this.basemapConfig, class: `box-shadow ${themeClass}`, enableBasemap: this.enableBasemap, enableFloorFilter: this.enableFloorFilter, enableFullscreen: this.enableFullscreen, enableHome: this.enableHome, enableLegend: this.enableLegend, enableSearch: this.enableSearch, enableSingleExpand: this.enableSingleExpand, homeZoomToolsSize: this.homeZoomToolsSize, mapView: this.mapView, mapWidgetsSize: this.mapWidgetsSize, position: this.mapWidgetsPosition, ref: (el) => this._mapTools = el, searchConfiguration: this._searchConfiguration, stackTools: this.stackTools, toolOrder: this.toolOrder })));
223
+ const containerClass = this.isMobile ? "width-full" : "";
224
+ const mobileClass = this.isMobile ? "border-top" : "";
225
+ const headerElements = this.isMapLayout ? "" : "display-none";
226
+ return (h(Host, { key: '7029e518173a8c1e6e00049b8e68e23bed23d9cb' }, h("div", { key: '2b8d9197dcb68529562728fddeb53d0a7e9cbb86', class: `${mapContainerClass}` }, h("map-picker", { key: '2e50b7c70832f4151fafd06e860846a5efa8f6f1', class: mapPickerClass, isMapLayout: this.isMapLayout, mapInfos: this.mapInfos, ref: (el) => this._mapPicker = el }), h("div", { key: 'bc01ef7fb34400e3ff58151cab6abbabd9fa8a6f', class: `mapView-header display-flex ${headerElements}` }, h("div", { key: '1f1bf6ffb92fbc182be8333b4ae3d70271ea2f1b', class: `border-end ${containerClass} ${mobileClass}`, id: "solutions-map-layer-picker-container" }, this.mapView && h("map-layer-picker", { key: '47320f3794f060262c4ed29ec1400a50d9744a97', appearance: "transparent", defaultLayerId: this.defaultLayerId, display: "inline-flex", height: 50, isMobile: this.isMobile, mapView: this.mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, placeholderIcon: "layers", scale: "l", selectedIds: this.selectedLayer ? [this.selectedLayer.id] : [], showSingleLayerAsLabel: true, showTables: true, type: "dropdown" })), this._getDropDownItem())), h("div", { key: '7101bfed6c0e0932275b0d28eea0ea5e1603aa8e', class: `${mapHeightClass} ${mapClass}`, ref: (el) => (this._mapDiv = el) }), h("map-tools", { key: '8ca28e50a77a25699cd6c17fe4f31788ca1cb49d', basemapConfig: this.basemapConfig, class: `box-shadow ${themeClass}`, enableBasemap: this.enableBasemap, enableFloorFilter: this.enableFloorFilter, enableFullscreen: this.enableFullscreen, enableHome: this.enableHome, enableLegend: this.enableLegend, enableSearch: this.enableSearch, enableSingleExpand: this.enableSingleExpand, homeZoomToolsSize: this.homeZoomToolsSize, mapView: this.mapView, mapWidgetsSize: this.mapWidgetsSize, position: this.mapWidgetsPosition, ref: (el) => this._mapTools = el, searchConfiguration: this._searchConfiguration, stackTools: this.stackTools, toolOrder: this.toolOrder })));
227
+ }
228
+ /**
229
+ * Called each time after the component is loaded
230
+ */
231
+ async componentDidRender() {
232
+ document.onclick = (e) => this._handleDocumentClick(e);
163
233
  }
164
234
  //--------------------------------------------------------------------------
165
235
  //
@@ -258,6 +328,96 @@ export class MapCard {
258
328
  this.mapView.ui.remove(this._homeWidget);
259
329
  }
260
330
  }
331
+ /**
332
+ * Toggle show/hide dropdown
333
+ */
334
+ _toggleShowHide() {
335
+ this._showHideOpen = !this._showHideOpen;
336
+ }
337
+ /**
338
+ * Open show/hide dropdown
339
+ */
340
+ _forceShowHide() {
341
+ if (this._moreDropdown) {
342
+ this._moreDropdown.open = this._showHideOpen;
343
+ }
344
+ }
345
+ /**
346
+ * Close show/hide dropdown when the user clicks outside of it
347
+ */
348
+ _handleDocumentClick(e) {
349
+ const id = e.target?.id;
350
+ if (this._showHideOpen && id !== "solutions-subset-list" && id !== "solutions-more" && id !== "chevron-down") {
351
+ if (this._moreDropdown) {
352
+ this._showHideOpen = false;
353
+ this._moreDropdown.open = false;
354
+ }
355
+ }
356
+ // if clicked on map picker then toggle the dropdown
357
+ if (e.target.tagName === 'MAP-PICKER') {
358
+ this._mapListExpanded = !this._mapListExpanded;
359
+ void this._mapPicker.toggle(this._mapListExpanded);
360
+ }
361
+ // if clicked on other place then just close the dropdown
362
+ if (e.target.tagName !== 'MAP-PICKER') {
363
+ this._mapListExpanded = false;
364
+ void this._mapPicker.close();
365
+ }
366
+ }
367
+ /**
368
+ * Zoom to all selected features
369
+ *
370
+ * @returns a promise that will resolve when the operation is complete
371
+ */
372
+ async _zoom() {
373
+ if (this.selectedLayer) {
374
+ const selectedLayerView = await getFeatureLayerView(this.mapView, this.selectedLayer.id);
375
+ await goToSelection(this.selectedFeaturesIds, selectedLayerView, this.mapView, true, undefined, this.zoomToScale);
376
+ }
377
+ }
378
+ async _toggleFilter() {
379
+ this.toggleFilter.emit();
380
+ }
381
+ /**
382
+ * Return true when we have at least 1 layer expression for the current layer
383
+ *
384
+ * @returns boolean
385
+ */
386
+ _hasFilterExpressions() {
387
+ let layerExpressions;
388
+ if (this.mapInfo?.filterConfig?.layerExpressions && this.selectedLayer?.id) {
389
+ layerExpressions = this.mapInfo.filterConfig.layerExpressions.filter((exp) => exp.id === this.selectedLayer.id);
390
+ }
391
+ return layerExpressions?.length > 0;
392
+ }
393
+ /**
394
+ * Get Dropdown action item
395
+ * @returns Dropdown item
396
+ */
397
+ _getDropDownItem() {
398
+ return (h("calcite-dropdown", { closeOnSelectDisabled: true, disabled: this.selectedLayer === undefined, id: "solutions-more", onCalciteDropdownBeforeClose: () => this._forceShowHide(), ref: (el) => this._moreDropdown = el, widthScale: "l" }, h("calcite-action", { appearance: "solid", id: 'solutions-more', label: "", onClick: () => this._toggleShowHide(), slot: "trigger", text: "" }, h("calcite-button", { appearance: "transparent", iconEnd: this._showHideOpen ? "chevron-up" : "chevron-down", kind: "neutral" }, this._translations.more)), h("calcite-dropdown-group", { selectionMode: "none" }, this._getDropDownItems())));
399
+ }
400
+ /**
401
+ * Gets the dropdown items
402
+ * @returns dropdown items
403
+ */
404
+ _getDropDownItems() {
405
+ const featureSelected = this.selectedFeaturesIds?.length > 0;
406
+ const showMultipleEdits = this.selectedFeaturesIds?.length > 1;
407
+ const hasFilterExpressions = this._hasFilterExpressions();
408
+ return (h(Fragment, null, h("calcite-dropdown-group", { selectionMode: "none" }, h("calcite-dropdown-item", { disabled: !showMultipleEdits, iconStart: "pencil", id: "solutions-subset-list", onClick: () => alert(this._translations.editMultiple) }, this._translations.editMultiple)), h("calcite-dropdown-group", { selectionMode: "none" }, h("calcite-dropdown-item", { iconStart: "refresh", id: "solutions-subset-list", onClick: () => { this.selectedLayer.refresh(); } }, this._translations.refresh)), h("calcite-dropdown-group", { selectionMode: "none" }, h("calcite-dropdown-item", { disabled: !featureSelected, iconStart: "zoom-to-object", id: "solutions-subset-list", onClick: this._zoom.bind(this) }, this._translations.zoom)), hasFilterExpressions &&
409
+ h("calcite-dropdown-group", null, h("calcite-dropdown-item", { disabled: false, iconStart: "filter", id: "solutions-subset-list", onClick: this._toggleFilter.bind(this), selected: this._filterActive }, this._translations.filters))));
410
+ }
411
+ /**
412
+ * Fetches the component's translations
413
+ *
414
+ * @returns Promise when complete
415
+ * @protected
416
+ */
417
+ async _getTranslations() {
418
+ const messages = await getLocaleComponentStrings(this.el);
419
+ this._translations = messages[0];
420
+ }
261
421
  static get is() { return "map-card"; }
262
422
  static get originalStyleUrls() {
263
423
  return {
@@ -306,6 +466,23 @@ export class MapCard {
306
466
  "reflect": false,
307
467
  "defaultValue": "\"\""
308
468
  },
469
+ "defaultLayerId": {
470
+ "type": "string",
471
+ "mutable": false,
472
+ "complexType": {
473
+ "original": "string",
474
+ "resolved": "string",
475
+ "references": {}
476
+ },
477
+ "required": false,
478
+ "optional": false,
479
+ "docs": {
480
+ "tags": [],
481
+ "text": "string: when provided this layer ID will be used when the app loads"
482
+ },
483
+ "attribute": "default-layer-id",
484
+ "reflect": false
485
+ },
309
486
  "enableHome": {
310
487
  "type": "boolean",
311
488
  "mutable": false,
@@ -679,13 +856,139 @@ export class MapCard {
679
856
  "tags": [],
680
857
  "text": "\r\nValid tools: \"legend\", \"search\", \"fullscreen\", \"basemap\", \"floorfilter\""
681
858
  }
859
+ },
860
+ "isMapLayout": {
861
+ "type": "boolean",
862
+ "mutable": false,
863
+ "complexType": {
864
+ "original": "boolean",
865
+ "resolved": "boolean",
866
+ "references": {}
867
+ },
868
+ "required": false,
869
+ "optional": false,
870
+ "docs": {
871
+ "tags": [],
872
+ "text": "boolean: When true map will shown is full screen"
873
+ },
874
+ "attribute": "is-map-layout",
875
+ "reflect": false
876
+ },
877
+ "selectedFeaturesIds": {
878
+ "type": "unknown",
879
+ "mutable": false,
880
+ "complexType": {
881
+ "original": "number[]",
882
+ "resolved": "number[]",
883
+ "references": {}
884
+ },
885
+ "required": false,
886
+ "optional": false,
887
+ "docs": {
888
+ "tags": [],
889
+ "text": "number[]: A list of ids that are currently selected"
890
+ }
891
+ },
892
+ "selectedLayer": {
893
+ "type": "unknown",
894
+ "mutable": false,
895
+ "complexType": {
896
+ "original": "__esri.FeatureLayer",
897
+ "resolved": "FeatureLayer",
898
+ "references": {
899
+ "___esri": {
900
+ "location": "global",
901
+ "id": "global::___esri"
902
+ }
903
+ }
904
+ },
905
+ "required": false,
906
+ "optional": false,
907
+ "docs": {
908
+ "tags": [],
909
+ "text": "__esri.FeatureLayer: Selected layer"
910
+ }
911
+ },
912
+ "zoomToScale": {
913
+ "type": "number",
914
+ "mutable": false,
915
+ "complexType": {
916
+ "original": "number",
917
+ "resolved": "number",
918
+ "references": {}
919
+ },
920
+ "required": false,
921
+ "optional": false,
922
+ "docs": {
923
+ "tags": [],
924
+ "text": "number: default scale to zoom to when zooming to a single point feature"
925
+ },
926
+ "attribute": "zoom-to-scale",
927
+ "reflect": false
928
+ },
929
+ "onlyShowUpdatableLayers": {
930
+ "type": "boolean",
931
+ "mutable": false,
932
+ "complexType": {
933
+ "original": "boolean",
934
+ "resolved": "boolean",
935
+ "references": {}
936
+ },
937
+ "required": false,
938
+ "optional": false,
939
+ "docs": {
940
+ "tags": [],
941
+ "text": "boolean: When true only editable layers that support the update capability will be available"
942
+ },
943
+ "attribute": "only-show-updatable-layers",
944
+ "reflect": false
945
+ },
946
+ "isMobile": {
947
+ "type": "boolean",
948
+ "mutable": false,
949
+ "complexType": {
950
+ "original": "boolean",
951
+ "resolved": "boolean",
952
+ "references": {}
953
+ },
954
+ "required": false,
955
+ "optional": false,
956
+ "docs": {
957
+ "tags": [],
958
+ "text": "When true the component will render an optimized view for mobile devices"
959
+ },
960
+ "attribute": "is-mobile",
961
+ "reflect": false
962
+ },
963
+ "mapInfo": {
964
+ "type": "unknown",
965
+ "mutable": false,
966
+ "complexType": {
967
+ "original": "IMapInfo",
968
+ "resolved": "IMapInfo",
969
+ "references": {
970
+ "IMapInfo": {
971
+ "location": "import",
972
+ "path": "../../utils/interfaces",
973
+ "id": "src/utils/interfaces.ts::IMapInfo"
974
+ }
975
+ }
976
+ },
977
+ "required": false,
978
+ "optional": false,
979
+ "docs": {
980
+ "tags": [],
981
+ "text": "IMapInfo: key configuration details about the current map"
982
+ }
682
983
  }
683
984
  };
684
985
  }
685
986
  static get states() {
686
987
  return {
988
+ "_translations": {},
687
989
  "_searchConfiguration": {},
688
- "_webMapInfo": {}
990
+ "_webMapInfo": {},
991
+ "_showHideOpen": {}
689
992
  };
690
993
  }
691
994
  static get events() {
@@ -725,13 +1028,69 @@ export class MapCard {
725
1028
  "resolved": "void",
726
1029
  "references": {}
727
1030
  }
1031
+ }, {
1032
+ "method": "toggleFilter",
1033
+ "name": "toggleFilter",
1034
+ "bubbles": true,
1035
+ "cancelable": true,
1036
+ "composed": true,
1037
+ "docs": {
1038
+ "tags": [],
1039
+ "text": "Emitted on demand when filter action is clicked"
1040
+ },
1041
+ "complexType": {
1042
+ "original": "void",
1043
+ "resolved": "void",
1044
+ "references": {}
1045
+ }
728
1046
  }];
729
1047
  }
1048
+ static get methods() {
1049
+ return {
1050
+ "filterReset": {
1051
+ "complexType": {
1052
+ "signature": "() => Promise<void>",
1053
+ "parameters": [],
1054
+ "references": {
1055
+ "Promise": {
1056
+ "location": "global",
1057
+ "id": "global::Promise"
1058
+ }
1059
+ },
1060
+ "return": "Promise<void>"
1061
+ },
1062
+ "docs": {
1063
+ "text": "Reset the filter",
1064
+ "tags": []
1065
+ }
1066
+ },
1067
+ "updateFilter": {
1068
+ "complexType": {
1069
+ "signature": "() => Promise<void>",
1070
+ "parameters": [],
1071
+ "references": {
1072
+ "Promise": {
1073
+ "location": "global",
1074
+ "id": "global::Promise"
1075
+ }
1076
+ },
1077
+ "return": "Promise<void>"
1078
+ },
1079
+ "docs": {
1080
+ "text": "updates the filter",
1081
+ "tags": []
1082
+ }
1083
+ }
1084
+ };
1085
+ }
730
1086
  static get elementRef() { return "el"; }
731
1087
  static get watchers() {
732
1088
  return [{
733
1089
  "propName": "enableHome",
734
1090
  "methodName": "enableHomeWatchHandler"
1091
+ }, {
1092
+ "propName": "selectedLayer",
1093
+ "methodName": "selectedLayerWatchHandler"
735
1094
  }];
736
1095
  }
737
1096
  static get listeners() {
@@ -741,6 +1100,12 @@ export class MapCard {
741
1100
  "target": "window",
742
1101
  "capture": false,
743
1102
  "passive": false
1103
+ }, {
1104
+ "name": "noLayersFound",
1105
+ "method": "noLayersFound",
1106
+ "target": "window",
1107
+ "capture": false,
1108
+ "passive": false
744
1109
  }];
745
1110
  }
746
1111
  }
@@ -183,7 +183,7 @@ export class MapDrawTools {
183
183
  "border" : "border esri-widget esri-sketch__panel";
184
184
  const undoRedoClass = this.drawMode === EDrawMode.SKETCH ?
185
185
  "display-none" : "esri-widget esri-sketch__panel border-left esri-sketch__section";
186
- return (h(Host, { key: '1f9544ac97df4b51337260e1bb7cf3b5d923fa03' }, h("div", { key: 'eca20834d2eacf3cc4a30e6ecf15a2f8d894cb8f', class: containerClass }, h("div", { key: '32bbaf5a03251c035821880231acb894a452b8dd', ref: (el) => { this._sketchElement = el; } }), h("div", { key: 'cd446419c2b7d347711a48851baec46f24d20375', class: undoRedoClass }, h("calcite-action", { key: '03ce63c7805c1cc1b63e78336ba624199eef3336', disabled: !this.undoEnabled, icon: "undo", onClick: () => this._undo(), scale: "s", text: this._translations.undo }), h("calcite-action", { key: '0d688389277586163c589561865ab7778021ac10', disabled: !this.redoEnabled, icon: "redo", onClick: () => this._redo(), scale: "s", text: this._translations.redo })))));
186
+ return (h(Host, { key: '64c06f74fa05d6debb3a34bbb3d51bc9e2d1e8a6' }, h("div", { key: 'b3ac0f7c2f38da701fcee82580d7d4f55792ffb8', class: containerClass }, h("div", { key: '57625c7617de564ad7f62ed8952dd72108d46bbe', ref: (el) => { this._sketchElement = el; } }), h("div", { key: 'b1c8a28ef1fab0e0cb4a9617e9d366e1002d619d', class: undoRedoClass }, h("calcite-action", { key: 'ae27d672ad615b54bceb37fa56ac8e652f80df61', disabled: !this.undoEnabled, icon: "undo", onClick: () => this._undo(), scale: "s", text: this._translations.undo }), h("calcite-action", { key: '643d1413f98f8059590fb92c702074c9c732f9b1', disabled: !this.redoEnabled, icon: "redo", onClick: () => this._redo(), scale: "s", text: this._translations.redo })))));
187
187
  }
188
188
  //--------------------------------------------------------------------------
189
189
  //
@@ -95,7 +95,7 @@ export class MapFullscreen {
95
95
  * Renders the component.
96
96
  */
97
97
  render() {
98
- return (h(Host, { key: '943217d26f3cf5861c165c3300ba24736ce8f7dc' }, h("div", { key: '6c76ebf6e63dab19f24d776cd27cd86b74ea93d0', class: "fullscreen-widget", ref: (el) => { this._fullscreenElement = el; } })));
98
+ return (h(Host, { key: '27267ebf4781a3c85addd8339028f7ac8d07bfb2' }, h("div", { key: '0966dae1c7ab9a2cba461d2f19b63bea8e5f28cf', class: "fullscreen-widget", ref: (el) => { this._fullscreenElement = el; } })));
99
99
  }
100
100
  /**
101
101
  * StencilJS: Called just after the component updates.
@@ -20,7 +20,7 @@
20
20
  */
21
21
  import { Host, h } from "@stencil/core";
22
22
  import { getLocaleComponentStrings } from "../../utils/locale";
23
- import { getMapLayerHash, getMapTableHash } from "../../utils/mapViewUtils";
23
+ import { getLayerOrTable, getMapLayerHash, getMapTableHash } from "../../utils/mapViewUtils";
24
24
  import state from "../../utils/publicNotificationStore";
25
25
  export class MapLayerPicker {
26
26
  constructor() {
@@ -129,8 +129,14 @@ export class MapLayerPicker {
129
129
  async componentWillLoad() {
130
130
  await this._getTranslations();
131
131
  await this._setLayers();
132
+ }
133
+ /**
134
+ * StencilJS: Called once just after the component is first connected to the DOM.
135
+ */
136
+ async componentWillRender() {
132
137
  if (this.ids.length > 0 || this.selectedIds.length === 1) {
133
- this.layerSelectionChange.emit(this.selectedIds.length === 1 ? [this.selectedIds[0]] : [this.ids[0]]);
138
+ const layer = await getLayerOrTable(this.mapView, this.selectedIds[0]);
139
+ this.selectedName = layer?.title;
134
140
  }
135
141
  }
136
142
  /**
@@ -140,7 +146,7 @@ export class MapLayerPicker {
140
146
  const id = "map-layer-picker";
141
147
  let style = this.height > 0 ? { "height": `${this.height.toString()}px` } : {};
142
148
  style = { ...style, "display": this.display };
143
- return (h(Host, { key: 'a96e93924530d926c5e10dd2f7212f3f8c1cbe3c' }, h("div", { key: '4b96a73e43e86c31291e4ac60eb15976b01de6a2', class: "map-layer-picker-container", style: style }, h("div", { key: 'e75c61d8ce0853814dd3903b9e1952cc613b6fbb', class: "map-layer-picker", style: style }, !this._hasValidLayers ? this._getInvalidPlaceholder() :
149
+ return (h(Host, { key: '47a42a4855654930ebaf59b1567ab4bd5ccf3133' }, h("div", { key: 'acc05150c663d68ae633a7d293984ae282cfbdfa', class: "map-layer-picker-container", style: style }, h("div", { key: '811bde9a5118862f58b6a9ed99abec0f46fb4a1f', class: "map-layer-picker", style: style }, !this._hasValidLayers ? this._getInvalidPlaceholder() :
144
150
  !this._hasMultipleLayers && this.showSingleLayerAsLabel ? this._getSingleLayerPlaceholder() :
145
151
  this.type === "combobox" ? this._getCombobox(id) :
146
152
  this.type === "select" ? this._getSelect(id) : this._getDropdown(id)))));
@@ -86,7 +86,7 @@ export class MapLegend {
86
86
  * StencilJS: Renders the component.
87
87
  */
88
88
  render() {
89
- return (h(Host, { key: 'bdd3b848bec1aec6f8c7676f8bab5e9463b16064' }, h("div", { key: 'd7bb217db6971758ef8774d19d6ac5cfa94a0ddc', ref: (el) => { this._legendElement = el; } })));
89
+ return (h(Host, { key: 'd9f276c9f13ad09a606bda6e2aaf78707824f6e9' }, h("div", { key: 'f2db7bd093313a19ace2ec4340c5d0049b666bdc', ref: (el) => { this._legendElement = el; } })));
90
90
  }
91
91
  /**
92
92
  * StencilJS: Called once just after the component is fully loaded and the first render() occurs.
@@ -23,6 +23,10 @@
23
23
  width: 100%;
24
24
  }
25
25
 
26
+ .width-25 {
27
+ width: 25% !important;
28
+ }
29
+
26
30
  .height-full {
27
31
  height: 100%;
28
32
  }
@@ -38,6 +42,10 @@
38
42
  border-color: var(--calcite-color-border-3);
39
43
  }
40
44
 
45
+ .border-right {
46
+ border-right: 1px solid var(--calcite-color-border-3);
47
+ }
48
+
41
49
  .action-bar-size {
42
50
  height: 51px;
43
51
  width: 100%;