@enablerr-ui/task 0.2.56 → 0.2.58
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","@enablerr-ui/detail","@enablerr-ui/workflow","@enablerr-ui/report","@enablerr-ui/collab"],(function(t){"use strict";var e,n,o,r,s,l,a;return{setters:[function(t){e=t.getAttractions},function(t){n=t.Request,o=t.Page},function(t){r=t.Form},function(t){s=t.Workflow},function(t){l=t.Report},function(t){a=t.Collaboration}],execute:function(){t("version","0.2.56");function i(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var c,u,d=(c=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 s(t){return s="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},s(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("object"!==s(t))throw new Error("single-spa-svelte requires a configuration object");var e=o(o({},l),t);if(!e.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:a.bind(null,e,n),mount:i.bind(null,e,n),unmount:c.bind(null,e,n),update:u.bind(null,e,n)}};var l={component:null,domElementGetter:null,props:{}};function a(t){return Promise.resolve()}function i(t,e,n){var r=Object.keys(l),s=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),l=r();e.instance=new t.component(o(o({},s),{},{target:l,props:Object.assign({},n,t.props)}))}))}function c(t,e){return Promise.resolve().then((function(){e.instance.$destroy?e.instance.$destroy():e.instance.destroy()}))}function u(t,e,n){return Promise.resolve().then((function(){e.instance.$set?e.instance.$set(n):e.instance.set(n)}))}},c(u={exports:{}},u.exports),u.exports),f=i(d);function m(){}function p(t){return t()}function b(){return Object.create(null)}function v(t){t.forEach(p)}function $(t){return"function"==typeof t}function y(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function g(t,e){t.appendChild(e)}function k(t,e,n){t.insertBefore(e,n||null)}function h(t){t.parentNode.removeChild(t)}function w(t){return document.createElement(t)}function x(t){return document.createTextNode(t)}function I(){return x(" ")}function E(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}let _;function O(t){_=t}function j(){if(!_)throw new Error("Function called outside component initialization");return _}const C=[],P=[],B=[],S=[],T=Promise.resolve();let D=!1;function N(){D||(D=!0,T.then(q))}function A(t){B.push(t)}let M=!1;const G=new Set;function q(){if(!M){M=!0;do{for(let t=0;t<C.length;t+=1){const e=C[t];O(e),F(e.$$)}for(O(null),C.length=0;P.length;)P.pop()();for(let t=0;t<B.length;t+=1){const e=B[t];G.has(e)||(G.add(e),e())}B.length=0}while(C.length);for(;S.length;)S.pop()();D=!1,M=!1,G.clear()}}function F(t){if(null!==t.fragment){t.update(),v(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(A)}}const Y=new Set;let W;function R(){W={r:0,c:[],p:W}}function z(){W.r||v(W.c),W=W.p}function K(t,e){t&&t.i&&(Y.delete(t),t.i(e))}function H(t,e,n,o){if(t&&t.o){if(Y.has(t))return;Y.add(t),W&&W.c.push((()=>{Y.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const J="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function L(t){t&&t.c()}function Q(t,e,n,o){const{fragment:r,on_mount:s,on_destroy:l,after_update:a}=t.$$;r&&r.m(e,n),o||A((()=>{const e=s.map(p).filter($);l?l.push(...e):v(e),t.$$.on_mount=[]})),a.forEach(A)}function U(t,e){const n=t.$$;null!==n.fragment&&(v(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function V(t,e,n,o,r,s,l=[-1]){const a=_;O(t);const i=t.$$={fragment:null,ctx:null,props:s,update:m,not_equal:r,bound:b(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:e.context||[]),callbacks:b(),dirty:l,skip_bound:!1};let c=!1;if(i.ctx=n?n(t,e.props||{},((e,n,...o)=>{const s=o.length?o[0]:n;return i.ctx&&r(i.ctx[e],i.ctx[e]=s)&&(!i.skip_bound&&i.bound[e]&&i.bound[e](s),c&&function(t,e){-1===t.$$.dirty[0]&&(C.push(t),N(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],i.update(),c=!0,v(i.before_update),i.fragment=!!o&&o(i.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);i.fragment&&i.fragment.l(t),t.forEach(h)}else i.fragment&&i.fragment.c();e.intro&&K(t.$$.fragment),Q(t,e.target,e.anchor,e.customElement),q()}O(a)}class X{$destroy(){U(this,1),this.$destroy=m}$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)}}function Z(t){return{c:m,m:m,p:m,i:m,o:m,d:m}}function tt(t){let e,n,o,s,l,a,i,c,u,d,f,m,p,b,v,$,y,_,O,j,C,P,B,S,T,D,N,A,M,G=t[19].identity.description+"",q=t[19].identity.domain+"",F=t[19].identity.circle+"";return D=new t[4]({props:{class:"divider"}}),A=new r({props:{schema:t[19],recID:t[1],prevEventID:t[2],taskId:t[0],prev:t[3],readonly:t[5].task?.readonly,root:"true"}}),A.$on("back",t[7]),{c(){e=w("div"),n=w("table"),o=w("tr"),s=w("td"),s.textContent="Beschreibung:",l=I(),a=w("td"),i=x(G),c=I(),u=w("tr"),d=w("td"),d.textContent="Domain:",f=I(),m=w("td"),p=x(q),b=I(),v=w("tr"),$=w("td"),$.textContent="Circle:",y=I(),_=w("td"),O=x(F),j=I(),C=w("tr"),P=w("td"),P.textContent="Status:",B=I(),S=w("td"),S.textContent=`${t[5].status}`,T=I(),L(D.$$.fragment),N=I(),L(A.$$.fragment),E(s,"class","svelte-131kw75"),E(a,"class","svelte-131kw75"),E(o,"class","svelte-131kw75"),E(d,"class","svelte-131kw75"),E(m,"class","svelte-131kw75"),E(u,"class","svelte-131kw75"),E($,"class","svelte-131kw75"),E(_,"class","svelte-131kw75"),E(v,"class","svelte-131kw75"),E(P,"class","svelte-131kw75"),E(S,"class","svelte-131kw75"),E(C,"class","svelte-131kw75"),E(e,"class","subcat svelte-131kw75")},m(t,r){k(t,e,r),g(e,n),g(n,o),g(o,s),g(o,l),g(o,a),g(a,i),g(n,c),g(n,u),g(u,d),g(u,f),g(u,m),g(m,p),g(n,b),g(n,v),g(v,$),g(v,y),g(v,_),g(_,O),g(n,j),g(n,C),g(C,P),g(C,B),g(C,S),k(t,T,r),Q(D,t,r),k(t,N,r),Q(A,t,r),M=!0},p(t,e){const n={};2&e&&(n.recID=t[1]),4&e&&(n.prevEventID=t[2]),1&e&&(n.taskId=t[0]),8&e&&(n.prev=t[3]),A.$set(n)},i(t){M||(K(D.$$.fragment,t),K(A.$$.fragment,t),M=!0)},o(t){H(D.$$.fragment,t),H(A.$$.fragment,t),M=!1},d(t){t&&h(e),t&&h(T),U(D,t),t&&h(N),U(A,t)}}}function et(t){return{c:m,m:m,p:m,i:m,o:m,d:m}}function nt(t){let e,n,o={ctx:t,current:null,token:null,hasCatch:!1,pending:et,then:tt,catch:Z,value:19,blocks:[,,,]};return function(t,e){const n=e.token={};function o(t,o,r,s){if(e.token!==n)return;e.resolved=s;let l=e.ctx;void 0!==r&&(l=l.slice(),l[r]=s);const a=t&&(e.current=t)(l);let i=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(R(),H(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),z())})):e.block.d(1),a.c(),K(a,1),a.m(e.mount(),e.anchor),i=!0),e.block=a,e.blocks&&(e.blocks[o]=a),i&&q()}if((r=t)&&"object"==typeof r&&"function"==typeof r.then){const n=j();if(t.then((t=>{O(n),o(e.then,1,e.value,t),O(null)}),(t=>{if(O(n),o(e.catch,2,e.error,t),O(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}(t[6],o),{c(){e=x(""),o.block.c()},m(t,r){k(t,e,r),o.block.m(t,o.anchor=r),o.mount=()=>e.parentNode,o.anchor=e,n=!0},p(e,[n]){!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)}(o,t=e,n)},i(t){n||(K(o.block),n=!0)},o(t){for(let t=0;t<3;t+=1){H(o.blocks[t])}n=!1},d(t){t&&h(e),o.block.d(t),o.token=null,o=null}}}function ot(t,o,r){const{Card:s,Table:l,Button:a,Modal:i,Tabs:c,Divider:u,FormField:d,TextField:f}=e;let{task:m}=o,{taskId:p}=o,{eventItem:b}=o,{followerEventId:v}=o;const $=m,y=b,g=n.getSchema(v||y._id);let k,h,w=$.docId||$.id;v&&(h=w,w=void 0,k=y._id);return t.$$set=t=>{"task"in t&&r(8,m=t.task),"taskId"in t&&r(0,p=t.taskId),"eventItem"in t&&r(9,b=t.eventItem),"followerEventId"in t&&r(10,v=t.followerEventId)},[p,w,k,h,u,$,g,()=>window.singleSpaNavigate("/"),m,b,v]}class rt extends X{constructor(t){var e;super(),document.getElementById("svelte-131kw75-style")||((e=w("style")).id="svelte-131kw75-style",e.textContent=".subcat.svelte-131kw75.svelte-131kw75{margin-bottom:0.5em}.subcat.svelte-131kw75 table td.svelte-131kw75{padding-bottom:0.5em}.subcat.svelte-131kw75 table tr.svelte-131kw75{vertical-align:top}.task_divider{background:#326173;color:#326173}tr.svelte-131kw75>td.svelte-131kw75{padding:0}",g(document.head,e)),V(this,t,ot,nt,y,{task:8,taskId:0,eventItem:9,followerEventId:10})}}const{document:st}=J;function lt(t){let e,n,o,r,s,l,a,i,c=t[7](!!t[26]||t[0]===t[20])+"";n=new t[3]({props:{name:"menu",items:t[23],value:t[24].name,class:"task--tabs",tabClass:"menuTab"}}),n.$on("change",(function(){$(t[6](t[28],t[21],t[20],t[26]))&&t[6](t[28],t[21],t[20],t[26]).apply(this,arguments)}));var u=t[24].component;function d(t){return{props:{taskId:t[21],task:t[27],eventItem:t[25],followerEventId:t[26]}}}return u&&(a=new u(d(t)),a.$on("back",t[8])),{c(){e=w("div"),L(n.$$.fragment),o=I(),r=x(c),s=I(),l=w("div"),a&&L(a.$$.fragment),E(e,"class","task--header svelte-lsbd36"),E(l,"class","task--content svelte-lsbd36")},m(t,c){k(t,e,c),Q(n,e,null),g(e,o),g(e,r),k(t,s,c),k(t,l,c),a&&Q(a,l,null),i=!0},p(e,o){t=e;const s={};8388608&o&&(s.items=t[23]),16777216&o&&(s.value=t[24].name),n.$set(s),(!i||68157441&o)&&c!==(c=t[7](!!t[26]||t[0]===t[20])+"")&&function(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}(r,c);const f={};if(2097152&o&&(f.taskId=t[21]),134217728&o&&(f.task=t[27]),33554432&o&&(f.eventItem=t[25]),67108864&o&&(f.followerEventId=t[26]),u!==(u=t[24].component)){if(a){R();const t=a;H(t.$$.fragment,1,0,(()=>{U(t,1)})),z()}u?(a=new u(d(t)),a.$on("back",t[8]),L(a.$$.fragment),K(a.$$.fragment,1),Q(a,l,null)):a=null}else u&&a.$set(f)},i(t){i||(K(n.$$.fragment,t),a&&K(a.$$.fragment,t),i=!0)},o(t){H(n.$$.fragment,t),a&&H(a.$$.fragment,t),i=!1},d(t){t&&h(e),U(n),t&&h(s),t&&h(l),a&&U(a)}}}function at(t){let e,n,o;return n=new t[2]({props:{constrainWidth:!0,title:t[19],titleClass:"task_title",closeCallback:t[9],class:"task--area",$$slots:{default:[lt]},$$scope:{ctx:t}}}),{c(){e=w("div"),L(n.$$.fragment),E(e,"class","task svelte-lsbd36")},m(t,r){k(t,e,r),Q(n,e,null),o=!0},p(t,e){const o={};524288&e&&(o.title=t[19]),1605369857&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(K(n.$$.fragment,t),o=!0)},o(t){H(n.$$.fragment,t),o=!1},d(t){t&&h(e),U(n)}}}function it(t){let e,n,o;return n=new t[1]({props:{open:"true",noClickaway:"true",class:"task--modal",$$slots:{default:[at,({closeCallback:t})=>({29:t}),({closeCallback:t})=>t?536870912:0]},$$scope:{ctx:t}}}),n.$on("change",t[5]),{c(){e=w("div"),L(n.$$.fragment),E(e,"class","task--page svelte-lsbd36")},m(t,r){k(t,e,r),Q(n,e,null),o=!0},p(t,e){const o={};1605894145&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(K(n.$$.fragment,t),o=!0)},o(t){H(n.$$.fragment,t),o=!1},d(t){t&&h(e),U(n)}}}function ct(t){let e,n,r;return n=new o({props:{update:t[4],$$slots:{default:[it,({prop:{title:t,eventId:e,taskId:n,tabId:o,items:r,item:s,eventItem:l,followerEventId:a,task:i,findMenu:c}})=>({19:t,20:e,21:n,22:o,23:r,24:s,25:l,26:a,27:i,28:c}),({prop:t})=>(t?524288:0)|(t?1048576:0)|(t?2097152:0)|(t?4194304:0)|(t?8388608:0)|(t?16777216:0)|(t?33554432:0)|(t?67108864:0)|(t?134217728:0)|(t?268435456:0)]},$$scope:{ctx:t}}}),{c(){e=I(),L(n.$$.fragment),st.title="enablerr - Task"},m(t,o){k(t,e,o),Q(n,t,o),r=!0},p(t,[e]){const o={};1605894145&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){r||(K(n.$$.fragment,t),r=!0)},o(t){H(n.$$.fragment,t),r=!1},d(t){t&&h(e),U(n,t)}}}function ut(t,o,r){const{Modal:i,Dialog:c,Tabs:u}=e;let d,f,m,p,b,v;const $={items:[{id:"task",name:"Aufgabe",component:rt},{id:"collab",name:"Kommunikation",component:a},{id:"workflow",name:"Workflow",component:s},{id:"report",name:"Anhänge",component:l}],findBy(t,e){return this.items.find((n=>n[t]===e))},findByName(t){return this.findBy("name",t)},findById(t){return this.findBy("id",t)},deflt(){return this.items[0]},map(){return this.items.map((t=>t.name))}},y=()=>{scrollY=window.scrollY,p=document.body.style.position,b=document.body.style.overflow,v=document.body.style.width,document.body.style.position="fixed",document.body.style.top=`-${scrollY}px`,document.body.style.overflow="hidden",document.body.style.width="100%"};y();const g=(t,e,n)=>window.singleSpaNavigate(`/task/${t}/${e}/${n.id}`);!function(t){j().$$.on_destroy.push(t)}((()=>{document.body.style.position="inherit",document.body.style.overflow="auto",document.title="enablerr - Dashboard"}));return[m,i,c,u,async(t,e,o,s)=>{const l=$.findById(o);if(!l)return g(t,e,$.deflt());"task"!==o&&(s=void 0),r(0,m=e);let a={status:"Neu"};const i=await n.getEvent(t);let c=i.identity.designation;return s&&(c+=" => "+(await n.getEvent(s)).identity.designation),e!==t?d===e?a=f:(d=e,f=a=await n.getTaskById(e)):e=void 0,{title:c,eventId:t,taskId:e,tabId:o,item:l,eventItem:i,followerEventId:s,task:a,items:$.map(),findMenu:t=>$.findByName(t)}},function(t){t.detail.value?y():(document.body.style.position=p||"",document.body.style.top="",document.body.style.overflow=b||"",document.body.style.width=v||"",window.scrollTo(0,scrollY))},(t,e,n,o)=>({detail:{value:r}})=>{o||g(n,e,t(r))},t=>((N(),T).then((()=>{Array.from(document.getElementsByClassName("menuTab")).map(((e,n)=>{n&&(e.querySelector("input").disabled=t)}))})),""),function(e){!function(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t(e)))}(t,e)},()=>window.singleSpaNavigate("/")]}class dt extends X{constructor(t){var e;super(),st.getElementById("svelte-lsbd36-style")||((e=w("style")).id="svelte-lsbd36-style",e.textContent='.task--page.svelte-lsbd36 .task--modal{align-items:flex-start !important;overflow:auto !important}.task.svelte-lsbd36{margin-top:6em}@media(max-height: 900px){.task.svelte-lsbd36{margin-top:0}}.task.svelte-lsbd36 .task--area{overflow-x:hidden;overflow-y:auto;min-width:50vw}.task.svelte-lsbd36 .dialog nav[role="group"]{display:flex;justify-content:flex-start;flex-direction:row;flex-wrap:nowrap;gap:1em}.task--header.svelte-lsbd36{margin-top:0.5em}.task--header.svelte-lsbd36 .task_tabs{margin-bottom:1em}.task--content.svelte-lsbd36{margin-top:1em;overflow-x:hidden;overflow-y:auto;height:fit-content;min-height:60vh}',g(st.head,e)),V(this,t,ut,ct,y,{})}}const ft=f({component:dt,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:mt,mount:pt,unmount:bt}=ft;t({bootstrap:mt,mount:pt,unmount:bt});t("Task",dt)}}}));
|
|
1
|
+
System.register(["@enablerr-ui/layout","@enablerr-ui/form","@enablerr-ui/detail","@enablerr-ui/workflow","@enablerr-ui/report","@enablerr-ui/collab"],(function(t){"use strict";var e,n,o,r,s,l,i,a;return{setters:[function(t){e=t.getAttractions},function(t){n=t.Request,o=t.settings,r=t.Page},function(t){s=t.Form},function(t){l=t.Workflow},function(t){i=t.Report},function(t){a=t.Collaboration}],execute:function(){t("version","0.2.58");function c(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var u,d,m=(u=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 s(t){return s="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},s(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("object"!==s(t))throw new Error("single-spa-svelte requires a configuration object");var e=o(o({},l),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:a.bind(null,e,n),unmount:c.bind(null,e,n),update:u.bind(null,e,n)}};var l={component:null,domElementGetter:null,props:{}};function i(t){return Promise.resolve()}function a(t,e,n){var r=Object.keys(l),s=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),l=r();e.instance=new t.component(o(o({},s),{},{target:l,props:Object.assign({},n,t.props)}))}))}function c(t,e){return Promise.resolve().then((function(){e.instance.$destroy?e.instance.$destroy():e.instance.destroy()}))}function u(t,e,n){return Promise.resolve().then((function(){e.instance.$set?e.instance.$set(n):e.instance.set(n)}))}},u(d={exports:{}},d.exports),d.exports),f=c(m);function p(){}function $(t){return t()}function v(){return Object.create(null)}function g(t){t.forEach($)}function b(t){return"function"==typeof t}function y(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function h(t,e,n){t.$$.on_destroy.push(function(t,...e){if(null==t)return p;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}(e,n))}function k(t,e){t.appendChild(e)}function w(t,e,n){t.insertBefore(e,n||null)}function x(t){t.parentNode.removeChild(t)}function I(t){return document.createElement(t)}function E(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function C(t){return document.createTextNode(t)}function _(){return C(" ")}function O(){return C("")}function j(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function S(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}let P;function B(t){P=t}function T(){if(!P)throw new Error("Function called outside component initialization");return P}const D=[],N=[],M=[],A=[],z=Promise.resolve();let F=!1;function W(){F||(F=!0,z.then(Y))}function q(t){M.push(t)}let G=!1;const V=new Set;function Y(){if(!G){G=!0;do{for(let t=0;t<D.length;t+=1){const e=D[t];B(e),R(e.$$)}for(B(null),D.length=0;N.length;)N.pop()();for(let t=0;t<M.length;t+=1){const e=M[t];V.has(e)||(V.add(e),e())}M.length=0}while(D.length);for(;A.length;)A.pop()();F=!1,G=!1,V.clear()}}function R(t){if(null!==t.fragment){t.update(),g(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(q)}}const J=new Set;let L;function K(){L={r:0,c:[],p:L}}function H(){L.r||g(L.c),L=L.p}function Q(t,e){t&&t.i&&(J.delete(t),t.i(e))}function U(t,e,n,o){if(t&&t.o){if(J.has(t))return;J.add(t),L&&L.c.push((()=>{J.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const X="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function Z(t){t&&t.c()}function tt(t,e,n,o){const{fragment:r,on_mount:s,on_destroy:l,after_update:i}=t.$$;r&&r.m(e,n),o||q((()=>{const e=s.map($).filter(b);l?l.push(...e):g(e),t.$$.on_mount=[]})),i.forEach(q)}function et(t,e){const n=t.$$;null!==n.fragment&&(g(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function nt(t,e,n,o,r,s,l=[-1]){const i=P;B(t);const a=t.$$={fragment:null,ctx:null,props:s,update:p,not_equal:r,bound:v(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(i?i.$$.context:e.context||[]),callbacks:v(),dirty:l,skip_bound:!1};let c=!1;if(a.ctx=n?n(t,e.props||{},((e,n,...o)=>{const s=o.length?o[0]:n;return a.ctx&&r(a.ctx[e],a.ctx[e]=s)&&(!a.skip_bound&&a.bound[e]&&a.bound[e](s),c&&function(t,e){-1===t.$$.dirty[0]&&(D.push(t),W(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],a.update(),c=!0,g(a.before_update),a.fragment=!!o&&o(a.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);a.fragment&&a.fragment.l(t),t.forEach(x)}else a.fragment&&a.fragment.c();e.intro&&Q(t.$$.fragment),tt(t,e.target,e.anchor,e.customElement),Y()}B(i)}class ot{$destroy(){et(this,1),this.$destroy=p}$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)}}function rt(t){return{c:p,m:p,p:p,i:p,o:p,d:p}}function st(t){let e,n,o,r,l,i,a,c,u,d,m,f,p,$,v,g,b,y,h,E,O,S,P,B,T,D,N,M,A,z=t[20].identity.description+"",F=t[20].identity.domain+"",W=t[20].identity.circle+"";return D=new t[4]({props:{class:"divider"}}),M=new s({props:{schema:t[20],recID:t[1],prevEventID:t[2],taskId:t[0],prev:t[3],readonly:t[7],root:"true"}}),M.$on("back",t[8]),{c(){e=I("div"),n=I("table"),o=I("tr"),r=I("td"),r.textContent="Beschreibung:",l=_(),i=I("td"),a=C(z),c=_(),u=I("tr"),d=I("td"),d.textContent="Domain:",m=_(),f=I("td"),p=C(F),$=_(),v=I("tr"),g=I("td"),g.textContent="Circle:",b=_(),y=I("td"),h=C(W),E=_(),O=I("tr"),S=I("td"),S.textContent="Status:",P=_(),B=I("td"),B.textContent=`${t[5].status}`,T=_(),Z(D.$$.fragment),N=_(),Z(M.$$.fragment),j(r,"class","svelte-131kw75"),j(i,"class","svelte-131kw75"),j(o,"class","svelte-131kw75"),j(d,"class","svelte-131kw75"),j(f,"class","svelte-131kw75"),j(u,"class","svelte-131kw75"),j(g,"class","svelte-131kw75"),j(y,"class","svelte-131kw75"),j(v,"class","svelte-131kw75"),j(S,"class","svelte-131kw75"),j(B,"class","svelte-131kw75"),j(O,"class","svelte-131kw75"),j(e,"class","subcat svelte-131kw75")},m(t,s){w(t,e,s),k(e,n),k(n,o),k(o,r),k(o,l),k(o,i),k(i,a),k(n,c),k(n,u),k(u,d),k(u,m),k(u,f),k(f,p),k(n,$),k(n,v),k(v,g),k(v,b),k(v,y),k(y,h),k(n,E),k(n,O),k(O,S),k(O,P),k(O,B),w(t,T,s),tt(D,t,s),w(t,N,s),tt(M,t,s),A=!0},p(t,e){const n={};2&e&&(n.recID=t[1]),4&e&&(n.prevEventID=t[2]),1&e&&(n.taskId=t[0]),8&e&&(n.prev=t[3]),M.$set(n)},i(t){A||(Q(D.$$.fragment,t),Q(M.$$.fragment,t),A=!0)},o(t){U(D.$$.fragment,t),U(M.$$.fragment,t),A=!1},d(t){t&&x(e),t&&x(T),et(D,t),t&&x(N),et(M,t)}}}function lt(t){return{c:p,m:p,p:p,i:p,o:p,d:p}}function it(t){let e,n,o={ctx:t,current:null,token:null,hasCatch:!1,pending:lt,then:st,catch:rt,value:20,blocks:[,,,]};return function(t,e){const n=e.token={};function o(t,o,r,s){if(e.token!==n)return;e.resolved=s;let l=e.ctx;void 0!==r&&(l=l.slice(),l[r]=s);const i=t&&(e.current=t)(l);let a=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(K(),U(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),H())})):e.block.d(1),i.c(),Q(i,1),i.m(e.mount(),e.anchor),a=!0),e.block=i,e.blocks&&(e.blocks[o]=i),a&&Y()}if((r=t)&&"object"==typeof r&&"function"==typeof r.then){const n=T();if(t.then((t=>{B(n),o(e.then,1,e.value,t),B(null)}),(t=>{if(B(n),o(e.catch,2,e.error,t),B(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}(t[6],o),{c(){e=O(),o.block.c()},m(t,r){w(t,e,r),o.block.m(t,o.anchor=r),o.mount=()=>e.parentNode,o.anchor=e,n=!0},p(e,[n]){!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)}(o,t=e,n)},i(t){n||(Q(o.block),n=!0)},o(t){for(let t=0;t<3;t+=1){U(o.blocks[t])}n=!1},d(t){t&&x(e),o.block.d(t),o.token=null,o=null}}}function at(t,o,r){const{Card:s,Table:l,Button:i,Modal:a,Tabs:c,Divider:u,FormField:d,TextField:m}=e;let{task:f}=o,{taskId:p}=o,{eventItem:$}=o,{followerEventId:v}=o;const g=f,b=$,y=n.getSchema(v||b._id),h=!v&&g.task?.readonly;let k,w,x=g.docId||g.id;v&&(w=x,x=void 0,k=b._id);return t.$$set=t=>{"task"in t&&r(9,f=t.task),"taskId"in t&&r(0,p=t.taskId),"eventItem"in t&&r(10,$=t.eventItem),"followerEventId"in t&&r(11,v=t.followerEventId)},[p,x,k,w,u,g,y,h,()=>window.singleSpaNavigate("/"),f,$,v]}class ct extends ot{constructor(t){var e;super(),document.getElementById("svelte-131kw75-style")||((e=I("style")).id="svelte-131kw75-style",e.textContent=".subcat.svelte-131kw75.svelte-131kw75{margin-bottom:0.5em}.subcat.svelte-131kw75 table td.svelte-131kw75{padding-bottom:0.5em}.subcat.svelte-131kw75 table tr.svelte-131kw75{vertical-align:top}.task_divider{background:#326173;color:#326173}tr.svelte-131kw75>td.svelte-131kw75{padding:0}",k(document.head,e)),nt(this,t,at,it,y,{task:9,taskId:0,eventItem:10,followerEventId:11})}}function ut(t){let e,n,o,r,s;return{c(){e=E("svg"),n=E("path"),o=E("line"),r=E("line"),j(n,"d","M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"),j(o,"x1","12"),j(o,"y1","9"),j(o,"x2","12"),j(o,"y2","13"),j(r,"x1","12"),j(r,"y1","17"),j(r,"x2","12.01"),j(r,"y2","17"),j(e,"xmlns","http://www.w3.org/2000/svg"),j(e,"width",t[0]),j(e,"height",t[0]),j(e,"fill","none"),j(e,"viewBox","0 0 24 24"),j(e,"stroke","currentColor"),j(e,"stroke-width",t[1]),j(e,"stroke-linecap","round"),j(e,"stroke-linejoin","round"),j(e,"class",s="feather feather-alert-triangle "+t[2])},m(t,s){w(t,e,s),k(e,n),k(e,o),k(e,r)},p(t,[n]){1&n&&j(e,"width",t[0]),1&n&&j(e,"height",t[0]),2&n&&j(e,"stroke-width",t[1]),4&n&&s!==(s="feather feather-alert-triangle "+t[2])&&j(e,"class",s)},i:p,o:p,d(t){t&&x(e)}}}function dt(t,e,n){let{size:o="100%"}=e,{strokeWidth:r=2}=e,{class:s=""}=e;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),t.$$set=t=>{"size"in t&&n(0,o=t.size),"strokeWidth"in t&&n(1,r=t.strokeWidth),"class"in t&&n(2,s=t.class)},[o,r,s]}class mt extends ot{constructor(t){super(),nt(this,t,dt,ut,y,{size:0,strokeWidth:1,class:2})}}function ft(t){let e,n;return e=new t[9]({props:{readonly:!0,value:t[4]}}),{c(){Z(e.$$.fragment)},m(t,o){tt(e,t,o),n=!0},p(t,n){const o={};16&n&&(o.value=t[4]),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){U(e.$$.fragment,t),n=!1},d(t){et(e,t)}}}function pt(t){let e,n,o;return e=new t[10]({props:{noCalendar:!0,readonly:!0,value:t[3]}}),n=new t[11]({props:{readonly:!0,value:t[3]}}),{c(){Z(e.$$.fragment),Z(n.$$.fragment)},m(t,r){tt(e,t,r),tt(n,t,r),o=!0},p(t,o){const r={};8&o&&(r.value=t[3]),e.$set(r);const s={};8&o&&(s.value=t[3]),n.$set(s)},i(t){o||(Q(e.$$.fragment,t),Q(n.$$.fragment,t),o=!0)},o(t){U(e.$$.fragment,t),U(n.$$.fragment,t),o=!1},d(t){et(e,t),et(n,t)}}}function $t(t){let e,n,o=t[0].visum&&pt(t);return{c(){o&&o.c(),e=O()},m(t,r){o&&o.m(t,r),w(t,e,r),n=!0},p(t,n){t[0].visum?o?(o.p(t,n),1&n&&Q(o,1)):(o=pt(t),o.c(),Q(o,1),o.m(e.parentNode,e)):o&&(K(),U(o,1,1,(()=>{o=null})),H())},i(t){n||(Q(o),n=!0)},o(t){U(o),n=!1},d(t){o&&o.d(t),t&&x(e)}}}function vt(t){let e;return{c(){e=C(t[5])},m(t,n){w(t,e,n)},p(t,n){32&n&&S(e,t[5])},d(t){t&&x(e)}}}function gt(t){let e;return{c(){e=C("Ja, bitte visieren")},m(t,n){w(t,e,n)},d(t){t&&x(e)}}}function bt(t){let e,n,o,r;return o=new t[12]({props:{danger:!0,outline:!0,$$slots:{default:[gt]},$$scope:{ctx:t}}}),o.$on("click",t[14]),{c(){e=I("p"),e.textContent="Wollen Sie die Aufgabe visieren?",n=_(),Z(o.$$.fragment)},m(t,s){w(t,e,s),w(t,n,s),tt(o,t,s),r=!0},p(t,e){const n={};1048576&e&&(n.$$scope={dirty:e,ctx:t}),o.$set(n)},i(t){r||(Q(o.$$.fragment,t),r=!0)},o(t){U(o.$$.fragment,t),r=!1},d(t){t&&x(e),t&&x(n),et(o,t)}}}function yt(t){let e,n,o;return n=new mt({props:{size:"25"}}),{c(){e=I("div"),Z(n.$$.fragment),j(e,"slot","title-icon")},m(t,r){w(t,e,r),tt(n,e,null),o=!0},p:p,i(t){o||(Q(n.$$.fragment,t),o=!0)},o(t){U(n.$$.fragment,t),o=!1},d(t){t&&x(e),et(n)}}}function ht(t){let e,n;return e=new t[7]({props:{title:"Bestätigung",closeCallback:t[19],danger:!0,$$slots:{"title-icon":[yt],default:[bt]},$$scope:{ctx:t}}}),{c(){Z(e.$$.fragment)},m(t,o){tt(e,t,o),n=!0},p(t,n){const o={};524288&n&&(o.closeCallback=t[19]),1048576&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){U(e.$$.fragment,t),n=!1},d(t){et(e,t)}}}function kt(t){let e,n,o,r,s,l,i,a,c,u,d,m;function f(e){t[18](e)}r=new t[8]({props:{name:"visiert von",$$slots:{default:[ft]},$$scope:{ctx:t}}}),l=new t[8]({props:{name:"visiert am",$$slots:{default:[$t]},$$scope:{ctx:t}}}),a=new t[12]({props:{filled:!0,disabled:t[1],$$slots:{default:[vt]},$$scope:{ctx:t}}}),a.$on("click",t[13]);let p={$$slots:{default:[ht,({closeCallback:t})=>({19:t}),({closeCallback:t})=>t?524288:0]},$$scope:{ctx:t}};return void 0!==t[2]&&(p.open=t[2]),u=new t[6]({props:p}),N.push((()=>function(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}(u,"open",f))),{c(){e=I("h3"),e.textContent="Visum erstellen",n=_(),o=I("div"),Z(r.$$.fragment),s=_(),Z(l.$$.fragment),i=_(),Z(a.$$.fragment),c=_(),Z(u.$$.fragment),j(o,"class","visum")},m(t,d){w(t,e,d),w(t,n,d),w(t,o,d),tt(r,o,null),k(o,s),tt(l,o,null),k(o,i),tt(a,o,null),w(t,c,d),tt(u,t,d),m=!0},p(t,[e]){const n={};1048592&e&&(n.$$scope={dirty:e,ctx:t}),r.$set(n);const o={};1048585&e&&(o.$$scope={dirty:e,ctx:t}),l.$set(o);const s={};2&e&&(s.disabled=t[1]),1048608&e&&(s.$$scope={dirty:e,ctx:t}),a.$set(s);const i={};1572864&e&&(i.$$scope={dirty:e,ctx:t}),!d&&4&e&&(d=!0,i.open=t[2],function(t){A.push(t)}((()=>d=!1))),u.$set(i)},i(t){m||(Q(r.$$.fragment,t),Q(l.$$.fragment,t),Q(a.$$.fragment,t),Q(u.$$.fragment,t),m=!0)},o(t){U(r.$$.fragment,t),U(l.$$.fragment,t),U(a.$$.fragment,t),U(u.$$.fragment,t),m=!1},d(t){t&&x(e),t&&x(n),t&&x(o),et(r),et(l),et(a),t&&x(c),et(u,t)}}}function wt(t,r,s){let l;h(t,o,(t=>s(17,l=t)));const{Modal:i,Dialog:a,FormField:c,TextField:u,DatePicker:d,TimePicker:m,Button:f}=e;let p,$,v,g,{task:b}=r,{taskId:y}=r,{eventItem:k}=r,w=!1;return t.$$set=t=>{"task"in t&&s(0,b=t.task),"taskId"in t&&s(15,y=t.taskId),"eventItem"in t&&s(16,k=t.eventItem)},t.$$.update=()=>{if(196611&t.$$.dirty&&(s(3,$=new Date(b.visum?.timeStamp)),s(4,v=b.visum?.user||(p?"":l.email)),s(5,g=b.visum?"Visum erfolgleich erstellt":"Jetzt visieren"),k.output?.approval?.length&&l.role?.length)){const t=k.output.approval.flatMap((({refRole:t})=>t));s(1,p=!!b.visum||!t.some((t=>l.role.some((e=>t===e)))))}},[b,p,w,$,v,g,i,a,c,u,d,m,f,()=>{s(2,w=!0)},()=>{s(2,w=!1);const t={user:l.email,timeStamp:(new Date).toISOString()};n.setTaskVisum(b._id,t),s(0,b.visum=t,b)},y,k,l,function(t){w=t,s(2,w)}]}class xt extends ot{constructor(t){var e;super(),document.getElementById("svelte-b9m9m8-style")||((e=I("style")).id="svelte-b9m9m8-style",e.textContent=".visum .time-picker .dropdown{display:none !important}",k(document.head,e)),nt(this,t,wt,kt,y,{task:0,taskId:15,eventItem:16})}}const{document:It}=X;function Et(t){let e,n,o,r,s,l,i,a,c=t[7](t[25],!!t[26]||t[0]===t[20])+"";n=new t[3]({props:{name:"menu",items:t[23],value:t[24].name,class:"task--tabs",tabClass:"menuTab"}}),n.$on("change",(function(){b(t[6](t[28],t[21],t[20],t[26]))&&t[6](t[28],t[21],t[20],t[26]).apply(this,arguments)}));var u=t[24].component;function d(t){return{props:{taskId:t[21],task:t[27],eventItem:t[25],followerEventId:t[26]}}}return u&&(i=new u(d(t)),i.$on("back",t[8])),{c(){e=I("div"),Z(n.$$.fragment),o=_(),r=C(c),s=_(),l=I("div"),i&&Z(i.$$.fragment),j(e,"class","task--header svelte-lsbd36"),j(l,"class","task--content svelte-lsbd36")},m(t,c){w(t,e,c),tt(n,e,null),k(e,o),k(e,r),w(t,s,c),w(t,l,c),i&&tt(i,l,null),a=!0},p(e,o){t=e;const s={};8388608&o&&(s.items=t[23]),16777216&o&&(s.value=t[24].name),n.$set(s),(!a||101711873&o)&&c!==(c=t[7](t[25],!!t[26]||t[0]===t[20])+"")&&S(r,c);const m={};if(2097152&o&&(m.taskId=t[21]),134217728&o&&(m.task=t[27]),33554432&o&&(m.eventItem=t[25]),67108864&o&&(m.followerEventId=t[26]),u!==(u=t[24].component)){if(i){K();const t=i;U(t.$$.fragment,1,0,(()=>{et(t,1)})),H()}u?(i=new u(d(t)),i.$on("back",t[8]),Z(i.$$.fragment),Q(i.$$.fragment,1),tt(i,l,null)):i=null}else u&&i.$set(m)},i(t){a||(Q(n.$$.fragment,t),i&&Q(i.$$.fragment,t),a=!0)},o(t){U(n.$$.fragment,t),i&&U(i.$$.fragment,t),a=!1},d(t){t&&x(e),et(n),t&&x(s),t&&x(l),i&&et(i)}}}function Ct(t){let e,n,o;return n=new t[2]({props:{constrainWidth:!0,title:t[19],titleClass:"task_title",closeCallback:t[9],class:"task--area",$$slots:{default:[Et]},$$scope:{ctx:t}}}),{c(){e=I("div"),Z(n.$$.fragment),j(e,"class","task svelte-lsbd36")},m(t,r){w(t,e,r),tt(n,e,null),o=!0},p(t,e){const o={};524288&e&&(o.title=t[19]),1605369857&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(Q(n.$$.fragment,t),o=!0)},o(t){U(n.$$.fragment,t),o=!1},d(t){t&&x(e),et(n)}}}function _t(t){let e,n,o;return n=new t[1]({props:{open:"true",noClickaway:"true",class:"task--modal",$$slots:{default:[Ct,({closeCallback:t})=>({29:t}),({closeCallback:t})=>t?536870912:0]},$$scope:{ctx:t}}}),n.$on("change",t[5]),{c(){e=I("div"),Z(n.$$.fragment),j(e,"class","task--page svelte-lsbd36")},m(t,r){w(t,e,r),tt(n,e,null),o=!0},p(t,e){const o={};1605894145&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(Q(n.$$.fragment,t),o=!0)},o(t){U(n.$$.fragment,t),o=!1},d(t){t&&x(e),et(n)}}}function Ot(t){let e,n,o;return n=new r({props:{update:t[4],$$slots:{default:[_t,({prop:{title:t,eventId:e,taskId:n,tabId:o,items:r,item:s,eventItem:l,followerEventId:i,task:a,findMenu:c}})=>({19:t,20:e,21:n,22:o,23:r,24:s,25:l,26:i,27:a,28:c}),({prop:t})=>(t?524288:0)|(t?1048576:0)|(t?2097152:0)|(t?4194304:0)|(t?8388608:0)|(t?16777216:0)|(t?33554432:0)|(t?67108864:0)|(t?134217728:0)|(t?268435456:0)]},$$scope:{ctx:t}}}),{c(){e=_(),Z(n.$$.fragment),It.title="enablerr - Task"},m(t,r){w(t,e,r),tt(n,t,r),o=!0},p(t,[e]){const o={};1605894145&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(Q(n.$$.fragment,t),o=!0)},o(t){U(n.$$.fragment,t),o=!1},d(t){t&&x(e),et(n,t)}}}function jt(t,o,r){const{Modal:s,Dialog:c,Tabs:u}=e;let d,m,f,p,$,v;const g={items:[{id:"task",name:"Aufgabe",component:ct},{id:"visum",name:"Visum",component:xt},{id:"collab",name:"Kommunikation",component:a},{id:"workflow",name:"Workflow",component:l},{id:"report",name:"Anhänge",component:i}],findBy(t,e){return this.items.find((n=>n[t]===e))},findByName(t){return this.findBy("name",t)},findById(t){return this.findBy("id",t)},deflt(){return this.items[0]},map(){return this.items.map((t=>t.name))}},b=()=>{scrollY=window.scrollY,p=document.body.style.position,$=document.body.style.overflow,v=document.body.style.width,document.body.style.position="fixed",document.body.style.top=`-${scrollY}px`,document.body.style.overflow="hidden",document.body.style.width="100%"};b();const y=(t,e,n)=>window.singleSpaNavigate(`/task/${t}/${e}/${n.id}`);!function(t){T().$$.on_destroy.push(t)}((()=>{document.body.style.position="inherit",document.body.style.overflow="auto",document.title="enablerr - Dashboard"}));return[f,s,c,u,async(t,e,o,s)=>{const l=g.findById(o);if(!l)return y(t,e,g.deflt());"task"!==o&&(s=void 0),r(0,f=e);let i={status:"Neu"};const a=await n.getEvent(t);let c=a.identity.designation;return s&&(c+=" => "+(await n.getEvent(s)).identity.designation),e!==t?d===e?i=m:(d=e,m=i=await n.getTaskById(e)):e=void 0,{title:c,eventId:t,taskId:e,tabId:o,item:l,eventItem:a,followerEventId:s,task:i,items:g.map(),findMenu:t=>g.findByName(t)}},function(t){t.detail.value?b():(document.body.style.position=p||"",document.body.style.top="",document.body.style.overflow=$||"",document.body.style.width=v||"",window.scrollTo(0,scrollY))},(t,e,n,o)=>({detail:{value:r}})=>{o||y(n,e,t(r))},(t,e)=>{let n=!t.output?.approval;return(W(),z).then((()=>{Array.from(document.getElementsByClassName("menuTab")).map(((t,o)=>{o&&(t.querySelector("input").disabled=e),1===o&&(t.querySelector("input").disabled=e||n)}))})),""},function(e){!function(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t(e)))}(t,e)},()=>window.singleSpaNavigate("/")]}class St extends ot{constructor(t){var e;super(),It.getElementById("svelte-lsbd36-style")||((e=I("style")).id="svelte-lsbd36-style",e.textContent='.task--page.svelte-lsbd36 .task--modal{align-items:flex-start !important;overflow:auto !important}.task.svelte-lsbd36{margin-top:6em}@media(max-height: 900px){.task.svelte-lsbd36{margin-top:0}}.task.svelte-lsbd36 .task--area{overflow-x:hidden;overflow-y:auto;min-width:50vw}.task.svelte-lsbd36 .dialog nav[role="group"]{display:flex;justify-content:flex-start;flex-direction:row;flex-wrap:nowrap;gap:1em}.task--header.svelte-lsbd36{margin-top:0.5em}.task--header.svelte-lsbd36 .task_tabs{margin-bottom:1em}.task--content.svelte-lsbd36{margin-top:1em;overflow-x:hidden;overflow-y:auto;height:fit-content;min-height:60vh}',k(It.head,e)),nt(this,t,jt,Ot,y,{})}}const Pt=f({component:St,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Bt,mount:Tt,unmount:Dt}=Pt;t({bootstrap:Bt,mount:Tt,unmount:Dt});t("Task",St)}}}));
|