@enablerr-ui/task 0.2.62 → 0.2.64

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