@enablerr-ui/task 0.2.66 → 0.2.68

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,u;return{setters:[function(t){e=t.getAttractions},function(t){n=t.Request,o=t.approval_notification,r=t.currentRoles,s=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.66");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){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)}))}},f(m={exports:{}},m.exports),m.exports),$=d(p);function v(){}function g(t){return t()}function h(){return Object.create(null)}function b(t){t.forEach(g)}function w(t){return"function"==typeof t}function y(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function k(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 O(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function C(t){return document.createTextNode(t)}function j(){return C(" ")}function S(){return C("")}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)}function T(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}let D;function N(t){D=t}function M(){if(!D)throw new Error("Function called outside component initialization");return D}const z=[],A=[],W=[],F=[],q=Promise.resolve();let G=!1;function R(){G||(G=!0,q.then(J))}function V(t){W.push(t)}let Y=!1;const L=new Set;function J(){if(!Y){Y=!0;do{for(let t=0;t<z.length;t+=1){const e=z[t];N(e),H(e.$$)}for(N(null),z.length=0;A.length;)A.pop()();for(let t=0;t<W.length;t+=1){const e=W[t];L.has(e)||(L.add(e),e())}W.length=0}while(z.length);for(;F.length;)F.pop()();G=!1,Y=!1,L.clear()}}function H(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(V)}}const K=new Set;let Q;function U(){Q={r:0,c:[],p:Q}}function X(){Q.r||b(Q.c),Q=Q.p}function Z(t,e){t&&t.i&&(K.delete(t),t.i(e))}function tt(t,e,n,o){if(t&&t.o){if(K.has(t))return;K.add(t),Q&&Q.c.push((()=>{K.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const et="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function nt(t){t&&t.c()}function ot(t,e,n,o){const{fragment:r,on_mount:s,on_destroy:l,after_update:a}=t.$$;r&&r.m(e,n),o||V((()=>{const e=s.map(g).filter(w);l?l.push(...e):b(e),t.$$.on_mount=[]})),a.forEach(V)}function rt(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 st(t,e,n,o,r,s,l=[-1]){const a=D;N(t);const i=t.$$={fragment:null,ctx:null,props:s,update:v,not_equal:r,bound:h(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:e.context||[]),callbacks:h(),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]&&(z.push(t),R(),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(E)}else i.fragment&&i.fragment.c();e.intro&&Z(t.$$.fragment),ot(t,e.target,e.anchor,e.customElement),J()}N(a)}class lt{$destroy(){rt(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 at(t){return{c:v,m:v,p:v,i:v,o:v,d:v}}function it(t){let e,n,o,r,s,l,i,c,u,d,f,m,p,$,v,g,h,b,w,y,k,O,S,D,N,M,z,A,W=t[1].status+"",F=(t[1].task?.workflow?.status||"")+"";return N=new t[5]({props:{class:"divider"}}),z=new a({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=_("div"),n=_("table"),o=_("th"),r=j(),s=_("th"),l=j(),i=_("tr"),c=_("td"),c.innerHTML="<div>Beschreibung:</div>",u=j(),d=_("td"),f=_("textarea"),m=j(),p=_("tr"),$=_("td"),$.textContent="Task-Status:",v=j(),g=_("td"),h=C(W),b=j(),w=_("tr"),y=_("td"),y.textContent="Workflow-Status:",k=j(),O=_("td"),S=C(F),D=j(),nt(N.$$.fragment),M=j(),nt(z.$$.fragment),T(o,"width","20%"),T(s,"width","80%"),P(c,"class","svelte-1wwh1vl"),P(f,"rows","5"),f.readOnly=!0,f.value=t[20].identity.description,P(f,"class","svelte-1wwh1vl"),P(d,"class","svelte-1wwh1vl"),P(i,"class","svelte-1wwh1vl"),P($,"class","svelte-1wwh1vl"),P(g,"class","svelte-1wwh1vl"),P(p,"class","svelte-1wwh1vl"),P(y,"class","svelte-1wwh1vl"),P(O,"class","svelte-1wwh1vl"),P(w,"class","svelte-1wwh1vl"),P(e,"class","subcat svelte-1wwh1vl")},m(t,a){I(t,e,a),x(e,n),x(n,o),x(n,r),x(n,s),x(n,l),x(n,i),x(i,c),x(i,u),x(i,d),x(d,f),x(n,m),x(n,p),x(p,$),x(p,v),x(p,g),x(g,h),x(n,b),x(n,w),x(w,y),x(w,k),x(w,O),x(O,S),I(t,D,a),ot(N,t,a),I(t,M,a),ot(z,t,a),A=!0},p(t,e){(!A||2&e)&&W!==(W=t[1].status+"")&&B(h,W),(!A||2&e)&&F!==(F=(t[1].task?.workflow?.status||"")+"")&&B(S,F);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){A||(Z(N.$$.fragment,t),Z(z.$$.fragment,t),A=!0)},o(t){tt(N.$$.fragment,t),tt(z.$$.fragment,t),A=!1},d(t){t&&E(e),t&&E(D),rt(N,t),t&&E(M),rt(z,t)}}}function ct(t){return{c:v,m:v,p:v,i:v,o:v,d:v}}function ut(t){let e,n,o={ctx:t,current:null,token:null,hasCatch:!1,pending:ct,then:it,catch:at,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&&(U(),tt(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),X())})):e.block.d(1),a.c(),Z(a,1),a.m(e.mount(),e.anchor),i=!0),e.block=a,e.blocks&&(e.blocks[o]=a),i&&J()}if((r=t)&&"object"==typeof r&&"function"==typeof r.then){const n=M();if(t.then((t=>{N(n),o(e.then,1,e.value,t),N(null)}),(t=>{if(N(n),o(e.catch,2,e.error,t),N(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=S(),o.block.c()},m(t,r){I(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||(Z(o.block),n=!0)},o(t){for(let t=0;t<3;t+=1){tt(o.blocks[t])}n=!1},d(t){t&&E(e),o.block.d(t),o.token=null,o=null}}}function dt(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 h=p,b=v,w=n.getSchema(g||b._id),y=h.task?.readonly;let k,x,I=h.docId||h.id;g&&(x=I,I=void 0,k=b._id),o.subscribe((async t=>{t&&t.taskId===$&&n.getTaskqueue(null,t.taskId).then((({task:t})=>{s(1,h.status=t.status,h),s(1,h.readonly=t.readonly,h)}))}));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)},[$,h,I,k,x,d,w,y,()=>window.singleSpaNavigate("/"),p,v,g]}class ft extends lt{constructor(t){var e;super(),document.getElementById("svelte-1wwh1vl-style")||((e=_("style")).id="svelte-1wwh1vl-style",e.textContent=".subcat.svelte-1wwh1vl.svelte-1wwh1vl{margin-bottom:0.5em}.subcat.svelte-1wwh1vl table td.svelte-1wwh1vl{padding-bottom:0.5em}.subcat.svelte-1wwh1vl table tr.svelte-1wwh1vl{vertical-align:top}.task_divider{background:#326173;color:#326173}tr.svelte-1wwh1vl>td.svelte-1wwh1vl{padding:0}textarea.svelte-1wwh1vl.svelte-1wwh1vl{font-family:inherit;font-size:inherit;width:100%;border:none;resize:none;min-height:2em;line-height:1.25em}",x(document.head,e)),st(this,t,dt,ut,y,{task:9,taskId:0,eventItem:10,followerEventId:11})}}function mt(t){let e,n,o,r,s;return{c(){e=O("svg"),n=O("path"),o=O("line"),r=O("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(r,"x1","12"),P(r,"y1","17"),P(r,"x2","12.01"),P(r,"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",s="feather feather-alert-triangle "+t[2])},m(t,s){I(t,e,s),x(e,n),x(e,o),x(e,r)},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&&s!==(s="feather feather-alert-triangle "+t[2])&&P(e,"class",s)},i:v,o:v,d(t){t&&E(e)}}}function pt(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 $t extends lt{constructor(t){super(),st(this,t,pt,mt,y,{size:0,strokeWidth:1,class:2})}}function vt(t){let e,n;return e=new t[9]({props:{readonly:!0,value:t[4]}}),{c(){nt(e.$$.fragment)},m(t,o){ot(e,t,o),n=!0},p(t,n){const o={};16&n&&(o.value=t[4]),e.$set(o)},i(t){n||(Z(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){rt(e,t)}}}function gt(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(){nt(e.$$.fragment),nt(n.$$.fragment)},m(t,r){ot(e,t,r),ot(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||(Z(e.$$.fragment,t),Z(n.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),tt(n.$$.fragment,t),o=!1},d(t){rt(e,t),rt(n,t)}}}function ht(t){let e,n,o=t[0].visum&&gt(t);return{c(){o&&o.c(),e=S()},m(t,r){o&&o.m(t,r),I(t,e,r),n=!0},p(t,n){t[0].visum?o?(o.p(t,n),1&n&&Z(o,1)):(o=gt(t),o.c(),Z(o,1),o.m(e.parentNode,e)):o&&(U(),tt(o,1,1,(()=>{o=null})),X())},i(t){n||(Z(o),n=!0)},o(t){tt(o),n=!1},d(t){o&&o.d(t),t&&E(e)}}}function bt(t){let e;return{c(){e=C(t[5])},m(t,n){I(t,e,n)},p(t,n){32&n&&B(e,t[5])},d(t){t&&E(e)}}}function wt(t){let e;return{c(){e=C("Ja, bitte visieren")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function yt(t){let e,n,o,r;return o=new t[12]({props:{danger:!0,outline:!0,$$slots:{default:[wt]},$$scope:{ctx:t}}}),o.$on("click",t[14]),{c(){e=_("p"),e.textContent="Wollen Sie die Aufgabe visieren?",n=j(),nt(o.$$.fragment)},m(t,s){I(t,e,s),I(t,n,s),ot(o,t,s),r=!0},p(t,e){const n={};4194304&e&&(n.$$scope={dirty:e,ctx:t}),o.$set(n)},i(t){r||(Z(o.$$.fragment,t),r=!0)},o(t){tt(o.$$.fragment,t),r=!1},d(t){t&&E(e),t&&E(n),rt(o,t)}}}function kt(t){let e,n,o;return n=new $t({props:{size:"25"}}),{c(){e=_("div"),nt(n.$$.fragment),P(e,"slot","title-icon")},m(t,r){I(t,e,r),ot(n,e,null),o=!0},p:v,i(t){o||(Z(n.$$.fragment,t),o=!0)},o(t){tt(n.$$.fragment,t),o=!1},d(t){t&&E(e),rt(n)}}}function xt(t){let e,n;return e=new t[7]({props:{title:"Bestätigung",closeCallback:t[21],danger:!0,$$slots:{"title-icon":[kt],default:[yt]},$$scope:{ctx:t}}}),{c(){nt(e.$$.fragment)},m(t,o){ot(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||(Z(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){rt(e,t)}}}function It(t){let e,n,o,r,s,l,a,i,c,u,d,f;function m(e){t[20](e)}r=new t[8]({props:{name:"visiert von",$$slots:{default:[vt]},$$scope:{ctx:t}}}),l=new t[8]({props:{name:"visiert am",$$slots:{default:[ht]},$$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:[xt,({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"),nt(r.$$.fragment),s=j(),nt(l.$$.fragment),a=j(),nt(i.$$.fragment),c=j(),nt(u.$$.fragment),P(o,"class","visum")},m(t,d){I(t,e,d),I(t,n,d),I(t,o,d),ot(r,o,null),x(o,s),ot(l,o,null),x(o,a),ot(i,o,null),I(t,c,d),ot(u,t,d),f=!0},p(t,[e]){const n={};4194320&e&&(n.$$scope={dirty:e,ctx:t}),r.$set(n);const o={};4194313&e&&(o.$$scope={dirty:e,ctx:t}),l.$set(o);const s={};2&e&&(s.disabled=t[1]),4194336&e&&(s.$$scope={dirty:e,ctx:t}),i.$set(s);const a={};6291456&e&&(a.$$scope={dirty:e,ctx:t}),!d&&4&e&&(d=!0,a.open=t[2],function(t){F.push(t)}((()=>d=!1))),u.$set(a)},i(t){f||(Z(r.$$.fragment,t),Z(l.$$.fragment,t),Z(i.$$.fragment,t),Z(u.$$.fragment,t),f=!0)},o(t){tt(r.$$.fragment,t),tt(l.$$.fragment,t),tt(i.$$.fragment,t),tt(u.$$.fragment,t),f=!1},d(t){t&&E(e),t&&E(n),t&&E(o),rt(r),rt(l),rt(i),t&&E(c),rt(u,t)}}}function Et(t,l,a){let i,c;k(t,r,(t=>a(18,i=t))),k(t,s,(t=>a(19,c=t)));const{Modal:u,Dialog:d,FormField:f,TextField:m,DatePicker:p,TimePicker:$,Button:v}=e;let g,h,b,w,y,{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,h=new Date(x.visum?.timeStamp)),a(5,w=x.visum?"Visum erfolgleich erstellt":"Jetzt visieren"),a(17,y=!x.visum),a(17,y=y&&!!E.output?.approval?.length),y&&i){const t=E.output.approval.flatMap((({refRole:t})=>t));a(17,y=t.some((t=>i.some((e=>t===e)))))}a(1,g=!y),a(4,b=x.visum?.user||(g?"":c.email))}},[x,g,_,h,b,w,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,y,i,c,function(t){_=t,a(2,_)}]}class _t extends lt{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,Et,It,y,{task:0,taskId:15,eventItem:16})}}const{document:Ot}=et;function Ct(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(){w(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"),nt(n.$$.fragment),o=j(),r=C(c),s=j(),l=_("div"),a&&nt(a.$$.fragment),P(e,"class","task--header svelte-lsbd36"),P(l,"class","task--content svelte-lsbd36")},m(t,c){I(t,e,c),ot(n,e,null),x(e,o),x(e,r),I(t,s,c),I(t,l,c),a&&ot(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])+"")&&B(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){U();const t=a;tt(t.$$.fragment,1,0,(()=>{rt(t,1)})),X()}u?(a=new u(d(t)),a.$on("back",t[8]),nt(a.$$.fragment),Z(a.$$.fragment,1),ot(a,l,null)):a=null}else u&&a.$set(f)},i(t){i||(Z(n.$$.fragment,t),a&&Z(a.$$.fragment,t),i=!0)},o(t){tt(n.$$.fragment,t),a&&tt(a.$$.fragment,t),i=!1},d(t){t&&E(e),rt(n),t&&E(s),t&&E(l),a&&rt(a)}}}function jt(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"),nt(n.$$.fragment),P(e,"class","task svelte-lsbd36")},m(t,r){I(t,e,r),ot(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||(Z(n.$$.fragment,t),o=!0)},o(t){tt(n.$$.fragment,t),o=!1},d(t){t&&E(e),rt(n)}}}function St(t){let e,n,o;return n=new t[1]({props:{open:"true",noClickaway:"true",class:"task--modal",$$slots:{default:[jt,({closeCallback:t})=>({29:t}),({closeCallback:t})=>t?536870912:0]},$$scope:{ctx:t}}}),n.$on("change",t[5]),{c(){e=_("div"),nt(n.$$.fragment),P(e,"class","task--page svelte-lsbd36")},m(t,r){I(t,e,r),ot(n,e,null),o=!0},p(t,e){const o={};1605894145&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(Z(n.$$.fragment,t),o=!0)},o(t){tt(n.$$.fragment,t),o=!1},d(t){t&&E(e),rt(n)}}}function Pt(t){let e,n,o;return n=new l({props:{update:t[4],$$slots:{default:[St,({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=j(),nt(n.$$.fragment),Ot.title="enablerr - Task"},m(t,r){I(t,e,r),ot(n,t,r),o=!0},p(t,[e]){const o={};1605894145&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(Z(n.$$.fragment,t),o=!0)},o(t){tt(n.$$.fragment,t),o=!1},d(t){t&&E(e),rt(n,t)}}}function Bt(t,o,r){const{Modal:s,Dialog:l,Tabs:a}=e;let d,f,m,p,$,v;const g={items:[{id:"task",name:"Aufgabe",component:ft},{id:"visum",name:"Visum",component:_t},{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))}},h=()=>{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%"};h();const b=(t,e,n)=>window.singleSpaNavigate(`/task/${t}/${e}/${n.id}`);!function(t){M().$$.on_destroy.push(t)}((()=>{document.body.style.position="inherit",document.body.style.overflow="auto",document.title="enablerr - Dashboard"}));return[m,s,l,a,async(t,e,o,s)=>{const l=g.findById(o);if(!l)return b(t,e,g.deflt());"task"!==o&&(s=void 0),r(0,m=e);let a={status:"New"};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?h():(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||b(n,e,t(r))},(t,e)=>{let n=!t.output?.approval;return(R(),q).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 Tt extends lt{constructor(t){var e;super(),Ot.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(Ot.head,e)),st(this,t,Bt,Pt,y,{})}}const Dt=$({component:Tt,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Nt,mount:Mt,unmount:zt}=Dt;t({bootstrap:Nt,mount:Mt,unmount:zt});t("Task",Tt)}}}));
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,u;return{setters:[function(t){e=t.getAttractions},function(t){n=t.Request,o=t.approval_notification,r=t.currentRoles,s=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.68");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){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)}))}},f(m={exports:{}},m.exports),m.exports),$=d(p);function v(){}function g(t){return t()}function h(){return Object.create(null)}function b(t){t.forEach(g)}function w(t){return"function"==typeof t}function y(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function k(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 O(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function S(t){return document.createTextNode(t)}function C(){return S(" ")}function j(){return S("")}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)}function T(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}let N;function D(t){N=t}function M(){if(!N)throw new Error("Function called outside component initialization");return N}const z=[],A=[],W=[],F=[],q=Promise.resolve();let G=!1;function R(){G||(G=!0,q.then(J))}function V(t){W.push(t)}let Y=!1;const L=new Set;function J(){if(!Y){Y=!0;do{for(let t=0;t<z.length;t+=1){const e=z[t];D(e),H(e.$$)}for(D(null),z.length=0;A.length;)A.pop()();for(let t=0;t<W.length;t+=1){const e=W[t];L.has(e)||(L.add(e),e())}W.length=0}while(z.length);for(;F.length;)F.pop()();G=!1,Y=!1,L.clear()}}function H(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(V)}}const K=new Set;let Q;function U(){Q={r:0,c:[],p:Q}}function X(){Q.r||b(Q.c),Q=Q.p}function Z(t,e){t&&t.i&&(K.delete(t),t.i(e))}function tt(t,e,n,o){if(t&&t.o){if(K.has(t))return;K.add(t),Q&&Q.c.push((()=>{K.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const et="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function nt(t){t&&t.c()}function ot(t,e,n,o){const{fragment:r,on_mount:s,on_destroy:l,after_update:a}=t.$$;r&&r.m(e,n),o||V((()=>{const e=s.map(g).filter(w);l?l.push(...e):b(e),t.$$.on_mount=[]})),a.forEach(V)}function rt(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 st(t,e,n,o,r,s,l=[-1]){const a=N;D(t);const i=t.$$={fragment:null,ctx:null,props:s,update:v,not_equal:r,bound:h(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:e.context||[]),callbacks:h(),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]&&(z.push(t),R(),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(E)}else i.fragment&&i.fragment.c();e.intro&&Z(t.$$.fragment),ot(t,e.target,e.anchor,e.customElement),J()}D(a)}class lt{$destroy(){rt(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 at(t){return{c:v,m:v,p:v,i:v,o:v,d:v}}function it(t){let e,n,o,r,s,l,i,c,u,d,f,m,p,$,v,g,h,b,w,y,k,O,j,N,D,M,z,A,W=t[1].status+"",F=(t[1].task?.workflow?.status||"")+"";return D=new t[5]({props:{class:"divider"}}),z=new a({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=_("div"),n=_("table"),o=_("th"),r=C(),s=_("th"),l=C(),i=_("tr"),c=_("td"),c.innerHTML="<div>Beschreibung:</div>",u=C(),d=_("td"),f=_("textarea"),m=C(),p=_("tr"),$=_("td"),$.textContent="Task-Status:",v=C(),g=_("td"),h=S(W),b=C(),w=_("tr"),y=_("td"),y.textContent="Workflow-Status:",k=C(),O=_("td"),j=S(F),N=C(),nt(D.$$.fragment),M=C(),nt(z.$$.fragment),T(o,"width","20%"),T(s,"width","80%"),P(c,"class","svelte-1wwh1vl"),P(f,"rows","5"),f.readOnly=!0,f.value=t[20].identity.description,P(f,"class","svelte-1wwh1vl"),P(d,"class","svelte-1wwh1vl"),P(i,"class","svelte-1wwh1vl"),P($,"class","svelte-1wwh1vl"),P(g,"class","svelte-1wwh1vl"),P(p,"class","svelte-1wwh1vl"),P(y,"class","svelte-1wwh1vl"),P(O,"class","svelte-1wwh1vl"),P(w,"class","svelte-1wwh1vl"),P(e,"class","subcat svelte-1wwh1vl")},m(t,a){I(t,e,a),x(e,n),x(n,o),x(n,r),x(n,s),x(n,l),x(n,i),x(i,c),x(i,u),x(i,d),x(d,f),x(n,m),x(n,p),x(p,$),x(p,v),x(p,g),x(g,h),x(n,b),x(n,w),x(w,y),x(w,k),x(w,O),x(O,j),I(t,N,a),ot(D,t,a),I(t,M,a),ot(z,t,a),A=!0},p(t,e){(!A||2&e)&&W!==(W=t[1].status+"")&&B(h,W),(!A||2&e)&&F!==(F=(t[1].task?.workflow?.status||"")+"")&&B(j,F);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){A||(Z(D.$$.fragment,t),Z(z.$$.fragment,t),A=!0)},o(t){tt(D.$$.fragment,t),tt(z.$$.fragment,t),A=!1},d(t){t&&E(e),t&&E(N),rt(D,t),t&&E(M),rt(z,t)}}}function ct(t){return{c:v,m:v,p:v,i:v,o:v,d:v}}function ut(t){let e,n,o={ctx:t,current:null,token:null,hasCatch:!1,pending:ct,then:it,catch:at,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&&(U(),tt(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),X())})):e.block.d(1),a.c(),Z(a,1),a.m(e.mount(),e.anchor),i=!0),e.block=a,e.blocks&&(e.blocks[o]=a),i&&J()}if((r=t)&&"object"==typeof r&&"function"==typeof r.then){const n=M();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){I(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||(Z(o.block),n=!0)},o(t){for(let t=0;t<3;t+=1){tt(o.blocks[t])}n=!1},d(t){t&&E(e),o.block.d(t),o.token=null,o=null}}}function dt(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 h=p,b=v,w=n.getSchema(g||b._id),y=h.task?.readonly;let k,x,I=h.docId||h.id;g&&(x=I,I=void 0,k=b._id),o.subscribe((async t=>{t&&t.taskId===$&&n.getTaskqueue(null,t.taskId).then((({task:t})=>{s(1,h.status=t.status,h),s(1,h.readonly=t.readonly,h)}))}));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)},[$,h,I,k,x,d,w,y,()=>window.singleSpaNavigate("/"),p,v,g]}class ft extends lt{constructor(t){var e;super(),document.getElementById("svelte-1wwh1vl-style")||((e=_("style")).id="svelte-1wwh1vl-style",e.textContent=".subcat.svelte-1wwh1vl.svelte-1wwh1vl{margin-bottom:0.5em}.subcat.svelte-1wwh1vl table td.svelte-1wwh1vl{padding-bottom:0.5em}.subcat.svelte-1wwh1vl table tr.svelte-1wwh1vl{vertical-align:top}.task_divider{background:#326173;color:#326173}tr.svelte-1wwh1vl>td.svelte-1wwh1vl{padding:0}textarea.svelte-1wwh1vl.svelte-1wwh1vl{font-family:inherit;font-size:inherit;width:100%;border:none;resize:none;min-height:2em;line-height:1.25em}",x(document.head,e)),st(this,t,dt,ut,y,{task:9,taskId:0,eventItem:10,followerEventId:11})}}function mt(t){let e,n,o,r,s;return{c(){e=O("svg"),n=O("path"),o=O("line"),r=O("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(r,"x1","12"),P(r,"y1","17"),P(r,"x2","12.01"),P(r,"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",s="feather feather-alert-triangle "+t[2])},m(t,s){I(t,e,s),x(e,n),x(e,o),x(e,r)},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&&s!==(s="feather feather-alert-triangle "+t[2])&&P(e,"class",s)},i:v,o:v,d(t){t&&E(e)}}}function pt(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 $t extends lt{constructor(t){super(),st(this,t,pt,mt,y,{size:0,strokeWidth:1,class:2})}}function vt(t){let e,n;return e=new t[10]({props:{readonly:!0,value:t[2]}}),{c(){nt(e.$$.fragment)},m(t,o){ot(e,t,o),n=!0},p(t,n){const o={};4&n&&(o.value=t[2]),e.$set(o)},i(t){n||(Z(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){rt(e,t)}}}function gt(t){let e,n;return e=new t[10]({props:{readonly:!0,value:t[5]}}),{c(){nt(e.$$.fragment)},m(t,o){ot(e,t,o),n=!0},p(t,n){const o={};32&n&&(o.value=t[5]),e.$set(o)},i(t){n||(Z(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){rt(e,t)}}}function ht(t){let e,n,o;return e=new t[11]({props:{noCalendar:!0,readonly:!0,value:t[4]}}),n=new t[12]({props:{readonly:!0,value:t[4]}}),{c(){nt(e.$$.fragment),nt(n.$$.fragment)},m(t,r){ot(e,t,r),ot(n,t,r),o=!0},p(t,o){const r={};16&o&&(r.value=t[4]),e.$set(r);const s={};16&o&&(s.value=t[4]),n.$set(s)},i(t){o||(Z(e.$$.fragment,t),Z(n.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),tt(n.$$.fragment,t),o=!1},d(t){rt(e,t),rt(n,t)}}}function bt(t){let e,n,o=t[0].visum&&ht(t);return{c(){o&&o.c(),e=j()},m(t,r){o&&o.m(t,r),I(t,e,r),n=!0},p(t,n){t[0].visum?o?(o.p(t,n),1&n&&Z(o,1)):(o=ht(t),o.c(),Z(o,1),o.m(e.parentNode,e)):o&&(U(),tt(o,1,1,(()=>{o=null})),X())},i(t){n||(Z(o),n=!0)},o(t){tt(o),n=!1},d(t){o&&o.d(t),t&&E(e)}}}function wt(t){let e;return{c(){e=S(t[6])},m(t,n){I(t,e,n)},p(t,n){64&n&&B(e,t[6])},d(t){t&&E(e)}}}function yt(t){let e;return{c(){e=S("Ja, bitte visieren")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function kt(t){let e,n,o,r;return o=new t[13]({props:{danger:!0,outline:!0,$$slots:{default:[yt]},$$scope:{ctx:t}}}),o.$on("click",t[15]),{c(){e=_("p"),e.textContent="Wollen Sie die Aufgabe visieren?",n=C(),nt(o.$$.fragment)},m(t,s){I(t,e,s),I(t,n,s),ot(o,t,s),r=!0},p(t,e){const n={};8388608&e&&(n.$$scope={dirty:e,ctx:t}),o.$set(n)},i(t){r||(Z(o.$$.fragment,t),r=!0)},o(t){tt(o.$$.fragment,t),r=!1},d(t){t&&E(e),t&&E(n),rt(o,t)}}}function xt(t){let e,n,o;return n=new $t({props:{size:"25"}}),{c(){e=_("div"),nt(n.$$.fragment),P(e,"slot","title-icon")},m(t,r){I(t,e,r),ot(n,e,null),o=!0},p:v,i(t){o||(Z(n.$$.fragment,t),o=!0)},o(t){tt(n.$$.fragment,t),o=!1},d(t){t&&E(e),rt(n)}}}function It(t){let e,n;return e=new t[8]({props:{title:"Bestätigung",closeCallback:t[22],danger:!0,$$slots:{"title-icon":[xt],default:[kt]},$$scope:{ctx:t}}}),{c(){nt(e.$$.fragment)},m(t,o){ot(e,t,o),n=!0},p(t,n){const o={};4194304&n&&(o.closeCallback=t[22]),8388608&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Z(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){rt(e,t)}}}function Et(t){let e,n,o,r,s,l,a,i,c,u,d,f,m,p;function $(e){t[21](e)}r=new t[9]({props:{name:"Rolle",$$slots:{default:[vt]},$$scope:{ctx:t}}}),l=new t[9]({props:{name:"visiert von",$$slots:{default:[gt]},$$scope:{ctx:t}}}),i=new t[9]({props:{name:"visiert am",$$slots:{default:[bt]},$$scope:{ctx:t}}}),u=new t[13]({props:{filled:!0,disabled:t[1],$$slots:{default:[wt]},$$scope:{ctx:t}}}),u.$on("click",t[14]);let v={$$slots:{default:[It,({closeCallback:t})=>({22:t}),({closeCallback:t})=>t?4194304:0]},$$scope:{ctx:t}};return void 0!==t[3]&&(v.open=t[3]),f=new t[7]({props:v}),A.push((()=>function(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}(f,"open",$))),{c(){e=_("h3"),e.textContent="Visum erstellen",n=C(),o=_("div"),nt(r.$$.fragment),s=C(),nt(l.$$.fragment),a=C(),nt(i.$$.fragment),c=C(),nt(u.$$.fragment),d=C(),nt(f.$$.fragment),P(o,"class","visum")},m(t,m){I(t,e,m),I(t,n,m),I(t,o,m),ot(r,o,null),x(o,s),ot(l,o,null),x(o,a),ot(i,o,null),x(o,c),ot(u,o,null),I(t,d,m),ot(f,t,m),p=!0},p(t,[e]){const n={};8388612&e&&(n.$$scope={dirty:e,ctx:t}),r.$set(n);const o={};8388640&e&&(o.$$scope={dirty:e,ctx:t}),l.$set(o);const s={};8388625&e&&(s.$$scope={dirty:e,ctx:t}),i.$set(s);const a={};2&e&&(a.disabled=t[1]),8388672&e&&(a.$$scope={dirty:e,ctx:t}),u.$set(a);const c={};12582912&e&&(c.$$scope={dirty:e,ctx:t}),!m&&8&e&&(m=!0,c.open=t[3],function(t){F.push(t)}((()=>m=!1))),f.$set(c)},i(t){p||(Z(r.$$.fragment,t),Z(l.$$.fragment,t),Z(i.$$.fragment,t),Z(u.$$.fragment,t),Z(f.$$.fragment,t),p=!0)},o(t){tt(r.$$.fragment,t),tt(l.$$.fragment,t),tt(i.$$.fragment,t),tt(u.$$.fragment,t),tt(f.$$.fragment,t),p=!1},d(t){t&&E(e),t&&E(n),t&&E(o),rt(r),rt(l),rt(i),rt(u),t&&E(d),rt(f,t)}}}function _t(t,l,a){let i,c;k(t,r,(t=>a(19,i=t))),k(t,s,(t=>a(20,c=t)));const{Modal:u,Dialog:d,FormField:f,TextField:m,DatePicker:p,TimePicker:$,Button:v}=e;let g,h,b,w,y,x,{task:I}=l,{taskId:E}=l,{eventItem:_}=l,O=!1;return o.subscribe((t=>{t&&t.taskId===E&&a(0,I.visum=t.data,I)})),t.$$set=t=>{"task"in t&&a(0,I=t.task),"taskId"in t&&a(16,E=t.taskId),"eventItem"in t&&a(17,_=t.eventItem)},t.$$.update=()=>{1966087&t.$$.dirty&&(a(4,h=new Date(I.visum?.timeStamp)),a(6,w=I.visum?"Visum erfolgleich erstellt":"Jetzt visieren"),a(18,y=!I.visum),a(18,y=y&&!!_.output?.approval?.length),y&&i&&(a(2,x=_.output.approval.flatMap((({refRole:t})=>t))),a(18,y=x.some((t=>i.some((e=>t===e)))))),a(1,g=!y),a(5,b=I.visum?.user||(g?"":c.email)))},[I,g,x,O,h,b,w,u,d,f,m,p,$,v,()=>{a(3,O=!0)},()=>{a(3,O=!1);const t={eventId:_._id,eventDesignation:_.identity.designation,docId:I.docId,user:c.email,timeStamp:(new Date).toISOString()};n.setTaskVisum(I._id,t),a(0,I.visum=t,I)},E,_,y,i,c,function(t){O=t,a(3,O)}]}class Ot extends lt{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,_t,Et,y,{task:0,taskId:16,eventItem:17})}}const{document:St}=et;function Ct(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(){w(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"),nt(n.$$.fragment),o=C(),r=S(c),s=C(),l=_("div"),a&&nt(a.$$.fragment),P(e,"class","task--header svelte-lsbd36"),P(l,"class","task--content svelte-lsbd36")},m(t,c){I(t,e,c),ot(n,e,null),x(e,o),x(e,r),I(t,s,c),I(t,l,c),a&&ot(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])+"")&&B(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){U();const t=a;tt(t.$$.fragment,1,0,(()=>{rt(t,1)})),X()}u?(a=new u(d(t)),a.$on("back",t[8]),nt(a.$$.fragment),Z(a.$$.fragment,1),ot(a,l,null)):a=null}else u&&a.$set(f)},i(t){i||(Z(n.$$.fragment,t),a&&Z(a.$$.fragment,t),i=!0)},o(t){tt(n.$$.fragment,t),a&&tt(a.$$.fragment,t),i=!1},d(t){t&&E(e),rt(n),t&&E(s),t&&E(l),a&&rt(a)}}}function jt(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"),nt(n.$$.fragment),P(e,"class","task svelte-lsbd36")},m(t,r){I(t,e,r),ot(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||(Z(n.$$.fragment,t),o=!0)},o(t){tt(n.$$.fragment,t),o=!1},d(t){t&&E(e),rt(n)}}}function Pt(t){let e,n,o;return n=new t[1]({props:{open:"true",noClickaway:"true",class:"task--modal",$$slots:{default:[jt,({closeCallback:t})=>({29:t}),({closeCallback:t})=>t?536870912:0]},$$scope:{ctx:t}}}),n.$on("change",t[5]),{c(){e=_("div"),nt(n.$$.fragment),P(e,"class","task--page svelte-lsbd36")},m(t,r){I(t,e,r),ot(n,e,null),o=!0},p(t,e){const o={};1605894145&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(Z(n.$$.fragment,t),o=!0)},o(t){tt(n.$$.fragment,t),o=!1},d(t){t&&E(e),rt(n)}}}function Bt(t){let e,n,o;return n=new l({props:{update:t[4],$$slots:{default:[Pt,({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=C(),nt(n.$$.fragment),St.title="enablerr - Task"},m(t,r){I(t,e,r),ot(n,t,r),o=!0},p(t,[e]){const o={};1605894145&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(Z(n.$$.fragment,t),o=!0)},o(t){tt(n.$$.fragment,t),o=!1},d(t){t&&E(e),rt(n,t)}}}function Tt(t,o,r){const{Modal:s,Dialog:l,Tabs:a}=e;let d,f,m,p,$,v;const g={items:[{id:"task",name:"Aufgabe",component:ft},{id:"visum",name:"Visum",component:Ot},{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))}},h=()=>{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%"};h();const b=(t,e,n)=>window.singleSpaNavigate(`/task/${t}/${e}/${n.id}`);!function(t){M().$$.on_destroy.push(t)}((()=>{document.body.style.position="inherit",document.body.style.overflow="auto",document.title="enablerr - Dashboard"}));return[m,s,l,a,async(t,e,o,s)=>{const l=g.findById(o);if(!l)return b(t,e,g.deflt());"task"!==o&&(s=void 0),r(0,m=e);let a={status:"New"};const i=await n.getEvent(t);i||window.singleSpaNavigate("/error");let c=i.identity.designation;if(s){const t=await n.getEvent(s);t||window.singleSpaNavigate("/error"),c+=" => "+t.identity.designation}return e!==t?(d===e?a=f:(d=e,f=a=await n.getTaskById(e)),a||window.singleSpaNavigate("/error"),a.event!==i._id.toString()&&window.singleSpaNavigate("/error")):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?h():(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||b(n,e,t(r))},(t,e)=>{let n=!t.output?.approval;return(R(),q).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 Nt extends lt{constructor(t){var e;super(),St.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(St.head,e)),st(this,t,Tt,Bt,y,{})}}const Dt=$({component:Nt,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Mt,mount:zt,unmount:At}=Dt;t({bootstrap:Mt,mount:zt,unmount:At});t("Task",Nt)}}}));
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.66",
4
+ "version": "0.2.68",
5
5
  "os": [
6
6
  "darwin",
7
7
  "linux"