@esri/solutions-components 0.7.20 → 0.7.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. package/dist/assets/t9n/public-notification/resources.json +2 -1
  2. package/dist/assets/t9n/public-notification/resources_en.json +2 -1
  3. package/dist/cjs/card-manager_3.cjs.entry.js +30 -3
  4. package/dist/cjs/crowdsource-manager.cjs.entry.js +10 -10
  5. package/dist/cjs/{downloadUtils-9a13c6ac.js → downloadUtils-401356b5.js} +5 -3
  6. package/dist/cjs/{index.es-284a020c.js → index.es-a9a4ff08.js} +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/map-select-tools_3.cjs.entry.js +1 -1
  9. package/dist/cjs/public-notification.cjs.entry.js +7 -4
  10. package/dist/cjs/solutions-components.cjs.js +1 -1
  11. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +29 -11
  12. package/dist/collection/components/layer-table/layer-table.js +59 -11
  13. package/dist/collection/components/public-notification/public-notification.js +7 -3
  14. package/dist/collection/utils/pdfUtils.js +4 -2
  15. package/dist/collection/utils/pdfUtils.ts +4 -2
  16. package/dist/components/crowdsource-manager.js +13 -12
  17. package/dist/components/downloadUtils.js +4 -2
  18. package/dist/components/layer-table2.js +31 -3
  19. package/dist/components/public-notification.js +7 -3
  20. package/dist/esm/card-manager_3.entry.js +30 -3
  21. package/dist/esm/crowdsource-manager.entry.js +10 -10
  22. package/dist/esm/{downloadUtils-a4bbdb1d.js → downloadUtils-13579d93.js} +5 -3
  23. package/dist/esm/{index.es-48fdb288.js → index.es-04d2e63e.js} +1 -1
  24. package/dist/esm/loader.js +1 -1
  25. package/dist/esm/map-select-tools_3.entry.js +1 -1
  26. package/dist/esm/public-notification.entry.js +7 -4
  27. package/dist/esm/solutions-components.js +1 -1
  28. package/dist/solutions-components/p-02fad071.entry.js +6 -0
  29. package/dist/solutions-components/{p-b1422b00.entry.js → p-24286e8c.entry.js} +1 -1
  30. package/dist/solutions-components/p-5302f406.entry.js +6 -0
  31. package/dist/solutions-components/{p-72dbfa77.js → p-c68a6d4f.js} +1 -1
  32. package/dist/solutions-components/{p-d4afcf86.js → p-c9f87acb.js} +2 -2
  33. package/dist/solutions-components/p-d3085b7a.entry.js +6 -0
  34. package/dist/solutions-components/solutions-components.esm.js +1 -1
  35. package/dist/solutions-components/utils/pdfUtils.ts +4 -2
  36. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +13 -4
  37. package/dist/types/components/layer-table/layer-table.d.ts +14 -5
  38. package/dist/types/components/public-notification/public-notification.d.ts +4 -0
  39. package/dist/types/components.d.ts +18 -0
  40. package/package.json +1 -1
  41. package/dist/solutions-components/p-107b7816.entry.js +0 -6
  42. package/dist/solutions-components/p-2abc02a1.entry.js +0 -6
  43. 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": "Add title",
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": "Add title",
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-9a13c6ac.js');
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.defaultLayerId = undefined;
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;
@@ -828,6 +833,19 @@ const LayerTable = class {
828
833
  if (((_d = this._selectedIndexes) === null || _d === void 0 ? void 0 : _d.length) > 0) {
829
834
  urlObj.searchParams.set("oid", this._selectedIndexes.join(","));
830
835
  }
836
+ if (this._filterActive) {
837
+ const filter = JSON.parse(this._filterList.urlParams.get("filter"));
838
+ const layerExpressions = this._filterList.layerExpressions.map(layerExp => {
839
+ layerExp.expressions = layerExp.expressions.map(exp => {
840
+ if (exp.id.toString() === filter.expressionId.toString()) {
841
+ exp.active = true;
842
+ }
843
+ return exp;
844
+ });
845
+ return layerExp;
846
+ });
847
+ urlObj.searchParams.set("filter", JSON.stringify(layerExpressions));
848
+ }
831
849
  this._shareNode.shareUrl = urlObj.href;
832
850
  }
833
851
  /**
@@ -949,7 +967,8 @@ const LayerTable = class {
949
967
  const _end = this._table.viewModel.getObjectIdIndex(this._currentId);
950
968
  const startIndex = _start < _end ? _start : _end;
951
969
  const endIndex = _end > _start ? _end : _start;
952
- this._selectedIndexes = oids.reduce((prev, cur) => {
970
+ this._skipOnChange = startIndex + 1 !== endIndex;
971
+ const selectedIndexes = oids.reduce((prev, cur) => {
953
972
  const id = cur;
954
973
  const index = this._table.viewModel.getObjectIdIndex(id);
955
974
  if ((id === this._currentId || id === this._previousCurrentId)) {
@@ -971,6 +990,7 @@ const LayerTable = class {
971
990
  }
972
991
  return prev;
973
992
  }, []);
993
+ this._selectedIndexes = _start < _end ? selectedIndexes.reverse() : selectedIndexes;
974
994
  this._table.highlightIds.addMany(this._selectedIndexes.filter(i => ids.indexOf(i) < 0));
975
995
  }
976
996
  }
@@ -1033,6 +1053,11 @@ const LayerTable = class {
1033
1053
  }
1034
1054
  this._defaultGlobalIdHonored = true;
1035
1055
  }
1056
+ if (!this._defaultFilterHonored && this.defaultFilter && this._filterList) {
1057
+ this._layerExpressions = this.defaultFilter;
1058
+ this._filterActive = true;
1059
+ this._defaultFilterHonored = true;
1060
+ }
1036
1061
  });
1037
1062
  this._showOnlySelected = false;
1038
1063
  this._sortActive = false;
@@ -1148,12 +1173,14 @@ const LayerTable = class {
1148
1173
  */
1149
1174
  _handleFilterListReset() {
1150
1175
  this._filterActive = false;
1176
+ this._updateShareUrl();
1151
1177
  }
1152
1178
  /**
1153
1179
  * Check if the layers definitionExpression has been modified
1154
1180
  */
1155
1181
  _handleFilterUpdate() {
1156
1182
  this._filterActive = this._definitionExpression !== this._layer.definitionExpression;
1183
+ this._updateShareUrl();
1157
1184
  }
1158
1185
  /**
1159
1186
  * 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-284a020c.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},
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
- pdfLib.addPage();
2237
- ++startingPageNum;
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-9a13c6ac.js');
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');