@esri/solutions-components 0.7.9 → 0.7.11
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/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 +1 -1
- package/dist/cjs/card-manager_3.cjs.entry.js +154 -17
- package/dist/cjs/crowdsource-manager.cjs.entry.js +2 -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 +3 -1
- package/dist/collection/components/layer-table/layer-table.js +145 -16
- package/dist/collection/components/map-card/map-card.js +10 -0
- package/dist/collection/components/map-picker/map-picker.js +1 -1
- package/dist/collection/demos/crowdsource-manager.html +21 -3
- package/dist/collection/utils/queryUtils.js +16 -0
- package/dist/collection/utils/queryUtils.ts +21 -0
- package/dist/components/crowdsource-manager.js +3 -1
- package/dist/components/layer-table2.js +144 -16
- package/dist/components/map-card2.js +10 -0
- 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 +1 -1
- package/dist/esm/card-manager_3.entry.js +154 -17
- package/dist/esm/crowdsource-manager.entry.js +2 -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 +21 -3
- package/dist/solutions-components/{p-a9bbd352.entry.js → p-13bfc206.entry.js} +1 -1
- 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-623321ac.entry.js +6 -0
- 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-e726ae50.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/queryUtils.ts +21 -0
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +4 -4
- package/dist/types/components/layer-table/layer-table.d.ts +44 -1
- package/dist/types/utils/queryUtils.d.ts +11 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-c556ed60.entry.js +0 -6
- package/dist/solutions-components/p-c9b4d52f.entry.js +0 -6
- package/dist/solutions-components/p-f7870ec1.entry.js +0 -6
@@ -525,7 +525,7 @@ const MapPicker = class {
|
|
525
525
|
* @protected
|
526
526
|
*/
|
527
527
|
_getMapNameList(show) {
|
528
|
-
const listClass = show ? "map-list" : "display-none";
|
528
|
+
const listClass = show ? "map-list border-bottom-1" : "display-none";
|
529
529
|
return (index.h("div", { class: listClass }, index.h("calcite-list", { id: "mapList", ref: (el) => this._list = el, selectionAppearance: "border", selectionMode: "single" }, this.mapInfos.map(mapInfo => {
|
530
530
|
return (index.h("calcite-list-item", { label: mapInfo.name, onClick: () => this._webMapSelected(mapInfo), selected: mapInfo.id === this._loadedId, value: mapInfo.id }));
|
531
531
|
}))));
|
@@ -17,7 +17,7 @@ const t9n = require('./t9n-0556abcb.js');
|
|
17
17
|
const resources = require('./resources-222ad22c.js');
|
18
18
|
const loadModules = require('./loadModules-46d14e81.js');
|
19
19
|
const locale$1 = require('./locale-9db09b63.js');
|
20
|
-
const mapViewUtils = require('./mapViewUtils-
|
20
|
+
const mapViewUtils = require('./mapViewUtils-569e9644.js');
|
21
21
|
require('./guid-1a466ca6.js');
|
22
22
|
require('./resources-6c60363a.js');
|
23
23
|
require('./key-b8c05387.js');
|
@@ -26,7 +26,7 @@ const debounce = require('./debounce-30afab47.js');
|
|
26
26
|
const conditionalSlot = require('./conditionalSlot-63e11cba.js');
|
27
27
|
const key = require('./key-b8c05387.js');
|
28
28
|
const locale$1 = require('./locale-9db09b63.js');
|
29
|
-
const mapViewUtils = require('./mapViewUtils-
|
29
|
+
const mapViewUtils = require('./mapViewUtils-569e9644.js');
|
30
30
|
const publicNotificationStore = require('./publicNotificationStore-3a17c2f4.js');
|
31
31
|
require('./resources-6c60363a.js');
|
32
32
|
require('./browser-9a43b900.js');
|
@@ -9,9 +9,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
9
|
|
10
10
|
const index = require('./index-b8a649fc.js');
|
11
11
|
const locale = require('./locale-9db09b63.js');
|
12
|
-
const mapViewUtils = require('./mapViewUtils-
|
12
|
+
const mapViewUtils = require('./mapViewUtils-569e9644.js');
|
13
13
|
const loadModules = require('./loadModules-46d14e81.js');
|
14
|
-
const downloadUtils = require('./downloadUtils-
|
14
|
+
const downloadUtils = require('./downloadUtils-8f50633d.js');
|
15
15
|
require('./esri-loader-a91c0ec1.js');
|
16
16
|
require('./_commonjsHelpers-384729db.js');
|
17
17
|
require('./interfaces-7cd0a48a.js');
|
@@ -116,6 +116,10 @@ const LayerTable = class {
|
|
116
116
|
* number[]: A list of all IDs for the current layer
|
117
117
|
*/
|
118
118
|
this._allIds = [];
|
119
|
+
/**
|
120
|
+
* boolean: When true the ctrl key is currently pressed
|
121
|
+
*/
|
122
|
+
this._ctrlIsPressed = false;
|
119
123
|
/**
|
120
124
|
* boolean: When true the default global id provided via url param has been honored and should now be ignored
|
121
125
|
*/
|
@@ -124,6 +128,14 @@ const LayerTable = class {
|
|
124
128
|
* boolean: When true the default OID provided via url param has been honored and should now be ignored
|
125
129
|
*/
|
126
130
|
this._defaultOidHonored = false;
|
131
|
+
/**
|
132
|
+
* boolean: When true the shift key is currently pressed
|
133
|
+
*/
|
134
|
+
this._shiftIsPressed = false;
|
135
|
+
/**
|
136
|
+
* boolean: When true any onChange handeling will be skipped
|
137
|
+
*/
|
138
|
+
this._skipOnChange = false;
|
127
139
|
/**
|
128
140
|
* bool: When true the table is being sorted
|
129
141
|
*/
|
@@ -214,6 +226,15 @@ const LayerTable = class {
|
|
214
226
|
}
|
215
227
|
});
|
216
228
|
}
|
229
|
+
/**
|
230
|
+
* watch for changes in map info and recheck the tool infos
|
231
|
+
*/
|
232
|
+
async mapInfoWatchHandler() {
|
233
|
+
var _a;
|
234
|
+
if (((_a = this._toolInfos) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
235
|
+
this._initToolInfos();
|
236
|
+
}
|
237
|
+
}
|
217
238
|
/**
|
218
239
|
* watch for changes in map view and get the first layer
|
219
240
|
*/
|
@@ -328,6 +349,8 @@ const LayerTable = class {
|
|
328
349
|
async componentDidLoad() {
|
329
350
|
this._resizeObserver.observe(this._toolbar);
|
330
351
|
document.onclick = (e) => this._handleDocumentClick(e);
|
352
|
+
document.onkeydown = (e) => this._handleKeyDown(e);
|
353
|
+
document.onkeyup = (e) => this._handleKeyUp(e);
|
331
354
|
}
|
332
355
|
/**
|
333
356
|
* Called after the component is rendered
|
@@ -807,18 +830,8 @@ const LayerTable = class {
|
|
807
830
|
this._initColumnsInfo();
|
808
831
|
this._checkEditEnabled();
|
809
832
|
await this._table.when(() => {
|
810
|
-
this._table.highlightIds.on("change", () => {
|
811
|
-
|
812
|
-
this._selectedIndexes = this._table.highlightIds.toArray().reverse();
|
813
|
-
if (this._showOnlySelected) {
|
814
|
-
if (this._featuresSelected()) {
|
815
|
-
this._table.filterBySelection();
|
816
|
-
}
|
817
|
-
else {
|
818
|
-
this._toggleShowSelected();
|
819
|
-
}
|
820
|
-
}
|
821
|
-
this.featureSelectionChange.emit(this._selectedIndexes);
|
833
|
+
this._table.highlightIds.on("change", (evt) => {
|
834
|
+
void this._handleOnChange(evt);
|
822
835
|
});
|
823
836
|
this.reactiveUtils.watch(() => this._table.activeSortOrders, (sortOrders) => {
|
824
837
|
var _a, _b, _c, _d;
|
@@ -828,6 +841,93 @@ const LayerTable = class {
|
|
828
841
|
});
|
829
842
|
}
|
830
843
|
}
|
844
|
+
async _handleOnChange(evt) {
|
845
|
+
const ids = [...this._table.highlightIds.toArray()];
|
846
|
+
if (!this._skipOnChange) {
|
847
|
+
if (!this._ctrlIsPressed && !this._shiftIsPressed) {
|
848
|
+
if (this._selectedIndexes.length > 0) {
|
849
|
+
this._skipOnChange = true;
|
850
|
+
// only readd in specific case where we have multiple selected and then click one of the currently selected
|
851
|
+
const reAdd = this._selectedIndexes.length > 1 && evt.removed.length === 1;
|
852
|
+
const newIndexes = reAdd ? evt.removed : ids.filter(id => this._selectedIndexes.indexOf(id) < 0);
|
853
|
+
this._clearSelection();
|
854
|
+
this._selectedIndexes = [...newIndexes];
|
855
|
+
if (newIndexes.length > 0) {
|
856
|
+
this._table.highlightIds.add(newIndexes[0]);
|
857
|
+
}
|
858
|
+
}
|
859
|
+
else {
|
860
|
+
// https://github.com/Esri/solutions-components/issues/365
|
861
|
+
this._selectedIndexes = ids.reverse();
|
862
|
+
}
|
863
|
+
}
|
864
|
+
else if (this._ctrlIsPressed) {
|
865
|
+
this._selectedIndexes = ids.reverse();
|
866
|
+
}
|
867
|
+
else if (this._shiftIsPressed) {
|
868
|
+
this._skipOnChange = true;
|
869
|
+
this._previousCurrentId = this._currentId;
|
870
|
+
this._currentId = [...this._table.highlightIds.toArray()].reverse()[0];
|
871
|
+
if (this._previousCurrentId !== this._currentId) {
|
872
|
+
// query the layer based on current sort and filters then grab between the current id and previous id
|
873
|
+
const orderBy = this._table.activeSortOrders.reduce((prev, cur) => {
|
874
|
+
prev.push(`${cur.fieldName} ${cur.direction}`);
|
875
|
+
return prev;
|
876
|
+
}, []);
|
877
|
+
const oids = await mapViewUtils.queryFeatureIds(this._layer, this._layer.definitionExpression, orderBy);
|
878
|
+
let isBetween = false;
|
879
|
+
const _start = this._table.viewModel.getObjectIdIndex(this._previousCurrentId);
|
880
|
+
const _end = this._table.viewModel.getObjectIdIndex(this._currentId);
|
881
|
+
const startIndex = _start < _end ? _start : _end;
|
882
|
+
const endIndex = _end > _start ? _end : _start;
|
883
|
+
this._selectedIndexes = oids.reduce((prev, cur) => {
|
884
|
+
const id = cur;
|
885
|
+
const index = this._table.viewModel.getObjectIdIndex(id);
|
886
|
+
if ((id === this._currentId || id === this._previousCurrentId)) {
|
887
|
+
isBetween = !isBetween;
|
888
|
+
if (prev.indexOf(id) < 0) {
|
889
|
+
prev.push(id);
|
890
|
+
}
|
891
|
+
}
|
892
|
+
// The oids are sorted so after we have reached the start or end oid add all ids even if the index is -1.
|
893
|
+
// Index of -1 will occur for features between the start and and oid if
|
894
|
+
// you select a row then scroll faster than the FeatureTable loads the data to select the next id
|
895
|
+
if (isBetween && prev.indexOf(id) < 0) {
|
896
|
+
prev.push(id);
|
897
|
+
}
|
898
|
+
// Also add index based check.
|
899
|
+
// In some cases the FeatureTable and Layer query will have differences in how null/undefined field values are sorted
|
900
|
+
if ((this._selectedIndexes.indexOf(id) > -1 || (index >= startIndex && index <= endIndex)) && prev.indexOf(id) < 0 && index > -1) {
|
901
|
+
prev.push(id);
|
902
|
+
}
|
903
|
+
return prev;
|
904
|
+
}, []);
|
905
|
+
this._table.highlightIds.addMany(this._selectedIndexes.filter(i => ids.indexOf(i) < 0));
|
906
|
+
}
|
907
|
+
}
|
908
|
+
this._finishOnChange();
|
909
|
+
}
|
910
|
+
else {
|
911
|
+
this._skipOnChange = false;
|
912
|
+
}
|
913
|
+
this._currentId = [...this._table.highlightIds.toArray()].reverse()[0];
|
914
|
+
}
|
915
|
+
/**
|
916
|
+
* Handle any updates after a selection change has occured and emit the results
|
917
|
+
*
|
918
|
+
* @returns void
|
919
|
+
*/
|
920
|
+
_finishOnChange() {
|
921
|
+
if (this._showOnlySelected) {
|
922
|
+
if (this._featuresSelected()) {
|
923
|
+
this._table.filterBySelection();
|
924
|
+
}
|
925
|
+
else {
|
926
|
+
this._toggleShowSelected();
|
927
|
+
}
|
928
|
+
}
|
929
|
+
this.featureSelectionChange.emit(this._selectedIndexes);
|
930
|
+
}
|
831
931
|
/**
|
832
932
|
* Reset basic table props
|
833
933
|
*
|
@@ -963,6 +1063,24 @@ const LayerTable = class {
|
|
963
1063
|
}
|
964
1064
|
}
|
965
1065
|
}
|
1066
|
+
/**
|
1067
|
+
* Keep track of key down for ctrl and shift
|
1068
|
+
*
|
1069
|
+
* @returns void
|
1070
|
+
*/
|
1071
|
+
_handleKeyDown(e) {
|
1072
|
+
this._ctrlIsPressed = e.ctrlKey;
|
1073
|
+
this._shiftIsPressed = e.shiftKey;
|
1074
|
+
}
|
1075
|
+
/**
|
1076
|
+
* Keep track of key up for ctrl and shift
|
1077
|
+
*
|
1078
|
+
* @returns void
|
1079
|
+
*/
|
1080
|
+
_handleKeyUp(e) {
|
1081
|
+
this._ctrlIsPressed = e.ctrlKey;
|
1082
|
+
this._shiftIsPressed = e.shiftKey;
|
1083
|
+
}
|
966
1084
|
/**
|
967
1085
|
* Show filter component in modal
|
968
1086
|
*
|
@@ -970,15 +1088,19 @@ const LayerTable = class {
|
|
970
1088
|
*/
|
971
1089
|
_filterModal() {
|
972
1090
|
var _a, _b, _c;
|
973
|
-
return (index.h("calcite-modal", { "aria-labelledby": "modal-title", kind: "brand", onCalciteModalClose: () => this._closeFilter(), open: this._filterOpen, widthScale: "s" }, index.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)), index.h("div", { slot: "content" }, index.h("instant-apps-filter-list", { autoUpdateUrl: false, closeBtn: true, closeBtnOnClick: () => this._closeFilter(), layerExpressions: this._layerExpressions, ref: (el) => this._filterList = el, view: this.mapView }))));
|
1091
|
+
return (index.h("calcite-modal", { "aria-labelledby": "modal-title", kind: "brand", onCalciteModalClose: async () => this._closeFilter(), open: this._filterOpen, widthScale: "s" }, index.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)), index.h("div", { slot: "content" }, index.h("instant-apps-filter-list", { autoUpdateUrl: false, closeBtn: true, closeBtnOnClick: async () => this._closeFilter(), layerExpressions: this._layerExpressions, ref: (el) => this._filterList = el, view: this.mapView }))));
|
974
1092
|
}
|
975
1093
|
/**
|
976
1094
|
* Close the filter modal
|
977
1095
|
*
|
978
1096
|
* @returns void
|
979
1097
|
*/
|
980
|
-
_closeFilter() {
|
981
|
-
this._filterOpen
|
1098
|
+
async _closeFilter() {
|
1099
|
+
if (this._filterOpen) {
|
1100
|
+
// reset allIds
|
1101
|
+
this._allIds = await mapViewUtils.queryAllIds(this._layer);
|
1102
|
+
this._filterOpen = false;
|
1103
|
+
}
|
982
1104
|
}
|
983
1105
|
/**
|
984
1106
|
* Show delete confirmation message
|
@@ -1051,8 +1173,10 @@ const LayerTable = class {
|
|
1051
1173
|
_selectAll() {
|
1052
1174
|
const ids = this._allIds;
|
1053
1175
|
this._table.highlightIds.removeAll();
|
1176
|
+
this._skipOnChange = true;
|
1054
1177
|
this._table.highlightIds.addMany(ids);
|
1055
1178
|
this._selectedIndexes = ids;
|
1179
|
+
this._finishOnChange();
|
1056
1180
|
}
|
1057
1181
|
/**
|
1058
1182
|
* Toggle the show only selected flag
|
@@ -1112,8 +1236,10 @@ const LayerTable = class {
|
|
1112
1236
|
}
|
1113
1237
|
return prev;
|
1114
1238
|
}, []).sort((a, b) => a - b);
|
1239
|
+
this._skipOnChange = true;
|
1115
1240
|
this._table.highlightIds.addMany(ids);
|
1116
1241
|
this._selectedIndexes = ids;
|
1242
|
+
this._finishOnChange();
|
1117
1243
|
}
|
1118
1244
|
/**
|
1119
1245
|
* Export all selected rows as CSV
|
@@ -1266,6 +1392,7 @@ const LayerTable = class {
|
|
1266
1392
|
"enableCSV": ["enableCSVWatchHandler"],
|
1267
1393
|
"enableInlineEdit": ["enableInlineEditWatchHandler"],
|
1268
1394
|
"_controlsThatFit": ["_controlsThatFitWatchHandler"],
|
1395
|
+
"mapInfo": ["mapInfoWatchHandler"],
|
1269
1396
|
"mapView": ["mapViewWatchHandler"],
|
1270
1397
|
"_layer": ["_layerWatchHandler"],
|
1271
1398
|
"_selectedIndexes": ["_selectedIndexesWatchHandler"],
|
@@ -1379,6 +1506,7 @@ const MapCard = class {
|
|
1379
1506
|
// on the first render use the default webmap id if provided otherwise use the first child of the provided mapInfos
|
1380
1507
|
const loadDefaultMap = !this._defaultWebmapHonored && this.defaultWebmapId;
|
1381
1508
|
const defaultMap = (_a = this.mapInfos) === null || _a === void 0 ? void 0 : _a.filter(i => i.id === this.defaultWebmapId);
|
1509
|
+
const mapConfigChanged = JSON.stringify(webMapInfo) !== JSON.stringify(this._webMapInfo);
|
1382
1510
|
this._webMapInfo = loadDefaultMap && defaultMap ? defaultMap[0] :
|
1383
1511
|
!(webMapInfo === null || webMapInfo === void 0 ? void 0 : webMapInfo.id) && this.mapInfos.length > 0 ? this.mapInfos[0] : webMapInfo;
|
1384
1512
|
const id = this._webMapInfo.id;
|
@@ -1409,6 +1537,15 @@ const MapCard = class {
|
|
1409
1537
|
this._defaultWebmapHonored = true;
|
1410
1538
|
this._mapPicker.setMapByID(id);
|
1411
1539
|
}
|
1540
|
+
else if (mapConfigChanged) {
|
1541
|
+
// Map is the same so no need to reload but we need to update for any changes from the config
|
1542
|
+
this._searchConfiguration = this._webMapInfo.searchConfiguration;
|
1543
|
+
this.beforeMapChanged.emit();
|
1544
|
+
this.mapChanged.emit({
|
1545
|
+
id: id,
|
1546
|
+
mapView: this.mapView
|
1547
|
+
});
|
1548
|
+
}
|
1412
1549
|
}
|
1413
1550
|
/**
|
1414
1551
|
* Add/remove the home widget base on enableHome prop
|
@@ -55,6 +55,7 @@ const CrowdsourceManager = class {
|
|
55
55
|
this._expandPopup = false;
|
56
56
|
this._translations = undefined;
|
57
57
|
this._layoutMode = interfaces.ELayoutMode.GRID;
|
58
|
+
this._mapInfo = undefined;
|
58
59
|
this._mapView = undefined;
|
59
60
|
this._panelOpen = true;
|
60
61
|
this._tableOnly = false;
|
@@ -383,7 +384,7 @@ const CrowdsourceManager = class {
|
|
383
384
|
return true;
|
384
385
|
}
|
385
386
|
});
|
386
|
-
return mapInfo;
|
387
|
+
return Object.assign({}, mapInfo);
|
387
388
|
}
|
388
389
|
/**
|
389
390
|
* Set the current map info when maps change
|
@@ -8,7 +8,7 @@
|
|
8
8
|
const _commonjsHelpers = require('./_commonjsHelpers-384729db.js');
|
9
9
|
const index = require('./index-b8a649fc.js');
|
10
10
|
const loadModules = require('./loadModules-46d14e81.js');
|
11
|
-
const mapViewUtils = require('./mapViewUtils-
|
11
|
+
const mapViewUtils = require('./mapViewUtils-569e9644.js');
|
12
12
|
require('./solution-resource-abec7452.js');
|
13
13
|
require('./index-f64944ad.js');
|
14
14
|
const restHelpersGet = require('./restHelpersGet-e0737480.js');
|
@@ -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):Promise.resolve().then(function () { return require('./index.es-
|
1513
|
+
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):Promise.resolve().then(function () { return require('./index.es-140aa937.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
|
@@ -6,11 +6,11 @@
|
|
6
6
|
'use strict';
|
7
7
|
|
8
8
|
const _commonjsHelpers = require('./_commonjsHelpers-384729db.js');
|
9
|
-
const downloadUtils = require('./downloadUtils-
|
9
|
+
const downloadUtils = require('./downloadUtils-8f50633d.js');
|
10
10
|
require('./index-b8a649fc.js');
|
11
11
|
require('./loadModules-46d14e81.js');
|
12
12
|
require('./esri-loader-a91c0ec1.js');
|
13
|
-
require('./mapViewUtils-
|
13
|
+
require('./mapViewUtils-569e9644.js');
|
14
14
|
require('./interfaces-7cd0a48a.js');
|
15
15
|
require('./solution-resource-abec7452.js');
|
16
16
|
require('./index-f64944ad.js');
|