@esri/solutions-components 0.6.28 → 0.6.29

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. package/dist/cjs/basemap-gallery_7.cjs.entry.js +2 -2
  2. package/dist/cjs/calcite-combobox_6.cjs.entry.js +2 -2
  3. package/dist/cjs/card-manager_3.cjs.entry.js +333 -11
  4. package/dist/cjs/crowdsource-manager.cjs.entry.js +4 -4
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/solutions-components.cjs.js +1 -1
  7. package/dist/collection/components/basemap-gallery/basemap-gallery.js +2 -2
  8. package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +0 -4
  9. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +3 -3
  10. package/dist/collection/components/layer-table/layer-table.css +6 -2
  11. package/dist/collection/components/layer-table/layer-table.js +337 -10
  12. package/dist/collection/components/map-layer-picker/map-layer-picker.js +2 -2
  13. package/dist/collection/utils/interfaces.ts +14 -0
  14. package/dist/components/basemap-gallery2.js +2 -2
  15. package/dist/components/crowdsource-manager.js +4 -4
  16. package/dist/components/layer-table2.js +336 -11
  17. package/dist/components/map-layer-picker2.js +2 -2
  18. package/dist/esm/basemap-gallery_7.entry.js +2 -2
  19. package/dist/esm/calcite-combobox_6.entry.js +2 -2
  20. package/dist/esm/card-manager_3.entry.js +333 -11
  21. package/dist/esm/crowdsource-manager.entry.js +4 -4
  22. package/dist/esm/loader.js +1 -1
  23. package/dist/esm/solutions-components.js +1 -1
  24. package/dist/solutions-components/{p-5e446b18.entry.js → p-190c83b9.entry.js} +1 -1
  25. package/dist/solutions-components/p-3c702004.entry.js +6 -0
  26. package/dist/solutions-components/p-d44ad6c4.entry.js +6 -0
  27. package/dist/solutions-components/p-f2dcb05a.entry.js +6 -0
  28. package/dist/solutions-components/solutions-components.esm.js +1 -1
  29. package/dist/solutions-components/utils/interfaces.ts +14 -0
  30. package/dist/types/components/layer-table/layer-table.d.ts +140 -4
  31. package/dist/types/utils/interfaces.d.ts +12 -0
  32. package/package.json +1 -1
  33. package/dist/solutions-components/p-25729b41.entry.js +0 -6
  34. package/dist/solutions-components/p-cd7873ae.entry.js +0 -6
  35. package/dist/solutions-components/p-ea238bbc.entry.js +0 -6
@@ -99,7 +99,7 @@ const CardManager = class {
99
99
  };
100
100
  CardManager.style = cardManagerCss;
101
101
 
102
- 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}";
102
+ 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}";
103
103
 
104
104
  const LayerTable = class {
105
105
  constructor(hostRef) {
@@ -134,6 +134,7 @@ const LayerTable = class {
134
134
  this.showNewestFirst = undefined;
135
135
  this.zoomAndScrollToSelected = undefined;
136
136
  this._confirmDelete = false;
137
+ this._controlsThatFit = undefined;
137
138
  this._fetchingData = false;
138
139
  this._isDeleting = false;
139
140
  this._layer = undefined;
@@ -147,6 +148,22 @@ const LayerTable = class {
147
148
  // Watch handlers
148
149
  //
149
150
  //--------------------------------------------------------------------------
151
+ /**
152
+ * watch for changes to the list of controls that will currently fit in the display
153
+ */
154
+ _controlsThatFitWatchHandler() {
155
+ const ids = this._controlsThatFit ? this._controlsThatFit.reduce((prev, cur) => {
156
+ prev.push(cur.id);
157
+ return prev;
158
+ }, []) : [];
159
+ this._toolInfos = this._toolInfos.map(ti => {
160
+ if (ti && this._controlsThatFit) {
161
+ const id = this._getId(ti.icon);
162
+ ti.isOverflow = ids.indexOf(id) < 0;
163
+ return ti;
164
+ }
165
+ });
166
+ }
150
167
  /**
151
168
  * watch for changes in map view and get the first layer
152
169
  */
@@ -168,6 +185,12 @@ const LayerTable = class {
168
185
  await this._resetTable();
169
186
  this._fetchingData = false;
170
187
  }
188
+ /**
189
+ * watch for selection changes
190
+ */
191
+ async _selectedIndexesWatchHandler() {
192
+ this._validateEnabledActions();
193
+ }
171
194
  /**
172
195
  * When sortActive is false the user has not defined a sort and we should use the default sort
173
196
  */
@@ -205,8 +228,8 @@ const LayerTable = class {
205
228
  * Refresh the table when edits are completed
206
229
  *
207
230
  */
208
- editsComplete() {
209
- this._refresh();
231
+ async editsComplete() {
232
+ await this._refresh();
210
233
  }
211
234
  /**
212
235
  * Refresh the table when edits are completed
@@ -230,6 +253,8 @@ const LayerTable = class {
230
253
  async componentWillLoad() {
231
254
  await this._getTranslations();
232
255
  await this._initModules();
256
+ this._initToolInfos();
257
+ this._resizeObserver = new ResizeObserver(() => this._onResize());
233
258
  }
234
259
  /**
235
260
  * Renders the component.
@@ -239,10 +264,22 @@ const LayerTable = class {
239
264
  const loadingClass = this._fetchingData ? "" : "display-none";
240
265
  const total = this._allIds.length.toString();
241
266
  const selected = this._selectedIndexes.length.toString();
242
- return (h(Host, null, h("calcite-shell", null, this._getTableControlRow("header"), h("div", { class: "height-full-adjusted width-full" }, h("calcite-panel", { class: "height-full width-full" }, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { class: tableNodeClass, ref: this.onTableNodeCreate })), h("div", { class: "bottom-left text-color" }, this._translations.recordsSelected
267
+ return (h(Host, null, h("calcite-shell", null, this._getTableControlRow("header"), h("div", { class: "height-full-adjusted width-full" }, h("calcite-panel", { class: "height-full width-full" }, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { class: tableNodeClass, ref: this.onTableNodeCreate })), h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
243
268
  .replace("{{total}}", total)
244
269
  .replace("{{selected}}", selected)))), this._deleteMessage()));
245
270
  }
271
+ /**
272
+ * Called once after the component is loaded
273
+ */
274
+ async componentDidLoad() {
275
+ this._resizeObserver.observe(this._toolbar);
276
+ }
277
+ /**
278
+ * Called after the component is rendered
279
+ */
280
+ componentDidRender() {
281
+ this._updateToolbar();
282
+ }
246
283
  //--------------------------------------------------------------------------
247
284
  //
248
285
  // Functions (protected)
@@ -263,6 +300,14 @@ const LayerTable = class {
263
300
  this.FeatureTable = FeatureTable;
264
301
  this.reactiveUtils = reactiveUtils;
265
302
  }
303
+ /**
304
+ * Update the toolbar when its size changes
305
+ *
306
+ * @returns void
307
+ */
308
+ _onResize() {
309
+ this._updateToolbar();
310
+ }
266
311
  /**
267
312
  * Gets a row of controls that can be used for various interactions with the table
268
313
  *
@@ -271,11 +316,261 @@ const LayerTable = class {
271
316
  * @returns The dom node that contains the controls
272
317
  */
273
318
  _getTableControlRow(slot) {
319
+ const id = "more-table-options";
320
+ return (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)));
321
+ }
322
+ /**
323
+ * Gets a row of controls that can be used for various interactions with the table
324
+ *
325
+ * @param slot string optional slot to display the control within
326
+ *
327
+ * @returns The dom node that contains the controls
328
+ */
329
+ _getActionBar() {
330
+ return (h("calcite-action-bar", { expandDisabled: true, expanded: true, id: this._getId("bar"), layout: "horizontal" }, h("div", { class: "border-end", id: "solutions-map-layer-picker-container" }, 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()));
331
+ }
332
+ /**
333
+ * Get the actions that are used for various interactions with the table
334
+ *
335
+ * @returns VNode[] the action nodes
336
+ */
337
+ _getActions() {
338
+ const actions = this._getActionItems();
339
+ return actions.reduce((prev, cur) => {
340
+ if (cur && !cur.isOverflow) {
341
+ prev.push(cur.isDanger ?
342
+ this._getDangerAction(cur.icon, cur.label, cur.func, cur.disabled) :
343
+ this._getAction(cur.icon, cur.label, cur.func, cur.disabled));
344
+ }
345
+ return prev;
346
+ }, []);
347
+ }
348
+ /**
349
+ * Update actions enabled prop based on number of selected indexes
350
+ *
351
+ * @returns void
352
+ */
353
+ _validateEnabledActions() {
354
+ const featuresSelected = this._selectedIndexes.length > 0;
355
+ const selectionDependant = [
356
+ "zoom-to-object",
357
+ "trash",
358
+ "erase",
359
+ "selected-items-filter"
360
+ ];
361
+ this._toolInfos.forEach(ti => {
362
+ if (ti && selectionDependant.indexOf(ti.icon) > -1) {
363
+ ti.disabled = !featuresSelected;
364
+ }
365
+ });
366
+ }
367
+ /**
368
+ * Get the full list of toolInfos.
369
+ * Order is important. They should be listed in the order they should display in the UI from
370
+ * Left to Right for the action bar and Top to Bottom for the dropdown.
371
+ *
372
+ * @returns void
373
+ */
374
+ _initToolInfos() {
274
375
  var _a;
275
376
  const featuresSelected = this._selectedIndexes.length > 0;
276
- const id = "more-table-options";
277
- return (h("div", { class: "display-flex border-bottom 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", 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)), h("calcite-dropdown", { disabled: this._layer === undefined }, h("calcite-action", { appearance: "solid", id: id, 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: "compare", onClick: () => this._switchSelected() }, this._translations.switchSelected), h("calcite-dropdown-item", { iconStart: "refresh", onClick: () => this._refresh() }, this._translations.refresh), this.enableCSV ?
278
- (h("calcite-dropdown-item", { iconStart: "export", onClick: () => void this._exportToCSV() }, this._translations.exportCSV)) : undefined)), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": id }, h("span", null, this._translations.moreOptions))));
377
+ this._toolInfos = [{
378
+ icon: "zoom-to-object",
379
+ label: this._translations.zoom,
380
+ func: () => this._zoom(),
381
+ disabled: !featuresSelected,
382
+ isOverflow: false
383
+ }, ((_a = this.mapInfo) === null || _a === void 0 ? void 0 : _a.filters) ? {
384
+ icon: "filter",
385
+ label: this._translations.filters,
386
+ func: () => this._filter(),
387
+ disabled: false,
388
+ isOverflow: false
389
+ } : undefined,
390
+ this._deleteEnabled ? {
391
+ icon: "trash",
392
+ label: this._translations.delete,
393
+ func: () => this._delete(),
394
+ disabled: !featuresSelected,
395
+ isDanger: true,
396
+ isOverflow: false
397
+ } : undefined, {
398
+ icon: "erase",
399
+ label: this._translations.clearSelection,
400
+ func: () => this._clearSelection(),
401
+ disabled: !featuresSelected,
402
+ isOverflow: false
403
+ }, {
404
+ icon: "selected-items-filter",
405
+ label: this._showOnlySelected ? this._translations.showAll : this._translations.showSelected,
406
+ func: () => this._toggleShowSelected(),
407
+ disabled: !featuresSelected,
408
+ isOverflow: false
409
+ }, {
410
+ icon: "list-check-all",
411
+ func: () => this._selectAll(),
412
+ label: this._translations.selectAll,
413
+ disabled: false,
414
+ isOverflow: true
415
+ }, {
416
+ icon: "compare",
417
+ func: () => this._switchSelected(),
418
+ label: this._translations.switchSelected,
419
+ disabled: false,
420
+ isOverflow: true
421
+ }, {
422
+ icon: "refresh",
423
+ func: () => this._refresh(),
424
+ label: this._translations.refresh,
425
+ disabled: false,
426
+ isOverflow: true
427
+ },
428
+ this.enableCSV ? {
429
+ icon: "export",
430
+ func: () => void this._exportToCSV(),
431
+ label: this._translations.exportCSV,
432
+ disabled: false,
433
+ isOverflow: true
434
+ } : undefined];
435
+ this._defaultVisibleToolSizeInfos = undefined;
436
+ }
437
+ /**
438
+ * Add/Remove tools from the action bar and dropdown based on available size
439
+ *
440
+ * @returns void
441
+ */
442
+ _updateToolbar() {
443
+ if (this._timeout) {
444
+ clearTimeout(this._timeout);
445
+ }
446
+ this._timeout = setTimeout(() => {
447
+ clearTimeout(this._timeout);
448
+ this._setToolbarSizeInfos();
449
+ const toolbarWidth = this._toolbar.offsetWidth;
450
+ let controlsWidth = this._toolbarSizeInfos.reduce((prev, cur) => {
451
+ prev += cur.width;
452
+ return prev;
453
+ }, 0);
454
+ const skipControls = ["solutions-more", "solutions-map-layer-picker-container"];
455
+ if (controlsWidth > toolbarWidth) {
456
+ if (this._toolbarSizeInfos.length > 0) {
457
+ const controlsThatFit = [...this._toolbarSizeInfos].reverse().reduce((prev, cur) => {
458
+ if (skipControls.indexOf(cur.id) < 0) {
459
+ if (controlsWidth > toolbarWidth) {
460
+ controlsWidth -= cur.width;
461
+ }
462
+ else {
463
+ prev.push(cur);
464
+ }
465
+ }
466
+ return prev;
467
+ }, []).reverse();
468
+ this._setControlsThatFit(controlsThatFit, skipControls);
469
+ }
470
+ }
471
+ else {
472
+ if (this._defaultVisibleToolSizeInfos) {
473
+ const currentTools = this._toolbarSizeInfos.reduce((prev, cur) => {
474
+ prev.push(cur.id);
475
+ return prev;
476
+ }, []);
477
+ const controlsThatFit = [...this._defaultVisibleToolSizeInfos].reduce((prev, cur) => {
478
+ if (skipControls.indexOf(cur.id) < 0 &&
479
+ (currentTools.indexOf(cur.id) > -1 || (controlsWidth + cur.width) <= toolbarWidth)) {
480
+ if (currentTools.indexOf(cur.id) < 0) {
481
+ controlsWidth += cur.width;
482
+ }
483
+ prev.push(cur);
484
+ }
485
+ return prev;
486
+ }, []);
487
+ this._setControlsThatFit(controlsThatFit, skipControls);
488
+ }
489
+ }
490
+ }, 5);
491
+ }
492
+ /**
493
+ * Validate if controls that fit the current display has changed or
494
+ * is different from what is currently displayed
495
+ *
496
+ * @returns void
497
+ */
498
+ _setControlsThatFit(controlsThatFit, skipControls) {
499
+ let update = JSON.stringify(controlsThatFit) !== JSON.stringify(this._controlsThatFit);
500
+ const actionbar = document.getElementById("solutions-action-bar");
501
+ actionbar.childNodes.forEach((n) => {
502
+ if (skipControls.indexOf(n.id) < 0 && !update) {
503
+ update = this._controlsThatFit.map(c => c.id).indexOf(n.id) < 0;
504
+ }
505
+ });
506
+ if (update) {
507
+ this._controlsThatFit = [...controlsThatFit];
508
+ }
509
+ }
510
+ /**
511
+ * Get the id and size for the toolbars current items
512
+ *
513
+ * @returns void
514
+ */
515
+ _setToolbarSizeInfos() {
516
+ let hasWidth = false;
517
+ this._toolbarSizeInfos = [];
518
+ this._toolbar.childNodes.forEach((c, i) => {
519
+ // handle the action bar
520
+ if (i === 0) {
521
+ c.childNodes.forEach((actionbarChild) => {
522
+ this._toolbarSizeInfos.push({
523
+ id: actionbarChild.id,
524
+ width: actionbarChild.offsetWidth
525
+ });
526
+ if (!hasWidth) {
527
+ hasWidth = actionbarChild.offsetWidth > 0;
528
+ }
529
+ });
530
+ }
531
+ else if (!c.referenceElement) {
532
+ // skip tooltips
533
+ this._toolbarSizeInfos.push({
534
+ id: c.id,
535
+ width: c.offsetWidth
536
+ });
537
+ if (!hasWidth) {
538
+ hasWidth = c.offsetWidth > 0;
539
+ }
540
+ }
541
+ });
542
+ if (hasWidth && !this._defaultVisibleToolSizeInfos) {
543
+ this._defaultVisibleToolSizeInfos = [...this._toolbarSizeInfos];
544
+ }
545
+ }
546
+ /**
547
+ * Get a list of toolInfos that should display outside of the dropdown
548
+ *
549
+ * @returns IToolInfo[] the list of toolInfos that should not display in the overflow dropdown
550
+ */
551
+ _getActionItems() {
552
+ return this._toolInfos.filter(toolInfo => toolInfo && !toolInfo.isOverflow);
553
+ }
554
+ /**
555
+ * Get a list of toolInfos that should display in the dropdown
556
+ *
557
+ * @param id string the id for the dropdown and its tooltip
558
+ *
559
+ * @returns VNode the dropdown node
560
+ */
561
+ _getDropdown(id) {
562
+ const dropdownItems = this._getDropdownItems();
563
+ return (h("calcite-dropdown", { disabled: this._layer === undefined, id: "solutions-more" }, h("calcite-action", { appearance: "solid", id: id, label: "", slot: "trigger", text: "" }, h("calcite-button", { appearance: "transparent", iconEnd: "chevron-down", kind: "neutral" }, this._translations.more)), h("calcite-dropdown-group", { "selection-mode": "none" }, dropdownItems.map(item => {
564
+ return (h("calcite-dropdown-item", { iconStart: item.icon, onClick: item.func }, item.label));
565
+ }))));
566
+ }
567
+ /**
568
+ * Get a list of toolInfos that should display in the dropdown
569
+ *
570
+ * @returns IToolInfo[] the list of toolInfos that should display in the dropdown
571
+ */
572
+ _getDropdownItems() {
573
+ return this._toolInfos.filter(toolInfo => toolInfo && toolInfo.isOverflow);
279
574
  }
280
575
  /**
281
576
  * Get an action and tooltip
@@ -289,7 +584,30 @@ const LayerTable = class {
289
584
  */
290
585
  _getAction(icon, label, func, disabled) {
291
586
  const _disabled = this._layer === undefined ? true : disabled;
292
- 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))));
587
+ return (h("div", { class: "display-flex", id: this._getId(icon) }, h("calcite-action", { appearance: "solid", disabled: _disabled, icon: icon, id: icon, label: label, onClick: func, text: label, textEnabled: true }), this._getToolTip("", "bottom", icon, label)));
588
+ }
589
+ /**
590
+ * Get a tooltip
591
+ *
592
+ * @param label string accessible name for the component
593
+ * @param placement string where the tooltip should display
594
+ * @param referenceElement string the element the tooltip will be associated with
595
+ * @param text string the text to display in the tooltip
596
+ *
597
+ * @returns VNode The tooltip node
598
+ */
599
+ _getToolTip(label, placement, referenceElement, text) {
600
+ return (h("calcite-tooltip", { label: label, placement: placement, "reference-element": referenceElement }, h("span", null, text)));
601
+ }
602
+ /**
603
+ * Get an id with a prefix to the user supplied value
604
+ *
605
+ * @param id the unique value for the id
606
+ *
607
+ * @returns the new id with the prefix value
608
+ */
609
+ _getId(id) {
610
+ return `solutions-action-${id}`;
293
611
  }
294
612
  /**
295
613
  * Get an action with danger color icon and text
@@ -303,7 +621,7 @@ const LayerTable = class {
303
621
  */
304
622
  _getDangerAction(icon, label, func, disabled) {
305
623
  const _disabled = this._layer === undefined ? true : disabled;
306
- 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))));
624
+ return (h("div", { class: "display-flex", id: this._getId(icon) }, h("calcite-action", { appearance: "solid", disabled: _disabled, id: icon, onClick: func, text: "" }, h("calcite-button", { appearance: "transparent", iconStart: icon, kind: "danger" }, label)), this._getToolTip("", "bottom", icon, label)));
307
625
  }
308
626
  /**
309
627
  * Initialize the FeatureTable
@@ -374,6 +692,7 @@ const LayerTable = class {
374
692
  this._table.view = this.mapView;
375
693
  this._checkEditEnabled();
376
694
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
695
+ this._initToolInfos();
377
696
  });
378
697
  await this._table.when(() => {
379
698
  this._table.clearSelectionFilter();
@@ -560,8 +879,9 @@ const LayerTable = class {
560
879
  *
561
880
  * @returns void
562
881
  */
563
- _refresh() {
564
- void this._table.refresh();
882
+ async _refresh() {
883
+ await this._table.refresh();
884
+ this.featureSelectionChange.emit(this._selectedIndexes);
565
885
  }
566
886
  /**
567
887
  * Zoom to all selected features
@@ -659,8 +979,10 @@ const LayerTable = class {
659
979
  }
660
980
  get el() { return getElement(this); }
661
981
  static get watchers() { return {
982
+ "_controlsThatFit": ["_controlsThatFitWatchHandler"],
662
983
  "mapView": ["mapViewWatchHandler"],
663
984
  "_layer": ["_layerWatchHandler"],
985
+ "_selectedIndexes": ["_selectedIndexesWatchHandler"],
664
986
  "_sortActive": ["_sortActiveWatchHandler"]
665
987
  }; }
666
988
  };
@@ -8,7 +8,7 @@ import { g as getLocaleComponentStrings } from './locale-6be4e8f0.js';
8
8
  import { E as ELayoutMode } from './interfaces-7470d906.js';
9
9
  import './_commonjsHelpers-d5f9d613.js';
10
10
 
11
- 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}";
11
+ 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}";
12
12
 
13
13
  const CrowdsourceManager = class {
14
14
  constructor(hostRef) {
@@ -236,11 +236,11 @@ const CrowdsourceManager = class {
236
236
  * @protected
237
237
  */
238
238
  _getMapNode(layoutMode, hideMap) {
239
- var _a, _b;
239
+ var _a, _b, _c;
240
240
  const mapDisplayClass = this.classicGrid && layoutMode === ELayoutMode.GRID ? "display-flex height-full width-1-2" :
241
241
  layoutMode === ELayoutMode.GRID && !hideMap ? "" : "display-none";
242
242
  const mapContainerClass = this.classicGrid && layoutMode === ELayoutMode.GRID ? "width-full" : this._expandPopup ? "height-50-px" : "adjusted-height-50";
243
- return (h("div", { class: `${mapContainerClass} overflow-hidden ${mapDisplayClass}` }, 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) })));
243
+ return (h("div", { class: `${mapContainerClass} overflow-hidden ${mapDisplayClass}` }, 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) })));
244
244
  }
245
245
  /**
246
246
  * Get the expand node for the popup information
@@ -253,7 +253,7 @@ const CrowdsourceManager = class {
253
253
  const id = "expand-popup";
254
254
  const tooltip = this._expandPopup ? this._translations.collapsePopup : this._translations.expandPopup;
255
255
  const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
256
- return (h("div", { class: "calcite-mode-dark height-full" }, h("calcite-panel", null, h("div", { class: "display-flex align-items-center", slot: "header-content" }, h("calcite-icon", { icon: "information", scale: "s" }), h("div", { class: "padding-inline-start-75" }, this._translations.information)), h("calcite-action", { class: "height-49-px", icon: icon, id: id, onClick: () => this._togglePopup(), slot: "header-actions-end" }), h("calcite-tooltip", { class: themeClass, label: "", placement: "bottom", "reference-element": id }, h("span", null, tooltip)), this._getCardNode())));
256
+ return (h("div", { class: "calcite-mode-dark height-full" }, h("calcite-panel", null, h("div", { class: "display-flex align-items-center", slot: "header-content" }, h("calcite-icon", { icon: "information", scale: "s" }), h("div", { class: "padding-inline-start-75" }, this._translations.information)), h("calcite-action", { icon: icon, id: id, onClick: () => this._togglePopup(), slot: "header-actions-end" }), h("calcite-tooltip", { class: themeClass, label: "", placement: "bottom", "reference-element": id }, h("span", null, tooltip)), this._getCardNode())));
257
257
  }
258
258
  /**
259
259
  * Toggle the popup information