@enablerr-ui/task 0.2.58 → 0.2.60

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,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)}}}));
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,s,r,l,a,i,c;return{setters:[function(t){e=t.getAttractions},function(t){n=t.Request,o=t.approval_notification,s=t.settings,r=t.Page},function(t){l=t.Form},function(t){a=t.Workflow},function(t){i=t.Report},function(t){c=t.Collaboration}],execute:function(){t("version","0.2.60");function u(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var d,f,m=(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){s(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 s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t){return r="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},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("object"!==r(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 s=Object.keys(l),r=Object.keys(t).reduce((function(e,n){return s.includes(n)||(e[n]=t[n]),e}),{});return Promise.resolve().then((function(){var s=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=s();e.instance=new t.component(o(o({},r),{},{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(f={exports:{}},f.exports),f.exports),p=u(m);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 T(t){B=t}function D(){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];T(e),J(e.$$)}for(T(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:s,on_mount:r,on_destroy:l,after_update:a}=t.$$;s&&s.m(e,n),o||G((()=>{const e=r.map(v).filter(y);l?l.push(...e):b(e),t.$$.on_mount=[]})),a.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,s,r,l=[-1]){const a=B;T(t);const i=t.$$={fragment:null,ctx:null,props:r,update:$,not_equal:s,bound:g(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:e.context||[]),callbacks:g(),dirty:l,skip_bound:!1};let c=!1;if(i.ctx=n?n(t,e.props||{},((e,n,...o)=>{const r=o.length?o[0]:n;return i.ctx&&s(i.ctx[e],i.ctx[e]=r)&&(!i.skip_bound&&i.bound[e]&&i.bound[e](r),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})):[],i.update(),c=!0,b(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(I)}else i.fragment&&i.fragment.c();e.intro&&U(t.$$.fragment),et(t,e.target,e.anchor,e.customElement),R()}T(a)}class st{$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 rt(t){return{c:$,m:$,p:$,i:$,o:$,d:$}}function lt(t){let e,n,o,s,r,a,i,c,u,d,f,m,p,$,v,g,b,y,k,h,_,j,B,T,D,N,M,A,z,F,W=t[20].identity.description+"",q=t[20].identity.domain+"",G=t[20].identity.circle+"",V=t[1].status+"";return M=new t[5]({props:{class:"divider"}}),z=new l({props:{schema:t[20],recID:t[2],prevEventID:t[3],taskId:t[0],prev:t[4],readonly:t[7],root:"true"}}),z.$on("back",t[8]),{c(){e=E("div"),n=E("table"),o=E("tr"),s=E("td"),s.textContent="Beschreibung:",r=O(),a=E("td"),i=C(W),c=O(),u=E("tr"),d=E("td"),d.textContent="Domain:",f=O(),m=E("td"),p=C(q),$=O(),v=E("tr"),g=E("td"),g.textContent="Circle:",b=O(),y=E("td"),k=C(G),h=O(),_=E("tr"),j=E("td"),j.textContent="Status:",B=O(),T=E("td"),D=C(V),N=O(),tt(M.$$.fragment),A=O(),tt(z.$$.fragment),S(s,"class","svelte-131kw75"),S(a,"class","svelte-131kw75"),S(o,"class","svelte-131kw75"),S(d,"class","svelte-131kw75"),S(m,"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(T,"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,s),w(o,r),w(o,a),w(a,i),w(n,c),w(n,u),w(u,d),w(u,f),w(u,m),w(m,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(_,B),w(_,T),w(T,D),x(t,N,l),et(M,t,l),x(t,A,l),et(z,t,l),F=!0},p(t,e){(!F||2&e)&&V!==(V=t[1].status+"")&&P(D,V);const n={};4&e&&(n.recID=t[2]),8&e&&(n.prevEventID=t[3]),1&e&&(n.taskId=t[0]),16&e&&(n.prev=t[4]),z.$set(n)},i(t){F||(U(M.$$.fragment,t),U(z.$$.fragment,t),F=!0)},o(t){X(M.$$.fragment,t),X(z.$$.fragment,t),F=!1},d(t){t&&I(e),t&&I(N),nt(M,t),t&&I(A),nt(z,t)}}}function at(t){return{c:$,m:$,p:$,i:$,o:$,d:$}}function it(t){let e,n,o={ctx:t,current:null,token:null,hasCatch:!1,pending:at,then:lt,catch:rt,value:20,blocks:[,,,]};return function(t,e){const n=e.token={};function o(t,o,s,r){if(e.token!==n)return;e.resolved=r;let l=e.ctx;void 0!==s&&(l=l.slice(),l[s]=r);const a=t&&(e.current=t)(l);let i=!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),a.c(),U(a,1),a.m(e.mount(),e.anchor),i=!0),e.block=a,e.blocks&&(e.blocks[o]=a),i&&R()}if((s=t)&&"object"==typeof s&&"function"==typeof s.then){const n=D();if(t.then((t=>{T(n),o(e.then,1,e.value,t),T(null)}),(t=>{if(T(n),o(e.catch,2,e.error,t),T(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 s}(t[6],o),{c(){e=j(),o.block.c()},m(t,s){x(t,e,s),o.block.m(t,o.anchor=s),o.mount=()=>e.parentNode,o.anchor=e,n=!0},p(e,[n]){!function(t,e,n){const o=e.slice(),{resolved:s}=t;t.current===t.then&&(o[t.value]=s),t.current===t.catch&&(o[t.error]=s),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,s,r){const{Card:l,Table:a,Button:i,Modal:c,Tabs:u,Divider:d,FormField:f,TextField:m}=e;let{task:p}=s,{taskId:$}=s,{eventItem:v}=s,{followerEventId:g}=s;const b=p,y=v,k=n.getSchema(g||y._id),h=!g&&b.task?.readonly;let w,x,I=b.docId||b.id;g&&(x=I,I=void 0,w=y._id),o.subscribe((async t=>{t&&t.taskId===$&&n.getTaskqueue(null,t.taskId).then((({task:t})=>{r(1,b.status=t.status,b)}))}));return t.$$set=t=>{"task"in t&&r(9,p=t.task),"taskId"in t&&r(0,$=t.taskId),"eventItem"in t&&r(10,v=t.eventItem),"followerEventId"in t&&r(11,g=t.followerEventId)},[$,b,I,w,x,d,k,h,()=>window.singleSpaNavigate("/"),p,v,g]}class ut extends st{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,it,k,{task:9,taskId:0,eventItem:10,followerEventId:11})}}function dt(t){let e,n,o,s,r;return{c(){e=_("svg"),n=_("path"),o=_("line"),s=_("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(s,"x1","12"),S(s,"y1","17"),S(s,"x2","12.01"),S(s,"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",r="feather feather-alert-triangle "+t[2])},m(t,r){x(t,e,r),w(e,n),w(e,o),w(e,s)},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&&r!==(r="feather feather-alert-triangle "+t[2])&&S(e,"class",r)},i:$,o:$,d(t){t&&I(e)}}}function ft(t,e,n){let{size:o="100%"}=e,{strokeWidth:s=2}=e,{class:r=""}=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,s=t.strokeWidth),"class"in t&&n(2,r=t.class)},[o,s,r]}class mt extends st{constructor(t){super(),ot(this,t,ft,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,s){et(e,t,s),et(n,t,s),o=!0},p(t,o){const s={};8&o&&(s.value=t[3]),e.$set(s);const r={};8&o&&(r.value=t[3]),n.$set(r)},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,s){o&&o.m(t,s),x(t,e,s),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,s;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,r){x(t,e,r),x(t,n,r),et(o,t,r),s=!0},p(t,e){const n={};2097152&e&&(n.$$scope={dirty:e,ctx:t}),o.$set(n)},i(t){s||(U(o.$$.fragment,t),s=!0)},o(t){X(o.$$.fragment,t),s=!1},d(t){t&&I(e),t&&I(n),nt(o,t)}}}function kt(t){let e,n,o;return n=new mt({props:{size:"25"}}),{c(){e=E("div"),tt(n.$$.fragment),S(e,"slot","title-icon")},m(t,s){x(t,e,s),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[20],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={};1048576&n&&(o.closeCallback=t[20]),2097152&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,s,r,l,a,i,c,u,d,f;function m(e){t[19](e)}s=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}}}),i=new t[12]({props:{filled:!0,disabled:t[1],$$slots:{default:[gt]},$$scope:{ctx:t}}}),i.$on("click",t[13]);let p={$$slots:{default:[ht,({closeCallback:t})=>({20:t}),({closeCallback:t})=>t?1048576: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",m))),{c(){e=E("h3"),e.textContent="Visum erstellen",n=O(),o=E("div"),tt(s.$$.fragment),r=O(),tt(l.$$.fragment),a=O(),tt(i.$$.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(s,o,null),w(o,r),et(l,o,null),w(o,a),et(i,o,null),x(t,c,d),et(u,t,d),f=!0},p(t,[e]){const n={};2097168&e&&(n.$$scope={dirty:e,ctx:t}),s.$set(n);const o={};2097161&e&&(o.$$scope={dirty:e,ctx:t}),l.$set(o);const r={};2&e&&(r.disabled=t[1]),2097184&e&&(r.$$scope={dirty:e,ctx:t}),i.$set(r);const a={};3145728&e&&(a.$$scope={dirty:e,ctx:t}),!d&&4&e&&(d=!0,a.open=t[2],function(t){z.push(t)}((()=>d=!1))),u.$set(a)},i(t){f||(U(s.$$.fragment,t),U(l.$$.fragment,t),U(i.$$.fragment,t),U(u.$$.fragment,t),f=!0)},o(t){X(s.$$.fragment,t),X(l.$$.fragment,t),X(i.$$.fragment,t),X(u.$$.fragment,t),f=!1},d(t){t&&I(e),t&&I(n),t&&I(o),nt(s),nt(l),nt(i),t&&I(c),nt(u,t)}}}function xt(t,r,l){let a;h(t,s,(t=>l(18,a=t)));const{Modal:i,Dialog:c,FormField:u,TextField:d,DatePicker:f,TimePicker:m,Button:p}=e;let $,v,g,b,y,{task:k}=r,{taskId:w}=r,{eventItem:x}=r,I=!1;return o.subscribe((t=>{t&&t.taskId===w&&l(0,k.visum=t.data,k)})),t.$$set=t=>{"task"in t&&l(0,k=t.task),"taskId"in t&&l(15,w=t.taskId),"eventItem"in t&&l(16,x=t.eventItem)},t.$$.update=()=>{if(458755&t.$$.dirty){if(l(3,v=new Date(k.visum?.timeStamp)),l(5,b=k.visum?"Visum erfolgleich erstellt":"Jetzt visieren"),l(17,y=!k.visum),l(17,y=y&&!!a.role?.length),l(17,y=y&&!!x.output?.approval?.length),y){const t=x.output.approval.flatMap((({refRole:t})=>t));l(17,y=t.some((t=>a.role.some((e=>t===e)))))}l(1,$=!y),l(4,g=k.visum?.user||($?"":a.email))}},[k,$,I,v,g,b,i,c,u,d,f,m,p,()=>{l(2,I=!0)},()=>{l(2,I=!1);const t={eventId:x._id,eventDesignation:x.identity.designation,docId:k.docId,user:a.email,timeStamp:(new Date).toISOString()};n.setTaskVisum(k._id,t),l(0,k.visum=t,k)},w,x,y,a,function(t){I=t,l(2,I)}]}class It extends st{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,s,r,l,a,i,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&&(a=new u(d(t)),a.$on("back",t[8])),{c(){e=E("div"),tt(n.$$.fragment),o=O(),s=C(c),r=O(),l=E("div"),a&&tt(a.$$.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,s),x(t,r,c),x(t,l,c),a&&et(a,l,null),i=!0},p(e,o){t=e;const r={};8388608&o&&(r.items=t[23]),16777216&o&&(r.value=t[24].name),n.$set(r),(!i||101711873&o)&&c!==(c=t[7](t[25],!!t[26]||t[0]===t[20])+"")&&P(s,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){H();const t=a;X(t.$$.fragment,1,0,(()=>{nt(t,1)})),Q()}u?(a=new u(d(t)),a.$on("back",t[8]),tt(a.$$.fragment),U(a.$$.fragment,1),et(a,l,null)):a=null}else u&&a.$set(f)},i(t){i||(U(n.$$.fragment,t),a&&U(a.$$.fragment,t),i=!0)},o(t){X(n.$$.fragment,t),a&&X(a.$$.fragment,t),i=!1},d(t){t&&I(e),nt(n),t&&I(r),t&&I(l),a&&nt(a)}}}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,s){x(t,e,s),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,s){x(t,e,s),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 r({props:{update:t[4],$$slots:{default:[Ot,({prop:{title:t,eventId:e,taskId:n,tabId:o,items:s,item:r,eventItem:l,followerEventId:a,task:i,findMenu:c}})=>({19:t,20:e,21:n,22:o,23:s,24:r,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=O(),tt(n.$$.fragment),Et.title="enablerr - Task"},m(t,s){x(t,e,s),et(n,t,s),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,s){const{Modal:r,Dialog:l,Tabs:u}=e;let d,f,m,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:a},{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){D().$$.on_destroy.push(t)}((()=>{document.body.style.position="inherit",document.body.style.overflow="auto",document.title="enablerr - Dashboard"}));return[m,r,l,u,async(t,e,o,r)=>{const l=g.findById(o);if(!l)return y(t,e,g.deflt());"task"!==o&&(r=void 0),s(0,m=e);let a={status:"Neu"};const i=await n.getEvent(t);let c=i.identity.designation;return r&&(c+=" => "+(await n.getEvent(r)).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:r,task:a,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:s}})=>{o||y(n,e,t(s))},(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 st{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:Tt,mount:Dt,unmount:Nt}=Bt;t({bootstrap:Tt,mount:Dt,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.58",
4
+ "version": "0.2.60",
5
5
  "os": [
6
6
  "darwin",
7
7
  "linux"