wcz-test 2.0.0 → 2.2.0
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/index.cjs +547 -1134
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +77 -21
- package/dist/index.d.ts +77 -21
- package/dist/index.js +519 -1110
- package/dist/index.js.map +1 -1
- package/package.json +8 -5
package/dist/index.cjs
CHANGED
|
@@ -12,11 +12,11 @@ var __export = (target, all) => {
|
|
|
12
12
|
for (var name in all)
|
|
13
13
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
14
14
|
};
|
|
15
|
-
var __copyProps = (to,
|
|
16
|
-
if (
|
|
17
|
-
for (let key of __getOwnPropNames(
|
|
15
|
+
var __copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
+
for (let key of __getOwnPropNames(from))
|
|
18
18
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
19
|
-
__defProp(to, key, { get: () =>
|
|
19
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
20
20
|
}
|
|
21
21
|
return to;
|
|
22
22
|
};
|
|
@@ -212,7 +212,7 @@ var require_react_is_development = __commonJS({
|
|
|
212
212
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
213
213
|
var Element = REACT_ELEMENT_TYPE;
|
|
214
214
|
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
215
|
-
var
|
|
215
|
+
var Fragment2 = REACT_FRAGMENT_TYPE;
|
|
216
216
|
var Lazy = REACT_LAZY_TYPE;
|
|
217
217
|
var Memo = REACT_MEMO_TYPE;
|
|
218
218
|
var Portal = REACT_PORTAL_TYPE;
|
|
@@ -271,7 +271,7 @@ var require_react_is_development = __commonJS({
|
|
|
271
271
|
exports2.ContextProvider = ContextProvider;
|
|
272
272
|
exports2.Element = Element;
|
|
273
273
|
exports2.ForwardRef = ForwardRef;
|
|
274
|
-
exports2.Fragment =
|
|
274
|
+
exports2.Fragment = Fragment2;
|
|
275
275
|
exports2.Lazy = Lazy;
|
|
276
276
|
exports2.Memo = Memo;
|
|
277
277
|
exports2.Portal = Portal;
|
|
@@ -356,21 +356,21 @@ var require_object_assign = __commonJS({
|
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
module2.exports = shouldUseNative() ? Object.assign : function(target, source) {
|
|
359
|
-
var
|
|
359
|
+
var from;
|
|
360
360
|
var to = toObject(target);
|
|
361
361
|
var symbols;
|
|
362
362
|
for (var s = 1; s < arguments.length; s++) {
|
|
363
|
-
|
|
364
|
-
for (var key in
|
|
365
|
-
if (hasOwnProperty.call(
|
|
366
|
-
to[key] =
|
|
363
|
+
from = Object(arguments[s]);
|
|
364
|
+
for (var key in from) {
|
|
365
|
+
if (hasOwnProperty.call(from, key)) {
|
|
366
|
+
to[key] = from[key];
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
if (getOwnPropertySymbols) {
|
|
370
|
-
symbols = getOwnPropertySymbols(
|
|
370
|
+
symbols = getOwnPropertySymbols(from);
|
|
371
371
|
for (var i = 0; i < symbols.length; i++) {
|
|
372
|
-
if (propIsEnumerable.call(
|
|
373
|
-
to[symbols[i]] =
|
|
372
|
+
if (propIsEnumerable.call(from, symbols[i])) {
|
|
373
|
+
to[symbols[i]] = from[symbols[i]];
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
376
|
}
|
|
@@ -468,7 +468,7 @@ var require_factoryWithTypeCheckers = __commonJS({
|
|
|
468
468
|
"node_modules/prop-types/factoryWithTypeCheckers.js"(exports2, module2) {
|
|
469
469
|
"use strict";
|
|
470
470
|
var ReactIs = require_react_is();
|
|
471
|
-
var
|
|
471
|
+
var assign = require_object_assign();
|
|
472
472
|
var ReactPropTypesSecret = require_ReactPropTypesSecret();
|
|
473
473
|
var has = require_has();
|
|
474
474
|
var checkPropTypes = require_checkPropTypes();
|
|
@@ -773,7 +773,7 @@ var require_factoryWithTypeCheckers = __commonJS({
|
|
|
773
773
|
if (propType !== "object") {
|
|
774
774
|
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
|
|
775
775
|
}
|
|
776
|
-
var allKeys =
|
|
776
|
+
var allKeys = assign({}, props[propName], shapeTypes);
|
|
777
777
|
for (var key in allKeys) {
|
|
778
778
|
var checker = shapeTypes[key];
|
|
779
779
|
if (has(shapeTypes, key) && typeof checker !== "function") {
|
|
@@ -981,6 +981,8 @@ var require_prop_types = __commonJS({
|
|
|
981
981
|
// src/index.ts
|
|
982
982
|
var index_exports = {};
|
|
983
983
|
__export(index_exports, {
|
|
984
|
+
ChipInputCell: () => ChipInputCell,
|
|
985
|
+
EditableColumnHeader: () => EditableColumnHeader,
|
|
984
986
|
LayoutProvider: () => LayoutProvider,
|
|
985
987
|
Platform: () => Platform,
|
|
986
988
|
RouterButton: () => RouterButton,
|
|
@@ -988,986 +990,171 @@ __export(index_exports, {
|
|
|
988
990
|
RouterLink: () => RouterLink,
|
|
989
991
|
RouterNotFound: () => RouterNotFound,
|
|
990
992
|
RouterTab: () => RouterTab,
|
|
993
|
+
TypographyWithIcon: () => TypographyWithIcon,
|
|
991
994
|
getContrastTextColor: () => getContrastTextColor,
|
|
992
995
|
useDialogs: () => import_useDialogs.useDialogs,
|
|
993
996
|
useFieldContext: () => useFieldContext,
|
|
994
997
|
useFormContext: () => useFormContext,
|
|
995
998
|
useLayoutForm: () => useLayoutForm,
|
|
996
999
|
useLocalStorageState: () => import_useLocalStorageState.useLocalStorageState,
|
|
1000
|
+
useNotifications: () => import_useNotifications2.useNotifications,
|
|
997
1001
|
uuidv7: () => import_uuidv7.uuidv7,
|
|
998
1002
|
wczApiClient: () => wczApiClient,
|
|
999
1003
|
withLayoutForm: () => withLayoutForm
|
|
1000
1004
|
});
|
|
1001
1005
|
module.exports = __toCommonJS(index_exports);
|
|
1002
1006
|
|
|
1003
|
-
// src/components/
|
|
1007
|
+
// src/components/core/TypographyWithIcon.tsx
|
|
1004
1008
|
var import_material = require("@mui/material");
|
|
1009
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
1010
|
+
var stackSxProps = [
|
|
1011
|
+
"margin",
|
|
1012
|
+
"marginTop",
|
|
1013
|
+
"marginRight",
|
|
1014
|
+
"marginBottom",
|
|
1015
|
+
"marginLeft",
|
|
1016
|
+
"m",
|
|
1017
|
+
"mt",
|
|
1018
|
+
"mr",
|
|
1019
|
+
"mb",
|
|
1020
|
+
"ml",
|
|
1021
|
+
"mx",
|
|
1022
|
+
"my",
|
|
1023
|
+
"padding",
|
|
1024
|
+
"paddingTop",
|
|
1025
|
+
"paddingRight",
|
|
1026
|
+
"paddingBottom",
|
|
1027
|
+
"paddingLeft",
|
|
1028
|
+
"p",
|
|
1029
|
+
"pt",
|
|
1030
|
+
"pr",
|
|
1031
|
+
"pb",
|
|
1032
|
+
"pl",
|
|
1033
|
+
"px",
|
|
1034
|
+
"py",
|
|
1035
|
+
"flexGrow",
|
|
1036
|
+
"flexShrink",
|
|
1037
|
+
"flexBasis",
|
|
1038
|
+
"flexDirection",
|
|
1039
|
+
"alignItems",
|
|
1040
|
+
"justifyContent",
|
|
1041
|
+
"position",
|
|
1042
|
+
"zIndex",
|
|
1043
|
+
"top",
|
|
1044
|
+
"right",
|
|
1045
|
+
"bottom",
|
|
1046
|
+
"left",
|
|
1047
|
+
"gridGap",
|
|
1048
|
+
"gridColumnGap",
|
|
1049
|
+
"gridRowGap",
|
|
1050
|
+
"gridColumn",
|
|
1051
|
+
"gridRow",
|
|
1052
|
+
"gridAutoFlow",
|
|
1053
|
+
"gap",
|
|
1054
|
+
"columnGap",
|
|
1055
|
+
"rowGap"
|
|
1056
|
+
];
|
|
1057
|
+
var TypographyWithIcon = ({ startIcon, endIcon, children, sx, gutterBottom, ...props }) => {
|
|
1058
|
+
const sxCopy = { ...sx };
|
|
1059
|
+
const stackStyles = stackSxProps.reduce((acc, curr) => {
|
|
1060
|
+
if (sxCopy && sxCopy[curr]) {
|
|
1061
|
+
acc[curr] = sxCopy[curr];
|
|
1062
|
+
delete sxCopy[curr];
|
|
1063
|
+
}
|
|
1064
|
+
return acc;
|
|
1065
|
+
}, {});
|
|
1066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Stack, { direction: "row", alignItems: "center", gap: 1, sx: stackStyles, mb: gutterBottom ? 0.7 : void 0, children: [
|
|
1067
|
+
startIcon && startIcon,
|
|
1068
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { ...props, sx: sxCopy, children }),
|
|
1069
|
+
endIcon && endIcon
|
|
1070
|
+
] });
|
|
1071
|
+
};
|
|
1072
|
+
|
|
1073
|
+
// src/components/data-grid/ChipInputCell.tsx
|
|
1074
|
+
var import_material2 = require("@mui/material");
|
|
1075
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
1076
|
+
var isArray = (value) => Array.isArray(value);
|
|
1077
|
+
var ChipInputCell = ({ params, slotProps, getLabel }) => {
|
|
1078
|
+
if (!params.value) return null;
|
|
1079
|
+
const getLabelValue = (value) => {
|
|
1080
|
+
if (getLabel) return getLabel(value);
|
|
1081
|
+
return value;
|
|
1082
|
+
};
|
|
1083
|
+
if (isArray(params.value))
|
|
1084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material2.Stack, { direction: "row", alignItems: "center", gap: 1, sx: { overflowX: "auto", height: "100%", width: params.colDef.computedWidth }, children: params.value.map(
|
|
1085
|
+
(value, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material2.Chip, { label: getLabelValue(value), ...slotProps }, `${index + 1}-chip-input-cell`)
|
|
1086
|
+
) });
|
|
1087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material2.Chip, { label: getLabelValue(params.value), ...slotProps });
|
|
1088
|
+
};
|
|
1089
|
+
|
|
1090
|
+
// src/components/data-grid/EditableColumnHeader.tsx
|
|
1091
|
+
var import_icons_material = require("@mui/icons-material");
|
|
1092
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
1093
|
+
var EditableColumnHeader = ({ colDef }) => {
|
|
1094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TypographyWithIcon, { endIcon: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_icons_material.Edit, { color: "disabled", fontSize: "small" }), variant: "body2", className: "MuiDataGrid-columnHeaderTitle", children: colDef.headerName });
|
|
1095
|
+
};
|
|
1096
|
+
|
|
1097
|
+
// src/components/router/RouterButton.tsx
|
|
1098
|
+
var import_material3 = require("@mui/material");
|
|
1005
1099
|
var import_react_router = require("@tanstack/react-router");
|
|
1006
1100
|
var import_react = __toESM(require("react"), 1);
|
|
1007
|
-
var
|
|
1008
|
-
var MUIButtonLinkComponent = import_react.default.forwardRef((props, ref) => /* @__PURE__ */ (0,
|
|
1101
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
1102
|
+
var MUIButtonLinkComponent = import_react.default.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_material3.Button, { ref, component: "a", ...props }));
|
|
1009
1103
|
var CreatedButtonLinkComponent = (0, import_react_router.createLink)(MUIButtonLinkComponent);
|
|
1010
1104
|
var RouterButton = (props) => {
|
|
1011
|
-
return /* @__PURE__ */ (0,
|
|
1105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(CreatedButtonLinkComponent, { preload: "intent", ...props });
|
|
1012
1106
|
};
|
|
1013
1107
|
|
|
1014
1108
|
// src/components/router/RouterLink.tsx
|
|
1015
|
-
var
|
|
1109
|
+
var import_material4 = require("@mui/material");
|
|
1016
1110
|
var import_react_router2 = require("@tanstack/react-router");
|
|
1017
1111
|
var import_react2 = __toESM(require("react"), 1);
|
|
1018
|
-
var
|
|
1112
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1019
1113
|
var MUILinkComponent = import_react2.default.forwardRef(
|
|
1020
|
-
(props, ref) => /* @__PURE__ */ (0,
|
|
1114
|
+
(props, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material4.Link, { ref, ...props })
|
|
1021
1115
|
);
|
|
1022
1116
|
var CreatedLinkComponent = (0, import_react_router2.createLink)(MUILinkComponent);
|
|
1023
1117
|
var RouterLink = (props) => {
|
|
1024
|
-
return /* @__PURE__ */ (0,
|
|
1118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CreatedLinkComponent, { preload: "intent", ...props });
|
|
1025
1119
|
};
|
|
1026
1120
|
|
|
1027
1121
|
// src/components/router/RouterTab.tsx
|
|
1028
|
-
var
|
|
1122
|
+
var import_material5 = require("@mui/material");
|
|
1029
1123
|
var import_react_router3 = require("@tanstack/react-router");
|
|
1030
1124
|
var import_react3 = __toESM(require("react"), 1);
|
|
1031
|
-
var
|
|
1032
|
-
var MUITabLinkComponent = import_react3.default.forwardRef((props, ref) => /* @__PURE__ */ (0,
|
|
1125
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1126
|
+
var MUITabLinkComponent = import_react3.default.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_material5.Tab, { ref, component: "a", ...props }));
|
|
1033
1127
|
var CreatedTabLinkComponent = (0, import_react_router3.createLink)(MUITabLinkComponent);
|
|
1034
1128
|
var RouterTab = (props) => {
|
|
1035
|
-
return /* @__PURE__ */ (0,
|
|
1129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CreatedTabLinkComponent, { preload: "intent", ...props });
|
|
1036
1130
|
};
|
|
1037
1131
|
|
|
1038
1132
|
// src/components/router/RouterNotFound.tsx
|
|
1039
|
-
var
|
|
1040
|
-
var
|
|
1133
|
+
var import_material6 = require("@mui/material");
|
|
1134
|
+
var import_react_i18next = require("react-i18next");
|
|
1135
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1041
1136
|
function RouterNotFound() {
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
/* @__PURE__ */ (0,
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
onClick: () => window.history.back(),
|
|
1049
|
-
className: "bg-emerald-500 text-white px-2 py-1 rounded uppercase font-black text-sm",
|
|
1050
|
-
children: "Go back"
|
|
1051
|
-
}
|
|
1052
|
-
),
|
|
1053
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1054
|
-
import_react_router4.Link,
|
|
1055
|
-
{
|
|
1056
|
-
to: "/",
|
|
1057
|
-
className: "bg-cyan-600 text-white px-2 py-1 rounded uppercase font-black text-sm",
|
|
1058
|
-
children: "Start Over"
|
|
1059
|
-
}
|
|
1060
|
-
)
|
|
1061
|
-
] })
|
|
1062
|
-
] });
|
|
1137
|
+
const { t } = (0, import_react_i18next.useTranslation)();
|
|
1138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material6.Box, { height: "100vh", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", textAlign: "center", px: 2, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_material6.Box, { display: "flex", alignItems: "center", mb: 4, children: [
|
|
1139
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material6.Typography, { variant: "h3", component: "span", fontWeight: 500, sx: { lineHeight: 1 }, children: "404" }),
|
|
1140
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material6.Divider, { orientation: "vertical", flexItem: true, sx: { mx: 3 } }),
|
|
1141
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material6.Typography, { variant: "h5", component: "span", children: t("Layout.ThisPageCouldNotBeFound") })
|
|
1142
|
+
] }) });
|
|
1063
1143
|
}
|
|
1064
1144
|
|
|
1065
1145
|
// src/components/router/RouterError.tsx
|
|
1066
|
-
var
|
|
1067
|
-
var
|
|
1146
|
+
var import_material7 = require("@mui/material");
|
|
1147
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1068
1148
|
var RouterError = ({ error }) => {
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
});
|
|
1074
|
-
console.error("DefaultErrorComponent Error:", error);
|
|
1075
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "min-w-0 flex-1 p-4 flex flex-col items-center justify-center gap-6", children: [
|
|
1076
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_router5.ErrorComponent, { error }),
|
|
1077
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex gap-2 items-center flex-wrap", children: [
|
|
1078
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1079
|
-
"button",
|
|
1080
|
-
{
|
|
1081
|
-
onClick: () => {
|
|
1082
|
-
router.invalidate();
|
|
1083
|
-
},
|
|
1084
|
-
className: `px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded text-white uppercase font-extrabold`,
|
|
1085
|
-
children: "Try Again"
|
|
1086
|
-
}
|
|
1087
|
-
),
|
|
1088
|
-
isRoot ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1089
|
-
import_react_router5.Link,
|
|
1090
|
-
{
|
|
1091
|
-
to: "/",
|
|
1092
|
-
className: `px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded text-white uppercase font-extrabold`,
|
|
1093
|
-
children: "Home"
|
|
1094
|
-
}
|
|
1095
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1096
|
-
import_react_router5.Link,
|
|
1097
|
-
{
|
|
1098
|
-
to: "/",
|
|
1099
|
-
className: `px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded text-white uppercase font-extrabold`,
|
|
1100
|
-
onClick: (e) => {
|
|
1101
|
-
e.preventDefault();
|
|
1102
|
-
window.history.back();
|
|
1103
|
-
},
|
|
1104
|
-
children: "Go Back"
|
|
1105
|
-
}
|
|
1106
|
-
)
|
|
1107
|
-
] })
|
|
1108
|
-
] });
|
|
1109
|
-
};
|
|
1110
|
-
|
|
1111
|
-
// node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
|
|
1112
|
-
var isDevelopment = false;
|
|
1113
|
-
function sheetForTag(tag) {
|
|
1114
|
-
if (tag.sheet) {
|
|
1115
|
-
return tag.sheet;
|
|
1116
|
-
}
|
|
1117
|
-
for (var i = 0; i < document.styleSheets.length; i++) {
|
|
1118
|
-
if (document.styleSheets[i].ownerNode === tag) {
|
|
1119
|
-
return document.styleSheets[i];
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
return void 0;
|
|
1123
|
-
}
|
|
1124
|
-
function createStyleElement(options) {
|
|
1125
|
-
var tag = document.createElement("style");
|
|
1126
|
-
tag.setAttribute("data-emotion", options.key);
|
|
1127
|
-
if (options.nonce !== void 0) {
|
|
1128
|
-
tag.setAttribute("nonce", options.nonce);
|
|
1129
|
-
}
|
|
1130
|
-
tag.appendChild(document.createTextNode(""));
|
|
1131
|
-
tag.setAttribute("data-s", "");
|
|
1132
|
-
return tag;
|
|
1133
|
-
}
|
|
1134
|
-
var StyleSheet = /* @__PURE__ */ function() {
|
|
1135
|
-
function StyleSheet2(options) {
|
|
1136
|
-
var _this = this;
|
|
1137
|
-
this._insertTag = function(tag) {
|
|
1138
|
-
var before;
|
|
1139
|
-
if (_this.tags.length === 0) {
|
|
1140
|
-
if (_this.insertionPoint) {
|
|
1141
|
-
before = _this.insertionPoint.nextSibling;
|
|
1142
|
-
} else if (_this.prepend) {
|
|
1143
|
-
before = _this.container.firstChild;
|
|
1144
|
-
} else {
|
|
1145
|
-
before = _this.before;
|
|
1146
|
-
}
|
|
1147
|
-
} else {
|
|
1148
|
-
before = _this.tags[_this.tags.length - 1].nextSibling;
|
|
1149
|
-
}
|
|
1150
|
-
_this.container.insertBefore(tag, before);
|
|
1151
|
-
_this.tags.push(tag);
|
|
1152
|
-
};
|
|
1153
|
-
this.isSpeedy = options.speedy === void 0 ? !isDevelopment : options.speedy;
|
|
1154
|
-
this.tags = [];
|
|
1155
|
-
this.ctr = 0;
|
|
1156
|
-
this.nonce = options.nonce;
|
|
1157
|
-
this.key = options.key;
|
|
1158
|
-
this.container = options.container;
|
|
1159
|
-
this.prepend = options.prepend;
|
|
1160
|
-
this.insertionPoint = options.insertionPoint;
|
|
1161
|
-
this.before = null;
|
|
1162
|
-
}
|
|
1163
|
-
var _proto = StyleSheet2.prototype;
|
|
1164
|
-
_proto.hydrate = function hydrate(nodes) {
|
|
1165
|
-
nodes.forEach(this._insertTag);
|
|
1166
|
-
};
|
|
1167
|
-
_proto.insert = function insert(rule) {
|
|
1168
|
-
if (this.ctr % (this.isSpeedy ? 65e3 : 1) === 0) {
|
|
1169
|
-
this._insertTag(createStyleElement(this));
|
|
1170
|
-
}
|
|
1171
|
-
var tag = this.tags[this.tags.length - 1];
|
|
1172
|
-
if (this.isSpeedy) {
|
|
1173
|
-
var sheet = sheetForTag(tag);
|
|
1174
|
-
try {
|
|
1175
|
-
sheet.insertRule(rule, sheet.cssRules.length);
|
|
1176
|
-
} catch (e) {
|
|
1177
|
-
}
|
|
1178
|
-
} else {
|
|
1179
|
-
tag.appendChild(document.createTextNode(rule));
|
|
1180
|
-
}
|
|
1181
|
-
this.ctr++;
|
|
1182
|
-
};
|
|
1183
|
-
_proto.flush = function flush() {
|
|
1184
|
-
this.tags.forEach(function(tag) {
|
|
1185
|
-
var _tag$parentNode;
|
|
1186
|
-
return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);
|
|
1187
|
-
});
|
|
1188
|
-
this.tags = [];
|
|
1189
|
-
this.ctr = 0;
|
|
1190
|
-
};
|
|
1191
|
-
return StyleSheet2;
|
|
1192
|
-
}();
|
|
1193
|
-
|
|
1194
|
-
// node_modules/stylis/src/Enum.js
|
|
1195
|
-
var MS = "-ms-";
|
|
1196
|
-
var MOZ = "-moz-";
|
|
1197
|
-
var WEBKIT = "-webkit-";
|
|
1198
|
-
var COMMENT = "comm";
|
|
1199
|
-
var RULESET = "rule";
|
|
1200
|
-
var DECLARATION = "decl";
|
|
1201
|
-
var IMPORT = "@import";
|
|
1202
|
-
var KEYFRAMES = "@keyframes";
|
|
1203
|
-
var LAYER = "@layer";
|
|
1204
|
-
|
|
1205
|
-
// node_modules/stylis/src/Utility.js
|
|
1206
|
-
var abs = Math.abs;
|
|
1207
|
-
var from = String.fromCharCode;
|
|
1208
|
-
var assign = Object.assign;
|
|
1209
|
-
function hash(value, length2) {
|
|
1210
|
-
return charat(value, 0) ^ 45 ? (((length2 << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
|
|
1211
|
-
}
|
|
1212
|
-
function trim(value) {
|
|
1213
|
-
return value.trim();
|
|
1214
|
-
}
|
|
1215
|
-
function match(value, pattern) {
|
|
1216
|
-
return (value = pattern.exec(value)) ? value[0] : value;
|
|
1217
|
-
}
|
|
1218
|
-
function replace(value, pattern, replacement) {
|
|
1219
|
-
return value.replace(pattern, replacement);
|
|
1220
|
-
}
|
|
1221
|
-
function indexof(value, search) {
|
|
1222
|
-
return value.indexOf(search);
|
|
1223
|
-
}
|
|
1224
|
-
function charat(value, index) {
|
|
1225
|
-
return value.charCodeAt(index) | 0;
|
|
1226
|
-
}
|
|
1227
|
-
function substr(value, begin, end) {
|
|
1228
|
-
return value.slice(begin, end);
|
|
1229
|
-
}
|
|
1230
|
-
function strlen(value) {
|
|
1231
|
-
return value.length;
|
|
1232
|
-
}
|
|
1233
|
-
function sizeof(value) {
|
|
1234
|
-
return value.length;
|
|
1235
|
-
}
|
|
1236
|
-
function append(value, array) {
|
|
1237
|
-
return array.push(value), value;
|
|
1238
|
-
}
|
|
1239
|
-
function combine(array, callback) {
|
|
1240
|
-
return array.map(callback).join("");
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
// node_modules/stylis/src/Tokenizer.js
|
|
1244
|
-
var line = 1;
|
|
1245
|
-
var column = 1;
|
|
1246
|
-
var length = 0;
|
|
1247
|
-
var position = 0;
|
|
1248
|
-
var character = 0;
|
|
1249
|
-
var characters = "";
|
|
1250
|
-
function node(value, root, parent, type, props, children, length2) {
|
|
1251
|
-
return { value, root, parent, type, props, children, line, column, length: length2, return: "" };
|
|
1252
|
-
}
|
|
1253
|
-
function copy(root, props) {
|
|
1254
|
-
return assign(node("", null, null, "", null, null, 0), root, { length: -root.length }, props);
|
|
1255
|
-
}
|
|
1256
|
-
function char() {
|
|
1257
|
-
return character;
|
|
1258
|
-
}
|
|
1259
|
-
function prev() {
|
|
1260
|
-
character = position > 0 ? charat(characters, --position) : 0;
|
|
1261
|
-
if (column--, character === 10)
|
|
1262
|
-
column = 1, line--;
|
|
1263
|
-
return character;
|
|
1264
|
-
}
|
|
1265
|
-
function next() {
|
|
1266
|
-
character = position < length ? charat(characters, position++) : 0;
|
|
1267
|
-
if (column++, character === 10)
|
|
1268
|
-
column = 1, line++;
|
|
1269
|
-
return character;
|
|
1270
|
-
}
|
|
1271
|
-
function peek() {
|
|
1272
|
-
return charat(characters, position);
|
|
1273
|
-
}
|
|
1274
|
-
function caret() {
|
|
1275
|
-
return position;
|
|
1276
|
-
}
|
|
1277
|
-
function slice(begin, end) {
|
|
1278
|
-
return substr(characters, begin, end);
|
|
1279
|
-
}
|
|
1280
|
-
function token(type) {
|
|
1281
|
-
switch (type) {
|
|
1282
|
-
// \0 \t \n \r \s whitespace token
|
|
1283
|
-
case 0:
|
|
1284
|
-
case 9:
|
|
1285
|
-
case 10:
|
|
1286
|
-
case 13:
|
|
1287
|
-
case 32:
|
|
1288
|
-
return 5;
|
|
1289
|
-
// ! + , / > @ ~ isolate token
|
|
1290
|
-
case 33:
|
|
1291
|
-
case 43:
|
|
1292
|
-
case 44:
|
|
1293
|
-
case 47:
|
|
1294
|
-
case 62:
|
|
1295
|
-
case 64:
|
|
1296
|
-
case 126:
|
|
1297
|
-
// ; { } breakpoint token
|
|
1298
|
-
case 59:
|
|
1299
|
-
case 123:
|
|
1300
|
-
case 125:
|
|
1301
|
-
return 4;
|
|
1302
|
-
// : accompanied token
|
|
1303
|
-
case 58:
|
|
1304
|
-
return 3;
|
|
1305
|
-
// " ' ( [ opening delimit token
|
|
1306
|
-
case 34:
|
|
1307
|
-
case 39:
|
|
1308
|
-
case 40:
|
|
1309
|
-
case 91:
|
|
1310
|
-
return 2;
|
|
1311
|
-
// ) ] closing delimit token
|
|
1312
|
-
case 41:
|
|
1313
|
-
case 93:
|
|
1314
|
-
return 1;
|
|
1315
|
-
}
|
|
1316
|
-
return 0;
|
|
1317
|
-
}
|
|
1318
|
-
function alloc(value) {
|
|
1319
|
-
return line = column = 1, length = strlen(characters = value), position = 0, [];
|
|
1320
|
-
}
|
|
1321
|
-
function dealloc(value) {
|
|
1322
|
-
return characters = "", value;
|
|
1323
|
-
}
|
|
1324
|
-
function delimit(type) {
|
|
1325
|
-
return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));
|
|
1326
|
-
}
|
|
1327
|
-
function whitespace(type) {
|
|
1328
|
-
while (character = peek())
|
|
1329
|
-
if (character < 33)
|
|
1330
|
-
next();
|
|
1331
|
-
else
|
|
1332
|
-
break;
|
|
1333
|
-
return token(type) > 2 || token(character) > 3 ? "" : " ";
|
|
1334
|
-
}
|
|
1335
|
-
function escaping(index, count) {
|
|
1336
|
-
while (--count && next())
|
|
1337
|
-
if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97)
|
|
1338
|
-
break;
|
|
1339
|
-
return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32));
|
|
1340
|
-
}
|
|
1341
|
-
function delimiter(type) {
|
|
1342
|
-
while (next())
|
|
1343
|
-
switch (character) {
|
|
1344
|
-
// ] ) " '
|
|
1345
|
-
case type:
|
|
1346
|
-
return position;
|
|
1347
|
-
// " '
|
|
1348
|
-
case 34:
|
|
1349
|
-
case 39:
|
|
1350
|
-
if (type !== 34 && type !== 39)
|
|
1351
|
-
delimiter(character);
|
|
1352
|
-
break;
|
|
1353
|
-
// (
|
|
1354
|
-
case 40:
|
|
1355
|
-
if (type === 41)
|
|
1356
|
-
delimiter(type);
|
|
1357
|
-
break;
|
|
1358
|
-
// \
|
|
1359
|
-
case 92:
|
|
1360
|
-
next();
|
|
1361
|
-
break;
|
|
1362
|
-
}
|
|
1363
|
-
return position;
|
|
1364
|
-
}
|
|
1365
|
-
function commenter(type, index) {
|
|
1366
|
-
while (next())
|
|
1367
|
-
if (type + character === 47 + 10)
|
|
1368
|
-
break;
|
|
1369
|
-
else if (type + character === 42 + 42 && peek() === 47)
|
|
1370
|
-
break;
|
|
1371
|
-
return "/*" + slice(index, position - 1) + "*" + from(type === 47 ? type : next());
|
|
1372
|
-
}
|
|
1373
|
-
function identifier(index) {
|
|
1374
|
-
while (!token(peek()))
|
|
1375
|
-
next();
|
|
1376
|
-
return slice(index, position);
|
|
1377
|
-
}
|
|
1378
|
-
|
|
1379
|
-
// node_modules/stylis/src/Parser.js
|
|
1380
|
-
function compile(value) {
|
|
1381
|
-
return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value));
|
|
1382
|
-
}
|
|
1383
|
-
function parse(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
|
|
1384
|
-
var index = 0;
|
|
1385
|
-
var offset = 0;
|
|
1386
|
-
var length2 = pseudo;
|
|
1387
|
-
var atrule = 0;
|
|
1388
|
-
var property = 0;
|
|
1389
|
-
var previous = 0;
|
|
1390
|
-
var variable = 1;
|
|
1391
|
-
var scanning = 1;
|
|
1392
|
-
var ampersand = 1;
|
|
1393
|
-
var character2 = 0;
|
|
1394
|
-
var type = "";
|
|
1395
|
-
var props = rules;
|
|
1396
|
-
var children = rulesets;
|
|
1397
|
-
var reference = rule;
|
|
1398
|
-
var characters2 = type;
|
|
1399
|
-
while (scanning)
|
|
1400
|
-
switch (previous = character2, character2 = next()) {
|
|
1401
|
-
// (
|
|
1402
|
-
case 40:
|
|
1403
|
-
if (previous != 108 && charat(characters2, length2 - 1) == 58) {
|
|
1404
|
-
if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f") != -1)
|
|
1405
|
-
ampersand = -1;
|
|
1406
|
-
break;
|
|
1407
|
-
}
|
|
1408
|
-
// " ' [
|
|
1409
|
-
case 34:
|
|
1410
|
-
case 39:
|
|
1411
|
-
case 91:
|
|
1412
|
-
characters2 += delimit(character2);
|
|
1413
|
-
break;
|
|
1414
|
-
// \t \n \r \s
|
|
1415
|
-
case 9:
|
|
1416
|
-
case 10:
|
|
1417
|
-
case 13:
|
|
1418
|
-
case 32:
|
|
1419
|
-
characters2 += whitespace(previous);
|
|
1420
|
-
break;
|
|
1421
|
-
// \
|
|
1422
|
-
case 92:
|
|
1423
|
-
characters2 += escaping(caret() - 1, 7);
|
|
1424
|
-
continue;
|
|
1425
|
-
// /
|
|
1426
|
-
case 47:
|
|
1427
|
-
switch (peek()) {
|
|
1428
|
-
case 42:
|
|
1429
|
-
case 47:
|
|
1430
|
-
append(comment(commenter(next(), caret()), root, parent), declarations);
|
|
1431
|
-
break;
|
|
1432
|
-
default:
|
|
1433
|
-
characters2 += "/";
|
|
1434
|
-
}
|
|
1435
|
-
break;
|
|
1436
|
-
// {
|
|
1437
|
-
case 123 * variable:
|
|
1438
|
-
points[index++] = strlen(characters2) * ampersand;
|
|
1439
|
-
// } ; \0
|
|
1440
|
-
case 125 * variable:
|
|
1441
|
-
case 59:
|
|
1442
|
-
case 0:
|
|
1443
|
-
switch (character2) {
|
|
1444
|
-
// \0 }
|
|
1445
|
-
case 0:
|
|
1446
|
-
case 125:
|
|
1447
|
-
scanning = 0;
|
|
1448
|
-
// ;
|
|
1449
|
-
case 59 + offset:
|
|
1450
|
-
if (ampersand == -1) characters2 = replace(characters2, /\f/g, "");
|
|
1451
|
-
if (property > 0 && strlen(characters2) - length2)
|
|
1452
|
-
append(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2), declarations);
|
|
1453
|
-
break;
|
|
1454
|
-
// @ ;
|
|
1455
|
-
case 59:
|
|
1456
|
-
characters2 += ";";
|
|
1457
|
-
// { rule/at-rule
|
|
1458
|
-
default:
|
|
1459
|
-
append(reference = ruleset(characters2, root, parent, index, offset, rules, points, type, props = [], children = [], length2), rulesets);
|
|
1460
|
-
if (character2 === 123)
|
|
1461
|
-
if (offset === 0)
|
|
1462
|
-
parse(characters2, root, reference, reference, props, rulesets, length2, points, children);
|
|
1463
|
-
else
|
|
1464
|
-
switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) {
|
|
1465
|
-
// d l m s
|
|
1466
|
-
case 100:
|
|
1467
|
-
case 108:
|
|
1468
|
-
case 109:
|
|
1469
|
-
case 115:
|
|
1470
|
-
parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length2), children), rules, children, length2, points, rule ? props : children);
|
|
1471
|
-
break;
|
|
1472
|
-
default:
|
|
1473
|
-
parse(characters2, reference, reference, reference, [""], children, 0, points, children);
|
|
1474
|
-
}
|
|
1475
|
-
}
|
|
1476
|
-
index = offset = property = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
|
|
1477
|
-
break;
|
|
1478
|
-
// :
|
|
1479
|
-
case 58:
|
|
1480
|
-
length2 = 1 + strlen(characters2), property = previous;
|
|
1481
|
-
default:
|
|
1482
|
-
if (variable < 1) {
|
|
1483
|
-
if (character2 == 123)
|
|
1484
|
-
--variable;
|
|
1485
|
-
else if (character2 == 125 && variable++ == 0 && prev() == 125)
|
|
1486
|
-
continue;
|
|
1487
|
-
}
|
|
1488
|
-
switch (characters2 += from(character2), character2 * variable) {
|
|
1489
|
-
// &
|
|
1490
|
-
case 38:
|
|
1491
|
-
ampersand = offset > 0 ? 1 : (characters2 += "\f", -1);
|
|
1492
|
-
break;
|
|
1493
|
-
// ,
|
|
1494
|
-
case 44:
|
|
1495
|
-
points[index++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
|
|
1496
|
-
break;
|
|
1497
|
-
// @
|
|
1498
|
-
case 64:
|
|
1499
|
-
if (peek() === 45)
|
|
1500
|
-
characters2 += delimit(next());
|
|
1501
|
-
atrule = peek(), offset = length2 = strlen(type = characters2 += identifier(caret())), character2++;
|
|
1502
|
-
break;
|
|
1503
|
-
// -
|
|
1504
|
-
case 45:
|
|
1505
|
-
if (previous === 45 && strlen(characters2) == 2)
|
|
1506
|
-
variable = 0;
|
|
1507
|
-
}
|
|
1508
|
-
}
|
|
1509
|
-
return rulesets;
|
|
1510
|
-
}
|
|
1511
|
-
function ruleset(value, root, parent, index, offset, rules, points, type, props, children, length2) {
|
|
1512
|
-
var post = offset - 1;
|
|
1513
|
-
var rule = offset === 0 ? rules : [""];
|
|
1514
|
-
var size = sizeof(rule);
|
|
1515
|
-
for (var i = 0, j = 0, k = 0; i < index; ++i)
|
|
1516
|
-
for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z2 = value; x < size; ++x)
|
|
1517
|
-
if (z2 = trim(j > 0 ? rule[x] + " " + y : replace(y, /&\f/g, rule[x])))
|
|
1518
|
-
props[k++] = z2;
|
|
1519
|
-
return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length2);
|
|
1520
|
-
}
|
|
1521
|
-
function comment(value, root, parent) {
|
|
1522
|
-
return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0);
|
|
1523
|
-
}
|
|
1524
|
-
function declaration(value, root, parent, length2) {
|
|
1525
|
-
return node(value, root, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2);
|
|
1526
|
-
}
|
|
1527
|
-
|
|
1528
|
-
// node_modules/stylis/src/Serializer.js
|
|
1529
|
-
function serialize(children, callback) {
|
|
1530
|
-
var output = "";
|
|
1531
|
-
var length2 = sizeof(children);
|
|
1532
|
-
for (var i = 0; i < length2; i++)
|
|
1533
|
-
output += callback(children[i], i, children, callback) || "";
|
|
1534
|
-
return output;
|
|
1535
|
-
}
|
|
1536
|
-
function stringify(element, index, children, callback) {
|
|
1537
|
-
switch (element.type) {
|
|
1538
|
-
case LAYER:
|
|
1539
|
-
if (element.children.length) break;
|
|
1540
|
-
case IMPORT:
|
|
1541
|
-
case DECLARATION:
|
|
1542
|
-
return element.return = element.return || element.value;
|
|
1543
|
-
case COMMENT:
|
|
1544
|
-
return "";
|
|
1545
|
-
case KEYFRAMES:
|
|
1546
|
-
return element.return = element.value + "{" + serialize(element.children, callback) + "}";
|
|
1547
|
-
case RULESET:
|
|
1548
|
-
element.value = element.props.join(",");
|
|
1549
|
-
}
|
|
1550
|
-
return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
|
|
1551
|
-
}
|
|
1552
|
-
|
|
1553
|
-
// node_modules/stylis/src/Middleware.js
|
|
1554
|
-
function middleware(collection) {
|
|
1555
|
-
var length2 = sizeof(collection);
|
|
1556
|
-
return function(element, index, children, callback) {
|
|
1557
|
-
var output = "";
|
|
1558
|
-
for (var i = 0; i < length2; i++)
|
|
1559
|
-
output += collection[i](element, index, children, callback) || "";
|
|
1560
|
-
return output;
|
|
1561
|
-
};
|
|
1562
|
-
}
|
|
1563
|
-
function rulesheet(callback) {
|
|
1564
|
-
return function(element) {
|
|
1565
|
-
if (!element.root) {
|
|
1566
|
-
if (element = element.return)
|
|
1567
|
-
callback(element);
|
|
1568
|
-
}
|
|
1569
|
-
};
|
|
1570
|
-
}
|
|
1571
|
-
|
|
1572
|
-
// node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js
|
|
1573
|
-
var weakMemoize = function weakMemoize2(func) {
|
|
1574
|
-
var cache = /* @__PURE__ */ new WeakMap();
|
|
1575
|
-
return function(arg) {
|
|
1576
|
-
if (cache.has(arg)) {
|
|
1577
|
-
return cache.get(arg);
|
|
1578
|
-
}
|
|
1579
|
-
var ret = func(arg);
|
|
1580
|
-
cache.set(arg, ret);
|
|
1581
|
-
return ret;
|
|
1582
|
-
};
|
|
1583
|
-
};
|
|
1584
|
-
|
|
1585
|
-
// node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
|
|
1586
|
-
function memoize(fn) {
|
|
1587
|
-
var cache = /* @__PURE__ */ Object.create(null);
|
|
1588
|
-
return function(arg) {
|
|
1589
|
-
if (cache[arg] === void 0) cache[arg] = fn(arg);
|
|
1590
|
-
return cache[arg];
|
|
1591
|
-
};
|
|
1592
|
-
}
|
|
1593
|
-
|
|
1594
|
-
// node_modules/@emotion/cache/dist/emotion-cache.esm.js
|
|
1595
|
-
var isBrowser = typeof document !== "undefined";
|
|
1596
|
-
var identifierWithPointTracking = function identifierWithPointTracking2(begin, points, index) {
|
|
1597
|
-
var previous = 0;
|
|
1598
|
-
var character2 = 0;
|
|
1599
|
-
while (true) {
|
|
1600
|
-
previous = character2;
|
|
1601
|
-
character2 = peek();
|
|
1602
|
-
if (previous === 38 && character2 === 12) {
|
|
1603
|
-
points[index] = 1;
|
|
1604
|
-
}
|
|
1605
|
-
if (token(character2)) {
|
|
1606
|
-
break;
|
|
1607
|
-
}
|
|
1608
|
-
next();
|
|
1609
|
-
}
|
|
1610
|
-
return slice(begin, position);
|
|
1611
|
-
};
|
|
1612
|
-
var toRules = function toRules2(parsed, points) {
|
|
1613
|
-
var index = -1;
|
|
1614
|
-
var character2 = 44;
|
|
1615
|
-
do {
|
|
1616
|
-
switch (token(character2)) {
|
|
1617
|
-
case 0:
|
|
1618
|
-
if (character2 === 38 && peek() === 12) {
|
|
1619
|
-
points[index] = 1;
|
|
1620
|
-
}
|
|
1621
|
-
parsed[index] += identifierWithPointTracking(position - 1, points, index);
|
|
1622
|
-
break;
|
|
1623
|
-
case 2:
|
|
1624
|
-
parsed[index] += delimit(character2);
|
|
1625
|
-
break;
|
|
1626
|
-
case 4:
|
|
1627
|
-
if (character2 === 44) {
|
|
1628
|
-
parsed[++index] = peek() === 58 ? "&\f" : "";
|
|
1629
|
-
points[index] = parsed[index].length;
|
|
1630
|
-
break;
|
|
1631
|
-
}
|
|
1632
|
-
// fallthrough
|
|
1633
|
-
default:
|
|
1634
|
-
parsed[index] += from(character2);
|
|
1635
|
-
}
|
|
1636
|
-
} while (character2 = next());
|
|
1637
|
-
return parsed;
|
|
1638
|
-
};
|
|
1639
|
-
var getRules = function getRules2(value, points) {
|
|
1640
|
-
return dealloc(toRules(alloc(value), points));
|
|
1641
|
-
};
|
|
1642
|
-
var fixedElements = /* @__PURE__ */ new WeakMap();
|
|
1643
|
-
var compat = function compat2(element) {
|
|
1644
|
-
if (element.type !== "rule" || !element.parent || // positive .length indicates that this rule contains pseudo
|
|
1645
|
-
// negative .length indicates that this rule has been already prefixed
|
|
1646
|
-
element.length < 1) {
|
|
1647
|
-
return;
|
|
1648
|
-
}
|
|
1649
|
-
var value = element.value;
|
|
1650
|
-
var parent = element.parent;
|
|
1651
|
-
var isImplicitRule = element.column === parent.column && element.line === parent.line;
|
|
1652
|
-
while (parent.type !== "rule") {
|
|
1653
|
-
parent = parent.parent;
|
|
1654
|
-
if (!parent) return;
|
|
1655
|
-
}
|
|
1656
|
-
if (element.props.length === 1 && value.charCodeAt(0) !== 58 && !fixedElements.get(parent)) {
|
|
1657
|
-
return;
|
|
1658
|
-
}
|
|
1659
|
-
if (isImplicitRule) {
|
|
1660
|
-
return;
|
|
1661
|
-
}
|
|
1662
|
-
fixedElements.set(element, true);
|
|
1663
|
-
var points = [];
|
|
1664
|
-
var rules = getRules(value, points);
|
|
1665
|
-
var parentRules = parent.props;
|
|
1666
|
-
for (var i = 0, k = 0; i < rules.length; i++) {
|
|
1667
|
-
for (var j = 0; j < parentRules.length; j++, k++) {
|
|
1668
|
-
element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
|
|
1669
|
-
}
|
|
1670
|
-
}
|
|
1671
|
-
};
|
|
1672
|
-
var removeLabel = function removeLabel2(element) {
|
|
1673
|
-
if (element.type === "decl") {
|
|
1674
|
-
var value = element.value;
|
|
1675
|
-
if (
|
|
1676
|
-
// charcode for l
|
|
1677
|
-
value.charCodeAt(0) === 108 && // charcode for b
|
|
1678
|
-
value.charCodeAt(2) === 98
|
|
1679
|
-
) {
|
|
1680
|
-
element["return"] = "";
|
|
1681
|
-
element.value = "";
|
|
1682
|
-
}
|
|
1683
|
-
}
|
|
1684
|
-
};
|
|
1685
|
-
function prefix(value, length2) {
|
|
1686
|
-
switch (hash(value, length2)) {
|
|
1687
|
-
// color-adjust
|
|
1688
|
-
case 5103:
|
|
1689
|
-
return WEBKIT + "print-" + value + value;
|
|
1690
|
-
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
|
|
1691
|
-
case 5737:
|
|
1692
|
-
case 4201:
|
|
1693
|
-
case 3177:
|
|
1694
|
-
case 3433:
|
|
1695
|
-
case 1641:
|
|
1696
|
-
case 4457:
|
|
1697
|
-
case 2921:
|
|
1698
|
-
// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
|
|
1699
|
-
case 5572:
|
|
1700
|
-
case 6356:
|
|
1701
|
-
case 5844:
|
|
1702
|
-
case 3191:
|
|
1703
|
-
case 6645:
|
|
1704
|
-
case 3005:
|
|
1705
|
-
// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
|
|
1706
|
-
case 6391:
|
|
1707
|
-
case 5879:
|
|
1708
|
-
case 5623:
|
|
1709
|
-
case 6135:
|
|
1710
|
-
case 4599:
|
|
1711
|
-
case 4855:
|
|
1712
|
-
// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
|
|
1713
|
-
case 4215:
|
|
1714
|
-
case 6389:
|
|
1715
|
-
case 5109:
|
|
1716
|
-
case 5365:
|
|
1717
|
-
case 5621:
|
|
1718
|
-
case 3829:
|
|
1719
|
-
return WEBKIT + value + value;
|
|
1720
|
-
// appearance, user-select, transform, hyphens, text-size-adjust
|
|
1721
|
-
case 5349:
|
|
1722
|
-
case 4246:
|
|
1723
|
-
case 4810:
|
|
1724
|
-
case 6968:
|
|
1725
|
-
case 2756:
|
|
1726
|
-
return WEBKIT + value + MOZ + value + MS + value + value;
|
|
1727
|
-
// flex, flex-direction
|
|
1728
|
-
case 6828:
|
|
1729
|
-
case 4268:
|
|
1730
|
-
return WEBKIT + value + MS + value + value;
|
|
1731
|
-
// order
|
|
1732
|
-
case 6165:
|
|
1733
|
-
return WEBKIT + value + MS + "flex-" + value + value;
|
|
1734
|
-
// align-items
|
|
1735
|
-
case 5187:
|
|
1736
|
-
return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + "box-$1$2" + MS + "flex-$1$2") + value;
|
|
1737
|
-
// align-self
|
|
1738
|
-
case 5443:
|
|
1739
|
-
return WEBKIT + value + MS + "flex-item-" + replace(value, /flex-|-self/, "") + value;
|
|
1740
|
-
// align-content
|
|
1741
|
-
case 4675:
|
|
1742
|
-
return WEBKIT + value + MS + "flex-line-pack" + replace(value, /align-content|flex-|-self/, "") + value;
|
|
1743
|
-
// flex-shrink
|
|
1744
|
-
case 5548:
|
|
1745
|
-
return WEBKIT + value + MS + replace(value, "shrink", "negative") + value;
|
|
1746
|
-
// flex-basis
|
|
1747
|
-
case 5292:
|
|
1748
|
-
return WEBKIT + value + MS + replace(value, "basis", "preferred-size") + value;
|
|
1749
|
-
// flex-grow
|
|
1750
|
-
case 6060:
|
|
1751
|
-
return WEBKIT + "box-" + replace(value, "-grow", "") + WEBKIT + value + MS + replace(value, "grow", "positive") + value;
|
|
1752
|
-
// transition
|
|
1753
|
-
case 4554:
|
|
1754
|
-
return WEBKIT + replace(value, /([^-])(transform)/g, "$1" + WEBKIT + "$2") + value;
|
|
1755
|
-
// cursor
|
|
1756
|
-
case 6187:
|
|
1757
|
-
return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + "$1"), /(image-set)/, WEBKIT + "$1"), value, "") + value;
|
|
1758
|
-
// background, background-image
|
|
1759
|
-
case 5495:
|
|
1760
|
-
case 3959:
|
|
1761
|
-
return replace(value, /(image-set\([^]*)/, WEBKIT + "$1$`$1");
|
|
1762
|
-
// justify-content
|
|
1763
|
-
case 4968:
|
|
1764
|
-
return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + "box-pack:$3" + MS + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + WEBKIT + value + value;
|
|
1765
|
-
// (margin|padding)-inline-(start|end)
|
|
1766
|
-
case 4095:
|
|
1767
|
-
case 3583:
|
|
1768
|
-
case 4068:
|
|
1769
|
-
case 2532:
|
|
1770
|
-
return replace(value, /(.+)-inline(.+)/, WEBKIT + "$1$2") + value;
|
|
1771
|
-
// (min|max)?(width|height|inline-size|block-size)
|
|
1772
|
-
case 8116:
|
|
1773
|
-
case 7059:
|
|
1774
|
-
case 5753:
|
|
1775
|
-
case 5535:
|
|
1776
|
-
case 5445:
|
|
1777
|
-
case 5701:
|
|
1778
|
-
case 4933:
|
|
1779
|
-
case 4677:
|
|
1780
|
-
case 5533:
|
|
1781
|
-
case 5789:
|
|
1782
|
-
case 5021:
|
|
1783
|
-
case 4765:
|
|
1784
|
-
if (strlen(value) - 1 - length2 > 6) switch (charat(value, length2 + 1)) {
|
|
1785
|
-
// (m)ax-content, (m)in-content
|
|
1786
|
-
case 109:
|
|
1787
|
-
if (charat(value, length2 + 4) !== 45) break;
|
|
1788
|
-
// (f)ill-available, (f)it-content
|
|
1789
|
-
case 102:
|
|
1790
|
-
return replace(value, /(.+:)(.+)-([^]+)/, "$1" + WEBKIT + "$2-$3$1" + MOZ + (charat(value, length2 + 3) == 108 ? "$3" : "$2-$3")) + value;
|
|
1791
|
-
// (s)tretch
|
|
1792
|
-
case 115:
|
|
1793
|
-
return ~indexof(value, "stretch") ? prefix(replace(value, "stretch", "fill-available"), length2) + value : value;
|
|
1794
|
-
}
|
|
1795
|
-
break;
|
|
1796
|
-
// position: sticky
|
|
1797
|
-
case 4949:
|
|
1798
|
-
if (charat(value, length2 + 1) !== 115) break;
|
|
1799
|
-
// display: (flex|inline-flex)
|
|
1800
|
-
case 6444:
|
|
1801
|
-
switch (charat(value, strlen(value) - 3 - (~indexof(value, "!important") && 10))) {
|
|
1802
|
-
// stic(k)y
|
|
1803
|
-
case 107:
|
|
1804
|
-
return replace(value, ":", ":" + WEBKIT) + value;
|
|
1805
|
-
// (inline-)?fl(e)x
|
|
1806
|
-
case 101:
|
|
1807
|
-
return replace(value, /(.+:)([^;!]+)(;|!.+)?/, "$1" + WEBKIT + (charat(value, 14) === 45 ? "inline-" : "") + "box$3$1" + WEBKIT + "$2$3$1" + MS + "$2box$3") + value;
|
|
1808
|
-
}
|
|
1809
|
-
break;
|
|
1810
|
-
// writing-mode
|
|
1811
|
-
case 5936:
|
|
1812
|
-
switch (charat(value, length2 + 11)) {
|
|
1813
|
-
// vertical-l(r)
|
|
1814
|
-
case 114:
|
|
1815
|
-
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb") + value;
|
|
1816
|
-
// vertical-r(l)
|
|
1817
|
-
case 108:
|
|
1818
|
-
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb-rl") + value;
|
|
1819
|
-
// horizontal(-)tb
|
|
1820
|
-
case 45:
|
|
1821
|
-
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "lr") + value;
|
|
1822
|
-
}
|
|
1823
|
-
return WEBKIT + value + MS + value + value;
|
|
1824
|
-
}
|
|
1825
|
-
return value;
|
|
1826
|
-
}
|
|
1827
|
-
var prefixer = function prefixer2(element, index, children, callback) {
|
|
1828
|
-
if (element.length > -1) {
|
|
1829
|
-
if (!element["return"]) switch (element.type) {
|
|
1830
|
-
case DECLARATION:
|
|
1831
|
-
element["return"] = prefix(element.value, element.length);
|
|
1832
|
-
break;
|
|
1833
|
-
case KEYFRAMES:
|
|
1834
|
-
return serialize([copy(element, {
|
|
1835
|
-
value: replace(element.value, "@", "@" + WEBKIT)
|
|
1836
|
-
})], callback);
|
|
1837
|
-
case RULESET:
|
|
1838
|
-
if (element.length) return combine(element.props, function(value) {
|
|
1839
|
-
switch (match(value, /(::plac\w+|:read-\w+)/)) {
|
|
1840
|
-
// :read-(only|write)
|
|
1841
|
-
case ":read-only":
|
|
1842
|
-
case ":read-write":
|
|
1843
|
-
return serialize([copy(element, {
|
|
1844
|
-
props: [replace(value, /:(read-\w+)/, ":" + MOZ + "$1")]
|
|
1845
|
-
})], callback);
|
|
1846
|
-
// :placeholder
|
|
1847
|
-
case "::placeholder":
|
|
1848
|
-
return serialize([copy(element, {
|
|
1849
|
-
props: [replace(value, /:(plac\w+)/, ":" + WEBKIT + "input-$1")]
|
|
1850
|
-
}), copy(element, {
|
|
1851
|
-
props: [replace(value, /:(plac\w+)/, ":" + MOZ + "$1")]
|
|
1852
|
-
}), copy(element, {
|
|
1853
|
-
props: [replace(value, /:(plac\w+)/, MS + "input-$1")]
|
|
1854
|
-
})], callback);
|
|
1855
|
-
}
|
|
1856
|
-
return "";
|
|
1857
|
-
});
|
|
1858
|
-
}
|
|
1859
|
-
}
|
|
1860
|
-
};
|
|
1861
|
-
var getServerStylisCache = isBrowser ? void 0 : weakMemoize(function() {
|
|
1862
|
-
return memoize(function() {
|
|
1863
|
-
return {};
|
|
1864
|
-
});
|
|
1865
|
-
});
|
|
1866
|
-
var defaultStylisPlugins = [prefixer];
|
|
1867
|
-
var createCache = function createCache2(options) {
|
|
1868
|
-
var key = options.key;
|
|
1869
|
-
if (isBrowser && key === "css") {
|
|
1870
|
-
var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])");
|
|
1871
|
-
Array.prototype.forEach.call(ssrStyles, function(node2) {
|
|
1872
|
-
var dataEmotionAttribute = node2.getAttribute("data-emotion");
|
|
1873
|
-
if (dataEmotionAttribute.indexOf(" ") === -1) {
|
|
1874
|
-
return;
|
|
1875
|
-
}
|
|
1876
|
-
document.head.appendChild(node2);
|
|
1877
|
-
node2.setAttribute("data-s", "");
|
|
1878
|
-
});
|
|
1879
|
-
}
|
|
1880
|
-
var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
|
|
1881
|
-
var inserted = {};
|
|
1882
|
-
var container;
|
|
1883
|
-
var nodesToHydrate = [];
|
|
1884
|
-
if (isBrowser) {
|
|
1885
|
-
container = options.container || document.head;
|
|
1886
|
-
Array.prototype.forEach.call(
|
|
1887
|
-
// this means we will ignore elements which don't have a space in them which
|
|
1888
|
-
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
1889
|
-
document.querySelectorAll('style[data-emotion^="' + key + ' "]'),
|
|
1890
|
-
function(node2) {
|
|
1891
|
-
var attrib = node2.getAttribute("data-emotion").split(" ");
|
|
1892
|
-
for (var i = 1; i < attrib.length; i++) {
|
|
1893
|
-
inserted[attrib[i]] = true;
|
|
1894
|
-
}
|
|
1895
|
-
nodesToHydrate.push(node2);
|
|
1896
|
-
}
|
|
1897
|
-
);
|
|
1898
|
-
}
|
|
1899
|
-
var _insert;
|
|
1900
|
-
var omnipresentPlugins = [compat, removeLabel];
|
|
1901
|
-
if (!getServerStylisCache) {
|
|
1902
|
-
var currentSheet;
|
|
1903
|
-
var finalizingPlugins = [stringify, rulesheet(function(rule) {
|
|
1904
|
-
currentSheet.insert(rule);
|
|
1905
|
-
})];
|
|
1906
|
-
var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
|
|
1907
|
-
var stylis = function stylis2(styles) {
|
|
1908
|
-
return serialize(compile(styles), serializer);
|
|
1909
|
-
};
|
|
1910
|
-
_insert = function insert(selector, serialized, sheet, shouldCache) {
|
|
1911
|
-
currentSheet = sheet;
|
|
1912
|
-
stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
|
1913
|
-
if (shouldCache) {
|
|
1914
|
-
cache.inserted[serialized.name] = true;
|
|
1915
|
-
}
|
|
1916
|
-
};
|
|
1917
|
-
} else {
|
|
1918
|
-
var _finalizingPlugins = [stringify];
|
|
1919
|
-
var _serializer = middleware(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));
|
|
1920
|
-
var _stylis = function _stylis2(styles) {
|
|
1921
|
-
return serialize(compile(styles), _serializer);
|
|
1922
|
-
};
|
|
1923
|
-
var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
|
|
1924
|
-
var getRules3 = function getRules4(selector, serialized) {
|
|
1925
|
-
var name = serialized.name;
|
|
1926
|
-
if (serverStylisCache[name] === void 0) {
|
|
1927
|
-
serverStylisCache[name] = _stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
|
1928
|
-
}
|
|
1929
|
-
return serverStylisCache[name];
|
|
1930
|
-
};
|
|
1931
|
-
_insert = function _insert2(selector, serialized, sheet, shouldCache) {
|
|
1932
|
-
var name = serialized.name;
|
|
1933
|
-
var rules = getRules3(selector, serialized);
|
|
1934
|
-
if (cache.compat === void 0) {
|
|
1935
|
-
if (shouldCache) {
|
|
1936
|
-
cache.inserted[name] = true;
|
|
1937
|
-
}
|
|
1938
|
-
return rules;
|
|
1939
|
-
} else {
|
|
1940
|
-
if (shouldCache) {
|
|
1941
|
-
cache.inserted[name] = rules;
|
|
1942
|
-
} else {
|
|
1943
|
-
return rules;
|
|
1944
|
-
}
|
|
1945
|
-
}
|
|
1946
|
-
};
|
|
1947
|
-
}
|
|
1948
|
-
var cache = {
|
|
1949
|
-
key,
|
|
1950
|
-
sheet: new StyleSheet({
|
|
1951
|
-
key,
|
|
1952
|
-
container,
|
|
1953
|
-
nonce: options.nonce,
|
|
1954
|
-
speedy: options.speedy,
|
|
1955
|
-
prepend: options.prepend,
|
|
1956
|
-
insertionPoint: options.insertionPoint
|
|
1957
|
-
}),
|
|
1958
|
-
nonce: options.nonce,
|
|
1959
|
-
inserted,
|
|
1960
|
-
registered: {},
|
|
1961
|
-
insert: _insert
|
|
1962
|
-
};
|
|
1963
|
-
cache.sheet.hydrate(nodesToHydrate);
|
|
1964
|
-
return cache;
|
|
1149
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material7.Box, { height: "100vh", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", textAlign: "center", px: 2, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material7.Box, { display: "flex", alignItems: "center", mb: 4, children: [
|
|
1150
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material7.Typography, { variant: "h3", component: "span", fontWeight: 500, sx: { lineHeight: 1 }, children: "500" }),
|
|
1151
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material7.Divider, { orientation: "vertical", flexItem: true, sx: { mx: 3 } }),
|
|
1152
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material7.Typography, { variant: "h5", component: "span", children: error.message })
|
|
1153
|
+
] }) });
|
|
1965
1154
|
};
|
|
1966
1155
|
|
|
1967
1156
|
// src/providers/LayoutProvider.tsx
|
|
1968
|
-
var
|
|
1969
|
-
var import_material4 = require("@mui/material");
|
|
1970
|
-
var import_colors = require("@mui/material/colors");
|
|
1157
|
+
var import_material12 = require("@mui/material");
|
|
1971
1158
|
|
|
1972
1159
|
// node_modules/@babel/runtime/helpers/esm/extends.js
|
|
1973
1160
|
function _extends() {
|
|
@@ -1991,11 +1178,11 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
1991
1178
|
return t;
|
|
1992
1179
|
}
|
|
1993
1180
|
|
|
1994
|
-
// node_modules/@mui/x-date-pickers/LocalizationProvider/LocalizationProvider.js
|
|
1995
|
-
var React4 = __toESM(require("react"));
|
|
1996
|
-
var import_prop_types = __toESM(require_prop_types());
|
|
1181
|
+
// node_modules/@mui/x-date-pickers/esm/LocalizationProvider/LocalizationProvider.js
|
|
1182
|
+
var React4 = __toESM(require("react"), 1);
|
|
1183
|
+
var import_prop_types = __toESM(require_prop_types(), 1);
|
|
1997
1184
|
var import_styles = require("@mui/material/styles");
|
|
1998
|
-
var
|
|
1185
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1999
1186
|
var _excluded = ["localeText"];
|
|
2000
1187
|
var MuiPickersAdapterContext = /* @__PURE__ */ React4.createContext(null);
|
|
2001
1188
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -2040,7 +1227,7 @@ var LocalizationProvider = function LocalizationProvider2(inProps) {
|
|
|
2040
1227
|
instance: dateLibInstance
|
|
2041
1228
|
});
|
|
2042
1229
|
if (!adapter.isMUIAdapter) {
|
|
2043
|
-
throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`", "For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`", "More information on the installation documentation: https://mui.com/x/react-date-pickers/
|
|
1230
|
+
throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`", "For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`", "More information on the installation documentation: https://mui.com/x/react-date-pickers/quickstart/#installation"].join(`
|
|
2044
1231
|
`));
|
|
2045
1232
|
}
|
|
2046
1233
|
return adapter;
|
|
@@ -2061,7 +1248,7 @@ var LocalizationProvider = function LocalizationProvider2(inProps) {
|
|
|
2061
1248
|
localeText
|
|
2062
1249
|
};
|
|
2063
1250
|
}, [defaultDates, utils, localeText]);
|
|
2064
|
-
return /* @__PURE__ */ (0,
|
|
1251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(MuiPickersAdapterContext.Provider, {
|
|
2065
1252
|
value: contextValue,
|
|
2066
1253
|
children
|
|
2067
1254
|
});
|
|
@@ -2078,7 +1265,7 @@ process.env.NODE_ENV !== "production" ? LocalizationProvider.propTypes = {
|
|
|
2078
1265
|
children: import_prop_types.default.node,
|
|
2079
1266
|
/**
|
|
2080
1267
|
* Date library adapter class function.
|
|
2081
|
-
* @see See the localization provider {@link https://mui.com/x/react-date-pickers/
|
|
1268
|
+
* @see See the localization provider {@link https://mui.com/x/react-date-pickers/quickstart/#integrate-provider-and-adapter date adapter setup section} for more details.
|
|
2082
1269
|
*/
|
|
2083
1270
|
dateAdapter: import_prop_types.default.func,
|
|
2084
1271
|
/**
|
|
@@ -2088,13 +1275,11 @@ process.env.NODE_ENV !== "production" ? LocalizationProvider.propTypes = {
|
|
|
2088
1275
|
dayOfMonth: import_prop_types.default.string,
|
|
2089
1276
|
dayOfMonthFull: import_prop_types.default.string,
|
|
2090
1277
|
fullDate: import_prop_types.default.string,
|
|
2091
|
-
fullTime: import_prop_types.default.string,
|
|
2092
1278
|
fullTime12h: import_prop_types.default.string,
|
|
2093
1279
|
fullTime24h: import_prop_types.default.string,
|
|
2094
1280
|
hours12h: import_prop_types.default.string,
|
|
2095
1281
|
hours24h: import_prop_types.default.string,
|
|
2096
1282
|
keyboardDate: import_prop_types.default.string,
|
|
2097
|
-
keyboardDateTime: import_prop_types.default.string,
|
|
2098
1283
|
keyboardDateTime12h: import_prop_types.default.string,
|
|
2099
1284
|
keyboardDateTime24h: import_prop_types.default.string,
|
|
2100
1285
|
meridiem: import_prop_types.default.string,
|
|
@@ -2139,13 +1324,13 @@ function warnOnce(message, gravity = "warning") {
|
|
|
2139
1324
|
}
|
|
2140
1325
|
}
|
|
2141
1326
|
|
|
2142
|
-
// node_modules/@mui/x-date-pickers/AdapterDayjs/AdapterDayjs.js
|
|
2143
|
-
var import_dayjs = __toESM(require("dayjs"));
|
|
2144
|
-
var import_weekOfYear = __toESM(require("dayjs/plugin/weekOfYear"));
|
|
2145
|
-
var import_customParseFormat = __toESM(require("dayjs/plugin/customParseFormat"));
|
|
2146
|
-
var import_localizedFormat = __toESM(require("dayjs/plugin/localizedFormat"));
|
|
2147
|
-
var import_isBetween = __toESM(require("dayjs/plugin/isBetween"));
|
|
2148
|
-
var import_advancedFormat = __toESM(require("dayjs/plugin/advancedFormat"));
|
|
1327
|
+
// node_modules/@mui/x-date-pickers/esm/AdapterDayjs/AdapterDayjs.js
|
|
1328
|
+
var import_dayjs = __toESM(require("dayjs"), 1);
|
|
1329
|
+
var import_weekOfYear = __toESM(require("dayjs/plugin/weekOfYear.js"), 1);
|
|
1330
|
+
var import_customParseFormat = __toESM(require("dayjs/plugin/customParseFormat.js"), 1);
|
|
1331
|
+
var import_localizedFormat = __toESM(require("dayjs/plugin/localizedFormat.js"), 1);
|
|
1332
|
+
var import_isBetween = __toESM(require("dayjs/plugin/isBetween.js"), 1);
|
|
1333
|
+
var import_advancedFormat = __toESM(require("dayjs/plugin/advancedFormat.js"), 1);
|
|
2149
1334
|
import_dayjs.default.extend(import_localizedFormat.default);
|
|
2150
1335
|
import_dayjs.default.extend(import_weekOfYear.default);
|
|
2151
1336
|
import_dayjs.default.extend(import_isBetween.default);
|
|
@@ -2251,10 +1436,8 @@ var defaultFormats = {
|
|
|
2251
1436
|
shortDate: "MMM D",
|
|
2252
1437
|
normalDate: "D MMMM",
|
|
2253
1438
|
normalDateWithWeekday: "ddd, MMM D",
|
|
2254
|
-
fullTime: "LT",
|
|
2255
1439
|
fullTime12h: "hh:mm A",
|
|
2256
1440
|
fullTime24h: "HH:mm",
|
|
2257
|
-
keyboardDateTime: "L LT",
|
|
2258
1441
|
keyboardDateTime12h: "L hh:mm A",
|
|
2259
1442
|
keyboardDateTime24h: "L HH:mm"
|
|
2260
1443
|
};
|
|
@@ -2630,134 +1813,332 @@ var AdapterDayjs = class {
|
|
|
2630
1813
|
// src/providers/LayoutProvider.tsx
|
|
2631
1814
|
var import_react_query = require("@tanstack/react-query");
|
|
2632
1815
|
var import_DashboardLayout = require("@toolpad/core/DashboardLayout");
|
|
1816
|
+
var import_useNotifications = require("@toolpad/core/useNotifications");
|
|
2633
1817
|
var import_i18next = __toESM(require("i18next"), 1);
|
|
2634
1818
|
var import_i18next_browser_languagedetector = __toESM(require("i18next-browser-languagedetector"), 1);
|
|
2635
1819
|
var import_i18next_http_backend = __toESM(require("i18next-http-backend"), 1);
|
|
2636
|
-
var
|
|
1820
|
+
var import_react_i18next5 = require("react-i18next");
|
|
2637
1821
|
var import_zod = require("zod");
|
|
2638
1822
|
var import_zod_i18n_map = require("zod-i18n-map");
|
|
2639
1823
|
var import_zod2 = __toESM(require("zod-i18n-map/locales/cs/zod.json"), 1);
|
|
2640
1824
|
var import_zod3 = __toESM(require("zod-i18n-map/locales/en/zod.json"), 1);
|
|
2641
1825
|
|
|
1826
|
+
// src/components/core/AppTitle.tsx
|
|
1827
|
+
var import_material8 = require("@mui/material");
|
|
1828
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1829
|
+
var AppTitle = ({ title }) => {
|
|
1830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_material8.Stack, { direction: "row", alignItems: "center", spacing: 2, children: [
|
|
1831
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("img", { src: "/favicon-32x32.png", alt: "app-logo", loading: "lazy" }),
|
|
1832
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_material8.Typography, { variant: "h6", children: title })
|
|
1833
|
+
] });
|
|
1834
|
+
};
|
|
1835
|
+
|
|
1836
|
+
// src/components/core/DevelopmentBanner.tsx
|
|
1837
|
+
var import_icons_material2 = require("@mui/icons-material");
|
|
1838
|
+
var import_material9 = require("@mui/material");
|
|
1839
|
+
var import_react4 = require("react");
|
|
1840
|
+
var import_react_i18next2 = require("react-i18next");
|
|
1841
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1842
|
+
var DevelopmentBanner = ({ hasNavigationRoutes }) => {
|
|
1843
|
+
const { t } = (0, import_react_i18next2.useTranslation)();
|
|
1844
|
+
const [bannerOpen, setBannerOpen] = (0, import_react4.useState)(true);
|
|
1845
|
+
const closeBanner = () => setBannerOpen(false);
|
|
1846
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material9.Fade, { appear: false, in: bannerOpen, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material9.Paper, { square: true, elevation: 3, tabIndex: -1, sx: {
|
|
1847
|
+
position: "fixed",
|
|
1848
|
+
bottom: 0,
|
|
1849
|
+
left: { xs: 0, sm: hasNavigationRoutes ? 83.3 : 0 },
|
|
1850
|
+
right: 0,
|
|
1851
|
+
m: 0,
|
|
1852
|
+
p: 2,
|
|
1853
|
+
borderWidth: 0,
|
|
1854
|
+
borderTopWidth: 1
|
|
1855
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material9.Grid, { container: true, justifyContent: "space-between", alignItems: "center", children: [
|
|
1856
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material9.Grid, { size: 10, children: [
|
|
1857
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material9.Typography, { fontWeight: "bold", children: t("Layout.DevelopmentDialogTitle") }),
|
|
1858
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material9.Typography, { variant: "body2", children: t("Layout.DevelopmentDialogContent") })
|
|
1859
|
+
] }),
|
|
1860
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material9.Grid, { size: 2, sx: { p: 1, textAlign: "right" }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material9.IconButton, { size: "small", onClick: closeBanner, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_icons_material2.Close, {}) }) })
|
|
1861
|
+
] }) }) });
|
|
1862
|
+
};
|
|
1863
|
+
|
|
1864
|
+
// src/components/core/ToolbarAccount.tsx
|
|
1865
|
+
var import_icons_material3 = require("@mui/icons-material");
|
|
1866
|
+
var import_material10 = require("@mui/material");
|
|
1867
|
+
var import_react5 = require("react");
|
|
1868
|
+
var import_react_i18next3 = require("react-i18next");
|
|
1869
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1870
|
+
var user = {
|
|
1871
|
+
name: "Dalibor Homola",
|
|
1872
|
+
employeeId: "C2503017",
|
|
1873
|
+
department: "MD0L50",
|
|
1874
|
+
login: () => {
|
|
1875
|
+
console.log("Login");
|
|
1876
|
+
},
|
|
1877
|
+
logout: () => {
|
|
1878
|
+
console.log("Logout");
|
|
1879
|
+
}
|
|
1880
|
+
};
|
|
1881
|
+
var ToolbarAccount = () => {
|
|
1882
|
+
const [anchorEl, setAnchorEl] = (0, import_react5.useState)(null);
|
|
1883
|
+
const [tab, setTab] = (0, import_react5.useState)("settings");
|
|
1884
|
+
const open = Boolean(anchorEl);
|
|
1885
|
+
const { t, i18n: i18n2 } = (0, import_react_i18next3.useTranslation)();
|
|
1886
|
+
const { mode, setMode } = (0, import_material10.useColorScheme)();
|
|
1887
|
+
const changeLanguage = (newLanguage) => () => {
|
|
1888
|
+
i18n2.changeLanguage(newLanguage).finally(() => closeMenu());
|
|
1889
|
+
};
|
|
1890
|
+
const changeMode = (newMode) => () => {
|
|
1891
|
+
setMode(newMode);
|
|
1892
|
+
closeMenu();
|
|
1893
|
+
};
|
|
1894
|
+
const getModeText = () => {
|
|
1895
|
+
switch (mode) {
|
|
1896
|
+
case "light":
|
|
1897
|
+
return t("Layout.Light");
|
|
1898
|
+
case "dark":
|
|
1899
|
+
return t("Layout.Dark");
|
|
1900
|
+
default:
|
|
1901
|
+
return t("Layout.System");
|
|
1902
|
+
}
|
|
1903
|
+
};
|
|
1904
|
+
const usernameInitials = () => {
|
|
1905
|
+
const splittedName = user.name.split(" ");
|
|
1906
|
+
return `${splittedName[0][0]}${splittedName.length > 1 ? splittedName[1][0] : ""}`;
|
|
1907
|
+
};
|
|
1908
|
+
const openMenu = (e) => setAnchorEl(e.currentTarget);
|
|
1909
|
+
const closeMenu = () => {
|
|
1910
|
+
setAnchorEl(null);
|
|
1911
|
+
setTimeout(() => setTab("settings"), 300);
|
|
1912
|
+
};
|
|
1913
|
+
const login2 = () => user.login();
|
|
1914
|
+
const logout2 = () => user.logout();
|
|
1915
|
+
const changeTab = (newTab) => () => setTab(newTab);
|
|
1916
|
+
const settings = /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material10.List, { component: "nav", subheader: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.ListSubheader, { sx: { backgroundColor: "transparent" }, children: t("Layout.Settings") }), children: [
|
|
1917
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material10.ListItemButton, { onClick: changeTab("theme"), sx: { py: 0.3 }, children: [
|
|
1918
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons_material3.Brightness4, {}) }),
|
|
1919
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.ListItemText, { primary: t("Layout.Appearance"), secondary: getModeText() }),
|
|
1920
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons_material3.ChevronRight, {})
|
|
1921
|
+
] }),
|
|
1922
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material10.ListItemButton, { onClick: changeTab("language"), sx: { py: 0.3 }, children: [
|
|
1923
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons_material3.Translate, {}) }),
|
|
1924
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.ListItemText, { primary: t("Layout.Language"), secondary: i18n2.resolvedLanguage === "en" ? "English" : "\u010Ce\u0161tina" }),
|
|
1925
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons_material3.ChevronRight, {})
|
|
1926
|
+
] })
|
|
1927
|
+
] });
|
|
1928
|
+
const theme = /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material10.List, { subheader: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material10.ListSubheader, { onClick: changeTab("settings"), sx: { backgroundColor: "transparent", display: "flex", alignItems: "center", px: 1, cursor: "pointer" }, children: [
|
|
1929
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.IconButton, { size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons_material3.ArrowBack, { fontSize: "small" }) }),
|
|
1930
|
+
" ",
|
|
1931
|
+
t("Layout.Appearance")
|
|
1932
|
+
] }), children: [
|
|
1933
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material10.ListItemButton, { onClick: changeMode("light"), disabled: mode === "light", children: [
|
|
1934
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons_material3.LightMode, {}) }),
|
|
1935
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.ListItemText, { primary: t("Layout.Light") })
|
|
1936
|
+
] }),
|
|
1937
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material10.ListItemButton, { onClick: changeMode("dark"), disabled: mode === "dark", children: [
|
|
1938
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons_material3.DarkMode, {}) }),
|
|
1939
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.ListItemText, { primary: t("Layout.Dark") })
|
|
1940
|
+
] }),
|
|
1941
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material10.ListItemButton, { onClick: changeMode("system"), disabled: mode === "system", children: [
|
|
1942
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons_material3.SettingsBrightness, {}) }),
|
|
1943
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.ListItemText, { primary: t("Layout.System") })
|
|
1944
|
+
] })
|
|
1945
|
+
] });
|
|
1946
|
+
const language = /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material10.List, { subheader: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material10.ListSubheader, { onClick: changeTab("settings"), sx: { backgroundColor: "transparent", display: "flex", alignItems: "center", px: 1, cursor: "pointer" }, children: [
|
|
1947
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.IconButton, { size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons_material3.ArrowBack, { fontSize: "small" }) }),
|
|
1948
|
+
" ",
|
|
1949
|
+
t("Layout.Language")
|
|
1950
|
+
] }), children: [
|
|
1951
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.ListItemButton, { onClick: changeLanguage("en"), disabled: i18n2.resolvedLanguage === "en", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.ListItemText, { primary: "English" }) }),
|
|
1952
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.ListItemButton, { onClick: changeLanguage("cs"), disabled: i18n2.resolvedLanguage === "cs", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.ListItemText, { primary: "\u010Ce\u0161tina" }) })
|
|
1953
|
+
] });
|
|
1954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react5.Fragment, { children: [
|
|
1955
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.IconButton, { size: "small", onClick: openMenu, children: user.name ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.Avatar, { sx: { width: { xs: 32, sm: 40 }, height: { xs: 32, sm: 40 }, bgcolor: "primary.main" }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.Typography, { variant: "subtitle2", sx: { fontWeight: "bold", lineHeight: 0 }, children: usernameInitials() }) }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons_material3.AccountCircle, {}) }),
|
|
1956
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.Menu, { anchorEl, open, onClose: closeMenu, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material10.Box, { sx: { width: 240 }, children: [
|
|
1957
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.List, { children: user.name ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react5.Fragment, { children: [
|
|
1958
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.ListItem, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.ListItemText, { primary: user.name, secondary: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { children: [
|
|
1959
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: user.employeeId }),
|
|
1960
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("br", {}),
|
|
1961
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: user.department })
|
|
1962
|
+
] }) }) }),
|
|
1963
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material10.ListItemButton, { onClick: logout2, children: [
|
|
1964
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons_material3.Logout, { color: "error" }) }),
|
|
1965
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.ListItemText, { primary: t("Layout.Logout") })
|
|
1966
|
+
] })
|
|
1967
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material10.ListItemButton, { onClick: login2, children: [
|
|
1968
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons_material3.Login, { color: "success" }) }),
|
|
1969
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.ListItemText, { primary: t("Layout.LogIn") })
|
|
1970
|
+
] }) }),
|
|
1971
|
+
tab === "settings" && settings,
|
|
1972
|
+
tab === "theme" && theme,
|
|
1973
|
+
tab === "language" && language
|
|
1974
|
+
] }) })
|
|
1975
|
+
] });
|
|
1976
|
+
};
|
|
1977
|
+
|
|
1978
|
+
// src/hooks/ThemeHook.ts
|
|
1979
|
+
var import_material11 = require("@mui/material");
|
|
1980
|
+
var import_colors = require("@mui/material/colors");
|
|
1981
|
+
var import_locale = require("@mui/material/locale");
|
|
1982
|
+
var import_locales = require("@mui/x-data-grid-premium/locales");
|
|
1983
|
+
var import_locales2 = require("@mui/x-date-pickers-pro/locales");
|
|
1984
|
+
var import_react_i18next4 = require("react-i18next");
|
|
1985
|
+
var WISTRON_PRIMARY = "#00506E";
|
|
1986
|
+
var WISTRON_SECONDARY = "#64DC00";
|
|
1987
|
+
var useGetTheme = (theme) => {
|
|
1988
|
+
const { i18n: i18n2 } = (0, import_react_i18next4.useTranslation)();
|
|
1989
|
+
return (0, import_material11.createTheme)(
|
|
1990
|
+
{
|
|
1991
|
+
cssVariables: {
|
|
1992
|
+
colorSchemeSelector: "data-toolpad-color-scheme"
|
|
1993
|
+
},
|
|
1994
|
+
colorSchemes: {
|
|
1995
|
+
light: {
|
|
1996
|
+
palette: {
|
|
1997
|
+
primary: { main: WISTRON_PRIMARY },
|
|
1998
|
+
secondary: { main: WISTRON_SECONDARY }
|
|
1999
|
+
}
|
|
2000
|
+
},
|
|
2001
|
+
dark: {
|
|
2002
|
+
palette: {
|
|
2003
|
+
primary: { main: (0, import_material11.lighten)(WISTRON_PRIMARY, 0.1) },
|
|
2004
|
+
secondary: { main: (0, import_material11.darken)(WISTRON_SECONDARY, 0.1) }
|
|
2005
|
+
}
|
|
2006
|
+
},
|
|
2007
|
+
...theme?.colorSchemes
|
|
2008
|
+
},
|
|
2009
|
+
components: {
|
|
2010
|
+
MuiCssBaseline: {
|
|
2011
|
+
styleOverrides: (theme2) => {
|
|
2012
|
+
return {
|
|
2013
|
+
body: {
|
|
2014
|
+
"&::-webkit-scrollbar, & *::-webkit-scrollbar": {
|
|
2015
|
+
width: "0.7em",
|
|
2016
|
+
height: "0.7em"
|
|
2017
|
+
},
|
|
2018
|
+
"&::-webkit-scrollbar-track, & *::-webkit-scrollbar-track": {
|
|
2019
|
+
backgroundColor: theme2.palette.mode === "dark" ? import_colors.grey[900] : import_colors.grey[200],
|
|
2020
|
+
borderRadius: "5px"
|
|
2021
|
+
},
|
|
2022
|
+
"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb": {
|
|
2023
|
+
backgroundColor: theme2.palette.mode === "dark" ? import_colors.grey[800] : import_colors.grey[400],
|
|
2024
|
+
borderRadius: "10px"
|
|
2025
|
+
},
|
|
2026
|
+
"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover": {
|
|
2027
|
+
backgroundColor: theme2.palette.mode === "dark" ? import_colors.grey[700] : import_colors.grey[500]
|
|
2028
|
+
},
|
|
2029
|
+
"&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner": {
|
|
2030
|
+
backgroundColor: "transparent"
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
};
|
|
2034
|
+
}
|
|
2035
|
+
},
|
|
2036
|
+
MuiTextField: {
|
|
2037
|
+
defaultProps: {
|
|
2038
|
+
fullWidth: true
|
|
2039
|
+
}
|
|
2040
|
+
},
|
|
2041
|
+
MuiTableContainer: {
|
|
2042
|
+
styleOverrides: {
|
|
2043
|
+
root: ({ theme: theme2 }) => ({
|
|
2044
|
+
height: "calc(100vh - 56px)",
|
|
2045
|
+
[theme2.breakpoints.up("sm")]: {
|
|
2046
|
+
height: "calc(100vh - 64px)"
|
|
2047
|
+
},
|
|
2048
|
+
"& .MuiDataGrid-cell--editing": {
|
|
2049
|
+
"& .MuiInputBase-root": {
|
|
2050
|
+
height: "100%"
|
|
2051
|
+
}
|
|
2052
|
+
},
|
|
2053
|
+
"& .MuiDataGrid-columnHeaderTitle": {
|
|
2054
|
+
fontWeight: 600
|
|
2055
|
+
},
|
|
2056
|
+
"& .Mui-error": {
|
|
2057
|
+
backgroundColor: theme2.palette.error.main,
|
|
2058
|
+
color: theme2.palette.error.contrastText
|
|
2059
|
+
},
|
|
2060
|
+
"& .MuiDataGrid-booleanCell[data-value='true']": {
|
|
2061
|
+
color: `${theme2.palette.success.main} !important`
|
|
2062
|
+
},
|
|
2063
|
+
"& .MuiDataGrid-booleanCell[data-value='false']": {
|
|
2064
|
+
color: `${theme2.palette.error.main} !important`
|
|
2065
|
+
}
|
|
2066
|
+
})
|
|
2067
|
+
}
|
|
2068
|
+
},
|
|
2069
|
+
MuiDialog: {
|
|
2070
|
+
defaultProps: {
|
|
2071
|
+
fullWidth: true
|
|
2072
|
+
}
|
|
2073
|
+
},
|
|
2074
|
+
...theme?.components
|
|
2075
|
+
}
|
|
2076
|
+
},
|
|
2077
|
+
i18n2.resolvedLanguage === "cs" ? import_locales2.csCZ : import_locales2.enUS,
|
|
2078
|
+
i18n2.resolvedLanguage === "cs" ? import_locales.csCZ : import_locales.enUS,
|
|
2079
|
+
i18n2.resolvedLanguage === "cs" ? import_locale.csCZ : import_locale.enUS
|
|
2080
|
+
);
|
|
2081
|
+
};
|
|
2082
|
+
|
|
2642
2083
|
// src/providers/TanstackRouterAppProvider.tsx
|
|
2643
|
-
var
|
|
2084
|
+
var import_react_router4 = require("@tanstack/react-router");
|
|
2644
2085
|
var import_AppProvider = require("@toolpad/core/AppProvider");
|
|
2645
|
-
var
|
|
2646
|
-
var
|
|
2647
|
-
var
|
|
2086
|
+
var import_react6 = require("react");
|
|
2087
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2088
|
+
var Link2 = (0, import_react6.forwardRef)((props, ref) => {
|
|
2648
2089
|
const { href, history, ...rest } = props;
|
|
2649
|
-
return /* @__PURE__ */ (0,
|
|
2090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_router4.Link, { ref, to: href, replace: history === "replace", ...rest });
|
|
2650
2091
|
});
|
|
2651
2092
|
var TanstackRouterAppProvider = (props) => {
|
|
2652
|
-
const { pathname } = (0,
|
|
2653
|
-
const searchParams = (0,
|
|
2654
|
-
const _navigate = (0,
|
|
2655
|
-
const navigate = (0,
|
|
2093
|
+
const { pathname } = (0, import_react_router4.useLocation)();
|
|
2094
|
+
const searchParams = (0, import_react_router4.useSearch)({ strict: false });
|
|
2095
|
+
const _navigate = (0, import_react_router4.useNavigate)();
|
|
2096
|
+
const navigate = (0, import_react6.useCallback)(
|
|
2656
2097
|
(url, { history = "auto" } = {}) => {
|
|
2657
2098
|
_navigate({ to: url.toString(), replace: history === "replace" }).catch(console.error);
|
|
2658
2099
|
},
|
|
2659
2100
|
[_navigate]
|
|
2660
2101
|
);
|
|
2661
|
-
const router = (0,
|
|
2662
|
-
return /* @__PURE__ */ (0,
|
|
2102
|
+
const router = (0, import_react6.useMemo)(() => ({ pathname, searchParams: new URLSearchParams(searchParams), navigate, Link: Link2 }), [pathname, searchParams, navigate]);
|
|
2103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_AppProvider.AppProvider, { router, ...props });
|
|
2663
2104
|
};
|
|
2664
2105
|
|
|
2665
2106
|
// src/providers/LayoutProvider.tsx
|
|
2666
|
-
var
|
|
2667
|
-
|
|
2668
|
-
|
|
2107
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2108
|
+
import_i18next.default.use(import_i18next_http_backend.default).use(import_i18next_browser_languagedetector.default).use(import_react_i18next5.initReactI18next).init({
|
|
2109
|
+
fallbackLng: "en",
|
|
2110
|
+
interpolation: {
|
|
2111
|
+
escapeValue: false
|
|
2112
|
+
}
|
|
2113
|
+
});
|
|
2669
2114
|
import_i18next.default.addResourceBundle("en", "zod", import_zod3.default);
|
|
2670
2115
|
import_i18next.default.addResourceBundle("cs", "zod", import_zod2.default);
|
|
2671
2116
|
import_zod.z.setErrorMap(import_zod_i18n_map.zodI18nMap);
|
|
2672
|
-
var LayoutProvider = (
|
|
2673
|
-
const
|
|
2674
|
-
const { t, i18n } = (0,
|
|
2675
|
-
const
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
dark: {
|
|
2690
|
-
palette: {
|
|
2691
|
-
primary: { main: import_colors.indigo[600] },
|
|
2692
|
-
secondary: { main: import_colors.indigo[600] },
|
|
2693
|
-
background: {
|
|
2694
|
-
paper: import_colors.grey[900]
|
|
2695
|
-
}
|
|
2696
|
-
}
|
|
2697
|
-
}
|
|
2698
|
-
},
|
|
2699
|
-
components: {
|
|
2700
|
-
MuiCssBaseline: {
|
|
2701
|
-
styleOverrides: (theme) => {
|
|
2702
|
-
return {
|
|
2703
|
-
body: {
|
|
2704
|
-
"&::-webkit-scrollbar, & *::-webkit-scrollbar": {
|
|
2705
|
-
width: "0.7em",
|
|
2706
|
-
height: "0.7em"
|
|
2707
|
-
},
|
|
2708
|
-
"&::-webkit-scrollbar-track, & *::-webkit-scrollbar-track": {
|
|
2709
|
-
backgroundColor: theme.palette.mode === "dark" ? import_colors.grey[900] : import_colors.grey[200],
|
|
2710
|
-
borderRadius: "5px"
|
|
2711
|
-
},
|
|
2712
|
-
"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb": {
|
|
2713
|
-
backgroundColor: theme.palette.mode === "dark" ? import_colors.grey[800] : import_colors.grey[400],
|
|
2714
|
-
borderRadius: "10px"
|
|
2715
|
-
},
|
|
2716
|
-
"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover": {
|
|
2717
|
-
backgroundColor: theme.palette.mode === "dark" ? import_colors.grey[700] : import_colors.grey[500]
|
|
2718
|
-
},
|
|
2719
|
-
"&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner": {
|
|
2720
|
-
backgroundColor: "transparent"
|
|
2721
|
-
}
|
|
2722
|
-
}
|
|
2723
|
-
};
|
|
2724
|
-
}
|
|
2725
|
-
},
|
|
2726
|
-
MuiDrawer: {
|
|
2727
|
-
styleOverrides: {
|
|
2728
|
-
paper: ({ theme }) => ({
|
|
2729
|
-
backgroundColor: "inherit",
|
|
2730
|
-
[theme.breakpoints.down("sm")]: {
|
|
2731
|
-
backgroundColor: theme.palette.background.paper
|
|
2732
|
-
}
|
|
2733
|
-
})
|
|
2734
|
-
}
|
|
2117
|
+
var LayoutProvider = (props) => {
|
|
2118
|
+
const theme = useGetTheme(props.theme);
|
|
2119
|
+
const { t, i18n: i18n2 } = (0, import_react_i18next5.useTranslation)();
|
|
2120
|
+
const isFetching = !!(0, import_react_query.useIsFetching)();
|
|
2121
|
+
const isMutating = !!(0, import_react_query.useIsMutating)();
|
|
2122
|
+
const isLargeScreen = (0, import_material12.useMediaQuery)(theme.breakpoints.up("sm"));
|
|
2123
|
+
const user2 = { name: "Dalibor", department: "MD0L50", employeeId: "C2503017", company: "", category: "" };
|
|
2124
|
+
const navigation = props.getNavigation ? props.getNavigation({ user: user2, t }) : [];
|
|
2125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: i18n2.resolvedLanguage, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TanstackRouterAppProvider, { navigation, theme, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_useNotifications.NotificationsProvider, { slotProps: { snackbar: { anchorOrigin: { vertical: isLargeScreen ? "top" : "bottom", horizontal: "center" } } }, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2126
|
+
import_DashboardLayout.DashboardLayout,
|
|
2127
|
+
{
|
|
2128
|
+
defaultSidebarCollapsed: true,
|
|
2129
|
+
hideNavigation: !navigation.length,
|
|
2130
|
+
slots: {
|
|
2131
|
+
toolbarActions: () => null,
|
|
2132
|
+
toolbarAccount: ToolbarAccount,
|
|
2133
|
+
appTitle: () => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AppTitle, { title: props.title })
|
|
2735
2134
|
},
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
}
|
|
2742
|
-
}
|
|
2135
|
+
children: [
|
|
2136
|
+
props.children,
|
|
2137
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DevelopmentBanner, { hasNavigationRoutes: !!navigation.length }),
|
|
2138
|
+
(isFetching || isMutating) && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material12.LinearProgress, { sx: { position: "fixed", top: { xs: 56, sm: 64 }, left: 0, right: 0 } })
|
|
2139
|
+
]
|
|
2743
2140
|
}
|
|
2744
|
-
});
|
|
2745
|
-
const navigation = getNavigation({ user: { name: "Dalibor" }, i18n, t });
|
|
2746
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react5.CacheProvider, { value: emotionCache, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material4.ThemeProvider, { theme: createdTheme, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: i18n.resolvedLanguage, children: [
|
|
2747
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_query.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TanstackRouterAppProvider, { theme: createdTheme, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2748
|
-
import_DashboardLayout.DashboardLayout,
|
|
2749
|
-
{
|
|
2750
|
-
defaultSidebarCollapsed: true,
|
|
2751
|
-
navigation,
|
|
2752
|
-
branding: {
|
|
2753
|
-
logo: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("img", { src: "/android-chrome-192x192.png", alt: "Logo" }),
|
|
2754
|
-
title
|
|
2755
|
-
},
|
|
2756
|
-
children
|
|
2757
|
-
}
|
|
2758
|
-
) }) }),
|
|
2759
|
-
","
|
|
2760
|
-
] }) }) });
|
|
2141
|
+
) }) }) });
|
|
2761
2142
|
};
|
|
2762
2143
|
|
|
2763
2144
|
// src/index.ts
|
|
@@ -2783,7 +2164,8 @@ var _kc = new import_keycloak_js.default({
|
|
|
2783
2164
|
clientId: keycloakConfig.clientId
|
|
2784
2165
|
});
|
|
2785
2166
|
var initKeycloak = async () => {
|
|
2786
|
-
|
|
2167
|
+
if (typeof window === "undefined") return;
|
|
2168
|
+
const authenticated = await _kc.init({ onLoad: "check-sso" });
|
|
2787
2169
|
if (authenticated) {
|
|
2788
2170
|
return await loadUserInfo();
|
|
2789
2171
|
} else {
|
|
@@ -2822,14 +2204,14 @@ var getConfidentialToken = async () => {
|
|
|
2822
2204
|
var updateToken = () => _kc.updateToken(30).catch(login);
|
|
2823
2205
|
var hasRole = (roles) => roles.some((role) => _kc.hasRealmRole(role) || _kc.hasResourceRole(role));
|
|
2824
2206
|
var loadUserInfo = async () => {
|
|
2825
|
-
const
|
|
2207
|
+
const user2 = await _kc.loadUserInfo();
|
|
2826
2208
|
return {
|
|
2827
|
-
name:
|
|
2828
|
-
employeeId:
|
|
2829
|
-
department:
|
|
2830
|
-
email:
|
|
2831
|
-
company:
|
|
2832
|
-
category:
|
|
2209
|
+
name: user2.name,
|
|
2210
|
+
employeeId: user2.employeeId?.toUpperCase() ?? "",
|
|
2211
|
+
department: user2.department ?? "",
|
|
2212
|
+
email: user2.email,
|
|
2213
|
+
company: user2.company,
|
|
2214
|
+
category: user2.category
|
|
2833
2215
|
};
|
|
2834
2216
|
};
|
|
2835
2217
|
var UserService = {
|
|
@@ -2858,8 +2240,8 @@ var getContrastTextColor = (color) => {
|
|
|
2858
2240
|
var wczApiClient = import_axios.default.create();
|
|
2859
2241
|
wczApiClient.interceptors.request.use(async (config) => {
|
|
2860
2242
|
await UserService.updateToken();
|
|
2861
|
-
const
|
|
2862
|
-
config.headers.Authorization = `Bearer ${
|
|
2243
|
+
const token = await UserService.getToken();
|
|
2244
|
+
config.headers.Authorization = `Bearer ${token}`;
|
|
2863
2245
|
return config;
|
|
2864
2246
|
});
|
|
2865
2247
|
|
|
@@ -2867,7 +2249,7 @@ wczApiClient.interceptors.request.use(async (config) => {
|
|
|
2867
2249
|
var import_react_form = require("@tanstack/react-form");
|
|
2868
2250
|
|
|
2869
2251
|
// src/components/form/FormAutocomplete.tsx
|
|
2870
|
-
var
|
|
2252
|
+
var import_material13 = require("@mui/material");
|
|
2871
2253
|
|
|
2872
2254
|
// src/utils/FormUtils.ts
|
|
2873
2255
|
var getFieldStatus = (field) => {
|
|
@@ -2879,12 +2261,12 @@ var getFieldStatus = (field) => {
|
|
|
2879
2261
|
};
|
|
2880
2262
|
|
|
2881
2263
|
// src/components/form/FormAutocomplete.tsx
|
|
2882
|
-
var
|
|
2264
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2883
2265
|
var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
|
|
2884
2266
|
const field = useFieldContext();
|
|
2885
2267
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2886
|
-
return /* @__PURE__ */ (0,
|
|
2887
|
-
|
|
2268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2269
|
+
import_material13.Autocomplete,
|
|
2888
2270
|
{
|
|
2889
2271
|
value: field.state.value,
|
|
2890
2272
|
onChange: (_, value) => !autocompleteProps.freeSolo && field.handleChange(value),
|
|
@@ -2892,8 +2274,8 @@ var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
|
|
|
2892
2274
|
onBlur: field.handleBlur,
|
|
2893
2275
|
"aria-label": field.name,
|
|
2894
2276
|
...autocompleteProps,
|
|
2895
|
-
renderInput: (params) => /* @__PURE__ */ (0,
|
|
2896
|
-
|
|
2277
|
+
renderInput: (params) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2278
|
+
import_material13.TextField,
|
|
2897
2279
|
{
|
|
2898
2280
|
...params,
|
|
2899
2281
|
name: field.name,
|
|
@@ -2907,17 +2289,17 @@ var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
|
|
|
2907
2289
|
};
|
|
2908
2290
|
|
|
2909
2291
|
// src/components/form/FormCheckbox.tsx
|
|
2910
|
-
var
|
|
2911
|
-
var
|
|
2292
|
+
var import_material14 = require("@mui/material");
|
|
2293
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2912
2294
|
var FormCheckbox = (props) => {
|
|
2913
2295
|
const field = useFieldContext();
|
|
2914
2296
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2915
|
-
return /* @__PURE__ */ (0,
|
|
2916
|
-
/* @__PURE__ */ (0,
|
|
2917
|
-
|
|
2297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_material14.FormControl, { component: "fieldset", children: [
|
|
2298
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2299
|
+
import_material14.FormControlLabel,
|
|
2918
2300
|
{
|
|
2919
|
-
control: /* @__PURE__ */ (0,
|
|
2920
|
-
|
|
2301
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2302
|
+
import_material14.Checkbox,
|
|
2921
2303
|
{
|
|
2922
2304
|
name: field.name,
|
|
2923
2305
|
checked: Boolean(field.state.value),
|
|
@@ -2930,18 +2312,18 @@ var FormCheckbox = (props) => {
|
|
|
2930
2312
|
label: props.label ?? ""
|
|
2931
2313
|
}
|
|
2932
2314
|
),
|
|
2933
|
-
isTouched && hasError && /* @__PURE__ */ (0,
|
|
2315
|
+
isTouched && hasError && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_material14.FormHelperText, { error: hasError, children: helperText })
|
|
2934
2316
|
] });
|
|
2935
2317
|
};
|
|
2936
2318
|
|
|
2937
2319
|
// src/components/form/FormDatePicker.tsx
|
|
2938
2320
|
var import_x_date_pickers_pro = require("@mui/x-date-pickers-pro");
|
|
2939
2321
|
var import_dayjs2 = __toESM(require("dayjs"), 1);
|
|
2940
|
-
var
|
|
2322
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
2941
2323
|
var FormDatePicker = (props) => {
|
|
2942
2324
|
const field = useFieldContext();
|
|
2943
2325
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2944
|
-
return /* @__PURE__ */ (0,
|
|
2326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2945
2327
|
import_x_date_pickers_pro.DatePicker,
|
|
2946
2328
|
{
|
|
2947
2329
|
name: field.name,
|
|
@@ -2965,11 +2347,11 @@ var FormDatePicker = (props) => {
|
|
|
2965
2347
|
// src/components/form/FormDateTimePicker.tsx
|
|
2966
2348
|
var import_x_date_pickers_pro2 = require("@mui/x-date-pickers-pro");
|
|
2967
2349
|
var import_dayjs3 = __toESM(require("dayjs"), 1);
|
|
2968
|
-
var
|
|
2350
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2969
2351
|
var FormDateTimePicker = (props) => {
|
|
2970
2352
|
const field = useFieldContext();
|
|
2971
2353
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2972
|
-
return /* @__PURE__ */ (0,
|
|
2354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2973
2355
|
import_x_date_pickers_pro2.DateTimePicker,
|
|
2974
2356
|
{
|
|
2975
2357
|
name: field.name,
|
|
@@ -2990,16 +2372,40 @@ var FormDateTimePicker = (props) => {
|
|
|
2990
2372
|
);
|
|
2991
2373
|
};
|
|
2992
2374
|
|
|
2375
|
+
// src/components/form/FormNumberField.tsx
|
|
2376
|
+
var import_material15 = require("@mui/material");
|
|
2377
|
+
var import_react_number_format = require("react-number-format");
|
|
2378
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2379
|
+
var FormNumberField = ({ options, ...props }) => {
|
|
2380
|
+
const field = useFieldContext();
|
|
2381
|
+
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2383
|
+
import_react_number_format.NumericFormat,
|
|
2384
|
+
{
|
|
2385
|
+
customInput: import_material15.TextField,
|
|
2386
|
+
name: field.name,
|
|
2387
|
+
value: field.state.value ?? "",
|
|
2388
|
+
onValueChange: ({ floatValue }) => field.handleChange(floatValue),
|
|
2389
|
+
onBlur: field.handleBlur,
|
|
2390
|
+
error: isTouched && hasError,
|
|
2391
|
+
helperText: isTouched && helperText,
|
|
2392
|
+
"aria-label": field.name,
|
|
2393
|
+
...props,
|
|
2394
|
+
...options
|
|
2395
|
+
}
|
|
2396
|
+
);
|
|
2397
|
+
};
|
|
2398
|
+
|
|
2993
2399
|
// src/components/form/FormRadioGroup.tsx
|
|
2994
|
-
var
|
|
2995
|
-
var
|
|
2400
|
+
var import_material16 = require("@mui/material");
|
|
2401
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2996
2402
|
var FormRadioGroup = ({ label, options, ...props }) => {
|
|
2997
2403
|
const field = useFieldContext();
|
|
2998
2404
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2999
|
-
return /* @__PURE__ */ (0,
|
|
3000
|
-
label && /* @__PURE__ */ (0,
|
|
3001
|
-
/* @__PURE__ */ (0,
|
|
3002
|
-
|
|
2405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_material16.FormControl, { component: "fieldset", children: [
|
|
2406
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_material16.FormLabel, { component: "legend", children: label }),
|
|
2407
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2408
|
+
import_material16.RadioGroup,
|
|
3003
2409
|
{
|
|
3004
2410
|
name: field.name,
|
|
3005
2411
|
value: field.state.value ?? "",
|
|
@@ -3007,31 +2413,31 @@ var FormRadioGroup = ({ label, options, ...props }) => {
|
|
|
3007
2413
|
onBlur: field.handleBlur,
|
|
3008
2414
|
"aria-label": field.name,
|
|
3009
2415
|
...props,
|
|
3010
|
-
children: options.map((option) => /* @__PURE__ */ (0,
|
|
3011
|
-
|
|
2416
|
+
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2417
|
+
import_material16.FormControlLabel,
|
|
3012
2418
|
{
|
|
3013
2419
|
value: option.value,
|
|
3014
|
-
control: /* @__PURE__ */ (0,
|
|
2420
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_material16.Radio, {}),
|
|
3015
2421
|
label: option.label
|
|
3016
2422
|
},
|
|
3017
2423
|
option.value
|
|
3018
2424
|
))
|
|
3019
2425
|
}
|
|
3020
2426
|
),
|
|
3021
|
-
isTouched && hasError && /* @__PURE__ */ (0,
|
|
2427
|
+
isTouched && hasError && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_material16.FormHelperText, { error: hasError, children: helperText })
|
|
3022
2428
|
] });
|
|
3023
2429
|
};
|
|
3024
2430
|
|
|
3025
2431
|
// src/components/form/FormSlider.tsx
|
|
3026
|
-
var
|
|
3027
|
-
var
|
|
2432
|
+
var import_material17 = require("@mui/material");
|
|
2433
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
3028
2434
|
var FormSlider = ({ label, ...props }) => {
|
|
3029
2435
|
const field = useFieldContext();
|
|
3030
2436
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
3031
|
-
return /* @__PURE__ */ (0,
|
|
3032
|
-
label && /* @__PURE__ */ (0,
|
|
3033
|
-
/* @__PURE__ */ (0,
|
|
3034
|
-
|
|
2437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_material17.FormControl, { component: "fieldset", children: [
|
|
2438
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_material17.FormLabel, { children: label }),
|
|
2439
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2440
|
+
import_material17.Slider,
|
|
3035
2441
|
{
|
|
3036
2442
|
name: field.name,
|
|
3037
2443
|
value: field.state.value ?? 0,
|
|
@@ -3041,13 +2447,13 @@ var FormSlider = ({ label, ...props }) => {
|
|
|
3041
2447
|
...props
|
|
3042
2448
|
}
|
|
3043
2449
|
),
|
|
3044
|
-
isTouched && hasError && /* @__PURE__ */ (0,
|
|
2450
|
+
isTouched && hasError && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_material17.FormHelperText, { error: hasError, children: helperText })
|
|
3045
2451
|
] });
|
|
3046
2452
|
};
|
|
3047
2453
|
|
|
3048
2454
|
// src/components/form/FormSubmitButton.tsx
|
|
3049
|
-
var
|
|
3050
|
-
var
|
|
2455
|
+
var import_material18 = require("@mui/material");
|
|
2456
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
3051
2457
|
var FormSubmitButton = (props) => {
|
|
3052
2458
|
const form = useFormContext();
|
|
3053
2459
|
const handleClick = (e) => {
|
|
@@ -3055,12 +2461,13 @@ var FormSubmitButton = (props) => {
|
|
|
3055
2461
|
e.stopPropagation();
|
|
3056
2462
|
form.handleSubmit();
|
|
3057
2463
|
};
|
|
3058
|
-
return /* @__PURE__ */ (0,
|
|
3059
|
-
|
|
2464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(form.Subscribe, { selector: (state) => [state.canSubmit, state.isSubmitting], children: ([canSubmit, isSubmitting]) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2465
|
+
import_material18.Button,
|
|
3060
2466
|
{
|
|
3061
2467
|
loading: isSubmitting,
|
|
3062
|
-
disabled:
|
|
2468
|
+
disabled: !canSubmit,
|
|
3063
2469
|
onClick: handleClick,
|
|
2470
|
+
type: "submit",
|
|
3064
2471
|
"aria-label": "submit",
|
|
3065
2472
|
...props
|
|
3066
2473
|
}
|
|
@@ -3068,17 +2475,17 @@ var FormSubmitButton = (props) => {
|
|
|
3068
2475
|
};
|
|
3069
2476
|
|
|
3070
2477
|
// src/components/form/FormSwitch.tsx
|
|
3071
|
-
var
|
|
3072
|
-
var
|
|
2478
|
+
var import_material19 = require("@mui/material");
|
|
2479
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
3073
2480
|
var FormSwitch = (props) => {
|
|
3074
2481
|
const field = useFieldContext();
|
|
3075
2482
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
3076
|
-
return /* @__PURE__ */ (0,
|
|
3077
|
-
/* @__PURE__ */ (0,
|
|
3078
|
-
|
|
2483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_material19.FormControl, { component: "fieldset", children: [
|
|
2484
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2485
|
+
import_material19.FormControlLabel,
|
|
3079
2486
|
{
|
|
3080
|
-
control: /* @__PURE__ */ (0,
|
|
3081
|
-
|
|
2487
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2488
|
+
import_material19.Switch,
|
|
3082
2489
|
{
|
|
3083
2490
|
name: field.name,
|
|
3084
2491
|
checked: Boolean(field.state.value),
|
|
@@ -3091,18 +2498,18 @@ var FormSwitch = (props) => {
|
|
|
3091
2498
|
label: props.label ?? ""
|
|
3092
2499
|
}
|
|
3093
2500
|
),
|
|
3094
|
-
isTouched && hasError && /* @__PURE__ */ (0,
|
|
2501
|
+
isTouched && hasError && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_material19.FormHelperText, { error: hasError, children: helperText })
|
|
3095
2502
|
] });
|
|
3096
2503
|
};
|
|
3097
2504
|
|
|
3098
2505
|
// src/components/form/FormTextField.tsx
|
|
3099
|
-
var
|
|
3100
|
-
var
|
|
2506
|
+
var import_material20 = require("@mui/material");
|
|
2507
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3101
2508
|
var FormTextField = (props) => {
|
|
3102
2509
|
const field = useFieldContext();
|
|
3103
2510
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
3104
|
-
return /* @__PURE__ */ (0,
|
|
3105
|
-
|
|
2511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2512
|
+
import_material20.TextField,
|
|
3106
2513
|
{
|
|
3107
2514
|
name: field.name,
|
|
3108
2515
|
value: field.state.value ?? "",
|
|
@@ -3121,6 +2528,7 @@ var { fieldContext, useFieldContext, formContext, useFormContext } = (0, import_
|
|
|
3121
2528
|
var { useAppForm: useLayoutForm, withForm: withLayoutForm } = (0, import_react_form.createFormHook)({
|
|
3122
2529
|
fieldComponents: {
|
|
3123
2530
|
TextField: FormTextField,
|
|
2531
|
+
NumberField: FormNumberField,
|
|
3124
2532
|
Autocomplete: FormAutocomplete,
|
|
3125
2533
|
Checkbox: FormCheckbox,
|
|
3126
2534
|
Switch: FormSwitch,
|
|
@@ -3138,9 +2546,12 @@ var { useAppForm: useLayoutForm, withForm: withLayoutForm } = (0, import_react_f
|
|
|
3138
2546
|
|
|
3139
2547
|
// src/index.ts
|
|
3140
2548
|
var import_useDialogs = require("@toolpad/core/useDialogs");
|
|
2549
|
+
var import_useNotifications2 = require("@toolpad/core/useNotifications");
|
|
3141
2550
|
var import_useLocalStorageState = require("@toolpad/core/useLocalStorageState");
|
|
3142
2551
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3143
2552
|
0 && (module.exports = {
|
|
2553
|
+
ChipInputCell,
|
|
2554
|
+
EditableColumnHeader,
|
|
3144
2555
|
LayoutProvider,
|
|
3145
2556
|
Platform,
|
|
3146
2557
|
RouterButton,
|
|
@@ -3148,12 +2559,14 @@ var import_useLocalStorageState = require("@toolpad/core/useLocalStorageState");
|
|
|
3148
2559
|
RouterLink,
|
|
3149
2560
|
RouterNotFound,
|
|
3150
2561
|
RouterTab,
|
|
2562
|
+
TypographyWithIcon,
|
|
3151
2563
|
getContrastTextColor,
|
|
3152
2564
|
useDialogs,
|
|
3153
2565
|
useFieldContext,
|
|
3154
2566
|
useFormContext,
|
|
3155
2567
|
useLayoutForm,
|
|
3156
2568
|
useLocalStorageState,
|
|
2569
|
+
useNotifications,
|
|
3157
2570
|
uuidv7,
|
|
3158
2571
|
wczApiClient,
|
|
3159
2572
|
withLayoutForm
|