@esri/solutions-components 0.8.61 → 0.8.63
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/calcite-alert_4.cjs.entry.js +2 -2
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +1 -1
- package/dist/cjs/card-manager_3.cjs.entry.js +41 -26
- package/dist/cjs/{downloadUtils-f4b01945.js → downloadUtils-08f9ebbd.js} +4 -2
- package/dist/cjs/feature-list.cjs.entry.js +2 -2
- package/dist/cjs/{index.es-08ff626f.js → index.es-ca867656.js} +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +1 -1
- package/dist/cjs/{popupUtils-64405c62.js → popupUtils-50b3c196.js} +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +1 -1
- package/dist/cjs/solution-configuration.cjs.entry.js +1 -1
- package/dist/cjs/solution-contents_3.cjs.entry.js +1 -1
- package/dist/cjs/{solution-store-d9f3ea44.js → solution-store-4e35404b.js} +10 -0
- package/dist/cjs/store-manager.cjs.entry.js +1 -1
- package/dist/collection/components/layer-table/layer-table.js +40 -25
- package/dist/collection/demos/crowdsource-manager.html +2 -2
- package/dist/collection/utils/downloadUtils.js +3 -1
- package/dist/collection/utils/downloadUtils.ts +3 -1
- package/dist/components/downloadUtils.js +3 -1
- package/dist/components/layer-table2.js +40 -25
- package/dist/components/solution-store.js +10 -0
- package/dist/esm/calcite-alert_4.entry.js +2 -2
- package/dist/esm/calcite-shell-panel_14.entry.js +1 -1
- package/dist/esm/card-manager_3.entry.js +41 -26
- package/dist/esm/{downloadUtils-408e0384.js → downloadUtils-f6e2a736.js} +4 -2
- package/dist/esm/feature-list.entry.js +2 -2
- package/dist/esm/{index.es-cac1405b.js → index.es-89f753c1.js} +1 -1
- package/dist/esm/map-select-tools_3.entry.js +1 -1
- package/dist/esm/{popupUtils-142f616a.js → popupUtils-ecec5e6d.js} +1 -1
- package/dist/esm/public-notification.entry.js +1 -1
- package/dist/esm/solution-configuration.entry.js +1 -1
- package/dist/esm/solution-contents_3.entry.js +1 -1
- package/dist/esm/{solution-store-1c36ce1d.js → solution-store-840c5489.js} +10 -0
- package/dist/esm/store-manager.entry.js +1 -1
- package/dist/solutions-components/demos/crowdsource-manager.html +2 -2
- package/dist/solutions-components/{p-742b5af7.js → p-09f79715.js} +1 -1
- package/dist/solutions-components/{p-7b9207e4.entry.js → p-1412173c.entry.js} +1 -1
- package/dist/solutions-components/{p-d783ae9a.entry.js → p-2a8b04de.entry.js} +1 -1
- package/dist/solutions-components/{p-90864588.entry.js → p-42c2d9d8.entry.js} +1 -1
- package/dist/solutions-components/{p-faed40ad.entry.js → p-48ab80c3.entry.js} +1 -1
- package/dist/solutions-components/{p-67c3ac62.js → p-593036f3.js} +2 -2
- package/dist/solutions-components/{p-120a2091.entry.js → p-7249cfd8.entry.js} +1 -1
- package/dist/solutions-components/{p-54562381.entry.js → p-75ecff1b.entry.js} +1 -1
- package/dist/solutions-components/{p-057f9296.entry.js → p-b9e32214.entry.js} +1 -1
- package/dist/solutions-components/p-bba41eec.entry.js +6 -0
- package/dist/solutions-components/{p-6f4a40fa.entry.js → p-bf0bb8c2.entry.js} +1 -1
- package/dist/solutions-components/{p-2afdcdfc.js → p-c1936856.js} +1 -1
- package/dist/solutions-components/{p-fea7535c.js → p-f82d09d2.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/downloadUtils.ts +3 -1
- package/dist/types/components/layer-table/layer-table.d.ts +12 -0
- package/package.json +6 -6
- package/dist/solutions-components/p-03b07165.entry.js +0 -6
@@ -17,7 +17,7 @@ const t9n = require('./t9n-ef615628.js');
|
|
17
17
|
const resources = require('./resources-6146eb17.js');
|
18
18
|
const locale$1 = require('./locale-31289fc5.js');
|
19
19
|
const mapViewUtils = require('./mapViewUtils-78b14528.js');
|
20
|
-
const popupUtils = require('./popupUtils-
|
20
|
+
const popupUtils = require('./popupUtils-50b3c196.js');
|
21
21
|
require('./guid-a7528dfa.js');
|
22
22
|
require('./resources-1c0e54c1.js');
|
23
23
|
require('./key-7ed07912.js');
|
@@ -25,7 +25,7 @@ require('./observers-2a59d471.js');
|
|
25
25
|
require('./esri-loader-08dc41bd.js');
|
26
26
|
require('./_commonjsHelpers-baf43783.js');
|
27
27
|
require('./interfaces-7cd0a48a.js');
|
28
|
-
require('./downloadUtils-
|
28
|
+
require('./downloadUtils-08f9ebbd.js');
|
29
29
|
require('./solution-resource-a09a6fe0.js');
|
30
30
|
require('./index-f64944ad.js');
|
31
31
|
require('./restHelpersGet-be451f4a.js');
|
@@ -25,7 +25,7 @@ const sortableComponent = require('./sortableComponent-b1b229bf.js');
|
|
25
25
|
const resources$2 = require('./resources-c35bef76.js');
|
26
26
|
const resources$1 = require('./resources-5ba856a7.js');
|
27
27
|
const locale$1 = require('./locale-31289fc5.js');
|
28
|
-
const solutionStore = require('./solution-store-
|
28
|
+
const solutionStore = require('./solution-store-4e35404b.js');
|
29
29
|
const interfaces = require('./interfaces-7cd0a48a.js');
|
30
30
|
const solutionResource = require('./solution-resource-a09a6fe0.js');
|
31
31
|
require('./index-f64944ad.js');
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
10
10
|
const index = require('./index-ff18be0d.js');
|
11
11
|
const locale = require('./locale-31289fc5.js');
|
12
12
|
const mapViewUtils = require('./mapViewUtils-78b14528.js');
|
13
|
-
const downloadUtils = require('./downloadUtils-
|
13
|
+
const downloadUtils = require('./downloadUtils-08f9ebbd.js');
|
14
14
|
require('./esri-loader-08dc41bd.js');
|
15
15
|
require('./_commonjsHelpers-baf43783.js');
|
16
16
|
require('./interfaces-7cd0a48a.js');
|
@@ -130,10 +130,18 @@ const LayerTable = class {
|
|
130
130
|
* boolean: When true the default OID provided via url param has been honored and should now be ignored
|
131
131
|
*/
|
132
132
|
this._defaultOidHonored = false;
|
133
|
+
/**
|
134
|
+
* boolean: When true the table has been successfully loaded
|
135
|
+
*/
|
136
|
+
this._loaded = false;
|
133
137
|
/**
|
134
138
|
* boolean: When true the observer has been set and we don't need to set it again
|
135
139
|
*/
|
136
140
|
this._observerSet = false;
|
141
|
+
/**
|
142
|
+
* boolean: When true the current selection was done via the map and we will ignore shift->Select
|
143
|
+
*/
|
144
|
+
this._selectionFromMap = false;
|
137
145
|
/**
|
138
146
|
* boolean: When true the shift key is currently pressed
|
139
147
|
*/
|
@@ -415,7 +423,7 @@ const LayerTable = class {
|
|
415
423
|
const selected = this.selectedIds.length.toString();
|
416
424
|
const tableHeightClass = this.isMobile ? "height-full" : "height-full-adjusted";
|
417
425
|
this._validateActiveActions();
|
418
|
-
return (index.h(index.Host, { key: '
|
426
|
+
return (index.h(index.Host, { key: '547a08c45cc3a0b0bdb5ab841ee202d2d43018dc' }, index.h("calcite-shell", { key: '7ac39e863586727df7685eb5c3faffd87c46bf9d' }, this._getTableControlRow("header"), index.h("div", { key: '322dc4820b17365f3f202ce43d85330d25081eb5', class: `width-full ${tableHeightClass}` }, index.h("calcite-panel", { key: '764955f3cf9371a5ff554821613fffbc9e0bd705', class: "height-full width-full" }, index.h("calcite-loader", { key: '031fc6520de11b166111626501f0208f1b69c9ff', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), index.h("div", { key: '8d62258ee356fdf6bc6c03f88848a32270ce5eed', class: tableNodeClass, ref: this.onTableNodeCreate })), !this.isMobile ? (index.h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
|
419
427
|
.replace("{{total}}", total)
|
420
428
|
.replace("{{selected}}", selected))) : undefined)), this._filterModal()));
|
421
429
|
}
|
@@ -992,7 +1000,7 @@ const LayerTable = class {
|
|
992
1000
|
async _handleOnChange(evt) {
|
993
1001
|
const ids = [...this._table.highlightIds.toArray()];
|
994
1002
|
if (!this._skipOnChange) {
|
995
|
-
if (!this._ctrlIsPressed && !this._shiftIsPressed) {
|
1003
|
+
if ((!this._ctrlIsPressed && !this._shiftIsPressed) || (this._selectionFromMap && this._shiftIsPressed)) {
|
996
1004
|
if (this.selectedIds.length > 0) {
|
997
1005
|
this._skipOnChange = true;
|
998
1006
|
// only readd in specific case where we have multiple selected and then click one of the currently selected
|
@@ -1015,7 +1023,7 @@ const LayerTable = class {
|
|
1015
1023
|
else if (this._ctrlIsPressed) {
|
1016
1024
|
this.selectedIds = ids.reverse();
|
1017
1025
|
}
|
1018
|
-
else if (this._shiftIsPressed) {
|
1026
|
+
else if (this._shiftIsPressed && (ids === null || ids === void 0 ? void 0 : ids.length) > 0) {
|
1019
1027
|
this._skipOnChange = true;
|
1020
1028
|
this._previousCurrentId = this._currentId;
|
1021
1029
|
this._currentId = [...ids].reverse()[0];
|
@@ -1059,6 +1067,7 @@ const LayerTable = class {
|
|
1059
1067
|
this._skipOnChange = false;
|
1060
1068
|
}
|
1061
1069
|
this._currentId = [...this._table.highlightIds.toArray()].reverse()[0];
|
1070
|
+
this._selectionFromMap = false;
|
1062
1071
|
}
|
1063
1072
|
/**
|
1064
1073
|
* Handle any updates after a selection change has occured and emit the results
|
@@ -1079,16 +1088,11 @@ const LayerTable = class {
|
|
1079
1088
|
*/
|
1080
1089
|
_resetColumnTemplates() {
|
1081
1090
|
var _a, _b;
|
1082
|
-
console.log("_resetColumnTemplates");
|
1083
1091
|
const columnTemplates = this._getColumnTemplates((_a = this._layer) === null || _a === void 0 ? void 0 : _a.id, (_b = this._layer) === null || _b === void 0 ? void 0 : _b.fields);
|
1084
1092
|
const hasChange = columnTemplates === null || columnTemplates === void 0 ? void 0 : columnTemplates.some((ct, i) => {
|
1085
1093
|
var _a;
|
1086
1094
|
return JSON.stringify((_a = this._table) === null || _a === void 0 ? void 0 : _a.tableTemplate.columnTemplates[i]) !== JSON.stringify(ct);
|
1087
1095
|
});
|
1088
|
-
console.log(this._table);
|
1089
|
-
console.log(columnTemplates);
|
1090
|
-
console.log(hasChange);
|
1091
|
-
console.log(!this._columnsInfo);
|
1092
1096
|
if (this._table && columnTemplates && (hasChange || !this._columnsInfo)) {
|
1093
1097
|
this._table.tableTemplate = new this.TableTemplate({
|
1094
1098
|
columnTemplates
|
@@ -1102,9 +1106,7 @@ const LayerTable = class {
|
|
1102
1106
|
*/
|
1103
1107
|
async _resetTable() {
|
1104
1108
|
var _a;
|
1105
|
-
|
1106
|
-
console.log(this._table);
|
1107
|
-
console.log(this._layer);
|
1109
|
+
this._loaded = false;
|
1108
1110
|
this._clearSelection();
|
1109
1111
|
this._allIds = await mapViewUtils.queryAllIds(this._layer);
|
1110
1112
|
if (!this._table) {
|
@@ -1119,10 +1121,26 @@ const LayerTable = class {
|
|
1119
1121
|
this._checkEditEnabled();
|
1120
1122
|
this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
|
1121
1123
|
await this._table.when();
|
1122
|
-
|
1124
|
+
// This is a workaround.
|
1125
|
+
// In some cases the first time the app is loaded this._table.state === "loaded" is not being hit.
|
1126
|
+
// When this issue occurs we will wait for 1 second and attempt to finish the loading process
|
1127
|
+
setTimeout(() => {
|
1128
|
+
if (!this._loaded) {
|
1129
|
+
console.log(`table.state: ${this._table.state}`);
|
1130
|
+
void this.finishLoading();
|
1131
|
+
}
|
1132
|
+
}, 1000);
|
1123
1133
|
await this.reactiveUtils.once(() => this._table.state === "loaded")
|
1124
1134
|
.then(async () => {
|
1125
|
-
|
1135
|
+
await this.finishLoading();
|
1136
|
+
});
|
1137
|
+
}
|
1138
|
+
/**
|
1139
|
+
* Finish the table loading tasks
|
1140
|
+
*/
|
1141
|
+
async finishLoading() {
|
1142
|
+
try {
|
1143
|
+
this._loaded = true;
|
1126
1144
|
this._table.highlightIds.removeAll();
|
1127
1145
|
this._table.clearSelectionFilter();
|
1128
1146
|
this._resetColumnTemplates();
|
@@ -1131,7 +1149,10 @@ const LayerTable = class {
|
|
1131
1149
|
await this._sortTable();
|
1132
1150
|
this._initToolInfos();
|
1133
1151
|
this._updateToolbar();
|
1134
|
-
}
|
1152
|
+
}
|
1153
|
+
catch (e) {
|
1154
|
+
console.log(e);
|
1155
|
+
}
|
1135
1156
|
}
|
1136
1157
|
/**
|
1137
1158
|
* Update the current IDs when that layers data is modified
|
@@ -1226,23 +1247,18 @@ const LayerTable = class {
|
|
1226
1247
|
* Sort the table with the configured field and the sort order
|
1227
1248
|
*/
|
1228
1249
|
async _sortTable() {
|
1229
|
-
var _a, _b, _c, _d, _e, _f
|
1230
|
-
console.log("_sortTable");
|
1231
|
-
console.log(this._table);
|
1232
|
-
console.log(this._layer);
|
1233
|
-
console.log((_b = (_a = this.mapInfo) === null || _a === void 0 ? void 0 : _a.layerOptions) === null || _b === void 0 ? void 0 : _b.layers);
|
1234
|
-
console.log((_d = (_c = this.mapInfo) === null || _c === void 0 ? void 0 : _c.layerOptions) === null || _d === void 0 ? void 0 : _d.layers);
|
1250
|
+
var _a, _b, _c, _d, _e, _f;
|
1235
1251
|
//By default sort the table using objectIdField and in descending order
|
1236
|
-
let sortField = (
|
1252
|
+
let sortField = (_a = this._layer) === null || _a === void 0 ? void 0 : _a.objectIdField;
|
1237
1253
|
let sortOrder = 'desc';
|
1238
1254
|
let configuredLayer;
|
1239
1255
|
//get the sortField and sortOrder from the configuration
|
1240
|
-
if (((
|
1256
|
+
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)) {
|
1241
1257
|
configuredLayer = this.mapInfo.layerOptions.layers.filter((layer) => layer.id === this._layer.id);
|
1242
1258
|
if (configuredLayer && configuredLayer.length > 0) {
|
1243
1259
|
configuredLayer = configuredLayer[0];
|
1244
1260
|
//if sort field is defined and sortField is available in the fields then use it
|
1245
|
-
if (configuredLayer.sortField && ((
|
1261
|
+
if (configuredLayer.sortField && ((_f = configuredLayer.fields) === null || _f === void 0 ? void 0 : _f.includes(configuredLayer.sortField))) {
|
1246
1262
|
sortField = configuredLayer.sortField;
|
1247
1263
|
}
|
1248
1264
|
//use sort order if configured
|
@@ -1250,10 +1266,8 @@ const LayerTable = class {
|
|
1250
1266
|
}
|
1251
1267
|
}
|
1252
1268
|
if (this._table && this._layer) {
|
1253
|
-
console.log("has layer and has table");
|
1254
1269
|
await this._table.when();
|
1255
1270
|
await this._layer.when(() => {
|
1256
|
-
console.log("sort on this._layer.when");
|
1257
1271
|
this._table.sortColumn(sortField, sortOrder);
|
1258
1272
|
});
|
1259
1273
|
}
|
@@ -1367,6 +1381,7 @@ const LayerTable = class {
|
|
1367
1381
|
const id = result.graphic.getObjectId();
|
1368
1382
|
const index = this._table.highlightIds.indexOf(id);
|
1369
1383
|
if (index < 0) {
|
1384
|
+
this._selectionFromMap = true;
|
1370
1385
|
this._table.highlightIds.add(id);
|
1371
1386
|
}
|
1372
1387
|
});
|
@@ -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-
|
1515
|
+
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):Promise.resolve().then(function () { return require('./index.es-ca867656.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
|
@@ -2937,7 +2937,9 @@ function _prepareAttributeValue(attributeValue, attributeType, attributeDomain,
|
|
2937
2937
|
value = intl.formatNumber(value, numberFormatIntlOptions);
|
2938
2938
|
}
|
2939
2939
|
else {
|
2940
|
-
value = intl.formatNumber(value)
|
2940
|
+
value = intl.formatNumber(value === null || value === void 0 ? void 0 : value.toString(), {
|
2941
|
+
maximumFractionDigits: 100
|
2942
|
+
});
|
2941
2943
|
}
|
2942
2944
|
break;
|
2943
2945
|
}
|
@@ -9,11 +9,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
9
|
|
10
10
|
const index = require('./index-ff18be0d.js');
|
11
11
|
const locale = require('./locale-31289fc5.js');
|
12
|
-
const popupUtils = require('./popupUtils-
|
12
|
+
const popupUtils = require('./popupUtils-50b3c196.js');
|
13
13
|
const mapViewUtils = require('./mapViewUtils-78b14528.js');
|
14
14
|
require('./esri-loader-08dc41bd.js');
|
15
15
|
require('./_commonjsHelpers-baf43783.js');
|
16
|
-
require('./downloadUtils-
|
16
|
+
require('./downloadUtils-08f9ebbd.js');
|
17
17
|
require('./solution-resource-a09a6fe0.js');
|
18
18
|
require('./index-f64944ad.js');
|
19
19
|
require('./restHelpersGet-be451f4a.js');
|
@@ -6,7 +6,7 @@
|
|
6
6
|
'use strict';
|
7
7
|
|
8
8
|
const _commonjsHelpers = require('./_commonjsHelpers-baf43783.js');
|
9
|
-
const downloadUtils = require('./downloadUtils-
|
9
|
+
const downloadUtils = require('./downloadUtils-08f9ebbd.js');
|
10
10
|
require('./index-ff18be0d.js');
|
11
11
|
require('./locale-31289fc5.js');
|
12
12
|
require('./esri-loader-08dc41bd.js');
|
@@ -12,7 +12,7 @@ const locale = require('./locale-31289fc5.js');
|
|
12
12
|
const mapViewUtils = require('./mapViewUtils-78b14528.js');
|
13
13
|
const interfaces = require('./interfaces-7cd0a48a.js');
|
14
14
|
const publicNotificationStore = require('./publicNotificationStore-691f6f30.js');
|
15
|
-
const downloadUtils = require('./downloadUtils-
|
15
|
+
const downloadUtils = require('./downloadUtils-08f9ebbd.js');
|
16
16
|
require('./esri-loader-08dc41bd.js');
|
17
17
|
require('./_commonjsHelpers-baf43783.js');
|
18
18
|
require('./index-97020c9d.js');
|
@@ -12,7 +12,7 @@ const interfaces = require('./interfaces-7cd0a48a.js');
|
|
12
12
|
const locale = require('./locale-31289fc5.js');
|
13
13
|
const mapViewUtils = require('./mapViewUtils-78b14528.js');
|
14
14
|
const publicNotificationStore = require('./publicNotificationStore-691f6f30.js');
|
15
|
-
const downloadUtils = require('./downloadUtils-
|
15
|
+
const downloadUtils = require('./downloadUtils-08f9ebbd.js');
|
16
16
|
require('./esri-loader-08dc41bd.js');
|
17
17
|
require('./_commonjsHelpers-baf43783.js');
|
18
18
|
require('./index-97020c9d.js');
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
9
|
|
10
10
|
const index = require('./index-ff18be0d.js');
|
11
11
|
const templates = require('./templates-f7a3bf48.js');
|
12
|
-
const solutionStore = require('./solution-store-
|
12
|
+
const solutionStore = require('./solution-store-4e35404b.js');
|
13
13
|
require('./solution-resource-a09a6fe0.js');
|
14
14
|
const restHelpersGet = require('./restHelpersGet-be451f4a.js');
|
15
15
|
require('./index-f64944ad.js');
|
@@ -8,7 +8,7 @@
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
9
9
|
|
10
10
|
const index = require('./index-ff18be0d.js');
|
11
|
-
const solutionStore = require('./solution-store-
|
11
|
+
const solutionStore = require('./solution-store-4e35404b.js');
|
12
12
|
const locale = require('./locale-31289fc5.js');
|
13
13
|
const common = require('./common-7ee7ad73.js');
|
14
14
|
require('./index-97020c9d.js');
|
@@ -175,6 +175,16 @@ function updateItem$1(requestOptions) {
|
|
175
175
|
if (requestOptions.params.extent && isBBox(requestOptions.params.extent)) {
|
176
176
|
requestOptions.params.extent = bboxToString(requestOptions.params.extent);
|
177
177
|
}
|
178
|
+
/* istanbul ignore if */
|
179
|
+
if (requestOptions.params.file &&
|
180
|
+
requestOptions.params.file.constructor &&
|
181
|
+
requestOptions.params.file.constructor.name === 'ReadStream') {
|
182
|
+
// dataSize is not an official parameter for the ArcGIS REST API but is needed
|
183
|
+
// to encode the ReadStream with an appropriate length. This is to overcome
|
184
|
+
// the form-data library bug:
|
185
|
+
// https://github.com/form-data/form-data/issues/508
|
186
|
+
requestOptions.params.dataSize = requestOptions.dataSize;
|
187
|
+
}
|
178
188
|
return restHelpersGet.request(url, requestOptions);
|
179
189
|
});
|
180
190
|
}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
9
9
|
|
10
10
|
const index = require('./index-ff18be0d.js');
|
11
|
-
const solutionStore = require('./solution-store-
|
11
|
+
const solutionStore = require('./solution-store-4e35404b.js');
|
12
12
|
const templates = require('./templates-f7a3bf48.js');
|
13
13
|
require('./index-97020c9d.js');
|
14
14
|
require('./interfaces-7cd0a48a.js');
|
@@ -43,10 +43,18 @@ export class LayerTable {
|
|
43
43
|
* boolean: When true the default OID provided via url param has been honored and should now be ignored
|
44
44
|
*/
|
45
45
|
this._defaultOidHonored = false;
|
46
|
+
/**
|
47
|
+
* boolean: When true the table has been successfully loaded
|
48
|
+
*/
|
49
|
+
this._loaded = false;
|
46
50
|
/**
|
47
51
|
* boolean: When true the observer has been set and we don't need to set it again
|
48
52
|
*/
|
49
53
|
this._observerSet = false;
|
54
|
+
/**
|
55
|
+
* boolean: When true the current selection was done via the map and we will ignore shift->Select
|
56
|
+
*/
|
57
|
+
this._selectionFromMap = false;
|
50
58
|
/**
|
51
59
|
* boolean: When true the shift key is currently pressed
|
52
60
|
*/
|
@@ -328,7 +336,7 @@ export class LayerTable {
|
|
328
336
|
const selected = this.selectedIds.length.toString();
|
329
337
|
const tableHeightClass = this.isMobile ? "height-full" : "height-full-adjusted";
|
330
338
|
this._validateActiveActions();
|
331
|
-
return (h(Host, { key: '
|
339
|
+
return (h(Host, { key: '547a08c45cc3a0b0bdb5ab841ee202d2d43018dc' }, h("calcite-shell", { key: '7ac39e863586727df7685eb5c3faffd87c46bf9d' }, this._getTableControlRow("header"), h("div", { key: '322dc4820b17365f3f202ce43d85330d25081eb5', class: `width-full ${tableHeightClass}` }, h("calcite-panel", { key: '764955f3cf9371a5ff554821613fffbc9e0bd705', class: "height-full width-full" }, h("calcite-loader", { key: '031fc6520de11b166111626501f0208f1b69c9ff', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { key: '8d62258ee356fdf6bc6c03f88848a32270ce5eed', class: tableNodeClass, ref: this.onTableNodeCreate })), !this.isMobile ? (h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
|
332
340
|
.replace("{{total}}", total)
|
333
341
|
.replace("{{selected}}", selected))) : undefined)), this._filterModal()));
|
334
342
|
}
|
@@ -905,7 +913,7 @@ export class LayerTable {
|
|
905
913
|
async _handleOnChange(evt) {
|
906
914
|
const ids = [...this._table.highlightIds.toArray()];
|
907
915
|
if (!this._skipOnChange) {
|
908
|
-
if (!this._ctrlIsPressed && !this._shiftIsPressed) {
|
916
|
+
if ((!this._ctrlIsPressed && !this._shiftIsPressed) || (this._selectionFromMap && this._shiftIsPressed)) {
|
909
917
|
if (this.selectedIds.length > 0) {
|
910
918
|
this._skipOnChange = true;
|
911
919
|
// only readd in specific case where we have multiple selected and then click one of the currently selected
|
@@ -928,7 +936,7 @@ export class LayerTable {
|
|
928
936
|
else if (this._ctrlIsPressed) {
|
929
937
|
this.selectedIds = ids.reverse();
|
930
938
|
}
|
931
|
-
else if (this._shiftIsPressed) {
|
939
|
+
else if (this._shiftIsPressed && (ids === null || ids === void 0 ? void 0 : ids.length) > 0) {
|
932
940
|
this._skipOnChange = true;
|
933
941
|
this._previousCurrentId = this._currentId;
|
934
942
|
this._currentId = [...ids].reverse()[0];
|
@@ -972,6 +980,7 @@ export class LayerTable {
|
|
972
980
|
this._skipOnChange = false;
|
973
981
|
}
|
974
982
|
this._currentId = [...this._table.highlightIds.toArray()].reverse()[0];
|
983
|
+
this._selectionFromMap = false;
|
975
984
|
}
|
976
985
|
/**
|
977
986
|
* Handle any updates after a selection change has occured and emit the results
|
@@ -992,16 +1001,11 @@ export class LayerTable {
|
|
992
1001
|
*/
|
993
1002
|
_resetColumnTemplates() {
|
994
1003
|
var _a, _b;
|
995
|
-
console.log("_resetColumnTemplates");
|
996
1004
|
const columnTemplates = this._getColumnTemplates((_a = this._layer) === null || _a === void 0 ? void 0 : _a.id, (_b = this._layer) === null || _b === void 0 ? void 0 : _b.fields);
|
997
1005
|
const hasChange = columnTemplates === null || columnTemplates === void 0 ? void 0 : columnTemplates.some((ct, i) => {
|
998
1006
|
var _a;
|
999
1007
|
return JSON.stringify((_a = this._table) === null || _a === void 0 ? void 0 : _a.tableTemplate.columnTemplates[i]) !== JSON.stringify(ct);
|
1000
1008
|
});
|
1001
|
-
console.log(this._table);
|
1002
|
-
console.log(columnTemplates);
|
1003
|
-
console.log(hasChange);
|
1004
|
-
console.log(!this._columnsInfo);
|
1005
1009
|
if (this._table && columnTemplates && (hasChange || !this._columnsInfo)) {
|
1006
1010
|
this._table.tableTemplate = new this.TableTemplate({
|
1007
1011
|
columnTemplates
|
@@ -1015,9 +1019,7 @@ export class LayerTable {
|
|
1015
1019
|
*/
|
1016
1020
|
async _resetTable() {
|
1017
1021
|
var _a;
|
1018
|
-
|
1019
|
-
console.log(this._table);
|
1020
|
-
console.log(this._layer);
|
1022
|
+
this._loaded = false;
|
1021
1023
|
this._clearSelection();
|
1022
1024
|
this._allIds = await queryAllIds(this._layer);
|
1023
1025
|
if (!this._table) {
|
@@ -1032,10 +1034,26 @@ export class LayerTable {
|
|
1032
1034
|
this._checkEditEnabled();
|
1033
1035
|
this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
|
1034
1036
|
await this._table.when();
|
1035
|
-
|
1037
|
+
// This is a workaround.
|
1038
|
+
// In some cases the first time the app is loaded this._table.state === "loaded" is not being hit.
|
1039
|
+
// When this issue occurs we will wait for 1 second and attempt to finish the loading process
|
1040
|
+
setTimeout(() => {
|
1041
|
+
if (!this._loaded) {
|
1042
|
+
console.log(`table.state: ${this._table.state}`);
|
1043
|
+
void this.finishLoading();
|
1044
|
+
}
|
1045
|
+
}, 1000);
|
1036
1046
|
await this.reactiveUtils.once(() => this._table.state === "loaded")
|
1037
1047
|
.then(async () => {
|
1038
|
-
|
1048
|
+
await this.finishLoading();
|
1049
|
+
});
|
1050
|
+
}
|
1051
|
+
/**
|
1052
|
+
* Finish the table loading tasks
|
1053
|
+
*/
|
1054
|
+
async finishLoading() {
|
1055
|
+
try {
|
1056
|
+
this._loaded = true;
|
1039
1057
|
this._table.highlightIds.removeAll();
|
1040
1058
|
this._table.clearSelectionFilter();
|
1041
1059
|
this._resetColumnTemplates();
|
@@ -1044,7 +1062,10 @@ export class LayerTable {
|
|
1044
1062
|
await this._sortTable();
|
1045
1063
|
this._initToolInfos();
|
1046
1064
|
this._updateToolbar();
|
1047
|
-
}
|
1065
|
+
}
|
1066
|
+
catch (e) {
|
1067
|
+
console.log(e);
|
1068
|
+
}
|
1048
1069
|
}
|
1049
1070
|
/**
|
1050
1071
|
* Update the current IDs when that layers data is modified
|
@@ -1139,23 +1160,18 @@ export class LayerTable {
|
|
1139
1160
|
* Sort the table with the configured field and the sort order
|
1140
1161
|
*/
|
1141
1162
|
async _sortTable() {
|
1142
|
-
var _a, _b, _c, _d, _e, _f
|
1143
|
-
console.log("_sortTable");
|
1144
|
-
console.log(this._table);
|
1145
|
-
console.log(this._layer);
|
1146
|
-
console.log((_b = (_a = this.mapInfo) === null || _a === void 0 ? void 0 : _a.layerOptions) === null || _b === void 0 ? void 0 : _b.layers);
|
1147
|
-
console.log((_d = (_c = this.mapInfo) === null || _c === void 0 ? void 0 : _c.layerOptions) === null || _d === void 0 ? void 0 : _d.layers);
|
1163
|
+
var _a, _b, _c, _d, _e, _f;
|
1148
1164
|
//By default sort the table using objectIdField and in descending order
|
1149
|
-
let sortField = (
|
1165
|
+
let sortField = (_a = this._layer) === null || _a === void 0 ? void 0 : _a.objectIdField;
|
1150
1166
|
let sortOrder = 'desc';
|
1151
1167
|
let configuredLayer;
|
1152
1168
|
//get the sortField and sortOrder from the configuration
|
1153
|
-
if (((
|
1169
|
+
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)) {
|
1154
1170
|
configuredLayer = this.mapInfo.layerOptions.layers.filter((layer) => layer.id === this._layer.id);
|
1155
1171
|
if (configuredLayer && configuredLayer.length > 0) {
|
1156
1172
|
configuredLayer = configuredLayer[0];
|
1157
1173
|
//if sort field is defined and sortField is available in the fields then use it
|
1158
|
-
if (configuredLayer.sortField && ((
|
1174
|
+
if (configuredLayer.sortField && ((_f = configuredLayer.fields) === null || _f === void 0 ? void 0 : _f.includes(configuredLayer.sortField))) {
|
1159
1175
|
sortField = configuredLayer.sortField;
|
1160
1176
|
}
|
1161
1177
|
//use sort order if configured
|
@@ -1163,10 +1179,8 @@ export class LayerTable {
|
|
1163
1179
|
}
|
1164
1180
|
}
|
1165
1181
|
if (this._table && this._layer) {
|
1166
|
-
console.log("has layer and has table");
|
1167
1182
|
await this._table.when();
|
1168
1183
|
await this._layer.when(() => {
|
1169
|
-
console.log("sort on this._layer.when");
|
1170
1184
|
this._table.sortColumn(sortField, sortOrder);
|
1171
1185
|
});
|
1172
1186
|
}
|
@@ -1280,6 +1294,7 @@ export class LayerTable {
|
|
1280
1294
|
const id = result.graphic.getObjectId();
|
1281
1295
|
const index = this._table.highlightIds.indexOf(id);
|
1282
1296
|
if (index < 0) {
|
1297
|
+
this._selectionFromMap = true;
|
1283
1298
|
this._table.highlightIds.add(id);
|
1284
1299
|
}
|
1285
1300
|
});
|
@@ -617,7 +617,9 @@ export function _prepareAttributeValue(attributeValue, attributeType, attributeD
|
|
617
617
|
value = intl.formatNumber(value, numberFormatIntlOptions);
|
618
618
|
}
|
619
619
|
else {
|
620
|
-
value = intl.formatNumber(value)
|
620
|
+
value = intl.formatNumber(value === null || value === void 0 ? void 0 : value.toString(), {
|
621
|
+
maximumFractionDigits: 100
|
622
|
+
});
|
621
623
|
}
|
622
624
|
break;
|
623
625
|
}
|
@@ -859,7 +859,9 @@ export function _prepareAttributeValue(
|
|
859
859
|
const numberFormatIntlOptions = intl.convertNumberFormatToIntlOptions(attributeFormat)
|
860
860
|
value = intl.formatNumber(value, numberFormatIntlOptions);
|
861
861
|
} else {
|
862
|
-
value = intl.formatNumber(value)
|
862
|
+
value = intl.formatNumber(value?.toString(), {
|
863
|
+
maximumFractionDigits: 100
|
864
|
+
});
|
863
865
|
}
|
864
866
|
break;
|
865
867
|
}
|
@@ -2935,7 +2935,9 @@ function _prepareAttributeValue(attributeValue, attributeType, attributeDomain,
|
|
2935
2935
|
value = intl.formatNumber(value, numberFormatIntlOptions);
|
2936
2936
|
}
|
2937
2937
|
else {
|
2938
|
-
value = intl.formatNumber(value)
|
2938
|
+
value = intl.formatNumber(value === null || value === void 0 ? void 0 : value.toString(), {
|
2939
|
+
maximumFractionDigits: 100
|
2940
|
+
});
|
2939
2941
|
}
|
2940
2942
|
break;
|
2941
2943
|
}
|