@esri/solutions-components 0.8.27 → 0.8.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/cjs/basemap-gallery_7.cjs.entry.js +10 -1
  2. package/dist/cjs/calcite-alert_4.cjs.entry.js +3 -3
  3. package/dist/cjs/calcite-dropdown-group_2.cjs.entry.js +1 -1
  4. package/dist/cjs/calcite-flow_6.cjs.entry.js +1 -1
  5. package/dist/cjs/card-manager_3.cjs.entry.js +25 -22
  6. package/dist/cjs/crowdsource-manager.cjs.entry.js +1 -1
  7. package/dist/cjs/crowdsource-reporter.cjs.entry.js +1 -1
  8. package/dist/cjs/{downloadUtils-5349717a.js → downloadUtils-83bf79ba.js} +2 -2
  9. package/dist/cjs/feature-list.cjs.entry.js +3 -3
  10. package/dist/cjs/{index.es-aa69b58b.js → index.es-4e523f8b.js} +2 -2
  11. package/dist/cjs/map-select-tools_3.cjs.entry.js +5 -5
  12. package/dist/cjs/{mapViewUtils-6e46ba33.js → mapViewUtils-911698e5.js} +31 -17
  13. package/dist/cjs/{popupUtils-3e65296c.js → popupUtils-e3fa775b.js} +1 -1
  14. package/dist/cjs/public-notification.cjs.entry.js +2 -2
  15. package/dist/collection/components/floor-filter/floor-filter.js +10 -1
  16. package/dist/collection/components/layer-table/layer-table.js +24 -21
  17. package/dist/collection/components/map-select-tools/map-select-tools.js +2 -2
  18. package/dist/collection/components/refine-selection/refine-selection.js +1 -1
  19. package/dist/collection/utils/queryUtils.js +30 -0
  20. package/dist/collection/utils/queryUtils.ts +41 -0
  21. package/dist/components/floor-filter2.js +10 -1
  22. package/dist/components/layer-table2.js +24 -21
  23. package/dist/components/map-select-tools2.js +2 -2
  24. package/dist/components/queryUtils.js +31 -17
  25. package/dist/components/refine-selection2.js +1 -1
  26. package/dist/esm/basemap-gallery_7.entry.js +10 -1
  27. package/dist/esm/calcite-alert_4.entry.js +3 -3
  28. package/dist/esm/calcite-dropdown-group_2.entry.js +1 -1
  29. package/dist/esm/calcite-flow_6.entry.js +1 -1
  30. package/dist/esm/card-manager_3.entry.js +25 -22
  31. package/dist/esm/crowdsource-manager.entry.js +1 -1
  32. package/dist/esm/crowdsource-reporter.entry.js +1 -1
  33. package/dist/esm/{downloadUtils-5fa0d437.js → downloadUtils-571a502d.js} +2 -2
  34. package/dist/esm/feature-list.entry.js +3 -3
  35. package/dist/esm/{index.es-57c15c9b.js → index.es-2f9f04c5.js} +2 -2
  36. package/dist/esm/map-select-tools_3.entry.js +5 -5
  37. package/dist/esm/{mapViewUtils-4618ddb8.js → mapViewUtils-b8deb4ae.js} +31 -17
  38. package/dist/esm/{popupUtils-650b6bba.js → popupUtils-17193415.js} +1 -1
  39. package/dist/esm/public-notification.entry.js +2 -2
  40. package/dist/solutions-components/{p-81747268.entry.js → p-061da95a.entry.js} +1 -1
  41. package/dist/solutions-components/{p-e1662e32.entry.js → p-16fb8296.entry.js} +1 -1
  42. package/dist/solutions-components/p-1bdf0ba0.entry.js +6 -0
  43. package/dist/solutions-components/{p-a1037b19.js → p-2e23ac2c.js} +1 -1
  44. package/dist/solutions-components/{p-66722851.entry.js → p-2f7bfd8d.entry.js} +1 -1
  45. package/dist/solutions-components/p-327577d1.entry.js +6 -0
  46. package/dist/solutions-components/{p-bfdabb9d.entry.js → p-51d5532f.entry.js} +1 -1
  47. package/dist/solutions-components/{p-6f69de4d.js → p-52dba022.js} +2 -2
  48. package/dist/solutions-components/{p-24bf45b7.js → p-57eeed77.js} +1 -1
  49. package/dist/solutions-components/p-5aaa05ef.js +36 -0
  50. package/dist/solutions-components/{p-05b3a5d9.entry.js → p-61bf98bc.entry.js} +1 -1
  51. package/dist/solutions-components/{p-296375d3.entry.js → p-bb90a138.entry.js} +1 -1
  52. package/dist/solutions-components/p-bda54b12.entry.js +6 -0
  53. package/dist/solutions-components/{p-cd694107.entry.js → p-c21a6940.entry.js} +1 -1
  54. package/dist/solutions-components/solutions-components.esm.js +1 -1
  55. package/dist/solutions-components/utils/queryUtils.ts +41 -0
  56. package/dist/types/utils/queryUtils.d.ts +16 -0
  57. package/package.json +1 -1
  58. package/dist/solutions-components/p-1f4b174f.entry.js +0 -6
  59. package/dist/solutions-components/p-2a6db6e8.entry.js +0 -6
  60. package/dist/solutions-components/p-583e5dd0.js +0 -36
  61. package/dist/solutions-components/p-b656b73e.entry.js +0 -6
@@ -22,7 +22,7 @@ import { Host, h } from "@stencil/core";
22
22
  import { loadModules } from "../../utils/loadModules";
23
23
  import { getLocaleComponentStrings } from "../../utils/locale";
24
24
  import { getFeatureLayerView, getLayerOrTable, goToSelection } from "../../utils/mapViewUtils";
25
- import { queryAllIds, queryFeatureIds, queryFeaturesByGlobalID } from "../../utils/queryUtils";
25
+ import { queryAllIds, queryAllOidsWithQueryFeatures, queryFeaturesByGlobalID } from "../../utils/queryUtils";
26
26
  import * as downloadUtils from "../../utils/downloadUtils";
27
27
  import "@esri/instant-apps-components/dist/components/instant-apps-social-share";
28
28
  export class LayerTable {
@@ -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
  /**
@@ -215,6 +216,10 @@ export class LayerTable {
215
216
  if (this._selectAllActive && this.selectedIds.length !== this._allIds.length) {
216
217
  this._selectAllActive = false;
217
218
  }
219
+ if (this.selectedIds.length > 0) {
220
+ this._table.rowHighlightIds.removeAll();
221
+ this._table.rowHighlightIds.add(this.selectedIds[0]);
222
+ }
218
223
  }
219
224
  /**
220
225
  * Scroll and zoom to the selected feature from the Features widget.
@@ -314,7 +319,7 @@ export class LayerTable {
314
319
  const selected = this.selectedIds.length.toString();
315
320
  const tableHeightClass = this.isMobile ? "height-full" : "height-full-adjusted";
316
321
  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
322
+ return (h(Host, { key: '928286a8e4d1159b56b2aa4384f0d6eed38c9e76' }, h("calcite-shell", { key: '7c9b98056ee867df54ebfd31fee6f046f5152f64' }, this._getTableControlRow("header"), h("div", { key: 'b1a9a9cca100c7bef335afd5b6c7d7384ca7536c', class: `width-full ${tableHeightClass}` }, h("calcite-panel", { key: 'ceeead9900f43c94f46c8c94698ae17f3ae558b7', class: "height-full width-full" }, h("calcite-loader", { key: '7bf3c9ba21daa27dd387ba5413b6f6e982e1f10d', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { key: '7d0440047453a45fe1688ad373ab2463fe7479ba', class: tableNodeClass, ref: this.onTableNodeCreate })), !this.isMobile ? (h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
318
323
  .replace("{{total}}", total)
319
324
  .replace("{{selected}}", selected))) : undefined)), this._filterModal()));
320
325
  }
@@ -915,43 +920,38 @@ export class LayerTable {
915
920
  else if (this._shiftIsPressed) {
916
921
  this._skipOnChange = true;
917
922
  this._previousCurrentId = this._currentId;
918
- this._currentId = [...this._table.highlightIds.toArray()].reverse()[0];
919
- if (this._previousCurrentId !== this._currentId) {
923
+ this._currentId = [...ids].reverse()[0];
924
+ if (ids.length === 1) {
925
+ this._skipOnChange = false;
926
+ }
927
+ else if (this._previousCurrentId !== this._currentId) {
920
928
  // query the layer based on current sort and filters then grab between the current id and previous id
921
929
  const orderBy = this._table.activeSortOrders.reduce((prev, cur) => {
922
930
  prev.push(`${cur.fieldName} ${cur.direction}`);
923
931
  return prev;
924
932
  }, []);
925
- const oids = await queryFeatureIds(this._layer, this._layer.definitionExpression, orderBy);
933
+ const oids = await queryAllOidsWithQueryFeatures(0, this._layer, [], orderBy);
926
934
  let isBetween = false;
927
935
  const _start = this._table.viewModel.getObjectIdIndex(this._previousCurrentId);
928
936
  const _end = this._table.viewModel.getObjectIdIndex(this._currentId);
929
937
  const startIndex = _start < _end ? _start : _end;
930
938
  const endIndex = _end > _start ? _end : _start;
931
939
  this._skipOnChange = startIndex + 1 !== endIndex;
932
- const selectedIds = oids.reduce((prev, cur) => {
940
+ const idsInRange = oids.reduce((prev, cur) => {
933
941
  const id = cur;
934
- const index = this._table.viewModel.getObjectIdIndex(id);
935
942
  if ((id === this._currentId || id === this._previousCurrentId)) {
936
943
  isBetween = !isBetween;
937
944
  if (prev.indexOf(id) < 0) {
938
945
  prev.push(id);
939
946
  }
940
947
  }
941
- // The oids are sorted so after we have reached the start or end oid add all ids even if the index is -1.
942
- // Index of -1 will occur for features between the start and and oid if
943
- // you select a row then scroll faster than the FeatureTable loads the data to select the next id
944
- if (isBetween && prev.indexOf(id) < 0) {
945
- prev.push(id);
946
- }
947
- // Also add index based check.
948
- // In some cases the FeatureTable and Layer query will have differences in how null/undefined field values are sorted
949
- if ((this.selectedIds.indexOf(id) > -1 || (index >= startIndex && index <= endIndex)) && prev.indexOf(id) < 0 && index > -1) {
948
+ else if (isBetween && prev.indexOf(id) < 0) {
950
949
  prev.push(id);
951
950
  }
952
951
  return prev;
953
952
  }, []);
954
- this.selectedIds = _start < _end ? selectedIds.reverse() : selectedIds;
953
+ const selectedIds = _start < _end ? idsInRange.reverse() : idsInRange;
954
+ this.selectedIds = [...new Set([...selectedIds, ...this.selectedIds])];
955
955
  this._table.highlightIds.addMany(this.selectedIds.filter(i => ids.indexOf(i) < 0));
956
956
  }
957
957
  }
@@ -1014,6 +1014,7 @@ export class LayerTable {
1014
1014
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
1015
1015
  await this.reactiveUtils.once(() => this._table.state === "loaded")
1016
1016
  .then(async () => {
1017
+ console.log("this._table.state === 'loaded'");
1017
1018
  this._table.highlightIds.removeAll();
1018
1019
  this._table.clearSelectionFilter();
1019
1020
  this._resetColumnTemplates();
@@ -1117,18 +1118,18 @@ export class LayerTable {
1117
1118
  * Sort the table with the configured field and the sort order
1118
1119
  */
1119
1120
  async _sortTable() {
1120
- var _a, _b, _c, _d, _e;
1121
+ var _a, _b, _c, _d, _e, _f;
1121
1122
  //By default sort the table using objectIdField and in descending order
1122
1123
  let sortField = (_a = this._layer) === null || _a === void 0 ? void 0 : _a.objectIdField;
1123
1124
  let sortOrder = 'desc';
1124
1125
  let configuredLayer;
1125
1126
  //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) {
1127
+ 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
1128
  configuredLayer = this.mapInfo.layerOptions.layers.filter((layer) => layer.id === this._layer.id);
1128
1129
  if (configuredLayer && configuredLayer.length > 0) {
1129
1130
  configuredLayer = configuredLayer[0];
1130
1131
  //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))) {
1132
+ if (configuredLayer.sortField && ((_f = configuredLayer.fields) === null || _f === void 0 ? void 0 : _f.includes(configuredLayer.sortField))) {
1132
1133
  sortField = configuredLayer.sortField;
1133
1134
  }
1134
1135
  //use sort order if configured
@@ -1138,6 +1139,7 @@ export class LayerTable {
1138
1139
  if (this._table && this._layer) {
1139
1140
  await this._table.when();
1140
1141
  await this._layer.when(() => {
1142
+ console.log("sort on this._layer.when");
1141
1143
  this._table.sortColumn(sortField, sortOrder);
1142
1144
  });
1143
1145
  }
@@ -1291,9 +1293,10 @@ export class LayerTable {
1291
1293
  * Clears the selected indexes
1292
1294
  */
1293
1295
  _clearSelection() {
1294
- var _a;
1296
+ var _a, _b;
1295
1297
  this.selectedIds = [];
1296
1298
  (_a = this._table) === null || _a === void 0 ? void 0 : _a.highlightIds.removeAll();
1299
+ (_b = this._table) === null || _b === void 0 ? void 0 : _b.rowHighlightIds.removeAll();
1297
1300
  this._finishOnChange();
1298
1301
  }
1299
1302
  /**
@@ -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
  //
@@ -40,6 +40,36 @@ export async function queryAllFeatures(start, layer, graphics) {
40
40
  queryAllFeatures(start += num, layer, graphics) :
41
41
  Promise.resolve(graphics);
42
42
  }
43
+ /**
44
+ * Query the layer for all OIDs valid for any definition expressions applied to the layer.
45
+ *
46
+ * This query allows OIDs to be returned in the same order as shown in the FeatureTable.
47
+ * FeatureLayer.queryObjectIds can return OIDs in a different order.
48
+ *
49
+ * @param start zero-based index indicating where to begin retrieving features
50
+ * @param layer the layer to retrieve features from
51
+ * @param graphics stores the features
52
+ * @param orderBy One or more field names used to order the query results.
53
+ * Specify ASC (ascending) or DESC (descending) after the field name to control the order.
54
+ * The default order is ASC.
55
+ *
56
+ * @returns Promise with the OIDs sorted based on any orderBy definitions
57
+ */
58
+ export async function queryAllOidsWithQueryFeatures(start, layer, graphics, orderBy) {
59
+ const num = layer.capabilities.query.maxRecordCount;
60
+ const query = layer.createQuery();
61
+ query.start = start;
62
+ query.num = num;
63
+ query.returnGeometry = false;
64
+ query.orderByFields = orderBy;
65
+ query.outFields = [layer.objectIdField];
66
+ query.where = layer.definitionExpression || "1=1";
67
+ const result = await layer.queryFeatures(query);
68
+ graphics = graphics.concat(result.features);
69
+ return result.exceededTransferLimit ?
70
+ queryAllOidsWithQueryFeatures(start += num, layer, graphics, orderBy) :
71
+ Promise.resolve(graphics.map(g => g.attributes[layer.objectIdField]));
72
+ }
43
73
  /**
44
74
  * Query the layer for all IDs
45
75
  *
@@ -48,6 +48,47 @@ export async function queryAllFeatures(
48
48
  Promise.resolve(graphics);
49
49
  }
50
50
 
51
+ /**
52
+ * Query the layer for all OIDs valid for any definition expressions applied to the layer.
53
+ *
54
+ * This query allows OIDs to be returned in the same order as shown in the FeatureTable.
55
+ * FeatureLayer.queryObjectIds can return OIDs in a different order.
56
+ *
57
+ * @param start zero-based index indicating where to begin retrieving features
58
+ * @param layer the layer to retrieve features from
59
+ * @param graphics stores the features
60
+ * @param orderBy One or more field names used to order the query results.
61
+ * Specify ASC (ascending) or DESC (descending) after the field name to control the order.
62
+ * The default order is ASC.
63
+ *
64
+ * @returns Promise with the OIDs sorted based on any orderBy definitions
65
+ */
66
+ export async function queryAllOidsWithQueryFeatures(
67
+ start: number,
68
+ layer: __esri.FeatureLayer,
69
+ graphics: __esri.Graphic[],
70
+ orderBy?: string[]
71
+ ): Promise<number[]> {
72
+ const num = layer.capabilities.query.maxRecordCount;
73
+ const query = layer.createQuery();
74
+ query.start = start;
75
+ query.num = num;
76
+ query.returnGeometry = false;
77
+ query.orderByFields = orderBy;
78
+ query.outFields = [layer.objectIdField];
79
+ query.where = layer.definitionExpression || "1=1";
80
+
81
+ const result = await layer.queryFeatures(query);
82
+
83
+ graphics = graphics.concat(
84
+ result.features
85
+ );
86
+
87
+ return result.exceededTransferLimit ?
88
+ queryAllOidsWithQueryFeatures(start += num, layer, graphics, orderBy) :
89
+ Promise.resolve(graphics.map(g => g.attributes[layer.objectIdField]));
90
+ }
91
+
51
92
  /**
52
93
  * Query the layer for all IDs
53
94
  *
@@ -27,15 +27,19 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
27
27
  //
28
28
  //--------------------------------------------------------------------------
29
29
  async mapViewWatchHandler() {
30
+ console.log("mapViewWatchHandler FF");
30
31
  const webMap = this.mapView.map;
31
32
  await webMap.when(() => {
33
+ console.log("webMap.when FF");
32
34
  if (this.floorFilterWidget) {
33
35
  this.floorFilterWidget.destroy();
34
36
  this.floorFilterWidget = undefined;
37
+ console.log("floorFilterWidget destroyed");
35
38
  }
36
39
  if (this._floorFilterElement) {
37
40
  this._floorFilterElement.remove();
38
41
  this._floorFilterElement = document.createElement("div");
42
+ console.log("this._floorFilterElement created");
39
43
  }
40
44
  this._initFloorFilter(this.mapView, webMap);
41
45
  });
@@ -52,7 +56,7 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
52
56
  return this._initModules();
53
57
  }
54
58
  render() {
55
- return (h(Host, { key: '98769446b20d8a9432b571b5653abbc6613bdfe5' }, h("div", { key: '6606a2593fec1885fc02b07a168bdea43e7f864a', ref: (el) => { this._floorFilterElement = el; } })));
59
+ return (h(Host, { key: 'df3c419f3eaf30590c44c4919f0eeddfc333b81d' }, h("div", { key: '8496099f3bc35f34db6e47f73870ead9144df0a4', ref: (el) => { this._floorFilterElement = el; } })));
56
60
  }
57
61
  //--------------------------------------------------------------------------
58
62
  //
@@ -79,6 +83,11 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
79
83
  */
80
84
  _initFloorFilter(view, webMap) {
81
85
  var _a, _b, _c;
86
+ console.log("_initFloorFilter");
87
+ console.log(`view: ${view}`);
88
+ console.log(`this.enabled: ${this.enabled}`);
89
+ console.log(`this.FloorFilter: ${this.FloorFilter}`);
90
+ console.log(`webMap?.floorInfo: ${webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo}`);
82
91
  if (view && this.enabled && this.FloorFilter && (webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo)) {
83
92
  this.floorFilterWidget = new this.FloorFilter({
84
93
  container: this._floorFilterElement,
@@ -7,7 +7,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
7
7
  import { l as loadModules } from './loadModules.js';
8
8
  import { g as getLocaleComponentStrings } from './locale.js';
9
9
  import { b as goToSelection, c as getFeatureLayerView, g as getLayerOrTable } from './mapViewUtils.js';
10
- import { b as queryAllIds, c as queryFeatureIds, d as queryFeaturesByGlobalID } from './queryUtils.js';
10
+ import { b as queryAllIds, c as queryAllOidsWithQueryFeatures, d as queryFeaturesByGlobalID } from './queryUtils.js';
11
11
  import { d as downloadCSV } from './downloadUtils.js';
12
12
  import { d as defineCustomElement$D } from './action.js';
13
13
  import { d as defineCustomElement$C } from './action-bar.js';
@@ -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
  /**
@@ -245,6 +246,10 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
245
246
  if (this._selectAllActive && this.selectedIds.length !== this._allIds.length) {
246
247
  this._selectAllActive = false;
247
248
  }
249
+ if (this.selectedIds.length > 0) {
250
+ this._table.rowHighlightIds.removeAll();
251
+ this._table.rowHighlightIds.add(this.selectedIds[0]);
252
+ }
248
253
  }
249
254
  /**
250
255
  * Scroll and zoom to the selected feature from the Features widget.
@@ -344,7 +349,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
344
349
  const selected = this.selectedIds.length.toString();
345
350
  const tableHeightClass = this.isMobile ? "height-full" : "height-full-adjusted";
346
351
  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
352
+ return (h(Host, { key: '928286a8e4d1159b56b2aa4384f0d6eed38c9e76' }, h("calcite-shell", { key: '7c9b98056ee867df54ebfd31fee6f046f5152f64' }, this._getTableControlRow("header"), h("div", { key: 'b1a9a9cca100c7bef335afd5b6c7d7384ca7536c', class: `width-full ${tableHeightClass}` }, h("calcite-panel", { key: 'ceeead9900f43c94f46c8c94698ae17f3ae558b7', class: "height-full width-full" }, h("calcite-loader", { key: '7bf3c9ba21daa27dd387ba5413b6f6e982e1f10d', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { key: '7d0440047453a45fe1688ad373ab2463fe7479ba', class: tableNodeClass, ref: this.onTableNodeCreate })), !this.isMobile ? (h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
348
353
  .replace("{{total}}", total)
349
354
  .replace("{{selected}}", selected))) : undefined)), this._filterModal()));
350
355
  }
@@ -945,43 +950,38 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
945
950
  else if (this._shiftIsPressed) {
946
951
  this._skipOnChange = true;
947
952
  this._previousCurrentId = this._currentId;
948
- this._currentId = [...this._table.highlightIds.toArray()].reverse()[0];
949
- if (this._previousCurrentId !== this._currentId) {
953
+ this._currentId = [...ids].reverse()[0];
954
+ if (ids.length === 1) {
955
+ this._skipOnChange = false;
956
+ }
957
+ else if (this._previousCurrentId !== this._currentId) {
950
958
  // query the layer based on current sort and filters then grab between the current id and previous id
951
959
  const orderBy = this._table.activeSortOrders.reduce((prev, cur) => {
952
960
  prev.push(`${cur.fieldName} ${cur.direction}`);
953
961
  return prev;
954
962
  }, []);
955
- const oids = await queryFeatureIds(this._layer, this._layer.definitionExpression, orderBy);
963
+ const oids = await queryAllOidsWithQueryFeatures(0, this._layer, [], orderBy);
956
964
  let isBetween = false;
957
965
  const _start = this._table.viewModel.getObjectIdIndex(this._previousCurrentId);
958
966
  const _end = this._table.viewModel.getObjectIdIndex(this._currentId);
959
967
  const startIndex = _start < _end ? _start : _end;
960
968
  const endIndex = _end > _start ? _end : _start;
961
969
  this._skipOnChange = startIndex + 1 !== endIndex;
962
- const selectedIds = oids.reduce((prev, cur) => {
970
+ const idsInRange = oids.reduce((prev, cur) => {
963
971
  const id = cur;
964
- const index = this._table.viewModel.getObjectIdIndex(id);
965
972
  if ((id === this._currentId || id === this._previousCurrentId)) {
966
973
  isBetween = !isBetween;
967
974
  if (prev.indexOf(id) < 0) {
968
975
  prev.push(id);
969
976
  }
970
977
  }
971
- // The oids are sorted so after we have reached the start or end oid add all ids even if the index is -1.
972
- // Index of -1 will occur for features between the start and and oid if
973
- // you select a row then scroll faster than the FeatureTable loads the data to select the next id
974
- if (isBetween && prev.indexOf(id) < 0) {
975
- prev.push(id);
976
- }
977
- // Also add index based check.
978
- // In some cases the FeatureTable and Layer query will have differences in how null/undefined field values are sorted
979
- if ((this.selectedIds.indexOf(id) > -1 || (index >= startIndex && index <= endIndex)) && prev.indexOf(id) < 0 && index > -1) {
978
+ else if (isBetween && prev.indexOf(id) < 0) {
980
979
  prev.push(id);
981
980
  }
982
981
  return prev;
983
982
  }, []);
984
- this.selectedIds = _start < _end ? selectedIds.reverse() : selectedIds;
983
+ const selectedIds = _start < _end ? idsInRange.reverse() : idsInRange;
984
+ this.selectedIds = [...new Set([...selectedIds, ...this.selectedIds])];
985
985
  this._table.highlightIds.addMany(this.selectedIds.filter(i => ids.indexOf(i) < 0));
986
986
  }
987
987
  }
@@ -1044,6 +1044,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1044
1044
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
1045
1045
  await this.reactiveUtils.once(() => this._table.state === "loaded")
1046
1046
  .then(async () => {
1047
+ console.log("this._table.state === 'loaded'");
1047
1048
  this._table.highlightIds.removeAll();
1048
1049
  this._table.clearSelectionFilter();
1049
1050
  this._resetColumnTemplates();
@@ -1147,18 +1148,18 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1147
1148
  * Sort the table with the configured field and the sort order
1148
1149
  */
1149
1150
  async _sortTable() {
1150
- var _a, _b, _c, _d, _e;
1151
+ var _a, _b, _c, _d, _e, _f;
1151
1152
  //By default sort the table using objectIdField and in descending order
1152
1153
  let sortField = (_a = this._layer) === null || _a === void 0 ? void 0 : _a.objectIdField;
1153
1154
  let sortOrder = 'desc';
1154
1155
  let configuredLayer;
1155
1156
  //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) {
1157
+ 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
1158
  configuredLayer = this.mapInfo.layerOptions.layers.filter((layer) => layer.id === this._layer.id);
1158
1159
  if (configuredLayer && configuredLayer.length > 0) {
1159
1160
  configuredLayer = configuredLayer[0];
1160
1161
  //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))) {
1162
+ if (configuredLayer.sortField && ((_f = configuredLayer.fields) === null || _f === void 0 ? void 0 : _f.includes(configuredLayer.sortField))) {
1162
1163
  sortField = configuredLayer.sortField;
1163
1164
  }
1164
1165
  //use sort order if configured
@@ -1168,6 +1169,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1168
1169
  if (this._table && this._layer) {
1169
1170
  await this._table.when();
1170
1171
  await this._layer.when(() => {
1172
+ console.log("sort on this._layer.when");
1171
1173
  this._table.sortColumn(sortField, sortOrder);
1172
1174
  });
1173
1175
  }
@@ -1321,9 +1323,10 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1321
1323
  * Clears the selected indexes
1322
1324
  */
1323
1325
  _clearSelection() {
1324
- var _a;
1326
+ var _a, _b;
1325
1327
  this.selectedIds = [];
1326
1328
  (_a = this._table) === null || _a === void 0 ? void 0 : _a.highlightIds.removeAll();
1329
+ (_b = this._table) === null || _b === void 0 ? void 0 : _b.rowHighlightIds.removeAll();
1327
1330
  this._finishOnChange();
1328
1331
  }
1329
1332
  /**
@@ -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
@@ -18,6 +18,36 @@
18
18
  * See the License for the specific language governing permissions and
19
19
  * limitations under the License.
20
20
  */
21
+ /**
22
+ * Query the layer for all OIDs valid for any definition expressions applied to the layer.
23
+ *
24
+ * This query allows OIDs to be returned in the same order as shown in the FeatureTable.
25
+ * FeatureLayer.queryObjectIds can return OIDs in a different order.
26
+ *
27
+ * @param start zero-based index indicating where to begin retrieving features
28
+ * @param layer the layer to retrieve features from
29
+ * @param graphics stores the features
30
+ * @param orderBy One or more field names used to order the query results.
31
+ * Specify ASC (ascending) or DESC (descending) after the field name to control the order.
32
+ * The default order is ASC.
33
+ *
34
+ * @returns Promise with the OIDs sorted based on any orderBy definitions
35
+ */
36
+ async function queryAllOidsWithQueryFeatures(start, layer, graphics, orderBy) {
37
+ const num = layer.capabilities.query.maxRecordCount;
38
+ const query = layer.createQuery();
39
+ query.start = start;
40
+ query.num = num;
41
+ query.returnGeometry = false;
42
+ query.orderByFields = orderBy;
43
+ query.outFields = [layer.objectIdField];
44
+ query.where = layer.definitionExpression || "1=1";
45
+ const result = await layer.queryFeatures(query);
46
+ graphics = graphics.concat(result.features);
47
+ return result.exceededTransferLimit ?
48
+ queryAllOidsWithQueryFeatures(start += num, layer, graphics, orderBy) :
49
+ Promise.resolve(graphics.map(g => g.attributes[layer.objectIdField]));
50
+ }
21
51
  /**
22
52
  * Query the layer for all IDs
23
53
  *
@@ -125,22 +155,6 @@ async function queryFeaturesByGeometry(start, layer, geometry, featuresCollectio
125
155
  queryFeaturesByGeometry(start += num, layer, geometry, featuresCollection) :
126
156
  Promise.resolve(featuresCollection);
127
157
  }
128
- /**
129
- * Query the layer for feature ids that match the provided where clause.
130
- * If no where clause is provided all features will be returned.
131
- *
132
- * @param layer the layer to retrieve features from
133
- * @param where the where clause for the query
134
- * @param orderBy any sort order to apply to the query
135
- *
136
- * @returns Promise with the ids from the layer that match the where and are sorted as defined by orderBy
137
- */
138
- async function queryFeatureIds(layer, where, orderBy) {
139
- const query = layer.createQuery();
140
- query.where = where ? where : "1=1";
141
- query.orderByFields = orderBy;
142
- return await layer.queryObjectIds(query);
143
- }
144
158
  /**
145
159
  * Query the layer for the extent of features with the provided OIDs
146
160
  *
@@ -198,4 +212,4 @@ async function _intersectQuery(geometry, layer) {
198
212
  return layer.queryObjectIds(q);
199
213
  }
200
214
 
201
- export { queryExtent as a, queryAllIds as b, queryFeatureIds as c, queryFeaturesByGlobalID as d, queryObjectIds as e, queryFeaturesByGeometry as f, getQueryGeoms as g, queryFeaturesByID as q };
215
+ export { queryExtent as a, queryAllIds as b, queryAllOidsWithQueryFeatures as c, queryFeaturesByGlobalID as d, queryObjectIds as e, queryFeaturesByGeometry as f, getQueryGeoms as g, queryFeaturesByID as q };
@@ -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
  //
@@ -133,15 +133,19 @@ const FloorFilter = class {
133
133
  //
134
134
  //--------------------------------------------------------------------------
135
135
  async mapViewWatchHandler() {
136
+ console.log("mapViewWatchHandler FF");
136
137
  const webMap = this.mapView.map;
137
138
  await webMap.when(() => {
139
+ console.log("webMap.when FF");
138
140
  if (this.floorFilterWidget) {
139
141
  this.floorFilterWidget.destroy();
140
142
  this.floorFilterWidget = undefined;
143
+ console.log("floorFilterWidget destroyed");
141
144
  }
142
145
  if (this._floorFilterElement) {
143
146
  this._floorFilterElement.remove();
144
147
  this._floorFilterElement = document.createElement("div");
148
+ console.log("this._floorFilterElement created");
145
149
  }
146
150
  this._initFloorFilter(this.mapView, webMap);
147
151
  });
@@ -158,7 +162,7 @@ const FloorFilter = class {
158
162
  return this._initModules();
159
163
  }
160
164
  render() {
161
- return (h(Host, { key: '98769446b20d8a9432b571b5653abbc6613bdfe5' }, h("div", { key: '6606a2593fec1885fc02b07a168bdea43e7f864a', ref: (el) => { this._floorFilterElement = el; } })));
165
+ return (h(Host, { key: 'df3c419f3eaf30590c44c4919f0eeddfc333b81d' }, h("div", { key: '8496099f3bc35f34db6e47f73870ead9144df0a4', ref: (el) => { this._floorFilterElement = el; } })));
162
166
  }
163
167
  //--------------------------------------------------------------------------
164
168
  //
@@ -185,6 +189,11 @@ const FloorFilter = class {
185
189
  */
186
190
  _initFloorFilter(view, webMap) {
187
191
  var _a, _b, _c;
192
+ console.log("_initFloorFilter");
193
+ console.log(`view: ${view}`);
194
+ console.log(`this.enabled: ${this.enabled}`);
195
+ console.log(`this.FloorFilter: ${this.FloorFilter}`);
196
+ console.log(`webMap?.floorInfo: ${webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo}`);
188
197
  if (view && this.enabled && this.FloorFilter && (webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo)) {
189
198
  this.floorFilterWidget = new this.FloorFilter({
190
199
  container: this._floorFilterElement,