@enablerr-ui/task 0.2.57 → 0.2.59

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 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.57");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[20].identity.description+"",q=t[20].identity.domain+"",F=t[20].identity.circle+"";return D=new t[4]({props:{class:"divider"}}),A=new r({props:{schema:t[20],recID:t[1],prevEventID:t[2],taskId:t[0],prev:t[3],readonly:t[7],root:"true"}}),A.$on("back",t[8]),{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: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 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),k=!v&&$.task?.readonly;let h,w,x=$.docId||$.id;v&&(w=x,x=void 0,h=y._id);return t.$$set=t=>{"task"in t&&r(9,m=t.task),"taskId"in t&&r(0,p=t.taskId),"eventItem"in t&&r(10,b=t.eventItem),"followerEventId"in t&&r(11,v=t.followerEventId)},[p,x,h,w,u,$,g,k,()=>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:9,taskId:0,eventItem:10,followerEventId:11})}}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,c;return{setters:[function(t){e=t.getAttractions},function(t){n=t.Request,o=t.approval_notification,r=t.settings,s=t.Page},function(t){l=t.Form},function(t){i=t.Workflow},function(t){a=t.Report},function(t){c=t.Collaboration}],execute:function(){t("version","0.2.59");function u(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var d,m,f=(d=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)}))}},d(m={exports:{}},m.exports),m.exports),p=u(f);function $(){}function v(t){return t()}function g(){return Object.create(null)}function b(t){t.forEach(v)}function y(t){return"function"==typeof t}function k(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 $;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}(e,n))}function w(t,e){t.appendChild(e)}function x(t,e,n){t.insertBefore(e,n||null)}function I(t){t.parentNode.removeChild(t)}function E(t){return document.createElement(t)}function _(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function C(t){return document.createTextNode(t)}function O(){return C(" ")}function j(){return C("")}function S(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function P(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}let B;function D(t){B=t}function T(){if(!B)throw new Error("Function called outside component initialization");return B}const N=[],M=[],A=[],z=[],F=Promise.resolve();let W=!1;function q(){W||(W=!0,F.then(R))}function G(t){A.push(t)}let V=!1;const Y=new Set;function R(){if(!V){V=!0;do{for(let t=0;t<N.length;t+=1){const e=N[t];D(e),J(e.$$)}for(D(null),N.length=0;M.length;)M.pop()();for(let t=0;t<A.length;t+=1){const e=A[t];Y.has(e)||(Y.add(e),e())}A.length=0}while(N.length);for(;z.length;)z.pop()();W=!1,V=!1,Y.clear()}}function J(t){if(null!==t.fragment){t.update(),b(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(G)}}const L=new Set;let K;function H(){K={r:0,c:[],p:K}}function Q(){K.r||b(K.c),K=K.p}function U(t,e){t&&t.i&&(L.delete(t),t.i(e))}function X(t,e,n,o){if(t&&t.o){if(L.has(t))return;L.add(t),K&&K.c.push((()=>{L.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const Z="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function tt(t){t&&t.c()}function et(t,e,n,o){const{fragment:r,on_mount:s,on_destroy:l,after_update:i}=t.$$;r&&r.m(e,n),o||G((()=>{const e=s.map(v).filter(y);l?l.push(...e):b(e),t.$$.on_mount=[]})),i.forEach(G)}function nt(t,e){const n=t.$$;null!==n.fragment&&(b(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ot(t,e,n,o,r,s,l=[-1]){const i=B;D(t);const a=t.$$={fragment:null,ctx:null,props:s,update:$,not_equal:r,bound:g(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(i?i.$$.context:e.context||[]),callbacks:g(),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]&&(N.push(t),q(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],a.update(),c=!0,b(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(I)}else a.fragment&&a.fragment.c();e.intro&&U(t.$$.fragment),et(t,e.target,e.anchor,e.customElement),R()}D(i)}class rt{$destroy(){nt(this,1),this.$destroy=$}$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 st(t){return{c:$,m:$,p:$,i:$,o:$,d:$}}function lt(t){let e,n,o,r,s,i,a,c,u,d,m,f,p,$,v,g,b,y,k,h,_,j,P,B,D,T,N,M,A,z=t[20].identity.description+"",F=t[20].identity.domain+"",W=t[20].identity.circle+"";return T=new t[4]({props:{class:"divider"}}),M=new l({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=E("div"),n=E("table"),o=E("tr"),r=E("td"),r.textContent="Beschreibung:",s=O(),i=E("td"),a=C(z),c=O(),u=E("tr"),d=E("td"),d.textContent="Domain:",m=O(),f=E("td"),p=C(F),$=O(),v=E("tr"),g=E("td"),g.textContent="Circle:",b=O(),y=E("td"),k=C(W),h=O(),_=E("tr"),j=E("td"),j.textContent="Status:",P=O(),B=E("td"),B.textContent=`${t[5].status}`,D=O(),tt(T.$$.fragment),N=O(),tt(M.$$.fragment),S(r,"class","svelte-131kw75"),S(i,"class","svelte-131kw75"),S(o,"class","svelte-131kw75"),S(d,"class","svelte-131kw75"),S(f,"class","svelte-131kw75"),S(u,"class","svelte-131kw75"),S(g,"class","svelte-131kw75"),S(y,"class","svelte-131kw75"),S(v,"class","svelte-131kw75"),S(j,"class","svelte-131kw75"),S(B,"class","svelte-131kw75"),S(_,"class","svelte-131kw75"),S(e,"class","subcat svelte-131kw75")},m(t,l){x(t,e,l),w(e,n),w(n,o),w(o,r),w(o,s),w(o,i),w(i,a),w(n,c),w(n,u),w(u,d),w(u,m),w(u,f),w(f,p),w(n,$),w(n,v),w(v,g),w(v,b),w(v,y),w(y,k),w(n,h),w(n,_),w(_,j),w(_,P),w(_,B),x(t,D,l),et(T,t,l),x(t,N,l),et(M,t,l),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||(U(T.$$.fragment,t),U(M.$$.fragment,t),A=!0)},o(t){X(T.$$.fragment,t),X(M.$$.fragment,t),A=!1},d(t){t&&I(e),t&&I(D),nt(T,t),t&&I(N),nt(M,t)}}}function it(t){return{c:$,m:$,p:$,i:$,o:$,d:$}}function at(t){let e,n,o={ctx:t,current:null,token:null,hasCatch:!1,pending:it,then:lt,catch:st,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&&(H(),X(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),Q())})):e.block.d(1),i.c(),U(i,1),i.m(e.mount(),e.anchor),a=!0),e.block=i,e.blocks&&(e.blocks[o]=i),a&&R()}if((r=t)&&"object"==typeof r&&"function"==typeof r.then){const n=T();if(t.then((t=>{D(n),o(e.then,1,e.value,t),D(null)}),(t=>{if(D(n),o(e.catch,2,e.error,t),D(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=j(),o.block.c()},m(t,r){x(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||(U(o.block),n=!0)},o(t){for(let t=0;t<3;t+=1){X(o.blocks[t])}n=!1},d(t){t&&I(e),o.block.d(t),o.token=null,o=null}}}function ct(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),k=!v&&g.task?.readonly;let h,w,x=g.docId||g.id;v&&(w=x,x=void 0,h=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,h,w,u,g,y,k,()=>window.singleSpaNavigate("/"),f,$,v]}class ut extends rt{constructor(t){var e;super(),document.getElementById("svelte-131kw75-style")||((e=E("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}",w(document.head,e)),ot(this,t,ct,at,k,{task:9,taskId:0,eventItem:10,followerEventId:11})}}function dt(t){let e,n,o,r,s;return{c(){e=_("svg"),n=_("path"),o=_("line"),r=_("line"),S(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"),S(o,"x1","12"),S(o,"y1","9"),S(o,"x2","12"),S(o,"y2","13"),S(r,"x1","12"),S(r,"y1","17"),S(r,"x2","12.01"),S(r,"y2","17"),S(e,"xmlns","http://www.w3.org/2000/svg"),S(e,"width",t[0]),S(e,"height",t[0]),S(e,"fill","none"),S(e,"viewBox","0 0 24 24"),S(e,"stroke","currentColor"),S(e,"stroke-width",t[1]),S(e,"stroke-linecap","round"),S(e,"stroke-linejoin","round"),S(e,"class",s="feather feather-alert-triangle "+t[2])},m(t,s){x(t,e,s),w(e,n),w(e,o),w(e,r)},p(t,[n]){1&n&&S(e,"width",t[0]),1&n&&S(e,"height",t[0]),2&n&&S(e,"stroke-width",t[1]),4&n&&s!==(s="feather feather-alert-triangle "+t[2])&&S(e,"class",s)},i:$,o:$,d(t){t&&I(e)}}}function mt(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 ft extends rt{constructor(t){super(),ot(this,t,mt,dt,k,{size:0,strokeWidth:1,class:2})}}function pt(t){let e,n;return e=new t[9]({props:{readonly:!0,value:t[4]}}),{c(){tt(e.$$.fragment)},m(t,o){et(e,t,o),n=!0},p(t,n){const o={};16&n&&(o.value=t[4]),e.$set(o)},i(t){n||(U(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){nt(e,t)}}}function $t(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(){tt(e.$$.fragment),tt(n.$$.fragment)},m(t,r){et(e,t,r),et(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||(U(e.$$.fragment,t),U(n.$$.fragment,t),o=!0)},o(t){X(e.$$.fragment,t),X(n.$$.fragment,t),o=!1},d(t){nt(e,t),nt(n,t)}}}function vt(t){let e,n,o=t[0].visum&&$t(t);return{c(){o&&o.c(),e=j()},m(t,r){o&&o.m(t,r),x(t,e,r),n=!0},p(t,n){t[0].visum?o?(o.p(t,n),1&n&&U(o,1)):(o=$t(t),o.c(),U(o,1),o.m(e.parentNode,e)):o&&(H(),X(o,1,1,(()=>{o=null})),Q())},i(t){n||(U(o),n=!0)},o(t){X(o),n=!1},d(t){o&&o.d(t),t&&I(e)}}}function gt(t){let e;return{c(){e=C(t[5])},m(t,n){x(t,e,n)},p(t,n){32&n&&P(e,t[5])},d(t){t&&I(e)}}}function bt(t){let e;return{c(){e=C("Ja, bitte visieren")},m(t,n){x(t,e,n)},d(t){t&&I(e)}}}function yt(t){let e,n,o,r;return o=new t[12]({props:{danger:!0,outline:!0,$$slots:{default:[bt]},$$scope:{ctx:t}}}),o.$on("click",t[14]),{c(){e=E("p"),e.textContent="Wollen Sie die Aufgabe visieren?",n=O(),tt(o.$$.fragment)},m(t,s){x(t,e,s),x(t,n,s),et(o,t,s),r=!0},p(t,e){const n={};1048576&e&&(n.$$scope={dirty:e,ctx:t}),o.$set(n)},i(t){r||(U(o.$$.fragment,t),r=!0)},o(t){X(o.$$.fragment,t),r=!1},d(t){t&&I(e),t&&I(n),nt(o,t)}}}function kt(t){let e,n,o;return n=new ft({props:{size:"25"}}),{c(){e=E("div"),tt(n.$$.fragment),S(e,"slot","title-icon")},m(t,r){x(t,e,r),et(n,e,null),o=!0},p:$,i(t){o||(U(n.$$.fragment,t),o=!0)},o(t){X(n.$$.fragment,t),o=!1},d(t){t&&I(e),nt(n)}}}function ht(t){let e,n;return e=new t[7]({props:{title:"Bestätigung",closeCallback:t[19],danger:!0,$$slots:{"title-icon":[kt],default:[yt]},$$scope:{ctx:t}}}),{c(){tt(e.$$.fragment)},m(t,o){et(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||(U(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){nt(e,t)}}}function wt(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:[pt]},$$scope:{ctx:t}}}),l=new t[8]({props:{name:"visiert am",$$slots:{default:[vt]},$$scope:{ctx:t}}}),a=new t[12]({props:{filled:!0,disabled:t[1],$$slots:{default:[gt]},$$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}),M.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=E("h3"),e.textContent="Visum erstellen",n=O(),o=E("div"),tt(r.$$.fragment),s=O(),tt(l.$$.fragment),i=O(),tt(a.$$.fragment),c=O(),tt(u.$$.fragment),S(o,"class","visum")},m(t,d){x(t,e,d),x(t,n,d),x(t,o,d),et(r,o,null),w(o,s),et(l,o,null),w(o,i),et(a,o,null),x(t,c,d),et(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){z.push(t)}((()=>d=!1))),u.$set(i)},i(t){m||(U(r.$$.fragment,t),U(l.$$.fragment,t),U(a.$$.fragment,t),U(u.$$.fragment,t),m=!0)},o(t){X(r.$$.fragment,t),X(l.$$.fragment,t),X(a.$$.fragment,t),X(u.$$.fragment,t),m=!1},d(t){t&&I(e),t&&I(n),t&&I(o),nt(r),nt(l),nt(a),t&&I(c),nt(u,t)}}}function xt(t,s,l){let i;h(t,r,(t=>l(17,i=t)));const{Modal:a,Dialog:c,FormField:u,TextField:d,DatePicker:m,TimePicker:f,Button:p}=e;let $,v,g,b,{task:y}=s,{taskId:k}=s,{eventItem:w}=s,x=!1;return o.subscribe((t=>{t&&t.taskId===k&&l(0,y.visum=t.data,y)})),t.$$set=t=>{"task"in t&&l(0,y=t.task),"taskId"in t&&l(15,k=t.taskId),"eventItem"in t&&l(16,w=t.eventItem)},t.$$.update=()=>{if(196611&t.$$.dirty&&(l(3,v=new Date(y.visum?.timeStamp)),l(4,g=y.visum?.user||($?"":i.email)),l(5,b=y.visum?"Visum erfolgleich erstellt":"Jetzt visieren"),w.output?.approval?.length&&i.role?.length)){const t=w.output.approval.flatMap((({refRole:t})=>t));l(1,$=!!y.visum||!t.some((t=>i.role.some((e=>t===e)))))}},[y,$,x,v,g,b,a,c,u,d,m,f,p,()=>{l(2,x=!0)},()=>{l(2,x=!1);const t={eventId:w._id,eventDesignation:w.identity.designation,user:i.email,timeStamp:(new Date).toISOString()};n.setTaskVisum(y._id,t),l(0,y.visum=t,y)},k,w,i,function(t){x=t,l(2,x)}]}class It extends rt{constructor(t){var e;super(),document.getElementById("svelte-b9m9m8-style")||((e=E("style")).id="svelte-b9m9m8-style",e.textContent=".visum .time-picker .dropdown{display:none !important}",w(document.head,e)),ot(this,t,xt,wt,k,{task:0,taskId:15,eventItem:16})}}const{document:Et}=Z;function _t(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(){y(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=E("div"),tt(n.$$.fragment),o=O(),r=C(c),s=O(),l=E("div"),i&&tt(i.$$.fragment),S(e,"class","task--header svelte-lsbd36"),S(l,"class","task--content svelte-lsbd36")},m(t,c){x(t,e,c),et(n,e,null),w(e,o),w(e,r),x(t,s,c),x(t,l,c),i&&et(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])+"")&&P(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){H();const t=i;X(t.$$.fragment,1,0,(()=>{nt(t,1)})),Q()}u?(i=new u(d(t)),i.$on("back",t[8]),tt(i.$$.fragment),U(i.$$.fragment,1),et(i,l,null)):i=null}else u&&i.$set(m)},i(t){a||(U(n.$$.fragment,t),i&&U(i.$$.fragment,t),a=!0)},o(t){X(n.$$.fragment,t),i&&X(i.$$.fragment,t),a=!1},d(t){t&&I(e),nt(n),t&&I(s),t&&I(l),i&&nt(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:[_t]},$$scope:{ctx:t}}}),{c(){e=E("div"),tt(n.$$.fragment),S(e,"class","task svelte-lsbd36")},m(t,r){x(t,e,r),et(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||(U(n.$$.fragment,t),o=!0)},o(t){X(n.$$.fragment,t),o=!1},d(t){t&&I(e),nt(n)}}}function Ot(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=E("div"),tt(n.$$.fragment),S(e,"class","task--page svelte-lsbd36")},m(t,r){x(t,e,r),et(n,e,null),o=!0},p(t,e){const o={};1605894145&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(U(n.$$.fragment,t),o=!0)},o(t){X(n.$$.fragment,t),o=!1},d(t){t&&I(e),nt(n)}}}function jt(t){let e,n,o;return n=new s({props:{update:t[4],$$slots:{default:[Ot,({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=O(),tt(n.$$.fragment),Et.title="enablerr - Task"},m(t,r){x(t,e,r),et(n,t,r),o=!0},p(t,[e]){const o={};1605894145&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(U(n.$$.fragment,t),o=!0)},o(t){X(n.$$.fragment,t),o=!1},d(t){t&&I(e),nt(n,t)}}}function St(t,o,r){const{Modal:s,Dialog:l,Tabs:u}=e;let d,m,f,p,$,v;const g={items:[{id:"task",name:"Aufgabe",component:ut},{id:"visum",name:"Visum",component:It},{id:"collab",name:"Kommunikation",component:c},{id:"workflow",name:"Workflow",component:i},{id:"report",name:"Anhänge",component:a}],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,l,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(q(),F).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 Pt extends rt{constructor(t){var e;super(),Et.getElementById("svelte-lsbd36-style")||((e=E("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}',w(Et.head,e)),ot(this,t,St,jt,k,{})}}const Bt=p({component:Pt,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Dt,mount:Tt,unmount:Nt}=Bt;t({bootstrap:Dt,mount:Tt,unmount:Nt});t("Task",Pt)}}}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@enablerr-ui/task",
3
3
  "description": "enablerr - the Next Enterprise Solution",
4
- "version": "0.2.57",
4
+ "version": "0.2.59",
5
5
  "os": [
6
6
  "darwin",
7
7
  "linux"