@esri/solutions-components 0.8.26 → 0.8.28

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. package/dist/assets/t9n/crowdsource-reporter/resources_ar.json +14 -14
  2. package/dist/assets/t9n/crowdsource-reporter/resources_bg.json +14 -14
  3. package/dist/assets/t9n/crowdsource-reporter/resources_bs.json +14 -14
  4. package/dist/assets/t9n/crowdsource-reporter/resources_ca.json +14 -14
  5. package/dist/assets/t9n/crowdsource-reporter/resources_cs.json +14 -14
  6. package/dist/assets/t9n/crowdsource-reporter/resources_da.json +14 -14
  7. package/dist/assets/t9n/crowdsource-reporter/resources_de.json +14 -14
  8. package/dist/assets/t9n/crowdsource-reporter/resources_el.json +14 -14
  9. package/dist/assets/t9n/crowdsource-reporter/resources_es.json +14 -14
  10. package/dist/assets/t9n/crowdsource-reporter/resources_et.json +14 -14
  11. package/dist/assets/t9n/crowdsource-reporter/resources_fi.json +14 -14
  12. package/dist/assets/t9n/crowdsource-reporter/resources_fr.json +14 -14
  13. package/dist/assets/t9n/crowdsource-reporter/resources_he.json +14 -14
  14. package/dist/assets/t9n/crowdsource-reporter/resources_hr.json +14 -14
  15. package/dist/assets/t9n/crowdsource-reporter/resources_hu.json +14 -14
  16. package/dist/assets/t9n/crowdsource-reporter/resources_id.json +14 -14
  17. package/dist/assets/t9n/crowdsource-reporter/resources_it.json +14 -14
  18. package/dist/assets/t9n/crowdsource-reporter/resources_ja.json +14 -14
  19. package/dist/assets/t9n/crowdsource-reporter/resources_ko.json +14 -14
  20. package/dist/assets/t9n/crowdsource-reporter/resources_lt.json +14 -14
  21. package/dist/assets/t9n/crowdsource-reporter/resources_lv.json +14 -14
  22. package/dist/assets/t9n/crowdsource-reporter/resources_nb.json +14 -14
  23. package/dist/assets/t9n/crowdsource-reporter/resources_nl.json +14 -14
  24. package/dist/assets/t9n/crowdsource-reporter/resources_pl.json +14 -14
  25. package/dist/assets/t9n/crowdsource-reporter/resources_pt-BR.json +14 -14
  26. package/dist/assets/t9n/crowdsource-reporter/resources_pt-PT.json +14 -14
  27. package/dist/assets/t9n/crowdsource-reporter/resources_ro.json +14 -14
  28. package/dist/assets/t9n/crowdsource-reporter/resources_ru.json +14 -14
  29. package/dist/assets/t9n/crowdsource-reporter/resources_sk.json +14 -14
  30. package/dist/assets/t9n/crowdsource-reporter/resources_sl.json +14 -14
  31. package/dist/assets/t9n/crowdsource-reporter/resources_sr.json +14 -14
  32. package/dist/assets/t9n/crowdsource-reporter/resources_sv.json +14 -14
  33. package/dist/assets/t9n/crowdsource-reporter/resources_th.json +14 -14
  34. package/dist/assets/t9n/crowdsource-reporter/resources_tr.json +14 -14
  35. package/dist/assets/t9n/crowdsource-reporter/resources_uk.json +14 -14
  36. package/dist/assets/t9n/crowdsource-reporter/resources_vi.json +14 -14
  37. package/dist/assets/t9n/crowdsource-reporter/resources_zh-CN.json +14 -14
  38. package/dist/assets/t9n/crowdsource-reporter/resources_zh-HK.json +14 -14
  39. package/dist/assets/t9n/crowdsource-reporter/resources_zh-TW.json +14 -14
  40. package/dist/assets/t9n/feature-list/resources_ar.json +1 -1
  41. package/dist/assets/t9n/feature-list/resources_bg.json +1 -1
  42. package/dist/assets/t9n/feature-list/resources_bs.json +1 -1
  43. package/dist/assets/t9n/feature-list/resources_ca.json +1 -1
  44. package/dist/assets/t9n/feature-list/resources_cs.json +1 -1
  45. package/dist/assets/t9n/feature-list/resources_da.json +1 -1
  46. package/dist/assets/t9n/feature-list/resources_de.json +1 -1
  47. package/dist/assets/t9n/feature-list/resources_el.json +1 -1
  48. package/dist/assets/t9n/feature-list/resources_es.json +1 -1
  49. package/dist/assets/t9n/feature-list/resources_et.json +1 -1
  50. package/dist/assets/t9n/feature-list/resources_fi.json +1 -1
  51. package/dist/assets/t9n/feature-list/resources_fr.json +1 -1
  52. package/dist/assets/t9n/feature-list/resources_he.json +1 -1
  53. package/dist/assets/t9n/feature-list/resources_hr.json +1 -1
  54. package/dist/assets/t9n/feature-list/resources_hu.json +1 -1
  55. package/dist/assets/t9n/feature-list/resources_id.json +1 -1
  56. package/dist/assets/t9n/feature-list/resources_it.json +1 -1
  57. package/dist/assets/t9n/feature-list/resources_ja.json +1 -1
  58. package/dist/assets/t9n/feature-list/resources_ko.json +1 -1
  59. package/dist/assets/t9n/feature-list/resources_lt.json +1 -1
  60. package/dist/assets/t9n/feature-list/resources_lv.json +1 -1
  61. package/dist/assets/t9n/feature-list/resources_nb.json +1 -1
  62. package/dist/assets/t9n/feature-list/resources_nl.json +1 -1
  63. package/dist/assets/t9n/feature-list/resources_pl.json +1 -1
  64. package/dist/assets/t9n/feature-list/resources_pt-BR.json +1 -1
  65. package/dist/assets/t9n/feature-list/resources_pt-PT.json +1 -1
  66. package/dist/assets/t9n/feature-list/resources_ro.json +1 -1
  67. package/dist/assets/t9n/feature-list/resources_ru.json +1 -1
  68. package/dist/assets/t9n/feature-list/resources_sk.json +1 -1
  69. package/dist/assets/t9n/feature-list/resources_sl.json +1 -1
  70. package/dist/assets/t9n/feature-list/resources_sr.json +1 -1
  71. package/dist/assets/t9n/feature-list/resources_sv.json +1 -1
  72. package/dist/assets/t9n/feature-list/resources_th.json +1 -1
  73. package/dist/assets/t9n/feature-list/resources_tr.json +1 -1
  74. package/dist/assets/t9n/feature-list/resources_uk.json +1 -1
  75. package/dist/assets/t9n/feature-list/resources_vi.json +1 -1
  76. package/dist/assets/t9n/feature-list/resources_zh-CN.json +1 -1
  77. package/dist/assets/t9n/feature-list/resources_zh-HK.json +1 -1
  78. package/dist/assets/t9n/feature-list/resources_zh-TW.json +1 -1
  79. package/dist/assets/t9n/public-notification/resources_ar.json +2 -2
  80. package/dist/assets/t9n/public-notification/resources_bg.json +2 -2
  81. package/dist/assets/t9n/public-notification/resources_bs.json +2 -2
  82. package/dist/assets/t9n/public-notification/resources_ca.json +2 -2
  83. package/dist/assets/t9n/public-notification/resources_cs.json +2 -2
  84. package/dist/assets/t9n/public-notification/resources_da.json +2 -2
  85. package/dist/assets/t9n/public-notification/resources_de.json +2 -2
  86. package/dist/assets/t9n/public-notification/resources_el.json +2 -2
  87. package/dist/assets/t9n/public-notification/resources_es.json +2 -2
  88. package/dist/assets/t9n/public-notification/resources_et.json +2 -2
  89. package/dist/assets/t9n/public-notification/resources_fi.json +2 -2
  90. package/dist/assets/t9n/public-notification/resources_fr.json +2 -2
  91. package/dist/assets/t9n/public-notification/resources_he.json +2 -2
  92. package/dist/assets/t9n/public-notification/resources_hr.json +2 -2
  93. package/dist/assets/t9n/public-notification/resources_hu.json +2 -2
  94. package/dist/assets/t9n/public-notification/resources_id.json +2 -2
  95. package/dist/assets/t9n/public-notification/resources_it.json +2 -2
  96. package/dist/assets/t9n/public-notification/resources_ja.json +2 -2
  97. package/dist/assets/t9n/public-notification/resources_ko.json +2 -2
  98. package/dist/assets/t9n/public-notification/resources_lt.json +2 -2
  99. package/dist/assets/t9n/public-notification/resources_lv.json +2 -2
  100. package/dist/assets/t9n/public-notification/resources_nb.json +2 -2
  101. package/dist/assets/t9n/public-notification/resources_nl.json +2 -2
  102. package/dist/assets/t9n/public-notification/resources_pl.json +2 -2
  103. package/dist/assets/t9n/public-notification/resources_pt-BR.json +2 -2
  104. package/dist/assets/t9n/public-notification/resources_pt-PT.json +2 -2
  105. package/dist/assets/t9n/public-notification/resources_ro.json +2 -2
  106. package/dist/assets/t9n/public-notification/resources_ru.json +2 -2
  107. package/dist/assets/t9n/public-notification/resources_sk.json +2 -2
  108. package/dist/assets/t9n/public-notification/resources_sl.json +2 -2
  109. package/dist/assets/t9n/public-notification/resources_sr.json +2 -2
  110. package/dist/assets/t9n/public-notification/resources_sv.json +2 -2
  111. package/dist/assets/t9n/public-notification/resources_th.json +2 -2
  112. package/dist/assets/t9n/public-notification/resources_tr.json +2 -2
  113. package/dist/assets/t9n/public-notification/resources_uk.json +2 -2
  114. package/dist/assets/t9n/public-notification/resources_vi.json +2 -2
  115. package/dist/assets/t9n/public-notification/resources_zh-CN.json +2 -2
  116. package/dist/assets/t9n/public-notification/resources_zh-HK.json +2 -2
  117. package/dist/assets/t9n/public-notification/resources_zh-TW.json +2 -2
  118. package/dist/cjs/card-manager_3.cjs.entry.js +7 -4
  119. package/dist/cjs/map-select-tools_3.cjs.entry.js +3 -3
  120. package/dist/collection/components/layer-table/layer-table.js +7 -4
  121. package/dist/collection/components/map-select-tools/map-select-tools.js +2 -2
  122. package/dist/collection/components/refine-selection/refine-selection.js +1 -1
  123. package/dist/components/layer-table2.js +7 -4
  124. package/dist/components/map-select-tools2.js +2 -2
  125. package/dist/components/refine-selection2.js +1 -1
  126. package/dist/esm/card-manager_3.entry.js +7 -4
  127. package/dist/esm/map-select-tools_3.entry.js +3 -3
  128. package/dist/solutions-components/p-6bd6624f.entry.js +6 -0
  129. package/dist/solutions-components/p-c3821586.entry.js +6 -0
  130. package/dist/solutions-components/solutions-components.esm.js +1 -1
  131. package/package.json +1 -1
  132. package/dist/solutions-components/p-1f4b174f.entry.js +0 -6
  133. package/dist/solutions-components/p-b656b73e.entry.js +0 -6
@@ -258,6 +258,7 @@ const LayerTable = class {
258
258
  this._initLayerExpressions();
259
259
  this._initToolInfos();
260
260
  this._updateToolbar();
261
+ console.log("mapInfoWatchHandler");
261
262
  await this._sortTable();
262
263
  }
263
264
  /**
@@ -400,7 +401,7 @@ const LayerTable = class {
400
401
  const selected = this.selectedIds.length.toString();
401
402
  const tableHeightClass = this.isMobile ? "height-full" : "height-full-adjusted";
402
403
  this._validateActiveActions();
403
- return (index.h(index.Host, { key: 'c0451b25b6253fc017f59f471ced6347a618bdcf' }, index.h("calcite-shell", { key: 'b71245a1b347aae2e06ccccd750875d9c0571b1b' }, this._getTableControlRow("header"), index.h("div", { key: 'a4c9e51f2cfa9e90bd1b67e8d542e93896321037', class: `width-full ${tableHeightClass}` }, index.h("calcite-panel", { key: 'e50e3a4165c02c56f99897fa29f079b2ef1e02ff', class: "height-full width-full" }, index.h("calcite-loader", { key: 'ad263eb3ac8558d6cd0777f993f663ddd0f7fbe6', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), index.h("div", { key: '2bcbdf8197b4bcc5102d408538dab17acd803ae9', class: tableNodeClass, ref: this.onTableNodeCreate })), !this.isMobile ? (index.h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
404
+ return (index.h(index.Host, { key: 'd2e67c4d6676ede2d0094bfca008dfca12fb59b3' }, index.h("calcite-shell", { key: '62f1c76bbffcae878e4e3f3342c37bf3bbd865ca' }, this._getTableControlRow("header"), index.h("div", { key: '4efd17a2485f990984f61f2d8c8b45d3d096d428', class: `width-full ${tableHeightClass}` }, index.h("calcite-panel", { key: '443481322720ab22e9e2bddac98802a25ef87982', class: "height-full width-full" }, index.h("calcite-loader", { key: '445bb39ac5c33d470a52f10dd1c481fdaf38443d', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), index.h("div", { key: '4f1ba294ece2f5b05030a1c3cdc48d6ff46ed5d4', class: tableNodeClass, ref: this.onTableNodeCreate })), !this.isMobile ? (index.h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
404
405
  .replace("{{total}}", total)
405
406
  .replace("{{selected}}", selected))) : undefined)), this._filterModal()));
406
407
  }
@@ -1100,6 +1101,7 @@ const LayerTable = class {
1100
1101
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
1101
1102
  await this.reactiveUtils.once(() => this._table.state === "loaded")
1102
1103
  .then(async () => {
1104
+ console.log("this._table.state === 'loaded'");
1103
1105
  this._table.highlightIds.removeAll();
1104
1106
  this._table.clearSelectionFilter();
1105
1107
  this._resetColumnTemplates();
@@ -1203,18 +1205,18 @@ const LayerTable = class {
1203
1205
  * Sort the table with the configured field and the sort order
1204
1206
  */
1205
1207
  async _sortTable() {
1206
- var _a, _b, _c, _d, _e;
1208
+ var _a, _b, _c, _d, _e, _f;
1207
1209
  //By default sort the table using objectIdField and in descending order
1208
1210
  let sortField = (_a = this._layer) === null || _a === void 0 ? void 0 : _a.objectIdField;
1209
1211
  let sortOrder = 'desc';
1210
1212
  let configuredLayer;
1211
1213
  //get the sortField and sortOrder from the configuration
1212
- if (((_d = (_c = (_b = this.mapInfo) === null || _b === void 0 ? void 0 : _b.layerOptions) === null || _c === void 0 ? void 0 : _c.layers) === null || _d === void 0 ? void 0 : _d.length) > 0) {
1214
+ if (((_d = (_c = (_b = this.mapInfo) === null || _b === void 0 ? void 0 : _b.layerOptions) === null || _c === void 0 ? void 0 : _c.layers) === null || _d === void 0 ? void 0 : _d.length) > 0 && ((_e = this._layer) === null || _e === void 0 ? void 0 : _e.id)) {
1213
1215
  configuredLayer = this.mapInfo.layerOptions.layers.filter((layer) => layer.id === this._layer.id);
1214
1216
  if (configuredLayer && configuredLayer.length > 0) {
1215
1217
  configuredLayer = configuredLayer[0];
1216
1218
  //if sort field is defined and sortField is available in the fields then use it
1217
- if (configuredLayer.sortField && ((_e = configuredLayer.fields) === null || _e === void 0 ? void 0 : _e.includes(configuredLayer.sortField))) {
1219
+ if (configuredLayer.sortField && ((_f = configuredLayer.fields) === null || _f === void 0 ? void 0 : _f.includes(configuredLayer.sortField))) {
1218
1220
  sortField = configuredLayer.sortField;
1219
1221
  }
1220
1222
  //use sort order if configured
@@ -1224,6 +1226,7 @@ const LayerTable = class {
1224
1226
  if (this._table && this._layer) {
1225
1227
  await this._table.when();
1226
1228
  await this._layer.when(() => {
1229
+ console.log("sort on this._layer.when");
1227
1230
  this._table.sortColumn(sortField, sortOrder);
1228
1231
  });
1229
1232
  }
@@ -199,14 +199,14 @@ const MapSelectTools = class {
199
199
  var _a, _b;
200
200
  const showBufferToolsClass = this._searchDistanceEnabled ? "search-distance" : "div-not-visible";
201
201
  const bufferDistance = typeof ((_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.distance) === "number" ? this.selectionSet.distance : this.defaultBufferDistance;
202
- return (index.h("div", null, index.h("div", { class: "padding-top-1 display-flex" }, index.h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, index.h("div", { class: "tooltip-container" }, this._translations.searchDistance, index.h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "search-distance-icon", scale: "s" }))), index.h("calcite-popover", { closable: true, label: "", referenceElement: "search-distance-icon" }, index.h("span", { class: "tooltip-message" }, this._translations.useSearchDistanceTootip)), index.h("calcite-switch", { checked: this._searchDistanceEnabled, onCalciteSwitchChange: () => this._searchDistanceEnabled = !this._searchDistanceEnabled })), index.h("div", { class: showBufferToolsClass }, index.h("buffer-tools", { disabled: !this._searchDistanceEnabled, distance: bufferDistance, geometries: this.geometries, onBufferComplete: (evt) => void this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: ((_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.unit) || this.defaultBufferUnit }))));
202
+ return (index.h("div", null, index.h("div", { class: "padding-top-1 display-flex" }, index.h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, index.h("div", { class: "tooltip-container" }, this._translations.searchDistance, index.h("calcite-icon", { class: "padding-start-1-2 icon", flipRtl: true, icon: "question", id: "search-distance-icon", scale: "s" }))), index.h("calcite-popover", { closable: true, label: "", referenceElement: "search-distance-icon" }, index.h("span", { class: "tooltip-message" }, this._translations.useSearchDistanceTootip)), index.h("calcite-switch", { checked: this._searchDistanceEnabled, onCalciteSwitchChange: () => this._searchDistanceEnabled = !this._searchDistanceEnabled })), index.h("div", { class: showBufferToolsClass }, index.h("buffer-tools", { disabled: !this._searchDistanceEnabled, distance: bufferDistance, geometries: this.geometries, onBufferComplete: (evt) => void this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: ((_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.unit) || this.defaultBufferUnit }))));
203
203
  }
204
204
  /**
205
205
  * Renders the map layer picker component.
206
206
  */
207
207
  _getUseLayerFeaturesOptions() {
208
208
  const useLayerFeaturesClass = this._useLayerFeaturesEnabled ? "div-visible" : "div-not-visible";
209
- return (index.h("div", null, index.h("div", { class: "padding-top-1 display-flex" }, index.h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, index.h("div", { class: "tooltip-container" }, this._translations.useLayerFeatures, index.h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "use-layer-features-icon", scale: "s" }))), index.h("calcite-popover", { closable: true, label: "", referenceElement: "use-layer-features-icon" }, index.h("span", { class: "tooltip-message" }, this._translations.useLayerFeaturesTooltip)), index.h("calcite-switch", { checked: this._useLayerFeaturesEnabled, onCalciteSwitchChange: () => { this._useLayerFeaturesEnabledChanged(); } })), index.h("div", { class: useLayerFeaturesClass + " padding-top-1" }, index.h("map-layer-picker", { enabledLayerIds: this.selectionLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedIds: this.layerViews.map(l => l.layer.id), showTables: false }))));
209
+ return (index.h("div", null, index.h("div", { class: "padding-top-1 display-flex" }, index.h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, index.h("div", { class: "tooltip-container" }, this._translations.useLayerFeatures, index.h("calcite-icon", { class: "padding-start-1-2 icon", flipRtl: true, icon: "question", id: "use-layer-features-icon", scale: "s" }))), index.h("calcite-popover", { closable: true, label: "", referenceElement: "use-layer-features-icon" }, index.h("span", { class: "tooltip-message" }, this._translations.useLayerFeaturesTooltip)), index.h("calcite-switch", { checked: this._useLayerFeaturesEnabled, onCalciteSwitchChange: () => { this._useLayerFeaturesEnabledChanged(); } })), index.h("div", { class: useLayerFeaturesClass + " padding-top-1" }, index.h("map-layer-picker", { enabledLayerIds: this.selectionLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedIds: this.layerViews.map(l => l.layer.id), showTables: false }))));
210
210
  }
211
211
  /**
212
212
  * Renders the number of selected features
@@ -1196,7 +1196,7 @@ const RefineSelection = class {
1196
1196
  render() {
1197
1197
  var _a, _b;
1198
1198
  const layerPickerClass = this._enabledLayerIds.length > 1 ? "display-block" : "display-none";
1199
- return (index.h(index.Host, { key: 'abb0520889c7e739ccd0f7ef1cf5371169b09a4f' }, index.h("div", { key: '3772abb5d1f741644edd934e13ce25588714be0d', class: layerPickerClass + " padding-top-sides-1" }, index.h("div", { key: 'd0205e6127cf2df2eeb6ff9269ee0f64ccb0506b', class: "display-flex" }, index.h("calcite-label", { key: 'c6bdf8e921b6d7460198c5ea773c9f29f86dd7a4', class: "font-bold width-full label-margin-0" }, index.h("div", { key: '49969bbbb52f847764cddd748d9ebb01ee261de1', class: "display-flex" }, this._translations.inputLayer, index.h("calcite-icon", { key: '749c671b5b75d91e84f732daa4acb2264ed95f6c', class: "padding-start-1-2 icon", icon: "question", id: "refine-input-layer", scale: "s" })), index.h("map-layer-picker", { key: 'b0d7a600796e8b438db67b8d0dba74066bf3261f', enabledLayerIds: this._enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, ref: (el) => { this._layerPicker = el; }, selectedIds: [this._refineLayer.layer.id], showTables: false })), index.h("calcite-popover", { key: '6ed81245f48aa8c1163031625e276a3d708fca73', closable: true, label: "", referenceElement: "refine-input-layer" }, index.h("span", { key: '00e817a3d1f08b5f61f262eae88859d291444294', class: "tooltip-message" }, this._translations.inputLayerTip)))), index.h("div", { key: '0298fa4e89b539aba1aa602a84f224da905bf4f2', class: "padding-1" }, index.h("div", { key: '385699e47f1304a89b3abfe63f0d612b8b153c54', class: "padding-bottom-1" }, index.h("calcite-segmented-control", { key: 'a3d8bc30f9df92a98bd1dad2a4b7fd6221b4ea97', class: "w-100", width: "full" }, index.h("calcite-segmented-control-item", { key: 'f45b25ce69039e7de4b416a9498b6ec8cc850c60', checked: this._addEnabled, class: "w-50 word-wrap-anywhere", onClick: () => this._setSelectionMode(interfaces.ESelectionMode.ADD), value: interfaces.ESelectionMode.ADD }, index.h("span", { key: 'fcaa2cfc47ef7d46c1bf6080bbed2ab8c1b2a0a1', class: "font-weight-500" }, this._translations.add)), index.h("calcite-segmented-control-item", { key: '3be785a5d23b559021a609ae39950f7937d9b9e4', checked: !this._addEnabled, class: "w-50 word-wrap-anywhere", onClick: () => this._setSelectionMode(interfaces.ESelectionMode.REMOVE), value: interfaces.ESelectionMode.REMOVE }, index.h("span", { key: 'ee4d85f969762c87e30f07b6d518c4ca088fdbb3', class: "font-weight-500" }, this._translations.remove)))), index.h("div", { key: 'a1717a51a57bd216a04c13e9b04baaa5510bf33b' }, index.h("map-draw-tools", { key: '6063f82aea3984aa792e2f89e688eeaf0327ff1e', active: true, drawMode: interfaces.EDrawMode.REFINE, mapView: this.mapView, onDrawRedo: () => this._redo(), onDrawUndo: () => this._undo(), onSketchGraphicsChange: (evt) => this._sketchGraphicsChanged(evt), pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, redoEnabled: ((_a = this._refineSelectionSet) === null || _a === void 0 ? void 0 : _a.redoStack.length) > 0, ref: (el) => { this._drawTools = el; }, undoEnabled: ((_b = this._refineSelectionSet) === null || _b === void 0 ? void 0 : _b.undoStack.length) > 0 })), index.h("br", { key: '76d977c28df03e57cde309eaaa300a9f013fae2c' }), (index.h("calcite-list", { key: 'e596cc82c03ffc277dbbad244de7a985fcfcc40a', class: "list-border" }, this._getRefineSelectionSetList())))));
1199
+ return (index.h(index.Host, { key: 'abb0520889c7e739ccd0f7ef1cf5371169b09a4f' }, index.h("div", { key: '3772abb5d1f741644edd934e13ce25588714be0d', class: layerPickerClass + " padding-top-sides-1" }, index.h("div", { key: 'd0205e6127cf2df2eeb6ff9269ee0f64ccb0506b', class: "display-flex" }, index.h("calcite-label", { key: 'c6bdf8e921b6d7460198c5ea773c9f29f86dd7a4', class: "font-bold width-full label-margin-0" }, index.h("div", { key: '49969bbbb52f847764cddd748d9ebb01ee261de1', class: "display-flex" }, this._translations.inputLayer, index.h("calcite-icon", { key: 'e214244ee8305ffc6214df5d456340ffff2e48d5', class: "padding-start-1-2 icon", flipRtl: true, icon: "question", id: "refine-input-layer", scale: "s" })), index.h("map-layer-picker", { key: '5141de15e7492342fa735b941d11713d9b6b940f', enabledLayerIds: this._enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, ref: (el) => { this._layerPicker = el; }, selectedIds: [this._refineLayer.layer.id], showTables: false })), index.h("calcite-popover", { key: 'fcc6af19fb88b1cffd386fc499ef90e94530a033', closable: true, label: "", referenceElement: "refine-input-layer" }, index.h("span", { key: 'b740844b112e2bd8d42dbd0e87c0201a4b64b171', class: "tooltip-message" }, this._translations.inputLayerTip)))), index.h("div", { key: 'fe3fdd55ef90be673e89a31a2faf4cb83de132f5', class: "padding-1" }, index.h("div", { key: 'ee3d2c2d3b4ab82c39bceffd8fda755c172e18b6', class: "padding-bottom-1" }, index.h("calcite-segmented-control", { key: '960d56c2a480e00410dc1f075e99f747c71a1cdb', class: "w-100", width: "full" }, index.h("calcite-segmented-control-item", { key: '048cfef7ac5f23a6ad2c663cb3704f673a0a0fbd', checked: this._addEnabled, class: "w-50 word-wrap-anywhere", onClick: () => this._setSelectionMode(interfaces.ESelectionMode.ADD), value: interfaces.ESelectionMode.ADD }, index.h("span", { key: '4777b29c110bf5055622d5de8a60d0633bb1498f', class: "font-weight-500" }, this._translations.add)), index.h("calcite-segmented-control-item", { key: 'ae9147508332307320f34d8997ca10f42a8df704', checked: !this._addEnabled, class: "w-50 word-wrap-anywhere", onClick: () => this._setSelectionMode(interfaces.ESelectionMode.REMOVE), value: interfaces.ESelectionMode.REMOVE }, index.h("span", { key: 'e9c94444fbb17b86d04fcc8a51c83c9ef1c09cf5', class: "font-weight-500" }, this._translations.remove)))), index.h("div", { key: '6c1e7c69a983f69930f8a084746233603db56727' }, index.h("map-draw-tools", { key: 'dcb2d5ddb6a62b4d45d9416b1c8f49ba3ce0ed08', active: true, drawMode: interfaces.EDrawMode.REFINE, mapView: this.mapView, onDrawRedo: () => this._redo(), onDrawUndo: () => this._undo(), onSketchGraphicsChange: (evt) => this._sketchGraphicsChanged(evt), pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, redoEnabled: ((_a = this._refineSelectionSet) === null || _a === void 0 ? void 0 : _a.redoStack.length) > 0, ref: (el) => { this._drawTools = el; }, undoEnabled: ((_b = this._refineSelectionSet) === null || _b === void 0 ? void 0 : _b.undoStack.length) > 0 })), index.h("br", { key: '14e8f85ee2f281f757c9f9a66b5ddb818310f8fc' }), (index.h("calcite-list", { key: '0be153af5a6c87289ee49ffe6b46c35a4d943b50', class: "list-border" }, this._getRefineSelectionSetList())))));
1200
1200
  }
1201
1201
  //--------------------------------------------------------------------------
1202
1202
  //
@@ -172,6 +172,7 @@ export class LayerTable {
172
172
  this._initLayerExpressions();
173
173
  this._initToolInfos();
174
174
  this._updateToolbar();
175
+ console.log("mapInfoWatchHandler");
175
176
  await this._sortTable();
176
177
  }
177
178
  /**
@@ -314,7 +315,7 @@ export class LayerTable {
314
315
  const selected = this.selectedIds.length.toString();
315
316
  const tableHeightClass = this.isMobile ? "height-full" : "height-full-adjusted";
316
317
  this._validateActiveActions();
317
- return (h(Host, { key: 'c0451b25b6253fc017f59f471ced6347a618bdcf' }, h("calcite-shell", { key: 'b71245a1b347aae2e06ccccd750875d9c0571b1b' }, this._getTableControlRow("header"), h("div", { key: 'a4c9e51f2cfa9e90bd1b67e8d542e93896321037', class: `width-full ${tableHeightClass}` }, h("calcite-panel", { key: 'e50e3a4165c02c56f99897fa29f079b2ef1e02ff', class: "height-full width-full" }, h("calcite-loader", { key: 'ad263eb3ac8558d6cd0777f993f663ddd0f7fbe6', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { key: '2bcbdf8197b4bcc5102d408538dab17acd803ae9', class: tableNodeClass, ref: this.onTableNodeCreate })), !this.isMobile ? (h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
318
+ return (h(Host, { key: 'd2e67c4d6676ede2d0094bfca008dfca12fb59b3' }, h("calcite-shell", { key: '62f1c76bbffcae878e4e3f3342c37bf3bbd865ca' }, this._getTableControlRow("header"), h("div", { key: '4efd17a2485f990984f61f2d8c8b45d3d096d428', class: `width-full ${tableHeightClass}` }, h("calcite-panel", { key: '443481322720ab22e9e2bddac98802a25ef87982', class: "height-full width-full" }, h("calcite-loader", { key: '445bb39ac5c33d470a52f10dd1c481fdaf38443d', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { key: '4f1ba294ece2f5b05030a1c3cdc48d6ff46ed5d4', class: tableNodeClass, ref: this.onTableNodeCreate })), !this.isMobile ? (h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
318
319
  .replace("{{total}}", total)
319
320
  .replace("{{selected}}", selected))) : undefined)), this._filterModal()));
320
321
  }
@@ -1014,6 +1015,7 @@ export class LayerTable {
1014
1015
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
1015
1016
  await this.reactiveUtils.once(() => this._table.state === "loaded")
1016
1017
  .then(async () => {
1018
+ console.log("this._table.state === 'loaded'");
1017
1019
  this._table.highlightIds.removeAll();
1018
1020
  this._table.clearSelectionFilter();
1019
1021
  this._resetColumnTemplates();
@@ -1117,18 +1119,18 @@ export class LayerTable {
1117
1119
  * Sort the table with the configured field and the sort order
1118
1120
  */
1119
1121
  async _sortTable() {
1120
- var _a, _b, _c, _d, _e;
1122
+ var _a, _b, _c, _d, _e, _f;
1121
1123
  //By default sort the table using objectIdField and in descending order
1122
1124
  let sortField = (_a = this._layer) === null || _a === void 0 ? void 0 : _a.objectIdField;
1123
1125
  let sortOrder = 'desc';
1124
1126
  let configuredLayer;
1125
1127
  //get the sortField and sortOrder from the configuration
1126
- if (((_d = (_c = (_b = this.mapInfo) === null || _b === void 0 ? void 0 : _b.layerOptions) === null || _c === void 0 ? void 0 : _c.layers) === null || _d === void 0 ? void 0 : _d.length) > 0) {
1128
+ if (((_d = (_c = (_b = this.mapInfo) === null || _b === void 0 ? void 0 : _b.layerOptions) === null || _c === void 0 ? void 0 : _c.layers) === null || _d === void 0 ? void 0 : _d.length) > 0 && ((_e = this._layer) === null || _e === void 0 ? void 0 : _e.id)) {
1127
1129
  configuredLayer = this.mapInfo.layerOptions.layers.filter((layer) => layer.id === this._layer.id);
1128
1130
  if (configuredLayer && configuredLayer.length > 0) {
1129
1131
  configuredLayer = configuredLayer[0];
1130
1132
  //if sort field is defined and sortField is available in the fields then use it
1131
- if (configuredLayer.sortField && ((_e = configuredLayer.fields) === null || _e === void 0 ? void 0 : _e.includes(configuredLayer.sortField))) {
1133
+ if (configuredLayer.sortField && ((_f = configuredLayer.fields) === null || _f === void 0 ? void 0 : _f.includes(configuredLayer.sortField))) {
1132
1134
  sortField = configuredLayer.sortField;
1133
1135
  }
1134
1136
  //use sort order if configured
@@ -1138,6 +1140,7 @@ export class LayerTable {
1138
1140
  if (this._table && this._layer) {
1139
1141
  await this._table.when();
1140
1142
  await this._layer.when(() => {
1143
+ console.log("sort on this._layer.when");
1141
1144
  this._table.sortColumn(sortField, sortOrder);
1142
1145
  });
1143
1146
  }
@@ -200,14 +200,14 @@ export class MapSelectTools {
200
200
  var _a, _b;
201
201
  const showBufferToolsClass = this._searchDistanceEnabled ? "search-distance" : "div-not-visible";
202
202
  const bufferDistance = typeof ((_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.distance) === "number" ? this.selectionSet.distance : this.defaultBufferDistance;
203
- return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.searchDistance, h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "search-distance-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "search-distance-icon" }, h("span", { class: "tooltip-message" }, this._translations.useSearchDistanceTootip)), h("calcite-switch", { checked: this._searchDistanceEnabled, onCalciteSwitchChange: () => this._searchDistanceEnabled = !this._searchDistanceEnabled })), h("div", { class: showBufferToolsClass }, h("buffer-tools", { disabled: !this._searchDistanceEnabled, distance: bufferDistance, geometries: this.geometries, onBufferComplete: (evt) => void this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: ((_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.unit) || this.defaultBufferUnit }))));
203
+ return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.searchDistance, h("calcite-icon", { class: "padding-start-1-2 icon", flipRtl: true, icon: "question", id: "search-distance-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "search-distance-icon" }, h("span", { class: "tooltip-message" }, this._translations.useSearchDistanceTootip)), h("calcite-switch", { checked: this._searchDistanceEnabled, onCalciteSwitchChange: () => this._searchDistanceEnabled = !this._searchDistanceEnabled })), h("div", { class: showBufferToolsClass }, h("buffer-tools", { disabled: !this._searchDistanceEnabled, distance: bufferDistance, geometries: this.geometries, onBufferComplete: (evt) => void this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: ((_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.unit) || this.defaultBufferUnit }))));
204
204
  }
205
205
  /**
206
206
  * Renders the map layer picker component.
207
207
  */
208
208
  _getUseLayerFeaturesOptions() {
209
209
  const useLayerFeaturesClass = this._useLayerFeaturesEnabled ? "div-visible" : "div-not-visible";
210
- return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.useLayerFeatures, h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "use-layer-features-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "use-layer-features-icon" }, h("span", { class: "tooltip-message" }, this._translations.useLayerFeaturesTooltip)), h("calcite-switch", { checked: this._useLayerFeaturesEnabled, onCalciteSwitchChange: () => { this._useLayerFeaturesEnabledChanged(); } })), h("div", { class: useLayerFeaturesClass + " padding-top-1" }, h("map-layer-picker", { enabledLayerIds: this.selectionLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedIds: this.layerViews.map(l => l.layer.id), showTables: false }))));
210
+ return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.useLayerFeatures, h("calcite-icon", { class: "padding-start-1-2 icon", flipRtl: true, icon: "question", id: "use-layer-features-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "use-layer-features-icon" }, h("span", { class: "tooltip-message" }, this._translations.useLayerFeaturesTooltip)), h("calcite-switch", { checked: this._useLayerFeaturesEnabled, onCalciteSwitchChange: () => { this._useLayerFeaturesEnabledChanged(); } })), h("div", { class: useLayerFeaturesClass + " padding-top-1" }, h("map-layer-picker", { enabledLayerIds: this.selectionLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedIds: this.layerViews.map(l => l.layer.id), showTables: false }))));
211
211
  }
212
212
  /**
213
213
  * Renders the number of selected features
@@ -77,7 +77,7 @@ export class RefineSelection {
77
77
  render() {
78
78
  var _a, _b;
79
79
  const layerPickerClass = this._enabledLayerIds.length > 1 ? "display-block" : "display-none";
80
- return (h(Host, { key: 'abb0520889c7e739ccd0f7ef1cf5371169b09a4f' }, h("div", { key: '3772abb5d1f741644edd934e13ce25588714be0d', class: layerPickerClass + " padding-top-sides-1" }, h("div", { key: 'd0205e6127cf2df2eeb6ff9269ee0f64ccb0506b', class: "display-flex" }, h("calcite-label", { key: 'c6bdf8e921b6d7460198c5ea773c9f29f86dd7a4', class: "font-bold width-full label-margin-0" }, h("div", { key: '49969bbbb52f847764cddd748d9ebb01ee261de1', class: "display-flex" }, this._translations.inputLayer, h("calcite-icon", { key: '749c671b5b75d91e84f732daa4acb2264ed95f6c', class: "padding-start-1-2 icon", icon: "question", id: "refine-input-layer", scale: "s" })), h("map-layer-picker", { key: 'b0d7a600796e8b438db67b8d0dba74066bf3261f', enabledLayerIds: this._enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, ref: (el) => { this._layerPicker = el; }, selectedIds: [this._refineLayer.layer.id], showTables: false })), h("calcite-popover", { key: '6ed81245f48aa8c1163031625e276a3d708fca73', closable: true, label: "", referenceElement: "refine-input-layer" }, h("span", { key: '00e817a3d1f08b5f61f262eae88859d291444294', class: "tooltip-message" }, this._translations.inputLayerTip)))), h("div", { key: '0298fa4e89b539aba1aa602a84f224da905bf4f2', class: "padding-1" }, h("div", { key: '385699e47f1304a89b3abfe63f0d612b8b153c54', class: "padding-bottom-1" }, h("calcite-segmented-control", { key: 'a3d8bc30f9df92a98bd1dad2a4b7fd6221b4ea97', class: "w-100", width: "full" }, h("calcite-segmented-control-item", { key: 'f45b25ce69039e7de4b416a9498b6ec8cc850c60', checked: this._addEnabled, class: "w-50 word-wrap-anywhere", onClick: () => this._setSelectionMode(ESelectionMode.ADD), value: ESelectionMode.ADD }, h("span", { key: 'fcaa2cfc47ef7d46c1bf6080bbed2ab8c1b2a0a1', class: "font-weight-500" }, this._translations.add)), h("calcite-segmented-control-item", { key: '3be785a5d23b559021a609ae39950f7937d9b9e4', checked: !this._addEnabled, class: "w-50 word-wrap-anywhere", onClick: () => this._setSelectionMode(ESelectionMode.REMOVE), value: ESelectionMode.REMOVE }, h("span", { key: 'ee4d85f969762c87e30f07b6d518c4ca088fdbb3', class: "font-weight-500" }, this._translations.remove)))), h("div", { key: 'a1717a51a57bd216a04c13e9b04baaa5510bf33b' }, h("map-draw-tools", { key: '6063f82aea3984aa792e2f89e688eeaf0327ff1e', active: true, drawMode: EDrawMode.REFINE, mapView: this.mapView, onDrawRedo: () => this._redo(), onDrawUndo: () => this._undo(), onSketchGraphicsChange: (evt) => this._sketchGraphicsChanged(evt), pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, redoEnabled: ((_a = this._refineSelectionSet) === null || _a === void 0 ? void 0 : _a.redoStack.length) > 0, ref: (el) => { this._drawTools = el; }, undoEnabled: ((_b = this._refineSelectionSet) === null || _b === void 0 ? void 0 : _b.undoStack.length) > 0 })), h("br", { key: '76d977c28df03e57cde309eaaa300a9f013fae2c' }), (h("calcite-list", { key: 'e596cc82c03ffc277dbbad244de7a985fcfcc40a', class: "list-border" }, this._getRefineSelectionSetList())))));
80
+ return (h(Host, { key: 'abb0520889c7e739ccd0f7ef1cf5371169b09a4f' }, h("div", { key: '3772abb5d1f741644edd934e13ce25588714be0d', class: layerPickerClass + " padding-top-sides-1" }, h("div", { key: 'd0205e6127cf2df2eeb6ff9269ee0f64ccb0506b', class: "display-flex" }, h("calcite-label", { key: 'c6bdf8e921b6d7460198c5ea773c9f29f86dd7a4', class: "font-bold width-full label-margin-0" }, h("div", { key: '49969bbbb52f847764cddd748d9ebb01ee261de1', class: "display-flex" }, this._translations.inputLayer, h("calcite-icon", { key: 'e214244ee8305ffc6214df5d456340ffff2e48d5', class: "padding-start-1-2 icon", flipRtl: true, icon: "question", id: "refine-input-layer", scale: "s" })), h("map-layer-picker", { key: '5141de15e7492342fa735b941d11713d9b6b940f', enabledLayerIds: this._enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, ref: (el) => { this._layerPicker = el; }, selectedIds: [this._refineLayer.layer.id], showTables: false })), h("calcite-popover", { key: 'fcc6af19fb88b1cffd386fc499ef90e94530a033', closable: true, label: "", referenceElement: "refine-input-layer" }, h("span", { key: 'b740844b112e2bd8d42dbd0e87c0201a4b64b171', class: "tooltip-message" }, this._translations.inputLayerTip)))), h("div", { key: 'fe3fdd55ef90be673e89a31a2faf4cb83de132f5', class: "padding-1" }, h("div", { key: 'ee3d2c2d3b4ab82c39bceffd8fda755c172e18b6', class: "padding-bottom-1" }, h("calcite-segmented-control", { key: '960d56c2a480e00410dc1f075e99f747c71a1cdb', class: "w-100", width: "full" }, h("calcite-segmented-control-item", { key: '048cfef7ac5f23a6ad2c663cb3704f673a0a0fbd', checked: this._addEnabled, class: "w-50 word-wrap-anywhere", onClick: () => this._setSelectionMode(ESelectionMode.ADD), value: ESelectionMode.ADD }, h("span", { key: '4777b29c110bf5055622d5de8a60d0633bb1498f', class: "font-weight-500" }, this._translations.add)), h("calcite-segmented-control-item", { key: 'ae9147508332307320f34d8997ca10f42a8df704', checked: !this._addEnabled, class: "w-50 word-wrap-anywhere", onClick: () => this._setSelectionMode(ESelectionMode.REMOVE), value: ESelectionMode.REMOVE }, h("span", { key: 'e9c94444fbb17b86d04fcc8a51c83c9ef1c09cf5', class: "font-weight-500" }, this._translations.remove)))), h("div", { key: '6c1e7c69a983f69930f8a084746233603db56727' }, h("map-draw-tools", { key: 'dcb2d5ddb6a62b4d45d9416b1c8f49ba3ce0ed08', active: true, drawMode: EDrawMode.REFINE, mapView: this.mapView, onDrawRedo: () => this._redo(), onDrawUndo: () => this._undo(), onSketchGraphicsChange: (evt) => this._sketchGraphicsChanged(evt), pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, redoEnabled: ((_a = this._refineSelectionSet) === null || _a === void 0 ? void 0 : _a.redoStack.length) > 0, ref: (el) => { this._drawTools = el; }, undoEnabled: ((_b = this._refineSelectionSet) === null || _b === void 0 ? void 0 : _b.undoStack.length) > 0 })), h("br", { key: '14e8f85ee2f281f757c9f9a66b5ddb818310f8fc' }), (h("calcite-list", { key: '0be153af5a6c87289ee49ffe6b46c35a4d943b50', class: "list-border" }, this._getRefineSelectionSetList())))));
81
81
  }
82
82
  //--------------------------------------------------------------------------
83
83
  //
@@ -202,6 +202,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
202
202
  this._initLayerExpressions();
203
203
  this._initToolInfos();
204
204
  this._updateToolbar();
205
+ console.log("mapInfoWatchHandler");
205
206
  await this._sortTable();
206
207
  }
207
208
  /**
@@ -344,7 +345,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
344
345
  const selected = this.selectedIds.length.toString();
345
346
  const tableHeightClass = this.isMobile ? "height-full" : "height-full-adjusted";
346
347
  this._validateActiveActions();
347
- return (h(Host, { key: 'c0451b25b6253fc017f59f471ced6347a618bdcf' }, h("calcite-shell", { key: 'b71245a1b347aae2e06ccccd750875d9c0571b1b' }, this._getTableControlRow("header"), h("div", { key: 'a4c9e51f2cfa9e90bd1b67e8d542e93896321037', class: `width-full ${tableHeightClass}` }, h("calcite-panel", { key: 'e50e3a4165c02c56f99897fa29f079b2ef1e02ff', class: "height-full width-full" }, h("calcite-loader", { key: 'ad263eb3ac8558d6cd0777f993f663ddd0f7fbe6', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { key: '2bcbdf8197b4bcc5102d408538dab17acd803ae9', class: tableNodeClass, ref: this.onTableNodeCreate })), !this.isMobile ? (h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
348
+ return (h(Host, { key: 'd2e67c4d6676ede2d0094bfca008dfca12fb59b3' }, h("calcite-shell", { key: '62f1c76bbffcae878e4e3f3342c37bf3bbd865ca' }, this._getTableControlRow("header"), h("div", { key: '4efd17a2485f990984f61f2d8c8b45d3d096d428', class: `width-full ${tableHeightClass}` }, h("calcite-panel", { key: '443481322720ab22e9e2bddac98802a25ef87982', class: "height-full width-full" }, h("calcite-loader", { key: '445bb39ac5c33d470a52f10dd1c481fdaf38443d', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { key: '4f1ba294ece2f5b05030a1c3cdc48d6ff46ed5d4', class: tableNodeClass, ref: this.onTableNodeCreate })), !this.isMobile ? (h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
348
349
  .replace("{{total}}", total)
349
350
  .replace("{{selected}}", selected))) : undefined)), this._filterModal()));
350
351
  }
@@ -1044,6 +1045,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1044
1045
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
1045
1046
  await this.reactiveUtils.once(() => this._table.state === "loaded")
1046
1047
  .then(async () => {
1048
+ console.log("this._table.state === 'loaded'");
1047
1049
  this._table.highlightIds.removeAll();
1048
1050
  this._table.clearSelectionFilter();
1049
1051
  this._resetColumnTemplates();
@@ -1147,18 +1149,18 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1147
1149
  * Sort the table with the configured field and the sort order
1148
1150
  */
1149
1151
  async _sortTable() {
1150
- var _a, _b, _c, _d, _e;
1152
+ var _a, _b, _c, _d, _e, _f;
1151
1153
  //By default sort the table using objectIdField and in descending order
1152
1154
  let sortField = (_a = this._layer) === null || _a === void 0 ? void 0 : _a.objectIdField;
1153
1155
  let sortOrder = 'desc';
1154
1156
  let configuredLayer;
1155
1157
  //get the sortField and sortOrder from the configuration
1156
- if (((_d = (_c = (_b = this.mapInfo) === null || _b === void 0 ? void 0 : _b.layerOptions) === null || _c === void 0 ? void 0 : _c.layers) === null || _d === void 0 ? void 0 : _d.length) > 0) {
1158
+ if (((_d = (_c = (_b = this.mapInfo) === null || _b === void 0 ? void 0 : _b.layerOptions) === null || _c === void 0 ? void 0 : _c.layers) === null || _d === void 0 ? void 0 : _d.length) > 0 && ((_e = this._layer) === null || _e === void 0 ? void 0 : _e.id)) {
1157
1159
  configuredLayer = this.mapInfo.layerOptions.layers.filter((layer) => layer.id === this._layer.id);
1158
1160
  if (configuredLayer && configuredLayer.length > 0) {
1159
1161
  configuredLayer = configuredLayer[0];
1160
1162
  //if sort field is defined and sortField is available in the fields then use it
1161
- if (configuredLayer.sortField && ((_e = configuredLayer.fields) === null || _e === void 0 ? void 0 : _e.includes(configuredLayer.sortField))) {
1163
+ if (configuredLayer.sortField && ((_f = configuredLayer.fields) === null || _f === void 0 ? void 0 : _f.includes(configuredLayer.sortField))) {
1162
1164
  sortField = configuredLayer.sortField;
1163
1165
  }
1164
1166
  //use sort order if configured
@@ -1168,6 +1170,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1168
1170
  if (this._table && this._layer) {
1169
1171
  await this._table.when();
1170
1172
  await this._layer.when(() => {
1173
+ console.log("sort on this._layer.when");
1171
1174
  this._table.sortColumn(sortField, sortOrder);
1172
1175
  });
1173
1176
  }
@@ -217,14 +217,14 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class MapSelectTools ext
217
217
  var _a, _b;
218
218
  const showBufferToolsClass = this._searchDistanceEnabled ? "search-distance" : "div-not-visible";
219
219
  const bufferDistance = typeof ((_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.distance) === "number" ? this.selectionSet.distance : this.defaultBufferDistance;
220
- return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.searchDistance, h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "search-distance-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "search-distance-icon" }, h("span", { class: "tooltip-message" }, this._translations.useSearchDistanceTootip)), h("calcite-switch", { checked: this._searchDistanceEnabled, onCalciteSwitchChange: () => this._searchDistanceEnabled = !this._searchDistanceEnabled })), h("div", { class: showBufferToolsClass }, h("buffer-tools", { disabled: !this._searchDistanceEnabled, distance: bufferDistance, geometries: this.geometries, onBufferComplete: (evt) => void this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: ((_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.unit) || this.defaultBufferUnit }))));
220
+ return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.searchDistance, h("calcite-icon", { class: "padding-start-1-2 icon", flipRtl: true, icon: "question", id: "search-distance-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "search-distance-icon" }, h("span", { class: "tooltip-message" }, this._translations.useSearchDistanceTootip)), h("calcite-switch", { checked: this._searchDistanceEnabled, onCalciteSwitchChange: () => this._searchDistanceEnabled = !this._searchDistanceEnabled })), h("div", { class: showBufferToolsClass }, h("buffer-tools", { disabled: !this._searchDistanceEnabled, distance: bufferDistance, geometries: this.geometries, onBufferComplete: (evt) => void this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: ((_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.unit) || this.defaultBufferUnit }))));
221
221
  }
222
222
  /**
223
223
  * Renders the map layer picker component.
224
224
  */
225
225
  _getUseLayerFeaturesOptions() {
226
226
  const useLayerFeaturesClass = this._useLayerFeaturesEnabled ? "div-visible" : "div-not-visible";
227
- return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.useLayerFeatures, h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "use-layer-features-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "use-layer-features-icon" }, h("span", { class: "tooltip-message" }, this._translations.useLayerFeaturesTooltip)), h("calcite-switch", { checked: this._useLayerFeaturesEnabled, onCalciteSwitchChange: () => { this._useLayerFeaturesEnabledChanged(); } })), h("div", { class: useLayerFeaturesClass + " padding-top-1" }, h("map-layer-picker", { enabledLayerIds: this.selectionLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedIds: this.layerViews.map(l => l.layer.id), showTables: false }))));
227
+ return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.useLayerFeatures, h("calcite-icon", { class: "padding-start-1-2 icon", flipRtl: true, icon: "question", id: "use-layer-features-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "use-layer-features-icon" }, h("span", { class: "tooltip-message" }, this._translations.useLayerFeaturesTooltip)), h("calcite-switch", { checked: this._useLayerFeaturesEnabled, onCalciteSwitchChange: () => { this._useLayerFeaturesEnabledChanged(); } })), h("div", { class: useLayerFeaturesClass + " padding-top-1" }, h("map-layer-picker", { enabledLayerIds: this.selectionLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedIds: this.layerViews.map(l => l.layer.id), showTables: false }))));
228
228
  }
229
229
  /**
230
230
  * Renders the number of selected features
@@ -98,7 +98,7 @@ const RefineSelection = /*@__PURE__*/ proxyCustomElement(class RefineSelection e
98
98
  render() {
99
99
  var _a, _b;
100
100
  const layerPickerClass = this._enabledLayerIds.length > 1 ? "display-block" : "display-none";
101
- return (h(Host, { key: 'abb0520889c7e739ccd0f7ef1cf5371169b09a4f' }, h("div", { key: '3772abb5d1f741644edd934e13ce25588714be0d', class: layerPickerClass + " padding-top-sides-1" }, h("div", { key: 'd0205e6127cf2df2eeb6ff9269ee0f64ccb0506b', class: "display-flex" }, h("calcite-label", { key: 'c6bdf8e921b6d7460198c5ea773c9f29f86dd7a4', class: "font-bold width-full label-margin-0" }, h("div", { key: '49969bbbb52f847764cddd748d9ebb01ee261de1', class: "display-flex" }, this._translations.inputLayer, h("calcite-icon", { key: '749c671b5b75d91e84f732daa4acb2264ed95f6c', class: "padding-start-1-2 icon", icon: "question", id: "refine-input-layer", scale: "s" })), h("map-layer-picker", { key: 'b0d7a600796e8b438db67b8d0dba74066bf3261f', enabledLayerIds: this._enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, ref: (el) => { this._layerPicker = el; }, selectedIds: [this._refineLayer.layer.id], showTables: false })), h("calcite-popover", { key: '6ed81245f48aa8c1163031625e276a3d708fca73', closable: true, label: "", referenceElement: "refine-input-layer" }, h("span", { key: '00e817a3d1f08b5f61f262eae88859d291444294', class: "tooltip-message" }, this._translations.inputLayerTip)))), h("div", { key: '0298fa4e89b539aba1aa602a84f224da905bf4f2', class: "padding-1" }, h("div", { key: '385699e47f1304a89b3abfe63f0d612b8b153c54', class: "padding-bottom-1" }, h("calcite-segmented-control", { key: 'a3d8bc30f9df92a98bd1dad2a4b7fd6221b4ea97', class: "w-100", width: "full" }, h("calcite-segmented-control-item", { key: 'f45b25ce69039e7de4b416a9498b6ec8cc850c60', checked: this._addEnabled, class: "w-50 word-wrap-anywhere", onClick: () => this._setSelectionMode(ESelectionMode.ADD), value: ESelectionMode.ADD }, h("span", { key: 'fcaa2cfc47ef7d46c1bf6080bbed2ab8c1b2a0a1', class: "font-weight-500" }, this._translations.add)), h("calcite-segmented-control-item", { key: '3be785a5d23b559021a609ae39950f7937d9b9e4', checked: !this._addEnabled, class: "w-50 word-wrap-anywhere", onClick: () => this._setSelectionMode(ESelectionMode.REMOVE), value: ESelectionMode.REMOVE }, h("span", { key: 'ee4d85f969762c87e30f07b6d518c4ca088fdbb3', class: "font-weight-500" }, this._translations.remove)))), h("div", { key: 'a1717a51a57bd216a04c13e9b04baaa5510bf33b' }, h("map-draw-tools", { key: '6063f82aea3984aa792e2f89e688eeaf0327ff1e', active: true, drawMode: EDrawMode.REFINE, mapView: this.mapView, onDrawRedo: () => this._redo(), onDrawUndo: () => this._undo(), onSketchGraphicsChange: (evt) => this._sketchGraphicsChanged(evt), pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, redoEnabled: ((_a = this._refineSelectionSet) === null || _a === void 0 ? void 0 : _a.redoStack.length) > 0, ref: (el) => { this._drawTools = el; }, undoEnabled: ((_b = this._refineSelectionSet) === null || _b === void 0 ? void 0 : _b.undoStack.length) > 0 })), h("br", { key: '76d977c28df03e57cde309eaaa300a9f013fae2c' }), (h("calcite-list", { key: 'e596cc82c03ffc277dbbad244de7a985fcfcc40a', class: "list-border" }, this._getRefineSelectionSetList())))));
101
+ return (h(Host, { key: 'abb0520889c7e739ccd0f7ef1cf5371169b09a4f' }, h("div", { key: '3772abb5d1f741644edd934e13ce25588714be0d', class: layerPickerClass + " padding-top-sides-1" }, h("div", { key: 'd0205e6127cf2df2eeb6ff9269ee0f64ccb0506b', class: "display-flex" }, h("calcite-label", { key: 'c6bdf8e921b6d7460198c5ea773c9f29f86dd7a4', class: "font-bold width-full label-margin-0" }, h("div", { key: '49969bbbb52f847764cddd748d9ebb01ee261de1', class: "display-flex" }, this._translations.inputLayer, h("calcite-icon", { key: 'e214244ee8305ffc6214df5d456340ffff2e48d5', class: "padding-start-1-2 icon", flipRtl: true, icon: "question", id: "refine-input-layer", scale: "s" })), h("map-layer-picker", { key: '5141de15e7492342fa735b941d11713d9b6b940f', enabledLayerIds: this._enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, ref: (el) => { this._layerPicker = el; }, selectedIds: [this._refineLayer.layer.id], showTables: false })), h("calcite-popover", { key: 'fcc6af19fb88b1cffd386fc499ef90e94530a033', closable: true, label: "", referenceElement: "refine-input-layer" }, h("span", { key: 'b740844b112e2bd8d42dbd0e87c0201a4b64b171', class: "tooltip-message" }, this._translations.inputLayerTip)))), h("div", { key: 'fe3fdd55ef90be673e89a31a2faf4cb83de132f5', class: "padding-1" }, h("div", { key: 'ee3d2c2d3b4ab82c39bceffd8fda755c172e18b6', class: "padding-bottom-1" }, h("calcite-segmented-control", { key: '960d56c2a480e00410dc1f075e99f747c71a1cdb', class: "w-100", width: "full" }, h("calcite-segmented-control-item", { key: '048cfef7ac5f23a6ad2c663cb3704f673a0a0fbd', checked: this._addEnabled, class: "w-50 word-wrap-anywhere", onClick: () => this._setSelectionMode(ESelectionMode.ADD), value: ESelectionMode.ADD }, h("span", { key: '4777b29c110bf5055622d5de8a60d0633bb1498f', class: "font-weight-500" }, this._translations.add)), h("calcite-segmented-control-item", { key: 'ae9147508332307320f34d8997ca10f42a8df704', checked: !this._addEnabled, class: "w-50 word-wrap-anywhere", onClick: () => this._setSelectionMode(ESelectionMode.REMOVE), value: ESelectionMode.REMOVE }, h("span", { key: 'e9c94444fbb17b86d04fcc8a51c83c9ef1c09cf5', class: "font-weight-500" }, this._translations.remove)))), h("div", { key: '6c1e7c69a983f69930f8a084746233603db56727' }, h("map-draw-tools", { key: 'dcb2d5ddb6a62b4d45d9416b1c8f49ba3ce0ed08', active: true, drawMode: EDrawMode.REFINE, mapView: this.mapView, onDrawRedo: () => this._redo(), onDrawUndo: () => this._undo(), onSketchGraphicsChange: (evt) => this._sketchGraphicsChanged(evt), pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, redoEnabled: ((_a = this._refineSelectionSet) === null || _a === void 0 ? void 0 : _a.redoStack.length) > 0, ref: (el) => { this._drawTools = el; }, undoEnabled: ((_b = this._refineSelectionSet) === null || _b === void 0 ? void 0 : _b.undoStack.length) > 0 })), h("br", { key: '14e8f85ee2f281f757c9f9a66b5ddb818310f8fc' }), (h("calcite-list", { key: '0be153af5a6c87289ee49ffe6b46c35a4d943b50', class: "list-border" }, this._getRefineSelectionSetList())))));
102
102
  }
103
103
  //--------------------------------------------------------------------------
104
104
  //
@@ -254,6 +254,7 @@ const LayerTable = class {
254
254
  this._initLayerExpressions();
255
255
  this._initToolInfos();
256
256
  this._updateToolbar();
257
+ console.log("mapInfoWatchHandler");
257
258
  await this._sortTable();
258
259
  }
259
260
  /**
@@ -396,7 +397,7 @@ const LayerTable = class {
396
397
  const selected = this.selectedIds.length.toString();
397
398
  const tableHeightClass = this.isMobile ? "height-full" : "height-full-adjusted";
398
399
  this._validateActiveActions();
399
- return (h(Host, { key: 'c0451b25b6253fc017f59f471ced6347a618bdcf' }, h("calcite-shell", { key: 'b71245a1b347aae2e06ccccd750875d9c0571b1b' }, this._getTableControlRow("header"), h("div", { key: 'a4c9e51f2cfa9e90bd1b67e8d542e93896321037', class: `width-full ${tableHeightClass}` }, h("calcite-panel", { key: 'e50e3a4165c02c56f99897fa29f079b2ef1e02ff', class: "height-full width-full" }, h("calcite-loader", { key: 'ad263eb3ac8558d6cd0777f993f663ddd0f7fbe6', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { key: '2bcbdf8197b4bcc5102d408538dab17acd803ae9', class: tableNodeClass, ref: this.onTableNodeCreate })), !this.isMobile ? (h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
400
+ return (h(Host, { key: 'd2e67c4d6676ede2d0094bfca008dfca12fb59b3' }, h("calcite-shell", { key: '62f1c76bbffcae878e4e3f3342c37bf3bbd865ca' }, this._getTableControlRow("header"), h("div", { key: '4efd17a2485f990984f61f2d8c8b45d3d096d428', class: `width-full ${tableHeightClass}` }, h("calcite-panel", { key: '443481322720ab22e9e2bddac98802a25ef87982', class: "height-full width-full" }, h("calcite-loader", { key: '445bb39ac5c33d470a52f10dd1c481fdaf38443d', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { key: '4f1ba294ece2f5b05030a1c3cdc48d6ff46ed5d4', class: tableNodeClass, ref: this.onTableNodeCreate })), !this.isMobile ? (h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
400
401
  .replace("{{total}}", total)
401
402
  .replace("{{selected}}", selected))) : undefined)), this._filterModal()));
402
403
  }
@@ -1096,6 +1097,7 @@ const LayerTable = class {
1096
1097
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
1097
1098
  await this.reactiveUtils.once(() => this._table.state === "loaded")
1098
1099
  .then(async () => {
1100
+ console.log("this._table.state === 'loaded'");
1099
1101
  this._table.highlightIds.removeAll();
1100
1102
  this._table.clearSelectionFilter();
1101
1103
  this._resetColumnTemplates();
@@ -1199,18 +1201,18 @@ const LayerTable = class {
1199
1201
  * Sort the table with the configured field and the sort order
1200
1202
  */
1201
1203
  async _sortTable() {
1202
- var _a, _b, _c, _d, _e;
1204
+ var _a, _b, _c, _d, _e, _f;
1203
1205
  //By default sort the table using objectIdField and in descending order
1204
1206
  let sortField = (_a = this._layer) === null || _a === void 0 ? void 0 : _a.objectIdField;
1205
1207
  let sortOrder = 'desc';
1206
1208
  let configuredLayer;
1207
1209
  //get the sortField and sortOrder from the configuration
1208
- if (((_d = (_c = (_b = this.mapInfo) === null || _b === void 0 ? void 0 : _b.layerOptions) === null || _c === void 0 ? void 0 : _c.layers) === null || _d === void 0 ? void 0 : _d.length) > 0) {
1210
+ if (((_d = (_c = (_b = this.mapInfo) === null || _b === void 0 ? void 0 : _b.layerOptions) === null || _c === void 0 ? void 0 : _c.layers) === null || _d === void 0 ? void 0 : _d.length) > 0 && ((_e = this._layer) === null || _e === void 0 ? void 0 : _e.id)) {
1209
1211
  configuredLayer = this.mapInfo.layerOptions.layers.filter((layer) => layer.id === this._layer.id);
1210
1212
  if (configuredLayer && configuredLayer.length > 0) {
1211
1213
  configuredLayer = configuredLayer[0];
1212
1214
  //if sort field is defined and sortField is available in the fields then use it
1213
- if (configuredLayer.sortField && ((_e = configuredLayer.fields) === null || _e === void 0 ? void 0 : _e.includes(configuredLayer.sortField))) {
1215
+ if (configuredLayer.sortField && ((_f = configuredLayer.fields) === null || _f === void 0 ? void 0 : _f.includes(configuredLayer.sortField))) {
1214
1216
  sortField = configuredLayer.sortField;
1215
1217
  }
1216
1218
  //use sort order if configured
@@ -1220,6 +1222,7 @@ const LayerTable = class {
1220
1222
  if (this._table && this._layer) {
1221
1223
  await this._table.when();
1222
1224
  await this._layer.when(() => {
1225
+ console.log("sort on this._layer.when");
1223
1226
  this._table.sortColumn(sortField, sortOrder);
1224
1227
  });
1225
1228
  }
@@ -195,14 +195,14 @@ const MapSelectTools = class {
195
195
  var _a, _b;
196
196
  const showBufferToolsClass = this._searchDistanceEnabled ? "search-distance" : "div-not-visible";
197
197
  const bufferDistance = typeof ((_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.distance) === "number" ? this.selectionSet.distance : this.defaultBufferDistance;
198
- return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.searchDistance, h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "search-distance-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "search-distance-icon" }, h("span", { class: "tooltip-message" }, this._translations.useSearchDistanceTootip)), h("calcite-switch", { checked: this._searchDistanceEnabled, onCalciteSwitchChange: () => this._searchDistanceEnabled = !this._searchDistanceEnabled })), h("div", { class: showBufferToolsClass }, h("buffer-tools", { disabled: !this._searchDistanceEnabled, distance: bufferDistance, geometries: this.geometries, onBufferComplete: (evt) => void this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: ((_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.unit) || this.defaultBufferUnit }))));
198
+ return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.searchDistance, h("calcite-icon", { class: "padding-start-1-2 icon", flipRtl: true, icon: "question", id: "search-distance-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "search-distance-icon" }, h("span", { class: "tooltip-message" }, this._translations.useSearchDistanceTootip)), h("calcite-switch", { checked: this._searchDistanceEnabled, onCalciteSwitchChange: () => this._searchDistanceEnabled = !this._searchDistanceEnabled })), h("div", { class: showBufferToolsClass }, h("buffer-tools", { disabled: !this._searchDistanceEnabled, distance: bufferDistance, geometries: this.geometries, onBufferComplete: (evt) => void this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: ((_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.unit) || this.defaultBufferUnit }))));
199
199
  }
200
200
  /**
201
201
  * Renders the map layer picker component.
202
202
  */
203
203
  _getUseLayerFeaturesOptions() {
204
204
  const useLayerFeaturesClass = this._useLayerFeaturesEnabled ? "div-visible" : "div-not-visible";
205
- return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.useLayerFeatures, h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "use-layer-features-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "use-layer-features-icon" }, h("span", { class: "tooltip-message" }, this._translations.useLayerFeaturesTooltip)), h("calcite-switch", { checked: this._useLayerFeaturesEnabled, onCalciteSwitchChange: () => { this._useLayerFeaturesEnabledChanged(); } })), h("div", { class: useLayerFeaturesClass + " padding-top-1" }, h("map-layer-picker", { enabledLayerIds: this.selectionLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedIds: this.layerViews.map(l => l.layer.id), showTables: false }))));
205
+ return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.useLayerFeatures, h("calcite-icon", { class: "padding-start-1-2 icon", flipRtl: true, icon: "question", id: "use-layer-features-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "use-layer-features-icon" }, h("span", { class: "tooltip-message" }, this._translations.useLayerFeaturesTooltip)), h("calcite-switch", { checked: this._useLayerFeaturesEnabled, onCalciteSwitchChange: () => { this._useLayerFeaturesEnabledChanged(); } })), h("div", { class: useLayerFeaturesClass + " padding-top-1" }, h("map-layer-picker", { enabledLayerIds: this.selectionLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedIds: this.layerViews.map(l => l.layer.id), showTables: false }))));
206
206
  }
207
207
  /**
208
208
  * Renders the number of selected features
@@ -1192,7 +1192,7 @@ const RefineSelection = class {
1192
1192
  render() {
1193
1193
  var _a, _b;
1194
1194
  const layerPickerClass = this._enabledLayerIds.length > 1 ? "display-block" : "display-none";
1195
- return (h(Host, { key: 'abb0520889c7e739ccd0f7ef1cf5371169b09a4f' }, h("div", { key: '3772abb5d1f741644edd934e13ce25588714be0d', class: layerPickerClass + " padding-top-sides-1" }, h("div", { key: 'd0205e6127cf2df2eeb6ff9269ee0f64ccb0506b', class: "display-flex" }, h("calcite-label", { key: 'c6bdf8e921b6d7460198c5ea773c9f29f86dd7a4', class: "font-bold width-full label-margin-0" }, h("div", { key: '49969bbbb52f847764cddd748d9ebb01ee261de1', class: "display-flex" }, this._translations.inputLayer, h("calcite-icon", { key: '749c671b5b75d91e84f732daa4acb2264ed95f6c', class: "padding-start-1-2 icon", icon: "question", id: "refine-input-layer", scale: "s" })), h("map-layer-picker", { key: 'b0d7a600796e8b438db67b8d0dba74066bf3261f', enabledLayerIds: this._enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, ref: (el) => { this._layerPicker = el; }, selectedIds: [this._refineLayer.layer.id], showTables: false })), h("calcite-popover", { key: '6ed81245f48aa8c1163031625e276a3d708fca73', closable: true, label: "", referenceElement: "refine-input-layer" }, h("span", { key: '00e817a3d1f08b5f61f262eae88859d291444294', class: "tooltip-message" }, this._translations.inputLayerTip)))), h("div", { key: '0298fa4e89b539aba1aa602a84f224da905bf4f2', class: "padding-1" }, h("div", { key: '385699e47f1304a89b3abfe63f0d612b8b153c54', class: "padding-bottom-1" }, h("calcite-segmented-control", { key: 'a3d8bc30f9df92a98bd1dad2a4b7fd6221b4ea97', class: "w-100", width: "full" }, h("calcite-segmented-control-item", { key: 'f45b25ce69039e7de4b416a9498b6ec8cc850c60', checked: this._addEnabled, class: "w-50 word-wrap-anywhere", onClick: () => this._setSelectionMode(ESelectionMode.ADD), value: ESelectionMode.ADD }, h("span", { key: 'fcaa2cfc47ef7d46c1bf6080bbed2ab8c1b2a0a1', class: "font-weight-500" }, this._translations.add)), h("calcite-segmented-control-item", { key: '3be785a5d23b559021a609ae39950f7937d9b9e4', checked: !this._addEnabled, class: "w-50 word-wrap-anywhere", onClick: () => this._setSelectionMode(ESelectionMode.REMOVE), value: ESelectionMode.REMOVE }, h("span", { key: 'ee4d85f969762c87e30f07b6d518c4ca088fdbb3', class: "font-weight-500" }, this._translations.remove)))), h("div", { key: 'a1717a51a57bd216a04c13e9b04baaa5510bf33b' }, h("map-draw-tools", { key: '6063f82aea3984aa792e2f89e688eeaf0327ff1e', active: true, drawMode: EDrawMode.REFINE, mapView: this.mapView, onDrawRedo: () => this._redo(), onDrawUndo: () => this._undo(), onSketchGraphicsChange: (evt) => this._sketchGraphicsChanged(evt), pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, redoEnabled: ((_a = this._refineSelectionSet) === null || _a === void 0 ? void 0 : _a.redoStack.length) > 0, ref: (el) => { this._drawTools = el; }, undoEnabled: ((_b = this._refineSelectionSet) === null || _b === void 0 ? void 0 : _b.undoStack.length) > 0 })), h("br", { key: '76d977c28df03e57cde309eaaa300a9f013fae2c' }), (h("calcite-list", { key: 'e596cc82c03ffc277dbbad244de7a985fcfcc40a', class: "list-border" }, this._getRefineSelectionSetList())))));
1195
+ return (h(Host, { key: 'abb0520889c7e739ccd0f7ef1cf5371169b09a4f' }, h("div", { key: '3772abb5d1f741644edd934e13ce25588714be0d', class: layerPickerClass + " padding-top-sides-1" }, h("div", { key: 'd0205e6127cf2df2eeb6ff9269ee0f64ccb0506b', class: "display-flex" }, h("calcite-label", { key: 'c6bdf8e921b6d7460198c5ea773c9f29f86dd7a4', class: "font-bold width-full label-margin-0" }, h("div", { key: '49969bbbb52f847764cddd748d9ebb01ee261de1', class: "display-flex" }, this._translations.inputLayer, h("calcite-icon", { key: 'e214244ee8305ffc6214df5d456340ffff2e48d5', class: "padding-start-1-2 icon", flipRtl: true, icon: "question", id: "refine-input-layer", scale: "s" })), h("map-layer-picker", { key: '5141de15e7492342fa735b941d11713d9b6b940f', enabledLayerIds: this._enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, ref: (el) => { this._layerPicker = el; }, selectedIds: [this._refineLayer.layer.id], showTables: false })), h("calcite-popover", { key: 'fcc6af19fb88b1cffd386fc499ef90e94530a033', closable: true, label: "", referenceElement: "refine-input-layer" }, h("span", { key: 'b740844b112e2bd8d42dbd0e87c0201a4b64b171', class: "tooltip-message" }, this._translations.inputLayerTip)))), h("div", { key: 'fe3fdd55ef90be673e89a31a2faf4cb83de132f5', class: "padding-1" }, h("div", { key: 'ee3d2c2d3b4ab82c39bceffd8fda755c172e18b6', class: "padding-bottom-1" }, h("calcite-segmented-control", { key: '960d56c2a480e00410dc1f075e99f747c71a1cdb', class: "w-100", width: "full" }, h("calcite-segmented-control-item", { key: '048cfef7ac5f23a6ad2c663cb3704f673a0a0fbd', checked: this._addEnabled, class: "w-50 word-wrap-anywhere", onClick: () => this._setSelectionMode(ESelectionMode.ADD), value: ESelectionMode.ADD }, h("span", { key: '4777b29c110bf5055622d5de8a60d0633bb1498f', class: "font-weight-500" }, this._translations.add)), h("calcite-segmented-control-item", { key: 'ae9147508332307320f34d8997ca10f42a8df704', checked: !this._addEnabled, class: "w-50 word-wrap-anywhere", onClick: () => this._setSelectionMode(ESelectionMode.REMOVE), value: ESelectionMode.REMOVE }, h("span", { key: 'e9c94444fbb17b86d04fcc8a51c83c9ef1c09cf5', class: "font-weight-500" }, this._translations.remove)))), h("div", { key: '6c1e7c69a983f69930f8a084746233603db56727' }, h("map-draw-tools", { key: 'dcb2d5ddb6a62b4d45d9416b1c8f49ba3ce0ed08', active: true, drawMode: EDrawMode.REFINE, mapView: this.mapView, onDrawRedo: () => this._redo(), onDrawUndo: () => this._undo(), onSketchGraphicsChange: (evt) => this._sketchGraphicsChanged(evt), pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, redoEnabled: ((_a = this._refineSelectionSet) === null || _a === void 0 ? void 0 : _a.redoStack.length) > 0, ref: (el) => { this._drawTools = el; }, undoEnabled: ((_b = this._refineSelectionSet) === null || _b === void 0 ? void 0 : _b.undoStack.length) > 0 })), h("br", { key: '14e8f85ee2f281f757c9f9a66b5ddb818310f8fc' }), (h("calcite-list", { key: '0be153af5a6c87289ee49ffe6b46c35a4d943b50', class: "list-border" }, this._getRefineSelectionSetList())))));
1196
1196
  }
1197
1197
  //--------------------------------------------------------------------------
1198
1198
  //
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import{r as i,c as t,h as e,H as s,g as a}from"./p-6d753a3d.js";import{a as l,l as h,g as n}from"./p-896c9644.js";import{e as o,h as r,k as d,l as c,c as p,m as b,n as g,o as f}from"./p-583e5dd0.js";import{a as y,e as u,f as v}from"./p-c1cf3ebc.js";import{s as m}from"./p-f22a4439.js";import{d as w,a as S}from"./p-6f69de4d.js";import"./p-82e085d0.js";import"./p-bdcf99c0.js";import"./p-334e6394.js";import"./p-a230b270.js";import"./p-530b73ce.js";const _=class{constructor(e){i(this,e),this.selectionSetChange=t(this,"selectionSetChange",7),this._selectedIds=[],this._selectionLabel="",this._graphics=[],this._featuresCollection={},this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.customLabelEnabled=void 0,this.enabledLayerIds=[],this.defaultBufferDistance=void 0,this.defaultBufferUnit=void 0,this.geometries=[],this.isUpdate=!1,this.layerViews=[],this.mapView=void 0,this.noResultText=void 0,this.searchConfiguration=void 0,this.selectionSet=void 0,this.selectionLayerIds=[],this.selectLayerView=void 0,this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this._numSelected=0,this._searchDistanceEnabled=!1,this._searchTerm=void 0,this._selectionLoading=!1,this._translations=void 0,this._useLayerFeaturesEnabled=!1}async watchGeometriesHandler(i,t){if(i!==t){const t=0===i.length;if(await this._clearResults(t,t),i.length>0)return this._highlightWithOIDsOrGeoms()}}async mapViewWatchHandler(i,t){i&&i!==t&&await this._init()}async watchSearchConfigurationHandler(i,t){JSON.stringify(i)!==JSON.stringify(t)&&await this._initSearchWidget()}async clearSelection(){return this._clearResults(!0,!0)}async getSelection(){return/\S+/gm.test(this._selectionLabel)||await this._updateLabel(),{id:this.isUpdate?this.selectionSet.id:Date.now(),searchResult:this._searchResult,buffer:this._bufferGeometry,distance:this._bufferTools.distance,download:!0,unit:this._bufferTools.unit,label:this._selectionLabel,selectedIds:this._selectedIds,layerView:this.selectLayerView,geometries:this.geometries,graphics:this._graphics,selectLayers:this.layerViews,skipGeomOIDs:this._skipGeomOIDs,searchDistanceEnabled:this._searchDistanceEnabled,workflowType:this._workflowType,useLayerFeaturesEnabled:this._useLayerFeaturesEnabled,sketchGraphic:this._sketchGraphic}}searchConfigurationChangeChanged(i){this.searchConfiguration=i.detail}async distanceChanged(i){await this._distanceChanged(i.detail)}async unitChanged(i){i.detail.newValue!==i.detail.oldValue&&(this._unit=i.detail.newValue,await this._updateLabel())}async componentWillLoad(){await this._getTranslations(),await this._initModules()}async componentDidLoad(){await this._init()}render(){return e(s,{key:"2b56c937fc1c146927f9340f69214cd13dd02646"},this._getMapLayerPicker(),e("div",{key:"c7c67b0a76390992b0e60c0cc76e483d832a8835",class:"border-bottom"}),e("div",{key:"87cefbe906df9489b371e2c4432b2bdfbb84d299",class:"padding-top-sides-1"},e("div",{key:"f8a4ca9dac6d0fab8a9197ce94051a8b2b502fd7",class:"search-widget",ref:i=>{this._searchElement=i}}),e("div",{key:"e63f6558b06b37d9c00b1a67ed47c9238b452c4a",class:"padding-top-1"},e("map-draw-tools",{key:"7c3d157f3dd7beb6172c15b62343af378c7a029e",active:!0,editGraphicsEnabled:!this._useLayerFeaturesEnabled,graphics:this._graphics,mapView:this.mapView,onSketchGraphicsChange:i=>{this._sketchGraphicsChanged(i)},pointSymbol:this.sketchPointSymbol,polygonSymbol:this.sketchPolygonSymbol,polylineSymbol:this.sketchLineSymbol,ref:i=>{this._drawTools=i}})),this._getBufferOptions(),this._getUseLayerFeaturesOptions(),this._getNumSelected()),e("div",{key:"7642899857c823b6891138d19016783a77922fea",class:"border-bottom"}),this._getNameInput())}_getBufferOptions(){var i,t;const s=this._searchDistanceEnabled?"search-distance":"div-not-visible",a="number"==typeof(null===(i=this.selectionSet)||void 0===i?void 0:i.distance)?this.selectionSet.distance:this.defaultBufferDistance;return e("div",null,e("div",{class:"padding-top-1 display-flex"},e("calcite-label",{class:"label-margin-0 w-100",layout:"inline-space-between"},e("div",{class:"tooltip-container"},this._translations.searchDistance,e("calcite-icon",{class:"padding-start-1-2 icon",flipRtl:!0,icon:"question",id:"search-distance-icon",scale:"s"}))),e("calcite-popover",{closable:!0,label:"",referenceElement:"search-distance-icon"},e("span",{class:"tooltip-message"},this._translations.useSearchDistanceTootip)),e("calcite-switch",{checked:this._searchDistanceEnabled,onCalciteSwitchChange:()=>this._searchDistanceEnabled=!this._searchDistanceEnabled})),e("div",{class:s},e("buffer-tools",{disabled:!this._searchDistanceEnabled,distance:a,geometries:this.geometries,onBufferComplete:i=>{this._bufferComplete(i)},ref:i=>this._bufferTools=i,unit:(null===(t=this.selectionSet)||void 0===t?void 0:t.unit)||this.defaultBufferUnit})))}_getUseLayerFeaturesOptions(){const i=this._useLayerFeaturesEnabled?"div-visible":"div-not-visible";return e("div",null,e("div",{class:"padding-top-1 display-flex"},e("calcite-label",{class:"label-margin-0 w-100",layout:"inline-space-between"},e("div",{class:"tooltip-container"},this._translations.useLayerFeatures,e("calcite-icon",{class:"padding-start-1-2 icon",flipRtl:!0,icon:"question",id:"use-layer-features-icon",scale:"s"}))),e("calcite-popover",{closable:!0,label:"",referenceElement:"use-layer-features-icon"},e("span",{class:"tooltip-message"},this._translations.useLayerFeaturesTooltip)),e("calcite-switch",{checked:this._useLayerFeaturesEnabled,onCalciteSwitchChange:()=>{this._useLayerFeaturesEnabledChanged()}})),e("div",{class:i+" padding-top-1"},e("map-layer-picker",{enabledLayerIds:this.selectionLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>{this._layerSelectionChange(i)},selectedIds:this.layerViews.map((i=>i.layer.id)),showTables:!1})))}_getNumSelected(){const i=l(this.el),t=i&&"en"===i?`${this._translations.selectionLoading}...`:this._translations.selectionLoading;return e("div",{class:"padding-top-1 padding-bottom-1",style:{"align-items":"end",display:"flex"}},this._selectionLoading?e("div",null,e("calcite-loader",{class:"info-blue",inline:!0,label:t,scale:"m",type:"indeterminate"})):e("calcite-icon",{class:"info-blue padding-end-1-2",icon:"feature-layer",scale:"s"}),e("calcite-input-message",{class:"info-blue",scale:"m"},this._selectionLoading?t:this.noResultText&&0===this._numSelected?this.noResultText:this._translations.selectedFeatures.replace("{{n}}",this._numSelected.toString())))}_getNameInput(){return e("div",{class:"padding-sides-1 padding-top-1 "+(this.customLabelEnabled?"":"display-none")},e("calcite-label",{class:"font-bold"},this._translations.listName,e("calcite-input",{onInput:()=>{this._selectionLabel=this._labelName.value},placeholder:this._translations.listNamePlaceholder,ref:i=>{this._labelName=i},value:this._selectionLabel||""})))}_getMapLayerPicker(){return e("div",{class:"display-flex padding-sides-1 padding-bottom-1"},e("calcite-label",{class:"font-bold width-full label-margin-0"},this._translations.inputLayer,e("map-layer-picker",{enabledLayerIds:this.enabledLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>{this._inputLayerSelectionChange(i)},selectedIds:this.selectLayerView?[this.selectLayerView.layer.id]:this.selectionSet?[this.selectionSet.layerView.layer.id]:[],showTables:!1})))}async _initModules(){const[i,t,e,s,a]=await h(["esri/layers/GraphicsLayer","esri/Graphic","esri/widgets/Search","esri/geometry/geometryEngine","esri/layers/FeatureLayer"]);this.GraphicsLayer=i,this.Graphic=t,this.Search=e,this._geometryEngine=s,this.FeatureLayer=a}async _init(){this._initGraphicsLayer(),await this._initSelectionSet(),await this._initSearchWidget()}async _initSelectionSet(){var i,t,e,s;this.selectionSet&&(this._searchTerm=null===(i=this.selectionSet.searchResult)||void 0===i?void 0:i.name,this._searchResult=this.selectionSet.searchResult,this._selectLayers=this.selectionSet.selectLayers,this._selectedIds=this.selectionSet.selectedIds,this._skipGeomOIDs=this.selectionSet.skipGeomOIDs,this._searchDistanceEnabled=this.selectionSet.searchDistanceEnabled,this._useLayerFeaturesEnabled=this.selectionSet.useLayerFeaturesEnabled,this._distance=this.selectionSet.searchDistanceEnabled?this.selectionSet.distance:0,this._unit=this.selectionSet.unit,this._workflowType=this.selectionSet.workflowType,this.selectLayerView=this.selectionSet.layerView,this._sketchGraphic=this.selectionSet.sketchGraphic,this.geometries=[...(null===(t=this.selectionSet)||void 0===t?void 0:t.geometries)||[]],this._graphics=this.geometries.map((i=>new this.Graphic({geometry:i,symbol:"point"===i.type?this.sketchPointSymbol:"polyline"===i.type?this.sketchLineSymbol:this.sketchPolygonSymbol}))),this._selectionLabel=null===(e=this.selectionSet)||void 0===e?void 0:e.label,this._useLayerFeaturesEnabled||await(null===(s=this._drawTools)||void 0===s?void 0:s.updateGraphics()),await o(this.selectionSet.selectedIds,this.selectionSet.layerView,this.mapView,!1))}async _initSearchWidget(){if(this.mapView&&this._searchElement){const i=this._getSearchConfig(this.searchConfiguration,this.mapView),t=Object.assign({view:this.mapView,container:this._searchElement,searchTerm:this._searchTerm},i);this._searchWidget=new this.Search(t),this._searchWidget.popupEnabled=!1,this._searchWidget.resultGraphicEnabled=!1,this._searchWidget.on("search-clear",(()=>{const i=this._searchClearLabel();this._clearResults(!1,i)})),this._searchWidget.on("select-result",(i=>{var t,e;if(i.result){this._searchResult=i.result;const s=(null===(e=null===(t=i.source)||void 0===t?void 0:t.layer)||void 0===e?void 0:e.id)&&i.source.layer.id===this.selectLayerView.layer.id,a=s?[i.result.feature.getObjectId()]:void 0;this._workflowType=y.SEARCH,this._updateLabel();const l=[i.result.feature];this._updateSelection(l,s,a),this._drawTools.graphics=l,this._searchWidget.resultGraphic.visible=!1}else{const i=this._searchClearLabel();this._clearResults(!1,i)}})),await this._searchWidget.when((()=>{var i;this._searchWidget.allPlaceholder=(null===(i=this.searchConfiguration)||void 0===i?void 0:i.allPlaceholder)&&"find address or place"!==this.searchConfiguration.allPlaceholder.toLowerCase()?this.searchConfiguration.allPlaceholder:this._translations.placeholder}))}}_searchClearLabel(){var i;return(null===(i=this._searchResult)||void 0===i?void 0:i.name)&&this._labelName.value.indexOf(this._searchResult.name)>-1}_getSearchConfig(i,t){const e=null==i?void 0:i.sources;return(null==e?void 0:e.length)>0?(i.includeDefaultSources=!1,e.forEach((i=>{var e,s;if(i.hasOwnProperty("layer")){const a=i,l=null===(e=a.layer)||void 0===e?void 0:e.id,h=l?t.map.findLayerById(l):null,n=null===(s=null==a?void 0:a.layer)||void 0===s?void 0:s.url;h?a.layer=h:n&&(a.layer=new this.FeatureLayer(n))}})),null==e||e.forEach((i=>{if(i.hasOwnProperty("locator")){const t=i;"ArcGIS World Geocoding Service"===(null==t?void 0:t.name)&&(t.outFields=t.outFields||["Addr_type","Match_addr","StAddr","City"],t.singleLineFieldName="SingleLine"),t.url=t.url,delete t.url}}))):i=Object.assign(Object.assign({},i),{includeDefaultSources:!0}),i}_initGraphicsLayer(){const i=this._translations.bufferLayer;if(this.mapView){const t=this.mapView.map.layers.findIndex((t=>t.title===i));if(t>-1)this._bufferGraphicsLayer=this.mapView.map.layers.getItemAt(t);else{this._bufferGraphicsLayer=new this.GraphicsLayer({title:i,listMode:"hide"}),m.managedLayers[i]="buffer";const t=this.mapView.map.layers.findIndex((i=>i.title===this._translations.sketchLayer));t>-1?this.mapView.map.layers.add(this._bufferGraphicsLayer,t):this.mapView.map.layers.add(this._bufferGraphicsLayer)}}}async _sketchGraphicsChanged(i,t=!1){const e=i.detail.graphics;if(e.length>0&&e[0])if(t||(this._sketchGraphic=e[0]),this._workflowType=this._useLayerFeaturesEnabled?y.SELECT:y.SKETCH,this._workflowType===y.SKETCH&&await this._drawTools.updateGraphics(),await this._updateLabel(),this._clearSearchWidget(),this._useLayerFeaturesEnabled&&!t){const i=Array.isArray(e)?e.map((i=>i.geometry)):this.geometries;await this._selectLayerFeatures(i[0])}else{const t=e.reduce(((i,t)=>{var e;return(null===(e=null==t?void 0:t.layer)||void 0===e?void 0:e.objectIdField)?i.push(t.attributes[t.layer.objectIdField]):t.getObjectId&&i.push(t.getObjectId()),i}),[]),s=i.detail.useOIDs&&t.length>0;this._updateSelection(e,s,t),s&&await this._highlightFeatures(t)}else await this._clearResults(!0,!0)}async _highlightWithOIDsOrGeoms(){var i;return(null===(i=this._skipGeomOIDs)||void 0===i?void 0:i.length)>0?(this._selectedIds=this._skipGeomOIDs,this._highlightFeatures(this._selectedIds)):this._geomQuery(this.geometries)}async _highlightFeatures(i){m.removeHandles(),i.length>0&&m.highlightHandles.push(await r(i,this.selectLayerView,this.mapView)),this._numSelected=i.length,this.selectionSetChange.emit(i.length)}async _selectFeatures(i){this._selectionLoading=!0,this._selectedIds=await d(i,this.selectLayerView.layer),this._selectionLoading=!1,this._drawTools.graphics=this._graphics,await this._highlightFeatures(this._selectedIds)}async _bufferComplete(i){this._bufferGeometry=Array.isArray(i.detail)?i.detail[0]:i.detail;let t=this._bufferTools.distance,e=0;if(this._bufferGeometry){const i=new this.Graphic({geometry:this._bufferGeometry,symbol:{type:"simple-fill",color:this.bufferColor,outline:{color:this.bufferOutlineColor,width:1}}});this._bufferGraphicsLayer.removeAll(),this._bufferGraphicsLayer.add(i),await this._selectFeatures([this._bufferGeometry]),await this.mapView.goTo(i.geometry.extent),e=t,t=0}else this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),await this._highlightWithOIDsOrGeoms();await this._distanceChanged({oldValue:t,newValue:e})}_geomQuery(i){const t=c(i,this._geometryEngine);return this._selectFeatures(t)}async _clearResults(i=!0,t=!1){var e;this._selectedIds=[],this._distance=void 0,this._unit=void 0,t&&(this._selectionLabel="",this._labelName.value=""),this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),i&&this._searchWidget&&this._clearSearchWidget(),m.removeHandles(),(null===(e=this._drawTools)||void 0===e?void 0:e.clear)&&(this._graphics=[],await this._drawTools.clear()),this.selectionSetChange.emit(this._selectedIds.length)}_clearSearchWidget(){this._searchWidget.clear(),this._searchResult=void 0}_updateSelection(i,t,e){this._selectedIds=t&&e?e:this._selectedIds,this._skipGeomOIDs=t?e:void 0,this.geometries=Array.isArray(i)?i.map((i=>i.geometry)):this.geometries,this._graphics=i}async _updateLabel(){var i,t;const e=this._selectionLabel.indexOf(this._translations.sketch)>-1,s=this._selectionLabel.indexOf(this._translations.select)>-1,a=this._selectionLabel.indexOf(null===(i=this._searchResult)||void 0===i?void 0:i.name)>-1,l=this._workflowType===y.SEARCH?null===(t=this._searchResult)||void 0===t?void 0:t.name:this._workflowType===y.SELECT?this._translations.select:this._translations.sketch,h=this._unit?this._unit:this._bufferTools.unit,n=await this._bufferTools.getTranslatedUnit(h),o=isNaN(this._distance)?this._bufferTools.distance:this._distance;this._selectionLabel=e||s||a||!this._selectionLabel?`${l} ${o} ${n}`:this._selectionLabel,this._labelName.value=this._selectionLabel}async _layerSelectionChange(i){if(Array.isArray(i.detail)&&i.detail.length>0){const t=i.detail.map((i=>p(this.mapView,i)));return Promise.all(t).then((i=>{this.layerViews=i,this._featuresCollection={},this._sketchGraphic&&this._sketchGraphicsChanged({detail:{graphics:[this._sketchGraphic],useOIDs:!1}})}))}}async _inputLayerSelectionChange(i){var t;const e=(null===(t=null==i?void 0:i.detail)||void 0===t?void 0:t.length)>0?i.detail[0]:"";this.selectLayerView&&e===this.selectLayerView.layer.id||(this.selectLayerView=await p(this.mapView,e),await this._updateLabel(),this._bufferGeometry?await this._selectFeatures([this._bufferGeometry]):await this._highlightWithOIDsOrGeoms())}async _distanceChanged(i){i.newValue!==i.oldValue&&(this._distance=i.newValue,await this._updateLabel())}async _selectLayerFeatures(i){this._selectionLoading=!0;const t=this.layerViews.map((t=>(this._featuresCollection[t.layer.id]=[],b(0,t.layer,i,this._featuresCollection))));return Promise.all(t).then((async i=>{this._selectionLoading=!1;let t=[];i.forEach((i=>{Object.keys(i).forEach((e=>{t=t.concat(i[e])}))}));let e=!1;t.forEach((i=>{var t;const s=i.geometry;i.symbol="point"===s.type?this.sketchPointSymbol:"polyline"===s.type?this.sketchLineSymbol:"polygon"===s.type?this.sketchPolygonSymbol:void 0,e=(null===(t=null==i?void 0:i.layer)||void 0===t?void 0:t.hasOwnProperty("objectIdField"))||i.hasOwnProperty("getObjectId")}));const s=this.layerViews[0].layer.title===this.selectLayerView.layer.title&&e;await this._sketchGraphicsChanged({detail:{graphics:t,useOIDs:s}},!0)}))}_useLayerFeaturesEnabledChanged(){this._useLayerFeaturesEnabled=!this._useLayerFeaturesEnabled,this._sketchGraphic&&this._sketchGraphicsChanged({detail:{graphics:[this._sketchGraphic],useOIDs:!1}})}async _getTranslations(){const i=await n(this.el);this._translations=i[0]}get el(){return a(this)}static get watchers(){return{geometries:["watchGeometriesHandler"],mapView:["mapViewWatchHandler"],searchConfiguration:["watchSearchConfigurationHandler"]}}};_.style=':host{display:block}.div-visible{display:inherit}.div-visible-search{display:flex;height:44px;align-items:center;padding-bottom:0}.div-not-visible{display:none}.padding-bottom-1{padding-bottom:1rem}.padding-top-1{padding-top:1rem}.search-widget{width:100% !important;border:1px solid var(--calcite-color-border-input)}.w-100{width:100%}.w-50{width:50%}.search-distance-container{padding-top:"1rem" !important}.end-border{border-inline-end:1px solid var(--calcite-color-border-2)}.search-distance{display:flex;padding-top:1rem}.font-bold{font:bold}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.tooltip-container{display:flex}.padding-start-1-2{padding-inline-start:0.5rem}.icon{--calcite-color-icon-color:var(--calcite-color-brand)}.tooltip-message{padding:5px 8px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2)}';const k=Object.freeze({__proto__:null,default:[{descriptionPDF:{labelWidthDisplay:"2-5/8",labelHeightDisplay:"1",labelsPerPageDisplay:"30",averyPartNumber:"*60"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.1875,rightMargin:.1875,topMargin:.5,bottomMargin:.5},numLabelsAcross:3,numLabelsDown:10,labelWidth:2.625,labelHeight:1,horizGapIn:.125,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1",labelsPerPageDisplay:"20",averyPartNumber:"*61"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.47637821,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:10,labelWidth:4,labelHeight:1.0025,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1-1/3",labelsPerPageDisplay:"14",averyPartNumber:"*62"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.81889808,bottomMargin:.83464612},numLabelsAcross:2,numLabelsDown:7,labelWidth:4,labelHeight:1.3352,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:6}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"2",labelsPerPageDisplay:"10",averyPartNumber:"*63"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.5,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:5,labelWidth:4,labelHeight:2,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:12,maxNumLabelLines:10}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"3-1/3",labelsPerPageDisplay:"6",averyPartNumber:"*64"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.4724412,bottomMargin:.50000027},numLabelsAcross:2,numLabelsDown:3,labelWidth:4,labelHeight:3.342,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:14,maxNumLabelLines:12}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"1/2",labelsPerPageDisplay:"80",averyPartNumber:"*67"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.307086375,rightMargin:.307086375,topMargin:.4724412,bottomMargin:.49606326},numLabelsAcross:4,numLabelsDown:20,labelWidth:1.75,labelHeight:.50155,horizGapIn:.29527575,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:3}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"2/3",labelsPerPageDisplay:"60",averyPartNumber:"*95"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.28936983,rightMargin:.28936983,topMargin:.53937037,bottomMargin:.5511814},numLabelsAcross:4,numLabelsDown:15,labelWidth:1.75,labelHeight:.6605,horizGapIn:.30708678,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:4}}]}),L=class{constructor(t){i(this,t),this.defaultNumLabelsPerPage=void 0,this.disabled=!1,this._translations=void 0}async downloadCSV(i,t,e,s=!0){return w(i,t,!0,e,s)}async downloadPDF(i,t,e=!1,s="",a=""){var l;return S(i,t,null===(l=this._labelInfoElement.selectedOption)||void 0===l?void 0:l.value,e,s,a)}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){return e(s,{key:"7474ef13bc67b7c69b0605239748ec9f1816b3be"},e("calcite-select",{key:"2a6d379cb08aef1cafd5f568438f9981cef26962",disabled:this.disabled,label:"",ref:i=>{this._labelInfoElement=i}}))}componentDidLoad(){this._renderOptions()}async _initModules(){const[i]=await h(["esri/intl"]);this._intl=i}_getLabelSizeText(i){const t="&lrm;"+i.descriptionPDF.labelWidthDisplay+" x "+i.descriptionPDF.labelHeightDisplay+"&rlm;";return this._translations.pdfLabel.replace("{{n}}",i.descriptionPDF.labelsPerPageDisplay).replace("{{labelSize}}",t)}async _getTranslations(){const i=await n(this.el);this._translations=i[0]}_renderOptions(){(k.default||k).sort(((i,t)=>{const e=parseInt(i.descriptionPDF.labelsPerPageDisplay,10),s=parseInt(t.descriptionPDF.labelsPerPageDisplay,10);return e<s?-1:e>s?1:0})).forEach(((i,t)=>{const e=document.createElement("calcite-option");e.value=i,e.innerHTML=this._getLabelSizeText(i),this._labelInfoElement.appendChild(e),(this.defaultNumLabelsPerPage?parseInt(i.descriptionPDF.labelsPerPageDisplay,10)===this.defaultNumLabelsPerPage:0===t)&&(e.selected=!0,this._labelInfoElement.selectedOption=e)}))}get el(){return a(this)}};L.style=":host{display:block}";const P=class{constructor(e){i(this,e),this.selectionLoadingChange=t(this,"selectionLoadingChange",7),this.selectionSetsChanged=t(this,"selectionSetsChanged",7),this._addEnabled=!0,this._refineSets=[],this._enabledLayerIds=[],this._featuresCollection={},this.addresseeLayer=void 0,this.enabledLayerIds=[],this.mapView=void 0,this.selectionSets=[],this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this._translations=void 0,this._selectionMode=u.ADD,this._refineLayer=void 0}async componentWillLoad(){await this._getTranslations(),this._enabledLayerIds=this._getEnabledLayerIds(),await this._setRefineSet(this._enabledLayerIds[0])}render(){var i,t;return e(s,{key:"abb0520889c7e739ccd0f7ef1cf5371169b09a4f"},e("div",{key:"3772abb5d1f741644edd934e13ce25588714be0d",class:(this._enabledLayerIds.length>1?"display-block":"display-none")+" padding-top-sides-1"},e("div",{key:"d0205e6127cf2df2eeb6ff9269ee0f64ccb0506b",class:"display-flex"},e("calcite-label",{key:"c6bdf8e921b6d7460198c5ea773c9f29f86dd7a4",class:"font-bold width-full label-margin-0"},e("div",{key:"49969bbbb52f847764cddd748d9ebb01ee261de1",class:"display-flex"},this._translations.inputLayer,e("calcite-icon",{key:"e214244ee8305ffc6214df5d456340ffff2e48d5",class:"padding-start-1-2 icon",flipRtl:!0,icon:"question",id:"refine-input-layer",scale:"s"})),e("map-layer-picker",{key:"5141de15e7492342fa735b941d11713d9b6b940f",enabledLayerIds:this._enabledLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>{this._layerSelectionChange(i)},ref:i=>{this._layerPicker=i},selectedIds:[this._refineLayer.layer.id],showTables:!1})),e("calcite-popover",{key:"fcc6af19fb88b1cffd386fc499ef90e94530a033",closable:!0,label:"",referenceElement:"refine-input-layer"},e("span",{key:"b740844b112e2bd8d42dbd0e87c0201a4b64b171",class:"tooltip-message"},this._translations.inputLayerTip)))),e("div",{key:"fe3fdd55ef90be673e89a31a2faf4cb83de132f5",class:"padding-1"},e("div",{key:"ee3d2c2d3b4ab82c39bceffd8fda755c172e18b6",class:"padding-bottom-1"},e("calcite-segmented-control",{key:"960d56c2a480e00410dc1f075e99f747c71a1cdb",class:"w-100",width:"full"},e("calcite-segmented-control-item",{key:"048cfef7ac5f23a6ad2c663cb3704f673a0a0fbd",checked:this._addEnabled,class:"w-50 word-wrap-anywhere",onClick:()=>this._setSelectionMode(u.ADD),value:u.ADD},e("span",{key:"4777b29c110bf5055622d5de8a60d0633bb1498f",class:"font-weight-500"},this._translations.add)),e("calcite-segmented-control-item",{key:"ae9147508332307320f34d8997ca10f42a8df704",checked:!this._addEnabled,class:"w-50 word-wrap-anywhere",onClick:()=>this._setSelectionMode(u.REMOVE),value:u.REMOVE},e("span",{key:"e9c94444fbb17b86d04fcc8a51c83c9ef1c09cf5",class:"font-weight-500"},this._translations.remove)))),e("div",{key:"6c1e7c69a983f69930f8a084746233603db56727"},e("map-draw-tools",{key:"dcb2d5ddb6a62b4d45d9416b1c8f49ba3ce0ed08",active:!0,drawMode:v.REFINE,mapView:this.mapView,onDrawRedo:()=>this._redo(),onDrawUndo:()=>this._undo(),onSketchGraphicsChange:i=>this._sketchGraphicsChanged(i),pointSymbol:this.sketchPointSymbol,polygonSymbol:this.sketchPolygonSymbol,polylineSymbol:this.sketchLineSymbol,redoEnabled:(null===(i=this._refineSelectionSet)||void 0===i?void 0:i.redoStack.length)>0,ref:i=>{this._drawTools=i},undoEnabled:(null===(t=this._refineSelectionSet)||void 0===t?void 0:t.undoStack.length)>0})),e("br",{key:"14e8f85ee2f281f757c9f9a66b5ddb818310f8fc"}),e("calcite-list",{key:"0be153af5a6c87289ee49ffe6b46c35a4d943b50",class:"list-border"},this._getRefineSelectionSetList())))}_layerSelectionChange(i){this._setRefineSet(i.detail[0])}_setSelectionMode(i){this._selectionMode=i}_sketchGraphicsChanged(i){var t;const e=null===(t=i.detail)||void 0===t?void 0:t.graphics[0].geometry;this._selectFeatures(e)}_getEnabledLayerIds(){return this.selectionSets.reduce(((i,t)=>{var e;const s=null===(e=null==t?void 0:t.layerView)||void 0===e?void 0:e.layer.id;return s&&i.indexOf(s)<0?i.push(s):t.workflowType===y.REFINE&&Object.keys(t.refineInfos).forEach((t=>{i.indexOf(t)<0&&i.push(t)})),i}),[])}async _setRefineSet(i){this.selectionSets.some((t=>{if(t.workflowType===y.REFINE)return this._refineSelectionSet=t,Object.keys(t.refineInfos).indexOf(i)>-1}))||await this._initRefineSet(i,this._refineSelectionSet),this._refineLayer=this._refineSelectionSet.refineInfos[i].layerView}async _initRefineSet(i,t){const e={};e[i]={addIds:[],removeIds:[],layerView:await p(this.mapView,i)},t?t.refineInfos=Object.assign(Object.assign({},t.refineInfos),e):(this._refineSelectionSet={id:Date.now(),searchResult:void 0,buffer:void 0,distance:0,download:!0,unit:"feet",label:"Refine",selectedIds:[],layerView:void 0,geometries:[],graphics:[],selectLayers:[],workflowType:y.REFINE,searchDistanceEnabled:!1,useLayerFeaturesEnabled:!1,refineInfos:e,redoStack:[],undoStack:[],sketchGraphic:void 0},this.selectionSets.push(this._refineSelectionSet))}_undo(){const i=this._refineSelectionSet.undoStack.pop();this._updateIds(i.ids,i.mode===u.ADD?u.REMOVE:u.ADD,this._refineSelectionSet.redoStack,i.layerView)}_redo(){const i=this._refineSelectionSet.redoStack.pop();this._updateIds(i.ids,i.mode===u.ADD?u.REMOVE:u.ADD,this._refineSelectionSet.undoStack,i.layerView)}_getRefineSelectionSetList(){const i=this._getTotal(this.selectionSets);let t;this.selectionSets.some((i=>{if(i.workflowType===y.REFINE)return t=i,!0}));let s=0,a=0;return Object.keys(t.refineInfos).forEach((i=>{s+=t.refineInfos[i].addIds.length,a+=t.refineInfos[i].removeIds.length})),[e("calcite-list-item",{label:this._translations.featuresAdded.replace("{{n}}",s.toString()),"non-interactive":!0}),e("calcite-list-item",{label:this._translations.featuresRemoved.replace("{{n}}",a.toString()),"non-interactive":!0}),e("calcite-list-item",{label:this._translations.totalSelected.replace("{{n}}",i.toString()),"non-interactive":!0})]}_getTotal(i){const t=g(i);return Object.keys(t).reduce(((i,e)=>i+t[e].ids.length),0)}async _getTranslations(){const i=await n(this.el);this._translations=i[0]}async _selectFeatures(i){var t,e;this.selectionLoadingChange.emit(!0),this._featuresCollection[null===(t=this._refineLayer)||void 0===t?void 0:t.layer.id]=[];const s=await b(0,null===(e=this._refineLayer)||void 0===e?void 0:e.layer,i,this._featuresCollection);this.selectionLoadingChange.emit(!1);let a=[];Object.keys(s).forEach((i=>{var t;i===(null===(t=this._refineLayer)||void 0===t?void 0:t.layer.id)&&(a=a.concat(s[i]))}));const l=Array.isArray(a)?a.map((i=>{var t;return i.attributes[null===(t=null==i?void 0:i.layer)||void 0===t?void 0:t.objectIdField]})):[];await this._updateIds(l,this._selectionMode,this._refineSelectionSet.undoStack,this._refineLayer),this._drawTools.clear()}async _highlightFeatures(){this._clearHighlight(),m.highlightHandles=await f(this.selectionSets)}_clearHighlight(){m.removeHandles()}async _updateIds(i,t,e,s){let a=!1;const l=this._refineSelectionSet.refineInfos,h=s.layer.id,n={};n[h]={addIds:[],removeIds:[],layerView:s};const o=Object.keys(l).indexOf(h)>-1?l[h]:n[h];if(t===u.ADD)o.addIds=[...new Set([...i,...o.addIds])],o.addIds.length>0&&e.push({ids:i,mode:t,layerView:s}),o.removeIds.length>0&&(o.removeIds=o.removeIds.filter((t=>i.indexOf(t)<0)));else{const l=this.selectionSets.reduce(((t,e)=>(i.forEach((i=>{e.workflowType!==y.REFINE?e.selectedIds.indexOf(i)>-1&&t.push(i):Object.keys(e.refineInfos).some((a=>{const l=e.refineInfos[a];if(l.layerView.layer.id===s.layer.id&&l.addIds.indexOf(i)>-1)return t.push(i),!0}))})),t)),[]);o.removeIds=[...new Set([...l,...o.removeIds])],o.addIds=o.addIds.filter((i=>l.indexOf(i)<0)),o.removeIds.length>0&&e.push({ids:l,mode:t,layerView:s}),this.selectionSets=this.selectionSets.reduce(((i,t)=>(t.workflowType!==y.REFINE&&t.layerView.layer.id===s.layer.id?(t.selectedIds=t.selectedIds.filter((i=>o.removeIds.indexOf(i)<0)),t.selectedIds.length>0?i.push(t):a=!0):i.push(t),i)),[])}this._refineSelectionSet.refineInfos[h]=o,this.selectionSets=[...this.selectionSets],a&&this.selectionSetsChanged.emit(this.selectionSets),await this._highlightFeatures()}get el(){return a(this)}};P.style=':host{display:block}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir="rtl"] .main-label{display:flex;float:right}.border{outline:1px solid var(--calcite-color-border-input)}.margin-top-1{margin-top:1rem}.esri-sketch{display:flex;flex-flow:column wrap}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:"Avenir Next","Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.3em;background-color:var(--calcite-color-foreground-1)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row nowrap;padding:0}*/ .esri-sketch__tool-section{border-right:1px solid rgba(110,110,110,.3)}.esri-sketch__section{align-items:center;display:flex;flex-flow:row nowrap;padding:0 7px;margin:6px 0;border-right:1px solid rgba(110,110,110,.3)}.display-flex{display:flex}.font-bold{font-weight:bold}.width-full{width:100%}.label-margin-0{--calcite-label-margin-bottom:0}.padding-start-1-2{padding-inline-start:0.5rem}.font-weight-500{font-weight:500}.word-wrap-anywhere{word-wrap:anywhere}';export{_ as map_select_tools,L as pdf_download,P as refine_selection}