react-luminus-components 1.5.3 → 1.5.5
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-BPet3cgR.cjs → FormDisabledProvider-6S4xKAVc.cjs} +1 -1
- package/dist/{FormDisabledProvider-aUfGn6S6.js → FormDisabledProvider-CgpUjxI0.js} +1 -1
- package/dist/{ShortcutLinksContext-CH9KdcxB.js → ShortcutLinksContext-CQY8nrGK.js} +2119 -2083
- package/dist/{ShortcutLinksContext-CFDCR0fQ.cjs → ShortcutLinksContext-DG4gWgPW.cjs} +46 -46
- package/dist/components/ShortcutLinks/ShortcutLinksSetup/comps/ShortcutLinkSetupItem/comps/ShortcutLinkItemEdit/ShortcutLinkItemEdit.d.ts +2 -1
- package/dist/components/UserSettings/FileDownloadUS/FileDownloadUS.d.ts +1 -3
- package/dist/components/common/SettingsFormPicker/SettingsFormPicker.d.ts +4 -3
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +5 -5
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +3 -3
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +2 -2
- package/dist/main.cjs.js +31 -31
- package/dist/main.es.js +2344 -2337
- package/dist/models/index.d.ts +1 -1
- package/dist/models/types/dynamicForms/formPickerTypes/SettingsFormGroup.d.ts +1 -1
- package/dist/models/types/dynamicForms/formPickerTypes/SettingsFormItem.d.ts +0 -1
- package/dist/models/types/dynamicForms/formPickerTypes/SettingsFormItemWithGroup.d.ts +6 -0
- package/dist/models/types/dynamicForms/index.d.ts +1 -0
- package/dist/{useLocalStorageState-CAHDOgis.cjs → useLocalStorageState--TbsAeFu.cjs} +1 -1
- package/dist/{useLocalStorageState-C-xR82iw.js → useLocalStorageState-KRZlwyU3.js} +1 -1
- package/dist/utils/file/fileUtils.d.ts +2 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +57 -55
- package/package.json +1 -1
package/dist/models/index.d.ts
CHANGED
|
@@ -86,7 +86,7 @@ export type { default as OnlyAttrExtending } from './types/common/OnlyAttrExtend
|
|
|
86
86
|
export type { default as KeysExtendingType } from './types/common/KeysExtendingType';
|
|
87
87
|
export type { default as ILocalizationContext } from './luminus-context-types/ILocalizationContext';
|
|
88
88
|
export type { default as CommonLuminusIcons } from './luminus-context-types/CommonLuminusIcons';
|
|
89
|
-
export type { DynamicFormFilters, DynamicFormIndexModel, SettingsFormItem, SettingsFormGroup, } from './types/dynamicForms';
|
|
89
|
+
export type { DynamicFormFilters, DynamicFormIndexModel, SettingsFormItem, SettingsFormItemWithGroup, SettingsFormGroup, } from './types/dynamicForms';
|
|
90
90
|
export type { default as DocType } from './api/documents/DocType';
|
|
91
91
|
export type { default as DocumentFileModel } from './api/documents/DocumentFileModel';
|
|
92
92
|
export type { default as DocumentFolderModel } from './api/documents/DocumentFolderModel';
|
|
@@ -5,4 +5,5 @@ export type { default as DynamicFormIndexModel } from './types/DynamicFormIndexM
|
|
|
5
5
|
export type { default as DynamicFormSchemaModel } from './types/DynamicFormSchemaModel';
|
|
6
6
|
export type { ApiDataItemType, DataItemType, ItemValueType, ValueType, KnownDataType, } from './types/DynamicFormValueTypes';
|
|
7
7
|
export type { default as SettingsFormItem } from './formPickerTypes/SettingsFormItem';
|
|
8
|
+
export type { default as SettingsFormItemWithGroup } from './formPickerTypes/SettingsFormItemWithGroup';
|
|
8
9
|
export type { default as SettingsFormGroup } from './formPickerTypes/SettingsFormGroup';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const S=require("./ShortcutLinksContext-
|
|
1
|
+
"use strict";const S=require("./ShortcutLinksContext-DG4gWgPW.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-CQY8nrGK.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";
|
|
@@ -3,6 +3,8 @@ import { AxiosResponse } from 'axios';
|
|
|
3
3
|
|
|
4
4
|
export declare function extractFilename(contentDisposition: string): string | null;
|
|
5
5
|
export declare function saveFile(blob: Blob, fileName: string, tryToOpen?: boolean): void;
|
|
6
|
+
export declare const isFileOpenable: (blob: Blob) => boolean;
|
|
7
|
+
export declare const isExtensionOpenable: (extension: string) => boolean;
|
|
6
8
|
/**
|
|
7
9
|
* @param response that contains the blob data. Make sure it has Access-Control-Allow-Headers: Content-disposition to infer name correctly.
|
|
8
10
|
*/
|
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-DG4gWgPW.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})}),p=({cell:{value:t}})=>e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:t==null?void 0:t.toLocaleString("cs-CZ")}),h=({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},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 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(i){r={status:"error",error:i}}return r},D=["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.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=l.dumpLocalStorage;exports.generateApiPath=l.generateApiPath;exports.limitNumber=l.limitNumber;exports.restoreLocalStorage=l.restoreLocalStorage;exports.CommonLuminusIconsArray=D;exports.adjustBrightness=d;exports.dateValueFormat=h;exports.hookFormSetNull=c;exports.hookFormSetNulls=y;exports.isFileStructureDirectory=F;exports.numFormat=p;exports.responsePromiseWrapper=x;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 g } from "./ShortcutLinksContext-
|
|
2
|
-
import {
|
|
1
|
+
import { j as i, ao as f, U as g } from "./ShortcutLinksContext-CQY8nrGK.js";
|
|
2
|
+
import { cc as C, ca as V, cb as k, c9 as E, c8 as M, bS as A, bT as W, a_ as z, b_ as B, bP as U, c2 as G, b6 as Y, c7 as Z, ce as _, bZ as H, bU as $, aI as q, bW as J, aJ as K, bV as Q, bX as X, bY as ee, c3 as te, bl as se, c0 as re, b$ as ae, bQ as oe, c1 as ie, bR as ne, cf as le, bI as ce, c4 as me, aT as fe, aZ as ge, ch as ue, c5 as pe, _ as de, c6 as he, aH as ye, cd as be, cg as Se } from "./ShortcutLinksContext-CQY8nrGK.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@azure/msal-browser";
|
|
5
5
|
import "@azure/msal-react";
|
|
@@ -7,39 +7,39 @@ 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__ */ i.jsx(i.Fragment, { children:
|
|
14
|
-
}, v = (
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
const l =
|
|
20
|
-
return (
|
|
21
|
-
}, T = (
|
|
22
|
-
const
|
|
23
|
-
for (let
|
|
24
|
-
|
|
25
|
-
return `#${
|
|
10
|
+
import { d as Fe, g as De, l as Oe, r as Ne } from "./localStorageUtils-CHdu9Xvf.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 u(
|
|
28
|
-
|
|
27
|
+
function u(e, t) {
|
|
28
|
+
e.setValue(t, null);
|
|
29
29
|
}
|
|
30
|
-
function I(
|
|
31
|
-
|
|
32
|
-
u(
|
|
30
|
+
function I(e, t) {
|
|
31
|
+
t.forEach((r) => {
|
|
32
|
+
u(e, r);
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
const L = (
|
|
36
|
-
let
|
|
35
|
+
const L = (e) => typeof e.directoryName == "string" && typeof e.directoryPath == "string" && typeof e.directoryTranslationKey == "string" && Array.isArray(e.files), P = async (e) => {
|
|
36
|
+
let t = { status: "pending" };
|
|
37
37
|
try {
|
|
38
|
-
|
|
39
|
-
} catch (
|
|
40
|
-
|
|
38
|
+
t = { status: "success", data: (await e).data };
|
|
39
|
+
} catch (r) {
|
|
40
|
+
t = { status: "error", error: r };
|
|
41
41
|
}
|
|
42
|
-
return
|
|
42
|
+
return t;
|
|
43
43
|
}, R = [
|
|
44
44
|
"edit",
|
|
45
45
|
"delete",
|
|
@@ -84,12 +84,12 @@ export {
|
|
|
84
84
|
C as atobUtf8,
|
|
85
85
|
V as buildEmployeeNameString,
|
|
86
86
|
k as buildOrgUnitString,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
E as buildVehicleNameString,
|
|
88
|
+
M as capitalizeFirstLetter,
|
|
89
|
+
A as compareDate,
|
|
90
90
|
W as compareDateTime,
|
|
91
91
|
N as dateValueFormat,
|
|
92
|
-
|
|
92
|
+
Fe as dumpLocalStorage,
|
|
93
93
|
z as extractErrorsFromResponse,
|
|
94
94
|
B as extractFilename,
|
|
95
95
|
U as extractPermissionsFromResponse,
|
|
@@ -97,7 +97,7 @@ export {
|
|
|
97
97
|
Y as formatDate,
|
|
98
98
|
Z as formatDateTime,
|
|
99
99
|
_ as formatFileSize,
|
|
100
|
-
|
|
100
|
+
De as generateApiPath,
|
|
101
101
|
H as getDateString,
|
|
102
102
|
$ as getDaysDifference,
|
|
103
103
|
q as getFirstDayOfMonth,
|
|
@@ -105,31 +105,33 @@ export {
|
|
|
105
105
|
K as getFirstDayOfYear,
|
|
106
106
|
Q as getLastDayOfMonth,
|
|
107
107
|
X as getLastDayOfOffsetMonth,
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
ee as getLastDayOfYear,
|
|
109
|
+
te as hasOnlyNullValues,
|
|
110
110
|
u as hookFormSetNull,
|
|
111
111
|
I as hookFormSetNulls,
|
|
112
|
-
|
|
112
|
+
se as hookFormSetServerErrors,
|
|
113
|
+
re as isExtensionOpenable,
|
|
114
|
+
ae as isFileOpenable,
|
|
113
115
|
L as isFileStructureDirectory,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
116
|
+
oe as isISODate,
|
|
117
|
+
ie as isPrimitive,
|
|
118
|
+
ne as isValidDate,
|
|
119
|
+
le as joinStrings,
|
|
120
|
+
Oe as limitNumber,
|
|
121
|
+
ce as msToStartOfNextDay,
|
|
120
122
|
O as numFormat,
|
|
121
|
-
|
|
123
|
+
me as replaceNullValuesOnlyObjectsWithNulls,
|
|
122
124
|
P as responsePromiseWrapper,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
125
|
+
Ne as restoreLocalStorage,
|
|
126
|
+
fe as saveFile,
|
|
127
|
+
ge as saveFileFromResponse,
|
|
128
|
+
ue as shortenText,
|
|
129
|
+
pe as stringContains,
|
|
130
|
+
de as stringSearchWithin,
|
|
131
|
+
he as stringStartsWith,
|
|
132
|
+
ye as trimIsoDate,
|
|
133
|
+
be as truncateText,
|
|
134
|
+
Se as urlfyArray,
|
|
135
|
+
D as valueTooltip,
|
|
134
136
|
T as vclToHex
|
|
135
137
|
};
|