@esri/solutions-components 0.8.28 → 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 (56) 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 +19 -19
  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 +2 -2
  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 +18 -18
  17. package/dist/collection/utils/queryUtils.js +30 -0
  18. package/dist/collection/utils/queryUtils.ts +41 -0
  19. package/dist/components/floor-filter2.js +10 -1
  20. package/dist/components/layer-table2.js +18 -18
  21. package/dist/components/queryUtils.js +31 -17
  22. package/dist/esm/basemap-gallery_7.entry.js +10 -1
  23. package/dist/esm/calcite-alert_4.entry.js +3 -3
  24. package/dist/esm/calcite-dropdown-group_2.entry.js +1 -1
  25. package/dist/esm/calcite-flow_6.entry.js +1 -1
  26. package/dist/esm/card-manager_3.entry.js +19 -19
  27. package/dist/esm/crowdsource-manager.entry.js +1 -1
  28. package/dist/esm/crowdsource-reporter.entry.js +1 -1
  29. package/dist/esm/{downloadUtils-5fa0d437.js → downloadUtils-571a502d.js} +2 -2
  30. package/dist/esm/feature-list.entry.js +3 -3
  31. package/dist/esm/{index.es-57c15c9b.js → index.es-2f9f04c5.js} +2 -2
  32. package/dist/esm/map-select-tools_3.entry.js +2 -2
  33. package/dist/esm/{mapViewUtils-4618ddb8.js → mapViewUtils-b8deb4ae.js} +31 -17
  34. package/dist/esm/{popupUtils-650b6bba.js → popupUtils-17193415.js} +1 -1
  35. package/dist/esm/public-notification.entry.js +2 -2
  36. package/dist/solutions-components/{p-81747268.entry.js → p-061da95a.entry.js} +1 -1
  37. package/dist/solutions-components/{p-e1662e32.entry.js → p-16fb8296.entry.js} +1 -1
  38. package/dist/solutions-components/p-1bdf0ba0.entry.js +6 -0
  39. package/dist/solutions-components/{p-a1037b19.js → p-2e23ac2c.js} +1 -1
  40. package/dist/solutions-components/{p-66722851.entry.js → p-2f7bfd8d.entry.js} +1 -1
  41. package/dist/solutions-components/p-327577d1.entry.js +6 -0
  42. package/dist/solutions-components/{p-bfdabb9d.entry.js → p-51d5532f.entry.js} +1 -1
  43. package/dist/solutions-components/{p-6f69de4d.js → p-52dba022.js} +2 -2
  44. package/dist/solutions-components/{p-24bf45b7.js → p-57eeed77.js} +1 -1
  45. package/dist/solutions-components/p-5aaa05ef.js +36 -0
  46. package/dist/solutions-components/{p-05b3a5d9.entry.js → p-61bf98bc.entry.js} +1 -1
  47. package/dist/solutions-components/{p-296375d3.entry.js → p-bb90a138.entry.js} +1 -1
  48. package/dist/solutions-components/{p-6bd6624f.entry.js → p-bda54b12.entry.js} +1 -1
  49. package/dist/solutions-components/{p-cd694107.entry.js → p-c21a6940.entry.js} +1 -1
  50. package/dist/solutions-components/solutions-components.esm.js +1 -1
  51. package/dist/solutions-components/utils/queryUtils.ts +41 -0
  52. package/dist/types/utils/queryUtils.d.ts +16 -0
  53. package/package.json +1 -1
  54. package/dist/solutions-components/p-2a6db6e8.entry.js +0 -6
  55. package/dist/solutions-components/p-583e5dd0.js +0 -36
  56. package/dist/solutions-components/p-c3821586.entry.js +0 -6
@@ -137,15 +137,19 @@ const FloorFilter = class {
137
137
  //
138
138
  //--------------------------------------------------------------------------
139
139
  async mapViewWatchHandler() {
140
+ console.log("mapViewWatchHandler FF");
140
141
  const webMap = this.mapView.map;
141
142
  await webMap.when(() => {
143
+ console.log("webMap.when FF");
142
144
  if (this.floorFilterWidget) {
143
145
  this.floorFilterWidget.destroy();
144
146
  this.floorFilterWidget = undefined;
147
+ console.log("floorFilterWidget destroyed");
145
148
  }
146
149
  if (this._floorFilterElement) {
147
150
  this._floorFilterElement.remove();
148
151
  this._floorFilterElement = document.createElement("div");
152
+ console.log("this._floorFilterElement created");
149
153
  }
150
154
  this._initFloorFilter(this.mapView, webMap);
151
155
  });
@@ -162,7 +166,7 @@ const FloorFilter = class {
162
166
  return this._initModules();
163
167
  }
164
168
  render() {
165
- return (index.h(index.Host, { key: '98769446b20d8a9432b571b5653abbc6613bdfe5' }, index.h("div", { key: '6606a2593fec1885fc02b07a168bdea43e7f864a', ref: (el) => { this._floorFilterElement = el; } })));
169
+ return (index.h(index.Host, { key: 'df3c419f3eaf30590c44c4919f0eeddfc333b81d' }, index.h("div", { key: '8496099f3bc35f34db6e47f73870ead9144df0a4', ref: (el) => { this._floorFilterElement = el; } })));
166
170
  }
167
171
  //--------------------------------------------------------------------------
168
172
  //
@@ -189,6 +193,11 @@ const FloorFilter = class {
189
193
  */
190
194
  _initFloorFilter(view, webMap) {
191
195
  var _a, _b, _c;
196
+ console.log("_initFloorFilter");
197
+ console.log(`view: ${view}`);
198
+ console.log(`this.enabled: ${this.enabled}`);
199
+ console.log(`this.FloorFilter: ${this.FloorFilter}`);
200
+ console.log(`webMap?.floorInfo: ${webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo}`);
192
201
  if (view && this.enabled && this.FloorFilter && (webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo)) {
193
202
  this.floorFilterWidget = new this.FloorFilter({
194
203
  container: this._floorFilterElement,
@@ -16,15 +16,15 @@ const openCloseComponent = require('./openCloseComponent-6a283ac3.js');
16
16
  const t9n = require('./t9n-9d199056.js');
17
17
  const resources = require('./resources-6146eb17.js');
18
18
  const locale$1 = require('./locale-48d76c59.js');
19
- const mapViewUtils = require('./mapViewUtils-6e46ba33.js');
20
- const popupUtils = require('./popupUtils-3e65296c.js');
19
+ const mapViewUtils = require('./mapViewUtils-911698e5.js');
20
+ const popupUtils = require('./popupUtils-e3fa775b.js');
21
21
  require('./guid-a7528dfa.js');
22
22
  require('./resources-1c0e54c1.js');
23
23
  require('./key-7ed07912.js');
24
24
  require('./observers-4fa351d9.js');
25
25
  require('./esri-loader-fce6a9cb.js');
26
26
  require('./interfaces-7cd0a48a.js');
27
- require('./downloadUtils-5349717a.js');
27
+ require('./downloadUtils-83bf79ba.js');
28
28
  require('./solution-resource-a577e84f.js');
29
29
  require('./index-f64944ad.js');
30
30
  require('./restHelpersGet-dbaa28df.js');
@@ -11,7 +11,7 @@ const index = require('./index-79b35510.js');
11
11
  const observers = require('./observers-4fa351d9.js');
12
12
  const resources = require('./resources-fa37e40f.js');
13
13
  const locale = require('./locale-48d76c59.js');
14
- const mapViewUtils = require('./mapViewUtils-6e46ba33.js');
14
+ const mapViewUtils = require('./mapViewUtils-911698e5.js');
15
15
  const publicNotificationStore = require('./publicNotificationStore-3bfbbed3.js');
16
16
  require('./esri-loader-fce6a9cb.js');
17
17
  require('./interfaces-7cd0a48a.js');
@@ -16,7 +16,7 @@ const locale = require('./locale-5efdf085.js');
16
16
  const t9n = require('./t9n-9d199056.js');
17
17
  const resources = require('./resources-cb14bafc.js');
18
18
  const locale$1 = require('./locale-48d76c59.js');
19
- const mapViewUtils = require('./mapViewUtils-6e46ba33.js');
19
+ const mapViewUtils = require('./mapViewUtils-911698e5.js');
20
20
  require('./guid-a7528dfa.js');
21
21
  require('./resources-1c0e54c1.js');
22
22
  require('./browser-a96d0614.js');
@@ -9,8 +9,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-79b35510.js');
11
11
  const locale = require('./locale-48d76c59.js');
12
- const mapViewUtils = require('./mapViewUtils-6e46ba33.js');
13
- const downloadUtils = require('./downloadUtils-5349717a.js');
12
+ const mapViewUtils = require('./mapViewUtils-911698e5.js');
13
+ const downloadUtils = require('./downloadUtils-83bf79ba.js');
14
14
  require('./esri-loader-fce6a9cb.js');
15
15
  require('./interfaces-7cd0a48a.js');
16
16
  require('./solution-resource-a577e84f.js');
@@ -302,6 +302,10 @@ const LayerTable = class {
302
302
  if (this._selectAllActive && this.selectedIds.length !== this._allIds.length) {
303
303
  this._selectAllActive = false;
304
304
  }
305
+ if (this.selectedIds.length > 0) {
306
+ this._table.rowHighlightIds.removeAll();
307
+ this._table.rowHighlightIds.add(this.selectedIds[0]);
308
+ }
305
309
  }
306
310
  /**
307
311
  * Scroll and zoom to the selected feature from the Features widget.
@@ -401,7 +405,7 @@ const LayerTable = class {
401
405
  const selected = this.selectedIds.length.toString();
402
406
  const tableHeightClass = this.isMobile ? "height-full" : "height-full-adjusted";
403
407
  this._validateActiveActions();
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
408
+ return (index.h(index.Host, { key: '928286a8e4d1159b56b2aa4384f0d6eed38c9e76' }, index.h("calcite-shell", { key: '7c9b98056ee867df54ebfd31fee6f046f5152f64' }, this._getTableControlRow("header"), index.h("div", { key: 'b1a9a9cca100c7bef335afd5b6c7d7384ca7536c', class: `width-full ${tableHeightClass}` }, index.h("calcite-panel", { key: 'ceeead9900f43c94f46c8c94698ae17f3ae558b7', class: "height-full width-full" }, index.h("calcite-loader", { key: '7bf3c9ba21daa27dd387ba5413b6f6e982e1f10d', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), index.h("div", { key: '7d0440047453a45fe1688ad373ab2463fe7479ba', class: tableNodeClass, ref: this.onTableNodeCreate })), !this.isMobile ? (index.h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
405
409
  .replace("{{total}}", total)
406
410
  .replace("{{selected}}", selected))) : undefined)), this._filterModal()));
407
411
  }
@@ -1002,43 +1006,38 @@ const LayerTable = class {
1002
1006
  else if (this._shiftIsPressed) {
1003
1007
  this._skipOnChange = true;
1004
1008
  this._previousCurrentId = this._currentId;
1005
- this._currentId = [...this._table.highlightIds.toArray()].reverse()[0];
1006
- if (this._previousCurrentId !== this._currentId) {
1009
+ this._currentId = [...ids].reverse()[0];
1010
+ if (ids.length === 1) {
1011
+ this._skipOnChange = false;
1012
+ }
1013
+ else if (this._previousCurrentId !== this._currentId) {
1007
1014
  // query the layer based on current sort and filters then grab between the current id and previous id
1008
1015
  const orderBy = this._table.activeSortOrders.reduce((prev, cur) => {
1009
1016
  prev.push(`${cur.fieldName} ${cur.direction}`);
1010
1017
  return prev;
1011
1018
  }, []);
1012
- const oids = await mapViewUtils.queryFeatureIds(this._layer, this._layer.definitionExpression, orderBy);
1019
+ const oids = await mapViewUtils.queryAllOidsWithQueryFeatures(0, this._layer, [], orderBy);
1013
1020
  let isBetween = false;
1014
1021
  const _start = this._table.viewModel.getObjectIdIndex(this._previousCurrentId);
1015
1022
  const _end = this._table.viewModel.getObjectIdIndex(this._currentId);
1016
1023
  const startIndex = _start < _end ? _start : _end;
1017
1024
  const endIndex = _end > _start ? _end : _start;
1018
1025
  this._skipOnChange = startIndex + 1 !== endIndex;
1019
- const selectedIds = oids.reduce((prev, cur) => {
1026
+ const idsInRange = oids.reduce((prev, cur) => {
1020
1027
  const id = cur;
1021
- const index = this._table.viewModel.getObjectIdIndex(id);
1022
1028
  if ((id === this._currentId || id === this._previousCurrentId)) {
1023
1029
  isBetween = !isBetween;
1024
1030
  if (prev.indexOf(id) < 0) {
1025
1031
  prev.push(id);
1026
1032
  }
1027
1033
  }
1028
- // The oids are sorted so after we have reached the start or end oid add all ids even if the index is -1.
1029
- // Index of -1 will occur for features between the start and and oid if
1030
- // you select a row then scroll faster than the FeatureTable loads the data to select the next id
1031
- if (isBetween && prev.indexOf(id) < 0) {
1032
- prev.push(id);
1033
- }
1034
- // Also add index based check.
1035
- // In some cases the FeatureTable and Layer query will have differences in how null/undefined field values are sorted
1036
- if ((this.selectedIds.indexOf(id) > -1 || (index >= startIndex && index <= endIndex)) && prev.indexOf(id) < 0 && index > -1) {
1034
+ else if (isBetween && prev.indexOf(id) < 0) {
1037
1035
  prev.push(id);
1038
1036
  }
1039
1037
  return prev;
1040
1038
  }, []);
1041
- this.selectedIds = _start < _end ? selectedIds.reverse() : selectedIds;
1039
+ const selectedIds = _start < _end ? idsInRange.reverse() : idsInRange;
1040
+ this.selectedIds = [...new Set([...selectedIds, ...this.selectedIds])];
1042
1041
  this._table.highlightIds.addMany(this.selectedIds.filter(i => ids.indexOf(i) < 0));
1043
1042
  }
1044
1043
  }
@@ -1380,9 +1379,10 @@ const LayerTable = class {
1380
1379
  * Clears the selected indexes
1381
1380
  */
1382
1381
  _clearSelection() {
1383
- var _a;
1382
+ var _a, _b;
1384
1383
  this.selectedIds = [];
1385
1384
  (_a = this._table) === null || _a === void 0 ? void 0 : _a.highlightIds.removeAll();
1385
+ (_b = this._table) === null || _b === void 0 ? void 0 : _b.rowHighlightIds.removeAll();
1386
1386
  this._finishOnChange();
1387
1387
  }
1388
1388
  /**
@@ -10,7 +10,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
10
10
  const index = require('./index-79b35510.js');
11
11
  const locale = require('./locale-48d76c59.js');
12
12
  const interfaces = require('./interfaces-7cd0a48a.js');
13
- const mapViewUtils = require('./mapViewUtils-6e46ba33.js');
13
+ const mapViewUtils = require('./mapViewUtils-911698e5.js');
14
14
  require('./esri-loader-fce6a9cb.js');
15
15
 
16
16
  const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom:0px;--solutions-theme-foreground-color:var(--calcite-color-foreground-1)}.padding-1-2{padding:0.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-color-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.border-sides{border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.position-relative{position:relative}.height-50{height:50%}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-50{height:calc(100% - 50px)}.display-none{display:none}.height-53{height:53px}.position-absolute-53{position:absolute;top:53px}.display-grid{display:grid}.height-50-px{height:50px}.padding-inline-start-75{padding-inline-start:0.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button{width:40px !important;height:40px !important}.esri-floor-filter__level-button{width:40px !important;height:40px !important}.esri-floor-filter__browse-button{width:40px !important;height:40px !important}.position-absolute-50{position:absolute;top:50px;bottom:0px;left:0px;right:0px}.position-absolute-0{position:absolute;top:0px;bottom:0px;left:0px;right:0px}.visibility-hidden{visibility:hidden;height:0px}.position-fixed{position:fixed}.border-width-0{border-width:0px}.border-bottom-width-0{border-bottom-width:0px}.floating-container{position:fixed;width:100px;height:10px;bottom:0;right:0;margin:100px 0px}.floating-container .floating-button{box-shadow:0 10px 25px rgb(92 93 94 / 60%);transform:translatey(5px);transition:all 0.3s}";
@@ -9,7 +9,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-79b35510.js');
11
11
  const locale = require('./locale-48d76c59.js');
12
- const mapViewUtils = require('./mapViewUtils-6e46ba33.js');
12
+ const mapViewUtils = require('./mapViewUtils-911698e5.js');
13
13
  require('./esri-loader-fce6a9cb.js');
14
14
  require('./interfaces-7cd0a48a.js');
15
15
 
@@ -8,7 +8,7 @@
8
8
  const esriLoader = require('./esri-loader-fce6a9cb.js');
9
9
  const index = require('./index-79b35510.js');
10
10
  const locale = require('./locale-48d76c59.js');
11
- const mapViewUtils = require('./mapViewUtils-6e46ba33.js');
11
+ const mapViewUtils = require('./mapViewUtils-911698e5.js');
12
12
  require('./solution-resource-a577e84f.js');
13
13
  require('./index-f64944ad.js');
14
14
  const restHelpersGet = require('./restHelpersGet-dbaa28df.js');
@@ -1512,7 +1512,7 @@ function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++
1512
1512
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1513
1513
  * ====================================================================
1514
1514
  */
1515
- function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):Promise.resolve().then(function () { return require('./index.es-aa69b58b.js'); })).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}E.API.addSvgAsImage=function(t,r,n,i,o,s,c,u){if(isNaN(r)||isNaN(n))throw a.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw a.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var h=document.createElement("canvas");h.width=i,h.height=o;var l=h.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,h.width,h.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return e().then((function(e){return e.fromString(l,t,f)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(f)})).then((function(){d.addImage(h.toDataURL("image/jpeg",1),r,n,i,o,c,u);}))};}(),E.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(e,r);return this},E.API.viewerPreferences=function(e,r){var n;e=e||{},r=r||!1;var i,a,o,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},c=Object.keys(s),u=[],h=0,l=0,f=0;function d(t,e){var r,n=!1;for(r=0;r<t.length;r+=1)t[r]===e&&(n=!0);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,"reset"===e||!0===r){var p=c.length;for(f=0;f<p;f+=1)n[c[f]].value=n[c[f]].defaultValue,n[c[f]].explicitSet=!1;}if("object"===t(e))for(a in e)if(o=e[a],d(c,a)&&void 0!==o){if("boolean"===n[a].type&&"boolean"==typeof o)n[a].value=o;else if("name"===n[a].type&&d(n[a].valueSet,o))n[a].value=o;else if("integer"===n[a].type&&Number.isInteger(o))n[a].value=o;else if("array"===n[a].type){for(h=0;h<o.length;h+=1)if(i=!0,1===o[h].length&&"number"==typeof o[h][0])u.push(String(o[h]-1));else if(o[h].length>1){for(l=0;l<o[h].length;l+=1)"number"!=typeof o[h][l]&&(i=!1);!0===i&&u.push([o[h][0]-1,o[h][1]-1].join(" "));}n[a].value="["+u.join(" ")+"]";}else n[a].value=n[a].defaultValue;n[a].explicitSet=!0;}return !1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,e=[];for(t in n)!0===n[t].explicitSet&&("name"===n[t].type?e.push("/"+t+" /"+n[t].value):e.push("/"+t+" "+n[t].value));0!==e.length&&this.internal.write("/ViewerPreferences\n<<\n"+e.join("\n")+"\n>>");})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},
1515
+ function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):Promise.resolve().then(function () { return require('./index.es-4e523f8b.js'); })).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}E.API.addSvgAsImage=function(t,r,n,i,o,s,c,u){if(isNaN(r)||isNaN(n))throw a.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw a.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var h=document.createElement("canvas");h.width=i,h.height=o;var l=h.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,h.width,h.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return e().then((function(e){return e.fromString(l,t,f)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(f)})).then((function(){d.addImage(h.toDataURL("image/jpeg",1),r,n,i,o,c,u);}))};}(),E.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(e,r);return this},E.API.viewerPreferences=function(e,r){var n;e=e||{},r=r||!1;var i,a,o,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},c=Object.keys(s),u=[],h=0,l=0,f=0;function d(t,e){var r,n=!1;for(r=0;r<t.length;r+=1)t[r]===e&&(n=!0);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,"reset"===e||!0===r){var p=c.length;for(f=0;f<p;f+=1)n[c[f]].value=n[c[f]].defaultValue,n[c[f]].explicitSet=!1;}if("object"===t(e))for(a in e)if(o=e[a],d(c,a)&&void 0!==o){if("boolean"===n[a].type&&"boolean"==typeof o)n[a].value=o;else if("name"===n[a].type&&d(n[a].valueSet,o))n[a].value=o;else if("integer"===n[a].type&&Number.isInteger(o))n[a].value=o;else if("array"===n[a].type){for(h=0;h<o.length;h+=1)if(i=!0,1===o[h].length&&"number"==typeof o[h][0])u.push(String(o[h]-1));else if(o[h].length>1){for(l=0;l<o[h].length;l+=1)"number"!=typeof o[h][l]&&(i=!1);!0===i&&u.push([o[h][0]-1,o[h][1]-1].join(" "));}n[a].value="["+u.join(" ")+"]";}else n[a].value=n[a].defaultValue;n[a].explicitSet=!0;}return !1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,e=[];for(t in n)!0===n[t].explicitSet&&("name"===n[t].type?e.push("/"+t+" /"+n[t].value):e.push("/"+t+" "+n[t].value));0!==e.length&&this.internal.write("/ViewerPreferences\n<<\n"+e.join("\n")+"\n>>");})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},
1516
1516
  /** ====================================================================
1517
1517
  * @license
1518
1518
  * jsPDF XMP metadata plugin
@@ -9,10 +9,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-79b35510.js');
11
11
  const locale = require('./locale-48d76c59.js');
12
- const popupUtils = require('./popupUtils-3e65296c.js');
13
- const mapViewUtils = require('./mapViewUtils-6e46ba33.js');
12
+ const popupUtils = require('./popupUtils-e3fa775b.js');
13
+ const mapViewUtils = require('./mapViewUtils-911698e5.js');
14
14
  require('./esri-loader-fce6a9cb.js');
15
- require('./downloadUtils-5349717a.js');
15
+ require('./downloadUtils-83bf79ba.js');
16
16
  require('./solution-resource-a577e84f.js');
17
17
  require('./index-f64944ad.js');
18
18
  require('./restHelpersGet-dbaa28df.js');
@@ -6,10 +6,10 @@
6
6
  'use strict';
7
7
 
8
8
  const esriLoader = require('./esri-loader-fce6a9cb.js');
9
- const downloadUtils = require('./downloadUtils-5349717a.js');
9
+ const downloadUtils = require('./downloadUtils-83bf79ba.js');
10
10
  require('./index-79b35510.js');
11
11
  require('./locale-48d76c59.js');
12
- require('./mapViewUtils-6e46ba33.js');
12
+ require('./mapViewUtils-911698e5.js');
13
13
  require('./interfaces-7cd0a48a.js');
14
14
  require('./solution-resource-a577e84f.js');
15
15
  require('./index-f64944ad.js');
@@ -9,10 +9,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-79b35510.js');
11
11
  const locale = require('./locale-48d76c59.js');
12
- const mapViewUtils = require('./mapViewUtils-6e46ba33.js');
12
+ const mapViewUtils = require('./mapViewUtils-911698e5.js');
13
13
  const interfaces = require('./interfaces-7cd0a48a.js');
14
14
  const publicNotificationStore = require('./publicNotificationStore-3bfbbed3.js');
15
- const downloadUtils = require('./downloadUtils-5349717a.js');
15
+ const downloadUtils = require('./downloadUtils-83bf79ba.js');
16
16
  require('./esri-loader-fce6a9cb.js');
17
17
  require('./index-c078ea5f.js');
18
18
  require('./solution-resource-a577e84f.js');
@@ -22,6 +22,36 @@ const interfaces = require('./interfaces-7cd0a48a.js');
22
22
  * See the License for the specific language governing permissions and
23
23
  * limitations under the License.
24
24
  */
25
+ /**
26
+ * Query the layer for all OIDs valid for any definition expressions applied to the layer.
27
+ *
28
+ * This query allows OIDs to be returned in the same order as shown in the FeatureTable.
29
+ * FeatureLayer.queryObjectIds can return OIDs in a different order.
30
+ *
31
+ * @param start zero-based index indicating where to begin retrieving features
32
+ * @param layer the layer to retrieve features from
33
+ * @param graphics stores the features
34
+ * @param orderBy One or more field names used to order the query results.
35
+ * Specify ASC (ascending) or DESC (descending) after the field name to control the order.
36
+ * The default order is ASC.
37
+ *
38
+ * @returns Promise with the OIDs sorted based on any orderBy definitions
39
+ */
40
+ async function queryAllOidsWithQueryFeatures(start, layer, graphics, orderBy) {
41
+ const num = layer.capabilities.query.maxRecordCount;
42
+ const query = layer.createQuery();
43
+ query.start = start;
44
+ query.num = num;
45
+ query.returnGeometry = false;
46
+ query.orderByFields = orderBy;
47
+ query.outFields = [layer.objectIdField];
48
+ query.where = layer.definitionExpression || "1=1";
49
+ const result = await layer.queryFeatures(query);
50
+ graphics = graphics.concat(result.features);
51
+ return result.exceededTransferLimit ?
52
+ queryAllOidsWithQueryFeatures(start += num, layer, graphics, orderBy) :
53
+ Promise.resolve(graphics.map(g => g.attributes[layer.objectIdField]));
54
+ }
25
55
  /**
26
56
  * Query the layer for all IDs
27
57
  *
@@ -129,22 +159,6 @@ async function queryFeaturesByGeometry(start, layer, geometry, featuresCollectio
129
159
  queryFeaturesByGeometry(start += num, layer, geometry, featuresCollection) :
130
160
  Promise.resolve(featuresCollection);
131
161
  }
132
- /**
133
- * Query the layer for feature ids that match the provided where clause.
134
- * If no where clause is provided all features will be returned.
135
- *
136
- * @param layer the layer to retrieve features from
137
- * @param where the where clause for the query
138
- * @param orderBy any sort order to apply to the query
139
- *
140
- * @returns Promise with the ids from the layer that match the where and are sorted as defined by orderBy
141
- */
142
- async function queryFeatureIds(layer, where, orderBy) {
143
- const query = layer.createQuery();
144
- query.where = where ? where : "1=1";
145
- query.orderByFields = orderBy;
146
- return await layer.queryObjectIds(query);
147
- }
148
162
  /**
149
163
  * Query the layer for the extent of features with the provided OIDs
150
164
  *
@@ -487,7 +501,7 @@ exports.goToSelection = goToSelection;
487
501
  exports.highlightAllFeatures = highlightAllFeatures;
488
502
  exports.highlightFeatures = highlightFeatures;
489
503
  exports.queryAllIds = queryAllIds;
490
- exports.queryFeatureIds = queryFeatureIds;
504
+ exports.queryAllOidsWithQueryFeatures = queryAllOidsWithQueryFeatures;
491
505
  exports.queryFeaturesByGeometry = queryFeaturesByGeometry;
492
506
  exports.queryFeaturesByGlobalID = queryFeaturesByGlobalID;
493
507
  exports.queryFeaturesByID = queryFeaturesByID;
@@ -5,7 +5,7 @@
5
5
  */
6
6
  'use strict';
7
7
 
8
- const downloadUtils = require('./downloadUtils-5349717a.js');
8
+ const downloadUtils = require('./downloadUtils-83bf79ba.js');
9
9
  const locale = require('./locale-48d76c59.js');
10
10
 
11
11
  /** @license
@@ -10,9 +10,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
10
10
  const index = require('./index-79b35510.js');
11
11
  const interfaces = require('./interfaces-7cd0a48a.js');
12
12
  const locale = require('./locale-48d76c59.js');
13
- const mapViewUtils = require('./mapViewUtils-6e46ba33.js');
13
+ const mapViewUtils = require('./mapViewUtils-911698e5.js');
14
14
  const publicNotificationStore = require('./publicNotificationStore-3bfbbed3.js');
15
- const downloadUtils = require('./downloadUtils-5349717a.js');
15
+ const downloadUtils = require('./downloadUtils-83bf79ba.js');
16
16
  require('./esri-loader-fce6a9cb.js');
17
17
  require('./index-c078ea5f.js');
18
18
  require('./solution-resource-a577e84f.js');
@@ -32,15 +32,19 @@ export class FloorFilter {
32
32
  //
33
33
  //--------------------------------------------------------------------------
34
34
  async mapViewWatchHandler() {
35
+ console.log("mapViewWatchHandler FF");
35
36
  const webMap = this.mapView.map;
36
37
  await webMap.when(() => {
38
+ console.log("webMap.when FF");
37
39
  if (this.floorFilterWidget) {
38
40
  this.floorFilterWidget.destroy();
39
41
  this.floorFilterWidget = undefined;
42
+ console.log("floorFilterWidget destroyed");
40
43
  }
41
44
  if (this._floorFilterElement) {
42
45
  this._floorFilterElement.remove();
43
46
  this._floorFilterElement = document.createElement("div");
47
+ console.log("this._floorFilterElement created");
44
48
  }
45
49
  this._initFloorFilter(this.mapView, webMap);
46
50
  });
@@ -57,7 +61,7 @@ export class FloorFilter {
57
61
  return this._initModules();
58
62
  }
59
63
  render() {
60
- return (h(Host, { key: '98769446b20d8a9432b571b5653abbc6613bdfe5' }, h("div", { key: '6606a2593fec1885fc02b07a168bdea43e7f864a', ref: (el) => { this._floorFilterElement = el; } })));
64
+ return (h(Host, { key: 'df3c419f3eaf30590c44c4919f0eeddfc333b81d' }, h("div", { key: '8496099f3bc35f34db6e47f73870ead9144df0a4', ref: (el) => { this._floorFilterElement = el; } })));
61
65
  }
62
66
  //--------------------------------------------------------------------------
63
67
  //
@@ -84,6 +88,11 @@ export class FloorFilter {
84
88
  */
85
89
  _initFloorFilter(view, webMap) {
86
90
  var _a, _b, _c;
91
+ console.log("_initFloorFilter");
92
+ console.log(`view: ${view}`);
93
+ console.log(`this.enabled: ${this.enabled}`);
94
+ console.log(`this.FloorFilter: ${this.FloorFilter}`);
95
+ console.log(`webMap?.floorInfo: ${webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo}`);
87
96
  if (view && this.enabled && this.FloorFilter && (webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo)) {
88
97
  this.floorFilterWidget = new this.FloorFilter({
89
98
  container: this._floorFilterElement,
@@ -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 {
@@ -216,6 +216,10 @@ export class LayerTable {
216
216
  if (this._selectAllActive && this.selectedIds.length !== this._allIds.length) {
217
217
  this._selectAllActive = false;
218
218
  }
219
+ if (this.selectedIds.length > 0) {
220
+ this._table.rowHighlightIds.removeAll();
221
+ this._table.rowHighlightIds.add(this.selectedIds[0]);
222
+ }
219
223
  }
220
224
  /**
221
225
  * Scroll and zoom to the selected feature from the Features widget.
@@ -315,7 +319,7 @@ export class LayerTable {
315
319
  const selected = this.selectedIds.length.toString();
316
320
  const tableHeightClass = this.isMobile ? "height-full" : "height-full-adjusted";
317
321
  this._validateActiveActions();
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
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
319
323
  .replace("{{total}}", total)
320
324
  .replace("{{selected}}", selected))) : undefined)), this._filterModal()));
321
325
  }
@@ -916,43 +920,38 @@ export class LayerTable {
916
920
  else if (this._shiftIsPressed) {
917
921
  this._skipOnChange = true;
918
922
  this._previousCurrentId = this._currentId;
919
- this._currentId = [...this._table.highlightIds.toArray()].reverse()[0];
920
- 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) {
921
928
  // query the layer based on current sort and filters then grab between the current id and previous id
922
929
  const orderBy = this._table.activeSortOrders.reduce((prev, cur) => {
923
930
  prev.push(`${cur.fieldName} ${cur.direction}`);
924
931
  return prev;
925
932
  }, []);
926
- const oids = await queryFeatureIds(this._layer, this._layer.definitionExpression, orderBy);
933
+ const oids = await queryAllOidsWithQueryFeatures(0, this._layer, [], orderBy);
927
934
  let isBetween = false;
928
935
  const _start = this._table.viewModel.getObjectIdIndex(this._previousCurrentId);
929
936
  const _end = this._table.viewModel.getObjectIdIndex(this._currentId);
930
937
  const startIndex = _start < _end ? _start : _end;
931
938
  const endIndex = _end > _start ? _end : _start;
932
939
  this._skipOnChange = startIndex + 1 !== endIndex;
933
- const selectedIds = oids.reduce((prev, cur) => {
940
+ const idsInRange = oids.reduce((prev, cur) => {
934
941
  const id = cur;
935
- const index = this._table.viewModel.getObjectIdIndex(id);
936
942
  if ((id === this._currentId || id === this._previousCurrentId)) {
937
943
  isBetween = !isBetween;
938
944
  if (prev.indexOf(id) < 0) {
939
945
  prev.push(id);
940
946
  }
941
947
  }
942
- // The oids are sorted so after we have reached the start or end oid add all ids even if the index is -1.
943
- // Index of -1 will occur for features between the start and and oid if
944
- // you select a row then scroll faster than the FeatureTable loads the data to select the next id
945
- if (isBetween && prev.indexOf(id) < 0) {
946
- prev.push(id);
947
- }
948
- // Also add index based check.
949
- // In some cases the FeatureTable and Layer query will have differences in how null/undefined field values are sorted
950
- if ((this.selectedIds.indexOf(id) > -1 || (index >= startIndex && index <= endIndex)) && prev.indexOf(id) < 0 && index > -1) {
948
+ else if (isBetween && prev.indexOf(id) < 0) {
951
949
  prev.push(id);
952
950
  }
953
951
  return prev;
954
952
  }, []);
955
- this.selectedIds = _start < _end ? selectedIds.reverse() : selectedIds;
953
+ const selectedIds = _start < _end ? idsInRange.reverse() : idsInRange;
954
+ this.selectedIds = [...new Set([...selectedIds, ...this.selectedIds])];
956
955
  this._table.highlightIds.addMany(this.selectedIds.filter(i => ids.indexOf(i) < 0));
957
956
  }
958
957
  }
@@ -1294,9 +1293,10 @@ export class LayerTable {
1294
1293
  * Clears the selected indexes
1295
1294
  */
1296
1295
  _clearSelection() {
1297
- var _a;
1296
+ var _a, _b;
1298
1297
  this.selectedIds = [];
1299
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();
1300
1300
  this._finishOnChange();
1301
1301
  }
1302
1302
  /**
@@ -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
  *