@esri/solutions-components 0.10.35 → 0.10.36

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. package/dist/cjs/basemap-gallery_7.cjs.entry.js +1 -0
  2. package/dist/cjs/calcite-alert_5.cjs.entry.js +3 -3
  3. package/dist/cjs/card-manager_3.cjs.entry.js +2 -2
  4. package/dist/cjs/crowdsource-manager.cjs.entry.js +25 -29
  5. package/dist/cjs/{downloadUtils-20637f89.js → downloadUtils-76bc7e30.js} +6 -5
  6. package/dist/cjs/feature-list.cjs.entry.js +3 -3
  7. package/dist/cjs/{index.es-a242cb45.js → index.es-8336efed.js} +2 -2
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
  10. package/dist/cjs/{popupUtils-d477705b.js → popupUtils-bc762034.js} +1 -1
  11. package/dist/cjs/public-notification.cjs.entry.js +2 -2
  12. package/dist/cjs/solutions-components.cjs.js +1 -1
  13. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +27 -29
  14. package/dist/collection/components/map-legend/map-legend.js +1 -0
  15. package/dist/collection/utils/downloadUtils.js +5 -3
  16. package/dist/collection/utils/downloadUtils.ts +6 -3
  17. package/dist/collection/utils/test/downloadUtils.spec.tsx +10 -12
  18. package/dist/components/crowdsource-manager.js +26 -29
  19. package/dist/components/downloadUtils.js +5 -4
  20. package/dist/components/map-legend2.js +1 -0
  21. package/dist/esm/basemap-gallery_7.entry.js +1 -0
  22. package/dist/esm/calcite-alert_5.entry.js +3 -3
  23. package/dist/esm/card-manager_3.entry.js +2 -2
  24. package/dist/esm/crowdsource-manager.entry.js +25 -29
  25. package/dist/esm/{downloadUtils-e266e98d.js → downloadUtils-bc7a4ba1.js} +6 -5
  26. package/dist/esm/feature-list.entry.js +3 -3
  27. package/dist/esm/{index.es-c5f258e2.js → index.es-0d189a34.js} +2 -2
  28. package/dist/esm/loader.js +1 -1
  29. package/dist/esm/map-select-tools_3.entry.js +2 -2
  30. package/dist/esm/{popupUtils-4570096e.js → popupUtils-03dc398a.js} +1 -1
  31. package/dist/esm/public-notification.entry.js +2 -2
  32. package/dist/esm/solutions-components.js +1 -1
  33. package/dist/solutions-components/{p-cb3199f9.entry.js → p-04ab956c.entry.js} +1 -1
  34. package/dist/solutions-components/{p-a568af9f.js → p-6f606cdb.js} +1 -1
  35. package/dist/solutions-components/p-720de4db.entry.js +6 -0
  36. package/dist/solutions-components/p-97fe6ec5.entry.js +6 -0
  37. package/dist/solutions-components/{p-b4c49411.entry.js → p-9c4fef09.entry.js} +1 -1
  38. package/dist/solutions-components/{p-89046451.entry.js → p-aac0c89c.entry.js} +1 -1
  39. package/dist/solutions-components/p-cd482a33.js +21 -0
  40. package/dist/solutions-components/{p-b86b2664.entry.js → p-d2612c30.entry.js} +1 -1
  41. package/dist/solutions-components/{p-588adf13.entry.js → p-e345f9c4.entry.js} +1 -1
  42. package/dist/solutions-components/{p-46c8015c.js → p-ff9e28d1.js} +30 -30
  43. package/dist/solutions-components/solutions-components.esm.js +1 -1
  44. package/dist/solutions-components/utils/downloadUtils.ts +6 -3
  45. package/dist/solutions-components/utils/test/downloadUtils.spec.tsx +10 -12
  46. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +4 -7
  47. package/package.json +2 -1
  48. package/dist/solutions-components/p-2360802a.js +0 -21
  49. package/dist/solutions-components/p-5eb9a413.entry.js +0 -6
  50. package/dist/solutions-components/p-ecf642c2.entry.js +0 -6
@@ -7,8 +7,8 @@ import { g as getDefaultExportFromCjs } from './_commonjsHelpers-089957fe.js';
7
7
  import { a as getAssetPath } from './index-904bc599.js';
8
8
  import { l as loadModules } from './locale-0d06fca0.js';
9
9
  import { q as queryFeaturesByID } from './mapViewUtils-f54edae3.js';
10
+ import { S as Sanitizer } from './index-e14fade9.js';
10
11
  import './solution-resource-f5809979.js';
11
- import './index-e14fade9.js';
12
12
  import { _ as __assign$1, r as request, c as cleanUrl, g as getJson } from './restHelpersGet-48113381.js';
13
13
 
14
14
  /** @license
@@ -1585,7 +1585,7 @@ function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++
1585
1585
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1586
1586
  * ====================================================================
1587
1587
  */
1588
- function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-c5f258e2.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},
1588
+ function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-0d189a34.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},
1589
1589
  /** ====================================================================
1590
1590
  * @license
1591
1591
  * jsPDF XMP metadata plugin
@@ -2541,12 +2541,13 @@ function _cleanupLabel(labelText) {
2541
2541
  labelText = labelText.replace(/<\/p>/gi, "");
2542
2542
  // Replace \n with the line separator character
2543
2543
  labelText = labelText.replace(/\n/gi, "|");
2544
- // Remove remaining HTML tags, replace 0xA0 that popup uses for spaces, and replace some char representations
2544
+ // Remove tricky stuff
2545
+ const sanitizer = new Sanitizer();
2546
+ labelText = sanitizer.sanitize(labelText);
2547
+ // Remove remaining HTML tags, replace 0xA0 that popup uses for spaces, and replace &nbsp;
2545
2548
  labelText = labelText
2546
2549
  .replace(/<[\s.]*[^<>]*\/?>/gi, "")
2547
2550
  .replace(/\xA0/gi, " ")
2548
- .replace(/&lt;/gi, "<")
2549
- .replace(/&gt;/gi, ">")
2550
2551
  .replace(/&nbsp;/gi, " ");
2551
2552
  // Trim each line
2552
2553
  labelText = labelText.replace(/\s*\|\s*/g, "|");
@@ -5,13 +5,13 @@
5
5
  */
6
6
  import { r as registerInstance, c as createEvent, g as getElement, h } from './index-904bc599.js';
7
7
  import { l as loadModules, g as getLocaleComponentStrings } from './locale-0d06fca0.js';
8
- import { P as PopupUtils } from './popupUtils-4570096e.js';
8
+ import { P as PopupUtils } from './popupUtils-03dc398a.js';
9
9
  import { g as getLayerOrTable, c as getFeatureLayerView, h as highlightFeatures } from './mapViewUtils-f54edae3.js';
10
10
  import './esri-loader-c6842c6b.js';
11
11
  import './_commonjsHelpers-089957fe.js';
12
- import './downloadUtils-e266e98d.js';
13
- import './solution-resource-f5809979.js';
12
+ import './downloadUtils-bc7a4ba1.js';
14
13
  import './index-e14fade9.js';
14
+ import './solution-resource-f5809979.js';
15
15
  import './restHelpersGet-48113381.js';
16
16
  import './interfaces-659e3836.js';
17
17
 
@@ -4,14 +4,14 @@
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
6
  import { c as commonjsGlobal, g as getDefaultExportFromCjs } from './_commonjsHelpers-089957fe.js';
7
- import { b as _typeof$1 } from './downloadUtils-e266e98d.js';
7
+ import { b as _typeof$1 } from './downloadUtils-bc7a4ba1.js';
8
8
  import './index-904bc599.js';
9
9
  import './locale-0d06fca0.js';
10
10
  import './esri-loader-c6842c6b.js';
11
11
  import './mapViewUtils-f54edae3.js';
12
12
  import './interfaces-659e3836.js';
13
- import './solution-resource-f5809979.js';
14
13
  import './index-e14fade9.js';
14
+ import './solution-resource-f5809979.js';
15
15
  import './restHelpersGet-48113381.js';
16
16
 
17
17
  var check = function (it) {