@enablerr-ui/task 0.2.24 → 0.2.26
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.24");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 h(){return Object.create(null)}function b(t){t.forEach(p)}function $(t){return"function"==typeof t}function v(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function y(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(),b(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||b(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)}}function L(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}const Q="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function U(t){t&&t.c()}function V(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):b(e),t.$$.on_mount=[]})),l.forEach(A)}function X(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 Z(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:h(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l?l.$$.context:e.context||[]),callbacks:h(),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,b(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),V(t,e.target,e.anchor,e.customElement),F()}j(l)}class tt{$destroy(){X(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,s,l,c,a,u,d,f,m,p,h,b,$,v,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:",h=I(),b=w("td"),$=E(R),v=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(),U(G.$$.fragment),q=I(),U(F.$$.fragment),x(c,"class","svelte-hi52u2"),x(u,"class","svelte-hi52u2"),x(l,"class","svelte-hi52u2"),x(p,"class","svelte-hi52u2"),x(b,"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),y(e,n),y(n,o),y(n,i),y(n,s),y(s,l),y(l,c),y(l,a),y(l,u),y(u,d),y(s,f),y(s,m),y(m,p),y(m,h),y(m,b),y(b,$),y(s,v),y(s,O),y(O,j),y(O,C),y(O,P),y(P,B),y(s,S),y(s,T),y(T,D),y(T,N),y(T,M),y(e,A),V(G,e,null),y(e,q),V(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),X(G),X(F)}}}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:19,blocks:[,,,]};return L(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 it(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:h}=o,{followerEventId:b}=o;const $=m,v=h,y=n.getSchema(b||v._id);let g,k,w=$.docId||$.id;b&&(k=w,w=void 0,g=v._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,h=t.eventItem),"followerEventId"in t&&r(10,b=t.followerEventId)},[w,g,k,u,$,y,()=>window.singleSpaNavigate("/"),m,p,h,b]}class st extends tt{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}",y(document.head,e)),Z(this,t,it,rt,v,{task:7,taskId:8,eventItem:9,followerEventId:10})}}const{document:lt}=Q;function ct(t){let e,n,o,r,i,s,l,c,a=t[6](!!t[26])+"";n=new t[2]({props:{name:"menu",items:t[23],value:t[24].name,class:"task_tabs",tabClass:"menuTab"}}),n.$on("change",(function(){$(t[5](t[28],t[21],t[20],t[26]))&&t[5](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&&(l=new u(d(t)),l.$on("back",t[7])),{c(){e=w("div"),U(n.$$.fragment),o=I(),r=E(a),i=I(),s=w("div"),l&&U(l.$$.fragment),x(e,"class","header"),x(s,"class","task_content")},m(t,a){g(t,e,a),V(n,e,null),y(e,o),y(e,r),g(t,i,a),g(t,s,a),l&&V(l,s,null),c=!0},p(e,o){t=e;const i={};8388608&o&&(i.items=t[23]),16777216&o&&(i.value=t[24].name),n.$set(i),(!c||67108864&o)&&a!==(a=t[6](!!t[26])+"")&&function(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}(r,a);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(l){z();const t=l;J(t.$$.fragment,1,0,(()=>{X(t,1)})),K()}u?(l=new u(d(t)),l.$on("back",t[7]),U(l.$$.fragment),H(l.$$.fragment,1),V(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),X(n),t&&k(i),t&&k(s),l&&X(l)}}}function at(t){let e,n,o;return n=new t[1]({props:{constrainWidth:!0,title:"Task: "+t[19],titleClass:"task_title",closeCallback:t[8],class:"modal_class",$$slots:{default:[ct]},$$scope:{ctx:t}}}),{c(){e=w("div"),U(n.$$.fragment),_(e,"height","90%"),_(e,"min-height","30em")},m(t,r){g(t,e,r),V(n,e,null),o=!0},p(t,e){const o={};524288&e&&(o.title="Task: "+t[19]),1605369856&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),X(n)}}}function ut(t){let e,n;return e=new t[0]({props:{class:"tModal",open:"true",noClickaway:"true",$$slots:{default:[at,({closeCallback:t})=>({29:t}),({closeCallback:t})=>t?536870912:0]},$$scope:{ctx:t}}}),e.$on("change",t[4]),{c(){U(e.$$.fragment)},m(t,o){V(e,t,o),n=!0},p(t,n){const o={};1605894144&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){X(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:s,followerEventId:l,task:c,findMenu:a}})=>({19:t,20:e,21:n,22:o,23:r,24:i,25:s,26:l,27:c,28:a}),({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=I(),U(n.$$.fragment),lt.title="enablerr - Task"},m(t,o){g(t,e,o),V(n,t,o),r=!0},p(t,[e]){const o={};1605894144&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),X(n,t)}}}function ft(t){const{Modal:o,Dialog:r,Tabs:c,Card:a}=e;let u,d,f,m,p;const h={items:[{id:"task",name:"Aufgabe",component:st},{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,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%"};b();const $=(t,e,n)=>window.singleSpaNavigate(`/task/${t}/${e}/${n.id}`);return[o,r,c,async(t,e,o,r)=>{const i=h.findById(o);if(!i)return $(t,e,h.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&&(u===e?s=d:(u=e,d=s=await n.getTaskById(e))),{title:c,eventId:t,taskId:e,tabId:o,item:i,eventItem:l,followerEventId:r,task:s,items:h.map(),findMenu:t=>h.findByName(t)}},function(t){t.detail.value?b():(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,o)=>({detail:{value:r}})=>{o||$(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 mt extends tt{constructor(t){var e;super(),lt.getElementById("svelte-k272v2-style")||((e=w("style")).id="svelte-k272v2-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-height:70vh;min-width:50vw;overflow:hidden}.tModal{align-items:end !important;padding-top:1em !important}",y(lt.head,e)),Z(this,t,ft,dt,v,{})}}const pt=f({component:mt,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:ht,mount:bt,unmount:$t}=pt;t({bootstrap:ht,mount:bt,unmount:$t});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,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.26");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])+"";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||33554432&o)&&a!==(a=t[6](!!t[25])+"")&&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_mount.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)}}}));
|