@esri/solutions-components 0.10.42 → 0.10.44

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 (119) hide show
  1. package/dist/cjs/calcite-action-pad_2.cjs.entry.js +1 -1
  2. package/dist/cjs/calcite-block_5.cjs.entry.js +25 -26
  3. package/dist/cjs/card-manager_3.cjs.entry.js +32 -4
  4. package/dist/cjs/{constants-51cf394f.js → constants-bed33322.js} +3 -11
  5. package/dist/cjs/crowdsource-reporter.cjs.entry.js +112 -49
  6. package/dist/cjs/{helpers-afcac967.js → helpers-0493759d.js} +1 -1
  7. package/dist/cjs/instant-apps-app-guide.cjs.entry.js +2 -2
  8. package/dist/cjs/instant-apps-ckeditor-wrapper_3.cjs.entry.js +3 -3
  9. package/dist/cjs/instant-apps-control-panel.cjs.entry.js +1 -1
  10. package/dist/cjs/instant-apps-create.cjs.entry.js +2 -2
  11. package/dist/cjs/instant-apps-export-views.cjs.entry.js +2 -2
  12. package/dist/cjs/instant-apps-export.cjs.entry.js +2 -2
  13. package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +2 -2
  14. package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +2 -2
  15. package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +2 -2
  16. package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +21 -7
  17. package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +3 -3
  18. package/dist/cjs/instant-apps-keyboard-shortcuts.cjs.entry.js +2 -2
  19. package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +7 -7
  20. package/dist/cjs/instant-apps-language-translator.cjs.entry.js +6 -6
  21. package/dist/cjs/instant-apps-measurement.cjs.entry.js +2 -2
  22. package/dist/cjs/instant-apps-popover.cjs.entry.js +2 -2
  23. package/dist/cjs/instant-apps-scoreboard.cjs.entry.js +2 -2
  24. package/dist/cjs/instant-apps-sign-in.cjs.entry.js +2 -2
  25. package/dist/cjs/instant-apps-splash.cjs.entry.js +6 -5
  26. package/dist/cjs/instant-apps-time-filter.cjs.entry.js +2 -2
  27. package/dist/cjs/{loadModules-8567855e.js → loadModules-df8b13ca.js} +1 -1
  28. package/dist/cjs/loader.cjs.js +1 -1
  29. package/dist/cjs/{locale-4a18a858.js → locale-4b820602.js} +1 -1
  30. package/dist/cjs/solution-contents_3.cjs.entry.js +1 -1
  31. package/dist/cjs/solutions-components.cjs.js +1 -1
  32. package/dist/cjs/{utils-fa7ad44b.js → utils-3f10ea6b.js} +2 -2
  33. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +112 -49
  34. package/dist/collection/components/layer-table/layer-table.js +32 -4
  35. package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +2 -2
  36. package/dist/components/crowdsource-reporter.js +112 -49
  37. package/dist/components/instant-apps-filter-list2.js +25 -26
  38. package/dist/components/instant-apps-interactive-legend-relationship2.js +19 -5
  39. package/dist/components/instant-apps-language-switcher.js +3 -3
  40. package/dist/components/instant-apps-language-translator2.js +4 -12
  41. package/dist/components/instant-apps-splash.js +4 -3
  42. package/dist/components/layer-table2.js +32 -4
  43. package/dist/components/loadModules2.js +1 -1
  44. package/dist/components/solution-spatial-ref2.js +2 -2
  45. package/dist/components/utils4.js +1 -1
  46. package/dist/esm/calcite-action-pad_2.entry.js +1 -1
  47. package/dist/esm/calcite-block_5.entry.js +25 -26
  48. package/dist/esm/card-manager_3.entry.js +32 -4
  49. package/dist/esm/{constants-886c7c2c.js → constants-637a40f5.js} +3 -11
  50. package/dist/esm/crowdsource-reporter.entry.js +112 -49
  51. package/dist/esm/{helpers-91087955.js → helpers-91ca0f44.js} +1 -1
  52. package/dist/esm/instant-apps-app-guide.entry.js +2 -2
  53. package/dist/esm/instant-apps-ckeditor-wrapper_3.entry.js +3 -3
  54. package/dist/esm/instant-apps-control-panel.entry.js +1 -1
  55. package/dist/esm/instant-apps-create.entry.js +2 -2
  56. package/dist/esm/instant-apps-export-views.entry.js +2 -2
  57. package/dist/esm/instant-apps-export.entry.js +2 -2
  58. package/dist/esm/instant-apps-interactive-legend-classic.entry.js +2 -2
  59. package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +2 -2
  60. package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +2 -2
  61. package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +21 -7
  62. package/dist/esm/instant-apps-interactive-legend.entry.js +3 -3
  63. package/dist/esm/instant-apps-keyboard-shortcuts.entry.js +2 -2
  64. package/dist/esm/instant-apps-language-switcher.entry.js +7 -7
  65. package/dist/esm/instant-apps-language-translator.entry.js +6 -6
  66. package/dist/esm/instant-apps-measurement.entry.js +2 -2
  67. package/dist/esm/instant-apps-popover.entry.js +2 -2
  68. package/dist/esm/instant-apps-scoreboard.entry.js +2 -2
  69. package/dist/esm/instant-apps-sign-in.entry.js +2 -2
  70. package/dist/esm/instant-apps-splash.entry.js +6 -5
  71. package/dist/esm/instant-apps-time-filter.entry.js +2 -2
  72. package/dist/esm/{loadModules-03ba7abe.js → loadModules-d5a25252.js} +1 -1
  73. package/dist/esm/loader.js +1 -1
  74. package/dist/esm/{locale-ce177eb8.js → locale-77038bee.js} +1 -1
  75. package/dist/esm/solution-contents_3.entry.js +1 -1
  76. package/dist/esm/solutions-components.js +1 -1
  77. package/dist/esm/{utils-3fc29543.js → utils-0a78d3c9.js} +2 -2
  78. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-splash/instant-apps-splash.css +7 -0
  79. package/dist/solutions-components/{p-b739f26d.entry.js → p-053effee.entry.js} +1 -1
  80. package/dist/solutions-components/{p-af573e0d.js → p-09543b4e.js} +1 -1
  81. package/dist/solutions-components/p-1b1ff60a.entry.js +6 -0
  82. package/dist/solutions-components/{p-e4107150.entry.js → p-2291bf3f.entry.js} +1 -1
  83. package/dist/solutions-components/p-2cf41651.entry.js +6 -0
  84. package/dist/solutions-components/{p-fe3aea1a.entry.js → p-351c7cbf.entry.js} +1 -1
  85. package/dist/solutions-components/{p-90fc786f.entry.js → p-3d999f0f.entry.js} +1 -1
  86. package/dist/solutions-components/p-3fe6c230.entry.js +6 -0
  87. package/dist/solutions-components/p-4695cfab.js +6 -0
  88. package/dist/solutions-components/{p-43699470.entry.js → p-499489c5.entry.js} +1 -1
  89. package/dist/solutions-components/{p-5ff711ee.js → p-5104cc98.js} +1 -1
  90. package/dist/solutions-components/p-5e694bcc.entry.js +29 -0
  91. package/dist/solutions-components/{p-cbb86cf2.entry.js → p-6a3f2249.entry.js} +1 -1
  92. package/dist/solutions-components/{p-a7f56b28.entry.js → p-6e5ea1cb.entry.js} +1 -1
  93. package/dist/solutions-components/{p-9c170b30.entry.js → p-76a1236d.entry.js} +1 -1
  94. package/dist/solutions-components/{p-1e14b3d0.entry.js → p-78b6d3fe.entry.js} +1 -1
  95. package/dist/solutions-components/{p-c48be45f.entry.js → p-8a1a0f9b.entry.js} +1 -1
  96. package/dist/solutions-components/{p-5cbf3eed.entry.js → p-8d4a4498.entry.js} +1 -1
  97. package/dist/solutions-components/{p-4a02fd45.entry.js → p-9d9e0e74.entry.js} +1 -1
  98. package/dist/solutions-components/{p-50fb7f47.js → p-b49e1a78.js} +1 -1
  99. package/dist/solutions-components/{p-c551ffc5.entry.js → p-c399f2b8.entry.js} +1 -1
  100. package/dist/solutions-components/p-cb27611e.entry.js +6 -0
  101. package/dist/solutions-components/{p-4cd4cb85.js → p-d001e961.js} +1 -1
  102. package/dist/solutions-components/{p-523dcf4b.entry.js → p-d37a68f7.entry.js} +1 -1
  103. package/dist/solutions-components/{p-a2cf9fdc.entry.js → p-db7d5db8.entry.js} +1 -1
  104. package/dist/solutions-components/{p-6438d1ea.entry.js → p-e29e57db.entry.js} +1 -1
  105. package/dist/solutions-components/{p-a5b751e2.entry.js → p-e625aa69.entry.js} +1 -1
  106. package/dist/solutions-components/{p-2542d5c9.entry.js → p-e9fcc194.entry.js} +1 -1
  107. package/dist/solutions-components/p-f0509d41.entry.js +6 -0
  108. package/dist/solutions-components/{p-374ddead.entry.js → p-f4880179.entry.js} +1 -1
  109. package/dist/solutions-components/solutions-components.esm.js +1 -1
  110. package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +43 -17
  111. package/dist/types/components/layer-table/layer-table.d.ts +4 -0
  112. package/package.json +7 -7
  113. package/dist/solutions-components/p-3fc18283.entry.js +0 -6
  114. package/dist/solutions-components/p-442dd59c.entry.js +0 -6
  115. package/dist/solutions-components/p-5585dcd3.entry.js +0 -6
  116. package/dist/solutions-components/p-953afbb3.entry.js +0 -29
  117. package/dist/solutions-components/p-a1d8aed8.entry.js +0 -6
  118. package/dist/solutions-components/p-ceb1030b.js +0 -6
  119. package/dist/solutions-components/p-f728af86.entry.js +0 -6
@@ -261,6 +261,10 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
261
261
  * string the current search expression
262
262
  */
263
263
  _searchExpression;
264
+ /**
265
+ * number[]: selected features from table
266
+ */
267
+ _tempSelectedIds;
264
268
  //--------------------------------------------------------------------------
265
269
  //
266
270
  // Watch handlers
@@ -566,10 +570,10 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
566
570
  const tableHeightClass = this.isMobile ? "height-full" : "height-full-adjusted";
567
571
  const showSearch = this._canShowFullTextSearch();
568
572
  this._validateActiveActions();
569
- return (h(Host, { key: 'f56462fd5d5afa71052cf2557069bb2fee15aaeb' }, h("calcite-shell", { key: '92ccfa2235269aad6da5f918f79ec8ae100e99ca' }, this._getTableControlRow("header"), h("div", { key: 'e5b8fe5e4236e1a7b7e9d31ad784d9bb52a6918d', class: `width-full ${tableHeightClass}` }, h("calcite-panel", { key: 'eca933d832e5b6efddb025211c253bf09e41ab22', class: "height-full width-full" }, showSearch &&
570
- h("div", { key: 'e819896c4264db3ee95d10194b67da65997b541d', class: "search-container" }, h("calcite-input", { key: 'e979c7962205caf072057332280b9e04ecd233c4', class: "search", clearable: true, icon: "search", onCalciteInputChange: (evt) => void this._searchTextChanged(evt), placeholder: this._searchPlaceHolder, title: this._searchPlaceHolder, type: "search" })), h("calcite-loader", { key: 'ee715472a4f819dd1e9328e75022439e9bba1334', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { key: '8085821dea31de1fcbb1119e5791c0dea744e470', class: tableNodeClass, ref: this.onTableNodeCreate }))), !this.isMobile ? (h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
573
+ return (h(Host, { key: '0998f68ec5ab3fe8c2e7a21aa832137730faf94f' }, h("calcite-shell", { key: 'a6f00f0280358c318cbed1afc48d54ae0ffae465' }, this._getTableControlRow("header"), h("div", { key: '744786c1915fd86e81c278ecc75c862312c1ec6f', class: `width-full ${tableHeightClass}` }, h("calcite-panel", { key: 'b59b7bcf0f6e3f5411ff0ecf5de8e6bd747fbe4a', class: "height-full width-full" }, showSearch &&
574
+ h("div", { key: '6c62638d97156a2101764bf620b0f48b70f906ad', class: "search-container" }, h("calcite-input", { key: '8ff64d0529b5e3fe281490917ba44a829567cb0c', class: "search", clearable: true, icon: "search", onCalciteInputChange: (evt) => void this._searchTextChanged(evt), placeholder: this._searchPlaceHolder, title: this._searchPlaceHolder, type: "search" })), h("calcite-loader", { key: '7f673a2fd30a5828dec0400d01c581440a3adf6b', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { key: '39c0801b1992db5f8782d6b3569fa89ba47ce8ce', class: tableNodeClass, ref: this.onTableNodeCreate }))), !this.isMobile ? (h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
571
575
  .replace("{{total}}", total)
572
- .replace("{{selected}}", selected))) : undefined), this.createFilterModal && this._filterModal(), h("delete-dialog", { key: '20c9a06c3f0d44433d9442755d25658c249e102c', id: "deleteDialogId", ids: this._getIds(), layer: this._layer, locale: this.locale, onDeleteDialogClose: () => this._deleteDialogOpen = false, open: this._deleteDialogOpen, ref: (el) => this._deleteDialog = el })));
576
+ .replace("{{selected}}", selected))) : undefined), this.createFilterModal && this._filterModal(), h("delete-dialog", { key: '6bf4038662260c566d304a63d8f118265a1bf69e', id: "deleteDialogId", ids: this._getIds(), layer: this._layer, locale: this.locale, onDeleteDialogClose: () => this._deleteDialogOpen = false, open: this._deleteDialogOpen, ref: (el) => this._deleteDialog = el })));
573
577
  }
574
578
  _deleteDialog;
575
579
  /**
@@ -629,18 +633,37 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
629
633
  *
630
634
  */
631
635
  async _searchFullText() {
636
+ let selectedIds = [];
637
+ let showSelected = false;
638
+ if (this._showOnlySelected) {
639
+ selectedIds = this._tempSelectedIds;
640
+ showSelected = true;
641
+ }
642
+ else {
643
+ this._clearSelection();
644
+ this._tempSelectedIds = [];
645
+ }
632
646
  //always clear previous search definition
633
647
  if (this._searchExpression) {
634
648
  this._clearSearchDefinitionExpression();
635
649
  }
650
+ let searchedIds = [];
636
651
  if (this._fullTextSearchInfo.length) {
637
652
  if (this._fullTextSearchInfo[0].searchTerm) {
638
653
  const searchQueryParams = this._layer.createQuery();
639
654
  searchQueryParams.fullText = this._fullTextSearchInfo;
640
- const searchedIds = await this._layer.queryObjectIds(searchQueryParams);
655
+ searchedIds = await this._layer.queryObjectIds(searchQueryParams);
656
+ if (showSelected && selectedIds?.length) {
657
+ searchedIds = searchedIds.filter((id) => selectedIds.includes(id));
658
+ }
641
659
  await this._updateSearchDefinitionExpression(searchedIds?.length ? searchedIds : [-1]);
642
660
  }
643
661
  }
662
+ // highlight the feature only when selected feature is present in applied filter
663
+ if (showSelected && searchedIds?.length) {
664
+ this._showOnlySelected = true;
665
+ this._table.highlightIds.addMany(searchedIds.reverse());
666
+ }
644
667
  //Added timeout and table.refresh() to avoid the issue in which we see empty table records after searching in combination to filter/reset filter
645
668
  await new Promise(resolve => setTimeout(resolve, 800));
646
669
  await this._updateAllIds();
@@ -1260,6 +1283,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1260
1283
  highlightEnabled: true,
1261
1284
  multiSortEnabled: false,
1262
1285
  visibleElements: {
1286
+ columnDescriptions: false,
1263
1287
  header: false,
1264
1288
  menu: false
1265
1289
  },
@@ -1290,6 +1314,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1290
1314
  // only readd in specific case where we have multiple selected and then click one of the currently selected
1291
1315
  const reAdd = this.selectedIds.length > 1 && evt.removed.length === 1;
1292
1316
  const newIds = reAdd ? evt.removed : ids.filter(id => this.selectedIds.indexOf(id) < 0);
1317
+ this._tempSelectedIds = newIds.length ? [...newIds] : [...this.selectedIds];
1293
1318
  this._clearSelection();
1294
1319
  this.selectedIds = [...newIds];
1295
1320
  if (newIds.length > 0) {
@@ -1302,10 +1327,12 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1302
1327
  else {
1303
1328
  // https://github.com/Esri/solutions-components/issues/365
1304
1329
  this.selectedIds = ids.reverse();
1330
+ this._tempSelectedIds = [...this.selectedIds];
1305
1331
  }
1306
1332
  }
1307
1333
  else if (this._ctrlIsPressed) {
1308
1334
  this.selectedIds = ids.reverse();
1335
+ this._tempSelectedIds = [...this.selectedIds];
1309
1336
  }
1310
1337
  else if (this._shiftIsPressed && ids?.length > 0) {
1311
1338
  this._skipOnChange = true;
@@ -1342,6 +1369,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1342
1369
  }, []);
1343
1370
  const selectedIds = _start < _end ? idsInRange.reverse() : idsInRange;
1344
1371
  this.selectedIds = [...new Set([...selectedIds, ...this.selectedIds])];
1372
+ this._tempSelectedIds = [...this.selectedIds];
1345
1373
  this._table.highlightIds.addMany(this.selectedIds.filter(i => ids.indexOf(i) < 0));
1346
1374
  }
1347
1375
  }
@@ -13,7 +13,7 @@ import { e as esriLoader } from './esri-loader.js';
13
13
  * See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
14
14
  */
15
15
  const loadModules = async (moduleNames, options) => {
16
- esriLoader.exports.setDefaultOptions({ url: 'https://js.arcgis.com/4.30/' });
16
+ esriLoader.exports.setDefaultOptions({ url: 'https://js.arcgis.com/4.31/' });
17
17
  const mods = await esriLoader.exports.loadModules(moduleNames, options);
18
18
  return mods.map(mod => (mod.__esModule && mod.default ? mod.default : mod));
19
19
  };
@@ -64,7 +64,7 @@ const SolutionSpatialRef = /*@__PURE__*/ proxyCustomElement(class SolutionSpatia
64
64
  }
65
65
  render() {
66
66
  this._updateUIFromStore();
67
- return (h(Host, { key: 'c4d6b7debb3852da999002bd1d9394ba4a4f2da8' }, h("label", { key: 'e16a28157db4c3aece6a00460816c3394f1f9198', class: "switch-label" }, h("calcite-switch", { key: '48d3b1c12aa93c50ccf424ccaf0a810855227b8d', checked: this.enabled, class: "spatial-ref-switch", onCalciteSwitchChange: (event) => this.enabled = event.target.checked, scale: "m" }), this._translations.enableSpatialReference), h("br", { key: '0e7eb35accdccef9f17e0a24b17180d25c4f054a' }), h("div", { key: '257e130fdda5e42a8c40662f21c3d315f91562c7', class: "spatial-ref-component", id: "spatialRefDefn" }, this._renderFeatureServicesList(this.featureServices)), h("label", { key: 'd7581971bb310c6c4b0fb1015db59a359da54b90', class: "switch-label spatial-ref-component" }, h("calcite-switch", { key: '3045b179955101fc5baff8ca09cb10d0077e35ca', checked: this.enableDefault, class: "spatial-ref-switch", disabled: !this.enabled, onCalciteSwitchChange: (event) => this.enableDefault = event.target.checked, scale: "m" }), this._translations.enableDefaultSpatialReference)));
67
+ return (h(Host, { key: 'b8775ad1a6a18c0b32d020c02d6f9fe13f5d578a' }, h("label", { key: 'd10fa03d4d127579eed4fec2c6c907dc46166bdf', class: "switch-label" }, h("calcite-switch", { key: 'ce47d98234008f377d674851ce77c68ebaa4fd71', checked: this.enabled, class: "spatial-ref-switch", onCalciteSwitchChange: (event) => this.enabled = event.target.checked, scale: "m" }), this._translations.enableSpatialReference), h("br", { key: '54dc5ccf3fec55650f62d8dbeb09071c8e88805c' }), h("div", { key: '03257e474d254e4d5a0dd10ac7ab6e8b88f85d54', class: "spatial-ref-component", id: "spatialRefDefn" }, this._renderFeatureServicesList(this.featureServices)), h("label", { key: 'fac415766affa3b1620ce6a5c3d5ef900b25944f', class: "switch-label spatial-ref-component" }, h("calcite-switch", { key: '611b69b0895267702a69a70436033274d3d28892', checked: this.enableDefault, class: "spatial-ref-switch", disabled: !this.enabled, onCalciteSwitchChange: (event) => this.enableDefault = event.target.checked, scale: "m" }), this._translations.enableDefaultSpatialReference)));
68
68
  }
69
69
  //--------------------------------------------------------------------------
70
70
  //
@@ -271,7 +271,7 @@ const SolutionSpatialRef = /*@__PURE__*/ proxyCustomElement(class SolutionSpatia
271
271
  "enabled": [1540],
272
272
  "enableDefault": [1540, "enable-default"],
273
273
  "featureServices": [1040],
274
- "locale": [1],
274
+ "locale": [1025],
275
275
  "_translations": [32],
276
276
  "_testAccess": [64]
277
277
  }, [[8, "solutionStoreHasChanges", "solutionStoreHasChanges"]], {
@@ -129,7 +129,7 @@ function initExternalCKEditorStyles() {
129
129
  document.head.appendChild(style);
130
130
  }
131
131
  async function updateLastSave(resource) {
132
- const data = await resource.fetch();
132
+ const data = store.get('portalItemResourceT9n');
133
133
  const lastSave = Date.now();
134
134
  store.set('lastSave', lastSave);
135
135
  const dataStr = JSON.stringify(Object.assign(Object.assign({}, data), { lastSave }));
@@ -11,7 +11,7 @@ import { c as connectLocalized, d as disconnectLocalized } from './locale-24516f
11
11
  import { u as updateMessages, c as connectMessages, d as disconnectMessages, s as setUpMessages } from './t9n-9a5d28cf.js';
12
12
  import { t as toggleChildActionText, E as ExpandToggle } from './ExpandToggle-4d440eb0.js';
13
13
  import { c as createObserver } from './observers-c83631e8.js';
14
- import { l as loadModules } from './loadModules-03ba7abe.js';
14
+ import { l as loadModules } from './loadModules-d5a25252.js';
15
15
  import './guid-b0fb1de3.js';
16
16
  import './resources-8e2ed936.js';
17
17
  import './browser-b67d8df6.js';
@@ -23,8 +23,8 @@ import { g as guid } from './guid-b0fb1de3.js';
23
23
  import { g as getIconScale } from './component-83541c88.js';
24
24
  import { V as Validation } from './Validation-cf136c56.js';
25
25
  import { s as syncHiddenFormInput } from './input-e01adc49.js';
26
- import { l as loadModules } from './loadModules-03ba7abe.js';
27
- import { g as getMessages } from './locale-ce177eb8.js';
26
+ import { l as loadModules } from './loadModules-d5a25252.js';
27
+ import { g as getMessages } from './locale-77038bee.js';
28
28
  import { g as getMode } from './mode-8c5f5dc9.js';
29
29
  import './observers-c83631e8.js';
30
30
  import './resources-8e2ed936.js';
@@ -1534,7 +1534,6 @@ const InstantAppsFilterList = class {
1534
1534
  this.filterLayerExpressions = undefined;
1535
1535
  this.messages = undefined;
1536
1536
  this.baseClass = baseClassLight;
1537
- this.disabled = true;
1538
1537
  this.initDefExpressions = undefined;
1539
1538
  this.initMapImageExpressions = undefined;
1540
1539
  this.initPointCloudFilters = undefined;
@@ -1555,31 +1554,27 @@ const InstantAppsFilterList = class {
1555
1554
  });
1556
1555
  }
1557
1556
  forceReset() {
1558
- this.handleResetFilter();
1559
- return this.initExpressions();
1557
+ this.resetExpressions();
1558
+ return Promise.resolve();
1560
1559
  }
1561
- restoreFilters(filterParamString, filterInitState) {
1562
- this.filterLayerExpressions = structuredClone(this.layerExpressions);
1560
+ updateInitDefExpressions(filterInitState) {
1563
1561
  this.initDefExpressions = filterInitState.initDefExpressions;
1564
1562
  this.initMapImageExpressions = filterInitState.initMapImageExpressions;
1565
1563
  this.initPointCloudFilters = filterInitState.initPointCloudFilters;
1566
- const filters = filterParamString === null || filterParamString === void 0 ? void 0 : filterParamString.split(';').map(filter => JSON.parse(filter));
1567
- if (filters) {
1568
- this.filterCount = this.applyFilters(filters);
1569
- }
1570
- return this.initExpressions();
1564
+ return Promise.resolve();
1565
+ }
1566
+ getCurrentLayerExpressions() {
1567
+ const currentLayerExpressions = structuredClone(this.filterLayerExpressions);
1568
+ return Promise.resolve(currentLayerExpressions);
1571
1569
  }
1572
1570
  connectedCallback() {
1573
- var _a;
1574
1571
  if (this.layerExpressions == null && this.view == null)
1575
1572
  return;
1576
1573
  this.isLayerExpUpdated = true;
1577
1574
  this.filterLayerExpressions = structuredClone(this.layerExpressions);
1578
- this.disabled = ((_a = this.filterLayerExpressions) === null || _a === void 0 ? void 0 : _a.length) ? undefined : true;
1579
1575
  this.handleLayerExpressionsUpdate();
1580
1576
  }
1581
1577
  async componentWillLoad() {
1582
- var _a;
1583
1578
  this.baseClass = getMode(this.el) === 'dark' ? baseClassDark : baseClassLight;
1584
1579
  await this.initializeModules();
1585
1580
  getMessages(this);
@@ -1587,14 +1582,15 @@ const InstantAppsFilterList = class {
1587
1582
  return;
1588
1583
  this.isLayerExpUpdated = true;
1589
1584
  this.filterLayerExpressions = this.layerExpressions != null ? structuredClone(this.layerExpressions) : [];
1590
- this.disabled = ((_a = this.filterLayerExpressions) === null || _a === void 0 ? void 0 : _a.length) ? undefined : true;
1591
1585
  if (this.view == null)
1592
1586
  return;
1593
1587
  this.handleLayerExpressionsUpdate();
1594
1588
  }
1595
- componentWillRender() {
1589
+ componentDidRender() {
1596
1590
  var _a;
1597
- this.disabled = ((_a = this.filterLayerExpressions) === null || _a === void 0 ? void 0 : _a.length) > 0 ? undefined : true;
1591
+ if (this.resetBtnEl != null) {
1592
+ this.resetBtnEl.disabled = ((_a = this.filterLayerExpressions) === null || _a === void 0 ? void 0 : _a.length) > 0 ? false : true;
1593
+ }
1598
1594
  }
1599
1595
  disconnectedCallback() {
1600
1596
  if (this.resetFiltersOnDisconnect) {
@@ -1612,7 +1608,7 @@ const InstantAppsFilterList = class {
1612
1608
  render() {
1613
1609
  const filterConfig = this.loading ? this.renderLoading() : this.initFilterConfig();
1614
1610
  const footer = this.renderFooter();
1615
- return (h(Host, { key: '055d2a02c5118e59462af8759c6bf2f39304fd75' }, h("calcite-panel", { key: '0335c9b28101257551902737ef373543aebee1f6', class: this.baseClass, ref: el => (this.panelEl = el) }, h("slot", { key: '4b471e66583b3f2fd733688d65ce8d3b2acbeb66', slot: "header-content", name: "filter-header-content" }), h("slot", { key: 'f5832075687a6812b902643fd057587b438b38cf', slot: "header-actions-end", name: "filter-header-actions-end" }), h("div", { key: "filter-container", class: CSS$1.filterContainer }, filterConfig, footer))));
1611
+ return (h(Host, { key: '92daa28c3cada3360d3b3d4202f54842e2e42923' }, h("calcite-panel", { key: '43ed17c41f1c42dcb25a19423e1638885a4ca64b', class: this.baseClass, ref: el => (this.panelEl = el) }, h("slot", { key: 'df4bc6bdf21127e781f930cf476af2a5d8199c87', slot: "header-content", name: "filter-header-content" }), h("slot", { key: 'c2e6744535fb85e40ddd4de215f693258bf31e87', slot: "header-actions-end", name: "filter-header-actions-end" }), h("div", { key: "filter-container", class: CSS$1.filterContainer }, filterConfig, footer))));
1616
1612
  }
1617
1613
  renderLoading() {
1618
1614
  return h("calcite-loader", { label: "Loading filters..." });
@@ -1685,7 +1681,7 @@ const InstantAppsFilterList = class {
1685
1681
  var _a, _b, _c;
1686
1682
  const closeText = this.closeBtnText != null ? this.closeBtnText : (_a = this.messages) === null || _a === void 0 ? void 0 : _a.close;
1687
1683
  const btnWidth = this.closeBtn && this.resetBtn ? 'half' : 'full';
1688
- return (h("div", { class: CSS$1.footer, slot: "footer" }, this.resetBtn ? (h("calcite-button", { appearance: "outline", width: btnWidth, disabled: this.disabled, onClick: this.handleResetFilter.bind(this) }, (_b = this.messages) === null || _b === void 0 ? void 0 : _b.resetFilter)) : undefined, this.closeBtn ? (h("calcite-button", { appearance: "solid", width: btnWidth, kind: "brand", onClick: (_c = this.closeBtnOnClick) === null || _c === void 0 ? void 0 : _c.bind(this) }, closeText)) : undefined));
1684
+ return (h("div", { class: CSS$1.footer, slot: "footer" }, this.resetBtn ? (h("calcite-button", { appearance: "outline", width: btnWidth, ref: (el) => (this.resetBtnEl = el), onClick: this.handleResetFilter.bind(this) }, (_b = this.messages) === null || _b === void 0 ? void 0 : _b.resetFilter)) : undefined, this.closeBtn ? (h("calcite-button", { appearance: "solid", width: btnWidth, kind: "brand", onClick: (_c = this.closeBtnOnClick) === null || _c === void 0 ? void 0 : _c.bind(this) }, closeText)) : undefined));
1689
1685
  }
1690
1686
  renderZoomTo(layerExpression) {
1691
1687
  var _a;
@@ -1716,23 +1712,29 @@ const InstantAppsFilterList = class {
1716
1712
  }
1717
1713
  async initExpressions() {
1718
1714
  this.loading = true;
1719
- if (this.filterLayerExpressions == null || this.view == null)
1715
+ if (this.filterLayerExpressions == null || this.view == null) {
1716
+ this.loading = false;
1720
1717
  return;
1718
+ }
1721
1719
  await this.processExpressions();
1722
1720
  this.loading = false;
1723
1721
  }
1724
1722
  async processExpressions() {
1725
- var _a;
1726
1723
  if (!this.filterLayerExpressions)
1727
1724
  return;
1728
1725
  for (const layerExpression of this.filterLayerExpressions) {
1729
1726
  for (const expression of layerExpression.expressions || []) {
1730
- expression.active = (_a = expression.active) !== null && _a !== void 0 ? _a : expression.definitionExpression != null;
1731
1727
  await this.setInitExpression(layerExpression, expression);
1732
1728
  }
1733
1729
  }
1734
1730
  }
1735
1731
  handleResetFilter() {
1732
+ this.resetExpressions();
1733
+ this.resetAllFilters();
1734
+ this.generateURLParams();
1735
+ this.filterListReset.emit();
1736
+ }
1737
+ resetExpressions() {
1736
1738
  var _a;
1737
1739
  (_a = this.filterLayerExpressions) === null || _a === void 0 ? void 0 : _a.forEach(layerExpression => {
1738
1740
  var _a;
@@ -1760,9 +1762,6 @@ const InstantAppsFilterList = class {
1760
1762
  expression.active = false;
1761
1763
  });
1762
1764
  });
1763
- this.resetAllFilters();
1764
- this.generateURLParams();
1765
- this.filterListReset.emit();
1766
1765
  }
1767
1766
  resetExpressionUI(type, expression) {
1768
1767
  const { id } = expression;
@@ -422,6 +422,10 @@ const LayerTable = class {
422
422
  * string the current search expression
423
423
  */
424
424
  _searchExpression;
425
+ /**
426
+ * number[]: selected features from table
427
+ */
428
+ _tempSelectedIds;
425
429
  //--------------------------------------------------------------------------
426
430
  //
427
431
  // Watch handlers
@@ -727,10 +731,10 @@ const LayerTable = class {
727
731
  const tableHeightClass = this.isMobile ? "height-full" : "height-full-adjusted";
728
732
  const showSearch = this._canShowFullTextSearch();
729
733
  this._validateActiveActions();
730
- return (h(Host, { key: 'f56462fd5d5afa71052cf2557069bb2fee15aaeb' }, h("calcite-shell", { key: '92ccfa2235269aad6da5f918f79ec8ae100e99ca' }, this._getTableControlRow("header"), h("div", { key: 'e5b8fe5e4236e1a7b7e9d31ad784d9bb52a6918d', class: `width-full ${tableHeightClass}` }, h("calcite-panel", { key: 'eca933d832e5b6efddb025211c253bf09e41ab22', class: "height-full width-full" }, showSearch &&
731
- h("div", { key: 'e819896c4264db3ee95d10194b67da65997b541d', class: "search-container" }, h("calcite-input", { key: 'e979c7962205caf072057332280b9e04ecd233c4', class: "search", clearable: true, icon: "search", onCalciteInputChange: (evt) => void this._searchTextChanged(evt), placeholder: this._searchPlaceHolder, title: this._searchPlaceHolder, type: "search" })), h("calcite-loader", { key: 'ee715472a4f819dd1e9328e75022439e9bba1334', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { key: '8085821dea31de1fcbb1119e5791c0dea744e470', class: tableNodeClass, ref: this.onTableNodeCreate }))), !this.isMobile ? (h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
734
+ return (h(Host, { key: '0998f68ec5ab3fe8c2e7a21aa832137730faf94f' }, h("calcite-shell", { key: 'a6f00f0280358c318cbed1afc48d54ae0ffae465' }, this._getTableControlRow("header"), h("div", { key: '744786c1915fd86e81c278ecc75c862312c1ec6f', class: `width-full ${tableHeightClass}` }, h("calcite-panel", { key: 'b59b7bcf0f6e3f5411ff0ecf5de8e6bd747fbe4a', class: "height-full width-full" }, showSearch &&
735
+ h("div", { key: '6c62638d97156a2101764bf620b0f48b70f906ad', class: "search-container" }, h("calcite-input", { key: '8ff64d0529b5e3fe281490917ba44a829567cb0c', class: "search", clearable: true, icon: "search", onCalciteInputChange: (evt) => void this._searchTextChanged(evt), placeholder: this._searchPlaceHolder, title: this._searchPlaceHolder, type: "search" })), h("calcite-loader", { key: '7f673a2fd30a5828dec0400d01c581440a3adf6b', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { key: '39c0801b1992db5f8782d6b3569fa89ba47ce8ce', class: tableNodeClass, ref: this.onTableNodeCreate }))), !this.isMobile ? (h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
732
736
  .replace("{{total}}", total)
733
- .replace("{{selected}}", selected))) : undefined), this.createFilterModal && this._filterModal(), h("delete-dialog", { key: '20c9a06c3f0d44433d9442755d25658c249e102c', id: "deleteDialogId", ids: this._getIds(), layer: this._layer, locale: this.locale, onDeleteDialogClose: () => this._deleteDialogOpen = false, open: this._deleteDialogOpen, ref: (el) => this._deleteDialog = el })));
737
+ .replace("{{selected}}", selected))) : undefined), this.createFilterModal && this._filterModal(), h("delete-dialog", { key: '6bf4038662260c566d304a63d8f118265a1bf69e', id: "deleteDialogId", ids: this._getIds(), layer: this._layer, locale: this.locale, onDeleteDialogClose: () => this._deleteDialogOpen = false, open: this._deleteDialogOpen, ref: (el) => this._deleteDialog = el })));
734
738
  }
735
739
  _deleteDialog;
736
740
  /**
@@ -790,18 +794,37 @@ const LayerTable = class {
790
794
  *
791
795
  */
792
796
  async _searchFullText() {
797
+ let selectedIds = [];
798
+ let showSelected = false;
799
+ if (this._showOnlySelected) {
800
+ selectedIds = this._tempSelectedIds;
801
+ showSelected = true;
802
+ }
803
+ else {
804
+ this._clearSelection();
805
+ this._tempSelectedIds = [];
806
+ }
793
807
  //always clear previous search definition
794
808
  if (this._searchExpression) {
795
809
  this._clearSearchDefinitionExpression();
796
810
  }
811
+ let searchedIds = [];
797
812
  if (this._fullTextSearchInfo.length) {
798
813
  if (this._fullTextSearchInfo[0].searchTerm) {
799
814
  const searchQueryParams = this._layer.createQuery();
800
815
  searchQueryParams.fullText = this._fullTextSearchInfo;
801
- const searchedIds = await this._layer.queryObjectIds(searchQueryParams);
816
+ searchedIds = await this._layer.queryObjectIds(searchQueryParams);
817
+ if (showSelected && selectedIds?.length) {
818
+ searchedIds = searchedIds.filter((id) => selectedIds.includes(id));
819
+ }
802
820
  await this._updateSearchDefinitionExpression(searchedIds?.length ? searchedIds : [-1]);
803
821
  }
804
822
  }
823
+ // highlight the feature only when selected feature is present in applied filter
824
+ if (showSelected && searchedIds?.length) {
825
+ this._showOnlySelected = true;
826
+ this._table.highlightIds.addMany(searchedIds.reverse());
827
+ }
805
828
  //Added timeout and table.refresh() to avoid the issue in which we see empty table records after searching in combination to filter/reset filter
806
829
  await new Promise(resolve => setTimeout(resolve, 800));
807
830
  await this._updateAllIds();
@@ -1421,6 +1444,7 @@ const LayerTable = class {
1421
1444
  highlightEnabled: true,
1422
1445
  multiSortEnabled: false,
1423
1446
  visibleElements: {
1447
+ columnDescriptions: false,
1424
1448
  header: false,
1425
1449
  menu: false
1426
1450
  },
@@ -1451,6 +1475,7 @@ const LayerTable = class {
1451
1475
  // only readd in specific case where we have multiple selected and then click one of the currently selected
1452
1476
  const reAdd = this.selectedIds.length > 1 && evt.removed.length === 1;
1453
1477
  const newIds = reAdd ? evt.removed : ids.filter(id => this.selectedIds.indexOf(id) < 0);
1478
+ this._tempSelectedIds = newIds.length ? [...newIds] : [...this.selectedIds];
1454
1479
  this._clearSelection();
1455
1480
  this.selectedIds = [...newIds];
1456
1481
  if (newIds.length > 0) {
@@ -1463,10 +1488,12 @@ const LayerTable = class {
1463
1488
  else {
1464
1489
  // https://github.com/Esri/solutions-components/issues/365
1465
1490
  this.selectedIds = ids.reverse();
1491
+ this._tempSelectedIds = [...this.selectedIds];
1466
1492
  }
1467
1493
  }
1468
1494
  else if (this._ctrlIsPressed) {
1469
1495
  this.selectedIds = ids.reverse();
1496
+ this._tempSelectedIds = [...this.selectedIds];
1470
1497
  }
1471
1498
  else if (this._shiftIsPressed && ids?.length > 0) {
1472
1499
  this._skipOnChange = true;
@@ -1503,6 +1530,7 @@ const LayerTable = class {
1503
1530
  }, []);
1504
1531
  const selectedIds = _start < _end ? idsInRange.reverse() : idsInRange;
1505
1532
  this.selectedIds = [...new Set([...selectedIds, ...this.selectedIds])];
1533
+ this._tempSelectedIds = [...this.selectedIds];
1506
1534
  this._table.highlightIds.addMany(this.selectedIds.filter(i => ids.indexOf(i) < 0));
1507
1535
  }
1508
1536
  }
@@ -3,19 +3,11 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import { l as loadModules } from './loadModules-03ba7abe.js';
6
+ import { l as loadModules } from './loadModules-d5a25252.js';
7
7
 
8
- async function fetchResourceData(request, resource) {
9
- var _a, _b, _c;
8
+ async function fetchResourceData(resource) {
10
9
  try {
11
- const token = (_c = (_b = (_a = resource === null || resource === void 0 ? void 0 : resource.portalItem) === null || _a === void 0 ? void 0 : _a.portal) === null || _b === void 0 ? void 0 : _b['credential']) === null || _c === void 0 ? void 0 : _c['token'];
12
- const reqConfig = { responseType: 'json' };
13
- if (token)
14
- reqConfig.query = { token };
15
- var cacheBuster = 'cacheBuster=' + Date.now();
16
- const url = `${resource.url}?${cacheBuster}`;
17
- const reqRes = await request(url, reqConfig);
18
- const t9nData = reqRes.data;
10
+ const t9nData = await resource.fetch('json', { cacheBust: true });
19
11
  return Promise.resolve(t9nData);
20
12
  }
21
13
  catch (err) {