@enablerr-ui/task 0.2.14 → 0.2.16

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