@esri/solutions-components 0.8.31 → 0.8.32

Sign up to get free protection for your applications and to get access to all the features.
@@ -159,6 +159,7 @@ const LayerTable = class {
159
159
  this.enableInlineEdit = undefined;
160
160
  this.enableShare = undefined;
161
161
  this.isMobile = undefined;
162
+ this.mapHidden = undefined;
162
163
  this.mapInfo = undefined;
163
164
  this.mapView = undefined;
164
165
  this.onlyShowUpdatableLayers = undefined;
@@ -242,6 +243,15 @@ const LayerTable = class {
242
243
  }
243
244
  });
244
245
  }
246
+ /**
247
+ * Reset the toolInfos when mapHidden prop changes so we can show/hide any map dependant tool(s)
248
+ */
249
+ mapHiddenWatchHandler() {
250
+ var _a;
251
+ if (((_a = this._toolInfos) === null || _a === void 0 ? void 0 : _a.length) > 0) {
252
+ this._initToolInfos();
253
+ }
254
+ }
245
255
  /**
246
256
  * When isMobile is false we need to init the tool infos for the dynamic toolbar
247
257
  */
@@ -405,7 +415,7 @@ const LayerTable = class {
405
415
  const selected = this.selectedIds.length.toString();
406
416
  const tableHeightClass = this.isMobile ? "height-full" : "height-full-adjusted";
407
417
  this._validateActiveActions();
408
- return (index.h(index.Host, { key: '928286a8e4d1159b56b2aa4384f0d6eed38c9e76' }, index.h("calcite-shell", { key: '7c9b98056ee867df54ebfd31fee6f046f5152f64' }, this._getTableControlRow("header"), index.h("div", { key: 'b1a9a9cca100c7bef335afd5b6c7d7384ca7536c', class: `width-full ${tableHeightClass}` }, index.h("calcite-panel", { key: 'ceeead9900f43c94f46c8c94698ae17f3ae558b7', class: "height-full width-full" }, index.h("calcite-loader", { key: '7bf3c9ba21daa27dd387ba5413b6f6e982e1f10d', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), index.h("div", { key: '7d0440047453a45fe1688ad373ab2463fe7479ba', class: tableNodeClass, ref: this.onTableNodeCreate })), !this.isMobile ? (index.h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
418
+ return (index.h(index.Host, { key: '9692c6f764d078c22e1d6271deb3844ef65b1fca' }, index.h("calcite-shell", { key: 'a37b9fcfdd8450fea4a994738bf833c331bb168a' }, this._getTableControlRow("header"), index.h("div", { key: 'e0e82e0bb5441286d5cd3bdda3c55d77515fbcb0', class: `width-full ${tableHeightClass}` }, index.h("calcite-panel", { key: '4890c168eba3db34a291121f633c0d69ab8a1517', class: "height-full width-full" }, index.h("calcite-loader", { key: '19f85ec47a03731fe4c9ebb13d91cad66a8637fa', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), index.h("div", { key: '53d1c8bce2e2d464a141fabfcf13ee41aaf02168', class: tableNodeClass, ref: this.onTableNodeCreate })), !this.isMobile ? (index.h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
409
419
  .replace("{{total}}", total)
410
420
  .replace("{{selected}}", selected))) : undefined)), this._filterModal()));
411
421
  }
@@ -568,7 +578,8 @@ const LayerTable = class {
568
578
  const featuresEmpty = this._featuresEmpty();
569
579
  const hasFilterExpressions = this._hasFilterExpressions();
570
580
  if (this._translations) {
571
- this._toolInfos = [{
581
+ this._toolInfos = [
582
+ !this.mapHidden ? {
572
583
  active: false,
573
584
  icon: "zoom-to-object",
574
585
  indicator: false,
@@ -576,7 +587,7 @@ const LayerTable = class {
576
587
  func: () => this._zoom(),
577
588
  disabled: !featuresSelected,
578
589
  isOverflow: false
579
- },
590
+ } : undefined,
580
591
  hasFilterExpressions ? {
581
592
  active: false,
582
593
  icon: "filter",
@@ -654,7 +665,8 @@ const LayerTable = class {
654
665
  disabled: false,
655
666
  isOverflow: false,
656
667
  isSublist: true
657
- }];
668
+ }
669
+ ];
658
670
  this._defaultVisibleToolSizeInfos = undefined;
659
671
  }
660
672
  }
@@ -1595,6 +1607,7 @@ const LayerTable = class {
1595
1607
  "enableInlineEdit": ["enableInlineEditWatchHandler"],
1596
1608
  "enableShare": ["enableShareWatchHandler"],
1597
1609
  "_controlsThatFit": ["_controlsThatFitWatchHandler"],
1610
+ "mapHidden": ["mapHiddenWatchHandler"],
1598
1611
  "isMobile": ["isMobileWatchHandler"],
1599
1612
  "mapInfo": ["mapInfoWatchHandler"],
1600
1613
  "mapView": ["mapViewWatchHandler"],
@@ -428,7 +428,7 @@ const CrowdsourceManager = class {
428
428
  ((_a = this.defaultGlobalId) === null || _a === void 0 ? void 0 : _a.indexOf(",")) > -1 ? this.defaultGlobalId.split(",") : [this.defaultGlobalId];
429
429
  const defaultOid = !this.defaultOid ? undefined :
430
430
  ((_b = this.defaultOid) === null || _b === void 0 ? void 0 : _b.indexOf(",")) > -1 ? this.defaultOid.split(",").map(o => parseInt(o, 10)) : [parseInt(this.defaultOid, 10)];
431
- return (index.h("calcite-shell", { class: `${tableSizeClass} ${tableClass} border-bottom` }, !this._isMobile ? (index.h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, index.h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), index.h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, index.h("span", null, tooltip)))) : undefined, index.h("div", { class: `width-full height-full position-relative` }, index.h("layer-table", { defaultGlobalId: hasMapAndLayer ? globalId : undefined, defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultOid: hasMapAndLayer && !globalId ? defaultOid : undefined, enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableColumnReorder: this.enableColumnReorder, enableInlineEdit: this.enableInlineEdit, enableShare: this.enableShare, isMobile: this._isMobile, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, ref: (el) => this._layerTable = el, shareIncludeEmbed: this.shareIncludeEmbed, shareIncludeSocial: this.shareIncludeSocial, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected, zoomToScale: this.zoomToScale }))));
431
+ return (index.h("calcite-shell", { class: `${tableSizeClass} ${tableClass} border-bottom` }, !this._isMobile ? (index.h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, index.h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), index.h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, index.h("span", null, tooltip)))) : undefined, index.h("div", { class: `width-full height-full position-relative` }, index.h("layer-table", { defaultGlobalId: hasMapAndLayer ? globalId : undefined, defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultOid: hasMapAndLayer && !globalId ? defaultOid : undefined, enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableColumnReorder: this.enableColumnReorder, enableInlineEdit: this.enableInlineEdit, enableShare: this.enableShare, isMobile: this._isMobile, mapHidden: this._expandPopup, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, ref: (el) => this._layerTable = el, shareIncludeEmbed: this.shareIncludeEmbed, shareIncludeSocial: this.shareIncludeSocial, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected, zoomToScale: this.zoomToScale }))));
432
432
  }
433
433
  /**
434
434
  * Update the component layout when its size changes