@enablerr-ui/reporting 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.js +1 -1
- package/package.json +1 -1
package/dist/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["@enablerr-ui/detail","@enablerr-ui/form","@enablerr-ui/layout"],(function(t){"use strict";var e,n,o,r;return{setters:[function(t){e=t.Form},function(t){n=t.Page,o=t.Request},function(t){r=t.getAttractions}],execute:function(){t("version","0.2.6");function a(){}function s(t){return t()}function c(){return Object.create(null)}function i(t){t.forEach(s)}function u(t){return"function"==typeof t}function l(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function f(t,e){t.appendChild(e)}function p(t,e,n){t.insertBefore(e,n||null)}function d(t){t.parentNode.removeChild(t)}function m(t){return document.createElement(t)}function $(){return t=" ",document.createTextNode(t);var t}function g(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function b(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:g(t,e,n)}let y;function h(t){y=t}const w=[],v=[],x=[],k=[],O=Promise.resolve();let E=!1;function _(t){x.push(t)}let j=!1;const P=new Set;function S(){if(!j){j=!0;do{for(let t=0;t<w.length;t+=1){const e=w[t];h(e),C(e.$$)}for(h(null),w.length=0;v.length;)v.pop()();for(let t=0;t<x.length;t+=1){const e=x[t];P.has(e)||(P.add(e),e())}x.length=0}while(w.length);for(;k.length;)k.pop()();E=!1,j=!1,P.clear()}}function C(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(_)}}const D=new Set;function I(t,e){t&&t.i&&(D.delete(t),t.i(e))}function G(t,e,n,o){if(t&&t.o){if(D.has(t))return;D.add(t),t.o(e)}}function T(t){t&&t.c()}function A(t,e,n,o){const{fragment:r,on_mount:a,on_destroy:c,after_update:l}=t.$$;r&&r.m(e,n),o||_((()=>{const e=a.map(s).filter(u);c?c.push(...e):i(e),t.$$.on_mount=[]})),l.forEach(_)}function B(t,e){const n=t.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function N(t,e){-1===t.$$.dirty[0]&&(w.push(t),E||(E=!0,O.then(S)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function q(t,e,n,o,r,s,u=[-1]){const l=y;h(t);const f=t.$$={fragment:null,ctx:null,props:s,update:a,not_equal:r,bound:c(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l?l.$$.context:e.context||[]),callbacks:c(),dirty:u,skip_bound:!1};let p=!1;if(f.ctx=n?n(t,e.props||{},((e,n,...o)=>{const a=o.length?o[0]:n;return f.ctx&&r(f.ctx[e],f.ctx[e]=a)&&(!f.skip_bound&&f.bound[e]&&f.bound[e](a),p&&N(t,e)),n})):[],f.update(),p=!0,i(f.before_update),f.fragment=!!o&&o(f.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);f.fragment&&f.fragment.l(t),t.forEach(d)}else f.fragment&&f.fragment.c();e.intro&&I(t.$$.fragment),A(t,e.target,e.anchor,e.customElement),S()}h(l)}class M{$destroy(){B(this,1),this.$destroy=a}$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 R(t){let n,o,r,a;return n=new t[4]({props:{class:"reportTask"}}),r=new e({props:{schema:t[14],recID:t[5],prevEventID:t[0],taskId:t[6],prev:t[1],readonly:t[7],isStandalone:t[9],root:t[8]}}),r.$on("back",t[11]),{c(){T(n.$$.fragment),o=$(),T(r.$$.fragment)},m(t,e){A(n,t,e),p(t,o,e),A(r,t,e),a=!0},p(t,e){const n={};16384&e&&(n.schema=t[14]),1&e&&(n.prevEventID=t[0]),2&e&&(n.prev=t[1]),r.$set(n)},i(t){a||(I(n.$$.fragment,t),I(r.$$.fragment,t),a=!0)},o(t){G(n.$$.fragment,t),G(r.$$.fragment,t),a=!1},d(t){B(n,t),t&&d(o),B(r,t)}}}function F(t){let e,n,o;return n=new t[3]({props:{constrainWidth:!0,title:t[15],titleClass:"task_title",closeCallback:t[12],class:"task--area",$$slots:{default:[R]},$$scope:{ctx:t}}}),{c(){e=m("div"),T(n.$$.fragment),g(e,"class","task svelte-wobxwu")},m(t,r){p(t,e,r),A(n,e,null),o=!0},p(t,e){const o={};32768&e&&(o.title=t[15]),147459&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(I(n.$$.fragment,t),o=!0)},o(t){G(n.$$.fragment,t),o=!1},d(t){t&&d(e),B(n)}}}function W(t){let e,n,o;return n=new t[2]({props:{open:"true",noClickaway:"true",class:"task--modal",$$slots:{default:[F,({closeCallback:t})=>({16:t}),({closeCallback:t})=>t?65536:0]},$$scope:{ctx:t}}}),n.$on("change",H),{c(){e=m("div"),T(n.$$.fragment),g(e,"class","task--page svelte-wobxwu")},m(t,r){p(t,e,r),A(n,e,null),o=!0},p(t,e){const o={};180227&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(I(n.$$.fragment,t),o=!0)},o(t){G(n.$$.fragment,t),o=!1},d(t){t&&d(e),B(n)}}}function z(t){let e,o;return e=new n({props:{update:t[10],$$slots:{default:[W,({prop:{schema:t,title:e}})=>({14:t,15:e}),({prop:t})=>(t?16384:0)|(t?32768:0)]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(t,n){A(e,t,n),o=!0},p(t,[n]){const o={};180227&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){o||(I(e.$$.fragment,t),o=!0)},o(t){G(e.$$.fragment,t),o=!1},d(t){B(e,t)}}}function H(t){t.detail.value?disableScroll():enableScroll()}function J(t,e,n){const{Modal:a,Dialog:s,Divider:c}=r;let i,u;const l=-1!==window.location.search.indexOf("view=standalone"),f=-1!==window.location.search.indexOf("back=true"),p=()=>{f?setTimeout((()=>window.history.back()),200):l?setTimeout((()=>window.close()),200):window.singleSpaNavigate("/reporting")};return[i,u,a,s,c,undefined,undefined,!1,!1,l,async(t,e)=>{if(e){const t=await o.getTaskById(e);n(0,i=t.eventSchema.id),n(1,u=t.data._id)}const r=await o.getSchema(t);return{schema:r,title:r.identity.designation}},p,()=>p()]}class K extends M{constructor(t){var e;super(),document.getElementById("svelte-wobxwu-style")||((e=m("style")).id="svelte-wobxwu-style",e.textContent='.task--page.svelte-wobxwu .task--modal{align-items:flex-start !important;overflow:auto !important}.task.svelte-wobxwu{margin-top:4em}@media(max-height: 900px){.task.svelte-wobxwu{margin-top:0}}.task.svelte-wobxwu .task--area{overflow-x:hidden;overflow-y:auto;min-width:50vw}.task.svelte-wobxwu .dialog nav[role="group"]{display:flex;justify-content:flex-start;flex-direction:row;flex-wrap:nowrap;gap:1em}hr.reportTask{margin-bottom:1.5em}',f(document.head,e)),q(this,t,J,z,l,{})}}function L(t){let e,n,o,r,s;return r=new K({}),{c(){e=$(),n=m("section"),o=m("l-container"),T(r.$$.fragment),document.title="enablerr - Reporting",b(o,"class","shadow"),b(o,"maxwidth","ld")},m(t,a){p(t,e,a),p(t,n,a),f(n,o),A(r,o,null),s=!0},p:a,i(t){s||(I(r.$$.fragment,t),s=!0)},o(t){G(r.$$.fragment,t),s=!1},d(t){t&&d(e),t&&d(n),B(r)}}}function Q(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var U,V,X=(U=function(t,e){function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function o(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?n(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("object"!==a(t))throw new Error("single-spa-svelte requires a configuration object");var e=o(o({},s),t);if(!e.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:c.bind(null,e,n),mount:i.bind(null,e,n),unmount:u.bind(null,e,n),update:l.bind(null,e,n)}};var s={component:null,domElementGetter:null,props:{}};function c(t){return Promise.resolve()}function i(t,e,n){var r=Object.keys(s),a=Object.keys(t).reduce((function(e,n){return r.includes(n)||(e[n]=t[n]),e}),{});return Promise.resolve().then((function(){var r=function(t,e){return(e=e&&e.customProps?e.customProps:e).domElement?function(){return e.domElement}:e.domElementGetter?function(){return e.domElementGetter(e)}:t.domElementGetter?function(){return t.domElementGetter(e)}:function(t){var e=t.appName||t.name;if(!e)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(e);return function(){var t=document.getElementById(n);return t||((t=document.createElement("div")).id=n,document.body.appendChild(t)),t}}(e)}(t,n),s=r();e.instance=new t.component(o(o({},a),{},{target:s,props:Object.assign({},n,t.props)}))}))}function u(t,e){return Promise.resolve().then((function(){e.instance.$destroy?e.instance.$destroy():e.instance.destroy()}))}function l(t,e,n){return Promise.resolve().then((function(){e.instance.$set?e.instance.$set(n):e.instance.set(n)}))}},U(V={exports:{}},V.exports),V.exports);const Y=Q(X)({component:class extends M{constructor(t){super(),q(this,t,null,L,l,{})}},domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Z,mount:tt,unmount:et}=Y;t({bootstrap:Z,mount:tt,unmount:et})}}}));
|
|
1
|
+
System.register(["@enablerr-ui/detail","@enablerr-ui/form","@enablerr-ui/layout"],function(t){"use strict";var e,n,o,r,a;return{setters:[function(t){e=t.Form,n=t.ListScreen},function(t){o=t.Page,r=t.Request},function(t){a=t.getAttractions}],execute:function(){t("version","0.2.7");function s(){}function i(t){return t()}function c(){return Object.create(null)}function l(t){t.forEach(i)}function u(t){return"function"==typeof t}function f(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function d(t,e){t.appendChild(e)}function p(t,e,n){t.insertBefore(e,n||null)}function m(t){t.parentNode.removeChild(t)}function $(t){return document.createElement(t)}function g(t){return document.createTextNode(t)}function w(){return g(" ")}function b(){return g("")}function h(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function y(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:h(t,e,n)}let v;function x(t){v=t}const k=[],O=[],_=[],E=[],S=Promise.resolve();let j=!1;function P(t){_.push(t)}let I=!1;const C=new Set;function D(){if(!I){I=!0;do{for(let t=0;t<k.length;t+=1){const e=k[t];x(e),T(e.$$)}for(x(null),k.length=0;O.length;)O.pop()();for(let t=0;t<_.length;t+=1){const e=_[t];C.has(e)||(C.add(e),e())}_.length=0}while(k.length);for(;E.length;)E.pop()();j=!1,I=!1,C.clear()}}function T(t){if(null!==t.fragment){t.update(),l(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(P)}}const B=new Set;function q(t,e){t&&t.i&&(B.delete(t),t.i(e))}function G(t,e,n,o){if(t&&t.o){if(B.has(t))return;B.add(t),t.o(e)}}function M(t){t&&t.c()}function N(t,e,n,o){const{fragment:r,on_mount:a,on_destroy:s,after_update:c}=t.$$;r&&r.m(e,n),o||P(()=>{const e=a.map(i).filter(u);s?s.push(...e):l(e),t.$$.on_mount=[]}),c.forEach(P)}function A(t,e){const n=t.$$;null!==n.fragment&&(l(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function L(t,e){-1===t.$$.dirty[0]&&(k.push(t),j||(j=!0,S.then(D)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function W(t,e,n,o,r,a,i=[-1]){const u=v;x(t);const f=t.$$={fragment:null,ctx:null,props:a,update:s,not_equal:r,bound:c(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:e.context||[]),callbacks:c(),dirty:i,skip_bound:!1};let d=!1;if(f.ctx=n?n(t,e.props||{},(e,n,...o)=>{const a=o.length?o[0]:n;return f.ctx&&r(f.ctx[e],f.ctx[e]=a)&&(!f.skip_bound&&f.bound[e]&&f.bound[e](a),d&&L(t,e)),n}):[],f.update(),d=!0,l(f.before_update),f.fragment=!!o&&o(f.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);f.fragment&&f.fragment.l(t),t.forEach(m)}else f.fragment&&f.fragment.c();e.intro&&q(t.$$.fragment),N(t,e.target,e.anchor,e.customElement),D()}x(u)}class R{$destroy(){A(this,1),this.$destroy=s}$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 F(t){let n,o,r,a;return n=new t[4]({props:{class:"reportTask"}}),r=new e({props:{schema:t[15],recID:t[5],prevEventID:t[0],taskId:t[6],prev:t[1],readonly:t[7],isStandalone:t[10],root:t[8]}}),r.$on("back",t[12]),{c(){M(n.$$.fragment),o=w(),M(r.$$.fragment)},m(t,e){N(n,t,e),p(t,o,e),N(r,t,e),a=!0},p(t,e){const n={};32768&e&&(n.schema=t[15]),1&e&&(n.prevEventID=t[0]),2&e&&(n.prev=t[1]),r.$set(n)},i(t){a||(q(n.$$.fragment,t),q(r.$$.fragment,t),a=!0)},o(t){G(n.$$.fragment,t),G(r.$$.fragment,t),a=!1},d(t){A(n,t),t&&m(o),A(r,t)}}}function V(t){let e,n,o;return n=new t[3]({props:{constrainWidth:!0,title:t[16],titleClass:"task_title",closeCallback:t[13],class:"task--area",$$slots:{default:[F]},$$scope:{ctx:t}}}),{c(){e=$("div"),M(n.$$.fragment),h(e,"class","task svelte-wobxwu")},m(t,r){p(t,e,r),N(n,e,null),o=!0},p(t,e){const o={};65536&e&&(o.title=t[16]),294915&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(q(n.$$.fragment,t),o=!0)},o(t){G(n.$$.fragment,t),o=!1},d(t){t&&m(e),A(n)}}}function z(t){let e,n,o;return n=new t[2]({props:{open:"true",noClickaway:"true",class:"task--modal",$$slots:{default:[V,({closeCallback:t})=>({17:t}),({closeCallback:t})=>t?131072:0]},$$scope:{ctx:t}}}),n.$on("change",J),{c(){e=$("div"),M(n.$$.fragment),h(e,"class","task--page svelte-wobxwu")},m(t,r){p(t,e,r),N(n,e,null),o=!0},p(t,e){const o={};360451&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(q(n.$$.fragment,t),o=!0)},o(t){G(n.$$.fragment,t),o=!1},d(t){t&&m(e),A(n)}}}function H(t){let e,n,r=t[9]&&function(t){let e,n;return e=new o({props:{update:t[11],$$slots:{default:[z,({prop:{schema:t,title:e}})=>({15:t,16:e}),({prop:t})=>(t?32768:0)|(t?65536:0)]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment)},m(t,o){N(e,t,o),n=!0},p(t,n){const o={};360451&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(q(e.$$.fragment,t),n=!0)},o(t){G(e.$$.fragment,t),n=!1},d(t){A(e,t)}}}(t);return{c(){r&&r.c(),e=b()},m(t,o){r&&r.m(t,o),p(t,e,o),n=!0},p(t,[e]){t[9]&&r.p(t,e)},i(t){n||(q(r),n=!0)},o(t){G(r),n=!1},d(t){r&&r.d(t),t&&m(e)}}}function J(t){t.detail.value?disableScroll():enableScroll()}function K(t,e,n){const{Modal:o,Dialog:s,Divider:i}=a;let c,l;const u=window.location.pathname.startsWith("/reporting"),f=-1!==window.location.search.indexOf("view=standalone"),d=-1!==window.location.search.indexOf("back=true"),p=()=>{d?setTimeout(()=>window.history.back(),200):f?setTimeout(()=>window.close(),200):window.singleSpaNavigate("/reporting")};return[c,l,o,s,i,undefined,undefined,!1,!1,u,f,async(t,e)=>{if(e){const t=await r.getTaskById(e);n(0,c=t.eventSchema.id),n(1,l=t.data._id)}const o=await r.getSchema(t);return{schema:o,title:o.identity.designation}},p,()=>p()]}class Q extends R{constructor(t){var e;super(),document.getElementById("svelte-wobxwu-style")||((e=$("style")).id="svelte-wobxwu-style",e.textContent='.task--page.svelte-wobxwu .task--modal{align-items:flex-start !important;overflow:auto !important}.task.svelte-wobxwu{margin-top:4em}@media(max-height: 900px){.task.svelte-wobxwu{margin-top:0}}.task.svelte-wobxwu .task--area{overflow-x:hidden;overflow-y:auto;min-width:50vw}.task.svelte-wobxwu .dialog nav[role="group"]{display:flex;justify-content:flex-start;flex-direction:row;flex-wrap:nowrap;gap:1em}hr.reportTask{margin-bottom:1.5em}',d(document.head,e)),W(this,t,K,H,f,{})}}function U(t){let o,r,a,s,i,c,l,f;return o=new t[5]({props:{class:"reportTask"}}),a=new e({props:{schema:t[17],recID:t[6],prevEventID:t[0],taskId:t[7],prev:t[1],readonly:t[8],isStandalone:t[11],root:t[9],isScreen:t[10]}}),a.$on("screenList",function(){u(t[14](t[17]))&&t[14](t[17]).apply(this,arguments)}),a.$on("back",t[13]),i=new t[5]({props:{class:"reportTask"}}),l=new n({props:{inputList:t[2],eventId:t[17].id,schema:t[17]}}),{c(){M(o.$$.fragment),r=w(),M(a.$$.fragment),s=w(),M(i.$$.fragment),c=w(),M(l.$$.fragment)},m(t,e){N(o,t,e),p(t,r,e),N(a,t,e),p(t,s,e),N(i,t,e),p(t,c,e),N(l,t,e),f=!0},p(e,n){t=e;const o={};131072&n&&(o.schema=t[17]),1&n&&(o.prevEventID=t[0]),2&n&&(o.prev=t[1]),a.$set(o);const r={};4&n&&(r.inputList=t[2]),131072&n&&(r.eventId=t[17].id),131072&n&&(r.schema=t[17]),l.$set(r)},i(t){f||(q(o.$$.fragment,t),q(a.$$.fragment,t),q(i.$$.fragment,t),q(l.$$.fragment,t),f=!0)},o(t){G(o.$$.fragment,t),G(a.$$.fragment,t),G(i.$$.fragment,t),G(l.$$.fragment,t),f=!1},d(t){A(o,t),t&&m(r),A(a,t),t&&m(s),A(i,t),t&&m(c),A(l,t)}}}function X(t){let e,n,o;return n=new t[4]({props:{constrainWidth:!0,title:t[18],titleClass:"task_title",closeCallback:t[15],class:"task--area",$$slots:{default:[U]},$$scope:{ctx:t}}}),{c(){e=$("div"),M(n.$$.fragment),h(e,"class","task svelte-wobxwu")},m(t,r){p(t,e,r),N(n,e,null),o=!0},p(t,e){const o={};262144&e&&(o.title=t[18]),1179655&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(q(n.$$.fragment,t),o=!0)},o(t){G(n.$$.fragment,t),o=!1},d(t){t&&m(e),A(n)}}}function Y(t){let e,n,o;return n=new t[3]({props:{open:"true",noClickaway:"true",class:"task--modal",$$slots:{default:[X,({closeCallback:t})=>({19:t}),({closeCallback:t})=>t?524288:0]},$$scope:{ctx:t}}}),n.$on("change",tt),{c(){e=$("div"),M(n.$$.fragment),h(e,"class","task--page svelte-wobxwu")},m(t,r){p(t,e,r),N(n,e,null),o=!0},p(t,e){const o={};1441799&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(q(n.$$.fragment,t),o=!0)},o(t){G(n.$$.fragment,t),o=!1},d(t){t&&m(e),A(n)}}}function Z(t){let e,n,r=t[10]&&function(t){let e,n;return e=new o({props:{update:t[12],$$slots:{default:[Y,({prop:{schema:t,title:e}})=>({17:t,18:e}),({prop:t})=>(t?131072:0)|(t?262144:0)]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment)},m(t,o){N(e,t,o),n=!0},p(t,n){const o={};1441799&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(q(e.$$.fragment,t),n=!0)},o(t){G(e.$$.fragment,t),n=!1},d(t){A(e,t)}}}(t);return{c(){r&&r.c(),e=b()},m(t,o){r&&r.m(t,o),p(t,e,o),n=!0},p(t,[e]){t[10]&&r.p(t,e)},i(t){n||(q(r),n=!0)},o(t){G(r),n=!1},d(t){r&&r.d(t),t&&m(e)}}}function tt(t){t.detail.value?disableScroll():enableScroll()}function et(t,e,n){const{Modal:o,Dialog:s,Divider:i}=a;let c,l,u;const f=window.location.pathname.startsWith("/screen"),d=-1!==window.location.search.indexOf("view=standalone"),p=-1!==window.location.search.indexOf("back=true"),m=()=>{p?setTimeout(()=>window.history.back(),200):d?setTimeout(()=>window.close(),200):window.singleSpaNavigate("/reporting")};return[c,l,u,o,s,i,undefined,undefined,!1,!1,f,d,async(t,e)=>{if(e){const t=await r.getTaskById(e);n(0,c=t.eventSchema.id),n(1,l=t.data._id)}const o=await r.getSchema(t);return{schema:o,title:o.identity.designation}},m,t=>async({detail:e})=>{n(2,u=[]);const{eventId:o,row:a,item:s}=e;if(!a?._id)return;if(!s?.query)return;const i=await r.getEvent(t.id);if(!i?.input?.data?.length)return;await r.getTaskByDocId(a._id);const[c,l]=i.input.data[0].name.split("."),f=[];for(const t of s.query)f.push({[l+"."+t]:a._id});const d=[{$match:{$or:f}}];let p=await r.getSectionView(c,d);p=p.flatMap(t=>t[l]).filter(t=>{let e=!1;for(const n of s.query)e||(e=t[n]===a._id);return e}),n(2,u=p)},()=>m()]}class nt extends R{constructor(t){var e;super(),document.getElementById("svelte-wobxwu-style")||((e=$("style")).id="svelte-wobxwu-style",e.textContent='.task--page.svelte-wobxwu .task--modal{align-items:flex-start !important;overflow:auto !important}.task.svelte-wobxwu{margin-top:4em}@media(max-height: 900px){.task.svelte-wobxwu{margin-top:0}}.task.svelte-wobxwu .task--area{overflow-x:hidden;overflow-y:auto;min-width:50vw}.task.svelte-wobxwu .dialog nav[role="group"]{display:flex;justify-content:flex-start;flex-direction:row;flex-wrap:nowrap;gap:1em}hr.reportTask{margin-bottom:1.5em}',d(document.head,e)),W(this,t,et,Z,f,{})}}function ot(t){let e,n,o,r,a,i,c,l,u;return r=new Q({}),l=new nt({}),{c(){e=w(),n=$("section"),o=$("l-container"),M(r.$$.fragment),a=w(),i=$("section"),c=$("l-container"),M(l.$$.fragment),document.title="enablerr - Reporting",y(o,"class","shadow"),y(o,"maxwidth","ld"),y(c,"class","shadow"),y(c,"maxwidth","ld")},m(t,s){p(t,e,s),p(t,n,s),d(n,o),N(r,o,null),p(t,a,s),p(t,i,s),d(i,c),N(l,c,null),u=!0},p:s,i(t){u||(q(r.$$.fragment,t),q(l.$$.fragment,t),u=!0)},o(t){G(r.$$.fragment,t),G(l.$$.fragment,t),u=!1},d(t){t&&m(e),t&&m(n),A(r),t&&m(a),t&&m(i),A(l)}}}function rt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var at,st,it=(at=function(t,e){function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,o)}return n}function o(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?n(Object(o),!0).forEach(function(e){r(t,e,o[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("object"!==a(t))throw new Error("single-spa-svelte requires a configuration object");var e=o(o({},s),t);if(!e.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:i.bind(null,e,n),mount:c.bind(null,e,n),unmount:l.bind(null,e,n),update:u.bind(null,e,n)}};var s={component:null,domElementGetter:null,props:{}};function i(t){return Promise.resolve()}function c(t,e,n){var r=Object.keys(s),a=Object.keys(t).reduce(function(e,n){return r.includes(n)||(e[n]=t[n]),e},{});return Promise.resolve().then(function(){var r=function(t,e){return(e=e&&e.customProps?e.customProps:e).domElement?function(){return e.domElement}:e.domElementGetter?function(){return e.domElementGetter(e)}:t.domElementGetter?function(){return t.domElementGetter(e)}:function(t){var e=t.appName||t.name;if(!e)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(e);return function(){var t=document.getElementById(n);return t||((t=document.createElement("div")).id=n,document.body.appendChild(t)),t}}(e)}(t,n),s=r();e.instance=new t.component(o(o({},a),{},{target:s,props:Object.assign({},n,t.props)}))})}function l(t,e){return Promise.resolve().then(function(){e.instance.$destroy?e.instance.$destroy():e.instance.destroy()})}function u(t,e,n){return Promise.resolve().then(function(){e.instance.$set?e.instance.$set(n):e.instance.set(n)})}},at(st={exports:{}},st.exports),st.exports);const ct=rt(it)({component:class extends R{constructor(t){super(),W(this,t,null,ot,f,{})}},domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:lt,mount:ut,unmount:ft}=ct;t({bootstrap:lt,mount:ut,unmount:ft})}}});
|