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