@enablerr-ui/task 0.2.53 → 0.2.55

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,s,l,a;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){a=t.Collaboration}],execute:function(){t("version","0.2.53");function i(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:a.bind(null,e,n),mount:i.bind(null,e,n),unmount:c.bind(null,e,n),update:u.bind(null,e,n)}};var l={component:null,domElementGetter:null,props:{}};function a(t){return Promise.resolve()}function i(t,e,n){var r=Object.keys(l),s=Object.keys(t).reduce((function(e,n){return r.includes(n)||(e[n]=t[n]),e}),{});return Promise.resolve().then((function(){var r=function(t,e){return(e=e&&e.customProps?e.customProps:e).domElement?function(){return e.domElement}:e.domElementGetter?function(){return e.domElementGetter(e)}:t.domElementGetter?function(){return t.domElementGetter(e)}:function(t){var e=t.appName||t.name;if(!e)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(e);return function(){var t=document.getElementById(n);return t||((t=document.createElement("div")).id=n,document.body.appendChild(t)),t}}(e)}(t,n),l=r();e.instance=new t.component(o(o({},s),{},{target:l,props:Object.assign({},n,t.props)}))}))}function c(t,e){return Promise.resolve().then((function(){e.instance.$destroy?e.instance.$destroy():e.instance.destroy()}))}function u(t,e,n){return Promise.resolve().then((function(){e.instance.$set?e.instance.$set(n):e.instance.set(n)}))}},c(u={exports:{}},u.exports),u.exports),f=i(d);function m(){}function p(t){return t()}function b(){return Object.create(null)}function v(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 g(t,e){t.appendChild(e)}function k(t,e,n){t.insertBefore(e,n||null)}function h(t){t.parentNode.removeChild(t)}function w(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 D=!1;function N(){D||(D=!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()();D=!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:a}=t.$$;r&&r.m(e,n),o||A((()=>{const e=s.map(p).filter($);l?l.push(...e):v(e),t.$$.on_mount=[]})),a.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 a=_;O(t);const i=t.$$={fragment:null,ctx:null,props:s,update:m,not_equal:r,bound:b(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:e.context||[]),callbacks:b(),dirty:l,skip_bound:!1};let c=!1;if(i.ctx=n?n(t,e.props||{},((e,n,...o)=>{const s=o.length?o[0]:n;return i.ctx&&r(i.ctx[e],i.ctx[e]=s)&&(!i.skip_bound&&i.bound[e]&&i.bound[e](s),c&&function(t,e){-1===t.$$.dirty[0]&&(C.push(t),N(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],i.update(),c=!0,v(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(h)}else i.fragment&&i.fragment.c();e.intro&&K(t.$$.fragment),Q(t,e.target,e.anchor,e.customElement),q()}O(a)}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,a,i,c,u,d,f,m,p,b,v,$,y,_,O,j,C,P,B,S,T,D,N,A,M,G=t[19].identity.description+"",q=t[19].identity.domain+"",F=t[19].identity.circle+"";return D=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=w("div"),n=w("table"),o=w("tr"),s=w("td"),s.textContent="Beschreibung:",l=I(),a=w("td"),i=x(G),c=I(),u=w("tr"),d=w("td"),d.textContent="Domain:",f=I(),m=w("td"),p=x(q),b=I(),v=w("tr"),$=w("td"),$.textContent="Circle:",y=I(),_=w("td"),O=x(F),j=I(),C=w("tr"),P=w("td"),P.textContent="Status:",B=I(),S=w("td"),S.textContent=`${t[5].status}`,T=I(),L(D.$$.fragment),N=I(),L(A.$$.fragment),E(s,"class","svelte-131kw75"),E(a,"class","svelte-131kw75"),E(o,"class","svelte-131kw75"),E(d,"class","svelte-131kw75"),E(m,"class","svelte-131kw75"),E(u,"class","svelte-131kw75"),E($,"class","svelte-131kw75"),E(_,"class","svelte-131kw75"),E(v,"class","svelte-131kw75"),E(P,"class","svelte-131kw75"),E(S,"class","svelte-131kw75"),E(C,"class","svelte-131kw75"),E(e,"class","subcat svelte-131kw75")},m(t,r){k(t,e,r),g(e,n),g(n,o),g(o,s),g(o,l),g(o,a),g(a,i),g(n,c),g(n,u),g(u,d),g(u,f),g(u,m),g(m,p),g(n,b),g(n,v),g(v,$),g(v,y),g(v,_),g(_,O),g(n,j),g(n,C),g(C,P),g(C,B),g(C,S),k(t,T,r),Q(D,t,r),k(t,N,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(D.$$.fragment,t),K(A.$$.fragment,t),M=!0)},o(t){H(D.$$.fragment,t),H(A.$$.fragment,t),M=!1},d(t){t&&h(e),t&&h(T),U(D,t),t&&h(N),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 a=t&&(e.current=t)(l);let i=!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),a.c(),K(a,1),a.m(e.mount(),e.anchor),i=!0),e.block=a,e.blocks&&(e.blocks[o]=a),i&&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){k(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&&h(e),o.block.d(t),o.token=null,o=null}}}function ot(t,o,r){const{Card:s,Table:l,Button:a,Modal:i,Tabs:c,Divider:u,FormField:d,TextField:f}=e;let{task:m}=o,{taskId:p}=o,{eventItem:b}=o,{followerEventId:v}=o;const $=m,y=b,g=n.getSchema(v||y._id);let k,h,w=$.docId||$.id;v&&(h=w,w=void 0,k=y._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,b=t.eventItem),"followerEventId"in t&&r(10,v=t.followerEventId)},[p,w,k,h,u,$,g,()=>window.singleSpaNavigate("/"),m,b,v]}class rt extends X{constructor(t){var e;super(),document.getElementById("svelte-131kw75-style")||((e=w("style")).id="svelte-131kw75-style",e.textContent=".subcat.svelte-131kw75.svelte-131kw75{margin-bottom:0.5em}.subcat.svelte-131kw75 table td.svelte-131kw75{padding-bottom:0.5em}.subcat.svelte-131kw75 table tr.svelte-131kw75{vertical-align:top}.task_divider{background:#326173;color:#326173}tr.svelte-131kw75>td.svelte-131kw75{padding:0}",g(document.head,e)),V(this,t,ot,nt,y,{task:8,taskId:0,eventItem:9,followerEventId:10})}}const{document:st}=J;function lt(t){let e,n,o,r,s,l,a,i,c=t[7](!!t[26]||t[0]===t[20])+"";n=new t[3]({props:{name:"menu",items:t[23],value:t[24].name,class:"task--tabs",tabClass:"menuTab"}}),n.$on("change",(function(){$(t[6](t[28],t[21],t[20],t[26]))&&t[6](t[28],t[21],t[20],t[26]).apply(this,arguments)}));var u=t[24].component;function d(t){return{props:{taskId:t[21],task:t[27],eventItem:t[25],followerEventId:t[26]}}}return u&&(a=new u(d(t)),a.$on("back",t[8])),{c(){e=w("div"),L(n.$$.fragment),o=I(),r=x(c),s=I(),l=w("div"),a&&L(a.$$.fragment),E(e,"class","task--header svelte-lsbd36"),E(l,"class","task--content svelte-lsbd36")},m(t,c){k(t,e,c),Q(n,e,null),g(e,o),g(e,r),k(t,s,c),k(t,l,c),a&&Q(a,l,null),i=!0},p(e,o){t=e;const s={};8388608&o&&(s.items=t[23]),16777216&o&&(s.value=t[24].name),n.$set(s),(!i||68157441&o)&&c!==(c=t[7](!!t[26]||t[0]===t[20])+"")&&function(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}(r,c);const f={};if(2097152&o&&(f.taskId=t[21]),134217728&o&&(f.task=t[27]),33554432&o&&(f.eventItem=t[25]),67108864&o&&(f.followerEventId=t[26]),u!==(u=t[24].component)){if(a){R();const t=a;H(t.$$.fragment,1,0,(()=>{U(t,1)})),z()}u?(a=new u(d(t)),a.$on("back",t[8]),L(a.$$.fragment),K(a.$$.fragment,1),Q(a,l,null)):a=null}else u&&a.$set(f)},i(t){i||(K(n.$$.fragment,t),a&&K(a.$$.fragment,t),i=!0)},o(t){H(n.$$.fragment,t),a&&H(a.$$.fragment,t),i=!1},d(t){t&&h(e),U(n),t&&h(s),t&&h(l),a&&U(a)}}}function at(t){let e,n,o;return n=new t[2]({props:{constrainWidth:!0,title:t[19],titleClass:"task_title",closeCallback:t[9],class:"task--area",$$slots:{default:[lt]},$$scope:{ctx:t}}}),{c(){e=w("div"),L(n.$$.fragment),E(e,"class","task svelte-lsbd36")},m(t,r){k(t,e,r),Q(n,e,null),o=!0},p(t,e){const o={};524288&e&&(o.title=t[19]),1605369857&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(K(n.$$.fragment,t),o=!0)},o(t){H(n.$$.fragment,t),o=!1},d(t){t&&h(e),U(n)}}}function it(t){let e,n,o;return n=new t[1]({props:{open:"true",noClickaway:"true",class:"task--modal",$$slots:{default:[at,({closeCallback:t})=>({29:t}),({closeCallback:t})=>t?536870912:0]},$$scope:{ctx:t}}}),n.$on("change",t[5]),{c(){e=w("div"),L(n.$$.fragment),E(e,"class","task--page svelte-lsbd36")},m(t,r){k(t,e,r),Q(n,e,null),o=!0},p(t,e){const o={};1605894145&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&&h(e),U(n)}}}function ct(t){let e,n,r;return n=new o({props:{update:t[4],$$slots:{default:[it,({prop:{title:t,eventId:e,taskId:n,tabId:o,items:r,item:s,eventItem:l,followerEventId:a,task:i,findMenu:c}})=>({19:t,20:e,21:n,22:o,23:r,24:s,25:l,26:a,27:i,28:c}),({prop:t})=>(t?524288:0)|(t?1048576:0)|(t?2097152:0)|(t?4194304:0)|(t?8388608:0)|(t?16777216:0)|(t?33554432:0)|(t?67108864:0)|(t?134217728:0)|(t?268435456:0)]},$$scope:{ctx:t}}}),{c(){e=I(),L(n.$$.fragment),st.title="enablerr - Task"},m(t,o){k(t,e,o),Q(n,t,o),r=!0},p(t,[e]){const o={};1605894145&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&&h(e),U(n,t)}}}function ut(t,o,r){const{Modal:i,Dialog:c,Tabs:u}=e;let d,f,m,p,b,v;const $={items:[{id:"task",name:"Aufgabe",component:rt},{id:"collab",name:"Kommunikation",component:a},{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))}},y=()=>{scrollY=window.scrollY,p=document.body.style.position,b=document.body.style.overflow,v=document.body.style.width,document.body.style.position="fixed",document.body.style.top=`-${scrollY}px`,document.body.style.overflow="hidden",document.body.style.width="100%"};y();const g=(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",document.title="enablerr - Dashboard"}));return[m,i,c,u,async(t,e,o,s)=>{const l=$.findById(o);if(!l)return g(t,e,$.deflt());"task"!==o&&(s=void 0),r(0,m=e);let a={status:"Neu"};const i=await n.getEvent(t);let c=i.identity.designation;return s&&(c+=" => "+(await n.getEvent(s)).identity.designation),e!==t?d===e?a=f:(d=e,f=a=await n.getTaskById(e)):e=void 0,{title:c,eventId:t,taskId:e,tabId:o,item:l,eventItem:i,followerEventId:s,task:a,items:$.map(),findMenu:t=>$.findByName(t)}},function(t){t.detail.value?y():(document.body.style.position=p||"",document.body.style.top="",document.body.style.overflow=b||"",document.body.style.width=v||"",window.scrollTo(0,scrollY))},(t,e,n,o)=>({detail:{value:r}})=>{o||g(n,e,t(r))},t=>((N(),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-lsbd36-style")||((e=w("style")).id="svelte-lsbd36-style",e.textContent='.task--page.svelte-lsbd36 .task--modal{align-items:flex-start !important;overflow:auto !important}.task.svelte-lsbd36{margin-top:6em}@media(max-height: 900px){.task.svelte-lsbd36{margin-top:0}}.task.svelte-lsbd36 .task--area{overflow-x:hidden;overflow-y:auto;min-width:50vw}.task.svelte-lsbd36 .dialog nav[role="group"]{display:flex;justify-content:flex-start;flex-direction:row;flex-wrap:nowrap;gap:1em}.task--header.svelte-lsbd36{margin-top:0.5em}.task--header.svelte-lsbd36 .task_tabs{margin-bottom:1em}.task--content.svelte-lsbd36{margin-top:1em;overflow-x:hidden;overflow-y:auto;height:fit-content;min-height:60vh}',g(st.head,e)),V(this,t,ut,ct,y,{})}}const ft=f({component:dt,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:mt,mount:pt,unmount:bt}=ft;t({bootstrap:mt,mount:pt,unmount:bt});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,s,l,a;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){a=t.Collaboration}],execute:function(){t("version","0.2.55");function i(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:a.bind(null,e,n),mount:i.bind(null,e,n),unmount:c.bind(null,e,n),update:u.bind(null,e,n)}};var l={component:null,domElementGetter:null,props:{}};function a(t){return Promise.resolve()}function i(t,e,n){var r=Object.keys(l),s=Object.keys(t).reduce((function(e,n){return r.includes(n)||(e[n]=t[n]),e}),{});return Promise.resolve().then((function(){var r=function(t,e){return(e=e&&e.customProps?e.customProps:e).domElement?function(){return e.domElement}:e.domElementGetter?function(){return e.domElementGetter(e)}:t.domElementGetter?function(){return t.domElementGetter(e)}:function(t){var e=t.appName||t.name;if(!e)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(e);return function(){var t=document.getElementById(n);return t||((t=document.createElement("div")).id=n,document.body.appendChild(t)),t}}(e)}(t,n),l=r();e.instance=new t.component(o(o({},s),{},{target:l,props:Object.assign({},n,t.props)}))}))}function c(t,e){return Promise.resolve().then((function(){e.instance.$destroy?e.instance.$destroy():e.instance.destroy()}))}function u(t,e,n){return Promise.resolve().then((function(){e.instance.$set?e.instance.$set(n):e.instance.set(n)}))}},c(u={exports:{}},u.exports),u.exports),f=i(d);function m(){}function p(t){return t()}function b(){return Object.create(null)}function v(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 g(t,e){t.appendChild(e)}function k(t,e,n){t.insertBefore(e,n||null)}function h(t){t.parentNode.removeChild(t)}function w(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 D=!1;function N(){D||(D=!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()();D=!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:a}=t.$$;r&&r.m(e,n),o||A((()=>{const e=s.map(p).filter($);l?l.push(...e):v(e),t.$$.on_mount=[]})),a.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 a=_;O(t);const i=t.$$={fragment:null,ctx:null,props:s,update:m,not_equal:r,bound:b(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:e.context||[]),callbacks:b(),dirty:l,skip_bound:!1};let c=!1;if(i.ctx=n?n(t,e.props||{},((e,n,...o)=>{const s=o.length?o[0]:n;return i.ctx&&r(i.ctx[e],i.ctx[e]=s)&&(!i.skip_bound&&i.bound[e]&&i.bound[e](s),c&&function(t,e){-1===t.$$.dirty[0]&&(C.push(t),N(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],i.update(),c=!0,v(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(h)}else i.fragment&&i.fragment.c();e.intro&&K(t.$$.fragment),Q(t,e.target,e.anchor,e.customElement),q()}O(a)}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,a,i,c,u,d,f,m,p,b,v,$,y,_,O,j,C,P,B,S,T,D,N,A,M,G=t[19].identity.description+"",q=t[19].identity.domain+"",F=t[19].identity.circle+"";return D=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],readonly:t[5].task.readonly,root:"true"}}),A.$on("back",t[7]),{c(){e=w("div"),n=w("table"),o=w("tr"),s=w("td"),s.textContent="Beschreibung:",l=I(),a=w("td"),i=x(G),c=I(),u=w("tr"),d=w("td"),d.textContent="Domain:",f=I(),m=w("td"),p=x(q),b=I(),v=w("tr"),$=w("td"),$.textContent="Circle:",y=I(),_=w("td"),O=x(F),j=I(),C=w("tr"),P=w("td"),P.textContent="Status:",B=I(),S=w("td"),S.textContent=`${t[5].status}`,T=I(),L(D.$$.fragment),N=I(),L(A.$$.fragment),E(s,"class","svelte-131kw75"),E(a,"class","svelte-131kw75"),E(o,"class","svelte-131kw75"),E(d,"class","svelte-131kw75"),E(m,"class","svelte-131kw75"),E(u,"class","svelte-131kw75"),E($,"class","svelte-131kw75"),E(_,"class","svelte-131kw75"),E(v,"class","svelte-131kw75"),E(P,"class","svelte-131kw75"),E(S,"class","svelte-131kw75"),E(C,"class","svelte-131kw75"),E(e,"class","subcat svelte-131kw75")},m(t,r){k(t,e,r),g(e,n),g(n,o),g(o,s),g(o,l),g(o,a),g(a,i),g(n,c),g(n,u),g(u,d),g(u,f),g(u,m),g(m,p),g(n,b),g(n,v),g(v,$),g(v,y),g(v,_),g(_,O),g(n,j),g(n,C),g(C,P),g(C,B),g(C,S),k(t,T,r),Q(D,t,r),k(t,N,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(D.$$.fragment,t),K(A.$$.fragment,t),M=!0)},o(t){H(D.$$.fragment,t),H(A.$$.fragment,t),M=!1},d(t){t&&h(e),t&&h(T),U(D,t),t&&h(N),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 a=t&&(e.current=t)(l);let i=!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),a.c(),K(a,1),a.m(e.mount(),e.anchor),i=!0),e.block=a,e.blocks&&(e.blocks[o]=a),i&&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){k(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&&h(e),o.block.d(t),o.token=null,o=null}}}function ot(t,o,r){const{Card:s,Table:l,Button:a,Modal:i,Tabs:c,Divider:u,FormField:d,TextField:f}=e;let{task:m}=o,{taskId:p}=o,{eventItem:b}=o,{followerEventId:v}=o;const $=m,y=b,g=n.getSchema(v||y._id);let k,h,w=$.docId||$.id;v&&(h=w,w=void 0,k=y._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,b=t.eventItem),"followerEventId"in t&&r(10,v=t.followerEventId)},[p,w,k,h,u,$,g,()=>window.singleSpaNavigate("/"),m,b,v]}class rt extends X{constructor(t){var e;super(),document.getElementById("svelte-131kw75-style")||((e=w("style")).id="svelte-131kw75-style",e.textContent=".subcat.svelte-131kw75.svelte-131kw75{margin-bottom:0.5em}.subcat.svelte-131kw75 table td.svelte-131kw75{padding-bottom:0.5em}.subcat.svelte-131kw75 table tr.svelte-131kw75{vertical-align:top}.task_divider{background:#326173;color:#326173}tr.svelte-131kw75>td.svelte-131kw75{padding:0}",g(document.head,e)),V(this,t,ot,nt,y,{task:8,taskId:0,eventItem:9,followerEventId:10})}}const{document:st}=J;function lt(t){let e,n,o,r,s,l,a,i,c=t[7](!!t[26]||t[0]===t[20])+"";n=new t[3]({props:{name:"menu",items:t[23],value:t[24].name,class:"task--tabs",tabClass:"menuTab"}}),n.$on("change",(function(){$(t[6](t[28],t[21],t[20],t[26]))&&t[6](t[28],t[21],t[20],t[26]).apply(this,arguments)}));var u=t[24].component;function d(t){return{props:{taskId:t[21],task:t[27],eventItem:t[25],followerEventId:t[26]}}}return u&&(a=new u(d(t)),a.$on("back",t[8])),{c(){e=w("div"),L(n.$$.fragment),o=I(),r=x(c),s=I(),l=w("div"),a&&L(a.$$.fragment),E(e,"class","task--header svelte-lsbd36"),E(l,"class","task--content svelte-lsbd36")},m(t,c){k(t,e,c),Q(n,e,null),g(e,o),g(e,r),k(t,s,c),k(t,l,c),a&&Q(a,l,null),i=!0},p(e,o){t=e;const s={};8388608&o&&(s.items=t[23]),16777216&o&&(s.value=t[24].name),n.$set(s),(!i||68157441&o)&&c!==(c=t[7](!!t[26]||t[0]===t[20])+"")&&function(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}(r,c);const f={};if(2097152&o&&(f.taskId=t[21]),134217728&o&&(f.task=t[27]),33554432&o&&(f.eventItem=t[25]),67108864&o&&(f.followerEventId=t[26]),u!==(u=t[24].component)){if(a){R();const t=a;H(t.$$.fragment,1,0,(()=>{U(t,1)})),z()}u?(a=new u(d(t)),a.$on("back",t[8]),L(a.$$.fragment),K(a.$$.fragment,1),Q(a,l,null)):a=null}else u&&a.$set(f)},i(t){i||(K(n.$$.fragment,t),a&&K(a.$$.fragment,t),i=!0)},o(t){H(n.$$.fragment,t),a&&H(a.$$.fragment,t),i=!1},d(t){t&&h(e),U(n),t&&h(s),t&&h(l),a&&U(a)}}}function at(t){let e,n,o;return n=new t[2]({props:{constrainWidth:!0,title:t[19],titleClass:"task_title",closeCallback:t[9],class:"task--area",$$slots:{default:[lt]},$$scope:{ctx:t}}}),{c(){e=w("div"),L(n.$$.fragment),E(e,"class","task svelte-lsbd36")},m(t,r){k(t,e,r),Q(n,e,null),o=!0},p(t,e){const o={};524288&e&&(o.title=t[19]),1605369857&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(K(n.$$.fragment,t),o=!0)},o(t){H(n.$$.fragment,t),o=!1},d(t){t&&h(e),U(n)}}}function it(t){let e,n,o;return n=new t[1]({props:{open:"true",noClickaway:"true",class:"task--modal",$$slots:{default:[at,({closeCallback:t})=>({29:t}),({closeCallback:t})=>t?536870912:0]},$$scope:{ctx:t}}}),n.$on("change",t[5]),{c(){e=w("div"),L(n.$$.fragment),E(e,"class","task--page svelte-lsbd36")},m(t,r){k(t,e,r),Q(n,e,null),o=!0},p(t,e){const o={};1605894145&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&&h(e),U(n)}}}function ct(t){let e,n,r;return n=new o({props:{update:t[4],$$slots:{default:[it,({prop:{title:t,eventId:e,taskId:n,tabId:o,items:r,item:s,eventItem:l,followerEventId:a,task:i,findMenu:c}})=>({19:t,20:e,21:n,22:o,23:r,24:s,25:l,26:a,27:i,28:c}),({prop:t})=>(t?524288:0)|(t?1048576:0)|(t?2097152:0)|(t?4194304:0)|(t?8388608:0)|(t?16777216:0)|(t?33554432:0)|(t?67108864:0)|(t?134217728:0)|(t?268435456:0)]},$$scope:{ctx:t}}}),{c(){e=I(),L(n.$$.fragment),st.title="enablerr - Task"},m(t,o){k(t,e,o),Q(n,t,o),r=!0},p(t,[e]){const o={};1605894145&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&&h(e),U(n,t)}}}function ut(t,o,r){const{Modal:i,Dialog:c,Tabs:u}=e;let d,f,m,p,b,v;const $={items:[{id:"task",name:"Aufgabe",component:rt},{id:"collab",name:"Kommunikation",component:a},{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))}},y=()=>{scrollY=window.scrollY,p=document.body.style.position,b=document.body.style.overflow,v=document.body.style.width,document.body.style.position="fixed",document.body.style.top=`-${scrollY}px`,document.body.style.overflow="hidden",document.body.style.width="100%"};y();const g=(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",document.title="enablerr - Dashboard"}));return[m,i,c,u,async(t,e,o,s)=>{const l=$.findById(o);if(!l)return g(t,e,$.deflt());"task"!==o&&(s=void 0),r(0,m=e);let a={status:"Neu"};const i=await n.getEvent(t);let c=i.identity.designation;return s&&(c+=" => "+(await n.getEvent(s)).identity.designation),e!==t?d===e?a=f:(d=e,f=a=await n.getTaskById(e)):e=void 0,{title:c,eventId:t,taskId:e,tabId:o,item:l,eventItem:i,followerEventId:s,task:a,items:$.map(),findMenu:t=>$.findByName(t)}},function(t){t.detail.value?y():(document.body.style.position=p||"",document.body.style.top="",document.body.style.overflow=b||"",document.body.style.width=v||"",window.scrollTo(0,scrollY))},(t,e,n,o)=>({detail:{value:r}})=>{o||g(n,e,t(r))},t=>((N(),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-lsbd36-style")||((e=w("style")).id="svelte-lsbd36-style",e.textContent='.task--page.svelte-lsbd36 .task--modal{align-items:flex-start !important;overflow:auto !important}.task.svelte-lsbd36{margin-top:6em}@media(max-height: 900px){.task.svelte-lsbd36{margin-top:0}}.task.svelte-lsbd36 .task--area{overflow-x:hidden;overflow-y:auto;min-width:50vw}.task.svelte-lsbd36 .dialog nav[role="group"]{display:flex;justify-content:flex-start;flex-direction:row;flex-wrap:nowrap;gap:1em}.task--header.svelte-lsbd36{margin-top:0.5em}.task--header.svelte-lsbd36 .task_tabs{margin-bottom:1em}.task--content.svelte-lsbd36{margin-top:1em;overflow-x:hidden;overflow-y:auto;height:fit-content;min-height:60vh}',g(st.head,e)),V(this,t,ut,ct,y,{})}}const ft=f({component:dt,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:mt,mount:pt,unmount:bt}=ft;t({bootstrap:mt,mount:pt,unmount:bt});t("Task",dt)}}}));
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.53",
4
+ "version": "0.2.55",
5
5
  "os": [
6
6
  "darwin",
7
7
  "linux"