react-luminus-components 2.0.5-beta.r19-26 → 2.0.6
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/README.md +349 -349
- package/dist/.vite/manifest.json +48 -37
- package/dist/FormDisabledProvider--0DdMCBK.cjs +1 -0
- package/dist/{FormDisabledProvider-BlRae2l2.js → FormDisabledProvider-CQ3lr_vU.js} +1 -1
- package/dist/ShortcutLinksContext-CzUA0Bw_.cjs +285 -0
- package/dist/{nivo-bar-BHzU38wt.js → ShortcutLinksContext-DGg3i3jj.js} +20917 -20917
- package/dist/components/NotifCenter/Actions/NotificationActions.d.ts +7 -3
- package/dist/components/NotifCenter/Actions/components/index.d.ts +2 -0
- package/dist/components/NotifCenter/Actions/components/modals/NotificationActionAddModal.d.ts +11 -0
- package/dist/components/NotifCenter/Actions/components/modals/NotificationTemplateAddModal.d.ts +13 -0
- package/dist/components/NotifCenter/Actions/components/modals/NotificationTemplateEditModal.d.ts +6 -4
- package/dist/components/NotifCenter/NotifStyles/NotifStyles.d.ts +10 -0
- package/dist/components/NotifCenter/NotifStyles/hooks/useNotifStyleFormSchema.d.ts +20 -0
- package/dist/components/NotifCenter/NotifStyles/hooks/useNotifStyleTableColumns.d.ts +7 -0
- package/dist/components/NotifCenter/index.d.ts +1 -0
- package/dist/components/UserSettings/LanguageSettingsUS/LanguageSettingsUS.d.ts +2 -0
- package/dist/components/UserSettings/index.d.ts +1 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +13 -13
- package/dist/hooks/useLocalStorageState/useLocalStorageState.d.ts +3 -0
- package/dist/hooks/usePersistentState/usePersistentState.d.ts +15 -1
- package/dist/hooks/useSearchQueryState/useSearchQueryState.d.ts +5 -4
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +108 -107
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +59 -59
- package/dist/main.cjs.js +15 -15
- package/dist/main.d.ts +1 -0
- package/dist/main.es.js +11304 -10804
- package/dist/models/index.d.ts +3 -0
- package/dist/models/texts/NotifCentrumTexts.d.ts +15 -0
- package/dist/models/texts/UserSettingsTexts.d.ts +1 -0
- package/dist/models/types/notifCenter/NotifStyleModel.d.ts +6 -0
- package/dist/models/types/notifCenter/NotifTemplateCreateModel.d.ts +11 -0
- package/dist/models/types/notifCenter/NotifTemplateEditModel.d.ts +6 -0
- package/dist/models/types/notifCenter/NotificationAttachmentModel.d.ts +4 -0
- package/dist/models/types/notifCenter/NotificationModel.d.ts +2 -1
- package/dist/models/types/notifCenter/NotificationTemplate.d.ts +3 -1
- package/dist/queryStorage-C8e71gxx.js +30 -0
- package/dist/queryStorage-Dk70bkj7.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/useIsFormDirty-CLUo8jl7.cjs +1 -0
- package/dist/useIsFormDirty-ebfGUdgb.js +117 -0
- package/dist/{useLocalStorageState-B2v6hClT.js → useLocalStorageState-9W8xZxsD.js} +20 -20
- package/dist/useLocalStorageState-nJ8QPdoa.cjs +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +76 -101
- package/dist/variables.scss +165 -165
- package/package.json +127 -127
- package/dist/FormDisabledProvider-CiGUtSf7.cjs +0 -1
- package/dist/nivo-bar-C1VYGnTR.cjs +0 -285
- package/dist/useIsFormDirty-BhBtGgzZ.cjs +0 -1
- package/dist/useIsFormDirty-GgEve4W-.js +0 -123
- package/dist/useLocalStorageState-AB4BFfn5.cjs +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const N=require("./nivo-bar-C1VYGnTR.cjs"),F=require("react-router"),Q=require("react-hook-form"),y=()=>{const o=N.compilerRuntimeExports.c(6),[e,s]=F.useSearchParams();let t;o[0]!==e||o[1]!==s?(t=(i,n)=>{e.get(i)!==n&&s(l=>(n===null&&l.delete(i),l.get(i)===n||l.set(i,n??""),l),{replace:!0})},o[0]=e,o[1]=s,o[2]=t):t=o[2];const u=t;let c;return o[3]!==e||o[4]!==u?(c={searchParams:e,setSearch:u},o[3]=e,o[4]=u,o[5]=c):c=o[5],c},k="\0",p=(o,e,s)=>{const t=N.compilerRuntimeExports.c(24),{searchParams:u,setSearch:c}=y();let i;t[0]!==s?(i=r=>{if(typeof r=="object"){if(s&&s==="date"||!s&&r instanceof Date){if(!(r instanceof Date))throw new Error("Tried to setQueryState of type Date to non-date.");return r.toISOString()}return JSON.stringify(r)}return r.toString()},t[0]=s,t[1]=i):i=t[1];const n=i;let l;t[2]!==e||t[3]!==n?(l=n(e),t[2]=e,t[3]=n,t[4]=l):l=t[4];const P=l;let g;t[5]!==o||t[6]!==u?(g=u.get(o),t[5]=o,t[6]=u,t[7]=g):g=t[7];const E=g;let b;t:{const r=E;if(r===k){b=null;break t}const f=r?Number(r):e;let m=Number.isNaN(f)?typeof e:"number";switch(m==="object"&&e instanceof Date&&(m="date"),s??m){case"number":{b=f;break t}case"string":{b=r??e;break t}case"boolean":{b=r==="true";break t}case"object":{let h;t[8]!==e||t[9]!==r?(h=r?JSON.parse(r):e,t[8]=e,t[9]=r,t[10]=h):h=t[10],b=h;break t}case"date":{let h;t[11]!==e||t[12]!==r?(h=r?new Date(r):e,t[11]=e,t[12]=r,t[13]=h):h=t[13],b=h;break t}default:throw console.error(s,m),new Error(`useSearchQueryState is not implemented for type ${typeof(s??m)}.`)}}const a=b;let S;t[14]!==e||t[15]!==P||t[16]!==n||t[17]!==o||t[18]!==c||t[19]!==a?(S=r=>{let f;typeof r=="function"?f=r(a):f=r;const m=n(f);if(e===f||m===P){c(o,null);return}if(f===null){c(o,k);return}c(o,m)},t[14]=e,t[15]=P,t[16]=n,t[17]=o,t[18]=c,t[19]=a,t[20]=S):S=t[20];const D=S;let $;return t[21]!==D||t[22]!==a?($=[a,D],t[21]=D,t[22]=a,t[23]=$):$=t[23],$},R=o=>{const e=N.compilerRuntimeExports.c(5),s=Math.floor(Math.random()*900)+100;let t;e[0]!==o?(t=btoa(o.toString()??""),e[0]=o,e[1]=t):t=e[1];const u=t,c=`employeePhotos?personalNumber=${s}${u}&small=false`,i=`employeePhotos?personalNumber=${s}${u}&small=true`;let n;return e[2]!==c||e[3]!==i?(n={photoPath:c,photoPathSm:i},e[2]=c,e[3]=i,e[4]=n):n=e[4],n},j=({control:o}={})=>{"use no memo";const{dirtyFields:e}=Q.useFormState({control:o});return Object.keys(e).length>0};exports.useEmployeePhotoPath=R;exports.useIsFormDirty=j;exports.useSearchQuery=y;exports.useSearchQueryState=p;
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { c as D } from "./nivo-bar-BHzU38wt.js";
|
|
2
|
-
import { useSearchParams as j } from "react-router";
|
|
3
|
-
import { useFormState as p } from "react-hook-form";
|
|
4
|
-
const y = () => {
|
|
5
|
-
const o = D.c(6), [e, r] = j();
|
|
6
|
-
let t;
|
|
7
|
-
o[0] !== e || o[1] !== r ? (t = (i, n) => {
|
|
8
|
-
e.get(i) !== n && r((f) => (n === null && f.delete(i), f.get(i) === n || f.set(i, n ?? ""), f), {
|
|
9
|
-
replace: !0
|
|
10
|
-
});
|
|
11
|
-
}, o[0] = e, o[1] = r, o[2] = t) : t = o[2];
|
|
12
|
-
const l = t;
|
|
13
|
-
let c;
|
|
14
|
-
return o[3] !== e || o[4] !== l ? (c = {
|
|
15
|
-
searchParams: e,
|
|
16
|
-
setSearch: l
|
|
17
|
-
}, o[3] = e, o[4] = l, o[5] = c) : c = o[5], c;
|
|
18
|
-
}, k = "\0", x = (o, e, r) => {
|
|
19
|
-
const t = D.c(24), {
|
|
20
|
-
searchParams: l,
|
|
21
|
-
setSearch: c
|
|
22
|
-
} = y();
|
|
23
|
-
let i;
|
|
24
|
-
t[0] !== r ? (i = (s) => {
|
|
25
|
-
if (typeof s == "object") {
|
|
26
|
-
if (r && r === "date" || !r && s instanceof Date) {
|
|
27
|
-
if (!(s instanceof Date))
|
|
28
|
-
throw new Error("Tried to setQueryState of type Date to non-date.");
|
|
29
|
-
return s.toISOString();
|
|
30
|
-
}
|
|
31
|
-
return JSON.stringify(s);
|
|
32
|
-
}
|
|
33
|
-
return s.toString();
|
|
34
|
-
}, t[0] = r, t[1] = i) : i = t[1];
|
|
35
|
-
const n = i;
|
|
36
|
-
let f;
|
|
37
|
-
t[2] !== e || t[3] !== n ? (f = n(e), t[2] = e, t[3] = n, t[4] = f) : f = t[4];
|
|
38
|
-
const g = f;
|
|
39
|
-
let P;
|
|
40
|
-
t[5] !== o || t[6] !== l ? (P = l.get(o), t[5] = o, t[6] = l, t[7] = P) : P = t[7];
|
|
41
|
-
const F = P;
|
|
42
|
-
let b;
|
|
43
|
-
t: {
|
|
44
|
-
const s = F;
|
|
45
|
-
if (s === k) {
|
|
46
|
-
b = null;
|
|
47
|
-
break t;
|
|
48
|
-
}
|
|
49
|
-
const u = s ? Number(s) : e;
|
|
50
|
-
let m = Number.isNaN(u) ? typeof e : "number";
|
|
51
|
-
switch (m === "object" && e instanceof Date && (m = "date"), r ?? m) {
|
|
52
|
-
case "number": {
|
|
53
|
-
b = u;
|
|
54
|
-
break t;
|
|
55
|
-
}
|
|
56
|
-
case "string": {
|
|
57
|
-
b = s ?? e;
|
|
58
|
-
break t;
|
|
59
|
-
}
|
|
60
|
-
case "boolean": {
|
|
61
|
-
b = s === "true";
|
|
62
|
-
break t;
|
|
63
|
-
}
|
|
64
|
-
case "object": {
|
|
65
|
-
let h;
|
|
66
|
-
t[8] !== e || t[9] !== s ? (h = s ? JSON.parse(s) : e, t[8] = e, t[9] = s, t[10] = h) : h = t[10], b = h;
|
|
67
|
-
break t;
|
|
68
|
-
}
|
|
69
|
-
case "date": {
|
|
70
|
-
let h;
|
|
71
|
-
t[11] !== e || t[12] !== s ? (h = s ? new Date(s) : e, t[11] = e, t[12] = s, t[13] = h) : h = t[13], b = h;
|
|
72
|
-
break t;
|
|
73
|
-
}
|
|
74
|
-
default:
|
|
75
|
-
throw console.error(r, m), new Error(`useSearchQueryState is not implemented for type ${typeof (r ?? m)}.`);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
const a = b;
|
|
79
|
-
let S;
|
|
80
|
-
t[14] !== e || t[15] !== g || t[16] !== n || t[17] !== o || t[18] !== c || t[19] !== a ? (S = (s) => {
|
|
81
|
-
let u;
|
|
82
|
-
typeof s == "function" ? u = s(a) : u = s;
|
|
83
|
-
const m = n(u);
|
|
84
|
-
if (e === u || m === g) {
|
|
85
|
-
c(o, null);
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
if (u === null) {
|
|
89
|
-
c(o, k);
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
c(o, m);
|
|
93
|
-
}, t[14] = e, t[15] = g, t[16] = n, t[17] = o, t[18] = c, t[19] = a, t[20] = S) : S = t[20];
|
|
94
|
-
const N = S;
|
|
95
|
-
let $;
|
|
96
|
-
return t[21] !== N || t[22] !== a ? ($ = [a, N], t[21] = N, t[22] = a, t[23] = $) : $ = t[23], $;
|
|
97
|
-
}, C = (o) => {
|
|
98
|
-
const e = D.c(5), r = Math.floor(Math.random() * 900) + 100;
|
|
99
|
-
let t;
|
|
100
|
-
e[0] !== o ? (t = btoa(o.toString() ?? ""), e[0] = o, e[1] = t) : t = e[1];
|
|
101
|
-
const l = t, c = `employeePhotos?personalNumber=${r}${l}&small=false`, i = `employeePhotos?personalNumber=${r}${l}&small=true`;
|
|
102
|
-
let n;
|
|
103
|
-
return e[2] !== c || e[3] !== i ? (n = {
|
|
104
|
-
photoPath: c,
|
|
105
|
-
photoPathSm: i
|
|
106
|
-
}, e[2] = c, e[3] = i, e[4] = n) : n = e[4], n;
|
|
107
|
-
}, J = ({
|
|
108
|
-
control: o
|
|
109
|
-
} = {}) => {
|
|
110
|
-
"use no memo";
|
|
111
|
-
const {
|
|
112
|
-
dirtyFields: e
|
|
113
|
-
} = p({
|
|
114
|
-
control: o
|
|
115
|
-
});
|
|
116
|
-
return Object.keys(e).length > 0;
|
|
117
|
-
};
|
|
118
|
-
export {
|
|
119
|
-
y as a,
|
|
120
|
-
x as b,
|
|
121
|
-
C as c,
|
|
122
|
-
J as u
|
|
123
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const q=require("./nivo-bar-C1VYGnTR.cjs");require("react/jsx-runtime");const a=require("react");require("react-router");require("react-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-react");require("@azure/msal-browser");const S={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},w=(e,{loadOnInit:u=S.loadOnInit,enabled:t=S.enabled,silent:o=S.silent,nullStateBeforeLoad:c=S.nullStateBeforeLoad,nullStateOnFail:s=S.nullStateOnFail,customApiUrl:C,customBearerToken:f,dataTransformer:r}=S)=>{const n=q.useAxios({silent:o,customToken:f,differentBaseUrl:C}),[p,i]=a.useState(0),{startLoading:d,stopLoading:b}=a.useContext(q.LoadingContext),m=a.useRef(0),{isAuthenticated:x}=q.useAuth(),[v,D]=a.useState(null),A=a.useRef(u??!1),g=a.useCallback(async(L,h)=>{if(!x()||t===!1)return null;i(l=>l+1),!o&&d(`loadData-${e}-${h}`),c&&D(null);let R;try{const l=await n.get(e,{signal:L}),$=r?r(l.data):l.data;D($),R=$}catch(l){throw s&&D(null),l}finally{A.current=!1,i(l=>l-1),!o&&b(`loadData-${e}-${h}`)}return R},[x,t,o,d,e,c,n,r,s,b]),I=a.useCallback(async()=>{g()},[g]),O=a.useCallback(async()=>g(),[g]);return a.useEffect(()=>{if(u===!1)return;if(n.interceptorsUsed===!1){console.error("useGetApiData: could not load data because interceptors are not used");return}const L=new AbortController;return g(L.signal,++m.current),()=>{L.abort()}},[g,u,n.interceptorsUsed]),{data:v,setData:D,reloadData:I,isLoading:A.current||p>0,reloadDataWithReturn:O}},B=(e,u)=>{const t=q.compilerRuntimeExports.c(12);let o;t[0]!==u||t[1]!==e?(o=()=>{const d=localStorage.getItem(e);return d!=null&&d!=="undefined"?JSON.parse(d):u},t[0]=u,t[1]=e,t[2]=o):o=t[2];const c=o,[s,C]=a.useState(c);let f,r;t[3]!==e||t[4]!==s?(f=()=>{localStorage.setItem(e,JSON.stringify(s))},r=[e,s],t[3]=e,t[4]=s,t[5]=f,t[6]=r):(f=t[5],r=t[6]),a.useEffect(f,r);let n;t[7]!==c?(n=()=>{C(c)},t[7]=c,t[8]=n):n=t[8];const p=n;let i;return t[9]!==p||t[10]!==s?(i=[s,C,p],t[9]=p,t[10]=s,t[11]=i):i=t[11],i};exports.useGetApiData=w;exports.useLocalStorageState=B;
|