react-luminus-components 1.5.1 → 1.5.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 +8 -8
- package/dist/components/UserSettings/LocalStorageBackupUS/CreateBackupModal/CreateBackupModal.d.ts +8 -0
- package/dist/components/UserSettings/LocalStorageBackupUS/LocalStorageBackupUS.d.ts +9 -0
- package/dist/components/UserSettings/index.d.ts +1 -0
- package/dist/localStorageUtils-CHdu9Xvf.js +46 -0
- package/dist/localStorageUtils-DUQHXXBp.cjs +1 -0
- package/dist/main.cjs.js +42 -42
- package/dist/main.es.js +3493 -3437
- package/dist/models/api/localStorageSettings/LocalStorageSettingsModel.d.ts +6 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/texts/UserSettingsTexts.d.ts +13 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/localStorage/localStorageUtils.d.ts +2 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +21 -19
- package/package.json +1 -1
- package/dist/apiPathUtils-CkTRKCPh.cjs +0 -1
- package/dist/apiPathUtils-DiqvB8mF.js +0 -15
package/dist/models/index.d.ts
CHANGED
|
@@ -118,6 +118,7 @@ export type { default as ApprovalPersonModel } from './api/approval/ApprovalPers
|
|
|
118
118
|
export { default as ApprovalState } from './api/approval/ApprovalState';
|
|
119
119
|
export type { default as ApprovalTimelineModel } from './api/approval/ApprovalTimelineModel';
|
|
120
120
|
export type { default as EmployeeSmallModel } from './api/employee/EmployeeSmallModel';
|
|
121
|
+
export type { default as LocalStorageSettingsModel } from './api/localStorageSettings/LocalStorageSettingsModel';
|
|
121
122
|
export type { default as ReloadDataWithReturnType } from './types/useGetApiData/ReloadDataWithReturnType';
|
|
122
123
|
export type { default as ReloadDataType } from './types/useGetApiData/ReloadDataType';
|
|
123
124
|
export type { default as XlsColumnErrorModel } from './api/imports/XlsColumnErrorModel';
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
type UserSettingsTexts = {
|
|
2
2
|
downloads: string;
|
|
3
3
|
tryOpenFileLabel: string;
|
|
4
|
+
localStorage: string;
|
|
5
|
+
localStorageDeleteBackup: string;
|
|
6
|
+
localStorageNoBackups: string;
|
|
7
|
+
localStorageCreateBackup: string;
|
|
8
|
+
localStorageLoadBackup: string;
|
|
9
|
+
localStorageLoadBackupSuccess: string;
|
|
10
|
+
localStorageLoadBackupError: string;
|
|
11
|
+
localStorageDeleteBackupConfirm: string;
|
|
12
|
+
localStorageDeleteBackupSuccess: string;
|
|
13
|
+
localStorageCreateBackupName: string;
|
|
14
|
+
localStorageCreateBackupSave: string;
|
|
15
|
+
localStorageCreateBackupSuccess: string;
|
|
16
|
+
localStorageCreateBackupInfo: (count: number) => string;
|
|
4
17
|
};
|
|
5
18
|
export default UserSettingsTexts;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -12,4 +12,5 @@ export * from './text/textUtils';
|
|
|
12
12
|
export * from './route/apiPathUtils';
|
|
13
13
|
export * from './localizationUtils/localizationUtils';
|
|
14
14
|
export * from './apiUtils/apiUtils';
|
|
15
|
+
export * from './localStorage/localStorageUtils';
|
|
15
16
|
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-CFDCR0fQ.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("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ShortcutLinksContext-CFDCR0fQ.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("./localStorageUtils-DUQHXXBp.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,n=t;t[0]==="#"&&(n=t.slice(1),i=!0);let s=parseInt(n.substring(0,2),16),o=parseInt(n.substring(2,4),16),a=parseInt(n.substring(4,6),16);s+=r,o+=r,a+=r,s>255?s=255:s<0&&(s=0),o>255?o=255:o<0&&(o=0),a>255?a=255:a<0&&(a=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=a.toString(16).length===1?"0"+a.toString(16):a.toString(16);return(i?"#":"")+u+m+g},S=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 y(t,r){r.forEach(i=>{c(t,i)})}const D=t=>typeof t.directoryName=="string"&&typeof t.directoryPath=="string"&&typeof t.directoryTranslationKey=="string"&&Array.isArray(t.files),F=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.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=l.dumpLocalStorage;exports.generateApiPath=l.generateApiPath;exports.limitNumber=l.limitNumber;exports.restoreLocalStorage=l.restoreLocalStorage;exports.CommonLuminusIconsArray=x;exports.adjustBrightness=d;exports.dateValueFormat=p;exports.hookFormSetNull=c;exports.hookFormSetNulls=y;exports.isFileStructureDirectory=D;exports.numFormat=h;exports.responsePromiseWrapper=F;exports.valueTooltip=f;exports.vclToHex=S;
|
package/dist/utils.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as i, ao as f, U as
|
|
2
|
-
import { ca as
|
|
1
|
+
import { j as i, ao as f, U as g } from "./ShortcutLinksContext-CH9KdcxB.js";
|
|
2
|
+
import { ca as C, c8 as V, c9 as k, c7 as M, c6 as A, bS as E, bT as W, a_ as z, b_ as B, bP as U, c0 as G, b6 as Y, c5 as Z, cc as _, bZ as H, bU as $, aI as q, bW as J, aJ as K, bV as Q, bX as X, bY as tt, c1 as et, bl as rt, bQ as st, b$ as at, bR as ot, cd as it, bI as nt, c2 as lt, aT as ct, aZ as mt, cf as ft, c3 as gt, _ as ut, c4 as pt, aH as dt, cb as ht, ce as yt } from "./ShortcutLinksContext-CH9KdcxB.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@azure/msal-browser";
|
|
5
5
|
import "@azure/msal-react";
|
|
@@ -7,9 +7,9 @@ import "react-router-dom";
|
|
|
7
7
|
import "react-dom";
|
|
8
8
|
import "react-hook-form";
|
|
9
9
|
import "react-flexmonster";
|
|
10
|
-
import { g as
|
|
10
|
+
import { d as bt, g as xt, l as Dt, r as Ft } from "./localStorageUtils-CHdu9Xvf.js";
|
|
11
11
|
const F = ({ cell: { value: t } }) => /* @__PURE__ */ i.jsx(f, { 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
|
-
const e =
|
|
12
|
+
const e = g(new Date(t), "dd.MM.yyyy");
|
|
13
13
|
return /* @__PURE__ */ i.jsx(i.Fragment, { children: t ? e : "" });
|
|
14
14
|
}, v = (t, e) => {
|
|
15
15
|
let s = !1, n = t;
|
|
@@ -24,15 +24,15 @@ const F = ({ cell: { value: t } }) => /* @__PURE__ */ i.jsx(f, { text: t, placem
|
|
|
24
24
|
s.push(e.slice(r, r + 2));
|
|
25
25
|
return `#${s.reverse().join("")}`;
|
|
26
26
|
};
|
|
27
|
-
function
|
|
27
|
+
function u(t, e) {
|
|
28
28
|
t.setValue(e, null);
|
|
29
29
|
}
|
|
30
30
|
function I(t, e) {
|
|
31
31
|
e.forEach((s) => {
|
|
32
|
-
|
|
32
|
+
u(t, s);
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
const
|
|
35
|
+
const L = (t) => typeof t.directoryName == "string" && typeof t.directoryPath == "string" && typeof t.directoryTranslationKey == "string" && Array.isArray(t.files), P = async (t) => {
|
|
36
36
|
let e = { status: "pending" };
|
|
37
37
|
try {
|
|
38
38
|
e = { status: "success", data: (await t).data };
|
|
@@ -40,7 +40,7 @@ const P = (t) => typeof t.directoryName == "string" && typeof t.directoryPath ==
|
|
|
40
40
|
e = { status: "error", error: s };
|
|
41
41
|
}
|
|
42
42
|
return e;
|
|
43
|
-
},
|
|
43
|
+
}, R = [
|
|
44
44
|
"edit",
|
|
45
45
|
"delete",
|
|
46
46
|
"info",
|
|
@@ -79,16 +79,17 @@ const P = (t) => typeof t.directoryName == "string" && typeof t.directoryPath ==
|
|
|
79
79
|
"minus"
|
|
80
80
|
];
|
|
81
81
|
export {
|
|
82
|
-
|
|
82
|
+
R as CommonLuminusIconsArray,
|
|
83
83
|
v as adjustBrightness,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
C as atobUtf8,
|
|
85
|
+
V as buildEmployeeNameString,
|
|
86
|
+
k as buildOrgUnitString,
|
|
87
87
|
M as buildVehicleNameString,
|
|
88
88
|
A as capitalizeFirstLetter,
|
|
89
89
|
E as compareDate,
|
|
90
90
|
W as compareDateTime,
|
|
91
91
|
N as dateValueFormat,
|
|
92
|
+
bt as dumpLocalStorage,
|
|
92
93
|
z as extractErrorsFromResponse,
|
|
93
94
|
B as extractFilename,
|
|
94
95
|
U as extractPermissionsFromResponse,
|
|
@@ -96,7 +97,7 @@ export {
|
|
|
96
97
|
Y as formatDate,
|
|
97
98
|
Z as formatDateTime,
|
|
98
99
|
_ as formatFileSize,
|
|
99
|
-
|
|
100
|
+
xt as generateApiPath,
|
|
100
101
|
H as getDateString,
|
|
101
102
|
$ as getDaysDifference,
|
|
102
103
|
q as getFirstDayOfMonth,
|
|
@@ -106,24 +107,25 @@ export {
|
|
|
106
107
|
X as getLastDayOfOffsetMonth,
|
|
107
108
|
tt as getLastDayOfYear,
|
|
108
109
|
et as hasOnlyNullValues,
|
|
109
|
-
|
|
110
|
+
u as hookFormSetNull,
|
|
110
111
|
I as hookFormSetNulls,
|
|
111
112
|
rt as hookFormSetServerErrors,
|
|
112
|
-
|
|
113
|
+
L as isFileStructureDirectory,
|
|
113
114
|
st as isISODate,
|
|
114
115
|
at as isPrimitive,
|
|
115
116
|
ot as isValidDate,
|
|
116
117
|
it as joinStrings,
|
|
117
|
-
|
|
118
|
+
Dt as limitNumber,
|
|
118
119
|
nt as msToStartOfNextDay,
|
|
119
120
|
O as numFormat,
|
|
120
121
|
lt as replaceNullValuesOnlyObjectsWithNulls,
|
|
121
|
-
|
|
122
|
+
P as responsePromiseWrapper,
|
|
123
|
+
Ft as restoreLocalStorage,
|
|
122
124
|
ct as saveFile,
|
|
123
125
|
mt as saveFileFromResponse,
|
|
124
126
|
ft as shortenText,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
+
gt as stringContains,
|
|
128
|
+
ut as stringSearchWithin,
|
|
127
129
|
pt as stringStartsWith,
|
|
128
130
|
dt as trimIsoDate,
|
|
129
131
|
ht as truncateText,
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const h=require("react-router-dom"),c=(i,e,n)=>{let t=i;return e!==void 0&&(t=Math.max(t,e)),n!==void 0&&(t=Math.min(t,n)),t},o=(i,e,n=!0)=>Object.keys(i).reduce((t,u)=>{const r=i[u];return n&&(r==null||r==="")||(t[u]=e(r,u)),t},{}),g=(i,e)=>{const n=e!=null&&e.query?new URLSearchParams(o(e.query,t=>(t==null?void 0:t.toString())??"")):null;return`${h.generatePath(i,e!=null&&e.path?o(e.path,t=>(t==null?void 0:t.toString())??null):void 0)}${n&&n.size>0?`?${n.toString()}`:""}`};exports.generateApiPath=g;exports.limitNumber=c;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { generatePath as h } from "react-router-dom";
|
|
2
|
-
const c = (i, e, n) => {
|
|
3
|
-
let t = i;
|
|
4
|
-
return e !== void 0 && (t = Math.max(t, e)), n !== void 0 && (t = Math.min(t, n)), t;
|
|
5
|
-
}, u = (i, e, n = !0) => Object.keys(i).reduce((t, o) => {
|
|
6
|
-
const r = i[o];
|
|
7
|
-
return n && (r == null || r === "") || (t[o] = e(r, o)), t;
|
|
8
|
-
}, {}), d = (i, e) => {
|
|
9
|
-
const n = e != null && e.query ? new URLSearchParams(u(e.query, (t) => (t == null ? void 0 : t.toString()) ?? "")) : null;
|
|
10
|
-
return `${h(i, e != null && e.path ? u(e.path, (t) => (t == null ? void 0 : t.toString()) ?? null) : void 0)}${n && n.size > 0 ? `?${n.toString()}` : ""}`;
|
|
11
|
-
};
|
|
12
|
-
export {
|
|
13
|
-
d as g,
|
|
14
|
-
c as l
|
|
15
|
-
};
|