@esri/solutions-components 0.6.27 → 0.6.29

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 (50) hide show
  1. package/dist/cjs/basemap-gallery_7.cjs.entry.js +2 -2
  2. package/dist/cjs/calcite-alert_3.cjs.entry.js +1 -1
  3. package/dist/cjs/calcite-combobox_6.cjs.entry.js +2 -2
  4. package/dist/cjs/card-manager_3.cjs.entry.js +335 -16
  5. package/dist/cjs/crowdsource-manager.cjs.entry.js +4 -4
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/solutions-components.cjs.js +1 -1
  8. package/dist/collection/components/basemap-gallery/basemap-gallery.js +2 -2
  9. package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +0 -4
  10. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +3 -3
  11. package/dist/collection/components/edit-card/edit-card.js +1 -1
  12. package/dist/collection/components/layer-table/layer-table.css +6 -2
  13. package/dist/collection/components/layer-table/layer-table.js +337 -10
  14. package/dist/collection/components/map-card/map-card.js +2 -5
  15. package/dist/collection/components/map-layer-picker/map-layer-picker.js +2 -2
  16. package/dist/collection/demos/crowdsource-manager.html +0 -3
  17. package/dist/collection/utils/interfaces.ts +14 -0
  18. package/dist/components/basemap-gallery2.js +2 -2
  19. package/dist/components/crowdsource-manager.js +4 -4
  20. package/dist/components/edit-card2.js +1 -1
  21. package/dist/components/layer-table2.js +336 -11
  22. package/dist/components/map-card2.js +2 -5
  23. package/dist/components/map-layer-picker2.js +2 -2
  24. package/dist/esm/basemap-gallery_7.entry.js +2 -2
  25. package/dist/esm/calcite-alert_3.entry.js +1 -1
  26. package/dist/esm/calcite-combobox_6.entry.js +2 -2
  27. package/dist/esm/card-manager_3.entry.js +335 -16
  28. package/dist/esm/crowdsource-manager.entry.js +4 -4
  29. package/dist/esm/loader.js +1 -1
  30. package/dist/esm/polyfills/core-js.js +11 -0
  31. package/dist/esm/polyfills/dom.js +79 -0
  32. package/dist/esm/polyfills/es5-html-element.js +1 -0
  33. package/dist/esm/polyfills/index.js +34 -0
  34. package/dist/esm/polyfills/system.js +6 -0
  35. package/dist/esm/solutions-components.js +1 -1
  36. package/dist/solutions-components/demos/crowdsource-manager.html +0 -3
  37. package/dist/solutions-components/{p-5e446b18.entry.js → p-190c83b9.entry.js} +1 -1
  38. package/dist/solutions-components/p-3c702004.entry.js +6 -0
  39. package/dist/solutions-components/p-d44ad6c4.entry.js +6 -0
  40. package/dist/solutions-components/p-f2dcb05a.entry.js +6 -0
  41. package/dist/solutions-components/{p-3fe6368e.entry.js → p-f8687049.entry.js} +1 -1
  42. package/dist/solutions-components/solutions-components.esm.js +1 -1
  43. package/dist/solutions-components/utils/interfaces.ts +14 -0
  44. package/dist/types/components/layer-table/layer-table.d.ts +140 -4
  45. package/dist/types/components/map-card/map-card.d.ts +0 -1
  46. package/dist/types/utils/interfaces.d.ts +12 -0
  47. package/package.json +1 -1
  48. package/dist/solutions-components/p-25729b41.entry.js +0 -6
  49. package/dist/solutions-components/p-8144c528.entry.js +0 -6
  50. package/dist/solutions-components/p-ea238bbc.entry.js +0 -6
@@ -93,9 +93,9 @@ const BasemapGallery = class {
93
93
  }
94
94
  const source = new this.PortalBasemapsSource({
95
95
  query: ((_a = this.basemapConfig) === null || _a === void 0 ? void 0 : _a.basemapGroupId) ? `id:${this.basemapConfig.basemapGroupId}` : null,
96
- filterFunction: (basemap) => {
96
+ filterFunction: this.basemapConfig ? (basemap) => {
97
97
  return !this.basemapConfig.basemapIdsToFilter.includes(basemap.portalItem.id);
98
- }
98
+ } : () => true
99
99
  });
100
100
  await source.refresh();
101
101
  this.basemapWidget = new this.BasemapGallery({
@@ -445,7 +445,7 @@ const EditCard = class {
445
445
  const container = document.createElement("div");
446
446
  this._editor = new this.Editor({
447
447
  allowedWorkflows: "update",
448
- //view: this.mapView,
448
+ view: this.mapView,
449
449
  layerInfos: [{
450
450
  layer: this._layer,
451
451
  geometryUpdatesEnabled: false
@@ -1870,8 +1870,8 @@ const MapLayerPicker = class {
1870
1870
  const mapTableIds = this.showTables ? this.onlyShowUpdatableLayers ?
1871
1871
  this._getEditableIds(this._tableNameHash) : Object.keys(this._tableNameHash) : [];
1872
1872
  this.ids = [
1873
- ...mapLayerIds.filter(n => { var _a; return ((_a = this.enabledLayerIds) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.enabledLayerIds.indexOf(n) > -1 : true; }),
1874
- ...mapTableIds.filter(n => { var _a; return ((_a = this.enabledTableIds) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.enabledTableIds.indexOf(n) > -1 : true; }),
1873
+ ...mapLayerIds.reverse().filter(n => { var _a; return ((_a = this.enabledLayerIds) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.enabledLayerIds.reverse().indexOf(n) > -1 : true; }),
1874
+ ...mapTableIds.reverse().filter(n => { var _a; return ((_a = this.enabledTableIds) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.enabledTableIds.reverse().indexOf(n) > -1 : true; }),
1875
1875
  ];
1876
1876
  }
1877
1877
  }
@@ -103,7 +103,7 @@ const CardManager = class {
103
103
  };
104
104
  CardManager.style = cardManagerCss;
105
105
 
106
- const layerTableCss = ":host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-ui-border-2)}.border-end{border-inline-end:1px solid var(--calcite-ui-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51{height:51px}.bottom-left{position:absolute;left:0;bottom:0}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0}.background{background-color:var(--calcite-ui-background)}.text-color{color:var(--calcite-ui-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-ui-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{padding:var(--lumo-space-xs) var(--lumo-space-m) !important;font-size:14px !important}";
106
+ const layerTableCss = ":host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-ui-border-2)}.border-end{border-inline-end:1px solid var(--calcite-ui-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51{height:51px}.bottom-left{position:absolute;left:5;bottom:0}html[dir=\"rtl\"] .bottom-left{position:absolute;right:5;bottom:0}.height-19{height:19px}.background{background-color:var(--calcite-ui-background)}.text-color{color:var(--calcite-ui-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-ui-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{padding:var(--lumo-space-xs) var(--lumo-space-m) !important;font-size:14px !important}";
107
107
 
108
108
  const LayerTable = class {
109
109
  constructor(hostRef) {
@@ -138,6 +138,7 @@ const LayerTable = class {
138
138
  this.showNewestFirst = undefined;
139
139
  this.zoomAndScrollToSelected = undefined;
140
140
  this._confirmDelete = false;
141
+ this._controlsThatFit = undefined;
141
142
  this._fetchingData = false;
142
143
  this._isDeleting = false;
143
144
  this._layer = undefined;
@@ -151,6 +152,22 @@ const LayerTable = class {
151
152
  // Watch handlers
152
153
  //
153
154
  //--------------------------------------------------------------------------
155
+ /**
156
+ * watch for changes to the list of controls that will currently fit in the display
157
+ */
158
+ _controlsThatFitWatchHandler() {
159
+ const ids = this._controlsThatFit ? this._controlsThatFit.reduce((prev, cur) => {
160
+ prev.push(cur.id);
161
+ return prev;
162
+ }, []) : [];
163
+ this._toolInfos = this._toolInfos.map(ti => {
164
+ if (ti && this._controlsThatFit) {
165
+ const id = this._getId(ti.icon);
166
+ ti.isOverflow = ids.indexOf(id) < 0;
167
+ return ti;
168
+ }
169
+ });
170
+ }
154
171
  /**
155
172
  * watch for changes in map view and get the first layer
156
173
  */
@@ -172,6 +189,12 @@ const LayerTable = class {
172
189
  await this._resetTable();
173
190
  this._fetchingData = false;
174
191
  }
192
+ /**
193
+ * watch for selection changes
194
+ */
195
+ async _selectedIndexesWatchHandler() {
196
+ this._validateEnabledActions();
197
+ }
175
198
  /**
176
199
  * When sortActive is false the user has not defined a sort and we should use the default sort
177
200
  */
@@ -209,8 +232,8 @@ const LayerTable = class {
209
232
  * Refresh the table when edits are completed
210
233
  *
211
234
  */
212
- editsComplete() {
213
- this._refresh();
235
+ async editsComplete() {
236
+ await this._refresh();
214
237
  }
215
238
  /**
216
239
  * Refresh the table when edits are completed
@@ -234,6 +257,8 @@ const LayerTable = class {
234
257
  async componentWillLoad() {
235
258
  await this._getTranslations();
236
259
  await this._initModules();
260
+ this._initToolInfos();
261
+ this._resizeObserver = new ResizeObserver(() => this._onResize());
237
262
  }
238
263
  /**
239
264
  * Renders the component.
@@ -243,10 +268,22 @@ const LayerTable = class {
243
268
  const loadingClass = this._fetchingData ? "" : "display-none";
244
269
  const total = this._allIds.length.toString();
245
270
  const selected = this._selectedIndexes.length.toString();
246
- return (index.h(index.Host, null, index.h("calcite-shell", null, this._getTableControlRow("header"), index.h("div", { class: "height-full-adjusted width-full" }, index.h("calcite-panel", { class: "height-full width-full" }, index.h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData, scale: "l" }), index.h("div", { class: tableNodeClass, ref: this.onTableNodeCreate })), index.h("div", { class: "bottom-left text-color" }, this._translations.recordsSelected
271
+ return (index.h(index.Host, null, index.h("calcite-shell", null, this._getTableControlRow("header"), index.h("div", { class: "height-full-adjusted width-full" }, index.h("calcite-panel", { class: "height-full width-full" }, index.h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData, scale: "l" }), index.h("div", { class: tableNodeClass, ref: this.onTableNodeCreate })), index.h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
247
272
  .replace("{{total}}", total)
248
273
  .replace("{{selected}}", selected)))), this._deleteMessage()));
249
274
  }
275
+ /**
276
+ * Called once after the component is loaded
277
+ */
278
+ async componentDidLoad() {
279
+ this._resizeObserver.observe(this._toolbar);
280
+ }
281
+ /**
282
+ * Called after the component is rendered
283
+ */
284
+ componentDidRender() {
285
+ this._updateToolbar();
286
+ }
250
287
  //--------------------------------------------------------------------------
251
288
  //
252
289
  // Functions (protected)
@@ -267,6 +304,14 @@ const LayerTable = class {
267
304
  this.FeatureTable = FeatureTable;
268
305
  this.reactiveUtils = reactiveUtils;
269
306
  }
307
+ /**
308
+ * Update the toolbar when its size changes
309
+ *
310
+ * @returns void
311
+ */
312
+ _onResize() {
313
+ this._updateToolbar();
314
+ }
270
315
  /**
271
316
  * Gets a row of controls that can be used for various interactions with the table
272
317
  *
@@ -275,11 +320,261 @@ const LayerTable = class {
275
320
  * @returns The dom node that contains the controls
276
321
  */
277
322
  _getTableControlRow(slot) {
323
+ const id = "more-table-options";
324
+ return (index.h("div", { class: "display-flex border-bottom height-51", ref: (el) => this._toolbar = el, slot: slot }, this._getActionBar(), this._getDropdown(id), this._getToolTip("", "bottom", id, this._translations.moreOptions)));
325
+ }
326
+ /**
327
+ * Gets a row of controls that can be used for various interactions with the table
328
+ *
329
+ * @param slot string optional slot to display the control within
330
+ *
331
+ * @returns The dom node that contains the controls
332
+ */
333
+ _getActionBar() {
334
+ return (index.h("calcite-action-bar", { expandDisabled: true, expanded: true, id: this._getId("bar"), layout: "horizontal" }, index.h("div", { class: "border-end", id: "solutions-map-layer-picker-container" }, index.h("map-layer-picker", { appearance: "transparent", mapView: this.mapView, onLayerSelectionChange: (evt) => this._layerSelectionChanged(evt), onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, placeholderIcon: "layers", scale: "l", showTables: true, type: "dropdown" })), this._getActions()));
335
+ }
336
+ /**
337
+ * Get the actions that are used for various interactions with the table
338
+ *
339
+ * @returns VNode[] the action nodes
340
+ */
341
+ _getActions() {
342
+ const actions = this._getActionItems();
343
+ return actions.reduce((prev, cur) => {
344
+ if (cur && !cur.isOverflow) {
345
+ prev.push(cur.isDanger ?
346
+ this._getDangerAction(cur.icon, cur.label, cur.func, cur.disabled) :
347
+ this._getAction(cur.icon, cur.label, cur.func, cur.disabled));
348
+ }
349
+ return prev;
350
+ }, []);
351
+ }
352
+ /**
353
+ * Update actions enabled prop based on number of selected indexes
354
+ *
355
+ * @returns void
356
+ */
357
+ _validateEnabledActions() {
358
+ const featuresSelected = this._selectedIndexes.length > 0;
359
+ const selectionDependant = [
360
+ "zoom-to-object",
361
+ "trash",
362
+ "erase",
363
+ "selected-items-filter"
364
+ ];
365
+ this._toolInfos.forEach(ti => {
366
+ if (ti && selectionDependant.indexOf(ti.icon) > -1) {
367
+ ti.disabled = !featuresSelected;
368
+ }
369
+ });
370
+ }
371
+ /**
372
+ * Get the full list of toolInfos.
373
+ * Order is important. They should be listed in the order they should display in the UI from
374
+ * Left to Right for the action bar and Top to Bottom for the dropdown.
375
+ *
376
+ * @returns void
377
+ */
378
+ _initToolInfos() {
278
379
  var _a;
279
380
  const featuresSelected = this._selectedIndexes.length > 0;
280
- const id = "more-table-options";
281
- return (index.h("div", { class: "display-flex border-bottom height-51", slot: slot }, index.h("calcite-action-bar", { expandDisabled: true, expanded: true, layout: "horizontal" }, index.h("div", { class: "border-end" }, index.h("map-layer-picker", { appearance: "transparent", mapView: this.mapView, onLayerSelectionChange: (evt) => this._layerSelectionChanged(evt), onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, placeholderIcon: "layers", scale: "l", showTables: true, type: "dropdown" })), this._getAction("zoom-to-object", this._translations.zoom, () => this._zoom(), !featuresSelected), ((_a = this.mapInfo) === null || _a === void 0 ? void 0 : _a.filters) ? this._getAction("filter", this._translations.filters, () => this._filter(), false) : undefined, this._deleteEnabled ? this._getDangerAction("trash", this._translations.delete, () => this._delete(), !featuresSelected) : undefined, this._getAction("erase", this._translations.clearSelection, () => this._clearSelection(), !featuresSelected), this._getAction("selected-items-filter", this._showOnlySelected ? this._translations.showAll : this._translations.showSelected, () => this._toggleShowSelected(), !featuresSelected)), index.h("calcite-dropdown", { disabled: this._layer === undefined }, index.h("calcite-action", { appearance: "solid", id: id, label: "", slot: "trigger", text: "" }, index.h("calcite-button", { appearance: "transparent", iconEnd: "chevron-down", kind: "neutral" }, this._translations.more)), index.h("calcite-dropdown-group", { "selection-mode": "none" }, index.h("calcite-dropdown-item", { iconStart: "list-check-all", onClick: () => this._selectAll() }, this._translations.selectAll), index.h("calcite-dropdown-item", { iconStart: "compare", onClick: () => this._switchSelected() }, this._translations.switchSelected), index.h("calcite-dropdown-item", { iconStart: "refresh", onClick: () => this._refresh() }, this._translations.refresh), this.enableCSV ?
282
- (index.h("calcite-dropdown-item", { iconStart: "export", onClick: () => void this._exportToCSV() }, this._translations.exportCSV)) : undefined)), index.h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": id }, index.h("span", null, this._translations.moreOptions))));
381
+ this._toolInfos = [{
382
+ icon: "zoom-to-object",
383
+ label: this._translations.zoom,
384
+ func: () => this._zoom(),
385
+ disabled: !featuresSelected,
386
+ isOverflow: false
387
+ }, ((_a = this.mapInfo) === null || _a === void 0 ? void 0 : _a.filters) ? {
388
+ icon: "filter",
389
+ label: this._translations.filters,
390
+ func: () => this._filter(),
391
+ disabled: false,
392
+ isOverflow: false
393
+ } : undefined,
394
+ this._deleteEnabled ? {
395
+ icon: "trash",
396
+ label: this._translations.delete,
397
+ func: () => this._delete(),
398
+ disabled: !featuresSelected,
399
+ isDanger: true,
400
+ isOverflow: false
401
+ } : undefined, {
402
+ icon: "erase",
403
+ label: this._translations.clearSelection,
404
+ func: () => this._clearSelection(),
405
+ disabled: !featuresSelected,
406
+ isOverflow: false
407
+ }, {
408
+ icon: "selected-items-filter",
409
+ label: this._showOnlySelected ? this._translations.showAll : this._translations.showSelected,
410
+ func: () => this._toggleShowSelected(),
411
+ disabled: !featuresSelected,
412
+ isOverflow: false
413
+ }, {
414
+ icon: "list-check-all",
415
+ func: () => this._selectAll(),
416
+ label: this._translations.selectAll,
417
+ disabled: false,
418
+ isOverflow: true
419
+ }, {
420
+ icon: "compare",
421
+ func: () => this._switchSelected(),
422
+ label: this._translations.switchSelected,
423
+ disabled: false,
424
+ isOverflow: true
425
+ }, {
426
+ icon: "refresh",
427
+ func: () => this._refresh(),
428
+ label: this._translations.refresh,
429
+ disabled: false,
430
+ isOverflow: true
431
+ },
432
+ this.enableCSV ? {
433
+ icon: "export",
434
+ func: () => void this._exportToCSV(),
435
+ label: this._translations.exportCSV,
436
+ disabled: false,
437
+ isOverflow: true
438
+ } : undefined];
439
+ this._defaultVisibleToolSizeInfos = undefined;
440
+ }
441
+ /**
442
+ * Add/Remove tools from the action bar and dropdown based on available size
443
+ *
444
+ * @returns void
445
+ */
446
+ _updateToolbar() {
447
+ if (this._timeout) {
448
+ clearTimeout(this._timeout);
449
+ }
450
+ this._timeout = setTimeout(() => {
451
+ clearTimeout(this._timeout);
452
+ this._setToolbarSizeInfos();
453
+ const toolbarWidth = this._toolbar.offsetWidth;
454
+ let controlsWidth = this._toolbarSizeInfos.reduce((prev, cur) => {
455
+ prev += cur.width;
456
+ return prev;
457
+ }, 0);
458
+ const skipControls = ["solutions-more", "solutions-map-layer-picker-container"];
459
+ if (controlsWidth > toolbarWidth) {
460
+ if (this._toolbarSizeInfos.length > 0) {
461
+ const controlsThatFit = [...this._toolbarSizeInfos].reverse().reduce((prev, cur) => {
462
+ if (skipControls.indexOf(cur.id) < 0) {
463
+ if (controlsWidth > toolbarWidth) {
464
+ controlsWidth -= cur.width;
465
+ }
466
+ else {
467
+ prev.push(cur);
468
+ }
469
+ }
470
+ return prev;
471
+ }, []).reverse();
472
+ this._setControlsThatFit(controlsThatFit, skipControls);
473
+ }
474
+ }
475
+ else {
476
+ if (this._defaultVisibleToolSizeInfos) {
477
+ const currentTools = this._toolbarSizeInfos.reduce((prev, cur) => {
478
+ prev.push(cur.id);
479
+ return prev;
480
+ }, []);
481
+ const controlsThatFit = [...this._defaultVisibleToolSizeInfos].reduce((prev, cur) => {
482
+ if (skipControls.indexOf(cur.id) < 0 &&
483
+ (currentTools.indexOf(cur.id) > -1 || (controlsWidth + cur.width) <= toolbarWidth)) {
484
+ if (currentTools.indexOf(cur.id) < 0) {
485
+ controlsWidth += cur.width;
486
+ }
487
+ prev.push(cur);
488
+ }
489
+ return prev;
490
+ }, []);
491
+ this._setControlsThatFit(controlsThatFit, skipControls);
492
+ }
493
+ }
494
+ }, 5);
495
+ }
496
+ /**
497
+ * Validate if controls that fit the current display has changed or
498
+ * is different from what is currently displayed
499
+ *
500
+ * @returns void
501
+ */
502
+ _setControlsThatFit(controlsThatFit, skipControls) {
503
+ let update = JSON.stringify(controlsThatFit) !== JSON.stringify(this._controlsThatFit);
504
+ const actionbar = document.getElementById("solutions-action-bar");
505
+ actionbar.childNodes.forEach((n) => {
506
+ if (skipControls.indexOf(n.id) < 0 && !update) {
507
+ update = this._controlsThatFit.map(c => c.id).indexOf(n.id) < 0;
508
+ }
509
+ });
510
+ if (update) {
511
+ this._controlsThatFit = [...controlsThatFit];
512
+ }
513
+ }
514
+ /**
515
+ * Get the id and size for the toolbars current items
516
+ *
517
+ * @returns void
518
+ */
519
+ _setToolbarSizeInfos() {
520
+ let hasWidth = false;
521
+ this._toolbarSizeInfos = [];
522
+ this._toolbar.childNodes.forEach((c, i) => {
523
+ // handle the action bar
524
+ if (i === 0) {
525
+ c.childNodes.forEach((actionbarChild) => {
526
+ this._toolbarSizeInfos.push({
527
+ id: actionbarChild.id,
528
+ width: actionbarChild.offsetWidth
529
+ });
530
+ if (!hasWidth) {
531
+ hasWidth = actionbarChild.offsetWidth > 0;
532
+ }
533
+ });
534
+ }
535
+ else if (!c.referenceElement) {
536
+ // skip tooltips
537
+ this._toolbarSizeInfos.push({
538
+ id: c.id,
539
+ width: c.offsetWidth
540
+ });
541
+ if (!hasWidth) {
542
+ hasWidth = c.offsetWidth > 0;
543
+ }
544
+ }
545
+ });
546
+ if (hasWidth && !this._defaultVisibleToolSizeInfos) {
547
+ this._defaultVisibleToolSizeInfos = [...this._toolbarSizeInfos];
548
+ }
549
+ }
550
+ /**
551
+ * Get a list of toolInfos that should display outside of the dropdown
552
+ *
553
+ * @returns IToolInfo[] the list of toolInfos that should not display in the overflow dropdown
554
+ */
555
+ _getActionItems() {
556
+ return this._toolInfos.filter(toolInfo => toolInfo && !toolInfo.isOverflow);
557
+ }
558
+ /**
559
+ * Get a list of toolInfos that should display in the dropdown
560
+ *
561
+ * @param id string the id for the dropdown and its tooltip
562
+ *
563
+ * @returns VNode the dropdown node
564
+ */
565
+ _getDropdown(id) {
566
+ const dropdownItems = this._getDropdownItems();
567
+ return (index.h("calcite-dropdown", { disabled: this._layer === undefined, id: "solutions-more" }, index.h("calcite-action", { appearance: "solid", id: id, label: "", slot: "trigger", text: "" }, index.h("calcite-button", { appearance: "transparent", iconEnd: "chevron-down", kind: "neutral" }, this._translations.more)), index.h("calcite-dropdown-group", { "selection-mode": "none" }, dropdownItems.map(item => {
568
+ return (index.h("calcite-dropdown-item", { iconStart: item.icon, onClick: item.func }, item.label));
569
+ }))));
570
+ }
571
+ /**
572
+ * Get a list of toolInfos that should display in the dropdown
573
+ *
574
+ * @returns IToolInfo[] the list of toolInfos that should display in the dropdown
575
+ */
576
+ _getDropdownItems() {
577
+ return this._toolInfos.filter(toolInfo => toolInfo && toolInfo.isOverflow);
283
578
  }
284
579
  /**
285
580
  * Get an action and tooltip
@@ -293,7 +588,30 @@ const LayerTable = class {
293
588
  */
294
589
  _getAction(icon, label, func, disabled) {
295
590
  const _disabled = this._layer === undefined ? true : disabled;
296
- return (index.h("div", { class: "display-flex" }, index.h("calcite-action", { appearance: "solid", disabled: _disabled, icon: icon, id: icon, label: label, onClick: func, text: label, textEnabled: true }), index.h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": icon }, index.h("span", null, label))));
591
+ return (index.h("div", { class: "display-flex", id: this._getId(icon) }, index.h("calcite-action", { appearance: "solid", disabled: _disabled, icon: icon, id: icon, label: label, onClick: func, text: label, textEnabled: true }), this._getToolTip("", "bottom", icon, label)));
592
+ }
593
+ /**
594
+ * Get a tooltip
595
+ *
596
+ * @param label string accessible name for the component
597
+ * @param placement string where the tooltip should display
598
+ * @param referenceElement string the element the tooltip will be associated with
599
+ * @param text string the text to display in the tooltip
600
+ *
601
+ * @returns VNode The tooltip node
602
+ */
603
+ _getToolTip(label, placement, referenceElement, text) {
604
+ return (index.h("calcite-tooltip", { label: label, placement: placement, "reference-element": referenceElement }, index.h("span", null, text)));
605
+ }
606
+ /**
607
+ * Get an id with a prefix to the user supplied value
608
+ *
609
+ * @param id the unique value for the id
610
+ *
611
+ * @returns the new id with the prefix value
612
+ */
613
+ _getId(id) {
614
+ return `solutions-action-${id}`;
297
615
  }
298
616
  /**
299
617
  * Get an action with danger color icon and text
@@ -307,7 +625,7 @@ const LayerTable = class {
307
625
  */
308
626
  _getDangerAction(icon, label, func, disabled) {
309
627
  const _disabled = this._layer === undefined ? true : disabled;
310
- return (index.h("div", { class: "display-flex" }, index.h("calcite-action", { appearance: "solid", disabled: _disabled, id: icon, onClick: func, text: "" }, index.h("calcite-button", { appearance: "transparent", iconStart: icon, kind: "danger" }, label)), index.h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": icon }, index.h("span", null, label))));
628
+ return (index.h("div", { class: "display-flex", id: this._getId(icon) }, index.h("calcite-action", { appearance: "solid", disabled: _disabled, id: icon, onClick: func, text: "" }, index.h("calcite-button", { appearance: "transparent", iconStart: icon, kind: "danger" }, label)), this._getToolTip("", "bottom", icon, label)));
311
629
  }
312
630
  /**
313
631
  * Initialize the FeatureTable
@@ -378,6 +696,7 @@ const LayerTable = class {
378
696
  this._table.view = this.mapView;
379
697
  this._checkEditEnabled();
380
698
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
699
+ this._initToolInfos();
381
700
  });
382
701
  await this._table.when(() => {
383
702
  this._table.clearSelectionFilter();
@@ -564,8 +883,9 @@ const LayerTable = class {
564
883
  *
565
884
  * @returns void
566
885
  */
567
- _refresh() {
568
- void this._table.refresh();
886
+ async _refresh() {
887
+ await this._table.refresh();
888
+ this.featureSelectionChange.emit(this._selectedIndexes);
569
889
  }
570
890
  /**
571
891
  * Zoom to all selected features
@@ -663,8 +983,10 @@ const LayerTable = class {
663
983
  }
664
984
  get el() { return index.getElement(this); }
665
985
  static get watchers() { return {
986
+ "_controlsThatFit": ["_controlsThatFitWatchHandler"],
666
987
  "mapView": ["mapViewWatchHandler"],
667
988
  "_layer": ["_layerWatchHandler"],
989
+ "_selectedIndexes": ["_selectedIndexesWatchHandler"],
668
990
  "_sortActive": ["_sortActiveWatchHandler"]
669
991
  }; }
670
992
  };
@@ -708,7 +1030,6 @@ const MapCard = class {
708
1030
  */
709
1031
  async componentWillLoad() {
710
1032
  await this._initModules();
711
- this.esriConfig.portalUrl = "https://holistic.mapsdevext.arcgis.com";
712
1033
  }
713
1034
  /**
714
1035
  * Renders the component.
@@ -729,16 +1050,14 @@ const MapCard = class {
729
1050
  * @protected
730
1051
  */
731
1052
  async _initModules() {
732
- const [WebMap, MapView, Home, esriConfig] = await loadModules.loadModules([
1053
+ const [WebMap, MapView, Home] = await loadModules.loadModules([
733
1054
  "esri/WebMap",
734
1055
  "esri/views/MapView",
735
- "esri/widgets/Home",
736
- "esri/config"
1056
+ "esri/widgets/Home"
737
1057
  ]);
738
1058
  this.WebMap = WebMap;
739
1059
  this.MapView = MapView;
740
1060
  this.Home = Home;
741
- this.esriConfig = esriConfig;
742
1061
  }
743
1062
  /**
744
1063
  * Load the webmap for the provided webMapInfo
@@ -12,7 +12,7 @@ const locale = require('./locale-d50f3250.js');
12
12
  const interfaces = require('./interfaces-000be6de.js');
13
13
  require('./_commonjsHelpers-384729db.js');
14
14
 
15
- const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom:0px;--solutions-theme-foreground-color:var(--calcite-ui-foreground-1)}.padding-1-2{padding:0.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-ui-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-3)}.border-sides{border-left:1px solid var(--calcite-ui-border-3);border-right:1px solid var(--calcite-ui-border-3)}.position-relative{position:relative}.height-50{height:50%}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-50{height:calc(100% - 50px)}.display-none{display:none}.height-53{height:53px}.position-absolute-53{position:absolute;top:53px}.display-grid{display:grid}.height-49-px{height:49px}.height-50-px{height:50px}.padding-inline-start-75{padding-inline-start:0.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button{width:40px !important;height:40px !important}.esri-floor-filter__level-button{width:40px !important;height:40px !important}.esri-floor-filter__browse-button{width:40px !important;height:40px !important}";
15
+ const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom:0px;--solutions-theme-foreground-color:var(--calcite-ui-foreground-1)}.padding-1-2{padding:0.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-ui-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-3)}.border-sides{border-left:1px solid var(--calcite-ui-border-3);border-right:1px solid var(--calcite-ui-border-3)}.position-relative{position:relative}.height-50{height:50%}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-50{height:calc(100% - 50px)}.display-none{display:none}.height-53{height:53px}.position-absolute-53{position:absolute;top:53px}.display-grid{display:grid}.height-50-px{height:50px}.padding-inline-start-75{padding-inline-start:0.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button{width:40px !important;height:40px !important}.esri-floor-filter__level-button{width:40px !important;height:40px !important}.esri-floor-filter__browse-button{width:40px !important;height:40px !important}";
16
16
 
17
17
  const CrowdsourceManager = class {
18
18
  constructor(hostRef) {
@@ -240,11 +240,11 @@ const CrowdsourceManager = class {
240
240
  * @protected
241
241
  */
242
242
  _getMapNode(layoutMode, hideMap) {
243
- var _a, _b;
243
+ var _a, _b, _c;
244
244
  const mapDisplayClass = this.classicGrid && layoutMode === interfaces.ELayoutMode.GRID ? "display-flex height-full width-1-2" :
245
245
  layoutMode === interfaces.ELayoutMode.GRID && !hideMap ? "" : "display-none";
246
246
  const mapContainerClass = this.classicGrid && layoutMode === interfaces.ELayoutMode.GRID ? "width-full" : this._expandPopup ? "height-50-px" : "adjusted-height-50";
247
- return (index.h("div", { class: `${mapContainerClass} overflow-hidden ${mapDisplayClass}` }, index.h("map-card", { basemapConfig: this.basemapConfig, class: "width-full", enableBasemap: this.enableBasemap, enableFloorFilter: this.enableFloorFilter && ((_b = (_a = this._mapView) === null || _a === void 0 ? void 0 : _a.map) === null || _b === void 0 ? void 0 : _b.floorInfo), enableFullscreen: this.enableFullscreen, enableLegend: this.enableLegend, enableSearch: this.enableSearch, mapInfos: this.mapInfos.filter(mapInfo => mapInfo.visible !== false) })));
247
+ return (index.h("div", { class: `${mapContainerClass} overflow-hidden ${mapDisplayClass}` }, index.h("map-card", { basemapConfig: this.basemapConfig, class: "width-full", enableBasemap: this.enableBasemap, enableFloorFilter: this.enableFloorFilter && ((_b = (_a = this._mapView) === null || _a === void 0 ? void 0 : _a.map) === null || _b === void 0 ? void 0 : _b.floorInfo), enableFullscreen: this.enableFullscreen, enableLegend: this.enableLegend, enableSearch: this.enableSearch, mapInfos: (_c = this.mapInfos) === null || _c === void 0 ? void 0 : _c.filter(mapInfo => mapInfo.visible !== false) })));
248
248
  }
249
249
  /**
250
250
  * Get the expand node for the popup information
@@ -257,7 +257,7 @@ const CrowdsourceManager = class {
257
257
  const id = "expand-popup";
258
258
  const tooltip = this._expandPopup ? this._translations.collapsePopup : this._translations.expandPopup;
259
259
  const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
260
- return (index.h("div", { class: "calcite-mode-dark height-full" }, index.h("calcite-panel", null, index.h("div", { class: "display-flex align-items-center", slot: "header-content" }, index.h("calcite-icon", { icon: "information", scale: "s" }), index.h("div", { class: "padding-inline-start-75" }, this._translations.information)), index.h("calcite-action", { class: "height-49-px", icon: icon, id: id, onClick: () => this._togglePopup(), slot: "header-actions-end" }), index.h("calcite-tooltip", { class: themeClass, label: "", placement: "bottom", "reference-element": id }, index.h("span", null, tooltip)), this._getCardNode())));
260
+ return (index.h("div", { class: "calcite-mode-dark height-full" }, index.h("calcite-panel", null, index.h("div", { class: "display-flex align-items-center", slot: "header-content" }, index.h("calcite-icon", { icon: "information", scale: "s" }), index.h("div", { class: "padding-inline-start-75" }, this._translations.information)), index.h("calcite-action", { icon: icon, id: id, onClick: () => this._togglePopup(), slot: "header-actions-end" }), index.h("calcite-tooltip", { class: themeClass, label: "", placement: "bottom", "reference-element": id }, index.h("span", null, tooltip)), this._getCardNode())));
261
261
  }
262
262
  /**
263
263
  * Toggle the popup information