react-luminus-components 1.4.28 → 1.4.30
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 +28 -38
- package/dist/{FormDisabledProvider-DPKrSoOT.js → FormDisabledProvider-opFuK5O0.js} +1 -1
- package/dist/{FormDisabledProvider-BxOwA9ho.cjs → FormDisabledProvider-qWyeiGHw.cjs} +1 -1
- package/dist/{ShortcutLinksContext-B9xDvgpv.js → ShortcutLinksContext-BPTX6RWo.js} +1249 -1262
- package/dist/{ShortcutLinksContext-BEQ8oRf-.cjs → ShortcutLinksContext-CUU3mGb2.cjs} +41 -41
- package/dist/components/NotifCenter/Actions/NotificationActions.d.ts +14 -0
- package/dist/components/NotifCenter/Actions/components/ActionTemplates/ActionTemplates.d.ts +14 -0
- package/dist/components/NotifCenter/Actions/components/ActionTemplates/comps/Recipients/NotificationRecipients.d.ts +8 -0
- package/dist/components/NotifCenter/Actions/components/ActionTemplates/comps/index.d.ts +2 -0
- package/dist/components/NotifCenter/Actions/components/ActionTemplates/comps/modals/NotificationTargetModal.d.ts +12 -0
- package/dist/components/NotifCenter/Actions/components/HistoryTable/NotificationHistoryTable.d.ts +9 -0
- package/dist/components/NotifCenter/Actions/components/index.d.ts +2 -0
- package/dist/components/NotifCenter/Users/NotificationUsers.d.ts +9 -0
- package/dist/components/NotifCenter/Users/components/EmployeeNotifTable/EmployeeNotifHistoryTable.d.ts +9 -0
- package/dist/components/NotifCenter/Users/components/index.d.ts +1 -0
- package/dist/components/NotifCenter/index.d.ts +2 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +22 -23
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +9 -10
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +2 -2
- package/dist/main.cjs.js +42 -42
- package/dist/main.d.ts +2 -0
- package/dist/main.es.js +4593 -4368
- package/dist/models/index.d.ts +8 -0
- package/dist/models/texts/ComponentsContextTexts.d.ts +2 -0
- package/dist/models/texts/NotifCentrumTexts.d.ts +14 -0
- package/dist/models/types/notifCenter/NotifTargetModel.d.ts +7 -0
- package/dist/models/types/notifCenter/NotificationHistoryModel.d.ts +11 -0
- package/dist/models/types/notifCenter/NotificationHistoryPersonModel.d.ts +6 -0
- package/dist/models/types/notifCenter/NotificationHistoryUserDto.d.ts +13 -0
- package/dist/models/types/notifCenter/NotificationModel.d.ts +9 -0
- package/dist/models/types/notifCenter/NotificationTarget.d.ts +9 -0
- package/dist/models/types/notifCenter/NotificationTemplate.d.ts +14 -0
- package/dist/useLocalStorageState-CYFiQgNJ.js +74 -0
- package/dist/useLocalStorageState-CzcV0VAi.cjs +1 -0
- package/dist/utils/constants/CommonLuminusIconsArray.d.ts +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +46 -42
- package/package.json +1 -1
- package/dist/useGetApiData-BqL_vkpa.js +0 -61
- package/dist/useGetApiData-DDu4unv_.cjs +0 -1
- package/dist/useLocalStorageState-BFc8Gc8H.cjs +0 -1
- package/dist/useLocalStorageState-Bt99kkCr.js +0 -17
package/dist/models/index.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ export type { default as ErrorBoundaryTexts } from './texts/ErrorBoundaryTexts';
|
|
|
68
68
|
export type { default as ComponentsContextTexts } from './texts/ComponentsContextTexts';
|
|
69
69
|
export type { default as DateTexts } from './texts/DateTexts';
|
|
70
70
|
export type { default as ApprovalTexts } from './texts/ApprovalTexts';
|
|
71
|
+
export type { default as NotifCentrumTexts } from './texts/NotifCentrumTexts';
|
|
71
72
|
export type { default as PromptOptions } from './types/PromptOptions';
|
|
72
73
|
export type { default as UseGetApiDataOptions } from './types/UseGetApiDataOptions';
|
|
73
74
|
export type { default as DropdownPickerOption } from './types/DropdownPickerOption';
|
|
@@ -117,3 +118,10 @@ export type { default as EmployeeSmallModel } from './api/employee/EmployeeSmall
|
|
|
117
118
|
export type { default as ReloadDataWithReturnType } from './types/useGetApiData/ReloadDataWithReturnType';
|
|
118
119
|
export type { default as ReloadDataType } from './types/useGetApiData/ReloadDataType';
|
|
119
120
|
export type { default as AuthToken } from './types/auth/AuthToken';
|
|
121
|
+
export type { default as NotifTargetModel } from './types/notifCenter/NotifTargetModel';
|
|
122
|
+
export type { default as NotificationHistoryModel } from './types/notifCenter/NotificationHistoryModel';
|
|
123
|
+
export type { default as NotificationHistoryPersonModel } from './types/notifCenter/NotificationHistoryPersonModel';
|
|
124
|
+
export type { default as NotificationHistoryUserDto } from './types/notifCenter/NotificationHistoryUserDto';
|
|
125
|
+
export type { default as NotificationModel } from './types/notifCenter/NotificationModel';
|
|
126
|
+
export type { default as NotificationTarget } from './types/notifCenter/NotificationTarget';
|
|
127
|
+
export type { default as NotificationTemplate } from './types/notifCenter/NotificationTemplate';
|
|
@@ -13,6 +13,7 @@ import { default as FormSubmitTexts } from './FormSubmitTexts';
|
|
|
13
13
|
import { default as FormValidationTexts } from './FormValidationTexts';
|
|
14
14
|
import { default as HomeDashboardTexts } from './HomeDashboardTexts';
|
|
15
15
|
import { default as MessageBoardTexts } from './MessageBoardTexts';
|
|
16
|
+
import { default as NotifCentrumTexts } from './NotifCentrumTexts';
|
|
16
17
|
import { default as ReportsTexts } from './ReportsTexts';
|
|
17
18
|
import { default as ShortcutLinkTexts } from './ShortcutLinkTexts';
|
|
18
19
|
import { default as SubstitutionsTexts } from './SubstitutionsTexts';
|
|
@@ -38,5 +39,6 @@ type ComponentsContextTexts = {
|
|
|
38
39
|
container: ContainerTexts;
|
|
39
40
|
substitutions: SubstitutionsTexts;
|
|
40
41
|
approval: ApprovalTexts;
|
|
42
|
+
notifCentrum: NotifCentrumTexts;
|
|
41
43
|
};
|
|
42
44
|
export default ComponentsContextTexts;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type NotifCentrumTexts = {
|
|
2
|
+
confirmTargetDelete: string;
|
|
3
|
+
subject: string;
|
|
4
|
+
recipients: string;
|
|
5
|
+
date: string;
|
|
6
|
+
add: string;
|
|
7
|
+
role: string;
|
|
8
|
+
employee: string;
|
|
9
|
+
kind: string;
|
|
10
|
+
subkind: string;
|
|
11
|
+
noTargets: string;
|
|
12
|
+
addNewTarget: string;
|
|
13
|
+
};
|
|
14
|
+
export default NotifCentrumTexts;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as NotificationHistoryPersonModel } from './NotificationHistoryPersonModel';
|
|
2
|
+
|
|
3
|
+
type NotificationHistoryModel = {
|
|
4
|
+
id: number;
|
|
5
|
+
date: Date;
|
|
6
|
+
subject: string;
|
|
7
|
+
message: string;
|
|
8
|
+
messageAsText: string;
|
|
9
|
+
recipients?: NotificationHistoryPersonModel[];
|
|
10
|
+
};
|
|
11
|
+
export default NotificationHistoryModel;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type NotificationHistoryUserDto = {
|
|
2
|
+
id: number;
|
|
3
|
+
recipientId: number;
|
|
4
|
+
recipientFullName: string;
|
|
5
|
+
actionKindId: number;
|
|
6
|
+
actionKindName: string;
|
|
7
|
+
actionId: number;
|
|
8
|
+
actionName: string;
|
|
9
|
+
date: string;
|
|
10
|
+
subject: string;
|
|
11
|
+
message: string;
|
|
12
|
+
};
|
|
13
|
+
export default NotificationHistoryUserDto;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as NotificationTarget } from './NotificationTarget';
|
|
2
|
+
|
|
3
|
+
type NotificationTemplate = {
|
|
4
|
+
id: number;
|
|
5
|
+
channelId: number;
|
|
6
|
+
destinationId: number;
|
|
7
|
+
kind: string | null;
|
|
8
|
+
outputType: number;
|
|
9
|
+
subjectTemplate: string;
|
|
10
|
+
textTemplate: string;
|
|
11
|
+
styleName: string | null;
|
|
12
|
+
targets: NotificationTarget[];
|
|
13
|
+
};
|
|
14
|
+
export default NotificationTemplate;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { ai as J, b0 as N, aD as E } from "./ShortcutLinksContext-BPTX6RWo.js";
|
|
2
|
+
import { useState as p, useContext as F, useRef as G, useCallback as e, useEffect as O } from "react";
|
|
3
|
+
import "react-router-dom";
|
|
4
|
+
import "react-dom";
|
|
5
|
+
import "react-hook-form";
|
|
6
|
+
import "react-flexmonster";
|
|
7
|
+
import "@azure/msal-browser";
|
|
8
|
+
import "@azure/msal-react";
|
|
9
|
+
const l = {
|
|
10
|
+
loadOnInit: !0,
|
|
11
|
+
silent: !1,
|
|
12
|
+
enabled: !0,
|
|
13
|
+
nullStateBeforeLoad: !0,
|
|
14
|
+
nullStateOnFail: !1
|
|
15
|
+
}, P = (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
|
+
const m = J({ silent: a, customToken: $, differentBaseUrl: s }), [w, S] = p(!1), { startLoading: L, stopLoading: D } = F(N), y = G(0), { isAuthenticated: x } = E(), C = e((o) => {
|
|
17
|
+
L(o), S(() => !0);
|
|
18
|
+
}, [L]), b = e((o) => {
|
|
19
|
+
D(o), S(() => !1);
|
|
20
|
+
}, [D]), [R, d] = p(null), r = e(async (o, I) => {
|
|
21
|
+
if (!x() || n === !1)
|
|
22
|
+
return null;
|
|
23
|
+
!a && C(`loadData-${t}-${I}`), c && d(null);
|
|
24
|
+
let h;
|
|
25
|
+
try {
|
|
26
|
+
const f = await m.get(t, {
|
|
27
|
+
signal: o
|
|
28
|
+
}), A = g ? g(f.data) : f.data;
|
|
29
|
+
d(A), h = A;
|
|
30
|
+
} catch (f) {
|
|
31
|
+
throw u && d(null), f;
|
|
32
|
+
} finally {
|
|
33
|
+
!a && b(`loadData-${t}-${I}`);
|
|
34
|
+
}
|
|
35
|
+
return h;
|
|
36
|
+
}, [
|
|
37
|
+
x,
|
|
38
|
+
n,
|
|
39
|
+
a,
|
|
40
|
+
C,
|
|
41
|
+
t,
|
|
42
|
+
c,
|
|
43
|
+
m,
|
|
44
|
+
g,
|
|
45
|
+
u,
|
|
46
|
+
b
|
|
47
|
+
]), v = e(async () => {
|
|
48
|
+
r();
|
|
49
|
+
}, [r]), B = e(async () => r(), [r]);
|
|
50
|
+
return O(() => {
|
|
51
|
+
if (i === !1)
|
|
52
|
+
return;
|
|
53
|
+
const o = new AbortController();
|
|
54
|
+
return r(o.signal, ++y.current), () => {
|
|
55
|
+
o.abort();
|
|
56
|
+
};
|
|
57
|
+
}, [r, i]), { data: R, setData: d, reloadData: v, isLoading: w, reloadDataWithReturn: B };
|
|
58
|
+
}, Q = (t, i) => {
|
|
59
|
+
const n = e(() => {
|
|
60
|
+
const s = localStorage.getItem(t);
|
|
61
|
+
return s != null && s !== "undefined" ? JSON.parse(s) : i;
|
|
62
|
+
}, [i, t]), [a, c] = p(n);
|
|
63
|
+
O(() => {
|
|
64
|
+
localStorage.setItem(t, JSON.stringify(a));
|
|
65
|
+
}, [t, a]);
|
|
66
|
+
const u = e(() => {
|
|
67
|
+
c(n);
|
|
68
|
+
}, [n]);
|
|
69
|
+
return [a, c, u];
|
|
70
|
+
};
|
|
71
|
+
export {
|
|
72
|
+
Q as a,
|
|
73
|
+
P as u
|
|
74
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const S=require("./ShortcutLinksContext-CUU3mGb2.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,2 +1,2 @@
|
|
|
1
|
-
declare const CommonLuminusIconsArray: readonly ["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"];
|
|
1
|
+
declare const CommonLuminusIconsArray: readonly ["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"];
|
|
2
2
|
export default 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-CUU3mGb2.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 i=e.format(new Date(t),"dd.MM.yyyy");return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:t?i:""})},d=(t,i)=>{let n=!1,a=t;t[0]==="#"&&(a=t.slice(1),n=!0);let r=parseInt(a.substring(0,2),16),o=parseInt(a.substring(2,4),16),s=parseInt(a.substring(4,6),16);r+=i,o+=i,s+=i,r>255?r=255:r<0&&(r=0),o>255?o=255:o<0&&(o=0),s>255?s=255:s<0&&(s=0);const c=r.toString(16).length===1?"0"+r.toString(16):r.toString(16),u=o.toString(16).length===1?"0"+o.toString(16):o.toString(16),g=s.toString(16).length===1?"0"+s.toString(16):s.toString(16);return(n?"#":"")+c+u+g},S=t=>{const i=t.slice(3),n=[];for(let r=0;r<i.length;r+=2)n.push(i.slice(r,r+2));return`#${n.reverse().join("")}`};function m(t,i){t.setValue(i,null)}function F(t,i){i.forEach(n=>{m(t,n)})}const 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"];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=m;exports.hookFormSetNulls=F;exports.numFormat=h;exports.valueTooltip=f;exports.vclToHex=S;
|
package/dist/utils.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as i, aA as f, V as g } from "./ShortcutLinksContext-
|
|
2
|
-
import { cb as I, c9 as k, ca as w, c8 as L, c7 as M, bR as P, bS as E, b4 as z, bZ as A, bO as B, c1 as U, bb as W, c6 as G, cd as Y, bY as H, bT as Z, aT as $, bV as q, aU as Q, bU as X, bW as _, bX as J, c2 as K, bp as
|
|
1
|
+
import { j as i, aA as f, V as g } from "./ShortcutLinksContext-BPTX6RWo.js";
|
|
2
|
+
import { cb as I, c9 as k, ca as w, c8 as L, c7 as M, bR as P, bS as E, b4 as z, bZ as A, bO as B, c1 as U, bb as W, c6 as G, cd as Y, bY as H, bT as Z, aT as $, bV as q, aU as Q, bU as X, bW as _, bX as J, c2 as K, bp as ee, bP as te, c0 as se, bQ as re, ce as ae, bH as oe, b$ as ie, c3 as ne, b_ as le, b3 as ce, cg as me, c4 as fe, a0 as ge, c5 as he, aS as pe, cc as ue, cf as de } from "./ShortcutLinksContext-BPTX6RWo.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@azure/msal-browser";
|
|
5
5
|
import "@azure/msal-react";
|
|
@@ -7,29 +7,29 @@ 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:
|
|
12
|
-
const s = g(new Date(
|
|
13
|
-
return /* @__PURE__ */ i.jsx(i.Fragment, { children:
|
|
14
|
-
},
|
|
15
|
-
let o = !1, n =
|
|
16
|
-
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
const l =
|
|
10
|
+
import { g as Se, l as Fe } 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 s = g(new Date(e), "dd.MM.yyyy");
|
|
13
|
+
return /* @__PURE__ */ i.jsx(i.Fragment, { children: e ? s : "" });
|
|
14
|
+
}, v = (e, s) => {
|
|
15
|
+
let o = !1, n = e;
|
|
16
|
+
e[0] === "#" && (n = e.slice(1), o = !0);
|
|
17
|
+
let t = parseInt(n.substring(0, 2), 16), r = parseInt(n.substring(2, 4), 16), a = parseInt(n.substring(4, 6), 16);
|
|
18
|
+
t += s, r += s, a += s, t > 255 ? t = 255 : t < 0 && (t = 0), r > 255 ? r = 255 : r < 0 && (r = 0), a > 255 ? a = 255 : a < 0 && (a = 0);
|
|
19
|
+
const l = t.toString(16).length === 1 ? "0" + t.toString(16) : t.toString(16), c = r.toString(16).length === 1 ? "0" + r.toString(16) : r.toString(16), m = a.toString(16).length === 1 ? "0" + a.toString(16) : a.toString(16);
|
|
20
20
|
return (o ? "#" : "") + l + c + m;
|
|
21
|
-
},
|
|
22
|
-
const s =
|
|
23
|
-
for (let
|
|
24
|
-
o.push(s.slice(
|
|
21
|
+
}, j = (e) => {
|
|
22
|
+
const s = e.slice(3), o = [];
|
|
23
|
+
for (let t = 0; t < s.length; t += 2)
|
|
24
|
+
o.push(s.slice(t, t + 2));
|
|
25
25
|
return `#${o.reverse().join("")}`;
|
|
26
26
|
};
|
|
27
|
-
function h(
|
|
28
|
-
|
|
27
|
+
function h(e, s) {
|
|
28
|
+
e.setValue(s, null);
|
|
29
29
|
}
|
|
30
|
-
function T(
|
|
30
|
+
function T(e, s) {
|
|
31
31
|
s.forEach((o) => {
|
|
32
|
-
h(
|
|
32
|
+
h(e, o);
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
const R = [
|
|
@@ -60,11 +60,15 @@ const R = [
|
|
|
60
60
|
"resizer-horizontal",
|
|
61
61
|
"qr-code",
|
|
62
62
|
"phone",
|
|
63
|
-
"mail"
|
|
63
|
+
"mail",
|
|
64
|
+
"mail-envelope",
|
|
65
|
+
"dashboard",
|
|
66
|
+
"user",
|
|
67
|
+
"role"
|
|
64
68
|
];
|
|
65
69
|
export {
|
|
66
70
|
R as CommonLuminusIconsArray,
|
|
67
|
-
|
|
71
|
+
v as adjustBrightness,
|
|
68
72
|
I as atobUtf8,
|
|
69
73
|
k as buildEmployeeNameString,
|
|
70
74
|
w as buildOrgUnitString,
|
|
@@ -80,7 +84,7 @@ export {
|
|
|
80
84
|
W as formatDate,
|
|
81
85
|
G as formatDateTime,
|
|
82
86
|
Y as formatFileSize,
|
|
83
|
-
|
|
87
|
+
Se as generateApiPath,
|
|
84
88
|
H as getDateString,
|
|
85
89
|
Z as getDaysDifference,
|
|
86
90
|
$ as getFirstDayOfMonth,
|
|
@@ -92,25 +96,25 @@ export {
|
|
|
92
96
|
K as hasOnlyNullValues,
|
|
93
97
|
h as hookFormSetNull,
|
|
94
98
|
T as hookFormSetNulls,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
ee as hookFormSetServerErrors,
|
|
100
|
+
te as isISODate,
|
|
101
|
+
se as isPrimitive,
|
|
102
|
+
re as isValidDate,
|
|
103
|
+
ae as joinStrings,
|
|
104
|
+
Fe as limitNumber,
|
|
105
|
+
oe as msToStartOfNextDay,
|
|
102
106
|
O as numFormat,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
107
|
+
ie as openFileFromResponse,
|
|
108
|
+
ne as replaceNullValuesOnlyObjectsWithNulls,
|
|
109
|
+
le as saveFile,
|
|
110
|
+
ce as saveFileFromResponse,
|
|
111
|
+
me as shortenText,
|
|
112
|
+
fe as stringContains,
|
|
113
|
+
ge as stringSearchWithin,
|
|
114
|
+
he as stringStartsWith,
|
|
115
|
+
pe as trimIsoDate,
|
|
116
|
+
ue as truncateText,
|
|
117
|
+
de as urlfyArray,
|
|
114
118
|
D as valueTooltip,
|
|
115
|
-
|
|
119
|
+
j as vclToHex
|
|
116
120
|
};
|
package/package.json
CHANGED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { ai as I, b0 as v, aD as E } from "./ShortcutLinksContext-B9xDvgpv.js";
|
|
2
|
-
import { useState as A, useContext as F, useRef as G, useCallback as e, useEffect as U } from "react";
|
|
3
|
-
import "react-router-dom";
|
|
4
|
-
import "react-dom";
|
|
5
|
-
import "react-hook-form";
|
|
6
|
-
import "react-flexmonster";
|
|
7
|
-
import "@azure/msal-browser";
|
|
8
|
-
import "@azure/msal-react";
|
|
9
|
-
const o = {
|
|
10
|
-
loadOnInit: !0,
|
|
11
|
-
silent: !1,
|
|
12
|
-
enabled: !0,
|
|
13
|
-
nullStateBeforeLoad: !0,
|
|
14
|
-
nullStateOnFail: !1
|
|
15
|
-
}, N = (n, { loadOnInit: u = o.loadOnInit, enabled: c = o.enabled, silent: s = o.silent, nullStateBeforeLoad: d = o.nullStateBeforeLoad, nullStateOnFail: f = o.nullStateOnFail, customApiUrl: $, customBearerToken: w, dataTransformer: i } = o) => {
|
|
16
|
-
const p = I({ silent: s, customToken: w, differentBaseUrl: $ }), [O, g] = A(!1), { startLoading: m, stopLoading: D } = F(v), R = G(0), { isAuthenticated: L } = E(), x = e((t) => {
|
|
17
|
-
m(t), g(() => !0);
|
|
18
|
-
}, [m]), C = e((t) => {
|
|
19
|
-
D(t), g(() => !1);
|
|
20
|
-
}, [D]), [S, r] = A(null), a = e(async (t, b) => {
|
|
21
|
-
if (!L() || c === !1)
|
|
22
|
-
return null;
|
|
23
|
-
!s && x(`loadData-${n}-${b}`), d && r(null);
|
|
24
|
-
let h;
|
|
25
|
-
try {
|
|
26
|
-
const l = await p.get(n, {
|
|
27
|
-
signal: t
|
|
28
|
-
}), y = i ? i(l.data) : l.data;
|
|
29
|
-
r(y), h = y;
|
|
30
|
-
} catch (l) {
|
|
31
|
-
throw f && r(null), l;
|
|
32
|
-
} finally {
|
|
33
|
-
!s && C(`loadData-${n}-${b}`);
|
|
34
|
-
}
|
|
35
|
-
return h;
|
|
36
|
-
}, [
|
|
37
|
-
L,
|
|
38
|
-
c,
|
|
39
|
-
s,
|
|
40
|
-
x,
|
|
41
|
-
n,
|
|
42
|
-
d,
|
|
43
|
-
p,
|
|
44
|
-
i,
|
|
45
|
-
f,
|
|
46
|
-
C
|
|
47
|
-
]), k = e(async () => {
|
|
48
|
-
a();
|
|
49
|
-
}, [a]), B = e(async () => a(), [a]);
|
|
50
|
-
return U(() => {
|
|
51
|
-
if (u === !1)
|
|
52
|
-
return;
|
|
53
|
-
const t = new AbortController();
|
|
54
|
-
return a(t.signal, ++R.current), () => {
|
|
55
|
-
t.abort();
|
|
56
|
-
};
|
|
57
|
-
}, [a, u]), { data: S, setData: r, reloadData: k, isLoading: O, reloadDataWithReturn: B };
|
|
58
|
-
};
|
|
59
|
-
export {
|
|
60
|
-
N as u
|
|
61
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const i=require("./ShortcutLinksContext-BEQ8oRf-.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 n={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},G=(s,{loadOnInit:c=n.loadOnInit,enabled:d=n.enabled,silent:o=n.silent,nullStateBeforeLoad:f=n.nullStateBeforeLoad,nullStateOnFail:C=n.nullStateOnFail,customApiUrl:y,customBearerToken:S,dataTransformer:u}=n)=>{const g=i.useAxios({silent:o,customToken:S,differentBaseUrl:y}),[R,L]=t.useState(!1),{startLoading:D,stopLoading:b}=t.useContext(i.LoadingContext),$=t.useRef(0),{isAuthenticated:q}=i.useAuth(),k=t.useCallback(e=>{D(e),L(()=>!0)},[D]),x=t.useCallback(e=>{b(e),L(()=>!1)},[b]),[w,l]=t.useState(null),a=t.useCallback(async(e,h)=>{if(!q()||d===!1)return null;!o&&k(`loadData-${s}-${h}`),f&&l(null);let p;try{const r=await g.get(s,{signal:e}),A=u?u(r.data):r.data;l(A),p=A}catch(r){throw C&&l(null),r}finally{!o&&x(`loadData-${s}-${h}`)}return p},[q,d,o,k,s,f,g,u,C,x]),O=t.useCallback(async()=>{a()},[a]),B=t.useCallback(async()=>a(),[a]);return t.useEffect(()=>{if(c===!1)return;const e=new AbortController;return a(e.signal,++$.current),()=>{e.abort()}},[a,c]),{data:w,setData:l,reloadData:O,isLoading:R,reloadDataWithReturn:B}};exports.useGetApiData=G;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const a=require("react"),l=(t,c)=>{const s=a.useCallback(()=>{const e=localStorage.getItem(t);return e!=null&&e!=="undefined"?JSON.parse(e):c},[c,t]),[o,r]=a.useState(s);a.useEffect(()=>{localStorage.setItem(t,JSON.stringify(o))},[t,o]);const n=a.useCallback(()=>{r(s)},[s]);return[o,r,n]};exports.useLocalStorageState=l;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { useCallback as n, useState as S, useEffect as l } from "react";
|
|
2
|
-
const g = (t, s) => {
|
|
3
|
-
const a = n(() => {
|
|
4
|
-
const e = localStorage.getItem(t);
|
|
5
|
-
return e != null && e !== "undefined" ? JSON.parse(e) : s;
|
|
6
|
-
}, [s, t]), [o, r] = S(a);
|
|
7
|
-
l(() => {
|
|
8
|
-
localStorage.setItem(t, JSON.stringify(o));
|
|
9
|
-
}, [t, o]);
|
|
10
|
-
const c = n(() => {
|
|
11
|
-
r(a);
|
|
12
|
-
}, [a]);
|
|
13
|
-
return [o, r, c];
|
|
14
|
-
};
|
|
15
|
-
export {
|
|
16
|
-
g as u
|
|
17
|
-
};
|