@esri/solutions-components 0.10.7 → 0.10.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 (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 +169 -49
  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 +173 -65
  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 +172 -53
  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 +170 -50
  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-85c25564.entry.js +6 -0
  125. package/dist/solutions-components/{p-235bf02e.entry.js → p-913413c3.entry.js} +1 -1
  126. package/dist/solutions-components/p-9af1cb14.entry.js +6 -0
  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 +86 -20
  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 -0
  137. package/dist/types/preact.d.ts +4 -2
  138. package/package.json +1 -1
  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
@@ -22,7 +22,7 @@ const CrowdsourceManager = class {
22
22
  index.registerInstance(this, hostRef);
23
23
  this.showIntroductionWindow = index.createEvent(this, "showIntroductionWindow", 7);
24
24
  this.showCoverPage = index.createEvent(this, "showCoverPage", 7);
25
- this.appLayout = undefined;
25
+ this.appLayout = 'splitView';
26
26
  this.appProxies = undefined;
27
27
  this.basemapConfig = undefined;
28
28
  this.coverPageEnabled = undefined;
@@ -59,7 +59,6 @@ const CrowdsourceManager = class {
59
59
  this.theme = "light";
60
60
  this.zoomAndScrollToSelected = false;
61
61
  this.zoomToScale = undefined;
62
- this._expandPopup = false;
63
62
  this._hideFooter = false;
64
63
  this._hideTable = false;
65
64
  this._isMobile = false;
@@ -70,7 +69,7 @@ const CrowdsourceManager = class {
70
69
  this._mapView = undefined;
71
70
  this._panelOpen = true;
72
71
  this._numSelected = 0;
73
- this._tableOnly = false;
72
+ this._filterOpen = false;
74
73
  }
75
74
  get el() { return index.getElement(this); }
76
75
  //--------------------------------------------------------------------------
@@ -109,6 +108,18 @@ const CrowdsourceManager = class {
109
108
  * MapView.when is not fired when mapView is not currently visible
110
109
  */
111
110
  _shouldSetMapView = false;
111
+ /**
112
+ * LayerExpression[]: All layer expressions from the current filter config for the currently selected layer
113
+ */
114
+ _layerExpressions;
115
+ /**
116
+ * HTMLInstantAppsFilterListElement: Component from Instant Apps that supports interacting with the current filter config
117
+ */
118
+ _filterList;
119
+ /**
120
+ * boolean: True when app is directly rendered to map view layout
121
+ */
122
+ _isMapViewOnLoad = false;
112
123
  //--------------------------------------------------------------------------
113
124
  //
114
125
  // Watch handlers
@@ -125,7 +136,6 @@ const CrowdsourceManager = class {
125
136
  */
126
137
  hideMapOnLoadWatchHandler() {
127
138
  this.showHideMapPopupAndTable(this.hideMapOnLoad && !this._isMobile);
128
- this._expandPopup = this.hideMapOnLoad && !this._isMobile;
129
139
  }
130
140
  //--------------------------------------------------------------------------
131
141
  //
@@ -159,16 +169,6 @@ const CrowdsourceManager = class {
159
169
  this.showHideMapPopupAndTable(false);
160
170
  }
161
171
  }
162
- /**
163
- * Listen for idsFound event to be fired so we can know that all layer ids have been fetched
164
- */
165
- async idsFound(evt) {
166
- const ids = evt.detail;
167
- this._tableOnly = ids.tableIds.length > 0 && ids.layerIds.length === 0;
168
- if (this._tableOnly) {
169
- this._expandPopup = true;
170
- }
171
- }
172
172
  /**
173
173
  * Listen for layoutChanged event to be fired so we can adjust the layout
174
174
  */
@@ -184,14 +184,6 @@ const CrowdsourceManager = class {
184
184
  await this._setMapView();
185
185
  });
186
186
  }
187
- /**
188
- * Listen for beforeMapChanged and minimize the popup if it's expanded
189
- */
190
- async beforeMapChanged() {
191
- if (this._expandPopup) {
192
- this._shouldSetMapView = true;
193
- }
194
- }
195
187
  /**
196
188
  * Get the layer for the provided layer id
197
189
  */
@@ -200,13 +192,13 @@ const CrowdsourceManager = class {
200
192
  const layer = await mapViewUtils.getLayerOrTable(this._mapView, id);
201
193
  await layer.when(() => {
202
194
  this._layer = layer;
195
+ this._initLayerExpressions();
203
196
  });
204
197
  }
205
198
  /**
206
199
  * Update the state expandPopup when mapInfoChange event occurs
207
200
  */
208
201
  async mapInfoChange() {
209
- this._expandPopup = this.hideMapOnLoad && !this._isMobile;
210
202
  this._hideMapOnLoadHonored = false;
211
203
  }
212
204
  //--------------------------------------------------------------------------
@@ -229,7 +221,7 @@ const CrowdsourceManager = class {
229
221
  render() {
230
222
  // only avoid border when we have a header color that is not white
231
223
  const borderClass = this.popupHeaderColor && this.popupHeaderColor !== "#FFFFFF" ? "border-width-0" : "";
232
- return (index.h(index.Host, { key: 'f434a8e24b111a32774e9d5683c2446ba35b504b' }, index.h("calcite-shell", { key: '017843c77fa2c52f0d957760ac3f57808d11d59f', class: "position-relative" }, index.h("calcite-panel", { key: 'bd8eeec3a013583789b9e1b251fed34e5896171e', class: `width-full height-full ${borderClass}` }, this._getBody(this._layoutMode, this._panelOpen, this._hideTable)), this._getFooter())));
224
+ return (index.h(index.Host, { key: 'bbe12b471976652c32fc0cb6277fdfc4171b2cd6' }, index.h("calcite-shell", { key: '00b85d8e681f5ab021e6efb63b603e3d2442f63c', class: "position-relative" }, index.h("calcite-panel", { key: 'f1a37f06f3023bb1c63b40eeca739e942c301e63', class: `width-full height-full ${borderClass}` }, this._getBody(this._layoutMode, this._panelOpen, this._hideTable)), this._getFooter()), this._filterModal()));
233
225
  }
234
226
  /**
235
227
  * Called after each render
@@ -248,6 +240,12 @@ const CrowdsourceManager = class {
248
240
  */
249
241
  async componentDidLoad() {
250
242
  this._resizeObserver.observe(this.el);
243
+ // for backward compatibility if hidemaponload is true then render table layout as default
244
+ if (this.hideMapOnLoad) {
245
+ this.appLayout = 'tableView';
246
+ }
247
+ this._isMapViewOnLoad = this.appLayout === 'mapView';
248
+ this._setActiveLayout(this.appLayout);
251
249
  }
252
250
  //--------------------------------------------------------------------------
253
251
  //
@@ -265,6 +263,27 @@ const CrowdsourceManager = class {
265
263
  const deleteEnabled = this._layer?.editingEnabled && this._layer?.capabilities?.operations?.supportsDelete;
266
264
  return this._isMobile && hasSelectedFeatures && !this._hideFooter ? (index.h("div", { class: `width-100`, slot: "footer" }, index.h("div", { class: "display-flex padding-1-2" }, index.h("calcite-button", { appearance: "solid", id: "solutions-show", onClick: () => this.showHideMapPopupAndTable(true), width: "full" }, this._translations.view.replace("{{n}}", this._numSelected.toString())), deleteEnabled ? (index.h("delete-button", { class: "padding-inline-start-1 width-full", id: "solutions-delete", ids: this._layerTable.selectedIds, layer: this._layer })) : undefined))) : undefined;
267
265
  }
266
+ /**
267
+ * sets the active layout to render
268
+ * @param appLayout new app layout
269
+ *
270
+ * @protected
271
+ */
272
+ _setActiveLayout(appLayout) {
273
+ //When going to splitView layout the panel should be open
274
+ if (appLayout === 'splitView' && !this._panelOpen) {
275
+ this._toggleLayout();
276
+ }
277
+ //Move the map node based on the selected layout
278
+ //for mapView layout show map in full view and or all other layout show in the card view
279
+ //for tableView the map will be hidden using css
280
+ if (appLayout === 'mapView') {
281
+ this._showMapInFullView();
282
+ }
283
+ else {
284
+ this._showMapInCardView();
285
+ }
286
+ }
268
287
  /**
269
288
  * Get the icon name to use for the divider icon based on the current layout
270
289
  *
@@ -390,8 +409,11 @@ const CrowdsourceManager = class {
390
409
  * @protected
391
410
  */
392
411
  _getMapNode(panelOpen) {
393
- const mapContainerClass = this._layoutMode === interfaces.ELayoutMode.HORIZONTAL && (!this._isMobile || panelOpen) ? "" : "adjusted-height-50";
394
- return (index.h("div", { class: `${mapContainerClass} overflow-hidden` }, index.h("map-card", { appProxies: this.appProxies, basemapConfig: this.basemapConfig, class: "width-full", defaultWebmapId: this.defaultWebmap, enableBasemap: this.enableBasemap, enableFloorFilter: this.enableFloorFilter, enableFullscreen: this.enableFullscreen, enableHome: this.enableHome, enableLegend: this.enableLegend, enableSearch: this.enableSearch, enableSingleExpand: true, hidden: this._expandPopup && !this._isMobile, homeZoomIndex: 3, homeZoomPosition: "top-left", homeZoomToolsSize: "s", mapInfos: this.mapInfos?.filter(mapInfo => mapInfo.visible !== false), mapWidgetsIndex: 0, mapWidgetsPosition: "top-right", mapWidgetsSize: "m", stackTools: true, theme: this.theme, toolOrder: ["legend", "search", "fullscreen", "basemap", "floorfilter"] })));
412
+ const isMapLayout = this.appLayout === 'mapView';
413
+ const isTableLayout = this.appLayout === 'tableView';
414
+ const mapContainerClass = (isMapLayout || isTableLayout) ? "position-absolute-0" : this._layoutMode === interfaces.ELayoutMode.HORIZONTAL && (!this._isMobile || panelOpen) ? "" : "adjusted-height-50";
415
+ const hasMapAndLayer = this.defaultWebmap && this.defaultLayer;
416
+ return (index.h("div", { class: `${mapContainerClass} overflow-hidden`, id: "card-mapView" }, index.h("map-card", { appProxies: this.appProxies, basemapConfig: this.basemapConfig, class: "width-full", defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultWebmapId: this.defaultWebmap, enableBasemap: this.enableBasemap, enableFloorFilter: this.enableFloorFilter, enableFullscreen: this.enableFullscreen, enableHome: this.enableHome, enableLegend: this.enableLegend, enableSearch: this.enableSearch, enableSingleExpand: true, hidden: !this._isMobile && isTableLayout, homeZoomIndex: 3, homeZoomPosition: "top-left", homeZoomToolsSize: "s", isMapLayout: isMapLayout, isMobile: this._isMobile, mapInfo: this._mapInfo, mapInfos: this.mapInfos?.filter(mapInfo => mapInfo.visible !== false), mapWidgetsIndex: 0, mapWidgetsPosition: "top-right", mapWidgetsSize: "m", onToggleFilter: this._toggleFilter.bind(this), onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, selectedFeaturesIds: this._layerTable?.selectedIds, selectedLayer: this._layer, stackTools: true, theme: this.theme, toolOrder: ["legend", "search", "fullscreen", "basemap", "floorfilter"], zoomToScale: this.zoomToScale })));
395
417
  }
396
418
  /**
397
419
  * Get the expand node for the popup information
@@ -400,11 +422,7 @@ const CrowdsourceManager = class {
400
422
  * @protected
401
423
  */
402
424
  _getPopupExpandNode() {
403
- const icon = this._expandPopup ? "chevrons-down" : "chevrons-up";
404
- const id = "expand-popup";
405
- const tooltip = this._expandPopup ? this._translations.collapsePopup : this._translations.expandPopup;
406
- const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
407
- const popupNodeClass = !this._expandPopup ? "height-full" : this.mapInfos?.length === 1 || this._isMobile ? "position-absolute-0" : "position-absolute-50";
425
+ const popupNodeClass = "height-full";
408
426
  const headerClass = this._isMobile ? "display-none height-0" : "";
409
427
  const headerTheme = this.popupHeaderColor ? "" : !this._isMobile ? "calcite-mode-dark" : "calcite-mode-light";
410
428
  const containerClass = this._isMobile && this._hideTable ? "position-absolute-0 width-full height-full" : this._isMobile ? "display-none height-0" : "";
@@ -413,16 +431,7 @@ const CrowdsourceManager = class {
413
431
  '--calcite-color-foreground-2': this.popupHeaderHoverColor, /* background color that will be displayed on button when hovered */
414
432
  '--calcite-color-text-3': this.popupHeaderTextColor, /* font color that will be displayed on button */
415
433
  '--calcite-color-text-2': this.popupHeaderTextColor, /* font color that will be displayed on popup header text*/
416
- } }, index.h("calcite-panel", null, !this._isMobile ? (index.h("div", { class: `display-flex align-items-center ${headerClass}`, slot: "header-content" }, index.h("calcite-icon", { icon: "information", scale: "s" }), index.h("div", { class: "padding-inline-start-75" }, this._translations.information))) : undefined, index.h("calcite-action", { class: headerClass, disabled: this._tableOnly, icon: icon, id: id, onClick: () => this._togglePopup(), slot: "header-actions-end", text: "" }), !this._tableOnly ? index.h("calcite-tooltip", { class: themeClass, label: "", placement: "bottom", "reference-element": id }, index.h("span", null, tooltip)) : undefined, this._getCardNode())));
417
- }
418
- /**
419
- * Toggle the popup information
420
- *
421
- * @protected
422
- */
423
- _togglePopup() {
424
- this._expandPopup = !this._expandPopup;
425
- this._hideMapOnLoadHonored = true;
434
+ } }, index.h("calcite-panel", null, !this._isMobile ? (index.h("div", { class: `display-flex align-items-center ${headerClass}`, slot: "header-content" }, index.h("calcite-icon", { icon: "information", scale: "s" }), index.h("div", { class: "padding-inline-start-75" }, this._translations.information))) : undefined, this._getCardNode())));
426
435
  }
427
436
  /**
428
437
  * Get the card node
@@ -431,9 +440,11 @@ const CrowdsourceManager = class {
431
440
  * @protected
432
441
  */
433
442
  _getCardNode() {
434
- const cardManagerHeight = !this._expandPopup && !this._isMobile ? "height-50" : "height-full";
443
+ const isMapLayout = this.appLayout === 'mapView';
444
+ const isTableLayout = this.appLayout === 'tableView';
445
+ const cardManagerHeight = (isMapLayout || isTableLayout) ? "height-full" : !this._isMobile ? "height-50" : "height-full";
435
446
  const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
436
- return (index.h("div", { class: `width-50 height-full ${themeClass}` }, index.h("card-manager", { class: `${cardManagerHeight} width-full`, enableEditGeometry: this?._mapInfo?.enableEditGeometry, isMobile: this._isMobile, mapView: this?._mapView, zoomAndScrollToSelected: this.zoomAndScrollToSelected })));
447
+ return (index.h("div", { class: `width-50 height-full ${themeClass}` }, index.h("card-manager", { class: `${cardManagerHeight} width-full`, enableEditGeometry: this?._mapInfo?.enableEditGeometry, isMobile: this._isMobile, layer: this._layer, mapView: this?._mapView, selectedFeaturesIds: this._layerTable?.selectedIds, zoomAndScrollToSelected: this.zoomAndScrollToSelected })));
437
448
  }
438
449
  /**
439
450
  * Get the table node based for the current layout
@@ -445,11 +456,11 @@ const CrowdsourceManager = class {
445
456
  * @protected
446
457
  */
447
458
  _getTable(layoutMode, panelOpen, hideTable) {
448
- const tableClass = hideTable && this._isMobile ? "visibility-hidden" : "";
459
+ const isMapLayout = this.appLayout === 'mapView';
460
+ const isTableLayout = this.appLayout === 'tableView';
461
+ const tableClass = hideTable && this._isMobile ? "visibility-hidden" : isMapLayout ? "display-none" : "";
462
+ const mapClass = isMapLayout ? "height-full width-full" : "display-none";
449
463
  const tableSizeClass = this._getTableSizeClass(layoutMode, panelOpen);
450
- const icon = this._getDividerIcon(layoutMode, panelOpen);
451
- const tooltip = panelOpen ? this._translations.close : this._translations.open;
452
- const id = "toggle-layout";
453
464
  const toggleLayout = layoutMode === interfaces.ELayoutMode.HORIZONTAL ? "horizontal" : "vertical";
454
465
  const toggleSlot = layoutMode === interfaces.ELayoutMode.HORIZONTAL ? "header" : "panel-start";
455
466
  const hasMapAndLayer = this.defaultWebmap && this.defaultLayer;
@@ -457,10 +468,74 @@ const CrowdsourceManager = class {
457
468
  this.defaultGlobalId?.indexOf(",") > -1 ? this.defaultGlobalId.split(",") : [this.defaultGlobalId];
458
469
  const defaultOid = !this.defaultOid ? undefined :
459
470
  this.defaultOid?.indexOf(",") > -1 ? this.defaultOid.split(",").map(o => parseInt(o, 10)) : [parseInt(this.defaultOid, 10)];
460
- return (index.h("calcite-shell", { class: `${tableSizeClass} ${tableClass} border-bottom` }, !this._isMobile ? (index.h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, index.h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), index.h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, index.h("span", null, tooltip)))) : undefined, index.h("div", { class: `width-full height-full position-relative` }, index.h("layer-table", { defaultGlobalId: hasMapAndLayer ? globalId : undefined, defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultOid: hasMapAndLayer && !globalId ? defaultOid : undefined, enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableColumnReorder: this.enableColumnReorder, enableInlineEdit: this?._mapInfo?.enableInlineEdit, enableShare: this.enableShare, isMobile: this._isMobile, mapHidden: this._expandPopup, mapInfo: this._mapInfo, mapView: this?._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, ref: (el) => this._layerTable = el, shareIncludeEmbed: this.shareIncludeEmbed, shareIncludeSocial: this.shareIncludeSocial, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected, zoomToScale: this.zoomToScale }))));
471
+ return (index.h("calcite-shell", { class: `${tableSizeClass} border-bottom` }, !this._isMobile ? (index.h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, this.getActions(layoutMode, panelOpen))) : undefined, index.h("div", { class: `width-full height-full position-relative ${tableClass}` }, index.h("layer-table", { createFilterModal: false, defaultGlobalId: hasMapAndLayer ? globalId : undefined, defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultOid: hasMapAndLayer && !globalId ? defaultOid : undefined, enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableColumnReorder: this.enableColumnReorder, enableInlineEdit: this?._mapInfo?.enableInlineEdit, enableShare: this.enableShare, isMobile: this._isMobile, mapHidden: isTableLayout, mapInfo: this._mapInfo, mapView: this?._mapView, onToggleFilter: this._toggleFilter.bind(this), onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, ref: (el) => this._layerTable = el, shareIncludeEmbed: this.shareIncludeEmbed, shareIncludeSocial: this.shareIncludeSocial, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected, zoomToScale: this.zoomToScale })), index.h("div", { class: mapClass, id: "full-map-view" })));
472
+ }
473
+ /**
474
+ * Returns the Actions for table's node
475
+ *
476
+ * @returns Node
477
+ * @protected
478
+ */
479
+ getActions(layoutMode, panelOpen) {
480
+ const icon = this._getDividerIcon(layoutMode, panelOpen);
481
+ const tooltip = panelOpen ? this._translations.close : this._translations.open;
482
+ const id = "toggle-layout";
483
+ return (index.h(index.Fragment, null, index.h("calcite-action", { active: this.appLayout === 'splitView', class: "toggle-node", icon: "browser", id: "browser-action", onClick: () => { this._changeLayout('splitView'); }, text: "" }), index.h("calcite-tooltip", { placement: "right", "reference-element": "browser-action" }, index.h("span", null, this._translations.splitView)), index.h("calcite-action", { active: this.appLayout === 'tableView', class: "toggle-node", icon: "dock-left", id: "dock-left-action", onClick: () => { this._changeLayout('tableView'); }, text: "" }), index.h("calcite-tooltip", { placement: "right", "reference-element": "dock-left-action" }, index.h("span", null, this._translations.tableView)), index.h("calcite-action", { active: this.appLayout === 'mapView', class: "toggle-node", icon: "browser-map", id: "browser-map-action", onClick: () => { this._changeLayout('mapView'); }, text: "" }), index.h("calcite-tooltip", { placement: "right", "reference-element": "browser-map-action" }, index.h("span", null, this._translations.mapView)), index.h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), slot: "actions-end", text: "" }), index.h("calcite-tooltip", { placement: "bottom", "reference-element": id }, index.h("span", null, tooltip))));
484
+ }
485
+ /**
486
+ * Show filter component in modal
487
+ *
488
+ * @returns node to interact with any configured filters for the current layer
489
+ * @protected
490
+ */
491
+ _filterModal() {
492
+ return (index.h("calcite-modal", { "aria-labelledby": "modal-title", class: "modal", kind: "brand", onCalciteModalClose: () => void this._closeFilter(), open: this._filterOpen, widthScale: "s" }, index.h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, this._translations?.filter?.replace("{{title}}", this._layer?.title)), index.h("div", { slot: "content" }, index.h("instant-apps-filter-list", { autoUpdateUrl: false, closeBtn: true, closeBtnOnClick: async () => this._closeFilter(), comboboxOverlayPositioning: "fixed", layerExpressions: this._layerExpressions, onFilterListReset: () => this._handleFilterListReset(), onFilterUpdate: () => void this._layerTable?.filterUpdate(), ref: (el) => this._filterList = el, view: this._mapView, zoomBtn: false }))));
493
+ }
494
+ /**
495
+ * Store any filters for the current layer.
496
+ * Should only occur on layer change
497
+ *
498
+ * @protected
499
+ */
500
+ _initLayerExpressions() {
501
+ const layerExpressions = this._mapInfo?.filterConfig?.layerExpressions;
502
+ this._layerExpressions = layerExpressions ? layerExpressions.filter((exp) => exp.id === this._layer?.id) : [];
503
+ this._filterList.layerExpressions = this._layerExpressions;
504
+ this._layerExpressions.filter(lyrExp => {
505
+ return lyrExp.expressions.filter(exp => exp.active).length > 0;
506
+ }).length > 0;
507
+ }
508
+ /**
509
+ * Toggle the filter modal
510
+ *
511
+ * @protected
512
+ */
513
+ _toggleFilter() {
514
+ this._filterOpen = !this._filterOpen;
515
+ }
516
+ /**
517
+ * Reset the filter active prop
518
+ *
519
+ * @protected
520
+ */
521
+ _handleFilterListReset() {
522
+ void this._layerTable.filterReset();
523
+ }
524
+ /**
525
+ * Close the filter modal
526
+ *
527
+ * @protected
528
+ */
529
+ async _closeFilter() {
530
+ if (this._filterOpen) {
531
+ this._filterOpen = false;
532
+ void this._layerTable.closeFilter();
533
+ }
461
534
  }
462
535
  /**
463
536
  * Update the component layout when its size changes
537
+ *
538
+ * @protected
464
539
  */
465
540
  _onResize() {
466
541
  const isMobile = this.el.offsetWidth < 1024;
@@ -477,22 +552,67 @@ const CrowdsourceManager = class {
477
552
  /**
478
553
  * Open/Close the appropriate panel.
479
554
  * The panel that is toggled is dependent upon the layout mode and if using classic grid or not
555
+ *
556
+ * @protected
480
557
  */
481
558
  _toggleLayout() {
482
559
  this._panelOpen = !this._panelOpen;
483
560
  }
561
+ /**
562
+ * Changes the layout mode
563
+ * @param appLayout selected active app layout
564
+ *
565
+ * @protected
566
+ */
567
+ _changeLayout(appLayout) {
568
+ if (this.appLayout !== appLayout) {
569
+ this._setActiveLayout(appLayout);
570
+ this.appLayout = appLayout;
571
+ if (this._isMapViewOnLoad) {
572
+ void this._layerTable.refresh();
573
+ this._isMapViewOnLoad = false;
574
+ }
575
+ }
576
+ }
577
+ /**
578
+ * shows the map in card view
579
+ *
580
+ * @protected
581
+ */
582
+ _showMapInCardView() {
583
+ if (this.appLayout === 'mapView') {
584
+ const fullMapView = document.getElementById('full-map-view').childNodes[0];
585
+ const splitMapClass = document.getElementById('card-mapView');
586
+ if (fullMapView) {
587
+ splitMapClass.appendChild(fullMapView);
588
+ }
589
+ }
590
+ }
591
+ /**
592
+ * Shows the map in full view
593
+ *
594
+ * @protected
595
+ */
596
+ _showMapInFullView() {
597
+ const splitMap = document.getElementById('card-mapView').childNodes[0];
598
+ const fullMapViewClass = document.getElementById('full-map-view');
599
+ if (splitMap) {
600
+ fullMapViewClass.appendChild(splitMap);
601
+ }
602
+ }
484
603
  /**
485
604
  * Show/Hide the map, popup, and table
486
605
  *
487
606
  * @param show when true the map, popup, and table will be displayed
607
+ * @protected
488
608
  */
489
609
  showHideMapPopupAndTable(show) {
490
- this._expandPopup = false;
491
610
  this._hideTable = show;
492
611
  this._hideFooter = show;
493
612
  }
494
613
  /**
495
614
  * Get the current map info (configuration details) when maps change
615
+ * @param id map changed id
496
616
  *
497
617
  * @returns IMapInfo for the provided id
498
618
  * @protected