react-luminus-components 1.5.21 → 1.5.24
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-Co150suu.cjs → FormDisabledProvider-BJ_XUA85.cjs} +1 -1
- package/dist/{FormDisabledProvider-CI3pHhAC.js → FormDisabledProvider-CCk5YUQ1.js} +1 -1
- package/dist/{ShortcutLinksContext-Ti4-xeFL.js → ShortcutLinksContext-CVJd0L8d.js} +4156 -4149
- package/dist/{ShortcutLinksContext-9stXS_vz.cjs → ShortcutLinksContext-Ce9suS4R.cjs} +29 -29
- package/dist/components/Form/DropdownPicker/DropdownPicker.d.ts +1 -1
- package/dist/components/HookForm/CustomSelectInput/CustomSelectInput.d.ts +1 -1
- package/dist/components/NotifCenter/Actions/NotificationActions.d.ts +5 -3
- package/dist/components/NotifCenter/Actions/types/NotificationKindFullModel.d.ts +5 -0
- package/dist/components/common/SimplePicker/SimplePicker.d.ts +6 -1
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +5 -5
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/usePersistentState/usePersistentState.d.ts +2 -0
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +109 -100
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +2 -2
- package/dist/main.cjs.js +25 -25
- package/dist/main.es.js +1840 -1840
- package/dist/models/prop-types/InputProps/DropdownPickerProps.d.ts +5 -0
- package/dist/{useLocalStorageState-Ct-tObyk.cjs → useLocalStorageState-C8BsBRul.cjs} +1 -1
- package/dist/{useLocalStorageState-CCKHuYoD.js → useLocalStorageState-CyfdUiRG.js} +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/storages/queryStorage.d.ts +3 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +102 -75
- package/package.json +1 -1
|
@@ -31,5 +31,10 @@ type DropdownPickerProps = InputBaseProps & {
|
|
|
31
31
|
miniDetailPlacement?: 'top' | 'bottom' | 'left' | 'right';
|
|
32
32
|
suggestedItems?: DropdownPickerOption[];
|
|
33
33
|
suggestedItemsTitle?: string;
|
|
34
|
+
customEllipsisOptions?: {
|
|
35
|
+
icon?: React.ReactNode;
|
|
36
|
+
label: string;
|
|
37
|
+
onClick: () => void;
|
|
38
|
+
}[];
|
|
34
39
|
};
|
|
35
40
|
export default DropdownPickerProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const S=require("./ShortcutLinksContext-
|
|
1
|
+
"use strict";const S=require("./ShortcutLinksContext-Ce9suS4R.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},m=(e,{loadOnInit:u=r.loadOnInit,enabled:n=r.enabled,silent:a=r.silent,nullStateBeforeLoad:c=r.nullStateBeforeLoad,nullStateOnFail:i=r.nullStateOnFail,customApiUrl:o,customBearerToken:I,dataTransformer:g}=r)=>{const C=S.useAxios({silent:a,customToken:I,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,h)=>{if(!q()||n===!1)return null;!a&&p(`loadData-${e}-${h}`),c&&d(null);let k;try{const f=await C.get(e,{signal:s}),A=g?g(f.data):f.data;d(A),k=A}catch(f){throw i&&d(null),f}finally{!a&&x(`loadData-${e}-${h}`)}return k},[q,n,a,p,e,c,C,g,i,x]),w=t.useCallback(async()=>{l()},[l]),y=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:w,isLoading:O,reloadDataWithReturn:y}},v=(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=m;exports.useLocalStorageState=v;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aw as J, aX as N, ar as E } from "./ShortcutLinksContext-
|
|
1
|
+
import { aw as J, aX as N, ar as E } from "./ShortcutLinksContext-CVJd0L8d.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";
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -13,4 +13,5 @@ export * from './route/apiPathUtils';
|
|
|
13
13
|
export * from './localizationUtils/localizationUtils';
|
|
14
14
|
export * from './apiUtils/apiUtils';
|
|
15
15
|
export * from './localStorage/localStorageUtils';
|
|
16
|
+
export { default as queryStorage } from './storages/queryStorage';
|
|
16
17
|
export { default as CommonLuminusIconsArray } from './constants/CommonLuminusIconsArray';
|
package/dist/utils.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ShortcutLinksContext-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ShortcutLinksContext-Ce9suS4R.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 a=require("./localStorageUtils-BCZln9KS.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})}),p=({cell:{value:t}})=>e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:t==null?void 0:t.toLocaleString("cs-CZ")}),d=({cell:{value:t}})=>{const r=e.format(new Date(t),"dd.MM.yyyy");return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:t?r:""})},y=(t,r)=>{let s=!1,l=t;t[0]==="#"&&(l=t.slice(1),s=!0);let o=parseInt(l.substring(0,2),16),i=parseInt(l.substring(2,4),16),n=parseInt(l.substring(4,6),16);o+=r,i+=r,n+=r,o>255?o=255:o<0&&(o=0),i>255?i=255:i<0&&(i=0),n>255?n=255:n<0&&(n=0);const m=o.toString(16).length===1?"0"+o.toString(16):o.toString(16),g=i.toString(16).length===1?"0"+i.toString(16):i.toString(16),h=n.toString(16).length===1?"0"+n.toString(16):n.toString(16);return(s?"#":"")+m+g+h},S=t=>{const r=t.slice(3),s=[];for(let o=0;o<r.length;o+=2)s.push(r.slice(o,o+2));return`#${s.reverse().join("")}`},F=t=>typeof t.directoryName=="string"&&typeof t.directoryPath=="string"&&typeof t.directoryTranslationKey=="string"&&Array.isArray(t.files),x=async t=>{let r={status:"pending"};try{r={status:"success",data:(await t).data}}catch(s){r={status:"error",error:s}}return r},c=()=>new URLSearchParams(window.location.search),u=t=>{const r=window.location.pathname+(t.toString()?`?${t.toString()}`:"")+window.location.hash;window.history.replaceState(null,"",r)},D={get length(){return Array.from(c().keys()).length},key(t){const r=c();return Array.from(r.keys())[t]??null},getItem(t){const s=c().get(t);return s??null},setItem(t,r){const s=c();s.set(t,r),u(s)},removeItem(t){const r=c();r.delete(t),u(r)},clear(){u(new URLSearchParams)}},O=["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","menu","arrow-right"];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.isExtensionOpenable=e.isExtensionOpenable;exports.isFileOpenable=e.isFileOpenable;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.dumpLocalStorage=a.dumpLocalStorage;exports.generateApiPath=a.generateApiPath;exports.hookFormSetNull=a.hookFormSetNull;exports.hookFormSetNulls=a.hookFormSetNulls;exports.limitNumber=a.limitNumber;exports.restoreLocalStorage=a.restoreLocalStorage;exports.CommonLuminusIconsArray=O;exports.adjustBrightness=y;exports.dateValueFormat=d;exports.isFileStructureDirectory=F;exports.numFormat=p;exports.queryStorage=D;exports.responsePromiseWrapper=x;exports.valueTooltip=f;exports.vclToHex=S;
|
package/dist/utils.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { cd as
|
|
1
|
+
import { j as n, ao as p, U as h } from "./ShortcutLinksContext-CVJd0L8d.js";
|
|
2
|
+
import { cd as A, cb as C, cc as U, ca as M, c9 as V, bU as E, bV as W, a_ as z, c0 as B, bR as G, bn as Y, b6 as Z, c8 as _, cf as $, b$ as q, bW as H, aI as K, bY as Q, aJ as J, bX as X, bZ as ee, b_ as te, c4 as re, bl as se, c2 as ae, c1 as oe, bS as ne, c3 as ie, bT as le, cg as ce, bK as me, c5 as ge, aT as ue, aZ as pe, ci as he, c6 as de, _ as fe, c7 as ye, aH as Se, ce as be, ch as xe } from "./ShortcutLinksContext-CVJd0L8d.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@azure/msal-browser";
|
|
5
5
|
import "@azure/msal-react";
|
|
@@ -7,31 +7,57 @@ import "react-router-dom";
|
|
|
7
7
|
import "react-dom";
|
|
8
8
|
import "react-hook-form";
|
|
9
9
|
import "react-flexmonster";
|
|
10
|
-
import { d as
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
}, N = (e,
|
|
15
|
-
let r = !1,
|
|
16
|
-
e[0] === "#" && (
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
return (r ? "#" : "") +
|
|
21
|
-
},
|
|
22
|
-
const
|
|
23
|
-
for (let
|
|
24
|
-
r.push(
|
|
10
|
+
import { d as we, g as De, h as Oe, a as ve, l as Ne, r as ke } from "./localStorageUtils-8ScvouMK.js";
|
|
11
|
+
const D = ({ cell: { value: e } }) => /* @__PURE__ */ n.jsx(p, { text: e, placement: "bottom", children: /* @__PURE__ */ n.jsx("div", { className: "w-100 text-truncate", children: e }) }), O = ({ cell: { value: e } }) => /* @__PURE__ */ n.jsx(n.Fragment, { children: e == null ? void 0 : e.toLocaleString("cs-CZ") }), v = ({ cell: { value: e } }) => {
|
|
12
|
+
const t = h(new Date(e), "dd.MM.yyyy");
|
|
13
|
+
return /* @__PURE__ */ n.jsx(n.Fragment, { children: e ? t : "" });
|
|
14
|
+
}, N = (e, t) => {
|
|
15
|
+
let r = !1, i = e;
|
|
16
|
+
e[0] === "#" && (i = e.slice(1), r = !0);
|
|
17
|
+
let s = parseInt(i.substring(0, 2), 16), a = parseInt(i.substring(2, 4), 16), o = parseInt(i.substring(4, 6), 16);
|
|
18
|
+
s += t, a += t, o += t, s > 255 ? s = 255 : s < 0 && (s = 0), a > 255 ? a = 255 : a < 0 && (a = 0), o > 255 ? o = 255 : o < 0 && (o = 0);
|
|
19
|
+
const m = s.toString(16).length === 1 ? "0" + s.toString(16) : s.toString(16), g = a.toString(16).length === 1 ? "0" + a.toString(16) : a.toString(16), u = o.toString(16).length === 1 ? "0" + o.toString(16) : o.toString(16);
|
|
20
|
+
return (r ? "#" : "") + m + g + u;
|
|
21
|
+
}, k = (e) => {
|
|
22
|
+
const t = e.slice(3), r = [];
|
|
23
|
+
for (let s = 0; s < t.length; s += 2)
|
|
24
|
+
r.push(t.slice(s, s + 2));
|
|
25
25
|
return `#${r.reverse().join("")}`;
|
|
26
|
-
},
|
|
27
|
-
let
|
|
26
|
+
}, I = (e) => typeof e.directoryName == "string" && typeof e.directoryPath == "string" && typeof e.directoryTranslationKey == "string" && Array.isArray(e.files), P = async (e) => {
|
|
27
|
+
let t = { status: "pending" };
|
|
28
28
|
try {
|
|
29
|
-
|
|
29
|
+
t = { status: "success", data: (await e).data };
|
|
30
30
|
} catch (r) {
|
|
31
|
-
|
|
31
|
+
t = { status: "error", error: r };
|
|
32
32
|
}
|
|
33
|
-
return
|
|
34
|
-
},
|
|
33
|
+
return t;
|
|
34
|
+
}, l = () => new URLSearchParams(window.location.search), c = (e) => {
|
|
35
|
+
const t = window.location.pathname + (e.toString() ? `?${e.toString()}` : "") + window.location.hash;
|
|
36
|
+
window.history.replaceState(null, "", t);
|
|
37
|
+
}, T = {
|
|
38
|
+
get length() {
|
|
39
|
+
return Array.from(l().keys()).length;
|
|
40
|
+
},
|
|
41
|
+
key(e) {
|
|
42
|
+
const t = l();
|
|
43
|
+
return Array.from(t.keys())[e] ?? null;
|
|
44
|
+
},
|
|
45
|
+
getItem(e) {
|
|
46
|
+
const r = l().get(e);
|
|
47
|
+
return r ?? null;
|
|
48
|
+
},
|
|
49
|
+
setItem(e, t) {
|
|
50
|
+
const r = l();
|
|
51
|
+
r.set(e, t), c(r);
|
|
52
|
+
},
|
|
53
|
+
removeItem(e) {
|
|
54
|
+
const t = l();
|
|
55
|
+
t.delete(e), c(t);
|
|
56
|
+
},
|
|
57
|
+
clear() {
|
|
58
|
+
c(new URLSearchParams());
|
|
59
|
+
}
|
|
60
|
+
}, L = [
|
|
35
61
|
"edit",
|
|
36
62
|
"delete",
|
|
37
63
|
"info",
|
|
@@ -72,59 +98,60 @@ const F = ({ cell: { value: e } }) => /* @__PURE__ */ i.jsx(g, { text: e, placem
|
|
|
72
98
|
"arrow-right"
|
|
73
99
|
];
|
|
74
100
|
export {
|
|
75
|
-
|
|
101
|
+
L as CommonLuminusIconsArray,
|
|
76
102
|
N as adjustBrightness,
|
|
77
|
-
|
|
103
|
+
A as atobUtf8,
|
|
78
104
|
C as buildEmployeeNameString,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
105
|
+
U as buildOrgUnitString,
|
|
106
|
+
M as buildVehicleNameString,
|
|
107
|
+
V as capitalizeFirstLetter,
|
|
108
|
+
E as compareDate,
|
|
109
|
+
W as compareDateTime,
|
|
110
|
+
v as dateValueFormat,
|
|
111
|
+
we as dumpLocalStorage,
|
|
112
|
+
z as extractErrorsFromResponse,
|
|
113
|
+
B as extractFilename,
|
|
114
|
+
G as extractPermissionsFromResponse,
|
|
115
|
+
Y as fixNameIdNulls,
|
|
116
|
+
Z as formatDate,
|
|
117
|
+
_ as formatDateTime,
|
|
118
|
+
$ as formatFileSize,
|
|
119
|
+
De as generateApiPath,
|
|
120
|
+
q as getDateString,
|
|
121
|
+
H as getDaysDifference,
|
|
122
|
+
K as getFirstDayOfMonth,
|
|
123
|
+
Q as getFirstDayOfOffsetMonth,
|
|
124
|
+
J as getFirstDayOfYear,
|
|
125
|
+
X as getLastDayOfMonth,
|
|
126
|
+
ee as getLastDayOfOffsetMonth,
|
|
127
|
+
te as getLastDayOfYear,
|
|
128
|
+
re as hasOnlyNullValues,
|
|
129
|
+
Oe as hookFormSetNull,
|
|
130
|
+
ve as hookFormSetNulls,
|
|
131
|
+
se as hookFormSetServerErrors,
|
|
132
|
+
ae as isExtensionOpenable,
|
|
133
|
+
oe as isFileOpenable,
|
|
134
|
+
I as isFileStructureDirectory,
|
|
135
|
+
ne as isISODate,
|
|
136
|
+
ie as isPrimitive,
|
|
137
|
+
le as isValidDate,
|
|
138
|
+
ce as joinStrings,
|
|
139
|
+
Ne as limitNumber,
|
|
140
|
+
me as msToStartOfNextDay,
|
|
141
|
+
O as numFormat,
|
|
142
|
+
T as queryStorage,
|
|
143
|
+
ge as replaceNullValuesOnlyObjectsWithNulls,
|
|
144
|
+
P as responsePromiseWrapper,
|
|
145
|
+
ke as restoreLocalStorage,
|
|
146
|
+
ue as saveFile,
|
|
147
|
+
pe as saveFileFromResponse,
|
|
148
|
+
he as shortenText,
|
|
149
|
+
de as stringContains,
|
|
123
150
|
fe as stringSearchWithin,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
151
|
+
ye as stringStartsWith,
|
|
152
|
+
Se as trimIsoDate,
|
|
153
|
+
be as truncateText,
|
|
154
|
+
xe as urlfyArray,
|
|
155
|
+
D as valueTooltip,
|
|
156
|
+
k as vclToHex
|
|
130
157
|
};
|