react-luminus-components 1.4.46 → 1.4.48
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-DFgDxFs5.js +40 -0
- package/dist/FormDisabledProvider-DIzFh_cu.cjs +1 -0
- package/dist/contexts/auth/AuthContext.d.ts +2 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +458 -426
- package/dist/hooks/useAuth/hooks/useDevAuth.d.ts +0 -4
- package/dist/hooks/useAuth/hooks/useMsalAuth.d.ts +0 -3
- package/dist/hooks/useAuth/useAuth.d.ts +0 -4
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +45 -45
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +31 -31
- package/dist/main.cjs.js +4 -4
- package/dist/main.es.js +59 -57
- package/dist/{nivo-bar.es-CZIO12ob.js → nivo-bar.es-DRPYhamY.js} +4557 -4590
- package/dist/nivo-bar.es-xNXQl_N3.cjs +281 -0
- package/dist/{useLocalStorageState-Di1g3-X5.js → useLocalStorageState-C3TjznAr.js} +5 -5
- package/dist/{useLocalStorageState-B8rqdAt7.cjs → useLocalStorageState-D5gRtVLq.cjs} +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +19 -19
- package/package.json +1 -1
- package/dist/FormDisabledProvider-BKhJ3z8H.cjs +0 -1
- package/dist/FormDisabledProvider-CRvfN8Ti.js +0 -20
- package/dist/nivo-bar.es-c-ieD_Y7.cjs +0 -281
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ak as J, am as N, b5 as E } from "./nivo-bar.es-DRPYhamY.js";
|
|
2
2
|
import { useState as p, useContext as F, useRef as G, useCallback as e, useEffect as O } from "react";
|
|
3
3
|
import "react-router-dom";
|
|
4
4
|
import "react-dom";
|
|
@@ -12,7 +12,7 @@ const l = {
|
|
|
12
12
|
enabled: !0,
|
|
13
13
|
nullStateBeforeLoad: !0,
|
|
14
14
|
nullStateOnFail: !1
|
|
15
|
-
},
|
|
15
|
+
}, M = (t, { loadOnInit: i = l.loadOnInit, enabled: n = l.enabled, silent: a = l.silent, nullStateBeforeLoad: c = l.nullStateBeforeLoad, nullStateOnFail: u = l.nullStateOnFail, customApiUrl: s, customBearerToken: $, dataTransformer: g } = l) => {
|
|
16
16
|
const m = J({
|
|
17
17
|
silent: a,
|
|
18
18
|
customToken: $,
|
|
@@ -59,7 +59,7 @@ const l = {
|
|
|
59
59
|
o.abort();
|
|
60
60
|
};
|
|
61
61
|
}, [r, i]), { data: R, setData: d, reloadData: v, isLoading: w, reloadDataWithReturn: B };
|
|
62
|
-
},
|
|
62
|
+
}, P = (t, i) => {
|
|
63
63
|
const n = e(() => {
|
|
64
64
|
const s = localStorage.getItem(t);
|
|
65
65
|
return s != null && s !== "undefined" ? JSON.parse(s) : i;
|
|
@@ -73,6 +73,6 @@ const l = {
|
|
|
73
73
|
return [a, c, u];
|
|
74
74
|
};
|
|
75
75
|
export {
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
P as a,
|
|
77
|
+
M as u
|
|
78
78
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const S=require("./nivo-bar.es-
|
|
1
|
+
"use strict";const S=require("./nivo-bar.es-xNXQl_N3.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 r={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},y=(e,{loadOnInit:u=r.loadOnInit,enabled:n=r.enabled,silent:a=r.silent,nullStateBeforeLoad:c=r.nullStateBeforeLoad,nullStateOnFail:i=r.nullStateOnFail,customApiUrl:o,customBearerToken:k,dataTransformer:g}=r)=>{const C=S.useAxios({silent:a,customToken:k,differentBaseUrl:o}),[O,L]=t.useState(!1),{startLoading:b,stopLoading:D}=t.useContext(S.LoadingContext),R=t.useRef(0),{isAuthenticated:q}=S.useAuth(),p=t.useCallback(s=>{b(s),L(()=>!0)},[b]),x=t.useCallback(s=>{D(s),L(()=>!1)},[D]),[$,d]=t.useState(null),l=t.useCallback(async(s,A)=>{if(!q()||n===!1)return null;!a&&p(`loadData-${e}-${A}`),c&&d(null);let I;try{const f=await C.get(e,{signal:s}),h=g?g(f.data):f.data;d(h),I=h}catch(f){throw i&&d(null),f}finally{!a&&x(`loadData-${e}-${A}`)}return I},[q,n,a,p,e,c,C,g,i,x]),v=t.useCallback(async()=>{l()},[l]),w=t.useCallback(async()=>l(),[l]);return t.useEffect(()=>{if(u===!1)return;const s=new AbortController;return l(s.signal,++R.current),()=>{s.abort()}},[l,u]),{data:$,setData:d,reloadData:v,isLoading:O,reloadDataWithReturn:w}},B=(e,u)=>{const n=t.useCallback(()=>{const o=localStorage.getItem(e);return o!=null&&o!=="undefined"?JSON.parse(o):u},[u,e]),[a,c]=t.useState(n);t.useEffect(()=>{localStorage.setItem(e,JSON.stringify(a))},[e,a]);const i=t.useCallback(()=>{c(n)},[n]);return[a,c,i]};exports.useGetApiData=y;exports.useLocalStorageState=B;
|
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-xNXQl_N3.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 l=require("./apiPathUtils-CkTRKCPh.cjs"),f=({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")}),p=({cell:{value:t}})=>{const r=e.format(new Date(t),"dd.MM.yyyy");return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:t?r:""})},d=(t,r)=>{let i=!1,a=t;t[0]==="#"&&(a=t.slice(1),i=!0);let s=parseInt(a.substring(0,2),16),o=parseInt(a.substring(2,4),16),n=parseInt(a.substring(4,6),16);s+=r,o+=r,n+=r,s>255?s=255:s<0&&(s=0),o>255?o=255:o<0&&(o=0),n>255?n=255:n<0&&(n=0);const u=s.toString(16).length===1?"0"+s.toString(16):s.toString(16),m=o.toString(16).length===1?"0"+o.toString(16):o.toString(16),g=n.toString(16).length===1?"0"+n.toString(16):n.toString(16);return(i?"#":"")+u+m+g},y=t=>{const r=t.slice(3),i=[];for(let s=0;s<r.length;s+=2)i.push(r.slice(s,s+2));return`#${i.reverse().join("")}`};function c(t,r){t.setValue(r,null)}function S(t,r){r.forEach(i=>{c(t,i)})}const F=t=>typeof t.directoryName=="string"&&typeof t.directoryPath=="string"&&typeof t.directoryTranslationKey=="string"&&Array.isArray(t.files),D=async t=>{let r={status:"pending"};try{r={status:"success",data:(await t).data}}catch(i){r={status:"error",error:i}}return r},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","resizer-horizontal","qr-code","phone","mail","mail-envelope","dashboard","user","role","close","search","plus","minus"];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.openFileFromResponse=e.openFileFromResponse;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.generateApiPath=l.generateApiPath;exports.limitNumber=l.limitNumber;exports.CommonLuminusIconsArray=x;exports.adjustBrightness=d;exports.dateValueFormat=p;exports.hookFormSetNull=c;exports.hookFormSetNulls=S;exports.isFileStructureDirectory=F;exports.numFormat=h;exports.responsePromiseWrapper=D;exports.valueTooltip=f;exports.vclToHex=y;
|
package/dist/utils.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as i,
|
|
2
|
-
import {
|
|
1
|
+
import { j as i, aA as f, U as u } from "./nivo-bar.es-DRPYhamY.js";
|
|
2
|
+
import { ca as V, c8 as k, c9 as A, c7 as L, c6 as M, bQ as E, bR as W, bg as z, bY as B, bN as G, c0 as U, bl as Y, c5 as Z, cc as $, bX as q, bS as H, b9 as K, bU as Q, ba as X, bT as _, bV as J, bW as ee, c1 as te, bu as se, bO as re, b$ as ae, bP as oe, cd as ie, bG as ne, b_ as le, c2 as ce, bZ as me, bf as fe, cf as ue, c3 as ge, af as pe, c4 as de, b8 as he, cb as be, ce as ye } from "./nivo-bar.es-DRPYhamY.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@azure/msal-browser";
|
|
5
5
|
import "@azure/msal-react";
|
|
@@ -9,7 +9,7 @@ import "react-hook-form";
|
|
|
9
9
|
import "react-flexmonster";
|
|
10
10
|
import { g as Fe, l as xe } from "./apiPathUtils-DiqvB8mF.js";
|
|
11
11
|
const D = ({ cell: { value: e } }) => /* @__PURE__ */ i.jsx(f, { text: e, placement: "bottom", children: /* @__PURE__ */ i.jsx("div", { className: "w-100 text-truncate", children: e }) }), O = ({ cell: { value: e } }) => /* @__PURE__ */ i.jsx(i.Fragment, { children: e == null ? void 0 : e.toLocaleString("cs-CZ") }), N = ({ cell: { value: e } }) => {
|
|
12
|
-
const t =
|
|
12
|
+
const t = u(new Date(e), "dd.MM.yyyy");
|
|
13
13
|
return /* @__PURE__ */ i.jsx(i.Fragment, { children: e ? t : "" });
|
|
14
14
|
}, v = (e, t) => {
|
|
15
15
|
let r = !1, n = e;
|
|
@@ -24,15 +24,15 @@ const D = ({ cell: { value: e } }) => /* @__PURE__ */ i.jsx(f, { text: e, placem
|
|
|
24
24
|
r.push(t.slice(s, s + 2));
|
|
25
25
|
return `#${r.reverse().join("")}`;
|
|
26
26
|
};
|
|
27
|
-
function
|
|
27
|
+
function g(e, t) {
|
|
28
28
|
e.setValue(t, null);
|
|
29
29
|
}
|
|
30
30
|
function R(e, t) {
|
|
31
31
|
t.forEach((r) => {
|
|
32
|
-
|
|
32
|
+
g(e, r);
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
const
|
|
35
|
+
const P = (e) => typeof e.directoryName == "string" && typeof e.directoryPath == "string" && typeof e.directoryTranslationKey == "string" && Array.isArray(e.files), j = async (e) => {
|
|
36
36
|
let t = { status: "pending" };
|
|
37
37
|
try {
|
|
38
38
|
t = { status: "success", data: (await e).data };
|
|
@@ -40,7 +40,7 @@ const w = (e) => typeof e.directoryName == "string" && typeof e.directoryPath ==
|
|
|
40
40
|
t = { status: "error", error: r };
|
|
41
41
|
}
|
|
42
42
|
return t;
|
|
43
|
-
},
|
|
43
|
+
}, w = [
|
|
44
44
|
"edit",
|
|
45
45
|
"delete",
|
|
46
46
|
"info",
|
|
@@ -79,13 +79,13 @@ const w = (e) => typeof e.directoryName == "string" && typeof e.directoryPath ==
|
|
|
79
79
|
"minus"
|
|
80
80
|
];
|
|
81
81
|
export {
|
|
82
|
-
|
|
82
|
+
w as CommonLuminusIconsArray,
|
|
83
83
|
v as adjustBrightness,
|
|
84
|
-
|
|
84
|
+
V as atobUtf8,
|
|
85
85
|
k as buildEmployeeNameString,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
A as buildOrgUnitString,
|
|
87
|
+
L as buildVehicleNameString,
|
|
88
|
+
M as capitalizeFirstLetter,
|
|
89
89
|
E as compareDate,
|
|
90
90
|
W as compareDateTime,
|
|
91
91
|
N as dateValueFormat,
|
|
@@ -106,10 +106,10 @@ export {
|
|
|
106
106
|
J as getLastDayOfOffsetMonth,
|
|
107
107
|
ee as getLastDayOfYear,
|
|
108
108
|
te as hasOnlyNullValues,
|
|
109
|
-
|
|
109
|
+
g as hookFormSetNull,
|
|
110
110
|
R as hookFormSetNulls,
|
|
111
111
|
se as hookFormSetServerErrors,
|
|
112
|
-
|
|
112
|
+
P as isFileStructureDirectory,
|
|
113
113
|
re as isISODate,
|
|
114
114
|
ae as isPrimitive,
|
|
115
115
|
oe as isValidDate,
|
|
@@ -119,14 +119,14 @@ export {
|
|
|
119
119
|
O as numFormat,
|
|
120
120
|
le as openFileFromResponse,
|
|
121
121
|
ce as replaceNullValuesOnlyObjectsWithNulls,
|
|
122
|
-
|
|
122
|
+
j as responsePromiseWrapper,
|
|
123
123
|
me as saveFile,
|
|
124
124
|
fe as saveFileFromResponse,
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
ue as shortenText,
|
|
126
|
+
ge as stringContains,
|
|
127
127
|
pe as stringSearchWithin,
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
de as stringStartsWith,
|
|
129
|
+
he as trimIsoDate,
|
|
130
130
|
be as truncateText,
|
|
131
131
|
ye as urlfyArray,
|
|
132
132
|
D as valueTooltip,
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const s=require("./nivo-bar.es-c-ieD_Y7.cjs"),i="_loading_obchl_1",r="_spinner-grow_obchl_10",l="_second_obchl_14",t="_third_obchl_17",a="_loadingBlock_obchl_21",c="_sizeLine_obchl_29",d="_sizeFill_obchl_36",o={loading:i,"spinner-grow":"_spinner-grow_obchl_10",spinnerGrow:r,second:l,third:t,loadingBlock:a,sizeLine:c,sizeFill:d},_=()=>s.jsxRuntimeExports.jsxs("div",{className:s.classNames("luminus-loading",o.loading),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("spinner-grow",o.spinnerGrow,"text-primary"),role:"status"}),s.jsxRuntimeExports.jsx("div",{className:s.classNames("spinner-grow",o.spinnerGrow,"text-primary",o.second),role:"status"}),s.jsxRuntimeExports.jsx("div",{className:s.classNames("spinner-grow",o.spinnerGrow,"text-primary",o.third),role:"status"})]}),m=({children:n,disabled:e})=>s.jsxRuntimeExports.jsx(s.FormDisabledContext.Provider,{value:e,children:n});exports.FormDisabledProvider=m;exports.Loading=_;exports.classes=o;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { j as o, c as n, bL as e } from "./nivo-bar.es-CZIO12ob.js";
|
|
2
|
-
const l = "_loading_obchl_1", a = "_spinner-grow_obchl_10", c = "_second_obchl_14", t = "_third_obchl_17", d = "_loadingBlock_obchl_21", _ = "_sizeLine_obchl_29", p = "_sizeFill_obchl_36", s = {
|
|
3
|
-
loading: l,
|
|
4
|
-
"spinner-grow": "_spinner-grow_obchl_10",
|
|
5
|
-
spinnerGrow: a,
|
|
6
|
-
second: c,
|
|
7
|
-
third: t,
|
|
8
|
-
loadingBlock: d,
|
|
9
|
-
sizeLine: _,
|
|
10
|
-
sizeFill: p
|
|
11
|
-
}, m = () => /* @__PURE__ */ o.jsxs("div", { className: n("luminus-loading", s.loading), children: [
|
|
12
|
-
/* @__PURE__ */ o.jsx("div", { className: n("spinner-grow", s.spinnerGrow, "text-primary"), role: "status" }),
|
|
13
|
-
/* @__PURE__ */ o.jsx("div", { className: n("spinner-grow", s.spinnerGrow, "text-primary", s.second), role: "status" }),
|
|
14
|
-
/* @__PURE__ */ o.jsx("div", { className: n("spinner-grow", s.spinnerGrow, "text-primary", s.third), role: "status" })
|
|
15
|
-
] }), h = ({ children: i, disabled: r }) => /* @__PURE__ */ o.jsx(e.Provider, { value: r, children: i });
|
|
16
|
-
export {
|
|
17
|
-
h as F,
|
|
18
|
-
m as L,
|
|
19
|
-
s as c
|
|
20
|
-
};
|