experience-builder/1.12/widgets/print-widget/dist/runtime/widget.js

1 line
8.4 KiB
JavaScript
Raw Normal View History

2023-09-21 08:00:37 +00:00
System.register(["jimu-core","jimu-arcgis","jimu-ui","esri/geometry/Point","esri/rest/print","esri/rest/support/PrintParameters","esri/rest/support/PrintTemplate"],(function(e,t){var r={},a={},n={},o={},c={},l={},s={};return{setters:[function(e){r.React=e.React,r.ReactDOM=e.ReactDOM},function(e){a.JimuMapViewComponent=e.JimuMapViewComponent},function(e){n.Button=e.Button,n.Card=e.Card,n.CardBody=e.CardBody,n.CardFooter=e.CardFooter,n.CardHeader=e.CardHeader,n.Label=e.Label,n.Loading=e.Loading,n.Option=e.Option,n.Select=e.Select,n.TextInput=e.TextInput,n.WidgetPlaceholder=e.WidgetPlaceholder},function(e){o.default=e.default},function(e){c.default=e.default},function(e){l.default=e.default},function(e){s.default=e.default}],execute:function(){e((()=>{var e={72:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M10 4H6c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h4c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM22 12h4c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-4c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2zm0-6h4v4h-4V6zM10 20H6c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h4c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm0 6H6v-4h4v4zM26 20h-4c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h4c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2z"></path><path d="M28 16h-2c-2.671 0-5.182-1.04-7.071-2.929S16 8.671 16 6V4c0-2.2-1.8-4-4-4H4C1.8 0 0 1.8 0 4v8c0 2.2 1.8 4 4 4h2c2.671 0 5.182 1.04 7.071 2.929S16 23.329 16 26v2c0 2.2 1.8 4 4 4h8c2.2 0 4-1.8 4-4v-8c0-2.2-1.8-4-4-4zm2 12c0 .53-.209 1.031-.589 1.411S28.53 30 28 30h-8c-.53 0-1.031-.209-1.411-.589S18 28.53 18 28v-2c0-6.627-5.373-12-12-12H4c-.53 0-1.031-.209-1.411-.589S2 12.53 2 12V4c0-.53.209-1.031.589-1.411S3.47 2 4 2h8c.53 0 1.031.209 1.411.589S14 3.47 14 4v2c0 6.627 5.373 12 12 12h2c.53 0 1.031.209 1.411.589S30 19.47 30 20v8z"></path></svg>'},294:e=>{"use strict";e.exports=o},191:e=>{"use strict";e.exports=c},641:e=>{"use strict";e.exports=l},347:e=>{"use strict";e.exports=s},826:e=>{"use strict";e.exports=a},891:e=>{"use strict";e.exports=r},726:e=>{"use strict";e.exports=n}},t={};function i(r){var a=t[r];if(void 0!==a)return a.exports;var n=t[r]={exports:{}};return e[r](n,n.exports,i),n.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.p="";var u={};return i.p=window.jimuConfig.baseUrl,(()=>{"use strict";i.r(u),i.d(u,{__set_webpack_public_path__:()=>R,default:()=>x});var e=i(891),t=i(826),r=i(726),a=i(294),n=i(191),o=i(641),c=i(347);const l={_widgetLabel:"Print",heading:"PDF drucken",titleLabel:"Titel",scaleLabel:"Maßstab",formatLabel:"Format","A4 Hochformat":"A4 Hochformat","A4 Hochformat mit Legende":"A4 Hochformat mit Legende","A4 Querformat":"A4 Querformat","A4 Querformat mit Legende":"A4 Querformat mit Legende","A3 Hochformat":"A3 Hochformat","A3 Hochformat mit Legende":"A3 Hochformat mit Legende","A3 Querformat":"A3 Querformat","A3 Querformat mit Legende":"A3 Querformat mit Legende",buttonPrint:"Drucken",buttonCancel:"Abbrechen"},{useState:s,useRef:d,useEffect:m}=e.React,f=[1e4,25e3,5e4,1e5,2e5,5e5,1e6,35e5],p={"A4 Hochformat":[190,265],"A4 Hochformat mit Legende":[190,225],"A4 Querformat":[277,178],"A4 Querformat mit Legende":[277,140],"A3 Hochformat":[277,385],"A3 Hochformat mit Legende":[277,335],"A3 Querformat":[400,264],"A3 Querformat mit Legende":[400,215]};function g({view:t,intl:a,updatePreview:i}){const[u,g]=s("GeoSphere Austria"),[h,b]=s(Object.keys(p)[0]),[v,y]=s(1e4),[M,w]=s(!1),x=d(),R=d();x.current=v,R.current=h;const L=d(null);function C(e){fetch(e.url).then((e=>e.blob())).then((e=>{const t=document.createElement("a");t.setAttribute("href",URL.createObjectURL(e)),t.setAttribute("download","GeoSphere_Maps_Print.pdf"),document.body.appendChild(t),t.click(),document.body.removeChild(t),w(!1)}))}function A(e){"AbortError"===e.name||console.error("Error: ",e)}return m((()=>{co