@esri/solutions-components 0.11.17 → 0.11.18

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 (73) hide show
  1. package/dist/cjs/card-manager_3.cjs.entry.js +116 -137
  2. package/dist/cjs/create-feature_4.cjs.entry.js +55 -9
  3. package/dist/cjs/create-related-feature_3.cjs.entry.js +1 -1
  4. package/dist/cjs/crowdsource-manager.cjs.entry.js +32 -19
  5. package/dist/cjs/crowdsource-reporter.cjs.entry.js +1 -1
  6. package/dist/cjs/{downloadUtils-88ec0e88.js → downloadUtils-9abff913.js} +1 -1
  7. package/dist/cjs/feature-list.cjs.entry.js +3 -3
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/map-layer-picker.cjs.entry.js +1 -1
  10. package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
  11. package/dist/cjs/{mapViewUtils-319df9ec.js → mapViewUtils-4ea7216c.js} +0 -44
  12. package/dist/cjs/{popupUtils-ca1127aa.js → popupUtils-fc7557da.js} +1 -1
  13. package/dist/cjs/public-notification.cjs.entry.js +2 -2
  14. package/dist/cjs/solution-item-accordion.cjs.entry.js +6 -3
  15. package/dist/cjs/solutions-components.cjs.js +1 -1
  16. package/dist/collection/assets/t9n/crowdsource-manager/resources.json +4 -1
  17. package/dist/collection/assets/t9n/crowdsource-manager/resources_en.json +4 -1
  18. package/dist/collection/components/card-manager/card-manager.js +1 -1
  19. package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +23 -0
  20. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +32 -18
  21. package/dist/collection/components/info-card/info-card.js +88 -7
  22. package/dist/collection/components/layer-table/layer-table.js +147 -137
  23. package/dist/collection/components/solution-item-accordion/solution-item-accordion.js +11 -4
  24. package/dist/components/card-manager2.js +1 -1
  25. package/dist/components/crowdsource-manager.js +33 -19
  26. package/dist/components/info-card2.js +54 -6
  27. package/dist/components/layer-table2.js +116 -136
  28. package/dist/components/map-select-tools2.js +1 -1
  29. package/dist/components/queryUtils.js +1 -43
  30. package/dist/components/refine-selection2.js +1 -1
  31. package/dist/components/solution-item-accordion.js +6 -3
  32. package/dist/esm/card-manager_3.entry.js +116 -137
  33. package/dist/esm/create-feature_4.entry.js +55 -9
  34. package/dist/esm/create-related-feature_3.entry.js +1 -1
  35. package/dist/esm/crowdsource-manager.entry.js +32 -19
  36. package/dist/esm/crowdsource-reporter.entry.js +1 -1
  37. package/dist/esm/{downloadUtils-22a8f2d8.js → downloadUtils-36d854d2.js} +1 -1
  38. package/dist/esm/feature-list.entry.js +3 -3
  39. package/dist/esm/loader.js +1 -1
  40. package/dist/esm/map-layer-picker.entry.js +1 -1
  41. package/dist/esm/map-select-tools_3.entry.js +2 -2
  42. package/dist/esm/{mapViewUtils-a854e298.js → mapViewUtils-9da9be1c.js} +1 -43
  43. package/dist/esm/{popupUtils-1314cb13.js → popupUtils-64d25cb0.js} +1 -1
  44. package/dist/esm/public-notification.entry.js +2 -2
  45. package/dist/esm/solution-item-accordion.entry.js +6 -3
  46. package/dist/esm/solutions-components.js +1 -1
  47. package/dist/solutions-components/assets/t9n/crowdsource-manager/resources.json +4 -1
  48. package/dist/solutions-components/assets/t9n/crowdsource-manager/resources_en.json +4 -1
  49. package/dist/solutions-components/{p-43d9bb7d.entry.js → p-055706e3.entry.js} +1 -1
  50. package/dist/solutions-components/{p-8ea0a36a.entry.js → p-06970873.entry.js} +1 -1
  51. package/dist/solutions-components/{p-bf2598f8.entry.js → p-3c43839b.entry.js} +1 -1
  52. package/dist/solutions-components/{p-4f514c6d.js → p-6eab9d1f.js} +1 -1
  53. package/dist/solutions-components/{p-a003600b.entry.js → p-72ae3bf0.entry.js} +1 -1
  54. package/dist/solutions-components/p-777ed6b0.entry.js +6 -0
  55. package/dist/solutions-components/{p-5ea1e18b.entry.js → p-8b5c3c9f.entry.js} +1 -1
  56. package/dist/solutions-components/{p-1fe3577a.entry.js → p-a44815ea.entry.js} +1 -1
  57. package/dist/solutions-components/p-b1bd3028.entry.js +6 -0
  58. package/dist/solutions-components/{p-3c3aecdd.js → p-d0d21a1f.js} +1 -1
  59. package/dist/solutions-components/{p-952da957.js → p-dcd2f00b.js} +2 -2
  60. package/dist/solutions-components/{p-bc2548ba.entry.js → p-e2270562.entry.js} +1 -1
  61. package/dist/solutions-components/p-e90c0e26.entry.js +6 -0
  62. package/dist/solutions-components/solutions-components.esm.js +1 -1
  63. package/dist/solutions-components_commit.txt +6 -6
  64. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +11 -7
  65. package/dist/types/components/info-card/info-card.d.ts +16 -0
  66. package/dist/types/components/layer-table/layer-table.d.ts +32 -21
  67. package/dist/types/components/solution-item-accordion/solution-item-accordion.d.ts +1 -1
  68. package/dist/types/components.d.ts +19 -2
  69. package/dist/types/preact.d.ts +2 -1
  70. package/package.json +1 -1
  71. package/dist/solutions-components/p-87919d6d.entry.js +0 -6
  72. package/dist/solutions-components/p-b37be371.entry.js +0 -6
  73. package/dist/solutions-components/p-ce8377c6.entry.js +0 -6
@@ -9,8 +9,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-2c21082d.js');
11
11
  const locale = require('./locale-c09e93fb.js');
12
- const mapViewUtils = require('./mapViewUtils-319df9ec.js');
13
- const downloadUtils = require('./downloadUtils-88ec0e88.js');
12
+ const mapViewUtils = require('./mapViewUtils-4ea7216c.js');
13
+ const downloadUtils = require('./downloadUtils-9abff913.js');
14
14
  require('./esri-loader-08dc41bd.js');
15
15
  require('./_commonjsHelpers-baf43783.js');
16
16
  require('./interfaces-09c4c40e.js');
@@ -197,7 +197,7 @@ const CardManager = class {
197
197
  const heading = isTable ? this._translations.createRecord : this._translations.createFeature;
198
198
  const guideMsg = this.customInfoText ? this.customInfoText : this.selectingFeatureFromMap ? this._translations.selectFeaturesFromMapToStart : this._translations.selectFeaturesToStart;
199
199
  const showCreateFeatureOrRecordBtn = this.enableCreateFeatures && this.layer?.capabilities?.operations?.supportsAdd;
200
- return (index.h(index.Host, { key: '5557aa4d80b859335e38db3f4255f4a61d00560f' }, index.h("div", { key: '6756e3314fc3444a982010a3cfa702d77f05f316', class: "overflow-auto height-full" }, index.h("calcite-shell", { key: '715eb7ed692a1d00347d44f20df370cf9a91ded5', class: "position-relative " + featuresClass }, index.h("div", { key: 'baf4e97c1884f477e4077a6dc8e59d98c77593a4', class: "position-static z-index-500" }, index.h("info-card", { key: 'e2ed262e2ebdf9b79ddd725f073f13d6a17909d2', enableEditGeometry: this.enableEditGeometry, graphics: this._graphics, isLoading: this._cardLoading, isMobile: this.isMobile, locale: this.locale, mapView: this.mapView }))), index.h("calcite-shell", { key: '536b1dec2a539191f30b648f70a6bdcd447a6d6c', class: "position-relative " + messageClass }, index.h("calcite-panel", { key: '285eb9f07fcaf53c23ccecb44d68ec5bb85c9528' }, index.h("div", { key: 'dd180d0c21823d5cb3007c6078c9daa81a487101', class: "padding-1" }, index.h("calcite-notice", { key: 'b7d4ffb57b912c0424bef1c828608fd41d12d561', icon: this.selectingFeatureFromMap ? "map" : "table", iconFlipRtl: true, open: true }, index.h("div", { key: '642339477aa8b9e1cba106dcb410ef293363311f', slot: "message" }, guideMsg))), !this.isMobile && showCreateFeatureOrRecordBtn && index.h("calcite-button", { key: '835562b5a083e7fc6f558d19787d5fa2680c2938', disabled: !this.layer, onClick: () => this._createFeatureBtnClicked(), slot: "footer", width: "full" }, isTable ? this._translations.createRecord : this._translations.createFeature))), index.h("calcite-shell", { key: '5aeb16a8b0e6e693b7fddd64bf1ec2fe6553f133', class: "position-relative " + createFeatureClass }, index.h("calcite-flow-item", { key: '20487f672aa32832c3b6a576976ad1bb12116814' }, index.h("calcite-panel", { key: '9cc5d827a20afbf3381be0739cc3cc6713af8d66', heading: heading }, index.h("calcite-action", { key: 'c441e24039efd9ec28471e6b66bfea2a4b5a8454', class: "back-button hydrated", icon: "chevron-left", onClick: this._backFromCreateFeature.bind(this), scale: "s", slot: "header-actions-start", text: "" }), this.getEditorComponent(), this._showSubmitBtn && index.h("calcite-button", { key: 'a858b7a2fb25e257b6c92ca5719fb3a7cc8aedbb', appearance: "solid", class: "footer-top-button footer-button", onClick: () => void this._createFeature.submit(), slot: "footer", width: "full" }, this._translations.create)))))));
200
+ return (index.h(index.Host, { key: '5557aa4d80b859335e38db3f4255f4a61d00560f' }, index.h("div", { key: '6756e3314fc3444a982010a3cfa702d77f05f316', class: "overflow-auto height-full" }, index.h("calcite-shell", { key: '715eb7ed692a1d00347d44f20df370cf9a91ded5', class: "position-relative " + featuresClass }, index.h("div", { key: 'baf4e97c1884f477e4077a6dc8e59d98c77593a4', class: "position-static z-index-500" }, index.h("info-card", { key: '0b9b30182fbc3482e9edf49b79f68aec8cf86adc', enableEditGeometry: this.enableEditGeometry, graphics: this._graphics, isLoading: this._cardLoading, isMobile: this.isMobile, locale: this.locale, mapView: this.mapView, showCloseBtn: true }))), index.h("calcite-shell", { key: '94b646061956a78dec4f96d9d1d9dedc5ad6aee7', class: "position-relative " + messageClass }, index.h("calcite-panel", { key: '00b660d474234f8156f3d4c627626f5891754051' }, index.h("div", { key: 'adb0732ff59c4fdedb19367a32ad9e3e060ddb60', class: "padding-1" }, index.h("calcite-notice", { key: 'a2c88bd4a0827111b0d1f3056ae571b47e5b380b', icon: this.selectingFeatureFromMap ? "map" : "table", iconFlipRtl: true, open: true }, index.h("div", { key: 'bffc2630de3f0376b6ea5827c89f65dc605a5356', slot: "message" }, guideMsg))), !this.isMobile && showCreateFeatureOrRecordBtn && index.h("calcite-button", { key: '08bef5c20d6b60e17abcfc9fc19d7d1eb5d04b1c', disabled: !this.layer, onClick: () => this._createFeatureBtnClicked(), slot: "footer", width: "full" }, isTable ? this._translations.createRecord : this._translations.createFeature))), index.h("calcite-shell", { key: '833a8de60b491008006034c1696fcb29f1bb6a08', class: "position-relative " + createFeatureClass }, index.h("calcite-flow-item", { key: 'dd2ae4509e4bec5a90f33484f8a28f422c0eeee4' }, index.h("calcite-panel", { key: '8fa68650f1933a88cdaf1fee8391cf433b7b54e9', heading: heading }, index.h("calcite-action", { key: '2b205887ff8703e01ef356cae09ce5d15dbec7c6', class: "back-button hydrated", icon: "chevron-left", onClick: this._backFromCreateFeature.bind(this), scale: "s", slot: "header-actions-start", text: "" }), this.getEditorComponent(), this._showSubmitBtn && index.h("calcite-button", { key: '0977a3974583266f6d90e18c8fbbc3e18f803983', appearance: "solid", class: "footer-top-button footer-button", onClick: () => void this._createFeature.submit(), slot: "footer", width: "full" }, this._translations.create)))))));
201
201
  }
202
202
  /**
203
203
  * Returns the editor component for adding feature
@@ -474,10 +474,6 @@ const LayerTable = class {
474
474
  * IColumnsInfo: Key/value pair with fieldname/(visible in table)
475
475
  */
476
476
  _columnsInfo;
477
- /**
478
- * boolean: When true the ctrl key is currently pressed
479
- */
480
- _ctrlIsPressed = false;
481
477
  /**
482
478
  * number: The id of the most recently selected row from the table
483
479
  */
@@ -583,18 +579,10 @@ const LayerTable = class {
583
579
  * HTMLInstantAppsSocialShareElement: Element to support app sharing to social media
584
580
  */
585
581
  _shareNode;
586
- /**
587
- * boolean: When true the shift key is currently pressed
588
- */
589
- _shiftIsPressed = false;
590
582
  /**
591
583
  * HTMLCalciteDropdownElement: Dropdown the will support show/hide of table columns
592
584
  */
593
585
  _showHideDropdown;
594
- /**
595
- * boolean: When true any onChange handeling will be skipped
596
- */
597
- _skipOnChange = false;
598
586
  /**
599
587
  * HTMLCalciteDropdownElement: Dropdown the will support overflow tools that won't fit in the current display
600
588
  */
@@ -627,10 +615,22 @@ const LayerTable = class {
627
615
  * boolean: When true we will not evaluate if the editor has any pending edits
628
616
  */
629
617
  _skipEditCheck = false;
618
+ /**
619
+ * __esri.Handle: handle for the filter by extent
620
+ */
621
+ _filterByExtentHandle;
630
622
  /**
631
623
  * number[]: selected features from table
632
624
  */
633
625
  _tempSelectedIds;
626
+ /**
627
+ * number[]: out of extent oids which are selected but now out of extent
628
+ */
629
+ _outOFExtentOids = [];
630
+ /**
631
+ * boolean: When true allow table to update the records
632
+ */
633
+ _shouldUpdateTableOnExtentChange = true;
634
634
  //--------------------------------------------------------------------------
635
635
  //
636
636
  // Watch handlers
@@ -794,13 +794,35 @@ const LayerTable = class {
794
794
  * Reset the filter
795
795
  */
796
796
  async filterReset() {
797
+ if (this._filterByExtentHandle) {
798
+ this._table.filterGeometry = undefined;
799
+ this._filterByExtentHandle.remove();
800
+ this._filterByExtentHandle = undefined;
801
+ }
797
802
  await this._handleFilterListReset();
798
803
  }
799
804
  /**
800
805
  * Updates the filter
801
806
  */
802
- async filterUpdate(active) {
803
- await this._handleFilterUpdate(active);
807
+ async filterUpdate(filterActive, keepTableUpdatingOnMapExtentChange) {
808
+ await this._handleFilterUpdate(filterActive);
809
+ if (keepTableUpdatingOnMapExtentChange) {
810
+ this._shouldUpdateTableOnExtentChange = true;
811
+ this._handleTableOnMapExtent();
812
+ }
813
+ else if (keepTableUpdatingOnMapExtentChange === false) {
814
+ this._table.filterGeometry = undefined;
815
+ this._filterByExtentHandle.remove();
816
+ this._filterByExtentHandle = undefined;
817
+ // update all the ids when filter is unchecked or toggled off
818
+ await this._updateAllIds();
819
+ }
820
+ }
821
+ /**
822
+ * Validate if the table should update
823
+ */
824
+ async validateTableUpdate(shouldUpdateTableOnExtentChange) {
825
+ this._shouldUpdateTableOnExtentChange = shouldUpdateTableOnExtentChange;
804
826
  }
805
827
  /**
806
828
  * Validate if the editor has any pending edits
@@ -854,8 +876,20 @@ const LayerTable = class {
854
876
  * @returns a promise when the operation has completed
855
877
  */
856
878
  async editorInitialized(evt) {
879
+ this._shouldUpdateTableOnExtentChange = false;
857
880
  this._editor = evt.detail;
858
881
  }
882
+ /**
883
+ * Respond to and close the edit record display
884
+ *
885
+ * @returns a promise when the operation has completed
886
+ */
887
+ async closeEdit() {
888
+ this._shouldUpdateTableOnExtentChange = true;
889
+ if (this._filterByExtentHandle) {
890
+ this._handleTableOnMapExtent();
891
+ }
892
+ }
859
893
  /**
860
894
  * Scroll and zoom to the selected feature from the Features widget.
861
895
  *
@@ -916,7 +950,7 @@ const LayerTable = class {
916
950
  async editsComplete(evt) {
917
951
  const editType = evt.detail;
918
952
  if (editType === "delete" || editType === "add") {
919
- this._allIds = await mapViewUtils.queryAllIds(this._layer);
953
+ this._allIds = await this.queryAllIds();
920
954
  }
921
955
  await this._refresh();
922
956
  }
@@ -988,8 +1022,8 @@ const LayerTable = class {
988
1022
  const tableHeightClass = this.isMobile ? "height-full" : "height-full-adjusted";
989
1023
  const showSearch = this._canShowFullTextSearch();
990
1024
  this._validateActiveActions();
991
- return (index.h(index.Host, { key: '68d6d57fbc9122b15340e0be3426ad00d398c7b2' }, index.h("div", { key: 'c4839ef8df0c5d3937b68c444264ce3bbb5c808d' }, index.h("calcite-scrim", { key: 'd4fa1a66ddcc5d0e83ee4ee43b2a3230e7f0298f', class: scrimClass, loading: this._queryingData }), index.h("calcite-shell", { key: '2ae1aee8a242902f3fbc9a1a19b62a8b721e5de7' }, this._getTableControlRow("header"), index.h("div", { key: '73d424f4bb07f56245c2c0858544d6cb7d9fcc74', class: `width-full ${tableHeightClass}` }, index.h("calcite-panel", { key: 'a2404478e2daf5ebac1ff3ac10378a98c868bcb2', class: "height-full width-full" }, showSearch &&
992
- index.h("div", { key: 'e18c71ccab7853438c51fe7168b7a98087d215e2', class: "search-container" }, index.h("calcite-input", { key: '39ecb52bacd4560a94310a56faf084941aa44a2a', class: "search", clearable: true, icon: "search", onCalciteInputChange: (evt) => void this._searchTextChanged(evt), placeholder: this._searchPlaceHolder, title: this._searchPlaceHolder, type: "search" })), index.h("calcite-loader", { key: 'ce2aeb5e108b1d76da8694a071dcd46098e6bb28', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), index.h("div", { key: '78e596cb45427bb9d21a11368361f67e1ed306a5', class: tableNodeClass, ref: this.onTableNodeCreate }))), !this.isMobile ? (index.h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
1025
+ return (index.h(index.Host, { key: 'a0a998de3a1b29c311a9fdfa87f3bd836481ba5a' }, index.h("div", { key: 'aafaf9f925ed7321e1ca7f15fc7db369212dc1dc' }, index.h("calcite-scrim", { key: '86459aed994823dbf1d774aad01e8207a7df5f4f', class: scrimClass, loading: this._queryingData }), index.h("calcite-shell", { key: 'b29896a197cba444d2ac377779670394e29ecaf6' }, this._getTableControlRow("header"), index.h("div", { key: '0456651ac46f399eb04253387d7aae76995f4683', class: `width-full ${tableHeightClass}` }, index.h("calcite-panel", { key: '9ba484159832fea630bbb653bc2fc4e99e602674', class: "height-full width-full" }, showSearch &&
1026
+ index.h("div", { key: 'bd4b72db51f44c2954e893e8ef7ec2a30efc4c45', class: "search-container" }, index.h("calcite-input", { key: '8811ff1dd71408fda37a0d7d2403671df24b5b7b', class: "search", clearable: true, icon: "search", onCalciteInputChange: (evt) => void this._searchTextChanged(evt), placeholder: this._searchPlaceHolder, title: this._searchPlaceHolder, type: "search" })), index.h("calcite-loader", { key: '44a419089cf1e207f52ce19015c2870ce956e261', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), index.h("div", { key: '096f4fc7f5cc9500e7982bbfaceb2fcc4c82a1dd', class: tableNodeClass, ref: this.onTableNodeCreate }))), !this.isMobile ? (index.h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
993
1027
  .replace("{{total}}", total)
994
1028
  .replace("{{selected}}", selected))) : undefined), this.createFilterModal && this._filterModal())));
995
1029
  }
@@ -1009,8 +1043,6 @@ const LayerTable = class {
1009
1043
  componentDidRender() {
1010
1044
  // need to be called after each render to get the clicked mouseEvent
1011
1045
  document.onclick = (e) => this._handleDocumentClick(e);
1012
- document.onkeydown = (e) => this._handleKeyDown(e);
1013
- document.onkeyup = (e) => this._handleKeyUp(e);
1014
1046
  this._updateToolbar();
1015
1047
  }
1016
1048
  //--------------------------------------------------------------------------
@@ -1271,6 +1303,7 @@ const LayerTable = class {
1271
1303
  }
1272
1304
  if (ti.icon === "selected-items-filter") {
1273
1305
  ti.active = this._showOnlySelected;
1306
+ ti.label = this._showOnlySelected ? this._translations.showAll : this._translations.showSelected;
1274
1307
  }
1275
1308
  }
1276
1309
  });
@@ -1285,7 +1318,6 @@ const LayerTable = class {
1285
1318
  // hide multiple edits for R03
1286
1319
  const showMultipleEdits = this.selectedIds.length > 1 && this._layer?.capabilities?.operations?.supportsUpdate && false;
1287
1320
  const featuresEmpty = this._featuresEmpty();
1288
- const hasFilterExpressions = this._hasFilterExpressions();
1289
1321
  if (this._translations) {
1290
1322
  this._toolInfos = [
1291
1323
  !this.mapHidden ? {
@@ -1297,7 +1329,7 @@ const LayerTable = class {
1297
1329
  disabled: !featuresSelected,
1298
1330
  isOverflow: false
1299
1331
  } : undefined,
1300
- hasFilterExpressions ? {
1332
+ {
1301
1333
  active: false,
1302
1334
  icon: "filter",
1303
1335
  indicator: false,
@@ -1305,7 +1337,7 @@ const LayerTable = class {
1305
1337
  func: () => this.createFilterModal ? this._toggleFilter() : this.toggleFilter.emit(),
1306
1338
  disabled: false,
1307
1339
  isOverflow: false
1308
- } : undefined,
1340
+ },
1309
1341
  showMultipleEdits ? {
1310
1342
  active: false,
1311
1343
  icon: "pencil",
@@ -1707,6 +1739,7 @@ const LayerTable = class {
1707
1739
  editingEnabled: this._editEnabled && this.enableInlineEdit,
1708
1740
  highlightEnabled: true,
1709
1741
  multiSortEnabled: false,
1742
+ attachmentsEnabled: true,
1710
1743
  visibleElements: {
1711
1744
  columnDescriptions: false,
1712
1745
  header: false,
@@ -1738,88 +1771,9 @@ const LayerTable = class {
1738
1771
  return;
1739
1772
  }
1740
1773
  const ids = [...this._getIds()];
1741
- if (!this._skipOnChange) {
1742
- if ((!this._ctrlIsPressed && !this._shiftIsPressed) || (this._selectionFromMap && this._shiftIsPressed)) {
1743
- if (this.selectedIds.length > 0) {
1744
- this._skipOnChange = true;
1745
- // only readd in specific case where we have multiple selected and then click one of the currently selected
1746
- const reAdd = this.selectedIds.length > 1 && evt.removed.length === 1;
1747
- const newIds = reAdd ? evt.removed : ids.filter(id => this.selectedIds.indexOf(id) < 0);
1748
- this._tempSelectedIds = newIds.length ? [...newIds] : [...this.selectedIds];
1749
- this._clearSelection();
1750
- this.selectedIds = [...newIds];
1751
- if (newIds.length > 0) {
1752
- this._table.highlightIds.add(newIds[0]);
1753
- }
1754
- else {
1755
- this._skipOnChange = false;
1756
- }
1757
- }
1758
- else {
1759
- // https://github.com/Esri/solutions-components/issues/365
1760
- this.selectedIds = ids.reverse();
1761
- this._tempSelectedIds = [...this.selectedIds];
1762
- }
1763
- }
1764
- else if (this._ctrlIsPressed) {
1765
- this.selectedIds = ids.reverse();
1766
- this._tempSelectedIds = [...this.selectedIds];
1767
- }
1768
- else if (this._shiftIsPressed && ids?.length > 0) {
1769
- this._skipOnChange = true;
1770
- this._previousCurrentId = this._currentId;
1771
- this._currentId = [...ids].reverse()[0];
1772
- if (ids.length === 1) {
1773
- this._skipOnChange = false;
1774
- }
1775
- else if (this._previousCurrentId !== this._currentId) {
1776
- // query the layer based on current sort and filters then grab between the current id and previous id
1777
- const orderBy = this._table.activeSortOrders.reduce((prev, cur) => {
1778
- prev.push(`${cur.fieldName} ${cur.direction}`);
1779
- return prev;
1780
- }, []);
1781
- // when dealing with a feature layer with many features shift-select can take a very long time.
1782
- // don't allow the user to make additional interactions with the table if it takes more than 500 miliseconds
1783
- let queryComplete = false;
1784
- setTimeout(() => {
1785
- if (!queryComplete) {
1786
- this._queryingData = true;
1787
- }
1788
- }, 500);
1789
- const oids = await mapViewUtils.queryAllOidsWithQueryFeatures(0, this._layer, [], orderBy);
1790
- queryComplete = true;
1791
- this._queryingData = false;
1792
- let isBetween = false;
1793
- const _start = this._table.viewModel.getObjectIdIndex(this._previousCurrentId);
1794
- const _end = this._table.viewModel.getObjectIdIndex(this._currentId);
1795
- const startIndex = _start < _end ? _start : _end;
1796
- const endIndex = _end > _start ? _end : _start;
1797
- this._skipOnChange = startIndex + 1 !== endIndex;
1798
- const idsInRange = oids.reduce((prev, cur) => {
1799
- const id = cur;
1800
- if ((id === this._currentId || id === this._previousCurrentId)) {
1801
- isBetween = !isBetween;
1802
- if (prev.indexOf(id) < 0) {
1803
- prev.push(id);
1804
- }
1805
- }
1806
- else if (isBetween && prev.indexOf(id) < 0) {
1807
- prev.push(id);
1808
- }
1809
- return prev;
1810
- }, []);
1811
- const selectedIds = _start < _end ? idsInRange.reverse() : idsInRange;
1812
- this.selectedIds = [...new Set([...selectedIds, ...this.selectedIds])];
1813
- this._tempSelectedIds = [...this.selectedIds];
1814
- this._table.highlightIds.addMany(this.selectedIds.filter(i => ids.indexOf(i) < 0));
1815
- }
1816
- }
1817
- this._finishOnChange();
1818
- }
1819
- else {
1820
- this._skipOnChange = false;
1821
- }
1822
- this._currentId = [...this._getIds()].reverse()[0];
1774
+ this.selectedIds = ids.reverse();
1775
+ this._tempSelectedIds = [...this.selectedIds];
1776
+ this._finishOnChange();
1823
1777
  this._selectionFromMap = false;
1824
1778
  }
1825
1779
  /**
@@ -1858,6 +1812,7 @@ const LayerTable = class {
1858
1812
  handleOnChange = !this._skipEditCheck;
1859
1813
  this._skipEditCheck = false;
1860
1814
  }
1815
+ this._shouldUpdateTableOnExtentChange = handleOnChange;
1861
1816
  return handleOnChange;
1862
1817
  }
1863
1818
  /**
@@ -1874,7 +1829,7 @@ const LayerTable = class {
1874
1829
  _finishOnChange() {
1875
1830
  if (this._showOnlySelected) {
1876
1831
  if (this._featuresSelected()) {
1877
- this._table.filterBySelection();
1832
+ this._table.filterBySelectionEnabled = true;
1878
1833
  }
1879
1834
  else {
1880
1835
  this._toggleShowSelected();
@@ -1912,7 +1867,7 @@ const LayerTable = class {
1912
1867
  async _resetTable() {
1913
1868
  this._loaded = false;
1914
1869
  this._clearSelection();
1915
- this._allIds = await mapViewUtils.queryAllIds(this._layer);
1870
+ this._allIds = await this.queryAllIds();
1916
1871
  if (!this._table) {
1917
1872
  const columnTemplates = this._getColumnTemplates(this._layer.id, this._layer?.fields);
1918
1873
  await this._getTable(this._tableNode, columnTemplates);
@@ -1966,7 +1921,6 @@ const LayerTable = class {
1966
1921
  }
1967
1922
  this._refreshHandle = this._layer.on("refresh", (evt) => {
1968
1923
  if (evt.dataChanged) {
1969
- this._skipOnChange = true;
1970
1924
  void this._updateAllIds();
1971
1925
  }
1972
1926
  });
@@ -1975,7 +1929,7 @@ const LayerTable = class {
1975
1929
  * Reset _allIds when the layers data has changed and refresh the selection ids and table
1976
1930
  */
1977
1931
  async _updateAllIds() {
1978
- this._allIds = await mapViewUtils.queryAllIds(this._layer);
1932
+ this._allIds = await this.queryAllIds();
1979
1933
  this.selectedIds = this.selectedIds.filter(id => this._allIds.indexOf(id) > -1);
1980
1934
  await this._refresh();
1981
1935
  }
@@ -2115,20 +2069,6 @@ const LayerTable = class {
2115
2069
  }
2116
2070
  }
2117
2071
  }
2118
- /**
2119
- * Keep track of key down for ctrl and shift
2120
- */
2121
- _handleKeyDown(e) {
2122
- this._ctrlIsPressed = e.ctrlKey;
2123
- this._shiftIsPressed = e.shiftKey;
2124
- }
2125
- /**
2126
- * Keep track of key up for ctrl and shift
2127
- */
2128
- _handleKeyUp(e) {
2129
- this._ctrlIsPressed = e.ctrlKey;
2130
- this._shiftIsPressed = e.shiftKey;
2131
- }
2132
2072
  /**
2133
2073
  * Show filter component in modal
2134
2074
  *
@@ -2164,6 +2104,40 @@ const LayerTable = class {
2164
2104
  this._updateShareUrl();
2165
2105
  await this._searchFullText();
2166
2106
  }
2107
+ /**
2108
+ * Update the table when extent is changed
2109
+ */
2110
+ _handleTableOnMapExtent() {
2111
+ if (this._table) {
2112
+ this._filterByExtentHandle = this.reactiveUtils.when(() => this.mapView.stationary,
2113
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
2114
+ async () => {
2115
+ if (this._shouldUpdateTableOnExtentChange) {
2116
+ //Added timeout while updating table records to avoid the issue in which we see empty table records when extent is changed
2117
+ await new Promise(resolve => setTimeout(resolve, 800));
2118
+ this._table.filterGeometry = this.mapView.extent;
2119
+ const query = {
2120
+ geometry: this.mapView.extent
2121
+ };
2122
+ const objectIdsInExtent = await this._layer.queryObjectIds(query);
2123
+ // remove the highlight of features which are not in the map extent
2124
+ const outOids = this.selectedIds.filter(id => !objectIdsInExtent.includes(id));
2125
+ const restoreOids = this._outOFExtentOids.filter(id => objectIdsInExtent.includes(id));
2126
+ if (outOids.length > 0) {
2127
+ this._table.highlightIds.removeMany(outOids);
2128
+ this._outOFExtentOids = [...this._outOFExtentOids, ...outOids];
2129
+ }
2130
+ if (restoreOids.length > 0) {
2131
+ this._table.highlightIds.addMany(restoreOids);
2132
+ this._outOFExtentOids = this._outOFExtentOids.filter(oid => !restoreOids.includes(oid));
2133
+ }
2134
+ }
2135
+ this._allIds = await this.queryAllIds();
2136
+ }, {
2137
+ initial: true
2138
+ });
2139
+ }
2140
+ }
2167
2141
  /**
2168
2142
  * Close the filter modal
2169
2143
  * @protected
@@ -2171,10 +2145,20 @@ const LayerTable = class {
2171
2145
  async _closeFilter() {
2172
2146
  if (this._filterOpen) {
2173
2147
  // reset allIds
2174
- this._allIds = await mapViewUtils.queryAllIds(this._layer);
2148
+ this._allIds = await this.queryAllIds();
2175
2149
  this._filterOpen = false;
2176
2150
  }
2177
2151
  }
2152
+ /**
2153
+ * Query the layer for applied filter
2154
+ * @returns Promise with the featureSet from the layer that match the provided ids
2155
+ */
2156
+ async queryAllIds() {
2157
+ const query = this._layer.createQuery();
2158
+ query.geometry = this._filterByExtentHandle ? this.mapView.extent : null;
2159
+ query.where = this._layer.definitionExpression || "1=1";
2160
+ return await this._layer.queryObjectIds(query);
2161
+ }
2178
2162
  /**
2179
2163
  * Handle map click events to keep table and map click selection in sync
2180
2164
  *
@@ -2196,7 +2180,7 @@ const LayerTable = class {
2196
2180
  }
2197
2181
  });
2198
2182
  if (this._showOnlySelected) {
2199
- this._table.filterBySelection();
2183
+ this._table.filterBySelectionEnabled = true;
2200
2184
  }
2201
2185
  }
2202
2186
  else {
@@ -2213,7 +2197,6 @@ const LayerTable = class {
2213
2197
  const editsDiscarded = await this._validateActiveEdits(addedIds, this.selectedIds);
2214
2198
  if (editsDiscarded) {
2215
2199
  this._table.highlightIds.removeAll();
2216
- this._skipOnChange = true;
2217
2200
  this._table.highlightIds.addMany(ids);
2218
2201
  this.selectedIds = ids;
2219
2202
  this._finishOnChange();
@@ -2230,12 +2213,7 @@ const LayerTable = class {
2230
2213
  */
2231
2214
  _toggleShowSelected() {
2232
2215
  this._showOnlySelected = !this._showOnlySelected;
2233
- if (this._showOnlySelected) {
2234
- this._table.filterBySelection();
2235
- }
2236
- else {
2237
- this._table.objectIds.removeAll();
2238
- }
2216
+ this._table.filterBySelectionEnabled = this._showOnlySelected;
2239
2217
  }
2240
2218
  /**
2241
2219
  * Clears the selected indexes
@@ -2243,6 +2221,7 @@ const LayerTable = class {
2243
2221
  */
2244
2222
  _clearSelection() {
2245
2223
  this.selectedIds = [];
2224
+ this._outOFExtentOids = [];
2246
2225
  this._table?.highlightIds.removeAll();
2247
2226
  this._table?.rowHighlightIds.removeAll();
2248
2227
  this._finishOnChange();
@@ -2282,7 +2261,6 @@ const LayerTable = class {
2282
2261
  const editsDiscarded = await this._validateActiveEdits(ids, currentIndexes);
2283
2262
  if (editsDiscarded) {
2284
2263
  this._table.highlightIds.removeAll();
2285
- this._skipOnChange = true;
2286
2264
  this._table.highlightIds.addMany(ids);
2287
2265
  this.selectedIds = ids;
2288
2266
  this._finishOnChange();
@@ -2340,8 +2318,8 @@ const LayerTable = class {
2340
2318
  async _refresh() {
2341
2319
  const editsDiscarded = await this._validateActiveEdits([], this.selectedIds);
2342
2320
  if (editsDiscarded) {
2343
- await this._table.refresh();
2344
- this._allIds = await mapViewUtils.queryAllIds(this._layer);
2321
+ await this._table?.refresh();
2322
+ this._allIds = await this.queryAllIds();
2345
2323
  this.featureSelectionChange.emit(this.selectedIds);
2346
2324
  }
2347
2325
  }
@@ -2371,6 +2349,7 @@ const LayerTable = class {
2371
2349
  this._fetchingData = true;
2372
2350
  const layer = await mapViewUtils.getLayerOrTable(this.mapView, id);
2373
2351
  layer && await layer.when(() => {
2352
+ this._shouldUpdateTableOnExtentChange = true;
2374
2353
  this._layer = layer;
2375
2354
  this._getFullTextSearchInfo();
2376
2355
  });
@@ -9,12 +9,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-2c21082d.js');
11
11
  const locale = require('./locale-c09e93fb.js');
12
- const mapViewUtils = require('./mapViewUtils-319df9ec.js');
13
- const popupUtils = require('./popupUtils-ca1127aa.js');
12
+ const mapViewUtils = require('./mapViewUtils-4ea7216c.js');
13
+ const popupUtils = require('./popupUtils-fc7557da.js');
14
14
  require('./esri-loader-08dc41bd.js');
15
15
  require('./_commonjsHelpers-baf43783.js');
16
16
  require('./interfaces-09c4c40e.js');
17
- require('./downloadUtils-88ec0e88.js');
17
+ require('./downloadUtils-9abff913.js');
18
18
  require('./typeof-2a7e2dec.js');
19
19
  require('./index-5d8d6ae2.js');
20
20
  require('./solution-resource-d0a2f7fe.js');
@@ -1286,6 +1286,7 @@ const InfoCard = class {
1286
1286
  constructor(hostRef) {
1287
1287
  index.registerInstance(this, hostRef);
1288
1288
  this.popupClosed = index.createEvent(this, "popupClosed", 7);
1289
+ this.clearSelection = index.createEvent(this, "clearSelection", 7);
1289
1290
  this.selectionChanged = index.createEvent(this, "selectionChanged", 7);
1290
1291
  }
1291
1292
  get el() { return index.getElement(this); }
@@ -1334,6 +1335,10 @@ const InfoCard = class {
1334
1335
  * string: Set the position of the feature info
1335
1336
  */
1336
1337
  position = 'absolute';
1338
+ /**
1339
+ * boolean: If true show close button on the feature info
1340
+ */
1341
+ showCloseBtn = false;
1337
1342
  //--------------------------------------------------------------------------
1338
1343
  //
1339
1344
  // State (internal)
@@ -1366,6 +1371,10 @@ const InfoCard = class {
1366
1371
  * All UI strings should be defined here.
1367
1372
  */
1368
1373
  _translations;
1374
+ /**
1375
+ * boolean: When true user has been navigated to related feature
1376
+ */
1377
+ _navigatedToRelatedFeature;
1369
1378
  //--------------------------------------------------------------------------
1370
1379
  //
1371
1380
  // Properties (protected)
@@ -1401,6 +1410,10 @@ const InfoCard = class {
1401
1410
  * esri/core/reactiveUtils: https://developers.arcgis.com/javascript/latest/api-reference/esri-core-reactiveUtils.html
1402
1411
  */
1403
1412
  reactiveUtils;
1413
+ /**
1414
+ * __esri.Graphic: Related feature selected from the features widget
1415
+ */
1416
+ _relatedFeature;
1404
1417
  //--------------------------------------------------------------------------
1405
1418
  //
1406
1419
  // Watch handlers
@@ -1410,6 +1423,14 @@ const InfoCard = class {
1410
1423
  * Watch for changes to the graphic and update the feature widget
1411
1424
  */
1412
1425
  async graphicsWatchHandler() {
1426
+ // if user has been navigated to related record and graphics is changed then close the feature widget and then set graphics to avoid blank popup issue
1427
+ // https://github.com/Esri/solutions-components/issues/1113
1428
+ if (this._navigatedToRelatedFeature && this._features) {
1429
+ this._features.clear();
1430
+ this._features.close();
1431
+ this._count = "";
1432
+ this._navigatedToRelatedFeature = false;
1433
+ }
1413
1434
  await this.setGraphics();
1414
1435
  }
1415
1436
  /**
@@ -1500,6 +1521,10 @@ const InfoCard = class {
1500
1521
  * Emitted on demand when the popup is closed
1501
1522
  */
1502
1523
  popupClosed;
1524
+ /**
1525
+ * Emitted on demand when close button is clicked
1526
+ */
1527
+ clearSelection;
1503
1528
  /**
1504
1529
  * Emitted on demand when the selected index changes
1505
1530
  */
@@ -1526,7 +1551,10 @@ const InfoCard = class {
1526
1551
  * Refresh the info-card graphics
1527
1552
  */
1528
1553
  async refreshGraphics(evt) {
1529
- this.graphics = [...evt.detail];
1554
+ // if if user is not navigated to related feature then only update the graphics otherwise the related feature will shown instead of selected feature
1555
+ if (!this._navigatedToRelatedFeature) {
1556
+ this.graphics = [...evt.detail];
1557
+ }
1530
1558
  }
1531
1559
  //--------------------------------------------------------------------------
1532
1560
  //
@@ -1560,13 +1588,16 @@ const InfoCard = class {
1560
1588
  const featureNodeClass = this.isLoading || this._editRecordOpen ? "visibility-hidden" : "position-absolute";
1561
1589
  const editClass = !this.isLoading && this._editRecordOpen ? "position-absolute" : "display-none";
1562
1590
  const editButtonClass = (!this.isLoading && this._editRecordOpen) || this._showListView ? "display-none" : "";
1563
- const nextBackDisabled = this._features?.features?.length < 2;
1591
+ const nextBackDisabled = this._features?.features?.length < 2 || this._navigatedToRelatedFeature;
1564
1592
  const nextBackClass = this.isMobile ? "display-none" : "";
1565
1593
  const id = this._features?.selectedFeature?.getObjectId();
1566
1594
  const ids = parseInt(id?.toString(), 10) > -1 ? [id] : [];
1567
1595
  const deleteEnabled = this._layer?.editingEnabled && this._layer?.capabilities?.operations?.supportsDelete;
1568
- return (index.h(index.Host, { key: '66070d48134f89d9cf132572fe1adf790b6d3ec6' }, index.h("calcite-shell", { key: 'b77248dce176df940d8b0c347154b73738a5576d', style: { position: this.position } }, this._getHeader(), index.h("calcite-loader", { key: 'c1638ca8320a0ae12a9ccd1fd8841efde4236ba5', class: loadingClass, label: this._translations.fetchingData }), index.h("div", { key: 'cf5ee3be5c0ea3be36205dcf7c0747461802a5f1', class: "esri-widget feature-node " + featureNodeClass, id: this._featuresNodeId }), index.h("div", { key: '6fbfa6947fa0fdb1b14a03217da60f07ecff2e1b', class: `${editButtonClass} width-100`, slot: "footer" }, this.allowEditing &&
1569
- index.h("div", { key: 'fdcb078c3b3f183b06dc3a48d27fee46e3a4fffa', class: "display-flex top-border padding-1-2" }, index.h("calcite-button", { key: '7193bec80a40f353d24e5d327d99d94a2c5ff356', appearance: "solid", id: "solutions-edit", onClick: () => this._openEditRecord(), width: "full" }, this._translations.edit), this.isMobile && deleteEnabled ? (index.h("delete-button", { class: "padding-inline-start-1 width-100", id: "solutions-delete", ids: ids, layer: this._layer, locale: this.locale, onEditsComplete: () => this._closePopup() })) : undefined, index.h("calcite-tooltip", { key: '228a9691edd916a5d644cb19db24898cdf7cab3b', placement: "bottom", "reference-element": "solutions-edit" }, index.h("span", { key: '5c696df370bcf230d3fc06523ec3cb9d96f2fe2b' }, this._translations.edit)), this.isMobile && deleteEnabled ? (index.h("calcite-tooltip", { placement: "bottom", "reference-element": "solutions-delete" }, index.h("span", null, this._translations.delete))) : undefined), this.paginationEnabled && !nextBackDisabled && index.h("div", { key: 'e1b829a888913af6a9d777a2df0d65571ac3bec1', class: `display-flex padding-1-2 button-container top-border ${nextBackClass}` }, index.h("div", { key: '8746737a103266efe64a8f80c2359f9e170586d5' }, index.h("calcite-button", { key: 'ac6fc23dc2831608cc9c86fe384c0a927cd7d7ac', appearance: 'transparent', disabled: nextBackDisabled, iconFlipRtl: "both", iconStart: "chevron-left", id: "solutions-back", onClick: () => this._back(), width: "full" }), index.h("calcite-tooltip", { key: 'd4a1e2753c35e97064ca66d5c30deccd532fb158', placement: "top", "reference-element": "solutions-back" }, index.h("span", { key: 'caae32b5e32a0d89265293beccef157d227a7600' }, this._translations.back))), index.h("calcite-action", { key: 'a87f344a06896ad86886815254979793b057e4cd', class: 'pagination-action', iconFlipRtl: true, onClick: () => this._toggleListView(), scale: "s", text: "", textEnabled: true }, index.h("span", { key: '6e6f84ebedb2540edb485fa0789fe8ea67e7188f', class: "pagination-count" }, this._count)), index.h("div", { key: '6acf22348a508c921865bb4c7e531f9a826a8eed' }, index.h("calcite-button", { key: 'f1d763e1747cff7e0b6bec08ec4fade3d1582379', appearance: "transparent", disabled: nextBackDisabled, iconFlipRtl: "both", iconStart: "chevron-right", id: "solutions-next", onClick: () => this._next(), width: "full" }), index.h("calcite-tooltip", { key: 'def93e3d1f19b4e6eb3e54c5fbd918fed118cc0c', placement: "top", "reference-element": "solutions-next" }, index.h("span", { key: 'cb9b90a5b3129861b7f58fd0271c6120893dfd53' }, this._translations.next))))), index.h("edit-card", { key: '524819a6dc64775b88b22aaf24445fd5ebdeae24', class: editClass, enableEditGeometry: this.enableEditGeometry, graphicIndex: this._features?.selectedFeatureIndex, graphics: this.graphics, locale: this.locale, mapView: this.mapView, open: this._editRecordOpen }), index.h("calcite-alert", { key: '394c3b416a5dc94381c8b93afd3308121fbebd81', icon: "layer-broken", kind: "warning", label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, index.h("div", { key: 'f4868bf3b710d91ed7e3f1e34b846bd408febac0', slot: "title" }, this._translations.editDisabled), index.h("div", { key: '457b7d0c76bfac52340bec73f5d1d2abbd10f25a', slot: "message" }, this._translations.enableEditing)))));
1596
+ // if user has navigated to the related feature then pass the related feature to the graphics
1597
+ const graphics = this._relatedFeature ? [this._relatedFeature] : this.graphics;
1598
+ const selectedFeatureIndex = this._navigatedToRelatedFeature ? 0 : this._features?.selectedFeatureIndex;
1599
+ return (index.h(index.Host, { key: '9f75eb2e7aba944474e85c34b2abe23982629558' }, index.h("calcite-shell", { key: '748f9e50cd3aa7a52dd7910b171c0d7f54d09203', style: { position: this.position } }, this._getHeader(), index.h("calcite-loader", { key: 'feced4d4a66df36958644436acaa53ddabdfc02a', class: loadingClass, label: this._translations.fetchingData }), index.h("div", { key: '3bb912c80d610a21a5e283c6bd19ab0c63023c45', class: "esri-widget feature-node " + featureNodeClass, id: this._featuresNodeId }), index.h("div", { key: '479dcbda08f837b32bd19ed7f40856f081e92a6e', class: `${editButtonClass} width-100`, slot: "footer" }, this.allowEditing &&
1600
+ index.h("div", { key: 'dd78b02ba8506c391aada6c5233691ec9babcfbe', class: "display-flex top-border padding-1-2" }, index.h("calcite-button", { key: 'c5a807609c60151a433fa9c0055fbfdf20b2935f', appearance: "solid", id: "solutions-edit", onClick: () => this._openEditRecord(), width: "full" }, this._translations.edit), this.isMobile && deleteEnabled ? (index.h("delete-button", { class: "padding-inline-start-1 width-100", id: "solutions-delete", ids: ids, layer: this._layer, locale: this.locale, onEditsComplete: () => this._closePopup() })) : undefined, index.h("calcite-tooltip", { key: 'a4cd4c77e982e23675ec9eaf08e2135de6c83b65', placement: "bottom", "reference-element": "solutions-edit" }, index.h("span", { key: '22533608996d1c87b9b04e339506ec01176379b0' }, this._translations.edit)), this.isMobile && deleteEnabled ? (index.h("calcite-tooltip", { placement: "bottom", "reference-element": "solutions-delete" }, index.h("span", null, this._translations.delete))) : undefined), this.paginationEnabled && !nextBackDisabled && index.h("div", { key: '183ff7da57a06de8f5419edf5973f18b41c46097', class: `display-flex padding-1-2 button-container top-border ${nextBackClass}` }, index.h("div", { key: '77e59229d1d516ccdc8f7c5be2f89a5ad9d5004b' }, index.h("calcite-button", { key: '4b6a6f1f85e9199e14d626ba66b6b319283d0c32', appearance: 'transparent', disabled: nextBackDisabled, iconFlipRtl: "both", iconStart: "chevron-left", id: "solutions-back", onClick: () => this._back(), width: "full" }), index.h("calcite-tooltip", { key: '7056c5cb3c790c804194f09f2586864a28dce5e1', placement: "top", "reference-element": "solutions-back" }, index.h("span", { key: '923fc5425a9faced6952a1b9acff9b7d0f3da286' }, this._translations.back))), index.h("calcite-action", { key: 'a34bfb4ae71a91373fd476e7b704a6a2f8f23157', class: 'pagination-action', iconFlipRtl: true, onClick: () => this._toggleListView(), scale: "s", text: "", textEnabled: true }, index.h("span", { key: '101a0fa592af65b540123c835e9031a18671ad8b', class: "pagination-count" }, this._count)), index.h("div", { key: 'c4f88f464a3091dfc77578470de4f42d05b9f5c7' }, index.h("calcite-button", { key: 'e4e35e539f0c7e01a31e0047db545d4d334ef2d8', appearance: "transparent", disabled: nextBackDisabled, iconFlipRtl: "both", iconStart: "chevron-right", id: "solutions-next", onClick: () => this._next(), width: "full" }), index.h("calcite-tooltip", { key: '40244ecf5566fde448b311272d2ee00d70bc531a', placement: "top", "reference-element": "solutions-next" }, index.h("span", { key: 'db01e2a2b9da9a80f9a25caf49bf8beb872e6ad9' }, this._translations.next))))), index.h("edit-card", { key: 'cfa193b01b67f7709ea6a491caa0c647c536e9e3', class: editClass, enableEditGeometry: this.enableEditGeometry, graphicIndex: selectedFeatureIndex, graphics: graphics, locale: this.locale, mapView: this.mapView, open: this._editRecordOpen }), index.h("calcite-alert", { key: '709fd6d681d32a03fcf5fba959e81a0153676e26', icon: "layer-broken", kind: "warning", label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, index.h("div", { key: 'bbdd9cc98fcda8ffba294a4322f08468072f6aef', slot: "title" }, this._translations.editDisabled), index.h("div", { key: 'd07e32e9cd54cc82ff005e7e696e13e1b8bdaa4e', slot: "message" }, this._translations.enableEditing)))));
1570
1601
  }
1571
1602
  //--------------------------------------------------------------------------
1572
1603
  //
@@ -1626,7 +1657,7 @@ const InfoCard = class {
1626
1657
  container: this._featuresNodeId,
1627
1658
  visibleElements: {
1628
1659
  actionBar: false,
1629
- closeButton: false,
1660
+ closeButton: this.showCloseBtn,
1630
1661
  heading: !this.isMobile
1631
1662
  }
1632
1663
  });
@@ -1642,11 +1673,26 @@ const InfoCard = class {
1642
1673
  this.selectionChanged.emit({ selectedFeature: [this._features.selectedFeature], selectedFeatureIndex: this._features.selectedFeatureIndex });
1643
1674
  }
1644
1675
  });
1676
+ this.reactiveUtils.watch(() => this._features.selectedDrillInFeature, (f) => {
1677
+ if (f) {
1678
+ this._relatedFeature = f;
1679
+ this._navigatedToRelatedFeature = true;
1680
+ }
1681
+ else {
1682
+ this._relatedFeature = null;
1683
+ this._navigatedToRelatedFeature = false;
1684
+ }
1685
+ });
1686
+ // get the info card node element and emit clear selection while clicking the close button
1687
+ const infoCard = this.el.querySelector('#' + this._featuresNodeId);
1688
+ infoCard.addEventListener('calciteFlowItemClose', () => {
1689
+ this.clearSelection.emit();
1690
+ });
1645
1691
  }
1646
1692
  else {
1647
1693
  this._features.view = this.mapView;
1648
1694
  this._features.visibleElements.actionBar = false;
1649
- this._features.visibleElements.closeButton = false;
1695
+ this._features.visibleElements.closeButton = this.showCloseBtn;
1650
1696
  this._features.visibleElements.heading = !this.isMobile;
1651
1697
  }
1652
1698
  }) : Promise.resolve();