@enablerr-ui/task 0.2.65 → 0.2.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.js +1 -1
- package/package.json +1 -1
package/dist/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["@enablerr-ui/layout","@enablerr-ui/form","@enablerr-ui/detail","@enablerr-ui/workflow","@enablerr-ui/report","@enablerr-ui/collab"],(function(t){"use strict";var e,n,o,r,s,l,a,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.65");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 b(){return Object.create(null)}function h(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)}let T;function D(t){T=t}function N(){if(!T)throw new Error("Function called outside component initialization");return T}const z=[],M=[],A=[],W=[],F=Promise.resolve();let q=!1;function G(){q||(q=!0,F.then(J))}function R(t){A.push(t)}let V=!1;const Y=new Set;function J(){if(!V){V=!0;do{for(let t=0;t<z.length;t+=1){const e=z[t];D(e),L(e.$$)}for(D(null),z.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(z.length);for(;W.length;)W.pop()();q=!1,V=!1,Y.clear()}}function L(t){if(null!==t.fragment){t.update(),h(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||h(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:r,on_mount:s,on_destroy:l,after_update:a}=t.$$;r&&r.m(e,n),o||R((()=>{const e=s.map(g).filter(w);l?l.push(...e):h(e),t.$$.on_mount=[]})),a.forEach(R)}function ot(t,e){const n=t.$$;null!==n.fragment&&(h(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function rt(t,e,n,o,r,s,l=[-1]){const a=T;D(t);const i=t.$$={fragment:null,ctx:null,props:s,update:v,not_equal:r,bound:b(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:e.context||[]),callbacks:b(),dirty:l,skip_bound:!1};let c=!1;if(i.ctx=n?n(t,e.props||{},((e,n,...o)=>{const s=o.length?o[0]:n;return i.ctx&&r(i.ctx[e],i.ctx[e]=s)&&(!i.skip_bound&&i.bound[e]&&i.bound[e](s),c&&function(t,e){-1===t.$$.dirty[0]&&(z.push(t),G(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],i.update(),c=!0,h(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 st{$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,r,s,l,i,c,u,d,f,m,p,$,v,g,b,h,w,y,k,O,S,T,D=t[1].status+"",N=(t[1].task?.workflow?.status||"")+"";return k=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"),r=_("td"),r.textContent="Beschreibung:",s=j(),l=_("td"),i=_("textarea"),c=j(),u=_("tr"),d=_("td"),d.textContent="Task-Status:",f=j(),m=_("td"),p=C(D),$=j(),v=_("tr"),g=_("td"),g.textContent="Workflow-Status:",b=j(),h=_("td"),w=C(N),y=j(),et(k.$$.fragment),O=j(),et(S.$$.fragment),P(r,"class","svelte-1wwh1vl"),P(i,"rows","6"),i.readOnly=!0,i.value=t[20].identity.description,P(i,"class","svelte-1wwh1vl"),P(l,"class","svelte-1wwh1vl"),P(o,"class","svelte-1wwh1vl"),P(d,"class","svelte-1wwh1vl"),P(m,"class","svelte-1wwh1vl"),P(u,"class","svelte-1wwh1vl"),P(g,"class","svelte-1wwh1vl"),P(h,"class","svelte-1wwh1vl"),P(v,"class","svelte-1wwh1vl"),P(e,"class","subcat svelte-1wwh1vl")},m(t,a){I(t,e,a),x(e,n),x(n,o),x(o,r),x(o,s),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,h),x(h,w),I(t,y,a),nt(k,t,a),I(t,O,a),nt(S,t,a),T=!0},p(t,e){(!T||2&e)&&D!==(D=t[1].status+"")&&B(p,D),(!T||2&e)&&N!==(N=(t[1].task?.workflow?.status||"")+"")&&B(w,N);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(k.$$.fragment,t),X(S.$$.fragment,t),T=!0)},o(t){Z(k.$$.fragment,t),Z(S.$$.fragment,t),T=!1},d(t){t&&E(e),t&&E(y),ot(k,t),t&&E(O),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,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&&(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((r=t)&&"object"==typeof r&&"function"==typeof r.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 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||(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,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,h=v,w=n.getSchema(g||h._id),y=b.task?.readonly;let k,x,I=b.docId||b.id;g&&(x=I,I=void 0,k=h._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,k,x,d,w,y,()=>window.singleSpaNavigate("/"),p,v,g]}class dt extends st{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)),rt(this,t,ut,ct,y,{task:9,taskId:0,eventItem:10,followerEventId:11})}}function ft(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 mt(t,e,n){let{size:o="100%"}=e,{strokeWidth:r=2}=e,{class:s=""}=e;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),t.$$set=t=>{"size"in t&&n(0,o=t.size),"strokeWidth"in t&&n(1,r=t.strokeWidth),"class"in t&&n(2,s=t.class)},[o,r,s]}class pt extends st{constructor(t){super(),rt(this,t,mt,ft,y,{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,r){nt(e,t,r),nt(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||(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,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&&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=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 ht(t){let e;return{c(){e=C("Ja, bitte visieren")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function wt(t){let e,n,o,r;return o=new t[12]({props:{danger:!0,outline:!0,$$slots:{default:[ht]},$$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,s){I(t,e,s),I(t,n,s),nt(o,t,s),r=!0},p(t,e){const n={};4194304&e&&(n.$$scope={dirty:e,ctx:t}),o.$set(n)},i(t){r||(X(o.$$.fragment,t),r=!0)},o(t){Z(o.$$.fragment,t),r=!1},d(t){t&&E(e),t&&E(n),ot(o,t)}}}function yt(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,r){I(t,e,r),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 kt(t){let e,n;return e=new t[7]({props:{title:"Bestätigung",closeCallback:t[21],danger:!0,$$slots:{"title-icon":[yt],default:[wt]},$$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,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:[$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:[kt,({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}),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=_("h3"),e.textContent="Visum erstellen",n=j(),o=_("div"),et(r.$$.fragment),s=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(r,o,null),x(o,s),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}),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){W.push(t)}((()=>d=!1))),u.$set(a)},i(t){f||(X(r.$$.fragment,t),X(l.$$.fragment,t),X(i.$$.fragment,t),X(u.$$.fragment,t),f=!0)},o(t){Z(r.$$.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(r),ot(l),ot(i),t&&E(c),ot(u,t)}}}function It(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,b,h,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,b=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,h=x.visum?.user||(g?"":c.email))}},[x,g,_,b,h,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 Et extends st{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)),rt(this,t,It,xt,y,{task:0,taskId:15,eventItem:16})}}const{document:_t}=tt;function Ot(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"),et(n.$$.fragment),o=j(),r=C(c),s=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,r),I(t,s,c),I(t,l,c),a&&nt(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){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(s),t&&E(l),a&&ot(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:[Ot]},$$scope:{ctx:t}}}),{c(){e=_("div"),et(n.$$.fragment),P(e,"class","task svelte-lsbd36")},m(t,r){I(t,e,r),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:[Ct,({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,r){I(t,e,r),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: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(),et(n.$$.fragment),_t.title="enablerr - Task"},m(t,r){I(t,e,r),nt(n,t,r),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,r){const{Modal:s,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 h=(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,s,l,a,async(t,e,o,s)=>{const l=g.findById(o);if(!l)return h(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?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||h(n,e,t(r))},(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 st{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)),rt(this,t,Pt,St,y,{})}}const Tt=$({component:Bt,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Dt,mount:Nt,unmount:zt}=Tt;t({bootstrap:Dt,mount:Nt,unmount:zt});t("Task",Bt)}}}));
|
|
1
|
+
System.register(["@enablerr-ui/layout","@enablerr-ui/form","@enablerr-ui/detail","@enablerr-ui/workflow","@enablerr-ui/report","@enablerr-ui/collab"],(function(t){"use strict";var e,n,o,r,s,l,i,a,c,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){i=t.Form},function(t){a=t.Workflow},function(t){c=t.Report},function(t){u=t.Collaboration}],execute:function(){t("version","0.2.67");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:i.bind(null,e,n),mount:a.bind(null,e,n),unmount:c.bind(null,e,n),update:u.bind(null,e,n)}};var l={component:null,domElementGetter:null,props:{}};function i(t){return Promise.resolve()}function a(t,e,n){var r=Object.keys(l),s=Object.keys(t).reduce((function(e,n){return r.includes(n)||(e[n]=t[n]),e}),{});return Promise.resolve().then((function(){var r=function(t,e){return(e=e&&e.customProps?e.customProps:e).domElement?function(){return e.domElement}:e.domElementGetter?function(){return e.domElementGetter(e)}:t.domElementGetter?function(){return t.domElementGetter(e)}:function(t){var e=t.appName||t.name;if(!e)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(e);return function(){var t=document.getElementById(n);return t||((t=document.createElement("div")).id=n,document.body.appendChild(t)),t}}(e)}(t,n),l=r();e.instance=new t.component(o(o({},s),{},{target:l,props:Object.assign({},n,t.props)}))}))}function c(t,e){return Promise.resolve().then((function(){e.instance.$destroy?e.instance.$destroy():e.instance.destroy()}))}function u(t,e,n){return Promise.resolve().then((function(){e.instance.$set?e.instance.$set(n):e.instance.set(n)}))}},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:i}=t.$$;r&&r.m(e,n),o||V((()=>{const e=s.map(g).filter(w);l?l.push(...e):b(e),t.$$.on_mount=[]})),i.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 i=N;D(t);const a=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(i?i.$$.context:e.context||[]),callbacks:h(),dirty:l,skip_bound:!1};let c=!1;if(a.ctx=n?n(t,e.props||{},((e,n,...o)=>{const s=o.length?o[0]:n;return a.ctx&&r(a.ctx[e],a.ctx[e]=s)&&(!a.skip_bound&&a.bound[e]&&a.bound[e](s),c&&function(t,e){-1===t.$$.dirty[0]&&(z.push(t),R(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],a.update(),c=!0,b(a.before_update),a.fragment=!!o&&o(a.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);a.fragment&&a.fragment.l(t),t.forEach(E)}else a.fragment&&a.fragment.c();e.intro&&Z(t.$$.fragment),ot(t,e.target,e.anchor,e.customElement),J()}D(i)}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 it(t){return{c:v,m:v,p:v,i:v,o:v,d:v}}function at(t){let e,n,o,r,s,l,a,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 i({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(),a=_("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(a,"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,i){I(t,e,i),x(e,n),x(n,o),x(n,r),x(n,s),x(n,l),x(n,a),x(a,c),x(a,u),x(a,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,i),ot(D,t,i),I(t,M,i),ot(z,t,i),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:at,catch:it,value:20,blocks:[,,,]};return function(t,e){const n=e.token={};function o(t,o,r,s){if(e.token!==n)return;e.resolved=s;let l=e.ctx;void 0!==r&&(l=l.slice(),l[r]=s);const i=t&&(e.current=t)(l);let a=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(U(),tt(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),X())})):e.block.d(1),i.c(),Z(i,1),i.m(e.mount(),e.anchor),a=!0),e.block=i,e.blocks&&(e.blocks[o]=i),a&&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:i,Button:a,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&>(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=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=S(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=S("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=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={};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,i,a,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}}}),a=new t[12]({props:{filled:!0,disabled:t[1],$$slots:{default:[bt]},$$scope:{ctx:t}}}),a.$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=C(),o=_("div"),nt(r.$$.fragment),s=C(),nt(l.$$.fragment),i=C(),nt(a.$$.fragment),c=C(),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,i),ot(a,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}),a.$set(s);const i={};6291456&e&&(i.$$scope={dirty:e,ctx:t}),!d&&4&e&&(d=!0,i.open=t[2],function(t){F.push(t)}((()=>d=!1))),u.$set(i)},i(t){f||(Z(r.$$.fragment,t),Z(l.$$.fragment,t),Z(a.$$.fragment,t),Z(u.$$.fragment,t),f=!0)},o(t){tt(r.$$.fragment,t),tt(l.$$.fragment,t),tt(a.$$.fragment,t),tt(u.$$.fragment,t),f=!1},d(t){t&&E(e),t&&E(n),t&&E(o),rt(r),rt(l),rt(a),t&&E(c),rt(u,t)}}}function Et(t,l,i){let a,c;k(t,r,(t=>i(18,a=t))),k(t,s,(t=>i(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&&i(0,x.visum=t.data,x)})),t.$$set=t=>{"task"in t&&i(0,x=t.task),"taskId"in t&&i(15,I=t.taskId),"eventItem"in t&&i(16,E=t.eventItem)},t.$$.update=()=>{if(983043&t.$$.dirty){if(i(3,h=new Date(x.visum?.timeStamp)),i(5,w=x.visum?"Visum erfolgleich erstellt":"Jetzt visieren"),i(17,y=!x.visum),i(17,y=y&&!!E.output?.approval?.length),y&&a){const t=E.output.approval.flatMap((({refRole:t})=>t));i(17,y=t.some((t=>a.some((e=>t===e)))))}i(1,g=!y),i(4,b=x.visum?.user||(g?"":c.email))}},[x,g,_,h,b,w,u,d,f,m,p,$,v,()=>{i(2,_=!0)},()=>{i(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),i(0,x.visum=t,x)},I,E,y,a,c,function(t){_=t,i(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 St(t){let e,n,o,r,s,l,i,a,c=t[7](t[25],!!t[26]||t[0]===t[20])+"";n=new t[3]({props:{name:"menu",items:t[23],value:t[24].name,class:"task--tabs",tabClass:"menuTab"}}),n.$on("change",(function(){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&&(i=new u(d(t)),i.$on("back",t[8])),{c(){e=_("div"),nt(n.$$.fragment),o=C(),r=S(c),s=C(),l=_("div"),i&&nt(i.$$.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),i&&ot(i,l,null),a=!0},p(e,o){t=e;const s={};8388608&o&&(s.items=t[23]),16777216&o&&(s.value=t[24].name),n.$set(s),(!a||101711873&o)&&c!==(c=t[7](t[25],!!t[26]||t[0]===t[20])+"")&&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(i){U();const t=i;tt(t.$$.fragment,1,0,(()=>{rt(t,1)})),X()}u?(i=new u(d(t)),i.$on("back",t[8]),nt(i.$$.fragment),Z(i.$$.fragment,1),ot(i,l,null)):i=null}else u&&i.$set(f)},i(t){a||(Z(n.$$.fragment,t),i&&Z(i.$$.fragment,t),a=!0)},o(t){tt(n.$$.fragment,t),i&&tt(i.$$.fragment,t),a=!1},d(t){t&&E(e),rt(n),t&&E(s),t&&E(l),i&&rt(i)}}}function Ct(t){let e,n,o;return n=new t[2]({props:{constrainWidth:!0,title:t[19],titleClass:"task_title",closeCallback:t[9],class:"task--area",$$slots:{default:[St]},$$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 jt(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=_("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:[jt,({prop:{title:t,eventId:e,taskId:n,tabId:o,items:r,item:s,eventItem:l,followerEventId:i,task:a,findMenu:c}})=>({19:t,20:e,21:n,22:o,23:r,24:s,25:l,26:i,27:a,28:c}),({prop:t})=>(t?524288:0)|(t?1048576:0)|(t?2097152:0)|(t?4194304:0)|(t?8388608:0)|(t?16777216:0)|(t?33554432:0)|(t?67108864:0)|(t?134217728:0)|(t?268435456:0)]},$$scope:{ctx:t}}}),{c(){e=C(),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:i}=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:a},{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,i,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 i={status:"New"};const a=await n.getEvent(t);a||window.singleSpaNavigate("/error");let c=a.identity.designation;if(s){const t=await n.getEvent(s);t||window.singleSpaNavigate("/error"),c+=" => "+t.identity.designation}return e!==t?(d===e?i=f:(d=e,f=i=await n.getTaskById(e)),i||window.singleSpaNavigate("/error"),i.event!==a._id.toString()&&window.singleSpaNavigate("/error")):e=void 0,{title:c,eventId:t,taskId:e,tabId:o,item:l,eventItem:a,followerEventId:s,task:i,items:g.map(),findMenu:t=>g.findByName(t)}},function(t){t.detail.value?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 Nt=$({component:Tt,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Dt,mount:Mt,unmount:zt}=Nt;t({bootstrap:Dt,mount:Mt,unmount:zt});t("Task",Tt)}}}));
|