wcz-test 6.4.2 → 6.4.4
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/Approval-gLhUz6rw.d.ts +284 -0
- package/dist/FileMeta-CC014fnB.d.ts +18 -0
- package/dist/chunk-4FRZRIAO.js +29 -0
- package/dist/chunk-4FRZRIAO.js.map +1 -0
- package/dist/chunk-4UULRYGW.js +46 -0
- package/dist/chunk-4UULRYGW.js.map +1 -0
- package/dist/chunk-5WRI5ZAA.js +31 -0
- package/dist/chunk-5WRI5ZAA.js.map +1 -0
- package/dist/chunk-BZEEKZFG.js +206 -0
- package/dist/chunk-BZEEKZFG.js.map +1 -0
- package/dist/chunk-GBRG7C6R.js +61 -0
- package/dist/chunk-GBRG7C6R.js.map +1 -0
- package/dist/chunk-TME53DAF.js +20 -0
- package/dist/chunk-TME53DAF.js.map +1 -0
- package/dist/chunk-TVEJZEZT.js +883 -0
- package/dist/chunk-TVEJZEZT.js.map +1 -0
- package/dist/chunk-YHTLF4NN.js +27 -0
- package/dist/chunk-YHTLF4NN.js.map +1 -0
- package/dist/chunk-ZMWQQXZT.js +17 -0
- package/dist/chunk-ZMWQQXZT.js.map +1 -0
- package/dist/components.d.ts +89 -0
- package/dist/components.js +546 -0
- package/dist/components.js.map +1 -0
- package/dist/hooks.d.ts +129 -0
- package/dist/hooks.js +304 -0
- package/dist/hooks.js.map +1 -0
- package/dist/i18next-browser-languagedetector.d.ts +4 -0
- package/dist/i18next-browser-languagedetector.js +8 -0
- package/dist/i18next-browser-languagedetector.js.map +1 -0
- package/dist/i18next.d.ts +2 -0
- package/dist/i18next.js +9 -0
- package/dist/i18next.js.map +1 -0
- package/dist/index.d.ts +4 -3542
- package/dist/index.js +228 -2752
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +161 -0
- package/dist/models.js +249 -0
- package/dist/models.js.map +1 -0
- package/dist/queries.d.ts +1024 -0
- package/dist/queries.js +364 -0
- package/dist/queries.js.map +1 -0
- package/dist/react-i18next.d.ts +1 -0
- package/dist/react-i18next.js +3 -0
- package/dist/react-i18next.js.map +1 -0
- package/dist/utils-DLRiZ02r.d.ts +47 -0
- package/dist/utils.d.ts +2154 -0
- package/dist/utils.js +27 -0
- package/dist/utils.js.map +1 -0
- package/package.json +37 -5
package/dist/index.js
CHANGED
|
@@ -1,28 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
-
mod
|
|
25
|
-
));
|
|
1
|
+
import {
|
|
2
|
+
_extends,
|
|
3
|
+
authClient,
|
|
4
|
+
useGetTheme
|
|
5
|
+
} from "./chunk-TVEJZEZT.js";
|
|
6
|
+
import {
|
|
7
|
+
RouterListItemButton
|
|
8
|
+
} from "./chunk-ZMWQQXZT.js";
|
|
9
|
+
import {
|
|
10
|
+
DialogsContext,
|
|
11
|
+
useDialogs
|
|
12
|
+
} from "./chunk-4UULRYGW.js";
|
|
13
|
+
import {
|
|
14
|
+
clientEnv
|
|
15
|
+
} from "./chunk-YHTLF4NN.js";
|
|
16
|
+
import {
|
|
17
|
+
__commonJS,
|
|
18
|
+
__toESM
|
|
19
|
+
} from "./chunk-5WRI5ZAA.js";
|
|
26
20
|
|
|
27
21
|
// node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js
|
|
28
22
|
var require_react_is_production_min = __commonJS({
|
|
@@ -47,7 +41,7 @@ var require_react_is_production_min = __commonJS({
|
|
|
47
41
|
var w = b ? Symbol.for("react.fundamental") : 60117;
|
|
48
42
|
var x = b ? Symbol.for("react.responder") : 60118;
|
|
49
43
|
var y = b ? Symbol.for("react.scope") : 60119;
|
|
50
|
-
function
|
|
44
|
+
function z2(a) {
|
|
51
45
|
if ("object" === typeof a && null !== a) {
|
|
52
46
|
var u = a.$$typeof;
|
|
53
47
|
switch (u) {
|
|
@@ -78,7 +72,7 @@ var require_react_is_production_min = __commonJS({
|
|
|
78
72
|
}
|
|
79
73
|
}
|
|
80
74
|
function A(a) {
|
|
81
|
-
return
|
|
75
|
+
return z2(a) === m;
|
|
82
76
|
}
|
|
83
77
|
exports.AsyncMode = l;
|
|
84
78
|
exports.ConcurrentMode = m;
|
|
@@ -94,46 +88,46 @@ var require_react_is_production_min = __commonJS({
|
|
|
94
88
|
exports.StrictMode = f;
|
|
95
89
|
exports.Suspense = p;
|
|
96
90
|
exports.isAsyncMode = function(a) {
|
|
97
|
-
return A(a) ||
|
|
91
|
+
return A(a) || z2(a) === l;
|
|
98
92
|
};
|
|
99
93
|
exports.isConcurrentMode = A;
|
|
100
94
|
exports.isContextConsumer = function(a) {
|
|
101
|
-
return
|
|
95
|
+
return z2(a) === k;
|
|
102
96
|
};
|
|
103
97
|
exports.isContextProvider = function(a) {
|
|
104
|
-
return
|
|
98
|
+
return z2(a) === h;
|
|
105
99
|
};
|
|
106
100
|
exports.isElement = function(a) {
|
|
107
101
|
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
108
102
|
};
|
|
109
103
|
exports.isForwardRef = function(a) {
|
|
110
|
-
return
|
|
104
|
+
return z2(a) === n;
|
|
111
105
|
};
|
|
112
106
|
exports.isFragment = function(a) {
|
|
113
|
-
return
|
|
107
|
+
return z2(a) === e;
|
|
114
108
|
};
|
|
115
109
|
exports.isLazy = function(a) {
|
|
116
|
-
return
|
|
110
|
+
return z2(a) === t;
|
|
117
111
|
};
|
|
118
112
|
exports.isMemo = function(a) {
|
|
119
|
-
return
|
|
113
|
+
return z2(a) === r;
|
|
120
114
|
};
|
|
121
115
|
exports.isPortal = function(a) {
|
|
122
|
-
return
|
|
116
|
+
return z2(a) === d;
|
|
123
117
|
};
|
|
124
118
|
exports.isProfiler = function(a) {
|
|
125
|
-
return
|
|
119
|
+
return z2(a) === g;
|
|
126
120
|
};
|
|
127
121
|
exports.isStrictMode = function(a) {
|
|
128
|
-
return
|
|
122
|
+
return z2(a) === f;
|
|
129
123
|
};
|
|
130
124
|
exports.isSuspense = function(a) {
|
|
131
|
-
return
|
|
125
|
+
return z2(a) === p;
|
|
132
126
|
};
|
|
133
127
|
exports.isValidElementType = function(a) {
|
|
134
128
|
return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
|
|
135
129
|
};
|
|
136
|
-
exports.typeOf =
|
|
130
|
+
exports.typeOf = z2;
|
|
137
131
|
}
|
|
138
132
|
});
|
|
139
133
|
|
|
@@ -167,12 +161,12 @@ var require_react_is_development = __commonJS({
|
|
|
167
161
|
return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
168
162
|
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
169
163
|
}
|
|
170
|
-
function typeOf(
|
|
171
|
-
if (typeof
|
|
172
|
-
var $$typeof =
|
|
164
|
+
function typeOf(object) {
|
|
165
|
+
if (typeof object === "object" && object !== null) {
|
|
166
|
+
var $$typeof = object.$$typeof;
|
|
173
167
|
switch ($$typeof) {
|
|
174
168
|
case REACT_ELEMENT_TYPE:
|
|
175
|
-
var type =
|
|
169
|
+
var type = object.type;
|
|
176
170
|
switch (type) {
|
|
177
171
|
case REACT_ASYNC_MODE_TYPE:
|
|
178
172
|
case REACT_CONCURRENT_MODE_TYPE:
|
|
@@ -206,7 +200,7 @@ var require_react_is_development = __commonJS({
|
|
|
206
200
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
207
201
|
var Element = REACT_ELEMENT_TYPE;
|
|
208
202
|
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
209
|
-
var
|
|
203
|
+
var Fragment6 = REACT_FRAGMENT_TYPE;
|
|
210
204
|
var Lazy = REACT_LAZY_TYPE;
|
|
211
205
|
var Memo = REACT_MEMO_TYPE;
|
|
212
206
|
var Portal = REACT_PORTAL_TYPE;
|
|
@@ -214,50 +208,50 @@ var require_react_is_development = __commonJS({
|
|
|
214
208
|
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
215
209
|
var Suspense = REACT_SUSPENSE_TYPE;
|
|
216
210
|
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
217
|
-
function isAsyncMode(
|
|
211
|
+
function isAsyncMode(object) {
|
|
218
212
|
{
|
|
219
213
|
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
220
214
|
hasWarnedAboutDeprecatedIsAsyncMode = true;
|
|
221
215
|
console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
|
|
222
216
|
}
|
|
223
217
|
}
|
|
224
|
-
return isConcurrentMode(
|
|
218
|
+
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
225
219
|
}
|
|
226
|
-
function isConcurrentMode(
|
|
227
|
-
return typeOf(
|
|
220
|
+
function isConcurrentMode(object) {
|
|
221
|
+
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
228
222
|
}
|
|
229
|
-
function isContextConsumer(
|
|
230
|
-
return typeOf(
|
|
223
|
+
function isContextConsumer(object) {
|
|
224
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
231
225
|
}
|
|
232
|
-
function isContextProvider(
|
|
233
|
-
return typeOf(
|
|
226
|
+
function isContextProvider(object) {
|
|
227
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
234
228
|
}
|
|
235
|
-
function isElement(
|
|
236
|
-
return typeof
|
|
229
|
+
function isElement(object) {
|
|
230
|
+
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
237
231
|
}
|
|
238
|
-
function isForwardRef(
|
|
239
|
-
return typeOf(
|
|
232
|
+
function isForwardRef(object) {
|
|
233
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
240
234
|
}
|
|
241
|
-
function isFragment(
|
|
242
|
-
return typeOf(
|
|
235
|
+
function isFragment(object) {
|
|
236
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
243
237
|
}
|
|
244
|
-
function isLazy(
|
|
245
|
-
return typeOf(
|
|
238
|
+
function isLazy(object) {
|
|
239
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
246
240
|
}
|
|
247
|
-
function isMemo(
|
|
248
|
-
return typeOf(
|
|
241
|
+
function isMemo(object) {
|
|
242
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
249
243
|
}
|
|
250
|
-
function isPortal(
|
|
251
|
-
return typeOf(
|
|
244
|
+
function isPortal(object) {
|
|
245
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
252
246
|
}
|
|
253
|
-
function isProfiler(
|
|
254
|
-
return typeOf(
|
|
247
|
+
function isProfiler(object) {
|
|
248
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
255
249
|
}
|
|
256
|
-
function isStrictMode(
|
|
257
|
-
return typeOf(
|
|
250
|
+
function isStrictMode(object) {
|
|
251
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
258
252
|
}
|
|
259
|
-
function isSuspense(
|
|
260
|
-
return typeOf(
|
|
253
|
+
function isSuspense(object) {
|
|
254
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
261
255
|
}
|
|
262
256
|
exports.AsyncMode = AsyncMode;
|
|
263
257
|
exports.ConcurrentMode = ConcurrentMode;
|
|
@@ -265,7 +259,7 @@ var require_react_is_development = __commonJS({
|
|
|
265
259
|
exports.ContextProvider = ContextProvider;
|
|
266
260
|
exports.Element = Element;
|
|
267
261
|
exports.ForwardRef = ForwardRef;
|
|
268
|
-
exports.Fragment =
|
|
262
|
+
exports.Fragment = Fragment6;
|
|
269
263
|
exports.Lazy = Lazy;
|
|
270
264
|
exports.Memo = Memo;
|
|
271
265
|
exports.Portal = Portal;
|
|
@@ -972,857 +966,9 @@ var require_prop_types = __commonJS({
|
|
|
972
966
|
}
|
|
973
967
|
});
|
|
974
968
|
|
|
975
|
-
// src/components/core/TypographyWithIcon.tsx
|
|
976
|
-
import { Stack, Typography } from "@mui/material";
|
|
977
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
978
|
-
var TypographyWithIcon = ({ startIcon, endIcon, children, sx, ...props }) => {
|
|
979
|
-
const iconSx = {
|
|
980
|
-
display: "inline-flex",
|
|
981
|
-
alignItems: "center",
|
|
982
|
-
justifyContent: "center",
|
|
983
|
-
flexShrink: 0,
|
|
984
|
-
lineHeight: 0,
|
|
985
|
-
"& > svg": {
|
|
986
|
-
display: "block"
|
|
987
|
-
}
|
|
988
|
-
};
|
|
989
|
-
return /* @__PURE__ */ jsxs(
|
|
990
|
-
Typography,
|
|
991
|
-
{
|
|
992
|
-
component: "span",
|
|
993
|
-
sx: {
|
|
994
|
-
display: "inline-flex",
|
|
995
|
-
alignItems: "center",
|
|
996
|
-
verticalAlign: "middle",
|
|
997
|
-
...sx
|
|
998
|
-
},
|
|
999
|
-
gap: 1,
|
|
1000
|
-
...props,
|
|
1001
|
-
children: [
|
|
1002
|
-
startIcon && /* @__PURE__ */ jsx(Stack, { component: "span", sx: iconSx, children: startIcon }),
|
|
1003
|
-
/* @__PURE__ */ jsx(Stack, { component: "span", sx: { display: "inline", lineHeight: "inherit" }, children }),
|
|
1004
|
-
endIcon && /* @__PURE__ */ jsx(Stack, { component: "span", sx: iconSx, children: endIcon })
|
|
1005
|
-
]
|
|
1006
|
-
}
|
|
1007
|
-
);
|
|
1008
|
-
};
|
|
1009
|
-
|
|
1010
|
-
// src/components/core/Fullscreen.tsx
|
|
1011
|
-
import { Box } from "@mui/material";
|
|
1012
|
-
import { useEffect, useEffectEvent, useRef, useState } from "react";
|
|
1013
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
1014
|
-
var Fullscreen = ({ children, sx, ...props }) => {
|
|
1015
|
-
const reference = useRef(null);
|
|
1016
|
-
const [height, setHeight] = useState();
|
|
1017
|
-
const recompute = useEffectEvent(() => {
|
|
1018
|
-
if (!reference.current) return;
|
|
1019
|
-
const top = Math.ceil(reference.current.getBoundingClientRect().top);
|
|
1020
|
-
const avail = Math.max(0, window.innerHeight - top);
|
|
1021
|
-
setHeight(avail);
|
|
1022
|
-
});
|
|
1023
|
-
useEffect(() => {
|
|
1024
|
-
const element = reference.current;
|
|
1025
|
-
if (!element) return;
|
|
1026
|
-
recompute();
|
|
1027
|
-
window.addEventListener("resize", recompute);
|
|
1028
|
-
const ro = new ResizeObserver(recompute);
|
|
1029
|
-
ro.observe(document.documentElement);
|
|
1030
|
-
ro.observe(document.body);
|
|
1031
|
-
ro.observe(element);
|
|
1032
|
-
return () => {
|
|
1033
|
-
window.removeEventListener("resize", recompute);
|
|
1034
|
-
ro.disconnect();
|
|
1035
|
-
};
|
|
1036
|
-
}, []);
|
|
1037
|
-
return /* @__PURE__ */ jsx2(
|
|
1038
|
-
Box,
|
|
1039
|
-
{
|
|
1040
|
-
ref: reference,
|
|
1041
|
-
sx: {
|
|
1042
|
-
display: "flex",
|
|
1043
|
-
flexDirection: "column",
|
|
1044
|
-
minHeight: 0,
|
|
1045
|
-
width: "100%",
|
|
1046
|
-
overflow: "auto",
|
|
1047
|
-
...sx
|
|
1048
|
-
},
|
|
1049
|
-
height,
|
|
1050
|
-
...props,
|
|
1051
|
-
children
|
|
1052
|
-
}
|
|
1053
|
-
);
|
|
1054
|
-
};
|
|
1055
|
-
|
|
1056
|
-
// src/components/file/Dropzone.tsx
|
|
1057
|
-
import CloudUpload from "@mui/icons-material/CloudUpload";
|
|
1058
|
-
import { Paper, Typography as Typography2, useTheme } from "@mui/material";
|
|
1059
|
-
import { useDropzone } from "react-dropzone";
|
|
1060
|
-
import { useTranslation } from "react-i18next";
|
|
1061
|
-
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1062
|
-
var baseStyle = {
|
|
1063
|
-
flex: 1,
|
|
1064
|
-
display: "flex",
|
|
1065
|
-
flexDirection: "column",
|
|
1066
|
-
alignItems: "center",
|
|
1067
|
-
padding: "20px",
|
|
1068
|
-
borderWidth: 2,
|
|
1069
|
-
borderRadius: 2,
|
|
1070
|
-
borderStyle: "dashed",
|
|
1071
|
-
outline: "none",
|
|
1072
|
-
transition: "border .24s ease-in-out",
|
|
1073
|
-
cursor: "pointer"
|
|
1074
|
-
};
|
|
1075
|
-
var Dropzone = ({ sx, ...props }) => {
|
|
1076
|
-
const { getRootProps, getInputProps, isFocused, isDragAccept, isDragReject } = useDropzone(props);
|
|
1077
|
-
const { t } = useTranslation();
|
|
1078
|
-
const theme = useTheme();
|
|
1079
|
-
const style = {
|
|
1080
|
-
...baseStyle,
|
|
1081
|
-
...isFocused ? { borderColor: theme.palette.primary.main } : {},
|
|
1082
|
-
...isDragAccept ? { borderColor: theme.palette.success.main } : {},
|
|
1083
|
-
...isDragReject ? { borderColor: theme.palette.error.main } : {}
|
|
1084
|
-
};
|
|
1085
|
-
return /* @__PURE__ */ jsxs2(Paper, { variant: "outlined", ...getRootProps({ style }), sx, children: [
|
|
1086
|
-
/* @__PURE__ */ jsx3("input", { ...getInputProps(), style: { display: "none" } }),
|
|
1087
|
-
/* @__PURE__ */ jsx3(CloudUpload, {}),
|
|
1088
|
-
/* @__PURE__ */ jsx3(Typography2, { children: t("Layout.File.DragSomeFilesHereOrClickToSelectThem") })
|
|
1089
|
-
] });
|
|
1090
|
-
};
|
|
1091
|
-
|
|
1092
|
-
// src/components/file/FileViewer.tsx
|
|
1093
|
-
import { useState as useState5 } from "react";
|
|
1094
|
-
|
|
1095
|
-
// src/components/file/fileViewer/FileViewerGrid.tsx
|
|
1096
|
-
import MoreVert from "@mui/icons-material/MoreVert";
|
|
1097
|
-
import { Box as Box2, IconButton, ImageListItem, ImageListItemBar, Stack as Stack2, Tooltip } from "@mui/material";
|
|
1098
|
-
import { grey } from "@mui/material/colors";
|
|
1099
|
-
import { Fragment, useEffect as useEffect2, useState as useState3 } from "react";
|
|
1100
|
-
|
|
1101
|
-
// src/components/file/fileViewer/common/ActionsMenu.tsx
|
|
1102
|
-
import Delete from "@mui/icons-material/Delete";
|
|
1103
|
-
import FileDownload from "@mui/icons-material/FileDownload";
|
|
1104
|
-
import { List, ListItemButton, ListItemIcon, ListItemText, Menu } from "@mui/material";
|
|
1105
|
-
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
1106
|
-
|
|
1107
|
-
// src/contexts/FileContext.ts
|
|
1108
|
-
import { createContext, useContext } from "react";
|
|
1109
|
-
var FileContext = createContext(null);
|
|
1110
|
-
var useFile = () => {
|
|
1111
|
-
const context = useContext(FileContext);
|
|
1112
|
-
if (!context) {
|
|
1113
|
-
throw new Error("FileViewer components must be used within FileViewer");
|
|
1114
|
-
}
|
|
1115
|
-
return context;
|
|
1116
|
-
};
|
|
1117
|
-
|
|
1118
|
-
// src/hooks/DialogsHooks.tsx
|
|
1119
|
-
import { Button, Dialog, DialogActions, DialogContent, DialogTitle, useEventCallback } from "@mui/material";
|
|
1120
|
-
import { useContext as useContext2 } from "react";
|
|
1121
|
-
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
1122
|
-
|
|
1123
|
-
// src/contexts/DialogsContext.ts
|
|
1124
|
-
import { createContext as createContext2 } from "react";
|
|
1125
|
-
var DialogsContext = createContext2({});
|
|
1126
|
-
|
|
1127
|
-
// src/hooks/DialogsHooks.tsx
|
|
1128
|
-
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1129
|
-
function AlertDialog({ open, payload, onClose }) {
|
|
1130
|
-
const { t } = useTranslation2();
|
|
1131
|
-
return /* @__PURE__ */ jsxs3(Dialog, { maxWidth: "xs", fullWidth: true, open, onClose: () => onClose(), disableRestoreFocus: true, children: [
|
|
1132
|
-
/* @__PURE__ */ jsx4(DialogTitle, { children: payload.title ?? t("Layout.Dialog.Alert") }),
|
|
1133
|
-
/* @__PURE__ */ jsx4(DialogContent, { children: payload.message }),
|
|
1134
|
-
/* @__PURE__ */ jsx4(DialogActions, { children: /* @__PURE__ */ jsx4(Button, { onClick: () => onClose(), autoFocus: true, children: t("Layout.Dialog.Confirm") }) })
|
|
1135
|
-
] });
|
|
1136
|
-
}
|
|
1137
|
-
function ConfirmDialog({ open, payload, onClose }) {
|
|
1138
|
-
const { t } = useTranslation2();
|
|
1139
|
-
return /* @__PURE__ */ jsxs3(Dialog, { maxWidth: "xs", fullWidth: true, open, onClose: () => onClose(false), disableRestoreFocus: true, children: [
|
|
1140
|
-
/* @__PURE__ */ jsx4(DialogTitle, { children: payload.title ?? t("Layout.Dialog.Confirm") }),
|
|
1141
|
-
/* @__PURE__ */ jsx4(DialogContent, { children: payload.message }),
|
|
1142
|
-
/* @__PURE__ */ jsxs3(DialogActions, { children: [
|
|
1143
|
-
/* @__PURE__ */ jsx4(Button, { onClick: () => onClose(false), children: payload.cancelText ?? t("Layout.Dialog.Cancel") }),
|
|
1144
|
-
/* @__PURE__ */ jsx4(Button, { onClick: () => onClose(true), autoFocus: true, children: t("Layout.Dialog.Confirm") })
|
|
1145
|
-
] })
|
|
1146
|
-
] });
|
|
1147
|
-
}
|
|
1148
|
-
function useDialogs() {
|
|
1149
|
-
const { open, close } = useContext2(DialogsContext);
|
|
1150
|
-
const alert = useEventCallback(
|
|
1151
|
-
(message, { ...options } = {}) => open(AlertDialog, { ...options, message })
|
|
1152
|
-
);
|
|
1153
|
-
const confirm = useEventCallback(
|
|
1154
|
-
(message, { ...options } = {}) => open(ConfirmDialog, { ...options, message })
|
|
1155
|
-
);
|
|
1156
|
-
return { alert, confirm, open, close };
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
|
-
// src/hooks/FileHooks.ts
|
|
1160
|
-
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
1161
|
-
import saveAs from "file-saver";
|
|
1162
|
-
import { useState as useState2 } from "react";
|
|
1163
|
-
import { Upload as TusUpload } from "tus-js-client";
|
|
1164
|
-
import { uuidv7 } from "uuidv7";
|
|
1165
|
-
import z3 from "zod";
|
|
1166
|
-
|
|
1167
|
-
// src/models/file/FileMeta.ts
|
|
1168
|
-
import * as z from "zod";
|
|
1169
|
-
var FileMetaSchema = z.object({
|
|
1170
|
-
id: z.uuid(),
|
|
1171
|
-
subId: z.uuid(),
|
|
1172
|
-
appName: z.string().trim().min(1).max(255),
|
|
1173
|
-
fileName: z.string().trim().min(1).max(255),
|
|
1174
|
-
fileExtension: z.string().trim().min(1).max(255),
|
|
1175
|
-
fileSize: z.number().min(0),
|
|
1176
|
-
mediaSubType: z.string().trim().min(1).max(255),
|
|
1177
|
-
mediaType: z.string().trim().min(1).max(255),
|
|
1178
|
-
mimeType: z.string().trim().min(1).max(255),
|
|
1179
|
-
createdBy: z.string().trim().min(1).max(255),
|
|
1180
|
-
createdDate: z.date()
|
|
1181
|
-
});
|
|
1182
|
-
|
|
1183
|
-
// src/lib/utils.ts
|
|
1184
|
-
import axios from "axios";
|
|
1185
|
-
|
|
1186
|
-
// src/env.ts
|
|
1187
|
-
import { createEnv } from "@t3-oss/env-core";
|
|
1188
|
-
import { z as z2 } from "zod";
|
|
1189
|
-
var clientEnv = createEnv({
|
|
1190
|
-
clientPrefix: "VITE_",
|
|
1191
|
-
client: {
|
|
1192
|
-
VITE_APP_TITLE: z2.string(),
|
|
1193
|
-
VITE_MUI_LICENSE_KEY: z2.string(),
|
|
1194
|
-
VITE_BASE_URL: z2.url()
|
|
1195
|
-
},
|
|
1196
|
-
runtimeEnv: import.meta.env,
|
|
1197
|
-
emptyStringAsUndefined: true
|
|
1198
|
-
});
|
|
1199
|
-
var serverEnv = createEnv({
|
|
1200
|
-
server: {
|
|
1201
|
-
DATABASE_URL: z2.string(),
|
|
1202
|
-
MICROSOFT_CLIENT_ID: z2.string(),
|
|
1203
|
-
MICROSOFT_CLIENT_SECRET: z2.string()
|
|
1204
|
-
},
|
|
1205
|
-
runtimeEnv: process.env,
|
|
1206
|
-
emptyStringAsUndefined: true
|
|
1207
|
-
});
|
|
1208
|
-
|
|
1209
|
-
// src/lib/utils.ts
|
|
1210
|
-
var Platform = class {
|
|
1211
|
-
static get isAndroid() {
|
|
1212
|
-
return /android/i.test(this.userAgent);
|
|
1213
|
-
}
|
|
1214
|
-
static get isIOS() {
|
|
1215
|
-
return /iPad|iPhone|iPod/.test(this.userAgent);
|
|
1216
|
-
}
|
|
1217
|
-
static get isWindows() {
|
|
1218
|
-
return /windows/i.test(this.userAgent);
|
|
1219
|
-
}
|
|
1220
|
-
static get isMacOS() {
|
|
1221
|
-
return /Macintosh|MacIntel|MacPPC|Mac68K/.test(this.userAgent);
|
|
1222
|
-
}
|
|
1223
|
-
static get userAgent() {
|
|
1224
|
-
return typeof navigator === "undefined" ? "" : navigator.userAgent;
|
|
1225
|
-
}
|
|
1226
|
-
};
|
|
1227
|
-
var rootRouteHead = () => ({
|
|
1228
|
-
meta: [
|
|
1229
|
-
{ charSet: "utf-8" },
|
|
1230
|
-
{ name: "viewport", content: "width=device-width, initial-scale=1" },
|
|
1231
|
-
{ title: clientEnv.VITE_APP_TITLE },
|
|
1232
|
-
{ name: "og:type", content: "website" },
|
|
1233
|
-
{ name: "og:title", content: clientEnv.VITE_APP_TITLE },
|
|
1234
|
-
{ name: "og:image", content: "/favicon-32x32.png" }
|
|
1235
|
-
],
|
|
1236
|
-
links: [
|
|
1237
|
-
{ rel: "apple-touch-icon", sizes: "180x180", href: "/apple-touch-icon.png" },
|
|
1238
|
-
{ rel: "icon", type: "image/png", sizes: "32x32", href: "/favicon-32x32.png" },
|
|
1239
|
-
{ rel: "icon", type: "image/png", sizes: "16x16", href: "/favicon-16x16.png" },
|
|
1240
|
-
{ rel: "icon", href: "/favicon.ico" }
|
|
1241
|
-
]
|
|
1242
|
-
});
|
|
1243
|
-
var httpClient = axios.create({
|
|
1244
|
-
baseURL: clientEnv.VITE_BASE_URL
|
|
1245
|
-
});
|
|
1246
|
-
var getFieldStatus = (field) => {
|
|
1247
|
-
const { meta } = field.state;
|
|
1248
|
-
const isTouched = meta.isTouched;
|
|
1249
|
-
const hasError = !!meta.errors.length;
|
|
1250
|
-
const helperText = meta.errors[0]?.message;
|
|
1251
|
-
return { isTouched, hasError, helperText };
|
|
1252
|
-
};
|
|
1253
|
-
var toKebabCase = (str) => {
|
|
1254
|
-
return str.replaceAll(/([a-z])([A-Z])/g, "$1-$2").replaceAll(/[\s_]+/g, "-").replaceAll(/[^a-zA-Z0-9-]/g, "").toLowerCase().replaceAll(/-+/g, "-").replaceAll(/(^-|-$)/g, "");
|
|
1255
|
-
};
|
|
1256
|
-
|
|
1257
|
-
// src/hooks/FileHooks.ts
|
|
1258
|
-
var QUERY_KEY = "file";
|
|
1259
|
-
var HOUR = 1e3 * 60 * 60;
|
|
1260
|
-
var APP_NAME = toKebabCase(clientEnv.VITE_APP_TITLE);
|
|
1261
|
-
var GetFileMetasParamsSchema = z3.object({
|
|
1262
|
-
appName: z3.string().min(1).max(255).default(APP_NAME).optional(),
|
|
1263
|
-
subId: z3.uuid()
|
|
1264
|
-
});
|
|
1265
|
-
var useGetFileMetas = (params, options) => {
|
|
1266
|
-
const queryParams = new URLSearchParams();
|
|
1267
|
-
queryParams.append("appName", params.appName ?? APP_NAME);
|
|
1268
|
-
queryParams.append("subId", params.subId);
|
|
1269
|
-
return useQuery({
|
|
1270
|
-
...options,
|
|
1271
|
-
queryKey: [QUERY_KEY, "meta", params.appName ?? APP_NAME, params.subId],
|
|
1272
|
-
queryFn: ({ signal }) => httpClient.request({
|
|
1273
|
-
url: `/${QUERY_KEY}/v1/meta?${queryParams.toString()}`,
|
|
1274
|
-
method: "GET",
|
|
1275
|
-
signal
|
|
1276
|
-
}),
|
|
1277
|
-
staleTime: HOUR,
|
|
1278
|
-
gcTime: HOUR,
|
|
1279
|
-
refetchOnWindowFocus: false
|
|
1280
|
-
});
|
|
1281
|
-
};
|
|
1282
|
-
var GetFileThumbnailParamsSchema = z3.object({
|
|
1283
|
-
appName: z3.string().min(1).max(255).default(APP_NAME).optional(),
|
|
1284
|
-
meta: FileMetaSchema
|
|
1285
|
-
});
|
|
1286
|
-
var useGetFileThumbnail = (params, options) => {
|
|
1287
|
-
const queryParams = new URLSearchParams();
|
|
1288
|
-
queryParams.append("appName", params.appName ?? APP_NAME);
|
|
1289
|
-
queryParams.append("id", params.meta.id);
|
|
1290
|
-
return useQuery({
|
|
1291
|
-
...options,
|
|
1292
|
-
queryKey: [QUERY_KEY, "thumbnail", params.appName ?? APP_NAME, params.meta.id],
|
|
1293
|
-
queryFn: ({ signal }) => httpClient.request({
|
|
1294
|
-
url: `/${QUERY_KEY}/v1/thumbnail?${queryParams.toString()}`,
|
|
1295
|
-
method: "GET",
|
|
1296
|
-
signal,
|
|
1297
|
-
responseType: "blob"
|
|
1298
|
-
}),
|
|
1299
|
-
select: (data) => URL.createObjectURL(data),
|
|
1300
|
-
staleTime: HOUR,
|
|
1301
|
-
gcTime: HOUR,
|
|
1302
|
-
refetchOnWindowFocus: false
|
|
1303
|
-
});
|
|
1304
|
-
};
|
|
1305
|
-
var GetFileParamsSchema = z3.object({
|
|
1306
|
-
appName: z3.string().min(1).max(255).default(APP_NAME).optional(),
|
|
1307
|
-
meta: FileMetaSchema
|
|
1308
|
-
});
|
|
1309
|
-
var useGetFile = (params, options) => {
|
|
1310
|
-
const queryParams = new URLSearchParams();
|
|
1311
|
-
queryParams.append("appName", params.appName ?? APP_NAME);
|
|
1312
|
-
queryParams.append("id", params.meta.id);
|
|
1313
|
-
return useQuery({
|
|
1314
|
-
...options,
|
|
1315
|
-
queryKey: [QUERY_KEY, params.appName ?? APP_NAME, params.meta.id],
|
|
1316
|
-
queryFn: ({ signal }) => httpClient.request({
|
|
1317
|
-
url: `/${QUERY_KEY}/v1?${queryParams.toString()}`,
|
|
1318
|
-
method: "GET",
|
|
1319
|
-
signal,
|
|
1320
|
-
responseType: "blob"
|
|
1321
|
-
}),
|
|
1322
|
-
select: (data) => URL.createObjectURL(data),
|
|
1323
|
-
staleTime: HOUR,
|
|
1324
|
-
gcTime: HOUR,
|
|
1325
|
-
refetchOnWindowFocus: false
|
|
1326
|
-
});
|
|
1327
|
-
};
|
|
1328
|
-
var useDownloadFile = (options) => {
|
|
1329
|
-
return useMutation({
|
|
1330
|
-
...options,
|
|
1331
|
-
mutationFn: (meta) => httpClient.request({
|
|
1332
|
-
url: `/${QUERY_KEY}/v1/download?appName=${APP_NAME}&id=${meta.id}`,
|
|
1333
|
-
method: "GET",
|
|
1334
|
-
responseType: "blob"
|
|
1335
|
-
}),
|
|
1336
|
-
onSuccess: (data, variables) => saveAs(data, `${variables.fileName}.${variables.fileExtension}`)
|
|
1337
|
-
});
|
|
1338
|
-
};
|
|
1339
|
-
var useOpenFile = (options) => {
|
|
1340
|
-
return useMutation({
|
|
1341
|
-
...options,
|
|
1342
|
-
mutationFn: (meta) => httpClient.request({
|
|
1343
|
-
url: `/${QUERY_KEY}/v1?appName=${APP_NAME}&id=${meta.id}`,
|
|
1344
|
-
method: "GET",
|
|
1345
|
-
responseType: "blob"
|
|
1346
|
-
}),
|
|
1347
|
-
onSuccess: (data) => {
|
|
1348
|
-
window.open(URL.createObjectURL(data));
|
|
1349
|
-
}
|
|
1350
|
-
});
|
|
1351
|
-
};
|
|
1352
|
-
var useUpdateFileMeta = (options) => {
|
|
1353
|
-
const queryClient = useQueryClient();
|
|
1354
|
-
return useMutation({
|
|
1355
|
-
...options,
|
|
1356
|
-
mutationFn: (meta) => httpClient.request({
|
|
1357
|
-
url: `/${QUERY_KEY}/v1/meta?appName=${APP_NAME}&id=${meta.id}`,
|
|
1358
|
-
method: "PUT",
|
|
1359
|
-
data: meta
|
|
1360
|
-
}),
|
|
1361
|
-
onSettled: () => queryClient.invalidateQueries({ queryKey: [QUERY_KEY, "meta"], exact: false })
|
|
1362
|
-
});
|
|
1363
|
-
};
|
|
1364
|
-
var useDeleteFile = (options) => {
|
|
1365
|
-
const queryClient = useQueryClient();
|
|
1366
|
-
return useMutation({
|
|
1367
|
-
...options,
|
|
1368
|
-
mutationFn: (meta) => httpClient.request({
|
|
1369
|
-
url: `/${QUERY_KEY}/v1?appName=${APP_NAME}&id=${meta.id}`,
|
|
1370
|
-
method: "DELETE"
|
|
1371
|
-
}),
|
|
1372
|
-
onSettled: () => queryClient.invalidateQueries({ queryKey: [QUERY_KEY, "meta"], exact: false })
|
|
1373
|
-
});
|
|
1374
|
-
};
|
|
1375
|
-
var useDeleteFiles = (options) => {
|
|
1376
|
-
const queryClient = useQueryClient();
|
|
1377
|
-
return useMutation({
|
|
1378
|
-
...options,
|
|
1379
|
-
mutationFn: (subId) => httpClient.request({
|
|
1380
|
-
url: `/${QUERY_KEY}/v1?appName=${APP_NAME}&subId=${subId}`,
|
|
1381
|
-
method: "DELETE"
|
|
1382
|
-
}),
|
|
1383
|
-
onSettled: () => queryClient.invalidateQueries({ queryKey: [QUERY_KEY, "meta"], exact: false })
|
|
1384
|
-
});
|
|
1385
|
-
};
|
|
1386
|
-
var useUploadFile = ({ subId, onSuccess, onError }) => {
|
|
1387
|
-
const [progress, setProgress] = useState2(0);
|
|
1388
|
-
const queryClient = useQueryClient();
|
|
1389
|
-
const mutate = async (file) => {
|
|
1390
|
-
if (!subId) throw new Error("subId is required for file upload");
|
|
1391
|
-
const metadata = {
|
|
1392
|
-
id: uuidv7(),
|
|
1393
|
-
appName: APP_NAME,
|
|
1394
|
-
subId,
|
|
1395
|
-
fileName: file.name
|
|
1396
|
-
};
|
|
1397
|
-
const upload = new TusUpload(file, {
|
|
1398
|
-
endpoint: `${clientEnv.VITE_BASE_URL}/${QUERY_KEY}/v1/upload`,
|
|
1399
|
-
chunkSize: 1048576,
|
|
1400
|
-
// 1 MB
|
|
1401
|
-
metadata: {
|
|
1402
|
-
id: metadata.id,
|
|
1403
|
-
appName: metadata.appName,
|
|
1404
|
-
subId: metadata.subId,
|
|
1405
|
-
fileName: metadata.fileName,
|
|
1406
|
-
fileExtension: file.type
|
|
1407
|
-
},
|
|
1408
|
-
// headers: { "Authorization": `Bearer ${await getToken()}` }, //TODO: implement token retrieval
|
|
1409
|
-
onError: (error) => {
|
|
1410
|
-
setProgress(0);
|
|
1411
|
-
onError?.(error);
|
|
1412
|
-
},
|
|
1413
|
-
onProgress: (bytesUploaded, bytesTotal) => {
|
|
1414
|
-
setProgress(bytesUploaded / bytesTotal * 100);
|
|
1415
|
-
},
|
|
1416
|
-
onSuccess: () => {
|
|
1417
|
-
setProgress(0);
|
|
1418
|
-
queryClient.invalidateQueries({ queryKey: [QUERY_KEY, "meta", subId], exact: false });
|
|
1419
|
-
onSuccess?.(metadata);
|
|
1420
|
-
}
|
|
1421
|
-
});
|
|
1422
|
-
const previousUploads = await upload.findPreviousUploads();
|
|
1423
|
-
if (previousUploads.length > 0) {
|
|
1424
|
-
upload.resumeFromPreviousUpload(previousUploads[0]);
|
|
1425
|
-
}
|
|
1426
|
-
upload.start();
|
|
1427
|
-
};
|
|
1428
|
-
return { mutate, progress };
|
|
1429
|
-
};
|
|
1430
|
-
|
|
1431
|
-
// src/components/file/fileViewer/common/ActionsMenu.tsx
|
|
1432
|
-
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1433
|
-
var ActionsMenu = ({ meta, menu, setMenu }) => {
|
|
1434
|
-
const { t } = useTranslation3();
|
|
1435
|
-
const { fileMetas, onDelete, actions } = useFile();
|
|
1436
|
-
const { confirm } = useDialogs();
|
|
1437
|
-
const handleMenuClose = () => {
|
|
1438
|
-
setMenu(null);
|
|
1439
|
-
};
|
|
1440
|
-
const { mutate: download, isPending: isDownloading } = useDownloadFile();
|
|
1441
|
-
const { mutate: deleteFile, isPending: isDeleting } = useDeleteFile();
|
|
1442
|
-
const handleOnDownload = () => {
|
|
1443
|
-
handleMenuClose();
|
|
1444
|
-
download(meta);
|
|
1445
|
-
};
|
|
1446
|
-
const handleOnDelete = async () => {
|
|
1447
|
-
if (!await confirm(t("Layout.File.AreYouSureYouWantToDelete", { fileName: meta.fileName })))
|
|
1448
|
-
return;
|
|
1449
|
-
deleteFile(meta);
|
|
1450
|
-
handleMenuClose();
|
|
1451
|
-
if (onDelete) {
|
|
1452
|
-
const remainingFileMetas = fileMetas.filter((m) => m.id !== meta.id);
|
|
1453
|
-
onDelete({ remainingFileMetas, deletedFileMeta: meta });
|
|
1454
|
-
}
|
|
1455
|
-
};
|
|
1456
|
-
return /* @__PURE__ */ jsx5(
|
|
1457
|
-
Menu,
|
|
1458
|
-
{
|
|
1459
|
-
open: menu !== null,
|
|
1460
|
-
onClose: handleMenuClose,
|
|
1461
|
-
anchorReference: "anchorPosition",
|
|
1462
|
-
variant: "menu",
|
|
1463
|
-
anchorPosition: menu === null ? void 0 : { top: menu.mouseY, left: menu.mouseX },
|
|
1464
|
-
children: /* @__PURE__ */ jsxs4(List, { disablePadding: true, children: [
|
|
1465
|
-
actions?.download !== false && /* @__PURE__ */ jsxs4(ListItemButton, { onClick: handleOnDownload, disabled: isDownloading, children: [
|
|
1466
|
-
/* @__PURE__ */ jsx5(ListItemIcon, { children: /* @__PURE__ */ jsx5(FileDownload, {}) }),
|
|
1467
|
-
/* @__PURE__ */ jsx5(ListItemText, { children: t("Layout.File.Download") })
|
|
1468
|
-
] }),
|
|
1469
|
-
actions?.delete !== false && /* @__PURE__ */ jsxs4(ListItemButton, { onClick: handleOnDelete, disabled: isDeleting, children: [
|
|
1470
|
-
/* @__PURE__ */ jsx5(ListItemIcon, { children: /* @__PURE__ */ jsx5(Delete, {}) }),
|
|
1471
|
-
/* @__PURE__ */ jsx5(ListItemText, { children: t("Layout.File.Delete") })
|
|
1472
|
-
] })
|
|
1473
|
-
] })
|
|
1474
|
-
}
|
|
1475
|
-
);
|
|
1476
|
-
};
|
|
1477
|
-
|
|
1478
|
-
// src/components/file/fileViewer/FileViewerGrid.tsx
|
|
1479
|
-
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1480
|
-
var IMAGE_SIZE = 150;
|
|
1481
|
-
var FileViewerGrid = ({ sx, size, itemBar }) => {
|
|
1482
|
-
const { fileMetas } = useFile();
|
|
1483
|
-
return /* @__PURE__ */ jsx6(Stack2, { direction: "row", spacing: 1, sx: { overflow: "auto", ...sx }, children: fileMetas.map((fileMeta) => /* @__PURE__ */ jsx6(
|
|
1484
|
-
GridFileViewerItem,
|
|
1485
|
-
{
|
|
1486
|
-
meta: fileMeta,
|
|
1487
|
-
size,
|
|
1488
|
-
itemBar
|
|
1489
|
-
},
|
|
1490
|
-
fileMeta.id
|
|
1491
|
-
)) });
|
|
1492
|
-
};
|
|
1493
|
-
var GridFileViewerItem = ({ meta, size, itemBar }) => {
|
|
1494
|
-
const { setImageId, actions } = useFile();
|
|
1495
|
-
const [showItemBar, setShowItemBar] = useState3(itemBar === "always");
|
|
1496
|
-
const [menu, setMenu] = useState3(null);
|
|
1497
|
-
useEffect2(() => {
|
|
1498
|
-
setShowItemBar(itemBar === "always");
|
|
1499
|
-
}, [itemBar]);
|
|
1500
|
-
const { data: source } = useGetFileThumbnail({ meta });
|
|
1501
|
-
const handleOnMouseEnter = () => setShowItemBar(true);
|
|
1502
|
-
const handleOnMouseLeave = () => itemBar !== "always" && setShowItemBar(false);
|
|
1503
|
-
const openMenu = (event) => {
|
|
1504
|
-
setMenu(menu === null ? { mouseX: event.clientX, mouseY: event.clientY } : null);
|
|
1505
|
-
setTimeout(() => setShowItemBar(true));
|
|
1506
|
-
};
|
|
1507
|
-
const { mutate: openFile } = useOpenFile();
|
|
1508
|
-
const { mutate: download } = useDownloadFile();
|
|
1509
|
-
const onClick = () => {
|
|
1510
|
-
switch (meta.mediaType) {
|
|
1511
|
-
case "image": {
|
|
1512
|
-
return setImageId(meta.id);
|
|
1513
|
-
}
|
|
1514
|
-
case "application": {
|
|
1515
|
-
return openFile(meta);
|
|
1516
|
-
}
|
|
1517
|
-
case "video": {
|
|
1518
|
-
return openFile(meta);
|
|
1519
|
-
}
|
|
1520
|
-
default: {
|
|
1521
|
-
return download(meta);
|
|
1522
|
-
}
|
|
1523
|
-
}
|
|
1524
|
-
};
|
|
1525
|
-
return /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
1526
|
-
/* @__PURE__ */ jsxs5(ImageListItem, { sx: { width: size ?? IMAGE_SIZE, height: size ?? IMAGE_SIZE }, onMouseEnter: handleOnMouseEnter, onMouseLeave: handleOnMouseLeave, children: [
|
|
1527
|
-
/* @__PURE__ */ jsx6(
|
|
1528
|
-
Box2,
|
|
1529
|
-
{
|
|
1530
|
-
component: "img",
|
|
1531
|
-
src: source,
|
|
1532
|
-
loading: "lazy",
|
|
1533
|
-
alt: "thumbnail-" + meta.id,
|
|
1534
|
-
onClick,
|
|
1535
|
-
sx: { cursor: "pointer", objectFit: "contain", width: size ?? IMAGE_SIZE, height: size ?? IMAGE_SIZE }
|
|
1536
|
-
}
|
|
1537
|
-
),
|
|
1538
|
-
itemBar !== "hidden" && showItemBar && /* @__PURE__ */ jsx6(
|
|
1539
|
-
ImageListItemBar,
|
|
1540
|
-
{
|
|
1541
|
-
title: /* @__PURE__ */ jsx6(Tooltip, { title: meta.fileName, children: /* @__PURE__ */ jsx6(Box2, { children: meta.fileName }) }),
|
|
1542
|
-
actionIcon: (actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx6(IconButton, { sx: { color: grey[100] }, onClick: openMenu, children: /* @__PURE__ */ jsx6(MoreVert, {}) })
|
|
1543
|
-
}
|
|
1544
|
-
)
|
|
1545
|
-
] }),
|
|
1546
|
-
(actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx6(ActionsMenu, { meta, menu, setMenu })
|
|
1547
|
-
] });
|
|
1548
|
-
};
|
|
1549
|
-
|
|
1550
|
-
// src/components/file/fileViewer/FileViewerList.tsx
|
|
1551
|
-
import AttachFile from "@mui/icons-material/AttachFile";
|
|
1552
|
-
import Image from "@mui/icons-material/Image";
|
|
1553
|
-
import MoreVert2 from "@mui/icons-material/MoreVert";
|
|
1554
|
-
import SmartDisplay from "@mui/icons-material/SmartDisplay";
|
|
1555
|
-
import { IconButton as IconButton2, List as List2, ListItemButton as ListItemButton2, ListItemIcon as ListItemIcon2, ListItemText as ListItemText2 } from "@mui/material";
|
|
1556
|
-
import { Fragment as Fragment2, useState as useState4 } from "react";
|
|
1557
|
-
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1558
|
-
var FileViewerList = ({ sx }) => {
|
|
1559
|
-
const { fileMetas } = useFile();
|
|
1560
|
-
return /* @__PURE__ */ jsx7(List2, { dense: true, sx, children: fileMetas.map(
|
|
1561
|
-
(fileMeta) => /* @__PURE__ */ jsx7(
|
|
1562
|
-
ListFileViewerItem,
|
|
1563
|
-
{
|
|
1564
|
-
meta: fileMeta
|
|
1565
|
-
},
|
|
1566
|
-
fileMeta.id
|
|
1567
|
-
)
|
|
1568
|
-
) });
|
|
1569
|
-
};
|
|
1570
|
-
var ListFileViewerItem = ({ meta }) => {
|
|
1571
|
-
const { setImageId, actions } = useFile();
|
|
1572
|
-
const [menu, setMenu] = useState4(null);
|
|
1573
|
-
const openMenu = (event) => {
|
|
1574
|
-
event.stopPropagation();
|
|
1575
|
-
setMenu(menu === null ? { mouseX: event.clientX, mouseY: event.clientY } : null);
|
|
1576
|
-
};
|
|
1577
|
-
const { mutate: openFile } = useOpenFile();
|
|
1578
|
-
const { mutate: download } = useDownloadFile();
|
|
1579
|
-
const onClick = () => {
|
|
1580
|
-
switch (meta.mediaType) {
|
|
1581
|
-
case "image": {
|
|
1582
|
-
return setImageId(meta.id);
|
|
1583
|
-
}
|
|
1584
|
-
case "application": {
|
|
1585
|
-
return openFile(meta);
|
|
1586
|
-
}
|
|
1587
|
-
case "video": {
|
|
1588
|
-
return openFile(meta);
|
|
1589
|
-
}
|
|
1590
|
-
default: {
|
|
1591
|
-
return download(meta);
|
|
1592
|
-
}
|
|
1593
|
-
}
|
|
1594
|
-
};
|
|
1595
|
-
const icon = () => {
|
|
1596
|
-
switch (meta.mediaType) {
|
|
1597
|
-
case "image": {
|
|
1598
|
-
return /* @__PURE__ */ jsx7(Image, {});
|
|
1599
|
-
}
|
|
1600
|
-
case "video": {
|
|
1601
|
-
return /* @__PURE__ */ jsx7(SmartDisplay, {});
|
|
1602
|
-
}
|
|
1603
|
-
default: {
|
|
1604
|
-
return /* @__PURE__ */ jsx7(AttachFile, {});
|
|
1605
|
-
}
|
|
1606
|
-
}
|
|
1607
|
-
};
|
|
1608
|
-
return /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
1609
|
-
/* @__PURE__ */ jsxs6(ListItemButton2, { onClick, children: [
|
|
1610
|
-
/* @__PURE__ */ jsx7(ListItemIcon2, { children: icon() }),
|
|
1611
|
-
/* @__PURE__ */ jsx7(ListItemText2, { primary: `${meta.fileName}.${meta.fileExtension}` }),
|
|
1612
|
-
(actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx7(IconButton2, { edge: "end", onClick: openMenu, children: /* @__PURE__ */ jsx7(MoreVert2, {}) })
|
|
1613
|
-
] }, meta.id),
|
|
1614
|
-
(actions?.download !== false || actions.delete !== false) && /* @__PURE__ */ jsx7(ActionsMenu, { meta, menu, setMenu })
|
|
1615
|
-
] });
|
|
1616
|
-
};
|
|
1617
|
-
|
|
1618
|
-
// src/components/file/fileViewer/ImageViewer.tsx
|
|
1619
|
-
import Close from "@mui/icons-material/Close";
|
|
1620
|
-
import { Box as Box3, Dialog as Dialog2, Fab } from "@mui/material";
|
|
1621
|
-
import { useEffect as useEffect3 } from "react";
|
|
1622
|
-
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1623
|
-
var ImageViewer = ({ metaId }) => {
|
|
1624
|
-
const { fileMetas, setImageId } = useFile();
|
|
1625
|
-
const meta = fileMetas.find((m) => m.id === metaId);
|
|
1626
|
-
const { data: source } = useGetFile({ meta });
|
|
1627
|
-
useEffect3(() => {
|
|
1628
|
-
if (metaId)
|
|
1629
|
-
globalThis.addEventListener("keydown", handleOnKeydown);
|
|
1630
|
-
return () => {
|
|
1631
|
-
globalThis.removeEventListener("keydown", handleOnKeydown);
|
|
1632
|
-
};
|
|
1633
|
-
}, [metaId]);
|
|
1634
|
-
const handleOnKeydown = (event) => {
|
|
1635
|
-
const images = fileMetas.filter((m) => m.mediaType === "image");
|
|
1636
|
-
const imageIndex = images.findIndex((m) => m.id === metaId);
|
|
1637
|
-
switch (event.key) {
|
|
1638
|
-
case "ArrowLeft": {
|
|
1639
|
-
return handleOnArrowLeft(images, imageIndex);
|
|
1640
|
-
}
|
|
1641
|
-
case "ArrowRight": {
|
|
1642
|
-
return handleOnArrowRight(images, imageIndex);
|
|
1643
|
-
}
|
|
1644
|
-
case "Backspace":
|
|
1645
|
-
case "Escape": {
|
|
1646
|
-
event.preventDefault();
|
|
1647
|
-
return onClose();
|
|
1648
|
-
}
|
|
1649
|
-
}
|
|
1650
|
-
};
|
|
1651
|
-
const handleOnArrowLeft = (images, index) => {
|
|
1652
|
-
if (index > 0) {
|
|
1653
|
-
const previousFile = images[index - 1];
|
|
1654
|
-
setImageId(previousFile.id);
|
|
1655
|
-
}
|
|
1656
|
-
};
|
|
1657
|
-
const handleOnArrowRight = (images, index) => {
|
|
1658
|
-
if (index < images.length - 1) {
|
|
1659
|
-
const nextFile = images[index + 1];
|
|
1660
|
-
setImageId(nextFile.id);
|
|
1661
|
-
}
|
|
1662
|
-
};
|
|
1663
|
-
const onClose = () => setImageId("");
|
|
1664
|
-
if (!metaId) return null;
|
|
1665
|
-
return /* @__PURE__ */ jsxs7(Dialog2, { open: true, onClose, maxWidth: "xl", children: [
|
|
1666
|
-
/* @__PURE__ */ jsx8(Box3, { component: "img", src: source, alt: metaId, sx: { maxWidth: "100vw", maxHeight: { xs: "calc(100vh - 56px)", sm: "calc(100vh - 64px)" } } }),
|
|
1667
|
-
/* @__PURE__ */ jsx8(Fab, { size: "medium", onClick: onClose, sx: { position: "fixed", top: 8, right: 8 }, children: /* @__PURE__ */ jsx8(Close, {}) })
|
|
1668
|
-
] });
|
|
1669
|
-
};
|
|
1670
|
-
|
|
1671
|
-
// src/components/file/FileViewer.tsx
|
|
1672
|
-
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1673
|
-
var FileViewer = ({ subId, onDelete, actions, children }) => {
|
|
1674
|
-
const { data: fileMetas = [] } = useGetFileMetas({ subId }, { enabled: !!subId });
|
|
1675
|
-
const [imageId, setImageId] = useState5("");
|
|
1676
|
-
const components = { Grid: FileViewerGrid, List: FileViewerList };
|
|
1677
|
-
if (fileMetas.length === 0) return null;
|
|
1678
|
-
return /* @__PURE__ */ jsxs8(FileContext.Provider, { value: { fileMetas, onDelete, actions, setImageId }, children: [
|
|
1679
|
-
children(components),
|
|
1680
|
-
/* @__PURE__ */ jsx9(ImageViewer, { metaId: imageId })
|
|
1681
|
-
] });
|
|
1682
|
-
};
|
|
1683
|
-
|
|
1684
|
-
// src/components/data-grid/ChipInputCell.tsx
|
|
1685
|
-
import { Chip, Stack as Stack3 } from "@mui/material";
|
|
1686
|
-
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1687
|
-
var isArray = (value) => Array.isArray(value);
|
|
1688
|
-
var ChipInputCell = ({ params, slotProps, getLabel }) => {
|
|
1689
|
-
if (!params.value) return null;
|
|
1690
|
-
const getLabelValue = (value) => {
|
|
1691
|
-
if (getLabel) return getLabel(value);
|
|
1692
|
-
return value;
|
|
1693
|
-
};
|
|
1694
|
-
if (isArray(params.value))
|
|
1695
|
-
return /* @__PURE__ */ jsx10(Stack3, { direction: "row", alignItems: "center", gap: 1, sx: { overflowX: "auto", height: "100%", width: params.colDef.computedWidth }, children: params.value.map(
|
|
1696
|
-
(value, index) => /* @__PURE__ */ jsx10(Chip, { label: getLabelValue(value), ...slotProps }, `${index + 1}-chip-input-cell`)
|
|
1697
|
-
) });
|
|
1698
|
-
return /* @__PURE__ */ jsx10(Chip, { label: getLabelValue(params.value), ...slotProps });
|
|
1699
|
-
};
|
|
1700
|
-
|
|
1701
|
-
// src/components/data-grid/EditableColumnHeader.tsx
|
|
1702
|
-
import Edit from "@mui/icons-material/Edit";
|
|
1703
|
-
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1704
|
-
var EditableColumnHeader = ({ colDef }) => {
|
|
1705
|
-
return /* @__PURE__ */ jsx11(TypographyWithIcon, { endIcon: /* @__PURE__ */ jsx11(Edit, { color: "disabled", fontSize: "small" }), variant: "body2", className: "MuiDataGrid-columnHeaderTitle", children: colDef.headerName });
|
|
1706
|
-
};
|
|
1707
|
-
|
|
1708
|
-
// src/components/router/RouterButton.tsx
|
|
1709
|
-
import { Button as Button2 } from "@mui/material";
|
|
1710
|
-
import { createLink } from "@tanstack/react-router";
|
|
1711
|
-
import React3 from "react";
|
|
1712
|
-
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1713
|
-
var Component = React3.forwardRef(function ButtonComponent(props, reference) {
|
|
1714
|
-
return /* @__PURE__ */ jsx12(Button2, { ref: reference, component: "a", ...props });
|
|
1715
|
-
});
|
|
1716
|
-
var CreatedComponent = createLink(Component);
|
|
1717
|
-
var RouterButton = (props) => {
|
|
1718
|
-
return /* @__PURE__ */ jsx12(CreatedComponent, { ...props });
|
|
1719
|
-
};
|
|
1720
|
-
|
|
1721
|
-
// src/components/router/RouterGridActionsCellItem.tsx
|
|
1722
|
-
import { GridActionsCellItem } from "@mui/x-data-grid-premium";
|
|
1723
|
-
import { createLink as createLink2 } from "@tanstack/react-router";
|
|
1724
|
-
import React4 from "react";
|
|
1725
|
-
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1726
|
-
var Component2 = React4.forwardRef(
|
|
1727
|
-
function GridActionsCellItemComponent(props, reference) {
|
|
1728
|
-
return /* @__PURE__ */ jsx13(GridActionsCellItem, { ref: reference, component: "a", ...props });
|
|
1729
|
-
}
|
|
1730
|
-
);
|
|
1731
|
-
var CreatedComponent2 = createLink2(Component2);
|
|
1732
|
-
var RouterGridActionsCellItem = (props) => {
|
|
1733
|
-
return /* @__PURE__ */ jsx13(CreatedComponent2, { ...props });
|
|
1734
|
-
};
|
|
1735
|
-
|
|
1736
|
-
// src/components/router/RouterIconButton.tsx
|
|
1737
|
-
import { IconButton as IconButton3 } from "@mui/material";
|
|
1738
|
-
import { createLink as createLink3 } from "@tanstack/react-router";
|
|
1739
|
-
import React5 from "react";
|
|
1740
|
-
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1741
|
-
var Component3 = React5.forwardRef(function IconButtonComponent(props, reference) {
|
|
1742
|
-
return /* @__PURE__ */ jsx14(IconButton3, { ref: reference, component: "a", ...props });
|
|
1743
|
-
});
|
|
1744
|
-
var CreatedComponent3 = createLink3(Component3);
|
|
1745
|
-
var RouterIconButton = (props) => {
|
|
1746
|
-
return /* @__PURE__ */ jsx14(CreatedComponent3, { ...props });
|
|
1747
|
-
};
|
|
1748
|
-
|
|
1749
|
-
// src/components/router/RouterLink.tsx
|
|
1750
|
-
import { Link } from "@mui/material";
|
|
1751
|
-
import { createLink as createLink4 } from "@tanstack/react-router";
|
|
1752
|
-
import React6 from "react";
|
|
1753
|
-
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1754
|
-
var Component4 = React6.forwardRef(function LinkComponent(props, reference) {
|
|
1755
|
-
return /* @__PURE__ */ jsx15(Link, { ref: reference, ...props });
|
|
1756
|
-
});
|
|
1757
|
-
var CreatedComponent4 = createLink4(Component4);
|
|
1758
|
-
var RouterLink = (props) => {
|
|
1759
|
-
return /* @__PURE__ */ jsx15(CreatedComponent4, { ...props });
|
|
1760
|
-
};
|
|
1761
|
-
|
|
1762
|
-
// src/components/router/RouterTab.tsx
|
|
1763
|
-
import { Tab } from "@mui/material";
|
|
1764
|
-
import { createLink as createLink5 } from "@tanstack/react-router";
|
|
1765
|
-
import React7 from "react";
|
|
1766
|
-
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1767
|
-
var Component5 = React7.forwardRef(function TabComponent(props, reference) {
|
|
1768
|
-
return /* @__PURE__ */ jsx16(Tab, { ref: reference, component: "a", ...props });
|
|
1769
|
-
});
|
|
1770
|
-
var CreatedComponent5 = createLink5(Component5);
|
|
1771
|
-
var RouterTab = (props) => {
|
|
1772
|
-
return /* @__PURE__ */ jsx16(CreatedComponent5, { ...props });
|
|
1773
|
-
};
|
|
1774
|
-
|
|
1775
|
-
// src/components/router/RouterListItemButton.tsx
|
|
1776
|
-
import { ListItemButton as ListItemButton3 } from "@mui/material";
|
|
1777
|
-
import { createLink as createLink6 } from "@tanstack/react-router";
|
|
1778
|
-
import React8 from "react";
|
|
1779
|
-
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1780
|
-
var Component6 = React8.forwardRef(function ButtonComponent2(props, reference) {
|
|
1781
|
-
return /* @__PURE__ */ jsx17(ListItemButton3, { ref: reference, component: "a", ...props });
|
|
1782
|
-
});
|
|
1783
|
-
var CreatedComponent6 = createLink6(Component6);
|
|
1784
|
-
var RouterListItemButton = (props) => {
|
|
1785
|
-
return /* @__PURE__ */ jsx17(CreatedComponent6, { ...props });
|
|
1786
|
-
};
|
|
1787
|
-
|
|
1788
|
-
// src/components/router/RouterNotFound.tsx
|
|
1789
|
-
import { Box as Box4, Divider, Typography as Typography3 } from "@mui/material";
|
|
1790
|
-
import { useTranslation as useTranslation4 } from "react-i18next";
|
|
1791
|
-
import { jsx as jsx18, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1792
|
-
function RouterNotFound() {
|
|
1793
|
-
const { t } = useTranslation4();
|
|
1794
|
-
return /* @__PURE__ */ jsx18(Box4, { height: "100vh", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", textAlign: "center", px: 2, children: /* @__PURE__ */ jsxs9(Box4, { display: "flex", alignItems: "center", mb: 4, children: [
|
|
1795
|
-
/* @__PURE__ */ jsx18(Typography3, { variant: "h3", component: "span", fontWeight: 500, sx: { lineHeight: 1 }, children: "404" }),
|
|
1796
|
-
/* @__PURE__ */ jsx18(Divider, { orientation: "vertical", flexItem: true, sx: { mx: 3 } }),
|
|
1797
|
-
/* @__PURE__ */ jsx18(Typography3, { variant: "h5", component: "span", children: t("Layout.ThisPageCouldNotBeFound") })
|
|
1798
|
-
] }) });
|
|
1799
|
-
}
|
|
1800
|
-
|
|
1801
|
-
// src/components/router/RouterError.tsx
|
|
1802
|
-
import { Box as Box5, Divider as Divider2, Typography as Typography4 } from "@mui/material";
|
|
1803
|
-
import { jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1804
|
-
var RouterError = ({ error }) => {
|
|
1805
|
-
return /* @__PURE__ */ jsx19(Box5, { height: "100vh", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", textAlign: "center", px: 2, children: /* @__PURE__ */ jsxs10(Box5, { display: "flex", alignItems: "center", mb: 4, children: [
|
|
1806
|
-
/* @__PURE__ */ jsx19(Typography4, { variant: "h3", component: "span", fontWeight: 500, sx: { lineHeight: 1 }, children: error.name || "500" }),
|
|
1807
|
-
/* @__PURE__ */ jsx19(Divider2, { orientation: "vertical", flexItem: true, sx: { mx: 3 } }),
|
|
1808
|
-
/* @__PURE__ */ jsx19(Typography4, { variant: "h5", component: "span", children: error.message })
|
|
1809
|
-
] }) });
|
|
1810
|
-
};
|
|
1811
|
-
|
|
1812
969
|
// src/providers/LayoutProvider.tsx
|
|
1813
970
|
import { ThemeProvider } from "@mui/material";
|
|
1814
971
|
|
|
1815
|
-
// node_modules/@babel/runtime/helpers/esm/extends.js
|
|
1816
|
-
function _extends() {
|
|
1817
|
-
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
1818
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
1819
|
-
var t = arguments[e];
|
|
1820
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
1821
|
-
}
|
|
1822
|
-
return n;
|
|
1823
|
-
}, _extends.apply(null, arguments);
|
|
1824
|
-
}
|
|
1825
|
-
|
|
1826
972
|
// node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
|
1827
973
|
function _objectWithoutPropertiesLoose(r, e) {
|
|
1828
974
|
if (null == r) return {};
|
|
@@ -1834,97 +980,13 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
1834
980
|
return t;
|
|
1835
981
|
}
|
|
1836
982
|
|
|
1837
|
-
// node_modules/@mui/x-date-pickers/esm/locales/utils/getPickersLocalization.js
|
|
1838
|
-
var getPickersLocalization = (pickersTranslations) => {
|
|
1839
|
-
return {
|
|
1840
|
-
components: {
|
|
1841
|
-
MuiLocalizationProvider: {
|
|
1842
|
-
defaultProps: {
|
|
1843
|
-
localeText: _extends({}, pickersTranslations)
|
|
1844
|
-
}
|
|
1845
|
-
}
|
|
1846
|
-
}
|
|
1847
|
-
};
|
|
1848
|
-
};
|
|
1849
|
-
|
|
1850
|
-
// node_modules/@mui/x-date-pickers/esm/locales/enUS.js
|
|
1851
|
-
var enUSPickers = {
|
|
1852
|
-
// Calendar navigation
|
|
1853
|
-
previousMonth: "Previous month",
|
|
1854
|
-
nextMonth: "Next month",
|
|
1855
|
-
// View navigation
|
|
1856
|
-
openPreviousView: "Open previous view",
|
|
1857
|
-
openNextView: "Open next view",
|
|
1858
|
-
calendarViewSwitchingButtonAriaLabel: (view) => view === "year" ? "year view is open, switch to calendar view" : "calendar view is open, switch to year view",
|
|
1859
|
-
// DateRange labels
|
|
1860
|
-
start: "Start",
|
|
1861
|
-
end: "End",
|
|
1862
|
-
startDate: "Start date",
|
|
1863
|
-
startTime: "Start time",
|
|
1864
|
-
endDate: "End date",
|
|
1865
|
-
endTime: "End time",
|
|
1866
|
-
// Action bar
|
|
1867
|
-
cancelButtonLabel: "Cancel",
|
|
1868
|
-
clearButtonLabel: "Clear",
|
|
1869
|
-
okButtonLabel: "OK",
|
|
1870
|
-
todayButtonLabel: "Today",
|
|
1871
|
-
nextStepButtonLabel: "Next",
|
|
1872
|
-
// Toolbar titles
|
|
1873
|
-
datePickerToolbarTitle: "Select date",
|
|
1874
|
-
dateTimePickerToolbarTitle: "Select date & time",
|
|
1875
|
-
timePickerToolbarTitle: "Select time",
|
|
1876
|
-
dateRangePickerToolbarTitle: "Select date range",
|
|
1877
|
-
timeRangePickerToolbarTitle: "Select time range",
|
|
1878
|
-
// Clock labels
|
|
1879
|
-
clockLabelText: (view, formattedTime) => `Select ${view}. ${!formattedTime ? "No time selected" : `Selected time is ${formattedTime}`}`,
|
|
1880
|
-
hoursClockNumberText: (hours) => `${hours} hours`,
|
|
1881
|
-
minutesClockNumberText: (minutes) => `${minutes} minutes`,
|
|
1882
|
-
secondsClockNumberText: (seconds) => `${seconds} seconds`,
|
|
1883
|
-
// Digital clock labels
|
|
1884
|
-
selectViewText: (view) => `Select ${view}`,
|
|
1885
|
-
// Calendar labels
|
|
1886
|
-
calendarWeekNumberHeaderLabel: "Week number",
|
|
1887
|
-
calendarWeekNumberHeaderText: "#",
|
|
1888
|
-
calendarWeekNumberAriaLabelText: (weekNumber) => `Week ${weekNumber}`,
|
|
1889
|
-
calendarWeekNumberText: (weekNumber) => `${weekNumber}`,
|
|
1890
|
-
// Open Picker labels
|
|
1891
|
-
openDatePickerDialogue: (formattedDate) => formattedDate ? `Choose date, selected date is ${formattedDate}` : "Choose date",
|
|
1892
|
-
openTimePickerDialogue: (formattedTime) => formattedTime ? `Choose time, selected time is ${formattedTime}` : "Choose time",
|
|
1893
|
-
openRangePickerDialogue: (formattedRange) => formattedRange ? `Choose range, selected range is ${formattedRange}` : "Choose range",
|
|
1894
|
-
fieldClearLabel: "Clear",
|
|
1895
|
-
// Table labels
|
|
1896
|
-
timeTableLabel: "pick time",
|
|
1897
|
-
dateTableLabel: "pick date",
|
|
1898
|
-
// Field section placeholders
|
|
1899
|
-
fieldYearPlaceholder: (params) => "Y".repeat(params.digitAmount),
|
|
1900
|
-
fieldMonthPlaceholder: (params) => params.contentType === "letter" ? "MMMM" : "MM",
|
|
1901
|
-
fieldDayPlaceholder: () => "DD",
|
|
1902
|
-
fieldWeekDayPlaceholder: (params) => params.contentType === "letter" ? "EEEE" : "EE",
|
|
1903
|
-
fieldHoursPlaceholder: () => "hh",
|
|
1904
|
-
fieldMinutesPlaceholder: () => "mm",
|
|
1905
|
-
fieldSecondsPlaceholder: () => "ss",
|
|
1906
|
-
fieldMeridiemPlaceholder: () => "aa",
|
|
1907
|
-
// View names
|
|
1908
|
-
year: "Year",
|
|
1909
|
-
month: "Month",
|
|
1910
|
-
day: "Day",
|
|
1911
|
-
weekDay: "Week day",
|
|
1912
|
-
hours: "Hours",
|
|
1913
|
-
minutes: "Minutes",
|
|
1914
|
-
seconds: "Seconds",
|
|
1915
|
-
meridiem: "Meridiem",
|
|
1916
|
-
// Common
|
|
1917
|
-
empty: "Empty"
|
|
1918
|
-
};
|
|
1919
|
-
var enUS = getPickersLocalization(enUSPickers);
|
|
1920
|
-
|
|
1921
983
|
// node_modules/@mui/x-date-pickers/esm/LocalizationProvider/LocalizationProvider.js
|
|
1922
984
|
var import_prop_types = __toESM(require_prop_types(), 1);
|
|
1923
|
-
import * as
|
|
985
|
+
import * as React from "react";
|
|
1924
986
|
import { useThemeProps } from "@mui/material/styles";
|
|
1925
987
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1926
988
|
var _excluded = ["localeText"];
|
|
1927
|
-
var PickerAdapterContext = /* @__PURE__ */
|
|
989
|
+
var PickerAdapterContext = /* @__PURE__ */ React.createContext(null);
|
|
1928
990
|
if (process.env.NODE_ENV !== "production") PickerAdapterContext.displayName = "PickerAdapterContext";
|
|
1929
991
|
var LocalizationProvider = function LocalizationProvider2(inProps) {
|
|
1930
992
|
const {
|
|
@@ -1933,7 +995,7 @@ var LocalizationProvider = function LocalizationProvider2(inProps) {
|
|
|
1933
995
|
const {
|
|
1934
996
|
adapter: parentAdapter,
|
|
1935
997
|
localeText: parentLocaleText
|
|
1936
|
-
} =
|
|
998
|
+
} = React.useContext(PickerAdapterContext) ?? {
|
|
1937
999
|
utils: void 0,
|
|
1938
1000
|
adapter: void 0,
|
|
1939
1001
|
localeText: void 0
|
|
@@ -1952,8 +1014,8 @@ var LocalizationProvider = function LocalizationProvider2(inProps) {
|
|
|
1952
1014
|
adapterLocale,
|
|
1953
1015
|
localeText: themeLocaleText
|
|
1954
1016
|
} = props;
|
|
1955
|
-
const localeText =
|
|
1956
|
-
const adapter =
|
|
1017
|
+
const localeText = React.useMemo(() => _extends({}, themeLocaleText, parentLocaleText, inLocaleText), [themeLocaleText, parentLocaleText, inLocaleText]);
|
|
1018
|
+
const adapter = React.useMemo(() => {
|
|
1957
1019
|
if (!DateAdapter) {
|
|
1958
1020
|
if (parentAdapter) {
|
|
1959
1021
|
return parentAdapter;
|
|
@@ -1971,7 +1033,7 @@ var LocalizationProvider = function LocalizationProvider2(inProps) {
|
|
|
1971
1033
|
}
|
|
1972
1034
|
return dateAdapter;
|
|
1973
1035
|
}, [DateAdapter, adapterLocale, dateFormats, dateLibInstance, parentAdapter]);
|
|
1974
|
-
const defaultDates =
|
|
1036
|
+
const defaultDates = React.useMemo(() => {
|
|
1975
1037
|
if (!adapter) {
|
|
1976
1038
|
return null;
|
|
1977
1039
|
}
|
|
@@ -1980,7 +1042,7 @@ var LocalizationProvider = function LocalizationProvider2(inProps) {
|
|
|
1980
1042
|
maxDate: adapter.date("2099-12-31T00:00:00.000")
|
|
1981
1043
|
};
|
|
1982
1044
|
}, [adapter]);
|
|
1983
|
-
const contextValue =
|
|
1045
|
+
const contextValue = React.useMemo(() => {
|
|
1984
1046
|
return {
|
|
1985
1047
|
utils: adapter,
|
|
1986
1048
|
adapter,
|
|
@@ -2049,25 +1111,25 @@ process.env.NODE_ENV !== "production" ? LocalizationProvider.propTypes = {
|
|
|
2049
1111
|
} : void 0;
|
|
2050
1112
|
|
|
2051
1113
|
// node_modules/@mui/utils/esm/useEventCallback/useEventCallback.js
|
|
2052
|
-
import * as
|
|
1114
|
+
import * as React3 from "react";
|
|
2053
1115
|
|
|
2054
1116
|
// node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js
|
|
2055
|
-
import * as
|
|
2056
|
-
var useEnhancedEffect = typeof window !== "undefined" ?
|
|
1117
|
+
import * as React2 from "react";
|
|
1118
|
+
var useEnhancedEffect = typeof window !== "undefined" ? React2.useLayoutEffect : React2.useEffect;
|
|
2057
1119
|
var useEnhancedEffect_default = useEnhancedEffect;
|
|
2058
1120
|
|
|
2059
1121
|
// node_modules/@mui/utils/esm/useEventCallback/useEventCallback.js
|
|
2060
|
-
function
|
|
2061
|
-
const ref =
|
|
1122
|
+
function useEventCallback(fn) {
|
|
1123
|
+
const ref = React3.useRef(fn);
|
|
2062
1124
|
useEnhancedEffect_default(() => {
|
|
2063
1125
|
ref.current = fn;
|
|
2064
1126
|
});
|
|
2065
|
-
return
|
|
1127
|
+
return React3.useRef((...args) => (
|
|
2066
1128
|
// @ts-expect-error hide `this`
|
|
2067
1129
|
(0, ref.current)(...args)
|
|
2068
1130
|
)).current;
|
|
2069
1131
|
}
|
|
2070
|
-
var useEventCallback_default =
|
|
1132
|
+
var useEventCallback_default = useEventCallback;
|
|
2071
1133
|
|
|
2072
1134
|
// node_modules/@mui/x-internals/esm/warning/warning.js
|
|
2073
1135
|
var warnedOnceCache = /* @__PURE__ */ new Set();
|
|
@@ -2252,18 +1314,18 @@ var AdapterDayjs = class {
|
|
|
2252
1314
|
}
|
|
2253
1315
|
};
|
|
2254
1316
|
createSystemDate = (value) => {
|
|
2255
|
-
let
|
|
1317
|
+
let date;
|
|
2256
1318
|
if (this.hasUTCPlugin() && this.hasTimezonePlugin()) {
|
|
2257
1319
|
const timezone = dayjs.tz.guess();
|
|
2258
1320
|
if (timezone === "UTC") {
|
|
2259
|
-
|
|
1321
|
+
date = dayjs(value);
|
|
2260
1322
|
} else {
|
|
2261
|
-
|
|
1323
|
+
date = dayjs.tz(value, timezone);
|
|
2262
1324
|
}
|
|
2263
1325
|
} else {
|
|
2264
|
-
|
|
1326
|
+
date = dayjs(value);
|
|
2265
1327
|
}
|
|
2266
|
-
return this.setLocaleToValue(
|
|
1328
|
+
return this.setLocaleToValue(date);
|
|
2267
1329
|
};
|
|
2268
1330
|
createUTCDate = (value) => {
|
|
2269
1331
|
if (!this.hasUTCPlugin()) {
|
|
@@ -2523,8 +1585,8 @@ var AdapterDayjs = class {
|
|
|
2523
1585
|
setMonth = (value, month) => {
|
|
2524
1586
|
return this.adjustOffset(value.set("month", month));
|
|
2525
1587
|
};
|
|
2526
|
-
setDate = (value,
|
|
2527
|
-
return this.adjustOffset(value.set("date",
|
|
1588
|
+
setDate = (value, date) => {
|
|
1589
|
+
return this.adjustOffset(value.set("date", date));
|
|
2528
1590
|
};
|
|
2529
1591
|
setHours = (value, hours) => {
|
|
2530
1592
|
return this.adjustOffset(value.set("hour", hours));
|
|
@@ -2576,19 +1638,19 @@ var AdapterDayjs = class {
|
|
|
2576
1638
|
};
|
|
2577
1639
|
|
|
2578
1640
|
// src/providers/LayoutProvider.tsx
|
|
2579
|
-
import { useEffect as
|
|
2580
|
-
import { useTranslation as
|
|
2581
|
-
import * as
|
|
1641
|
+
import { useEffect as useEffect3, useEffectEvent } from "react";
|
|
1642
|
+
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
1643
|
+
import * as z from "zod";
|
|
2582
1644
|
|
|
2583
1645
|
// src/providers/DialogsProvider.tsx
|
|
2584
|
-
import { useId, useRef as
|
|
2585
|
-
import { jsx
|
|
1646
|
+
import { useId, useRef as useRef2, useState } from "react";
|
|
1647
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2586
1648
|
function DialogsProvider({ children, unmountAfter = 1e3 }) {
|
|
2587
|
-
const [stack, setStack] =
|
|
1649
|
+
const [stack, setStack] = useState([]);
|
|
2588
1650
|
const keyPrefix = useId();
|
|
2589
|
-
const nextId =
|
|
2590
|
-
const dialogMetadata =
|
|
2591
|
-
const requestDialog = useEventCallback_default(function open(
|
|
1651
|
+
const nextId = useRef2(0);
|
|
1652
|
+
const dialogMetadata = useRef2(/* @__PURE__ */ new WeakMap());
|
|
1653
|
+
const requestDialog = useEventCallback_default(function open(Component, payload, options = {}) {
|
|
2592
1654
|
const { onClose = async () => {
|
|
2593
1655
|
} } = options;
|
|
2594
1656
|
let resolve;
|
|
@@ -2601,7 +1663,7 @@ function DialogsProvider({ children, unmountAfter = 1e3 }) {
|
|
|
2601
1663
|
key,
|
|
2602
1664
|
open: true,
|
|
2603
1665
|
promise,
|
|
2604
|
-
Component
|
|
1666
|
+
Component,
|
|
2605
1667
|
payload,
|
|
2606
1668
|
onClose,
|
|
2607
1669
|
resolve
|
|
@@ -2633,10 +1695,10 @@ function DialogsProvider({ children, unmountAfter = 1e3 }) {
|
|
|
2633
1695
|
}
|
|
2634
1696
|
return dialog;
|
|
2635
1697
|
});
|
|
2636
|
-
return /* @__PURE__ */
|
|
1698
|
+
return /* @__PURE__ */ jsxs(DialogsContext.Provider, { value: { open: requestDialog, close: closeDialog }, children: [
|
|
2637
1699
|
children,
|
|
2638
|
-
stack.map(({ key, open, Component
|
|
2639
|
-
|
|
1700
|
+
stack.map(({ key, open, Component, payload, promise }) => /* @__PURE__ */ jsx(
|
|
1701
|
+
Component,
|
|
2640
1702
|
{
|
|
2641
1703
|
payload,
|
|
2642
1704
|
open,
|
|
@@ -2649,827 +1711,57 @@ function DialogsProvider({ children, unmountAfter = 1e3 }) {
|
|
|
2649
1711
|
] });
|
|
2650
1712
|
}
|
|
2651
1713
|
|
|
2652
|
-
// src/hooks/ThemeHook.ts
|
|
2653
|
-
import { createTheme, darken, lighten } from "@mui/material";
|
|
2654
|
-
import { grey as grey2 } from "@mui/material/colors";
|
|
2655
|
-
import { csCZ as csCZ3, enUS as enUS3 } from "@mui/material/locale";
|
|
2656
|
-
|
|
2657
|
-
// node_modules/@mui/x-data-grid/esm/utils/getGridLocalization.js
|
|
2658
|
-
var getGridLocalization = (gridTranslations) => ({
|
|
2659
|
-
components: {
|
|
2660
|
-
MuiDataGrid: {
|
|
2661
|
-
defaultProps: {
|
|
2662
|
-
localeText: gridTranslations
|
|
2663
|
-
}
|
|
2664
|
-
}
|
|
2665
|
-
}
|
|
2666
|
-
});
|
|
2667
|
-
|
|
2668
|
-
// node_modules/@mui/x-data-grid/esm/locales/csCZ.js
|
|
2669
|
-
var csCZGrid = {
|
|
2670
|
-
// Root
|
|
2671
|
-
noRowsLabel: "\u017D\xE1dn\xE9 z\xE1znamy",
|
|
2672
|
-
noResultsOverlayLabel: "Nena\u0161ly se \u017Eadn\xE9 v\xFDsledky.",
|
|
2673
|
-
noColumnsOverlayLabel: "\u017D\xE1dn\xE9 sloupce",
|
|
2674
|
-
noColumnsOverlayManageColumns: "Spravovat sloupce",
|
|
2675
|
-
// emptyPivotOverlayLabel: 'Add fields to rows, columns, and values to create a pivot table',
|
|
2676
|
-
// Density selector toolbar button text
|
|
2677
|
-
toolbarDensity: "Zobrazen\xED",
|
|
2678
|
-
toolbarDensityLabel: "Zobrazen\xED",
|
|
2679
|
-
toolbarDensityCompact: "Kompaktn\xED",
|
|
2680
|
-
toolbarDensityStandard: "Standartn\xED",
|
|
2681
|
-
toolbarDensityComfortable: "Komfortn\xED",
|
|
2682
|
-
// Columns selector toolbar button text
|
|
2683
|
-
toolbarColumns: "Sloupce",
|
|
2684
|
-
toolbarColumnsLabel: "Vybrat sloupec",
|
|
2685
|
-
// Filters toolbar button text
|
|
2686
|
-
toolbarFilters: "Filtry",
|
|
2687
|
-
toolbarFiltersLabel: "Zobrazit filtry",
|
|
2688
|
-
toolbarFiltersTooltipHide: "Skr\xFDt filtry",
|
|
2689
|
-
toolbarFiltersTooltipShow: "Zobrazit filtry",
|
|
2690
|
-
toolbarFiltersTooltipActive: (count) => {
|
|
2691
|
-
let pluralForm = "aktivn\xEDch filtr\u016F";
|
|
2692
|
-
if (count > 1 && count < 5) {
|
|
2693
|
-
pluralForm = "aktivn\xED filtry";
|
|
2694
|
-
} else if (count === 1) {
|
|
2695
|
-
pluralForm = "aktivn\xED filtr";
|
|
2696
|
-
}
|
|
2697
|
-
return `${count} ${pluralForm}`;
|
|
2698
|
-
},
|
|
2699
|
-
// Quick filter toolbar field
|
|
2700
|
-
toolbarQuickFilterPlaceholder: "Hledat\u2026",
|
|
2701
|
-
toolbarQuickFilterLabel: "Hledat",
|
|
2702
|
-
toolbarQuickFilterDeleteIconLabel: "Vymazat",
|
|
2703
|
-
// Export selector toolbar button text
|
|
2704
|
-
toolbarExport: "Export",
|
|
2705
|
-
toolbarExportLabel: "Export",
|
|
2706
|
-
toolbarExportCSV: "St\xE1hnout jako CSV",
|
|
2707
|
-
toolbarExportPrint: "Vytisknout",
|
|
2708
|
-
toolbarExportExcel: "St\xE1hnout jako Excel",
|
|
2709
|
-
// Toolbar pivot button
|
|
2710
|
-
// toolbarPivot: 'Pivot',
|
|
2711
|
-
// Toolbar charts button
|
|
2712
|
-
// toolbarCharts: 'Charts',
|
|
2713
|
-
// Toolbar AI Assistant button
|
|
2714
|
-
// toolbarAssistant: 'AI Assistant',
|
|
2715
|
-
// Columns management text
|
|
2716
|
-
columnsManagementSearchTitle: "Hledat sloupce",
|
|
2717
|
-
columnsManagementNoColumns: "\u017D\xE1dn\xE9 sloupce",
|
|
2718
|
-
columnsManagementShowHideAllText: "Zobrazit/skr\xFDt v\u0161e",
|
|
2719
|
-
columnsManagementReset: "Resetovat",
|
|
2720
|
-
columnsManagementDeleteIconLabel: "Vy\u010Distit",
|
|
2721
|
-
// Filter panel text
|
|
2722
|
-
filterPanelAddFilter: "P\u0159idat filtr",
|
|
2723
|
-
filterPanelRemoveAll: "Odstranit v\u0161e",
|
|
2724
|
-
filterPanelDeleteIconLabel: "Odstranit",
|
|
2725
|
-
filterPanelLogicOperator: "Logick\xFD oper\xE1tor",
|
|
2726
|
-
filterPanelOperator: "Oper\xE1tory",
|
|
2727
|
-
filterPanelOperatorAnd: "A",
|
|
2728
|
-
filterPanelOperatorOr: "Nebo",
|
|
2729
|
-
filterPanelColumns: "Sloupce",
|
|
2730
|
-
filterPanelInputLabel: "Hodnota",
|
|
2731
|
-
filterPanelInputPlaceholder: "Hodnota filtru",
|
|
2732
|
-
// Filter operators text
|
|
2733
|
-
filterOperatorContains: "obsahuje",
|
|
2734
|
-
filterOperatorDoesNotContain: "neobsahuje",
|
|
2735
|
-
filterOperatorEquals: "rovn\xE1 se",
|
|
2736
|
-
filterOperatorDoesNotEqual: "nerovn\xE1 se",
|
|
2737
|
-
filterOperatorStartsWith: "za\u010D\xEDn\xE1 na",
|
|
2738
|
-
filterOperatorEndsWith: "kon\u010D\xED na",
|
|
2739
|
-
filterOperatorIs: "je",
|
|
2740
|
-
filterOperatorNot: "nen\xED",
|
|
2741
|
-
filterOperatorAfter: "je po",
|
|
2742
|
-
filterOperatorOnOrAfter: "je po v\u010Detn\u011B",
|
|
2743
|
-
filterOperatorBefore: "je p\u0159ed",
|
|
2744
|
-
filterOperatorOnOrBefore: "je p\u0159ed v\u010Detn\u011B",
|
|
2745
|
-
filterOperatorIsEmpty: "je pr\xE1zdn\xFD",
|
|
2746
|
-
filterOperatorIsNotEmpty: "nen\xED pr\xE1zdn\xFD",
|
|
2747
|
-
filterOperatorIsAnyOf: "je jeden z",
|
|
2748
|
-
"filterOperator=": "=",
|
|
2749
|
-
"filterOperator!=": "!=",
|
|
2750
|
-
"filterOperator>": ">",
|
|
2751
|
-
"filterOperator>=": ">=",
|
|
2752
|
-
"filterOperator<": "<",
|
|
2753
|
-
"filterOperator<=": "<=",
|
|
2754
|
-
// Header filter operators text
|
|
2755
|
-
headerFilterOperatorContains: "Obsahuje",
|
|
2756
|
-
headerFilterOperatorDoesNotContain: "Neobsahuje",
|
|
2757
|
-
headerFilterOperatorEquals: "Rovn\xE1 se",
|
|
2758
|
-
headerFilterOperatorDoesNotEqual: "Nerovn\xE1 se",
|
|
2759
|
-
headerFilterOperatorStartsWith: "Za\u010D\xEDn\xE1 na",
|
|
2760
|
-
headerFilterOperatorEndsWith: "Kon\u010D\xED na",
|
|
2761
|
-
headerFilterOperatorIs: "Je",
|
|
2762
|
-
headerFilterOperatorNot: "Nen\xED",
|
|
2763
|
-
headerFilterOperatorAfter: "Je po",
|
|
2764
|
-
headerFilterOperatorOnOrAfter: "Je po v\u010Detn\u011B",
|
|
2765
|
-
headerFilterOperatorBefore: "Je p\u0159ed",
|
|
2766
|
-
headerFilterOperatorOnOrBefore: "Je p\u0159ed v\u010Detn\u011B",
|
|
2767
|
-
headerFilterOperatorIsEmpty: "Je pr\xE1zdn\xFD",
|
|
2768
|
-
headerFilterOperatorIsNotEmpty: "Nen\xED pr\xE1zdn\xFD",
|
|
2769
|
-
headerFilterOperatorIsAnyOf: "Je jeden z",
|
|
2770
|
-
"headerFilterOperator=": "Rovn\xE1 se",
|
|
2771
|
-
"headerFilterOperator!=": "Nerovn\xE1 se",
|
|
2772
|
-
"headerFilterOperator>": "V\u011Bt\u0161\xED ne\u017E",
|
|
2773
|
-
"headerFilterOperator>=": "V\u011Bt\u0161\xED ne\u017E nebo rovno",
|
|
2774
|
-
"headerFilterOperator<": "Men\u0161\xED ne\u017E",
|
|
2775
|
-
"headerFilterOperator<=": "Men\u0161\xED ne\u017E nebo rovno",
|
|
2776
|
-
headerFilterClear: "Zru\u0161it filtr",
|
|
2777
|
-
// Filter values text
|
|
2778
|
-
filterValueAny: "jak\xFDkoliv",
|
|
2779
|
-
filterValueTrue: "ano",
|
|
2780
|
-
filterValueFalse: "ne",
|
|
2781
|
-
// Column menu text
|
|
2782
|
-
columnMenuLabel: "Menu",
|
|
2783
|
-
columnMenuAriaLabel: (columnName) => `Mo\u017Enosti sloupce ${columnName}`,
|
|
2784
|
-
columnMenuShowColumns: "Zobrazit sloupce",
|
|
2785
|
-
columnMenuManageColumns: "Spravovat sloupce",
|
|
2786
|
-
columnMenuFilter: "Filtr",
|
|
2787
|
-
columnMenuHideColumn: "Skr\xFDt",
|
|
2788
|
-
columnMenuUnsort: "Zru\u0161it filtry",
|
|
2789
|
-
columnMenuSortAsc: "Se\u0159adit vzestupn\u011B",
|
|
2790
|
-
columnMenuSortDesc: "Se\u0159adit sestupn\u011B",
|
|
2791
|
-
// columnMenuManagePivot: 'Manage pivot',
|
|
2792
|
-
// columnMenuManageCharts: 'Manage charts',
|
|
2793
|
-
// Column header text
|
|
2794
|
-
columnHeaderFiltersTooltipActive: (count) => {
|
|
2795
|
-
let pluralForm = "aktivn\xEDch filtr\u016F";
|
|
2796
|
-
if (count > 1 && count < 5) {
|
|
2797
|
-
pluralForm = "aktivn\xED filtry";
|
|
2798
|
-
} else if (count === 1) {
|
|
2799
|
-
pluralForm = "aktivn\xED filtr";
|
|
2800
|
-
}
|
|
2801
|
-
return `${count} ${pluralForm}`;
|
|
2802
|
-
},
|
|
2803
|
-
columnHeaderFiltersLabel: "Zobrazit filtry",
|
|
2804
|
-
columnHeaderSortIconLabel: "Filtrovat",
|
|
2805
|
-
// Rows selected footer text
|
|
2806
|
-
footerRowSelected: (count) => {
|
|
2807
|
-
let pluralForm = "vybran\xFDch z\xE1znam\u016F";
|
|
2808
|
-
if (count > 1 && count < 5) {
|
|
2809
|
-
pluralForm = "vybran\xE9 z\xE1znamy";
|
|
2810
|
-
} else if (count === 1) {
|
|
2811
|
-
pluralForm = "vybran\xFD z\xE1znam";
|
|
2812
|
-
}
|
|
2813
|
-
return `${count} ${pluralForm}`;
|
|
2814
|
-
},
|
|
2815
|
-
// Total row amount footer text
|
|
2816
|
-
footerTotalRows: "Celkem \u0159\xE1dk\u016F:",
|
|
2817
|
-
// Total visible row amount footer text
|
|
2818
|
-
footerTotalVisibleRows: (visibleCount, totalCount) => {
|
|
2819
|
-
const str = totalCount.toString();
|
|
2820
|
-
const firstDigit = str[0];
|
|
2821
|
-
const op = ["4", "6", "7"].includes(firstDigit) || firstDigit === "1" && str.length % 3 === 0 ? "ze" : "z";
|
|
2822
|
-
return `${visibleCount.toLocaleString()} ${op} ${totalCount.toLocaleString()}`;
|
|
2823
|
-
},
|
|
2824
|
-
// Checkbox selection text
|
|
2825
|
-
checkboxSelectionHeaderName: "V\xFDb\u011Br \u0159\xE1dku",
|
|
2826
|
-
checkboxSelectionSelectAllRows: "Ozna\u010Dit v\u0161echny \u0159\xE1dky",
|
|
2827
|
-
checkboxSelectionUnselectAllRows: "Odzna\u010Dit v\u0161echny \u0159\xE1dky",
|
|
2828
|
-
checkboxSelectionSelectRow: "Ozna\u010Dit \u0159\xE1dek",
|
|
2829
|
-
checkboxSelectionUnselectRow: "Odzna\u010Dit \u0159\xE1dek",
|
|
2830
|
-
// Boolean cell text
|
|
2831
|
-
booleanCellTrueLabel: "ano",
|
|
2832
|
-
booleanCellFalseLabel: "ne",
|
|
2833
|
-
// Actions cell more text
|
|
2834
|
-
actionsCellMore: "v\xEDce",
|
|
2835
|
-
// Column pinning text
|
|
2836
|
-
pinToLeft: "P\u0159ipnout vlevo",
|
|
2837
|
-
pinToRight: "P\u0159ipnout vpravo",
|
|
2838
|
-
unpin: "Odepnout",
|
|
2839
|
-
// Tree Data
|
|
2840
|
-
treeDataGroupingHeaderName: "Skupina",
|
|
2841
|
-
treeDataExpand: "zobrazit potomky",
|
|
2842
|
-
treeDataCollapse: "skr\xFDt potomky",
|
|
2843
|
-
// Grouping columns
|
|
2844
|
-
groupingColumnHeaderName: "Skupina",
|
|
2845
|
-
groupColumn: (name) => `Seskupit podle ${name}`,
|
|
2846
|
-
unGroupColumn: (name) => `P\u0159estat seskupovat podle ${name}`,
|
|
2847
|
-
// Master/detail
|
|
2848
|
-
detailPanelToggle: "P\u0159epnout detail panelu",
|
|
2849
|
-
expandDetailPanel: "Rozbalit",
|
|
2850
|
-
collapseDetailPanel: "Sbalit",
|
|
2851
|
-
// Pagination
|
|
2852
|
-
paginationRowsPerPage: "\u0158\xE1dk\u016F na str\xE1nce:",
|
|
2853
|
-
paginationDisplayedRows: ({
|
|
2854
|
-
from,
|
|
2855
|
-
to,
|
|
2856
|
-
count,
|
|
2857
|
-
estimated
|
|
2858
|
-
}) => {
|
|
2859
|
-
if (!estimated) {
|
|
2860
|
-
return `${from}\u2013${to} z ${count !== -1 ? count : `v\xEDce ne\u017E ${to}`}`;
|
|
2861
|
-
}
|
|
2862
|
-
const estimatedLabel = estimated && estimated > to ? `p\u0159ibli\u017En\u011B ${estimated}` : `v\xEDce ne\u017E ${to}`;
|
|
2863
|
-
return `${from}\u2013${to} z ${count !== -1 ? count : estimatedLabel}`;
|
|
2864
|
-
},
|
|
2865
|
-
paginationItemAriaLabel: (type) => {
|
|
2866
|
-
if (type === "first") {
|
|
2867
|
-
return "J\xEDt na prvn\xED str\xE1nku";
|
|
2868
|
-
}
|
|
2869
|
-
if (type === "last") {
|
|
2870
|
-
return "J\xEDt na posledn\xED str\xE1nku";
|
|
2871
|
-
}
|
|
2872
|
-
if (type === "next") {
|
|
2873
|
-
return "J\xEDt na dal\u0161\xED str\xE1nku";
|
|
2874
|
-
}
|
|
2875
|
-
return "J\xEDt na p\u0159edchoz\xED str\xE1nku";
|
|
2876
|
-
},
|
|
2877
|
-
// Row reordering text
|
|
2878
|
-
rowReorderingHeaderName: "P\u0159euspo\u0159\xE1d\xE1v\xE1n\xED \u0159\xE1dk\u016F",
|
|
2879
|
-
// Aggregation
|
|
2880
|
-
aggregationMenuItemHeader: "Seskupov\xE1n\xED",
|
|
2881
|
-
// aggregationFunctionLabelNone: 'none',
|
|
2882
|
-
aggregationFunctionLabelSum: "sou\u010Det",
|
|
2883
|
-
aggregationFunctionLabelAvg: "pr\u016Fm\u011Br",
|
|
2884
|
-
aggregationFunctionLabelMin: "min",
|
|
2885
|
-
aggregationFunctionLabelMax: "max",
|
|
2886
|
-
aggregationFunctionLabelSize: "po\u010Det",
|
|
2887
|
-
// Pivot panel
|
|
2888
|
-
// pivotToggleLabel: 'Pivot',
|
|
2889
|
-
// pivotRows: 'Rows',
|
|
2890
|
-
// pivotColumns: 'Columns',
|
|
2891
|
-
// pivotValues: 'Values',
|
|
2892
|
-
// pivotCloseButton: 'Close pivot settings',
|
|
2893
|
-
// pivotSearchButton: 'Search fields',
|
|
2894
|
-
// pivotSearchControlPlaceholder: 'Search fields',
|
|
2895
|
-
// pivotSearchControlLabel: 'Search fields',
|
|
2896
|
-
// pivotSearchControlClear: 'Clear search',
|
|
2897
|
-
// pivotNoFields: 'No fields',
|
|
2898
|
-
// pivotMenuMoveUp: 'Move up',
|
|
2899
|
-
// pivotMenuMoveDown: 'Move down',
|
|
2900
|
-
// pivotMenuMoveToTop: 'Move to top',
|
|
2901
|
-
// pivotMenuMoveToBottom: 'Move to bottom',
|
|
2902
|
-
// pivotMenuRows: 'Rows',
|
|
2903
|
-
// pivotMenuColumns: 'Columns',
|
|
2904
|
-
// pivotMenuValues: 'Values',
|
|
2905
|
-
// pivotMenuOptions: 'Field options',
|
|
2906
|
-
// pivotMenuAddToRows: 'Add to Rows',
|
|
2907
|
-
// pivotMenuAddToColumns: 'Add to Columns',
|
|
2908
|
-
// pivotMenuAddToValues: 'Add to Values',
|
|
2909
|
-
// pivotMenuRemove: 'Remove',
|
|
2910
|
-
// pivotDragToRows: 'Drag here to create rows',
|
|
2911
|
-
// pivotDragToColumns: 'Drag here to create columns',
|
|
2912
|
-
// pivotDragToValues: 'Drag here to create values',
|
|
2913
|
-
// pivotYearColumnHeaderName: '(Year)',
|
|
2914
|
-
// pivotQuarterColumnHeaderName: '(Quarter)',
|
|
2915
|
-
// Charts configuration panel
|
|
2916
|
-
// chartsNoCharts: 'There are no charts available',
|
|
2917
|
-
// chartsChartNotSelected: 'Select a chart type to configure its options',
|
|
2918
|
-
// chartsTabChart: 'Chart',
|
|
2919
|
-
// chartsTabFields: 'Fields',
|
|
2920
|
-
// chartsTabCustomize: 'Customize',
|
|
2921
|
-
// chartsCloseButton: 'Close charts configuration',
|
|
2922
|
-
// chartsSyncButtonLabel: 'Sync chart',
|
|
2923
|
-
// chartsSearchPlaceholder: 'Search fields',
|
|
2924
|
-
// chartsSearchLabel: 'Search fields',
|
|
2925
|
-
// chartsSearchClear: 'Clear search',
|
|
2926
|
-
// chartsNoFields: 'No fields',
|
|
2927
|
-
// chartsFieldBlocked: 'This field cannot be added to any section',
|
|
2928
|
-
// chartsCategories: 'Categories',
|
|
2929
|
-
// chartsSeries: 'Series',
|
|
2930
|
-
// chartsMenuAddToDimensions: (dimensionLabel: string) => `Add to ${dimensionLabel}`,
|
|
2931
|
-
// chartsMenuAddToValues: (valuesLabel: string) => `Add to ${valuesLabel}`,
|
|
2932
|
-
// chartsMenuMoveUp: 'Move up',
|
|
2933
|
-
// chartsMenuMoveDown: 'Move down',
|
|
2934
|
-
// chartsMenuMoveToTop: 'Move to top',
|
|
2935
|
-
// chartsMenuMoveToBottom: 'Move to bottom',
|
|
2936
|
-
// chartsMenuOptions: 'Field options',
|
|
2937
|
-
// chartsMenuRemove: 'Remove',
|
|
2938
|
-
// chartsDragToDimensions: (dimensionLabel: string) => `Drag here to use column as ${dimensionLabel}`,
|
|
2939
|
-
// chartsDragToValues: (valuesLabel: string) => `Drag here to use column as ${valuesLabel}`,
|
|
2940
|
-
// AI Assistant panel
|
|
2941
|
-
// aiAssistantPanelTitle: 'AI Assistant',
|
|
2942
|
-
// aiAssistantPanelClose: 'Close AI Assistant',
|
|
2943
|
-
// aiAssistantPanelNewConversation: 'New conversation',
|
|
2944
|
-
// aiAssistantPanelConversationHistory: 'Conversation history',
|
|
2945
|
-
// aiAssistantPanelEmptyConversation: 'No prompt history',
|
|
2946
|
-
// aiAssistantSuggestions: 'Suggestions',
|
|
2947
|
-
// Prompt field
|
|
2948
|
-
promptFieldLabel: "Vstup po\u017Eadavku",
|
|
2949
|
-
promptFieldPlaceholder: "Napi\u0161te po\u017Eadavek\u2026",
|
|
2950
|
-
promptFieldPlaceholderWithRecording: "Napi\u0161te nebo nahrajte po\u017Eadavek\u2026",
|
|
2951
|
-
promptFieldPlaceholderListening: "Naslouch\xE1m po\u017Eadavku\u2026",
|
|
2952
|
-
// promptFieldSpeechRecognitionNotSupported: 'Speech recognition is not supported in this browser',
|
|
2953
|
-
promptFieldSend: "Odeslat",
|
|
2954
|
-
promptFieldRecord: "Nahr\xE1t",
|
|
2955
|
-
promptFieldStopRecording: "Zastavit nahr\xE1v\xE1n\xED"
|
|
2956
|
-
// Prompt
|
|
2957
|
-
// promptRerun: 'Run again',
|
|
2958
|
-
// promptProcessing: 'Processing…',
|
|
2959
|
-
// promptAppliedChanges: 'Applied changes',
|
|
2960
|
-
// Prompt changes
|
|
2961
|
-
// promptChangeGroupDescription: (column: string) => `Group by ${column}`,
|
|
2962
|
-
// promptChangeAggregationLabel: (column: string, aggregation: string) => `${column} (${aggregation})`,
|
|
2963
|
-
// promptChangeAggregationDescription: (column: string, aggregation: string) => `Aggregate ${column} (${aggregation})`,
|
|
2964
|
-
// promptChangeFilterLabel: (column: string, operator: string, value: string) => {
|
|
2965
|
-
// if (operator === 'is any of') {
|
|
2966
|
-
// return `${column} is any of: ${value}`;
|
|
2967
|
-
// }
|
|
2968
|
-
// return `${column} ${operator} ${value}`;
|
|
2969
|
-
// },
|
|
2970
|
-
// promptChangeFilterDescription: (column: string, operator: string, value: string) => {
|
|
2971
|
-
// if (operator === 'is any of') {
|
|
2972
|
-
// return `Filter where ${column} is any of: ${value}`;
|
|
2973
|
-
// }
|
|
2974
|
-
// return `Filter where ${column} ${operator} ${value}`;
|
|
2975
|
-
// },
|
|
2976
|
-
// promptChangeSortDescription: (column: string, direction: string) => `Sort by ${column} (${direction})`,
|
|
2977
|
-
// promptChangePivotEnableLabel: 'Pivot',
|
|
2978
|
-
// promptChangePivotEnableDescription: 'Enable pivot',
|
|
2979
|
-
// promptChangePivotColumnsLabel: (count: number) => `Columns (${count})`,
|
|
2980
|
-
// promptChangePivotColumnsDescription: (column: string, direction: string) => `${column}${direction ? ` (${direction})` : ''}`,
|
|
2981
|
-
// promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
|
|
2982
|
-
// promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
|
|
2983
|
-
// promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
|
|
2984
|
-
// promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
|
|
2985
|
-
};
|
|
2986
|
-
var csCZ = getGridLocalization(csCZGrid);
|
|
2987
|
-
|
|
2988
|
-
// node_modules/@mui/x-data-grid/esm/constants/localeTextConstants.js
|
|
2989
|
-
var GRID_DEFAULT_LOCALE_TEXT = {
|
|
2990
|
-
// Root
|
|
2991
|
-
noRowsLabel: "No rows",
|
|
2992
|
-
noResultsOverlayLabel: "No results found.",
|
|
2993
|
-
noColumnsOverlayLabel: "No columns",
|
|
2994
|
-
noColumnsOverlayManageColumns: "Manage columns",
|
|
2995
|
-
emptyPivotOverlayLabel: "Add fields to rows, columns, and values to create a pivot table",
|
|
2996
|
-
// Density selector toolbar button text
|
|
2997
|
-
toolbarDensity: "Density",
|
|
2998
|
-
toolbarDensityLabel: "Density",
|
|
2999
|
-
toolbarDensityCompact: "Compact",
|
|
3000
|
-
toolbarDensityStandard: "Standard",
|
|
3001
|
-
toolbarDensityComfortable: "Comfortable",
|
|
3002
|
-
// Columns selector toolbar button text
|
|
3003
|
-
toolbarColumns: "Columns",
|
|
3004
|
-
toolbarColumnsLabel: "Select columns",
|
|
3005
|
-
// Filters toolbar button text
|
|
3006
|
-
toolbarFilters: "Filters",
|
|
3007
|
-
toolbarFiltersLabel: "Show filters",
|
|
3008
|
-
toolbarFiltersTooltipHide: "Hide filters",
|
|
3009
|
-
toolbarFiltersTooltipShow: "Show filters",
|
|
3010
|
-
toolbarFiltersTooltipActive: (count) => count !== 1 ? `${count} active filters` : `${count} active filter`,
|
|
3011
|
-
// Quick filter toolbar field
|
|
3012
|
-
toolbarQuickFilterPlaceholder: "Search\u2026",
|
|
3013
|
-
toolbarQuickFilterLabel: "Search",
|
|
3014
|
-
toolbarQuickFilterDeleteIconLabel: "Clear",
|
|
3015
|
-
// Export selector toolbar button text
|
|
3016
|
-
toolbarExport: "Export",
|
|
3017
|
-
toolbarExportLabel: "Export",
|
|
3018
|
-
toolbarExportCSV: "Download as CSV",
|
|
3019
|
-
toolbarExportPrint: "Print",
|
|
3020
|
-
toolbarExportExcel: "Download as Excel",
|
|
3021
|
-
// Toolbar pivot button
|
|
3022
|
-
toolbarPivot: "Pivot",
|
|
3023
|
-
// Toolbar charts button
|
|
3024
|
-
toolbarCharts: "Charts",
|
|
3025
|
-
// Toolbar AI Assistant button
|
|
3026
|
-
toolbarAssistant: "AI Assistant",
|
|
3027
|
-
// Columns management text
|
|
3028
|
-
columnsManagementSearchTitle: "Search",
|
|
3029
|
-
columnsManagementNoColumns: "No columns",
|
|
3030
|
-
columnsManagementShowHideAllText: "Show/Hide All",
|
|
3031
|
-
columnsManagementReset: "Reset",
|
|
3032
|
-
columnsManagementDeleteIconLabel: "Clear",
|
|
3033
|
-
// Filter panel text
|
|
3034
|
-
filterPanelAddFilter: "Add filter",
|
|
3035
|
-
filterPanelRemoveAll: "Remove all",
|
|
3036
|
-
filterPanelDeleteIconLabel: "Delete",
|
|
3037
|
-
filterPanelLogicOperator: "Logic operator",
|
|
3038
|
-
filterPanelOperator: "Operator",
|
|
3039
|
-
filterPanelOperatorAnd: "And",
|
|
3040
|
-
filterPanelOperatorOr: "Or",
|
|
3041
|
-
filterPanelColumns: "Columns",
|
|
3042
|
-
filterPanelInputLabel: "Value",
|
|
3043
|
-
filterPanelInputPlaceholder: "Filter value",
|
|
3044
|
-
// Filter operators text
|
|
3045
|
-
filterOperatorContains: "contains",
|
|
3046
|
-
filterOperatorDoesNotContain: "does not contain",
|
|
3047
|
-
filterOperatorEquals: "equals",
|
|
3048
|
-
filterOperatorDoesNotEqual: "does not equal",
|
|
3049
|
-
filterOperatorStartsWith: "starts with",
|
|
3050
|
-
filterOperatorEndsWith: "ends with",
|
|
3051
|
-
filterOperatorIs: "is",
|
|
3052
|
-
filterOperatorNot: "is not",
|
|
3053
|
-
filterOperatorAfter: "is after",
|
|
3054
|
-
filterOperatorOnOrAfter: "is on or after",
|
|
3055
|
-
filterOperatorBefore: "is before",
|
|
3056
|
-
filterOperatorOnOrBefore: "is on or before",
|
|
3057
|
-
filterOperatorIsEmpty: "is empty",
|
|
3058
|
-
filterOperatorIsNotEmpty: "is not empty",
|
|
3059
|
-
filterOperatorIsAnyOf: "is any of",
|
|
3060
|
-
"filterOperator=": "=",
|
|
3061
|
-
"filterOperator!=": "!=",
|
|
3062
|
-
"filterOperator>": ">",
|
|
3063
|
-
"filterOperator>=": ">=",
|
|
3064
|
-
"filterOperator<": "<",
|
|
3065
|
-
"filterOperator<=": "<=",
|
|
3066
|
-
// Header filter operators text
|
|
3067
|
-
headerFilterOperatorContains: "Contains",
|
|
3068
|
-
headerFilterOperatorDoesNotContain: "Does not contain",
|
|
3069
|
-
headerFilterOperatorEquals: "Equals",
|
|
3070
|
-
headerFilterOperatorDoesNotEqual: "Does not equal",
|
|
3071
|
-
headerFilterOperatorStartsWith: "Starts with",
|
|
3072
|
-
headerFilterOperatorEndsWith: "Ends with",
|
|
3073
|
-
headerFilterOperatorIs: "Is",
|
|
3074
|
-
headerFilterOperatorNot: "Is not",
|
|
3075
|
-
headerFilterOperatorAfter: "Is after",
|
|
3076
|
-
headerFilterOperatorOnOrAfter: "Is on or after",
|
|
3077
|
-
headerFilterOperatorBefore: "Is before",
|
|
3078
|
-
headerFilterOperatorOnOrBefore: "Is on or before",
|
|
3079
|
-
headerFilterOperatorIsEmpty: "Is empty",
|
|
3080
|
-
headerFilterOperatorIsNotEmpty: "Is not empty",
|
|
3081
|
-
headerFilterOperatorIsAnyOf: "Is any of",
|
|
3082
|
-
"headerFilterOperator=": "Equals",
|
|
3083
|
-
"headerFilterOperator!=": "Not equals",
|
|
3084
|
-
"headerFilterOperator>": "Greater than",
|
|
3085
|
-
"headerFilterOperator>=": "Greater than or equal to",
|
|
3086
|
-
"headerFilterOperator<": "Less than",
|
|
3087
|
-
"headerFilterOperator<=": "Less than or equal to",
|
|
3088
|
-
headerFilterClear: "Clear filter",
|
|
3089
|
-
// Filter values text
|
|
3090
|
-
filterValueAny: "any",
|
|
3091
|
-
filterValueTrue: "true",
|
|
3092
|
-
filterValueFalse: "false",
|
|
3093
|
-
// Column menu text
|
|
3094
|
-
columnMenuLabel: "Menu",
|
|
3095
|
-
columnMenuAriaLabel: (columnName) => `${columnName} column menu`,
|
|
3096
|
-
columnMenuShowColumns: "Show columns",
|
|
3097
|
-
columnMenuManageColumns: "Manage columns",
|
|
3098
|
-
columnMenuFilter: "Filter",
|
|
3099
|
-
columnMenuHideColumn: "Hide column",
|
|
3100
|
-
columnMenuUnsort: "Unsort",
|
|
3101
|
-
columnMenuSortAsc: "Sort by ASC",
|
|
3102
|
-
columnMenuSortDesc: "Sort by DESC",
|
|
3103
|
-
columnMenuManagePivot: "Manage pivot",
|
|
3104
|
-
columnMenuManageCharts: "Manage charts",
|
|
3105
|
-
// Column header text
|
|
3106
|
-
columnHeaderFiltersTooltipActive: (count) => count !== 1 ? `${count} active filters` : `${count} active filter`,
|
|
3107
|
-
columnHeaderFiltersLabel: "Show filters",
|
|
3108
|
-
columnHeaderSortIconLabel: "Sort",
|
|
3109
|
-
// Rows selected footer text
|
|
3110
|
-
footerRowSelected: (count) => count !== 1 ? `${count.toLocaleString()} rows selected` : `${count.toLocaleString()} row selected`,
|
|
3111
|
-
// Total row amount footer text
|
|
3112
|
-
footerTotalRows: "Total Rows:",
|
|
3113
|
-
// Total visible row amount footer text
|
|
3114
|
-
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} of ${totalCount.toLocaleString()}`,
|
|
3115
|
-
// Checkbox selection text
|
|
3116
|
-
checkboxSelectionHeaderName: "Checkbox selection",
|
|
3117
|
-
checkboxSelectionSelectAllRows: "Select all rows",
|
|
3118
|
-
checkboxSelectionUnselectAllRows: "Unselect all rows",
|
|
3119
|
-
checkboxSelectionSelectRow: "Select row",
|
|
3120
|
-
checkboxSelectionUnselectRow: "Unselect row",
|
|
3121
|
-
// Boolean cell text
|
|
3122
|
-
booleanCellTrueLabel: "yes",
|
|
3123
|
-
booleanCellFalseLabel: "no",
|
|
3124
|
-
// Actions cell more text
|
|
3125
|
-
actionsCellMore: "more",
|
|
3126
|
-
// Column pinning text
|
|
3127
|
-
pinToLeft: "Pin to left",
|
|
3128
|
-
pinToRight: "Pin to right",
|
|
3129
|
-
unpin: "Unpin",
|
|
3130
|
-
// Tree Data
|
|
3131
|
-
treeDataGroupingHeaderName: "Group",
|
|
3132
|
-
treeDataExpand: "see children",
|
|
3133
|
-
treeDataCollapse: "hide children",
|
|
3134
|
-
// Grouping columns
|
|
3135
|
-
groupingColumnHeaderName: "Group",
|
|
3136
|
-
groupColumn: (name) => `Group by ${name}`,
|
|
3137
|
-
unGroupColumn: (name) => `Stop grouping by ${name}`,
|
|
3138
|
-
// Master/detail
|
|
3139
|
-
detailPanelToggle: "Detail panel toggle",
|
|
3140
|
-
expandDetailPanel: "Expand",
|
|
3141
|
-
collapseDetailPanel: "Collapse",
|
|
3142
|
-
// Pagination
|
|
3143
|
-
paginationRowsPerPage: "Rows per page:",
|
|
3144
|
-
paginationDisplayedRows: ({
|
|
3145
|
-
from,
|
|
3146
|
-
to,
|
|
3147
|
-
count,
|
|
3148
|
-
estimated
|
|
3149
|
-
}) => {
|
|
3150
|
-
if (!estimated) {
|
|
3151
|
-
return `${from}\u2013${to} of ${count !== -1 ? count : `more than ${to}`}`;
|
|
3152
|
-
}
|
|
3153
|
-
const estimatedLabel = estimated && estimated > to ? `around ${estimated}` : `more than ${to}`;
|
|
3154
|
-
return `${from}\u2013${to} of ${count !== -1 ? count : estimatedLabel}`;
|
|
3155
|
-
},
|
|
3156
|
-
paginationItemAriaLabel: (type) => {
|
|
3157
|
-
if (type === "first") {
|
|
3158
|
-
return "Go to first page";
|
|
3159
|
-
}
|
|
3160
|
-
if (type === "last") {
|
|
3161
|
-
return "Go to last page";
|
|
3162
|
-
}
|
|
3163
|
-
if (type === "next") {
|
|
3164
|
-
return "Go to next page";
|
|
3165
|
-
}
|
|
3166
|
-
return "Go to previous page";
|
|
3167
|
-
},
|
|
3168
|
-
// Row reordering text
|
|
3169
|
-
rowReorderingHeaderName: "Row reordering",
|
|
3170
|
-
// Aggregation
|
|
3171
|
-
aggregationMenuItemHeader: "Aggregation",
|
|
3172
|
-
aggregationFunctionLabelNone: "none",
|
|
3173
|
-
aggregationFunctionLabelSum: "sum",
|
|
3174
|
-
aggregationFunctionLabelAvg: "avg",
|
|
3175
|
-
aggregationFunctionLabelMin: "min",
|
|
3176
|
-
aggregationFunctionLabelMax: "max",
|
|
3177
|
-
aggregationFunctionLabelSize: "size",
|
|
3178
|
-
// Pivot panel
|
|
3179
|
-
pivotToggleLabel: "Pivot",
|
|
3180
|
-
pivotRows: "Rows",
|
|
3181
|
-
pivotColumns: "Columns",
|
|
3182
|
-
pivotValues: "Values",
|
|
3183
|
-
pivotCloseButton: "Close pivot settings",
|
|
3184
|
-
pivotSearchButton: "Search fields",
|
|
3185
|
-
pivotSearchControlPlaceholder: "Search fields",
|
|
3186
|
-
pivotSearchControlLabel: "Search fields",
|
|
3187
|
-
pivotSearchControlClear: "Clear search",
|
|
3188
|
-
pivotNoFields: "No fields",
|
|
3189
|
-
pivotMenuMoveUp: "Move up",
|
|
3190
|
-
pivotMenuMoveDown: "Move down",
|
|
3191
|
-
pivotMenuMoveToTop: "Move to top",
|
|
3192
|
-
pivotMenuMoveToBottom: "Move to bottom",
|
|
3193
|
-
pivotMenuRows: "Rows",
|
|
3194
|
-
pivotMenuColumns: "Columns",
|
|
3195
|
-
pivotMenuValues: "Values",
|
|
3196
|
-
pivotMenuOptions: "Field options",
|
|
3197
|
-
pivotMenuAddToRows: "Add to Rows",
|
|
3198
|
-
pivotMenuAddToColumns: "Add to Columns",
|
|
3199
|
-
pivotMenuAddToValues: "Add to Values",
|
|
3200
|
-
pivotMenuRemove: "Remove",
|
|
3201
|
-
pivotDragToRows: "Drag here to create rows",
|
|
3202
|
-
pivotDragToColumns: "Drag here to create columns",
|
|
3203
|
-
pivotDragToValues: "Drag here to create values",
|
|
3204
|
-
pivotYearColumnHeaderName: "(Year)",
|
|
3205
|
-
pivotQuarterColumnHeaderName: "(Quarter)",
|
|
3206
|
-
// Charts configuration panel
|
|
3207
|
-
chartsNoCharts: "There are no charts available",
|
|
3208
|
-
chartsChartNotSelected: "Select a chart type to configure its options",
|
|
3209
|
-
chartsTabChart: "Chart",
|
|
3210
|
-
chartsTabFields: "Fields",
|
|
3211
|
-
chartsTabCustomize: "Customize",
|
|
3212
|
-
chartsCloseButton: "Close charts configuration",
|
|
3213
|
-
chartsSyncButtonLabel: "Sync chart",
|
|
3214
|
-
chartsSearchPlaceholder: "Search fields",
|
|
3215
|
-
chartsSearchLabel: "Search fields",
|
|
3216
|
-
chartsSearchClear: "Clear search",
|
|
3217
|
-
chartsNoFields: "No fields",
|
|
3218
|
-
chartsFieldBlocked: "This field cannot be added to any section",
|
|
3219
|
-
chartsCategories: "Categories",
|
|
3220
|
-
chartsSeries: "Series",
|
|
3221
|
-
chartsMenuAddToDimensions: (dimensionLabel) => `Add to ${dimensionLabel}`,
|
|
3222
|
-
chartsMenuAddToValues: (valuesLabel) => `Add to ${valuesLabel}`,
|
|
3223
|
-
chartsMenuMoveUp: "Move up",
|
|
3224
|
-
chartsMenuMoveDown: "Move down",
|
|
3225
|
-
chartsMenuMoveToTop: "Move to top",
|
|
3226
|
-
chartsMenuMoveToBottom: "Move to bottom",
|
|
3227
|
-
chartsMenuOptions: "Field options",
|
|
3228
|
-
chartsMenuRemove: "Remove",
|
|
3229
|
-
chartsDragToDimensions: (dimensionLabel) => `Drag here to use column as ${dimensionLabel}`,
|
|
3230
|
-
chartsDragToValues: (valuesLabel) => `Drag here to use column as ${valuesLabel}`,
|
|
3231
|
-
// AI Assistant panel
|
|
3232
|
-
aiAssistantPanelTitle: "AI Assistant",
|
|
3233
|
-
aiAssistantPanelClose: "Close AI Assistant",
|
|
3234
|
-
aiAssistantPanelNewConversation: "New conversation",
|
|
3235
|
-
aiAssistantPanelConversationHistory: "Conversation history",
|
|
3236
|
-
aiAssistantPanelEmptyConversation: "No prompt history",
|
|
3237
|
-
aiAssistantSuggestions: "Suggestions",
|
|
3238
|
-
// Prompt field
|
|
3239
|
-
promptFieldLabel: "Prompt",
|
|
3240
|
-
promptFieldPlaceholder: "Type a prompt\u2026",
|
|
3241
|
-
promptFieldPlaceholderWithRecording: "Type or record a prompt\u2026",
|
|
3242
|
-
promptFieldPlaceholderListening: "Listening for prompt\u2026",
|
|
3243
|
-
promptFieldSpeechRecognitionNotSupported: "Speech recognition is not supported in this browser",
|
|
3244
|
-
promptFieldSend: "Send",
|
|
3245
|
-
promptFieldRecord: "Record",
|
|
3246
|
-
promptFieldStopRecording: "Stop recording",
|
|
3247
|
-
// Prompt
|
|
3248
|
-
promptRerun: "Run again",
|
|
3249
|
-
promptProcessing: "Processing\u2026",
|
|
3250
|
-
promptAppliedChanges: "Applied changes",
|
|
3251
|
-
// Prompt changes
|
|
3252
|
-
promptChangeGroupDescription: (column) => `Group by ${column}`,
|
|
3253
|
-
promptChangeAggregationLabel: (column, aggregation) => `${column} (${aggregation})`,
|
|
3254
|
-
promptChangeAggregationDescription: (column, aggregation) => `Aggregate ${column} (${aggregation})`,
|
|
3255
|
-
promptChangeFilterLabel: (column, operator, value) => {
|
|
3256
|
-
if (operator === "is any of") {
|
|
3257
|
-
return `${column} is any of: ${value}`;
|
|
3258
|
-
}
|
|
3259
|
-
return `${column} ${operator} ${value}`;
|
|
3260
|
-
},
|
|
3261
|
-
promptChangeFilterDescription: (column, operator, value) => {
|
|
3262
|
-
if (operator === "is any of") {
|
|
3263
|
-
return `Filter where ${column} is any of: ${value}`;
|
|
3264
|
-
}
|
|
3265
|
-
return `Filter where ${column} ${operator} ${value}`;
|
|
3266
|
-
},
|
|
3267
|
-
promptChangeSortDescription: (column, direction) => `Sort by ${column} (${direction})`,
|
|
3268
|
-
promptChangePivotEnableLabel: "Pivot",
|
|
3269
|
-
promptChangePivotEnableDescription: "Enable pivot",
|
|
3270
|
-
promptChangePivotColumnsLabel: (count) => `Columns (${count})`,
|
|
3271
|
-
promptChangePivotColumnsDescription: (column, direction) => `${column}${direction ? ` (${direction})` : ""}`,
|
|
3272
|
-
promptChangePivotRowsLabel: (count) => `Rows (${count})`,
|
|
3273
|
-
promptChangePivotValuesLabel: (count) => `Values (${count})`,
|
|
3274
|
-
promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`,
|
|
3275
|
-
promptChangeChartsLabel: (dimensionsCount, valuesCount) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`
|
|
3276
|
-
};
|
|
3277
|
-
|
|
3278
|
-
// node_modules/@mui/x-data-grid/esm/locales/enUS.js
|
|
3279
|
-
var enUS2 = getGridLocalization(GRID_DEFAULT_LOCALE_TEXT);
|
|
3280
|
-
|
|
3281
|
-
// node_modules/@mui/x-date-pickers/esm/locales/csCZ.js
|
|
3282
|
-
var timeViews = {
|
|
3283
|
-
hours: "Hodiny",
|
|
3284
|
-
minutes: "Minuty",
|
|
3285
|
-
seconds: "Sekundy",
|
|
3286
|
-
meridiem: "Odpoledne"
|
|
3287
|
-
};
|
|
3288
|
-
var csCZPickers = {
|
|
3289
|
-
// Calendar navigation
|
|
3290
|
-
previousMonth: "P\u0159edchoz\xED m\u011Bs\xEDc",
|
|
3291
|
-
nextMonth: "Dal\u0161\xED m\u011Bs\xEDc",
|
|
3292
|
-
// View navigation
|
|
3293
|
-
openPreviousView: "Otev\u0159\xEDt p\u0159edchoz\xED zobrazen\xED",
|
|
3294
|
-
openNextView: "Otev\u0159\xEDt dal\u0161\xED zobrazen\xED",
|
|
3295
|
-
calendarViewSwitchingButtonAriaLabel: (view) => view === "year" ? "ro\u010Dn\xED zobrazen\xED otev\u0159eno, p\u0159epn\u011Bte do zobrazen\xED kalend\xE1\u0159e" : "zobrazen\xED kalend\xE1\u0159e otev\u0159eno, p\u0159epn\u011Bte do zobrazen\xED roku",
|
|
3296
|
-
// DateRange labels
|
|
3297
|
-
start: "Za\u010D\xE1tek",
|
|
3298
|
-
end: "Konec",
|
|
3299
|
-
startDate: "Datum za\u010D\xE1tku",
|
|
3300
|
-
startTime: "\u010Cas za\u010D\xE1tku",
|
|
3301
|
-
endDate: "Datum konce",
|
|
3302
|
-
endTime: "\u010Cas konce",
|
|
3303
|
-
// Action bar
|
|
3304
|
-
cancelButtonLabel: "Zru\u0161it",
|
|
3305
|
-
clearButtonLabel: "Vymazat",
|
|
3306
|
-
okButtonLabel: "Potvrdit",
|
|
3307
|
-
todayButtonLabel: "Dnes",
|
|
3308
|
-
nextStepButtonLabel: "Dal\u0161\xED",
|
|
3309
|
-
// Toolbar titles
|
|
3310
|
-
datePickerToolbarTitle: "Vyberte datum",
|
|
3311
|
-
dateTimePickerToolbarTitle: "Vyberte datum a \u010Das",
|
|
3312
|
-
timePickerToolbarTitle: "Vyberte \u010Das",
|
|
3313
|
-
dateRangePickerToolbarTitle: "Vyberte rozmez\xED dat",
|
|
3314
|
-
// timeRangePickerToolbarTitle: 'Select time range',
|
|
3315
|
-
// Clock labels
|
|
3316
|
-
clockLabelText: (view, formattedTime) => `${timeViews[view] ?? view} vybr\xE1ny. ${!formattedTime ? "Nen\xED vybr\xE1n \u010Das" : `Vybran\xFD \u010Das je ${formattedTime}`}`,
|
|
3317
|
-
hoursClockNumberText: (hours) => `${hours} hodin`,
|
|
3318
|
-
minutesClockNumberText: (minutes) => `${minutes} minut`,
|
|
3319
|
-
secondsClockNumberText: (seconds) => `${seconds} sekund`,
|
|
3320
|
-
// Digital clock labels
|
|
3321
|
-
selectViewText: (view) => `Vyberte ${timeViews[view]}`,
|
|
3322
|
-
// Calendar labels
|
|
3323
|
-
calendarWeekNumberHeaderLabel: "T\xFDden v roce",
|
|
3324
|
-
calendarWeekNumberHeaderText: "#",
|
|
3325
|
-
calendarWeekNumberAriaLabelText: (weekNumber) => `${weekNumber} t\xFDden v roce`,
|
|
3326
|
-
calendarWeekNumberText: (weekNumber) => `${weekNumber}`,
|
|
3327
|
-
// Open Picker labels
|
|
3328
|
-
openDatePickerDialogue: (formattedDate) => formattedDate ? `Vyberte datum, vybran\xE9 datum je ${formattedDate}` : "Vyberte datum",
|
|
3329
|
-
openTimePickerDialogue: (formattedTime) => formattedTime ? `Vyberte \u010Das, vybran\xFD \u010Das je ${formattedTime}` : "Vyberte \u010Das",
|
|
3330
|
-
// openRangePickerDialogue: formattedRange => formattedRange ? `Choose range, selected range is ${formattedRange}` : 'Choose range',
|
|
3331
|
-
fieldClearLabel: "Vymazat",
|
|
3332
|
-
// Table labels
|
|
3333
|
-
timeTableLabel: "vyberte \u010Das",
|
|
3334
|
-
dateTableLabel: "vyberte datum",
|
|
3335
|
-
// Field section placeholders
|
|
3336
|
-
fieldYearPlaceholder: (params) => "Y".repeat(params.digitAmount),
|
|
3337
|
-
fieldMonthPlaceholder: (params) => params.contentType === "letter" ? "MMMM" : "MM",
|
|
3338
|
-
fieldDayPlaceholder: () => "DD",
|
|
3339
|
-
fieldWeekDayPlaceholder: (params) => params.contentType === "letter" ? "EEEE" : "EE",
|
|
3340
|
-
fieldHoursPlaceholder: () => "hh",
|
|
3341
|
-
fieldMinutesPlaceholder: () => "mm",
|
|
3342
|
-
fieldSecondsPlaceholder: () => "ss",
|
|
3343
|
-
fieldMeridiemPlaceholder: () => "aa",
|
|
3344
|
-
// View names
|
|
3345
|
-
year: "Rok",
|
|
3346
|
-
month: "M\u011Bs\xEDc",
|
|
3347
|
-
day: "Den",
|
|
3348
|
-
weekDay: "Pracovn\xED den",
|
|
3349
|
-
hours: "Hodiny",
|
|
3350
|
-
minutes: "Minuty",
|
|
3351
|
-
seconds: "Sekundy",
|
|
3352
|
-
meridiem: "Odpoledne",
|
|
3353
|
-
// Common
|
|
3354
|
-
empty: "Pr\xE1zdn\xFD"
|
|
3355
|
-
};
|
|
3356
|
-
var csCZ2 = getPickersLocalization(csCZPickers);
|
|
3357
|
-
|
|
3358
|
-
// src/hooks/ThemeHook.ts
|
|
3359
|
-
import { useTranslation as useTranslation5 } from "react-i18next";
|
|
3360
|
-
var WISTRON_PRIMARY_COLOR = "#00506E";
|
|
3361
|
-
var WISTRON_SECONDARY_COLOR = "#64DC00";
|
|
3362
|
-
var LOCALE_MAP = {
|
|
3363
|
-
cs: [csCZ, csCZ2, csCZ3],
|
|
3364
|
-
en: [enUS2, enUS, enUS3]
|
|
3365
|
-
};
|
|
3366
|
-
var useGetTheme = (theme) => {
|
|
3367
|
-
const { i18n } = useTranslation5();
|
|
3368
|
-
return createTheme(
|
|
3369
|
-
{
|
|
3370
|
-
cssVariables: {
|
|
3371
|
-
colorSchemeSelector: "data-mui-color-scheme"
|
|
3372
|
-
},
|
|
3373
|
-
colorSchemes: {
|
|
3374
|
-
light: {
|
|
3375
|
-
palette: {
|
|
3376
|
-
primary: { main: WISTRON_PRIMARY_COLOR },
|
|
3377
|
-
secondary: { main: WISTRON_SECONDARY_COLOR }
|
|
3378
|
-
}
|
|
3379
|
-
},
|
|
3380
|
-
dark: {
|
|
3381
|
-
palette: {
|
|
3382
|
-
primary: { main: lighten(WISTRON_PRIMARY_COLOR, 0.5) },
|
|
3383
|
-
secondary: { main: darken(WISTRON_SECONDARY_COLOR, 0.5) }
|
|
3384
|
-
}
|
|
3385
|
-
},
|
|
3386
|
-
...theme?.colorSchemes
|
|
3387
|
-
},
|
|
3388
|
-
components: {
|
|
3389
|
-
MuiCssBaseline: {
|
|
3390
|
-
styleOverrides: ({ palette }) => {
|
|
3391
|
-
return {
|
|
3392
|
-
body: {
|
|
3393
|
-
"&::-webkit-scrollbar, & *::-webkit-scrollbar": {
|
|
3394
|
-
width: "0.7em",
|
|
3395
|
-
height: "0.7em"
|
|
3396
|
-
},
|
|
3397
|
-
"&::-webkit-scrollbar-track, & *::-webkit-scrollbar-track": {
|
|
3398
|
-
backgroundColor: palette.mode === "dark" ? grey2[900] : grey2[200],
|
|
3399
|
-
borderRadius: "5px"
|
|
3400
|
-
},
|
|
3401
|
-
"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb": {
|
|
3402
|
-
backgroundColor: palette.mode === "dark" ? grey2[800] : grey2[400],
|
|
3403
|
-
borderRadius: "10px"
|
|
3404
|
-
},
|
|
3405
|
-
"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover": {
|
|
3406
|
-
backgroundColor: palette.mode === "dark" ? grey2[700] : grey2[500]
|
|
3407
|
-
},
|
|
3408
|
-
"&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner": {
|
|
3409
|
-
backgroundColor: "transparent"
|
|
3410
|
-
}
|
|
3411
|
-
}
|
|
3412
|
-
};
|
|
3413
|
-
}
|
|
3414
|
-
},
|
|
3415
|
-
...theme?.components
|
|
3416
|
-
}
|
|
3417
|
-
},
|
|
3418
|
-
...LOCALE_MAP[i18n.language]
|
|
3419
|
-
);
|
|
3420
|
-
};
|
|
3421
|
-
|
|
3422
1714
|
// src/components/core/Layout.tsx
|
|
3423
|
-
import
|
|
1715
|
+
import Menu2 from "@mui/icons-material/Menu";
|
|
3424
1716
|
import MenuOpen from "@mui/icons-material/MenuOpen";
|
|
3425
|
-
import { AppBar, Box as
|
|
1717
|
+
import { AppBar, Box as Box4, CssBaseline, IconButton as IconButton2, InitColorSchemeScript, LinearProgress, Toolbar } from "@mui/material";
|
|
3426
1718
|
import { styled as styled2 } from "@mui/material/styles";
|
|
3427
1719
|
import { useIsFetching, useIsMutating } from "@tanstack/react-query";
|
|
3428
|
-
import { Fragment as
|
|
1720
|
+
import { Fragment as Fragment5, useState as useState5 } from "react";
|
|
3429
1721
|
import { createIsomorphicFn } from "@tanstack/react-start";
|
|
3430
1722
|
import { getCookie } from "@tanstack/react-start/server";
|
|
3431
1723
|
|
|
3432
1724
|
// src/components/core/AppTitle.tsx
|
|
3433
|
-
import { Chip
|
|
3434
|
-
import { jsx as
|
|
1725
|
+
import { Chip, Stack, Typography } from "@mui/material";
|
|
1726
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
3435
1727
|
var AppTitle = () => {
|
|
3436
|
-
return /* @__PURE__ */
|
|
3437
|
-
/* @__PURE__ */
|
|
3438
|
-
/* @__PURE__ */
|
|
3439
|
-
import.meta.env.DEV && /* @__PURE__ */
|
|
1728
|
+
return /* @__PURE__ */ jsxs2(Stack, { direction: "row", alignItems: "center", spacing: 2, flexGrow: 1, children: [
|
|
1729
|
+
/* @__PURE__ */ jsx2("img", { src: "/favicon-32x32.png", alt: "app-logo", loading: "lazy" }),
|
|
1730
|
+
/* @__PURE__ */ jsx2(Typography, { variant: "h6", children: clientEnv.VITE_APP_TITLE }),
|
|
1731
|
+
import.meta.env.DEV && /* @__PURE__ */ jsx2(Chip, { size: "small", label: "TEST", color: "info" })
|
|
3440
1732
|
] });
|
|
3441
1733
|
};
|
|
3442
1734
|
|
|
3443
1735
|
// src/components/core/navigation/NavigationRail.tsx
|
|
3444
1736
|
import { useMediaQuery } from "@mui/material";
|
|
3445
|
-
import
|
|
1737
|
+
import Box2 from "@mui/material/Box";
|
|
3446
1738
|
import Drawer from "@mui/material/Drawer";
|
|
3447
|
-
import { useTheme
|
|
1739
|
+
import { useTheme } from "@mui/material/styles";
|
|
3448
1740
|
import { useNavigate, useRouterState } from "@tanstack/react-router";
|
|
3449
1741
|
|
|
3450
1742
|
// src/components/core/navigation/NavigationList.tsx
|
|
3451
|
-
import
|
|
3452
|
-
import
|
|
1743
|
+
import Divider from "@mui/material/Divider";
|
|
1744
|
+
import List from "@mui/material/List";
|
|
3453
1745
|
import ListSubheader from "@mui/material/ListSubheader";
|
|
3454
|
-
import { Fragment as
|
|
1746
|
+
import { Fragment as Fragment3, useEffect as useEffect2, useState as useState3 } from "react";
|
|
3455
1747
|
|
|
3456
1748
|
// src/components/core/navigation/NavigationListItem.tsx
|
|
3457
1749
|
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
|
3458
1750
|
import { Collapse } from "@mui/material";
|
|
3459
1751
|
import Avatar from "@mui/material/Avatar";
|
|
3460
|
-
import
|
|
1752
|
+
import Box from "@mui/material/Box";
|
|
3461
1753
|
import ListItem from "@mui/material/ListItem";
|
|
3462
|
-
import
|
|
3463
|
-
import
|
|
3464
|
-
import
|
|
3465
|
-
import
|
|
1754
|
+
import ListItemButton from "@mui/material/ListItemButton";
|
|
1755
|
+
import ListItemIcon from "@mui/material/ListItemIcon";
|
|
1756
|
+
import ListItemText from "@mui/material/ListItemText";
|
|
1757
|
+
import Paper from "@mui/material/Paper";
|
|
3466
1758
|
import Popper from "@mui/material/Popper";
|
|
3467
1759
|
import { styled } from "@mui/material/styles";
|
|
3468
|
-
import
|
|
3469
|
-
import { Fragment
|
|
3470
|
-
import { Fragment as
|
|
1760
|
+
import Typography2 from "@mui/material/Typography";
|
|
1761
|
+
import { Fragment, useState as useState2 } from "react";
|
|
1762
|
+
import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
3471
1763
|
var ICON_SIZE = 34;
|
|
3472
|
-
var StyledNavButton = styled(
|
|
1764
|
+
var StyledNavButton = styled(ListItemButton)(({ theme }) => ({
|
|
3473
1765
|
borderRadius: 8,
|
|
3474
1766
|
"&.Mui-selected": {
|
|
3475
1767
|
"& .MuiListItemIcon-root, & .MuiTypography-root, & .MuiSvgIcon-root": {
|
|
@@ -3511,13 +1803,13 @@ var StyledRouterButton = styled(RouterListItemButton)(({ theme }) => ({
|
|
|
3511
1803
|
}));
|
|
3512
1804
|
var IconOrAvatar = ({ item, collapsed }) => {
|
|
3513
1805
|
if (item.icon || collapsed) {
|
|
3514
|
-
return /* @__PURE__ */
|
|
3515
|
-
/* @__PURE__ */
|
|
1806
|
+
return /* @__PURE__ */ jsxs3(Box, { sx: collapsed ? { position: "absolute", left: "50%", top: "calc(50% - 6px)", transform: "translate(-50%, -50%)" } : {}, children: [
|
|
1807
|
+
/* @__PURE__ */ jsxs3(ListItemIcon, { sx: { display: "flex", alignItems: "center", justifyContent: "center", minWidth: ICON_SIZE }, children: [
|
|
3516
1808
|
item.icon ?? null,
|
|
3517
|
-
!item.icon && collapsed ? /* @__PURE__ */
|
|
1809
|
+
!item.icon && collapsed ? /* @__PURE__ */ jsx3(Avatar, { sx: { width: ICON_SIZE - 7, height: ICON_SIZE - 7, fontSize: 12 }, children: item.title }) : null
|
|
3518
1810
|
] }),
|
|
3519
|
-
collapsed ? /* @__PURE__ */
|
|
3520
|
-
|
|
1811
|
+
collapsed ? /* @__PURE__ */ jsx3(
|
|
1812
|
+
Typography2,
|
|
3521
1813
|
{
|
|
3522
1814
|
variant: "caption",
|
|
3523
1815
|
sx: {
|
|
@@ -3540,7 +1832,7 @@ var IconOrAvatar = ({ item, collapsed }) => {
|
|
|
3540
1832
|
}
|
|
3541
1833
|
return null;
|
|
3542
1834
|
};
|
|
3543
|
-
var MiniPopover = ({ open, anchorEl, children }) => /* @__PURE__ */
|
|
1835
|
+
var MiniPopover = ({ open, anchorEl, children }) => /* @__PURE__ */ jsx3(
|
|
3544
1836
|
Popper,
|
|
3545
1837
|
{
|
|
3546
1838
|
open,
|
|
@@ -3551,8 +1843,8 @@ var MiniPopover = ({ open, anchorEl, children }) => /* @__PURE__ */ jsx22(
|
|
|
3551
1843
|
{ name: "preventOverflow", options: { padding: 8 } },
|
|
3552
1844
|
{ name: "flip", options: { fallbackPlacements: ["right-end", "left-start"] } }
|
|
3553
1845
|
],
|
|
3554
|
-
children: /* @__PURE__ */
|
|
3555
|
-
|
|
1846
|
+
children: /* @__PURE__ */ jsx3(
|
|
1847
|
+
Paper,
|
|
3556
1848
|
{
|
|
3557
1849
|
sx: {
|
|
3558
1850
|
pt: 0.5,
|
|
@@ -3567,8 +1859,8 @@ var MiniPopover = ({ open, anchorEl, children }) => /* @__PURE__ */ jsx22(
|
|
|
3567
1859
|
}
|
|
3568
1860
|
);
|
|
3569
1861
|
var NavigationListItem = ({ item, isOpen, selected, disabled, collapsed, isSidebarFullyExpanded = true, isSidebarFullyCollapsed, onClick, renderNested, onClose }) => {
|
|
3570
|
-
const [hoveredPopoverItem, setHoveredPopoverItem] =
|
|
3571
|
-
const [anchorElement, setAnchorElement] =
|
|
1862
|
+
const [hoveredPopoverItem, setHoveredPopoverItem] = useState2(null);
|
|
1863
|
+
const [anchorElement, setAnchorElement] = useState2(null);
|
|
3572
1864
|
const chevronSx = () => {
|
|
3573
1865
|
if (collapsed && isSidebarFullyCollapsed && item.children) {
|
|
3574
1866
|
return {
|
|
@@ -3593,19 +1885,19 @@ var NavigationListItem = ({ item, isOpen, selected, disabled, collapsed, isSideb
|
|
|
3593
1885
|
disabled,
|
|
3594
1886
|
sx: { px: 1.4, height: collapsed ? 60 : 48 }
|
|
3595
1887
|
};
|
|
3596
|
-
const buttonContent = /* @__PURE__ */
|
|
3597
|
-
/* @__PURE__ */
|
|
3598
|
-
!collapsed && /* @__PURE__ */
|
|
3599
|
-
|
|
1888
|
+
const buttonContent = /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
1889
|
+
/* @__PURE__ */ jsx3(IconOrAvatar, { item, collapsed }),
|
|
1890
|
+
!collapsed && /* @__PURE__ */ jsx3(
|
|
1891
|
+
ListItemText,
|
|
3600
1892
|
{
|
|
3601
1893
|
primary: item.title,
|
|
3602
1894
|
slotProps: { primary: { noWrap: true, title: item.title } },
|
|
3603
1895
|
sx: { ml: 1.2, flex: 1, minWidth: 0, "& .MuiTypography-root": { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" } }
|
|
3604
1896
|
}
|
|
3605
1897
|
),
|
|
3606
|
-
item.children ? /* @__PURE__ */
|
|
1898
|
+
item.children ? /* @__PURE__ */ jsx3(ExpandMoreIcon, { sx: chevronSx }) : null
|
|
3607
1899
|
] });
|
|
3608
|
-
const listItem = /* @__PURE__ */
|
|
1900
|
+
const listItem = /* @__PURE__ */ jsxs3(
|
|
3609
1901
|
ListItem,
|
|
3610
1902
|
{
|
|
3611
1903
|
...item.children && collapsed ? {
|
|
@@ -3619,7 +1911,7 @@ var NavigationListItem = ({ item, isOpen, selected, disabled, collapsed, isSideb
|
|
|
3619
1911
|
} : {},
|
|
3620
1912
|
sx: { py: 0, px: 1, overflowX: "hidden" },
|
|
3621
1913
|
children: [
|
|
3622
|
-
shouldJustExpand ? /* @__PURE__ */
|
|
1914
|
+
shouldJustExpand ? /* @__PURE__ */ jsx3(StyledNavButton, { ...buttonProps, onClick: () => onClick?.(item), children: buttonContent }) : /* @__PURE__ */ jsx3(
|
|
3623
1915
|
StyledRouterButton,
|
|
3624
1916
|
{
|
|
3625
1917
|
...buttonProps,
|
|
@@ -3631,28 +1923,28 @@ var NavigationListItem = ({ item, isOpen, selected, disabled, collapsed, isSideb
|
|
|
3631
1923
|
children: buttonContent
|
|
3632
1924
|
}
|
|
3633
1925
|
),
|
|
3634
|
-
item.children && collapsed ? /* @__PURE__ */
|
|
1926
|
+
item.children && collapsed ? /* @__PURE__ */ jsx3(MiniPopover, { open: item.title === hoveredPopoverItem, anchorEl: anchorElement, children: renderNested?.(item.children) }) : null
|
|
3635
1927
|
]
|
|
3636
1928
|
}
|
|
3637
1929
|
);
|
|
3638
|
-
return /* @__PURE__ */
|
|
1930
|
+
return /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
3639
1931
|
listItem,
|
|
3640
|
-
item.children && !collapsed ? /* @__PURE__ */
|
|
1932
|
+
item.children && !collapsed ? /* @__PURE__ */ jsx3(Collapse, { in: isOpen, timeout: "auto", unmountOnExit: true, children: renderNested?.(item.children) }) : null
|
|
3641
1933
|
] }, item.to);
|
|
3642
1934
|
};
|
|
3643
1935
|
|
|
3644
1936
|
// src/components/core/navigation/NavigationList.tsx
|
|
3645
|
-
import { jsx as
|
|
1937
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
3646
1938
|
var isPageItem = (item) => !("kind" in item);
|
|
3647
1939
|
var isDivider = (item) => "kind" in item && item.kind === "divider";
|
|
3648
1940
|
var isHeader = (item) => "kind" in item && item.kind === "header";
|
|
3649
1941
|
var NavigationList = ({ subNavigation, depth = 0, collapsed, isPopover, isSidebarFullyExpanded = true, isSidebarFullyCollapsed, expandedWidth, renderItem, activePath, onNavigate, onClose }) => {
|
|
3650
|
-
const [openKeys, setOpenKeys] =
|
|
3651
|
-
|
|
1942
|
+
const [openKeys, setOpenKeys] = useState3([]);
|
|
1943
|
+
useEffect2(() => {
|
|
3652
1944
|
if (collapsed) setOpenKeys([]);
|
|
3653
1945
|
}, [collapsed]);
|
|
3654
1946
|
const toggleKey = (key) => setOpenKeys((previous) => previous.includes(key) ? previous.filter((k) => k !== key) : [...previous, key]);
|
|
3655
|
-
const renderNested = (children) => /* @__PURE__ */
|
|
1947
|
+
const renderNested = (children) => /* @__PURE__ */ jsx4(
|
|
3656
1948
|
NavigationList,
|
|
3657
1949
|
{
|
|
3658
1950
|
subNavigation: children,
|
|
@@ -3665,8 +1957,8 @@ var NavigationList = ({ subNavigation, depth = 0, collapsed, isPopover, isSideba
|
|
|
3665
1957
|
}
|
|
3666
1958
|
);
|
|
3667
1959
|
const filteredNavigation = subNavigation.filter((nav) => !nav.hidden);
|
|
3668
|
-
return /* @__PURE__ */
|
|
3669
|
-
|
|
1960
|
+
return /* @__PURE__ */ jsx4(
|
|
1961
|
+
List,
|
|
3670
1962
|
{
|
|
3671
1963
|
sx: {
|
|
3672
1964
|
padding: 0,
|
|
@@ -3678,7 +1970,7 @@ var NavigationList = ({ subNavigation, depth = 0, collapsed, isPopover, isSideba
|
|
|
3678
1970
|
},
|
|
3679
1971
|
children: filteredNavigation.map((navItem, index) => {
|
|
3680
1972
|
if (isHeader(navItem)) {
|
|
3681
|
-
return /* @__PURE__ */
|
|
1973
|
+
return /* @__PURE__ */ jsx4(
|
|
3682
1974
|
ListSubheader,
|
|
3683
1975
|
{
|
|
3684
1976
|
sx: {
|
|
@@ -3701,13 +1993,13 @@ var NavigationList = ({ subNavigation, depth = 0, collapsed, isPopover, isSideba
|
|
|
3701
1993
|
}
|
|
3702
1994
|
if (isDivider(navItem)) {
|
|
3703
1995
|
const nextItem = filteredNavigation[index + 1];
|
|
3704
|
-
return /* @__PURE__ */
|
|
1996
|
+
return /* @__PURE__ */ jsx4("li", { children: /* @__PURE__ */ jsx4(Divider, { sx: { mx: 1, mt: 1, mb: isHeader(nextItem) && !collapsed ? 0 : 1 } }) }, `divider-${depth}-${index}`);
|
|
3705
1997
|
}
|
|
3706
1998
|
if (!isPageItem(navItem)) return null;
|
|
3707
1999
|
const key = `item-${depth}-${index}`;
|
|
3708
2000
|
const uniqueItemKey = `${depth}-${index}-${navItem.title}`;
|
|
3709
|
-
if (renderItem) return /* @__PURE__ */
|
|
3710
|
-
return /* @__PURE__ */
|
|
2001
|
+
if (renderItem) return /* @__PURE__ */ jsx4(Fragment3, { children: renderItem(navItem, { collapsed: !!collapsed }) }, key);
|
|
2002
|
+
return /* @__PURE__ */ jsx4(
|
|
3711
2003
|
NavigationListItem,
|
|
3712
2004
|
{
|
|
3713
2005
|
item: navItem,
|
|
@@ -3728,17 +2020,17 @@ var NavigationList = ({ subNavigation, depth = 0, collapsed, isPopover, isSideba
|
|
|
3728
2020
|
};
|
|
3729
2021
|
|
|
3730
2022
|
// src/components/core/navigation/NavigationRail.tsx
|
|
3731
|
-
import { jsx as
|
|
2023
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
3732
2024
|
var MINI_WIDTH = 84;
|
|
3733
2025
|
var EXPANDED_WIDTH = 320;
|
|
3734
2026
|
var TOOLBAR_HEIGHT = 64;
|
|
3735
2027
|
var NavigationRail = ({ navigation, expanded, setExpanded }) => {
|
|
3736
2028
|
const navigate = useNavigate();
|
|
3737
2029
|
const routerState = useRouterState();
|
|
3738
|
-
const theme =
|
|
2030
|
+
const theme = useTheme();
|
|
3739
2031
|
const showPermanent = useMediaQuery(theme.breakpoints.up("sm"));
|
|
3740
|
-
const drawerContent = (collapsed) => /* @__PURE__ */
|
|
3741
|
-
|
|
2032
|
+
const drawerContent = (collapsed) => /* @__PURE__ */ jsx5(
|
|
2033
|
+
Box2,
|
|
3742
2034
|
{
|
|
3743
2035
|
component: "nav",
|
|
3744
2036
|
sx: {
|
|
@@ -3751,7 +2043,7 @@ var NavigationRail = ({ navigation, expanded, setExpanded }) => {
|
|
|
3751
2043
|
overflowX: "hidden",
|
|
3752
2044
|
pt: navigation[0] && isHeader(navigation[0]) && !collapsed ? 0 : 2
|
|
3753
2045
|
},
|
|
3754
|
-
children: /* @__PURE__ */
|
|
2046
|
+
children: /* @__PURE__ */ jsx5(
|
|
3755
2047
|
NavigationList,
|
|
3756
2048
|
{
|
|
3757
2049
|
subNavigation: navigation,
|
|
@@ -3767,7 +2059,7 @@ var NavigationRail = ({ navigation, expanded, setExpanded }) => {
|
|
|
3767
2059
|
}
|
|
3768
2060
|
);
|
|
3769
2061
|
if (showPermanent)
|
|
3770
|
-
return /* @__PURE__ */
|
|
2062
|
+
return /* @__PURE__ */ jsx5(
|
|
3771
2063
|
Drawer,
|
|
3772
2064
|
{
|
|
3773
2065
|
variant: "permanent",
|
|
@@ -3785,7 +2077,7 @@ var NavigationRail = ({ navigation, expanded, setExpanded }) => {
|
|
|
3785
2077
|
children: drawerContent(!expanded)
|
|
3786
2078
|
}
|
|
3787
2079
|
);
|
|
3788
|
-
return /* @__PURE__ */
|
|
2080
|
+
return /* @__PURE__ */ jsx5(Drawer, { open: expanded, onClose: () => setExpanded(false), children: drawerContent(!expanded) });
|
|
3789
2081
|
};
|
|
3790
2082
|
|
|
3791
2083
|
// src/components/core/ToolbarAccount.tsx
|
|
@@ -3799,25 +2091,17 @@ import Login from "@mui/icons-material/Login";
|
|
|
3799
2091
|
import Logout from "@mui/icons-material/Logout";
|
|
3800
2092
|
import SettingsBrightness from "@mui/icons-material/SettingsBrightness";
|
|
3801
2093
|
import Translate from "@mui/icons-material/Translate";
|
|
3802
|
-
import { Avatar as Avatar2, Box as
|
|
3803
|
-
import { Fragment as
|
|
3804
|
-
import { useTranslation
|
|
2094
|
+
import { Avatar as Avatar2, Box as Box3, IconButton, List as List2, ListItem as ListItem2, ListItemButton as ListItemButton2, ListItemIcon as ListItemIcon2, ListItemText as ListItemText2, ListSubheader as ListSubheader2, Menu, Typography as Typography3, useColorScheme } from "@mui/material";
|
|
2095
|
+
import { Fragment as Fragment4, useState as useState4 } from "react";
|
|
2096
|
+
import { useTranslation } from "react-i18next";
|
|
3805
2097
|
import Done from "@mui/icons-material/Done";
|
|
3806
|
-
|
|
3807
|
-
// src/lib/auth/auth-client.ts
|
|
3808
|
-
import { createAuthClient } from "better-auth/react";
|
|
3809
|
-
var authClient = createAuthClient({
|
|
3810
|
-
baseURL: clientEnv.VITE_BASE_URL
|
|
3811
|
-
});
|
|
3812
|
-
|
|
3813
|
-
// src/components/core/ToolbarAccount.tsx
|
|
3814
|
-
import { jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2098
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
3815
2099
|
var capitalize = (value) => value && value.charAt(0).toUpperCase() + value.slice(1);
|
|
3816
2100
|
var ToolbarAccount = () => {
|
|
3817
|
-
const [anchorElement, setAnchorElement] =
|
|
3818
|
-
const [tab, setTab] =
|
|
2101
|
+
const [anchorElement, setAnchorElement] = useState4();
|
|
2102
|
+
const [tab, setTab] = useState4("settings");
|
|
3819
2103
|
const open = Boolean(anchorElement);
|
|
3820
|
-
const { t, i18n } =
|
|
2104
|
+
const { t, i18n } = useTranslation();
|
|
3821
2105
|
const { mode, setMode } = useColorScheme();
|
|
3822
2106
|
const { data: session } = authClient.useSession();
|
|
3823
2107
|
const { alert } = useDialogs();
|
|
@@ -3844,24 +2128,24 @@ var ToolbarAccount = () => {
|
|
|
3844
2128
|
setTimeout(() => setTab("settings"), 300);
|
|
3845
2129
|
};
|
|
3846
2130
|
const changeTab = (newTab) => () => setTab(newTab);
|
|
3847
|
-
const settings = /* @__PURE__ */
|
|
3848
|
-
/* @__PURE__ */
|
|
3849
|
-
/* @__PURE__ */
|
|
3850
|
-
/* @__PURE__ */
|
|
3851
|
-
/* @__PURE__ */
|
|
2131
|
+
const settings = /* @__PURE__ */ jsxs4(List2, { component: "nav", subheader: /* @__PURE__ */ jsx6(ListSubheader2, { sx: { backgroundColor: "transparent" }, children: t("Layout.Settings") }), children: [
|
|
2132
|
+
/* @__PURE__ */ jsxs4(ListItemButton2, { onClick: changeTab("theme"), sx: { py: 0.3 }, children: [
|
|
2133
|
+
/* @__PURE__ */ jsx6(ListItemIcon2, { children: /* @__PURE__ */ jsx6(Brightness4, {}) }),
|
|
2134
|
+
/* @__PURE__ */ jsx6(ListItemText2, { primary: t("Layout.Appearance"), secondary: colorModes.find((m) => m.mode === mode)?.label }),
|
|
2135
|
+
/* @__PURE__ */ jsx6(ChevronRight, {})
|
|
3852
2136
|
] }),
|
|
3853
|
-
/* @__PURE__ */
|
|
3854
|
-
/* @__PURE__ */
|
|
3855
|
-
/* @__PURE__ */
|
|
3856
|
-
/* @__PURE__ */
|
|
2137
|
+
/* @__PURE__ */ jsxs4(ListItemButton2, { onClick: changeTab("language"), sx: { py: 0.3 }, children: [
|
|
2138
|
+
/* @__PURE__ */ jsx6(ListItemIcon2, { children: /* @__PURE__ */ jsx6(Translate, {}) }),
|
|
2139
|
+
/* @__PURE__ */ jsx6(ListItemText2, { primary: t("Layout.Language"), secondary: capitalize(languageDisplayNames.of(i18n.language)) }),
|
|
2140
|
+
/* @__PURE__ */ jsx6(ChevronRight, {})
|
|
3857
2141
|
] })
|
|
3858
2142
|
] });
|
|
3859
|
-
const theme = /* @__PURE__ */
|
|
3860
|
-
/* @__PURE__ */
|
|
2143
|
+
const theme = /* @__PURE__ */ jsx6(List2, { subheader: /* @__PURE__ */ jsxs4(ListSubheader2, { onClick: changeTab("settings"), sx: { backgroundColor: "transparent", display: "flex", alignItems: "center", px: 1, cursor: "pointer" }, children: [
|
|
2144
|
+
/* @__PURE__ */ jsx6(IconButton, { size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx6(ArrowBack, { fontSize: "small" }) }),
|
|
3861
2145
|
" ",
|
|
3862
2146
|
t("Layout.Appearance")
|
|
3863
|
-
] }), children: colorModes.map(({ mode: modeValue, icon: Icon, label }) => /* @__PURE__ */
|
|
3864
|
-
|
|
2147
|
+
] }), children: colorModes.map(({ mode: modeValue, icon: Icon, label }) => /* @__PURE__ */ jsxs4(
|
|
2148
|
+
ListItemButton2,
|
|
3865
2149
|
{
|
|
3866
2150
|
onClick: () => {
|
|
3867
2151
|
setMode(modeValue);
|
|
@@ -3869,62 +2153,62 @@ var ToolbarAccount = () => {
|
|
|
3869
2153
|
},
|
|
3870
2154
|
selected: mode === modeValue,
|
|
3871
2155
|
children: [
|
|
3872
|
-
/* @__PURE__ */
|
|
3873
|
-
/* @__PURE__ */
|
|
2156
|
+
/* @__PURE__ */ jsx6(ListItemIcon2, { children: /* @__PURE__ */ jsx6(Icon, {}) }),
|
|
2157
|
+
/* @__PURE__ */ jsx6(ListItemText2, { primary: label })
|
|
3874
2158
|
]
|
|
3875
2159
|
},
|
|
3876
2160
|
modeValue
|
|
3877
2161
|
)) });
|
|
3878
|
-
const language = /* @__PURE__ */
|
|
3879
|
-
/* @__PURE__ */
|
|
2162
|
+
const language = /* @__PURE__ */ jsx6(List2, { subheader: /* @__PURE__ */ jsxs4(ListSubheader2, { onClick: changeTab("settings"), sx: { backgroundColor: "transparent", display: "flex", alignItems: "center", px: 1, cursor: "pointer" }, children: [
|
|
2163
|
+
/* @__PURE__ */ jsx6(IconButton, { size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx6(ArrowBack, { fontSize: "small" }) }),
|
|
3880
2164
|
" ",
|
|
3881
2165
|
t("Layout.Language")
|
|
3882
2166
|
] }), children: supportedLanguages.map(
|
|
3883
|
-
(languageCode) => /* @__PURE__ */
|
|
3884
|
-
|
|
2167
|
+
(languageCode) => /* @__PURE__ */ jsxs4(
|
|
2168
|
+
ListItemButton2,
|
|
3885
2169
|
{
|
|
3886
2170
|
onClick: () => i18n.changeLanguage(languageCode).finally(() => closeMenu()),
|
|
3887
2171
|
selected: i18n.resolvedLanguage === languageCode,
|
|
3888
2172
|
children: [
|
|
3889
|
-
/* @__PURE__ */
|
|
3890
|
-
/* @__PURE__ */
|
|
2173
|
+
/* @__PURE__ */ jsx6(ListItemIcon2, { children: i18n.resolvedLanguage === languageCode && /* @__PURE__ */ jsx6(Done, {}) }),
|
|
2174
|
+
/* @__PURE__ */ jsx6(ListItemText2, { primary: capitalize(languageDisplayNames.of(languageCode)) })
|
|
3891
2175
|
]
|
|
3892
2176
|
},
|
|
3893
2177
|
languageCode
|
|
3894
2178
|
)
|
|
3895
2179
|
) });
|
|
3896
|
-
return /* @__PURE__ */
|
|
3897
|
-
/* @__PURE__ */
|
|
3898
|
-
/* @__PURE__ */
|
|
3899
|
-
/* @__PURE__ */
|
|
3900
|
-
/* @__PURE__ */
|
|
3901
|
-
/* @__PURE__ */
|
|
3902
|
-
/* @__PURE__ */
|
|
3903
|
-
/* @__PURE__ */
|
|
2180
|
+
return /* @__PURE__ */ jsxs4(Fragment4, { children: [
|
|
2181
|
+
/* @__PURE__ */ jsx6(IconButton, { size: "small", edge: "end", onClick: openMenu, children: user.name ? /* @__PURE__ */ jsx6(Avatar2, { sx: { width: { xs: 32, sm: 40 }, height: { xs: 32, sm: 40 }, bgcolor: "primary.main" }, children: /* @__PURE__ */ jsx6(Typography3, { variant: "subtitle2", sx: { fontWeight: "bold", lineHeight: 0 }, children: usernameInitials() }) }) : /* @__PURE__ */ jsx6(AccountCircle, { fontSize: "large" }) }),
|
|
2182
|
+
/* @__PURE__ */ jsx6(Menu, { anchorEl: anchorElement, open, onClose: closeMenu, children: /* @__PURE__ */ jsxs4(Box3, { sx: { width: 240 }, children: [
|
|
2183
|
+
/* @__PURE__ */ jsx6(List2, { children: session ? /* @__PURE__ */ jsxs4(Fragment4, { children: [
|
|
2184
|
+
/* @__PURE__ */ jsx6(ListItem2, { children: /* @__PURE__ */ jsx6(ListItemText2, { primary: user.name, secondary: /* @__PURE__ */ jsxs4("span", { children: [
|
|
2185
|
+
/* @__PURE__ */ jsx6("span", { children: user.employeeId }),
|
|
2186
|
+
/* @__PURE__ */ jsx6("br", {}),
|
|
2187
|
+
/* @__PURE__ */ jsx6("span", { children: user.department })
|
|
3904
2188
|
] }) }) }),
|
|
3905
|
-
/* @__PURE__ */
|
|
3906
|
-
|
|
2189
|
+
/* @__PURE__ */ jsxs4(
|
|
2190
|
+
ListItemButton2,
|
|
3907
2191
|
{
|
|
3908
2192
|
onClick: () => authClient.signOut({}, {
|
|
3909
2193
|
onSuccess: () => closeMenu(),
|
|
3910
2194
|
onError: ({ error }) => alert(error.message)
|
|
3911
2195
|
}),
|
|
3912
2196
|
children: [
|
|
3913
|
-
/* @__PURE__ */
|
|
3914
|
-
/* @__PURE__ */
|
|
2197
|
+
/* @__PURE__ */ jsx6(ListItemIcon2, { children: /* @__PURE__ */ jsx6(Logout, { color: "error" }) }),
|
|
2198
|
+
/* @__PURE__ */ jsx6(ListItemText2, { primary: t("Layout.Logout") })
|
|
3915
2199
|
]
|
|
3916
2200
|
}
|
|
3917
2201
|
)
|
|
3918
|
-
] }) : /* @__PURE__ */
|
|
3919
|
-
|
|
2202
|
+
] }) : /* @__PURE__ */ jsxs4(
|
|
2203
|
+
ListItemButton2,
|
|
3920
2204
|
{
|
|
3921
2205
|
onClick: () => authClient.signIn.social({ provider: "microsoft" }, {
|
|
3922
2206
|
onSuccess: () => closeMenu(),
|
|
3923
2207
|
onError: ({ error }) => alert(error.message)
|
|
3924
2208
|
}),
|
|
3925
2209
|
children: [
|
|
3926
|
-
/* @__PURE__ */
|
|
3927
|
-
/* @__PURE__ */
|
|
2210
|
+
/* @__PURE__ */ jsx6(ListItemIcon2, { children: /* @__PURE__ */ jsx6(Login, { color: "success" }) }),
|
|
2211
|
+
/* @__PURE__ */ jsx6(ListItemText2, { primary: t("Layout.LogIn") })
|
|
3928
2212
|
]
|
|
3929
2213
|
}
|
|
3930
2214
|
) }),
|
|
@@ -3936,7 +2220,7 @@ var ToolbarAccount = () => {
|
|
|
3936
2220
|
};
|
|
3937
2221
|
|
|
3938
2222
|
// src/components/core/Layout.tsx
|
|
3939
|
-
import { jsx as
|
|
2223
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
3940
2224
|
var YEAR_IN_SECONDS = 60 * 60 * 24 * 365;
|
|
3941
2225
|
var getNavigationOpenStatus = createIsomorphicFn().server(() => {
|
|
3942
2226
|
const cookie = getCookie("navigationOpen");
|
|
@@ -3953,14 +2237,14 @@ var DrawerHeader = styled2("div")(({ theme }) => ({
|
|
|
3953
2237
|
...theme.mixins.toolbar
|
|
3954
2238
|
}));
|
|
3955
2239
|
var Layout = (props) => {
|
|
3956
|
-
const [navigationOpen, setNavigationOpen] =
|
|
2240
|
+
const [navigationOpen, setNavigationOpen] = useState5(getNavigationOpenStatus);
|
|
3957
2241
|
const isFetching = !!useIsFetching();
|
|
3958
2242
|
const isMutating = !!useIsMutating();
|
|
3959
|
-
return /* @__PURE__ */
|
|
3960
|
-
/* @__PURE__ */
|
|
3961
|
-
/* @__PURE__ */
|
|
3962
|
-
/* @__PURE__ */
|
|
3963
|
-
/* @__PURE__ */
|
|
2243
|
+
return /* @__PURE__ */ jsxs5(Fragment5, { children: [
|
|
2244
|
+
/* @__PURE__ */ jsx7(InitColorSchemeScript, {}),
|
|
2245
|
+
/* @__PURE__ */ jsx7(CssBaseline, {}),
|
|
2246
|
+
/* @__PURE__ */ jsxs5(Box4, { sx: { display: "flex", height: "100dvh", maxHeight: "100dvh", overflow: "hidden", width: "100%" }, children: [
|
|
2247
|
+
/* @__PURE__ */ jsx7(
|
|
3964
2248
|
AppBar,
|
|
3965
2249
|
{
|
|
3966
2250
|
color: "transparent",
|
|
@@ -3970,9 +2254,9 @@ var Layout = (props) => {
|
|
|
3970
2254
|
borderColor: theme.vars?.palette.divider,
|
|
3971
2255
|
boxShadow: "none"
|
|
3972
2256
|
}),
|
|
3973
|
-
children: /* @__PURE__ */
|
|
3974
|
-
props.navigation && /* @__PURE__ */
|
|
3975
|
-
|
|
2257
|
+
children: /* @__PURE__ */ jsxs5(Toolbar, { children: [
|
|
2258
|
+
props.navigation && /* @__PURE__ */ jsx7(
|
|
2259
|
+
IconButton2,
|
|
3976
2260
|
{
|
|
3977
2261
|
onClick: () => {
|
|
3978
2262
|
setNavigationOpen((previous) => {
|
|
@@ -3982,15 +2266,15 @@ var Layout = (props) => {
|
|
|
3982
2266
|
});
|
|
3983
2267
|
},
|
|
3984
2268
|
sx: { marginRight: 2 },
|
|
3985
|
-
children: navigationOpen ? /* @__PURE__ */
|
|
2269
|
+
children: navigationOpen ? /* @__PURE__ */ jsx7(MenuOpen, {}) : /* @__PURE__ */ jsx7(Menu2, {})
|
|
3986
2270
|
}
|
|
3987
2271
|
),
|
|
3988
|
-
/* @__PURE__ */
|
|
3989
|
-
/* @__PURE__ */
|
|
2272
|
+
/* @__PURE__ */ jsx7(AppTitle, {}),
|
|
2273
|
+
/* @__PURE__ */ jsx7(ToolbarAccount, {})
|
|
3990
2274
|
] })
|
|
3991
2275
|
}
|
|
3992
2276
|
),
|
|
3993
|
-
props.navigation && /* @__PURE__ */
|
|
2277
|
+
props.navigation && /* @__PURE__ */ jsx7(
|
|
3994
2278
|
NavigationRail,
|
|
3995
2279
|
{
|
|
3996
2280
|
navigation: props.navigation,
|
|
@@ -4001,842 +2285,34 @@ var Layout = (props) => {
|
|
|
4001
2285
|
}
|
|
4002
2286
|
}
|
|
4003
2287
|
),
|
|
4004
|
-
/* @__PURE__ */
|
|
4005
|
-
/* @__PURE__ */
|
|
4006
|
-
/* @__PURE__ */
|
|
2288
|
+
/* @__PURE__ */ jsxs5(Box4, { component: "main", sx: { flexGrow: 1, display: "flex", flexDirection: "column", minWidth: 0, height: "100%", overflow: "hidden" }, children: [
|
|
2289
|
+
/* @__PURE__ */ jsx7(DrawerHeader, {}),
|
|
2290
|
+
/* @__PURE__ */ jsx7(Box4, { sx: { flex: 1, overflow: "auto", position: "relative" }, children: props.children })
|
|
4007
2291
|
] })
|
|
4008
2292
|
] }),
|
|
4009
|
-
(isFetching || isMutating) && /* @__PURE__ */
|
|
2293
|
+
(isFetching || isMutating) && /* @__PURE__ */ jsx7(LinearProgress, { sx: { position: "fixed", top: { xs: 56, sm: 64 }, left: 0, right: 0 } })
|
|
4010
2294
|
] });
|
|
4011
2295
|
};
|
|
4012
2296
|
|
|
4013
2297
|
// src/providers/LayoutProvider.tsx
|
|
4014
|
-
import { jsx as
|
|
2298
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
4015
2299
|
var LayoutProvider = ({ navigation, theme, children }) => {
|
|
4016
|
-
const { i18n } =
|
|
2300
|
+
const { i18n } = useTranslation2();
|
|
4017
2301
|
const createdTheme = useGetTheme(theme);
|
|
4018
|
-
const languageChangedHandler =
|
|
4019
|
-
|
|
2302
|
+
const languageChangedHandler = useEffectEvent(() => {
|
|
2303
|
+
z.config(z.core.locales[i18n.language]());
|
|
4020
2304
|
});
|
|
4021
|
-
|
|
2305
|
+
useEffect3(() => {
|
|
4022
2306
|
languageChangedHandler();
|
|
4023
2307
|
i18n.on("languageChanged", languageChangedHandler);
|
|
4024
2308
|
return () => {
|
|
4025
2309
|
i18n.off("languageChanged", languageChangedHandler);
|
|
4026
2310
|
};
|
|
4027
2311
|
}, []);
|
|
4028
|
-
return /* @__PURE__ */
|
|
4029
|
-
};
|
|
4030
|
-
|
|
4031
|
-
// src/index.ts
|
|
4032
|
-
import { uuidv7 as uuidv72 } from "uuidv7";
|
|
4033
|
-
import { createEnv as createEnv2 } from "@t3-oss/env-core";
|
|
4034
|
-
|
|
4035
|
-
// src/hooks/FormHooks.ts
|
|
4036
|
-
import { createFormHook, createFormHookContexts } from "@tanstack/react-form";
|
|
4037
|
-
|
|
4038
|
-
// src/components/form/FormAutocomplete.tsx
|
|
4039
|
-
import { Autocomplete, TextField } from "@mui/material";
|
|
4040
|
-
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
4041
|
-
var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
|
|
4042
|
-
const field = useFieldContext();
|
|
4043
|
-
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
4044
|
-
return /* @__PURE__ */ jsx28(
|
|
4045
|
-
Autocomplete,
|
|
4046
|
-
{
|
|
4047
|
-
value: field.state.value,
|
|
4048
|
-
onChange: (_, value) => !autocompleteProps.freeSolo && field.handleChange(value),
|
|
4049
|
-
onInputChange: (_, value, reason) => reason !== "reset" && autocompleteProps.freeSolo && field.handleChange(value),
|
|
4050
|
-
onBlur: field.handleBlur,
|
|
4051
|
-
"aria-label": field.name,
|
|
4052
|
-
...autocompleteProps,
|
|
4053
|
-
renderInput: (parameters) => /* @__PURE__ */ jsx28(
|
|
4054
|
-
TextField,
|
|
4055
|
-
{
|
|
4056
|
-
...parameters,
|
|
4057
|
-
name: field.name,
|
|
4058
|
-
error: isTouched && hasError,
|
|
4059
|
-
helperText: isTouched && helperText,
|
|
4060
|
-
...textFieldProps
|
|
4061
|
-
}
|
|
4062
|
-
)
|
|
4063
|
-
}
|
|
4064
|
-
);
|
|
4065
|
-
};
|
|
4066
|
-
|
|
4067
|
-
// src/components/form/FormCheckbox.tsx
|
|
4068
|
-
import { Checkbox, FormControl, FormControlLabel, FormHelperText } from "@mui/material";
|
|
4069
|
-
import { jsx as jsx29, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4070
|
-
var FormCheckbox = (props) => {
|
|
4071
|
-
const field = useFieldContext();
|
|
4072
|
-
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
4073
|
-
return /* @__PURE__ */ jsxs16(FormControl, { component: "fieldset", children: [
|
|
4074
|
-
/* @__PURE__ */ jsx29(
|
|
4075
|
-
FormControlLabel,
|
|
4076
|
-
{
|
|
4077
|
-
control: /* @__PURE__ */ jsx29(
|
|
4078
|
-
Checkbox,
|
|
4079
|
-
{
|
|
4080
|
-
name: field.name,
|
|
4081
|
-
checked: Boolean(field.state.value),
|
|
4082
|
-
onChange: (event) => field.handleChange(event.target.checked),
|
|
4083
|
-
onBlur: field.handleBlur,
|
|
4084
|
-
"aria-label": field.name,
|
|
4085
|
-
...props
|
|
4086
|
-
}
|
|
4087
|
-
),
|
|
4088
|
-
label: props.label ?? ""
|
|
4089
|
-
}
|
|
4090
|
-
),
|
|
4091
|
-
isTouched && hasError && /* @__PURE__ */ jsx29(FormHelperText, { error: hasError, children: helperText })
|
|
4092
|
-
] });
|
|
4093
|
-
};
|
|
4094
|
-
|
|
4095
|
-
// src/components/form/FormDatePicker.tsx
|
|
4096
|
-
import { DatePicker } from "@mui/x-date-pickers-pro";
|
|
4097
|
-
import dayjs2 from "dayjs";
|
|
4098
|
-
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
4099
|
-
var FormDatePicker = (props) => {
|
|
4100
|
-
const field = useFieldContext();
|
|
4101
|
-
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
4102
|
-
return /* @__PURE__ */ jsx30(
|
|
4103
|
-
DatePicker,
|
|
4104
|
-
{
|
|
4105
|
-
name: field.name,
|
|
4106
|
-
value: field.state.value ? dayjs2(field.state.value) : null,
|
|
4107
|
-
onChange: (value) => field.handleChange(value ? value.format() : null),
|
|
4108
|
-
slotProps: {
|
|
4109
|
-
textField: {
|
|
4110
|
-
onBlur: field.handleBlur,
|
|
4111
|
-
error: isTouched && hasError,
|
|
4112
|
-
helperText: isTouched && helperText,
|
|
4113
|
-
...props.textFieldProps
|
|
4114
|
-
},
|
|
4115
|
-
...props.slotProps
|
|
4116
|
-
},
|
|
4117
|
-
"aria-label": field.name,
|
|
4118
|
-
...props
|
|
4119
|
-
}
|
|
4120
|
-
);
|
|
4121
|
-
};
|
|
4122
|
-
|
|
4123
|
-
// src/components/form/FormDateTimePicker.tsx
|
|
4124
|
-
import { DateTimePicker } from "@mui/x-date-pickers-pro";
|
|
4125
|
-
import dayjs3 from "dayjs";
|
|
4126
|
-
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
4127
|
-
var FormDateTimePicker = (props) => {
|
|
4128
|
-
const field = useFieldContext();
|
|
4129
|
-
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
4130
|
-
return /* @__PURE__ */ jsx31(
|
|
4131
|
-
DateTimePicker,
|
|
4132
|
-
{
|
|
4133
|
-
name: field.name,
|
|
4134
|
-
value: field.state.value ? dayjs3(field.state.value) : null,
|
|
4135
|
-
onChange: (value) => field.handleChange(value ? value.format() : null),
|
|
4136
|
-
slotProps: {
|
|
4137
|
-
textField: {
|
|
4138
|
-
onBlur: field.handleBlur,
|
|
4139
|
-
error: isTouched && hasError,
|
|
4140
|
-
helperText: isTouched && helperText,
|
|
4141
|
-
...props.textFieldProps
|
|
4142
|
-
},
|
|
4143
|
-
...props.slotProps
|
|
4144
|
-
},
|
|
4145
|
-
"aria-label": field.name,
|
|
4146
|
-
...props
|
|
4147
|
-
}
|
|
4148
|
-
);
|
|
2312
|
+
return /* @__PURE__ */ jsx8(ThemeProvider, { theme: createdTheme, children: /* @__PURE__ */ jsx8(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: i18n.resolvedLanguage, children: /* @__PURE__ */ jsx8(DialogsProvider, { children: /* @__PURE__ */ jsx8(Layout, { navigation, children }) }) }) });
|
|
4149
2313
|
};
|
|
4150
|
-
|
|
4151
|
-
// src/components/form/FormNumberField.tsx
|
|
4152
|
-
import { TextField as TextField2 } from "@mui/material";
|
|
4153
|
-
import { NumericFormat } from "react-number-format";
|
|
4154
|
-
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
4155
|
-
var FormNumberField = ({ options, ...props }) => {
|
|
4156
|
-
const field = useFieldContext();
|
|
4157
|
-
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
4158
|
-
return /* @__PURE__ */ jsx32(
|
|
4159
|
-
NumericFormat,
|
|
4160
|
-
{
|
|
4161
|
-
customInput: TextField2,
|
|
4162
|
-
name: field.name,
|
|
4163
|
-
value: field.state.value ?? "",
|
|
4164
|
-
onValueChange: ({ floatValue }) => field.handleChange(floatValue),
|
|
4165
|
-
onBlur: field.handleBlur,
|
|
4166
|
-
error: isTouched && hasError,
|
|
4167
|
-
helperText: isTouched && helperText,
|
|
4168
|
-
"aria-label": field.name,
|
|
4169
|
-
...props,
|
|
4170
|
-
...options
|
|
4171
|
-
}
|
|
4172
|
-
);
|
|
4173
|
-
};
|
|
4174
|
-
|
|
4175
|
-
// src/components/form/FormRadioGroup.tsx
|
|
4176
|
-
import { FormControl as FormControl2, FormControlLabel as FormControlLabel2, FormHelperText as FormHelperText2, FormLabel, Radio, RadioGroup } from "@mui/material";
|
|
4177
|
-
import { jsx as jsx33, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4178
|
-
var FormRadioGroup = ({ label, options, ...props }) => {
|
|
4179
|
-
const field = useFieldContext();
|
|
4180
|
-
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
4181
|
-
return /* @__PURE__ */ jsxs17(FormControl2, { component: "fieldset", children: [
|
|
4182
|
-
label && /* @__PURE__ */ jsx33(FormLabel, { component: "legend", children: label }),
|
|
4183
|
-
/* @__PURE__ */ jsx33(
|
|
4184
|
-
RadioGroup,
|
|
4185
|
-
{
|
|
4186
|
-
name: field.name,
|
|
4187
|
-
value: field.state.value ?? "",
|
|
4188
|
-
onChange: (event) => field.handleChange(event.target.value),
|
|
4189
|
-
onBlur: field.handleBlur,
|
|
4190
|
-
"aria-label": field.name,
|
|
4191
|
-
...props,
|
|
4192
|
-
children: options.map((option) => /* @__PURE__ */ jsx33(
|
|
4193
|
-
FormControlLabel2,
|
|
4194
|
-
{
|
|
4195
|
-
value: option.value,
|
|
4196
|
-
control: /* @__PURE__ */ jsx33(Radio, {}),
|
|
4197
|
-
label: option.label
|
|
4198
|
-
},
|
|
4199
|
-
option.value
|
|
4200
|
-
))
|
|
4201
|
-
}
|
|
4202
|
-
),
|
|
4203
|
-
isTouched && hasError && /* @__PURE__ */ jsx33(FormHelperText2, { error: hasError, children: helperText })
|
|
4204
|
-
] });
|
|
4205
|
-
};
|
|
4206
|
-
|
|
4207
|
-
// src/components/form/FormSlider.tsx
|
|
4208
|
-
import { FormControl as FormControl3, FormHelperText as FormHelperText3, FormLabel as FormLabel2, Slider } from "@mui/material";
|
|
4209
|
-
import { jsx as jsx34, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4210
|
-
var FormSlider = ({ label, ...props }) => {
|
|
4211
|
-
const field = useFieldContext();
|
|
4212
|
-
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
4213
|
-
return /* @__PURE__ */ jsxs18(FormControl3, { component: "fieldset", children: [
|
|
4214
|
-
label && /* @__PURE__ */ jsx34(FormLabel2, { children: label }),
|
|
4215
|
-
/* @__PURE__ */ jsx34(
|
|
4216
|
-
Slider,
|
|
4217
|
-
{
|
|
4218
|
-
name: field.name,
|
|
4219
|
-
value: field.state.value ?? 0,
|
|
4220
|
-
onChange: (_, value) => field.handleChange(Array.isArray(value) ? value[0] : value),
|
|
4221
|
-
onBlur: field.handleBlur,
|
|
4222
|
-
"aria-label": field.name,
|
|
4223
|
-
...props
|
|
4224
|
-
}
|
|
4225
|
-
),
|
|
4226
|
-
isTouched && hasError && /* @__PURE__ */ jsx34(FormHelperText3, { error: hasError, children: helperText })
|
|
4227
|
-
] });
|
|
4228
|
-
};
|
|
4229
|
-
|
|
4230
|
-
// src/components/form/FormSubmitButton.tsx
|
|
4231
|
-
import { Button as Button3 } from "@mui/material";
|
|
4232
|
-
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
4233
|
-
var FormSubmitButton = (props) => {
|
|
4234
|
-
const form = useFormContext();
|
|
4235
|
-
const handleClick = (event) => {
|
|
4236
|
-
event.preventDefault();
|
|
4237
|
-
event.stopPropagation();
|
|
4238
|
-
form.handleSubmit();
|
|
4239
|
-
};
|
|
4240
|
-
return /* @__PURE__ */ jsx35(form.Subscribe, { selector: (state) => [state.canSubmit, state.isSubmitting], children: ([canSubmit, isSubmitting]) => /* @__PURE__ */ jsx35(
|
|
4241
|
-
Button3,
|
|
4242
|
-
{
|
|
4243
|
-
loading: isSubmitting,
|
|
4244
|
-
disabled: !canSubmit,
|
|
4245
|
-
onClick: handleClick,
|
|
4246
|
-
type: "submit",
|
|
4247
|
-
"aria-label": "submit",
|
|
4248
|
-
...props
|
|
4249
|
-
}
|
|
4250
|
-
) });
|
|
4251
|
-
};
|
|
4252
|
-
|
|
4253
|
-
// src/components/form/FormSwitch.tsx
|
|
4254
|
-
import { FormControl as FormControl4, FormControlLabel as FormControlLabel3, FormHelperText as FormHelperText4, Switch } from "@mui/material";
|
|
4255
|
-
import { jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4256
|
-
var FormSwitch = (props) => {
|
|
4257
|
-
const field = useFieldContext();
|
|
4258
|
-
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
4259
|
-
return /* @__PURE__ */ jsxs19(FormControl4, { component: "fieldset", children: [
|
|
4260
|
-
/* @__PURE__ */ jsx36(
|
|
4261
|
-
FormControlLabel3,
|
|
4262
|
-
{
|
|
4263
|
-
control: /* @__PURE__ */ jsx36(
|
|
4264
|
-
Switch,
|
|
4265
|
-
{
|
|
4266
|
-
name: field.name,
|
|
4267
|
-
checked: Boolean(field.state.value),
|
|
4268
|
-
onChange: (event) => field.handleChange(event.target.checked),
|
|
4269
|
-
onBlur: field.handleBlur,
|
|
4270
|
-
"aria-label": field.name,
|
|
4271
|
-
...props
|
|
4272
|
-
}
|
|
4273
|
-
),
|
|
4274
|
-
label: props.label ?? ""
|
|
4275
|
-
}
|
|
4276
|
-
),
|
|
4277
|
-
isTouched && hasError && /* @__PURE__ */ jsx36(FormHelperText4, { error: hasError, children: helperText })
|
|
4278
|
-
] });
|
|
4279
|
-
};
|
|
4280
|
-
|
|
4281
|
-
// src/components/form/FormTextField.tsx
|
|
4282
|
-
import { TextField as TextField3 } from "@mui/material";
|
|
4283
|
-
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
4284
|
-
var FormTextField = (props) => {
|
|
4285
|
-
const field = useFieldContext();
|
|
4286
|
-
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
4287
|
-
return /* @__PURE__ */ jsx37(
|
|
4288
|
-
TextField3,
|
|
4289
|
-
{
|
|
4290
|
-
name: field.name,
|
|
4291
|
-
value: field.state.value ?? "",
|
|
4292
|
-
onChange: (event) => field.handleChange(event.target.value),
|
|
4293
|
-
onBlur: field.handleBlur,
|
|
4294
|
-
error: isTouched && hasError,
|
|
4295
|
-
helperText: isTouched && helperText,
|
|
4296
|
-
"aria-label": field.name,
|
|
4297
|
-
...props
|
|
4298
|
-
}
|
|
4299
|
-
);
|
|
4300
|
-
};
|
|
4301
|
-
|
|
4302
|
-
// src/hooks/FormHooks.ts
|
|
4303
|
-
var { fieldContext, useFieldContext, formContext, useFormContext } = createFormHookContexts();
|
|
4304
|
-
var { useAppForm: useLayoutForm, withForm: withLayoutForm } = createFormHook({
|
|
4305
|
-
fieldComponents: {
|
|
4306
|
-
TextField: FormTextField,
|
|
4307
|
-
NumberField: FormNumberField,
|
|
4308
|
-
Autocomplete: FormAutocomplete,
|
|
4309
|
-
Checkbox: FormCheckbox,
|
|
4310
|
-
Switch: FormSwitch,
|
|
4311
|
-
RadioGroup: FormRadioGroup,
|
|
4312
|
-
Slider: FormSlider,
|
|
4313
|
-
DatePicker: FormDatePicker,
|
|
4314
|
-
DateTimePicker: FormDateTimePicker
|
|
4315
|
-
},
|
|
4316
|
-
formComponents: {
|
|
4317
|
-
SubmitButton: FormSubmitButton
|
|
4318
|
-
},
|
|
4319
|
-
fieldContext,
|
|
4320
|
-
formContext
|
|
4321
|
-
});
|
|
4322
|
-
|
|
4323
|
-
// src/hooks/PeopleSoftHooks.ts
|
|
4324
|
-
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
4325
|
-
var QUERY_KEY2 = "ps";
|
|
4326
|
-
var DAY = 1e3 * 60 * 60 * 24;
|
|
4327
|
-
var useGetPeopleSoftEmployeesSearch = (searchTerm, options) => {
|
|
4328
|
-
return useQuery2({
|
|
4329
|
-
...options,
|
|
4330
|
-
queryKey: [QUERY_KEY2, "employee", "search", searchTerm],
|
|
4331
|
-
queryFn: ({ signal }) => httpClient.request({
|
|
4332
|
-
url: `/${QUERY_KEY2}/v1/employee?search=${searchTerm}`,
|
|
4333
|
-
method: "GET",
|
|
4334
|
-
signal
|
|
4335
|
-
}),
|
|
4336
|
-
staleTime: DAY,
|
|
4337
|
-
gcTime: DAY,
|
|
4338
|
-
refetchOnWindowFocus: false
|
|
4339
|
-
});
|
|
4340
|
-
};
|
|
4341
|
-
var useGetPeopleSoftEmployees = (options) => {
|
|
4342
|
-
return useQuery2({
|
|
4343
|
-
...options,
|
|
4344
|
-
queryKey: [QUERY_KEY2, "employee"],
|
|
4345
|
-
queryFn: ({ signal }) => httpClient.request({
|
|
4346
|
-
url: `/${QUERY_KEY2}/v1/employee/all`,
|
|
4347
|
-
method: "GET",
|
|
4348
|
-
signal
|
|
4349
|
-
}),
|
|
4350
|
-
staleTime: DAY,
|
|
4351
|
-
gcTime: DAY,
|
|
4352
|
-
refetchOnWindowFocus: false
|
|
4353
|
-
});
|
|
4354
|
-
};
|
|
4355
|
-
var useGetPeopleSoftActiveEmployees = (options) => {
|
|
4356
|
-
return useQuery2({
|
|
4357
|
-
...options,
|
|
4358
|
-
queryKey: [QUERY_KEY2, "employee", "active"],
|
|
4359
|
-
queryFn: ({ signal }) => httpClient.request({
|
|
4360
|
-
url: `/${QUERY_KEY2}/v1/employee/active`,
|
|
4361
|
-
method: "GET",
|
|
4362
|
-
signal
|
|
4363
|
-
}),
|
|
4364
|
-
staleTime: DAY,
|
|
4365
|
-
gcTime: DAY,
|
|
4366
|
-
refetchOnWindowFocus: false
|
|
4367
|
-
});
|
|
4368
|
-
};
|
|
4369
|
-
var useGetPeopleSoftEmployeeById = (employeeId, options) => {
|
|
4370
|
-
return useQuery2({
|
|
4371
|
-
...options,
|
|
4372
|
-
queryKey: [QUERY_KEY2, "employee", employeeId],
|
|
4373
|
-
queryFn: ({ signal }) => httpClient.request({
|
|
4374
|
-
url: `/${QUERY_KEY2}/v1/employee/${employeeId}`,
|
|
4375
|
-
method: "GET",
|
|
4376
|
-
signal
|
|
4377
|
-
}),
|
|
4378
|
-
staleTime: DAY,
|
|
4379
|
-
gcTime: DAY,
|
|
4380
|
-
refetchOnWindowFocus: false
|
|
4381
|
-
});
|
|
4382
|
-
};
|
|
4383
|
-
var useGetPeopleSoftPreviousEmployeeIds = (options) => {
|
|
4384
|
-
return useQuery2({
|
|
4385
|
-
...options,
|
|
4386
|
-
queryKey: [QUERY_KEY2, "employee", "previousIds"],
|
|
4387
|
-
queryFn: ({ signal }) => httpClient.request({
|
|
4388
|
-
url: `/${QUERY_KEY2}/v1/employee/previousIds`,
|
|
4389
|
-
method: "GET",
|
|
4390
|
-
signal
|
|
4391
|
-
}),
|
|
4392
|
-
staleTime: DAY,
|
|
4393
|
-
gcTime: DAY,
|
|
4394
|
-
refetchOnWindowFocus: false
|
|
4395
|
-
});
|
|
4396
|
-
};
|
|
4397
|
-
var useGetPeopleSoftEmployeeSupervisor = (employeeId, options) => {
|
|
4398
|
-
return useQuery2({
|
|
4399
|
-
...options,
|
|
4400
|
-
queryKey: [QUERY_KEY2, "employee", employeeId, "supervisor"],
|
|
4401
|
-
queryFn: ({ signal }) => httpClient.request({
|
|
4402
|
-
url: `/${QUERY_KEY2}/v1/employee/${employeeId}/supervisor`,
|
|
4403
|
-
method: "GET",
|
|
4404
|
-
signal
|
|
4405
|
-
}),
|
|
4406
|
-
staleTime: DAY,
|
|
4407
|
-
gcTime: DAY,
|
|
4408
|
-
refetchOnWindowFocus: false
|
|
4409
|
-
});
|
|
4410
|
-
};
|
|
4411
|
-
var useGetPeopleSoftEmployeeSubordinates = (employeeId, options) => {
|
|
4412
|
-
return useQuery2({
|
|
4413
|
-
...options,
|
|
4414
|
-
queryKey: [QUERY_KEY2, "employee", employeeId, "subordinates"],
|
|
4415
|
-
queryFn: ({ signal }) => httpClient.request({
|
|
4416
|
-
url: `/${QUERY_KEY2}/v1/employee/${employeeId}/subordinates`,
|
|
4417
|
-
method: "GET",
|
|
4418
|
-
signal
|
|
4419
|
-
}),
|
|
4420
|
-
staleTime: DAY,
|
|
4421
|
-
gcTime: DAY,
|
|
4422
|
-
refetchOnWindowFocus: false
|
|
4423
|
-
});
|
|
4424
|
-
};
|
|
4425
|
-
var useGetPeopleSoftEmployeeManager = (employeeId, options) => {
|
|
4426
|
-
return useQuery2({
|
|
4427
|
-
...options,
|
|
4428
|
-
queryKey: [QUERY_KEY2, "employee", employeeId, "manager"],
|
|
4429
|
-
queryFn: ({ signal }) => httpClient.request({
|
|
4430
|
-
url: `/${QUERY_KEY2}/v1/employee/${employeeId}/manager`,
|
|
4431
|
-
method: "GET",
|
|
4432
|
-
signal
|
|
4433
|
-
}),
|
|
4434
|
-
staleTime: DAY,
|
|
4435
|
-
gcTime: DAY,
|
|
4436
|
-
refetchOnWindowFocus: false
|
|
4437
|
-
});
|
|
4438
|
-
};
|
|
4439
|
-
var useGetPeopleSoftEmployeeGeneralManager = (employeeId, options) => {
|
|
4440
|
-
return useQuery2({
|
|
4441
|
-
...options,
|
|
4442
|
-
queryKey: [QUERY_KEY2, "employee", employeeId, "generalManager"],
|
|
4443
|
-
queryFn: ({ signal }) => httpClient.request({
|
|
4444
|
-
url: `/${QUERY_KEY2}/v1/employee/${employeeId}/generalManager`,
|
|
4445
|
-
method: "GET",
|
|
4446
|
-
signal
|
|
4447
|
-
}),
|
|
4448
|
-
staleTime: DAY,
|
|
4449
|
-
gcTime: DAY,
|
|
4450
|
-
refetchOnWindowFocus: false
|
|
4451
|
-
});
|
|
4452
|
-
};
|
|
4453
|
-
var useGetPeopleSoftDepartments = (options) => {
|
|
4454
|
-
return useQuery2({
|
|
4455
|
-
...options,
|
|
4456
|
-
queryKey: [QUERY_KEY2, "department"],
|
|
4457
|
-
queryFn: ({ signal }) => httpClient.request({
|
|
4458
|
-
url: `/${QUERY_KEY2}/v1/department/all`,
|
|
4459
|
-
method: "GET",
|
|
4460
|
-
signal
|
|
4461
|
-
}),
|
|
4462
|
-
staleTime: DAY,
|
|
4463
|
-
gcTime: DAY,
|
|
4464
|
-
refetchOnWindowFocus: false
|
|
4465
|
-
});
|
|
4466
|
-
};
|
|
4467
|
-
var useGetPeopleSoftDepartmentById = (departmentId, options) => {
|
|
4468
|
-
return useQuery2({
|
|
4469
|
-
...options,
|
|
4470
|
-
queryKey: [QUERY_KEY2, "department", departmentId],
|
|
4471
|
-
queryFn: ({ signal }) => httpClient.request({
|
|
4472
|
-
url: `/${QUERY_KEY2}/v1/department/${departmentId}`,
|
|
4473
|
-
method: "GET",
|
|
4474
|
-
signal
|
|
4475
|
-
}),
|
|
4476
|
-
staleTime: DAY,
|
|
4477
|
-
gcTime: DAY,
|
|
4478
|
-
refetchOnWindowFocus: false
|
|
4479
|
-
});
|
|
4480
|
-
};
|
|
4481
|
-
var useGetPeopleSoftDepartmentManager = (departmentId, options) => {
|
|
4482
|
-
return useQuery2({
|
|
4483
|
-
...options,
|
|
4484
|
-
queryKey: [QUERY_KEY2, "department", departmentId, "manager"],
|
|
4485
|
-
queryFn: ({ signal }) => httpClient.request({
|
|
4486
|
-
url: `/${QUERY_KEY2}/v1/department/${departmentId}/manager`,
|
|
4487
|
-
method: "GET",
|
|
4488
|
-
signal
|
|
4489
|
-
}),
|
|
4490
|
-
staleTime: DAY,
|
|
4491
|
-
gcTime: DAY,
|
|
4492
|
-
refetchOnWindowFocus: false
|
|
4493
|
-
});
|
|
4494
|
-
};
|
|
4495
|
-
var useGetPeopleSoftDepartmentEmployees = (departmentId, options) => {
|
|
4496
|
-
return useQuery2({
|
|
4497
|
-
...options,
|
|
4498
|
-
queryKey: [QUERY_KEY2, "department", departmentId, "employees"],
|
|
4499
|
-
queryFn: ({ signal }) => httpClient.request({
|
|
4500
|
-
url: `/${QUERY_KEY2}/v1/department/${departmentId}/employees`,
|
|
4501
|
-
method: "GET",
|
|
4502
|
-
signal
|
|
4503
|
-
}),
|
|
4504
|
-
staleTime: DAY,
|
|
4505
|
-
gcTime: DAY,
|
|
4506
|
-
refetchOnWindowFocus: false
|
|
4507
|
-
});
|
|
4508
|
-
};
|
|
4509
|
-
var useGetPeopleSoftCompanyGeneralManager = (companyCode, options) => {
|
|
4510
|
-
return useQuery2({
|
|
4511
|
-
...options,
|
|
4512
|
-
queryKey: [QUERY_KEY2, "company", companyCode, "generalManager"],
|
|
4513
|
-
queryFn: ({ signal }) => httpClient.request({
|
|
4514
|
-
url: `/${QUERY_KEY2}/v1/company/${companyCode}/generalManager`,
|
|
4515
|
-
method: "GET",
|
|
4516
|
-
signal
|
|
4517
|
-
}),
|
|
4518
|
-
staleTime: DAY,
|
|
4519
|
-
gcTime: DAY,
|
|
4520
|
-
refetchOnWindowFocus: false
|
|
4521
|
-
});
|
|
4522
|
-
};
|
|
4523
|
-
|
|
4524
|
-
// src/models/email/Email.ts
|
|
4525
|
-
import z6 from "zod";
|
|
4526
|
-
|
|
4527
|
-
// src/models/email/EmailAttachment.ts
|
|
4528
|
-
import z5 from "zod";
|
|
4529
|
-
var EmailAttachmentSchema = z5.object({
|
|
4530
|
-
appName: z5.string().trim().min(1).max(100),
|
|
4531
|
-
subId: z5.uuid()
|
|
4532
|
-
});
|
|
4533
|
-
|
|
4534
|
-
// src/models/email/Email.ts
|
|
4535
|
-
var EmailSchema = z6.object({
|
|
4536
|
-
subject: z6.string().trim().min(1).max(60),
|
|
4537
|
-
body: z6.string().trim().min(1),
|
|
4538
|
-
to: z6.array(z6.email()).min(1),
|
|
4539
|
-
bcc: z6.array(z6.email()).optional(),
|
|
4540
|
-
cc: z6.array(z6.email()).optional(),
|
|
4541
|
-
attachments: z6.array(EmailAttachmentSchema).optional()
|
|
4542
|
-
});
|
|
4543
|
-
|
|
4544
|
-
// src/models/peoplesoft/Employee.ts
|
|
4545
|
-
import z9 from "zod";
|
|
4546
|
-
|
|
4547
|
-
// src/models/peoplesoft/EmployeeCategoryGroup.ts
|
|
4548
|
-
import z7 from "zod";
|
|
4549
|
-
var EmployeeCategoryGroup = z7.enum([
|
|
4550
|
-
"IDL",
|
|
4551
|
-
"FD",
|
|
4552
|
-
"FI"
|
|
4553
|
-
]);
|
|
4554
|
-
|
|
4555
|
-
// src/models/peoplesoft/EmployeeStatus.ts
|
|
4556
|
-
import z8 from "zod";
|
|
4557
|
-
var EmployeeStatus = z8.enum([
|
|
4558
|
-
"Active",
|
|
4559
|
-
"Terminated",
|
|
4560
|
-
"Leave of Absence"
|
|
4561
|
-
]);
|
|
4562
|
-
|
|
4563
|
-
// src/models/peoplesoft/Employee.ts
|
|
4564
|
-
var EmployeeSchema = z9.object({
|
|
4565
|
-
badgeId: z9.string().trim(),
|
|
4566
|
-
category: z9.string().trim(),
|
|
4567
|
-
categoryGroup: EmployeeCategoryGroup,
|
|
4568
|
-
companyCode: z9.string().trim(),
|
|
4569
|
-
contactPhone: z9.string().trim(),
|
|
4570
|
-
departmentId: z9.string().trim(),
|
|
4571
|
-
departmentDescription: z9.string().trim(),
|
|
4572
|
-
emailString: z9.string().trim(),
|
|
4573
|
-
employeeId: z9.string().trim(),
|
|
4574
|
-
extensionNumber: z9.string().trim(),
|
|
4575
|
-
firstName: z9.string().trim(),
|
|
4576
|
-
gender: z9.string().trim(),
|
|
4577
|
-
hiredDate: z9.date(),
|
|
4578
|
-
lastName: z9.string().trim(),
|
|
4579
|
-
managerId: z9.string().trim(),
|
|
4580
|
-
middleName: z9.string().trim(),
|
|
4581
|
-
name: z9.string().trim(),
|
|
4582
|
-
nameTitleCase: z9.string().trim(),
|
|
4583
|
-
nfcSn: z9.string().trim(),
|
|
4584
|
-
plantId: z9.string().trim(),
|
|
4585
|
-
position: z9.string().trim(),
|
|
4586
|
-
previousEmployeeIds: z9.string().trim().nullable(),
|
|
4587
|
-
reHiredDate: z9.date().nullable(),
|
|
4588
|
-
recordNumber: z9.number(),
|
|
4589
|
-
status: EmployeeStatus,
|
|
4590
|
-
supervisorId: z9.string().trim(),
|
|
4591
|
-
terminationDate: z9.date().nullable(),
|
|
4592
|
-
terminationFutureDate: z9.date().nullable(),
|
|
4593
|
-
type: z9.string().trim(),
|
|
4594
|
-
upperDepartmentId: z9.string().trim(),
|
|
4595
|
-
jobCode: z9.string().trim(),
|
|
4596
|
-
jobDescription: z9.string().trim(),
|
|
4597
|
-
terminationReason: z9.string().trim().nullable(),
|
|
4598
|
-
supervisorRecordNumber: z9.number()
|
|
4599
|
-
});
|
|
4600
|
-
|
|
4601
|
-
// src/models/peoplesoft/Department.ts
|
|
4602
|
-
import z10 from "zod";
|
|
4603
|
-
var DepartmentSchema = z10.object({
|
|
4604
|
-
departmentId: z10.string().trim(),
|
|
4605
|
-
description: z10.string().trim(),
|
|
4606
|
-
managerId: z10.string().trim(),
|
|
4607
|
-
managerRecordNumber: z10.string().trim(),
|
|
4608
|
-
treeLevel: z10.number(),
|
|
4609
|
-
upperDepartmentId: z10.string().trim(),
|
|
4610
|
-
companyCode: z10.string().trim(),
|
|
4611
|
-
location: z10.string().trim(),
|
|
4612
|
-
salLocation: z10.string().trim(),
|
|
4613
|
-
plantId: z10.string().trim(),
|
|
4614
|
-
manager: EmployeeSchema
|
|
4615
|
-
});
|
|
4616
|
-
|
|
4617
|
-
// src/models/approval/Approval.ts
|
|
4618
|
-
import z18 from "zod";
|
|
4619
|
-
|
|
4620
|
-
// src/models/approval/ApprovalFlow.ts
|
|
4621
|
-
import { z as z12 } from "zod";
|
|
4622
|
-
|
|
4623
|
-
// src/models/approval/StepApprovalOrder.ts
|
|
4624
|
-
import z11 from "zod";
|
|
4625
|
-
var StepApprovalOrder = z11.enum([
|
|
4626
|
-
"Serial",
|
|
4627
|
-
"Parallel",
|
|
4628
|
-
"OneOfThem"
|
|
4629
|
-
]);
|
|
4630
|
-
|
|
4631
|
-
// src/models/approval/ApprovalFlow.ts
|
|
4632
|
-
var ApprovalFlowSchema = z12.object({
|
|
4633
|
-
id: z12.uuid(),
|
|
4634
|
-
approvalStage: z12.number(),
|
|
4635
|
-
batchSequence: z12.number().optional(),
|
|
4636
|
-
approvalSequence: z12.number(),
|
|
4637
|
-
stepApprovalOrder: StepApprovalOrder,
|
|
4638
|
-
steps: z12.array(z12.custom()),
|
|
4639
|
-
isActive: z12.boolean().default(false).optional()
|
|
4640
|
-
});
|
|
4641
|
-
|
|
4642
|
-
// src/models/approval/ApprovalFlowStep.ts
|
|
4643
|
-
import { z as z15 } from "zod";
|
|
4644
|
-
|
|
4645
|
-
// src/models/approval/ApprovalEmployee.ts
|
|
4646
|
-
import { z as z13 } from "zod";
|
|
4647
|
-
var ApprovalEmployeeSchema = z13.object({
|
|
4648
|
-
employeeId: z13.string().trim().min(1).max(20),
|
|
4649
|
-
name: z13.string().trim().min(1).max(50),
|
|
4650
|
-
email: z13.email().min(1).max(100)
|
|
4651
|
-
});
|
|
4652
|
-
|
|
4653
|
-
// src/models/approval/ApprovalStepResult.ts
|
|
4654
|
-
import z14 from "zod";
|
|
4655
|
-
var ApprovalStepResult = z14.enum([
|
|
4656
|
-
"NotAvailable",
|
|
4657
|
-
"FutureApproval",
|
|
4658
|
-
"WaitingForApproval",
|
|
4659
|
-
"Approved",
|
|
4660
|
-
"Rejected",
|
|
4661
|
-
"Skipped",
|
|
4662
|
-
"Withdrawn",
|
|
4663
|
-
"Cancelled"
|
|
4664
|
-
]);
|
|
4665
|
-
|
|
4666
|
-
// src/models/approval/ApprovalFlowStep.ts
|
|
4667
|
-
var ApprovalFlowStepSchema = z15.object({
|
|
4668
|
-
id: z15.uuid(),
|
|
4669
|
-
order: z15.number(),
|
|
4670
|
-
approverRole: z15.string().trim().min(1).max(100).default("Approver").optional(),
|
|
4671
|
-
approver: ApprovalEmployeeSchema,
|
|
4672
|
-
actualApprover: ApprovalEmployeeSchema.optional(),
|
|
4673
|
-
result: ApprovalStepResult.default("NotAvailable").optional(),
|
|
4674
|
-
resultDate: z15.date().optional(),
|
|
4675
|
-
resultComment: z15.string().trim().max(2e3).optional()
|
|
4676
|
-
});
|
|
4677
|
-
|
|
4678
|
-
// src/models/approval/ApprovalRequestType.ts
|
|
4679
|
-
import z16 from "zod";
|
|
4680
|
-
var ApprovalRequestType = z16.enum([
|
|
4681
|
-
"Single",
|
|
4682
|
-
"Batch"
|
|
4683
|
-
]);
|
|
4684
|
-
|
|
4685
|
-
// src/models/approval/ApprovalStatus.ts
|
|
4686
|
-
import z17 from "zod";
|
|
4687
|
-
var ApprovalStatus = z17.enum([
|
|
4688
|
-
"WaitingForApproval",
|
|
4689
|
-
"Approved",
|
|
4690
|
-
"PartiallyApproved",
|
|
4691
|
-
"Rejected",
|
|
4692
|
-
"Withdrawn",
|
|
4693
|
-
"Cancelled"
|
|
4694
|
-
]);
|
|
4695
|
-
|
|
4696
|
-
// src/models/approval/Approval.ts
|
|
4697
|
-
var ApprovalSchema = z18.object({
|
|
4698
|
-
id: z18.uuid(),
|
|
4699
|
-
number: z18.string().trim().max(30).optional(),
|
|
4700
|
-
applicationName: z18.string().trim().min(1).max(50),
|
|
4701
|
-
type: ApprovalRequestType.default("Single").optional(),
|
|
4702
|
-
status: ApprovalStatus,
|
|
4703
|
-
emailBody: z18.string().trim().min(1),
|
|
4704
|
-
created: z18.date(),
|
|
4705
|
-
createdBy: z18.custom(),
|
|
4706
|
-
updated: z18.date(),
|
|
4707
|
-
updatedBy: z18.custom(),
|
|
4708
|
-
approvalFlows: z18.array(z18.custom()).min(1),
|
|
4709
|
-
currentApprovers: z18.array(z18.custom())
|
|
4710
|
-
});
|
|
4711
|
-
var CreateApprovalSchema = ApprovalSchema.pick({
|
|
4712
|
-
id: true,
|
|
4713
|
-
number: true,
|
|
4714
|
-
applicationName: true,
|
|
4715
|
-
type: true,
|
|
4716
|
-
emailBody: true,
|
|
4717
|
-
approvalFlows: true
|
|
4718
|
-
}).extend({
|
|
4719
|
-
approvalFlows: z18.array(
|
|
4720
|
-
ApprovalFlowSchema.pick({
|
|
4721
|
-
approvalStage: true,
|
|
4722
|
-
batchSequence: true,
|
|
4723
|
-
stepApprovalOrder: true,
|
|
4724
|
-
steps: true
|
|
4725
|
-
}).extend({
|
|
4726
|
-
steps: z18.array(
|
|
4727
|
-
ApprovalFlowStepSchema.pick({
|
|
4728
|
-
approverRole: true,
|
|
4729
|
-
approver: true
|
|
4730
|
-
})
|
|
4731
|
-
)
|
|
4732
|
-
})
|
|
4733
|
-
).min(1)
|
|
4734
|
-
});
|
|
4735
|
-
var ApproveApprovalSchema = z18.object({
|
|
4736
|
-
id: z18.uuid(),
|
|
4737
|
-
result: ApprovalStepResult,
|
|
4738
|
-
resultComment: z18.string().trim().max(2e3).optional(),
|
|
4739
|
-
emailBody: z18.string().trim().min(1)
|
|
4740
|
-
});
|
|
4741
|
-
var ResubmitApprovalSchema = ApprovalSchema.pick({
|
|
4742
|
-
id: true,
|
|
4743
|
-
approvalFlows: true
|
|
4744
|
-
}).extend({
|
|
4745
|
-
approvalFlows: z18.array(
|
|
4746
|
-
ApprovalFlowSchema.pick({
|
|
4747
|
-
approvalStage: true,
|
|
4748
|
-
batchSequence: true,
|
|
4749
|
-
stepApprovalOrder: true,
|
|
4750
|
-
steps: true
|
|
4751
|
-
}).extend({
|
|
4752
|
-
steps: z18.array(
|
|
4753
|
-
ApprovalFlowStepSchema.pick({
|
|
4754
|
-
approverRole: true,
|
|
4755
|
-
approver: true
|
|
4756
|
-
})
|
|
4757
|
-
)
|
|
4758
|
-
})
|
|
4759
|
-
).min(1)
|
|
4760
|
-
});
|
|
4761
|
-
var CancelApprovalSchema = z18.object({
|
|
4762
|
-
id: z18.uuid(),
|
|
4763
|
-
comment: z18.string().trim().min(1).max(2e3),
|
|
4764
|
-
emailBody: z18.string().trim().min(1)
|
|
4765
|
-
});
|
|
4766
|
-
var WithdrawApprovalSchema = z18.object({
|
|
4767
|
-
id: z18.uuid(),
|
|
4768
|
-
comment: z18.string().trim().min(1).max(2e3),
|
|
4769
|
-
emailBody: z18.string().trim().min(1)
|
|
4770
|
-
});
|
|
4771
2314
|
export {
|
|
4772
|
-
|
|
4773
|
-
ApprovalFlowSchema,
|
|
4774
|
-
ApprovalFlowStepSchema,
|
|
4775
|
-
ApprovalSchema,
|
|
4776
|
-
ApproveApprovalSchema,
|
|
4777
|
-
CancelApprovalSchema,
|
|
4778
|
-
ChipInputCell,
|
|
4779
|
-
CreateApprovalSchema,
|
|
4780
|
-
DepartmentSchema,
|
|
4781
|
-
Dropzone,
|
|
4782
|
-
EditableColumnHeader,
|
|
4783
|
-
EmailAttachmentSchema,
|
|
4784
|
-
EmailSchema,
|
|
4785
|
-
EmployeeSchema,
|
|
4786
|
-
FileMetaSchema,
|
|
4787
|
-
FileViewer,
|
|
4788
|
-
Fullscreen,
|
|
4789
|
-
GetFileMetasParamsSchema,
|
|
4790
|
-
GetFileParamsSchema,
|
|
4791
|
-
GetFileThumbnailParamsSchema,
|
|
4792
|
-
LayoutProvider,
|
|
4793
|
-
Platform,
|
|
4794
|
-
ResubmitApprovalSchema,
|
|
4795
|
-
RouterButton,
|
|
4796
|
-
RouterError,
|
|
4797
|
-
RouterGridActionsCellItem,
|
|
4798
|
-
RouterIconButton,
|
|
4799
|
-
RouterLink,
|
|
4800
|
-
RouterListItemButton,
|
|
4801
|
-
RouterNotFound,
|
|
4802
|
-
RouterTab,
|
|
4803
|
-
TypographyWithIcon,
|
|
4804
|
-
WISTRON_PRIMARY_COLOR,
|
|
4805
|
-
WISTRON_SECONDARY_COLOR,
|
|
4806
|
-
WithdrawApprovalSchema,
|
|
4807
|
-
authClient,
|
|
4808
|
-
createEnv2 as createEnv,
|
|
4809
|
-
httpClient,
|
|
4810
|
-
rootRouteHead,
|
|
4811
|
-
useDeleteFile,
|
|
4812
|
-
useDeleteFiles,
|
|
4813
|
-
useDialogs,
|
|
4814
|
-
useDownloadFile,
|
|
4815
|
-
useFieldContext,
|
|
4816
|
-
useFormContext,
|
|
4817
|
-
useGetFile,
|
|
4818
|
-
useGetFileMetas,
|
|
4819
|
-
useGetFileThumbnail,
|
|
4820
|
-
useGetPeopleSoftActiveEmployees,
|
|
4821
|
-
useGetPeopleSoftCompanyGeneralManager,
|
|
4822
|
-
useGetPeopleSoftDepartmentById,
|
|
4823
|
-
useGetPeopleSoftDepartmentEmployees,
|
|
4824
|
-
useGetPeopleSoftDepartmentManager,
|
|
4825
|
-
useGetPeopleSoftDepartments,
|
|
4826
|
-
useGetPeopleSoftEmployeeById,
|
|
4827
|
-
useGetPeopleSoftEmployeeGeneralManager,
|
|
4828
|
-
useGetPeopleSoftEmployeeManager,
|
|
4829
|
-
useGetPeopleSoftEmployeeSubordinates,
|
|
4830
|
-
useGetPeopleSoftEmployeeSupervisor,
|
|
4831
|
-
useGetPeopleSoftEmployees,
|
|
4832
|
-
useGetPeopleSoftEmployeesSearch,
|
|
4833
|
-
useGetPeopleSoftPreviousEmployeeIds,
|
|
4834
|
-
useLayoutForm,
|
|
4835
|
-
useOpenFile,
|
|
4836
|
-
useUpdateFileMeta,
|
|
4837
|
-
useUploadFile,
|
|
4838
|
-
uuidv72 as uuidv7,
|
|
4839
|
-
withLayoutForm
|
|
2315
|
+
LayoutProvider
|
|
4840
2316
|
};
|
|
4841
2317
|
/*! Bundled license information:
|
|
4842
2318
|
|