@esri/solutions-components 0.6.13 → 0.6.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. package/dist/assets/t9n/layer-table/resources.json +1 -1
  2. package/dist/assets/t9n/layer-table/resources_en.json +1 -1
  3. package/dist/assets/t9n/map-layer-picker/resources.json +4 -0
  4. package/dist/assets/t9n/map-layer-picker/resources_en.json +4 -0
  5. package/dist/cjs/basemap-gallery_6.cjs.entry.js +20 -5
  6. package/dist/cjs/buffer-tools_4.cjs.entry.js +1 -1
  7. package/dist/cjs/calcite-chip_3.cjs.entry.js +803 -0
  8. package/dist/cjs/calcite-combobox_6.cjs.entry.js +76 -28
  9. package/dist/cjs/card-manager_3.cjs.entry.js +112 -54
  10. package/dist/cjs/crowdsource-manager.cjs.entry.js +18 -5
  11. package/dist/cjs/{downloadUtils-fb4744e0.js → downloadUtils-34a515ad.js} +2 -2
  12. package/dist/cjs/edit-card_2.cjs.entry.js +5 -0
  13. package/dist/cjs/{index.es-372e33de.js → index.es-0ba11065.js} +2 -2
  14. package/dist/cjs/loader.cjs.js +1 -1
  15. package/dist/cjs/map-select-tools_3.cjs.entry.js +3 -3
  16. package/dist/cjs/{mapViewUtils-a4dd36ec.js → mapViewUtils-a2884698.js} +39 -55
  17. package/dist/cjs/public-notification.cjs.entry.js +3 -3
  18. package/dist/cjs/{publicNotificationStore-b69862af.js → publicNotificationStore-610bd880.js} +0 -4
  19. package/dist/cjs/solutions-components.cjs.js +1 -1
  20. package/dist/collection/components/basemap-gallery/basemap-gallery.js +23 -1
  21. package/dist/collection/components/card-manager/card-manager.js +2 -2
  22. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +171 -5
  23. package/dist/collection/components/edit-card/edit-card.js +19 -0
  24. package/dist/collection/components/layer-table/layer-table.js +127 -47
  25. package/dist/collection/components/map-card/map-card.js +115 -5
  26. package/dist/collection/components/map-layer-picker/map-layer-picker.css +4 -0
  27. package/dist/collection/components/map-layer-picker/map-layer-picker.js +107 -27
  28. package/dist/collection/components/map-picker/map-picker.css +5 -1
  29. package/dist/collection/components/map-picker/map-picker.js +3 -3
  30. package/dist/collection/components/map-tools/map-tools.js +104 -1
  31. package/dist/collection/utils/interfaces.ts +12 -1
  32. package/dist/collection/utils/mapViewUtils.js +38 -52
  33. package/dist/collection/utils/mapViewUtils.ts +41 -57
  34. package/dist/collection/utils/publicNotificationStore.js +0 -4
  35. package/dist/collection/utils/publicNotificationStore.ts +0 -4
  36. package/dist/components/basemap-gallery2.js +2 -0
  37. package/dist/components/card-manager2.js +2 -2
  38. package/dist/components/crowdsource-manager.js +27 -6
  39. package/dist/components/edit-card2.js +5 -0
  40. package/dist/components/layer-table2.js +136 -78
  41. package/dist/components/map-card2.js +17 -5
  42. package/dist/components/map-layer-picker2.js +114 -52
  43. package/dist/components/map-picker2.js +4 -4
  44. package/dist/components/map-select-tools2.js +55 -43
  45. package/dist/components/map-tools2.js +20 -1
  46. package/dist/components/mapViewUtils.js +39 -53
  47. package/dist/components/public-notification.js +1 -1
  48. package/dist/components/publicNotificationStore.js +0 -4
  49. package/dist/components/refine-selection2.js +61 -49
  50. package/dist/esm/basemap-gallery_6.entry.js +20 -5
  51. package/dist/esm/buffer-tools_4.entry.js +1 -1
  52. package/dist/esm/calcite-chip_3.entry.js +797 -0
  53. package/dist/esm/calcite-combobox_6.entry.js +76 -28
  54. package/dist/esm/card-manager_3.entry.js +112 -54
  55. package/dist/esm/crowdsource-manager.entry.js +18 -5
  56. package/dist/esm/{downloadUtils-67c7a6c8.js → downloadUtils-ac67a786.js} +2 -2
  57. package/dist/esm/edit-card_2.entry.js +5 -0
  58. package/dist/esm/{index.es-59a67d3d.js → index.es-f553598f.js} +2 -2
  59. package/dist/esm/loader.js +1 -1
  60. package/dist/esm/map-select-tools_3.entry.js +3 -3
  61. package/dist/esm/{mapViewUtils-00a04d52.js → mapViewUtils-8141d8c1.js} +39 -53
  62. package/dist/esm/public-notification.entry.js +3 -3
  63. package/dist/esm/{publicNotificationStore-90a6a274.js → publicNotificationStore-dcf39a55.js} +0 -4
  64. package/dist/esm/solutions-components.js +1 -1
  65. package/dist/solutions-components/p-08b52ed8.entry.js +6 -0
  66. package/dist/solutions-components/p-16362eb4.js +36 -0
  67. package/dist/solutions-components/{p-3691a072.js → p-1ab414e0.js} +2 -2
  68. package/dist/solutions-components/{p-73ab9d9a.entry.js → p-3d7aa1b2.entry.js} +1 -1
  69. package/dist/solutions-components/{p-9a8c51bf.entry.js → p-57cf6784.entry.js} +1 -1
  70. package/dist/solutions-components/p-64b22d57.entry.js +6 -0
  71. package/dist/solutions-components/p-654dd5df.entry.js +6 -0
  72. package/dist/solutions-components/{p-f9166fcb.js → p-a26711e8.js} +1 -1
  73. package/dist/solutions-components/p-b1c8c6d7.entry.js +6 -0
  74. package/dist/solutions-components/{p-b892e595.entry.js → p-b9d29f30.entry.js} +1 -1
  75. package/dist/solutions-components/{p-1b41181b.js → p-c8d0ce92.js} +2 -2
  76. package/dist/solutions-components/{p-0219a1a9.entry.js → p-e76949eb.entry.js} +6 -6
  77. package/dist/solutions-components/p-ee7e2f00.entry.js +34 -0
  78. package/dist/solutions-components/solutions-components.esm.js +1 -1
  79. package/dist/solutions-components/utils/interfaces.ts +12 -1
  80. package/dist/solutions-components/utils/mapViewUtils.ts +41 -57
  81. package/dist/solutions-components/utils/publicNotificationStore.ts +0 -4
  82. package/dist/types/components/basemap-gallery/basemap-gallery.d.ts +5 -0
  83. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +37 -1
  84. package/dist/types/components/edit-card/edit-card.d.ts +8 -0
  85. package/dist/types/components/layer-table/layer-table.d.ts +40 -0
  86. package/dist/types/components/map-card/map-card.d.ts +25 -1
  87. package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +50 -3
  88. package/dist/types/components/map-picker/map-picker.d.ts +2 -2
  89. package/dist/types/components/map-tools/map-tools.d.ts +21 -1
  90. package/dist/types/components.d.ts +182 -2
  91. package/dist/types/preact.d.ts +6 -3
  92. package/dist/types/utils/interfaces.d.ts +10 -1
  93. package/dist/types/utils/mapViewUtils.d.ts +8 -24
  94. package/dist/types/utils/publicNotificationStore.d.ts +0 -2
  95. package/package.json +1 -1
  96. package/dist/cjs/calcite-chip.cjs.entry.js +0 -259
  97. package/dist/cjs/calcite-notice.cjs.entry.js +0 -139
  98. package/dist/cjs/calcite-tooltip.cjs.entry.js +0 -439
  99. package/dist/esm/calcite-chip.entry.js +0 -255
  100. package/dist/esm/calcite-notice.entry.js +0 -135
  101. package/dist/esm/calcite-tooltip.entry.js +0 -435
  102. package/dist/solutions-components/p-2cff8331.entry.js +0 -6
  103. package/dist/solutions-components/p-3a6c8fc3.entry.js +0 -6
  104. package/dist/solutions-components/p-3b1fc7a2.entry.js +0 -6
  105. package/dist/solutions-components/p-767002cd.js +0 -36
  106. package/dist/solutions-components/p-a776b7e6.entry.js +0 -6
  107. package/dist/solutions-components/p-be36d5ed.entry.js +0 -22
  108. package/dist/solutions-components/p-c644edf5.entry.js +0 -11
  109. package/dist/solutions-components/p-cfd88a2f.entry.js +0 -11
@@ -6,24 +6,25 @@
6
6
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
7
7
  import { l as loadModules } from './loadModules.js';
8
8
  import { g as getLocaleComponentStrings } from './locale.js';
9
- import { a as getMapLayerIds, g as getLayer, b as goToSelection } from './mapViewUtils.js';
9
+ import { a as goToSelection, g as getLayerOrTable } from './mapViewUtils.js';
10
10
  import { b as queryAllIds, q as queryFeaturesByID } from './queryUtils.js';
11
11
  import { d as downloadCSV } from './downloadUtils.js';
12
- import { d as defineCustomElement$n } from './action.js';
13
- import { d as defineCustomElement$m } from './action-bar.js';
14
- import { d as defineCustomElement$l } from './action-group.js';
15
- import { d as defineCustomElement$k } from './action-menu.js';
16
- import { d as defineCustomElement$j } from './alert.js';
17
- import { d as defineCustomElement$i } from './button.js';
18
- import { d as defineCustomElement$h } from './chip.js';
19
- import { d as defineCustomElement$g } from './combobox.js';
20
- import { d as defineCustomElement$f } from './combobox-item.js';
21
- import { d as defineCustomElement$e } from './dropdown.js';
22
- import { d as defineCustomElement$d } from './dropdown-group.js';
23
- import { d as defineCustomElement$c } from './dropdown-item.js';
24
- import { d as defineCustomElement$b } from './icon.js';
25
- import { d as defineCustomElement$a } from './loader.js';
26
- import { d as defineCustomElement$9 } from './modal.js';
12
+ import { d as defineCustomElement$o } from './action.js';
13
+ import { d as defineCustomElement$n } from './action-bar.js';
14
+ import { d as defineCustomElement$m } from './action-group.js';
15
+ import { d as defineCustomElement$l } from './action-menu.js';
16
+ import { d as defineCustomElement$k } from './alert.js';
17
+ import { d as defineCustomElement$j } from './button.js';
18
+ import { d as defineCustomElement$i } from './chip.js';
19
+ import { d as defineCustomElement$h } from './combobox.js';
20
+ import { d as defineCustomElement$g } from './combobox-item.js';
21
+ import { d as defineCustomElement$f } from './dropdown.js';
22
+ import { d as defineCustomElement$e } from './dropdown-group.js';
23
+ import { d as defineCustomElement$d } from './dropdown-item.js';
24
+ import { d as defineCustomElement$c } from './icon.js';
25
+ import { d as defineCustomElement$b } from './loader.js';
26
+ import { d as defineCustomElement$a } from './modal.js';
27
+ import { d as defineCustomElement$9 } from './notice.js';
27
28
  import { d as defineCustomElement$8 } from './option.js';
28
29
  import { d as defineCustomElement$7 } from './panel.js';
29
30
  import { d as defineCustomElement$6 } from './popover.js';
@@ -63,6 +64,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
63
64
  this.enableInlineEdit = undefined;
64
65
  this.mapInfo = undefined;
65
66
  this.mapView = undefined;
67
+ this.onlyShowUpdatableLayers = undefined;
66
68
  this.showNewestFirst = undefined;
67
69
  this.zoomAndScrollToSelected = undefined;
68
70
  this._alertOpen = false;
@@ -83,13 +85,12 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
83
85
  * watch for changes in map view and get the first layer
84
86
  */
85
87
  async mapViewWatchHandler() {
86
- this._fetchingData = true;
87
- const mapLayerIds = await getMapLayerIds(this.mapView);
88
- this._layer = await getLayer(this.mapView, mapLayerIds[0]);
89
- this.reactiveUtils.on(() => this.mapView, "click", (event) => {
88
+ if (this._mapClickHandle) {
89
+ this._mapClickHandle.remove();
90
+ }
91
+ this._mapClickHandle = this.reactiveUtils.on(() => this.mapView, "click", (event) => {
90
92
  void this._mapClicked(event);
91
93
  });
92
- this._fetchingData = false;
93
94
  }
94
95
  /**
95
96
  * watch for changes in layer view and verify if it has editing enabled
@@ -146,6 +147,22 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
146
147
  }
147
148
  }
148
149
  }
150
+ /**
151
+ * Refresh the table when edits are completed
152
+ *
153
+ */
154
+ editsComplete() {
155
+ this._refresh();
156
+ }
157
+ /**
158
+ * Refresh the table when edits are completed
159
+ *
160
+ */
161
+ noLayersFound() {
162
+ this._layer = undefined;
163
+ this._allIds = [];
164
+ this._clearSelection();
165
+ }
149
166
  //--------------------------------------------------------------------------
150
167
  //
151
168
  // Functions (lifecycle)
@@ -164,9 +181,6 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
164
181
  * Renders the component.
165
182
  */
166
183
  render() {
167
- if (!this._layer) {
168
- return null;
169
- }
170
184
  const tableNodeClass = this._fetchingData ? "display-none" : "";
171
185
  const loadingClass = this._fetchingData ? "" : "display-none";
172
186
  const total = this._allIds.length.toString();
@@ -204,9 +218,37 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
204
218
  */
205
219
  _getTableControlRow(slot) {
206
220
  const featuresSelected = this._selectedIndexes.length > 0;
207
- return (h("div", { class: "display-flex table-border height-51", slot: slot }, h("calcite-action-bar", { expandDisabled: true, expanded: true, layout: "horizontal" }, h("div", { class: "border-end" }, h("map-layer-picker", { appearance: "transparent", mapView: this.mapView, onLayerSelectionChange: (evt) => this._layerSelectionChanged(evt), placeholderIcon: "layers", scale: "l", type: "dropdown" })), h("calcite-action", { appearance: "solid", disabled: !featuresSelected, icon: "magnifying-glass", id: "magnifying-glass", label: this._translations.zoom, onClick: () => this._zoom(), text: this._translations.zoom, textEnabled: true }), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "magnifying-glass" }, h("span", null, this._translations.zoom)), h("calcite-action", { appearance: "solid", icon: "filter", id: "filter", onClick: () => this._filter(), text: this._translations.filters, "text-enabled": "true", textEnabled: true }), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "filter" }, h("span", null, this._translations.filters)), h("calcite-action", { appearance: "solid", disabled: !featuresSelected, id: "trash", onClick: () => this._delete(), text: "" }, h("calcite-button", { appearance: "transparent", iconStart: "trash", kind: "danger" }, this._translations.delete)), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "trash" }, h("span", null, this._translations.delete)), h("calcite-action", { appearance: "solid", disabled: !featuresSelected, icon: "erase", id: "erase", onClick: () => this._clearSelection(), text: this._translations.clearSelection, "text-enabled": "true", textEnabled: true }), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "erase" }, h("span", null, this._translations.clearSelection))), h("calcite-dropdown", null, h("calcite-action", { appearance: "solid", label: "", slot: "trigger", text: "" }, h("calcite-button", { appearance: "transparent", iconEnd: "chevron-down", kind: "neutral" }, this._translations.more)), h("calcite-dropdown-group", { "selection-mode": "none" }, h("calcite-dropdown-item", { iconStart: "list-check-all", onClick: () => this._selectAll() }, this._translations.selectAll), h("calcite-dropdown-item", { iconStart: "selected-items-filter", onClick: () => this._toggleShowSelected() }, this._showOnlySelected ? this._translations.showAll :
221
+ return (h("div", { class: "display-flex table-border height-51", slot: slot }, h("calcite-action-bar", { expandDisabled: true, expanded: true, layout: "horizontal" }, h("div", { class: "border-end" }, h("map-layer-picker", { appearance: "transparent", mapView: this.mapView, onLayerSelectionChange: (evt) => this._layerSelectionChanged(evt), onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, placeholderIcon: "layers", scale: "l", type: "dropdown" })), this._getAction("zoom-to-object", this._translations.zoom, () => this._zoom(), !featuresSelected), this._getAction("filter", this._translations.filters, () => this._filter(), false), this._deleteEnabled ? this._getDangerAction("trash", this._translations.delete, () => this._delete(), !featuresSelected) : undefined, this._getAction("erase", this._translations.clearSelection, () => this._clearSelection(), !featuresSelected)), h("calcite-dropdown", { disabled: this._layer === undefined }, h("calcite-action", { appearance: "solid", label: "", slot: "trigger", text: "" }, h("calcite-button", { appearance: "transparent", iconEnd: "chevron-down", kind: "neutral" }, this._translations.more)), h("calcite-dropdown-group", { "selection-mode": "none" }, h("calcite-dropdown-item", { iconStart: "list-check-all", onClick: () => this._selectAll() }, this._translations.selectAll), h("calcite-dropdown-item", { iconStart: "selected-items-filter", onClick: () => this._toggleShowSelected() }, this._showOnlySelected ? this._translations.showAll :
208
222
  this._translations.showSelected), h("calcite-dropdown-item", { iconStart: "compare", onClick: () => this._switchSelected() }, this._translations.switchSelected), h("calcite-dropdown-item", { iconStart: "refresh", onClick: () => this._refresh() }, this._translations.refresh), h("calcite-dropdown-item", { iconStart: "export", onClick: () => void this._exportToCSV() }, this._translations.exportCSV)))));
209
223
  }
224
+ /**
225
+ * Get an action and tooltip
226
+ *
227
+ * @param icon string the name of the icon to display, will also be used as the id
228
+ * @param label string the text to display and label the action
229
+ * @param func any the function to execute
230
+ * @param disabled boolean when true the user will not be able to interact with the action
231
+ *
232
+ * @returns VNode The node representing the DOM element that will contain the action
233
+ */
234
+ _getAction(icon, label, func, disabled) {
235
+ const _disabled = this._layer === undefined ? true : disabled;
236
+ return (h("div", { class: "display-flex" }, h("calcite-action", { appearance: "solid", disabled: _disabled, icon: icon, id: icon, label: label, onClick: func, text: label, textEnabled: true }), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": icon }, h("span", null, label))));
237
+ }
238
+ /**
239
+ * Get an action with danger color icon and text
240
+ *
241
+ * @param icon string the name of the icon to display, will also be used as the id
242
+ * @param label string the text to display and label the action
243
+ * @param func any the function to execute
244
+ * @param disabled boolean when true the user will not be able to interact with the action
245
+ *
246
+ * @returns VNode The node representing the DOM element that will contain the action
247
+ */
248
+ _getDangerAction(icon, label, func, disabled) {
249
+ const _disabled = this._layer === undefined ? true : disabled;
250
+ return (h("div", { class: "display-flex" }, h("calcite-action", { appearance: "solid", disabled: _disabled, id: icon, onClick: func, text: "" }, h("calcite-button", { appearance: "transparent", iconStart: icon, kind: "danger" }, label)), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": icon }, h("span", null, label))));
251
+ }
210
252
  /**
211
253
  * Initialize the FeatureTable
212
254
  *
@@ -216,7 +258,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
216
258
  */
217
259
  async _getTable(node, columnTemplates) {
218
260
  if (this._layer) {
219
- await this._layer.when(async () => {
261
+ await this._layer.when(() => {
220
262
  this._table = new this.FeatureTable({
221
263
  autoRefreshEnabled: this.enableAutoRefresh,
222
264
  layer: this._layer,
@@ -233,25 +275,25 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
233
275
  },
234
276
  container: node
235
277
  });
236
- this._checkEditEnabled();
237
- await this._table.when(async () => {
238
- this._table.highlightIds.on("change", () => {
239
- this._selectedIndexes = this._table.highlightIds.toArray();
240
- if (this._showOnlySelected) {
241
- if (this._selectedIndexes.length > 0) {
242
- this._table.filterBySelection();
243
- }
244
- else {
245
- this._toggleShowSelected();
246
- }
278
+ });
279
+ this._checkEditEnabled();
280
+ await this._table.when(() => {
281
+ this._table.highlightIds.on("change", () => {
282
+ this._selectedIndexes = this._table.highlightIds.toArray();
283
+ if (this._showOnlySelected) {
284
+ if (this._selectedIndexes.length > 0) {
285
+ this._table.filterBySelection();
247
286
  }
248
- this.featureSelectionChange.emit(this._selectedIndexes);
249
- });
250
- this.reactiveUtils.watch(() => this._table.activeSortOrders, (sortOrders) => {
251
- var _a, _b, _c, _d;
252
- this._sortActive = (sortOrders.length > 0 && ((_a = sortOrders[0]) === null || _a === void 0 ? void 0 : _a.direction) === "asc" || ((_b = sortOrders[0]) === null || _b === void 0 ? void 0 : _b.direction) === "desc") ||
253
- ((_c = sortOrders[0]) === null || _c === void 0 ? void 0 : _c.direction) === null && ((_d = sortOrders[0]) === null || _d === void 0 ? void 0 : _d.fieldName) === this._layer.objectIdField;
254
- });
287
+ else {
288
+ this._toggleShowSelected();
289
+ }
290
+ }
291
+ this.featureSelectionChange.emit(this._selectedIndexes);
292
+ });
293
+ this.reactiveUtils.watch(() => this._table.activeSortOrders, (sortOrders) => {
294
+ var _a, _b, _c, _d;
295
+ this._sortActive = this._layer ? (sortOrders.length > 0 && ((_a = sortOrders[0]) === null || _a === void 0 ? void 0 : _a.direction) === "asc" || ((_b = sortOrders[0]) === null || _b === void 0 ? void 0 : _b.direction) === "desc") ||
296
+ ((_c = sortOrders[0]) === null || _c === void 0 ? void 0 : _c.direction) === null && ((_d = sortOrders[0]) === null || _d === void 0 ? void 0 : _d.fieldName) === this._layer.objectIdField : false;
255
297
  });
256
298
  });
257
299
  }
@@ -262,20 +304,30 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
262
304
  * @returns void
263
305
  */
264
306
  async _resetTable() {
265
- if (this._layer && this._table) {
307
+ if (this._table) {
266
308
  this._clearSelection();
267
309
  this._allIds = [];
268
310
  this.featureSelectionChange.emit(this._selectedIndexes);
269
- const columnTemplates = this._getColumnTemplates(this._layer.id);
270
- this._table.layer = this._layer;
271
- this._table.tableTemplate.columnTemplates = columnTemplates;
272
- this._checkEditEnabled();
273
- this._table.view = this.mapView;
274
- this._table.editingEnabled = this._editEnabled;
275
- this._table.clearSelectionFilter();
276
- this._showOnlySelected = false;
277
- this._sortActive = false;
278
- await this._sortTable();
311
+ if (this._layer) {
312
+ await this._layer.when(() => {
313
+ const columnTemplates = this._getColumnTemplates(this._layer.id);
314
+ this._table.layer = this._layer;
315
+ this._table.tableTemplate.columnTemplates = columnTemplates;
316
+ this._table.view = this.mapView;
317
+ this._checkEditEnabled();
318
+ this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
319
+ });
320
+ await this._table.when(() => {
321
+ this._table.clearSelectionFilter();
322
+ });
323
+ this._showOnlySelected = false;
324
+ this._sortActive = false;
325
+ await this._sortTable();
326
+ }
327
+ else {
328
+ this._table.view = this.mapView;
329
+ this._table.layer = this._layer;
330
+ }
279
331
  }
280
332
  }
281
333
  /**
@@ -296,11 +348,10 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
296
348
  if (this._table && this._layer && !this._sortActive) {
297
349
  if (!this._tableSorting && this.showNewestFirst) {
298
350
  this._tableSorting = true;
299
- await this._table.when(async () => {
300
- await this._layer.when(async () => {
301
- this._table.sortColumn(this._layer.objectIdField, "desc");
302
- this._tableSorting = false;
303
- });
351
+ await this._table.when();
352
+ await this._layer.when(() => {
353
+ this._table.sortColumn(this._layer.objectIdField, "desc");
354
+ this._tableSorting = false;
304
355
  });
305
356
  }
306
357
  }
@@ -498,11 +549,12 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
498
549
  * @returns a promise that will resolve when the operation is complete
499
550
  */
500
551
  async _layerSelectionChanged(evt) {
552
+ var _a;
501
553
  const id = evt.detail[0];
502
- if (id !== this._layer.id || this._allIds.length === 0) {
554
+ if (id !== ((_a = this._layer) === null || _a === void 0 ? void 0 : _a.id) || this._allIds.length === 0) {
503
555
  this._fetchingData = true;
504
556
  const columnTemplates = this._getColumnTemplates(id);
505
- this._layer = await getLayer(this.mapView, id);
557
+ this._layer = await getLayerOrTable(this.mapView, id);
506
558
  this._allIds = await queryAllIds(this._layer);
507
559
  if (!this._table) {
508
560
  await this._getTable(this._tableNode, columnTemplates);
@@ -561,6 +613,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
561
613
  "enableInlineEdit": [4, "enable-inline-edit"],
562
614
  "mapInfo": [16],
563
615
  "mapView": [16],
616
+ "onlyShowUpdatableLayers": [4, "only-show-updatable-layers"],
564
617
  "showNewestFirst": [4, "show-newest-first"],
565
618
  "zoomAndScrollToSelected": [4, "zoom-and-scroll-to-selected"],
566
619
  "_alertOpen": [32],
@@ -572,12 +625,12 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
572
625
  "_sortActive": [32],
573
626
  "_translations": [32],
574
627
  "getSelectedGraphics": [64]
575
- }, [[8, "selectionChanged", "selectionChanged"]]]);
628
+ }, [[8, "selectionChanged", "selectionChanged"], [8, "editsComplete", "editsComplete"], [8, "noLayersFound", "noLayersFound"]]]);
576
629
  function defineCustomElement() {
577
630
  if (typeof customElements === "undefined") {
578
631
  return;
579
632
  }
580
- const components = ["layer-table", "calcite-action", "calcite-action-bar", "calcite-action-group", "calcite-action-menu", "calcite-alert", "calcite-button", "calcite-chip", "calcite-combobox", "calcite-combobox-item", "calcite-dropdown", "calcite-dropdown-group", "calcite-dropdown-item", "calcite-icon", "calcite-loader", "calcite-modal", "calcite-option", "calcite-panel", "calcite-popover", "calcite-scrim", "calcite-select", "calcite-shell", "calcite-tooltip", "map-layer-picker"];
633
+ const components = ["layer-table", "calcite-action", "calcite-action-bar", "calcite-action-group", "calcite-action-menu", "calcite-alert", "calcite-button", "calcite-chip", "calcite-combobox", "calcite-combobox-item", "calcite-dropdown", "calcite-dropdown-group", "calcite-dropdown-item", "calcite-icon", "calcite-loader", "calcite-modal", "calcite-notice", "calcite-option", "calcite-panel", "calcite-popover", "calcite-scrim", "calcite-select", "calcite-shell", "calcite-tooltip", "map-layer-picker"];
581
634
  components.forEach(tagName => { switch (tagName) {
582
635
  case "layer-table":
583
636
  if (!customElements.get(tagName)) {
@@ -586,75 +639,80 @@ function defineCustomElement() {
586
639
  break;
587
640
  case "calcite-action":
588
641
  if (!customElements.get(tagName)) {
589
- defineCustomElement$n();
642
+ defineCustomElement$o();
590
643
  }
591
644
  break;
592
645
  case "calcite-action-bar":
593
646
  if (!customElements.get(tagName)) {
594
- defineCustomElement$m();
647
+ defineCustomElement$n();
595
648
  }
596
649
  break;
597
650
  case "calcite-action-group":
598
651
  if (!customElements.get(tagName)) {
599
- defineCustomElement$l();
652
+ defineCustomElement$m();
600
653
  }
601
654
  break;
602
655
  case "calcite-action-menu":
603
656
  if (!customElements.get(tagName)) {
604
- defineCustomElement$k();
657
+ defineCustomElement$l();
605
658
  }
606
659
  break;
607
660
  case "calcite-alert":
608
661
  if (!customElements.get(tagName)) {
609
- defineCustomElement$j();
662
+ defineCustomElement$k();
610
663
  }
611
664
  break;
612
665
  case "calcite-button":
613
666
  if (!customElements.get(tagName)) {
614
- defineCustomElement$i();
667
+ defineCustomElement$j();
615
668
  }
616
669
  break;
617
670
  case "calcite-chip":
618
671
  if (!customElements.get(tagName)) {
619
- defineCustomElement$h();
672
+ defineCustomElement$i();
620
673
  }
621
674
  break;
622
675
  case "calcite-combobox":
623
676
  if (!customElements.get(tagName)) {
624
- defineCustomElement$g();
677
+ defineCustomElement$h();
625
678
  }
626
679
  break;
627
680
  case "calcite-combobox-item":
628
681
  if (!customElements.get(tagName)) {
629
- defineCustomElement$f();
682
+ defineCustomElement$g();
630
683
  }
631
684
  break;
632
685
  case "calcite-dropdown":
633
686
  if (!customElements.get(tagName)) {
634
- defineCustomElement$e();
687
+ defineCustomElement$f();
635
688
  }
636
689
  break;
637
690
  case "calcite-dropdown-group":
638
691
  if (!customElements.get(tagName)) {
639
- defineCustomElement$d();
692
+ defineCustomElement$e();
640
693
  }
641
694
  break;
642
695
  case "calcite-dropdown-item":
643
696
  if (!customElements.get(tagName)) {
644
- defineCustomElement$c();
697
+ defineCustomElement$d();
645
698
  }
646
699
  break;
647
700
  case "calcite-icon":
648
701
  if (!customElements.get(tagName)) {
649
- defineCustomElement$b();
702
+ defineCustomElement$c();
650
703
  }
651
704
  break;
652
705
  case "calcite-loader":
653
706
  if (!customElements.get(tagName)) {
654
- defineCustomElement$a();
707
+ defineCustomElement$b();
655
708
  }
656
709
  break;
657
710
  case "calcite-modal":
711
+ if (!customElements.get(tagName)) {
712
+ defineCustomElement$a();
713
+ }
714
+ break;
715
+ case "calcite-notice":
658
716
  if (!customElements.get(tagName)) {
659
717
  defineCustomElement$9();
660
718
  }
@@ -36,10 +36,16 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
36
36
  super();
37
37
  this.__registerHost();
38
38
  this.mapChanged = createEvent(this, "mapChanged", 7);
39
+ this.beforeMapChanged = createEvent(this, "beforeMapChanged", 7);
39
40
  /**
40
41
  * string: the id of map currently displayed
41
42
  */
42
43
  this._loadedId = "";
44
+ this.enableLegend = undefined;
45
+ this.enableFullscreen = undefined;
46
+ this.enableSearch = undefined;
47
+ this.enableBasemap = undefined;
48
+ this.basemapConfig = undefined;
43
49
  this.mapInfos = [];
44
50
  this.mapView = undefined;
45
51
  this._searchConfiguration = undefined;
@@ -66,7 +72,7 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
66
72
  * Renders the component.
67
73
  */
68
74
  render() {
69
- return (h(Host, null, h("map-picker", { mapInfos: this.mapInfos }), h("div", { class: "map-height", ref: (el) => (this._mapDiv = el) }), h("map-tools", { class: "box-shadow", mapView: this.mapView, ref: (el) => this._mapTools = el, searchConfiguration: this._searchConfiguration })));
75
+ return (h(Host, null, h("map-picker", { mapInfos: this.mapInfos }), h("div", { class: "map-height", ref: (el) => (this._mapDiv = el) }), h("map-tools", { basemapConfig: this.basemapConfig, class: "box-shadow", enableBasemap: this.enableBasemap, enableFullscreen: this.enableFullscreen, enableLegend: this.enableLegend, enableSearch: this.enableSearch, mapView: this.mapView, ref: (el) => this._mapTools = el, searchConfiguration: this._searchConfiguration })));
70
76
  }
71
77
  //--------------------------------------------------------------------------
72
78
  //
@@ -116,22 +122,28 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
116
122
  });
117
123
  this._loadedId = id;
118
124
  this._searchConfiguration = this._webMapInfo.searchConfiguration;
119
- this.mapChanged.emit({
120
- id: id,
121
- mapView: this.mapView
122
- });
125
+ this.beforeMapChanged.emit();
123
126
  await this.mapView.when(() => {
124
127
  const home = new this.Home({
125
128
  view: this.mapView
126
129
  });
127
130
  this.mapView.ui.add(home, { position: "top-left", index: 3 });
128
131
  this.mapView.ui.add(this._mapTools, { position: "top-right", index: 0 });
132
+ this.mapChanged.emit({
133
+ id: id,
134
+ mapView: this.mapView
135
+ });
129
136
  });
130
137
  }
131
138
  }
132
139
  get el() { return this; }
133
140
  static get style() { return mapCardCss; }
134
141
  }, [0, "map-card", {
142
+ "enableLegend": [4, "enable-legend"],
143
+ "enableFullscreen": [4, "enable-fullscreen"],
144
+ "enableSearch": [4, "enable-search"],
145
+ "enableBasemap": [4, "enable-basemap"],
146
+ "basemapConfig": [16],
135
147
  "mapInfos": [16],
136
148
  "mapView": [16],
137
149
  "_searchConfiguration": [32],