react-luminus-components 1.2.62 → 1.2.63

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/main.es.js CHANGED
@@ -1,12 +1,12 @@
1
- import { j as s, t as re, c as ae, g as Zn, T as er, a as tr, b as x, s as yt, E as nr, d as rr, e as or, f as sr, h as ar, u as ge, i as V, k as ir, l as cr, m as lr, n as ur, o as dr, p as hr, q as mr, r as fr, v as at, w as it, x as pr, y as gr, z as wr, P as be, F as ue, A as xr, B as yr, C as ct, S as vt, D as De, G as Pe, H as lt, I as vr, J as Bt, K as $e, L as Re, O as bt, M as br, N as ie, Q as _r, R as jr, U as Vt, V as ut, W as dt, X as Q, Y as kr, Z as Ut, _ as Cr, $ as Kt, a0 as Nr, a1 as $r, a2 as Ir, a3 as Sr, a4 as zt, a5 as je, a6 as Tr, a7 as Er, a8 as Or, a9 as Mr, aa as Dr, ab as Xe, ac as Ge, ad as Qt, ae as we, af as Pr } from "./NoInputContainer-CJdyV1f-.js";
2
- import { ah as Xc, ag as Jc } from "./NoInputContainer-CJdyV1f-.js";
1
+ import { j as s, t as re, c as ae, g as Zn, T as er, a as tr, b as x, s as yt, E as nr, d as rr, e as or, f as sr, h as ar, u as ge, i as V, k as ir, l as cr, m as lr, n as ur, o as dr, p as hr, q as mr, r as fr, v as at, w as it, x as pr, y as gr, z as wr, P as be, F as ue, A as xr, B as yr, C as ct, S as vt, D as De, G as Pe, H as lt, I as vr, J as Bt, K as $e, L as Re, O as bt, M as br, N as ie, Q as _r, R as jr, U as Vt, V as ut, W as dt, X as Q, Y as kr, Z as Ut, _ as Cr, $ as Kt, a0 as Nr, a1 as $r, a2 as Ir, a3 as Sr, a4 as zt, a5 as je, a6 as Tr, a7 as Er, a8 as Or, a9 as Mr, aa as Dr, ab as Xe, ac as Ge, ad as Qt, ae as we, af as Pr } from "./NoInputContainer-2Ycv-Em1.js";
2
+ import { ah as Xc, ag as Jc } from "./NoInputContainer-2Ycv-Em1.js";
3
3
  import * as A from "react";
4
4
  import Z, { useCallback as O, useMemo as z, useEffect as D, useRef as Y, useState as P, useReducer as Xt, useContext as q, createElement as Ar } from "react";
5
- import { d as Jt, u as Fr, q as _t, E as Ae, M as Fe, L as Wr } from "./EventType-a2Umpz50.js";
5
+ import { d as Jt, u as Fr, q as _t, E as Ae, M as Fe, L as Wr } from "./EventType-CL7YvlYX.js";
6
6
  import { useFormContext as de, Controller as Zt } from "react-hook-form";
7
7
  import { m as Rr, a as en } from "./textUtils-BbxuIsKq.js";
8
8
  import { u as tn, a as nn, b as rn } from "./useFormControlType-BAFqxupC.js";
9
- import { S as el } from "./SimpleTooltip-CSZZpH9m.js";
9
+ import { S as el } from "./SimpleTooltip-DbIaK2su.js";
10
10
  const vc = ({ fileLoader: t, fileName: e, children: n }) => {
11
11
  const r = O(async () => {
12
12
  var c;
@@ -3418,14 +3418,14 @@ const yi = "_item_1dy8x_1", zn = {
3418
3418
  u.length > 0 && e(Array.from(u));
3419
3419
  }, icon: /* @__PURE__ */ s.jsx(zt, { style: { fontSize: 18 } }), multiple: !0, children: n ?? null }) : null;
3420
3420
  }, Ec = ({ appAccessPermissions: t, children: e }) => {
3421
- const { NavigateComponent: n } = q(ie), { useMsal: r, msalScopes: o } = q(Er), { isAuthenticated: a, isAuthenticating: i } = Or(), { user: c, loggingInProgress: l } = q(Mr), u = c && (t == null ? void 0 : t.every((d) => {
3422
- var h;
3423
- return (h = c.permissions) == null ? void 0 : h.includes(d);
3421
+ const { NavigateComponent: n } = q(ie), { useMsal: r, msalScopes: o } = q(Er), { isAuthenticated: a, isAuthenticating: i } = Or(), { user: c } = q(Mr), l = c && (t == null ? void 0 : t.every((u) => {
3422
+ var d;
3423
+ return (d = c.permissions) == null ? void 0 : d.includes(u);
3424
3424
  }));
3425
- return r ? !a && i || l ? /* @__PURE__ */ s.jsx(Wr, {}) : /* @__PURE__ */ s.jsxs(ba, { interactionType: Re.Redirect, authenticationRequest: { scopes: o }, children: [
3425
+ return r ? !a() && i() ? /* @__PURE__ */ s.jsx(Wr, {}) : /* @__PURE__ */ s.jsxs(ba, { interactionType: Re.Redirect, authenticationRequest: { scopes: o }, children: [
3426
3426
  !c && /* @__PURE__ */ s.jsx(n, { to: "/no-user-login", replace: !0 }),
3427
- u ? /* @__PURE__ */ s.jsx(s.Fragment, { children: e }) : /* @__PURE__ */ s.jsx(n, { to: "/user-not-permitted", replace: !0 })
3428
- ] }) : !a() || !c ? /* @__PURE__ */ s.jsx(n, { to: "/login", replace: !0 }) : u ? e : /* @__PURE__ */ s.jsx(n, { to: "/user-not-permitted", replace: !0 });
3427
+ l ? /* @__PURE__ */ s.jsx(s.Fragment, { children: e }) : /* @__PURE__ */ s.jsx(n, { to: "/user-not-permitted", replace: !0 })
3428
+ ] }) : !a() || !c ? /* @__PURE__ */ s.jsx(n, { to: "/login", replace: !0 }) : l ? e : /* @__PURE__ */ s.jsx(n, { to: "/user-not-permitted", replace: !0 });
3429
3429
  }, Oc = ({ heading: t, content: e, placement: n, children: r, trigger: o }) => /* @__PURE__ */ s.jsx(Dr, { placement: n, overlay: /* @__PURE__ */ s.jsxs(Xe, { className: "luminus-tooltip", children: [
3430
3430
  /* @__PURE__ */ s.jsx(Xe.Header, { as: "h3", children: t }),
3431
3431
  /* @__PURE__ */ s.jsx(Xe.Body, { children: e })
@@ -1 +1 @@
1
- "use strict";const r=require("react"),f=require("./NoInputContainer-DG__eVmA.cjs"),p=()=>{const{isShown:s,text:c,showPrompt:e,hidePrompt:t,resolveRef:n,setOptions:i}=r.useContext(f.PromptContext),a=r.useCallback(o=>{t(),n.current(o)},[t,n]),l=r.useCallback(async(o,u)=>(i(m=>({...m,...u})),e(o),new Promise(m=>{n.current=m})),[n,i,e]);return{isShown:s,text:c,prompt:l,onFinish:a}};let C;const h=()=>{const{show:s,text:c,showConfirm:e,hideConfirm:t}=r.useContext(f.ConfirmContext),n=()=>{t()};return{confirm:async o=>(e(o),new Promise(u=>{C=u})),onConfirm:()=>{n(),C(!0)},onCancel:()=>{n(),C(!1)},show:s,text:c}};exports.useConfirm=h;exports.usePrompt=p;
1
+ "use strict";const r=require("react"),f=require("./NoInputContainer-KFDzvABU.cjs"),p=()=>{const{isShown:s,text:c,showPrompt:e,hidePrompt:t,resolveRef:n,setOptions:i}=r.useContext(f.PromptContext),a=r.useCallback(o=>{t(),n.current(o)},[t,n]),l=r.useCallback(async(o,u)=>(i(m=>({...m,...u})),e(o),new Promise(m=>{n.current=m})),[n,i,e]);return{isShown:s,text:c,prompt:l,onFinish:a}};let C;const h=()=>{const{show:s,text:c,showConfirm:e,hideConfirm:t}=r.useContext(f.ConfirmContext),n=()=>{t()};return{confirm:async o=>(e(o),new Promise(u=>{C=u})),onConfirm:()=>{n(),C(!0)},onCancel:()=>{n(),C(!1)},show:s,text:c}};exports.useConfirm=h;exports.usePrompt=p;
@@ -1,5 +1,5 @@
1
1
  import { useContext as l, useCallback as u } from "react";
2
- import { aj as p, ak as h } from "./NoInputContainer-CJdyV1f-.js";
2
+ import { aj as p, ak as h } from "./NoInputContainer-2Ycv-Em1.js";
3
3
  const P = () => {
4
4
  const { isShown: e, text: s, showPrompt: t, hidePrompt: r, resolveRef: o, setOptions: c } = l(p), C = u((n) => {
5
5
  r(), o.current(n);
@@ -1 +1 @@
1
- "use strict";const r=require("react"),t=require("./NoInputContainer-DG__eVmA.cjs");require("react-hook-form");const o=()=>{const{user:s}=r.useContext(t.UserContext);return{checkUserHasPermissions:r.useCallback(n=>n.every(i=>{var e;return(e=s==null?void 0:s.permissions)==null?void 0:e.includes(i)}),[s])}};exports.usePermissions=o;
1
+ "use strict";const r=require("react"),t=require("./NoInputContainer-KFDzvABU.cjs");require("react-hook-form");const o=()=>{const{user:s}=r.useContext(t.UserContext);return{checkUserHasPermissions:r.useCallback(n=>n.every(i=>{var e;return(e=s==null?void 0:s.permissions)==null?void 0:e.includes(i)}),[s])}};exports.usePermissions=o;
@@ -1,5 +1,5 @@
1
1
  import { useContext as t, useCallback as i } from "react";
2
- import { a9 as n } from "./NoInputContainer-CJdyV1f-.js";
2
+ import { a9 as n } from "./NoInputContainer-2Ycv-Em1.js";
3
3
  import "react-hook-form";
4
4
  const p = () => {
5
5
  const { user: s } = t(n);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-luminus-components",
3
- "version": "1.2.62",
3
+ "version": "1.2.63",
4
4
  "description": "Library of React Components reusable in Luminus projects (Fleetman, CAFM)",
5
5
  "type": "module",
6
6
  "repository": {