react-luminus-components 1.4.41 → 1.4.42
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/components/Imports/Result/Result.d.ts +1 -1
- package/dist/components/Localization/LocalizationImport/LocalizationImport.d.ts +1 -1
- package/dist/models/index.d.ts +2 -0
- package/dist/models/ui/localization/FileStructureDirectory.d.ts +9 -0
- package/dist/models/ui/localization/FileStructureFile.d.ts +6 -0
- package/dist/utils/apiUtils/apiUtils.d.ts +9 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/localizationUtils/localizationUtils.d.ts +3 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +76 -66
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { default as XlsImportResult } from '../../../models/api/imports/XlsImpor
|
|
|
3
3
|
type Props = {
|
|
4
4
|
result: XlsImportResult;
|
|
5
5
|
onClose?: () => void;
|
|
6
|
-
tableIdentifier:
|
|
6
|
+
tableIdentifier: number;
|
|
7
7
|
BnfTableComponent: React.ElementType;
|
|
8
8
|
};
|
|
9
9
|
declare const Result: ({ result, onClose, tableIdentifier, BnfTableComponent }: Props) => import("react").JSX.Element | null;
|
|
@@ -6,7 +6,7 @@ type LocalizationImportProps = OtherSettingsPageProps & {
|
|
|
6
6
|
readonly id: string;
|
|
7
7
|
readonly name: string;
|
|
8
8
|
}>;
|
|
9
|
-
tableIdentifier:
|
|
9
|
+
tableIdentifier: number;
|
|
10
10
|
SettingsOutlet: React.ElementType;
|
|
11
11
|
BnfTableComponent: React.ElementType;
|
|
12
12
|
importLocalization: (data: {
|
package/dist/models/index.d.ts
CHANGED
|
@@ -124,6 +124,8 @@ export type { default as XlsImportResult } from './api/imports/XlsImportResult';
|
|
|
124
124
|
export type { default as OtherSettingsPageProps } from './ui/imports/OtherSettingsPageProps';
|
|
125
125
|
export type { default as LocalizationUpdateItemModel } from './api/localization/LocalizationUpdateItemModel';
|
|
126
126
|
export type { default as LocalizationUpdateModel } from './api/localization/LocalizationUpdateModel';
|
|
127
|
+
export type { default as FileStructureDirectory } from './ui/localization/FileStructureDirectory';
|
|
128
|
+
export type { default as FileStructureFile } from './ui/localization/FileStructureFile';
|
|
127
129
|
export type { default as WrappedPromise } from './ui/promiseWrapper/WrappedPromise';
|
|
128
130
|
export type { default as AuthToken } from './types/auth/AuthToken';
|
|
129
131
|
export type { default as NotifTargetModel } from './types/notifCenter/NotifTargetModel';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as FileStructureFile } from './FileStructureFile';
|
|
2
|
+
|
|
3
|
+
type FileStructureDirectory = {
|
|
4
|
+
directoryName: string;
|
|
5
|
+
directoryPath: string;
|
|
6
|
+
directoryTranslationKey: string;
|
|
7
|
+
files: Array<FileStructureDirectory | FileStructureFile>;
|
|
8
|
+
};
|
|
9
|
+
export default FileStructureDirectory;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -10,4 +10,6 @@ export * from './search/searchUtils';
|
|
|
10
10
|
export * from './text/string';
|
|
11
11
|
export * from './text/textUtils';
|
|
12
12
|
export * from './route/apiPathUtils';
|
|
13
|
+
export * from './localizationUtils/localizationUtils';
|
|
14
|
+
export * from './apiUtils/apiUtils';
|
|
13
15
|
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("./nivo-bar.es-HlDpK5cq.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
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./nivo-bar.es-HlDpK5cq.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
1
|
import { j as i, aC as f, V as g } from "./nivo-bar.es-1Kl6HG1T.js";
|
|
2
|
-
import { cc as
|
|
2
|
+
import { cc as w, ca as k, cb as L, c9 as M, c8 as A, bS as E, bT as W, bh as z, b_ as B, bP as G, c2 as U, bm as Y, c7 as Z, ce as $, bZ as q, bU as H, ba as K, bW as Q, bb as X, bV as _, bX as J, bY as ee, c3 as te, bv as se, bQ as re, c1 as ae, bR as oe, cf as ie, bI as ne, c0 as le, c4 as ce, b$ as me, bg as fe, ch as ge, c5 as ue, ah as pe, c6 as he, b9 as de, cd as be, cg as ye } from "./nivo-bar.es-1Kl6HG1T.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@azure/msal-browser";
|
|
5
5
|
import "@azure/msal-react";
|
|
@@ -7,32 +7,40 @@ import "react-router-dom";
|
|
|
7
7
|
import "react-dom";
|
|
8
8
|
import "react-hook-form";
|
|
9
9
|
import "react-flexmonster";
|
|
10
|
-
import { g as
|
|
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") }),
|
|
12
|
-
const
|
|
13
|
-
return /* @__PURE__ */ i.jsx(i.Fragment, { children: e ?
|
|
14
|
-
},
|
|
15
|
-
let
|
|
16
|
-
e[0] === "#" && (n = e.slice(1),
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
const l =
|
|
20
|
-
return (
|
|
21
|
-
},
|
|
22
|
-
const
|
|
23
|
-
for (let
|
|
24
|
-
|
|
25
|
-
return `#${
|
|
10
|
+
import { g as Fe, l as xe } from "./apiPathUtils-DiqvB8mF.js";
|
|
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 = g(new Date(e), "dd.MM.yyyy");
|
|
13
|
+
return /* @__PURE__ */ i.jsx(i.Fragment, { children: e ? t : "" });
|
|
14
|
+
}, v = (e, t) => {
|
|
15
|
+
let r = !1, n = e;
|
|
16
|
+
e[0] === "#" && (n = e.slice(1), r = !0);
|
|
17
|
+
let s = parseInt(n.substring(0, 2), 16), a = parseInt(n.substring(2, 4), 16), o = parseInt(n.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 l = s.toString(16).length === 1 ? "0" + s.toString(16) : s.toString(16), c = a.toString(16).length === 1 ? "0" + a.toString(16) : a.toString(16), m = o.toString(16).length === 1 ? "0" + o.toString(16) : o.toString(16);
|
|
20
|
+
return (r ? "#" : "") + l + c + m;
|
|
21
|
+
}, T = (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
|
+
return `#${r.reverse().join("")}`;
|
|
26
26
|
};
|
|
27
|
-
function
|
|
28
|
-
e.setValue(
|
|
27
|
+
function u(e, t) {
|
|
28
|
+
e.setValue(t, null);
|
|
29
29
|
}
|
|
30
|
-
function R(e,
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
function R(e, t) {
|
|
31
|
+
t.forEach((r) => {
|
|
32
|
+
u(e, r);
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
const
|
|
35
|
+
const C = (e) => typeof e.directoryName == "string" && typeof e.directoryPath == "string" && typeof e.directoryTranslationKey == "string" && Array.isArray(e.files), I = async (e) => {
|
|
36
|
+
let t = { status: "pending" };
|
|
37
|
+
try {
|
|
38
|
+
t = { status: "success", data: (await e).data };
|
|
39
|
+
} catch (r) {
|
|
40
|
+
t = { status: "error", error: r };
|
|
41
|
+
}
|
|
42
|
+
return t;
|
|
43
|
+
}, P = [
|
|
36
44
|
"edit",
|
|
37
45
|
"delete",
|
|
38
46
|
"info",
|
|
@@ -71,54 +79,56 @@ const T = [
|
|
|
71
79
|
"minus"
|
|
72
80
|
];
|
|
73
81
|
export {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
82
|
+
P as CommonLuminusIconsArray,
|
|
83
|
+
v as adjustBrightness,
|
|
84
|
+
w as atobUtf8,
|
|
77
85
|
k as buildEmployeeNameString,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
86
|
+
L as buildOrgUnitString,
|
|
87
|
+
M as buildVehicleNameString,
|
|
88
|
+
A as capitalizeFirstLetter,
|
|
89
|
+
E as compareDate,
|
|
90
|
+
W as compareDateTime,
|
|
91
|
+
N as dateValueFormat,
|
|
84
92
|
z as extractErrorsFromResponse,
|
|
85
93
|
B as extractFilename,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
94
|
+
G as extractPermissionsFromResponse,
|
|
95
|
+
U as fixNameIdNulls,
|
|
96
|
+
Y as formatDate,
|
|
97
|
+
Z as formatDateTime,
|
|
98
|
+
$ as formatFileSize,
|
|
99
|
+
Fe as generateApiPath,
|
|
100
|
+
q as getDateString,
|
|
101
|
+
H as getDaysDifference,
|
|
102
|
+
K as getFirstDayOfMonth,
|
|
103
|
+
Q as getFirstDayOfOffsetMonth,
|
|
104
|
+
X as getFirstDayOfYear,
|
|
105
|
+
_ as getLastDayOfMonth,
|
|
106
|
+
J as getLastDayOfOffsetMonth,
|
|
107
|
+
ee as getLastDayOfYear,
|
|
108
|
+
te as hasOnlyNullValues,
|
|
109
|
+
u as hookFormSetNull,
|
|
102
110
|
R as hookFormSetNulls,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
se as hookFormSetServerErrors,
|
|
112
|
+
C as isFileStructureDirectory,
|
|
113
|
+
re as isISODate,
|
|
114
|
+
ae as isPrimitive,
|
|
115
|
+
oe as isValidDate,
|
|
116
|
+
ie as joinStrings,
|
|
117
|
+
xe as limitNumber,
|
|
118
|
+
ne as msToStartOfNextDay,
|
|
110
119
|
O as numFormat,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
120
|
+
le as openFileFromResponse,
|
|
121
|
+
ce as replaceNullValuesOnlyObjectsWithNulls,
|
|
122
|
+
I as responsePromiseWrapper,
|
|
123
|
+
me as saveFile,
|
|
124
|
+
fe as saveFileFromResponse,
|
|
125
|
+
ge as shortenText,
|
|
126
|
+
ue as stringContains,
|
|
127
|
+
pe as stringSearchWithin,
|
|
118
128
|
he as stringStartsWith,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
129
|
+
de as trimIsoDate,
|
|
130
|
+
be as truncateText,
|
|
131
|
+
ye as urlfyArray,
|
|
122
132
|
D as valueTooltip,
|
|
123
|
-
|
|
133
|
+
T as vclToHex
|
|
124
134
|
};
|