@esri/solutions-components 0.4.8 → 0.4.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/calcite-input-message_5.cjs.entry.js +1 -1
- package/dist/cjs/{downloadUtils-75d3d16a.js → downloadUtils-bb998aa8.js} +4 -2
- package/dist/cjs/{index.es-639250cc.js → index.es-b1ff1b6a.js} +1 -1
- package/dist/cjs/layer-table.cjs.entry.js +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +27 -27
- package/dist/collection/components/public-notification/public-notification.js +3 -3
- package/dist/collection/utils/downloadUtils.js +3 -1
- package/dist/collection/utils/downloadUtils.ts +3 -1
- package/dist/components/downloadUtils.js +3 -1
- package/dist/components/public-notification.js +60 -60
- package/dist/esm/calcite-input-message_5.entry.js +1 -1
- package/dist/esm/{downloadUtils-bcf65b52.js → downloadUtils-2ed29d75.js} +4 -2
- package/dist/esm/{index.es-4c9f419c.js → index.es-edc28958.js} +1 -1
- package/dist/esm/layer-table.entry.js +1 -1
- package/dist/esm/public-notification.entry.js +23 -23
- package/dist/solutions-components/{p-695007c1.entry.js → p-08ecf204.entry.js} +1 -1
- package/dist/solutions-components/{p-71372851.js → p-375face5.js} +3 -3
- package/dist/solutions-components/{p-186b959c.entry.js → p-53836566.entry.js} +1 -1
- package/dist/solutions-components/{p-bb92a46c.js → p-d9c18211.js} +1 -1
- package/dist/solutions-components/{p-20c73673.entry.js → p-f808f3bc.entry.js} +6 -6
- package/dist/solutions-components/solutions-components.esm.js +6 -6
- package/dist/solutions-components/utils/downloadUtils.ts +3 -1
- package/dist/solutions-components_commit.txt +7 -7
- package/dist/types/components/public-notification/public-notification.d.ts +6 -2
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ const mapViewUtils = require('./mapViewUtils-d250b1ed.js');
|
|
|
16
16
|
const interfaces$1 = require('./interfaces-17c631bf.js');
|
|
17
17
|
const publicNotificationStore = require('./publicNotificationStore-20e924f5.js');
|
|
18
18
|
const locale = require('./locale-04da9a8c.js');
|
|
19
|
-
const downloadUtils = require('./downloadUtils-
|
|
19
|
+
const downloadUtils = require('./downloadUtils-bb998aa8.js');
|
|
20
20
|
const publicNotificationUtils = require('./publicNotificationUtils-9d585d8d.js');
|
|
21
21
|
require('./resources-b56bce71.js');
|
|
22
22
|
require('./guid-84ac4d91.js');
|
|
@@ -1082,7 +1082,7 @@ function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++
|
|
|
1082
1082
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1083
1083
|
* ====================================================================
|
|
1084
1084
|
*/
|
|
1085
|
-
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):Promise.resolve().then(function () { return require('./index.es-
|
|
1085
|
+
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):Promise.resolve().then(function () { return require('./index.es-b1ff1b6a.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},
|
|
1086
1086
|
/** ====================================================================
|
|
1087
1087
|
* @license
|
|
1088
1088
|
* jsPDF XMP metadata plugin
|
|
@@ -2141,6 +2141,7 @@ const lineSeparatorChar = "|";
|
|
|
2141
2141
|
*/
|
|
2142
2142
|
async function downloadCSV(selectionSetNames, layer, ids, formatUsingLayerPopup, removeDuplicates = false, addColumnTitle = false) {
|
|
2143
2143
|
console.log("downloadCSV using selectionSetNames " + JSON.stringify(selectionSetNames)); //???
|
|
2144
|
+
console.log("downloadCSV removeDuplicates", removeDuplicates); //???
|
|
2144
2145
|
const labels = await _prepareLabels(layer, ids, removeDuplicates, formatUsingLayerPopup, addColumnTitle);
|
|
2145
2146
|
exportCSV(labels);
|
|
2146
2147
|
return Promise.resolve();
|
|
@@ -2157,6 +2158,7 @@ async function downloadCSV(selectionSetNames, layer, ids, formatUsingLayerPopup,
|
|
|
2157
2158
|
*/
|
|
2158
2159
|
async function downloadPDF(selectionSetNames, layer, ids, removeDuplicates, labelPageDescription) {
|
|
2159
2160
|
console.log("downloadPDF using selectionSetNames " + JSON.stringify(selectionSetNames)); //???
|
|
2161
|
+
console.log("downloadPDF removeDuplicates", removeDuplicates); //???
|
|
2160
2162
|
let labels = await _prepareLabels(layer, ids, removeDuplicates);
|
|
2161
2163
|
labels =
|
|
2162
2164
|
// Remove empty lines in labels
|
|
@@ -2197,7 +2199,7 @@ function _convertPopupTextToLabelSpec(popupInfo) {
|
|
|
2197
2199
|
// Replace <br> variants with the line separator character
|
|
2198
2200
|
popupInfo = popupInfo.replace(/<br\s*\/?>/gi, lineSeparatorChar);
|
|
2199
2201
|
// Replace <p> variants with the line separator character, except in the first position
|
|
2200
|
-
popupInfo = popupInfo.replace(/<p[^>]*>/gi, lineSeparatorChar).trim().replace(
|
|
2202
|
+
popupInfo = popupInfo.replace(/<p[^>]*>/gi, lineSeparatorChar).trim().replace(/^\|/, "");
|
|
2201
2203
|
// Remove </p>
|
|
2202
2204
|
popupInfo = popupInfo.replace(/<\/p>/gi, "");
|
|
2203
2205
|
// Remove \n
|
|
@@ -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-bb998aa8.js');
|
|
10
10
|
require('./index-c6979cbb.js');
|
|
11
11
|
require('./loadModules-0806a34f.js');
|
|
12
12
|
require('./locale-04da9a8c.js');
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
10
10
|
const index = require('./index-c6979cbb.js');
|
|
11
11
|
const locale = require('./locale-04da9a8c.js');
|
|
12
12
|
const mapViewUtils = require('./mapViewUtils-d250b1ed.js');
|
|
13
|
-
const downloadUtils = require('./downloadUtils-
|
|
13
|
+
const downloadUtils = require('./downloadUtils-bb998aa8.js');
|
|
14
14
|
require('./_commonjsHelpers-384729db.js');
|
|
15
15
|
require('./interfaces-17c631bf.js');
|
|
16
16
|
require('./loadModules-0806a34f.js');
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Esri
|
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
-
*/
|
|
6
|
-
'use strict';
|
|
7
|
-
|
|
8
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
|
-
|
|
10
|
-
const index = require('./index-c6979cbb.js');
|
|
11
|
-
const interfaces = require('./interfaces-17c631bf.js');
|
|
12
|
-
const loadModules = require('./loadModules-0806a34f.js');
|
|
13
|
-
const mapViewUtils = require('./mapViewUtils-d250b1ed.js');
|
|
14
|
-
const publicNotificationStore = require('./publicNotificationStore-20e924f5.js');
|
|
15
|
-
const locale = require('./locale-04da9a8c.js');
|
|
16
|
-
const publicNotificationUtils = require('./publicNotificationUtils-9d585d8d.js');
|
|
17
|
-
require('./index-763f87ac.js');
|
|
18
|
-
require('./_commonjsHelpers-384729db.js');
|
|
19
|
-
|
|
20
|
-
const publicNotificationCss = ":host{display:block;--calcite-input-message-spacing-value:0}.align-center{align-items:center}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:3.5rem;width:100%}.w-1-3{width:33.3%}.w-1-4{width:25%}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.width-full{width:100%}.height-full{height:100%}.padding-1{padding:1rem}.padding-top-sides-1{-webkit-padding-before:1rem;padding-block-start:1rem;-webkit-padding-start:1rem;padding-inline-start:1rem;-webkit-padding-end:1rem;padding-inline-end:1rem}.padding-sides-1{-webkit-padding-start:1rem;padding-inline-start:1rem;-webkit-padding-end:1rem;padding-inline-end:1rem}.padding-end-1-2{-webkit-padding-end:.5rem;padding-inline-end:.5rem}.padding-top-1-2{-webkit-padding-before:.5rem;padding-block-start:.5rem}.padding-top-1{padding-top:1rem}.padding-bottom-1{padding-bottom:1rem}.info-blue{color:#00A0FF}.info-message{justify-content:center;display:grid}.font-bold{font-weight:bold}.display-flex{display:flex}.display-block{display:block}.display-none{display:none}.main-label{float:left}html[dir=\"rtl\"] .main-label{float:right}.back-label:hover{cursor:pointer;color:var(--calcite-ui-brand-hover)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.margin-side-1{-webkit-margin-start:1rem;margin-inline-start:1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.border-top{border-top:1px solid var(--calcite-ui-border-2)}.w-100{width:100%}.w-50{width:50%}.padding-1-2{padding:0.5rem}.list-border{border:1px solid var(--calcite-ui-border-2)}.margin-sides-1{-webkit-margin-start:1rem;margin-inline-start:1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.margin-start-1-2{-webkit-margin-start:0.5rem;margin-inline-start:0.5rem}.float-right{float:right}.float-right[dir=\"rtl\"]{float:left}.float-left{float:left}.float-left[dir=\"rtl\"]{float:right}.margin-top-0{-webkit-margin-before:0 !important;margin-block-start:0 !important}.height-1-1-2{height:1.5rem}.main-background{background-color:var(--calcite-ui-foreground-2)}.num-selected{align-items:center;display:flex}";
|
|
21
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2022 Esri
|
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
|
4
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
+
*/
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
|
+
|
|
10
|
+
const index = require('./index-c6979cbb.js');
|
|
11
|
+
const interfaces = require('./interfaces-17c631bf.js');
|
|
12
|
+
const loadModules = require('./loadModules-0806a34f.js');
|
|
13
|
+
const mapViewUtils = require('./mapViewUtils-d250b1ed.js');
|
|
14
|
+
const publicNotificationStore = require('./publicNotificationStore-20e924f5.js');
|
|
15
|
+
const locale = require('./locale-04da9a8c.js');
|
|
16
|
+
const publicNotificationUtils = require('./publicNotificationUtils-9d585d8d.js');
|
|
17
|
+
require('./index-763f87ac.js');
|
|
18
|
+
require('./_commonjsHelpers-384729db.js');
|
|
19
|
+
|
|
20
|
+
const publicNotificationCss = ":host{display:block;--calcite-input-message-spacing-value:0}.align-center{align-items:center}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:3.5rem;width:100%}.w-1-3{width:33.3%}.w-1-4{width:25%}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.width-full{width:100%}.height-full{height:100%}.padding-1{padding:1rem}.padding-top-sides-1{-webkit-padding-before:1rem;padding-block-start:1rem;-webkit-padding-start:1rem;padding-inline-start:1rem;-webkit-padding-end:1rem;padding-inline-end:1rem}.padding-sides-1{-webkit-padding-start:1rem;padding-inline-start:1rem;-webkit-padding-end:1rem;padding-inline-end:1rem}.padding-end-1-2{-webkit-padding-end:.5rem;padding-inline-end:.5rem}.padding-top-1-2{-webkit-padding-before:.5rem;padding-block-start:.5rem}.padding-top-1{padding-top:1rem}.padding-bottom-1{padding-bottom:1rem}.info-blue{color:#00A0FF}.info-message{justify-content:center;display:grid}.font-bold{font-weight:bold}.display-flex{display:flex}.display-block{display:block}.display-none{display:none}.main-label{float:left}html[dir=\"rtl\"] .main-label{float:right}.back-label:hover{cursor:pointer;color:var(--calcite-ui-brand-hover)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.margin-side-1{-webkit-margin-start:1rem;margin-inline-start:1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.border-top{border-top:1px solid var(--calcite-ui-border-2)}.w-100{width:100%}.w-50{width:50%}.padding-1-2{padding:0.5rem}.list-border{border:1px solid var(--calcite-ui-border-2)}.margin-sides-1{-webkit-margin-start:1rem;margin-inline-start:1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.margin-start-1-2{-webkit-margin-start:0.5rem;margin-inline-start:0.5rem}.float-right{float:right}.float-right[dir=\"rtl\"]{float:left}.float-left{float:left}.float-left[dir=\"rtl\"]{float:right}.margin-top-0{-webkit-margin-before:0 !important;margin-block-start:0 !important}.height-1-1-2{height:1.5rem}.main-background{background-color:var(--calcite-ui-foreground-2)}.num-selected{align-items:center;display:flex}";
|
|
21
|
+
|
|
22
22
|
const PublicNotification = class {
|
|
23
23
|
constructor(hostRef) {
|
|
24
24
|
index.registerInstance(this, hostRef);
|
|
@@ -371,7 +371,7 @@ const PublicNotification = class {
|
|
|
371
371
|
_getDownloadPage(type) {
|
|
372
372
|
const isPdf = type === interfaces.EExportType.PDF;
|
|
373
373
|
const hasSelections = this._hasSelections();
|
|
374
|
-
return (index.h("calcite-panel", null, index.h("div", null, index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: "font-bold" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)), hasSelections ? (index.h("div", null, index.h("calcite-label", null, this._translations.notifications), this._getSelectionLists(), index.h("div", { class: "margin-side-1 padding-top-1 border-bottom" }), index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { layout: "inline" }, index.h("calcite-checkbox", { disabled: !this._downloadActive, ref: (el) => { this.
|
|
374
|
+
return (index.h("calcite-panel", null, index.h("div", null, index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: "font-bold" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)), hasSelections ? (index.h("div", null, index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", null, this._translations.notifications)), this._getSelectionLists(), index.h("div", { class: "margin-side-1 padding-top-1 border-bottom" }), index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: isPdf ? "display-none" : "", layout: "inline" }, index.h("calcite-checkbox", { disabled: !this._downloadActive, ref: (el) => { this._removeDuplicatesCSV = el; } }), this._translations.removeDuplicate), index.h("calcite-label", { class: isPdf ? "" : "display-none", layout: "inline" }, index.h("calcite-checkbox", { disabled: !this._downloadActive, ref: (el) => { this._removeDuplicatesPDF = el; } }), this._translations.removeDuplicate)), index.h("div", { class: isPdf ? "" : "display-none" }, this._getLabel(this._translations.selectPDFLabelOption, false), index.h("div", { class: "padding-sides-1" }, index.h("pdf-download", { disabled: !this._downloadActive, layerView: this.addresseeLayer, ref: (el) => { this._downloadTools = el; } }))), index.h("div", { class: "padding-1 display-flex" }, index.h("calcite-button", { disabled: !this._downloadActive, onClick: isPdf ? () => this._downloadPDF() : () => this._downloadCSV(), width: "full" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)))) : (this._getNotice(this._translations.downloadNoLists, "padding-sides-1 padding-bottom-1")))));
|
|
375
375
|
}
|
|
376
376
|
/**
|
|
377
377
|
* Create the stacked navigation buttons for a page
|
|
@@ -455,7 +455,7 @@ const PublicNotification = class {
|
|
|
455
455
|
_downloadPDF() {
|
|
456
456
|
const ids = publicNotificationUtils.getSelectionIds(this._getDownloadSelectionSets());
|
|
457
457
|
const selectionSetNames = this._selectionSets.map(set => set.label);
|
|
458
|
-
void this._downloadTools.downloadPDF(selectionSetNames, ids, this.
|
|
458
|
+
void this._downloadTools.downloadPDF(selectionSetNames, ids, this._removeDuplicatesPDF.checked);
|
|
459
459
|
}
|
|
460
460
|
/**
|
|
461
461
|
* Download all selection sets as CSV
|
|
@@ -465,7 +465,7 @@ const PublicNotification = class {
|
|
|
465
465
|
_downloadCSV() {
|
|
466
466
|
const ids = publicNotificationUtils.getSelectionIds(this._getDownloadSelectionSets());
|
|
467
467
|
const selectionSetNames = this._selectionSets.map(set => set.label);
|
|
468
|
-
void this._downloadTools.downloadCSV(selectionSetNames, ids, this.
|
|
468
|
+
void this._downloadTools.downloadCSV(selectionSetNames, ids, this._removeDuplicatesCSV.checked);
|
|
469
469
|
}
|
|
470
470
|
/**
|
|
471
471
|
* Get all enabled selection sets
|
|
@@ -725,6 +725,6 @@ const PublicNotification = class {
|
|
|
725
725
|
"_pageType": ["pageTypeWatchHandler"]
|
|
726
726
|
}; }
|
|
727
727
|
};
|
|
728
|
-
PublicNotification.style = publicNotificationCss;
|
|
729
|
-
|
|
730
|
-
exports.public_notification = PublicNotification;
|
|
728
|
+
PublicNotification.style = publicNotificationCss;
|
|
729
|
+
|
|
730
|
+
exports.public_notification = PublicNotification;
|
|
@@ -375,7 +375,7 @@ export class PublicNotification {
|
|
|
375
375
|
_getDownloadPage(type) {
|
|
376
376
|
const isPdf = type === EExportType.PDF;
|
|
377
377
|
const hasSelections = this._hasSelections();
|
|
378
|
-
return (h("calcite-panel", null, h("div", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)), hasSelections ? (h("div", null, h("calcite-label", null, this._translations.notifications), this._getSelectionLists(), h("div", { class: "margin-side-1 padding-top-1 border-bottom" }), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { layout: "inline" }, h("calcite-checkbox", { disabled: !this._downloadActive, ref: (el) => { this.
|
|
378
|
+
return (h("calcite-panel", null, h("div", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)), hasSelections ? (h("div", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", null, this._translations.notifications)), this._getSelectionLists(), h("div", { class: "margin-side-1 padding-top-1 border-bottom" }), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: isPdf ? "display-none" : "", layout: "inline" }, h("calcite-checkbox", { disabled: !this._downloadActive, ref: (el) => { this._removeDuplicatesCSV = el; } }), this._translations.removeDuplicate), h("calcite-label", { class: isPdf ? "" : "display-none", layout: "inline" }, h("calcite-checkbox", { disabled: !this._downloadActive, ref: (el) => { this._removeDuplicatesPDF = el; } }), this._translations.removeDuplicate)), h("div", { class: isPdf ? "" : "display-none" }, this._getLabel(this._translations.selectPDFLabelOption, false), h("div", { class: "padding-sides-1" }, h("pdf-download", { disabled: !this._downloadActive, layerView: this.addresseeLayer, ref: (el) => { this._downloadTools = el; } }))), h("div", { class: "padding-1 display-flex" }, h("calcite-button", { disabled: !this._downloadActive, onClick: isPdf ? () => this._downloadPDF() : () => this._downloadCSV(), width: "full" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)))) : (this._getNotice(this._translations.downloadNoLists, "padding-sides-1 padding-bottom-1")))));
|
|
379
379
|
}
|
|
380
380
|
/**
|
|
381
381
|
* Create the stacked navigation buttons for a page
|
|
@@ -459,7 +459,7 @@ export class PublicNotification {
|
|
|
459
459
|
_downloadPDF() {
|
|
460
460
|
const ids = utils.getSelectionIds(this._getDownloadSelectionSets());
|
|
461
461
|
const selectionSetNames = this._selectionSets.map(set => set.label);
|
|
462
|
-
void this._downloadTools.downloadPDF(selectionSetNames, ids, this.
|
|
462
|
+
void this._downloadTools.downloadPDF(selectionSetNames, ids, this._removeDuplicatesPDF.checked);
|
|
463
463
|
}
|
|
464
464
|
/**
|
|
465
465
|
* Download all selection sets as CSV
|
|
@@ -469,7 +469,7 @@ export class PublicNotification {
|
|
|
469
469
|
_downloadCSV() {
|
|
470
470
|
const ids = utils.getSelectionIds(this._getDownloadSelectionSets());
|
|
471
471
|
const selectionSetNames = this._selectionSets.map(set => set.label);
|
|
472
|
-
void this._downloadTools.downloadCSV(selectionSetNames, ids, this.
|
|
472
|
+
void this._downloadTools.downloadCSV(selectionSetNames, ids, this._removeDuplicatesCSV.checked);
|
|
473
473
|
}
|
|
474
474
|
/**
|
|
475
475
|
* Get all enabled selection sets
|
|
@@ -41,6 +41,7 @@ const lineSeparatorChar = "|";
|
|
|
41
41
|
*/
|
|
42
42
|
export async function downloadCSV(selectionSetNames, layer, ids, formatUsingLayerPopup, removeDuplicates = false, addColumnTitle = false) {
|
|
43
43
|
console.log("downloadCSV using selectionSetNames " + JSON.stringify(selectionSetNames)); //???
|
|
44
|
+
console.log("downloadCSV removeDuplicates", removeDuplicates); //???
|
|
44
45
|
const labels = await _prepareLabels(layer, ids, removeDuplicates, formatUsingLayerPopup, addColumnTitle);
|
|
45
46
|
exportCSV(labels);
|
|
46
47
|
return Promise.resolve();
|
|
@@ -57,6 +58,7 @@ export async function downloadCSV(selectionSetNames, layer, ids, formatUsingLaye
|
|
|
57
58
|
*/
|
|
58
59
|
export async function downloadPDF(selectionSetNames, layer, ids, removeDuplicates, labelPageDescription) {
|
|
59
60
|
console.log("downloadPDF using selectionSetNames " + JSON.stringify(selectionSetNames)); //???
|
|
61
|
+
console.log("downloadPDF removeDuplicates", removeDuplicates); //???
|
|
60
62
|
let labels = await _prepareLabels(layer, ids, removeDuplicates);
|
|
61
63
|
labels =
|
|
62
64
|
// Remove empty lines in labels
|
|
@@ -98,7 +100,7 @@ function _convertPopupTextToLabelSpec(popupInfo) {
|
|
|
98
100
|
// Replace <br> variants with the line separator character
|
|
99
101
|
popupInfo = popupInfo.replace(/<br\s*\/?>/gi, lineSeparatorChar);
|
|
100
102
|
// Replace <p> variants with the line separator character, except in the first position
|
|
101
|
-
popupInfo = popupInfo.replace(/<p[^>]*>/gi, lineSeparatorChar).trim().replace(
|
|
103
|
+
popupInfo = popupInfo.replace(/<p[^>]*>/gi, lineSeparatorChar).trim().replace(/^\|/, "");
|
|
102
104
|
// Remove </p>
|
|
103
105
|
popupInfo = popupInfo.replace(/<\/p>/gi, "");
|
|
104
106
|
// Remove \n
|
|
@@ -69,6 +69,7 @@ export async function downloadCSV(
|
|
|
69
69
|
addColumnTitle = false
|
|
70
70
|
): Promise<void> {
|
|
71
71
|
console.log("downloadCSV using selectionSetNames " + JSON.stringify(selectionSetNames));//???
|
|
72
|
+
console.log("downloadCSV removeDuplicates", removeDuplicates);//???
|
|
72
73
|
const labels = await _prepareLabels(layer, ids, removeDuplicates, formatUsingLayerPopup, addColumnTitle);
|
|
73
74
|
|
|
74
75
|
exportCSV(labels);
|
|
@@ -94,6 +95,7 @@ export async function downloadPDF(
|
|
|
94
95
|
labelPageDescription: ILabel
|
|
95
96
|
): Promise<void> {
|
|
96
97
|
console.log("downloadPDF using selectionSetNames " + JSON.stringify(selectionSetNames));//???
|
|
98
|
+
console.log("downloadPDF removeDuplicates", removeDuplicates);//???
|
|
97
99
|
let labels = await _prepareLabels(layer, ids, removeDuplicates);
|
|
98
100
|
|
|
99
101
|
labels =
|
|
@@ -150,7 +152,7 @@ function _convertPopupTextToLabelSpec(
|
|
|
150
152
|
popupInfo = popupInfo.replace(/<br\s*\/?>/gi, lineSeparatorChar);
|
|
151
153
|
|
|
152
154
|
// Replace <p> variants with the line separator character, except in the first position
|
|
153
|
-
popupInfo = popupInfo.replace(/<p[^>]*>/gi, lineSeparatorChar).trim().replace(
|
|
155
|
+
popupInfo = popupInfo.replace(/<p[^>]*>/gi, lineSeparatorChar).trim().replace(/^\|/, "");
|
|
154
156
|
|
|
155
157
|
// Remove </p>
|
|
156
158
|
popupInfo = popupInfo.replace(/<\/p>/gi, "");
|
|
@@ -2139,6 +2139,7 @@ const lineSeparatorChar = "|";
|
|
|
2139
2139
|
*/
|
|
2140
2140
|
async function downloadCSV(selectionSetNames, layer, ids, formatUsingLayerPopup, removeDuplicates = false, addColumnTitle = false) {
|
|
2141
2141
|
console.log("downloadCSV using selectionSetNames " + JSON.stringify(selectionSetNames)); //???
|
|
2142
|
+
console.log("downloadCSV removeDuplicates", removeDuplicates); //???
|
|
2142
2143
|
const labels = await _prepareLabels(layer, ids, removeDuplicates, formatUsingLayerPopup, addColumnTitle);
|
|
2143
2144
|
exportCSV(labels);
|
|
2144
2145
|
return Promise.resolve();
|
|
@@ -2155,6 +2156,7 @@ async function downloadCSV(selectionSetNames, layer, ids, formatUsingLayerPopup,
|
|
|
2155
2156
|
*/
|
|
2156
2157
|
async function downloadPDF(selectionSetNames, layer, ids, removeDuplicates, labelPageDescription) {
|
|
2157
2158
|
console.log("downloadPDF using selectionSetNames " + JSON.stringify(selectionSetNames)); //???
|
|
2159
|
+
console.log("downloadPDF removeDuplicates", removeDuplicates); //???
|
|
2158
2160
|
let labels = await _prepareLabels(layer, ids, removeDuplicates);
|
|
2159
2161
|
labels =
|
|
2160
2162
|
// Remove empty lines in labels
|
|
@@ -2195,7 +2197,7 @@ function _convertPopupTextToLabelSpec(popupInfo) {
|
|
|
2195
2197
|
// Replace <br> variants with the line separator character
|
|
2196
2198
|
popupInfo = popupInfo.replace(/<br\s*\/?>/gi, lineSeparatorChar);
|
|
2197
2199
|
// Replace <p> variants with the line separator character, except in the first position
|
|
2198
|
-
popupInfo = popupInfo.replace(/<p[^>]*>/gi, lineSeparatorChar).trim().replace(
|
|
2200
|
+
popupInfo = popupInfo.replace(/<p[^>]*>/gi, lineSeparatorChar).trim().replace(/^\|/, "");
|
|
2199
2201
|
// Remove </p>
|
|
2200
2202
|
popupInfo = popupInfo.replace(/<\/p>/gi, "");
|
|
2201
2203
|
// Remove \n
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Esri
|
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
7
|
-
import { a as EPageType, b as ESketchType, c as EWorkflowType, d as EExportType } from './interfaces3.js';
|
|
8
|
-
import { l as loadModules } from './loadModules.js';
|
|
9
|
-
import { a as getMapLayerView, g as goToSelection, h as highlightFeatures, d as defineCustomElement$6 } from './map-layer-picker2.js';
|
|
10
|
-
import { g as getSelectionSetQuery } from './queryUtils.js';
|
|
11
|
-
import { s as state } from './publicNotificationStore.js';
|
|
12
|
-
import { a as getComponentClosestLanguage, g as getLocaleComponentStrings } from './locale.js';
|
|
13
|
-
import { g as getTotal, a as getSelectionIds, d as defineCustomElement$3 } from './refine-selection2.js';
|
|
14
|
-
import { d as defineCustomElement$C } from './buffer-tools2.js';
|
|
15
|
-
import { d as defineCustomElement$B } from './action.js';
|
|
16
|
-
import { d as defineCustomElement$A } from './action-bar.js';
|
|
17
|
-
import { d as defineCustomElement$z } from './action-group.js';
|
|
18
|
-
import { d as defineCustomElement$y } from './action-menu.js';
|
|
19
|
-
import { d as defineCustomElement$x } from './button.js';
|
|
20
|
-
import { d as defineCustomElement$w } from './checkbox.js';
|
|
21
|
-
import { d as defineCustomElement$v } from './chip.js';
|
|
22
|
-
import { d as defineCustomElement$u } from './combobox.js';
|
|
23
|
-
import { d as defineCustomElement$t } from './combobox-item.js';
|
|
24
|
-
import { d as defineCustomElement$s } from './graph.js';
|
|
25
|
-
import { d as defineCustomElement$r } from './icon.js';
|
|
26
|
-
import { d as defineCustomElement$q } from './input.js';
|
|
27
|
-
import { d as defineCustomElement$p } from './input-message.js';
|
|
28
|
-
import { d as defineCustomElement$o } from './label.js';
|
|
29
|
-
import { d as defineCustomElement$n } from './list.js';
|
|
30
|
-
import { d as defineCustomElement$m } from './list-item2.js';
|
|
31
|
-
import { d as defineCustomElement$l } from './loader.js';
|
|
32
|
-
import { d as defineCustomElement$k } from './modal.js';
|
|
33
|
-
import { d as defineCustomElement$j } from './notice.js';
|
|
34
|
-
import { d as defineCustomElement$i } from './option.js';
|
|
35
|
-
import { d as defineCustomElement$h } from './panel.js';
|
|
36
|
-
import { d as defineCustomElement$g } from './popover.js';
|
|
37
|
-
import { d as defineCustomElement$f } from './progress.js';
|
|
38
|
-
import { d as defineCustomElement$e } from './radio-group.js';
|
|
39
|
-
import { d as defineCustomElement$d } from './radio-group-item.js';
|
|
40
|
-
import { d as defineCustomElement$c } from './scrim.js';
|
|
41
|
-
import { d as defineCustomElement$b } from './select.js';
|
|
42
|
-
import { d as defineCustomElement$a } from './shell.js';
|
|
43
|
-
import { d as defineCustomElement$9 } from './slider.js';
|
|
44
|
-
import { d as defineCustomElement$8 } from './tooltip.js';
|
|
45
|
-
import { d as defineCustomElement$7 } from './map-draw-tools2.js';
|
|
46
|
-
import { d as defineCustomElement$5 } from './map-select-tools2.js';
|
|
47
|
-
import { d as defineCustomElement$4 } from './pdf-download2.js';
|
|
48
|
-
import { d as defineCustomElement$2 } from './refine-selection-tools2.js';
|
|
49
|
-
|
|
50
|
-
const publicNotificationCss = ":host{display:block;--calcite-input-message-spacing-value:0}.align-center{align-items:center}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:3.5rem;width:100%}.w-1-3{width:33.3%}.w-1-4{width:25%}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.width-full{width:100%}.height-full{height:100%}.padding-1{padding:1rem}.padding-top-sides-1{-webkit-padding-before:1rem;padding-block-start:1rem;-webkit-padding-start:1rem;padding-inline-start:1rem;-webkit-padding-end:1rem;padding-inline-end:1rem}.padding-sides-1{-webkit-padding-start:1rem;padding-inline-start:1rem;-webkit-padding-end:1rem;padding-inline-end:1rem}.padding-end-1-2{-webkit-padding-end:.5rem;padding-inline-end:.5rem}.padding-top-1-2{-webkit-padding-before:.5rem;padding-block-start:.5rem}.padding-top-1{padding-top:1rem}.padding-bottom-1{padding-bottom:1rem}.info-blue{color:#00A0FF}.info-message{justify-content:center;display:grid}.font-bold{font-weight:bold}.display-flex{display:flex}.display-block{display:block}.display-none{display:none}.main-label{float:left}html[dir=\"rtl\"] .main-label{float:right}.back-label:hover{cursor:pointer;color:var(--calcite-ui-brand-hover)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.margin-side-1{-webkit-margin-start:1rem;margin-inline-start:1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.border-top{border-top:1px solid var(--calcite-ui-border-2)}.w-100{width:100%}.w-50{width:50%}.padding-1-2{padding:0.5rem}.list-border{border:1px solid var(--calcite-ui-border-2)}.margin-sides-1{-webkit-margin-start:1rem;margin-inline-start:1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.margin-start-1-2{-webkit-margin-start:0.5rem;margin-inline-start:0.5rem}.float-right{float:right}.float-right[dir=\"rtl\"]{float:left}.float-left{float:left}.float-left[dir=\"rtl\"]{float:right}.margin-top-0{-webkit-margin-before:0 !important;margin-block-start:0 !important}.height-1-1-2{height:1.5rem}.main-background{background-color:var(--calcite-ui-foreground-2)}.num-selected{align-items:center;display:flex}";
|
|
51
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2022 Esri
|
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
|
4
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
7
|
+
import { a as EPageType, b as ESketchType, c as EWorkflowType, d as EExportType } from './interfaces3.js';
|
|
8
|
+
import { l as loadModules } from './loadModules.js';
|
|
9
|
+
import { a as getMapLayerView, g as goToSelection, h as highlightFeatures, d as defineCustomElement$6 } from './map-layer-picker2.js';
|
|
10
|
+
import { g as getSelectionSetQuery } from './queryUtils.js';
|
|
11
|
+
import { s as state } from './publicNotificationStore.js';
|
|
12
|
+
import { a as getComponentClosestLanguage, g as getLocaleComponentStrings } from './locale.js';
|
|
13
|
+
import { g as getTotal, a as getSelectionIds, d as defineCustomElement$3 } from './refine-selection2.js';
|
|
14
|
+
import { d as defineCustomElement$C } from './buffer-tools2.js';
|
|
15
|
+
import { d as defineCustomElement$B } from './action.js';
|
|
16
|
+
import { d as defineCustomElement$A } from './action-bar.js';
|
|
17
|
+
import { d as defineCustomElement$z } from './action-group.js';
|
|
18
|
+
import { d as defineCustomElement$y } from './action-menu.js';
|
|
19
|
+
import { d as defineCustomElement$x } from './button.js';
|
|
20
|
+
import { d as defineCustomElement$w } from './checkbox.js';
|
|
21
|
+
import { d as defineCustomElement$v } from './chip.js';
|
|
22
|
+
import { d as defineCustomElement$u } from './combobox.js';
|
|
23
|
+
import { d as defineCustomElement$t } from './combobox-item.js';
|
|
24
|
+
import { d as defineCustomElement$s } from './graph.js';
|
|
25
|
+
import { d as defineCustomElement$r } from './icon.js';
|
|
26
|
+
import { d as defineCustomElement$q } from './input.js';
|
|
27
|
+
import { d as defineCustomElement$p } from './input-message.js';
|
|
28
|
+
import { d as defineCustomElement$o } from './label.js';
|
|
29
|
+
import { d as defineCustomElement$n } from './list.js';
|
|
30
|
+
import { d as defineCustomElement$m } from './list-item2.js';
|
|
31
|
+
import { d as defineCustomElement$l } from './loader.js';
|
|
32
|
+
import { d as defineCustomElement$k } from './modal.js';
|
|
33
|
+
import { d as defineCustomElement$j } from './notice.js';
|
|
34
|
+
import { d as defineCustomElement$i } from './option.js';
|
|
35
|
+
import { d as defineCustomElement$h } from './panel.js';
|
|
36
|
+
import { d as defineCustomElement$g } from './popover.js';
|
|
37
|
+
import { d as defineCustomElement$f } from './progress.js';
|
|
38
|
+
import { d as defineCustomElement$e } from './radio-group.js';
|
|
39
|
+
import { d as defineCustomElement$d } from './radio-group-item.js';
|
|
40
|
+
import { d as defineCustomElement$c } from './scrim.js';
|
|
41
|
+
import { d as defineCustomElement$b } from './select.js';
|
|
42
|
+
import { d as defineCustomElement$a } from './shell.js';
|
|
43
|
+
import { d as defineCustomElement$9 } from './slider.js';
|
|
44
|
+
import { d as defineCustomElement$8 } from './tooltip.js';
|
|
45
|
+
import { d as defineCustomElement$7 } from './map-draw-tools2.js';
|
|
46
|
+
import { d as defineCustomElement$5 } from './map-select-tools2.js';
|
|
47
|
+
import { d as defineCustomElement$4 } from './pdf-download2.js';
|
|
48
|
+
import { d as defineCustomElement$2 } from './refine-selection-tools2.js';
|
|
49
|
+
|
|
50
|
+
const publicNotificationCss = ":host{display:block;--calcite-input-message-spacing-value:0}.align-center{align-items:center}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:3.5rem;width:100%}.w-1-3{width:33.3%}.w-1-4{width:25%}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.width-full{width:100%}.height-full{height:100%}.padding-1{padding:1rem}.padding-top-sides-1{-webkit-padding-before:1rem;padding-block-start:1rem;-webkit-padding-start:1rem;padding-inline-start:1rem;-webkit-padding-end:1rem;padding-inline-end:1rem}.padding-sides-1{-webkit-padding-start:1rem;padding-inline-start:1rem;-webkit-padding-end:1rem;padding-inline-end:1rem}.padding-end-1-2{-webkit-padding-end:.5rem;padding-inline-end:.5rem}.padding-top-1-2{-webkit-padding-before:.5rem;padding-block-start:.5rem}.padding-top-1{padding-top:1rem}.padding-bottom-1{padding-bottom:1rem}.info-blue{color:#00A0FF}.info-message{justify-content:center;display:grid}.font-bold{font-weight:bold}.display-flex{display:flex}.display-block{display:block}.display-none{display:none}.main-label{float:left}html[dir=\"rtl\"] .main-label{float:right}.back-label:hover{cursor:pointer;color:var(--calcite-ui-brand-hover)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.margin-side-1{-webkit-margin-start:1rem;margin-inline-start:1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.border-top{border-top:1px solid var(--calcite-ui-border-2)}.w-100{width:100%}.w-50{width:50%}.padding-1-2{padding:0.5rem}.list-border{border:1px solid var(--calcite-ui-border-2)}.margin-sides-1{-webkit-margin-start:1rem;margin-inline-start:1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.margin-start-1-2{-webkit-margin-start:0.5rem;margin-inline-start:0.5rem}.float-right{float:right}.float-right[dir=\"rtl\"]{float:left}.float-left{float:left}.float-left[dir=\"rtl\"]{float:right}.margin-top-0{-webkit-margin-before:0 !important;margin-block-start:0 !important}.height-1-1-2{height:1.5rem}.main-background{background-color:var(--calcite-ui-foreground-2)}.num-selected{align-items:center;display:flex}";
|
|
51
|
+
|
|
52
52
|
const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
53
53
|
constructor() {
|
|
54
54
|
super();
|
|
@@ -402,7 +402,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
402
402
|
_getDownloadPage(type) {
|
|
403
403
|
const isPdf = type === EExportType.PDF;
|
|
404
404
|
const hasSelections = this._hasSelections();
|
|
405
|
-
return (h("calcite-panel", null, h("div", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)), hasSelections ? (h("div", null, h("calcite-label", null, this._translations.notifications), this._getSelectionLists(), h("div", { class: "margin-side-1 padding-top-1 border-bottom" }), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { layout: "inline" }, h("calcite-checkbox", { disabled: !this._downloadActive, ref: (el) => { this.
|
|
405
|
+
return (h("calcite-panel", null, h("div", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)), hasSelections ? (h("div", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", null, this._translations.notifications)), this._getSelectionLists(), h("div", { class: "margin-side-1 padding-top-1 border-bottom" }), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: isPdf ? "display-none" : "", layout: "inline" }, h("calcite-checkbox", { disabled: !this._downloadActive, ref: (el) => { this._removeDuplicatesCSV = el; } }), this._translations.removeDuplicate), h("calcite-label", { class: isPdf ? "" : "display-none", layout: "inline" }, h("calcite-checkbox", { disabled: !this._downloadActive, ref: (el) => { this._removeDuplicatesPDF = el; } }), this._translations.removeDuplicate)), h("div", { class: isPdf ? "" : "display-none" }, this._getLabel(this._translations.selectPDFLabelOption, false), h("div", { class: "padding-sides-1" }, h("pdf-download", { disabled: !this._downloadActive, layerView: this.addresseeLayer, ref: (el) => { this._downloadTools = el; } }))), h("div", { class: "padding-1 display-flex" }, h("calcite-button", { disabled: !this._downloadActive, onClick: isPdf ? () => this._downloadPDF() : () => this._downloadCSV(), width: "full" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)))) : (this._getNotice(this._translations.downloadNoLists, "padding-sides-1 padding-bottom-1")))));
|
|
406
406
|
}
|
|
407
407
|
/**
|
|
408
408
|
* Create the stacked navigation buttons for a page
|
|
@@ -486,7 +486,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
486
486
|
_downloadPDF() {
|
|
487
487
|
const ids = getSelectionIds(this._getDownloadSelectionSets());
|
|
488
488
|
const selectionSetNames = this._selectionSets.map(set => set.label);
|
|
489
|
-
void this._downloadTools.downloadPDF(selectionSetNames, ids, this.
|
|
489
|
+
void this._downloadTools.downloadPDF(selectionSetNames, ids, this._removeDuplicatesPDF.checked);
|
|
490
490
|
}
|
|
491
491
|
/**
|
|
492
492
|
* Download all selection sets as CSV
|
|
@@ -496,7 +496,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
496
496
|
_downloadCSV() {
|
|
497
497
|
const ids = getSelectionIds(this._getDownloadSelectionSets());
|
|
498
498
|
const selectionSetNames = this._selectionSets.map(set => set.label);
|
|
499
|
-
void this._downloadTools.downloadCSV(selectionSetNames, ids, this.
|
|
499
|
+
void this._downloadTools.downloadCSV(selectionSetNames, ids, this._removeDuplicatesCSV.checked);
|
|
500
500
|
}
|
|
501
501
|
/**
|
|
502
502
|
* Get all enabled selection sets
|
|
@@ -981,9 +981,9 @@ function defineCustomElement$1() {
|
|
|
981
981
|
break;
|
|
982
982
|
} });
|
|
983
983
|
}
|
|
984
|
-
defineCustomElement$1();
|
|
985
|
-
|
|
986
|
-
const PublicNotification = PublicNotification$1;
|
|
987
|
-
const defineCustomElement = defineCustomElement$1;
|
|
988
|
-
|
|
989
|
-
export { PublicNotification, defineCustomElement };
|
|
984
|
+
defineCustomElement$1();
|
|
985
|
+
|
|
986
|
+
const PublicNotification = PublicNotification$1;
|
|
987
|
+
const defineCustomElement = defineCustomElement$1;
|
|
988
|
+
|
|
989
|
+
export { PublicNotification, defineCustomElement };
|
|
@@ -12,7 +12,7 @@ import { g as goToSelection, h as highlightFeatures, d as queryObjectIds, e as g
|
|
|
12
12
|
import { E as EWorkflowType, f as ESelectionMode, g as ERefineMode, c as ESketchType } from './interfaces-d0d83efa.js';
|
|
13
13
|
import { s as state } from './publicNotificationStore-b9daaee4.js';
|
|
14
14
|
import { g as getLocaleComponentStrings } from './locale-7bf10e0a.js';
|
|
15
|
-
import { d as downloadCSV, a as downloadPDF } from './downloadUtils-
|
|
15
|
+
import { d as downloadCSV, a as downloadPDF } from './downloadUtils-2ed29d75.js';
|
|
16
16
|
import { a as getSelectionIds, g as getTotal } from './publicNotificationUtils-5cb5a607.js';
|
|
17
17
|
import './resources-436ae282.js';
|
|
18
18
|
import './guid-15fce7c0.js';
|
|
@@ -1080,7 +1080,7 @@ function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++
|
|
|
1080
1080
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1081
1081
|
* ====================================================================
|
|
1082
1082
|
*/
|
|
1083
|
-
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-
|
|
1083
|
+
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-edc28958.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},
|
|
1084
1084
|
/** ====================================================================
|
|
1085
1085
|
* @license
|
|
1086
1086
|
* jsPDF XMP metadata plugin
|
|
@@ -2139,6 +2139,7 @@ const lineSeparatorChar = "|";
|
|
|
2139
2139
|
*/
|
|
2140
2140
|
async function downloadCSV(selectionSetNames, layer, ids, formatUsingLayerPopup, removeDuplicates = false, addColumnTitle = false) {
|
|
2141
2141
|
console.log("downloadCSV using selectionSetNames " + JSON.stringify(selectionSetNames)); //???
|
|
2142
|
+
console.log("downloadCSV removeDuplicates", removeDuplicates); //???
|
|
2142
2143
|
const labels = await _prepareLabels(layer, ids, removeDuplicates, formatUsingLayerPopup, addColumnTitle);
|
|
2143
2144
|
exportCSV(labels);
|
|
2144
2145
|
return Promise.resolve();
|
|
@@ -2155,6 +2156,7 @@ async function downloadCSV(selectionSetNames, layer, ids, formatUsingLayerPopup,
|
|
|
2155
2156
|
*/
|
|
2156
2157
|
async function downloadPDF(selectionSetNames, layer, ids, removeDuplicates, labelPageDescription) {
|
|
2157
2158
|
console.log("downloadPDF using selectionSetNames " + JSON.stringify(selectionSetNames)); //???
|
|
2159
|
+
console.log("downloadPDF removeDuplicates", removeDuplicates); //???
|
|
2158
2160
|
let labels = await _prepareLabels(layer, ids, removeDuplicates);
|
|
2159
2161
|
labels =
|
|
2160
2162
|
// Remove empty lines in labels
|
|
@@ -2195,7 +2197,7 @@ function _convertPopupTextToLabelSpec(popupInfo) {
|
|
|
2195
2197
|
// Replace <br> variants with the line separator character
|
|
2196
2198
|
popupInfo = popupInfo.replace(/<br\s*\/?>/gi, lineSeparatorChar);
|
|
2197
2199
|
// Replace <p> variants with the line separator character, except in the first position
|
|
2198
|
-
popupInfo = popupInfo.replace(/<p[^>]*>/gi, lineSeparatorChar).trim().replace(
|
|
2200
|
+
popupInfo = popupInfo.replace(/<p[^>]*>/gi, lineSeparatorChar).trim().replace(/^\|/, "");
|
|
2199
2201
|
// Remove </p>
|
|
2200
2202
|
popupInfo = popupInfo.replace(/<\/p>/gi, "");
|
|
2201
2203
|
// Remove \n
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { a as commonjsGlobal, c as createCommonjsModule, g as getDefaultExportFromCjs } from './_commonjsHelpers-d5f9d613.js';
|
|
7
|
-
import { _ as _typeof_1 } from './downloadUtils-
|
|
7
|
+
import { _ as _typeof_1 } from './downloadUtils-2ed29d75.js';
|
|
8
8
|
import './index-c246d90e.js';
|
|
9
9
|
import './loadModules-b299cd43.js';
|
|
10
10
|
import './locale-7bf10e0a.js';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-c246d90e.js';
|
|
7
7
|
import { g as getLocaleComponentStrings } from './locale-7bf10e0a.js';
|
|
8
8
|
import { g as goToSelection, a as getMapLayerView, q as queryAllFeatures } from './mapViewUtils-02696ab6.js';
|
|
9
|
-
import { d as downloadCSV } from './downloadUtils-
|
|
9
|
+
import { d as downloadCSV } from './downloadUtils-2ed29d75.js';
|
|
10
10
|
import './_commonjsHelpers-d5f9d613.js';
|
|
11
11
|
import './interfaces-d0d83efa.js';
|
|
12
12
|
import './loadModules-b299cd43.js';
|