react-luminus-components 1.4.1 → 1.4.2
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 +26 -26
- package/dist/{FormDisabledProvider-Cj68wfmh.cjs → FormDisabledProvider-BJFDwkr3.cjs} +1 -1
- package/dist/{FormDisabledProvider-BobE6FGX.js → FormDisabledProvider-DLeRXjZ8.js} +1 -1
- package/dist/contexts/delegation/DelegationContext.d.ts +1 -1
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +5 -5
- package/dist/hooks/useGetApiData/useGetApiData.d.ts +3 -3
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +3 -3
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +2 -2
- package/dist/main.cjs.js +1 -1
- package/dist/main.es.js +4 -4
- package/dist/models/index.d.ts +2 -0
- package/dist/models/types/useGetApiData/ReloadDataType.d.ts +2 -0
- package/dist/models/types/useGetApiData/ReloadDataWithReturnType.d.ts +2 -0
- package/dist/{nivo-bar.es-DQVaIWpI.cjs → nivo-bar.es-BRHkg8Ew.cjs} +1 -1
- package/dist/{nivo-bar.es-B8f_eSBX.js → nivo-bar.es-wC2Yrmiv.js} +2 -1
- package/dist/useGetApiData-CI_mLKxJ.cjs +1 -0
- package/dist/useGetApiData-DtJQa5kO.js +61 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +2 -2
- package/package.json +1 -1
- package/dist/useGetApiData-DMdP47nw.js +0 -59
- package/dist/useGetApiData-zgPS7F8Q.cjs +0 -1
|
@@ -14079,7 +14079,8 @@ const fp = () => {
|
|
|
14079
14079
|
availableDelegations: null,
|
|
14080
14080
|
setAvailableDelegations: () => {
|
|
14081
14081
|
},
|
|
14082
|
-
refreshAvailableDelegations: async () =>
|
|
14082
|
+
refreshAvailableDelegations: async () => {
|
|
14083
|
+
}
|
|
14083
14084
|
}), jE = cn({
|
|
14084
14085
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
14085
14086
|
addHelmet: (e) => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("./nivo-bar.es-BRHkg8Ew.cjs"),t=require("react");require("react-router-dom");require("react-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");const n={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},v=(s,{loadOnInit:c=n.loadOnInit,enabled:d=n.enabled,silent:o=n.silent,nullStateBeforeLoad:f=n.nullStateBeforeLoad,nullStateOnFail:g=n.nullStateOnFail,customApiUrl:y,customBearerToken:R,dataTransformer:u}=n)=>{const C=i.useAxios({silent:o,customToken:R,differentBaseUrl:y}),[S,D]=t.useState(!1),{startLoading:L,stopLoading:b}=t.useContext(i.LoadingContext),$=t.useRef(0),{isAuthenticated:q}=i.useAuth(),k=t.useCallback(e=>{L(e),D(()=>!0)},[L]),p=t.useCallback(e=>{b(e),D(()=>!1)},[b]),[w,l]=t.useState(null),a=t.useCallback(async(e,x)=>{if(!q()||d===!1)return null;!o&&k(`loadData-${s}-${x}`),f&&l(null);let A;try{const r=await C.get(s,{signal:e}),h=u?u(r.data):r.data;l(h),A=h}catch(r){throw g&&l(null),r}finally{!o&&p(`loadData-${s}-${x}`)}return A},[q,d,o,k,s,f,C,u,g,p]),B=t.useCallback(async()=>{a()},[a]),O=t.useCallback(async()=>a(),[a]);return t.useEffect(()=>{if(c===!1)return;const e=new AbortController;return a(e.signal,++$.current),()=>{e.abort()}},[a,c]),{data:w,setData:l,reloadData:B,isLoading:S,reloadDataWithReturn:O}};exports.useGetApiData=v;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { aj as I, al as j, b2 as v } from "./nivo-bar.es-wC2Yrmiv.js";
|
|
2
|
+
import { useState as A, useContext as E, useRef as F, useCallback as e, useEffect as G } from "react";
|
|
3
|
+
import "react-router-dom";
|
|
4
|
+
import "react-dom";
|
|
5
|
+
import "react-hook-form";
|
|
6
|
+
import "react-flexmonster";
|
|
7
|
+
import "@azure/msal-browser";
|
|
8
|
+
import "@azure/msal-react";
|
|
9
|
+
const o = {
|
|
10
|
+
loadOnInit: !0,
|
|
11
|
+
silent: !1,
|
|
12
|
+
enabled: !0,
|
|
13
|
+
nullStateBeforeLoad: !0,
|
|
14
|
+
nullStateOnFail: !1
|
|
15
|
+
}, N = (n, { loadOnInit: u = o.loadOnInit, enabled: c = o.enabled, silent: s = o.silent, nullStateBeforeLoad: d = o.nullStateBeforeLoad, nullStateOnFail: f = o.nullStateOnFail, customApiUrl: $, customBearerToken: w, dataTransformer: i } = o) => {
|
|
16
|
+
const p = I({ silent: s, customToken: w, differentBaseUrl: $ }), [O, g] = A(!1), { startLoading: m, stopLoading: L } = E(j), R = F(0), { isAuthenticated: D } = v(), x = e((t) => {
|
|
17
|
+
m(t), g(() => !0);
|
|
18
|
+
}, [m]), C = e((t) => {
|
|
19
|
+
L(t), g(() => !1);
|
|
20
|
+
}, [L]), [S, l] = A(null), a = e(async (t, b) => {
|
|
21
|
+
if (!D() || c === !1)
|
|
22
|
+
return null;
|
|
23
|
+
!s && x(`loadData-${n}-${b}`), d && l(null);
|
|
24
|
+
let h;
|
|
25
|
+
try {
|
|
26
|
+
const r = await p.get(n, {
|
|
27
|
+
signal: t
|
|
28
|
+
}), y = i ? i(r.data) : r.data;
|
|
29
|
+
l(y), h = y;
|
|
30
|
+
} catch (r) {
|
|
31
|
+
throw f && l(null), r;
|
|
32
|
+
} finally {
|
|
33
|
+
!s && C(`loadData-${n}-${b}`);
|
|
34
|
+
}
|
|
35
|
+
return h;
|
|
36
|
+
}, [
|
|
37
|
+
D,
|
|
38
|
+
c,
|
|
39
|
+
s,
|
|
40
|
+
x,
|
|
41
|
+
n,
|
|
42
|
+
d,
|
|
43
|
+
p,
|
|
44
|
+
i,
|
|
45
|
+
f,
|
|
46
|
+
C
|
|
47
|
+
]), k = e(async () => {
|
|
48
|
+
a();
|
|
49
|
+
}, [a]), B = e(async () => a(), [a]);
|
|
50
|
+
return G(() => {
|
|
51
|
+
if (u === !1)
|
|
52
|
+
return;
|
|
53
|
+
const t = new AbortController();
|
|
54
|
+
return a(t.signal, ++R.current), () => {
|
|
55
|
+
t.abort();
|
|
56
|
+
};
|
|
57
|
+
}, [a, u]), { data: S, setData: l, reloadData: k, isLoading: O, reloadDataWithReturn: B };
|
|
58
|
+
};
|
|
59
|
+
export {
|
|
60
|
+
N as u
|
|
61
|
+
};
|
package/dist/utils.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./nivo-bar.es-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./nivo-bar.es-BRHkg8Ew.cjs");require("react");require("@azure/msal-browser");require("@azure/msal-react");require("react-router-dom");require("react-dom");require("react-hook-form");require("react-flexmonster");const f=require("./numberUtils-BY7ziQF8.cjs"),g=({cell:{value:t}})=>e.jsxRuntimeExports.jsx(e.SimpleTooltip,{text:t,placement:"bottom",children:e.jsxRuntimeExports.jsx("div",{className:"w-100 text-truncate",children:t})}),h=({cell:{value:t}})=>e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:t==null?void 0:t.toLocaleString("cs-CZ")}),d=({cell:{value:t}})=>{const i=e.format(new Date(t),"dd.MM.yyyy");return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:t?i:""})},S=(t,i)=>{let n=!1,a=t;t[0]==="#"&&(a=t.slice(1),n=!0);let r=parseInt(a.substring(0,2),16),s=parseInt(a.substring(2,4),16),o=parseInt(a.substring(4,6),16);r+=i,s+=i,o+=i,r>255?r=255:r<0&&(r=0),s>255?s=255:s<0&&(s=0),o>255?o=255:o<0&&(o=0);const c=r.toString(16).length===1?"0"+r.toString(16):r.toString(16),m=s.toString(16).length===1?"0"+s.toString(16):s.toString(16),u=o.toString(16).length===1?"0"+o.toString(16):o.toString(16);return(n?"#":"")+c+m+u},p=t=>{const i=t.slice(3),n=[];for(let r=0;r<i.length;r+=2)n.push(i.slice(r,r+2));return`#${n.reverse().join("")}`};function l(t,i){t.setValue(i,null)}function D(t,i){i.forEach(n=>{l(t,n)})}const x=["edit","delete","info","warning","check","check-simple","add","cancel","cancel-simple","danger","chevron-left","chevron-right","chevron-up","chevron-down","chevron-double-left","chevron-double-right","folder","folder-filled","file-download","file-upload","star-outline","save","link","pending"];exports.atobUtf8=e.atobUtf8;exports.buildEmployeeNameString=e.buildEmployeeNameString;exports.buildOrgUnitString=e.buildOrgUnitString;exports.buildVehicleNameString=e.buildVehicleNameString;exports.capitalizeFirstLetter=e.capitalizeFirstLetter;exports.compareDate=e.compareDate;exports.compareDateTime=e.compareDateTime;exports.extractErrorsFromResponse=e.extractErrorsFromResponse;exports.extractFilename=e.extractFilename;exports.extractPermissionsFromResponse=e.extractPermissionsFromResponse;exports.fixNameIdNulls=e.fixNameIdNulls;exports.formatDate=e.formatDate;exports.formatDateTime=e.formatDateTime;exports.formatFileSize=e.formatFileSize;exports.getDateString=e.getDateString;exports.getDaysDifference=e.getDaysDifference;exports.getFirstDayOfMonth=e.getFirstDayOfMonth;exports.getFirstDayOfOffsetMonth=e.getFirstDayOfOffsetMonth;exports.getFirstDayOfYear=e.getFirstDayOfYear;exports.getLastDayOfMonth=e.getLastDayOfMonth;exports.getLastDayOfOffsetMonth=e.getLastDayOfOffsetMonth;exports.getLastDayOfYear=e.getLastDayOfYear;exports.hasOnlyNullValues=e.hasOnlyNullValues;exports.hookFormSetServerErrors=e.hookFormSetServerErrors;exports.isISODate=e.isISODate;exports.isPrimitive=e.isPrimitive;exports.isValidDate=e.isValidDate;exports.joinStrings=e.joinStrings;exports.msToStartOfNextDay=e.msToStartOfNextDay;exports.replaceNullValuesOnlyObjectsWithNulls=e.replaceNullValuesOnlyObjectsWithNulls;exports.saveFile=e.saveFile;exports.saveFileFromResponse=e.saveFileFromResponse;exports.shortenText=e.shortenText;exports.stringContains=e.stringContains;exports.stringSearchWithin=e.stringSearchWithin;exports.stringStartsWith=e.stringStartsWith;exports.trimIsoDate=e.trimIsoDate;exports.truncateText=e.truncateText;exports.urlfyArray=e.urlfyArray;exports.limitNumber=f.limitNumber;exports.CommonLuminusIconsArray=x;exports.adjustBrightness=S;exports.dateValueFormat=d;exports.hookFormSetNull=l;exports.hookFormSetNulls=D;exports.numFormat=h;exports.valueTooltip=g;exports.vclToHex=p;
|
package/dist/utils.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as i, aA as f, X as g } from "./nivo-bar.es-
|
|
2
|
-
import { c8 as M, c6 as V, c7 as k, c5 as w, c4 as L, bP as E, bQ as P, bd as B, bX as W, bM as A, b_ as G, bi as U, c3 as Y, ca as z, bW as X, bR as Z, b6 as $, bT as H, b7 as Q, bS as _, bU as q, bV as J, b$ as K, br as tt, bN as et, bZ as st, bO as rt, cb as at, bF as ot, c0 as it, bY as nt, bc as lt, cd as ct, c1 as mt, af as ft, c2 as gt, b5 as bt, c9 as ut, cc as dt } from "./nivo-bar.es-
|
|
1
|
+
import { j as i, aA as f, X as g } from "./nivo-bar.es-wC2Yrmiv.js";
|
|
2
|
+
import { c8 as M, c6 as V, c7 as k, c5 as w, c4 as L, bP as E, bQ as P, bd as B, bX as W, bM as A, b_ as G, bi as U, c3 as Y, ca as z, bW as X, bR as Z, b6 as $, bT as H, b7 as Q, bS as _, bU as q, bV as J, b$ as K, br as tt, bN as et, bZ as st, bO as rt, cb as at, bF as ot, c0 as it, bY as nt, bc as lt, cd as ct, c1 as mt, af as ft, c2 as gt, b5 as bt, c9 as ut, cc as dt } from "./nivo-bar.es-wC2Yrmiv.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@azure/msal-browser";
|
|
5
5
|
import "@azure/msal-react";
|
package/package.json
CHANGED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { aj as B, al as I, b2 as R } from "./nivo-bar.es-B8f_eSBX.js";
|
|
2
|
-
import { useState as $, useContext as j, useRef as v, useCallback as i, useEffect as E } from "react";
|
|
3
|
-
import "react-router-dom";
|
|
4
|
-
import "react-dom";
|
|
5
|
-
import "react-hook-form";
|
|
6
|
-
import "react-flexmonster";
|
|
7
|
-
import "@azure/msal-browser";
|
|
8
|
-
import "@azure/msal-react";
|
|
9
|
-
const a = {
|
|
10
|
-
loadOnInit: !0,
|
|
11
|
-
silent: !1,
|
|
12
|
-
enabled: !0,
|
|
13
|
-
nullStateBeforeLoad: !0,
|
|
14
|
-
nullStateOnFail: !1
|
|
15
|
-
}, M = (o, { loadOnInit: u = a.loadOnInit, enabled: d = a.enabled, silent: e = a.silent, nullStateBeforeLoad: c = a.nullStateBeforeLoad, nullStateOnFail: f = a.nullStateOnFail, customApiUrl: w, customBearerToken: y, dataTransformer: l } = a) => {
|
|
16
|
-
const p = B({ silent: e, customToken: y, differentBaseUrl: w }), [O, g] = $(!1), { startLoading: m, stopLoading: L } = j(I), S = v(0), { isAuthenticated: D } = R(), x = i((t) => {
|
|
17
|
-
m(t), g(() => !0);
|
|
18
|
-
}, [m]), C = i((t) => {
|
|
19
|
-
L(t), g(() => !1);
|
|
20
|
-
}, [L]), [k, n] = $(null), r = i(async (t, b) => {
|
|
21
|
-
if (!D() || d === !1)
|
|
22
|
-
return null;
|
|
23
|
-
!e && x(`loadData-${o}-${b}`), c && n(null);
|
|
24
|
-
let A;
|
|
25
|
-
try {
|
|
26
|
-
const s = await p.get(o, {
|
|
27
|
-
signal: t
|
|
28
|
-
}), h = l ? l(s.data) : s.data;
|
|
29
|
-
n(h), A = h;
|
|
30
|
-
} catch (s) {
|
|
31
|
-
throw f && n(null), s;
|
|
32
|
-
} finally {
|
|
33
|
-
!e && C(`loadData-${o}-${b}`);
|
|
34
|
-
}
|
|
35
|
-
return A;
|
|
36
|
-
}, [
|
|
37
|
-
D,
|
|
38
|
-
d,
|
|
39
|
-
e,
|
|
40
|
-
x,
|
|
41
|
-
o,
|
|
42
|
-
c,
|
|
43
|
-
p,
|
|
44
|
-
l,
|
|
45
|
-
f,
|
|
46
|
-
C
|
|
47
|
-
]);
|
|
48
|
-
return E(() => {
|
|
49
|
-
if (u === !1)
|
|
50
|
-
return;
|
|
51
|
-
const t = new AbortController();
|
|
52
|
-
return r(t.signal, ++S.current), () => {
|
|
53
|
-
t.abort();
|
|
54
|
-
};
|
|
55
|
-
}, [r, u]), { data: k, setData: n, reloadData: r, isLoading: O };
|
|
56
|
-
};
|
|
57
|
-
export {
|
|
58
|
-
M as u
|
|
59
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const i=require("./nivo-bar.es-DQVaIWpI.cjs"),e=require("react");require("react-router-dom");require("react-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");const a={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},O=(n,{loadOnInit:c=a.loadOnInit,enabled:d=a.enabled,silent:o=a.silent,nullStateBeforeLoad:f=a.nullStateBeforeLoad,nullStateOnFail:g=a.nullStateOnFail,customApiUrl:S,customBearerToken:$,dataTransformer:l}=a)=>{const L=i.useAxios({silent:o,customToken:$,differentBaseUrl:S}),[w,C]=e.useState(!1),{startLoading:D,stopLoading:q}=e.useContext(i.LoadingContext),y=e.useRef(0),{isAuthenticated:b}=i.useAuth(),p=e.useCallback(t=>{D(t),C(()=>!0)},[D]),x=e.useCallback(t=>{q(t),C(()=>!1)},[q]),[B,s]=e.useState(null),u=e.useCallback(async(t,A)=>{if(!b()||d===!1)return null;!o&&p(`loadData-${n}-${A}`),f&&s(null);let h;try{const r=await L.get(n,{signal:t}),k=l?l(r.data):r.data;s(k),h=k}catch(r){throw g&&s(null),r}finally{!o&&x(`loadData-${n}-${A}`)}return h},[b,d,o,p,n,f,L,l,g,x]);return e.useEffect(()=>{if(c===!1)return;const t=new AbortController;return u(t.signal,++y.current),()=>{t.abort()}},[u,c]),{data:B,setData:s,reloadData:u,isLoading:w}};exports.useGetApiData=O;
|