@enablerr-ui/form 0.2.49 → 0.2.51

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(["axios","@enablerr-ui/auth","@enablerr-ui/layout","@enablerr-ui/form"],(function(t){"use strict";var e,n,o,s,a;return{setters:[function(t){e=t.default},function(t){n=t.user},function(t){o=t.getGridHelp,s=t.getAttractions},function(t){a=t.TextArea}],execute:function(){function i(){}function r(t,e){for(const n in e)t[n]=e[n];return t}function l(t){return t()}function c(){return Object.create(null)}function u(t){t.forEach(l)}function d(t){return"function"==typeof t}function p(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function f(t,...e){if(null==t)return i;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function m(t){let e;return f(t,(t=>e=t))(),e}function h(t,e,n,o){if(t){const s=g(t,e,n,o);return t[0](s)}}function g(t,e,n,o){return t[1]&&o?r(n.ctx.slice(),t[1](o(e))):n.ctx}function $(t,e,n,o,s,a,i){const r=function(t,e,n,o){if(t[2]&&o){const s=t[2](o(n));if(void 0===e.dirty)return s;if("object"==typeof s){const t=[],n=Math.max(e.dirty.length,s.length);for(let o=0;o<n;o+=1)t[o]=e.dirty[o]|s[o];return t}return e.dirty|s}return e.dirty}(e,o,s,a);if(r){const s=g(e,n,o,i);t.p(s,r)}}function y(t,e){const n={};e=new Set(e);for(const o in t)e.has(o)||"$"===o[0]||(n[o]=t[o]);return n}function w(t,e,n){t.insertBefore(e,n||null)}function v(t){t.parentNode.removeChild(t)}function x(t){return document.createElement(t)}function b(){return t="",document.createTextNode(t);var t}function k(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function I(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}let S;function E(t){S=t}function N(){if(!S)throw new Error("Function called outside component initialization");return S}function j(){const t=N();return(e,n)=>{const o=t.$$.callbacks[e];if(o){const s=function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(e,n);o.slice().forEach((e=>{e.call(t,s)}))}}}const _=[],D=[],T=[],C=[],L=Promise.resolve();let M=!1;function P(t){T.push(t)}function F(t){C.push(t)}let A=!1;const B=new Set;function O(){if(!A){A=!0;do{for(let t=0;t<_.length;t+=1){const e=_[t];E(e),R(e.$$)}for(E(null),_.length=0;D.length;)D.pop()();for(let t=0;t<T.length;t+=1){const e=T[t];B.has(e)||(B.add(e),e())}T.length=0}while(_.length);for(;C.length;)C.pop()();M=!1,A=!1,B.clear()}}function R(t){if(null!==t.fragment){t.update(),u(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(P)}}const U=new Set;let q;function z(){q={r:0,c:[],p:q}}function H(){q.r||u(q.c),q=q.p}function V(t,e){t&&t.i&&(U.delete(t),t.i(e))}function G(t,e,n,o){if(t&&t.o){if(U.has(t))return;U.add(t),q&&q.c.push((()=>{U.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}function J(t,e){const n=e.token={};function o(t,o,s,a){if(e.token!==n)return;e.resolved=a;let i=e.ctx;void 0!==s&&(i=i.slice(),i[s]=a);const r=t&&(e.current=t)(i);let l=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(z(),G(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),H())})):e.block.d(1),r.c(),V(r,1),r.m(e.mount(),e.anchor),l=!0),e.block=r,e.blocks&&(e.blocks[o]=r),l&&O()}if((s=t)&&"object"==typeof s&&"function"==typeof s.then){const n=N();if(t.then((t=>{E(n),o(e.then,1,e.value,t),E(null)}),(t=>{if(E(n),o(e.catch,2,e.error,t),E(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 s}function W(t,e,n){const o=e.slice(),{resolved:s}=t;t.current===t.then&&(o[t.value]=s),t.current===t.catch&&(o[t.error]=s),t.block.p(o,n)}function K(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function Z(t){t&&t.c()}function Q(t,e,n,o){const{fragment:s,on_mount:a,on_destroy:i,after_update:r}=t.$$;s&&s.m(e,n),o||P((()=>{const e=a.map(l).filter(d);i?i.push(...e):u(e),t.$$.on_mount=[]})),r.forEach(P)}function X(t,e){const n=t.$$;null!==n.fragment&&(u(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Y(t,e){-1===t.$$.dirty[0]&&(_.push(t),M||(M=!0,L.then(O)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function tt(t,e,n,o,s,a,r=[-1]){const l=S;E(t);const d=t.$$={fragment:null,ctx:null,props:a,update:i,not_equal:s,bound:c(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l?l.$$.context:e.context||[]),callbacks:c(),dirty:r,skip_bound:!1};let p=!1;if(d.ctx=n?n(t,e.props||{},((e,n,...o)=>{const a=o.length?o[0]:n;return d.ctx&&s(d.ctx[e],d.ctx[e]=a)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](a),p&&Y(t,e)),n})):[],d.update(),p=!0,u(d.before_update),d.fragment=!!o&&o(d.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);d.fragment&&d.fragment.l(t),t.forEach(v)}else d.fragment&&d.fragment.c();e.intro&&V(t.$$.fragment),Q(t,e.target,e.anchor,e.customElement),O()}E(l)}class et{$destroy(){X(this,1),this.$destroy=i}$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 nt(t){let e,n,o,s,a;const i=t[5].default,r=h(i,t,t[4],null);return{c(){e=x("span"),r&&r.c(),I(e,"class",n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"),I(e,"title",t[0])},m(n,i){w(n,e,i),r&&r.m(e,null),o=!0,s||(a=k(e,"click",t[2]),s=!0)},p(t,[s]){r&&r.p&&(!o||16&s)&&$(r,i,t,t[4],s,null,null),(!o||2&s&&n!==(n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"))&&I(e,"class",n),(!o||1&s)&&I(e,"title",t[0])},i(t){o||(V(r,t),o=!0)},o(t){G(r,t),o=!1},d(t){t&&v(e),r&&r.d(t),s=!1,a()}}}function ot(t,e,n){let{$$slots:o={},$$scope:s}=e,{title:a}=e,{link:i="/"}=e,{color:r}=e;return t.$$set=t=>{"title"in t&&n(0,a=t.title),"link"in t&&n(3,i=t.link),"color"in t&&n(1,r=t.color),"$$scope"in t&&n(4,s=t.$$scope)},[a,r,()=>window.singleSpaNavigate(i),i,s,o]}const st=[];const at=t("notification",function(t,e=i){let n;const o=[];function s(e){if(p(t,e)&&(t=e,n)){const e=!st.length;for(let e=0;e<o.length;e+=1){const n=o[e];n[1](),st.push(n,t)}if(e){for(let t=0;t<st.length;t+=2)st[t][0](st[t+1]);st.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(a,r=i){const l=[a,r];return o.push(l),1===o.length&&(n=e(s)||i),a(t),()=>{const t=o.indexOf(l);-1!==t&&o.splice(t,1),0===o.length&&(n(),n=null)}}}}(!1));let it=[];const{loggedIn:rt}=n,lt=(t,e)=>{let n="";return t&&(n+=`/${t}`,e&&(n+=`/${e}`)),n},ct=async(t,e)=>{const n=lt(t,e);return(await axios.get("/api/comm/chat"+n)).data.filter((e=>t?e.event&&e.event._id===t:!e.event)).filter((t=>e?t.task&&t.task._id===e:!t.task))},{loggedIn:ut}=n,dt=async(t,e)=>[];let pt;pt=[{id:"0001",email:"andrea.zirn@fhnw.ch",firstName:"Andrea",lastName:"Zirn",jobDescription:"Softwaredeveloper, Design Guru",status:"busy"},{id:"0002",email:"cloe.huesser@fhnw.ch",firstName:"Cloe",lastName:"Hüsser",jobDescription:"Softwaredeveloper, Javascript Hacker",status:"online"},{id:"0003",email:"simone.beck@fhnw.ch",firstName:"Simone",lastName:"Beck",jobDescription:"HR Verantwortliche",status:"offline"},{id:"0004",email:"shenia.scherer@fhnw.ch",firstName:"Shenia",lastName:"Scherer",jobDescription:"IIT Praktikantin",status:"offline"},{id:"0005",email:"puijanjenny.tran@students.fhnw.ch",firstName:"Jenny",lastName:"Tran",jobDescription:"IP-6 Studentin",status:"offline"},{id:"0006",email:"sinead.ganz@students.fhnw.ch",firstName:"Sinead",lastName:"Ganz",jobDescription:"IP-6 Studentin",status:"offline"}];let ft=[{id:"0000",userId:"0001",moduleList:[{moduleId:1111,position:0},{moduleId:2222,position:1}]},{id:"0001",userId:"0001",moduleList:[{moduleId:1111,position:0},{moduleId:2222,position:1}]},{id:"0002",userId:"0002",moduleList:[{moduleId:1111,position:0},{moduleId:2222,position:3},{moduleId:3333,position:2},{moduleId:4444,position:2}]},{id:"0003",userId:"0004",moduleList:[{moduleId:1111,position:0},{moduleId:2222,position:1}]},{id:"0004",userId:"0005",moduleList:[{moduleId:1111,position:0},{moduleId:9999,position:1}]},{id:"0001",userId:"0001",moduleList:[{moduleId:1111,position:0},{moduleId:2222,position:1},{moduleId:3333,position:2},{moduleId:4444,position:3}]}];let mt=[{id:"001",role:"Kundenmanager",user:"002"},{id:"002",role:"HR",user:"003"},{id:"003",role:"Projektleiter",user:"001"},{id:"004",role:"Software Developer",user:"001"},{id:"005",role:"Software Developer",user:"002"}];const ht=[{id:1111,name:"TaskModule",text:"Alle Tasks",status:!1,6:o.item({x:0,y:0,w:4,h:5,customDragger:!0}),5:o.item({x:0,y:0,w:4,h:5,customDragger:!0}),4:o.item({x:0,y:0,w:3,h:5,customDragger:!0}),3:o.item({x:0,y:0,w:2,h:5,customDragger:!0}),2:o.item({x:0,y:0,w:1,h:5,customDragger:!0}),1:o.item({x:0,y:0,w:1,h:5,customDragger:!0})},{id:3333,name:"Chat Modul",text:"Chat",status:!1,6:o.item({x:4,y:0,w:1,h:5}),5:o.item({x:4,y:0,w:1,h:5}),4:o.item({x:3,y:0,w:1,h:5}),3:o.item({x:2,y:0,w:1,h:5}),2:o.item({x:1,y:0,w:1,h:5}),1:o.item({x:1,y:0,w:1,h:5})},{id:4444,name:"Feedback Modul",text:"Feedback",status:!1,6:o.item({x:5,y:0,w:1,h:5}),5:o.item({x:5,y:0,w:1,h:5}),4:o.item({x:4,y:0,w:1,h:5}),3:o.item({x:3,y:0,w:1,h:5}),2:o.item({x:2,y:0,w:1,h:5}),1:o.item({x:2,y:0,w:1,h:5})},{id:9999,name:"Neues Modul",text:"+",status:!1,6:o.item({x:4,y:0,w:1,h:2}),5:o.item({x:4,y:0,w:1,h:2}),4:o.item({x:3,y:0,w:1,h:2}),3:o.item({x:2,y:0,w:1,h:2}),2:o.item({x:1,y:0,w:1,h:2}),1:o.item({x:1,y:0,w:1,h:2})}],{cacheValidator:gt,onLogout:$t}=n;e.interceptors.request.use((t=>(t.headers.enablerr=window.location.hostname,t))),e.interceptors.response.use((t=>203===t.status?Promise.reject(t.data.error):t),(t=>400===t.response.status?($t(),Promise.reject(t)):t));let yt=new Map;const wt=(t,e)=>(...n)=>{const o=m(gt),s=window.localStorage.getItem("enablerr-tenant");"invalid"===o.status&&(yt=new Map,gt.set({tenant:s,status:""}));const a=[].concat(s,e,n).join("-");let i=yt.get(a);if(!i)try{i=t(...n),yt.set(a,i)}catch(t){throw t}return i};var vt={getSchema:wt((t=>axios.get("/api/schema/"+t).then((t=>t.data)).catch((e=>{throw`schema with id ${t} not found`}))),"getSchema"),getSchemas:async()=>(await axios.get("/api/schema")).data,getSchemaByClass:wt((async t=>(await axios.get(`/api/schemabyclass/${t}`)).data),"getSchemaByClass"),getEvents:wt((()=>axios.get("/api/event").then((t=>t.data)).catch((t=>{throw"Events not found"}))),"getEvents"),getEvent:wt((t=>axios.get("/api/event/"+t).then((t=>t.data)).catch((e=>{throw`Event with id ${t} not found`}))),"getEvent"),getTask:(t,e)=>axios.get(`/api/task/${t}:${e}?display=form`).then((t=>t.data)).catch((t=>{throw"task not found"})),getTaskList:async(t,e)=>(await axios.get(`/api/task/${t}:${e}?display=list`)).data,getTasksList:t=>axios.get(`/api/tasks/${t}?display=list`).then((t=>t.data)).catch((t=>{throw"list not found"})),getTaskById:async t=>(await axios.post("/api/read/_task",{_id:t})).data[0],getTaskqueue:(t=!1,e)=>axios.post("/api/taskqueue",{id:t,task:e}).then((t=>t.data)).catch((t=>{throw"queue not found"})),createTaskByEventId:async t=>(await axios.post("/api/workflow/task",{event:t})).data,saveData:async(t,e)=>(await axios.post(`/api/${t}`,e)).data,deleteTask:async t=>(await axios.delete(`/api/_task/${t}`)).data,savePlugins:async(t,e)=>(await axios.post("/api/plugin",t,e)).data,savePlugin:async(t,e)=>(await axios.post(`/api/plugin/${t}`,e)).data,deletePlugin:async t=>(await axios.delete(`/api/plugin/${t}`)).data,deletePluginAndData:()=>axios.delete("/api/plugin"),getAuthStatus:async t=>(await axios.post("/api/auth/status",{email:t})).data,getUserSettings:async()=>(await axios.get("/api/user")).data,saveUserSettings:async t=>(await axios.post("/api/user",t)).data,saveDefaultSettings:(t,e)=>{let n={schema:"http://json-schema.org/draft-04/schema#",id:e,email:t,firstName:"",lastName:"",jobDescription:"",role:[],setting:{showJobDescription:!0,dashboardLayout:[{id:"0000",activated:!0,days:["Mo","Tu","We","Th","Fr","Sa","Su"],moduleList:[{moduleId:"1111",position:"0"},{moduleId:"9999",position:"1"}]}],notificationActivated:!0,showNotifications:!0,notificationToMail:!1,typesOfNotification:[]}};return axios.post("/api/user",n),n},authEnroll:async t=>(await axios.post("/api/auth/enroll",t)).data,authLogin:async(t,e)=>(await axios.post("/api/auth/login",{username:t,passcode:e})).data,authLogout:async()=>await axios.post("/api/auth/logout"),setTenant:async t=>(await axios.post("/api/auth/tenant",{id:t})).data,getAllChats:async()=>axios.get("/api/comm/chat").then((({data:t})=>t)),getChat:ct,saveChat:async(t,e,n)=>{const{user:o}=m(rt);let s=await ct(t,e);s[0]||(n.sender=o);const a=s[0]?"patch":"post",i=lt(t,e);return(await axios[a]("/api/comm/chat"+i,n)).data.id},getFeedback:dt,saveFeedback:async(t,e,n,o,s)=>{const a={};t&&(a.event={id:t}),e&&(a.task={id:e});let i=await dt();if(i[0]&&null!=s){let t=i.filter((t=>t._id===s));t={...t,...o};const{user:e}=m(ut);return n.sender=e,t[0].messages=(t[0].messages||[]).concat(n),console.log("has id",t[0].messages),(await axios.post("/api/commFeedback",t[0])).data.id}{i={...a},i={...i,...o};const{user:t}=m(ut);return n.sender=t,i.messages=(i.messages||[]).concat(n),console.log("new feedback",i),(await axios.post("/api/commFeedback",i)).data.id}},getUserReports:async t=>(await axios.get("/api/userreport/list/"+t)).data,uploadUserReport:async(t,e)=>(await axios.post("/api/userreport/"+t,e)).data,deleteUserReport:async t=>(await axios.delete("/api/userreport/"+t)).data,getUser:t=>pt.filter((e=>e.email==t)),getSettings:t=>ft.filter((e=>e.userId===t))[0],geDefaultModuleList:()=>[{moduleId:"1111",position:"0"},{moduleId:"9999",position:""}],getDefaultLayout:()=>[{id:"0000",activated:!0,days:["Mo","Tu","We","Th","Fr","Sa","Su"],moduleList:[{moduleId:"1111",position:"0"},{moduleId:"9999",position:"1"}]}],getNotifications:t=>axios.get("/api/notification").then((t=>t.data)),saveNotification:t=>{let e=it.filter((e=>e.id==t.id&&e.user==t.user));e.length>0?it[it.indexOf(e)]=t:it.unshift(t),at.set(!0),console.log("new notifications",it)},getNotificationTypes:wt((()=>axios.get("/api/notification/type").then((t=>t.data))),"getNotificationTypes"),getRoles:t=>mt.filter((e=>e.user===t)),getModules:t=>ht.filter((e=>t.includes(e.id))),getModuleName:t=>{const e=ht.find((e=>e.id===Number(t)));return e?e.name:"Unbekanntes Modul"},getAllModules:()=>ht};const xt=Intl.NumberFormat().formatToParts(1.1).find((({type:t})=>"decimal"===t)).value||".",bt=t=>"function"==typeof t,kt=t=>t&&t.toString,It=(t,...e)=>e.includes(t),St=t=>It(t,void 0,null),Et=t=>!St(t),Nt=(t=null,e,...n)=>{try{return e(...n)}catch{return t}},jt=t=>(e,...n)=>Nt(Nt("",t.toString),e,...n),_t=(t,e=2,n=0,o=t.toString(),s=n.toString())=>s.repeat(e-o.length)+o,Dt=(t,e=window)=>({listen(n,o){e[`${n}EventListener`](t,o)},start(t){this.listen("add",t)},stop(t){this.listen("remove",t)}}),Tt=(...t)=>!t.map((({value:t,check:e,text:n})=>e(t)||Mt(console.error,n))).every(Boolean),Ct=t=>(e,n)=>(Promise.resolve(n).then(e),t),Lt=Ct(!0),Mt=Ct(!1);t("util",Object.freeze({__proto__:null,decimalSeparator:xt,isFunction:bt,isStringable:kt,isObjEmpty:(t={})=>!Object.keys(t).length,hasValue:It,isNullish:St,isNotNullish:Et,bestValue:(t,...e)=>e.concat(t).find(Et),tryCatch:Nt,ensureStrValue:jt,padLeft:(...t)=>jt(t[0])(_t,...t),showupElement:(t="",e=0,n=document.getElementById(t))=>n&&n.style&&(n.style.display="block",setTimeout((()=>n.style.display="none"),e)),getListener:Dt,isMissing:Tt,go:Lt,stop:Mt}));const Pt="single-spa:routing-event",Ft=Dt(Pt);function At(t,{modulePath:e,update:n}){if(!1===n)return;if(Tt({value:n,check:bt,text:"<update> should be a function (dataListener)"},{value:e,check:kt,text:"<modulePath> should be a string (dataListener)"}))return;const o=e.toString()||"/",s=e=>{const s=e.currentTarget.location.pathname,[,a,...i]=s.split("/");o===(a||"/")&&t.dispatchEvent(new CustomEvent("data",{detail:{data:n(...i)}}))};return Ft.start(s),{destroy:()=>Ft.stop(s)}}const Bt=()=>window.dispatchEvent(new CustomEvent(Pt)),Ot=t=>({prop:4&t,tenant:8&t,user:8&t}),Rt=t=>({prop:t[11],refresh:Bt,tenant:t[3].tenant,user:t[3].user}),Ut=t=>({err:4&t,prop:4&t,tenant:8&t,user:8&t}),qt=t=>({err:t[12],prop:t[11],refresh:Bt,tenant:t[3].tenant,user:t[3].user}),zt=t=>({prop:4&t,tenant:8&t,user:8&t}),Ht=t=>({prop:t[11],refresh:Bt,tenant:t[3].tenant,user:t[3].user}),Vt=t=>({prop:4&t,tenant:8&t,user:8&t}),Gt=t=>({prop:t[11],refresh:Bt,tenant:t[3].tenant,user:t[3].user});function Jt(t){let e;const n=t[8].init,o=h(n,t,t[7],Rt);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,s){o&&o.p&&(!e||140&s)&&$(o,n,t,t[7],s,Ot,Rt)},i(t){e||(V(o,t),e=!0)},o(t){G(o,t),e=!1},d(t){o&&o.d(t)}}}function Wt(t){let e,n,o,s={ctx:t,current:null,token:null,hasCatch:!0,pending:Qt,then:Zt,catch:Kt,value:11,error:12,blocks:[,,,]};return J(n=t[2],s),{c(){e=b(),s.block.c()},m(t,n){w(t,e,n),s.block.m(t,s.anchor=n),s.mount=()=>e.parentNode,s.anchor=e,o=!0},p(e,o){t=e,s.ctx=t,4&o&&n!==(n=t[2])&&J(n,s)||W(s,t,o)},i(t){o||(V(s.block),o=!0)},o(t){for(let t=0;t<3;t+=1){G(s.blocks[t])}o=!1},d(t){t&&v(e),s.block.d(t),s.token=null,s=null}}}function Kt(t){let e;const n=t[8].error,o=h(n,t,t[7],qt);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,s){o&&o.p&&(!e||140&s)&&$(o,n,t,t[7],s,Ut,qt)},i(t){e||(V(o,t),e=!0)},o(t){G(o,t),e=!1},d(t){o&&o.d(t)}}}function Zt(t){let e;const n=t[8].default,o=h(n,t,t[7],Ht);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,s){o&&o.p&&(!e||140&s)&&$(o,n,t,t[7],s,zt,Ht)},i(t){e||(V(o,t),e=!0)},o(t){G(o,t),e=!1},d(t){o&&o.d(t)}}}function Qt(t){let e,n,o,s={ctx:t,current:null,token:null,hasCatch:!1,pending:te,then:Yt,catch:Xt,value:10,blocks:[,,,]};return J(n=t[5](t[1]),s),{c(){e=b(),s.block.c()},m(t,n){w(t,e,n),s.block.m(t,s.anchor=n),s.mount=()=>e.parentNode,s.anchor=e,o=!0},p(e,o){t=e,s.ctx=t,2&o&&n!==(n=t[5](t[1]))&&J(n,s)||W(s,t,o)},i(t){o||(V(s.block),o=!0)},o(t){for(let t=0;t<3;t+=1){G(s.blocks[t])}o=!1},d(t){t&&v(e),s.block.d(t),s.token=null,s=null}}}function Xt(t){return{c:i,m:i,p:i,i:i,o:i,d:i}}function Yt(t){let e;const n=t[8].load,o=h(n,t,t[7],Gt);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,s){o&&o.p&&(!e||140&s)&&$(o,n,t,t[7],s,Vt,Gt)},i(t){e||(V(o,t),e=!0)},o(t){G(o,t),e=!1},d(t){o&&o.d(t)}}}function te(t){return{c:i,m:i,p:i,i:i,o:i,d:i}}function ee(t){let e,n,o,s,a,r,l;const c=[Wt,Jt],p=[];function f(t,e){return t[2]?0:1}return n=f(t),o=p[n]=c[n](t),{c(){e=x("section"),o.c(),I(e,"class","data")},m(o,c){var u;w(o,e,c),p[n].m(e,null),a=!0,r||(l=[(u=s=At.call(null,e,t[0]),u&&d(u.destroy)?u.destroy:i),k(e,"data",t[9])],r=!0)},p(t,[a]){let i=n;n=f(t),n===i?p[n].p(t,a):(z(),G(p[i],1,1,(()=>{p[i]=null})),H(),o=p[n],o?o.p(t,a):(o=p[n]=c[n](t),o.c()),V(o,1),o.m(e,null)),s&&d(s.update)&&1&a&&s.update.call(null,t[0])},i(t){a||(V(o),a=!0)},o(t){G(o),a=!1},d(t){t&&v(e),p[n].d(),r=!1,u(l)}}}function ne(t,e,o){let s,{$$slots:a={},$$scope:i}=e;const{loggedIn:r}=n;var l,c;l=r,c=t=>o(3,s=t),t.$$.on_destroy.push(f(l,c));let u,{options:d}=e,{update:p=!1}=e,{loadingDelay:m=250}=e;p&&(d={update:p,modulePath:window.location.pathname.split("/")[1]||"/"});return t.$$set=t=>{"options"in t&&o(0,d=t.options),"update"in t&&o(6,p=t.update),"loadingDelay"in t&&o(1,m=t.loadingDelay),"$$scope"in t&&o(7,i=t.$$scope)},[d,m,u,s,r,t=>new Promise((e=>setTimeout(e,t))),p,i,a,({detail:t})=>o(2,u=t.data)]}function oe(t){let e,n;const o=[{class:"full-width"},{style:t[0]},{inputClass:t[1]||t[5]},{multiline:!0},{id:t[2]},{value:t[3]},{rows:t[4]},t[8]];let s={};for(let t=0;t<o.length;t+=1)s=r(s,o[t]);return e=new t[6]({props:s}),e.$on("change",t[7]),{c(){Z(e.$$.fragment)},m(t,o){Q(e,t,o),n=!0},p(t,[n]){const s=319&n?function(t,e){const n={},o={},s={$$scope:1};let a=t.length;for(;a--;){const i=t[a],r=e[a];if(r){for(const t in i)t in r||(o[t]=1);for(const t in r)s[t]||(n[t]=r[t],s[t]=1);t[a]=r}else for(const t in i)s[t]=1}for(const t in o)t in n||(n[t]=void 0);return n}(o,[o[0],1&n&&{style:t[0]},34&n&&{inputClass:t[1]||t[5]},o[3],4&n&&{id:t[2]},8&n&&{value:t[3]},16&n&&{rows:t[4]},256&n&&(a=t[8],"object"==typeof a&&null!==a?a:{})]):{};var a;e.$set(s)},i(t){n||(V(e.$$.fragment,t),n=!0)},o(t){G(e.$$.fragment,t),n=!1},d(t){X(e,t)}}}function se(t,e,n){const o=["noForm","id","value","style","rows","classId"];let a=y(e,o);const i=j(),{TextField:l}=s;let{noForm:c=""}=e,{id:u}=e,{value:d}=e,{style:p=""}=e,{rows:f=3}=e,{classId:m}=e;p+=" padding-bottom: .5em;";const h=5*(f>1),g=()=>{const t=document.getElementById(u);if(!t)return;const{style:e,scrollHeight:n}=t;n&&(e.height=`${n+h}px`)};return t.$$set=t=>{e=r(r({},e),function(t){const e={};for(const n in t)"$"!==n[0]&&(e[n]=t[n]);return e}(t)),n(8,a=y(e,o)),"noForm"in t&&n(1,c=t.noForm),"id"in t&&n(2,u=t.id),"value"in t&&n(3,d=t.value),"style"in t&&n(0,p=t.style),"rows"in t&&n(4,f=t.rows),"classId"in t&&n(5,m=t.classId)},t.$$.update=()=>{8&t.$$.dirty&&d&&setTimeout(g)},[p,c,u,d,f,m,l,({detail:{value:t}})=>i("blur",{value:t}),a]}function ae(t){let e,n;return e=new a({props:{style:"min-width: 25em; overflow-y: hidden; resize: none;",id:t[0],value:t[1]}}),{c(){Z(e.$$.fragment)},m(t,o){Q(e,t,o),n=!0},p(t,[n]){const o={};1&n&&(o.id=t[0]),2&n&&(o.value=t[1]),e.$set(o)},i(t){n||(V(e.$$.fragment,t),n=!0)},o(t){G(e.$$.fragment,t),n=!1},d(t){X(e,t)}}}function ie(t,e,n){let{id:o}=e,{value:s}=e;return t.$$set=t=>{"id"in t&&n(0,o=t.id),"value"in t&&n(1,s=t.value)},[o,s]}class re extends et{constructor(t){super(),tt(this,t,ie,ae,p,{id:0,value:1})}}function le(t){let e,n,o;function s(e){t[7](e)}let a={id:t[5]};return void 0!==t[2]&&(a.value=t[2]),e=new re({props:a}),D.push((()=>K(e,"value",s))),{c(){Z(e.$$.fragment)},m(t,n){Q(e,t,n),o=!0},p(t,o){const s={};!n&&4&o&&(n=!0,s.value=t[2],F((()=>n=!1))),e.$set(s)},i(t){o||(V(e.$$.fragment,t),o=!0)},o(t){G(e.$$.fragment,t),o=!1},d(t){X(e,t)}}}function ce(t){let e,n;return e=new t[4]({props:{title:t[0],closeCallback:t[10],$$slots:{default:[le]},$$scope:{ctx:t}}}),{c(){Z(e.$$.fragment)},m(t,o){Q(e,t,o),n=!0},p(t,n){const o={};1&n&&(o.title=t[0]),1024&n&&(o.closeCallback=t[10]),2052&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(V(e.$$.fragment,t),n=!0)},o(t){G(e.$$.fragment,t),n=!1},d(t){X(e,t)}}}function ue(t){let e,n,o;function s(e){t[8](e)}let a={$$slots:{default:[ce,({closeCallback:t})=>({10:t}),({closeCallback:t})=>t?1024:0]},$$scope:{ctx:t}};return void 0!==t[1]&&(a.open=t[1]),e=new t[3]({props:a}),D.push((()=>K(e,"open",s))),e.$on("change",t[9]),{c(){Z(e.$$.fragment)},m(t,n){Q(e,t,n),o=!0},p(t,[o]){const s={};3077&o&&(s.$$scope={dirty:o,ctx:t}),!n&&2&o&&(n=!0,s.open=t[1],F((()=>n=!1))),e.$set(s)},i(t){o||(V(e.$$.fragment,t),o=!0)},o(t){G(e.$$.fragment,t),o=!1},d(t){X(e,t)}}}function de(t,e,n){const{Modal:o,Dialog:a}=s;let i,{title:r}=e,{showMessage:l}=e,c="";return l=t=>{n(2,c=[].concat(t).join("\n")),n(1,i=!0)},t.$$set=t=>{"title"in t&&n(0,r=t.title),"showMessage"in t&&n(6,l=t.showMessage)},[r,i,c,o,a,"modalDialog",l,function(t){c=t,n(2,c)},function(t){i=t,n(1,i)},function(e){!function(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t(e)))}(t,e)}]}t("version","0.2.49");const pe=window.sessionStorage;pe.clear();t("Storage",{getItem:t=>pe.getItem(t),setItem:(t,e)=>pe.setItem(t,e)}),t("LinkIcon",class extends et{constructor(t){var e,n,o;super(),document.getElementById("svelte-1jng2dw-style")||((o=x("style")).id="svelte-1jng2dw-style",o.textContent=".red.svelte-1jng2dw{background-color:var(--m-color-red-light)}.blue.svelte-1jng2dw{background-color:var(--m-color-blue-light)}.green.svelte-1jng2dw{background-color:var(--m-color-green-light)}.icon.svelte-1jng2dw{max-height:1.2em}",e=document.head,n=o,e.appendChild(n)),tt(this,t,ot,nt,p,{title:0,link:3,color:1})}}),t("Page",class extends et{constructor(t){super(),tt(this,t,ne,ee,p,{options:0,update:6,loadingDelay:1})}}),t("Request",vt),t("TextArea",class extends et{constructor(t){super(),tt(this,t,se,oe,p,{noForm:1,id:2,value:3,style:0,rows:4,classId:5})}}),t("ModalDialog",class extends et{constructor(t){super(),tt(this,t,de,ue,p,{title:0,showMessage:6})}})}}}));
1
+ System.register(["axios","@enablerr-ui/auth","@enablerr-ui/layout","@enablerr-ui/form"],(function(t){"use strict";var e,n,o,a,s;return{setters:[function(t){e=t.default},function(t){n=t.user},function(t){o=t.getGridHelp,a=t.getAttractions},function(t){s=t.TextArea}],execute:function(){function i(){}function r(t,e){for(const n in e)t[n]=e[n];return t}function c(t){return t()}function l(){return Object.create(null)}function u(t){t.forEach(c)}function d(t){return"function"==typeof t}function p(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function f(t,...e){if(null==t)return i;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function h(t){let e;return f(t,(t=>e=t))(),e}function m(t,e,n,o){if(t){const a=g(t,e,n,o);return t[0](a)}}function g(t,e,n,o){return t[1]&&o?r(n.ctx.slice(),t[1](o(e))):n.ctx}function $(t,e,n,o,a,s,i){const r=function(t,e,n,o){if(t[2]&&o){const a=t[2](o(n));if(void 0===e.dirty)return a;if("object"==typeof a){const t=[],n=Math.max(e.dirty.length,a.length);for(let o=0;o<n;o+=1)t[o]=e.dirty[o]|a[o];return t}return e.dirty|a}return e.dirty}(e,o,a,s);if(r){const a=g(e,n,o,i);t.p(a,r)}}function y(t,e){const n={};e=new Set(e);for(const o in t)e.has(o)||"$"===o[0]||(n[o]=t[o]);return n}function w(t,e,n){t.insertBefore(e,n||null)}function x(t){t.parentNode.removeChild(t)}function v(t){return document.createElement(t)}function b(){return t="",document.createTextNode(t);var t}function k(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function E(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}let S;function _(t){S=t}function I(){if(!S)throw new Error("Function called outside component initialization");return S}function T(){const t=I();return(e,n)=>{const o=t.$$.callbacks[e];if(o){const a=function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(e,n);o.slice().forEach((e=>{e.call(t,a)}))}}}const j=[],C=[],M=[],D=[],N=Promise.resolve();let L=!1;function F(t){M.push(t)}function P(t){D.push(t)}let A=!1;const B=new Set;function O(){if(!A){A=!0;do{for(let t=0;t<j.length;t+=1){const e=j[t];_(e),q(e.$$)}for(_(null),j.length=0;C.length;)C.pop()();for(let t=0;t<M.length;t+=1){const e=M[t];B.has(e)||(B.add(e),e())}M.length=0}while(j.length);for(;D.length;)D.pop()();L=!1,A=!1,B.clear()}}function q(t){if(null!==t.fragment){t.update(),u(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(F)}}const R=new Set;let U;function V(){U={r:0,c:[],p:U}}function z(){U.r||u(U.c),U=U.p}function H(t,e){t&&t.i&&(R.delete(t),t.i(e))}function W(t,e,n,o){if(t&&t.o){if(R.has(t))return;R.add(t),U&&U.c.push((()=>{R.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}function G(t,e){const n=e.token={};function o(t,o,a,s){if(e.token!==n)return;e.resolved=s;let i=e.ctx;void 0!==a&&(i=i.slice(),i[a]=s);const r=t&&(e.current=t)(i);let c=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(V(),W(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),z())})):e.block.d(1),r.c(),H(r,1),r.m(e.mount(),e.anchor),c=!0),e.block=r,e.blocks&&(e.blocks[o]=r),c&&O()}if((a=t)&&"object"==typeof a&&"function"==typeof a.then){const n=I();if(t.then((t=>{_(n),o(e.then,1,e.value,t),_(null)}),(t=>{if(_(n),o(e.catch,2,e.error,t),_(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 a}function J(t,e,n){const o=e.slice(),{resolved:a}=t;t.current===t.then&&(o[t.value]=a),t.current===t.catch&&(o[t.error]=a),t.block.p(o,n)}function K(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function Q(t){t&&t.c()}function X(t,e,n,o){const{fragment:a,on_mount:s,on_destroy:i,after_update:r}=t.$$;a&&a.m(e,n),o||F((()=>{const e=s.map(c).filter(d);i?i.push(...e):u(e),t.$$.on_mount=[]})),r.forEach(F)}function Y(t,e){const n=t.$$;null!==n.fragment&&(u(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Z(t,e){-1===t.$$.dirty[0]&&(j.push(t),L||(L=!0,N.then(O)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function tt(t,e,n,o,a,s,r=[-1]){const c=S;_(t);const d=t.$$={fragment:null,ctx:null,props:s,update:i,not_equal:a,bound:l(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(c?c.$$.context:e.context||[]),callbacks:l(),dirty:r,skip_bound:!1};let p=!1;if(d.ctx=n?n(t,e.props||{},((e,n,...o)=>{const s=o.length?o[0]:n;return d.ctx&&a(d.ctx[e],d.ctx[e]=s)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](s),p&&Z(t,e)),n})):[],d.update(),p=!0,u(d.before_update),d.fragment=!!o&&o(d.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);d.fragment&&d.fragment.l(t),t.forEach(x)}else d.fragment&&d.fragment.c();e.intro&&H(t.$$.fragment),X(t,e.target,e.anchor,e.customElement),O()}_(c)}class et{$destroy(){Y(this,1),this.$destroy=i}$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 nt(t){let e,n,o,a,s;const i=t[5].default,r=m(i,t,t[4],null);return{c(){e=v("span"),r&&r.c(),E(e,"class",n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"),E(e,"title",t[0])},m(n,i){w(n,e,i),r&&r.m(e,null),o=!0,a||(s=k(e,"click",t[2]),a=!0)},p(t,[a]){r&&r.p&&(!o||16&a)&&$(r,i,t,t[4],a,null,null),(!o||2&a&&n!==(n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"))&&E(e,"class",n),(!o||1&a)&&E(e,"title",t[0])},i(t){o||(H(r,t),o=!0)},o(t){W(r,t),o=!1},d(t){t&&x(e),r&&r.d(t),a=!1,s()}}}function ot(t,e,n){let{$$slots:o={},$$scope:a}=e,{title:s}=e,{link:i="/"}=e,{color:r}=e;return t.$$set=t=>{"title"in t&&n(0,s=t.title),"link"in t&&n(3,i=t.link),"color"in t&&n(1,r=t.color),"$$scope"in t&&n(4,a=t.$$scope)},[s,r,()=>window.singleSpaNavigate(i),i,a,o]}const at=[];const st=t("notification",function(t,e=i){let n;const o=[];function a(e){if(p(t,e)&&(t=e,n)){const e=!at.length;for(let e=0;e<o.length;e+=1){const n=o[e];n[1](),at.push(n,t)}if(e){for(let t=0;t<at.length;t+=2)at[t][0](at[t+1]);at.length=0}}}return{set:a,update:function(e){a(e(t))},subscribe:function(s,r=i){const c=[s,r];return o.push(c),1===o.length&&(n=e(a)||i),s(t),()=>{const t=o.indexOf(c);-1!==t&&o.splice(t,1),0===o.length&&(n(),n=null)}}}}(!1));let it=[];const rt=()=>[{id:"Standard",activated:!0,days:["Mo","Tu","We","Th","Fr","Sa","Su"],moduleList:[{moduleId:"1111",position:"0"},{moduleId:"9999",position:"1"}]}],{loggedIn:ct}=n,lt=(t,e)=>{let n="";return t&&(n+=`/${t}`,e&&(n+=`/${e}`)),n},ut=async(t,e)=>{const n=lt(t,e);return(await axios.get("/api/comm/chat"+n)).data.filter((e=>t?e.event&&e.event._id===t:!e.event)).filter((t=>e?t.task&&t.task._id===e:!t.task))},{loggedIn:dt}=n,pt=async(t,e)=>[];let ft=[{id:"001",role:"Kundenmanager",user:"002"},{id:"002",role:"HR",user:"003"},{id:"003",role:"Projektleiter",user:"001"},{id:"004",role:"Software Developer",user:"001"},{id:"005",role:"Software Developer",user:"002"}];const ht=[{id:1111,name:"TaskModule",text:"Alle Tasks",status:!1,6:o.item({x:0,y:0,w:4,h:5,customDragger:!0}),5:o.item({x:0,y:0,w:4,h:5,customDragger:!0}),4:o.item({x:0,y:0,w:3,h:5,customDragger:!0}),3:o.item({x:0,y:0,w:2,h:5,customDragger:!0}),2:o.item({x:0,y:0,w:1,h:5,customDragger:!0}),1:o.item({x:0,y:0,w:1,h:5,customDragger:!0})},{id:3333,name:"Chat Modul",text:"Chat",status:!1,6:o.item({x:4,y:0,w:1,h:5}),5:o.item({x:4,y:0,w:1,h:5}),4:o.item({x:3,y:0,w:1,h:5}),3:o.item({x:2,y:0,w:1,h:5}),2:o.item({x:1,y:0,w:1,h:5}),1:o.item({x:1,y:0,w:1,h:5})},{id:4444,name:"Feedback Modul",text:"Feedback",status:!1,6:o.item({x:5,y:0,w:1,h:5}),5:o.item({x:5,y:0,w:1,h:5}),4:o.item({x:4,y:0,w:1,h:5}),3:o.item({x:3,y:0,w:1,h:5}),2:o.item({x:2,y:0,w:1,h:5}),1:o.item({x:2,y:0,w:1,h:5})},{id:9999,name:"Neues Modul",text:"+",status:!1,6:o.item({x:4,y:0,w:1,h:2}),5:o.item({x:4,y:0,w:1,h:2}),4:o.item({x:3,y:0,w:1,h:2}),3:o.item({x:2,y:0,w:1,h:2}),2:o.item({x:1,y:0,w:1,h:2}),1:o.item({x:1,y:0,w:1,h:2})}],{cacheValidator:mt,onLogout:gt}=n;e.interceptors.request.use((t=>(t.headers.enablerr=window.location.hostname,t))),e.interceptors.response.use((t=>203===t.status?Promise.reject(t.data.error):t),(t=>400===t.response.status?(gt(),Promise.reject(t)):t));let $t=new Map;const yt=(t,e)=>(...n)=>{const o=h(mt),a=window.localStorage.getItem("enablerr-tenant");"invalid"===o.status&&($t=new Map,mt.set({tenant:a,status:""}));const s=[].concat(a,e,n).join("-");let i=$t.get(s);if(!i)try{i=t(...n),$t.set(s,i)}catch(t){throw t}return i};var wt={getSchema:yt((t=>axios.get("/api/schema/"+t).then((t=>t.data)).catch((e=>{throw`schema with id ${t} not found`}))),"getSchema"),getSchemas:async()=>(await axios.get("/api/schema")).data,getSchemaByClass:yt((async t=>(await axios.get(`/api/schemabyclass/${t}`)).data),"getSchemaByClass"),getEvents:yt((()=>axios.get("/api/event").then((t=>t.data)).catch((t=>{throw"Events not found"}))),"getEvents"),getEvent:yt((t=>axios.get("/api/event/"+t).then((t=>t.data)).catch((e=>{throw`Event with id ${t} not found`}))),"getEvent"),getTask:(t,e)=>axios.get(`/api/task/${t}:${e}?display=form`).then((t=>t.data)).catch((t=>{throw"task not found"})),getTaskList:(t,e)=>axios.get(`/api/task/${t}:${e}?display=list`).then((t=>t.data)).catch((t=>{})),getTasksList:t=>axios.get(`/api/tasks/${t}?display=list`).then((t=>t.data)).catch((t=>{throw"list not found"})),getTaskById:t=>axios.post("/api/read/_task",{_id:t}).then((t=>t.data[0])).catch((t=>{})),getTaskqueue:(t=!1,e)=>axios.post("/api/taskqueue",{id:t,task:e}).then((t=>t.data)).catch((t=>{throw"queue not found"})),createTaskByEventId:t=>axios.post("/api/workflow/task",{event:t}).then((t=>t.data)).catch((t=>{})),saveData:async(t,e)=>(await axios.post(`/api/${t}`,e)).data,deleteTask:t=>axios.delete(`/api/_task/${t}`).then((t=>t.data)).catch((t=>{})),savePlugins:async(t,e)=>(await axios.post("/api/plugin",t,e)).data,savePlugin:async(t,e)=>(await axios.post(`/api/plugin/${t}`,e)).data,deletePlugin:async t=>(await axios.delete(`/api/plugin/${t}`)).data,deletePluginAndData:()=>axios.delete("/api/plugin"),getAuthStatus:async t=>(await axios.post("/api/auth/status",{email:t})).data,getUserSettings:()=>axios.get("/api/user").then((t=>t.data)),saveUserSettings:t=>axios.post("/api/user",t).then((t=>t.data)),saveDefaultSettings:(t,e)=>{let n={schema:"http://json-schema.org/draft-04/schema#",id:e,email:t,firstName:"",lastName:"",jobDescription:"",role:[],setting:{showJobDescription:!0,dashboardLayout:[{id:"Standard",activated:!0,days:["Mo","Tu","We","Th","Fr","Sa","Su"],moduleList:[{moduleId:"1111",position:"0"},{moduleId:"9999",position:"1"}]}],notificationActivated:!0,showNotifications:!0,notificationToMail:!1,typesOfNotification:[]}};return axios.post("/api/user",n),n},authEnroll:async t=>(await axios.post("/api/auth/enroll",t)).data,authLogin:async(t,e)=>(await axios.post("/api/auth/login",{username:t,passcode:e})).data,authLogout:async()=>await axios.post("/api/auth/logout"),setTenant:async t=>(await axios.post("/api/auth/tenant",{id:t})).data,getAllChats:async()=>axios.get("/api/comm/chat").then((({data:t})=>t)),getChat:ut,saveChat:async(t,e,n)=>{const{user:o}=h(ct);let a=await ut(t,e);a[0]||(n.sender=o);const s=a[0]?"patch":"post",i=lt(t,e);return(await axios[s]("/api/comm/chat"+i,n)).data.id},getFeedback:pt,saveFeedback:async(t,e,n,o,a)=>{const s={};t&&(s.event={id:t}),e&&(s.task={id:e});let i=await pt();if(i[0]&&null!=a){let t=i.filter((t=>t._id===a));t={...t,...o};const{user:e}=h(dt);return n.sender=e,t[0].messages=(t[0].messages||[]).concat(n),console.log("has id",t[0].messages),(await axios.post("/api/commFeedback",t[0])).data.id}{i={...s},i={...i,...o};const{user:t}=h(dt);return n.sender=t,i.messages=(i.messages||[]).concat(n),console.log("new feedback",i),(await axios.post("/api/commFeedback",i)).data.id}},getUserReports:async t=>(await axios.get("/api/userreport/list/"+t)).data,uploadUserReport:async(t,e)=>(await axios.post("/api/userreport/"+t,e)).data,deleteUserReport:async t=>(await axios.delete("/api/userreport/"+t)).data,geDefaultModuleList:()=>[{moduleId:"1111",position:"0"},{moduleId:"9999",position:""}],getDefaultLayout:rt,getNotifications:t=>axios.get("/api/notification").then((t=>t.data)),saveNotification:t=>{let e=it.filter((e=>e.id==t.id&&e.user==t.user));e.length>0?it[it.indexOf(e)]=t:it.unshift(t),st.set(!0),console.log("new notifications",it)},getNotificationTypes:yt((()=>axios.get("/api/notification/type").then((t=>t.data))),"getNotificationTypes"),getRoles:t=>ft.filter((e=>e.user===t)),getModules:t=>ht.filter((e=>t.includes(e.id))),getModuleName:t=>{const e=ht.find((e=>e.id===Number(t)));return e?e.name:"Unbekanntes Modul"},getAllModules:()=>ht};const xt=Intl.NumberFormat().formatToParts(1.1).find((({type:t})=>"decimal"===t)).value||".",vt=t=>"function"==typeof t,bt=t=>t&&t.toString,kt=(t,...e)=>e.includes(t),Et=t=>kt(t,void 0,null),St=t=>!Et(t),_t=(t=null,e,...n)=>{try{return e(...n)}catch{return t}},It=t=>(e,...n)=>_t(_t("",t.toString),e,...n),Tt=(t,e=2,n=0,o=t.toString(),a=n.toString())=>a.repeat(e-o.length)+o,jt=(t,e=window)=>({listen(n,o){e[`${n}EventListener`](t,o)},start(t){this.listen("add",t)},stop(t){this.listen("remove",t)}}),Ct=(...t)=>!t.map((({value:t,check:e,text:n})=>e(t)||Nt(console.error,n))).every(Boolean),Mt=t=>(e,n)=>(Promise.resolve(n).then(e),t),Dt=Mt(!0),Nt=Mt(!1);t("util",Object.freeze({__proto__:null,decimalSeparator:xt,isFunction:vt,isStringable:bt,isObjEmpty:(t={})=>!Object.keys(t).length,hasValue:kt,isNullish:Et,isNotNullish:St,bestValue:(t,...e)=>e.concat(t).find(St),tryCatch:_t,ensureStrValue:It,padLeft:(...t)=>It(t[0])(Tt,...t),showupElement:(t="",e=0,n=document.getElementById(t))=>n&&n.style&&(n.style.display="block",setTimeout((()=>n.style.display="none"),e)),getListener:jt,isMissing:Ct,go:Dt,stop:Nt}));const Lt="single-spa:routing-event",Ft=jt(Lt);function Pt(t,{modulePath:e,update:n}){if(!1===n)return;if(Ct({value:n,check:vt,text:"<update> should be a function (dataListener)"},{value:e,check:bt,text:"<modulePath> should be a string (dataListener)"}))return;const o=e.toString()||"/",a=e=>{const a=e.currentTarget.location.pathname,[,s,...i]=a.split("/");o===(s||"/")&&t.dispatchEvent(new CustomEvent("data",{detail:{data:n(...i)}}))};return Ft.start(a),{destroy:()=>Ft.stop(a)}}const At=()=>window.dispatchEvent(new CustomEvent(Lt)),Bt=t=>({prop:4&t,tenant:8&t,user:8&t}),Ot=t=>({prop:t[11],refresh:At,tenant:t[3].tenant,user:t[3].user}),qt=t=>({err:4&t,prop:4&t,tenant:8&t,user:8&t}),Rt=t=>({err:t[12],prop:t[11],refresh:At,tenant:t[3].tenant,user:t[3].user}),Ut=t=>({prop:4&t,tenant:8&t,user:8&t}),Vt=t=>({prop:t[11],refresh:At,tenant:t[3].tenant,user:t[3].user}),zt=t=>({prop:4&t,tenant:8&t,user:8&t}),Ht=t=>({prop:t[11],refresh:At,tenant:t[3].tenant,user:t[3].user});function Wt(t){let e;const n=t[8].init,o=m(n,t,t[7],Ot);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,a){o&&o.p&&(!e||140&a)&&$(o,n,t,t[7],a,Bt,Ot)},i(t){e||(H(o,t),e=!0)},o(t){W(o,t),e=!1},d(t){o&&o.d(t)}}}function Gt(t){let e,n,o,a={ctx:t,current:null,token:null,hasCatch:!0,pending:Qt,then:Kt,catch:Jt,value:11,error:12,blocks:[,,,]};return G(n=t[2],a),{c(){e=b(),a.block.c()},m(t,n){w(t,e,n),a.block.m(t,a.anchor=n),a.mount=()=>e.parentNode,a.anchor=e,o=!0},p(e,o){t=e,a.ctx=t,4&o&&n!==(n=t[2])&&G(n,a)||J(a,t,o)},i(t){o||(H(a.block),o=!0)},o(t){for(let t=0;t<3;t+=1){W(a.blocks[t])}o=!1},d(t){t&&x(e),a.block.d(t),a.token=null,a=null}}}function Jt(t){let e;const n=t[8].error,o=m(n,t,t[7],Rt);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,a){o&&o.p&&(!e||140&a)&&$(o,n,t,t[7],a,qt,Rt)},i(t){e||(H(o,t),e=!0)},o(t){W(o,t),e=!1},d(t){o&&o.d(t)}}}function Kt(t){let e;const n=t[8].default,o=m(n,t,t[7],Vt);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,a){o&&o.p&&(!e||140&a)&&$(o,n,t,t[7],a,Ut,Vt)},i(t){e||(H(o,t),e=!0)},o(t){W(o,t),e=!1},d(t){o&&o.d(t)}}}function Qt(t){let e,n,o,a={ctx:t,current:null,token:null,hasCatch:!1,pending:Zt,then:Yt,catch:Xt,value:10,blocks:[,,,]};return G(n=t[5](t[1]),a),{c(){e=b(),a.block.c()},m(t,n){w(t,e,n),a.block.m(t,a.anchor=n),a.mount=()=>e.parentNode,a.anchor=e,o=!0},p(e,o){t=e,a.ctx=t,2&o&&n!==(n=t[5](t[1]))&&G(n,a)||J(a,t,o)},i(t){o||(H(a.block),o=!0)},o(t){for(let t=0;t<3;t+=1){W(a.blocks[t])}o=!1},d(t){t&&x(e),a.block.d(t),a.token=null,a=null}}}function Xt(t){return{c:i,m:i,p:i,i:i,o:i,d:i}}function Yt(t){let e;const n=t[8].load,o=m(n,t,t[7],Ht);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,a){o&&o.p&&(!e||140&a)&&$(o,n,t,t[7],a,zt,Ht)},i(t){e||(H(o,t),e=!0)},o(t){W(o,t),e=!1},d(t){o&&o.d(t)}}}function Zt(t){return{c:i,m:i,p:i,i:i,o:i,d:i}}function te(t){let e,n,o,a,s,r,c;const l=[Gt,Wt],p=[];function f(t,e){return t[2]?0:1}return n=f(t),o=p[n]=l[n](t),{c(){e=v("section"),o.c(),E(e,"class","data")},m(o,l){var u;w(o,e,l),p[n].m(e,null),s=!0,r||(c=[(u=a=Pt.call(null,e,t[0]),u&&d(u.destroy)?u.destroy:i),k(e,"data",t[9])],r=!0)},p(t,[s]){let i=n;n=f(t),n===i?p[n].p(t,s):(V(),W(p[i],1,1,(()=>{p[i]=null})),z(),o=p[n],o?o.p(t,s):(o=p[n]=l[n](t),o.c()),H(o,1),o.m(e,null)),a&&d(a.update)&&1&s&&a.update.call(null,t[0])},i(t){s||(H(o),s=!0)},o(t){W(o),s=!1},d(t){t&&x(e),p[n].d(),r=!1,u(c)}}}function ee(t,e,o){let a,{$$slots:s={},$$scope:i}=e;const{loggedIn:r}=n;var c,l;c=r,l=t=>o(3,a=t),t.$$.on_destroy.push(f(c,l));let u,{options:d}=e,{update:p=!1}=e,{loadingDelay:h=250}=e;p&&(d={update:p,modulePath:window.location.pathname.split("/")[1]||"/"});return t.$$set=t=>{"options"in t&&o(0,d=t.options),"update"in t&&o(6,p=t.update),"loadingDelay"in t&&o(1,h=t.loadingDelay),"$$scope"in t&&o(7,i=t.$$scope)},[d,h,u,a,r,t=>new Promise((e=>setTimeout(e,t))),p,i,s,({detail:t})=>o(2,u=t.data)]}function ne(t){let e,n;const o=[{class:"full-width"},{style:t[0]},{inputClass:t[1]||t[5]},{multiline:!0},{id:t[2]},{value:t[3]},{rows:t[4]},t[8]];let a={};for(let t=0;t<o.length;t+=1)a=r(a,o[t]);return e=new t[6]({props:a}),e.$on("change",t[7]),{c(){Q(e.$$.fragment)},m(t,o){X(e,t,o),n=!0},p(t,[n]){const a=319&n?function(t,e){const n={},o={},a={$$scope:1};let s=t.length;for(;s--;){const i=t[s],r=e[s];if(r){for(const t in i)t in r||(o[t]=1);for(const t in r)a[t]||(n[t]=r[t],a[t]=1);t[s]=r}else for(const t in i)a[t]=1}for(const t in o)t in n||(n[t]=void 0);return n}(o,[o[0],1&n&&{style:t[0]},34&n&&{inputClass:t[1]||t[5]},o[3],4&n&&{id:t[2]},8&n&&{value:t[3]},16&n&&{rows:t[4]},256&n&&(s=t[8],"object"==typeof s&&null!==s?s:{})]):{};var s;e.$set(a)},i(t){n||(H(e.$$.fragment,t),n=!0)},o(t){W(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function oe(t,e,n){const o=["noForm","id","value","style","rows","classId"];let s=y(e,o);const i=T(),{TextField:c}=a;let{noForm:l=""}=e,{id:u}=e,{value:d}=e,{style:p=""}=e,{rows:f=3}=e,{classId:h}=e;p+=" padding-bottom: .5em;";const m=5*(f>1),g=()=>{const t=document.getElementById(u);if(!t)return;const{style:e,scrollHeight:n}=t;n&&(e.height=`${n+m}px`)};return t.$$set=t=>{e=r(r({},e),function(t){const e={};for(const n in t)"$"!==n[0]&&(e[n]=t[n]);return e}(t)),n(8,s=y(e,o)),"noForm"in t&&n(1,l=t.noForm),"id"in t&&n(2,u=t.id),"value"in t&&n(3,d=t.value),"style"in t&&n(0,p=t.style),"rows"in t&&n(4,f=t.rows),"classId"in t&&n(5,h=t.classId)},t.$$.update=()=>{8&t.$$.dirty&&d&&setTimeout(g)},[p,l,u,d,f,h,c,({detail:{value:t}})=>i("blur",{value:t}),s]}function ae(t){let e,n;return e=new s({props:{style:"min-width: 25em; overflow-y: hidden; resize: none;",id:t[0],value:t[1]}}),{c(){Q(e.$$.fragment)},m(t,o){X(e,t,o),n=!0},p(t,[n]){const o={};1&n&&(o.id=t[0]),2&n&&(o.value=t[1]),e.$set(o)},i(t){n||(H(e.$$.fragment,t),n=!0)},o(t){W(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function se(t,e,n){let{id:o}=e,{value:a}=e;return t.$$set=t=>{"id"in t&&n(0,o=t.id),"value"in t&&n(1,a=t.value)},[o,a]}class ie extends et{constructor(t){super(),tt(this,t,se,ae,p,{id:0,value:1})}}function re(t){let e,n,o;function a(e){t[7](e)}let s={id:t[5]};return void 0!==t[2]&&(s.value=t[2]),e=new ie({props:s}),C.push((()=>K(e,"value",a))),{c(){Q(e.$$.fragment)},m(t,n){X(e,t,n),o=!0},p(t,o){const a={};!n&&4&o&&(n=!0,a.value=t[2],P((()=>n=!1))),e.$set(a)},i(t){o||(H(e.$$.fragment,t),o=!0)},o(t){W(e.$$.fragment,t),o=!1},d(t){Y(e,t)}}}function ce(t){let e,n;return e=new t[4]({props:{title:t[0],closeCallback:t[10],$$slots:{default:[re]},$$scope:{ctx:t}}}),{c(){Q(e.$$.fragment)},m(t,o){X(e,t,o),n=!0},p(t,n){const o={};1&n&&(o.title=t[0]),1024&n&&(o.closeCallback=t[10]),2052&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(H(e.$$.fragment,t),n=!0)},o(t){W(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function le(t){let e,n,o;function a(e){t[8](e)}let s={$$slots:{default:[ce,({closeCallback:t})=>({10:t}),({closeCallback:t})=>t?1024:0]},$$scope:{ctx:t}};return void 0!==t[1]&&(s.open=t[1]),e=new t[3]({props:s}),C.push((()=>K(e,"open",a))),e.$on("change",t[9]),{c(){Q(e.$$.fragment)},m(t,n){X(e,t,n),o=!0},p(t,[o]){const a={};3077&o&&(a.$$scope={dirty:o,ctx:t}),!n&&2&o&&(n=!0,a.open=t[1],P((()=>n=!1))),e.$set(a)},i(t){o||(H(e.$$.fragment,t),o=!0)},o(t){W(e.$$.fragment,t),o=!1},d(t){Y(e,t)}}}function ue(t,e,n){const{Modal:o,Dialog:s}=a;let i,{title:r}=e,{showMessage:c}=e,l="";return c=t=>{n(2,l=[].concat(t).join("\n")),n(1,i=!0)},t.$$set=t=>{"title"in t&&n(0,r=t.title),"showMessage"in t&&n(6,c=t.showMessage)},[r,i,l,o,s,"modalDialog",c,function(t){l=t,n(2,l)},function(t){i=t,n(1,i)},function(e){!function(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t(e)))}(t,e)}]}t("version","0.2.51");const de=window.sessionStorage;de.clear();t("Storage",{getItem:t=>de.getItem(t),setItem:(t,e)=>de.setItem(t,e)}),t("LinkIcon",class extends et{constructor(t){var e,n,o;super(),document.getElementById("svelte-1jng2dw-style")||((o=v("style")).id="svelte-1jng2dw-style",o.textContent=".red.svelte-1jng2dw{background-color:var(--m-color-red-light)}.blue.svelte-1jng2dw{background-color:var(--m-color-blue-light)}.green.svelte-1jng2dw{background-color:var(--m-color-green-light)}.icon.svelte-1jng2dw{max-height:1.2em}",e=document.head,n=o,e.appendChild(n)),tt(this,t,ot,nt,p,{title:0,link:3,color:1})}}),t("Page",class extends et{constructor(t){super(),tt(this,t,ee,te,p,{options:0,update:6,loadingDelay:1})}}),t("Request",wt),t("TextArea",class extends et{constructor(t){super(),tt(this,t,oe,ne,p,{noForm:1,id:2,value:3,style:0,rows:4,classId:5})}}),t("ModalDialog",class extends et{constructor(t){super(),tt(this,t,ue,le,p,{title:0,showMessage:6})}})}}}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@enablerr-ui/form",
3
3
  "description": "enablerr - the Next Enterprise Solution",
4
- "version": "0.2.49",
4
+ "version": "0.2.51",
5
5
  "os": [
6
6
  "darwin",
7
7
  "linux"