react-luminus-components 1.2.116 → 1.2.117
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 +44 -44
- package/dist/{NoInputContainer-Dnr4Gmhz.cjs → NoInputContainer-BxMb-BuJ.cjs} +45 -45
- package/dist/{NoInputContainer-BrMG0XaD.js → NoInputContainer-Cl1VEez2.js} +1089 -1083
- package/dist/{PrimaryButton-B-rsu4mH.js → PrimaryButton-Dvh3Xiid.js} +1 -1
- package/dist/{PrimaryButton-BWsmVaS4.cjs → PrimaryButton-Jg-rT_fb.cjs} +1 -1
- package/dist/SimpleTooltip-CMrJHfcY.js +5 -0
- package/dist/{SimpleTooltip-C7etGi3z.cjs → SimpleTooltip-DA3RCxkm.cjs} +1 -1
- package/dist/contexts/user/UserContext.d.ts +2 -1
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +202 -187
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +20 -20
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +3 -3
- package/dist/main.cjs.js +1 -1
- package/dist/main.es.js +521 -533
- package/dist/models/index.d.ts +2 -0
- package/dist/models/types/LoginState.d.ts +7 -0
- package/dist/models/types/UserLoginState.d.ts +7 -0
- package/dist/{useConfirm-Bc_hxaIH.js → useConfirm-BiFAJsnv.js} +5 -5
- package/dist/{useConfirm-zF4wI5M1.cjs → useConfirm-qcfEqXzH.cjs} +1 -1
- package/dist/{usePermissions-mjkkUVuj.cjs → usePermissions-BUCijjhX.cjs} +1 -1
- package/dist/{usePermissions-CvxtD-vS.js → usePermissions-C1W9RoyV.js} +1 -1
- package/package.json +1 -1
- package/dist/SimpleTooltip-iJa3SqpB.js +0 -5
package/dist/models/index.d.ts
CHANGED
|
@@ -60,3 +60,5 @@ export type { default as ErrorBoundaryTexts } from './texts/ErrorBoundaryTexts';
|
|
|
60
60
|
export type { default as PromptOptions } from './types/PromptOptions';
|
|
61
61
|
export type { default as DropdownPickerOption } from './types/DropdownPickerOption';
|
|
62
62
|
export type { default as UserModel } from './types/UserModel';
|
|
63
|
+
export { default as LoginState } from './types/LoginState';
|
|
64
|
+
export type { default as UserLoginState } from './types/UserLoginState';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { useContext as
|
|
2
|
-
import {
|
|
1
|
+
import { useContext as l, useCallback as u } from "react";
|
|
2
|
+
import { an as p, am as h } from "./NoInputContainer-Cl1VEez2.js";
|
|
3
3
|
const P = () => {
|
|
4
|
-
const { isShown: e, text: s, showPrompt: t, hidePrompt: r, resolveRef: o, setOptions: c } =
|
|
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);
|
|
6
|
-
}, [r, o]), f =
|
|
6
|
+
}, [r, o]), f = u(async (n, m) => (c((i) => ({ ...i, ...m })), t(n), new Promise((i) => {
|
|
7
7
|
o.current = i;
|
|
8
8
|
})), [o, c, t]);
|
|
9
9
|
return { isShown: e, text: s, prompt: f, onFinish: C };
|
|
10
10
|
};
|
|
11
11
|
let a;
|
|
12
12
|
const b = () => {
|
|
13
|
-
const { show: e, text: s, showConfirm: t, hideConfirm: r } =
|
|
13
|
+
const { show: e, text: s, showConfirm: t, hideConfirm: r } = l(h), o = () => {
|
|
14
14
|
r();
|
|
15
15
|
};
|
|
16
16
|
return { confirm: async (n) => (t(n), new Promise((m) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("react"),f=require("./NoInputContainer-
|
|
1
|
+
"use strict";const r=require("react"),f=require("./NoInputContainer-BxMb-BuJ.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 +1 @@
|
|
|
1
|
-
"use strict";const r=require("react"),t=require("./NoInputContainer-
|
|
1
|
+
"use strict";const r=require("react"),t=require("./NoInputContainer-BxMb-BuJ.cjs");require("./latinize-DaqzUOla.cjs");require("react-hook-form");const o=()=>{const{user:e}=r.useContext(t.UserContext);return{checkUserHasPermissions:r.useCallback(n=>n.every(i=>{var s;return(s=e==null?void 0:e.permissions)==null?void 0:s.includes(i)}),[e])}};exports.usePermissions=o;
|
package/package.json
CHANGED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { j as o, ad as t, ak as e } from "./NoInputContainer-BrMG0XaD.js";
|
|
2
|
-
const l = ({ text: s, placement: r, children: a }) => /* @__PURE__ */ o.jsx(t, { placement: r, overlay: /* @__PURE__ */ o.jsx(e, { className: "luminus-tooltip", children: s }), children: a });
|
|
3
|
-
export {
|
|
4
|
-
l as S
|
|
5
|
-
};
|