wcz-test 2.1.0 → 2.2.1
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 +554 -1141
- 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 +525 -1117
- package/dist/index.js.map +1 -1
- package/package.json +7 -5
package/dist/index.js
CHANGED
|
@@ -7,11 +7,11 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
|
7
7
|
var __commonJS = (cb, mod) => function __require() {
|
|
8
8
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
9
|
};
|
|
10
|
-
var __copyProps = (to,
|
|
11
|
-
if (
|
|
12
|
-
for (let key of __getOwnPropNames(
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
13
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () =>
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
15
|
}
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
@@ -206,7 +206,7 @@ var require_react_is_development = __commonJS({
|
|
|
206
206
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
207
207
|
var Element = REACT_ELEMENT_TYPE;
|
|
208
208
|
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
209
|
-
var
|
|
209
|
+
var Fragment2 = REACT_FRAGMENT_TYPE;
|
|
210
210
|
var Lazy = REACT_LAZY_TYPE;
|
|
211
211
|
var Memo = REACT_MEMO_TYPE;
|
|
212
212
|
var Portal = REACT_PORTAL_TYPE;
|
|
@@ -265,7 +265,7 @@ var require_react_is_development = __commonJS({
|
|
|
265
265
|
exports.ContextProvider = ContextProvider;
|
|
266
266
|
exports.Element = Element;
|
|
267
267
|
exports.ForwardRef = ForwardRef;
|
|
268
|
-
exports.Fragment =
|
|
268
|
+
exports.Fragment = Fragment2;
|
|
269
269
|
exports.Lazy = Lazy;
|
|
270
270
|
exports.Memo = Memo;
|
|
271
271
|
exports.Portal = Portal;
|
|
@@ -350,21 +350,21 @@ var require_object_assign = __commonJS({
|
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
352
|
module.exports = shouldUseNative() ? Object.assign : function(target, source) {
|
|
353
|
-
var
|
|
353
|
+
var from;
|
|
354
354
|
var to = toObject(target);
|
|
355
355
|
var symbols;
|
|
356
356
|
for (var s = 1; s < arguments.length; s++) {
|
|
357
|
-
|
|
358
|
-
for (var key in
|
|
359
|
-
if (hasOwnProperty.call(
|
|
360
|
-
to[key] =
|
|
357
|
+
from = Object(arguments[s]);
|
|
358
|
+
for (var key in from) {
|
|
359
|
+
if (hasOwnProperty.call(from, key)) {
|
|
360
|
+
to[key] = from[key];
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
if (getOwnPropertySymbols) {
|
|
364
|
-
symbols = getOwnPropertySymbols(
|
|
364
|
+
symbols = getOwnPropertySymbols(from);
|
|
365
365
|
for (var i = 0; i < symbols.length; i++) {
|
|
366
|
-
if (propIsEnumerable.call(
|
|
367
|
-
to[symbols[i]] =
|
|
366
|
+
if (propIsEnumerable.call(from, symbols[i])) {
|
|
367
|
+
to[symbols[i]] = from[symbols[i]];
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
370
|
}
|
|
@@ -462,7 +462,7 @@ var require_factoryWithTypeCheckers = __commonJS({
|
|
|
462
462
|
"node_modules/prop-types/factoryWithTypeCheckers.js"(exports, module) {
|
|
463
463
|
"use strict";
|
|
464
464
|
var ReactIs = require_react_is();
|
|
465
|
-
var
|
|
465
|
+
var assign = require_object_assign();
|
|
466
466
|
var ReactPropTypesSecret = require_ReactPropTypesSecret();
|
|
467
467
|
var has = require_has();
|
|
468
468
|
var checkPropTypes = require_checkPropTypes();
|
|
@@ -767,7 +767,7 @@ var require_factoryWithTypeCheckers = __commonJS({
|
|
|
767
767
|
if (propType !== "object") {
|
|
768
768
|
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
|
|
769
769
|
}
|
|
770
|
-
var allKeys =
|
|
770
|
+
var allKeys = assign({}, props[propName], shapeTypes);
|
|
771
771
|
for (var key in allKeys) {
|
|
772
772
|
var checker = shapeTypes[key];
|
|
773
773
|
if (has(shapeTypes, key) && typeof checker !== "function") {
|
|
@@ -972,974 +972,157 @@ var require_prop_types = __commonJS({
|
|
|
972
972
|
}
|
|
973
973
|
});
|
|
974
974
|
|
|
975
|
+
// src/components/core/TypographyWithIcon.tsx
|
|
976
|
+
import { Stack, Typography } from "@mui/material";
|
|
977
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
978
|
+
var stackSxProps = [
|
|
979
|
+
"margin",
|
|
980
|
+
"marginTop",
|
|
981
|
+
"marginRight",
|
|
982
|
+
"marginBottom",
|
|
983
|
+
"marginLeft",
|
|
984
|
+
"m",
|
|
985
|
+
"mt",
|
|
986
|
+
"mr",
|
|
987
|
+
"mb",
|
|
988
|
+
"ml",
|
|
989
|
+
"mx",
|
|
990
|
+
"my",
|
|
991
|
+
"padding",
|
|
992
|
+
"paddingTop",
|
|
993
|
+
"paddingRight",
|
|
994
|
+
"paddingBottom",
|
|
995
|
+
"paddingLeft",
|
|
996
|
+
"p",
|
|
997
|
+
"pt",
|
|
998
|
+
"pr",
|
|
999
|
+
"pb",
|
|
1000
|
+
"pl",
|
|
1001
|
+
"px",
|
|
1002
|
+
"py",
|
|
1003
|
+
"flexGrow",
|
|
1004
|
+
"flexShrink",
|
|
1005
|
+
"flexBasis",
|
|
1006
|
+
"flexDirection",
|
|
1007
|
+
"alignItems",
|
|
1008
|
+
"justifyContent",
|
|
1009
|
+
"position",
|
|
1010
|
+
"zIndex",
|
|
1011
|
+
"top",
|
|
1012
|
+
"right",
|
|
1013
|
+
"bottom",
|
|
1014
|
+
"left",
|
|
1015
|
+
"gridGap",
|
|
1016
|
+
"gridColumnGap",
|
|
1017
|
+
"gridRowGap",
|
|
1018
|
+
"gridColumn",
|
|
1019
|
+
"gridRow",
|
|
1020
|
+
"gridAutoFlow",
|
|
1021
|
+
"gap",
|
|
1022
|
+
"columnGap",
|
|
1023
|
+
"rowGap"
|
|
1024
|
+
];
|
|
1025
|
+
var TypographyWithIcon = ({ startIcon, endIcon, children, sx, gutterBottom, ...props }) => {
|
|
1026
|
+
const sxCopy = { ...sx };
|
|
1027
|
+
const stackStyles = stackSxProps.reduce((acc, curr) => {
|
|
1028
|
+
if (sxCopy && sxCopy[curr]) {
|
|
1029
|
+
acc[curr] = sxCopy[curr];
|
|
1030
|
+
delete sxCopy[curr];
|
|
1031
|
+
}
|
|
1032
|
+
return acc;
|
|
1033
|
+
}, {});
|
|
1034
|
+
return /* @__PURE__ */ jsxs(Stack, { direction: "row", alignItems: "center", gap: 1, sx: stackStyles, mb: gutterBottom ? 0.7 : void 0, children: [
|
|
1035
|
+
startIcon && startIcon,
|
|
1036
|
+
/* @__PURE__ */ jsx(Typography, { ...props, sx: sxCopy, children }),
|
|
1037
|
+
endIcon && endIcon
|
|
1038
|
+
] });
|
|
1039
|
+
};
|
|
1040
|
+
|
|
1041
|
+
// src/components/data-grid/ChipInputCell.tsx
|
|
1042
|
+
import { Chip, Stack as Stack2 } from "@mui/material";
|
|
1043
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
1044
|
+
var isArray = (value) => Array.isArray(value);
|
|
1045
|
+
var ChipInputCell = ({ params, slotProps, getLabel }) => {
|
|
1046
|
+
if (!params.value) return null;
|
|
1047
|
+
const getLabelValue = (value) => {
|
|
1048
|
+
if (getLabel) return getLabel(value);
|
|
1049
|
+
return value;
|
|
1050
|
+
};
|
|
1051
|
+
if (isArray(params.value))
|
|
1052
|
+
return /* @__PURE__ */ jsx2(Stack2, { direction: "row", alignItems: "center", gap: 1, sx: { overflowX: "auto", height: "100%", width: params.colDef.computedWidth }, children: params.value.map(
|
|
1053
|
+
(value, index) => /* @__PURE__ */ jsx2(Chip, { label: getLabelValue(value), ...slotProps }, `${index + 1}-chip-input-cell`)
|
|
1054
|
+
) });
|
|
1055
|
+
return /* @__PURE__ */ jsx2(Chip, { label: getLabelValue(params.value), ...slotProps });
|
|
1056
|
+
};
|
|
1057
|
+
|
|
1058
|
+
// src/components/data-grid/EditableColumnHeader.tsx
|
|
1059
|
+
import { Edit } from "@mui/icons-material";
|
|
1060
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
1061
|
+
var EditableColumnHeader = ({ colDef }) => {
|
|
1062
|
+
return /* @__PURE__ */ jsx3(TypographyWithIcon, { endIcon: /* @__PURE__ */ jsx3(Edit, { color: "disabled", fontSize: "small" }), variant: "body2", className: "MuiDataGrid-columnHeaderTitle", children: colDef.headerName });
|
|
1063
|
+
};
|
|
1064
|
+
|
|
975
1065
|
// src/components/router/RouterButton.tsx
|
|
976
1066
|
import { Button } from "@mui/material";
|
|
977
1067
|
import { createLink } from "@tanstack/react-router";
|
|
978
1068
|
import React from "react";
|
|
979
|
-
import { jsx } from "react/jsx-runtime";
|
|
980
|
-
var MUIButtonLinkComponent = React.forwardRef((props, ref) => /* @__PURE__ */
|
|
1069
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
1070
|
+
var MUIButtonLinkComponent = React.forwardRef((props, ref) => /* @__PURE__ */ jsx4(Button, { ref, component: "a", ...props }));
|
|
981
1071
|
var CreatedButtonLinkComponent = createLink(MUIButtonLinkComponent);
|
|
982
1072
|
var RouterButton = (props) => {
|
|
983
|
-
return /* @__PURE__ */
|
|
1073
|
+
return /* @__PURE__ */ jsx4(CreatedButtonLinkComponent, { preload: "intent", ...props });
|
|
984
1074
|
};
|
|
985
1075
|
|
|
986
1076
|
// src/components/router/RouterLink.tsx
|
|
987
1077
|
import { Link } from "@mui/material";
|
|
988
1078
|
import { createLink as createLink2 } from "@tanstack/react-router";
|
|
989
1079
|
import React2 from "react";
|
|
990
|
-
import { jsx as
|
|
1080
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
991
1081
|
var MUILinkComponent = React2.forwardRef(
|
|
992
|
-
(props, ref) => /* @__PURE__ */
|
|
1082
|
+
(props, ref) => /* @__PURE__ */ jsx5(Link, { ref, ...props })
|
|
993
1083
|
);
|
|
994
1084
|
var CreatedLinkComponent = createLink2(MUILinkComponent);
|
|
995
1085
|
var RouterLink = (props) => {
|
|
996
|
-
return /* @__PURE__ */
|
|
1086
|
+
return /* @__PURE__ */ jsx5(CreatedLinkComponent, { preload: "intent", ...props });
|
|
997
1087
|
};
|
|
998
1088
|
|
|
999
1089
|
// src/components/router/RouterTab.tsx
|
|
1000
1090
|
import { Tab } from "@mui/material";
|
|
1001
1091
|
import { createLink as createLink3 } from "@tanstack/react-router";
|
|
1002
1092
|
import React3 from "react";
|
|
1003
|
-
import { jsx as
|
|
1004
|
-
var MUITabLinkComponent = React3.forwardRef((props, ref) => /* @__PURE__ */
|
|
1093
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
1094
|
+
var MUITabLinkComponent = React3.forwardRef((props, ref) => /* @__PURE__ */ jsx6(Tab, { ref, component: "a", ...props }));
|
|
1005
1095
|
var CreatedTabLinkComponent = createLink3(MUITabLinkComponent);
|
|
1006
1096
|
var RouterTab = (props) => {
|
|
1007
|
-
return /* @__PURE__ */
|
|
1097
|
+
return /* @__PURE__ */ jsx6(CreatedTabLinkComponent, { preload: "intent", ...props });
|
|
1008
1098
|
};
|
|
1009
1099
|
|
|
1010
1100
|
// src/components/router/RouterNotFound.tsx
|
|
1011
|
-
import {
|
|
1012
|
-
import {
|
|
1101
|
+
import { Box, Divider, Typography as Typography2 } from "@mui/material";
|
|
1102
|
+
import { useTranslation } from "react-i18next";
|
|
1103
|
+
import { jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1013
1104
|
function RouterNotFound() {
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
/* @__PURE__ */
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
onClick: () => window.history.back(),
|
|
1021
|
-
className: "bg-emerald-500 text-white px-2 py-1 rounded uppercase font-black text-sm",
|
|
1022
|
-
children: "Go back"
|
|
1023
|
-
}
|
|
1024
|
-
),
|
|
1025
|
-
/* @__PURE__ */ jsx4(
|
|
1026
|
-
Link2,
|
|
1027
|
-
{
|
|
1028
|
-
to: "/",
|
|
1029
|
-
className: "bg-cyan-600 text-white px-2 py-1 rounded uppercase font-black text-sm",
|
|
1030
|
-
children: "Start Over"
|
|
1031
|
-
}
|
|
1032
|
-
)
|
|
1033
|
-
] })
|
|
1034
|
-
] });
|
|
1105
|
+
const { t } = useTranslation();
|
|
1106
|
+
return /* @__PURE__ */ jsx7(Box, { height: "100vh", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", textAlign: "center", px: 2, children: /* @__PURE__ */ jsxs2(Box, { display: "flex", alignItems: "center", mb: 4, children: [
|
|
1107
|
+
/* @__PURE__ */ jsx7(Typography2, { variant: "h3", component: "span", fontWeight: 500, sx: { lineHeight: 1 }, children: "404" }),
|
|
1108
|
+
/* @__PURE__ */ jsx7(Divider, { orientation: "vertical", flexItem: true, sx: { mx: 3 } }),
|
|
1109
|
+
/* @__PURE__ */ jsx7(Typography2, { variant: "h5", component: "span", children: t("Layout.ThisPageCouldNotBeFound") })
|
|
1110
|
+
] }) });
|
|
1035
1111
|
}
|
|
1036
1112
|
|
|
1037
1113
|
// src/components/router/RouterError.tsx
|
|
1038
|
-
import {
|
|
1039
|
-
import { jsx as
|
|
1114
|
+
import { Box as Box2, Divider as Divider2, Typography as Typography3 } from "@mui/material";
|
|
1115
|
+
import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1040
1116
|
var RouterError = ({ error }) => {
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
});
|
|
1046
|
-
console.error("DefaultErrorComponent Error:", error);
|
|
1047
|
-
return /* @__PURE__ */ jsxs2("div", { className: "min-w-0 flex-1 p-4 flex flex-col items-center justify-center gap-6", children: [
|
|
1048
|
-
/* @__PURE__ */ jsx5(ErrorComponent, { error }),
|
|
1049
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex gap-2 items-center flex-wrap", children: [
|
|
1050
|
-
/* @__PURE__ */ jsx5(
|
|
1051
|
-
"button",
|
|
1052
|
-
{
|
|
1053
|
-
onClick: () => {
|
|
1054
|
-
router.invalidate();
|
|
1055
|
-
},
|
|
1056
|
-
className: `px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded text-white uppercase font-extrabold`,
|
|
1057
|
-
children: "Try Again"
|
|
1058
|
-
}
|
|
1059
|
-
),
|
|
1060
|
-
isRoot ? /* @__PURE__ */ jsx5(
|
|
1061
|
-
Link3,
|
|
1062
|
-
{
|
|
1063
|
-
to: "/",
|
|
1064
|
-
className: `px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded text-white uppercase font-extrabold`,
|
|
1065
|
-
children: "Home"
|
|
1066
|
-
}
|
|
1067
|
-
) : /* @__PURE__ */ jsx5(
|
|
1068
|
-
Link3,
|
|
1069
|
-
{
|
|
1070
|
-
to: "/",
|
|
1071
|
-
className: `px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded text-white uppercase font-extrabold`,
|
|
1072
|
-
onClick: (e) => {
|
|
1073
|
-
e.preventDefault();
|
|
1074
|
-
window.history.back();
|
|
1075
|
-
},
|
|
1076
|
-
children: "Go Back"
|
|
1077
|
-
}
|
|
1078
|
-
)
|
|
1079
|
-
] })
|
|
1080
|
-
] });
|
|
1081
|
-
};
|
|
1082
|
-
|
|
1083
|
-
// node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
|
|
1084
|
-
var isDevelopment = false;
|
|
1085
|
-
function sheetForTag(tag) {
|
|
1086
|
-
if (tag.sheet) {
|
|
1087
|
-
return tag.sheet;
|
|
1088
|
-
}
|
|
1089
|
-
for (var i = 0; i < document.styleSheets.length; i++) {
|
|
1090
|
-
if (document.styleSheets[i].ownerNode === tag) {
|
|
1091
|
-
return document.styleSheets[i];
|
|
1092
|
-
}
|
|
1093
|
-
}
|
|
1094
|
-
return void 0;
|
|
1095
|
-
}
|
|
1096
|
-
function createStyleElement(options) {
|
|
1097
|
-
var tag = document.createElement("style");
|
|
1098
|
-
tag.setAttribute("data-emotion", options.key);
|
|
1099
|
-
if (options.nonce !== void 0) {
|
|
1100
|
-
tag.setAttribute("nonce", options.nonce);
|
|
1101
|
-
}
|
|
1102
|
-
tag.appendChild(document.createTextNode(""));
|
|
1103
|
-
tag.setAttribute("data-s", "");
|
|
1104
|
-
return tag;
|
|
1105
|
-
}
|
|
1106
|
-
var StyleSheet = /* @__PURE__ */ function() {
|
|
1107
|
-
function StyleSheet2(options) {
|
|
1108
|
-
var _this = this;
|
|
1109
|
-
this._insertTag = function(tag) {
|
|
1110
|
-
var before;
|
|
1111
|
-
if (_this.tags.length === 0) {
|
|
1112
|
-
if (_this.insertionPoint) {
|
|
1113
|
-
before = _this.insertionPoint.nextSibling;
|
|
1114
|
-
} else if (_this.prepend) {
|
|
1115
|
-
before = _this.container.firstChild;
|
|
1116
|
-
} else {
|
|
1117
|
-
before = _this.before;
|
|
1118
|
-
}
|
|
1119
|
-
} else {
|
|
1120
|
-
before = _this.tags[_this.tags.length - 1].nextSibling;
|
|
1121
|
-
}
|
|
1122
|
-
_this.container.insertBefore(tag, before);
|
|
1123
|
-
_this.tags.push(tag);
|
|
1124
|
-
};
|
|
1125
|
-
this.isSpeedy = options.speedy === void 0 ? !isDevelopment : options.speedy;
|
|
1126
|
-
this.tags = [];
|
|
1127
|
-
this.ctr = 0;
|
|
1128
|
-
this.nonce = options.nonce;
|
|
1129
|
-
this.key = options.key;
|
|
1130
|
-
this.container = options.container;
|
|
1131
|
-
this.prepend = options.prepend;
|
|
1132
|
-
this.insertionPoint = options.insertionPoint;
|
|
1133
|
-
this.before = null;
|
|
1134
|
-
}
|
|
1135
|
-
var _proto = StyleSheet2.prototype;
|
|
1136
|
-
_proto.hydrate = function hydrate(nodes) {
|
|
1137
|
-
nodes.forEach(this._insertTag);
|
|
1138
|
-
};
|
|
1139
|
-
_proto.insert = function insert(rule) {
|
|
1140
|
-
if (this.ctr % (this.isSpeedy ? 65e3 : 1) === 0) {
|
|
1141
|
-
this._insertTag(createStyleElement(this));
|
|
1142
|
-
}
|
|
1143
|
-
var tag = this.tags[this.tags.length - 1];
|
|
1144
|
-
if (this.isSpeedy) {
|
|
1145
|
-
var sheet = sheetForTag(tag);
|
|
1146
|
-
try {
|
|
1147
|
-
sheet.insertRule(rule, sheet.cssRules.length);
|
|
1148
|
-
} catch (e) {
|
|
1149
|
-
}
|
|
1150
|
-
} else {
|
|
1151
|
-
tag.appendChild(document.createTextNode(rule));
|
|
1152
|
-
}
|
|
1153
|
-
this.ctr++;
|
|
1154
|
-
};
|
|
1155
|
-
_proto.flush = function flush() {
|
|
1156
|
-
this.tags.forEach(function(tag) {
|
|
1157
|
-
var _tag$parentNode;
|
|
1158
|
-
return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);
|
|
1159
|
-
});
|
|
1160
|
-
this.tags = [];
|
|
1161
|
-
this.ctr = 0;
|
|
1162
|
-
};
|
|
1163
|
-
return StyleSheet2;
|
|
1164
|
-
}();
|
|
1165
|
-
|
|
1166
|
-
// node_modules/stylis/src/Enum.js
|
|
1167
|
-
var MS = "-ms-";
|
|
1168
|
-
var MOZ = "-moz-";
|
|
1169
|
-
var WEBKIT = "-webkit-";
|
|
1170
|
-
var COMMENT = "comm";
|
|
1171
|
-
var RULESET = "rule";
|
|
1172
|
-
var DECLARATION = "decl";
|
|
1173
|
-
var IMPORT = "@import";
|
|
1174
|
-
var KEYFRAMES = "@keyframes";
|
|
1175
|
-
var LAYER = "@layer";
|
|
1176
|
-
|
|
1177
|
-
// node_modules/stylis/src/Utility.js
|
|
1178
|
-
var abs = Math.abs;
|
|
1179
|
-
var from = String.fromCharCode;
|
|
1180
|
-
var assign = Object.assign;
|
|
1181
|
-
function hash(value, length2) {
|
|
1182
|
-
return charat(value, 0) ^ 45 ? (((length2 << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
|
|
1183
|
-
}
|
|
1184
|
-
function trim(value) {
|
|
1185
|
-
return value.trim();
|
|
1186
|
-
}
|
|
1187
|
-
function match(value, pattern) {
|
|
1188
|
-
return (value = pattern.exec(value)) ? value[0] : value;
|
|
1189
|
-
}
|
|
1190
|
-
function replace(value, pattern, replacement) {
|
|
1191
|
-
return value.replace(pattern, replacement);
|
|
1192
|
-
}
|
|
1193
|
-
function indexof(value, search) {
|
|
1194
|
-
return value.indexOf(search);
|
|
1195
|
-
}
|
|
1196
|
-
function charat(value, index) {
|
|
1197
|
-
return value.charCodeAt(index) | 0;
|
|
1198
|
-
}
|
|
1199
|
-
function substr(value, begin, end) {
|
|
1200
|
-
return value.slice(begin, end);
|
|
1201
|
-
}
|
|
1202
|
-
function strlen(value) {
|
|
1203
|
-
return value.length;
|
|
1204
|
-
}
|
|
1205
|
-
function sizeof(value) {
|
|
1206
|
-
return value.length;
|
|
1207
|
-
}
|
|
1208
|
-
function append(value, array) {
|
|
1209
|
-
return array.push(value), value;
|
|
1210
|
-
}
|
|
1211
|
-
function combine(array, callback) {
|
|
1212
|
-
return array.map(callback).join("");
|
|
1213
|
-
}
|
|
1214
|
-
|
|
1215
|
-
// node_modules/stylis/src/Tokenizer.js
|
|
1216
|
-
var line = 1;
|
|
1217
|
-
var column = 1;
|
|
1218
|
-
var length = 0;
|
|
1219
|
-
var position = 0;
|
|
1220
|
-
var character = 0;
|
|
1221
|
-
var characters = "";
|
|
1222
|
-
function node(value, root, parent, type, props, children, length2) {
|
|
1223
|
-
return { value, root, parent, type, props, children, line, column, length: length2, return: "" };
|
|
1224
|
-
}
|
|
1225
|
-
function copy(root, props) {
|
|
1226
|
-
return assign(node("", null, null, "", null, null, 0), root, { length: -root.length }, props);
|
|
1227
|
-
}
|
|
1228
|
-
function char() {
|
|
1229
|
-
return character;
|
|
1230
|
-
}
|
|
1231
|
-
function prev() {
|
|
1232
|
-
character = position > 0 ? charat(characters, --position) : 0;
|
|
1233
|
-
if (column--, character === 10)
|
|
1234
|
-
column = 1, line--;
|
|
1235
|
-
return character;
|
|
1236
|
-
}
|
|
1237
|
-
function next() {
|
|
1238
|
-
character = position < length ? charat(characters, position++) : 0;
|
|
1239
|
-
if (column++, character === 10)
|
|
1240
|
-
column = 1, line++;
|
|
1241
|
-
return character;
|
|
1242
|
-
}
|
|
1243
|
-
function peek() {
|
|
1244
|
-
return charat(characters, position);
|
|
1245
|
-
}
|
|
1246
|
-
function caret() {
|
|
1247
|
-
return position;
|
|
1248
|
-
}
|
|
1249
|
-
function slice(begin, end) {
|
|
1250
|
-
return substr(characters, begin, end);
|
|
1251
|
-
}
|
|
1252
|
-
function token(type) {
|
|
1253
|
-
switch (type) {
|
|
1254
|
-
// \0 \t \n \r \s whitespace token
|
|
1255
|
-
case 0:
|
|
1256
|
-
case 9:
|
|
1257
|
-
case 10:
|
|
1258
|
-
case 13:
|
|
1259
|
-
case 32:
|
|
1260
|
-
return 5;
|
|
1261
|
-
// ! + , / > @ ~ isolate token
|
|
1262
|
-
case 33:
|
|
1263
|
-
case 43:
|
|
1264
|
-
case 44:
|
|
1265
|
-
case 47:
|
|
1266
|
-
case 62:
|
|
1267
|
-
case 64:
|
|
1268
|
-
case 126:
|
|
1269
|
-
// ; { } breakpoint token
|
|
1270
|
-
case 59:
|
|
1271
|
-
case 123:
|
|
1272
|
-
case 125:
|
|
1273
|
-
return 4;
|
|
1274
|
-
// : accompanied token
|
|
1275
|
-
case 58:
|
|
1276
|
-
return 3;
|
|
1277
|
-
// " ' ( [ opening delimit token
|
|
1278
|
-
case 34:
|
|
1279
|
-
case 39:
|
|
1280
|
-
case 40:
|
|
1281
|
-
case 91:
|
|
1282
|
-
return 2;
|
|
1283
|
-
// ) ] closing delimit token
|
|
1284
|
-
case 41:
|
|
1285
|
-
case 93:
|
|
1286
|
-
return 1;
|
|
1287
|
-
}
|
|
1288
|
-
return 0;
|
|
1289
|
-
}
|
|
1290
|
-
function alloc(value) {
|
|
1291
|
-
return line = column = 1, length = strlen(characters = value), position = 0, [];
|
|
1292
|
-
}
|
|
1293
|
-
function dealloc(value) {
|
|
1294
|
-
return characters = "", value;
|
|
1295
|
-
}
|
|
1296
|
-
function delimit(type) {
|
|
1297
|
-
return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));
|
|
1298
|
-
}
|
|
1299
|
-
function whitespace(type) {
|
|
1300
|
-
while (character = peek())
|
|
1301
|
-
if (character < 33)
|
|
1302
|
-
next();
|
|
1303
|
-
else
|
|
1304
|
-
break;
|
|
1305
|
-
return token(type) > 2 || token(character) > 3 ? "" : " ";
|
|
1306
|
-
}
|
|
1307
|
-
function escaping(index, count) {
|
|
1308
|
-
while (--count && next())
|
|
1309
|
-
if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97)
|
|
1310
|
-
break;
|
|
1311
|
-
return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32));
|
|
1312
|
-
}
|
|
1313
|
-
function delimiter(type) {
|
|
1314
|
-
while (next())
|
|
1315
|
-
switch (character) {
|
|
1316
|
-
// ] ) " '
|
|
1317
|
-
case type:
|
|
1318
|
-
return position;
|
|
1319
|
-
// " '
|
|
1320
|
-
case 34:
|
|
1321
|
-
case 39:
|
|
1322
|
-
if (type !== 34 && type !== 39)
|
|
1323
|
-
delimiter(character);
|
|
1324
|
-
break;
|
|
1325
|
-
// (
|
|
1326
|
-
case 40:
|
|
1327
|
-
if (type === 41)
|
|
1328
|
-
delimiter(type);
|
|
1329
|
-
break;
|
|
1330
|
-
// \
|
|
1331
|
-
case 92:
|
|
1332
|
-
next();
|
|
1333
|
-
break;
|
|
1334
|
-
}
|
|
1335
|
-
return position;
|
|
1336
|
-
}
|
|
1337
|
-
function commenter(type, index) {
|
|
1338
|
-
while (next())
|
|
1339
|
-
if (type + character === 47 + 10)
|
|
1340
|
-
break;
|
|
1341
|
-
else if (type + character === 42 + 42 && peek() === 47)
|
|
1342
|
-
break;
|
|
1343
|
-
return "/*" + slice(index, position - 1) + "*" + from(type === 47 ? type : next());
|
|
1344
|
-
}
|
|
1345
|
-
function identifier(index) {
|
|
1346
|
-
while (!token(peek()))
|
|
1347
|
-
next();
|
|
1348
|
-
return slice(index, position);
|
|
1349
|
-
}
|
|
1350
|
-
|
|
1351
|
-
// node_modules/stylis/src/Parser.js
|
|
1352
|
-
function compile(value) {
|
|
1353
|
-
return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value));
|
|
1354
|
-
}
|
|
1355
|
-
function parse(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
|
|
1356
|
-
var index = 0;
|
|
1357
|
-
var offset = 0;
|
|
1358
|
-
var length2 = pseudo;
|
|
1359
|
-
var atrule = 0;
|
|
1360
|
-
var property = 0;
|
|
1361
|
-
var previous = 0;
|
|
1362
|
-
var variable = 1;
|
|
1363
|
-
var scanning = 1;
|
|
1364
|
-
var ampersand = 1;
|
|
1365
|
-
var character2 = 0;
|
|
1366
|
-
var type = "";
|
|
1367
|
-
var props = rules;
|
|
1368
|
-
var children = rulesets;
|
|
1369
|
-
var reference = rule;
|
|
1370
|
-
var characters2 = type;
|
|
1371
|
-
while (scanning)
|
|
1372
|
-
switch (previous = character2, character2 = next()) {
|
|
1373
|
-
// (
|
|
1374
|
-
case 40:
|
|
1375
|
-
if (previous != 108 && charat(characters2, length2 - 1) == 58) {
|
|
1376
|
-
if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f") != -1)
|
|
1377
|
-
ampersand = -1;
|
|
1378
|
-
break;
|
|
1379
|
-
}
|
|
1380
|
-
// " ' [
|
|
1381
|
-
case 34:
|
|
1382
|
-
case 39:
|
|
1383
|
-
case 91:
|
|
1384
|
-
characters2 += delimit(character2);
|
|
1385
|
-
break;
|
|
1386
|
-
// \t \n \r \s
|
|
1387
|
-
case 9:
|
|
1388
|
-
case 10:
|
|
1389
|
-
case 13:
|
|
1390
|
-
case 32:
|
|
1391
|
-
characters2 += whitespace(previous);
|
|
1392
|
-
break;
|
|
1393
|
-
// \
|
|
1394
|
-
case 92:
|
|
1395
|
-
characters2 += escaping(caret() - 1, 7);
|
|
1396
|
-
continue;
|
|
1397
|
-
// /
|
|
1398
|
-
case 47:
|
|
1399
|
-
switch (peek()) {
|
|
1400
|
-
case 42:
|
|
1401
|
-
case 47:
|
|
1402
|
-
append(comment(commenter(next(), caret()), root, parent), declarations);
|
|
1403
|
-
break;
|
|
1404
|
-
default:
|
|
1405
|
-
characters2 += "/";
|
|
1406
|
-
}
|
|
1407
|
-
break;
|
|
1408
|
-
// {
|
|
1409
|
-
case 123 * variable:
|
|
1410
|
-
points[index++] = strlen(characters2) * ampersand;
|
|
1411
|
-
// } ; \0
|
|
1412
|
-
case 125 * variable:
|
|
1413
|
-
case 59:
|
|
1414
|
-
case 0:
|
|
1415
|
-
switch (character2) {
|
|
1416
|
-
// \0 }
|
|
1417
|
-
case 0:
|
|
1418
|
-
case 125:
|
|
1419
|
-
scanning = 0;
|
|
1420
|
-
// ;
|
|
1421
|
-
case 59 + offset:
|
|
1422
|
-
if (ampersand == -1) characters2 = replace(characters2, /\f/g, "");
|
|
1423
|
-
if (property > 0 && strlen(characters2) - length2)
|
|
1424
|
-
append(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2), declarations);
|
|
1425
|
-
break;
|
|
1426
|
-
// @ ;
|
|
1427
|
-
case 59:
|
|
1428
|
-
characters2 += ";";
|
|
1429
|
-
// { rule/at-rule
|
|
1430
|
-
default:
|
|
1431
|
-
append(reference = ruleset(characters2, root, parent, index, offset, rules, points, type, props = [], children = [], length2), rulesets);
|
|
1432
|
-
if (character2 === 123)
|
|
1433
|
-
if (offset === 0)
|
|
1434
|
-
parse(characters2, root, reference, reference, props, rulesets, length2, points, children);
|
|
1435
|
-
else
|
|
1436
|
-
switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) {
|
|
1437
|
-
// d l m s
|
|
1438
|
-
case 100:
|
|
1439
|
-
case 108:
|
|
1440
|
-
case 109:
|
|
1441
|
-
case 115:
|
|
1442
|
-
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);
|
|
1443
|
-
break;
|
|
1444
|
-
default:
|
|
1445
|
-
parse(characters2, reference, reference, reference, [""], children, 0, points, children);
|
|
1446
|
-
}
|
|
1447
|
-
}
|
|
1448
|
-
index = offset = property = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
|
|
1449
|
-
break;
|
|
1450
|
-
// :
|
|
1451
|
-
case 58:
|
|
1452
|
-
length2 = 1 + strlen(characters2), property = previous;
|
|
1453
|
-
default:
|
|
1454
|
-
if (variable < 1) {
|
|
1455
|
-
if (character2 == 123)
|
|
1456
|
-
--variable;
|
|
1457
|
-
else if (character2 == 125 && variable++ == 0 && prev() == 125)
|
|
1458
|
-
continue;
|
|
1459
|
-
}
|
|
1460
|
-
switch (characters2 += from(character2), character2 * variable) {
|
|
1461
|
-
// &
|
|
1462
|
-
case 38:
|
|
1463
|
-
ampersand = offset > 0 ? 1 : (characters2 += "\f", -1);
|
|
1464
|
-
break;
|
|
1465
|
-
// ,
|
|
1466
|
-
case 44:
|
|
1467
|
-
points[index++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
|
|
1468
|
-
break;
|
|
1469
|
-
// @
|
|
1470
|
-
case 64:
|
|
1471
|
-
if (peek() === 45)
|
|
1472
|
-
characters2 += delimit(next());
|
|
1473
|
-
atrule = peek(), offset = length2 = strlen(type = characters2 += identifier(caret())), character2++;
|
|
1474
|
-
break;
|
|
1475
|
-
// -
|
|
1476
|
-
case 45:
|
|
1477
|
-
if (previous === 45 && strlen(characters2) == 2)
|
|
1478
|
-
variable = 0;
|
|
1479
|
-
}
|
|
1480
|
-
}
|
|
1481
|
-
return rulesets;
|
|
1482
|
-
}
|
|
1483
|
-
function ruleset(value, root, parent, index, offset, rules, points, type, props, children, length2) {
|
|
1484
|
-
var post = offset - 1;
|
|
1485
|
-
var rule = offset === 0 ? rules : [""];
|
|
1486
|
-
var size = sizeof(rule);
|
|
1487
|
-
for (var i = 0, j = 0, k = 0; i < index; ++i)
|
|
1488
|
-
for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z2 = value; x < size; ++x)
|
|
1489
|
-
if (z2 = trim(j > 0 ? rule[x] + " " + y : replace(y, /&\f/g, rule[x])))
|
|
1490
|
-
props[k++] = z2;
|
|
1491
|
-
return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length2);
|
|
1492
|
-
}
|
|
1493
|
-
function comment(value, root, parent) {
|
|
1494
|
-
return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0);
|
|
1495
|
-
}
|
|
1496
|
-
function declaration(value, root, parent, length2) {
|
|
1497
|
-
return node(value, root, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2);
|
|
1498
|
-
}
|
|
1499
|
-
|
|
1500
|
-
// node_modules/stylis/src/Serializer.js
|
|
1501
|
-
function serialize(children, callback) {
|
|
1502
|
-
var output = "";
|
|
1503
|
-
var length2 = sizeof(children);
|
|
1504
|
-
for (var i = 0; i < length2; i++)
|
|
1505
|
-
output += callback(children[i], i, children, callback) || "";
|
|
1506
|
-
return output;
|
|
1507
|
-
}
|
|
1508
|
-
function stringify(element, index, children, callback) {
|
|
1509
|
-
switch (element.type) {
|
|
1510
|
-
case LAYER:
|
|
1511
|
-
if (element.children.length) break;
|
|
1512
|
-
case IMPORT:
|
|
1513
|
-
case DECLARATION:
|
|
1514
|
-
return element.return = element.return || element.value;
|
|
1515
|
-
case COMMENT:
|
|
1516
|
-
return "";
|
|
1517
|
-
case KEYFRAMES:
|
|
1518
|
-
return element.return = element.value + "{" + serialize(element.children, callback) + "}";
|
|
1519
|
-
case RULESET:
|
|
1520
|
-
element.value = element.props.join(",");
|
|
1521
|
-
}
|
|
1522
|
-
return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
|
|
1523
|
-
}
|
|
1524
|
-
|
|
1525
|
-
// node_modules/stylis/src/Middleware.js
|
|
1526
|
-
function middleware(collection) {
|
|
1527
|
-
var length2 = sizeof(collection);
|
|
1528
|
-
return function(element, index, children, callback) {
|
|
1529
|
-
var output = "";
|
|
1530
|
-
for (var i = 0; i < length2; i++)
|
|
1531
|
-
output += collection[i](element, index, children, callback) || "";
|
|
1532
|
-
return output;
|
|
1533
|
-
};
|
|
1534
|
-
}
|
|
1535
|
-
function rulesheet(callback) {
|
|
1536
|
-
return function(element) {
|
|
1537
|
-
if (!element.root) {
|
|
1538
|
-
if (element = element.return)
|
|
1539
|
-
callback(element);
|
|
1540
|
-
}
|
|
1541
|
-
};
|
|
1542
|
-
}
|
|
1543
|
-
|
|
1544
|
-
// node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js
|
|
1545
|
-
var weakMemoize = function weakMemoize2(func) {
|
|
1546
|
-
var cache = /* @__PURE__ */ new WeakMap();
|
|
1547
|
-
return function(arg) {
|
|
1548
|
-
if (cache.has(arg)) {
|
|
1549
|
-
return cache.get(arg);
|
|
1550
|
-
}
|
|
1551
|
-
var ret = func(arg);
|
|
1552
|
-
cache.set(arg, ret);
|
|
1553
|
-
return ret;
|
|
1554
|
-
};
|
|
1555
|
-
};
|
|
1556
|
-
|
|
1557
|
-
// node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
|
|
1558
|
-
function memoize(fn) {
|
|
1559
|
-
var cache = /* @__PURE__ */ Object.create(null);
|
|
1560
|
-
return function(arg) {
|
|
1561
|
-
if (cache[arg] === void 0) cache[arg] = fn(arg);
|
|
1562
|
-
return cache[arg];
|
|
1563
|
-
};
|
|
1564
|
-
}
|
|
1565
|
-
|
|
1566
|
-
// node_modules/@emotion/cache/dist/emotion-cache.esm.js
|
|
1567
|
-
var isBrowser = typeof document !== "undefined";
|
|
1568
|
-
var identifierWithPointTracking = function identifierWithPointTracking2(begin, points, index) {
|
|
1569
|
-
var previous = 0;
|
|
1570
|
-
var character2 = 0;
|
|
1571
|
-
while (true) {
|
|
1572
|
-
previous = character2;
|
|
1573
|
-
character2 = peek();
|
|
1574
|
-
if (previous === 38 && character2 === 12) {
|
|
1575
|
-
points[index] = 1;
|
|
1576
|
-
}
|
|
1577
|
-
if (token(character2)) {
|
|
1578
|
-
break;
|
|
1579
|
-
}
|
|
1580
|
-
next();
|
|
1581
|
-
}
|
|
1582
|
-
return slice(begin, position);
|
|
1583
|
-
};
|
|
1584
|
-
var toRules = function toRules2(parsed, points) {
|
|
1585
|
-
var index = -1;
|
|
1586
|
-
var character2 = 44;
|
|
1587
|
-
do {
|
|
1588
|
-
switch (token(character2)) {
|
|
1589
|
-
case 0:
|
|
1590
|
-
if (character2 === 38 && peek() === 12) {
|
|
1591
|
-
points[index] = 1;
|
|
1592
|
-
}
|
|
1593
|
-
parsed[index] += identifierWithPointTracking(position - 1, points, index);
|
|
1594
|
-
break;
|
|
1595
|
-
case 2:
|
|
1596
|
-
parsed[index] += delimit(character2);
|
|
1597
|
-
break;
|
|
1598
|
-
case 4:
|
|
1599
|
-
if (character2 === 44) {
|
|
1600
|
-
parsed[++index] = peek() === 58 ? "&\f" : "";
|
|
1601
|
-
points[index] = parsed[index].length;
|
|
1602
|
-
break;
|
|
1603
|
-
}
|
|
1604
|
-
// fallthrough
|
|
1605
|
-
default:
|
|
1606
|
-
parsed[index] += from(character2);
|
|
1607
|
-
}
|
|
1608
|
-
} while (character2 = next());
|
|
1609
|
-
return parsed;
|
|
1610
|
-
};
|
|
1611
|
-
var getRules = function getRules2(value, points) {
|
|
1612
|
-
return dealloc(toRules(alloc(value), points));
|
|
1613
|
-
};
|
|
1614
|
-
var fixedElements = /* @__PURE__ */ new WeakMap();
|
|
1615
|
-
var compat = function compat2(element) {
|
|
1616
|
-
if (element.type !== "rule" || !element.parent || // positive .length indicates that this rule contains pseudo
|
|
1617
|
-
// negative .length indicates that this rule has been already prefixed
|
|
1618
|
-
element.length < 1) {
|
|
1619
|
-
return;
|
|
1620
|
-
}
|
|
1621
|
-
var value = element.value;
|
|
1622
|
-
var parent = element.parent;
|
|
1623
|
-
var isImplicitRule = element.column === parent.column && element.line === parent.line;
|
|
1624
|
-
while (parent.type !== "rule") {
|
|
1625
|
-
parent = parent.parent;
|
|
1626
|
-
if (!parent) return;
|
|
1627
|
-
}
|
|
1628
|
-
if (element.props.length === 1 && value.charCodeAt(0) !== 58 && !fixedElements.get(parent)) {
|
|
1629
|
-
return;
|
|
1630
|
-
}
|
|
1631
|
-
if (isImplicitRule) {
|
|
1632
|
-
return;
|
|
1633
|
-
}
|
|
1634
|
-
fixedElements.set(element, true);
|
|
1635
|
-
var points = [];
|
|
1636
|
-
var rules = getRules(value, points);
|
|
1637
|
-
var parentRules = parent.props;
|
|
1638
|
-
for (var i = 0, k = 0; i < rules.length; i++) {
|
|
1639
|
-
for (var j = 0; j < parentRules.length; j++, k++) {
|
|
1640
|
-
element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
|
|
1641
|
-
}
|
|
1642
|
-
}
|
|
1643
|
-
};
|
|
1644
|
-
var removeLabel = function removeLabel2(element) {
|
|
1645
|
-
if (element.type === "decl") {
|
|
1646
|
-
var value = element.value;
|
|
1647
|
-
if (
|
|
1648
|
-
// charcode for l
|
|
1649
|
-
value.charCodeAt(0) === 108 && // charcode for b
|
|
1650
|
-
value.charCodeAt(2) === 98
|
|
1651
|
-
) {
|
|
1652
|
-
element["return"] = "";
|
|
1653
|
-
element.value = "";
|
|
1654
|
-
}
|
|
1655
|
-
}
|
|
1656
|
-
};
|
|
1657
|
-
function prefix(value, length2) {
|
|
1658
|
-
switch (hash(value, length2)) {
|
|
1659
|
-
// color-adjust
|
|
1660
|
-
case 5103:
|
|
1661
|
-
return WEBKIT + "print-" + value + value;
|
|
1662
|
-
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
|
|
1663
|
-
case 5737:
|
|
1664
|
-
case 4201:
|
|
1665
|
-
case 3177:
|
|
1666
|
-
case 3433:
|
|
1667
|
-
case 1641:
|
|
1668
|
-
case 4457:
|
|
1669
|
-
case 2921:
|
|
1670
|
-
// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
|
|
1671
|
-
case 5572:
|
|
1672
|
-
case 6356:
|
|
1673
|
-
case 5844:
|
|
1674
|
-
case 3191:
|
|
1675
|
-
case 6645:
|
|
1676
|
-
case 3005:
|
|
1677
|
-
// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
|
|
1678
|
-
case 6391:
|
|
1679
|
-
case 5879:
|
|
1680
|
-
case 5623:
|
|
1681
|
-
case 6135:
|
|
1682
|
-
case 4599:
|
|
1683
|
-
case 4855:
|
|
1684
|
-
// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
|
|
1685
|
-
case 4215:
|
|
1686
|
-
case 6389:
|
|
1687
|
-
case 5109:
|
|
1688
|
-
case 5365:
|
|
1689
|
-
case 5621:
|
|
1690
|
-
case 3829:
|
|
1691
|
-
return WEBKIT + value + value;
|
|
1692
|
-
// appearance, user-select, transform, hyphens, text-size-adjust
|
|
1693
|
-
case 5349:
|
|
1694
|
-
case 4246:
|
|
1695
|
-
case 4810:
|
|
1696
|
-
case 6968:
|
|
1697
|
-
case 2756:
|
|
1698
|
-
return WEBKIT + value + MOZ + value + MS + value + value;
|
|
1699
|
-
// flex, flex-direction
|
|
1700
|
-
case 6828:
|
|
1701
|
-
case 4268:
|
|
1702
|
-
return WEBKIT + value + MS + value + value;
|
|
1703
|
-
// order
|
|
1704
|
-
case 6165:
|
|
1705
|
-
return WEBKIT + value + MS + "flex-" + value + value;
|
|
1706
|
-
// align-items
|
|
1707
|
-
case 5187:
|
|
1708
|
-
return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + "box-$1$2" + MS + "flex-$1$2") + value;
|
|
1709
|
-
// align-self
|
|
1710
|
-
case 5443:
|
|
1711
|
-
return WEBKIT + value + MS + "flex-item-" + replace(value, /flex-|-self/, "") + value;
|
|
1712
|
-
// align-content
|
|
1713
|
-
case 4675:
|
|
1714
|
-
return WEBKIT + value + MS + "flex-line-pack" + replace(value, /align-content|flex-|-self/, "") + value;
|
|
1715
|
-
// flex-shrink
|
|
1716
|
-
case 5548:
|
|
1717
|
-
return WEBKIT + value + MS + replace(value, "shrink", "negative") + value;
|
|
1718
|
-
// flex-basis
|
|
1719
|
-
case 5292:
|
|
1720
|
-
return WEBKIT + value + MS + replace(value, "basis", "preferred-size") + value;
|
|
1721
|
-
// flex-grow
|
|
1722
|
-
case 6060:
|
|
1723
|
-
return WEBKIT + "box-" + replace(value, "-grow", "") + WEBKIT + value + MS + replace(value, "grow", "positive") + value;
|
|
1724
|
-
// transition
|
|
1725
|
-
case 4554:
|
|
1726
|
-
return WEBKIT + replace(value, /([^-])(transform)/g, "$1" + WEBKIT + "$2") + value;
|
|
1727
|
-
// cursor
|
|
1728
|
-
case 6187:
|
|
1729
|
-
return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + "$1"), /(image-set)/, WEBKIT + "$1"), value, "") + value;
|
|
1730
|
-
// background, background-image
|
|
1731
|
-
case 5495:
|
|
1732
|
-
case 3959:
|
|
1733
|
-
return replace(value, /(image-set\([^]*)/, WEBKIT + "$1$`$1");
|
|
1734
|
-
// justify-content
|
|
1735
|
-
case 4968:
|
|
1736
|
-
return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + "box-pack:$3" + MS + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + WEBKIT + value + value;
|
|
1737
|
-
// (margin|padding)-inline-(start|end)
|
|
1738
|
-
case 4095:
|
|
1739
|
-
case 3583:
|
|
1740
|
-
case 4068:
|
|
1741
|
-
case 2532:
|
|
1742
|
-
return replace(value, /(.+)-inline(.+)/, WEBKIT + "$1$2") + value;
|
|
1743
|
-
// (min|max)?(width|height|inline-size|block-size)
|
|
1744
|
-
case 8116:
|
|
1745
|
-
case 7059:
|
|
1746
|
-
case 5753:
|
|
1747
|
-
case 5535:
|
|
1748
|
-
case 5445:
|
|
1749
|
-
case 5701:
|
|
1750
|
-
case 4933:
|
|
1751
|
-
case 4677:
|
|
1752
|
-
case 5533:
|
|
1753
|
-
case 5789:
|
|
1754
|
-
case 5021:
|
|
1755
|
-
case 4765:
|
|
1756
|
-
if (strlen(value) - 1 - length2 > 6) switch (charat(value, length2 + 1)) {
|
|
1757
|
-
// (m)ax-content, (m)in-content
|
|
1758
|
-
case 109:
|
|
1759
|
-
if (charat(value, length2 + 4) !== 45) break;
|
|
1760
|
-
// (f)ill-available, (f)it-content
|
|
1761
|
-
case 102:
|
|
1762
|
-
return replace(value, /(.+:)(.+)-([^]+)/, "$1" + WEBKIT + "$2-$3$1" + MOZ + (charat(value, length2 + 3) == 108 ? "$3" : "$2-$3")) + value;
|
|
1763
|
-
// (s)tretch
|
|
1764
|
-
case 115:
|
|
1765
|
-
return ~indexof(value, "stretch") ? prefix(replace(value, "stretch", "fill-available"), length2) + value : value;
|
|
1766
|
-
}
|
|
1767
|
-
break;
|
|
1768
|
-
// position: sticky
|
|
1769
|
-
case 4949:
|
|
1770
|
-
if (charat(value, length2 + 1) !== 115) break;
|
|
1771
|
-
// display: (flex|inline-flex)
|
|
1772
|
-
case 6444:
|
|
1773
|
-
switch (charat(value, strlen(value) - 3 - (~indexof(value, "!important") && 10))) {
|
|
1774
|
-
// stic(k)y
|
|
1775
|
-
case 107:
|
|
1776
|
-
return replace(value, ":", ":" + WEBKIT) + value;
|
|
1777
|
-
// (inline-)?fl(e)x
|
|
1778
|
-
case 101:
|
|
1779
|
-
return replace(value, /(.+:)([^;!]+)(;|!.+)?/, "$1" + WEBKIT + (charat(value, 14) === 45 ? "inline-" : "") + "box$3$1" + WEBKIT + "$2$3$1" + MS + "$2box$3") + value;
|
|
1780
|
-
}
|
|
1781
|
-
break;
|
|
1782
|
-
// writing-mode
|
|
1783
|
-
case 5936:
|
|
1784
|
-
switch (charat(value, length2 + 11)) {
|
|
1785
|
-
// vertical-l(r)
|
|
1786
|
-
case 114:
|
|
1787
|
-
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb") + value;
|
|
1788
|
-
// vertical-r(l)
|
|
1789
|
-
case 108:
|
|
1790
|
-
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb-rl") + value;
|
|
1791
|
-
// horizontal(-)tb
|
|
1792
|
-
case 45:
|
|
1793
|
-
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "lr") + value;
|
|
1794
|
-
}
|
|
1795
|
-
return WEBKIT + value + MS + value + value;
|
|
1796
|
-
}
|
|
1797
|
-
return value;
|
|
1798
|
-
}
|
|
1799
|
-
var prefixer = function prefixer2(element, index, children, callback) {
|
|
1800
|
-
if (element.length > -1) {
|
|
1801
|
-
if (!element["return"]) switch (element.type) {
|
|
1802
|
-
case DECLARATION:
|
|
1803
|
-
element["return"] = prefix(element.value, element.length);
|
|
1804
|
-
break;
|
|
1805
|
-
case KEYFRAMES:
|
|
1806
|
-
return serialize([copy(element, {
|
|
1807
|
-
value: replace(element.value, "@", "@" + WEBKIT)
|
|
1808
|
-
})], callback);
|
|
1809
|
-
case RULESET:
|
|
1810
|
-
if (element.length) return combine(element.props, function(value) {
|
|
1811
|
-
switch (match(value, /(::plac\w+|:read-\w+)/)) {
|
|
1812
|
-
// :read-(only|write)
|
|
1813
|
-
case ":read-only":
|
|
1814
|
-
case ":read-write":
|
|
1815
|
-
return serialize([copy(element, {
|
|
1816
|
-
props: [replace(value, /:(read-\w+)/, ":" + MOZ + "$1")]
|
|
1817
|
-
})], callback);
|
|
1818
|
-
// :placeholder
|
|
1819
|
-
case "::placeholder":
|
|
1820
|
-
return serialize([copy(element, {
|
|
1821
|
-
props: [replace(value, /:(plac\w+)/, ":" + WEBKIT + "input-$1")]
|
|
1822
|
-
}), copy(element, {
|
|
1823
|
-
props: [replace(value, /:(plac\w+)/, ":" + MOZ + "$1")]
|
|
1824
|
-
}), copy(element, {
|
|
1825
|
-
props: [replace(value, /:(plac\w+)/, MS + "input-$1")]
|
|
1826
|
-
})], callback);
|
|
1827
|
-
}
|
|
1828
|
-
return "";
|
|
1829
|
-
});
|
|
1830
|
-
}
|
|
1831
|
-
}
|
|
1832
|
-
};
|
|
1833
|
-
var getServerStylisCache = isBrowser ? void 0 : weakMemoize(function() {
|
|
1834
|
-
return memoize(function() {
|
|
1835
|
-
return {};
|
|
1836
|
-
});
|
|
1837
|
-
});
|
|
1838
|
-
var defaultStylisPlugins = [prefixer];
|
|
1839
|
-
var createCache = function createCache2(options) {
|
|
1840
|
-
var key = options.key;
|
|
1841
|
-
if (isBrowser && key === "css") {
|
|
1842
|
-
var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])");
|
|
1843
|
-
Array.prototype.forEach.call(ssrStyles, function(node2) {
|
|
1844
|
-
var dataEmotionAttribute = node2.getAttribute("data-emotion");
|
|
1845
|
-
if (dataEmotionAttribute.indexOf(" ") === -1) {
|
|
1846
|
-
return;
|
|
1847
|
-
}
|
|
1848
|
-
document.head.appendChild(node2);
|
|
1849
|
-
node2.setAttribute("data-s", "");
|
|
1850
|
-
});
|
|
1851
|
-
}
|
|
1852
|
-
var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
|
|
1853
|
-
var inserted = {};
|
|
1854
|
-
var container;
|
|
1855
|
-
var nodesToHydrate = [];
|
|
1856
|
-
if (isBrowser) {
|
|
1857
|
-
container = options.container || document.head;
|
|
1858
|
-
Array.prototype.forEach.call(
|
|
1859
|
-
// this means we will ignore elements which don't have a space in them which
|
|
1860
|
-
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
1861
|
-
document.querySelectorAll('style[data-emotion^="' + key + ' "]'),
|
|
1862
|
-
function(node2) {
|
|
1863
|
-
var attrib = node2.getAttribute("data-emotion").split(" ");
|
|
1864
|
-
for (var i = 1; i < attrib.length; i++) {
|
|
1865
|
-
inserted[attrib[i]] = true;
|
|
1866
|
-
}
|
|
1867
|
-
nodesToHydrate.push(node2);
|
|
1868
|
-
}
|
|
1869
|
-
);
|
|
1870
|
-
}
|
|
1871
|
-
var _insert;
|
|
1872
|
-
var omnipresentPlugins = [compat, removeLabel];
|
|
1873
|
-
if (!getServerStylisCache) {
|
|
1874
|
-
var currentSheet;
|
|
1875
|
-
var finalizingPlugins = [stringify, rulesheet(function(rule) {
|
|
1876
|
-
currentSheet.insert(rule);
|
|
1877
|
-
})];
|
|
1878
|
-
var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
|
|
1879
|
-
var stylis = function stylis2(styles) {
|
|
1880
|
-
return serialize(compile(styles), serializer);
|
|
1881
|
-
};
|
|
1882
|
-
_insert = function insert(selector, serialized, sheet, shouldCache) {
|
|
1883
|
-
currentSheet = sheet;
|
|
1884
|
-
stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
|
1885
|
-
if (shouldCache) {
|
|
1886
|
-
cache.inserted[serialized.name] = true;
|
|
1887
|
-
}
|
|
1888
|
-
};
|
|
1889
|
-
} else {
|
|
1890
|
-
var _finalizingPlugins = [stringify];
|
|
1891
|
-
var _serializer = middleware(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));
|
|
1892
|
-
var _stylis = function _stylis2(styles) {
|
|
1893
|
-
return serialize(compile(styles), _serializer);
|
|
1894
|
-
};
|
|
1895
|
-
var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
|
|
1896
|
-
var getRules3 = function getRules4(selector, serialized) {
|
|
1897
|
-
var name = serialized.name;
|
|
1898
|
-
if (serverStylisCache[name] === void 0) {
|
|
1899
|
-
serverStylisCache[name] = _stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
|
1900
|
-
}
|
|
1901
|
-
return serverStylisCache[name];
|
|
1902
|
-
};
|
|
1903
|
-
_insert = function _insert2(selector, serialized, sheet, shouldCache) {
|
|
1904
|
-
var name = serialized.name;
|
|
1905
|
-
var rules = getRules3(selector, serialized);
|
|
1906
|
-
if (cache.compat === void 0) {
|
|
1907
|
-
if (shouldCache) {
|
|
1908
|
-
cache.inserted[name] = true;
|
|
1909
|
-
}
|
|
1910
|
-
return rules;
|
|
1911
|
-
} else {
|
|
1912
|
-
if (shouldCache) {
|
|
1913
|
-
cache.inserted[name] = rules;
|
|
1914
|
-
} else {
|
|
1915
|
-
return rules;
|
|
1916
|
-
}
|
|
1917
|
-
}
|
|
1918
|
-
};
|
|
1919
|
-
}
|
|
1920
|
-
var cache = {
|
|
1921
|
-
key,
|
|
1922
|
-
sheet: new StyleSheet({
|
|
1923
|
-
key,
|
|
1924
|
-
container,
|
|
1925
|
-
nonce: options.nonce,
|
|
1926
|
-
speedy: options.speedy,
|
|
1927
|
-
prepend: options.prepend,
|
|
1928
|
-
insertionPoint: options.insertionPoint
|
|
1929
|
-
}),
|
|
1930
|
-
nonce: options.nonce,
|
|
1931
|
-
inserted,
|
|
1932
|
-
registered: {},
|
|
1933
|
-
insert: _insert
|
|
1934
|
-
};
|
|
1935
|
-
cache.sheet.hydrate(nodesToHydrate);
|
|
1936
|
-
return cache;
|
|
1117
|
+
return /* @__PURE__ */ jsx8(Box2, { height: "100vh", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", textAlign: "center", px: 2, children: /* @__PURE__ */ jsxs3(Box2, { display: "flex", alignItems: "center", mb: 4, children: [
|
|
1118
|
+
/* @__PURE__ */ jsx8(Typography3, { variant: "h3", component: "span", fontWeight: 500, sx: { lineHeight: 1 }, children: "500" }),
|
|
1119
|
+
/* @__PURE__ */ jsx8(Divider2, { orientation: "vertical", flexItem: true, sx: { mx: 3 } }),
|
|
1120
|
+
/* @__PURE__ */ jsx8(Typography3, { variant: "h5", component: "span", children: error.message })
|
|
1121
|
+
] }) });
|
|
1937
1122
|
};
|
|
1938
1123
|
|
|
1939
1124
|
// src/providers/LayoutProvider.tsx
|
|
1940
|
-
import {
|
|
1941
|
-
import { createTheme, ThemeProvider } from "@mui/material";
|
|
1942
|
-
import { grey, indigo } from "@mui/material/colors";
|
|
1125
|
+
import { LinearProgress, useMediaQuery } from "@mui/material";
|
|
1943
1126
|
|
|
1944
1127
|
// node_modules/@babel/runtime/helpers/esm/extends.js
|
|
1945
1128
|
function _extends() {
|
|
@@ -1963,8 +1146,8 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
1963
1146
|
return t;
|
|
1964
1147
|
}
|
|
1965
1148
|
|
|
1966
|
-
// node_modules/@mui/x-date-pickers/LocalizationProvider/LocalizationProvider.js
|
|
1967
|
-
var import_prop_types = __toESM(require_prop_types());
|
|
1149
|
+
// node_modules/@mui/x-date-pickers/esm/LocalizationProvider/LocalizationProvider.js
|
|
1150
|
+
var import_prop_types = __toESM(require_prop_types(), 1);
|
|
1968
1151
|
import * as React4 from "react";
|
|
1969
1152
|
import { useThemeProps } from "@mui/material/styles";
|
|
1970
1153
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -2012,7 +1195,7 @@ var LocalizationProvider = function LocalizationProvider2(inProps) {
|
|
|
2012
1195
|
instance: dateLibInstance
|
|
2013
1196
|
});
|
|
2014
1197
|
if (!adapter.isMUIAdapter) {
|
|
2015
|
-
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/
|
|
1198
|
+
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(`
|
|
2016
1199
|
`));
|
|
2017
1200
|
}
|
|
2018
1201
|
return adapter;
|
|
@@ -2050,7 +1233,7 @@ process.env.NODE_ENV !== "production" ? LocalizationProvider.propTypes = {
|
|
|
2050
1233
|
children: import_prop_types.default.node,
|
|
2051
1234
|
/**
|
|
2052
1235
|
* Date library adapter class function.
|
|
2053
|
-
* @see See the localization provider {@link https://mui.com/x/react-date-pickers/
|
|
1236
|
+
* @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.
|
|
2054
1237
|
*/
|
|
2055
1238
|
dateAdapter: import_prop_types.default.func,
|
|
2056
1239
|
/**
|
|
@@ -2060,13 +1243,11 @@ process.env.NODE_ENV !== "production" ? LocalizationProvider.propTypes = {
|
|
|
2060
1243
|
dayOfMonth: import_prop_types.default.string,
|
|
2061
1244
|
dayOfMonthFull: import_prop_types.default.string,
|
|
2062
1245
|
fullDate: import_prop_types.default.string,
|
|
2063
|
-
fullTime: import_prop_types.default.string,
|
|
2064
1246
|
fullTime12h: import_prop_types.default.string,
|
|
2065
1247
|
fullTime24h: import_prop_types.default.string,
|
|
2066
1248
|
hours12h: import_prop_types.default.string,
|
|
2067
1249
|
hours24h: import_prop_types.default.string,
|
|
2068
1250
|
keyboardDate: import_prop_types.default.string,
|
|
2069
|
-
keyboardDateTime: import_prop_types.default.string,
|
|
2070
1251
|
keyboardDateTime12h: import_prop_types.default.string,
|
|
2071
1252
|
keyboardDateTime24h: import_prop_types.default.string,
|
|
2072
1253
|
meridiem: import_prop_types.default.string,
|
|
@@ -2111,13 +1292,13 @@ function warnOnce(message, gravity = "warning") {
|
|
|
2111
1292
|
}
|
|
2112
1293
|
}
|
|
2113
1294
|
|
|
2114
|
-
// node_modules/@mui/x-date-pickers/AdapterDayjs/AdapterDayjs.js
|
|
1295
|
+
// node_modules/@mui/x-date-pickers/esm/AdapterDayjs/AdapterDayjs.js
|
|
2115
1296
|
import defaultDayjs from "dayjs";
|
|
2116
|
-
import weekOfYearPlugin from "dayjs/plugin/weekOfYear";
|
|
2117
|
-
import customParseFormatPlugin from "dayjs/plugin/customParseFormat";
|
|
2118
|
-
import localizedFormatPlugin from "dayjs/plugin/localizedFormat";
|
|
2119
|
-
import isBetweenPlugin from "dayjs/plugin/isBetween";
|
|
2120
|
-
import advancedFormatPlugin from "dayjs/plugin/advancedFormat";
|
|
1297
|
+
import weekOfYearPlugin from "dayjs/plugin/weekOfYear.js";
|
|
1298
|
+
import customParseFormatPlugin from "dayjs/plugin/customParseFormat.js";
|
|
1299
|
+
import localizedFormatPlugin from "dayjs/plugin/localizedFormat.js";
|
|
1300
|
+
import isBetweenPlugin from "dayjs/plugin/isBetween.js";
|
|
1301
|
+
import advancedFormatPlugin from "dayjs/plugin/advancedFormat.js";
|
|
2121
1302
|
defaultDayjs.extend(localizedFormatPlugin);
|
|
2122
1303
|
defaultDayjs.extend(weekOfYearPlugin);
|
|
2123
1304
|
defaultDayjs.extend(isBetweenPlugin);
|
|
@@ -2223,10 +1404,8 @@ var defaultFormats = {
|
|
|
2223
1404
|
shortDate: "MMM D",
|
|
2224
1405
|
normalDate: "D MMMM",
|
|
2225
1406
|
normalDateWithWeekday: "ddd, MMM D",
|
|
2226
|
-
fullTime: "LT",
|
|
2227
1407
|
fullTime12h: "hh:mm A",
|
|
2228
1408
|
fullTime24h: "HH:mm",
|
|
2229
|
-
keyboardDateTime: "L LT",
|
|
2230
1409
|
keyboardDateTime12h: "L hh:mm A",
|
|
2231
1410
|
keyboardDateTime24h: "L HH:mm"
|
|
2232
1411
|
};
|
|
@@ -2600,25 +1779,283 @@ var AdapterDayjs = class {
|
|
|
2600
1779
|
};
|
|
2601
1780
|
|
|
2602
1781
|
// src/providers/LayoutProvider.tsx
|
|
2603
|
-
import {
|
|
1782
|
+
import { useIsFetching, useIsMutating } from "@tanstack/react-query";
|
|
2604
1783
|
import { DashboardLayout } from "@toolpad/core/DashboardLayout";
|
|
2605
|
-
import
|
|
1784
|
+
import { NotificationsProvider } from "@toolpad/core/useNotifications";
|
|
1785
|
+
import i18n from "i18next";
|
|
2606
1786
|
import LanguageDetector from "i18next-browser-languagedetector";
|
|
2607
|
-
import
|
|
2608
|
-
import { initReactI18next, useTranslation } from "react-i18next";
|
|
1787
|
+
import HttpBackend from "i18next-http-backend";
|
|
1788
|
+
import { initReactI18next, useTranslation as useTranslation5 } from "react-i18next";
|
|
2609
1789
|
import { z } from "zod";
|
|
2610
1790
|
import { zodI18nMap } from "zod-i18n-map";
|
|
2611
1791
|
import zodCsTranslations from "zod-i18n-map/locales/cs/zod.json";
|
|
2612
1792
|
import zodEnTranslations from "zod-i18n-map/locales/en/zod.json";
|
|
2613
1793
|
|
|
1794
|
+
// src/components/core/AppTitle.tsx
|
|
1795
|
+
import { Stack as Stack3, Typography as Typography4 } from "@mui/material";
|
|
1796
|
+
import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1797
|
+
var AppTitle = ({ title }) => {
|
|
1798
|
+
return /* @__PURE__ */ jsxs4(Stack3, { direction: "row", alignItems: "center", spacing: 2, children: [
|
|
1799
|
+
/* @__PURE__ */ jsx9("img", { src: "/favicon-32x32.png", alt: "app-logo", loading: "lazy" }),
|
|
1800
|
+
/* @__PURE__ */ jsx9(Typography4, { variant: "h6", children: title })
|
|
1801
|
+
] });
|
|
1802
|
+
};
|
|
1803
|
+
|
|
1804
|
+
// src/components/core/DevelopmentBanner.tsx
|
|
1805
|
+
import { Close } from "@mui/icons-material";
|
|
1806
|
+
import { Fade, Grid, IconButton, Paper, Typography as Typography5 } from "@mui/material";
|
|
1807
|
+
import { useState } from "react";
|
|
1808
|
+
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
1809
|
+
import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1810
|
+
var DevelopmentBanner = ({ hasNavigationRoutes }) => {
|
|
1811
|
+
const { t } = useTranslation2();
|
|
1812
|
+
const [bannerOpen, setBannerOpen] = useState(true);
|
|
1813
|
+
const closeBanner = () => setBannerOpen(false);
|
|
1814
|
+
return /* @__PURE__ */ jsx10(Fade, { appear: false, in: bannerOpen, children: /* @__PURE__ */ jsx10(Paper, { square: true, elevation: 3, tabIndex: -1, sx: {
|
|
1815
|
+
position: "fixed",
|
|
1816
|
+
bottom: 0,
|
|
1817
|
+
left: { xs: 0, sm: hasNavigationRoutes ? 83.3 : 0 },
|
|
1818
|
+
right: 0,
|
|
1819
|
+
m: 0,
|
|
1820
|
+
p: 2,
|
|
1821
|
+
borderWidth: 0,
|
|
1822
|
+
borderTopWidth: 1
|
|
1823
|
+
}, children: /* @__PURE__ */ jsxs5(Grid, { container: true, justifyContent: "space-between", alignItems: "center", children: [
|
|
1824
|
+
/* @__PURE__ */ jsxs5(Grid, { size: 10, children: [
|
|
1825
|
+
/* @__PURE__ */ jsx10(Typography5, { fontWeight: "bold", children: t("Layout.DevelopmentDialogTitle") }),
|
|
1826
|
+
/* @__PURE__ */ jsx10(Typography5, { variant: "body2", children: t("Layout.DevelopmentDialogContent") })
|
|
1827
|
+
] }),
|
|
1828
|
+
/* @__PURE__ */ jsx10(Grid, { size: 2, sx: { p: 1, textAlign: "right" }, children: /* @__PURE__ */ jsx10(IconButton, { size: "small", onClick: closeBanner, children: /* @__PURE__ */ jsx10(Close, {}) }) })
|
|
1829
|
+
] }) }) });
|
|
1830
|
+
};
|
|
1831
|
+
|
|
1832
|
+
// src/components/core/ToolbarAccount.tsx
|
|
1833
|
+
import { AccountCircle, ArrowBack, Brightness4, ChevronRight, DarkMode, LightMode, Login, Logout, SettingsBrightness, Translate } from "@mui/icons-material";
|
|
1834
|
+
import { Avatar, Box as Box3, IconButton as IconButton2, List, ListItem, ListItemButton, ListItemIcon, ListItemText, ListSubheader, Menu, Typography as Typography6, useColorScheme } from "@mui/material";
|
|
1835
|
+
import { Fragment, useState as useState2 } from "react";
|
|
1836
|
+
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
1837
|
+
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1838
|
+
var user = {
|
|
1839
|
+
name: "Dalibor Homola",
|
|
1840
|
+
employeeId: "C2503017",
|
|
1841
|
+
department: "MD0L50",
|
|
1842
|
+
login: () => {
|
|
1843
|
+
console.log("Login");
|
|
1844
|
+
},
|
|
1845
|
+
logout: () => {
|
|
1846
|
+
console.log("Logout");
|
|
1847
|
+
}
|
|
1848
|
+
};
|
|
1849
|
+
var ToolbarAccount = () => {
|
|
1850
|
+
const [anchorEl, setAnchorEl] = useState2(null);
|
|
1851
|
+
const [tab, setTab] = useState2("settings");
|
|
1852
|
+
const open = Boolean(anchorEl);
|
|
1853
|
+
const { t, i18n: i18n2 } = useTranslation3();
|
|
1854
|
+
const { mode, setMode } = useColorScheme();
|
|
1855
|
+
const changeLanguage = (newLanguage) => () => {
|
|
1856
|
+
i18n2.changeLanguage(newLanguage).finally(() => closeMenu());
|
|
1857
|
+
};
|
|
1858
|
+
const changeMode = (newMode) => () => {
|
|
1859
|
+
setMode(newMode);
|
|
1860
|
+
closeMenu();
|
|
1861
|
+
};
|
|
1862
|
+
const getModeText = () => {
|
|
1863
|
+
switch (mode) {
|
|
1864
|
+
case "light":
|
|
1865
|
+
return t("Layout.Light");
|
|
1866
|
+
case "dark":
|
|
1867
|
+
return t("Layout.Dark");
|
|
1868
|
+
default:
|
|
1869
|
+
return t("Layout.System");
|
|
1870
|
+
}
|
|
1871
|
+
};
|
|
1872
|
+
const usernameInitials = () => {
|
|
1873
|
+
const splittedName = user.name.split(" ");
|
|
1874
|
+
return `${splittedName[0][0]}${splittedName.length > 1 ? splittedName[1][0] : ""}`;
|
|
1875
|
+
};
|
|
1876
|
+
const openMenu = (e) => setAnchorEl(e.currentTarget);
|
|
1877
|
+
const closeMenu = () => {
|
|
1878
|
+
setAnchorEl(null);
|
|
1879
|
+
setTimeout(() => setTab("settings"), 300);
|
|
1880
|
+
};
|
|
1881
|
+
const login2 = () => user.login();
|
|
1882
|
+
const logout2 = () => user.logout();
|
|
1883
|
+
const changeTab = (newTab) => () => setTab(newTab);
|
|
1884
|
+
const settings = /* @__PURE__ */ jsxs6(List, { component: "nav", subheader: /* @__PURE__ */ jsx11(ListSubheader, { sx: { backgroundColor: "transparent" }, children: t("Layout.Settings") }), children: [
|
|
1885
|
+
/* @__PURE__ */ jsxs6(ListItemButton, { onClick: changeTab("theme"), sx: { py: 0.3 }, children: [
|
|
1886
|
+
/* @__PURE__ */ jsx11(ListItemIcon, { children: /* @__PURE__ */ jsx11(Brightness4, {}) }),
|
|
1887
|
+
/* @__PURE__ */ jsx11(ListItemText, { primary: t("Layout.Appearance"), secondary: getModeText() }),
|
|
1888
|
+
/* @__PURE__ */ jsx11(ChevronRight, {})
|
|
1889
|
+
] }),
|
|
1890
|
+
/* @__PURE__ */ jsxs6(ListItemButton, { onClick: changeTab("language"), sx: { py: 0.3 }, children: [
|
|
1891
|
+
/* @__PURE__ */ jsx11(ListItemIcon, { children: /* @__PURE__ */ jsx11(Translate, {}) }),
|
|
1892
|
+
/* @__PURE__ */ jsx11(ListItemText, { primary: t("Layout.Language"), secondary: i18n2.resolvedLanguage === "en" ? "English" : "\u010Ce\u0161tina" }),
|
|
1893
|
+
/* @__PURE__ */ jsx11(ChevronRight, {})
|
|
1894
|
+
] })
|
|
1895
|
+
] });
|
|
1896
|
+
const theme = /* @__PURE__ */ jsxs6(List, { subheader: /* @__PURE__ */ jsxs6(ListSubheader, { onClick: changeTab("settings"), sx: { backgroundColor: "transparent", display: "flex", alignItems: "center", px: 1, cursor: "pointer" }, children: [
|
|
1897
|
+
/* @__PURE__ */ jsx11(IconButton2, { size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx11(ArrowBack, { fontSize: "small" }) }),
|
|
1898
|
+
" ",
|
|
1899
|
+
t("Layout.Appearance")
|
|
1900
|
+
] }), children: [
|
|
1901
|
+
/* @__PURE__ */ jsxs6(ListItemButton, { onClick: changeMode("light"), disabled: mode === "light", children: [
|
|
1902
|
+
/* @__PURE__ */ jsx11(ListItemIcon, { children: /* @__PURE__ */ jsx11(LightMode, {}) }),
|
|
1903
|
+
/* @__PURE__ */ jsx11(ListItemText, { primary: t("Layout.Light") })
|
|
1904
|
+
] }),
|
|
1905
|
+
/* @__PURE__ */ jsxs6(ListItemButton, { onClick: changeMode("dark"), disabled: mode === "dark", children: [
|
|
1906
|
+
/* @__PURE__ */ jsx11(ListItemIcon, { children: /* @__PURE__ */ jsx11(DarkMode, {}) }),
|
|
1907
|
+
/* @__PURE__ */ jsx11(ListItemText, { primary: t("Layout.Dark") })
|
|
1908
|
+
] }),
|
|
1909
|
+
/* @__PURE__ */ jsxs6(ListItemButton, { onClick: changeMode("system"), disabled: mode === "system", children: [
|
|
1910
|
+
/* @__PURE__ */ jsx11(ListItemIcon, { children: /* @__PURE__ */ jsx11(SettingsBrightness, {}) }),
|
|
1911
|
+
/* @__PURE__ */ jsx11(ListItemText, { primary: t("Layout.System") })
|
|
1912
|
+
] })
|
|
1913
|
+
] });
|
|
1914
|
+
const language = /* @__PURE__ */ jsxs6(List, { subheader: /* @__PURE__ */ jsxs6(ListSubheader, { onClick: changeTab("settings"), sx: { backgroundColor: "transparent", display: "flex", alignItems: "center", px: 1, cursor: "pointer" }, children: [
|
|
1915
|
+
/* @__PURE__ */ jsx11(IconButton2, { size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx11(ArrowBack, { fontSize: "small" }) }),
|
|
1916
|
+
" ",
|
|
1917
|
+
t("Layout.Language")
|
|
1918
|
+
] }), children: [
|
|
1919
|
+
/* @__PURE__ */ jsx11(ListItemButton, { onClick: changeLanguage("en"), disabled: i18n2.resolvedLanguage === "en", children: /* @__PURE__ */ jsx11(ListItemText, { primary: "English" }) }),
|
|
1920
|
+
/* @__PURE__ */ jsx11(ListItemButton, { onClick: changeLanguage("cs"), disabled: i18n2.resolvedLanguage === "cs", children: /* @__PURE__ */ jsx11(ListItemText, { primary: "\u010Ce\u0161tina" }) })
|
|
1921
|
+
] });
|
|
1922
|
+
return /* @__PURE__ */ jsxs6(Fragment, { children: [
|
|
1923
|
+
/* @__PURE__ */ jsx11(IconButton2, { size: "small", onClick: openMenu, children: user.name ? /* @__PURE__ */ jsx11(Avatar, { sx: { width: { xs: 32, sm: 40 }, height: { xs: 32, sm: 40 }, bgcolor: "primary.main" }, children: /* @__PURE__ */ jsx11(Typography6, { variant: "subtitle2", sx: { fontWeight: "bold", lineHeight: 0 }, children: usernameInitials() }) }) : /* @__PURE__ */ jsx11(AccountCircle, {}) }),
|
|
1924
|
+
/* @__PURE__ */ jsx11(Menu, { anchorEl, open, onClose: closeMenu, children: /* @__PURE__ */ jsxs6(Box3, { sx: { width: 240 }, children: [
|
|
1925
|
+
/* @__PURE__ */ jsx11(List, { children: user.name ? /* @__PURE__ */ jsxs6(Fragment, { children: [
|
|
1926
|
+
/* @__PURE__ */ jsx11(ListItem, { children: /* @__PURE__ */ jsx11(ListItemText, { primary: user.name, secondary: /* @__PURE__ */ jsxs6("span", { children: [
|
|
1927
|
+
/* @__PURE__ */ jsx11("span", { children: user.employeeId }),
|
|
1928
|
+
/* @__PURE__ */ jsx11("br", {}),
|
|
1929
|
+
/* @__PURE__ */ jsx11("span", { children: user.department })
|
|
1930
|
+
] }) }) }),
|
|
1931
|
+
/* @__PURE__ */ jsxs6(ListItemButton, { onClick: logout2, children: [
|
|
1932
|
+
/* @__PURE__ */ jsx11(ListItemIcon, { children: /* @__PURE__ */ jsx11(Logout, { color: "error" }) }),
|
|
1933
|
+
/* @__PURE__ */ jsx11(ListItemText, { primary: t("Layout.Logout") })
|
|
1934
|
+
] })
|
|
1935
|
+
] }) : /* @__PURE__ */ jsxs6(ListItemButton, { onClick: login2, children: [
|
|
1936
|
+
/* @__PURE__ */ jsx11(ListItemIcon, { children: /* @__PURE__ */ jsx11(Login, { color: "success" }) }),
|
|
1937
|
+
/* @__PURE__ */ jsx11(ListItemText, { primary: t("Layout.LogIn") })
|
|
1938
|
+
] }) }),
|
|
1939
|
+
tab === "settings" && settings,
|
|
1940
|
+
tab === "theme" && theme,
|
|
1941
|
+
tab === "language" && language
|
|
1942
|
+
] }) })
|
|
1943
|
+
] });
|
|
1944
|
+
};
|
|
1945
|
+
|
|
1946
|
+
// src/hooks/ThemeHook.ts
|
|
1947
|
+
import { createTheme, darken, lighten } from "@mui/material";
|
|
1948
|
+
import { grey } from "@mui/material/colors";
|
|
1949
|
+
import { csCZ, enUS } from "@mui/material/locale";
|
|
1950
|
+
import { csCZ as dataGridCsCz, enUS as dataGridEnUs } from "@mui/x-data-grid-premium/locales";
|
|
1951
|
+
import { csCZ as datePickersCsCz, enUS as datePickersEnUs } from "@mui/x-date-pickers-pro/locales";
|
|
1952
|
+
import { useTranslation as useTranslation4 } from "react-i18next";
|
|
1953
|
+
var WISTRON_PRIMARY = "#00506E";
|
|
1954
|
+
var WISTRON_SECONDARY = "#64DC00";
|
|
1955
|
+
var useGetTheme = (theme) => {
|
|
1956
|
+
const { i18n: i18n2 } = useTranslation4();
|
|
1957
|
+
return createTheme(
|
|
1958
|
+
{
|
|
1959
|
+
cssVariables: {
|
|
1960
|
+
colorSchemeSelector: "data-toolpad-color-scheme"
|
|
1961
|
+
},
|
|
1962
|
+
colorSchemes: {
|
|
1963
|
+
light: {
|
|
1964
|
+
palette: {
|
|
1965
|
+
primary: { main: WISTRON_PRIMARY },
|
|
1966
|
+
secondary: { main: WISTRON_SECONDARY }
|
|
1967
|
+
}
|
|
1968
|
+
},
|
|
1969
|
+
dark: {
|
|
1970
|
+
palette: {
|
|
1971
|
+
primary: { main: lighten(WISTRON_PRIMARY, 0.1) },
|
|
1972
|
+
secondary: { main: darken(WISTRON_SECONDARY, 0.1) }
|
|
1973
|
+
}
|
|
1974
|
+
},
|
|
1975
|
+
...theme?.colorSchemes
|
|
1976
|
+
},
|
|
1977
|
+
components: {
|
|
1978
|
+
MuiCssBaseline: {
|
|
1979
|
+
styleOverrides: (theme2) => {
|
|
1980
|
+
return {
|
|
1981
|
+
body: {
|
|
1982
|
+
"&::-webkit-scrollbar, & *::-webkit-scrollbar": {
|
|
1983
|
+
width: "0.7em",
|
|
1984
|
+
height: "0.7em"
|
|
1985
|
+
},
|
|
1986
|
+
"&::-webkit-scrollbar-track, & *::-webkit-scrollbar-track": {
|
|
1987
|
+
backgroundColor: theme2.palette.mode === "dark" ? grey[900] : grey[200],
|
|
1988
|
+
borderRadius: "5px"
|
|
1989
|
+
},
|
|
1990
|
+
"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb": {
|
|
1991
|
+
backgroundColor: theme2.palette.mode === "dark" ? grey[800] : grey[400],
|
|
1992
|
+
borderRadius: "10px"
|
|
1993
|
+
},
|
|
1994
|
+
"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover": {
|
|
1995
|
+
backgroundColor: theme2.palette.mode === "dark" ? grey[700] : grey[500]
|
|
1996
|
+
},
|
|
1997
|
+
"&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner": {
|
|
1998
|
+
backgroundColor: "transparent"
|
|
1999
|
+
}
|
|
2000
|
+
}
|
|
2001
|
+
};
|
|
2002
|
+
}
|
|
2003
|
+
},
|
|
2004
|
+
MuiTextField: {
|
|
2005
|
+
defaultProps: {
|
|
2006
|
+
fullWidth: true
|
|
2007
|
+
}
|
|
2008
|
+
},
|
|
2009
|
+
MuiTableContainer: {
|
|
2010
|
+
styleOverrides: {
|
|
2011
|
+
root: ({ theme: theme2 }) => ({
|
|
2012
|
+
height: "calc(100vh - 56px)",
|
|
2013
|
+
[theme2.breakpoints.up("sm")]: {
|
|
2014
|
+
height: "calc(100vh - 64px)"
|
|
2015
|
+
},
|
|
2016
|
+
"& .MuiDataGrid-cell--editing": {
|
|
2017
|
+
"& .MuiInputBase-root": {
|
|
2018
|
+
height: "100%"
|
|
2019
|
+
}
|
|
2020
|
+
},
|
|
2021
|
+
"& .MuiDataGrid-columnHeaderTitle": {
|
|
2022
|
+
fontWeight: 600
|
|
2023
|
+
},
|
|
2024
|
+
"& .Mui-error": {
|
|
2025
|
+
backgroundColor: theme2.palette.error.main,
|
|
2026
|
+
color: theme2.palette.error.contrastText
|
|
2027
|
+
},
|
|
2028
|
+
"& .MuiDataGrid-booleanCell[data-value='true']": {
|
|
2029
|
+
color: `${theme2.palette.success.main} !important`
|
|
2030
|
+
},
|
|
2031
|
+
"& .MuiDataGrid-booleanCell[data-value='false']": {
|
|
2032
|
+
color: `${theme2.palette.error.main} !important`
|
|
2033
|
+
}
|
|
2034
|
+
})
|
|
2035
|
+
}
|
|
2036
|
+
},
|
|
2037
|
+
MuiDialog: {
|
|
2038
|
+
defaultProps: {
|
|
2039
|
+
fullWidth: true
|
|
2040
|
+
}
|
|
2041
|
+
},
|
|
2042
|
+
...theme?.components
|
|
2043
|
+
}
|
|
2044
|
+
},
|
|
2045
|
+
i18n2.resolvedLanguage === "cs" ? datePickersCsCz : datePickersEnUs,
|
|
2046
|
+
i18n2.resolvedLanguage === "cs" ? dataGridCsCz : dataGridEnUs,
|
|
2047
|
+
i18n2.resolvedLanguage === "cs" ? csCZ : enUS
|
|
2048
|
+
);
|
|
2049
|
+
};
|
|
2050
|
+
|
|
2614
2051
|
// src/providers/TanstackRouterAppProvider.tsx
|
|
2615
2052
|
import { useLocation, useNavigate, useSearch, Link as TanstackRouterLink } from "@tanstack/react-router";
|
|
2616
2053
|
import { AppProvider } from "@toolpad/core/AppProvider";
|
|
2617
2054
|
import { useCallback, useMemo as useMemo2, forwardRef } from "react";
|
|
2618
|
-
import { jsx as
|
|
2619
|
-
var
|
|
2055
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
2056
|
+
var Link2 = forwardRef((props, ref) => {
|
|
2620
2057
|
const { href, history, ...rest } = props;
|
|
2621
|
-
return /* @__PURE__ */
|
|
2058
|
+
return /* @__PURE__ */ jsx12(TanstackRouterLink, { ref, to: href, replace: history === "replace", ...rest });
|
|
2622
2059
|
});
|
|
2623
2060
|
var TanstackRouterAppProvider = (props) => {
|
|
2624
2061
|
const { pathname } = useLocation();
|
|
@@ -2630,106 +2067,46 @@ var TanstackRouterAppProvider = (props) => {
|
|
|
2630
2067
|
},
|
|
2631
2068
|
[_navigate]
|
|
2632
2069
|
);
|
|
2633
|
-
const router = useMemo2(() => ({ pathname, searchParams: new URLSearchParams(searchParams), navigate, Link:
|
|
2634
|
-
return /* @__PURE__ */
|
|
2070
|
+
const router = useMemo2(() => ({ pathname, searchParams: new URLSearchParams(searchParams), navigate, Link: Link2 }), [pathname, searchParams, navigate]);
|
|
2071
|
+
return /* @__PURE__ */ jsx12(AppProvider, { router, ...props });
|
|
2635
2072
|
};
|
|
2636
2073
|
|
|
2637
2074
|
// src/providers/LayoutProvider.tsx
|
|
2638
|
-
import { jsx as
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2075
|
+
import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2076
|
+
i18n.use(HttpBackend).use(LanguageDetector).use(initReactI18next).init({
|
|
2077
|
+
fallbackLng: "en",
|
|
2078
|
+
interpolation: {
|
|
2079
|
+
escapeValue: false
|
|
2080
|
+
}
|
|
2081
|
+
});
|
|
2082
|
+
i18n.addResourceBundle("en", "zod", zodEnTranslations);
|
|
2083
|
+
i18n.addResourceBundle("cs", "zod", zodCsTranslations);
|
|
2643
2084
|
z.setErrorMap(zodI18nMap);
|
|
2644
|
-
var LayoutProvider = (
|
|
2645
|
-
const
|
|
2646
|
-
const { t, i18n } =
|
|
2647
|
-
const
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
dark: {
|
|
2662
|
-
palette: {
|
|
2663
|
-
primary: { main: indigo[600] },
|
|
2664
|
-
secondary: { main: indigo[600] },
|
|
2665
|
-
background: {
|
|
2666
|
-
paper: grey[900]
|
|
2667
|
-
}
|
|
2668
|
-
}
|
|
2669
|
-
}
|
|
2670
|
-
},
|
|
2671
|
-
components: {
|
|
2672
|
-
MuiCssBaseline: {
|
|
2673
|
-
styleOverrides: (theme) => {
|
|
2674
|
-
return {
|
|
2675
|
-
body: {
|
|
2676
|
-
"&::-webkit-scrollbar, & *::-webkit-scrollbar": {
|
|
2677
|
-
width: "0.7em",
|
|
2678
|
-
height: "0.7em"
|
|
2679
|
-
},
|
|
2680
|
-
"&::-webkit-scrollbar-track, & *::-webkit-scrollbar-track": {
|
|
2681
|
-
backgroundColor: theme.palette.mode === "dark" ? grey[900] : grey[200],
|
|
2682
|
-
borderRadius: "5px"
|
|
2683
|
-
},
|
|
2684
|
-
"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb": {
|
|
2685
|
-
backgroundColor: theme.palette.mode === "dark" ? grey[800] : grey[400],
|
|
2686
|
-
borderRadius: "10px"
|
|
2687
|
-
},
|
|
2688
|
-
"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover": {
|
|
2689
|
-
backgroundColor: theme.palette.mode === "dark" ? grey[700] : grey[500]
|
|
2690
|
-
},
|
|
2691
|
-
"&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner": {
|
|
2692
|
-
backgroundColor: "transparent"
|
|
2693
|
-
}
|
|
2694
|
-
}
|
|
2695
|
-
};
|
|
2696
|
-
}
|
|
2697
|
-
},
|
|
2698
|
-
MuiDrawer: {
|
|
2699
|
-
styleOverrides: {
|
|
2700
|
-
paper: ({ theme }) => ({
|
|
2701
|
-
backgroundColor: "inherit",
|
|
2702
|
-
[theme.breakpoints.down("sm")]: {
|
|
2703
|
-
backgroundColor: theme.palette.background.paper
|
|
2704
|
-
}
|
|
2705
|
-
})
|
|
2706
|
-
}
|
|
2085
|
+
var LayoutProvider = (props) => {
|
|
2086
|
+
const theme = useGetTheme(props.theme);
|
|
2087
|
+
const { t, i18n: i18n2 } = useTranslation5();
|
|
2088
|
+
const isFetching = !!useIsFetching();
|
|
2089
|
+
const isMutating = !!useIsMutating();
|
|
2090
|
+
const isLargeScreen = useMediaQuery(theme.breakpoints.up("sm"));
|
|
2091
|
+
const user2 = { name: "Dalibor", department: "MD0L50", employeeId: "C2503017", company: "", category: "" };
|
|
2092
|
+
const navigation = props.getNavigation ? props.getNavigation({ user: user2, t }) : [];
|
|
2093
|
+
return /* @__PURE__ */ jsx13(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: i18n2.resolvedLanguage, children: /* @__PURE__ */ jsx13(TanstackRouterAppProvider, { navigation, theme, children: /* @__PURE__ */ jsx13(NotificationsProvider, { slotProps: { snackbar: { anchorOrigin: { vertical: isLargeScreen ? "top" : "bottom", horizontal: "center" } } }, children: /* @__PURE__ */ jsxs7(
|
|
2094
|
+
DashboardLayout,
|
|
2095
|
+
{
|
|
2096
|
+
defaultSidebarCollapsed: true,
|
|
2097
|
+
hideNavigation: !navigation.length,
|
|
2098
|
+
slots: {
|
|
2099
|
+
toolbarActions: () => null,
|
|
2100
|
+
toolbarAccount: ToolbarAccount,
|
|
2101
|
+
appTitle: () => /* @__PURE__ */ jsx13(AppTitle, { title: props.title })
|
|
2707
2102
|
},
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
}
|
|
2714
|
-
}
|
|
2103
|
+
children: [
|
|
2104
|
+
props.children,
|
|
2105
|
+
/* @__PURE__ */ jsx13(DevelopmentBanner, { hasNavigationRoutes: !!navigation.length }),
|
|
2106
|
+
(isFetching || isMutating) && /* @__PURE__ */ jsx13(LinearProgress, { sx: { position: "fixed", top: { xs: 56, sm: 64 }, left: 0, right: 0 } })
|
|
2107
|
+
]
|
|
2715
2108
|
}
|
|
2716
|
-
});
|
|
2717
|
-
const navigation = getNavigation({ user: { name: "Dalibor" }, i18n, t });
|
|
2718
|
-
return /* @__PURE__ */ jsx7(CacheProvider, { value: emotionCache, children: /* @__PURE__ */ jsx7(ThemeProvider, { theme: createdTheme, children: /* @__PURE__ */ jsxs3(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: i18n.resolvedLanguage, children: [
|
|
2719
|
-
/* @__PURE__ */ jsx7(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx7(TanstackRouterAppProvider, { theme: createdTheme, children: /* @__PURE__ */ jsx7(
|
|
2720
|
-
DashboardLayout,
|
|
2721
|
-
{
|
|
2722
|
-
defaultSidebarCollapsed: true,
|
|
2723
|
-
navigation,
|
|
2724
|
-
branding: {
|
|
2725
|
-
logo: /* @__PURE__ */ jsx7("img", { src: "/android-chrome-192x192.png", alt: "Logo" }),
|
|
2726
|
-
title
|
|
2727
|
-
},
|
|
2728
|
-
children
|
|
2729
|
-
}
|
|
2730
|
-
) }) }),
|
|
2731
|
-
","
|
|
2732
|
-
] }) }) });
|
|
2109
|
+
) }) }) });
|
|
2733
2110
|
};
|
|
2734
2111
|
|
|
2735
2112
|
// src/index.ts
|
|
@@ -2740,14 +2117,13 @@ import axios from "axios";
|
|
|
2740
2117
|
|
|
2741
2118
|
// src/services/UserService.ts
|
|
2742
2119
|
import Keycloak from "keycloak-js";
|
|
2743
|
-
import { env } from "node:process";
|
|
2744
2120
|
var keycloakConfig = {
|
|
2745
|
-
url: env.
|
|
2746
|
-
realm: env.
|
|
2747
|
-
clientId: env.
|
|
2748
|
-
idpHint: env.
|
|
2749
|
-
confidentialClientId: env.
|
|
2750
|
-
confidentialClientSecret: env.
|
|
2121
|
+
url: import.meta.env.VITE_KEYCLOAK_URL,
|
|
2122
|
+
realm: import.meta.env.VITE_KEYCLOAK_REALM,
|
|
2123
|
+
clientId: import.meta.env.VITE_KEYCLOAK_CLIENT_ID,
|
|
2124
|
+
idpHint: import.meta.env.VITE_KEYCLOAK_IDP_HINT,
|
|
2125
|
+
confidentialClientId: import.meta.env.VITE_KEYCLOAK_CONFIDENTIAL_CLIENT_ID,
|
|
2126
|
+
confidentialClientSecret: import.meta.env.VITE_KEYCLOAK_CONFIDENTIAL_CLIENT_SECRET
|
|
2751
2127
|
};
|
|
2752
2128
|
var _kc = new Keycloak({
|
|
2753
2129
|
url: keycloakConfig.url,
|
|
@@ -2755,7 +2131,8 @@ var _kc = new Keycloak({
|
|
|
2755
2131
|
clientId: keycloakConfig.clientId
|
|
2756
2132
|
});
|
|
2757
2133
|
var initKeycloak = async () => {
|
|
2758
|
-
|
|
2134
|
+
if (typeof window === "undefined") return;
|
|
2135
|
+
const authenticated = await _kc.init({ onLoad: "check-sso" });
|
|
2759
2136
|
if (authenticated) {
|
|
2760
2137
|
return await loadUserInfo();
|
|
2761
2138
|
} else {
|
|
@@ -2794,14 +2171,14 @@ var getConfidentialToken = async () => {
|
|
|
2794
2171
|
var updateToken = () => _kc.updateToken(30).catch(login);
|
|
2795
2172
|
var hasRole = (roles) => roles.some((role) => _kc.hasRealmRole(role) || _kc.hasResourceRole(role));
|
|
2796
2173
|
var loadUserInfo = async () => {
|
|
2797
|
-
const
|
|
2174
|
+
const user2 = await _kc.loadUserInfo();
|
|
2798
2175
|
return {
|
|
2799
|
-
name:
|
|
2800
|
-
employeeId:
|
|
2801
|
-
department:
|
|
2802
|
-
email:
|
|
2803
|
-
company:
|
|
2804
|
-
category:
|
|
2176
|
+
name: user2.name,
|
|
2177
|
+
employeeId: user2.employeeId?.toUpperCase() ?? "",
|
|
2178
|
+
department: user2.department ?? "",
|
|
2179
|
+
email: user2.email,
|
|
2180
|
+
company: user2.company,
|
|
2181
|
+
category: user2.category
|
|
2805
2182
|
};
|
|
2806
2183
|
};
|
|
2807
2184
|
var UserService = {
|
|
@@ -2830,8 +2207,8 @@ var getContrastTextColor = (color) => {
|
|
|
2830
2207
|
var wczApiClient = axios.create();
|
|
2831
2208
|
wczApiClient.interceptors.request.use(async (config) => {
|
|
2832
2209
|
await UserService.updateToken();
|
|
2833
|
-
const
|
|
2834
|
-
config.headers.Authorization = `Bearer ${
|
|
2210
|
+
const token = await UserService.getToken();
|
|
2211
|
+
config.headers.Authorization = `Bearer ${token}`;
|
|
2835
2212
|
return config;
|
|
2836
2213
|
});
|
|
2837
2214
|
|
|
@@ -2851,11 +2228,11 @@ var getFieldStatus = (field) => {
|
|
|
2851
2228
|
};
|
|
2852
2229
|
|
|
2853
2230
|
// src/components/form/FormAutocomplete.tsx
|
|
2854
|
-
import { jsx as
|
|
2231
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
2855
2232
|
var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
|
|
2856
2233
|
const field = useFieldContext();
|
|
2857
2234
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2858
|
-
return /* @__PURE__ */
|
|
2235
|
+
return /* @__PURE__ */ jsx14(
|
|
2859
2236
|
Autocomplete,
|
|
2860
2237
|
{
|
|
2861
2238
|
value: field.state.value,
|
|
@@ -2864,7 +2241,7 @@ var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
|
|
|
2864
2241
|
onBlur: field.handleBlur,
|
|
2865
2242
|
"aria-label": field.name,
|
|
2866
2243
|
...autocompleteProps,
|
|
2867
|
-
renderInput: (params) => /* @__PURE__ */
|
|
2244
|
+
renderInput: (params) => /* @__PURE__ */ jsx14(
|
|
2868
2245
|
TextField,
|
|
2869
2246
|
{
|
|
2870
2247
|
...params,
|
|
@@ -2880,15 +2257,15 @@ var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
|
|
|
2880
2257
|
|
|
2881
2258
|
// src/components/form/FormCheckbox.tsx
|
|
2882
2259
|
import { Checkbox, FormControl, FormControlLabel, FormHelperText } from "@mui/material";
|
|
2883
|
-
import { jsx as
|
|
2260
|
+
import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2884
2261
|
var FormCheckbox = (props) => {
|
|
2885
2262
|
const field = useFieldContext();
|
|
2886
2263
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2887
|
-
return /* @__PURE__ */
|
|
2888
|
-
/* @__PURE__ */
|
|
2264
|
+
return /* @__PURE__ */ jsxs8(FormControl, { component: "fieldset", children: [
|
|
2265
|
+
/* @__PURE__ */ jsx15(
|
|
2889
2266
|
FormControlLabel,
|
|
2890
2267
|
{
|
|
2891
|
-
control: /* @__PURE__ */
|
|
2268
|
+
control: /* @__PURE__ */ jsx15(
|
|
2892
2269
|
Checkbox,
|
|
2893
2270
|
{
|
|
2894
2271
|
name: field.name,
|
|
@@ -2902,18 +2279,18 @@ var FormCheckbox = (props) => {
|
|
|
2902
2279
|
label: props.label ?? ""
|
|
2903
2280
|
}
|
|
2904
2281
|
),
|
|
2905
|
-
isTouched && hasError && /* @__PURE__ */
|
|
2282
|
+
isTouched && hasError && /* @__PURE__ */ jsx15(FormHelperText, { error: hasError, children: helperText })
|
|
2906
2283
|
] });
|
|
2907
2284
|
};
|
|
2908
2285
|
|
|
2909
2286
|
// src/components/form/FormDatePicker.tsx
|
|
2910
2287
|
import { DatePicker } from "@mui/x-date-pickers-pro";
|
|
2911
2288
|
import dayjs from "dayjs";
|
|
2912
|
-
import { jsx as
|
|
2289
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
2913
2290
|
var FormDatePicker = (props) => {
|
|
2914
2291
|
const field = useFieldContext();
|
|
2915
2292
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2916
|
-
return /* @__PURE__ */
|
|
2293
|
+
return /* @__PURE__ */ jsx16(
|
|
2917
2294
|
DatePicker,
|
|
2918
2295
|
{
|
|
2919
2296
|
name: field.name,
|
|
@@ -2937,11 +2314,11 @@ var FormDatePicker = (props) => {
|
|
|
2937
2314
|
// src/components/form/FormDateTimePicker.tsx
|
|
2938
2315
|
import { DateTimePicker } from "@mui/x-date-pickers-pro";
|
|
2939
2316
|
import dayjs2 from "dayjs";
|
|
2940
|
-
import { jsx as
|
|
2317
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
2941
2318
|
var FormDateTimePicker = (props) => {
|
|
2942
2319
|
const field = useFieldContext();
|
|
2943
2320
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2944
|
-
return /* @__PURE__ */
|
|
2321
|
+
return /* @__PURE__ */ jsx17(
|
|
2945
2322
|
DateTimePicker,
|
|
2946
2323
|
{
|
|
2947
2324
|
name: field.name,
|
|
@@ -2962,15 +2339,39 @@ var FormDateTimePicker = (props) => {
|
|
|
2962
2339
|
);
|
|
2963
2340
|
};
|
|
2964
2341
|
|
|
2342
|
+
// src/components/form/FormNumberField.tsx
|
|
2343
|
+
import { TextField as TextField2 } from "@mui/material";
|
|
2344
|
+
import { NumericFormat } from "react-number-format";
|
|
2345
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
2346
|
+
var FormNumberField = ({ options, ...props }) => {
|
|
2347
|
+
const field = useFieldContext();
|
|
2348
|
+
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2349
|
+
return /* @__PURE__ */ jsx18(
|
|
2350
|
+
NumericFormat,
|
|
2351
|
+
{
|
|
2352
|
+
customInput: TextField2,
|
|
2353
|
+
name: field.name,
|
|
2354
|
+
value: field.state.value ?? "",
|
|
2355
|
+
onValueChange: ({ floatValue }) => field.handleChange(floatValue),
|
|
2356
|
+
onBlur: field.handleBlur,
|
|
2357
|
+
error: isTouched && hasError,
|
|
2358
|
+
helperText: isTouched && helperText,
|
|
2359
|
+
"aria-label": field.name,
|
|
2360
|
+
...props,
|
|
2361
|
+
...options
|
|
2362
|
+
}
|
|
2363
|
+
);
|
|
2364
|
+
};
|
|
2365
|
+
|
|
2965
2366
|
// src/components/form/FormRadioGroup.tsx
|
|
2966
2367
|
import { FormControl as FormControl2, FormControlLabel as FormControlLabel2, FormHelperText as FormHelperText2, FormLabel, Radio, RadioGroup } from "@mui/material";
|
|
2967
|
-
import { jsx as
|
|
2368
|
+
import { jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2968
2369
|
var FormRadioGroup = ({ label, options, ...props }) => {
|
|
2969
2370
|
const field = useFieldContext();
|
|
2970
2371
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2971
|
-
return /* @__PURE__ */
|
|
2972
|
-
label && /* @__PURE__ */
|
|
2973
|
-
/* @__PURE__ */
|
|
2372
|
+
return /* @__PURE__ */ jsxs9(FormControl2, { component: "fieldset", children: [
|
|
2373
|
+
label && /* @__PURE__ */ jsx19(FormLabel, { component: "legend", children: label }),
|
|
2374
|
+
/* @__PURE__ */ jsx19(
|
|
2974
2375
|
RadioGroup,
|
|
2975
2376
|
{
|
|
2976
2377
|
name: field.name,
|
|
@@ -2979,30 +2380,30 @@ var FormRadioGroup = ({ label, options, ...props }) => {
|
|
|
2979
2380
|
onBlur: field.handleBlur,
|
|
2980
2381
|
"aria-label": field.name,
|
|
2981
2382
|
...props,
|
|
2982
|
-
children: options.map((option) => /* @__PURE__ */
|
|
2383
|
+
children: options.map((option) => /* @__PURE__ */ jsx19(
|
|
2983
2384
|
FormControlLabel2,
|
|
2984
2385
|
{
|
|
2985
2386
|
value: option.value,
|
|
2986
|
-
control: /* @__PURE__ */
|
|
2387
|
+
control: /* @__PURE__ */ jsx19(Radio, {}),
|
|
2987
2388
|
label: option.label
|
|
2988
2389
|
},
|
|
2989
2390
|
option.value
|
|
2990
2391
|
))
|
|
2991
2392
|
}
|
|
2992
2393
|
),
|
|
2993
|
-
isTouched && hasError && /* @__PURE__ */
|
|
2394
|
+
isTouched && hasError && /* @__PURE__ */ jsx19(FormHelperText2, { error: hasError, children: helperText })
|
|
2994
2395
|
] });
|
|
2995
2396
|
};
|
|
2996
2397
|
|
|
2997
2398
|
// src/components/form/FormSlider.tsx
|
|
2998
2399
|
import { FormControl as FormControl3, FormHelperText as FormHelperText3, FormLabel as FormLabel2, Slider } from "@mui/material";
|
|
2999
|
-
import { jsx as
|
|
2400
|
+
import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3000
2401
|
var FormSlider = ({ label, ...props }) => {
|
|
3001
2402
|
const field = useFieldContext();
|
|
3002
2403
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
3003
|
-
return /* @__PURE__ */
|
|
3004
|
-
label && /* @__PURE__ */
|
|
3005
|
-
/* @__PURE__ */
|
|
2404
|
+
return /* @__PURE__ */ jsxs10(FormControl3, { component: "fieldset", children: [
|
|
2405
|
+
label && /* @__PURE__ */ jsx20(FormLabel2, { children: label }),
|
|
2406
|
+
/* @__PURE__ */ jsx20(
|
|
3006
2407
|
Slider,
|
|
3007
2408
|
{
|
|
3008
2409
|
name: field.name,
|
|
@@ -3013,13 +2414,13 @@ var FormSlider = ({ label, ...props }) => {
|
|
|
3013
2414
|
...props
|
|
3014
2415
|
}
|
|
3015
2416
|
),
|
|
3016
|
-
isTouched && hasError && /* @__PURE__ */
|
|
2417
|
+
isTouched && hasError && /* @__PURE__ */ jsx20(FormHelperText3, { error: hasError, children: helperText })
|
|
3017
2418
|
] });
|
|
3018
2419
|
};
|
|
3019
2420
|
|
|
3020
2421
|
// src/components/form/FormSubmitButton.tsx
|
|
3021
2422
|
import { Button as Button2 } from "@mui/material";
|
|
3022
|
-
import { jsx as
|
|
2423
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
3023
2424
|
var FormSubmitButton = (props) => {
|
|
3024
2425
|
const form = useFormContext();
|
|
3025
2426
|
const handleClick = (e) => {
|
|
@@ -3027,12 +2428,13 @@ var FormSubmitButton = (props) => {
|
|
|
3027
2428
|
e.stopPropagation();
|
|
3028
2429
|
form.handleSubmit();
|
|
3029
2430
|
};
|
|
3030
|
-
return /* @__PURE__ */
|
|
2431
|
+
return /* @__PURE__ */ jsx21(form.Subscribe, { selector: (state) => [state.canSubmit, state.isSubmitting], children: ([canSubmit, isSubmitting]) => /* @__PURE__ */ jsx21(
|
|
3031
2432
|
Button2,
|
|
3032
2433
|
{
|
|
3033
2434
|
loading: isSubmitting,
|
|
3034
|
-
disabled:
|
|
2435
|
+
disabled: !canSubmit,
|
|
3035
2436
|
onClick: handleClick,
|
|
2437
|
+
type: "submit",
|
|
3036
2438
|
"aria-label": "submit",
|
|
3037
2439
|
...props
|
|
3038
2440
|
}
|
|
@@ -3041,15 +2443,15 @@ var FormSubmitButton = (props) => {
|
|
|
3041
2443
|
|
|
3042
2444
|
// src/components/form/FormSwitch.tsx
|
|
3043
2445
|
import { FormControl as FormControl4, FormControlLabel as FormControlLabel3, FormHelperText as FormHelperText4, Switch } from "@mui/material";
|
|
3044
|
-
import { jsx as
|
|
2446
|
+
import { jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3045
2447
|
var FormSwitch = (props) => {
|
|
3046
2448
|
const field = useFieldContext();
|
|
3047
2449
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
3048
|
-
return /* @__PURE__ */
|
|
3049
|
-
/* @__PURE__ */
|
|
2450
|
+
return /* @__PURE__ */ jsxs11(FormControl4, { component: "fieldset", children: [
|
|
2451
|
+
/* @__PURE__ */ jsx22(
|
|
3050
2452
|
FormControlLabel3,
|
|
3051
2453
|
{
|
|
3052
|
-
control: /* @__PURE__ */
|
|
2454
|
+
control: /* @__PURE__ */ jsx22(
|
|
3053
2455
|
Switch,
|
|
3054
2456
|
{
|
|
3055
2457
|
name: field.name,
|
|
@@ -3063,18 +2465,18 @@ var FormSwitch = (props) => {
|
|
|
3063
2465
|
label: props.label ?? ""
|
|
3064
2466
|
}
|
|
3065
2467
|
),
|
|
3066
|
-
isTouched && hasError && /* @__PURE__ */
|
|
2468
|
+
isTouched && hasError && /* @__PURE__ */ jsx22(FormHelperText4, { error: hasError, children: helperText })
|
|
3067
2469
|
] });
|
|
3068
2470
|
};
|
|
3069
2471
|
|
|
3070
2472
|
// src/components/form/FormTextField.tsx
|
|
3071
|
-
import { TextField as
|
|
3072
|
-
import { jsx as
|
|
2473
|
+
import { TextField as TextField3 } from "@mui/material";
|
|
2474
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
3073
2475
|
var FormTextField = (props) => {
|
|
3074
2476
|
const field = useFieldContext();
|
|
3075
2477
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
3076
|
-
return /* @__PURE__ */
|
|
3077
|
-
|
|
2478
|
+
return /* @__PURE__ */ jsx23(
|
|
2479
|
+
TextField3,
|
|
3078
2480
|
{
|
|
3079
2481
|
name: field.name,
|
|
3080
2482
|
value: field.state.value ?? "",
|
|
@@ -3093,6 +2495,7 @@ var { fieldContext, useFieldContext, formContext, useFormContext } = createFormH
|
|
|
3093
2495
|
var { useAppForm: useLayoutForm, withForm: withLayoutForm } = createFormHook({
|
|
3094
2496
|
fieldComponents: {
|
|
3095
2497
|
TextField: FormTextField,
|
|
2498
|
+
NumberField: FormNumberField,
|
|
3096
2499
|
Autocomplete: FormAutocomplete,
|
|
3097
2500
|
Checkbox: FormCheckbox,
|
|
3098
2501
|
Switch: FormSwitch,
|
|
@@ -3110,8 +2513,11 @@ var { useAppForm: useLayoutForm, withForm: withLayoutForm } = createFormHook({
|
|
|
3110
2513
|
|
|
3111
2514
|
// src/index.ts
|
|
3112
2515
|
import { useDialogs } from "@toolpad/core/useDialogs";
|
|
2516
|
+
import { useNotifications } from "@toolpad/core/useNotifications";
|
|
3113
2517
|
import { useLocalStorageState } from "@toolpad/core/useLocalStorageState";
|
|
3114
2518
|
export {
|
|
2519
|
+
ChipInputCell,
|
|
2520
|
+
EditableColumnHeader,
|
|
3115
2521
|
LayoutProvider,
|
|
3116
2522
|
Platform,
|
|
3117
2523
|
RouterButton,
|
|
@@ -3119,12 +2525,14 @@ export {
|
|
|
3119
2525
|
RouterLink,
|
|
3120
2526
|
RouterNotFound,
|
|
3121
2527
|
RouterTab,
|
|
2528
|
+
TypographyWithIcon,
|
|
3122
2529
|
getContrastTextColor,
|
|
3123
2530
|
useDialogs,
|
|
3124
2531
|
useFieldContext,
|
|
3125
2532
|
useFormContext,
|
|
3126
2533
|
useLayoutForm,
|
|
3127
2534
|
useLocalStorageState,
|
|
2535
|
+
useNotifications,
|
|
3128
2536
|
uuidv7,
|
|
3129
2537
|
wczApiClient,
|
|
3130
2538
|
withLayoutForm
|