@enablerr-ui/task 0.2.19 → 0.2.20
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,c;return{setters:[function(t){e=t.getAttractions},function(t){n=t.Request,o=t.Page},function(t){r=t.Form},function(t){s=t.Workflow},function(t){l=t.Report},function(t){c=t.Collaboration}],execute:function(){t("version","0.2.19");function i(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var a,u,d=(a=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:c.bind(null,e,n),mount:i.bind(null,e,n),unmount:a.bind(null,e,n),update:u.bind(null,e,n)}};var l={component:null,domElementGetter:null,props:{}};function c(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 a(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)}))}},a(u={exports:{}},u.exports),u.exports),f=i(d);function m(){}function p(t){return t()}function v(){return Object.create(null)}function y(t){t.forEach(p)}function g(t){return"function"==typeof t}function $(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function b(t,e){t.appendChild(e)}function h(t,e,n){t.insertBefore(e,n||null)}function w(t){t.parentNode.removeChild(t)}function k(t){return document.createElement(t)}function x(t){return document.createTextNode(t)}function E(){return x(" ")}function I(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function _(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}let O;function j(t){O=t}function C(){if(!O)throw new Error("Function called outside component initialization");return O}const P=[],B=[],S=[],T=[],D=Promise.resolve();let N=!1;function M(t){S.push(t)}let A=!1;const G=new Set;function F(){if(!A){A=!0;do{for(let t=0;t<P.length;t+=1){const e=P[t];j(e),q(e.$$)}for(j(null),P.length=0;B.length;)B.pop()();for(let t=0;t<S.length;t+=1){const e=S[t];G.has(e)||(G.add(e),e())}S.length=0}while(P.length);for(;T.length;)T.pop()();N=!1,A=!1,G.clear()}}function q(t){if(null!==t.fragment){t.update(),y(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(M)}}const Y=new Set;let R;function W(){R={r:0,c:[],p:R}}function z(){R.r||y(R.c),R=R.p}function K(t,e){t&&t.i&&(Y.delete(t),t.i(e))}function H(t,e,n,o){if(t&&t.o){if(Y.has(t))return;Y.add(t),R&&R.c.push((()=>{Y.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}function J(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 c=t&&(e.current=t)(l);let i=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(W(),H(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),z())})):e.block.d(1),c.c(),K(c,1),c.m(e.mount(),e.anchor),i=!0),e.block=c,e.blocks&&(e.blocks[o]=c),i&&F()}if((r=t)&&"object"==typeof r&&"function"==typeof r.then){const n=C();if(t.then((t=>{j(n),o(e.then,1,e.value,t),j(null)}),(t=>{if(j(n),o(e.catch,2,e.error,t),j(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}const L="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function Q(t){t&&t.c()}function U(t,e,n,o){const{fragment:r,on_mount:s,on_destroy:l,after_update:c}=t.$$;r&&r.m(e,n),o||M((()=>{const e=s.map(p).filter(g);l?l.push(...e):y(e),t.$$.on_mount=[]})),c.forEach(M)}function V(t,e){const n=t.$$;null!==n.fragment&&(y(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function X(t,e){-1===t.$$.dirty[0]&&(P.push(t),N||(N=!0,D.then(F)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function Z(t,e,n,o,r,s,l=[-1]){const c=O;j(t);const i=t.$$={fragment:null,ctx:null,props:s,update:m,not_equal:r,bound:v(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(c?c.$$.context:e.context||[]),callbacks:v(),dirty:l,skip_bound:!1};let a=!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),a&&X(t,e)),n})):[],i.update(),a=!0,y(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(w)}else i.fragment&&i.fragment.c();e.intro&&K(t.$$.fragment),U(t,e.target,e.anchor,e.customElement),F()}j(c)}class tt{$destroy(){V(this,1),this.$destroy=m}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function et(t){return{c:m,m:m,p:m,i:m,o:m,d:m}}function nt(t){let e,n,o,s,l,c,i,a,u,d,f,m,p,v,y,g,$,O,j,C,P,B,S,T,D,N,M,A,G,F,q,Y,R=t[18].identity.description+"",W=t[18].identity.domain+"",z=t[18].identity.circle+"";return G=new t[3]({props:{class:"divider"}}),q=new r({props:{schema:t[18],recID:t[0],prevEventID:t[1],prev:t[2],noEscapeButton:"true",root:"true"}}),q.$on("back",t[6]),{c(){e=k("div"),n=k("div"),o=k("p"),s=E(),l=k("table"),c=k("tr"),i=k("td"),i.textContent="Beschreibung:",a=E(),u=k("td"),d=x(R),f=E(),m=k("tr"),p=k("td"),p.textContent="Domain:",v=E(),y=k("td"),g=x(W),$=E(),O=k("tr"),j=k("td"),j.textContent="Circle:",C=E(),P=k("td"),B=x(z),S=E(),T=k("tr"),D=k("td"),D.textContent="Status:",N=E(),M=k("td"),M.textContent=`${t[4].status}`,A=E(),Q(G.$$.fragment),F=E(),Q(q.$$.fragment),I(i,"class","svelte-1w8vyvg"),I(u,"class","svelte-1w8vyvg"),I(c,"class","svelte-1w8vyvg"),I(p,"class","svelte-1w8vyvg"),I(y,"class","svelte-1w8vyvg"),I(m,"class","svelte-1w8vyvg"),I(j,"class","svelte-1w8vyvg"),I(P,"class","svelte-1w8vyvg"),I(O,"class","svelte-1w8vyvg"),I(D,"class","svelte-1w8vyvg"),I(M,"class","svelte-1w8vyvg"),I(T,"class","svelte-1w8vyvg"),I(n,"class","subcat"),_(e,"height","inherit")},m(t,r){h(t,e,r),b(e,n),b(n,o),b(n,s),b(n,l),b(l,c),b(c,i),b(c,a),b(c,u),b(u,d),b(l,f),b(l,m),b(m,p),b(m,v),b(m,y),b(y,g),b(l,$),b(l,O),b(O,j),b(O,C),b(O,P),b(P,B),b(l,S),b(l,T),b(T,D),b(T,N),b(T,M),b(e,A),U(G,e,null),b(e,F),U(q,e,null),Y=!0},p(t,e){const n={};1&e&&(n.recID=t[0]),2&e&&(n.prevEventID=t[1]),4&e&&(n.prev=t[2]),q.$set(n)},i(t){Y||(K(G.$$.fragment,t),K(q.$$.fragment,t),Y=!0)},o(t){H(G.$$.fragment,t),H(q.$$.fragment,t),Y=!1},d(t){t&&w(e),V(G),V(q)}}}function ot(t){return{c:m,m:m,p:m,i:m,o:m,d:m}}function rt(t){let e,n,o={ctx:t,current:null,token:null,hasCatch:!1,pending:ot,then:nt,catch:et,value:18,blocks:[,,,]};return J(t[5],o),{c(){e=k("div"),o.block.c(),I(e,"class","content svelte-1w8vyvg")},m(t,r){h(t,e,r),o.block.m(e,o.anchor=null),o.mount=()=>e,o.anchor=null,n=!0},p(e,[n]){!function(t,e,n){const o=e.slice(),{resolved:r}=t;t.current===t.then&&(o[t.value]=r),t.current===t.catch&&(o[t.error]=r),t.block.p(o,n)}(o,t=e,n)},i(t){n||(K(o.block),n=!0)},o(t){for(let t=0;t<3;t+=1){H(o.blocks[t])}n=!1},d(t){t&&w(e),o.block.d(),o.token=null,o=null}}}function st(t,o,r){const{Card:s,Table:l,Button:c,Modal:i,Tabs:a,Divider:u,FormField:d,TextField:f}=e;let{task:m}=o,{eventItem:p}=o,{followerEventId:v}=o;const y=m,g=p,$=n.getSchema(v||g._id);let b,h,w=y.docId||y.id;v&&(h=w,w=void 0,b=g._id);return t.$$set=t=>{"task"in t&&r(7,m=t.task),"eventItem"in t&&r(8,p=t.eventItem),"followerEventId"in t&&r(9,v=t.followerEventId)},[w,b,h,u,y,$,()=>window.singleSpaNavigate("/"),m,p,v]}class lt extends tt{constructor(t){var e;super(),document.getElementById("svelte-1w8vyvg-style")||((e=k("style")).id="svelte-1w8vyvg-style",e.textContent=".task_divider{background:#326173;color:#326173}.content.svelte-1w8vyvg.svelte-1w8vyvg{margin-bottom:0.2em}tr.svelte-1w8vyvg>td.svelte-1w8vyvg{padding:0}",b(document.head,e)),Z(this,t,st,rt,$,{task:7,eventItem:8,followerEventId:9})}}const{document:ct}=L;function it(t){let e,n,o,r,s,l;n=new t[2]({props:{name:"menu",items:t[21],value:t[22].name,class:"task_tabs"}}),n.$on("change",(function(){g(t[5](t[26],t[19],t[18]))&&t[5](t[26],t[19],t[18]).apply(this,arguments)}));var c=t[22].component;function i(t){return{props:{taskId:t[19],task:t[25],eventItem:t[23],followerEventId:t[24]}}}return c&&(s=new c(i(t))),{c(){e=k("div"),Q(n.$$.fragment),o=E(),r=k("div"),s&&Q(s.$$.fragment),I(e,"class","header"),I(r,"class","task_content")},m(t,c){h(t,e,c),U(n,e,null),h(t,o,c),h(t,r,c),s&&U(s,r,null),l=!0},p(e,o){t=e;const l={};2097152&o&&(l.items=t[21]),4194304&o&&(l.value=t[22].name),n.$set(l);const a={};if(524288&o&&(a.taskId=t[19]),33554432&o&&(a.task=t[25]),8388608&o&&(a.eventItem=t[23]),16777216&o&&(a.followerEventId=t[24]),c!==(c=t[22].component)){if(s){W();const t=s;H(t.$$.fragment,1,0,(()=>{V(t,1)})),z()}c?(s=new c(i(t)),Q(s.$$.fragment),K(s.$$.fragment,1),U(s,r,null)):s=null}else c&&s.$set(a)},i(t){l||(K(n.$$.fragment,t),s&&K(s.$$.fragment,t),l=!0)},o(t){H(n.$$.fragment,t),s&&H(s.$$.fragment,t),l=!1},d(t){t&&w(e),V(n),t&&w(o),t&&w(r),s&&V(s)}}}function at(t){let e,n,o;return n=new t[1]({props:{constrainWidth:!0,title:"Task: "+t[17],titleClass:"task_title",closeCallback:function(){return t[6](t[27])},class:"modal_class",$$slots:{default:[it]},$$scope:{ctx:t}}}),{c(){e=k("div"),Q(n.$$.fragment),_(e,"height","90%"),_(e,"min-height","30em")},m(t,r){h(t,e,r),U(n,e,null),o=!0},p(e,o){t=e;const r={};131072&o&&(r.title="Task: "+t[17]),401342464&o&&(r.$$scope={dirty:o,ctx:t}),n.$set(r)},i(t){o||(K(n.$$.fragment,t),o=!0)},o(t){H(n.$$.fragment,t),o=!1},d(t){t&&w(e),V(n)}}}function ut(t){let e,n;return e=new t[0]({props:{open:"true",noClickaway:"true",$$slots:{default:[at,({closeCallback:t})=>({27:t}),({closeCallback:t})=>t?134217728:0]},$$scope:{ctx:t}}}),e.$on("change",t[4]),{c(){Q(e.$$.fragment)},m(t,o){U(e,t,o),n=!0},p(t,n){const o={};401473536&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(K(e.$$.fragment,t),n=!0)},o(t){H(e.$$.fragment,t),n=!1},d(t){V(e,t)}}}function dt(t){let e,n,r;return n=new o({props:{update:t[3],$$slots:{default:[ut,({prop:{title:t,eventId:e,taskId:n,tabId:o,items:r,item:s,eventItem:l,followerEventId:c,task:i,findMenu:a}})=>({17:t,18:e,19:n,20:o,21:r,22:s,23:l,24:c,25:i,26:a}),({prop:t})=>(t?131072:0)|(t?262144:0)|(t?524288:0)|(t?1048576:0)|(t?2097152:0)|(t?4194304:0)|(t?8388608:0)|(t?16777216:0)|(t?33554432:0)|(t?67108864:0)]},$$scope:{ctx:t}}}),{c(){e=E(),Q(n.$$.fragment),ct.title="enablerr - Task"},m(t,o){h(t,e,o),U(n,t,o),r=!0},p(t,[e]){const o={};401473536&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){r||(K(n.$$.fragment,t),r=!0)},o(t){H(n.$$.fragment,t),r=!1},d(t){t&&w(e),V(n,t)}}}function ft(t){const{Modal:o,Dialog:r,Tabs:i,Card:a}=e;let u,d,f,m,p;const v={items:[{id:"task",name:"Aufgabe",component:lt},{id:"collab",name:"Kommunikation",component:c},{id:"workflow",name:"Workflow",component:s},{id:"report",name:"Resultat",component:l}],findBy(t,e){return this.items.find((n=>n[t]===e))},findByName(t){return this.findBy("name",t)},findById(t){return this.findBy("id",t)},deflt(){return this.items[0]},map(){return this.items.map((t=>t.name))}},y=()=>{scrollY=window.scrollY,f=document.body.style.position,m=document.body.style.overflow,p=document.body.style.width,document.body.style.position="fixed",document.body.style.top=`-${scrollY}px`,document.body.style.overflow="hidden",document.body.style.width="100%"};y();const g=(t,e,n)=>window.singleSpaNavigate(`/task/${t}/${e}/${n.id}`);return[o,r,i,async(t,e,o,r)=>{const s=v.findById(o);if(!s)return g(t,e,v.deflt());"task"!==o&&(r=void 0);let l={};const c=await n.getEvent(r||t),i=c.identity.designation;return e!==t&&(u===e?l=d:(u=e,d=l=await n.getTaskById(e))),{title:i,eventId:t,taskId:e,tabId:o,item:s,eventItem:c,followerEventId:r,task:l,items:v.map(),findMenu:t=>v.findByName(t)}},function(t){console.log("handle change modal",t.detail.value),t.detail.value?y():(document.body.style.position=f||"",document.body.style.top="",document.body.style.overflow=m||"",document.body.style.width=p||"",window.scrollTo(0,scrollY))},(t,e,n)=>({detail:{value:o}})=>g(n,e,t(o)),t=>(window.singleSpaNavigate("/"),t())]}class mt extends tt{constructor(t){var e;super(),ct.getElementById("svelte-d8sm4r-style")||((e=k("style")).id="svelte-d8sm4r-style",e.textContent=".task_tabs{padding-bottom:1em;max-width:20em}.header{position:absolute}.task_content{margin-top:3.5em;overflow:hidden}.modal_class{min-width:50vw;height:inherit;overflow:hidden}",b(ct.head,e)),Z(this,t,ft,dt,$,{})}}const pt=f({component:mt,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:vt,mount:yt,unmount:gt}=pt;t({bootstrap:vt,mount:yt,unmount:gt});t("Task",mt)}}}));
|
|
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,c,i;return{setters:[function(t){e=t.getAttractions},function(t){n=t.Request,o=t.Page},function(t){r=t.Form},function(t){s=t.Workflow},function(t){c=t.Report},function(t){i=t.Collaboration}],execute:function(){t("version","0.2.20");function l(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var a,u,d=(a=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({},c),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:l.bind(null,e,n),unmount:a.bind(null,e,n),update:u.bind(null,e,n)}};var c={component:null,domElementGetter:null,props:{}};function i(t){return Promise.resolve()}function l(t,e,n){var r=Object.keys(c),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),c=r();e.instance=new t.component(o(o({},s),{},{target:c,props:Object.assign({},n,t.props)}))}))}function a(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)}))}},a(u={exports:{}},u.exports),u.exports),f=l(d);function m(){}function p(t){return t()}function v(){return Object.create(null)}function y(t){t.forEach(p)}function g(t){return"function"==typeof t}function $(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function b(t,e){t.appendChild(e)}function h(t,e,n){t.insertBefore(e,n||null)}function w(t){t.parentNode.removeChild(t)}function k(t){return document.createElement(t)}function E(t){return document.createTextNode(t)}function x(){return E(" ")}function I(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function _(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}let O;function j(t){O=t}function C(){if(!O)throw new Error("Function called outside component initialization");return O}const P=[],B=[],S=[],T=[],D=Promise.resolve();let N=!1;function A(t){S.push(t)}let M=!1;const G=new Set;function F(){if(!M){M=!0;do{for(let t=0;t<P.length;t+=1){const e=P[t];j(e),q(e.$$)}for(j(null),P.length=0;B.length;)B.pop()();for(let t=0;t<S.length;t+=1){const e=S[t];G.has(e)||(G.add(e),e())}S.length=0}while(P.length);for(;T.length;)T.pop()();N=!1,M=!1,G.clear()}}function q(t){if(null!==t.fragment){t.update(),y(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(A)}}const Y=new Set;let W;function R(){W={r:0,c:[],p:W}}function z(){W.r||y(W.c),W=W.p}function K(t,e){t&&t.i&&(Y.delete(t),t.i(e))}function U(t,e,n,o){if(t&&t.o){if(Y.has(t))return;Y.add(t),W&&W.c.push((()=>{Y.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}function H(t,e){const n=e.token={};function o(t,o,r,s){if(e.token!==n)return;e.resolved=s;let c=e.ctx;void 0!==r&&(c=c.slice(),c[r]=s);const i=t&&(e.current=t)(c);let l=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(R(),U(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),z())})):e.block.d(1),i.c(),K(i,1),i.m(e.mount(),e.anchor),l=!0),e.block=i,e.blocks&&(e.blocks[o]=i),l&&F()}if((r=t)&&"object"==typeof r&&"function"==typeof r.then){const n=C();if(t.then((t=>{j(n),o(e.then,1,e.value,t),j(null)}),(t=>{if(j(n),o(e.catch,2,e.error,t),j(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}const J="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function L(t){t&&t.c()}function Q(t,e,n,o){const{fragment:r,on_mount:s,on_destroy:c,after_update:i}=t.$$;r&&r.m(e,n),o||A((()=>{const e=s.map(p).filter(g);c?c.push(...e):y(e),t.$$.on_mount=[]})),i.forEach(A)}function V(t,e){const n=t.$$;null!==n.fragment&&(y(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function X(t,e){-1===t.$$.dirty[0]&&(P.push(t),N||(N=!0,D.then(F)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function Z(t,e,n,o,r,s,c=[-1]){const i=O;j(t);const l=t.$$={fragment:null,ctx:null,props:s,update:m,not_equal:r,bound:v(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(i?i.$$.context:e.context||[]),callbacks:v(),dirty:c,skip_bound:!1};let a=!1;if(l.ctx=n?n(t,e.props||{},((e,n,...o)=>{const s=o.length?o[0]:n;return l.ctx&&r(l.ctx[e],l.ctx[e]=s)&&(!l.skip_bound&&l.bound[e]&&l.bound[e](s),a&&X(t,e)),n})):[],l.update(),a=!0,y(l.before_update),l.fragment=!!o&&o(l.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);l.fragment&&l.fragment.l(t),t.forEach(w)}else l.fragment&&l.fragment.c();e.intro&&K(t.$$.fragment),Q(t,e.target,e.anchor,e.customElement),F()}j(i)}class tt{$destroy(){V(this,1),this.$destroy=m}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function et(t){return{c:m,m:m,p:m,i:m,o:m,d:m}}function nt(t){let e,n,o,s,c,i,l,a,u,d,f,m,p,v,y,g,$,O,j,C,P,B,S,T,D,N,A,M,G,F,q,Y,W=t[18].identity.description+"",R=t[18].identity.domain+"",z=t[18].identity.circle+"";return G=new t[3]({props:{class:"divider"}}),q=new r({props:{schema:t[18],recID:t[0],prevEventID:t[1],prev:t[2],noEscapeButton:"true",root:"true"}}),q.$on("back",t[6]),{c(){e=k("div"),n=k("div"),o=k("p"),s=x(),c=k("table"),i=k("tr"),l=k("td"),l.textContent="Beschreibung:",a=x(),u=k("td"),d=E(W),f=x(),m=k("tr"),p=k("td"),p.textContent="Domain:",v=x(),y=k("td"),g=E(R),$=x(),O=k("tr"),j=k("td"),j.textContent="Circle:",C=x(),P=k("td"),B=E(z),S=x(),T=k("tr"),D=k("td"),D.textContent="Status:",N=x(),A=k("td"),A.textContent=`${t[4].status}`,M=x(),L(G.$$.fragment),F=x(),L(q.$$.fragment),I(l,"class","svelte-1w8vyvg"),I(u,"class","svelte-1w8vyvg"),I(i,"class","svelte-1w8vyvg"),I(p,"class","svelte-1w8vyvg"),I(y,"class","svelte-1w8vyvg"),I(m,"class","svelte-1w8vyvg"),I(j,"class","svelte-1w8vyvg"),I(P,"class","svelte-1w8vyvg"),I(O,"class","svelte-1w8vyvg"),I(D,"class","svelte-1w8vyvg"),I(A,"class","svelte-1w8vyvg"),I(T,"class","svelte-1w8vyvg"),I(n,"class","subcat"),_(e,"height","inherit")},m(t,r){h(t,e,r),b(e,n),b(n,o),b(n,s),b(n,c),b(c,i),b(i,l),b(i,a),b(i,u),b(u,d),b(c,f),b(c,m),b(m,p),b(m,v),b(m,y),b(y,g),b(c,$),b(c,O),b(O,j),b(O,C),b(O,P),b(P,B),b(c,S),b(c,T),b(T,D),b(T,N),b(T,A),b(e,M),Q(G,e,null),b(e,F),Q(q,e,null),Y=!0},p(t,e){const n={};1&e&&(n.recID=t[0]),2&e&&(n.prevEventID=t[1]),4&e&&(n.prev=t[2]),q.$set(n)},i(t){Y||(K(G.$$.fragment,t),K(q.$$.fragment,t),Y=!0)},o(t){U(G.$$.fragment,t),U(q.$$.fragment,t),Y=!1},d(t){t&&w(e),V(G),V(q)}}}function ot(t){return{c:m,m:m,p:m,i:m,o:m,d:m}}function rt(t){let e,n,o={ctx:t,current:null,token:null,hasCatch:!1,pending:ot,then:nt,catch:et,value:18,blocks:[,,,]};return H(t[5],o),{c(){e=k("div"),o.block.c(),I(e,"class","content svelte-1w8vyvg")},m(t,r){h(t,e,r),o.block.m(e,o.anchor=null),o.mount=()=>e,o.anchor=null,n=!0},p(e,[n]){!function(t,e,n){const o=e.slice(),{resolved:r}=t;t.current===t.then&&(o[t.value]=r),t.current===t.catch&&(o[t.error]=r),t.block.p(o,n)}(o,t=e,n)},i(t){n||(K(o.block),n=!0)},o(t){for(let t=0;t<3;t+=1){U(o.blocks[t])}n=!1},d(t){t&&w(e),o.block.d(),o.token=null,o=null}}}function st(t,o,r){const{Card:s,Table:c,Button:i,Modal:l,Tabs:a,Divider:u,FormField:d,TextField:f}=e;let{task:m}=o,{eventItem:p}=o,{followerEventId:v}=o;const y=m,g=p,$=n.getSchema(v||g._id);let b,h,w=y.docId||y.id;v&&(h=w,w=void 0,b=g._id);return t.$$set=t=>{"task"in t&&r(7,m=t.task),"eventItem"in t&&r(8,p=t.eventItem),"followerEventId"in t&&r(9,v=t.followerEventId)},[w,b,h,u,y,$,()=>window.singleSpaNavigate("/"),m,p,v]}class ct extends tt{constructor(t){var e;super(),document.getElementById("svelte-1w8vyvg-style")||((e=k("style")).id="svelte-1w8vyvg-style",e.textContent=".task_divider{background:#326173;color:#326173}.content.svelte-1w8vyvg.svelte-1w8vyvg{margin-bottom:0.2em}tr.svelte-1w8vyvg>td.svelte-1w8vyvg{padding:0}",b(document.head,e)),Z(this,t,st,rt,$,{task:7,eventItem:8,followerEventId:9})}}const{document:it}=J;function lt(t){let e,n,o,r,s,c;n=new t[2]({props:{name:"menu",items:t[22],value:t[23].name,class:"task_tabs"}}),n.$on("change",(function(){g(t[5](t[27],t[20],t[19]))&&t[5](t[27],t[20],t[19]).apply(this,arguments)}));var i=t[23].component;function l(t){return{props:{taskId:t[20],task:t[26],eventItem:t[24],followerEventId:t[25]}}}return i&&(s=new i(l(t)),s.$on("back",t[6])),{c(){e=k("div"),L(n.$$.fragment),o=x(),r=k("div"),s&&L(s.$$.fragment),I(e,"class","header"),I(r,"class","task_content")},m(t,i){h(t,e,i),Q(n,e,null),h(t,o,i),h(t,r,i),s&&Q(s,r,null),c=!0},p(e,o){t=e;const c={};4194304&o&&(c.items=t[22]),8388608&o&&(c.value=t[23].name),n.$set(c);const a={};if(1048576&o&&(a.taskId=t[20]),67108864&o&&(a.task=t[26]),16777216&o&&(a.eventItem=t[24]),33554432&o&&(a.followerEventId=t[25]),i!==(i=t[23].component)){if(s){R();const t=s;U(t.$$.fragment,1,0,(()=>{V(t,1)})),z()}i?(s=new i(l(t)),s.$on("back",t[6]),L(s.$$.fragment),K(s.$$.fragment,1),Q(s,r,null)):s=null}else i&&s.$set(a)},i(t){c||(K(n.$$.fragment,t),s&&K(s.$$.fragment,t),c=!0)},o(t){U(n.$$.fragment,t),s&&U(s.$$.fragment,t),c=!1},d(t){t&&w(e),V(n),t&&w(o),t&&w(r),s&&V(s)}}}function at(t){let e,n,o;return n=new t[1]({props:{constrainWidth:!0,title:"Task: "+t[18],titleClass:"task_title",closeCallback:t[7],class:"modal_class",$$slots:{default:[lt]},$$scope:{ctx:t}}}),{c(){e=k("div"),L(n.$$.fragment),_(e,"height","90%"),_(e,"min-height","30em")},m(t,r){h(t,e,r),Q(n,e,null),o=!0},p(t,e){const o={};262144&e&&(o.title="Task: "+t[18]),802684928&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(K(n.$$.fragment,t),o=!0)},o(t){U(n.$$.fragment,t),o=!1},d(t){t&&w(e),V(n)}}}function ut(t){let e,n;return e=new t[0]({props:{open:"true",noClickaway:"true",$$slots:{default:[at,({closeCallback:t})=>({28:t}),({closeCallback:t})=>t?268435456:0]},$$scope:{ctx:t}}}),e.$on("change",t[4]),{c(){L(e.$$.fragment)},m(t,o){Q(e,t,o),n=!0},p(t,n){const o={};802947072&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(K(e.$$.fragment,t),n=!0)},o(t){U(e.$$.fragment,t),n=!1},d(t){V(e,t)}}}function dt(t){let e,n,r;return n=new o({props:{update:t[3],$$slots:{default:[ut,({prop:{title:t,eventId:e,taskId:n,tabId:o,items:r,item:s,eventItem:c,followerEventId:i,task:l,findMenu:a}})=>({18:t,19:e,20:n,21:o,22:r,23:s,24:c,25:i,26:l,27:a}),({prop:t})=>(t?262144:0)|(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)]},$$scope:{ctx:t}}}),{c(){e=x(),L(n.$$.fragment),it.title="enablerr - Task"},m(t,o){h(t,e,o),Q(n,t,o),r=!0},p(t,[e]){const o={};802947072&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){r||(K(n.$$.fragment,t),r=!0)},o(t){U(n.$$.fragment,t),r=!1},d(t){t&&w(e),V(n,t)}}}function ft(t){const{Modal:o,Dialog:r,Tabs:l,Card:a}=e;let u,d,f,m,p;const v={items:[{id:"task",name:"Aufgabe",component:ct},{id:"collab",name:"Kommunikation",component:i},{id:"workflow",name:"Workflow",component:s},{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))}},y=()=>{scrollY=window.scrollY,f=document.body.style.position,m=document.body.style.overflow,p=document.body.style.width,document.body.style.position="fixed",document.body.style.top=`-${scrollY}px`,document.body.style.overflow="hidden",document.body.style.width="100%"};y();const g=(t,e,n)=>window.singleSpaNavigate(`/task/${t}/${e}/${n.id}`);return[o,r,l,async(t,e,o,r)=>{const s=v.findById(o);if(!s)return g(t,e,v.deflt());"task"!==o&&(r=void 0);let c={status:"Neu"};const i=await n.getEvent(t);let l=i.identity.designation;return r&&(l=(await n.getEvent(r)).identity.designation),e!==t&&(u===e?c=d:(u=e,d=c=await n.getTaskById(e))),{title:l,eventId:t,taskId:e,tabId:o,item:s,eventItem:i,followerEventId:r,task:c,items:v.map(),findMenu:t=>v.findByName(t)}},function(t){t.detail.value?y():(document.body.style.position=f||"",document.body.style.top="",document.body.style.overflow=m||"",document.body.style.width=p||"",window.scrollTo(0,scrollY))},(t,e,n)=>({detail:{value:o}})=>g(n,e,t(o)),function(e){!function(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t(e)))}(t,e)},()=>window.singleSpaNavigate("/?noUpdate")]}class mt extends tt{constructor(t){var e;super(),it.getElementById("svelte-d8sm4r-style")||((e=k("style")).id="svelte-d8sm4r-style",e.textContent=".task_tabs{padding-bottom:1em;max-width:20em}.header{position:absolute}.task_content{margin-top:3.5em;overflow:hidden}.modal_class{min-width:50vw;height:inherit;overflow:hidden}",b(it.head,e)),Z(this,t,ft,dt,$,{})}}const pt=f({component:mt,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:vt,mount:yt,unmount:gt}=pt;t({bootstrap:vt,mount:yt,unmount:gt});t("Task",mt)}}}));
|