@esri/solutions-components 0.8.61 → 0.8.63
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.
- 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
|
@@ -73,10 +73,18 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
|
73
73
|
* boolean: When true the default OID provided via url param has been honored and should now be ignored
|
|
74
74
|
*/
|
|
75
75
|
this._defaultOidHonored = false;
|
|
76
|
+
/**
|
|
77
|
+
* boolean: When true the table has been successfully loaded
|
|
78
|
+
*/
|
|
79
|
+
this._loaded = false;
|
|
76
80
|
/**
|
|
77
81
|
* boolean: When true the observer has been set and we don't need to set it again
|
|
78
82
|
*/
|
|
79
83
|
this._observerSet = false;
|
|
84
|
+
/**
|
|
85
|
+
* boolean: When true the current selection was done via the map and we will ignore shift->Select
|
|
86
|
+
*/
|
|
87
|
+
this._selectionFromMap = false;
|
|
80
88
|
/**
|
|
81
89
|
* boolean: When true the shift key is currently pressed
|
|
82
90
|
*/
|
|
@@ -358,7 +366,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
|
358
366
|
const selected = this.selectedIds.length.toString();
|
|
359
367
|
const tableHeightClass = this.isMobile ? "height-full" : "height-full-adjusted";
|
|
360
368
|
this._validateActiveActions();
|
|
361
|
-
return (h(Host, { key: '
|
|
369
|
+
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
|
|
362
370
|
.replace("{{total}}", total)
|
|
363
371
|
.replace("{{selected}}", selected))) : undefined)), this._filterModal()));
|
|
364
372
|
}
|
|
@@ -935,7 +943,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
|
935
943
|
async _handleOnChange(evt) {
|
|
936
944
|
const ids = [...this._table.highlightIds.toArray()];
|
|
937
945
|
if (!this._skipOnChange) {
|
|
938
|
-
if (!this._ctrlIsPressed && !this._shiftIsPressed) {
|
|
946
|
+
if ((!this._ctrlIsPressed && !this._shiftIsPressed) || (this._selectionFromMap && this._shiftIsPressed)) {
|
|
939
947
|
if (this.selectedIds.length > 0) {
|
|
940
948
|
this._skipOnChange = true;
|
|
941
949
|
// only readd in specific case where we have multiple selected and then click one of the currently selected
|
|
@@ -958,7 +966,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
|
958
966
|
else if (this._ctrlIsPressed) {
|
|
959
967
|
this.selectedIds = ids.reverse();
|
|
960
968
|
}
|
|
961
|
-
else if (this._shiftIsPressed) {
|
|
969
|
+
else if (this._shiftIsPressed && (ids === null || ids === void 0 ? void 0 : ids.length) > 0) {
|
|
962
970
|
this._skipOnChange = true;
|
|
963
971
|
this._previousCurrentId = this._currentId;
|
|
964
972
|
this._currentId = [...ids].reverse()[0];
|
|
@@ -1002,6 +1010,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
|
1002
1010
|
this._skipOnChange = false;
|
|
1003
1011
|
}
|
|
1004
1012
|
this._currentId = [...this._table.highlightIds.toArray()].reverse()[0];
|
|
1013
|
+
this._selectionFromMap = false;
|
|
1005
1014
|
}
|
|
1006
1015
|
/**
|
|
1007
1016
|
* Handle any updates after a selection change has occured and emit the results
|
|
@@ -1022,16 +1031,11 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
|
1022
1031
|
*/
|
|
1023
1032
|
_resetColumnTemplates() {
|
|
1024
1033
|
var _a, _b;
|
|
1025
|
-
console.log("_resetColumnTemplates");
|
|
1026
1034
|
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);
|
|
1027
1035
|
const hasChange = columnTemplates === null || columnTemplates === void 0 ? void 0 : columnTemplates.some((ct, i) => {
|
|
1028
1036
|
var _a;
|
|
1029
1037
|
return JSON.stringify((_a = this._table) === null || _a === void 0 ? void 0 : _a.tableTemplate.columnTemplates[i]) !== JSON.stringify(ct);
|
|
1030
1038
|
});
|
|
1031
|
-
console.log(this._table);
|
|
1032
|
-
console.log(columnTemplates);
|
|
1033
|
-
console.log(hasChange);
|
|
1034
|
-
console.log(!this._columnsInfo);
|
|
1035
1039
|
if (this._table && columnTemplates && (hasChange || !this._columnsInfo)) {
|
|
1036
1040
|
this._table.tableTemplate = new this.TableTemplate({
|
|
1037
1041
|
columnTemplates
|
|
@@ -1045,9 +1049,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
|
1045
1049
|
*/
|
|
1046
1050
|
async _resetTable() {
|
|
1047
1051
|
var _a;
|
|
1048
|
-
|
|
1049
|
-
console.log(this._table);
|
|
1050
|
-
console.log(this._layer);
|
|
1052
|
+
this._loaded = false;
|
|
1051
1053
|
this._clearSelection();
|
|
1052
1054
|
this._allIds = await queryAllIds(this._layer);
|
|
1053
1055
|
if (!this._table) {
|
|
@@ -1062,10 +1064,26 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
|
1062
1064
|
this._checkEditEnabled();
|
|
1063
1065
|
this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
|
|
1064
1066
|
await this._table.when();
|
|
1065
|
-
|
|
1067
|
+
// This is a workaround.
|
|
1068
|
+
// In some cases the first time the app is loaded this._table.state === "loaded" is not being hit.
|
|
1069
|
+
// When this issue occurs we will wait for 1 second and attempt to finish the loading process
|
|
1070
|
+
setTimeout(() => {
|
|
1071
|
+
if (!this._loaded) {
|
|
1072
|
+
console.log(`table.state: ${this._table.state}`);
|
|
1073
|
+
void this.finishLoading();
|
|
1074
|
+
}
|
|
1075
|
+
}, 1000);
|
|
1066
1076
|
await this.reactiveUtils.once(() => this._table.state === "loaded")
|
|
1067
1077
|
.then(async () => {
|
|
1068
|
-
|
|
1078
|
+
await this.finishLoading();
|
|
1079
|
+
});
|
|
1080
|
+
}
|
|
1081
|
+
/**
|
|
1082
|
+
* Finish the table loading tasks
|
|
1083
|
+
*/
|
|
1084
|
+
async finishLoading() {
|
|
1085
|
+
try {
|
|
1086
|
+
this._loaded = true;
|
|
1069
1087
|
this._table.highlightIds.removeAll();
|
|
1070
1088
|
this._table.clearSelectionFilter();
|
|
1071
1089
|
this._resetColumnTemplates();
|
|
@@ -1074,7 +1092,10 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
|
1074
1092
|
await this._sortTable();
|
|
1075
1093
|
this._initToolInfos();
|
|
1076
1094
|
this._updateToolbar();
|
|
1077
|
-
}
|
|
1095
|
+
}
|
|
1096
|
+
catch (e) {
|
|
1097
|
+
console.log(e);
|
|
1098
|
+
}
|
|
1078
1099
|
}
|
|
1079
1100
|
/**
|
|
1080
1101
|
* Update the current IDs when that layers data is modified
|
|
@@ -1169,23 +1190,18 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
|
1169
1190
|
* Sort the table with the configured field and the sort order
|
|
1170
1191
|
*/
|
|
1171
1192
|
async _sortTable() {
|
|
1172
|
-
var _a, _b, _c, _d, _e, _f
|
|
1173
|
-
console.log("_sortTable");
|
|
1174
|
-
console.log(this._table);
|
|
1175
|
-
console.log(this._layer);
|
|
1176
|
-
console.log((_b = (_a = this.mapInfo) === null || _a === void 0 ? void 0 : _a.layerOptions) === null || _b === void 0 ? void 0 : _b.layers);
|
|
1177
|
-
console.log((_d = (_c = this.mapInfo) === null || _c === void 0 ? void 0 : _c.layerOptions) === null || _d === void 0 ? void 0 : _d.layers);
|
|
1193
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1178
1194
|
//By default sort the table using objectIdField and in descending order
|
|
1179
|
-
let sortField = (
|
|
1195
|
+
let sortField = (_a = this._layer) === null || _a === void 0 ? void 0 : _a.objectIdField;
|
|
1180
1196
|
let sortOrder = 'desc';
|
|
1181
1197
|
let configuredLayer;
|
|
1182
1198
|
//get the sortField and sortOrder from the configuration
|
|
1183
|
-
if (((
|
|
1199
|
+
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)) {
|
|
1184
1200
|
configuredLayer = this.mapInfo.layerOptions.layers.filter((layer) => layer.id === this._layer.id);
|
|
1185
1201
|
if (configuredLayer && configuredLayer.length > 0) {
|
|
1186
1202
|
configuredLayer = configuredLayer[0];
|
|
1187
1203
|
//if sort field is defined and sortField is available in the fields then use it
|
|
1188
|
-
if (configuredLayer.sortField && ((
|
|
1204
|
+
if (configuredLayer.sortField && ((_f = configuredLayer.fields) === null || _f === void 0 ? void 0 : _f.includes(configuredLayer.sortField))) {
|
|
1189
1205
|
sortField = configuredLayer.sortField;
|
|
1190
1206
|
}
|
|
1191
1207
|
//use sort order if configured
|
|
@@ -1193,10 +1209,8 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
|
1193
1209
|
}
|
|
1194
1210
|
}
|
|
1195
1211
|
if (this._table && this._layer) {
|
|
1196
|
-
console.log("has layer and has table");
|
|
1197
1212
|
await this._table.when();
|
|
1198
1213
|
await this._layer.when(() => {
|
|
1199
|
-
console.log("sort on this._layer.when");
|
|
1200
1214
|
this._table.sortColumn(sortField, sortOrder);
|
|
1201
1215
|
});
|
|
1202
1216
|
}
|
|
@@ -1310,6 +1324,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
|
1310
1324
|
const id = result.graphic.getObjectId();
|
|
1311
1325
|
const index = this._table.highlightIds.indexOf(id);
|
|
1312
1326
|
if (index < 0) {
|
|
1327
|
+
this._selectionFromMap = true;
|
|
1313
1328
|
this._table.highlightIds.add(id);
|
|
1314
1329
|
}
|
|
1315
1330
|
});
|
|
@@ -173,6 +173,16 @@ function updateItem$1(requestOptions) {
|
|
|
173
173
|
if (requestOptions.params.extent && isBBox(requestOptions.params.extent)) {
|
|
174
174
|
requestOptions.params.extent = bboxToString(requestOptions.params.extent);
|
|
175
175
|
}
|
|
176
|
+
/* istanbul ignore if */
|
|
177
|
+
if (requestOptions.params.file &&
|
|
178
|
+
requestOptions.params.file.constructor &&
|
|
179
|
+
requestOptions.params.file.constructor.name === 'ReadStream') {
|
|
180
|
+
// dataSize is not an official parameter for the ArcGIS REST API but is needed
|
|
181
|
+
// to encode the ReadStream with an appropriate length. This is to overcome
|
|
182
|
+
// the form-data library bug:
|
|
183
|
+
// https://github.com/form-data/form-data/issues/508
|
|
184
|
+
requestOptions.params.dataSize = requestOptions.dataSize;
|
|
185
|
+
}
|
|
176
186
|
return request(url, requestOptions);
|
|
177
187
|
});
|
|
178
188
|
}
|
|
@@ -13,7 +13,7 @@ import { c as connectMessages, s as setUpMessages, d as disconnectMessages, u as
|
|
|
13
13
|
import { K as KindIcons } from './resources-ae36eaff.js';
|
|
14
14
|
import { g as getLocaleComponentStrings, l as loadModules } from './locale-4adfc8cf.js';
|
|
15
15
|
import { a as getAllLayers } from './mapViewUtils-e3de60cc.js';
|
|
16
|
-
import { P as PopupUtils } from './popupUtils-
|
|
16
|
+
import { P as PopupUtils } from './popupUtils-ecec5e6d.js';
|
|
17
17
|
import './guid-f05d01d5.js';
|
|
18
18
|
import './resources-1febf4c6.js';
|
|
19
19
|
import './key-092b6260.js';
|
|
@@ -21,7 +21,7 @@ import './observers-fcb1c07b.js';
|
|
|
21
21
|
import './esri-loader-c6842c6b.js';
|
|
22
22
|
import './_commonjsHelpers-089957fe.js';
|
|
23
23
|
import './interfaces-586e863c.js';
|
|
24
|
-
import './downloadUtils-
|
|
24
|
+
import './downloadUtils-f6e2a736.js';
|
|
25
25
|
import './solution-resource-3108caf7.js';
|
|
26
26
|
import './index-a1e91462.js';
|
|
27
27
|
import './restHelpersGet-5c822bcd.js';
|
|
@@ -21,7 +21,7 @@ import { d as dragActive, a as disconnectSortableComponent, c as connectSortable
|
|
|
21
21
|
import { C as CSS$5, S as SLOTS$3 } from './resources-dd68a4aa.js';
|
|
22
22
|
import { I as ICON_TYPES$1 } from './resources-e4b779b0.js';
|
|
23
23
|
import { g as getLocaleComponentStrings } from './locale-4adfc8cf.js';
|
|
24
|
-
import { s as state } from './solution-store-
|
|
24
|
+
import { s as state } from './solution-store-840c5489.js';
|
|
25
25
|
import { d as EUpdateType } from './interfaces-586e863c.js';
|
|
26
26
|
import { E as EFileType } from './solution-resource-3108caf7.js';
|
|
27
27
|
import './index-a1e91462.js';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-83b693bc.js';
|
|
7
7
|
import { g as getLocaleComponentStrings, l as loadModules } from './locale-4adfc8cf.js';
|
|
8
8
|
import { q as queryFeaturesByID, g as getLayerOrTable, e as goToSelection, f as queryAllIds, i as queryAllOidsWithQueryFeatures, j as queryFeaturesByGlobalID, c as getFeatureLayerView } from './mapViewUtils-e3de60cc.js';
|
|
9
|
-
import { d as downloadCSV } from './downloadUtils-
|
|
9
|
+
import { d as downloadCSV } from './downloadUtils-f6e2a736.js';
|
|
10
10
|
import './esri-loader-c6842c6b.js';
|
|
11
11
|
import './_commonjsHelpers-089957fe.js';
|
|
12
12
|
import './interfaces-586e863c.js';
|
|
@@ -126,10 +126,18 @@ const LayerTable = class {
|
|
|
126
126
|
* boolean: When true the default OID provided via url param has been honored and should now be ignored
|
|
127
127
|
*/
|
|
128
128
|
this._defaultOidHonored = false;
|
|
129
|
+
/**
|
|
130
|
+
* boolean: When true the table has been successfully loaded
|
|
131
|
+
*/
|
|
132
|
+
this._loaded = false;
|
|
129
133
|
/**
|
|
130
134
|
* boolean: When true the observer has been set and we don't need to set it again
|
|
131
135
|
*/
|
|
132
136
|
this._observerSet = false;
|
|
137
|
+
/**
|
|
138
|
+
* boolean: When true the current selection was done via the map and we will ignore shift->Select
|
|
139
|
+
*/
|
|
140
|
+
this._selectionFromMap = false;
|
|
133
141
|
/**
|
|
134
142
|
* boolean: When true the shift key is currently pressed
|
|
135
143
|
*/
|
|
@@ -411,7 +419,7 @@ const LayerTable = class {
|
|
|
411
419
|
const selected = this.selectedIds.length.toString();
|
|
412
420
|
const tableHeightClass = this.isMobile ? "height-full" : "height-full-adjusted";
|
|
413
421
|
this._validateActiveActions();
|
|
414
|
-
return (h(Host, { key: '
|
|
422
|
+
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
|
|
415
423
|
.replace("{{total}}", total)
|
|
416
424
|
.replace("{{selected}}", selected))) : undefined)), this._filterModal()));
|
|
417
425
|
}
|
|
@@ -988,7 +996,7 @@ const LayerTable = class {
|
|
|
988
996
|
async _handleOnChange(evt) {
|
|
989
997
|
const ids = [...this._table.highlightIds.toArray()];
|
|
990
998
|
if (!this._skipOnChange) {
|
|
991
|
-
if (!this._ctrlIsPressed && !this._shiftIsPressed) {
|
|
999
|
+
if ((!this._ctrlIsPressed && !this._shiftIsPressed) || (this._selectionFromMap && this._shiftIsPressed)) {
|
|
992
1000
|
if (this.selectedIds.length > 0) {
|
|
993
1001
|
this._skipOnChange = true;
|
|
994
1002
|
// only readd in specific case where we have multiple selected and then click one of the currently selected
|
|
@@ -1011,7 +1019,7 @@ const LayerTable = class {
|
|
|
1011
1019
|
else if (this._ctrlIsPressed) {
|
|
1012
1020
|
this.selectedIds = ids.reverse();
|
|
1013
1021
|
}
|
|
1014
|
-
else if (this._shiftIsPressed) {
|
|
1022
|
+
else if (this._shiftIsPressed && (ids === null || ids === void 0 ? void 0 : ids.length) > 0) {
|
|
1015
1023
|
this._skipOnChange = true;
|
|
1016
1024
|
this._previousCurrentId = this._currentId;
|
|
1017
1025
|
this._currentId = [...ids].reverse()[0];
|
|
@@ -1055,6 +1063,7 @@ const LayerTable = class {
|
|
|
1055
1063
|
this._skipOnChange = false;
|
|
1056
1064
|
}
|
|
1057
1065
|
this._currentId = [...this._table.highlightIds.toArray()].reverse()[0];
|
|
1066
|
+
this._selectionFromMap = false;
|
|
1058
1067
|
}
|
|
1059
1068
|
/**
|
|
1060
1069
|
* Handle any updates after a selection change has occured and emit the results
|
|
@@ -1075,16 +1084,11 @@ const LayerTable = class {
|
|
|
1075
1084
|
*/
|
|
1076
1085
|
_resetColumnTemplates() {
|
|
1077
1086
|
var _a, _b;
|
|
1078
|
-
console.log("_resetColumnTemplates");
|
|
1079
1087
|
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);
|
|
1080
1088
|
const hasChange = columnTemplates === null || columnTemplates === void 0 ? void 0 : columnTemplates.some((ct, i) => {
|
|
1081
1089
|
var _a;
|
|
1082
1090
|
return JSON.stringify((_a = this._table) === null || _a === void 0 ? void 0 : _a.tableTemplate.columnTemplates[i]) !== JSON.stringify(ct);
|
|
1083
1091
|
});
|
|
1084
|
-
console.log(this._table);
|
|
1085
|
-
console.log(columnTemplates);
|
|
1086
|
-
console.log(hasChange);
|
|
1087
|
-
console.log(!this._columnsInfo);
|
|
1088
1092
|
if (this._table && columnTemplates && (hasChange || !this._columnsInfo)) {
|
|
1089
1093
|
this._table.tableTemplate = new this.TableTemplate({
|
|
1090
1094
|
columnTemplates
|
|
@@ -1098,9 +1102,7 @@ const LayerTable = class {
|
|
|
1098
1102
|
*/
|
|
1099
1103
|
async _resetTable() {
|
|
1100
1104
|
var _a;
|
|
1101
|
-
|
|
1102
|
-
console.log(this._table);
|
|
1103
|
-
console.log(this._layer);
|
|
1105
|
+
this._loaded = false;
|
|
1104
1106
|
this._clearSelection();
|
|
1105
1107
|
this._allIds = await queryAllIds(this._layer);
|
|
1106
1108
|
if (!this._table) {
|
|
@@ -1115,10 +1117,26 @@ const LayerTable = class {
|
|
|
1115
1117
|
this._checkEditEnabled();
|
|
1116
1118
|
this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
|
|
1117
1119
|
await this._table.when();
|
|
1118
|
-
|
|
1120
|
+
// This is a workaround.
|
|
1121
|
+
// In some cases the first time the app is loaded this._table.state === "loaded" is not being hit.
|
|
1122
|
+
// When this issue occurs we will wait for 1 second and attempt to finish the loading process
|
|
1123
|
+
setTimeout(() => {
|
|
1124
|
+
if (!this._loaded) {
|
|
1125
|
+
console.log(`table.state: ${this._table.state}`);
|
|
1126
|
+
void this.finishLoading();
|
|
1127
|
+
}
|
|
1128
|
+
}, 1000);
|
|
1119
1129
|
await this.reactiveUtils.once(() => this._table.state === "loaded")
|
|
1120
1130
|
.then(async () => {
|
|
1121
|
-
|
|
1131
|
+
await this.finishLoading();
|
|
1132
|
+
});
|
|
1133
|
+
}
|
|
1134
|
+
/**
|
|
1135
|
+
* Finish the table loading tasks
|
|
1136
|
+
*/
|
|
1137
|
+
async finishLoading() {
|
|
1138
|
+
try {
|
|
1139
|
+
this._loaded = true;
|
|
1122
1140
|
this._table.highlightIds.removeAll();
|
|
1123
1141
|
this._table.clearSelectionFilter();
|
|
1124
1142
|
this._resetColumnTemplates();
|
|
@@ -1127,7 +1145,10 @@ const LayerTable = class {
|
|
|
1127
1145
|
await this._sortTable();
|
|
1128
1146
|
this._initToolInfos();
|
|
1129
1147
|
this._updateToolbar();
|
|
1130
|
-
}
|
|
1148
|
+
}
|
|
1149
|
+
catch (e) {
|
|
1150
|
+
console.log(e);
|
|
1151
|
+
}
|
|
1131
1152
|
}
|
|
1132
1153
|
/**
|
|
1133
1154
|
* Update the current IDs when that layers data is modified
|
|
@@ -1222,23 +1243,18 @@ const LayerTable = class {
|
|
|
1222
1243
|
* Sort the table with the configured field and the sort order
|
|
1223
1244
|
*/
|
|
1224
1245
|
async _sortTable() {
|
|
1225
|
-
var _a, _b, _c, _d, _e, _f
|
|
1226
|
-
console.log("_sortTable");
|
|
1227
|
-
console.log(this._table);
|
|
1228
|
-
console.log(this._layer);
|
|
1229
|
-
console.log((_b = (_a = this.mapInfo) === null || _a === void 0 ? void 0 : _a.layerOptions) === null || _b === void 0 ? void 0 : _b.layers);
|
|
1230
|
-
console.log((_d = (_c = this.mapInfo) === null || _c === void 0 ? void 0 : _c.layerOptions) === null || _d === void 0 ? void 0 : _d.layers);
|
|
1246
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1231
1247
|
//By default sort the table using objectIdField and in descending order
|
|
1232
|
-
let sortField = (
|
|
1248
|
+
let sortField = (_a = this._layer) === null || _a === void 0 ? void 0 : _a.objectIdField;
|
|
1233
1249
|
let sortOrder = 'desc';
|
|
1234
1250
|
let configuredLayer;
|
|
1235
1251
|
//get the sortField and sortOrder from the configuration
|
|
1236
|
-
if (((
|
|
1252
|
+
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)) {
|
|
1237
1253
|
configuredLayer = this.mapInfo.layerOptions.layers.filter((layer) => layer.id === this._layer.id);
|
|
1238
1254
|
if (configuredLayer && configuredLayer.length > 0) {
|
|
1239
1255
|
configuredLayer = configuredLayer[0];
|
|
1240
1256
|
//if sort field is defined and sortField is available in the fields then use it
|
|
1241
|
-
if (configuredLayer.sortField && ((
|
|
1257
|
+
if (configuredLayer.sortField && ((_f = configuredLayer.fields) === null || _f === void 0 ? void 0 : _f.includes(configuredLayer.sortField))) {
|
|
1242
1258
|
sortField = configuredLayer.sortField;
|
|
1243
1259
|
}
|
|
1244
1260
|
//use sort order if configured
|
|
@@ -1246,10 +1262,8 @@ const LayerTable = class {
|
|
|
1246
1262
|
}
|
|
1247
1263
|
}
|
|
1248
1264
|
if (this._table && this._layer) {
|
|
1249
|
-
console.log("has layer and has table");
|
|
1250
1265
|
await this._table.when();
|
|
1251
1266
|
await this._layer.when(() => {
|
|
1252
|
-
console.log("sort on this._layer.when");
|
|
1253
1267
|
this._table.sortColumn(sortField, sortOrder);
|
|
1254
1268
|
});
|
|
1255
1269
|
}
|
|
@@ -1363,6 +1377,7 @@ const LayerTable = class {
|
|
|
1363
1377
|
const id = result.graphic.getObjectId();
|
|
1364
1378
|
const index = this._table.highlightIds.indexOf(id);
|
|
1365
1379
|
if (index < 0) {
|
|
1380
|
+
this._selectionFromMap = true;
|
|
1366
1381
|
this._table.highlightIds.add(id);
|
|
1367
1382
|
}
|
|
1368
1383
|
});
|
|
@@ -1510,7 +1510,7 @@ function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++
|
|
|
1510
1510
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1511
1511
|
* ====================================================================
|
|
1512
1512
|
*/
|
|
1513
|
-
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-
|
|
1513
|
+
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-89f753c1.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},
|
|
1514
1514
|
/** ====================================================================
|
|
1515
1515
|
* @license
|
|
1516
1516
|
* jsPDF XMP metadata plugin
|
|
@@ -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
|
}
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-83b693bc.js';
|
|
7
7
|
import { l as loadModules, g as getLocaleComponentStrings } from './locale-4adfc8cf.js';
|
|
8
|
-
import { P as PopupUtils } from './popupUtils-
|
|
8
|
+
import { P as PopupUtils } from './popupUtils-ecec5e6d.js';
|
|
9
9
|
import { g as getLayerOrTable, c as getFeatureLayerView, h as highlightFeatures } from './mapViewUtils-e3de60cc.js';
|
|
10
10
|
import './esri-loader-c6842c6b.js';
|
|
11
11
|
import './_commonjsHelpers-089957fe.js';
|
|
12
|
-
import './downloadUtils-
|
|
12
|
+
import './downloadUtils-f6e2a736.js';
|
|
13
13
|
import './solution-resource-3108caf7.js';
|
|
14
14
|
import './index-a1e91462.js';
|
|
15
15
|
import './restHelpersGet-5c822bcd.js';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { c as commonjsGlobal, g as getDefaultExportFromCjs } from './_commonjsHelpers-089957fe.js';
|
|
7
|
-
import { b as _typeof$1 } from './downloadUtils-
|
|
7
|
+
import { b as _typeof$1 } from './downloadUtils-f6e2a736.js';
|
|
8
8
|
import './index-83b693bc.js';
|
|
9
9
|
import './locale-4adfc8cf.js';
|
|
10
10
|
import './esri-loader-c6842c6b.js';
|
|
@@ -8,7 +8,7 @@ import { a as getComponentClosestLanguage, l as loadModules, g as getLocaleCompo
|
|
|
8
8
|
import { e as goToSelection, h as highlightFeatures, k as queryObjectIds, l as getQueryGeoms, c as getFeatureLayerView, m as queryFeaturesByGeometry, n as getIdSets, o as highlightAllFeatures } from './mapViewUtils-e3de60cc.js';
|
|
9
9
|
import { a as EWorkflowType, e as ESelectionMode, f as EDrawMode } from './interfaces-586e863c.js';
|
|
10
10
|
import { s as state } from './publicNotificationStore-08faccff.js';
|
|
11
|
-
import { d as downloadCSV, a as downloadPDF } from './downloadUtils-
|
|
11
|
+
import { d as downloadCSV, a as downloadPDF } from './downloadUtils-f6e2a736.js';
|
|
12
12
|
import './esri-loader-c6842c6b.js';
|
|
13
13
|
import './_commonjsHelpers-089957fe.js';
|
|
14
14
|
import './index-d97f4f15.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { _ as _prepareAttributeValue } from './downloadUtils-
|
|
6
|
+
import { _ as _prepareAttributeValue } from './downloadUtils-f6e2a736.js';
|
|
7
7
|
import { l as loadModules } from './locale-4adfc8cf.js';
|
|
8
8
|
|
|
9
9
|
/** @license
|
|
@@ -8,7 +8,7 @@ import { b as EExportType, c as EPageType, a as EWorkflowType } from './interfac
|
|
|
8
8
|
import { l as loadModules, g as getLocaleComponentStrings } from './locale-4adfc8cf.js';
|
|
9
9
|
import { e as goToSelection, h as highlightFeatures } from './mapViewUtils-e3de60cc.js';
|
|
10
10
|
import { s as state } from './publicNotificationStore-08faccff.js';
|
|
11
|
-
import { c as consolidateLabels, r as removeDuplicateLabels } from './downloadUtils-
|
|
11
|
+
import { c as consolidateLabels, r as removeDuplicateLabels } from './downloadUtils-f6e2a736.js';
|
|
12
12
|
import './esri-loader-c6842c6b.js';
|
|
13
13
|
import './_commonjsHelpers-089957fe.js';
|
|
14
14
|
import './index-d97f4f15.js';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-83b693bc.js';
|
|
7
7
|
import { g as getSolutionVariables, a as getOrganizationVariables, b as getInventoryItems } from './templates-824ea028.js';
|
|
8
|
-
import { s as state } from './solution-store-
|
|
8
|
+
import { s as state } from './solution-store-840c5489.js';
|
|
9
9
|
import './solution-resource-3108caf7.js';
|
|
10
10
|
import { r as request, N as NODEJS_DEFAULT_REFERER_HEADER, c as cleanUrl, e as encodeQueryString, A as ArcGISAuthError, a as getProp } from './restHelpersGet-5c822bcd.js';
|
|
11
11
|
import './index-a1e91462.js';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-83b693bc.js';
|
|
7
|
-
import { s as state } from './solution-store-
|
|
7
|
+
import { s as state } from './solution-store-840c5489.js';
|
|
8
8
|
import { g as getLocaleComponentStrings } from './locale-4adfc8cf.js';
|
|
9
9
|
import { n as nodeListToArray } from './common-96e3ddb0.js';
|
|
10
10
|
import './index-d97f4f15.js';
|
|
@@ -173,6 +173,16 @@ function updateItem$1(requestOptions) {
|
|
|
173
173
|
if (requestOptions.params.extent && isBBox(requestOptions.params.extent)) {
|
|
174
174
|
requestOptions.params.extent = bboxToString(requestOptions.params.extent);
|
|
175
175
|
}
|
|
176
|
+
/* istanbul ignore if */
|
|
177
|
+
if (requestOptions.params.file &&
|
|
178
|
+
requestOptions.params.file.constructor &&
|
|
179
|
+
requestOptions.params.file.constructor.name === 'ReadStream') {
|
|
180
|
+
// dataSize is not an official parameter for the ArcGIS REST API but is needed
|
|
181
|
+
// to encode the ReadStream with an appropriate length. This is to overcome
|
|
182
|
+
// the form-data library bug:
|
|
183
|
+
// https://github.com/form-data/form-data/issues/508
|
|
184
|
+
requestOptions.params.dataSize = requestOptions.dataSize;
|
|
185
|
+
}
|
|
176
186
|
return request(url, requestOptions);
|
|
177
187
|
});
|
|
178
188
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, c as createEvent, g as getElement } from './index-83b693bc.js';
|
|
7
|
-
import { s as state } from './solution-store-
|
|
7
|
+
import { s as state } from './solution-store-840c5489.js';
|
|
8
8
|
import { c as getFeatureServices, d as getSpatialReferenceInfo } from './templates-824ea028.js';
|
|
9
9
|
import './index-d97f4f15.js';
|
|
10
10
|
import './interfaces-586e863c.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{_ as t}from"./p-
|
|
6
|
+
import{_ as t}from"./p-593036f3.js";import{l as i}from"./p-c0bf1d9f.js";
|
|
7
7
|
/** @license
|
|
8
8
|
* Copyright 2022 Esri
|
|
9
9
|
*
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as e,h as i,H as a,g as s}from"./p-fa1ceaf9.js";import{s as l}from"./p-
|
|
6
|
+
import{r as t,c as e,h as i,H as a,g as s}from"./p-fa1ceaf9.js";import{s as l}from"./p-c1936856.js";import{g as c}from"./p-c0bf1d9f.js";import{n}from"./p-eed41e1a.js";import"./p-8c6d9b5a.js";import"./p-c1cf3ebc.js";import"./p-3d7cff5e.js";import"./p-d4056c1c.js";import"./p-a230b270.js";import"./p-a0300d31.js";import"./p-0a24ad5f.js";const r=class{constructor(i){t(this,i),this.solutionItemSelected=e(this,"solutionItemSelected",7),this.selectedItemId=void 0,this.templateHierarchy=[]}valueWatchHandler(t,e){t&&t!==e&&Array.isArray(t)&&t.length>0&&this._treeItemSelected(t[0].id)}componentWillLoad(){this.valueWatchHandler(this.templateHierarchy,[])}render(){return i(a,{key:"7546d1fe9d944520db9f8f81600fb7cf0655f1ab"},i("calcite-tree",{key:"94bea7616cd3bdbb9fbcaddd49bb394e11bcf88b"},this.renderHierarchy(this.templateHierarchy)))}renderHierarchy(t){return t.map((t=>{const e=this.selectedItemId&&this.selectedItemId===t.id;return t.dependencies&&t.dependencies.length>0?i("calcite-tree-item",{onClick:e=>this._treeItemSelected(t.id,e),selected:e},i("solution-item-icon",{type:t.type,typeKeywords:t.typeKeywords}),i("span",{class:"icon-text",title:t.title},t.title),i("calcite-tree",{slot:"children"},this.renderHierarchy(t.dependencies))):i("calcite-tree-item",{onClick:e=>this._treeItemSelected(t.id,e),selected:e},i("solution-item-icon",{type:t.type,typeKeywords:t.typeKeywords}),i("span",{class:"icon-text",title:t.title},t.title))}))}_treeItemSelected(t,e){var i;const a=null===(i=null==e?void 0:e.target)||void 0===i?void 0:i.closest("calcite-tree-item");a&&(a.expanded=!(null==a?void 0:a.expanded)),this.selectedItemId=t,this.solutionItemSelected.emit(t)}static get assetsDirs(){return["item-type-icons"]}get el(){return s(this)}static get watchers(){return{templateHierarchy:["valueWatchHandler"]}}};r.style=".icon-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";const o=class{constructor(e){t(this,e),this.authentication=void 0,this.itemId="",this.solutionVariables="",this.organizationVariables="",this.itemType=void 0,this._translations=void 0}itemIdWatchHandler(){const t=l.getItemInfo(this.itemId);this.itemType=t.type}async componentWillLoad(){return this._getTranslations()}render(){return i(a,{key:"16de446a44799754d7066eb5cc587585fc9e37c8"},i("div",{key:"ddb7c1e6c86657502dc4b293d495f3b4dee594cf",class:"configuration-container"},i("div",{key:"016954a98a5eb229a1f9eb2a4b9260daff3593bf",class:"configuration"},this._showGroupTabs("Group"===this.itemType),this._showItemTabs("Group"!==this.itemType))))}_showGroupTabs(t){return i("calcite-tabs",{class:"config-tabs",style:{display:t?"inherit":"none"}},i("calcite-tab-nav",{slot:"tab-nav"},i("calcite-tab-title",null,this._translations.groupDetailsTab),i("calcite-tab-title",null,this._translations.sharingTab)),i("calcite-tab",{class:"config-tab",id:"group-tab",selected:!0},i("solution-item-details",{"item-id":this.itemId})),i("calcite-tab",{class:"config-tab",id:"share-tab"},i("solution-item-sharing",{"group-id":this.itemId})))}_showItemTabs(t){return i("calcite-tabs",{class:"config-tabs",style:{display:t?"inherit":"none"}},i("calcite-tab-nav",{slot:"tab-nav"},i("calcite-tab-title",null,this._translations.itemDetailsTab),i("calcite-tab-title",null,this._translations.dataTab),i("calcite-tab-title",null,this._translations.propertiesTab),i("calcite-tab-title",null,this._translations.resourcesTab)),i("calcite-tab",{class:"config-tab",selected:!0},i("solution-item-details",{"item-id":this.itemId})),i("calcite-tab",{class:"config-tab",id:"data-tab"},i("solution-template-data",{instanceid:"data","item-id":this.itemId,"organization-variables":this.organizationVariables,"solution-variables":this.solutionVariables})),i("calcite-tab",{class:"config-tab",id:"props-tab"},i("solution-template-data",{instanceid:"properties","item-id":this.itemId,"organization-variables":this.organizationVariables,"solution-variables":this.solutionVariables})),i("calcite-tab",{class:"config-tab",id:"resources-tab"},i("solution-resource-item",{authentication:this.authentication,class:"solutions-resource-container","item-id":this.itemId})))}async _getTranslations(){const t=await c(this.el);this._translations=t[0]}get el(){return s(this)}static get watchers(){return{itemId:["itemIdWatchHandler"]}}};o.style=".configuration-container{position:relative;height:100%;width:100%}.configuration{position:absolute;top:0px;right:0px;bottom:0px;left:0px;display:flex;padding:0.5rem;border:1px #808080 solid}.config-tabs{width:100%}.config-tab{width:100%;overflow-y:auto;height:inherit}";const d=class{constructor(i){t(this,i),this.featureServiceSpatialReferenceChange=e(this,"featureServiceSpatialReferenceChange",7),this.lockedSpatialReferenceChange=e(this,"lockedSpatialReferenceChange",7),this.defaultWkid=102100,this.loaded=!1,this.locked=!0,this.services=[],this.value=this.defaultWkid.toString(),this._translations=void 0}lockedChanged(t){t||this._setFeatureServiceDefaults(this.services),this.lockedSpatialReferenceChange.emit({locked:t})}componentWillLoad(){return this._getTranslations()}render(){return i(a,{key:"8c5f34b7d44429ed0395ae48956161caf7e62111"},i("label",{key:"69f1178da58409888f0b5b15ae4ffd224bb999d4",class:"switch-label"},i("calcite-switch",{key:"279795c5e21b914c595ea95219e3f589f7270ac4",checked:!this.locked,class:"spatial-ref-switch",onCalciteSwitchChange:t=>this._updateLocked(t),scale:"m"}),this._translations.specifyParam),i("div",{key:"516e621ad3e2f6f881b0fbc0a80d98f1f3b7eecd",class:"spatial-ref-component",id:"spatialRefDefn"},i("calcite-label",{key:"19b05ffa3e80d5e33521d0b6ee8438d882f9481d"},this._translations.spatialReferenceInfo,i("label",{key:"0766edb36aa3e8853bfd4754b9ea7aa955d7d987",class:"spatial-ref-default"},i("spatial-ref",{key:"9f1b37a12e18b5ba3c2d2b4b372f01a4f69ded28",defaultWkid:this.defaultWkid,disabled:this.locked,value:this.value}))),this._getFeatureServices(this.services)))}solutionStoreHasChanges(){this.services=l.getStoreInfo("featureServices").map((t=>t.name))}spatialReferenceChange(t){this.value=t.detail.newValue,l.setStoreInfo("defaultWkid",t.detail.newValue);const e=l.getStoreInfo("spatialReferenceInfo");e.spatialReference=t.detail.newValue,l.setStoreInfo("spatialReferenceInfo",e)}_getFeatureServices(t){const e=l.getStoreInfo("spatialReferenceInfo"),a=t.filter((t=>Object.keys(e.services).some((e=>e===t))));return a.length>0?i("div",null,i("label",{class:"spatial-ref-item-title"},this._translations.featureServicesHeading),i("ul",{class:"spatial-ref-services-list"},a.map((t=>i("li",{class:"spatial-ref-services-list-item"},i("label",{class:"switch-label"},i("calcite-switch",{checked:e.services[t],class:"spatial-ref-item-switch",disabled:this.locked,onCalciteSwitchChange:e=>this._updateEnabledServices(e,t),scale:"m"}),t)))))):null}_setFeatureServiceDefaults(t){n(this.el.getElementsByClassName("spatial-ref-item-switch")).forEach((t=>t.checked=!0)),t.forEach((t=>this._updateEnabledServices({detail:{switched:!0}},t)))}_updateEnabledServices(t,e){var i,a;const s=l.getStoreInfo("spatialReferenceInfo"),c=void 0!==(null===(i=t.detail)||void 0===i?void 0:i.switched)?t.detail.switched:void 0===(null===(a=t.target)||void 0===a?void 0:a.checked)||t.target.checked;s.services[e]=c,l.setStoreInfo("spatialReferenceInfo",s),this.featureServiceSpatialReferenceChange.emit({name:e,enabled:c})}_updateLocked(t){this.locked=!t.target.checked,this._updateStore(),this.loaded||(t.target.checked&&this._setFeatureServiceDefaults(this.services),this.loaded=!0)}_updateStore(){const t=l.getStoreInfo("spatialReferenceInfo");t.enabled=!this.locked,t.spatialReference=this.value,l.setStoreInfo("spatialReferenceInfo",t)}async _getTranslations(){const t=await c(this.el);this._translations=t[0]}get el(){return s(this)}static get watchers(){return{locked:["lockedChanged"]}}};d.style=".spatial-ref-switch{margin-inline-end:0.5rem}.spatial-ref-component{margin-top:0.625rem;margin-inline-start:2.5rem}#spatialRefDefn .sc-calcite-label-h label.sc-calcite-label{margin:0px;background-color:#CBC3E3}.spatial-ref-default{margin:0px}.spatial-ref-item-title{margin-bottom:0.5rem;font-size:0.875rem;line-height:1.25rem}.spatial-ref-item-switch{margin-inline-end:0.5rem}.switch-label{font-size:0.875rem;line-height:1.25rem}.disabled-div{pointer-events:none;opacity:0.4}.spatial-ref-desc{padding-bottom:0.5rem;padding-inline-start:0.25rem}.spatial-ref-services-list{margin-block-start:0.5em;margin-block-end:0.5em;list-style-type:none;padding-inline-start:0}.spatial-ref-services-list-item{margin-top:0.25rem}";export{r as solution_contents,o as solution_item,d as solution_spatial_ref}
|