@enablerr-ui/report 0.2.25 → 0.2.27
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/index.min.js +1 -1
- package/package.json +1 -1
package/dist/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["@enablerr-ui/layout","@enablerr-ui/form"],(function(t){"use strict";var e,n;return{setters:[function(t){e=t.getAttractions},function(t){n=t.Request}],execute:function(){t("version","0.2.25");function o(){}function r(t){return t()}function l(){return Object.create(null)}function c(t){t.forEach(r)}function i(t){return"function"==typeof t}function u(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function s(t,e){t.appendChild(e)}function a(t,e,n){t.insertBefore(e,n||null)}function f(t){t.parentNode.removeChild(t)}function d(t){return document.createElement(t)}function p(t){return document.createTextNode(t)}function m(){return p(" ")}function h(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function $(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}let b;function g(t){b=t}function y(){if(!b)throw new Error("Function called outside component initialization");return b}const v=[],w=[],k=[],x=[],O=Promise.resolve();let _=!1;function E(t){k.push(t)}function j(t){x.push(t)}let P=!1;const D=new Set;function I(){if(!P){P=!0;do{for(let t=0;t<v.length;t+=1){const e=v[t];g(e),T(e.$$)}for(g(null),v.length=0;w.length;)w.pop()();for(let t=0;t<k.length;t+=1){const e=k[t];D.has(e)||(D.add(e),e())}k.length=0}while(v.length);for(;x.length;)x.pop()();_=!1,P=!1,D.clear()}}function T(t){if(null!==t.fragment){t.update(),c(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(E)}}const F=new Set;let S;function q(){S={r:0,c:[],p:S}}function C(){S.r||c(S.c),S=S.p}function B(t,e){t&&t.i&&(F.delete(t),t.i(e))}function G(t,e,n,o){if(t&&t.o){if(F.has(t))return;F.add(t),S&&S.c.push((()=>{F.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}function M(t,e){const n=e.token={};function o(t,o,r,l){if(e.token!==n)return;e.resolved=l;let c=e.ctx;void 0!==r&&(c=c.slice(),c[r]=l);const i=t&&(e.current=t)(c);let u=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(q(),G(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),C())})):e.block.d(1),i.c(),B(i,1),i.m(e.mount(),e.anchor),u=!0),e.block=i,e.blocks&&(e.blocks[o]=i),u&&I()}if((r=t)&&"object"==typeof r&&"function"==typeof r.then){const n=y();if(t.then((t=>{g(n),o(e.then,1,e.value,t),g(null)}),(t=>{if(g(n),o(e.catch,2,e.error,t),g(null),!e.hasCatch)throw t})),e.current!==e.pending)return o(e.pending,0),!0}else{if(e.current!==e.then)return o(e.then,1,e.value,t),!0;e.resolved=t}var r}const A="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function H(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function N(t){t&&t.c()}function R(t,e,n,o){const{fragment:l,on_mount:u,on_destroy:s,after_update:a}=t.$$;l&&l.m(e,n),o||E((()=>{const e=u.map(r).filter(i);s?s.push(...e):c(e),t.$$.on_mount=[]})),a.forEach(E)}function L(t,e){const n=t.$$;null!==n.fragment&&(c(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function z(t,e){-1===t.$$.dirty[0]&&(v.push(t),_||(_=!0,O.then(I)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function U(t,e,n,r,i,u,s=[-1]){const a=b;g(t);const d=t.$$={fragment:null,ctx:null,props:u,update:o,not_equal:i,bound:l(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:e.context||[]),callbacks:l(),dirty:s,skip_bound:!1};let p=!1;if(d.ctx=n?n(t,e.props||{},((e,n,...o)=>{const r=o.length?o[0]:n;return d.ctx&&i(d.ctx[e],d.ctx[e]=r)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](r),p&&z(t,e)),n})):[],d.update(),p=!0,c(d.before_update),d.fragment=!!r&&r(d.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);d.fragment&&d.fragment.l(t),t.forEach(f)}else d.fragment&&d.fragment.c();e.intro&&B(t.$$.fragment),R(t,e.target,e.anchor,e.customElement),I()}g(a)}class K{$destroy(){L(this,1),this.$destroy=o}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const{document:J}=A;function Q(t,e,n){const o=t.slice();return o[24]=e[n],o[26]=n,o}function V(t){let e;return{c(){e=p("Dokument wählen")},m(t,n){a(t,e,n)},d(t){t&&f(e)}}}function W(t){let e,n;return e=new t[6]({props:{file:t[0]}}),{c(){N(e.$$.fragment)},m(t,o){R(e,t,o),n=!0},p(t,n){const o={};1&n&&(o.file=t[0]),e.$set(o)},i(t){n||(B(e.$$.fragment,t),n=!0)},o(t){G(e.$$.fragment,t),n=!1},d(t){L(e,t)}}}function X(t){let e;return{c(){e=p("Dokument hochladen")},m(t,n){a(t,e,n)},d(t){t&&f(e)}}}function Y(t){return{c:o,m:o,p:o,i:o,o:o,d:o}}function Z(t){let e,n,o,r,l,c,i=t[23],u=[];for(let e=0;e<i.length;e+=1)u[e]=et(Q(t,i,e));const p=t=>G(u[t],1,1,(()=>{u[t]=null}));return{c(){e=d("div"),n=d("table"),o=d("thead"),o.innerHTML="<tr><th>#</th> \n <th>Datei</th> \n <th>Download</th></tr>",r=m(),l=d("tbody");for(let t=0;t<u.length;t+=1)u[t].c();h(o,"class","tablehead"),$(l,"overflow-y","auto"),h(n,"class","tableFixHead"),h(e,"class","task_list svelte-2qb2rt")},m(t,i){a(t,e,i),s(e,n),s(n,o),s(n,r),s(n,l);for(let t=0;t<u.length;t+=1)u[t].m(l,null);c=!0},p(t,e){if(4&e){let n;for(i=t[23],n=0;n<i.length;n+=1){const o=Q(t,i,n);u[n]?(u[n].p(o,e),B(u[n],1)):(u[n]=et(o),u[n].c(),B(u[n],1),u[n].m(l,null))}for(q(),n=i.length;n<u.length;n+=1)p(n);C()}},i(t){if(!c){for(let t=0;t<i.length;t+=1)B(u[t]);c=!0}},o(t){u=u.filter(Boolean);for(let t=0;t<u.length;t+=1)G(u[t]);c=!1},d(t){t&&f(e),function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(u,t)}}}function tt(t){let e,n,o;return{c(){e=d("a"),n=p("Download"),h(e,"href",o="/api/userreport/"+t[24]._id),$(e,"color","whitesmoke")},m(t,o){a(t,e,o),s(e,n)},p(t,n){4&n&&o!==(o="/api/userreport/"+t[24]._id)&&h(e,"href",o)},d(t){t&&f(e)}}}function et(t){let e,n,o,r,l,c,i,u,h,$,b,g,y=t[26]+1+"",v=t[24].title+"";return $=new t[3]({props:{filled:!0,$$slots:{default:[tt]},$$scope:{ctx:t}}}),{c(){e=d("tr"),n=d("td"),o=p(y),r=m(),l=d("td"),c=d("h4"),i=p(v),u=m(),h=d("td"),N($.$$.fragment),b=m()},m(t,f){a(t,e,f),s(e,n),s(n,o),s(e,r),s(e,l),s(l,c),s(c,i),s(e,u),s(e,h),R($,h,null),s(e,b),g=!0},p(t,e){(!g||4&e)&&v!==(v=t[24].title+"")&&function(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}(i,v);const n={};134217732&e&&(n.$$scope={dirty:e,ctx:t}),$.$set(n)},i(t){g||(B($.$$.fragment,t),g=!0)},o(t){G($.$$.fragment,t),g=!1},d(t){t&&f(e),L($)}}}function nt(t){let e;return{c(){e=d("div"),e.innerHTML='<table class="tableFixHead"><thead class="tablehead"><tr><th>#</th> \n <th>Datei</th> \n <th>Download</th></tr></thead> \n <tbody><tr><td colspan="3">Kein Reports</td></tr></tbody></table>'},m(t,n){a(t,e,n)},p:o,i:o,o:o,d(t){t&&f(e)}}}function ot(t){let e,n,o,r,l,c,i,u,$,b,g,y,v,k,x,O,_,E,P,D,I;function T(e){t[12](e)}n=new t[4]({props:{class:"divider",text:"Dokumente"}});let F={labelClass:"InputLabel",type:"file",accept:".pdf",id:"fileInput",$$slots:{default:[V]},$$scope:{ctx:t}};void 0!==t[0]&&(F.value=t[0]),u=new t[5]({props:F}),w.push((()=>H(u,"value",T))),u.$on("change",t[9]);let S=null!=t[0]&&W(t);function A(e){t[13](e)}let z={style:"margin-left: 15px;",placeholder:"Titel",type:"text",id:"fileTitle"};void 0!==t[1]&&(z.value=t[1]),v=new t[7]({props:z}),w.push((()=>H(v,"value",A))),_=new t[3]({props:{filled:!0,style:"color: whitesmoke; margin-left: 15px; padding-left: 15px;",$$slots:{default:[X]},$$scope:{ctx:t}}}),_.$on("click",t[14]);let U={ctx:t,current:null,token:null,hasCatch:!1,pending:nt,then:Z,catch:Y,value:23,blocks:[,,,]};return M(D=t[2],U),{c(){e=d("div"),N(n.$$.fragment),o=m(),r=d("table"),l=d("tbody"),c=d("tr"),i=d("td"),N(u.$$.fragment),b=m(),S&&S.c(),g=m(),y=d("td"),N(v.$$.fragment),x=m(),O=d("td"),N(_.$$.fragment),E=m(),P=p(""),U.block.c(),h(l,"class","tablebody"),h(r,"class","tableFixHead")},m(t,f){a(t,e,f),R(n,e,null),a(t,o,f),a(t,r,f),s(r,l),s(l,c),s(c,i),R(u,i,null),s(i,b),S&&S.m(i,null),s(c,g),s(c,y),R(v,y,null),s(c,x),s(c,O),R(_,O,null),a(t,E,f),a(t,P,f),U.block.m(t,U.anchor=f),U.mount=()=>P.parentNode,U.anchor=P,I=!0},p(e,[n]){t=e;const o={};134217728&n&&(o.$$scope={dirty:n,ctx:t}),!$&&1&n&&($=!0,o.value=t[0],j((()=>$=!1))),u.$set(o),null!=t[0]?S?(S.p(t,n),1&n&&B(S,1)):(S=W(t),S.c(),B(S,1),S.m(i,null)):S&&(q(),G(S,1,1,(()=>{S=null})),C());const r={};!k&&2&n&&(k=!0,r.value=t[1],j((()=>k=!1))),v.$set(r);const l={};134217728&n&&(l.$$scope={dirty:n,ctx:t}),_.$set(l),U.ctx=t,4&n&&D!==(D=t[2])&&M(D,U)||function(t,e,n){const o=e.slice(),{resolved:r}=t;t.current===t.then&&(o[t.value]=r),t.current===t.catch&&(o[t.error]=r),t.block.p(o,n)}(U,t,n)},i(t){I||(B(n.$$.fragment,t),B(u.$$.fragment,t),B(S),B(v.$$.fragment,t),B(_.$$.fragment,t),B(U.block),I=!0)},o(t){G(n.$$.fragment,t),G(u.$$.fragment,t),G(S),G(v.$$.fragment,t),G(_.$$.fragment,t);for(let t=0;t<3;t+=1){G(U.blocks[t])}I=!1},d(t){t&&f(e),L(n),t&&f(o),t&&f(r),L(u),S&&S.d(),L(v),L(_),t&&f(E),t&&f(P),U.block.d(t),U.token=null,U=null}}}function rt(t,o,r){let l;const{Card:c,Table:i,Button:u,Modal:s,Tabs:a,Divider:f,FileInput:d,FileTile:p,FileDropzone:m,FormField:h,TextField:$}=e;let{task:b}=o,{eventItem:g}=o;const y=async()=>{let t=(await b).task.id;return await n.getUserReports(t)};let v,w="",k=y();async function x(){const t=new FormData,e=document.getElementById("fileInput").files[0];t.append("title",w),t.append("file",e),await n.uploadUserReport(l,t),r(2,k=y())}return t.$$set=t=>{"task"in t&&r(10,b=t.task),"eventItem"in t&&r(11,g=t.eventItem)},t.$$.update=()=>{1024&t.$$.dirty&&(l=b.task.id)},[v,w,k,u,f,d,p,$,x,t=>{const e=t.detail.value;r(1,w=e?e.name.split(".")[0]:"")},b,g,function(t){v=t,r(0,v)},function(t){w=t,r(1,w)},()=>x()]}class lt extends K{constructor(t){var e;super(),J.getElementById("svelte-2qb2rt-style")||((e=d("style")).id="svelte-2qb2rt-style",e.textContent=".task_list.svelte-2qb2rt{flex:auto;overflow-y:auto;overflow-x:hidden;width:99%;height:100%;border:1px solid #ccc;border-radius:0.5em;margin-top:2em}.InputLabel{border:#326173 1px solid}",s(J.head,e)),U(this,t,rt,ot,u,{task:10,eventItem:11})}}function ct(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var it,ut,st=(it=function(t,e){function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function o(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?n(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("object"!==l(t))throw new Error("single-spa-svelte requires a configuration object");var e=o(o({},c),t);if(!e.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:i.bind(null,e,n),mount:u.bind(null,e,n),unmount:s.bind(null,e,n),update:a.bind(null,e,n)}};var c={component:null,domElementGetter:null,props:{}};function i(t){return Promise.resolve()}function u(t,e,n){var r=Object.keys(c),l=Object.keys(t).reduce((function(e,n){return r.includes(n)||(e[n]=t[n]),e}),{});return Promise.resolve().then((function(){var r=function(t,e){return(e=e&&e.customProps?e.customProps:e).domElement?function(){return e.domElement}:e.domElementGetter?function(){return e.domElementGetter(e)}:t.domElementGetter?function(){return t.domElementGetter(e)}:function(t){var e=t.appName||t.name;if(!e)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(e);return function(){var t=document.getElementById(n);return t||((t=document.createElement("div")).id=n,document.body.appendChild(t)),t}}(e)}(t,n),c=r();e.instance=new t.component(o(o({},l),{},{target:c,props:Object.assign({},n,t.props)}))}))}function s(t,e){return Promise.resolve().then((function(){e.instance.$destroy?e.instance.$destroy():e.instance.destroy()}))}function a(t,e,n){return Promise.resolve().then((function(){e.instance.$set?e.instance.$set(n):e.instance.set(n)}))}},it(ut={exports:{}},ut.exports),ut.exports);const at=ct(st)({component:lt,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:ft,mount:dt,unmount:pt}=at;t({bootstrap:ft,mount:dt,unmount:pt});t("Report",lt)}}}));
|
|
1
|
+
System.register(["@enablerr-ui/layout","@enablerr-ui/form"],(function(t){"use strict";var e,n;return{setters:[function(t){e=t.getAttractions},function(t){n=t.Request}],execute:function(){t("version","0.2.27");function o(){}function r(t){return t()}function l(){return Object.create(null)}function c(t){t.forEach(r)}function i(t){return"function"==typeof t}function s(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function u(t,e){t.appendChild(e)}function a(t,e,n){t.insertBefore(e,n||null)}function f(t){t.parentNode.removeChild(t)}function d(t){return document.createElement(t)}function p(t){return document.createTextNode(t)}function m(){return p(" ")}function h(){return p("")}function $(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function b(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function g(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}let y;function v(t){y=t}function w(){if(!y)throw new Error("Function called outside component initialization");return y}const k=[],x=[],E=[],O=[],_=Promise.resolve();let j=!1;function P(t){E.push(t)}let B=!1;const T=new Set;function D(){if(!B){B=!0;do{for(let t=0;t<k.length;t+=1){const e=k[t];v(e),F(e.$$)}for(v(null),k.length=0;x.length;)x.pop()();for(let t=0;t<E.length;t+=1){const e=E[t];T.has(e)||(T.add(e),e())}E.length=0}while(k.length);for(;O.length;)O.pop()();j=!1,B=!1,T.clear()}}function F(t){if(null!==t.fragment){t.update(),c(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(P)}}const M=new Set;let I;function S(){I={r:0,c:[],p:I}}function A(){I.r||c(I.c),I=I.p}function H(t,e){t&&t.i&&(M.delete(t),t.i(e))}function L(t,e,n,o){if(t&&t.o){if(M.has(t))return;M.add(t),I&&I.c.push((()=>{M.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}function G(t,e){const n=e.token={};function o(t,o,r,l){if(e.token!==n)return;e.resolved=l;let c=e.ctx;void 0!==r&&(c=c.slice(),c[r]=l);const i=t&&(e.current=t)(c);let s=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(S(),L(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),A())})):e.block.d(1),i.c(),H(i,1),i.m(e.mount(),e.anchor),s=!0),e.block=i,e.blocks&&(e.blocks[o]=i),s&&D()}if((r=t)&&"object"==typeof r&&"function"==typeof r.then){const n=w();if(t.then((t=>{v(n),o(e.then,1,e.value,t),v(null)}),(t=>{if(v(n),o(e.catch,2,e.error,t),v(null),!e.hasCatch)throw t})),e.current!==e.pending)return o(e.pending,0),!0}else{if(e.current!==e.then)return o(e.then,1,e.value,t),!0;e.resolved=t}var r}const q="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function C(t){t&&t.c()}function N(t,e,n,o){const{fragment:l,on_mount:s,on_destroy:u,after_update:a}=t.$$;l&&l.m(e,n),o||P((()=>{const e=s.map(r).filter(i);u?u.push(...e):c(e),t.$$.on_mount=[]})),a.forEach(P)}function R(t,e){const n=t.$$;null!==n.fragment&&(c(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function z(t,e){-1===t.$$.dirty[0]&&(k.push(t),j||(j=!0,_.then(D)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function U(t,e,n,r,i,s,u=[-1]){const a=y;v(t);const d=t.$$={fragment:null,ctx:null,props:s,update:o,not_equal:i,bound:l(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:e.context||[]),callbacks:l(),dirty:u,skip_bound:!1};let p=!1;if(d.ctx=n?n(t,e.props||{},((e,n,...o)=>{const r=o.length?o[0]:n;return d.ctx&&i(d.ctx[e],d.ctx[e]=r)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](r),p&&z(t,e)),n})):[],d.update(),p=!0,c(d.before_update),d.fragment=!!r&&r(d.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);d.fragment&&d.fragment.l(t),t.forEach(f)}else d.fragment&&d.fragment.c();e.intro&&H(t.$$.fragment),N(t,e.target,e.anchor,e.customElement),D()}v(a)}class K{$destroy(){R(this,1),this.$destroy=o}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const{document:J}=q;function Q(t,e,n){const o=t.slice();return o[17]=e[n],o[19]=n,o}function V(t){let e;return{c(){e=p("Dokument wählen")},m(t,n){a(t,e,n)},d(t){t&&f(e)}}}function W(t){let e;return{c(){e=p("Dokument hochladen")},m(t,n){a(t,e,n)},d(t){t&&f(e)}}}function X(t){return{c:o,m:o,p:o,i:o,o:o,d:o}}function Y(t){let e,n,o,r,l,c,i,s;const p=[tt,Z],h=[];function $(t,e){return 0===t[16].length?0:1}return c=$(t),i=h[c]=p[c](t),{c(){e=d("div"),n=d("table"),o=d("thead"),o.innerHTML='<tr class="svelte-1777v52"><th>#</th> \n <th>Datei</th> \n <th id="headAction" class="svelte-1777v52">Aktionen</th></tr>',r=m(),l=d("tbody"),i.c(),b(o,"class","tablehead"),b(n,"class","tableFixHead"),b(e,"class","task_list svelte-1777v52")},m(t,i){a(t,e,i),u(e,n),u(n,o),u(n,r),u(n,l),h[c].m(l,null),s=!0},p(t,e){let n=c;c=$(t),c===n?h[c].p(t,e):(S(),L(h[n],1,1,(()=>{h[n]=null})),A(),i=h[c],i?i.p(t,e):(i=h[c]=p[c](t),i.c()),H(i,1),i.m(l,null))},i(t){s||(H(i),s=!0)},o(t){L(i),s=!1},d(t){t&&f(e),h[c].d()}}}function Z(t){let e,n,o=t[16],r=[];for(let e=0;e<o.length;e+=1)r[e]=ot(Q(t,o,e));const l=t=>L(r[t],1,1,(()=>{r[t]=null}));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=h()},m(t,o){for(let e=0;e<r.length;e+=1)r[e].m(t,o);a(t,e,o),n=!0},p(t,n){if(129&n){let c;for(o=t[16],c=0;c<o.length;c+=1){const l=Q(t,o,c);r[c]?(r[c].p(l,n),H(r[c],1)):(r[c]=ot(l),r[c].c(),H(r[c],1),r[c].m(e.parentNode,e))}for(S(),c=o.length;c<r.length;c+=1)l(c);A()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)H(r[t]);n=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)L(r[t]);n=!1},d(t){!function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(r,t),t&&f(e)}}}function tt(t){let e;return{c(){e=d("tr"),e.innerHTML='<td colspan="3">Kein Reports</td>',b(e,"class","svelte-1777v52")},m(t,n){a(t,e,n)},p:o,i:o,o:o,d(t){t&&f(e)}}}function et(t){let e,n,o;return{c(){e=d("a"),n=p("Download"),b(e,"href",o="/api/userreport/"+t[17]._id),g(e,"color","whitesmoke")},m(t,o){a(t,e,o),u(e,n)},p(t,n){1&n&&o!==(o="/api/userreport/"+t[17]._id)&&b(e,"href",o)},d(t){t&&f(e)}}}function nt(t){let e;return{c(){e=p("Delete")},m(t,n){a(t,e,n)},d(t){t&&f(e)}}}function ot(t){let e,n,o,r,l,c,i,s,h,$,y,v,w,k=t[19]+1+"",x=t[17].title+"";return h=new t[2]({props:{filled:!0,style:"display: inline;",$$slots:{default:[et]},$$scope:{ctx:t}}}),y=new t[2]({props:{outline:!0,style:"color: red; display: inline;",$$slots:{default:[nt]},$$scope:{ctx:t}}}),y.$on("click",(function(){return t[12](t[17])})),{c(){e=d("tr"),n=d("td"),o=p(k),r=m(),l=d("td"),c=p(x),i=m(),s=d("td"),C(h.$$.fragment),$=m(),C(y.$$.fragment),v=m(),g(l,"max-width","30em"),b(e,"class","svelte-1777v52")},m(t,f){a(t,e,f),u(e,n),u(n,o),u(e,r),u(e,l),u(l,c),u(e,i),u(e,s),N(h,s,null),u(s,$),N(y,s,null),u(e,v),w=!0},p(e,n){t=e,(!w||1&n)&&x!==(x=t[17].title+"")&&function(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}(c,x);const o={};1048577&n&&(o.$$scope={dirty:n,ctx:t}),h.$set(o);const r={};1048576&n&&(r.$$scope={dirty:n,ctx:t}),y.$set(r)},i(t){w||(H(h.$$.fragment,t),H(y.$$.fragment,t),w=!0)},o(t){L(h.$$.fragment,t),L(y.$$.fragment,t),w=!1},d(t){t&&f(e),R(h),R(y)}}}function rt(t){return{c:o,m:o,p:o,i:o,o:o,d:o}}function lt(t){let e,n,o,r,l,i,s,p,y,v,w,k,x,E,O,_,j,P,B,T,D,F,M,I,S,A,q;n=new t[3]({props:{class:"divider",text:"Dokumente"}}),y=new t[2]({props:{class:"add_filter_button",$$slots:{default:[V]},$$scope:{ctx:t}}}),y.$on("click",t[9]),P=new t[4]({props:{placeholder:"Titel",type:"text",id:"fileTitle",required:!0}}),D=new t[2]({props:{filled:!0,style:"color: whitesmoke;",type:"submit",$$slots:{default:[W]},$$scope:{ctx:t}}});let z={ctx:t,current:null,token:null,hasCatch:!1,pending:rt,then:Y,catch:X,value:16,blocks:[,,,]};return G(I=t[0],z),{c(){e=d("div"),C(n.$$.fragment),o=m(),r=d("form"),l=d("table"),i=d("tbody"),s=d("tr"),p=d("td"),C(y.$$.fragment),v=m(),w=d("input"),k=m(),x=d("div"),E=m(),O=d("div"),_=m(),j=d("td"),C(P.$$.fragment),B=m(),T=d("td"),C(D.$$.fragment),F=m(),M=h(),z.block.c(),b(w,"type","file"),b(w,"accept",".pdf"),b(w,"id","fileInput"),g(w,"display","none"),w.required=!0,b(x,"id","nameOfFile"),b(x,"class","svelte-1777v52"),b(O,"id","sizeOfFile"),b(O,"class","svelte-1777v52"),b(i,"class","tablebody"),b(l,"class","tableFixHead"),b(r,"id","uploadForm")},m(c,f){var d;a(c,e,f),N(n,e,null),a(c,o,f),a(c,r,f),u(r,l),u(l,i),u(i,s),u(s,p),N(y,p,null),u(p,v),u(p,w),t[11](w),u(p,k),u(p,x),u(p,E),u(p,O),u(s,_),u(s,j),N(P,j,null),u(s,B),u(s,T),N(D,T,null),a(c,F,f),a(c,M,f),z.block.m(c,z.anchor=f),z.mount=()=>M.parentNode,z.anchor=M,S=!0,A||(q=[$(w,"change",t[10]),$(r,"submit",(d=t[6],function(t){return t.preventDefault(),d.call(this,t)}))],A=!0)},p(e,[n]){t=e;const o={};1048576&n&&(o.$$scope={dirty:n,ctx:t}),y.$set(o);const r={};1048576&n&&(r.$$scope={dirty:n,ctx:t}),D.$set(r),z.ctx=t,1&n&&I!==(I=t[0])&&G(I,z)||function(t,e,n){const o=e.slice(),{resolved:r}=t;t.current===t.then&&(o[t.value]=r),t.current===t.catch&&(o[t.error]=r),t.block.p(o,n)}(z,t,n)},i(t){S||(H(n.$$.fragment,t),H(y.$$.fragment,t),H(P.$$.fragment,t),H(D.$$.fragment,t),H(z.block),S=!0)},o(t){L(n.$$.fragment,t),L(y.$$.fragment,t),L(P.$$.fragment,t),L(D.$$.fragment,t);for(let t=0;t<3;t+=1){L(z.blocks[t])}S=!1},d(l){l&&f(e),R(n),l&&f(o),l&&f(r),R(y),t[11](null),R(P),R(D),l&&f(F),l&&f(M),z.block.d(l),z.token=null,z=null,A=!1,c(q)}}}function ct(t,o,r){const{Button:l,Divider:c,TextField:i}=e;let s,u,{task:a}=o,f=[];const d=async()=>{const t=await a;s=t.task.id;return await n.getUserReports(s)};f=d();const p=t=>{let e=document.getElementById("fileTitle"),n=t.target.files[0];m(n);let o=n.name.split(".").slice(0,-1).join(".");e.value=o},m=t=>{const e=document.getElementById("nameOfFile"),n=document.getElementById("sizeOfFile");t?(e.innerHTML=t.name,n.innerHTML=function(t){t>=1073741824?t=Math.round(t/1073741824*100)/100+" GB":t>=1048576?t=Math.round(t/1048576*100)/100+" MB":t>=1024?t=Math.round(t/1024*100)/100+" KB":t>1?t+=" bytes":1==t?t+=" byte":t="0 bytes";return t}(t.size)):(e.innerHTML="",n.innerHTML="")};async function h(t){await n.deleteUserReport(t).then((()=>{r(0,f=d())}))}return t.$$set=t=>{"task"in t&&r(8,a=t.task)},[f,u,l,c,i,p,async function(t){const e=new FormData(t.target);let o=document.getElementById("fileInput"),l=document.getElementById("fileTitle"),c=o.files[0],i=l.value;e.append("title",i),e.append("file",c),await n.uploadUserReport(s,e).then((()=>{document.getElementById("uploadForm").reset(),m(),r(0,f=d())}))},h,a,()=>{u.click()},t=>p(t),function(t){x[t?"unshift":"push"]((()=>{u=t,r(1,u)}))},t=>h(t._id)]}class it extends K{constructor(t){var e;super(),J.getElementById("svelte-1777v52-style")||((e=d("style")).id="svelte-1777v52-style",e.textContent=".task_list.svelte-1777v52.svelte-1777v52{flex:auto;overflow-y:scroll;overflow-x:hidden;width:99%;height:30em;border:1px solid #ccc;border-radius:0.5em;margin-top:2em}.task_list.svelte-1777v52 tr.svelte-1777v52:nth-child(2n){background-color:#f8f8fe}#headAction.svelte-1777v52.svelte-1777v52{width:13em}#nameOfFile.svelte-1777v52.svelte-1777v52{width:15em;margin-top:6px;overflow-wrap:anywhere}#sizeOfFile.svelte-1777v52.svelte-1777v52{margin-top:3px;font-style:italic}",u(J.head,e)),U(this,t,ct,lt,s,{task:8})}}function st(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ut,at,ft=(ut=function(t,e){function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function o(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?n(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("object"!==l(t))throw new Error("single-spa-svelte requires a configuration object");var e=o(o({},c),t);if(!e.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:i.bind(null,e,n),mount:s.bind(null,e,n),unmount:u.bind(null,e,n),update:a.bind(null,e,n)}};var c={component:null,domElementGetter:null,props:{}};function i(t){return Promise.resolve()}function s(t,e,n){var r=Object.keys(c),l=Object.keys(t).reduce((function(e,n){return r.includes(n)||(e[n]=t[n]),e}),{});return Promise.resolve().then((function(){var r=function(t,e){return(e=e&&e.customProps?e.customProps:e).domElement?function(){return e.domElement}:e.domElementGetter?function(){return e.domElementGetter(e)}:t.domElementGetter?function(){return t.domElementGetter(e)}:function(t){var e=t.appName||t.name;if(!e)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(e);return function(){var t=document.getElementById(n);return t||((t=document.createElement("div")).id=n,document.body.appendChild(t)),t}}(e)}(t,n),c=r();e.instance=new t.component(o(o({},l),{},{target:c,props:Object.assign({},n,t.props)}))}))}function u(t,e){return Promise.resolve().then((function(){e.instance.$destroy?e.instance.$destroy():e.instance.destroy()}))}function a(t,e,n){return Promise.resolve().then((function(){e.instance.$set?e.instance.$set(n):e.instance.set(n)}))}},ut(at={exports:{}},at.exports),at.exports);const dt=st(ft)({component:it,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:pt,mount:mt,unmount:ht}=dt;t({bootstrap:pt,mount:mt,unmount:ht});t("Report",it)}}}));
|