react-luminus-components 1.2.89 → 1.2.90
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-na-dQnr4.cjs → NoInputContainer-B6Zq2P9U.cjs} +40 -40
- package/dist/{NoInputContainer-DRb1v547.js → NoInputContainer-BLnTERk_.js} +148 -140
- package/dist/{PrimaryButton-BZ3ksdv0.cjs → PrimaryButton-BQxwnEaM.cjs} +1 -1
- package/dist/{PrimaryButton-DG9AgtYX.js → PrimaryButton-ojvFJ8sc.js} +1 -1
- package/dist/{SimpleTooltip-CT1YSXK2.cjs → SimpleTooltip-Bd0sp7NR.cjs} +1 -1
- package/dist/{SimpleTooltip-DJdq14h2.js → SimpleTooltip-ClHQktQk.js} +1 -1
- package/dist/components/common/Timeline/Timeline.d.ts +7 -0
- package/dist/components/common/index.d.ts +1 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +3 -3
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +19 -19
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +3 -3
- package/dist/main.cjs.js +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.es.js +1026 -994
- package/dist/models/types/TimelineStep.d.ts +11 -0
- package/dist/models/types/TimelineStepState.d.ts +5 -0
- package/dist/style.css +1 -1
- package/dist/{useConfirm-BEmSDfJg.cjs → useConfirm-CjI25drI.cjs} +1 -1
- package/dist/{useConfirm-DOcPbsdI.js → useConfirm-HjXBOoB-.js} +3 -3
- package/dist/{usePermissions-RumK715m.js → usePermissions-DGt22caC.js} +1 -1
- package/dist/{usePermissions-Cks0h2bG.cjs → usePermissions-XfCQEumi.cjs} +1 -1
- package/package.json +1 -1
package/dist/hooks.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Q as He, a4 as Ae,
|
|
2
|
-
import {
|
|
3
|
-
import { a as gr, u as xr } from "./useConfirm-
|
|
1
|
+
import { Q as He, a4 as Ae, ao as Qe } from "./NoInputContainer-BLnTERk_.js";
|
|
2
|
+
import { aG as pr, a9 as yr, aF as _r } from "./NoInputContainer-BLnTERk_.js";
|
|
3
|
+
import { a as gr, u as xr } from "./useConfirm-HjXBOoB-.js";
|
|
4
4
|
import { useContext as $e, useRef as Xe, useState as Me, useCallback as Ke, useEffect as ze } from "react";
|
|
5
5
|
import { f as Fe } from "./latinize-3MO2uNV7.js";
|
|
6
6
|
import { i as et } from "./dateUtils-Di8ZfN8h.js";
|
|
7
7
|
import "react-hook-form";
|
|
8
8
|
import { a as br, b as wr, u as Tr } from "./useFormControlType-BAFqxupC.js";
|
|
9
|
-
import { u as Cr } from "./usePermissions-
|
|
9
|
+
import { u as Cr } from "./usePermissions-DGt22caC.js";
|
|
10
10
|
var x;
|
|
11
11
|
(function(r) {
|
|
12
12
|
r.assertEqual = (s) => s;
|
|
@@ -313,7 +313,7 @@ class Z {
|
|
|
313
313
|
}
|
|
314
314
|
const y = Object.freeze({
|
|
315
315
|
status: "aborted"
|
|
316
|
-
}),
|
|
316
|
+
}), G = (r) => ({ status: "dirty", value: r }), S = (r) => ({ status: "valid", value: r }), Se = (r) => r.status === "aborted", Oe = (r) => r.status === "dirty", ee = (r) => r.status === "valid", te = (r) => typeof Promise < "u" && r instanceof Promise;
|
|
317
317
|
function ve(r, e, t, n) {
|
|
318
318
|
if (typeof e == "function" ? r !== e || !n : !e.has(r))
|
|
319
319
|
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
@@ -2212,7 +2212,7 @@ W.create = (r, e) => new W({
|
|
|
2212
2212
|
typeName: p.ZodSet,
|
|
2213
2213
|
..._(e)
|
|
2214
2214
|
});
|
|
2215
|
-
class
|
|
2215
|
+
class J extends v {
|
|
2216
2216
|
constructor() {
|
|
2217
2217
|
super(...arguments), this.validate = this.implement;
|
|
2218
2218
|
}
|
|
@@ -2287,13 +2287,13 @@ class G extends v {
|
|
|
2287
2287
|
return this._def.returns;
|
|
2288
2288
|
}
|
|
2289
2289
|
args(...e) {
|
|
2290
|
-
return new
|
|
2290
|
+
return new J({
|
|
2291
2291
|
...this._def,
|
|
2292
2292
|
args: $.create(e).rest(U.create())
|
|
2293
2293
|
});
|
|
2294
2294
|
}
|
|
2295
2295
|
returns(e) {
|
|
2296
|
-
return new
|
|
2296
|
+
return new J({
|
|
2297
2297
|
...this._def,
|
|
2298
2298
|
returns: e
|
|
2299
2299
|
});
|
|
@@ -2305,7 +2305,7 @@ class G extends v {
|
|
|
2305
2305
|
return this.parse(e);
|
|
2306
2306
|
}
|
|
2307
2307
|
static create(e, t, n) {
|
|
2308
|
-
return new
|
|
2308
|
+
return new J({
|
|
2309
2309
|
args: e || $.create([]).rest(U.create()),
|
|
2310
2310
|
returns: t || U.create(),
|
|
2311
2311
|
typeName: p.ZodFunction,
|
|
@@ -2499,7 +2499,7 @@ class I extends v {
|
|
|
2499
2499
|
path: n.path,
|
|
2500
2500
|
parent: n
|
|
2501
2501
|
});
|
|
2502
|
-
return u.status === "aborted" ? y : u.status === "dirty" || t.value === "dirty" ?
|
|
2502
|
+
return u.status === "aborted" ? y : u.status === "dirty" || t.value === "dirty" ? G(u.value) : u;
|
|
2503
2503
|
});
|
|
2504
2504
|
{
|
|
2505
2505
|
if (t.value === "aborted")
|
|
@@ -2509,7 +2509,7 @@ class I extends v {
|
|
|
2509
2509
|
path: n.path,
|
|
2510
2510
|
parent: n
|
|
2511
2511
|
});
|
|
2512
|
-
return o.status === "aborted" ? y : o.status === "dirty" || t.value === "dirty" ?
|
|
2512
|
+
return o.status === "aborted" ? y : o.status === "dirty" || t.value === "dirty" ? G(o.value) : o;
|
|
2513
2513
|
}
|
|
2514
2514
|
}
|
|
2515
2515
|
if (s.type === "refinement") {
|
|
@@ -2691,7 +2691,7 @@ class me extends v {
|
|
|
2691
2691
|
path: n.path,
|
|
2692
2692
|
parent: n
|
|
2693
2693
|
});
|
|
2694
|
-
return a.status === "aborted" ? y : a.status === "dirty" ? (t.dirty(),
|
|
2694
|
+
return a.status === "aborted" ? y : a.status === "dirty" ? (t.dirty(), G(a.value)) : this._def.out._parseAsync({
|
|
2695
2695
|
data: a.value,
|
|
2696
2696
|
path: n.path,
|
|
2697
2697
|
parent: n
|
|
@@ -2753,7 +2753,7 @@ var p;
|
|
|
2753
2753
|
})(p || (p = {}));
|
|
2754
2754
|
const kt = (r, e = {
|
|
2755
2755
|
message: `Input not instance of ${r.name}`
|
|
2756
|
-
}) => Be((t) => t instanceof r, e), We = E.create, Ye = D.create, bt = be.create, wt = V.create,
|
|
2756
|
+
}) => Be((t) => t instanceof r, e), We = E.create, Ye = D.create, bt = be.create, wt = V.create, Ge = re.create, Tt = B.create, Zt = ge.create, Ct = ne.create, St = se.create, Ot = Q.create, Nt = U.create, Et = z.create, Rt = xe.create, It = R.create, jt = k.create, At = k.strictCreate, $t = ae.create, Mt = we.create, zt = ie.create, Pt = $.create, Dt = oe.create, Vt = ke.create, Lt = W.create, qt = J.create, Ut = de.create, Bt = ce.create, Wt = L.create, Yt = ue.create, Gt = X.create, je = I.create, Jt = j.create, Ht = q.create, Qt = I.createWithPreprocess, Xt = me.create, Kt = () => We().optional(), Ft = () => Ye().optional(), er = () => Ge().optional(), tr = {
|
|
2757
2757
|
string: (r) => E.create({ ...r, coerce: !0 }),
|
|
2758
2758
|
number: (r) => D.create({ ...r, coerce: !0 }),
|
|
2759
2759
|
boolean: (r) => re.create({
|
|
@@ -2773,7 +2773,7 @@ var O = /* @__PURE__ */ Object.freeze({
|
|
|
2773
2773
|
addIssueToContext: l,
|
|
2774
2774
|
ParseStatus: Z,
|
|
2775
2775
|
INVALID: y,
|
|
2776
|
-
DIRTY:
|
|
2776
|
+
DIRTY: G,
|
|
2777
2777
|
OK: S,
|
|
2778
2778
|
isAborted: Se,
|
|
2779
2779
|
isDirty: Oe,
|
|
@@ -2810,7 +2810,7 @@ var O = /* @__PURE__ */ Object.freeze({
|
|
|
2810
2810
|
ZodRecord: oe,
|
|
2811
2811
|
ZodMap: ke,
|
|
2812
2812
|
ZodSet: W,
|
|
2813
|
-
ZodFunction:
|
|
2813
|
+
ZodFunction: J,
|
|
2814
2814
|
ZodLazy: de,
|
|
2815
2815
|
ZodLiteral: ce,
|
|
2816
2816
|
ZodEnum: L,
|
|
@@ -2838,7 +2838,7 @@ var O = /* @__PURE__ */ Object.freeze({
|
|
|
2838
2838
|
any: Ot,
|
|
2839
2839
|
array: It,
|
|
2840
2840
|
bigint: wt,
|
|
2841
|
-
boolean:
|
|
2841
|
+
boolean: Ge,
|
|
2842
2842
|
date: Tt,
|
|
2843
2843
|
discriminatedUnion: Mt,
|
|
2844
2844
|
effect: je,
|
|
@@ -2858,11 +2858,11 @@ var O = /* @__PURE__ */ Object.freeze({
|
|
|
2858
2858
|
object: jt,
|
|
2859
2859
|
oboolean: er,
|
|
2860
2860
|
onumber: Ft,
|
|
2861
|
-
optional:
|
|
2861
|
+
optional: Jt,
|
|
2862
2862
|
ostring: Kt,
|
|
2863
2863
|
pipeline: Xt,
|
|
2864
2864
|
preprocess: Qt,
|
|
2865
|
-
promise:
|
|
2865
|
+
promise: Gt,
|
|
2866
2866
|
record: Dt,
|
|
2867
2867
|
set: Lt,
|
|
2868
2868
|
strictObject: At,
|
|
@@ -2913,7 +2913,7 @@ const ur = () => {
|
|
|
2913
2913
|
zObjectIdIntRequired: (g) => O.object({ id: n() }).transform((w) => w ?? null),
|
|
2914
2914
|
zObjectIdStr: (g) => O.object({ id: t({ useCoerce: !0 }) }).nullable().transform((w) => w ?? null),
|
|
2915
2915
|
zObjectIdStrRequired: (g) => O.object({ id: e() }).transform((w) => w ?? null),
|
|
2916
|
-
zFile: ({ required: g, multiple: b, maxFileSize: w }) => O.any().transform((T) => Array.from(T ?? [])).refine((T) => !g || (T == null ? void 0 : T.length) > 0, "File is required.").refine((T) => b || (T == null ? void 0 : T.length) <= 1, "Multiple files not allowed.").refine((T) => T.every((
|
|
2916
|
+
zFile: ({ required: g, multiple: b, maxFileSize: w }) => O.any().transform((T) => Array.from(T ?? [])).refine((T) => !g || (T == null ? void 0 : T.length) > 0, "File is required.").refine((T) => b || (T == null ? void 0 : T.length) <= 1, "Multiple files not allowed.").refine((T) => T.every((Je) => Je.size <= w), `Maximum file size is ${Fe(w)}.`).transform((T) => (b ? T : T == null ? void 0 : T[0]) ?? null)
|
|
2917
2917
|
};
|
|
2918
2918
|
}, lr = (r, e = !1) => {
|
|
2919
2919
|
const t = Ae({ silent: e }), { startLoading: n, stopLoading: s } = $e(Qe), a = Xe(0), [i, o] = Me(null), u = Ke(async (c, m) => {
|
package/dist/layout.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./NoInputContainer-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./NoInputContainer-B6Zq2P9U.cjs"),u=require("react");require("react-hook-form");require("./latinize-D-eMyP15.cjs");const w=require("./usePermissions-XfCQEumi.cjs"),C=require("./SimpleTooltip-Bd0sp7NR.cjs"),M="_side-menu-item_6vbwa_1",B="_disabled_6vbwa_5",k="_nav-button_6vbwa_9",S="_child_6vbwa_17",P="_text_6vbwa_21",f="_icon_6vbwa_28",g="_collapse-icon_6vbwa_34",I="_collapsed_6vbwa_44",y="_expanded_6vbwa_51",T="_children-container_6vbwa_57",$="_visible_6vbwa_65",q="_children_6vbwa_57",o={"side-menu-item":"_side-menu-item_6vbwa_1",sideMenuItem:M,disabled:B,"nav-button":"_nav-button_6vbwa_9",navButton:k,child:S,text:P,icon:f,"collapse-icon":"_collapse-icon_6vbwa_34",collapseIcon:g,collapsed:I,expanded:y,"children-container":"_children-container_6vbwa_57",childrenContainer:T,visible:$,children:q},H=({item:e,menuExpanded:t,children:i})=>e.tooltip&&!t?s.jsxRuntimeExports.jsx(C.SimpleTooltip,{text:e.tooltip,placement:"right",children:i}):i,N=({item:e,menuExpanded:t,collapsed:i,onCollapse:a,currentPath:l})=>{var v,_;const{LinkComponent:c}=u.useContext(s.LuminusComponentsContext),[p,x]=u.useState(!1),[d]=l.split("?"),h=e.linkTo===d||((v=e.children)==null?void 0:v.some(n=>n.linkTo===d));return s.jsxRuntimeExports.jsxs("li",{className:s.classNames("luminus-side-menu-item",o.sideMenuItem,{[o.expanded]:t},{active:p||h},{open:i&&e.children},{[o.disabled]:e.disabled||e.notPermitted},{disabled:e.disabled||e.notPermitted}),onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),children:[s.jsxRuntimeExports.jsx(H,{item:e,menuExpanded:t,children:e.children?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:s.jsxRuntimeExports.jsxs("button",{type:"button",className:s.classNames("nav-link",o.navButton),onClick:()=>a(),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("icon",o.icon),children:e.icon}),t&&s.jsxRuntimeExports.jsx("div",{className:s.classNames("text",o.text,"text-nowrap"),children:e.title}),t&&s.jsxRuntimeExports.jsx("div",{className:s.classNames("collapse-icon",o.collapseIcon,{[o.collapsed]:i}),children:s.jsxRuntimeExports.jsx(s.MdOutlineKeyboardArrowRight,{})})]})}):s.jsxRuntimeExports.jsxs(c,{to:e.disabled||e.notPermitted?"/":e.linkTo??"/",className:s.classNames("nav-link",o.navButton),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("icon",o.icon),children:e.icon}),t&&s.jsxRuntimeExports.jsx("div",{className:s.classNames("text",o.text,"text-nowrap"),children:e.title})]})}),s.jsxRuntimeExports.jsx("div",{className:s.classNames("children-container",o.childrenContainer,{[o.visible]:i}),children:s.jsxRuntimeExports.jsx("div",{className:s.classNames("shadow rounded children",o.children),children:(_=e.children)==null?void 0:_.map(n=>s.jsxRuntimeExports.jsx(c,{to:n.disabled||n.notPermitted?"/":n.linkTo??"/",className:s.classNames("nav-link child rounded",o.navButton,o.child,{[o.disabled]:n.disabled||n.notPermitted},{disabled:n.disabled||n.notPermitted}),children:s.jsxRuntimeExports.jsx("div",{className:s.classNames("text",o.text,"text-nowrap"),children:n.title})},n.linkTo))})})]})},L="_side-menu_n1hvm_1",F="_sidebar-header_n1hvm_13",A="_side-menu-content_n1hvm_18",K="_expand_n1hvm_22",U="_divider_n1hvm_26",j={"side-menu":"_side-menu_n1hvm_1",sideMenu:L,"sidebar-header":"_sidebar-header_n1hvm_13",sidebarHeader:F,"side-menu-content":"_side-menu-content_n1hvm_18",sideMenuContent:A,expand:K,divider:U},z=({headerItem:e,mainItems:t,secondaryItems:i,expanded:a,setExpanded:l,currentPath:c})=>{const[p,x]=u.useState(-1),{checkUserHasPermissions:d}=w.usePermissions(),h=u.useMemo(()=>t.map(n=>{var r;return{...n,notPermitted:!d(n.permissions??[]),children:(r=n.children)==null?void 0:r.map(m=>({...m,notPermitted:!d(m.permissions??[]),disabled:n.disabled||m.disabled}))}}),[t,d]),v=u.useMemo(()=>i.map(n=>{var r;return{...n,notPermitted:!d(n.permissions??[]),children:(r=n.children)==null?void 0:r.map(m=>({...m,notPermitted:!d(m.permissions??[])}))}}),[i,d]),_=n=>{x(n===p?-1:n)};return u.useEffect(()=>{a||x(-1)},[a]),s.jsxRuntimeExports.jsxs("section",{className:s.classNames("luminus-side-menu shadow",j.sideMenu,{[j.expand]:a},{expand:a}),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("sidebar-header",j.sidebarHeader),children:e}),s.jsxRuntimeExports.jsxs("ul",{className:j.sideMenuContent,children:[h.map((n,r)=>s.jsxRuntimeExports.jsx(N,{item:n,menuExpanded:a,collapsed:r===p,onCollapse:()=>_(r),currentPath:c},n.title)),s.jsxRuntimeExports.jsx("hr",{className:s.classNames("divider",j.divider)}),v.map((n,r)=>s.jsxRuntimeExports.jsx(N,{item:n,menuExpanded:a,collapsed:r===p,onCollapse:()=>_(r),currentPath:c},n.title))]})]})},D="_top-bar_1lk80_1",G="_top-bar-brand_1lk80_14",R={"top-bar":"_top-bar_1lk80_1",topBar:D,"top-bar-brand":"_top-bar-brand_1lk80_14",topBarBrand:G},J=({appName:e,leftOffset:t,centerContent:i,rightContent:a})=>{const{LinkComponent:l}=u.useContext(s.LuminusComponentsContext);return s.jsxRuntimeExports.jsxs("nav",{className:s.classNames("luminus-top-bar shadow",R.topBar),style:{width:t?`calc(100% - ${t}px)`:void 0,left:t?`${t}px`:void 0},children:[s.jsxRuntimeExports.jsx(l,{to:"/",className:s.classNames("luminus-top-bar-brand",R.topBarBrand),children:e}),i&&s.jsxRuntimeExports.jsx("div",{children:i}),s.jsxRuntimeExports.jsx("div",{className:"d-flex justify-content-end align-items-center gap-2",children:a??null})]})},O="_side-content-bar_17kwd_1",Q={"side-content-bar":"_side-content-bar_17kwd_1",sideContentBar:O},b=({width:e,children:t})=>s.jsxRuntimeExports.jsx("section",{className:s.classNames("luminus-side-content-bar shadow",Q.sideContentBar),style:{width:`${e}px`},children:t}),E=({title:e})=>s.jsxRuntimeExports.jsx("div",{className:"mb-3",children:typeof e=="string"?s.jsxRuntimeExports.jsx(s.Typography,{variant:"h3",children:e}):e}),V=({title:e,children:t,sideContent:i,sideContentWidth:a=250,noPadding:l,className:c})=>s.jsxRuntimeExports.jsxs("div",{className:s.classNames("container-fluid",l?"p-0":"p-3",c),children:[s.jsxRuntimeExports.jsxs("div",{style:{paddingRight:i?`${a}px`:void 0},children:[e?s.jsxRuntimeExports.jsx(E,{title:e}):null,t]}),i&&s.jsxRuntimeExports.jsx(b,{width:a,children:i})]}),X="_full-screen-container_1rm4r_1",Y={"full-screen-container":"_full-screen-container_1rm4r_1",fullScreenContainer:X},Z=({title:e,children:t,sideContent:i,sideContentWidth:a=250,noPadding:l,className:c})=>s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsxs("div",{className:s.classNames("overflow-hidden luminus-full-screen-container",l?"p-0":"p-3",c,Y.fullScreenContainer),style:{width:i?`calc(100% - ${a}px)`:"100%"},children:[e?s.jsxRuntimeExports.jsx(E,{title:e}):null,t]}),i&&s.jsxRuntimeExports.jsx(b,{width:a,children:i})]});exports.FullScreenContainer=Z;exports.MainContainer=V;exports.SideContentBar=b;exports.SideMenu=z;exports.TopBar=J;
|
package/dist/layout.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Q as B, j as e, c as o, X as I, Y as P } from "./NoInputContainer-
|
|
1
|
+
import { Q as B, j as e, c as o, X as I, Y as P } from "./NoInputContainer-BLnTERk_.js";
|
|
2
2
|
import { useContext as C, useState as M, useMemo as j, useEffect as g } from "react";
|
|
3
3
|
import "react-hook-form";
|
|
4
4
|
import "./latinize-3MO2uNV7.js";
|
|
5
|
-
import { u as y } from "./usePermissions-
|
|
6
|
-
import { S } from "./SimpleTooltip-
|
|
5
|
+
import { u as y } from "./usePermissions-DGt22caC.js";
|
|
6
|
+
import { S } from "./SimpleTooltip-ClHQktQk.js";
|
|
7
7
|
const T = "_side-menu-item_6vbwa_1", $ = "_disabled_6vbwa_5", H = "_nav-button_6vbwa_9", L = "_child_6vbwa_17", E = "_text_6vbwa_21", F = "_icon_6vbwa_28", R = "_collapse-icon_6vbwa_34", A = "_collapsed_6vbwa_44", K = "_expanded_6vbwa_51", Q = "_children-container_6vbwa_57", U = "_visible_6vbwa_65", X = "_children_6vbwa_57", i = {
|
|
8
8
|
"side-menu-item": "_side-menu-item_6vbwa_1",
|
|
9
9
|
sideMenuItem: T,
|