@esri/solutions-components 0.7.20 → 0.7.22
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/t9n/public-notification/resources.json +2 -1
- package/dist/assets/t9n/public-notification/resources_en.json +2 -1
- package/dist/cjs/card-manager_3.cjs.entry.js +133 -91
- package/dist/cjs/crowdsource-manager.cjs.entry.js +10 -10
- package/dist/cjs/{downloadUtils-9a13c6ac.js → downloadUtils-401356b5.js} +5 -3
- package/dist/cjs/{index.es-284a020c.js → index.es-a9a4ff08.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +7 -4
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +29 -11
- package/dist/collection/components/layer-table/layer-table.js +162 -99
- package/dist/collection/components/public-notification/public-notification.js +7 -3
- package/dist/collection/utils/pdfUtils.js +4 -2
- package/dist/collection/utils/pdfUtils.ts +4 -2
- package/dist/components/crowdsource-manager.js +13 -12
- package/dist/components/downloadUtils.js +4 -2
- package/dist/components/layer-table2.js +134 -91
- package/dist/components/public-notification.js +7 -3
- package/dist/esm/card-manager_3.entry.js +133 -91
- package/dist/esm/crowdsource-manager.entry.js +10 -10
- package/dist/esm/{downloadUtils-a4bbdb1d.js → downloadUtils-13579d93.js} +5 -3
- package/dist/esm/{index.es-48fdb288.js → index.es-04d2e63e.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +1 -1
- package/dist/esm/public-notification.entry.js +7 -4
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/p-02fad071.entry.js +6 -0
- package/dist/solutions-components/{p-b1422b00.entry.js → p-24286e8c.entry.js} +1 -1
- package/dist/solutions-components/p-630e274b.entry.js +6 -0
- package/dist/solutions-components/{p-72dbfa77.js → p-c68a6d4f.js} +1 -1
- package/dist/solutions-components/{p-d4afcf86.js → p-c9f87acb.js} +2 -2
- package/dist/solutions-components/p-d3085b7a.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/pdfUtils.ts +4 -2
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +13 -4
- package/dist/types/components/layer-table/layer-table.d.ts +14 -5
- package/dist/types/components/public-notification/public-notification.d.ts +4 -0
- package/dist/types/components.d.ts +18 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-107b7816.entry.js +0 -6
- package/dist/solutions-components/p-2abc02a1.entry.js +0 -6
- package/dist/solutions-components/p-6b4e621b.entry.js +0 -6
@@ -29,7 +29,8 @@
|
|
29
29
|
"export": "Export",
|
30
30
|
"exportTip": "Select lists to include in the exported file. Export lists as CSV and PDF.",
|
31
31
|
"title": "Title",
|
32
|
-
"addTitle": "
|
32
|
+
"addTitle": "Include title",
|
33
|
+
"addResults": "Include results",
|
33
34
|
"titlePlaceholder": "Enter title here",
|
34
35
|
"includeMap": "Include map",
|
35
36
|
"pdfOptions": "PDF Options",
|
@@ -29,7 +29,8 @@
|
|
29
29
|
"export": "Export",
|
30
30
|
"exportTip": "Select lists to include in the exported file. Export lists as CSV and PDF.",
|
31
31
|
"title": "Title",
|
32
|
-
"addTitle": "
|
32
|
+
"addTitle": "Include title",
|
33
|
+
"addResults": "Include results",
|
33
34
|
"titlePlaceholder": "Enter title here",
|
34
35
|
"includeMap": "Include map",
|
35
36
|
"pdfOptions": "PDF Options",
|
@@ -11,7 +11,7 @@ const index = require('./index-b8a649fc.js');
|
|
11
11
|
const locale = require('./locale-9db09b63.js');
|
12
12
|
const mapViewUtils = require('./mapViewUtils-8aa325de.js');
|
13
13
|
const loadModules = require('./loadModules-46d14e81.js');
|
14
|
-
const downloadUtils = require('./downloadUtils-
|
14
|
+
const downloadUtils = require('./downloadUtils-401356b5.js');
|
15
15
|
require('./esri-loader-a91c0ec1.js');
|
16
16
|
require('./_commonjsHelpers-384729db.js');
|
17
17
|
require('./interfaces-7cd0a48a.js');
|
@@ -121,6 +121,10 @@ const LayerTable = class {
|
|
121
121
|
* boolean: When true the ctrl key is currently pressed
|
122
122
|
*/
|
123
123
|
this._ctrlIsPressed = false;
|
124
|
+
/**
|
125
|
+
* boolean: When true the default filter provided via url param has been honored and should now be ignored
|
126
|
+
*/
|
127
|
+
this._defaultFilterHonored = false;
|
124
128
|
/**
|
125
129
|
* boolean: When true the default global id provided via url param has been honored and should now be ignored
|
126
130
|
*/
|
@@ -154,8 +158,9 @@ const LayerTable = class {
|
|
154
158
|
this.onTableNodeCreate = (node) => {
|
155
159
|
this._tableNode = node;
|
156
160
|
};
|
157
|
-
this.
|
161
|
+
this.defaultFilter = undefined;
|
158
162
|
this.defaultGlobalId = undefined;
|
163
|
+
this.defaultLayerId = undefined;
|
159
164
|
this.defaultOid = undefined;
|
160
165
|
this.enableAutoRefresh = undefined;
|
161
166
|
this.enableColumnReorder = true;
|
@@ -525,93 +530,95 @@ const LayerTable = class {
|
|
525
530
|
const featuresSelected = this._featuresSelected();
|
526
531
|
const featuresEmpty = this._featuresEmpty();
|
527
532
|
const hasFilterExpressions = this._hasFilterExpressions();
|
528
|
-
this.
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
533
|
+
if (this._translations) {
|
534
|
+
this._toolInfos = [{
|
535
|
+
active: false,
|
536
|
+
icon: "zoom-to-object",
|
537
|
+
indicator: false,
|
538
|
+
label: this._translations.zoom,
|
539
|
+
func: () => this._zoom(),
|
540
|
+
disabled: !featuresSelected,
|
541
|
+
isOverflow: false
|
542
|
+
},
|
543
|
+
hasFilterExpressions ? {
|
544
|
+
active: false,
|
545
|
+
icon: "filter",
|
546
|
+
indicator: false,
|
547
|
+
label: this._translations.filters,
|
548
|
+
func: () => this._toggleFilter(),
|
549
|
+
disabled: false,
|
550
|
+
isOverflow: false
|
551
|
+
} : undefined,
|
552
|
+
this._deleteEnabled ? {
|
553
|
+
active: false,
|
554
|
+
icon: "trash",
|
555
|
+
indicator: false,
|
556
|
+
label: this._translations.delete,
|
557
|
+
func: () => this._delete(),
|
558
|
+
disabled: !featuresSelected,
|
559
|
+
isDanger: true,
|
560
|
+
isOverflow: false
|
561
|
+
} : undefined, {
|
562
|
+
active: false,
|
563
|
+
icon: "erase",
|
564
|
+
indicator: false,
|
565
|
+
label: this._translations.clearSelection,
|
566
|
+
func: () => this._clearSelection(),
|
567
|
+
disabled: !featuresSelected,
|
568
|
+
isOverflow: false
|
569
|
+
}, {
|
570
|
+
active: false,
|
571
|
+
icon: "selected-items-filter",
|
572
|
+
indicator: false,
|
573
|
+
label: this._showOnlySelected ? this._translations.showAll : this._translations.showSelected,
|
574
|
+
func: () => this._toggleShowSelected(),
|
575
|
+
disabled: !featuresSelected,
|
576
|
+
isOverflow: false
|
577
|
+
}, {
|
578
|
+
active: false,
|
579
|
+
icon: "list-check-all",
|
580
|
+
indicator: false,
|
581
|
+
func: () => this._selectAll(),
|
582
|
+
label: this._translations.selectAll,
|
583
|
+
disabled: featuresEmpty,
|
584
|
+
isOverflow: false
|
585
|
+
}, {
|
586
|
+
active: false,
|
587
|
+
icon: "compare",
|
588
|
+
indicator: false,
|
589
|
+
func: () => this._switchSelected(),
|
590
|
+
label: this._translations.switchSelected,
|
591
|
+
disabled: featuresEmpty,
|
592
|
+
isOverflow: false
|
593
|
+
}, {
|
594
|
+
active: false,
|
595
|
+
icon: "refresh",
|
596
|
+
indicator: false,
|
597
|
+
func: () => this._refresh(),
|
598
|
+
label: this._translations.refresh,
|
599
|
+
disabled: false,
|
600
|
+
isOverflow: false
|
601
|
+
},
|
602
|
+
this.enableCSV ? {
|
603
|
+
active: false,
|
604
|
+
icon: "export",
|
605
|
+
indicator: false,
|
606
|
+
func: () => void this._exportToCSV(),
|
607
|
+
label: this._translations.exportCSV,
|
608
|
+
disabled: featuresEmpty,
|
609
|
+
isOverflow: false
|
610
|
+
} : undefined, {
|
611
|
+
active: false,
|
612
|
+
icon: this._showHideOpen ? "chevron-down" : "chevron-right",
|
613
|
+
indicator: false,
|
614
|
+
func: () => this._toggleShowHide(),
|
615
|
+
label: this._translations.showHideColumns,
|
616
|
+
disabled: false,
|
617
|
+
isOverflow: false,
|
618
|
+
isSublist: true
|
619
|
+
}];
|
620
|
+
this._defaultVisibleToolSizeInfos = undefined;
|
621
|
+
}
|
615
622
|
}
|
616
623
|
/**
|
617
624
|
* Returns true when one ore more features are selected
|
@@ -822,13 +829,39 @@ const LayerTable = class {
|
|
822
829
|
if ((_b = this.mapInfo) === null || _b === void 0 ? void 0 : _b.id) {
|
823
830
|
urlObj.searchParams.set("webmap", this.mapInfo.id);
|
824
831
|
}
|
832
|
+
else {
|
833
|
+
urlObj.searchParams.delete("webmap");
|
834
|
+
}
|
825
835
|
if ((_c = this._layer) === null || _c === void 0 ? void 0 : _c.id) {
|
826
836
|
urlObj.searchParams.set("layer", this._layer.id);
|
827
837
|
}
|
838
|
+
else {
|
839
|
+
urlObj.searchParams.delete("layer");
|
840
|
+
}
|
828
841
|
if (((_d = this._selectedIndexes) === null || _d === void 0 ? void 0 : _d.length) > 0) {
|
829
842
|
urlObj.searchParams.set("oid", this._selectedIndexes.join(","));
|
830
843
|
}
|
844
|
+
else {
|
845
|
+
urlObj.searchParams.delete("oid");
|
846
|
+
}
|
847
|
+
if (this._filterActive) {
|
848
|
+
const filter = JSON.parse(this._filterList.urlParams.get("filter"));
|
849
|
+
const layerExpressions = this._filterList.layerExpressions.map(layerExp => {
|
850
|
+
layerExp.expressions = layerExp.expressions.map(exp => {
|
851
|
+
if (exp.id.toString() === filter.expressionId.toString()) {
|
852
|
+
exp.active = true;
|
853
|
+
}
|
854
|
+
return exp;
|
855
|
+
});
|
856
|
+
return layerExp;
|
857
|
+
});
|
858
|
+
urlObj.searchParams.set("filter", JSON.stringify(layerExpressions));
|
859
|
+
}
|
860
|
+
else {
|
861
|
+
urlObj.searchParams.delete("filter");
|
862
|
+
}
|
831
863
|
this._shareNode.shareUrl = urlObj.href;
|
864
|
+
history.pushState(history.state, document.title, urlObj.href);
|
832
865
|
}
|
833
866
|
/**
|
834
867
|
* Get a tooltip
|
@@ -949,7 +982,8 @@ const LayerTable = class {
|
|
949
982
|
const _end = this._table.viewModel.getObjectIdIndex(this._currentId);
|
950
983
|
const startIndex = _start < _end ? _start : _end;
|
951
984
|
const endIndex = _end > _start ? _end : _start;
|
952
|
-
this.
|
985
|
+
this._skipOnChange = startIndex + 1 !== endIndex;
|
986
|
+
const selectedIndexes = oids.reduce((prev, cur) => {
|
953
987
|
const id = cur;
|
954
988
|
const index = this._table.viewModel.getObjectIdIndex(id);
|
955
989
|
if ((id === this._currentId || id === this._previousCurrentId)) {
|
@@ -971,6 +1005,7 @@ const LayerTable = class {
|
|
971
1005
|
}
|
972
1006
|
return prev;
|
973
1007
|
}, []);
|
1008
|
+
this._selectedIndexes = _start < _end ? selectedIndexes.reverse() : selectedIndexes;
|
974
1009
|
this._table.highlightIds.addMany(this._selectedIndexes.filter(i => ids.indexOf(i) < 0));
|
975
1010
|
}
|
976
1011
|
}
|
@@ -1033,6 +1068,11 @@ const LayerTable = class {
|
|
1033
1068
|
}
|
1034
1069
|
this._defaultGlobalIdHonored = true;
|
1035
1070
|
}
|
1071
|
+
if (!this._defaultFilterHonored && this.defaultFilter && this._filterList) {
|
1072
|
+
this._layerExpressions = this.defaultFilter;
|
1073
|
+
this._filterActive = true;
|
1074
|
+
this._defaultFilterHonored = true;
|
1075
|
+
}
|
1036
1076
|
});
|
1037
1077
|
this._showOnlySelected = false;
|
1038
1078
|
this._sortActive = false;
|
@@ -1141,19 +1181,21 @@ const LayerTable = class {
|
|
1141
1181
|
*/
|
1142
1182
|
_filterModal() {
|
1143
1183
|
var _a, _b, _c;
|
1144
|
-
return (index.h("calcite-modal", { "aria-labelledby": "modal-title", class: "modal", 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:
|
1184
|
+
return (index.h("calcite-modal", { "aria-labelledby": "modal-title", class: "modal", 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: true, closeBtn: true, closeBtnOnClick: async () => this._closeFilter(), layerExpressions: this._layerExpressions, onFilterListReset: () => this._handleFilterListReset(), onFilterUpdate: () => this._handleFilterUpdate(), ref: (el) => this._filterList = el, view: this.mapView, zoomBtn: false }))));
|
1145
1185
|
}
|
1146
1186
|
/**
|
1147
1187
|
* Reset the filter active prop
|
1148
1188
|
*/
|
1149
1189
|
_handleFilterListReset() {
|
1150
1190
|
this._filterActive = false;
|
1191
|
+
this._updateShareUrl();
|
1151
1192
|
}
|
1152
1193
|
/**
|
1153
1194
|
* Check if the layers definitionExpression has been modified
|
1154
1195
|
*/
|
1155
1196
|
_handleFilterUpdate() {
|
1156
1197
|
this._filterActive = this._definitionExpression !== this._layer.definitionExpression;
|
1198
|
+
this._updateShareUrl();
|
1157
1199
|
}
|
1158
1200
|
/**
|
1159
1201
|
* Close the filter modal
|
@@ -24,6 +24,7 @@ const CrowdsourceManager = class {
|
|
24
24
|
*/
|
25
25
|
this._shouldSetMapView = false;
|
26
26
|
this.defaultCenter = "";
|
27
|
+
this.defaultFilter = "";
|
27
28
|
this.defaultGlobalId = "";
|
28
29
|
this.defaultLayer = "";
|
29
30
|
this.defaultLevel = "";
|
@@ -74,6 +75,12 @@ const CrowdsourceManager = class {
|
|
74
75
|
this._defaultCenter = !this.defaultCenter ? undefined :
|
75
76
|
this.defaultCenter.split(";").map(v => parseFloat(v));
|
76
77
|
}
|
78
|
+
/**
|
79
|
+
* Watch for filter url param to be set
|
80
|
+
*/
|
81
|
+
defaultFilterWatchHandler() {
|
82
|
+
this._defaultFilter = JSON.parse(this.defaultFilter);
|
83
|
+
}
|
77
84
|
/**
|
78
85
|
* Watch for globalid url param to be set
|
79
86
|
*/
|
@@ -100,13 +107,6 @@ const CrowdsourceManager = class {
|
|
100
107
|
enableZoomWatchHandler() {
|
101
108
|
this._initMapZoom();
|
102
109
|
}
|
103
|
-
/**
|
104
|
-
* Show the map, popup, and table if the user switches out of mobile mode
|
105
|
-
*/
|
106
|
-
async _isMobileWatchHandler() {
|
107
|
-
const show = !this._isMobile ? false : this._numSelected > 0;
|
108
|
-
this.showHideMapPopupAndTable(show);
|
109
|
-
}
|
110
110
|
//--------------------------------------------------------------------------
|
111
111
|
//
|
112
112
|
// Methods (public)
|
@@ -385,7 +385,7 @@ const CrowdsourceManager = class {
|
|
385
385
|
const toggleLayout = layoutMode === interfaces.ELayoutMode.HORIZONTAL ? "horizontal" : "vertical";
|
386
386
|
const toggleSlot = layoutMode === interfaces.ELayoutMode.HORIZONTAL ? "header" : "panel-start";
|
387
387
|
const hasMapAndLayer = this.defaultWebmap && this.defaultLayer;
|
388
|
-
return (index.h("calcite-shell", { class: `${tableSizeClass} ${tableClass} border-bottom` }, !this._isMobile ? (index.h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, index.h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), index.h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, index.h("span", null, tooltip)))) : undefined, index.h("div", { class: `width-full height-full position-relative` }, index.h("layer-table", { defaultGlobalId: hasMapAndLayer ? this._defaultGlobalId : undefined, defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultOid: hasMapAndLayer && !this.defaultGlobalId ? this._defaultOid : undefined, enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableColumnReorder: this.enableColumnReorder, enableInlineEdit: this.enableInlineEdit, enableShare: this.enableShare, isMobile: this._isMobile, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, ref: (el) => this._layerTable = el, shareIncludeEmbed: this.shareIncludeEmbed, shareIncludeSocial: this.shareIncludeSocial, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected }))));
|
388
|
+
return (index.h("calcite-shell", { class: `${tableSizeClass} ${tableClass} border-bottom` }, !this._isMobile ? (index.h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, index.h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), index.h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, index.h("span", null, tooltip)))) : undefined, index.h("div", { class: `width-full height-full position-relative` }, index.h("layer-table", { defaultFilter: hasMapAndLayer ? this._defaultFilter : undefined, defaultGlobalId: hasMapAndLayer ? this._defaultGlobalId : undefined, defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultOid: hasMapAndLayer && !this.defaultGlobalId ? this._defaultOid : undefined, enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableColumnReorder: this.enableColumnReorder, enableInlineEdit: this.enableInlineEdit, enableShare: this.enableShare, isMobile: this._isMobile, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, ref: (el) => this._layerTable = el, shareIncludeEmbed: this.shareIncludeEmbed, shareIncludeSocial: this.shareIncludeSocial, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected }))));
|
389
389
|
}
|
390
390
|
/**
|
391
391
|
* Update the component layout when its size changes
|
@@ -477,11 +477,11 @@ const CrowdsourceManager = class {
|
|
477
477
|
get el() { return index.getElement(this); }
|
478
478
|
static get watchers() { return {
|
479
479
|
"defaultCenter": ["defaultCenterWatchHandler"],
|
480
|
+
"defaultFilter": ["defaultFilterWatchHandler"],
|
480
481
|
"defaultGlobalId": ["defaultGlobalIdWatchHandler"],
|
481
482
|
"defaultOid": ["defaultOidWatchHandler"],
|
482
483
|
"defaultLevel": ["defaultLevelWatchHandler"],
|
483
|
-
"enableZoom": ["enableZoomWatchHandler"]
|
484
|
-
"_isMobile": ["_isMobileWatchHandler"]
|
484
|
+
"enableZoom": ["enableZoomWatchHandler"]
|
485
485
|
}; }
|
486
486
|
};
|
487
487
|
CrowdsourceManager.style = crowdsourceManagerCss;
|
@@ -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-a9a4ff08.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
|
@@ -2233,8 +2233,10 @@ function downloadPDFFile(filename, labels, labelPageDescription, title = "", ini
|
|
2233
2233
|
if (title) {
|
2234
2234
|
labeller.drawSupplementalText(title, 0, -0.1);
|
2235
2235
|
}
|
2236
|
-
|
2237
|
-
|
2236
|
+
if (labels.length > 0) {
|
2237
|
+
pdfLib.addPage();
|
2238
|
+
++startingPageNum;
|
2239
|
+
}
|
2238
2240
|
}
|
2239
2241
|
// Add the labels to the PDF
|
2240
2242
|
await labeller.addLabelsToDoc(labels, labelSpec, startingPageNum, title // heading
|
@@ -6,7 +6,7 @@
|
|
6
6
|
'use strict';
|
7
7
|
|
8
8
|
const _commonjsHelpers = require('./_commonjsHelpers-384729db.js');
|
9
|
-
const downloadUtils = require('./downloadUtils-
|
9
|
+
const downloadUtils = require('./downloadUtils-401356b5.js');
|
10
10
|
require('./index-b8a649fc.js');
|
11
11
|
require('./loadModules-46d14e81.js');
|
12
12
|
require('./esri-loader-a91c0ec1.js');
|