react-luminus-components 1.3.241 → 1.3.243
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 +34 -34
- package/dist/{Loading-_7loOvtU.js → Loading-fs5f8ADx.js} +1 -1
- package/dist/{Loading-D4SCMh6h.cjs → Loading-hsFF9JOi.cjs} +1 -1
- package/dist/contexts/form-disabled/FormDisabledContext.d.ts +2 -0
- package/dist/contexts/form-disabled/FormDisabledProvider.d.ts +8 -0
- package/dist/contexts/form-disabled/useFormDisabledContext.d.ts +5 -0
- package/dist/contexts/index.d.ts +3 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +130 -126
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +18 -18
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +17 -17
- package/dist/main.cjs.js +20 -20
- package/dist/main.es.js +3074 -3074
- package/dist/{nivo-bar.es-BeALe7Gh.js → nivo-bar.es-BktVhOxR.js} +5500 -5491
- package/dist/nivo-bar.es-Do6ebPru.cjs +279 -0
- package/dist/{useGetApiData-DrkjC5UR.js → useGetApiData-Bf7SUBhL.js} +7 -7
- package/dist/{useGetApiData-COPBCf8x.cjs → useGetApiData-DhwZ3wr2.cjs} +1 -1
- package/dist/{usePermissions-Blbd53ol.js → usePermissions-Boc9gBf0.js} +1 -1
- package/dist/{usePermissions-Daf3EkaR.cjs → usePermissions-CMa5mSdq.cjs} +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +10 -10
- package/package.json +1 -1
- package/dist/nivo-bar.es-BebGU-zz.cjs +0 -279
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useContext as
|
|
1
|
+
import { aj as h, al as L, a$ as w } from "./nivo-bar.es-BktVhOxR.js";
|
|
2
|
+
import { useContext as y, useRef as O, useState as S, useCallback as k, useEffect as B } from "react";
|
|
3
3
|
import "react-router-dom";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
import "react-hook-form";
|
|
@@ -12,15 +12,15 @@ const t = {
|
|
|
12
12
|
enabled: !0,
|
|
13
13
|
nullStateBeforeLoad: !0,
|
|
14
14
|
nullStateOnFail: !1
|
|
15
|
-
},
|
|
16
|
-
const d =
|
|
15
|
+
}, q = (a, { loadOnInit: i = t.loadOnInit, enabled: u = t.enabled, silent: o = t.silent, nullStateBeforeLoad: c = t.nullStateBeforeLoad, nullStateOnFail: f = t.nullStateOnFail, customApiUrl: g, customBearerToken: x, dataTransformer: r } = t) => {
|
|
16
|
+
const d = h({ silent: o, customToken: x, differentBaseUrl: g }), { startLoading: p, stopLoading: m } = y(L), A = O(0), { isAuthenticated: D } = w(), [C, e] = S(null), l = k(async (n, b) => {
|
|
17
17
|
if (D() && u !== !1) {
|
|
18
18
|
!o && p(`loadData-${a}-${b}`), c && e(null);
|
|
19
19
|
try {
|
|
20
20
|
const s = await d.get(a, {
|
|
21
21
|
signal: n
|
|
22
|
-
}),
|
|
23
|
-
e(
|
|
22
|
+
}), $ = r ? r(s.data) : s.data;
|
|
23
|
+
e($);
|
|
24
24
|
} catch (s) {
|
|
25
25
|
throw f && e(null), s;
|
|
26
26
|
} finally {
|
|
@@ -49,5 +49,5 @@ const t = {
|
|
|
49
49
|
}, [l, i]), { data: C, setData: e, reloadData: l };
|
|
50
50
|
};
|
|
51
51
|
export {
|
|
52
|
-
|
|
52
|
+
q as u
|
|
53
53
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const i=require("./nivo-bar.es-
|
|
1
|
+
"use strict";const i=require("./nivo-bar.es-Do6ebPru.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 t={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},w=(a,{loadOnInit:c=t.loadOnInit,enabled:f=t.enabled,silent:n=t.silent,nullStateBeforeLoad:d=t.nullStateBeforeLoad,nullStateOnFail:q=t.nullStateOnFail,customApiUrl:h,customBearerToken:p,dataTransformer:u}=t)=>{const D=i.useAxios({silent:n,customToken:p,differentBaseUrl:h}),{startLoading:A,stopLoading:b}=e.useContext(i.LoadingContext),x=e.useRef(0),{isAuthenticated:g}=i.useAuth(),[L,r]=e.useState(null),l=e.useCallback(async(o,C)=>{if(g()&&f!==!1){!n&&A(`loadData-${a}-${C}`),d&&r(null);try{const s=await D.get(a,{signal:o}),$=u?u(s.data):s.data;r($)}catch(s){throw q&&r(null),s}finally{!n&&b(`loadData-${a}-${C}`)}}},[g,f,n,A,a,d,D,u,q,b]);return e.useEffect(()=>{if(c===!1)return;const o=new AbortController;return l(o.signal,++x.current),()=>{o.abort()}},[l,c]),{data:L,setData:r,reloadData:l}};exports.useGetApiData=w;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const u=require("./nivo-bar.es-
|
|
1
|
+
"use strict";const u=require("./nivo-bar.es-Do6ebPru.cjs"),n=require("react");require("react-router-dom");require("@azure/msal-browser");require("@azure/msal-react");require("react-dom");require("react-hook-form");require("react-flexmonster");const c=()=>{const{user:e}=n.useContext(u.UserContext);return{checkUserHasPermissions:n.useCallback((s,t="all")=>s.length===0?!0:t==="any"?s.some(i=>{var r;return(r=e==null?void 0:e.permissions)==null?void 0:r.includes(i)}):s.every(i=>{var r;return(r=e==null?void 0:e.permissions)==null?void 0:r.includes(i)}),[e])}};exports.usePermissions=c;
|
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-Do6ebPru.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),o=parseInt(a.substring(2,4),16),s=parseInt(a.substring(4,6),16);r+=i,o+=i,s+=i,r>255?r=255:r<0&&(r=0),o>255?o=255:o<0&&(o=0),s>255?s=255:s<0&&(s=0);const u=r.toString(16).length===1?"0"+r.toString(16):r.toString(16),m=o.toString(16).length===1?"0"+o.toString(16):o.toString(16),c=s.toString(16).length===1?"0"+s.toString(16):s.toString(16);return(n?"#":"")+u+m+c},D=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 p(t,i){i.forEach(n=>{l(t,n)})}const x=["edit","delete","info","warning","check","add","cancel","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"];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=p;exports.numFormat=h;exports.valueTooltip=g;exports.vclToHex=D;
|
package/dist/utils.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as i,
|
|
2
|
-
import {
|
|
1
|
+
import { j as i, aA as m, X as b } from "./nivo-bar.es-BktVhOxR.js";
|
|
2
|
+
import { c3 as L, c1 as M, c2 as V, c0 as w, b$ as E, bK as P, bL as k, ba as B, bS as G, bH as W, bV as A, bf as U, b_ as Y, c5 as z, bR as H, bM as X, b3 as Z, bO as $, b4 as J, bN as K, bP as Q, bQ as _, bW as q, bG as tt, bI as et, bU as st, bJ as rt, c6 as at, by as ot, bX as it, bT as nt, b9 as lt, c8 as ct, bY as ft, af as mt, bZ as bt, b2 as gt, c4 as ut, c7 as ht } from "./nivo-bar.es-BktVhOxR.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@azure/msal-browser";
|
|
5
5
|
import "@azure/msal-react";
|
|
@@ -8,7 +8,7 @@ import "react-dom";
|
|
|
8
8
|
import "react-hook-form";
|
|
9
9
|
import "react-flexmonster";
|
|
10
10
|
import { l as pt } from "./numberUtils-Bwf8nio8.js";
|
|
11
|
-
const
|
|
11
|
+
const F = ({ cell: { value: t } }) => /* @__PURE__ */ i.jsx(m, { text: t, placement: "bottom", children: /* @__PURE__ */ i.jsx("div", { className: "w-100 text-truncate", children: t }) }), O = ({ cell: { value: t } }) => /* @__PURE__ */ i.jsx(i.Fragment, { children: t == null ? void 0 : t.toLocaleString("cs-CZ") }), N = ({ cell: { value: t } }) => {
|
|
12
12
|
const s = b(new Date(t), "dd.MM.yyyy");
|
|
13
13
|
return /* @__PURE__ */ i.jsx(i.Fragment, { children: t ? s : "" });
|
|
14
14
|
}, j = (t, s) => {
|
|
@@ -16,8 +16,8 @@ const D = ({ cell: { value: t } }) => /* @__PURE__ */ i.jsx(f, { text: t, placem
|
|
|
16
16
|
t[0] === "#" && (n = t.slice(1), o = !0);
|
|
17
17
|
let e = parseInt(n.substring(0, 2), 16), r = parseInt(n.substring(2, 4), 16), a = parseInt(n.substring(4, 6), 16);
|
|
18
18
|
e += s, r += s, a += s, e > 255 ? e = 255 : e < 0 && (e = 0), r > 255 ? r = 255 : r < 0 && (r = 0), a > 255 ? a = 255 : a < 0 && (a = 0);
|
|
19
|
-
const l = e.toString(16).length === 1 ? "0" + e.toString(16) : e.toString(16), c = r.toString(16).length === 1 ? "0" + r.toString(16) : r.toString(16),
|
|
20
|
-
return (o ? "#" : "") + l + c +
|
|
19
|
+
const l = e.toString(16).length === 1 ? "0" + e.toString(16) : e.toString(16), c = r.toString(16).length === 1 ? "0" + r.toString(16) : r.toString(16), f = a.toString(16).length === 1 ? "0" + a.toString(16) : a.toString(16);
|
|
20
|
+
return (o ? "#" : "") + l + c + f;
|
|
21
21
|
}, v = (t) => {
|
|
22
22
|
const s = t.slice(3), o = [];
|
|
23
23
|
for (let e = 0; e < s.length; e += 2)
|
|
@@ -68,10 +68,10 @@ export {
|
|
|
68
68
|
B as extractErrorsFromResponse,
|
|
69
69
|
G as extractFilename,
|
|
70
70
|
W as extractPermissionsFromResponse,
|
|
71
|
-
|
|
71
|
+
A as fixNameIdNulls,
|
|
72
72
|
U as formatDate,
|
|
73
73
|
Y as formatDateTime,
|
|
74
|
-
|
|
74
|
+
z as formatFileSize,
|
|
75
75
|
H as getDateString,
|
|
76
76
|
X as getDaysDifference,
|
|
77
77
|
Z as getFirstDayOfMonth,
|
|
@@ -95,12 +95,12 @@ export {
|
|
|
95
95
|
nt as saveFile,
|
|
96
96
|
lt as saveFileFromResponse,
|
|
97
97
|
ct as shortenText,
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
ft as stringContains,
|
|
99
|
+
mt as stringSearchWithin,
|
|
100
100
|
bt as stringStartsWith,
|
|
101
101
|
gt as trimIsoDate,
|
|
102
102
|
ut as truncateText,
|
|
103
103
|
ht as urlfyArray,
|
|
104
|
-
|
|
104
|
+
F as valueTooltip,
|
|
105
105
|
v as vclToHex
|
|
106
106
|
};
|