react-luminus-components 2.0.3-beta.r19-18 → 2.0.4-table

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.
Files changed (91) hide show
  1. package/README.md +349 -349
  2. package/dist/.vite/manifest.json +46 -52
  3. package/dist/FormDisabledProvider-1MOB6N34.cjs +1 -0
  4. package/dist/FormDisabledProvider-CHZ2m_zJ.js +40 -0
  5. package/dist/ShortcutLinksContext-DEirK-v9.js +39884 -0
  6. package/dist/ShortcutLinksContext-DLi4B8z5.cjs +334 -0
  7. package/dist/components/Buttons/ContextButton/FileUploadContextButton.d.ts +3 -6
  8. package/dist/components/Documents/components/DocumentsModals/components/CreateFolderModal/hooks/useDocCreateFolderForm.d.ts +1 -4
  9. package/dist/components/Documents/components/DocumentsModals/components/EditFileModal/hooks/useEditFileForm.d.ts +1 -6
  10. package/dist/components/Documents/hooks/useDocumentsReducer.d.ts +1 -1
  11. package/dist/components/Dropdown/comps/SimpleToggle/SimpleToggle.d.ts +3 -6
  12. package/dist/components/Dropdown/comps/UserAvatarToggle/UserAvatarToggle.d.ts +1 -3
  13. package/dist/components/Flexmonster/Flexmonster.d.ts +1 -1
  14. package/dist/components/Flexmonster/hooks/useReportVersionApi.d.ts +1 -1
  15. package/dist/components/Flexmonster/utils/flexMonsterUtils.d.ts +1 -1
  16. package/dist/components/HookForm/MiniDetailWrapper/MiniDetailWrapper.d.ts +1 -1
  17. package/dist/components/HookForm/TextInput/HookFormTextInput.d.ts +17 -4
  18. package/dist/components/InputContainers/FloatingLabelInput/FloatingLabelInput.d.ts +38 -7
  19. package/dist/components/InputContainers/NoInputContainer/NoInputContainer.d.ts +38 -8
  20. package/dist/components/InputContainers/RowLabelInput/RowLabelInput.d.ts +38 -8
  21. package/dist/components/NotifCenter/Actions/NotificationActions.d.ts +3 -3
  22. package/dist/components/NotifCenter/Actions/components/HistoryTable/NotificationHistoryTable.d.ts +1 -1
  23. package/dist/components/NotifCenter/Actions/types/NotificationHistoryTableModel.d.ts +5 -0
  24. package/dist/components/ResponsiveContextDropdown/components/ResponsiveContextDropdownItem/ResponsiveContextDropdownItem.d.ts +1 -1
  25. package/dist/components/ResponsiveContextDropdown/hooks/useReponsiveContextDropdownHelpers.d.ts +2 -2
  26. package/dist/components/ResponsiveContextDropdown/utils/responsiveContextDropdownUtils.d.ts +1 -1
  27. package/dist/components/Tooltip/HtmlTooltip/HtmlTooltip.d.ts +2 -2
  28. package/dist/components/Tooltip/SimpleTooltip/SimpleTooltip.d.ts +1 -1
  29. package/dist/components/common/AuthTemplate/AuthTemplate.d.ts +1 -1
  30. package/dist/components/common/ColumnResizer/ColumnResizer.d.ts +1 -1
  31. package/dist/components/common/DisabledRowLabelLink/DisabledRowLabelLink.d.ts +1 -1
  32. package/dist/components/common/ErrorBoundary/ErrorBoundary.d.ts +3 -7
  33. package/dist/components/common/FromToDatePicker/components/FromToDatePickerDropdownToggle/FromToDatePickerDropdownToggle.d.ts +1 -3
  34. package/dist/components/common/LineChart/comps/LineChartTooltip/LineChartTooltip.d.ts +2 -2
  35. package/dist/components/common/PermissionsSubstitute/Detail/hooks/useSubstDetailForm.d.ts +1 -8
  36. package/dist/components/common/QrCode/QrCode.d.ts +1 -1
  37. package/dist/components/common/RouteLink/RouteLink.d.ts +1 -1
  38. package/dist/components/common/SimplePicker/SimplePicker.d.ts +1 -1
  39. package/dist/components/common/StrictModeDroppable/StrictModeDroppable.d.ts +5 -0
  40. package/dist/components/common/index.d.ts +1 -0
  41. package/dist/contexts.cjs.js +1 -1
  42. package/dist/contexts.es.js +941 -542
  43. package/dist/hooks/index.d.ts +0 -1
  44. package/dist/hooks/useAxios/useAxios.d.ts +2 -5
  45. package/dist/hooks/useClickOutside/useClickOutside.d.ts +1 -1
  46. package/dist/hooks/useGetApiDataBound/useGetApiDataBound.d.ts +0 -3
  47. package/dist/hooks/useGetDataBound/useGetDataBound.d.ts +2 -4
  48. package/dist/hooks/useScrollSave/useScrollSave.d.ts +1 -1
  49. package/dist/hooks.cjs.js +1 -1
  50. package/dist/hooks.es.js +136 -206
  51. package/dist/layout.cjs.js +1 -1
  52. package/dist/layout.es.js +142 -278
  53. package/dist/localStorageUtils-89Gfn6XS.cjs +1 -0
  54. package/dist/{localStorageUtils-CZ4HDRzi.js → localStorageUtils-DdeuyghB.js} +8 -18
  55. package/dist/main.cjs.js +183 -21
  56. package/dist/main.es.js +11492 -11359
  57. package/dist/models/prop-types/InputContainerProps.d.ts +12 -4
  58. package/dist/models/prop-types/InputProps/DropdownPickerProps.d.ts +1 -1
  59. package/dist/models/prop-types/InputProps/InputBaseProps.d.ts +2 -4
  60. package/dist/models/prop-types/InputProps/NumericInputProps.d.ts +1 -1
  61. package/dist/models/prop-types/InputProps/TextInputProps.d.ts +1 -1
  62. package/dist/style.css +1 -1
  63. package/dist/useLocalStorageState-B-CRodSS.cjs +1 -0
  64. package/dist/useLocalStorageState-BPYqQMTu.js +78 -0
  65. package/dist/useRenderDraggableInPortal-D0OLp7Qb.js +78 -0
  66. package/dist/useRenderDraggableInPortal-QPCaw-E_.cjs +1 -0
  67. package/dist/utils/index.d.ts +1 -1
  68. package/dist/utils/route/apiPathUtils.d.ts +1 -1
  69. package/dist/utils.cjs.js +1 -1
  70. package/dist/utils.es.js +159 -133
  71. package/dist/variables.scss +165 -165
  72. package/package.json +123 -128
  73. package/dist/FormDisabledProvider-Bi6oyt5U.js +0 -51
  74. package/dist/FormDisabledProvider-D5KzXgMJ.cjs +0 -1
  75. package/dist/components/common/HomeDashboard/comps/HomeDashboardWidget/HomeDashboardWidget.d.ts +0 -15
  76. package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/PhotoPreviews.d.ts +0 -15
  77. package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/comps/PhotoPreview/PhotoPreview.d.ts +0 -14
  78. package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/comps/PhotoPreview/comps/PreviewShadow/PreviewShadow.d.ts +0 -5
  79. package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/comps/PhotoPreview/comps/index.d.ts +0 -1
  80. package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/comps/index.d.ts +0 -1
  81. package/dist/components/common/PhotoLightbox/comps/index.d.ts +0 -1
  82. package/dist/hooks/useIsFormDirty/useIsFormDirty.d.ts +0 -7
  83. package/dist/localStorageUtils-CkZslzIU.cjs +0 -1
  84. package/dist/models/bntTable/IBnfTableDefColumn.d.ts +0 -40
  85. package/dist/models/ui/notifications/NotificationHistoryTableModel.d.ts +0 -6
  86. package/dist/nivo-bar-BQGSJTnK.js +0 -41890
  87. package/dist/nivo-bar-DcaMZ1K9.cjs +0 -326
  88. package/dist/useIsFormDirty-BQU8CwxF.cjs +0 -1
  89. package/dist/useIsFormDirty-uSOXZ5g6.js +0 -123
  90. package/dist/useLocalStorageState-Ccq9rFKj.js +0 -95
  91. package/dist/useLocalStorageState-aCjv2MC6.cjs +0 -1
@@ -1 +0,0 @@
1
- "use strict";const N=require("./nivo-bar-DcaMZ1K9.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-BQGSJTnK.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,95 +0,0 @@
1
- import { ao as J, aq as N, bd as q, c as F } from "./nivo-bar-BQGSJTnK.js";
2
- import "react/jsx-runtime";
3
- import { useState as x, useContext as G, useRef as U, useCallback as m, useEffect as R } from "react";
4
- import "react-router";
5
- import "react-dom";
6
- import "react-hook-form";
7
- import "react-flexmonster";
8
- import "@azure/msal-browser";
9
- import "@azure/msal-react";
10
- const p = {
11
- loadOnInit: !0,
12
- silent: !1,
13
- enabled: !0,
14
- nullStateBeforeLoad: !0,
15
- nullStateOnFail: !1
16
- }, X = (e, {
17
- loadOnInit: u = p.loadOnInit,
18
- enabled: t = p.enabled,
19
- silent: o = p.silent,
20
- nullStateBeforeLoad: l = p.nullStateBeforeLoad,
21
- nullStateOnFail: a = p.nullStateOnFail,
22
- customApiUrl: S,
23
- customBearerToken: d,
24
- dataTransformer: s
25
- } = p) => {
26
- const r = J({
27
- silent: o,
28
- customToken: d,
29
- differentBaseUrl: S
30
- }), [g, i] = x(!1), {
31
- startLoading: c,
32
- stopLoading: C
33
- } = G(N), w = U(0), {
34
- isAuthenticated: b
35
- } = q(), I = m((n) => {
36
- c(n), i(() => !0);
37
- }, [c]), h = m((n) => {
38
- C(n), i(() => !1);
39
- }, [C]), [v, L] = x(null), f = m(async (n, A) => {
40
- if (!b() || t === !1)
41
- return null;
42
- !o && I(`loadData-${e}-${A}`), l && L(null);
43
- let O;
44
- try {
45
- const D = await r.get(e, {
46
- signal: n
47
- }), $ = s ? s(D.data) : D.data;
48
- L($), O = $;
49
- } catch (D) {
50
- throw a && L(null), D;
51
- } finally {
52
- !o && h(`loadData-${e}-${A}`);
53
- }
54
- return O;
55
- }, [b, t, o, I, e, l, r, s, a, h]), B = m(async () => {
56
- f();
57
- }, [f]), E = m(async () => f(), [f]);
58
- return R(() => {
59
- if (u === !1)
60
- return;
61
- const n = new AbortController();
62
- return f(n.signal, ++w.current), () => {
63
- n.abort();
64
- };
65
- }, [f, u]), {
66
- data: v,
67
- setData: L,
68
- reloadData: B,
69
- isLoading: g,
70
- reloadDataWithReturn: E
71
- };
72
- }, Y = (e, u) => {
73
- const t = F.c(12);
74
- let o;
75
- t[0] !== u || t[1] !== e ? (o = () => {
76
- const c = localStorage.getItem(e);
77
- return c != null && c !== "undefined" ? JSON.parse(c) : u;
78
- }, t[0] = u, t[1] = e, t[2] = o) : o = t[2];
79
- const l = o, [a, S] = x(l);
80
- let d, s;
81
- t[3] !== e || t[4] !== a ? (d = () => {
82
- localStorage.setItem(e, JSON.stringify(a));
83
- }, s = [e, a], t[3] = e, t[4] = a, t[5] = d, t[6] = s) : (d = t[5], s = t[6]), R(d, s);
84
- let r;
85
- t[7] !== l ? (r = () => {
86
- S(l);
87
- }, t[7] = l, t[8] = r) : r = t[8];
88
- const g = r;
89
- let i;
90
- return t[9] !== g || t[10] !== a ? (i = [a, S, g], t[9] = g, t[10] = a, t[11] = i) : i = t[11], i;
91
- };
92
- export {
93
- Y as a,
94
- X as u
95
- };
@@ -1 +0,0 @@
1
- "use strict";const p=require("./nivo-bar-DcaMZ1K9.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-browser");require("@azure/msal-react");const S={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},B=(e,{loadOnInit:d=S.loadOnInit,enabled:t=S.enabled,silent:o=S.silent,nullStateBeforeLoad:r=S.nullStateBeforeLoad,nullStateOnFail:s=S.nullStateOnFail,customApiUrl:C,customBearerToken:f,dataTransformer:n}=S)=>{const u=p.useAxios({silent:o,customToken:f,differentBaseUrl:C}),[L,c]=a.useState(!1),{startLoading:i,stopLoading:q}=a.useContext(p.LoadingContext),$=a.useRef(0),{isAuthenticated:x}=p.useAuth(),A=a.useCallback(l=>{i(l),c(()=>!0)},[i]),I=a.useCallback(l=>{q(l),c(()=>!1)},[q]),[m,D]=a.useState(null),g=a.useCallback(async(l,h)=>{if(!x()||t===!1)return null;!o&&A(`loadData-${e}-${h}`),r&&D(null);let O;try{const b=await u.get(e,{signal:l}),R=n?n(b.data):b.data;D(R),O=R}catch(b){throw s&&D(null),b}finally{!o&&I(`loadData-${e}-${h}`)}return O},[x,t,o,A,e,r,u,n,s,I]),v=a.useCallback(async()=>{g()},[g]),w=a.useCallback(async()=>g(),[g]);return a.useEffect(()=>{if(d===!1)return;const l=new AbortController;return g(l.signal,++$.current),()=>{l.abort()}},[g,d]),{data:m,setData:D,reloadData:v,isLoading:L,reloadDataWithReturn:w}},E=(e,d)=>{const t=p.compilerRuntimeExports.c(12);let o;t[0]!==d||t[1]!==e?(o=()=>{const i=localStorage.getItem(e);return i!=null&&i!=="undefined"?JSON.parse(i):d},t[0]=d,t[1]=e,t[2]=o):o=t[2];const r=o,[s,C]=a.useState(r);let f,n;t[3]!==e||t[4]!==s?(f=()=>{localStorage.setItem(e,JSON.stringify(s))},n=[e,s],t[3]=e,t[4]=s,t[5]=f,t[6]=n):(f=t[5],n=t[6]),a.useEffect(f,n);let u;t[7]!==r?(u=()=>{C(r)},t[7]=r,t[8]=u):u=t[8];const L=u;let c;return t[9]!==L||t[10]!==s?(c=[s,C,L],t[9]=L,t[10]=s,t[11]=c):c=t[11],c};exports.useGetApiData=B;exports.useLocalStorageState=E;