@esri/solutions-components 0.6.33 → 0.6.35

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.
Files changed (59) hide show
  1. package/dist/cjs/calcite-alert_3.cjs.entry.js +20 -6
  2. package/dist/cjs/calcite-combobox_6.cjs.entry.js +1 -1
  3. package/dist/cjs/card-manager_3.cjs.entry.js +91 -15
  4. package/dist/cjs/crowdsource-manager.cjs.entry.js +30 -3
  5. package/dist/cjs/{downloadUtils-b37689dd.js → downloadUtils-37d9aaf3.js} +2 -2
  6. package/dist/cjs/{index.es-83e253dc.js → index.es-d1d9b140.js} +2 -2
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
  9. package/dist/cjs/{mapViewUtils-303bf42d.js → mapViewUtils-96172223.js} +18 -0
  10. package/dist/cjs/public-notification.cjs.entry.js +2 -2
  11. package/dist/cjs/solutions-components.cjs.js +1 -1
  12. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +34 -4
  13. package/dist/collection/components/edit-card/edit-card.js +19 -6
  14. package/dist/collection/components/layer-table/layer-table.js +80 -9
  15. package/dist/collection/components/map-card/map-card.js +52 -4
  16. package/dist/collection/demos/crowdsource-manager.html +5 -4
  17. package/dist/collection/utils/mapViewUtils.js +17 -0
  18. package/dist/collection/utils/mapViewUtils.ts +20 -0
  19. package/dist/components/crowdsource-manager.js +33 -4
  20. package/dist/components/edit-card2.js +19 -6
  21. package/dist/components/layer-table2.js +62 -10
  22. package/dist/components/map-card2.js +36 -5
  23. package/dist/components/map-layer-picker2.js +1 -1
  24. package/dist/components/map-select-tools2.js +1 -1
  25. package/dist/components/mapViewUtils.js +18 -1
  26. package/dist/components/public-notification.js +1 -1
  27. package/dist/components/refine-selection2.js +1 -1
  28. package/dist/esm/calcite-alert_3.entry.js +20 -6
  29. package/dist/esm/calcite-combobox_6.entry.js +1 -1
  30. package/dist/esm/card-manager_3.entry.js +91 -15
  31. package/dist/esm/crowdsource-manager.entry.js +30 -3
  32. package/dist/esm/{downloadUtils-ddd7eeb7.js → downloadUtils-76379e4a.js} +2 -2
  33. package/dist/esm/{index.es-a53707d1.js → index.es-0d134a52.js} +2 -2
  34. package/dist/esm/loader.js +1 -1
  35. package/dist/esm/map-select-tools_3.entry.js +2 -2
  36. package/dist/esm/{mapViewUtils-43c930f1.js → mapViewUtils-08f6cfce.js} +18 -1
  37. package/dist/esm/public-notification.entry.js +2 -2
  38. package/dist/esm/solutions-components.js +1 -1
  39. package/dist/solutions-components/demos/crowdsource-manager.html +5 -4
  40. package/dist/solutions-components/{p-05ba41f9.js → p-03130804.js} +1 -1
  41. package/dist/solutions-components/{p-e05cf92d.entry.js → p-0f50087e.entry.js} +2 -2
  42. package/dist/solutions-components/{p-f2194390.js → p-15070568.js} +1 -1
  43. package/dist/solutions-components/{p-4792005c.entry.js → p-1682bd0f.entry.js} +1 -1
  44. package/dist/solutions-components/p-63867402.entry.js +6 -0
  45. package/dist/solutions-components/{p-50a3a887.entry.js → p-81a0c88f.entry.js} +1 -1
  46. package/dist/solutions-components/{p-978a26b3.entry.js → p-9800e602.entry.js} +1 -1
  47. package/dist/solutions-components/{p-b745143d.js → p-b02eb8f4.js} +2 -2
  48. package/dist/solutions-components/p-eba875d9.entry.js +6 -0
  49. package/dist/solutions-components/solutions-components.esm.js +1 -1
  50. package/dist/solutions-components/utils/mapViewUtils.ts +20 -0
  51. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +10 -0
  52. package/dist/types/components/edit-card/edit-card.d.ts +5 -1
  53. package/dist/types/components/layer-table/layer-table.d.ts +28 -0
  54. package/dist/types/components/map-card/map-card.d.ts +18 -0
  55. package/dist/types/components.d.ts +16 -0
  56. package/dist/types/utils/mapViewUtils.d.ts +9 -0
  57. package/package.json +1 -1
  58. package/dist/solutions-components/p-65ade5af.entry.js +0 -6
  59. package/dist/solutions-components/p-a5342c42.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-303bf42d.js');
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-303bf42d.js');
12
+ const mapViewUtils = require('./mapViewUtils-96172223.js');
13
13
  const loadModules = require('./loadModules-03328b9d.js');
14
- const downloadUtils = require('./downloadUtils-b37689dd.js');
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');
@@ -132,6 +132,7 @@ const LayerTable = class {
132
132
  this.enableAutoRefresh = undefined;
133
133
  this.enableCSV = undefined;
134
134
  this.enableInlineEdit = undefined;
135
+ this.enableZoom = undefined;
135
136
  this.mapInfo = undefined;
136
137
  this.mapView = undefined;
137
138
  this.onlyShowUpdatableLayers = undefined;
@@ -152,6 +153,32 @@ const LayerTable = class {
152
153
  // Watch handlers
153
154
  //
154
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
+ }
155
182
  /**
156
183
  * watch for changes to the list of controls that will currently fit in the display
157
184
  */
@@ -355,7 +382,7 @@ const LayerTable = class {
355
382
  * @returns void
356
383
  */
357
384
  _validateEnabledActions() {
358
- const featuresSelected = this._selectedIndexes.length > 0;
385
+ const featuresSelected = this._featuresSelected();
359
386
  const selectionDependant = [
360
387
  "zoom-to-object",
361
388
  "trash",
@@ -377,14 +404,16 @@ const LayerTable = class {
377
404
  */
378
405
  _initToolInfos() {
379
406
  var _a;
380
- const featuresSelected = this._selectedIndexes.length > 0;
381
- this._toolInfos = [{
407
+ const featuresSelected = this._featuresSelected();
408
+ const featuresEmpty = this._featuresEmpty();
409
+ this._toolInfos = [this.enableZoom ? {
382
410
  icon: "zoom-to-object",
383
411
  label: this._translations.zoom,
384
412
  func: () => this._zoom(),
385
413
  disabled: !featuresSelected,
386
414
  isOverflow: false
387
- }, ((_a = this.mapInfo) === null || _a === void 0 ? void 0 : _a.filters) ? {
415
+ } : undefined,
416
+ ((_a = this.mapInfo) === null || _a === void 0 ? void 0 : _a.filters) ? {
388
417
  icon: "filter",
389
418
  label: this._translations.filters,
390
419
  func: () => this._filter(),
@@ -414,13 +443,13 @@ const LayerTable = class {
414
443
  icon: "list-check-all",
415
444
  func: () => this._selectAll(),
416
445
  label: this._translations.selectAll,
417
- disabled: false,
446
+ disabled: featuresEmpty,
418
447
  isOverflow: false
419
448
  }, {
420
449
  icon: "compare",
421
450
  func: () => this._switchSelected(),
422
451
  label: this._translations.switchSelected,
423
- disabled: false,
452
+ disabled: featuresEmpty,
424
453
  isOverflow: false
425
454
  }, {
426
455
  icon: "refresh",
@@ -433,11 +462,27 @@ const LayerTable = class {
433
462
  icon: "export",
434
463
  func: () => void this._exportToCSV(),
435
464
  label: this._translations.exportCSV,
436
- disabled: false,
465
+ disabled: featuresEmpty,
437
466
  isOverflow: false
438
467
  } : undefined];
439
468
  this._defaultVisibleToolSizeInfos = undefined;
440
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
+ }
441
486
  /**
442
487
  * Add/Remove tools from the action bar and dropdown based on available size
443
488
  *
@@ -666,7 +711,7 @@ const LayerTable = class {
666
711
  // https://github.com/Esri/solutions-components/issues/365
667
712
  this._selectedIndexes = this._table.highlightIds.toArray().reverse();
668
713
  if (this._showOnlySelected) {
669
- if (this._selectedIndexes.length > 0) {
714
+ if (this._featuresSelected()) {
670
715
  this._table.filterBySelection();
671
716
  }
672
717
  else {
@@ -916,7 +961,7 @@ const LayerTable = class {
916
961
  async _layerSelectionChanged(evt) {
917
962
  var _a;
918
963
  const id = evt.detail[0];
919
- if (id !== ((_a = this._layer) === null || _a === void 0 ? void 0 : _a.id) || this._allIds.length === 0) {
964
+ if (id !== ((_a = this._layer) === null || _a === void 0 ? void 0 : _a.id) || this._featuresEmpty()) {
920
965
  this._fetchingData = true;
921
966
  const layer = await mapViewUtils.getLayerOrTable(this.mapView, id);
922
967
  await layer.when(() => {
@@ -973,6 +1018,9 @@ const LayerTable = class {
973
1018
  }
974
1019
  get el() { return index.getElement(this); }
975
1020
  static get watchers() { return {
1021
+ "enableZoom": ["enableZoomWatchHandler"],
1022
+ "enableCSV": ["enableCSVWatchHandler"],
1023
+ "enableInlineEdit": ["enableInlineEditWatchHandler"],
976
1024
  "_controlsThatFit": ["_controlsThatFitWatchHandler"],
977
1025
  "mapView": ["mapViewWatchHandler"],
978
1026
  "_layer": ["_layerWatchHandler"],
@@ -993,6 +1041,7 @@ const MapCard = class {
993
1041
  * string: the id of map currently displayed
994
1042
  */
995
1043
  this._loadedId = "";
1044
+ this.enableHome = undefined;
996
1045
  this.enableLegend = undefined;
997
1046
  this.enableFloorFilter = undefined;
998
1047
  this.enableFullscreen = undefined;
@@ -1005,6 +1054,17 @@ const MapCard = class {
1005
1054
  this._searchConfiguration = undefined;
1006
1055
  this._webMapInfo = undefined;
1007
1056
  }
1057
+ //--------------------------------------------------------------------------
1058
+ //
1059
+ // Watch handlers
1060
+ //
1061
+ //--------------------------------------------------------------------------
1062
+ /**
1063
+ * Add/remove home widget
1064
+ */
1065
+ enableHomeWatchHandler() {
1066
+ this._initHome();
1067
+ }
1008
1068
  /**
1009
1069
  * Listen for changes to map info and load the appropriate map
1010
1070
  */
@@ -1079,10 +1139,7 @@ const MapCard = class {
1079
1139
  this._searchConfiguration = this._webMapInfo.searchConfiguration;
1080
1140
  this.beforeMapChanged.emit();
1081
1141
  await this.mapView.when(() => {
1082
- const home = new this.Home({
1083
- view: this.mapView
1084
- });
1085
- this.mapView.ui.add(home, { position: "top-left", index: 3 });
1142
+ this._initHome();
1086
1143
  this.mapView.ui.add(this._mapTools, { position: "top-right", index: 0 });
1087
1144
  this.mapChanged.emit({
1088
1145
  id: id,
@@ -1091,7 +1148,26 @@ const MapCard = class {
1091
1148
  });
1092
1149
  }
1093
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
+ }
1094
1167
  get el() { return index.getElement(this); }
1168
+ static get watchers() { return {
1169
+ "enableHome": ["enableHomeWatchHandler"]
1170
+ }; }
1095
1171
  };
1096
1172
  MapCard.style = mapCardCss;
1097
1173
 
@@ -23,7 +23,7 @@ const CrowdsourceManager = class {
23
23
  */
24
24
  this._shouldSetMapView = false;
25
25
  this.classicGrid = false;
26
- this.enableAutoRefresh = true;
26
+ this.enableAutoRefresh = false;
27
27
  this.enableCSV = true;
28
28
  this.enableFloorFilter = true;
29
29
  this.enableFullscreen = true;
@@ -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)
@@ -244,7 +250,7 @@ const CrowdsourceManager = class {
244
250
  const mapDisplayClass = this.classicGrid && layoutMode === interfaces.ELayoutMode.GRID ? "display-flex height-full width-1-2" :
245
251
  layoutMode === interfaces.ELayoutMode.GRID && !hideMap ? "" : "display-none";
246
252
  const mapContainerClass = this.classicGrid && layoutMode === interfaces.ELayoutMode.GRID ? "width-full" : "adjusted-height-50";
247
- return (index.h("div", { class: `${mapContainerClass} overflow-hidden ${mapDisplayClass}` }, index.h("map-card", { basemapConfig: this.basemapConfig, class: "width-full", enableBasemap: this.enableBasemap, enableFloorFilter: this.enableFloorFilter, enableFullscreen: this.enableFullscreen, enableLegend: this.enableLegend, enableSearch: this.enableSearch, hidden: this._expandPopup, mapInfos: (_a = this.mapInfos) === null || _a === void 0 ? void 0 : _a.filter(mapInfo => mapInfo.visible !== false) })));
253
+ return (index.h("div", { class: `${mapContainerClass} overflow-hidden ${mapDisplayClass}` }, index.h("map-card", { basemapConfig: this.basemapConfig, class: "width-full", enableBasemap: this.enableBasemap, enableFloorFilter: this.enableFloorFilter, enableFullscreen: this.enableFullscreen, enableHome: this.enableHome, enableLegend: this.enableLegend, enableSearch: this.enableSearch, hidden: this._expandPopup, mapInfos: (_a = this.mapInfos) === null || _a === void 0 ? void 0 : _a.filter(mapInfo => mapInfo.visible !== false) })));
248
254
  }
249
255
  /**
250
256
  * Get the expand node for the popup information
@@ -300,7 +306,7 @@ const CrowdsourceManager = class {
300
306
  const toggleSlot = this.classicGrid && layoutMode !== interfaces.ELayoutMode.VERTICAL ? "footer" :
301
307
  this.classicGrid && layoutMode === interfaces.ELayoutMode.VERTICAL ? "panel-end" :
302
308
  layoutMode === interfaces.ELayoutMode.HORIZONTAL ? "header" : "panel-start";
303
- return (index.h("calcite-shell", { class: tableSizeClass + " border-bottom" }, 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))), index.h("div", { class: "width-full height-full position-relative" }, index.h("layer-table", { enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableInlineEdit: this.enableInlineEdit, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected }))));
309
+ return (index.h("calcite-shell", { class: tableSizeClass + " border-bottom" }, 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))), index.h("div", { class: "width-full height-full position-relative" }, index.h("layer-table", { enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableInlineEdit: this.enableInlineEdit, enableZoom: this.enableZoom, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected }))));
304
310
  }
305
311
  /**
306
312
  * Open/Close the appropriate panel.
@@ -336,8 +342,26 @@ const CrowdsourceManager = class {
336
342
  _setMapView() {
337
343
  this._mapInfo = this._getMapInfo(this._mapChange.id);
338
344
  this._mapView = this._mapChange.mapView;
345
+ this._initMapZoom();
339
346
  this._mapView.popupEnabled = false;
340
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
+ }
341
365
  /**
342
366
  * Fetches the component's translations
343
367
  *
@@ -349,6 +373,9 @@ const CrowdsourceManager = class {
349
373
  this._translations = messages[0];
350
374
  }
351
375
  get el() { return index.getElement(this); }
376
+ static get watchers() { return {
377
+ "enableZoom": ["enableZoomWatchHandler"]
378
+ }; }
352
379
  };
353
380
  CrowdsourceManager.style = crowdsourceManagerCss;
354
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-303bf42d.js');
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-83e253dc.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},
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-b37689dd.js');
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-303bf42d.js');
13
+ require('./mapViewUtils-96172223.js');
14
14
  require('./interfaces-000be6de.js');
15
15
  require('./clean-url-d5326abb.js');
16
16