react-luminus-components 1.2.28 → 1.2.31
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/.vite/manifest.json +53 -53
- package/dist/EventType-D1zXMD8A.js +63 -0
- package/dist/EventType-DO8vvA6X.cjs +1 -0
- package/dist/{SimpleTooltip-BRhpcft2.cjs → SimpleTooltip-CjMfPKvQ.cjs} +1 -1
- package/dist/{SimpleTooltip-QvdXlxmf.js → SimpleTooltip-cMiObSvf.js} +1 -1
- package/dist/{Typography-ViYwSz0j.js → Typography-B12JkmMC.js} +1 -1
- package/dist/{Typography-tgs5dV12.cjs → Typography-Plu1Wa0_.cjs} +1 -1
- package/dist/{UserAvatarToggle-C3Sj7vJ2.js → UserAvatarToggle-BWDRIIXE.js} +2450 -2036
- package/dist/UserAvatarToggle-DEb7Klk7.cjs +253 -0
- package/dist/components/common/AuthTemplate/AuthTemplate.d.ts +6 -0
- package/dist/components/common/index.d.ts +1 -0
- package/dist/contexts/auth/AuthContext.d.ts +10 -0
- package/dist/contexts/auth/AuthProvider.d.ts +16 -0
- package/dist/contexts/index.d.ts +2 -0
- package/dist/contexts/luminus-components/LuminusComponentsContext.d.ts +2 -1
- package/dist/contexts/luminus-components/LuminusComponentsProvider.d.ts +3 -2
- package/dist/contexts/user/UserContext.d.ts +1 -1
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +651 -475
- package/dist/hooks/useAuth/hooks/useDevAuth.d.ts +7 -0
- package/dist/hooks/useAuth/hooks/useMsalAuth.d.ts +8 -0
- package/dist/hooks/useAuth/useAuth.d.ts +2 -1
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +4 -4
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +32 -32
- package/dist/main.cjs.js +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.es.js +2170 -1788
- package/dist/{useConfirm-BSs-RcsS.js → useConfirm-CKDkB8lL.js} +1 -1
- package/dist/{useConfirm-D1nPczaK.cjs → useConfirm-QOAtP0re.cjs} +1 -1
- package/dist/{usePermissions-BoFHWnT4.js → usePermissions-Cg_BMKPX.js} +1 -1
- package/dist/{usePermissions-COxTbL_u.cjs → usePermissions-zYTcBjf7.cjs} +1 -1
- package/package.json +3 -1
- package/dist/DataKey-BehuC6mV.js +0 -33
- package/dist/DataKey-CD61sktc.cjs +0 -1
- package/dist/UserAvatarToggle-BKpAJdnv.cjs +0 -253
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useContext as l, useCallback as u } from "react";
|
|
2
|
-
import { P as p, C as h } from "./UserAvatarToggle-
|
|
2
|
+
import { P as p, C as h } from "./UserAvatarToggle-BWDRIIXE.js";
|
|
3
3
|
const x = () => {
|
|
4
4
|
const { isShown: e, text: s, showPrompt: t, hidePrompt: r, resolveRef: o, setOptions: c } = l(p), a = u((n) => {
|
|
5
5
|
r(), o.current(n);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("react"),f=require("./UserAvatarToggle-
|
|
1
|
+
"use strict";const r=require("react"),f=require("./UserAvatarToggle-DEb7Klk7.cjs"),p=()=>{const{isShown:s,text:c,showPrompt:n,hidePrompt:t,resolveRef:o,setOptions:i}=r.useContext(f.PromptContext),a=r.useCallback(e=>{t(),o.current(e)},[t,o]),l=r.useCallback(async(e,m)=>(i(u=>({...u,...m})),n(e),new Promise(u=>{o.current=u})),[o,i,n]);return{isShown:s,text:c,prompt:l,onFinish:a}};let C;const h=()=>{const{show:s,text:c,showConfirm:n,hideConfirm:t}=r.useContext(f.ConfirmContext),o=()=>{t()};return{confirm:async e=>(n(e),new Promise(m=>{C=m})),onConfirm:()=>{o(),C(!0)},onCancel:()=>{o(),C(!1)},show:s,text:c}};exports.useConfirm=h;exports.usePrompt=p;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useContext as n, useCallback as t } from "react";
|
|
2
|
-
import { U as i } from "./UserAvatarToggle-
|
|
2
|
+
import { U as i } from "./UserAvatarToggle-BWDRIIXE.js";
|
|
3
3
|
const u = () => {
|
|
4
4
|
const { user: s } = n(i);
|
|
5
5
|
return { checkUserHasPermissions: t((r) => r.every((o) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("react"),i=require("./UserAvatarToggle-
|
|
1
|
+
"use strict";const r=require("react"),i=require("./UserAvatarToggle-DEb7Klk7.cjs"),c=()=>{const{user:s}=r.useContext(i.UserContext);return{checkUserHasPermissions:r.useCallback(n=>n.every(t=>{var e;return(e=s==null?void 0:s.permissions)==null?void 0:e.includes(t)}),[s])}};exports.usePermissions=c;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-luminus-components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.31",
|
|
4
4
|
"description": "Library of React Components reusable in Luminus projects (Fleetman, CAFM)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -59,6 +59,8 @@
|
|
|
59
59
|
"zod": ">=3"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
+
"@azure/msal-browser": "^3.14.0",
|
|
63
|
+
"@azure/msal-react": "^2.0.16",
|
|
62
64
|
"classnames": "^2.5.1",
|
|
63
65
|
"date-fns": "^3.6.0",
|
|
64
66
|
"react-cookie": "^7.1.4",
|
package/dist/DataKey-BehuC6mV.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { j as t, c as o } from "./UserAvatarToggle-C3Sj7vJ2.js";
|
|
2
|
-
import { useRef as e, useEffect as i } from "react";
|
|
3
|
-
const a = "_loading_14qfh_1", c = "_spinner-grow_14qfh_10", l = "_second_14qfh_14", u = "_third_14qfh_17", r = {
|
|
4
|
-
loading: a,
|
|
5
|
-
"spinner-grow": "_spinner-grow_14qfh_10",
|
|
6
|
-
spinnerGrow: c,
|
|
7
|
-
second: l,
|
|
8
|
-
third: u
|
|
9
|
-
}, m = () => /* @__PURE__ */ t.jsxs("div", { className: o("luminus-loading", r.loading), children: [
|
|
10
|
-
/* @__PURE__ */ t.jsx("div", { className: o("spinner-grow", r.spinnerGrow, "text-primary"), role: "status" }),
|
|
11
|
-
/* @__PURE__ */ t.jsx("div", { className: o("spinner-grow", r.spinnerGrow, "text-primary", r.second), role: "status" }),
|
|
12
|
-
/* @__PURE__ */ t.jsx("div", { className: o("spinner-grow", r.spinnerGrow, "text-primary", r.third), role: "status" })
|
|
13
|
-
] });
|
|
14
|
-
function g(s) {
|
|
15
|
-
const n = e(null);
|
|
16
|
-
return i(() => {
|
|
17
|
-
n.current = s;
|
|
18
|
-
}), n.current;
|
|
19
|
-
}
|
|
20
|
-
var d = Function.prototype.bind.call(Function.prototype.call, [].slice);
|
|
21
|
-
function w(s, n) {
|
|
22
|
-
return d(s.querySelectorAll(n));
|
|
23
|
-
}
|
|
24
|
-
const p = "data-rr-ui-";
|
|
25
|
-
function h(s) {
|
|
26
|
-
return `${p}${s}`;
|
|
27
|
-
}
|
|
28
|
-
export {
|
|
29
|
-
m as L,
|
|
30
|
-
h as d,
|
|
31
|
-
w as q,
|
|
32
|
-
g as u
|
|
33
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const s=require("./UserAvatarToggle-BKpAJdnv.cjs"),t=require("react"),o="_loading_14qfh_1",i="_spinner-grow_14qfh_10",a="_second_14qfh_14",c="_third_14qfh_17",r={loading:o,"spinner-grow":"_spinner-grow_14qfh_10",spinnerGrow:i,second:a,third:c},u=()=>s.jsxRuntimeExports.jsxs("div",{className:s.classNames("luminus-loading",r.loading),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("spinner-grow",r.spinnerGrow,"text-primary"),role:"status"}),s.jsxRuntimeExports.jsx("div",{className:s.classNames("spinner-grow",r.spinnerGrow,"text-primary",r.second),role:"status"}),s.jsxRuntimeExports.jsx("div",{className:s.classNames("spinner-grow",r.spinnerGrow,"text-primary",r.third),role:"status"})]});function l(n){const e=t.useRef(null);return t.useEffect(()=>{e.current=n}),e.current}var d=Function.prototype.bind.call(Function.prototype.call,[].slice);function p(n,e){return d(n.querySelectorAll(e))}const m="data-rr-ui-";function _(n){return`${m}${n}`}exports.Loading=u;exports.dataAttr=_;exports.qsa=p;exports.usePrevious=l;
|