@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
@@ -3,7 +3,7 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import { r as registerInstance, c as createEvent, g as getElement, h, H as Host } from './index-e3f04fa1.js';
6
+ import { r as registerInstance, c as createEvent, g as getElement, h, H as Host, F as Fragment } from './index-e3f04fa1.js';
7
7
  import { g as getLocaleComponentStrings } from './locale-7162b55a.js';
8
8
  import { E as ELayoutMode } from './interfaces-659e3836.js';
9
9
  import { g as getLayerOrTable } from './mapViewUtils-3e3d33ea.js';
@@ -18,7 +18,7 @@ const CrowdsourceManager = class {
18
18
  registerInstance(this, hostRef);
19
19
  this.showIntroductionWindow = createEvent(this, "showIntroductionWindow", 7);
20
20
  this.showCoverPage = createEvent(this, "showCoverPage", 7);
21
- this.appLayout = undefined;
21
+ this.appLayout = 'splitView';
22
22
  this.appProxies = undefined;
23
23
  this.basemapConfig = undefined;
24
24
  this.coverPageEnabled = undefined;
@@ -32,7 +32,6 @@ const CrowdsourceManager = class {
32
32
  this.enableAutoRefresh = false;
33
33
  this.enableBasemap = true;
34
34
  this.enableColumnReorder = true;
35
- this.enableCreateFeatures = true;
36
35
  this.enableCSV = true;
37
36
  this.enableFloorFilter = true;
38
37
  this.enableFullscreen = true;
@@ -55,7 +54,7 @@ const CrowdsourceManager = class {
55
54
  this.theme = "light";
56
55
  this.zoomAndScrollToSelected = false;
57
56
  this.zoomToScale = undefined;
58
- this._expandPopup = false;
57
+ this._enableCreateFeatures = true;
59
58
  this._hideFooter = false;
60
59
  this._hideTable = false;
61
60
  this._isMobile = false;
@@ -66,7 +65,7 @@ const CrowdsourceManager = class {
66
65
  this._mapView = undefined;
67
66
  this._panelOpen = true;
68
67
  this._numSelected = 0;
69
- this._tableOnly = false;
68
+ this._filterOpen = false;
70
69
  }
71
70
  get el() { return getElement(this); }
72
71
  //--------------------------------------------------------------------------
@@ -105,6 +104,18 @@ const CrowdsourceManager = class {
105
104
  * MapView.when is not fired when mapView is not currently visible
106
105
  */
107
106
  _shouldSetMapView = false;
107
+ /**
108
+ * LayerExpression[]: All layer expressions from the current filter config for the currently selected layer
109
+ */
110
+ _layerExpressions;
111
+ /**
112
+ * HTMLInstantAppsFilterListElement: Component from Instant Apps that supports interacting with the current filter config
113
+ */
114
+ _filterList;
115
+ /**
116
+ * boolean: True when app is directly rendered to map view layout
117
+ */
118
+ _isMapViewOnLoad = false;
108
119
  //--------------------------------------------------------------------------
109
120
  //
110
121
  // Watch handlers
@@ -121,7 +132,6 @@ const CrowdsourceManager = class {
121
132
  */
122
133
  hideMapOnLoadWatchHandler() {
123
134
  this.showHideMapPopupAndTable(this.hideMapOnLoad && !this._isMobile);
124
- this._expandPopup = this.hideMapOnLoad && !this._isMobile;
125
135
  }
126
136
  //--------------------------------------------------------------------------
127
137
  //
@@ -155,16 +165,6 @@ const CrowdsourceManager = class {
155
165
  this.showHideMapPopupAndTable(false);
156
166
  }
157
167
  }
158
- /**
159
- * Listen for idsFound event to be fired so we can know that all layer ids have been fetched
160
- */
161
- async idsFound(evt) {
162
- const ids = evt.detail;
163
- this._tableOnly = ids.tableIds.length > 0 && ids.layerIds.length === 0;
164
- if (this._tableOnly) {
165
- this._expandPopup = true;
166
- }
167
- }
168
168
  /**
169
169
  * Listen for layoutChanged event to be fired so we can adjust the layout
170
170
  */
@@ -180,14 +180,6 @@ const CrowdsourceManager = class {
180
180
  await this._setMapView();
181
181
  });
182
182
  }
183
- /**
184
- * Listen for beforeMapChanged and minimize the popup if it's expanded
185
- */
186
- async beforeMapChanged() {
187
- if (this._expandPopup) {
188
- this._shouldSetMapView = true;
189
- }
190
- }
191
183
  /**
192
184
  * Get the layer for the provided layer id
193
185
  */
@@ -196,13 +188,13 @@ const CrowdsourceManager = class {
196
188
  const layer = await getLayerOrTable(this._mapView, id);
197
189
  await layer.when(() => {
198
190
  this._layer = layer;
191
+ this._initLayerExpressions();
199
192
  });
200
193
  }
201
194
  /**
202
195
  * Update the state expandPopup when mapInfoChange event occurs
203
196
  */
204
197
  async mapInfoChange() {
205
- this._expandPopup = this.hideMapOnLoad && !this._isMobile;
206
198
  this._hideMapOnLoadHonored = false;
207
199
  }
208
200
  //--------------------------------------------------------------------------
@@ -225,7 +217,7 @@ const CrowdsourceManager = class {
225
217
  render() {
226
218
  // only avoid border when we have a header color that is not white
227
219
  const borderClass = this.popupHeaderColor && this.popupHeaderColor !== "#FFFFFF" ? "border-width-0" : "";
228
- return (h(Host, { key: 'f434a8e24b111a32774e9d5683c2446ba35b504b' }, h("calcite-shell", { key: '017843c77fa2c52f0d957760ac3f57808d11d59f', class: "position-relative" }, h("calcite-panel", { key: 'bd8eeec3a013583789b9e1b251fed34e5896171e', class: `width-full height-full ${borderClass}` }, this._getBody(this._layoutMode, this._panelOpen, this._hideTable)), this._getFooter())));
220
+ return (h(Host, { key: '44041e4854d9d1da0f894c090e4b5455930b7a48' }, h("calcite-shell", { key: 'f11ed09226e43740677eefe01d42b70329b2485b', class: "position-relative" }, h("calcite-panel", { key: '6911478eaf00887e7b1578baba16989395dca190', class: `width-full height-full ${borderClass}` }, this._getBody(this._layoutMode, this._panelOpen, this._hideTable)), this._getFooter()), this._filterModal()));
229
221
  }
230
222
  /**
231
223
  * Called after each render
@@ -244,6 +236,12 @@ const CrowdsourceManager = class {
244
236
  */
245
237
  async componentDidLoad() {
246
238
  this._resizeObserver.observe(this.el);
239
+ // for backward compatibility if hidemaponload is true then render table layout as default
240
+ if (this.hideMapOnLoad) {
241
+ this.appLayout = 'tableView';
242
+ }
243
+ this._isMapViewOnLoad = this.appLayout === 'mapView';
244
+ this._setActiveLayout(this.appLayout);
247
245
  }
248
246
  //--------------------------------------------------------------------------
249
247
  //
@@ -261,6 +259,27 @@ const CrowdsourceManager = class {
261
259
  const deleteEnabled = this._layer?.editingEnabled && this._layer?.capabilities?.operations?.supportsDelete;
262
260
  return this._isMobile && hasSelectedFeatures && !this._hideFooter ? (h("div", { class: `width-100`, slot: "footer" }, h("div", { class: "display-flex padding-1-2" }, h("calcite-button", { appearance: "solid", id: "solutions-show", onClick: () => this.showHideMapPopupAndTable(true), width: "full" }, this._translations.view.replace("{{n}}", this._numSelected.toString())), deleteEnabled ? (h("delete-button", { class: "padding-inline-start-1 width-full", id: "solutions-delete", ids: this._layerTable.selectedIds, layer: this._layer })) : undefined))) : undefined;
263
261
  }
262
+ /**
263
+ * sets the active layout to render
264
+ * @param appLayout new app layout
265
+ *
266
+ * @protected
267
+ */
268
+ _setActiveLayout(appLayout) {
269
+ //When going to splitView layout the panel should be open
270
+ if (appLayout === 'splitView' && !this._panelOpen) {
271
+ this._toggleLayout();
272
+ }
273
+ //Move the map node based on the selected layout
274
+ //for mapView layout show map in full view and or all other layout show in the card view
275
+ //for tableView the map will be hidden using css
276
+ if (appLayout === 'mapView') {
277
+ this._showMapInFullView();
278
+ }
279
+ else {
280
+ this._showMapInCardView();
281
+ }
282
+ }
264
283
  /**
265
284
  * Get the icon name to use for the divider icon based on the current layout
266
285
  *
@@ -386,8 +405,11 @@ const CrowdsourceManager = class {
386
405
  * @protected
387
406
  */
388
407
  _getMapNode(panelOpen) {
389
- const mapContainerClass = this._layoutMode === ELayoutMode.HORIZONTAL && (!this._isMobile || panelOpen) ? "" : "adjusted-height-50";
390
- return (h("div", { class: `${mapContainerClass} overflow-hidden` }, 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"] })));
408
+ const isMapLayout = this.appLayout === 'mapView';
409
+ const isTableLayout = this.appLayout === 'tableView';
410
+ const mapContainerClass = (isMapLayout || isTableLayout) ? "position-absolute-0" : this._layoutMode === ELayoutMode.HORIZONTAL && (!this._isMobile || panelOpen) ? "" : "adjusted-height-50";
411
+ const hasMapAndLayer = this.defaultWebmap && this.defaultLayer;
412
+ return (h("div", { class: `${mapContainerClass} overflow-hidden`, id: "card-mapView" }, 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 })));
391
413
  }
392
414
  /**
393
415
  * Get the expand node for the popup information
@@ -396,11 +418,7 @@ const CrowdsourceManager = class {
396
418
  * @protected
397
419
  */
398
420
  _getPopupExpandNode() {
399
- const icon = this._expandPopup ? "chevrons-down" : "chevrons-up";
400
- const id = "expand-popup";
401
- const tooltip = this._expandPopup ? this._translations.collapsePopup : this._translations.expandPopup;
402
- const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
403
- const popupNodeClass = !this._expandPopup ? "height-full" : this.mapInfos?.length === 1 || this._isMobile ? "position-absolute-0" : "position-absolute-50";
421
+ const popupNodeClass = "height-full";
404
422
  const headerClass = this._isMobile ? "display-none height-0" : "";
405
423
  const headerTheme = this.popupHeaderColor ? "" : !this._isMobile ? "calcite-mode-dark" : "calcite-mode-light";
406
424
  const containerClass = this._isMobile && this._hideTable ? "position-absolute-0 width-full height-full" : this._isMobile ? "display-none height-0" : "";
@@ -409,16 +427,7 @@ const CrowdsourceManager = class {
409
427
  '--calcite-color-foreground-2': this.popupHeaderHoverColor, /* background color that will be displayed on button when hovered */
410
428
  '--calcite-color-text-3': this.popupHeaderTextColor, /* font color that will be displayed on button */
411
429
  '--calcite-color-text-2': this.popupHeaderTextColor, /* font color that will be displayed on popup header text*/
412
- } }, h("calcite-panel", null, !this._isMobile ? (h("div", { class: `display-flex align-items-center ${headerClass}`, slot: "header-content" }, h("calcite-icon", { icon: "information", scale: "s" }), h("div", { class: "padding-inline-start-75" }, this._translations.information))) : undefined, h("calcite-action", { class: headerClass, disabled: this._tableOnly, icon: icon, id: id, onClick: () => this._togglePopup(), slot: "header-actions-end", text: "" }), !this._tableOnly ? h("calcite-tooltip", { class: themeClass, label: "", placement: "bottom", "reference-element": id }, h("span", null, tooltip)) : undefined, this._getCardNode())));
413
- }
414
- /**
415
- * Toggle the popup information
416
- *
417
- * @protected
418
- */
419
- _togglePopup() {
420
- this._expandPopup = !this._expandPopup;
421
- this._hideMapOnLoadHonored = true;
430
+ } }, h("calcite-panel", null, !this._isMobile ? (h("div", { class: `display-flex align-items-center ${headerClass}`, slot: "header-content" }, h("calcite-icon", { icon: "information", scale: "s" }), h("div", { class: "padding-inline-start-75" }, this._translations.information))) : undefined, this._getCardNode())));
422
431
  }
423
432
  /**
424
433
  * Get the card node
@@ -427,9 +436,11 @@ const CrowdsourceManager = class {
427
436
  * @protected
428
437
  */
429
438
  _getCardNode() {
430
- const cardManagerHeight = !this._expandPopup && !this._isMobile ? "height-50" : "height-full";
439
+ const isMapLayout = this.appLayout === 'mapView';
440
+ const isTableLayout = this.appLayout === 'tableView';
441
+ const cardManagerHeight = (isMapLayout || isTableLayout) ? "height-full" : !this._isMobile ? "height-50" : "height-full";
431
442
  const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
432
- return (h("div", { class: `width-50 height-full ${themeClass}` }, h("card-manager", { class: `${cardManagerHeight} width-full`, enableEditGeometry: this?._mapInfo?.enableEditGeometry, isMobile: this._isMobile, mapView: this?._mapView, zoomAndScrollToSelected: this.zoomAndScrollToSelected })));
443
+ return (h("div", { class: `width-50 height-full ${themeClass}` }, 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 })));
433
444
  }
434
445
  /**
435
446
  * Get the table node based for the current layout
@@ -441,11 +452,11 @@ const CrowdsourceManager = class {
441
452
  * @protected
442
453
  */
443
454
  _getTable(layoutMode, panelOpen, hideTable) {
444
- const tableClass = hideTable && this._isMobile ? "visibility-hidden" : "";
455
+ const isMapLayout = this.appLayout === 'mapView';
456
+ const isTableLayout = this.appLayout === 'tableView';
457
+ const tableClass = hideTable && this._isMobile ? "visibility-hidden" : isMapLayout ? "display-none" : "";
458
+ const mapClass = isMapLayout ? "height-full width-full" : "display-none";
445
459
  const tableSizeClass = this._getTableSizeClass(layoutMode, panelOpen);
446
- const icon = this._getDividerIcon(layoutMode, panelOpen);
447
- const tooltip = panelOpen ? this._translations.close : this._translations.open;
448
- const id = "toggle-layout";
449
460
  const toggleLayout = layoutMode === ELayoutMode.HORIZONTAL ? "horizontal" : "vertical";
450
461
  const toggleSlot = layoutMode === ELayoutMode.HORIZONTAL ? "header" : "panel-start";
451
462
  const hasMapAndLayer = this.defaultWebmap && this.defaultLayer;
@@ -453,10 +464,74 @@ const CrowdsourceManager = class {
453
464
  this.defaultGlobalId?.indexOf(",") > -1 ? this.defaultGlobalId.split(",") : [this.defaultGlobalId];
454
465
  const defaultOid = !this.defaultOid ? undefined :
455
466
  this.defaultOid?.indexOf(",") > -1 ? this.defaultOid.split(",").map(o => parseInt(o, 10)) : [parseInt(this.defaultOid, 10)];
456
- return (h("calcite-shell", { class: `${tableSizeClass} ${tableClass} border-bottom` }, !this._isMobile ? (h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, h("span", null, tooltip)))) : undefined, h("div", { class: `width-full height-full position-relative` }, 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 }))));
467
+ return (h("calcite-shell", { class: `${tableSizeClass} border-bottom` }, !this._isMobile ? (h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, this.getActions(layoutMode, panelOpen))) : undefined, h("div", { class: `width-full height-full position-relative ${tableClass}` }, 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 })), h("div", { class: mapClass, id: "full-map-view" })));
468
+ }
469
+ /**
470
+ * Returns the Actions for table's node
471
+ *
472
+ * @returns Node
473
+ * @protected
474
+ */
475
+ getActions(layoutMode, panelOpen) {
476
+ const icon = this._getDividerIcon(layoutMode, panelOpen);
477
+ const tooltip = panelOpen ? this._translations.close : this._translations.open;
478
+ const id = "toggle-layout";
479
+ return (h(Fragment, null, h("calcite-action", { active: this.appLayout === 'splitView', class: "toggle-node", icon: "browser", id: "browser-action", onClick: () => { this._changeLayout('splitView'); }, text: "" }), h("calcite-tooltip", { placement: "right", "reference-element": "browser-action" }, h("span", null, this._translations.splitView)), h("calcite-action", { active: this.appLayout === 'tableView', class: "toggle-node", icon: "dock-left", id: "dock-left-action", onClick: () => { this._changeLayout('tableView'); }, text: "" }), h("calcite-tooltip", { placement: "right", "reference-element": "dock-left-action" }, h("span", null, this._translations.tableView)), h("calcite-action", { active: this.appLayout === 'mapView', class: "toggle-node", icon: "browser-map", id: "browser-map-action", onClick: () => { this._changeLayout('mapView'); }, text: "" }), h("calcite-tooltip", { placement: "right", "reference-element": "browser-map-action" }, h("span", null, this._translations.mapView)), h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), slot: "actions-end", text: "" }), h("calcite-tooltip", { placement: "bottom", "reference-element": id }, h("span", null, tooltip))));
480
+ }
481
+ /**
482
+ * Show filter component in modal
483
+ *
484
+ * @returns node to interact with any configured filters for the current layer
485
+ * @protected
486
+ */
487
+ _filterModal() {
488
+ return (h("calcite-modal", { "aria-labelledby": "modal-title", class: "modal", kind: "brand", onCalciteModalClose: () => void this._closeFilter(), open: this._filterOpen, widthScale: "s" }, h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, this._translations?.filter?.replace("{{title}}", this._layer?.title)), h("div", { slot: "content" }, 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 }))));
489
+ }
490
+ /**
491
+ * Store any filters for the current layer.
492
+ * Should only occur on layer change
493
+ *
494
+ * @protected
495
+ */
496
+ _initLayerExpressions() {
497
+ const layerExpressions = this._mapInfo?.filterConfig?.layerExpressions;
498
+ this._layerExpressions = layerExpressions ? layerExpressions.filter((exp) => exp.id === this._layer?.id) : [];
499
+ this._filterList.layerExpressions = this._layerExpressions;
500
+ this._layerExpressions.filter(lyrExp => {
501
+ return lyrExp.expressions.filter(exp => exp.active).length > 0;
502
+ }).length > 0;
503
+ }
504
+ /**
505
+ * Toggle the filter modal
506
+ *
507
+ * @protected
508
+ */
509
+ _toggleFilter() {
510
+ this._filterOpen = !this._filterOpen;
511
+ }
512
+ /**
513
+ * Reset the filter active prop
514
+ *
515
+ * @protected
516
+ */
517
+ _handleFilterListReset() {
518
+ void this._layerTable.filterReset();
519
+ }
520
+ /**
521
+ * Close the filter modal
522
+ *
523
+ * @protected
524
+ */
525
+ async _closeFilter() {
526
+ if (this._filterOpen) {
527
+ this._filterOpen = false;
528
+ void this._layerTable.closeFilter();
529
+ }
457
530
  }
458
531
  /**
459
532
  * Update the component layout when its size changes
533
+ *
534
+ * @protected
460
535
  */
461
536
  _onResize() {
462
537
  const isMobile = this.el.offsetWidth < 1024;
@@ -473,22 +548,67 @@ const CrowdsourceManager = class {
473
548
  /**
474
549
  * Open/Close the appropriate panel.
475
550
  * The panel that is toggled is dependent upon the layout mode and if using classic grid or not
551
+ *
552
+ * @protected
476
553
  */
477
554
  _toggleLayout() {
478
555
  this._panelOpen = !this._panelOpen;
479
556
  }
557
+ /**
558
+ * Changes the layout mode
559
+ * @param appLayout selected active app layout
560
+ *
561
+ * @protected
562
+ */
563
+ _changeLayout(appLayout) {
564
+ if (this.appLayout !== appLayout) {
565
+ this._setActiveLayout(appLayout);
566
+ this.appLayout = appLayout;
567
+ if (this._isMapViewOnLoad) {
568
+ void this._layerTable.refresh();
569
+ this._isMapViewOnLoad = false;
570
+ }
571
+ }
572
+ }
573
+ /**
574
+ * shows the map in card view
575
+ *
576
+ * @protected
577
+ */
578
+ _showMapInCardView() {
579
+ if (this.appLayout === 'mapView') {
580
+ const fullMapView = document.getElementById('full-map-view').childNodes[0];
581
+ const splitMapClass = document.getElementById('card-mapView');
582
+ if (fullMapView) {
583
+ splitMapClass.appendChild(fullMapView);
584
+ }
585
+ }
586
+ }
587
+ /**
588
+ * Shows the map in full view
589
+ *
590
+ * @protected
591
+ */
592
+ _showMapInFullView() {
593
+ const splitMap = document.getElementById('card-mapView').childNodes[0];
594
+ const fullMapViewClass = document.getElementById('full-map-view');
595
+ if (splitMap) {
596
+ fullMapViewClass.appendChild(splitMap);
597
+ }
598
+ }
480
599
  /**
481
600
  * Show/Hide the map, popup, and table
482
601
  *
483
602
  * @param show when true the map, popup, and table will be displayed
603
+ * @protected
484
604
  */
485
605
  showHideMapPopupAndTable(show) {
486
- this._expandPopup = false;
487
606
  this._hideTable = show;
488
607
  this._hideFooter = show;
489
608
  }
490
609
  /**
491
610
  * Get the current map info (configuration details) when maps change
611
+ * @param id map changed id
492
612
  *
493
613
  * @returns IMapInfo for the provided id
494
614
  * @protected
@@ -510,6 +630,7 @@ const CrowdsourceManager = class {
510
630
  */
511
631
  async _setMapView() {
512
632
  this._mapInfo = this._getMapInfo(this._mapChange.id);
633
+ this._enableCreateFeatures = this._mapInfo.enableCreateFeatures;
513
634
  this._mapView = this._mapChange.mapView;
514
635
  this._initMapZoom();
515
636
  this._mapView.popupEnabled = false;