@esri/solutions-components 0.7.8 → 0.7.10
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/t9n/layer-table/resources.json +1 -0
- package/dist/assets/t9n/layer-table/resources_en.json +1 -0
- package/dist/cjs/basemap-gallery_7.cjs.entry.js +1 -1
- package/dist/cjs/calcite-alert_3.cjs.entry.js +1 -1
- package/dist/cjs/calcite-combobox_6.cjs.entry.js +16 -7
- package/dist/cjs/card-manager_3.cjs.entry.js +176 -22
- package/dist/cjs/crowdsource-manager.cjs.entry.js +12 -1
- package/dist/cjs/{downloadUtils-95e4a5b2.js → downloadUtils-8f50633d.js} +2 -2
- package/dist/cjs/{index.es-a88403f8.js → index.es-140aa937.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
- package/dist/cjs/{mapViewUtils-b7d9e71c.js → mapViewUtils-569e9644.js} +17 -0
- package/dist/cjs/public-notification.cjs.entry.js +2 -2
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +20 -2
- package/dist/collection/components/layer-table/layer-table.js +175 -21
- package/dist/collection/components/map-layer-picker/map-layer-picker.css +1 -0
- package/dist/collection/components/map-layer-picker/map-layer-picker.js +69 -5
- package/dist/collection/components/map-picker/map-picker.js +1 -1
- package/dist/collection/demos/crowdsource-manager.html +2 -2
- package/dist/collection/utils/interfaces.ts +5 -0
- package/dist/collection/utils/queryUtils.js +16 -0
- package/dist/collection/utils/queryUtils.ts +21 -0
- package/dist/components/crowdsource-manager.js +15 -3
- package/dist/components/layer-table2.js +175 -21
- package/dist/components/map-layer-picker2.js +17 -6
- package/dist/components/map-picker2.js +1 -1
- package/dist/components/map-select-tools2.js +1 -1
- package/dist/components/queryUtils.js +17 -1
- package/dist/components/refine-selection2.js +1 -1
- package/dist/esm/basemap-gallery_7.entry.js +1 -1
- package/dist/esm/calcite-alert_3.entry.js +1 -1
- package/dist/esm/calcite-combobox_6.entry.js +16 -7
- package/dist/esm/card-manager_3.entry.js +176 -22
- package/dist/esm/crowdsource-manager.entry.js +12 -1
- package/dist/esm/{downloadUtils-83dd2143.js → downloadUtils-9dee8bc0.js} +2 -2
- package/dist/esm/{index.es-0c98e2f3.js → index.es-54e86c8e.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +2 -2
- package/dist/esm/{mapViewUtils-3ff1c264.js → mapViewUtils-066602d5.js} +17 -1
- package/dist/esm/public-notification.entry.js +2 -2
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/demos/crowdsource-manager.html +2 -2
- package/dist/solutions-components/{p-546a3d3c.entry.js → p-13bfc206.entry.js} +2 -2
- package/dist/solutions-components/{p-d6050d57.js → p-1bdd64a0.js} +2 -2
- package/dist/solutions-components/{p-b7e2c75b.js → p-531d91d6.js} +1 -1
- package/dist/solutions-components/{p-dcd6e7b9.entry.js → p-6656c53e.entry.js} +1 -1
- package/dist/solutions-components/{p-a5d924a9.entry.js → p-683cded6.entry.js} +1 -1
- package/dist/solutions-components/{p-95ebc2e5.entry.js → p-c2b20b85.entry.js} +1 -1
- package/dist/solutions-components/p-c7ff24df.entry.js +6 -0
- package/dist/solutions-components/{p-b030a151.js → p-dfdb8411.js} +1 -1
- package/dist/solutions-components/p-f7870ec1.entry.js +6 -0
- package/dist/solutions-components/p-ffae568b.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/interfaces.ts +5 -0
- package/dist/solutions-components/utils/queryUtils.ts +21 -0
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +8 -0
- package/dist/types/components/layer-table/layer-table.d.ts +54 -1
- package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +15 -1
- package/dist/types/components.d.ts +23 -2
- package/dist/types/preact.d.ts +2 -1
- package/dist/types/utils/interfaces.d.ts +4 -0
- package/dist/types/utils/queryUtils.d.ts +11 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-1b9709ce.entry.js +0 -6
- package/dist/solutions-components/p-4f1c4004.entry.js +0 -6
- package/dist/solutions-components/p-c556ed60.entry.js +0 -6
@@ -5,9 +5,9 @@
|
|
5
5
|
*/
|
6
6
|
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-7183ce4a.js';
|
7
7
|
import { g as getLocaleComponentStrings } from './locale-834c52c6.js';
|
8
|
-
import { q as queryFeaturesByID, a as getLayerOrTable, g as goToSelection, b as
|
8
|
+
import { q as queryFeaturesByID, a as getLayerOrTable, g as goToSelection, b as queryFeatureIds, c as queryAllIds, d as queryFeaturesByGlobalID } from './mapViewUtils-066602d5.js';
|
9
9
|
import { l as loadModules } from './loadModules-cea493da.js';
|
10
|
-
import { d as downloadCSV } from './downloadUtils-
|
10
|
+
import { d as downloadCSV } from './downloadUtils-9dee8bc0.js';
|
11
11
|
import './esri-loader-eda07632.js';
|
12
12
|
import './_commonjsHelpers-d5f9d613.js';
|
13
13
|
import './interfaces-341e3ab3.js';
|
@@ -112,6 +112,10 @@ const LayerTable = class {
|
|
112
112
|
* number[]: A list of all IDs for the current layer
|
113
113
|
*/
|
114
114
|
this._allIds = [];
|
115
|
+
/**
|
116
|
+
* boolean: When true the ctrl key is currently pressed
|
117
|
+
*/
|
118
|
+
this._ctrlIsPressed = false;
|
115
119
|
/**
|
116
120
|
* boolean: When true the default global id provided via url param has been honored and should now be ignored
|
117
121
|
*/
|
@@ -120,6 +124,14 @@ const LayerTable = class {
|
|
120
124
|
* boolean: When true the default OID provided via url param has been honored and should now be ignored
|
121
125
|
*/
|
122
126
|
this._defaultOidHonored = false;
|
127
|
+
/**
|
128
|
+
* boolean: When true the shift key is currently pressed
|
129
|
+
*/
|
130
|
+
this._shiftIsPressed = false;
|
131
|
+
/**
|
132
|
+
* boolean: When true any onChange handeling will be skipped
|
133
|
+
*/
|
134
|
+
this._skipOnChange = false;
|
123
135
|
/**
|
124
136
|
* bool: When true the table is being sorted
|
125
137
|
*/
|
@@ -324,6 +336,8 @@ const LayerTable = class {
|
|
324
336
|
async componentDidLoad() {
|
325
337
|
this._resizeObserver.observe(this._toolbar);
|
326
338
|
document.onclick = (e) => this._handleDocumentClick(e);
|
339
|
+
document.onkeydown = (e) => this._handleKeyDown(e);
|
340
|
+
document.onkeyup = (e) => this._handleKeyUp(e);
|
327
341
|
}
|
328
342
|
/**
|
329
343
|
* Called after the component is rendered
|
@@ -378,7 +392,7 @@ const LayerTable = class {
|
|
378
392
|
* @returns The dom node that contains the controls
|
379
393
|
*/
|
380
394
|
_getActionBar() {
|
381
|
-
return (h("calcite-action-bar", { expandDisabled: true, expanded: true, id: this._getId("bar"), layout: "horizontal" }, h("div", { class: "border-end", id: "solutions-map-layer-picker-container" }, h("map-layer-picker", { appearance: "transparent", defaultLayerId: this.defaultLayerId, mapView: this.mapView, onLayerSelectionChange: (evt) => this._layerSelectionChanged(evt), onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, placeholderIcon: "layers", scale: "l", showSingleLayerAsLabel: true, showTables: true, type: "dropdown" })), this._getActions()));
|
395
|
+
return (h("calcite-action-bar", { expandDisabled: true, expanded: true, id: this._getId("bar"), layout: "horizontal" }, h("div", { class: "border-end", id: "solutions-map-layer-picker-container" }, h("map-layer-picker", { appearance: "transparent", defaultLayerId: this.defaultLayerId, display: "inline-flex", height: 50, mapView: this.mapView, onLayerSelectionChange: (evt) => this._layerSelectionChanged(evt), onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, placeholderIcon: "layers", scale: "l", showSingleLayerAsLabel: true, showTables: true, type: "dropdown" })), this._getActions()));
|
382
396
|
}
|
383
397
|
/**
|
384
398
|
* Get the actions that are used for various interactions with the table
|
@@ -803,18 +817,8 @@ const LayerTable = class {
|
|
803
817
|
this._initColumnsInfo();
|
804
818
|
this._checkEditEnabled();
|
805
819
|
await this._table.when(() => {
|
806
|
-
this._table.highlightIds.on("change", () => {
|
807
|
-
|
808
|
-
this._selectedIndexes = this._table.highlightIds.toArray().reverse();
|
809
|
-
if (this._showOnlySelected) {
|
810
|
-
if (this._featuresSelected()) {
|
811
|
-
this._table.filterBySelection();
|
812
|
-
}
|
813
|
-
else {
|
814
|
-
this._toggleShowSelected();
|
815
|
-
}
|
816
|
-
}
|
817
|
-
this.featureSelectionChange.emit(this._selectedIndexes);
|
820
|
+
this._table.highlightIds.on("change", (evt) => {
|
821
|
+
void this._handleOnChange(evt);
|
818
822
|
});
|
819
823
|
this.reactiveUtils.watch(() => this._table.activeSortOrders, (sortOrders) => {
|
820
824
|
var _a, _b, _c, _d;
|
@@ -824,6 +828,93 @@ const LayerTable = class {
|
|
824
828
|
});
|
825
829
|
}
|
826
830
|
}
|
831
|
+
async _handleOnChange(evt) {
|
832
|
+
const ids = [...this._table.highlightIds.toArray()];
|
833
|
+
if (!this._skipOnChange) {
|
834
|
+
if (!this._ctrlIsPressed && !this._shiftIsPressed) {
|
835
|
+
if (this._selectedIndexes.length > 0) {
|
836
|
+
this._skipOnChange = true;
|
837
|
+
// only readd in specific case where we have multiple selected and then click one of the currently selected
|
838
|
+
const reAdd = this._selectedIndexes.length > 1 && evt.removed.length === 1;
|
839
|
+
const newIndexes = reAdd ? evt.removed : ids.filter(id => this._selectedIndexes.indexOf(id) < 0);
|
840
|
+
this._clearSelection();
|
841
|
+
this._selectedIndexes = [...newIndexes];
|
842
|
+
if (newIndexes.length > 0) {
|
843
|
+
this._table.highlightIds.add(newIndexes[0]);
|
844
|
+
}
|
845
|
+
}
|
846
|
+
else {
|
847
|
+
// https://github.com/Esri/solutions-components/issues/365
|
848
|
+
this._selectedIndexes = ids.reverse();
|
849
|
+
}
|
850
|
+
}
|
851
|
+
else if (this._ctrlIsPressed) {
|
852
|
+
this._selectedIndexes = ids.reverse();
|
853
|
+
}
|
854
|
+
else if (this._shiftIsPressed) {
|
855
|
+
this._skipOnChange = true;
|
856
|
+
this._previousCurrentId = this._currentId;
|
857
|
+
this._currentId = [...this._table.highlightIds.toArray()].reverse()[0];
|
858
|
+
if (this._previousCurrentId !== this._currentId) {
|
859
|
+
// query the layer based on current sort and filters then grab between the current id and previous id
|
860
|
+
const orderBy = this._table.activeSortOrders.reduce((prev, cur) => {
|
861
|
+
prev.push(`${cur.fieldName} ${cur.direction}`);
|
862
|
+
return prev;
|
863
|
+
}, []);
|
864
|
+
const oids = await queryFeatureIds(this._layer, this._layer.definitionExpression, orderBy);
|
865
|
+
let isBetween = false;
|
866
|
+
const _start = this._table.viewModel.getObjectIdIndex(this._previousCurrentId);
|
867
|
+
const _end = this._table.viewModel.getObjectIdIndex(this._currentId);
|
868
|
+
const startIndex = _start < _end ? _start : _end;
|
869
|
+
const endIndex = _end > _start ? _end : _start;
|
870
|
+
this._selectedIndexes = oids.reduce((prev, cur) => {
|
871
|
+
const id = cur;
|
872
|
+
const index = this._table.viewModel.getObjectIdIndex(id);
|
873
|
+
if ((id === this._currentId || id === this._previousCurrentId)) {
|
874
|
+
isBetween = !isBetween;
|
875
|
+
if (prev.indexOf(id) < 0) {
|
876
|
+
prev.push(id);
|
877
|
+
}
|
878
|
+
}
|
879
|
+
// The oids are sorted so after we have reached the start or end oid add all ids even if the index is -1.
|
880
|
+
// Index of -1 will occur for features between the start and and oid if
|
881
|
+
// you select a row then scroll faster than the FeatureTable loads the data to select the next id
|
882
|
+
if (isBetween && prev.indexOf(id) < 0) {
|
883
|
+
prev.push(id);
|
884
|
+
}
|
885
|
+
// Also add index based check.
|
886
|
+
// In some cases the FeatureTable and Layer query will have differences in how null/undefined field values are sorted
|
887
|
+
if ((this._selectedIndexes.indexOf(id) > -1 || (index >= startIndex && index <= endIndex)) && prev.indexOf(id) < 0 && index > -1) {
|
888
|
+
prev.push(id);
|
889
|
+
}
|
890
|
+
return prev;
|
891
|
+
}, []);
|
892
|
+
this._table.highlightIds.addMany(this._selectedIndexes.filter(i => ids.indexOf(i) < 0));
|
893
|
+
}
|
894
|
+
}
|
895
|
+
this._finishOnChange();
|
896
|
+
}
|
897
|
+
else {
|
898
|
+
this._skipOnChange = false;
|
899
|
+
}
|
900
|
+
this._currentId = [...this._table.highlightIds.toArray()].reverse()[0];
|
901
|
+
}
|
902
|
+
/**
|
903
|
+
* Handle any updates after a selection change has occured and emit the results
|
904
|
+
*
|
905
|
+
* @returns void
|
906
|
+
*/
|
907
|
+
_finishOnChange() {
|
908
|
+
if (this._showOnlySelected) {
|
909
|
+
if (this._featuresSelected()) {
|
910
|
+
this._table.filterBySelection();
|
911
|
+
}
|
912
|
+
else {
|
913
|
+
this._toggleShowSelected();
|
914
|
+
}
|
915
|
+
}
|
916
|
+
this.featureSelectionChange.emit(this._selectedIndexes);
|
917
|
+
}
|
827
918
|
/**
|
828
919
|
* Reset basic table props
|
829
920
|
*
|
@@ -959,6 +1050,24 @@ const LayerTable = class {
|
|
959
1050
|
}
|
960
1051
|
}
|
961
1052
|
}
|
1053
|
+
/**
|
1054
|
+
* Keep track of key down for ctrl and shift
|
1055
|
+
*
|
1056
|
+
* @returns void
|
1057
|
+
*/
|
1058
|
+
_handleKeyDown(e) {
|
1059
|
+
this._ctrlIsPressed = e.ctrlKey;
|
1060
|
+
this._shiftIsPressed = e.shiftKey;
|
1061
|
+
}
|
1062
|
+
/**
|
1063
|
+
* Keep track of key up for ctrl and shift
|
1064
|
+
*
|
1065
|
+
* @returns void
|
1066
|
+
*/
|
1067
|
+
_handleKeyUp(e) {
|
1068
|
+
this._ctrlIsPressed = e.ctrlKey;
|
1069
|
+
this._shiftIsPressed = e.shiftKey;
|
1070
|
+
}
|
962
1071
|
/**
|
963
1072
|
* Show filter component in modal
|
964
1073
|
*
|
@@ -966,15 +1075,19 @@ const LayerTable = class {
|
|
966
1075
|
*/
|
967
1076
|
_filterModal() {
|
968
1077
|
var _a, _b, _c;
|
969
|
-
return (h("calcite-modal", { "aria-labelledby": "modal-title", kind: "brand", onCalciteModalClose: () => this._closeFilter(), open: this._filterOpen, widthScale: "s" }, h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, (_b = (_a = this._translations) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.replace("{{title}}", (_c = this._layer) === null || _c === void 0 ? void 0 : _c.title)), h("div", { slot: "content" }, h("instant-apps-filter-list", { autoUpdateUrl: false, closeBtn: true, closeBtnOnClick: () => this._closeFilter(), layerExpressions: this._layerExpressions, ref: (el) => this._filterList = el, view: this.mapView }))));
|
1078
|
+
return (h("calcite-modal", { "aria-labelledby": "modal-title", kind: "brand", onCalciteModalClose: async () => this._closeFilter(), open: this._filterOpen, widthScale: "s" }, h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, (_b = (_a = this._translations) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.replace("{{title}}", (_c = this._layer) === null || _c === void 0 ? void 0 : _c.title)), h("div", { slot: "content" }, h("instant-apps-filter-list", { autoUpdateUrl: false, closeBtn: true, closeBtnOnClick: async () => this._closeFilter(), layerExpressions: this._layerExpressions, ref: (el) => this._filterList = el, view: this.mapView }))));
|
970
1079
|
}
|
971
1080
|
/**
|
972
1081
|
* Close the filter modal
|
973
1082
|
*
|
974
1083
|
* @returns void
|
975
1084
|
*/
|
976
|
-
_closeFilter() {
|
977
|
-
this._filterOpen
|
1085
|
+
async _closeFilter() {
|
1086
|
+
if (this._filterOpen) {
|
1087
|
+
// reset allIds
|
1088
|
+
this._allIds = await queryAllIds(this._layer);
|
1089
|
+
this._filterOpen = false;
|
1090
|
+
}
|
978
1091
|
}
|
979
1092
|
/**
|
980
1093
|
* Show delete confirmation message
|
@@ -1047,8 +1160,10 @@ const LayerTable = class {
|
|
1047
1160
|
_selectAll() {
|
1048
1161
|
const ids = this._allIds;
|
1049
1162
|
this._table.highlightIds.removeAll();
|
1163
|
+
this._skipOnChange = true;
|
1050
1164
|
this._table.highlightIds.addMany(ids);
|
1051
1165
|
this._selectedIndexes = ids;
|
1166
|
+
this._finishOnChange();
|
1052
1167
|
}
|
1053
1168
|
/**
|
1054
1169
|
* Toggle the show only selected flag
|
@@ -1090,9 +1205,9 @@ const LayerTable = class {
|
|
1090
1205
|
* @returns void
|
1091
1206
|
*/
|
1092
1207
|
_initLayerExpressions() {
|
1093
|
-
var _a;
|
1094
|
-
const layerExpressions = (_a = this.mapInfo
|
1095
|
-
this._layerExpressions = layerExpressions.filter((exp) => exp.id === this._layer.id);
|
1208
|
+
var _a, _b;
|
1209
|
+
const layerExpressions = (_b = (_a = this.mapInfo) === null || _a === void 0 ? void 0 : _a.filterConfig) === null || _b === void 0 ? void 0 : _b.layerExpressions;
|
1210
|
+
this._layerExpressions = layerExpressions ? layerExpressions.filter((exp) => exp.id === this._layer.id) : [];
|
1096
1211
|
}
|
1097
1212
|
/**
|
1098
1213
|
* Select all rows that are not currently selectd
|
@@ -1108,8 +1223,10 @@ const LayerTable = class {
|
|
1108
1223
|
}
|
1109
1224
|
return prev;
|
1110
1225
|
}, []).sort((a, b) => a - b);
|
1226
|
+
this._skipOnChange = true;
|
1111
1227
|
this._table.highlightIds.addMany(ids);
|
1112
1228
|
this._selectedIndexes = ids;
|
1229
|
+
this._finishOnChange();
|
1113
1230
|
}
|
1114
1231
|
/**
|
1115
1232
|
* Export all selected rows as CSV
|
@@ -1195,6 +1312,7 @@ const LayerTable = class {
|
|
1195
1312
|
fieldInfos.some(fieldInfo => {
|
1196
1313
|
if (fieldInfo.name === columnTemplate.fieldName) {
|
1197
1314
|
columnTemplate.label = fieldInfo.alias;
|
1315
|
+
columnTemplate.menuConfig = this._getMenuConfig(fieldInfo.name);
|
1198
1316
|
return true;
|
1199
1317
|
}
|
1200
1318
|
});
|
@@ -1203,12 +1321,48 @@ const LayerTable = class {
|
|
1203
1321
|
return {
|
1204
1322
|
type: "field",
|
1205
1323
|
fieldName: fieldInfo.name,
|
1206
|
-
label: fieldInfo.alias
|
1324
|
+
label: fieldInfo.alias,
|
1325
|
+
menuConfig: this._getMenuConfig(fieldInfo.name)
|
1207
1326
|
};
|
1208
1327
|
});
|
1209
1328
|
}
|
1210
1329
|
return columnTemplates;
|
1211
1330
|
}
|
1331
|
+
/**
|
1332
|
+
* Get the menu config that adds the ability to hide the current column
|
1333
|
+
*
|
1334
|
+
* @returns void
|
1335
|
+
* @protected
|
1336
|
+
*/
|
1337
|
+
_getMenuConfig(name) {
|
1338
|
+
return {
|
1339
|
+
items: [
|
1340
|
+
{
|
1341
|
+
label: this._translations.hideField,
|
1342
|
+
iconClass: "esri-icon-non-visible",
|
1343
|
+
autoCloseMenu: true,
|
1344
|
+
clickFunction: () => {
|
1345
|
+
this._handleHideClick(name);
|
1346
|
+
}
|
1347
|
+
}
|
1348
|
+
]
|
1349
|
+
};
|
1350
|
+
}
|
1351
|
+
/**
|
1352
|
+
* Hide the table column for the provided name
|
1353
|
+
*
|
1354
|
+
* @returns void
|
1355
|
+
* @protected
|
1356
|
+
*/
|
1357
|
+
_handleHideClick(name) {
|
1358
|
+
this._columnsInfo[name] = false;
|
1359
|
+
this._table.hideColumn(name);
|
1360
|
+
this._table.tableTemplate.columnTemplates.forEach((columnTemplate) => {
|
1361
|
+
if (columnTemplate.fieldName === name) {
|
1362
|
+
columnTemplate.visible = false;
|
1363
|
+
}
|
1364
|
+
});
|
1365
|
+
}
|
1212
1366
|
/**
|
1213
1367
|
* Fetches the component's translations
|
1214
1368
|
*
|
@@ -53,6 +53,7 @@ const CrowdsourceManager = class {
|
|
53
53
|
this._layoutMode = ELayoutMode.GRID;
|
54
54
|
this._mapView = undefined;
|
55
55
|
this._panelOpen = true;
|
56
|
+
this._tableOnly = false;
|
56
57
|
}
|
57
58
|
//--------------------------------------------------------------------------
|
58
59
|
//
|
@@ -102,6 +103,16 @@ const CrowdsourceManager = class {
|
|
102
103
|
// Events (public)
|
103
104
|
//
|
104
105
|
//--------------------------------------------------------------------------
|
106
|
+
/**
|
107
|
+
* Listen for idsFound event to be fired so we can know that all layer ids have been fetched
|
108
|
+
*/
|
109
|
+
async idsFound(evt) {
|
110
|
+
const ids = evt.detail;
|
111
|
+
this._tableOnly = ids.tableIds.length > 0 && ids.layerIds.length === 0;
|
112
|
+
if (this._tableOnly) {
|
113
|
+
this._expandPopup = true;
|
114
|
+
}
|
115
|
+
}
|
105
116
|
/**
|
106
117
|
* Listen for layoutChanged event to be fired so we can adjust the layout
|
107
118
|
*/
|
@@ -299,7 +310,7 @@ const CrowdsourceManager = class {
|
|
299
310
|
const tooltip = this._expandPopup ? this._translations.collapsePopup : this._translations.expandPopup;
|
300
311
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
301
312
|
const popupNodeClass = !this._expandPopup ? "height-full" : ((_a = this.mapInfos) === null || _a === void 0 ? void 0 : _a.length) === 1 ? "position-absolute-0" : "position-absolute-50";
|
302
|
-
return (h("div", { class: "calcite-mode-dark " + popupNodeClass }, h("calcite-panel", null, h("div", { class: "display-flex align-items-center", slot: "header-content" }, h("calcite-icon", { icon: "information", scale: "s" }), h("div", { class: "padding-inline-start-75" }, this._translations.information)), h("calcite-action", { icon: icon, id: id, onClick: () => this._togglePopup(), slot: "header-actions-end", text: "" }), h("calcite-tooltip", { class: themeClass, label: "", placement: "bottom", "reference-element": id }, h("span", null, tooltip)), this._getCardNode())));
|
313
|
+
return (h("div", { class: "calcite-mode-dark " + popupNodeClass }, h("calcite-panel", null, h("div", { class: "display-flex align-items-center", slot: "header-content" }, h("calcite-icon", { icon: "information", scale: "s" }), h("div", { class: "padding-inline-start-75" }, this._translations.information)), h("calcite-action", { disabled: this._tableOnly, icon: icon, id: id, onClick: () => this._togglePopup(), slot: "header-actions-end", text: "" }), !this._tableOnly ? h("calcite-tooltip", { class: themeClass, label: "", placement: "bottom", "reference-element": id }, h("span", null, tooltip)) : undefined, this._getCardNode())));
|
303
314
|
}
|
304
315
|
/**
|
305
316
|
* Toggle the popup information
|
@@ -6,7 +6,7 @@
|
|
6
6
|
import { c as createCommonjsModule, g as getDefaultExportFromCjs } from './_commonjsHelpers-d5f9d613.js';
|
7
7
|
import { a as getAssetPath } from './index-7183ce4a.js';
|
8
8
|
import { l as loadModules } from './loadModules-cea493da.js';
|
9
|
-
import { q as queryFeaturesByID } from './mapViewUtils-
|
9
|
+
import { q as queryFeaturesByID } from './mapViewUtils-066602d5.js';
|
10
10
|
import './solution-resource-7b8d302d.js';
|
11
11
|
import './index-a1e91462.js';
|
12
12
|
import { _ as __assign$1, r as request, c as cleanUrl, g as getJson } from './restHelpersGet-af032ab2.js';
|
@@ -1508,7 +1508,7 @@ function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++
|
|
1508
1508
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1509
1509
|
* ====================================================================
|
1510
1510
|
*/
|
1511
|
-
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-
|
1511
|
+
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-54e86c8e.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},
|
1512
1512
|
/** ====================================================================
|
1513
1513
|
* @license
|
1514
1514
|
* jsPDF XMP metadata plugin
|
@@ -4,11 +4,11 @@
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
6
|
import { a as commonjsGlobal, c as createCommonjsModule, g as getDefaultExportFromCjs } from './_commonjsHelpers-d5f9d613.js';
|
7
|
-
import { _ as _typeof_1 } from './downloadUtils-
|
7
|
+
import { _ as _typeof_1 } from './downloadUtils-9dee8bc0.js';
|
8
8
|
import './index-7183ce4a.js';
|
9
9
|
import './loadModules-cea493da.js';
|
10
10
|
import './esri-loader-eda07632.js';
|
11
|
-
import './mapViewUtils-
|
11
|
+
import './mapViewUtils-066602d5.js';
|
12
12
|
import './interfaces-341e3ab3.js';
|
13
13
|
import './solution-resource-7b8d302d.js';
|
14
14
|
import './index-a1e91462.js';
|