@esri/solutions-components 0.6.34 → 0.6.35
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/calcite-alert_3.cjs.entry.js +20 -6
- package/dist/cjs/calcite-combobox_6.cjs.entry.js +1 -1
- package/dist/cjs/card-manager_3.cjs.entry.js +83 -13
- package/dist/cjs/crowdsource-manager.cjs.entry.js +27 -4
- package/dist/cjs/{downloadUtils-b37689dd.js → downloadUtils-37d9aaf3.js} +2 -2
- package/dist/cjs/{index.es-83e253dc.js → index.es-d1d9b140.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-303bf42d.js → mapViewUtils-96172223.js} +18 -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 +30 -4
- package/dist/collection/components/edit-card/edit-card.js +19 -6
- package/dist/collection/components/layer-table/layer-table.js +56 -5
- package/dist/collection/components/map-card/map-card.js +34 -6
- package/dist/collection/utils/mapViewUtils.js +17 -0
- package/dist/collection/utils/mapViewUtils.ts +20 -0
- package/dist/components/crowdsource-manager.js +30 -5
- package/dist/components/edit-card2.js +19 -6
- package/dist/components/layer-table2.js +54 -6
- package/dist/components/map-card2.js +34 -7
- package/dist/components/map-layer-picker2.js +1 -1
- package/dist/components/map-select-tools2.js +1 -1
- package/dist/components/mapViewUtils.js +18 -1
- package/dist/components/public-notification.js +1 -1
- package/dist/components/refine-selection2.js +1 -1
- package/dist/esm/calcite-alert_3.entry.js +20 -6
- package/dist/esm/calcite-combobox_6.entry.js +1 -1
- package/dist/esm/card-manager_3.entry.js +83 -13
- package/dist/esm/crowdsource-manager.entry.js +27 -4
- package/dist/esm/{downloadUtils-ddd7eeb7.js → downloadUtils-76379e4a.js} +2 -2
- package/dist/esm/{index.es-a53707d1.js → index.es-0d134a52.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-43c930f1.js → mapViewUtils-08f6cfce.js} +18 -1
- package/dist/esm/public-notification.entry.js +2 -2
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/{p-05ba41f9.js → p-03130804.js} +1 -1
- package/dist/solutions-components/{p-e05cf92d.entry.js → p-0f50087e.entry.js} +2 -2
- package/dist/solutions-components/{p-f2194390.js → p-15070568.js} +1 -1
- package/dist/solutions-components/{p-4792005c.entry.js → p-1682bd0f.entry.js} +1 -1
- package/dist/solutions-components/p-63867402.entry.js +6 -0
- package/dist/solutions-components/{p-50a3a887.entry.js → p-81a0c88f.entry.js} +1 -1
- package/dist/solutions-components/{p-978a26b3.entry.js → p-9800e602.entry.js} +1 -1
- package/dist/solutions-components/{p-b745143d.js → p-b02eb8f4.js} +2 -2
- package/dist/solutions-components/p-eba875d9.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/mapViewUtils.ts +20 -0
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +10 -0
- package/dist/types/components/edit-card/edit-card.d.ts +5 -1
- package/dist/types/components/layer-table/layer-table.d.ts +24 -0
- package/dist/types/components/map-card/map-card.d.ts +14 -0
- package/dist/types/utils/mapViewUtils.d.ts +9 -0
- package/package.json +1 -1
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/solutions-components/p-506db776.entry.js +0 -6
- package/dist/solutions-components/p-80243d29.entry.js +0 -6
@@ -18,10 +18,12 @@ const responsive = require('./responsive-b6e86bcb.js');
|
|
18
18
|
const observers = require('./observers-ee7eadc4.js');
|
19
19
|
const loadModules = require('./loadModules-03328b9d.js');
|
20
20
|
const locale$1 = require('./locale-d50f3250.js');
|
21
|
+
const mapViewUtils = require('./mapViewUtils-96172223.js');
|
21
22
|
require('./guid-5ef151a6.js');
|
22
23
|
require('./resources-d8917c46.js');
|
23
24
|
require('./key-29076628.js');
|
24
25
|
require('./_commonjsHelpers-384729db.js');
|
26
|
+
require('./interfaces-000be6de.js');
|
25
27
|
|
26
28
|
/*!
|
27
29
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
@@ -358,7 +360,7 @@ const EditCard = class {
|
|
358
360
|
var _a;
|
359
361
|
if (v && ((_a = this.graphics) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.graphicIndex > -1) {
|
360
362
|
this._editorLoading = true;
|
361
|
-
this._initEditorWidget();
|
363
|
+
await this._initEditorWidget();
|
362
364
|
if (this.graphicIndex > -1 && this.graphics.length > 0 && this.open && !this._shouldClose) {
|
363
365
|
await this._startUpdate();
|
364
366
|
}
|
@@ -440,19 +442,24 @@ const EditCard = class {
|
|
440
442
|
*
|
441
443
|
* @returns void
|
442
444
|
*/
|
443
|
-
_initEditorWidget() {
|
445
|
+
async _initEditorWidget() {
|
444
446
|
if (this.mapView && this.graphics && this.graphics.length > 0 && this.graphics[0]) {
|
445
447
|
if (this._editor) {
|
446
448
|
this._editor.destroy();
|
447
449
|
}
|
448
450
|
const container = document.createElement("div");
|
451
|
+
const layers = await mapViewUtils.getAllLayers(this.mapView);
|
452
|
+
const layerInfos = layers.map(layer => {
|
453
|
+
return {
|
454
|
+
layer,
|
455
|
+
geometryUpdatesEnabled: false,
|
456
|
+
addEnabled: false
|
457
|
+
};
|
458
|
+
});
|
449
459
|
this._editor = new this.Editor({
|
450
460
|
allowedWorkflows: "update",
|
451
461
|
view: this.mapView,
|
452
|
-
layerInfos
|
453
|
-
layer: this._layer,
|
454
|
-
geometryUpdatesEnabled: false
|
455
|
-
}],
|
462
|
+
layerInfos,
|
456
463
|
visibleElements: {
|
457
464
|
snappingControls: false,
|
458
465
|
sketchTooltipControls: false
|
@@ -463,6 +470,7 @@ const EditCard = class {
|
|
463
470
|
this._editHandle.remove();
|
464
471
|
this._attachmentHandle.remove();
|
465
472
|
this._activeWorkflowHandle.remove();
|
473
|
+
this._addRelatedRecordHandle.remove();
|
466
474
|
}
|
467
475
|
this._attachmentHandle = this.reactiveUtils.when(() => this._editor.viewModel.state === "adding-attachment" ||
|
468
476
|
this._editor.viewModel.state === "editing-attachment" ||
|
@@ -482,6 +490,12 @@ const EditCard = class {
|
|
482
490
|
this._shouldClose = false;
|
483
491
|
}
|
484
492
|
});
|
493
|
+
// Temp workaround until a new prop is added at 4.29
|
494
|
+
this._addRelatedRecordHandle = this.reactiveUtils.when(() => !!this._editor.viewModel.featureFormViewModel.relatedRecordCallbacks, () => {
|
495
|
+
this._editor.viewModel.featureFormViewModel.relatedRecordCallbacks.addRelatedRecord = null;
|
496
|
+
}, {
|
497
|
+
once: true
|
498
|
+
});
|
485
499
|
// had issues with destroy before adding like this
|
486
500
|
this._editContainer.appendChild(container);
|
487
501
|
}
|
@@ -25,7 +25,7 @@ const debounce = require('./debounce-30afab47.js');
|
|
25
25
|
const conditionalSlot = require('./conditionalSlot-b6c29b8c.js');
|
26
26
|
const key = require('./key-29076628.js');
|
27
27
|
const locale$1 = require('./locale-d50f3250.js');
|
28
|
-
const mapViewUtils = require('./mapViewUtils-
|
28
|
+
const mapViewUtils = require('./mapViewUtils-96172223.js');
|
29
29
|
const publicNotificationStore = require('./publicNotificationStore-9c812ef4.js');
|
30
30
|
require('./resources-d8917c46.js');
|
31
31
|
require('./browser-09760f9f.js');
|
@@ -9,9 +9,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
9
|
|
10
10
|
const index = require('./index-1ffa261f.js');
|
11
11
|
const locale = require('./locale-d50f3250.js');
|
12
|
-
const mapViewUtils = require('./mapViewUtils-
|
12
|
+
const mapViewUtils = require('./mapViewUtils-96172223.js');
|
13
13
|
const loadModules = require('./loadModules-03328b9d.js');
|
14
|
-
const downloadUtils = require('./downloadUtils-
|
14
|
+
const downloadUtils = require('./downloadUtils-37d9aaf3.js');
|
15
15
|
require('./_commonjsHelpers-384729db.js');
|
16
16
|
require('./interfaces-000be6de.js');
|
17
17
|
require('./clean-url-d5326abb.js');
|
@@ -153,6 +153,32 @@ const LayerTable = class {
|
|
153
153
|
// Watch handlers
|
154
154
|
//
|
155
155
|
//--------------------------------------------------------------------------
|
156
|
+
/**
|
157
|
+
* Reset the toolInfos when zoom tool is enabled/disabled
|
158
|
+
*/
|
159
|
+
enableZoomWatchHandler() {
|
160
|
+
var _a;
|
161
|
+
if (((_a = this._toolInfos) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
162
|
+
this._initToolInfos();
|
163
|
+
}
|
164
|
+
}
|
165
|
+
/**
|
166
|
+
* Reset the toolInfos when export csv is enabled/disabled
|
167
|
+
*/
|
168
|
+
enableCSVWatchHandler() {
|
169
|
+
var _a;
|
170
|
+
if (((_a = this._toolInfos) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
171
|
+
this._initToolInfos();
|
172
|
+
}
|
173
|
+
}
|
174
|
+
/**
|
175
|
+
* Update the table when enableInlineEdit is enabled/disabled
|
176
|
+
*/
|
177
|
+
enableInlineEditWatchHandler() {
|
178
|
+
if (this._table) {
|
179
|
+
this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
|
180
|
+
}
|
181
|
+
}
|
156
182
|
/**
|
157
183
|
* watch for changes to the list of controls that will currently fit in the display
|
158
184
|
*/
|
@@ -356,7 +382,7 @@ const LayerTable = class {
|
|
356
382
|
* @returns void
|
357
383
|
*/
|
358
384
|
_validateEnabledActions() {
|
359
|
-
const featuresSelected = this.
|
385
|
+
const featuresSelected = this._featuresSelected();
|
360
386
|
const selectionDependant = [
|
361
387
|
"zoom-to-object",
|
362
388
|
"trash",
|
@@ -378,8 +404,8 @@ const LayerTable = class {
|
|
378
404
|
*/
|
379
405
|
_initToolInfos() {
|
380
406
|
var _a;
|
381
|
-
const featuresSelected = this.
|
382
|
-
const featuresEmpty = this.
|
407
|
+
const featuresSelected = this._featuresSelected();
|
408
|
+
const featuresEmpty = this._featuresEmpty();
|
383
409
|
this._toolInfos = [this.enableZoom ? {
|
384
410
|
icon: "zoom-to-object",
|
385
411
|
label: this._translations.zoom,
|
@@ -441,6 +467,22 @@ const LayerTable = class {
|
|
441
467
|
} : undefined];
|
442
468
|
this._defaultVisibleToolSizeInfos = undefined;
|
443
469
|
}
|
470
|
+
/**
|
471
|
+
* Returns true when one ore more features are selected
|
472
|
+
*
|
473
|
+
* @returns boolean
|
474
|
+
*/
|
475
|
+
_featuresSelected() {
|
476
|
+
return this._selectedIndexes.length > 0;
|
477
|
+
}
|
478
|
+
/**
|
479
|
+
* Return true when we have no features
|
480
|
+
*
|
481
|
+
* @returns boolean
|
482
|
+
*/
|
483
|
+
_featuresEmpty() {
|
484
|
+
return this._allIds.length === 0;
|
485
|
+
}
|
444
486
|
/**
|
445
487
|
* Add/Remove tools from the action bar and dropdown based on available size
|
446
488
|
*
|
@@ -669,7 +711,7 @@ const LayerTable = class {
|
|
669
711
|
// https://github.com/Esri/solutions-components/issues/365
|
670
712
|
this._selectedIndexes = this._table.highlightIds.toArray().reverse();
|
671
713
|
if (this._showOnlySelected) {
|
672
|
-
if (this.
|
714
|
+
if (this._featuresSelected()) {
|
673
715
|
this._table.filterBySelection();
|
674
716
|
}
|
675
717
|
else {
|
@@ -919,7 +961,7 @@ const LayerTable = class {
|
|
919
961
|
async _layerSelectionChanged(evt) {
|
920
962
|
var _a;
|
921
963
|
const id = evt.detail[0];
|
922
|
-
if (id !== ((_a = this._layer) === null || _a === void 0 ? void 0 : _a.id) || this.
|
964
|
+
if (id !== ((_a = this._layer) === null || _a === void 0 ? void 0 : _a.id) || this._featuresEmpty()) {
|
923
965
|
this._fetchingData = true;
|
924
966
|
const layer = await mapViewUtils.getLayerOrTable(this.mapView, id);
|
925
967
|
await layer.when(() => {
|
@@ -976,6 +1018,9 @@ const LayerTable = class {
|
|
976
1018
|
}
|
977
1019
|
get el() { return index.getElement(this); }
|
978
1020
|
static get watchers() { return {
|
1021
|
+
"enableZoom": ["enableZoomWatchHandler"],
|
1022
|
+
"enableCSV": ["enableCSVWatchHandler"],
|
1023
|
+
"enableInlineEdit": ["enableInlineEditWatchHandler"],
|
979
1024
|
"_controlsThatFit": ["_controlsThatFitWatchHandler"],
|
980
1025
|
"mapView": ["mapViewWatchHandler"],
|
981
1026
|
"_layer": ["_layerWatchHandler"],
|
@@ -1009,6 +1054,17 @@ const MapCard = class {
|
|
1009
1054
|
this._searchConfiguration = undefined;
|
1010
1055
|
this._webMapInfo = undefined;
|
1011
1056
|
}
|
1057
|
+
//--------------------------------------------------------------------------
|
1058
|
+
//
|
1059
|
+
// Watch handlers
|
1060
|
+
//
|
1061
|
+
//--------------------------------------------------------------------------
|
1062
|
+
/**
|
1063
|
+
* Add/remove home widget
|
1064
|
+
*/
|
1065
|
+
enableHomeWatchHandler() {
|
1066
|
+
this._initHome();
|
1067
|
+
}
|
1012
1068
|
/**
|
1013
1069
|
* Listen for changes to map info and load the appropriate map
|
1014
1070
|
*/
|
@@ -1083,12 +1139,7 @@ const MapCard = class {
|
|
1083
1139
|
this._searchConfiguration = this._webMapInfo.searchConfiguration;
|
1084
1140
|
this.beforeMapChanged.emit();
|
1085
1141
|
await this.mapView.when(() => {
|
1086
|
-
|
1087
|
-
const home = new this.Home({
|
1088
|
-
view: this.mapView
|
1089
|
-
});
|
1090
|
-
this.mapView.ui.add(home, { position: "top-left", index: 3 });
|
1091
|
-
}
|
1142
|
+
this._initHome();
|
1092
1143
|
this.mapView.ui.add(this._mapTools, { position: "top-right", index: 0 });
|
1093
1144
|
this.mapChanged.emit({
|
1094
1145
|
id: id,
|
@@ -1097,7 +1148,26 @@ const MapCard = class {
|
|
1097
1148
|
});
|
1098
1149
|
}
|
1099
1150
|
}
|
1151
|
+
/**
|
1152
|
+
* Add/remove the home widget base on enableHome prop
|
1153
|
+
*
|
1154
|
+
* @protected
|
1155
|
+
*/
|
1156
|
+
_initHome() {
|
1157
|
+
if (this.enableHome) {
|
1158
|
+
this._homeWidget = new this.Home({
|
1159
|
+
view: this.mapView
|
1160
|
+
});
|
1161
|
+
this.mapView.ui.add(this._homeWidget, { position: "top-left", index: 3 });
|
1162
|
+
}
|
1163
|
+
else if (this._homeWidget) {
|
1164
|
+
this.mapView.ui.remove(this._homeWidget);
|
1165
|
+
}
|
1166
|
+
}
|
1100
1167
|
get el() { return index.getElement(this); }
|
1168
|
+
static get watchers() { return {
|
1169
|
+
"enableHome": ["enableHomeWatchHandler"]
|
1170
|
+
}; }
|
1101
1171
|
};
|
1102
1172
|
MapCard.style = mapCardCss;
|
1103
1173
|
|
@@ -52,6 +52,12 @@ const CrowdsourceManager = class {
|
|
52
52
|
// Watch handlers
|
53
53
|
//
|
54
54
|
//--------------------------------------------------------------------------
|
55
|
+
/**
|
56
|
+
* When true the map zoom tools will be available
|
57
|
+
*/
|
58
|
+
enableZoomWatchHandler() {
|
59
|
+
this._initMapZoom();
|
60
|
+
}
|
55
61
|
//--------------------------------------------------------------------------
|
56
62
|
//
|
57
63
|
// Methods (public)
|
@@ -334,14 +340,28 @@ const CrowdsourceManager = class {
|
|
334
340
|
* @protected
|
335
341
|
*/
|
336
342
|
_setMapView() {
|
337
|
-
var _a, _b;
|
338
343
|
this._mapInfo = this._getMapInfo(this._mapChange.id);
|
339
344
|
this._mapView = this._mapChange.mapView;
|
340
|
-
|
341
|
-
this._mapView.ui.components = this._mapView.ui.components.filter(c => c !== "zoom");
|
342
|
-
}
|
345
|
+
this._initMapZoom();
|
343
346
|
this._mapView.popupEnabled = false;
|
344
347
|
}
|
348
|
+
/**
|
349
|
+
* Add/remove zoom tools based on enableZoom prop
|
350
|
+
*
|
351
|
+
* @protected
|
352
|
+
*/
|
353
|
+
_initMapZoom() {
|
354
|
+
if (!this.enableZoom) {
|
355
|
+
this._mapView.ui.remove("zoom");
|
356
|
+
}
|
357
|
+
else if (this.enableZoom) {
|
358
|
+
this._mapView.ui.add({
|
359
|
+
component: "zoom",
|
360
|
+
position: "top-left",
|
361
|
+
index: 0
|
362
|
+
});
|
363
|
+
}
|
364
|
+
}
|
345
365
|
/**
|
346
366
|
* Fetches the component's translations
|
347
367
|
*
|
@@ -353,6 +373,9 @@ const CrowdsourceManager = class {
|
|
353
373
|
this._translations = messages[0];
|
354
374
|
}
|
355
375
|
get el() { return index.getElement(this); }
|
376
|
+
static get watchers() { return {
|
377
|
+
"enableZoom": ["enableZoomWatchHandler"]
|
378
|
+
}; }
|
356
379
|
};
|
357
380
|
CrowdsourceManager.style = crowdsourceManagerCss;
|
358
381
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
const _commonjsHelpers = require('./_commonjsHelpers-384729db.js');
|
9
9
|
const index = require('./index-1ffa261f.js');
|
10
10
|
const loadModules = require('./loadModules-03328b9d.js');
|
11
|
-
const mapViewUtils = require('./mapViewUtils-
|
11
|
+
const mapViewUtils = require('./mapViewUtils-96172223.js');
|
12
12
|
const cleanUrl = require('./clean-url-d5326abb.js');
|
13
13
|
|
14
14
|
/** @license
|
@@ -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):Promise.resolve().then(function () { return require('./index.es-
|
1511
|
+
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):Promise.resolve().then(function () { return require('./index.es-d1d9b140.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
|
@@ -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-37d9aaf3.js');
|
10
10
|
require('./index-1ffa261f.js');
|
11
11
|
require('./loadModules-03328b9d.js');
|
12
12
|
require('./locale-d50f3250.js');
|
13
|
-
require('./mapViewUtils-
|
13
|
+
require('./mapViewUtils-96172223.js');
|
14
14
|
require('./interfaces-000be6de.js');
|
15
15
|
require('./clean-url-d5326abb.js');
|
16
16
|
|