@enablerr-ui/form 0.2.42 → 0.2.44
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(["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 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 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 F(t){_.push(t)}function P(t){C.push(t)}let A=!1;const B=new Set;function O(){if(!A){A=!0;do{for(let t=0;t<D.length;t+=1){const e=D[t];E(e),R(e.$$)}for(E(null),D.length=0;T.length;)T.pop()();for(let t=0;t<_.length;t+=1){const e=_[t];B.has(e)||(B.add(e),e())}_.length=0}while(D.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(F)}}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 c=!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),c=!0),e.block=r,e.blocks&&(e.blocks[o]=r),c&&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||F((()=>{const e=a.map(c).filter(d);i?i.push(...e):u(e),t.$$.on_mount=[]})),r.forEach(F)}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]&&(D.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 c=S;E(t);const d=t.$$={fragment:null,ctx:null,props:a,update:i,not_equal:s,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 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(c)}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 c=[a,r];return o.push(c),1===o.length&&(n=e(s)||i),a(t),()=>{const t=o.indexOf(c);-1!==t&&o.splice(t,1),0===o.length&&(n(),n=null)}}}}(!1));let it=[];const{loggedIn:rt}=n,ct=(t,e)=>{let n="";return t&&(n+=`/${t}`,e&&(n+=`/${e}`)),n},lt=async(t,e)=>{const n=ct(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="test",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:wt((async()=>(await axios.get("/api/schema")).data),"getSchemas"),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,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:async(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(await axios.post("/api/user",n)).data},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,getChat:lt,saveChat:async(t,e,n)=>{const{user:o}=m(rt);n.sender=o;const s=(await lt(t,e))[0]?"patch":"post",a=ct(t,e);return(await axios[s]("/api/comm/chat"+a,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),Dt=(t,e=2,n=0,o=t.toString(),s=n.toString())=>s.repeat(e-o.length)+o,Tt=(t,e=window)=>({listen(n,o){e[`${n}EventListener`](t,o)},start(t){this.listen("add",t)},stop(t){this.listen("remove",t)}}),_t=(...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])(Dt,...t),showupElement:(t="",e=0,n=document.getElementById(t))=>n&&n.style&&(n.style.display="block",setTimeout((()=>n.style.display="none"),e)),getListener:Tt,isMissing:_t,go:Lt,stop:Mt}));const Ft="single-spa:routing-event",Pt=Tt(Ft);function At(t,{modulePath:e,update:n}){if(!1===n)return;if(_t({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 Pt.start(s),{destroy:()=>Pt.stop(s)}}const Bt=()=>window.dispatchEvent(new CustomEvent(Ft)),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,c;const l=[Wt,Jt],p=[];function f(t,e){return t[2]?0:1}return n=f(t),o=p[n]=l[n](t),{c(){e=x("section"),o.c(),I(e,"class","data")},m(o,l){var u;w(o,e,l),p[n].m(e,null),a=!0,r||(c=[(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]=l[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(c)}}}function ne(t,e,o){let s,{$$slots:a={},$$scope:i}=e;const{loggedIn:r}=n;var c,l;c=r,l=t=>o(3,s=t),t.$$.on_destroy.push(f(c,l));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:c}=s;let{noForm:l=""}=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,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,m=t.classId)},t.$$.update=()=>{8&t.$$.dirty&&d&&setTimeout(g)},[p,l,u,d,f,m,c,({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 ce(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}),T.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],P((()=>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 le(t){let e,n;return e=new t[4]({props:{title:t[0],closeCallback:t[10],$$slots:{default:[ce]},$$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:[le,({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}),T.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],P((()=>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: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,a,"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.42");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,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 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 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 F(t){_.push(t)}function P(t){C.push(t)}let A=!1;const B=new Set;function O(){if(!A){A=!0;do{for(let t=0;t<D.length;t+=1){const e=D[t];E(e),R(e.$$)}for(E(null),D.length=0;T.length;)T.pop()();for(let t=0;t<_.length;t+=1){const e=_[t];B.has(e)||(B.add(e),e())}_.length=0}while(D.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(F)}}const U=new Set;let z;function H(){z={r:0,c:[],p:z}}function q(){z.r||u(z.c),z=z.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),z&&z.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 c=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(H(),G(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),q())})):e.block.d(1),r.c(),V(r,1),r.m(e.mount(),e.anchor),c=!0),e.block=r,e.blocks&&(e.blocks[o]=r),c&&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||F((()=>{const e=a.map(c).filter(d);i?i.push(...e):u(e),t.$$.on_mount=[]})),r.forEach(F)}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]&&(D.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 c=S;E(t);const d=t.$$={fragment:null,ctx:null,props:a,update:i,not_equal:s,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 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(c)}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 c=[a,r];return o.push(c),1===o.length&&(n=e(s)||i),a(t),()=>{const t=o.indexOf(c);-1!==t&&o.splice(t,1),0===o.length&&(n(),n=null)}}}}(!1));let it=[];const{loggedIn:rt}=n,ct=(t,e)=>{let n="";return t&&(n+=`/${t}`,e&&(n+=`/${e}`)),n},lt=async(t,e)=>{const n=ct(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.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:wt((async()=>(await axios.get("/api/schema")).data),"getSchemas"),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,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:async(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(await axios.post("/api/user",n)).data},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,getChat:lt,saveChat:async(t,e,n)=>{const{user:o}=m(rt);n.sender=o;const s=(await lt(t,e))[0]?"patch":"post",a=ct(t,e);return(await axios[s]("/api/comm/chat"+a,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),Dt=(t,e=2,n=0,o=t.toString(),s=n.toString())=>s.repeat(e-o.length)+o,Tt=(t,e=window)=>({listen(n,o){e[`${n}EventListener`](t,o)},start(t){this.listen("add",t)},stop(t){this.listen("remove",t)}}),_t=(...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])(Dt,...t),showupElement:(t="",e=0,n=document.getElementById(t))=>n&&n.style&&(n.style.display="block",setTimeout((()=>n.style.display="none"),e)),getListener:Tt,isMissing:_t,go:Lt,stop:Mt}));const Ft="single-spa:routing-event",Pt=Tt(Ft);function At(t,{modulePath:e,update:n}){if(!1===n)return;if(_t({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 Pt.start(s),{destroy:()=>Pt.stop(s)}}const Bt=()=>window.dispatchEvent(new CustomEvent(Ft)),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}),zt=t=>({err:t[12],prop:t[11],refresh:Bt,tenant:t[3].tenant,user:t[3].user}),Ht=t=>({prop:4&t,tenant:8&t,user:8&t}),qt=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],zt);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,zt)},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],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,Ht,qt)},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,c;const l=[Wt,Jt],p=[];function f(t,e){return t[2]?0:1}return n=f(t),o=p[n]=l[n](t),{c(){e=x("section"),o.c(),I(e,"class","data")},m(o,l){var u;w(o,e,l),p[n].m(e,null),a=!0,r||(c=[(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):(H(),G(p[i],1,1,(()=>{p[i]=null})),q(),o=p[n],o?o.p(t,a):(o=p[n]=l[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(c)}}}function ne(t,e,o){let s,{$$slots:a={},$$scope:i}=e;const{loggedIn:r}=n;var c,l;c=r,l=t=>o(3,s=t),t.$$.on_destroy.push(f(c,l));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:c}=s;let{noForm:l=""}=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,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,m=t.classId)},t.$$.update=()=>{8&t.$$.dirty&&d&&setTimeout(g)},[p,l,u,d,f,m,c,({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 ce(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}),T.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],P((()=>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 le(t){let e,n;return e=new t[4]({props:{title:t[0],closeCallback:t[10],$$slots:{default:[ce]},$$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:[le,({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}),T.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],P((()=>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: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,a,"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.44");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})}})}}}));
|