mytek-components 1.0.9 → 2.0.2
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/main.es.js +1469 -225
- package/dist/main.es.js.map +1 -1
- package/dist/main.umd.js +1469 -225
- package/dist/main.umd.js.map +1 -1
- package/package.json +53 -53
package/dist/main.es.js
CHANGED
|
@@ -5725,7 +5725,7 @@ function getSvgIconUtilityClass(slot) {
|
|
|
5725
5725
|
return generateUtilityClass("MuiSvgIcon", slot);
|
|
5726
5726
|
}
|
|
5727
5727
|
generateUtilityClasses("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
|
|
5728
|
-
const useUtilityClasses$
|
|
5728
|
+
const useUtilityClasses$C = (ownerState) => {
|
|
5729
5729
|
const {
|
|
5730
5730
|
color: color2,
|
|
5731
5731
|
fontSize,
|
|
@@ -5870,7 +5870,7 @@ const SvgIcon = /* @__PURE__ */ React.forwardRef(function SvgIcon2(inProps, ref)
|
|
|
5870
5870
|
if (!inheritViewBox) {
|
|
5871
5871
|
more.viewBox = viewBox;
|
|
5872
5872
|
}
|
|
5873
|
-
const classes = useUtilityClasses$
|
|
5873
|
+
const classes = useUtilityClasses$C(ownerState);
|
|
5874
5874
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(SvgIconRoot, {
|
|
5875
5875
|
as: component,
|
|
5876
5876
|
className: clsx(classes.root, className),
|
|
@@ -7298,7 +7298,7 @@ function getPaperUtilityClass(slot) {
|
|
|
7298
7298
|
return generateUtilityClass("MuiPaper", slot);
|
|
7299
7299
|
}
|
|
7300
7300
|
generateUtilityClasses("MuiPaper", ["root", "rounded", "outlined", "elevation", "elevation0", "elevation1", "elevation2", "elevation3", "elevation4", "elevation5", "elevation6", "elevation7", "elevation8", "elevation9", "elevation10", "elevation11", "elevation12", "elevation13", "elevation14", "elevation15", "elevation16", "elevation17", "elevation18", "elevation19", "elevation20", "elevation21", "elevation22", "elevation23", "elevation24"]);
|
|
7301
|
-
const useUtilityClasses$
|
|
7301
|
+
const useUtilityClasses$B = (ownerState) => {
|
|
7302
7302
|
const {
|
|
7303
7303
|
square,
|
|
7304
7304
|
elevation,
|
|
@@ -7371,7 +7371,7 @@ const Paper = /* @__PURE__ */ React.forwardRef(function Paper2(inProps, ref) {
|
|
|
7371
7371
|
square,
|
|
7372
7372
|
variant
|
|
7373
7373
|
};
|
|
7374
|
-
const classes = useUtilityClasses$
|
|
7374
|
+
const classes = useUtilityClasses$B(ownerState);
|
|
7375
7375
|
if (process.env.NODE_ENV !== "production") {
|
|
7376
7376
|
if (theme.shadows[elevation] === void 0) {
|
|
7377
7377
|
console.error([`MUI: The elevation provided <Paper elevation={${elevation}}> is not available in the theme.`, `Please make sure that \`theme.shadows[${elevation}]\` is defined.`].join("\n"));
|
|
@@ -8057,7 +8057,7 @@ function getButtonBaseUtilityClass(slot) {
|
|
|
8057
8057
|
return generateUtilityClass("MuiButtonBase", slot);
|
|
8058
8058
|
}
|
|
8059
8059
|
const buttonBaseClasses = generateUtilityClasses("MuiButtonBase", ["root", "disabled", "focusVisible"]);
|
|
8060
|
-
const useUtilityClasses$
|
|
8060
|
+
const useUtilityClasses$A = (ownerState) => {
|
|
8061
8061
|
const {
|
|
8062
8062
|
disabled,
|
|
8063
8063
|
focusVisible,
|
|
@@ -8273,7 +8273,7 @@ const ButtonBase = /* @__PURE__ */ React.forwardRef(function ButtonBase2(inProps
|
|
|
8273
8273
|
tabIndex,
|
|
8274
8274
|
focusVisible
|
|
8275
8275
|
};
|
|
8276
|
-
const classes = useUtilityClasses$
|
|
8276
|
+
const classes = useUtilityClasses$A(ownerState);
|
|
8277
8277
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(ButtonBaseRoot, {
|
|
8278
8278
|
as: ComponentProp,
|
|
8279
8279
|
className: clsx(classes.root, className),
|
|
@@ -8525,7 +8525,7 @@ const rotateAnimation = typeof circularRotateKeyframe !== "string" ? css`
|
|
|
8525
8525
|
const dashAnimation = typeof circularDashKeyframe !== "string" ? css`
|
|
8526
8526
|
animation: ${circularDashKeyframe} 1.4s ease-in-out infinite;
|
|
8527
8527
|
` : null;
|
|
8528
|
-
const useUtilityClasses$
|
|
8528
|
+
const useUtilityClasses$z = (ownerState) => {
|
|
8529
8529
|
const {
|
|
8530
8530
|
classes,
|
|
8531
8531
|
variant,
|
|
@@ -8647,7 +8647,7 @@ const CircularProgress = /* @__PURE__ */ React.forwardRef(function CircularProgr
|
|
|
8647
8647
|
value,
|
|
8648
8648
|
variant
|
|
8649
8649
|
};
|
|
8650
|
-
const classes = useUtilityClasses$
|
|
8650
|
+
const classes = useUtilityClasses$z(ownerState);
|
|
8651
8651
|
const circleStyle = {};
|
|
8652
8652
|
const rootStyle = {};
|
|
8653
8653
|
const rootProps = {};
|
|
@@ -8756,7 +8756,7 @@ function getIconButtonUtilityClass(slot) {
|
|
|
8756
8756
|
return generateUtilityClass("MuiIconButton", slot);
|
|
8757
8757
|
}
|
|
8758
8758
|
const iconButtonClasses = generateUtilityClasses("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge", "loading", "loadingIndicator", "loadingWrapper"]);
|
|
8759
|
-
const useUtilityClasses$
|
|
8759
|
+
const useUtilityClasses$y = (ownerState) => {
|
|
8760
8760
|
const {
|
|
8761
8761
|
classes,
|
|
8762
8762
|
disabled,
|
|
@@ -8941,7 +8941,7 @@ const IconButton = /* @__PURE__ */ React.forwardRef(function IconButton2(inProps
|
|
|
8941
8941
|
loadingIndicator,
|
|
8942
8942
|
size
|
|
8943
8943
|
};
|
|
8944
|
-
const classes = useUtilityClasses$
|
|
8944
|
+
const classes = useUtilityClasses$y(ownerState);
|
|
8945
8945
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconButtonRoot, {
|
|
8946
8946
|
id: loading ? loadingId : idProp,
|
|
8947
8947
|
className: clsx(classes.root, className),
|
|
@@ -9065,7 +9065,7 @@ const v6Colors = {
|
|
|
9065
9065
|
textDisabled: true
|
|
9066
9066
|
};
|
|
9067
9067
|
const extendSxProp = internal_createExtendSxProp();
|
|
9068
|
-
const useUtilityClasses$
|
|
9068
|
+
const useUtilityClasses$x = (ownerState) => {
|
|
9069
9069
|
const {
|
|
9070
9070
|
align,
|
|
9071
9071
|
gutterBottom,
|
|
@@ -9208,7 +9208,7 @@ const Typography = /* @__PURE__ */ React.forwardRef(function Typography2(inProps
|
|
|
9208
9208
|
variantMapping
|
|
9209
9209
|
};
|
|
9210
9210
|
const Component = component || (paragraph ? "p" : variantMapping[variant] || defaultVariantMapping[variant]) || "span";
|
|
9211
|
-
const classes = useUtilityClasses$
|
|
9211
|
+
const classes = useUtilityClasses$x(ownerState);
|
|
9212
9212
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(TypographyRoot, {
|
|
9213
9213
|
as: Component,
|
|
9214
9214
|
ref,
|
|
@@ -10959,7 +10959,7 @@ const inputOverridesResolver = (props, styles2) => {
|
|
|
10959
10959
|
} = props;
|
|
10960
10960
|
return [styles2.input, ownerState.size === "small" && styles2.inputSizeSmall, ownerState.multiline && styles2.inputMultiline, ownerState.type === "search" && styles2.inputTypeSearch, ownerState.startAdornment && styles2.inputAdornedStart, ownerState.endAdornment && styles2.inputAdornedEnd, ownerState.hiddenLabel && styles2.inputHiddenLabel];
|
|
10961
10961
|
};
|
|
10962
|
-
const useUtilityClasses$
|
|
10962
|
+
const useUtilityClasses$w = (ownerState) => {
|
|
10963
10963
|
const {
|
|
10964
10964
|
classes,
|
|
10965
10965
|
color: color2,
|
|
@@ -11363,7 +11363,7 @@ const InputBase = /* @__PURE__ */ React.forwardRef(function InputBase2(inProps,
|
|
|
11363
11363
|
startAdornment,
|
|
11364
11364
|
type
|
|
11365
11365
|
};
|
|
11366
|
-
const classes = useUtilityClasses$
|
|
11366
|
+
const classes = useUtilityClasses$w(ownerState);
|
|
11367
11367
|
const Root = slots.root || components.Root || InputBaseRoot;
|
|
11368
11368
|
const rootProps = slotProps.root || componentsProps.root || {};
|
|
11369
11369
|
const Input3 = slots.input || components.Input || InputBaseInput;
|
|
@@ -11676,7 +11676,7 @@ const filledInputClasses = {
|
|
|
11676
11676
|
...inputBaseClasses,
|
|
11677
11677
|
...generateUtilityClasses("MuiFilledInput", ["root", "underline", "input", "adornedStart", "adornedEnd", "sizeSmall", "multiline", "hiddenLabel"])
|
|
11678
11678
|
};
|
|
11679
|
-
const ArrowDropDownIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
|
|
11679
|
+
const ArrowDropDownIcon$1 = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
|
|
11680
11680
|
d: "M7 10l5 5 5-5z"
|
|
11681
11681
|
}), "ArrowDropDown");
|
|
11682
11682
|
function isClassComponent(elementType) {
|
|
@@ -11899,7 +11899,7 @@ function getBackdropUtilityClass(slot) {
|
|
|
11899
11899
|
return generateUtilityClass("MuiBackdrop", slot);
|
|
11900
11900
|
}
|
|
11901
11901
|
generateUtilityClasses("MuiBackdrop", ["root", "invisible"]);
|
|
11902
|
-
const useUtilityClasses$
|
|
11902
|
+
const useUtilityClasses$v = (ownerState) => {
|
|
11903
11903
|
const {
|
|
11904
11904
|
classes,
|
|
11905
11905
|
invisible
|
|
@@ -11962,7 +11962,7 @@ const Backdrop = /* @__PURE__ */ React.forwardRef(function Backdrop2(inProps, re
|
|
|
11962
11962
|
component,
|
|
11963
11963
|
invisible
|
|
11964
11964
|
};
|
|
11965
|
-
const classes = useUtilityClasses$
|
|
11965
|
+
const classes = useUtilityClasses$v(ownerState);
|
|
11966
11966
|
const backwardCompatibleSlots = {
|
|
11967
11967
|
transition: TransitionComponentProp,
|
|
11968
11968
|
root: components.Root,
|
|
@@ -12130,7 +12130,7 @@ const ButtonGroupButtonContext = /* @__PURE__ */ React.createContext(void 0);
|
|
|
12130
12130
|
if (process.env.NODE_ENV !== "production") {
|
|
12131
12131
|
ButtonGroupButtonContext.displayName = "ButtonGroupButtonContext";
|
|
12132
12132
|
}
|
|
12133
|
-
const useUtilityClasses$
|
|
12133
|
+
const useUtilityClasses$u = (ownerState) => {
|
|
12134
12134
|
const {
|
|
12135
12135
|
color: color2,
|
|
12136
12136
|
disableElevation,
|
|
@@ -12630,7 +12630,7 @@ const Button = /* @__PURE__ */ React.forwardRef(function Button2(inProps, ref) {
|
|
|
12630
12630
|
type,
|
|
12631
12631
|
variant
|
|
12632
12632
|
};
|
|
12633
|
-
const classes = useUtilityClasses$
|
|
12633
|
+
const classes = useUtilityClasses$u(ownerState);
|
|
12634
12634
|
const startIcon = (startIconProp || loading && loadingPosition === "start") && /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonStartIcon, {
|
|
12635
12635
|
className: classes.startIcon,
|
|
12636
12636
|
ownerState,
|
|
@@ -12797,7 +12797,7 @@ function getSwitchBaseUtilityClass(slot) {
|
|
|
12797
12797
|
return generateUtilityClass("PrivateSwitchBase", slot);
|
|
12798
12798
|
}
|
|
12799
12799
|
generateUtilityClasses("PrivateSwitchBase", ["root", "checked", "disabled", "input", "edgeStart", "edgeEnd"]);
|
|
12800
|
-
const useUtilityClasses$
|
|
12800
|
+
const useUtilityClasses$t = (ownerState) => {
|
|
12801
12801
|
const {
|
|
12802
12802
|
classes,
|
|
12803
12803
|
checked,
|
|
@@ -12934,7 +12934,7 @@ const SwitchBase = /* @__PURE__ */ React.forwardRef(function SwitchBase2(props,
|
|
|
12934
12934
|
disableFocusRipple,
|
|
12935
12935
|
edge
|
|
12936
12936
|
};
|
|
12937
|
-
const classes = useUtilityClasses$
|
|
12937
|
+
const classes = useUtilityClasses$t(ownerState);
|
|
12938
12938
|
const externalForwardedProps = {
|
|
12939
12939
|
slots,
|
|
12940
12940
|
slotProps: {
|
|
@@ -13143,7 +13143,7 @@ function getCheckboxUtilityClass(slot) {
|
|
|
13143
13143
|
return generateUtilityClass("MuiCheckbox", slot);
|
|
13144
13144
|
}
|
|
13145
13145
|
const checkboxClasses = generateUtilityClasses("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "colorPrimary", "colorSecondary", "sizeSmall", "sizeMedium"]);
|
|
13146
|
-
const useUtilityClasses$
|
|
13146
|
+
const useUtilityClasses$s = (ownerState) => {
|
|
13147
13147
|
const {
|
|
13148
13148
|
classes,
|
|
13149
13149
|
indeterminate,
|
|
@@ -13252,7 +13252,7 @@ const Checkbox = /* @__PURE__ */ React.forwardRef(function Checkbox2(inProps, re
|
|
|
13252
13252
|
indeterminate,
|
|
13253
13253
|
size
|
|
13254
13254
|
};
|
|
13255
|
-
const classes = useUtilityClasses$
|
|
13255
|
+
const classes = useUtilityClasses$s(ownerState);
|
|
13256
13256
|
const externalInputProps = slotProps.input ?? inputProps;
|
|
13257
13257
|
const [RootSlot, rootSlotProps] = useSlot("root", {
|
|
13258
13258
|
ref,
|
|
@@ -14024,7 +14024,7 @@ function getModalUtilityClass(slot) {
|
|
|
14024
14024
|
return generateUtilityClass("MuiModal", slot);
|
|
14025
14025
|
}
|
|
14026
14026
|
generateUtilityClasses("MuiModal", ["root", "hidden", "backdrop"]);
|
|
14027
|
-
const useUtilityClasses$
|
|
14027
|
+
const useUtilityClasses$r = (ownerState) => {
|
|
14028
14028
|
const {
|
|
14029
14029
|
open,
|
|
14030
14030
|
exited,
|
|
@@ -14131,7 +14131,7 @@ const Modal = /* @__PURE__ */ React.forwardRef(function Modal2(inProps, ref) {
|
|
|
14131
14131
|
...propsWithDefaults,
|
|
14132
14132
|
exited
|
|
14133
14133
|
};
|
|
14134
|
-
const classes = useUtilityClasses$
|
|
14134
|
+
const classes = useUtilityClasses$r(ownerState);
|
|
14135
14135
|
const childProps = {};
|
|
14136
14136
|
if (children.props.tabIndex === void 0) {
|
|
14137
14137
|
childProps.tabIndex = "-1";
|
|
@@ -14383,7 +14383,7 @@ function getDividerUtilityClass(slot) {
|
|
|
14383
14383
|
return generateUtilityClass("MuiDivider", slot);
|
|
14384
14384
|
}
|
|
14385
14385
|
const dividerClasses = generateUtilityClasses("MuiDivider", ["root", "absolute", "fullWidth", "inset", "middle", "flexItem", "light", "vertical", "withChildren", "withChildrenVertical", "textAlignRight", "textAlignLeft", "wrapper", "wrapperVertical"]);
|
|
14386
|
-
const useUtilityClasses$
|
|
14386
|
+
const useUtilityClasses$q = (ownerState) => {
|
|
14387
14387
|
const {
|
|
14388
14388
|
absolute,
|
|
14389
14389
|
children,
|
|
@@ -14597,7 +14597,7 @@ const Divider = /* @__PURE__ */ React.forwardRef(function Divider2(inProps, ref)
|
|
|
14597
14597
|
textAlign,
|
|
14598
14598
|
variant
|
|
14599
14599
|
};
|
|
14600
|
-
const classes = useUtilityClasses$
|
|
14600
|
+
const classes = useUtilityClasses$q(ownerState);
|
|
14601
14601
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(DividerRoot, {
|
|
14602
14602
|
as: component,
|
|
14603
14603
|
className: clsx(classes.root, className),
|
|
@@ -14679,7 +14679,7 @@ process.env.NODE_ENV !== "production" ? Divider.propTypes = {
|
|
|
14679
14679
|
*/
|
|
14680
14680
|
variant: PropTypes.oneOfType([PropTypes.oneOf(["fullWidth", "inset", "middle"]), PropTypes.string])
|
|
14681
14681
|
} : void 0;
|
|
14682
|
-
const useUtilityClasses$
|
|
14682
|
+
const useUtilityClasses$p = (ownerState) => {
|
|
14683
14683
|
const {
|
|
14684
14684
|
classes,
|
|
14685
14685
|
disableUnderline,
|
|
@@ -14961,7 +14961,7 @@ const FilledInput = /* @__PURE__ */ React.forwardRef(function FilledInput2(inPro
|
|
|
14961
14961
|
multiline,
|
|
14962
14962
|
type
|
|
14963
14963
|
};
|
|
14964
|
-
const classes = useUtilityClasses$
|
|
14964
|
+
const classes = useUtilityClasses$p(props);
|
|
14965
14965
|
const filledInputComponentsProps = {
|
|
14966
14966
|
root: {
|
|
14967
14967
|
ownerState
|
|
@@ -15185,7 +15185,7 @@ function getFormControlUtilityClasses(slot) {
|
|
|
15185
15185
|
return generateUtilityClass("MuiFormControl", slot);
|
|
15186
15186
|
}
|
|
15187
15187
|
generateUtilityClasses("MuiFormControl", ["root", "marginNone", "marginNormal", "marginDense", "fullWidth", "disabled"]);
|
|
15188
|
-
const useUtilityClasses$
|
|
15188
|
+
const useUtilityClasses$o = (ownerState) => {
|
|
15189
15189
|
const {
|
|
15190
15190
|
classes,
|
|
15191
15191
|
margin: margin2,
|
|
@@ -15275,7 +15275,7 @@ const FormControl$2 = /* @__PURE__ */ React.forwardRef(function FormControl(inPr
|
|
|
15275
15275
|
size,
|
|
15276
15276
|
variant
|
|
15277
15277
|
};
|
|
15278
|
-
const classes = useUtilityClasses$
|
|
15278
|
+
const classes = useUtilityClasses$o(ownerState);
|
|
15279
15279
|
const [adornedStart, setAdornedStart] = React.useState(() => {
|
|
15280
15280
|
let initialAdornedStart = false;
|
|
15281
15281
|
if (children) {
|
|
@@ -15450,7 +15450,7 @@ function getFormControlLabelUtilityClasses(slot) {
|
|
|
15450
15450
|
return generateUtilityClass("MuiFormControlLabel", slot);
|
|
15451
15451
|
}
|
|
15452
15452
|
const formControlLabelClasses = generateUtilityClasses("MuiFormControlLabel", ["root", "labelPlacementStart", "labelPlacementTop", "labelPlacementBottom", "disabled", "label", "error", "required", "asterisk"]);
|
|
15453
|
-
const useUtilityClasses$
|
|
15453
|
+
const useUtilityClasses$n = (ownerState) => {
|
|
15454
15454
|
const {
|
|
15455
15455
|
classes,
|
|
15456
15456
|
disabled,
|
|
@@ -15585,7 +15585,7 @@ const FormControlLabel = /* @__PURE__ */ React.forwardRef(function FormControlLa
|
|
|
15585
15585
|
required,
|
|
15586
15586
|
error: fcs.error
|
|
15587
15587
|
};
|
|
15588
|
-
const classes = useUtilityClasses$
|
|
15588
|
+
const classes = useUtilityClasses$n(ownerState);
|
|
15589
15589
|
const externalForwardedProps = {
|
|
15590
15590
|
slots,
|
|
15591
15591
|
slotProps: {
|
|
@@ -15715,7 +15715,7 @@ function getFormHelperTextUtilityClasses(slot) {
|
|
|
15715
15715
|
}
|
|
15716
15716
|
const formHelperTextClasses = generateUtilityClasses("MuiFormHelperText", ["root", "error", "disabled", "sizeSmall", "sizeMedium", "contained", "focused", "filled", "required"]);
|
|
15717
15717
|
var _span$2;
|
|
15718
|
-
const useUtilityClasses$
|
|
15718
|
+
const useUtilityClasses$m = (ownerState) => {
|
|
15719
15719
|
const {
|
|
15720
15720
|
classes,
|
|
15721
15721
|
contained,
|
|
@@ -15810,7 +15810,7 @@ const FormHelperText = /* @__PURE__ */ React.forwardRef(function FormHelperText2
|
|
|
15810
15810
|
required: fcs.required
|
|
15811
15811
|
};
|
|
15812
15812
|
delete ownerState.ownerState;
|
|
15813
|
-
const classes = useUtilityClasses$
|
|
15813
|
+
const classes = useUtilityClasses$m(ownerState);
|
|
15814
15814
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(FormHelperTextRoot, {
|
|
15815
15815
|
as: component,
|
|
15816
15816
|
className: clsx(classes.root, className),
|
|
@@ -15889,7 +15889,7 @@ function getFormLabelUtilityClasses(slot) {
|
|
|
15889
15889
|
return generateUtilityClass("MuiFormLabel", slot);
|
|
15890
15890
|
}
|
|
15891
15891
|
const formLabelClasses = generateUtilityClasses("MuiFormLabel", ["root", "colorSecondary", "focused", "disabled", "error", "filled", "required", "asterisk"]);
|
|
15892
|
-
const useUtilityClasses$
|
|
15892
|
+
const useUtilityClasses$l = (ownerState) => {
|
|
15893
15893
|
const {
|
|
15894
15894
|
classes,
|
|
15895
15895
|
color: color2,
|
|
@@ -15986,7 +15986,7 @@ const FormLabel$1 = /* @__PURE__ */ React.forwardRef(function FormLabel(inProps,
|
|
|
15986
15986
|
focused: fcs.focused,
|
|
15987
15987
|
required: fcs.required
|
|
15988
15988
|
};
|
|
15989
|
-
const classes = useUtilityClasses$
|
|
15989
|
+
const classes = useUtilityClasses$l(ownerState);
|
|
15990
15990
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(FormLabelRoot, {
|
|
15991
15991
|
as: component,
|
|
15992
15992
|
ownerState,
|
|
@@ -16288,7 +16288,7 @@ process.env.NODE_ENV !== "production" ? Grow.propTypes = {
|
|
|
16288
16288
|
if (Grow) {
|
|
16289
16289
|
Grow.muiSupportAuto = true;
|
|
16290
16290
|
}
|
|
16291
|
-
const useUtilityClasses$
|
|
16291
|
+
const useUtilityClasses$k = (ownerState) => {
|
|
16292
16292
|
const {
|
|
16293
16293
|
classes,
|
|
16294
16294
|
disableUnderline
|
|
@@ -16421,7 +16421,7 @@ const Input = /* @__PURE__ */ React.forwardRef(function Input2(inProps, ref) {
|
|
|
16421
16421
|
type = "text",
|
|
16422
16422
|
...other
|
|
16423
16423
|
} = props;
|
|
16424
|
-
const classes = useUtilityClasses$
|
|
16424
|
+
const classes = useUtilityClasses$k(props);
|
|
16425
16425
|
const ownerState = {
|
|
16426
16426
|
disableUnderline
|
|
16427
16427
|
};
|
|
@@ -16638,7 +16638,7 @@ function getInputLabelUtilityClasses(slot) {
|
|
|
16638
16638
|
return generateUtilityClass("MuiInputLabel", slot);
|
|
16639
16639
|
}
|
|
16640
16640
|
generateUtilityClasses("MuiInputLabel", ["root", "focused", "disabled", "error", "required", "asterisk", "formControl", "sizeSmall", "shrink", "animated", "standard", "filled", "outlined"]);
|
|
16641
|
-
const useUtilityClasses$
|
|
16641
|
+
const useUtilityClasses$j = (ownerState) => {
|
|
16642
16642
|
const {
|
|
16643
16643
|
classes,
|
|
16644
16644
|
formControl,
|
|
@@ -16827,7 +16827,7 @@ const InputLabel = /* @__PURE__ */ React.forwardRef(function InputLabel2(inProps
|
|
|
16827
16827
|
required: fcs.required,
|
|
16828
16828
|
focused: fcs.focused
|
|
16829
16829
|
};
|
|
16830
|
-
const classes = useUtilityClasses$
|
|
16830
|
+
const classes = useUtilityClasses$j(ownerState);
|
|
16831
16831
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabelRoot, {
|
|
16832
16832
|
"data-shrink": shrink,
|
|
16833
16833
|
ref,
|
|
@@ -16912,7 +16912,7 @@ function getListUtilityClass(slot) {
|
|
|
16912
16912
|
return generateUtilityClass("MuiList", slot);
|
|
16913
16913
|
}
|
|
16914
16914
|
generateUtilityClasses("MuiList", ["root", "padding", "dense", "subheader"]);
|
|
16915
|
-
const useUtilityClasses$
|
|
16915
|
+
const useUtilityClasses$i = (ownerState) => {
|
|
16916
16916
|
const {
|
|
16917
16917
|
classes,
|
|
16918
16918
|
disablePadding,
|
|
@@ -16978,7 +16978,7 @@ const List$1 = /* @__PURE__ */ React.forwardRef(function List(inProps, ref) {
|
|
|
16978
16978
|
dense,
|
|
16979
16979
|
disablePadding
|
|
16980
16980
|
};
|
|
16981
|
-
const classes = useUtilityClasses$
|
|
16981
|
+
const classes = useUtilityClasses$i(ownerState);
|
|
16982
16982
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ListContext.Provider, {
|
|
16983
16983
|
value: context2,
|
|
16984
16984
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ListRoot, {
|
|
@@ -17311,7 +17311,7 @@ function getTransformOriginValue(transformOrigin) {
|
|
|
17311
17311
|
function resolveAnchorEl(anchorEl) {
|
|
17312
17312
|
return typeof anchorEl === "function" ? anchorEl() : anchorEl;
|
|
17313
17313
|
}
|
|
17314
|
-
const useUtilityClasses$
|
|
17314
|
+
const useUtilityClasses$h = (ownerState) => {
|
|
17315
17315
|
const {
|
|
17316
17316
|
classes
|
|
17317
17317
|
} = ownerState;
|
|
@@ -17389,7 +17389,7 @@ const Popover$2 = /* @__PURE__ */ React.forwardRef(function Popover(inProps, ref
|
|
|
17389
17389
|
transitionDuration: transitionDurationProp,
|
|
17390
17390
|
TransitionProps
|
|
17391
17391
|
};
|
|
17392
|
-
const classes = useUtilityClasses$
|
|
17392
|
+
const classes = useUtilityClasses$h(ownerState);
|
|
17393
17393
|
const getAnchorOffset = React.useCallback(() => {
|
|
17394
17394
|
if (anchorReference === "anchorPosition") {
|
|
17395
17395
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -17828,7 +17828,7 @@ const LTR_ORIGIN = {
|
|
|
17828
17828
|
vertical: "top",
|
|
17829
17829
|
horizontal: "left"
|
|
17830
17830
|
};
|
|
17831
|
-
const useUtilityClasses$
|
|
17831
|
+
const useUtilityClasses$g = (ownerState) => {
|
|
17832
17832
|
const {
|
|
17833
17833
|
classes
|
|
17834
17834
|
} = ownerState;
|
|
@@ -17899,7 +17899,7 @@ const Menu = /* @__PURE__ */ React.forwardRef(function Menu2(inProps, ref) {
|
|
|
17899
17899
|
TransitionProps,
|
|
17900
17900
|
variant
|
|
17901
17901
|
};
|
|
17902
|
-
const classes = useUtilityClasses$
|
|
17902
|
+
const classes = useUtilityClasses$g(ownerState);
|
|
17903
17903
|
const autoFocusItem = autoFocus && !disableAutoFocusItem && open;
|
|
17904
17904
|
const menuListActionsRef = React.useRef(null);
|
|
17905
17905
|
const handleEntering = (element, isAppearing) => {
|
|
@@ -18142,7 +18142,7 @@ const overridesResolver = (props, styles2) => {
|
|
|
18142
18142
|
} = props;
|
|
18143
18143
|
return [styles2.root, ownerState.dense && styles2.dense, ownerState.divider && styles2.divider, !ownerState.disableGutters && styles2.gutters];
|
|
18144
18144
|
};
|
|
18145
|
-
const useUtilityClasses$
|
|
18145
|
+
const useUtilityClasses$f = (ownerState) => {
|
|
18146
18146
|
const {
|
|
18147
18147
|
disabled,
|
|
18148
18148
|
dense,
|
|
@@ -18302,7 +18302,7 @@ const MenuItem = /* @__PURE__ */ React.forwardRef(function MenuItem2(inProps, re
|
|
|
18302
18302
|
divider,
|
|
18303
18303
|
disableGutters
|
|
18304
18304
|
};
|
|
18305
|
-
const classes = useUtilityClasses$
|
|
18305
|
+
const classes = useUtilityClasses$f(props);
|
|
18306
18306
|
const handleRef = useForkRef(menuItemRef, ref);
|
|
18307
18307
|
let tabIndex;
|
|
18308
18308
|
if (!props.disabled) {
|
|
@@ -18402,7 +18402,7 @@ function getNativeSelectUtilityClasses(slot) {
|
|
|
18402
18402
|
return generateUtilityClass("MuiNativeSelect", slot);
|
|
18403
18403
|
}
|
|
18404
18404
|
const nativeSelectClasses = generateUtilityClasses("MuiNativeSelect", ["root", "select", "multiple", "filled", "outlined", "standard", "disabled", "icon", "iconOpen", "iconFilled", "iconOutlined", "iconStandard", "nativeInput", "error"]);
|
|
18405
|
-
const useUtilityClasses$
|
|
18405
|
+
const useUtilityClasses$e = (ownerState) => {
|
|
18406
18406
|
const {
|
|
18407
18407
|
classes,
|
|
18408
18408
|
variant,
|
|
@@ -18557,7 +18557,7 @@ const NativeSelectInput = /* @__PURE__ */ React.forwardRef(function NativeSelect
|
|
|
18557
18557
|
variant,
|
|
18558
18558
|
error
|
|
18559
18559
|
};
|
|
18560
|
-
const classes = useUtilityClasses$
|
|
18560
|
+
const classes = useUtilityClasses$e(ownerState);
|
|
18561
18561
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(React.Fragment, {
|
|
18562
18562
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(NativeSelectSelect, {
|
|
18563
18563
|
ownerState,
|
|
@@ -18771,7 +18771,7 @@ process.env.NODE_ENV !== "production" ? NotchedOutline.propTypes = {
|
|
|
18771
18771
|
*/
|
|
18772
18772
|
style: PropTypes.object
|
|
18773
18773
|
} : void 0;
|
|
18774
|
-
const useUtilityClasses$
|
|
18774
|
+
const useUtilityClasses$d = (ownerState) => {
|
|
18775
18775
|
const {
|
|
18776
18776
|
classes
|
|
18777
18777
|
} = ownerState;
|
|
@@ -18949,7 +18949,7 @@ const OutlinedInput = /* @__PURE__ */ React.forwardRef(function OutlinedInput2(i
|
|
|
18949
18949
|
type = "text",
|
|
18950
18950
|
...other
|
|
18951
18951
|
} = props;
|
|
18952
|
-
const classes = useUtilityClasses$
|
|
18952
|
+
const classes = useUtilityClasses$d(props);
|
|
18953
18953
|
const muiFormControl = useFormControl();
|
|
18954
18954
|
const fcs = formControlState({
|
|
18955
18955
|
props,
|
|
@@ -19270,7 +19270,7 @@ function getRadioUtilityClass(slot) {
|
|
|
19270
19270
|
return generateUtilityClass("MuiRadio", slot);
|
|
19271
19271
|
}
|
|
19272
19272
|
const radioClasses = generateUtilityClasses("MuiRadio", ["root", "checked", "disabled", "colorPrimary", "colorSecondary", "sizeSmall"]);
|
|
19273
|
-
const useUtilityClasses$
|
|
19273
|
+
const useUtilityClasses$c = (ownerState) => {
|
|
19274
19274
|
const {
|
|
19275
19275
|
classes,
|
|
19276
19276
|
color: color2,
|
|
@@ -19394,7 +19394,7 @@ const Radio = /* @__PURE__ */ React.forwardRef(function Radio2(inProps, ref) {
|
|
|
19394
19394
|
color: color2,
|
|
19395
19395
|
size
|
|
19396
19396
|
};
|
|
19397
|
-
const classes = useUtilityClasses$
|
|
19397
|
+
const classes = useUtilityClasses$c(ownerState);
|
|
19398
19398
|
const radioGroup = useRadioGroup();
|
|
19399
19399
|
let checked = checkedProp;
|
|
19400
19400
|
const onChange = createChainedFunction(onChangeProp, radioGroup && radioGroup.onChange);
|
|
@@ -19627,7 +19627,7 @@ function areEqualValues(a, b) {
|
|
|
19627
19627
|
function isEmpty(display) {
|
|
19628
19628
|
return display == null || typeof display === "string" && !display.trim();
|
|
19629
19629
|
}
|
|
19630
|
-
const useUtilityClasses$
|
|
19630
|
+
const useUtilityClasses$b = (ownerState) => {
|
|
19631
19631
|
const {
|
|
19632
19632
|
classes,
|
|
19633
19633
|
variant,
|
|
@@ -19947,7 +19947,7 @@ const SelectInput = /* @__PURE__ */ React.forwardRef(function SelectInput2(props
|
|
|
19947
19947
|
open,
|
|
19948
19948
|
error
|
|
19949
19949
|
};
|
|
19950
|
-
const classes = useUtilityClasses$
|
|
19950
|
+
const classes = useUtilityClasses$b(ownerState);
|
|
19951
19951
|
const paperProps = {
|
|
19952
19952
|
...MenuProps.PaperProps,
|
|
19953
19953
|
...(_a = MenuProps.slotProps) == null ? void 0 : _a.paper
|
|
@@ -20186,7 +20186,7 @@ process.env.NODE_ENV !== "production" ? SelectInput.propTypes = {
|
|
|
20186
20186
|
*/
|
|
20187
20187
|
variant: PropTypes.oneOf(["standard", "outlined", "filled"])
|
|
20188
20188
|
} : void 0;
|
|
20189
|
-
const useUtilityClasses$
|
|
20189
|
+
const useUtilityClasses$a = (ownerState) => {
|
|
20190
20190
|
const {
|
|
20191
20191
|
classes
|
|
20192
20192
|
} = ownerState;
|
|
@@ -20219,7 +20219,7 @@ const Select = /* @__PURE__ */ React.forwardRef(function Select2(inProps, ref) {
|
|
|
20219
20219
|
className,
|
|
20220
20220
|
defaultOpen = false,
|
|
20221
20221
|
displayEmpty = false,
|
|
20222
|
-
IconComponent = ArrowDropDownIcon,
|
|
20222
|
+
IconComponent = ArrowDropDownIcon$1,
|
|
20223
20223
|
id,
|
|
20224
20224
|
input,
|
|
20225
20225
|
inputProps,
|
|
@@ -20249,7 +20249,7 @@ const Select = /* @__PURE__ */ React.forwardRef(function Select2(inProps, ref) {
|
|
|
20249
20249
|
variant,
|
|
20250
20250
|
classes: classesProp
|
|
20251
20251
|
};
|
|
20252
|
-
const classes = useUtilityClasses$
|
|
20252
|
+
const classes = useUtilityClasses$a(ownerState);
|
|
20253
20253
|
const {
|
|
20254
20254
|
root,
|
|
20255
20255
|
...restOfClasses
|
|
@@ -20466,7 +20466,7 @@ function getTabUtilityClass(slot) {
|
|
|
20466
20466
|
return generateUtilityClass("MuiTab", slot);
|
|
20467
20467
|
}
|
|
20468
20468
|
const tabClasses = generateUtilityClasses("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrimary", "textColorSecondary", "selected", "disabled", "fullWidth", "wrapped", "iconWrapper", "icon"]);
|
|
20469
|
-
const useUtilityClasses$
|
|
20469
|
+
const useUtilityClasses$9 = (ownerState) => {
|
|
20470
20470
|
const {
|
|
20471
20471
|
classes,
|
|
20472
20472
|
textColor,
|
|
@@ -20674,7 +20674,7 @@ const Tab = /* @__PURE__ */ React.forwardRef(function Tab2(inProps, ref) {
|
|
|
20674
20674
|
textColor,
|
|
20675
20675
|
wrapped
|
|
20676
20676
|
};
|
|
20677
|
-
const classes = useUtilityClasses$
|
|
20677
|
+
const classes = useUtilityClasses$9(ownerState);
|
|
20678
20678
|
const icon = iconProp && label && /* @__PURE__ */ React.isValidElement(iconProp) ? /* @__PURE__ */ React.cloneElement(iconProp, {
|
|
20679
20679
|
className: clsx(classes.icon, iconProp.props.className)
|
|
20680
20680
|
}) : iconProp;
|
|
@@ -20789,174 +20789,897 @@ process.env.NODE_ENV !== "production" ? Tab.propTypes = {
|
|
|
20789
20789
|
*/
|
|
20790
20790
|
wrapped: PropTypes.bool
|
|
20791
20791
|
} : void 0;
|
|
20792
|
-
const
|
|
20793
|
-
|
|
20794
|
-
|
|
20795
|
-
const KeyboardArrowRight = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
|
|
20796
|
-
d: "M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"
|
|
20797
|
-
}), "KeyboardArrowRight");
|
|
20798
|
-
function easeInOutSin(time) {
|
|
20799
|
-
return (1 + Math.sin(Math.PI * time - Math.PI / 2)) / 2;
|
|
20800
|
-
}
|
|
20801
|
-
function animate(property, element, to, options = {}, cb = () => {
|
|
20802
|
-
}) {
|
|
20803
|
-
const {
|
|
20804
|
-
ease = easeInOutSin,
|
|
20805
|
-
duration: duration2 = 300
|
|
20806
|
-
// standard
|
|
20807
|
-
} = options;
|
|
20808
|
-
let start2 = null;
|
|
20809
|
-
const from = element[property];
|
|
20810
|
-
let cancelled = false;
|
|
20811
|
-
const cancel = () => {
|
|
20812
|
-
cancelled = true;
|
|
20813
|
-
};
|
|
20814
|
-
const step = (timestamp) => {
|
|
20815
|
-
if (cancelled) {
|
|
20816
|
-
cb(new Error("Animation cancelled"));
|
|
20817
|
-
return;
|
|
20818
|
-
}
|
|
20819
|
-
if (start2 === null) {
|
|
20820
|
-
start2 = timestamp;
|
|
20821
|
-
}
|
|
20822
|
-
const time = Math.min(1, (timestamp - start2) / duration2);
|
|
20823
|
-
element[property] = ease(time) * (to - from) + from;
|
|
20824
|
-
if (time >= 1) {
|
|
20825
|
-
requestAnimationFrame(() => {
|
|
20826
|
-
cb(null);
|
|
20827
|
-
});
|
|
20828
|
-
return;
|
|
20829
|
-
}
|
|
20830
|
-
requestAnimationFrame(step);
|
|
20831
|
-
};
|
|
20832
|
-
if (from === to) {
|
|
20833
|
-
cb(new Error("Element already at target position"));
|
|
20834
|
-
return cancel;
|
|
20835
|
-
}
|
|
20836
|
-
requestAnimationFrame(step);
|
|
20837
|
-
return cancel;
|
|
20838
|
-
}
|
|
20839
|
-
const styles = {
|
|
20840
|
-
width: 99,
|
|
20841
|
-
height: 99,
|
|
20842
|
-
position: "absolute",
|
|
20843
|
-
top: -9999,
|
|
20844
|
-
overflow: "scroll"
|
|
20845
|
-
};
|
|
20846
|
-
function ScrollbarSize(props) {
|
|
20847
|
-
const {
|
|
20848
|
-
onChange,
|
|
20849
|
-
...other
|
|
20850
|
-
} = props;
|
|
20851
|
-
const scrollbarHeight = React.useRef();
|
|
20852
|
-
const nodeRef = React.useRef(null);
|
|
20853
|
-
const setMeasurements = () => {
|
|
20854
|
-
scrollbarHeight.current = nodeRef.current.offsetHeight - nodeRef.current.clientHeight;
|
|
20855
|
-
};
|
|
20856
|
-
useEnhancedEffect(() => {
|
|
20857
|
-
const handleResize = debounce$1(() => {
|
|
20858
|
-
const prevHeight = scrollbarHeight.current;
|
|
20859
|
-
setMeasurements();
|
|
20860
|
-
if (prevHeight !== scrollbarHeight.current) {
|
|
20861
|
-
onChange(scrollbarHeight.current);
|
|
20862
|
-
}
|
|
20863
|
-
});
|
|
20864
|
-
const containerWindow = ownerWindow$1(nodeRef.current);
|
|
20865
|
-
containerWindow.addEventListener("resize", handleResize);
|
|
20866
|
-
return () => {
|
|
20867
|
-
handleResize.clear();
|
|
20868
|
-
containerWindow.removeEventListener("resize", handleResize);
|
|
20869
|
-
};
|
|
20870
|
-
}, [onChange]);
|
|
20871
|
-
React.useEffect(() => {
|
|
20872
|
-
setMeasurements();
|
|
20873
|
-
onChange(scrollbarHeight.current);
|
|
20874
|
-
}, [onChange]);
|
|
20875
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
20876
|
-
style: styles,
|
|
20877
|
-
...other,
|
|
20878
|
-
ref: nodeRef
|
|
20879
|
-
});
|
|
20792
|
+
const TableContext = /* @__PURE__ */ React.createContext();
|
|
20793
|
+
if (process.env.NODE_ENV !== "production") {
|
|
20794
|
+
TableContext.displayName = "TableContext";
|
|
20880
20795
|
}
|
|
20881
|
-
|
|
20882
|
-
|
|
20883
|
-
} : void 0;
|
|
20884
|
-
function getTabScrollButtonUtilityClass(slot) {
|
|
20885
|
-
return generateUtilityClass("MuiTabScrollButton", slot);
|
|
20796
|
+
function getTableUtilityClass(slot) {
|
|
20797
|
+
return generateUtilityClass("MuiTable", slot);
|
|
20886
20798
|
}
|
|
20887
|
-
|
|
20888
|
-
const useUtilityClasses$
|
|
20799
|
+
generateUtilityClasses("MuiTable", ["root", "stickyHeader"]);
|
|
20800
|
+
const useUtilityClasses$8 = (ownerState) => {
|
|
20889
20801
|
const {
|
|
20890
20802
|
classes,
|
|
20891
|
-
|
|
20892
|
-
disabled
|
|
20803
|
+
stickyHeader
|
|
20893
20804
|
} = ownerState;
|
|
20894
20805
|
const slots = {
|
|
20895
|
-
root: ["root",
|
|
20806
|
+
root: ["root", stickyHeader && "stickyHeader"]
|
|
20896
20807
|
};
|
|
20897
|
-
return composeClasses(slots,
|
|
20808
|
+
return composeClasses(slots, getTableUtilityClass, classes);
|
|
20898
20809
|
};
|
|
20899
|
-
const
|
|
20900
|
-
name: "
|
|
20810
|
+
const TableRoot = styled("table", {
|
|
20811
|
+
name: "MuiTable",
|
|
20901
20812
|
slot: "Root",
|
|
20902
20813
|
overridesResolver: (props, styles2) => {
|
|
20903
20814
|
const {
|
|
20904
20815
|
ownerState
|
|
20905
20816
|
} = props;
|
|
20906
|
-
return [styles2.root, ownerState.
|
|
20817
|
+
return [styles2.root, ownerState.stickyHeader && styles2.stickyHeader];
|
|
20907
20818
|
}
|
|
20908
|
-
})({
|
|
20909
|
-
|
|
20910
|
-
|
|
20911
|
-
|
|
20912
|
-
|
|
20913
|
-
|
|
20819
|
+
})(memoTheme(({
|
|
20820
|
+
theme
|
|
20821
|
+
}) => ({
|
|
20822
|
+
display: "table",
|
|
20823
|
+
width: "100%",
|
|
20824
|
+
borderCollapse: "collapse",
|
|
20825
|
+
borderSpacing: 0,
|
|
20826
|
+
"& caption": {
|
|
20827
|
+
...theme.typography.body2,
|
|
20828
|
+
padding: theme.spacing(2),
|
|
20829
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
20830
|
+
textAlign: "left",
|
|
20831
|
+
captionSide: "bottom"
|
|
20914
20832
|
},
|
|
20915
20833
|
variants: [{
|
|
20916
|
-
props: {
|
|
20917
|
-
|
|
20918
|
-
},
|
|
20834
|
+
props: ({
|
|
20835
|
+
ownerState
|
|
20836
|
+
}) => ownerState.stickyHeader,
|
|
20919
20837
|
style: {
|
|
20920
|
-
|
|
20921
|
-
height: 40,
|
|
20922
|
-
"& svg": {
|
|
20923
|
-
transform: "var(--TabScrollButton-svgRotate)"
|
|
20924
|
-
}
|
|
20838
|
+
borderCollapse: "separate"
|
|
20925
20839
|
}
|
|
20926
20840
|
}]
|
|
20927
|
-
});
|
|
20928
|
-
const
|
|
20841
|
+
})));
|
|
20842
|
+
const defaultComponent$3 = "table";
|
|
20843
|
+
const Table = /* @__PURE__ */ React.forwardRef(function Table2(inProps, ref) {
|
|
20929
20844
|
const props = useDefaultProps({
|
|
20930
20845
|
props: inProps,
|
|
20931
|
-
name: "
|
|
20846
|
+
name: "MuiTable"
|
|
20932
20847
|
});
|
|
20933
20848
|
const {
|
|
20934
20849
|
className,
|
|
20935
|
-
|
|
20936
|
-
|
|
20937
|
-
|
|
20938
|
-
|
|
20939
|
-
disabled,
|
|
20850
|
+
component = defaultComponent$3,
|
|
20851
|
+
padding: padding2 = "normal",
|
|
20852
|
+
size = "medium",
|
|
20853
|
+
stickyHeader = false,
|
|
20940
20854
|
...other
|
|
20941
20855
|
} = props;
|
|
20942
|
-
const isRtl = useRtl();
|
|
20943
20856
|
const ownerState = {
|
|
20944
|
-
|
|
20945
|
-
|
|
20857
|
+
...props,
|
|
20858
|
+
component,
|
|
20859
|
+
padding: padding2,
|
|
20860
|
+
size,
|
|
20861
|
+
stickyHeader
|
|
20946
20862
|
};
|
|
20947
|
-
const classes = useUtilityClasses$
|
|
20948
|
-
const
|
|
20949
|
-
|
|
20950
|
-
|
|
20951
|
-
|
|
20952
|
-
|
|
20953
|
-
|
|
20954
|
-
|
|
20955
|
-
|
|
20956
|
-
|
|
20863
|
+
const classes = useUtilityClasses$8(ownerState);
|
|
20864
|
+
const table = React.useMemo(() => ({
|
|
20865
|
+
padding: padding2,
|
|
20866
|
+
size,
|
|
20867
|
+
stickyHeader
|
|
20868
|
+
}), [padding2, size, stickyHeader]);
|
|
20869
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(TableContext.Provider, {
|
|
20870
|
+
value: table,
|
|
20871
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(TableRoot, {
|
|
20872
|
+
as: component,
|
|
20873
|
+
role: component === defaultComponent$3 ? null : "table",
|
|
20874
|
+
ref,
|
|
20875
|
+
className: clsx(classes.root, className),
|
|
20876
|
+
ownerState,
|
|
20877
|
+
...other
|
|
20878
|
+
})
|
|
20957
20879
|
});
|
|
20958
|
-
|
|
20959
|
-
|
|
20880
|
+
});
|
|
20881
|
+
process.env.NODE_ENV !== "production" ? Table.propTypes = {
|
|
20882
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
20883
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
20884
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
20885
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
20886
|
+
/**
|
|
20887
|
+
* The content of the table, normally `TableHead` and `TableBody`.
|
|
20888
|
+
*/
|
|
20889
|
+
children: PropTypes.node,
|
|
20890
|
+
/**
|
|
20891
|
+
* Override or extend the styles applied to the component.
|
|
20892
|
+
*/
|
|
20893
|
+
classes: PropTypes.object,
|
|
20894
|
+
/**
|
|
20895
|
+
* @ignore
|
|
20896
|
+
*/
|
|
20897
|
+
className: PropTypes.string,
|
|
20898
|
+
/**
|
|
20899
|
+
* The component used for the root node.
|
|
20900
|
+
* Either a string to use a HTML element or a component.
|
|
20901
|
+
*/
|
|
20902
|
+
component: PropTypes.elementType,
|
|
20903
|
+
/**
|
|
20904
|
+
* Allows TableCells to inherit padding of the Table.
|
|
20905
|
+
* @default 'normal'
|
|
20906
|
+
*/
|
|
20907
|
+
padding: PropTypes.oneOf(["checkbox", "none", "normal"]),
|
|
20908
|
+
/**
|
|
20909
|
+
* Allows TableCells to inherit size of the Table.
|
|
20910
|
+
* @default 'medium'
|
|
20911
|
+
*/
|
|
20912
|
+
size: PropTypes.oneOfType([PropTypes.oneOf(["medium", "small"]), PropTypes.string]),
|
|
20913
|
+
/**
|
|
20914
|
+
* Set the header sticky.
|
|
20915
|
+
* @default false
|
|
20916
|
+
*/
|
|
20917
|
+
stickyHeader: PropTypes.bool,
|
|
20918
|
+
/**
|
|
20919
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
20920
|
+
*/
|
|
20921
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
20922
|
+
} : void 0;
|
|
20923
|
+
const Tablelvl2Context = /* @__PURE__ */ React.createContext();
|
|
20924
|
+
if (process.env.NODE_ENV !== "production") {
|
|
20925
|
+
Tablelvl2Context.displayName = "Tablelvl2Context";
|
|
20926
|
+
}
|
|
20927
|
+
function getTableBodyUtilityClass(slot) {
|
|
20928
|
+
return generateUtilityClass("MuiTableBody", slot);
|
|
20929
|
+
}
|
|
20930
|
+
generateUtilityClasses("MuiTableBody", ["root"]);
|
|
20931
|
+
const useUtilityClasses$7 = (ownerState) => {
|
|
20932
|
+
const {
|
|
20933
|
+
classes
|
|
20934
|
+
} = ownerState;
|
|
20935
|
+
const slots = {
|
|
20936
|
+
root: ["root"]
|
|
20937
|
+
};
|
|
20938
|
+
return composeClasses(slots, getTableBodyUtilityClass, classes);
|
|
20939
|
+
};
|
|
20940
|
+
const TableBodyRoot = styled("tbody", {
|
|
20941
|
+
name: "MuiTableBody",
|
|
20942
|
+
slot: "Root"
|
|
20943
|
+
})({
|
|
20944
|
+
display: "table-row-group"
|
|
20945
|
+
});
|
|
20946
|
+
const tablelvl2$1 = {
|
|
20947
|
+
variant: "body"
|
|
20948
|
+
};
|
|
20949
|
+
const defaultComponent$2 = "tbody";
|
|
20950
|
+
const TableBody = /* @__PURE__ */ React.forwardRef(function TableBody2(inProps, ref) {
|
|
20951
|
+
const props = useDefaultProps({
|
|
20952
|
+
props: inProps,
|
|
20953
|
+
name: "MuiTableBody"
|
|
20954
|
+
});
|
|
20955
|
+
const {
|
|
20956
|
+
className,
|
|
20957
|
+
component = defaultComponent$2,
|
|
20958
|
+
...other
|
|
20959
|
+
} = props;
|
|
20960
|
+
const ownerState = {
|
|
20961
|
+
...props,
|
|
20962
|
+
component
|
|
20963
|
+
};
|
|
20964
|
+
const classes = useUtilityClasses$7(ownerState);
|
|
20965
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tablelvl2Context.Provider, {
|
|
20966
|
+
value: tablelvl2$1,
|
|
20967
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(TableBodyRoot, {
|
|
20968
|
+
className: clsx(classes.root, className),
|
|
20969
|
+
as: component,
|
|
20970
|
+
ref,
|
|
20971
|
+
role: component === defaultComponent$2 ? null : "rowgroup",
|
|
20972
|
+
ownerState,
|
|
20973
|
+
...other
|
|
20974
|
+
})
|
|
20975
|
+
});
|
|
20976
|
+
});
|
|
20977
|
+
process.env.NODE_ENV !== "production" ? TableBody.propTypes = {
|
|
20978
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
20979
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
20980
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
20981
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
20982
|
+
/**
|
|
20983
|
+
* The content of the component, normally `TableRow`.
|
|
20984
|
+
*/
|
|
20985
|
+
children: PropTypes.node,
|
|
20986
|
+
/**
|
|
20987
|
+
* Override or extend the styles applied to the component.
|
|
20988
|
+
*/
|
|
20989
|
+
classes: PropTypes.object,
|
|
20990
|
+
/**
|
|
20991
|
+
* @ignore
|
|
20992
|
+
*/
|
|
20993
|
+
className: PropTypes.string,
|
|
20994
|
+
/**
|
|
20995
|
+
* The component used for the root node.
|
|
20996
|
+
* Either a string to use a HTML element or a component.
|
|
20997
|
+
*/
|
|
20998
|
+
component: PropTypes.elementType,
|
|
20999
|
+
/**
|
|
21000
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
21001
|
+
*/
|
|
21002
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
21003
|
+
} : void 0;
|
|
21004
|
+
function getTableCellUtilityClass(slot) {
|
|
21005
|
+
return generateUtilityClass("MuiTableCell", slot);
|
|
21006
|
+
}
|
|
21007
|
+
const tableCellClasses = generateUtilityClasses("MuiTableCell", ["root", "head", "body", "footer", "sizeSmall", "sizeMedium", "paddingCheckbox", "paddingNone", "alignLeft", "alignCenter", "alignRight", "alignJustify", "stickyHeader"]);
|
|
21008
|
+
const useUtilityClasses$6 = (ownerState) => {
|
|
21009
|
+
const {
|
|
21010
|
+
classes,
|
|
21011
|
+
variant,
|
|
21012
|
+
align,
|
|
21013
|
+
padding: padding2,
|
|
21014
|
+
size,
|
|
21015
|
+
stickyHeader
|
|
21016
|
+
} = ownerState;
|
|
21017
|
+
const slots = {
|
|
21018
|
+
root: ["root", variant, stickyHeader && "stickyHeader", align !== "inherit" && `align${capitalize(align)}`, padding2 !== "normal" && `padding${capitalize(padding2)}`, `size${capitalize(size)}`]
|
|
21019
|
+
};
|
|
21020
|
+
return composeClasses(slots, getTableCellUtilityClass, classes);
|
|
21021
|
+
};
|
|
21022
|
+
const TableCellRoot = styled("td", {
|
|
21023
|
+
name: "MuiTableCell",
|
|
21024
|
+
slot: "Root",
|
|
21025
|
+
overridesResolver: (props, styles2) => {
|
|
21026
|
+
const {
|
|
21027
|
+
ownerState
|
|
21028
|
+
} = props;
|
|
21029
|
+
return [styles2.root, styles2[ownerState.variant], styles2[`size${capitalize(ownerState.size)}`], ownerState.padding !== "normal" && styles2[`padding${capitalize(ownerState.padding)}`], ownerState.align !== "inherit" && styles2[`align${capitalize(ownerState.align)}`], ownerState.stickyHeader && styles2.stickyHeader];
|
|
21030
|
+
}
|
|
21031
|
+
})(memoTheme(({
|
|
21032
|
+
theme
|
|
21033
|
+
}) => ({
|
|
21034
|
+
...theme.typography.body2,
|
|
21035
|
+
display: "table-cell",
|
|
21036
|
+
verticalAlign: "inherit",
|
|
21037
|
+
// Workaround for a rendering bug with spanned columns in Chrome 62.0.
|
|
21038
|
+
// Removes the alpha (sets it to 1), and lightens or darkens the theme color.
|
|
21039
|
+
borderBottom: theme.vars ? `1px solid ${theme.vars.palette.TableCell.border}` : `1px solid
|
|
21040
|
+
${theme.palette.mode === "light" ? lighten(alpha(theme.palette.divider, 1), 0.88) : darken(alpha(theme.palette.divider, 1), 0.68)}`,
|
|
21041
|
+
textAlign: "left",
|
|
21042
|
+
padding: 16,
|
|
21043
|
+
variants: [{
|
|
21044
|
+
props: {
|
|
21045
|
+
variant: "head"
|
|
21046
|
+
},
|
|
21047
|
+
style: {
|
|
21048
|
+
color: (theme.vars || theme).palette.text.primary,
|
|
21049
|
+
lineHeight: theme.typography.pxToRem(24),
|
|
21050
|
+
fontWeight: theme.typography.fontWeightMedium
|
|
21051
|
+
}
|
|
21052
|
+
}, {
|
|
21053
|
+
props: {
|
|
21054
|
+
variant: "body"
|
|
21055
|
+
},
|
|
21056
|
+
style: {
|
|
21057
|
+
color: (theme.vars || theme).palette.text.primary
|
|
21058
|
+
}
|
|
21059
|
+
}, {
|
|
21060
|
+
props: {
|
|
21061
|
+
variant: "footer"
|
|
21062
|
+
},
|
|
21063
|
+
style: {
|
|
21064
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
21065
|
+
lineHeight: theme.typography.pxToRem(21),
|
|
21066
|
+
fontSize: theme.typography.pxToRem(12)
|
|
21067
|
+
}
|
|
21068
|
+
}, {
|
|
21069
|
+
props: {
|
|
21070
|
+
size: "small"
|
|
21071
|
+
},
|
|
21072
|
+
style: {
|
|
21073
|
+
padding: "6px 16px",
|
|
21074
|
+
[`&.${tableCellClasses.paddingCheckbox}`]: {
|
|
21075
|
+
width: 24,
|
|
21076
|
+
// prevent the checkbox column from growing
|
|
21077
|
+
padding: "0 12px 0 16px",
|
|
21078
|
+
"& > *": {
|
|
21079
|
+
padding: 0
|
|
21080
|
+
}
|
|
21081
|
+
}
|
|
21082
|
+
}
|
|
21083
|
+
}, {
|
|
21084
|
+
props: {
|
|
21085
|
+
padding: "checkbox"
|
|
21086
|
+
},
|
|
21087
|
+
style: {
|
|
21088
|
+
width: 48,
|
|
21089
|
+
// prevent the checkbox column from growing
|
|
21090
|
+
padding: "0 0 0 4px"
|
|
21091
|
+
}
|
|
21092
|
+
}, {
|
|
21093
|
+
props: {
|
|
21094
|
+
padding: "none"
|
|
21095
|
+
},
|
|
21096
|
+
style: {
|
|
21097
|
+
padding: 0
|
|
21098
|
+
}
|
|
21099
|
+
}, {
|
|
21100
|
+
props: {
|
|
21101
|
+
align: "left"
|
|
21102
|
+
},
|
|
21103
|
+
style: {
|
|
21104
|
+
textAlign: "left"
|
|
21105
|
+
}
|
|
21106
|
+
}, {
|
|
21107
|
+
props: {
|
|
21108
|
+
align: "center"
|
|
21109
|
+
},
|
|
21110
|
+
style: {
|
|
21111
|
+
textAlign: "center"
|
|
21112
|
+
}
|
|
21113
|
+
}, {
|
|
21114
|
+
props: {
|
|
21115
|
+
align: "right"
|
|
21116
|
+
},
|
|
21117
|
+
style: {
|
|
21118
|
+
textAlign: "right",
|
|
21119
|
+
flexDirection: "row-reverse"
|
|
21120
|
+
}
|
|
21121
|
+
}, {
|
|
21122
|
+
props: {
|
|
21123
|
+
align: "justify"
|
|
21124
|
+
},
|
|
21125
|
+
style: {
|
|
21126
|
+
textAlign: "justify"
|
|
21127
|
+
}
|
|
21128
|
+
}, {
|
|
21129
|
+
props: ({
|
|
21130
|
+
ownerState
|
|
21131
|
+
}) => ownerState.stickyHeader,
|
|
21132
|
+
style: {
|
|
21133
|
+
position: "sticky",
|
|
21134
|
+
top: 0,
|
|
21135
|
+
zIndex: 2,
|
|
21136
|
+
backgroundColor: (theme.vars || theme).palette.background.default
|
|
21137
|
+
}
|
|
21138
|
+
}]
|
|
21139
|
+
})));
|
|
21140
|
+
const TableCell = /* @__PURE__ */ React.forwardRef(function TableCell2(inProps, ref) {
|
|
21141
|
+
const props = useDefaultProps({
|
|
21142
|
+
props: inProps,
|
|
21143
|
+
name: "MuiTableCell"
|
|
21144
|
+
});
|
|
21145
|
+
const {
|
|
21146
|
+
align = "inherit",
|
|
21147
|
+
className,
|
|
21148
|
+
component: componentProp,
|
|
21149
|
+
padding: paddingProp,
|
|
21150
|
+
scope: scopeProp,
|
|
21151
|
+
size: sizeProp,
|
|
21152
|
+
sortDirection,
|
|
21153
|
+
variant: variantProp,
|
|
21154
|
+
...other
|
|
21155
|
+
} = props;
|
|
21156
|
+
const table = React.useContext(TableContext);
|
|
21157
|
+
const tablelvl22 = React.useContext(Tablelvl2Context);
|
|
21158
|
+
const isHeadCell = tablelvl22 && tablelvl22.variant === "head";
|
|
21159
|
+
let component;
|
|
21160
|
+
if (componentProp) {
|
|
21161
|
+
component = componentProp;
|
|
21162
|
+
} else {
|
|
21163
|
+
component = isHeadCell ? "th" : "td";
|
|
21164
|
+
}
|
|
21165
|
+
let scope = scopeProp;
|
|
21166
|
+
if (component === "td") {
|
|
21167
|
+
scope = void 0;
|
|
21168
|
+
} else if (!scope && isHeadCell) {
|
|
21169
|
+
scope = "col";
|
|
21170
|
+
}
|
|
21171
|
+
const variant = variantProp || tablelvl22 && tablelvl22.variant;
|
|
21172
|
+
const ownerState = {
|
|
21173
|
+
...props,
|
|
21174
|
+
align,
|
|
21175
|
+
component,
|
|
21176
|
+
padding: paddingProp || (table && table.padding ? table.padding : "normal"),
|
|
21177
|
+
size: sizeProp || (table && table.size ? table.size : "medium"),
|
|
21178
|
+
sortDirection,
|
|
21179
|
+
stickyHeader: variant === "head" && table && table.stickyHeader,
|
|
21180
|
+
variant
|
|
21181
|
+
};
|
|
21182
|
+
const classes = useUtilityClasses$6(ownerState);
|
|
21183
|
+
let ariaSort = null;
|
|
21184
|
+
if (sortDirection) {
|
|
21185
|
+
ariaSort = sortDirection === "asc" ? "ascending" : "descending";
|
|
21186
|
+
}
|
|
21187
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(TableCellRoot, {
|
|
21188
|
+
as: component,
|
|
21189
|
+
ref,
|
|
21190
|
+
className: clsx(classes.root, className),
|
|
21191
|
+
"aria-sort": ariaSort,
|
|
21192
|
+
scope,
|
|
21193
|
+
ownerState,
|
|
21194
|
+
...other
|
|
21195
|
+
});
|
|
21196
|
+
});
|
|
21197
|
+
process.env.NODE_ENV !== "production" ? TableCell.propTypes = {
|
|
21198
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
21199
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
21200
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
21201
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
21202
|
+
/**
|
|
21203
|
+
* Set the text-align on the table cell content.
|
|
21204
|
+
*
|
|
21205
|
+
* Monetary or generally number fields **should be right aligned** as that allows
|
|
21206
|
+
* you to add them up quickly in your head without having to worry about decimals.
|
|
21207
|
+
* @default 'inherit'
|
|
21208
|
+
*/
|
|
21209
|
+
align: PropTypes.oneOf(["center", "inherit", "justify", "left", "right"]),
|
|
21210
|
+
/**
|
|
21211
|
+
* The content of the component.
|
|
21212
|
+
*/
|
|
21213
|
+
children: PropTypes.node,
|
|
21214
|
+
/**
|
|
21215
|
+
* Override or extend the styles applied to the component.
|
|
21216
|
+
*/
|
|
21217
|
+
classes: PropTypes.object,
|
|
21218
|
+
/**
|
|
21219
|
+
* @ignore
|
|
21220
|
+
*/
|
|
21221
|
+
className: PropTypes.string,
|
|
21222
|
+
/**
|
|
21223
|
+
* The component used for the root node.
|
|
21224
|
+
* Either a string to use a HTML element or a component.
|
|
21225
|
+
*/
|
|
21226
|
+
component: PropTypes.elementType,
|
|
21227
|
+
/**
|
|
21228
|
+
* Sets the padding applied to the cell.
|
|
21229
|
+
* The prop defaults to the value (`'default'`) inherited from the parent Table component.
|
|
21230
|
+
*/
|
|
21231
|
+
padding: PropTypes.oneOf(["checkbox", "none", "normal"]),
|
|
21232
|
+
/**
|
|
21233
|
+
* Set scope attribute.
|
|
21234
|
+
*/
|
|
21235
|
+
scope: PropTypes.string,
|
|
21236
|
+
/**
|
|
21237
|
+
* Specify the size of the cell.
|
|
21238
|
+
* The prop defaults to the value (`'medium'`) inherited from the parent Table component.
|
|
21239
|
+
*/
|
|
21240
|
+
size: PropTypes.oneOfType([PropTypes.oneOf(["medium", "small"]), PropTypes.string]),
|
|
21241
|
+
/**
|
|
21242
|
+
* Set aria-sort direction.
|
|
21243
|
+
*/
|
|
21244
|
+
sortDirection: PropTypes.oneOf(["asc", "desc", false]),
|
|
21245
|
+
/**
|
|
21246
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
21247
|
+
*/
|
|
21248
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
21249
|
+
/**
|
|
21250
|
+
* Specify the cell type.
|
|
21251
|
+
* The prop defaults to the value inherited from the parent TableHead, TableBody, or TableFooter components.
|
|
21252
|
+
*/
|
|
21253
|
+
variant: PropTypes.oneOfType([PropTypes.oneOf(["body", "footer", "head"]), PropTypes.string])
|
|
21254
|
+
} : void 0;
|
|
21255
|
+
function getTableContainerUtilityClass(slot) {
|
|
21256
|
+
return generateUtilityClass("MuiTableContainer", slot);
|
|
21257
|
+
}
|
|
21258
|
+
generateUtilityClasses("MuiTableContainer", ["root"]);
|
|
21259
|
+
const useUtilityClasses$5 = (ownerState) => {
|
|
21260
|
+
const {
|
|
21261
|
+
classes
|
|
21262
|
+
} = ownerState;
|
|
21263
|
+
const slots = {
|
|
21264
|
+
root: ["root"]
|
|
21265
|
+
};
|
|
21266
|
+
return composeClasses(slots, getTableContainerUtilityClass, classes);
|
|
21267
|
+
};
|
|
21268
|
+
const TableContainerRoot = styled("div", {
|
|
21269
|
+
name: "MuiTableContainer",
|
|
21270
|
+
slot: "Root"
|
|
21271
|
+
})({
|
|
21272
|
+
width: "100%",
|
|
21273
|
+
overflowX: "auto"
|
|
21274
|
+
});
|
|
21275
|
+
const TableContainer = /* @__PURE__ */ React.forwardRef(function TableContainer2(inProps, ref) {
|
|
21276
|
+
const props = useDefaultProps({
|
|
21277
|
+
props: inProps,
|
|
21278
|
+
name: "MuiTableContainer"
|
|
21279
|
+
});
|
|
21280
|
+
const {
|
|
21281
|
+
className,
|
|
21282
|
+
component = "div",
|
|
21283
|
+
...other
|
|
21284
|
+
} = props;
|
|
21285
|
+
const ownerState = {
|
|
21286
|
+
...props,
|
|
21287
|
+
component
|
|
21288
|
+
};
|
|
21289
|
+
const classes = useUtilityClasses$5(ownerState);
|
|
21290
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(TableContainerRoot, {
|
|
21291
|
+
ref,
|
|
21292
|
+
as: component,
|
|
21293
|
+
className: clsx(classes.root, className),
|
|
21294
|
+
ownerState,
|
|
21295
|
+
...other
|
|
21296
|
+
});
|
|
21297
|
+
});
|
|
21298
|
+
process.env.NODE_ENV !== "production" ? TableContainer.propTypes = {
|
|
21299
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
21300
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
21301
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
21302
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
21303
|
+
/**
|
|
21304
|
+
* The content of the component, normally `Table`.
|
|
21305
|
+
*/
|
|
21306
|
+
children: PropTypes.node,
|
|
21307
|
+
/**
|
|
21308
|
+
* Override or extend the styles applied to the component.
|
|
21309
|
+
*/
|
|
21310
|
+
classes: PropTypes.object,
|
|
21311
|
+
/**
|
|
21312
|
+
* @ignore
|
|
21313
|
+
*/
|
|
21314
|
+
className: PropTypes.string,
|
|
21315
|
+
/**
|
|
21316
|
+
* The component used for the root node.
|
|
21317
|
+
* Either a string to use a HTML element or a component.
|
|
21318
|
+
*/
|
|
21319
|
+
component: PropTypes.elementType,
|
|
21320
|
+
/**
|
|
21321
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
21322
|
+
*/
|
|
21323
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
21324
|
+
} : void 0;
|
|
21325
|
+
function getTableHeadUtilityClass(slot) {
|
|
21326
|
+
return generateUtilityClass("MuiTableHead", slot);
|
|
21327
|
+
}
|
|
21328
|
+
generateUtilityClasses("MuiTableHead", ["root"]);
|
|
21329
|
+
const useUtilityClasses$4 = (ownerState) => {
|
|
21330
|
+
const {
|
|
21331
|
+
classes
|
|
21332
|
+
} = ownerState;
|
|
21333
|
+
const slots = {
|
|
21334
|
+
root: ["root"]
|
|
21335
|
+
};
|
|
21336
|
+
return composeClasses(slots, getTableHeadUtilityClass, classes);
|
|
21337
|
+
};
|
|
21338
|
+
const TableHeadRoot = styled("thead", {
|
|
21339
|
+
name: "MuiTableHead",
|
|
21340
|
+
slot: "Root"
|
|
21341
|
+
})({
|
|
21342
|
+
display: "table-header-group"
|
|
21343
|
+
});
|
|
21344
|
+
const tablelvl2 = {
|
|
21345
|
+
variant: "head"
|
|
21346
|
+
};
|
|
21347
|
+
const defaultComponent$1 = "thead";
|
|
21348
|
+
const TableHead = /* @__PURE__ */ React.forwardRef(function TableHead2(inProps, ref) {
|
|
21349
|
+
const props = useDefaultProps({
|
|
21350
|
+
props: inProps,
|
|
21351
|
+
name: "MuiTableHead"
|
|
21352
|
+
});
|
|
21353
|
+
const {
|
|
21354
|
+
className,
|
|
21355
|
+
component = defaultComponent$1,
|
|
21356
|
+
...other
|
|
21357
|
+
} = props;
|
|
21358
|
+
const ownerState = {
|
|
21359
|
+
...props,
|
|
21360
|
+
component
|
|
21361
|
+
};
|
|
21362
|
+
const classes = useUtilityClasses$4(ownerState);
|
|
21363
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tablelvl2Context.Provider, {
|
|
21364
|
+
value: tablelvl2,
|
|
21365
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(TableHeadRoot, {
|
|
21366
|
+
as: component,
|
|
21367
|
+
className: clsx(classes.root, className),
|
|
21368
|
+
ref,
|
|
21369
|
+
role: component === defaultComponent$1 ? null : "rowgroup",
|
|
21370
|
+
ownerState,
|
|
21371
|
+
...other
|
|
21372
|
+
})
|
|
21373
|
+
});
|
|
21374
|
+
});
|
|
21375
|
+
process.env.NODE_ENV !== "production" ? TableHead.propTypes = {
|
|
21376
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
21377
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
21378
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
21379
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
21380
|
+
/**
|
|
21381
|
+
* The content of the component, normally `TableRow`.
|
|
21382
|
+
*/
|
|
21383
|
+
children: PropTypes.node,
|
|
21384
|
+
/**
|
|
21385
|
+
* Override or extend the styles applied to the component.
|
|
21386
|
+
*/
|
|
21387
|
+
classes: PropTypes.object,
|
|
21388
|
+
/**
|
|
21389
|
+
* @ignore
|
|
21390
|
+
*/
|
|
21391
|
+
className: PropTypes.string,
|
|
21392
|
+
/**
|
|
21393
|
+
* The component used for the root node.
|
|
21394
|
+
* Either a string to use a HTML element or a component.
|
|
21395
|
+
*/
|
|
21396
|
+
component: PropTypes.elementType,
|
|
21397
|
+
/**
|
|
21398
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
21399
|
+
*/
|
|
21400
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
21401
|
+
} : void 0;
|
|
21402
|
+
const KeyboardArrowLeft = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
|
|
21403
|
+
d: "M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"
|
|
21404
|
+
}), "KeyboardArrowLeft");
|
|
21405
|
+
const KeyboardArrowRight = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
|
|
21406
|
+
d: "M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"
|
|
21407
|
+
}), "KeyboardArrowRight");
|
|
21408
|
+
function getTableRowUtilityClass(slot) {
|
|
21409
|
+
return generateUtilityClass("MuiTableRow", slot);
|
|
21410
|
+
}
|
|
21411
|
+
const tableRowClasses = generateUtilityClasses("MuiTableRow", ["root", "selected", "hover", "head", "footer"]);
|
|
21412
|
+
const useUtilityClasses$3 = (ownerState) => {
|
|
21413
|
+
const {
|
|
21414
|
+
classes,
|
|
21415
|
+
selected,
|
|
21416
|
+
hover,
|
|
21417
|
+
head,
|
|
21418
|
+
footer
|
|
21419
|
+
} = ownerState;
|
|
21420
|
+
const slots = {
|
|
21421
|
+
root: ["root", selected && "selected", hover && "hover", head && "head", footer && "footer"]
|
|
21422
|
+
};
|
|
21423
|
+
return composeClasses(slots, getTableRowUtilityClass, classes);
|
|
21424
|
+
};
|
|
21425
|
+
const TableRowRoot = styled("tr", {
|
|
21426
|
+
name: "MuiTableRow",
|
|
21427
|
+
slot: "Root",
|
|
21428
|
+
overridesResolver: (props, styles2) => {
|
|
21429
|
+
const {
|
|
21430
|
+
ownerState
|
|
21431
|
+
} = props;
|
|
21432
|
+
return [styles2.root, ownerState.head && styles2.head, ownerState.footer && styles2.footer];
|
|
21433
|
+
}
|
|
21434
|
+
})(memoTheme(({
|
|
21435
|
+
theme
|
|
21436
|
+
}) => ({
|
|
21437
|
+
color: "inherit",
|
|
21438
|
+
display: "table-row",
|
|
21439
|
+
verticalAlign: "middle",
|
|
21440
|
+
// We disable the focus ring for mouse, touch and keyboard users.
|
|
21441
|
+
outline: 0,
|
|
21442
|
+
[`&.${tableRowClasses.hover}:hover`]: {
|
|
21443
|
+
backgroundColor: (theme.vars || theme).palette.action.hover
|
|
21444
|
+
},
|
|
21445
|
+
[`&.${tableRowClasses.selected}`]: {
|
|
21446
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
|
|
21447
|
+
"&:hover": {
|
|
21448
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity)
|
|
21449
|
+
}
|
|
21450
|
+
}
|
|
21451
|
+
})));
|
|
21452
|
+
const defaultComponent = "tr";
|
|
21453
|
+
const TableRow = /* @__PURE__ */ React.forwardRef(function TableRow2(inProps, ref) {
|
|
21454
|
+
const props = useDefaultProps({
|
|
21455
|
+
props: inProps,
|
|
21456
|
+
name: "MuiTableRow"
|
|
21457
|
+
});
|
|
21458
|
+
const {
|
|
21459
|
+
className,
|
|
21460
|
+
component = defaultComponent,
|
|
21461
|
+
hover = false,
|
|
21462
|
+
selected = false,
|
|
21463
|
+
...other
|
|
21464
|
+
} = props;
|
|
21465
|
+
const tablelvl22 = React.useContext(Tablelvl2Context);
|
|
21466
|
+
const ownerState = {
|
|
21467
|
+
...props,
|
|
21468
|
+
component,
|
|
21469
|
+
hover,
|
|
21470
|
+
selected,
|
|
21471
|
+
head: tablelvl22 && tablelvl22.variant === "head",
|
|
21472
|
+
footer: tablelvl22 && tablelvl22.variant === "footer"
|
|
21473
|
+
};
|
|
21474
|
+
const classes = useUtilityClasses$3(ownerState);
|
|
21475
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(TableRowRoot, {
|
|
21476
|
+
as: component,
|
|
21477
|
+
ref,
|
|
21478
|
+
className: clsx(classes.root, className),
|
|
21479
|
+
role: component === defaultComponent ? null : "row",
|
|
21480
|
+
ownerState,
|
|
21481
|
+
...other
|
|
21482
|
+
});
|
|
21483
|
+
});
|
|
21484
|
+
process.env.NODE_ENV !== "production" ? TableRow.propTypes = {
|
|
21485
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
21486
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
21487
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
21488
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
21489
|
+
/**
|
|
21490
|
+
* Should be valid `<tr>` children such as `TableCell`.
|
|
21491
|
+
*/
|
|
21492
|
+
children: PropTypes.node,
|
|
21493
|
+
/**
|
|
21494
|
+
* Override or extend the styles applied to the component.
|
|
21495
|
+
*/
|
|
21496
|
+
classes: PropTypes.object,
|
|
21497
|
+
/**
|
|
21498
|
+
* @ignore
|
|
21499
|
+
*/
|
|
21500
|
+
className: PropTypes.string,
|
|
21501
|
+
/**
|
|
21502
|
+
* The component used for the root node.
|
|
21503
|
+
* Either a string to use a HTML element or a component.
|
|
21504
|
+
*/
|
|
21505
|
+
component: PropTypes.elementType,
|
|
21506
|
+
/**
|
|
21507
|
+
* If `true`, the table row will shade on hover.
|
|
21508
|
+
* @default false
|
|
21509
|
+
*/
|
|
21510
|
+
hover: PropTypes.bool,
|
|
21511
|
+
/**
|
|
21512
|
+
* If `true`, the table row will have the selected shading.
|
|
21513
|
+
* @default false
|
|
21514
|
+
*/
|
|
21515
|
+
selected: PropTypes.bool,
|
|
21516
|
+
/**
|
|
21517
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
21518
|
+
*/
|
|
21519
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
21520
|
+
} : void 0;
|
|
21521
|
+
function easeInOutSin(time) {
|
|
21522
|
+
return (1 + Math.sin(Math.PI * time - Math.PI / 2)) / 2;
|
|
21523
|
+
}
|
|
21524
|
+
function animate(property, element, to, options = {}, cb = () => {
|
|
21525
|
+
}) {
|
|
21526
|
+
const {
|
|
21527
|
+
ease = easeInOutSin,
|
|
21528
|
+
duration: duration2 = 300
|
|
21529
|
+
// standard
|
|
21530
|
+
} = options;
|
|
21531
|
+
let start2 = null;
|
|
21532
|
+
const from = element[property];
|
|
21533
|
+
let cancelled = false;
|
|
21534
|
+
const cancel = () => {
|
|
21535
|
+
cancelled = true;
|
|
21536
|
+
};
|
|
21537
|
+
const step = (timestamp) => {
|
|
21538
|
+
if (cancelled) {
|
|
21539
|
+
cb(new Error("Animation cancelled"));
|
|
21540
|
+
return;
|
|
21541
|
+
}
|
|
21542
|
+
if (start2 === null) {
|
|
21543
|
+
start2 = timestamp;
|
|
21544
|
+
}
|
|
21545
|
+
const time = Math.min(1, (timestamp - start2) / duration2);
|
|
21546
|
+
element[property] = ease(time) * (to - from) + from;
|
|
21547
|
+
if (time >= 1) {
|
|
21548
|
+
requestAnimationFrame(() => {
|
|
21549
|
+
cb(null);
|
|
21550
|
+
});
|
|
21551
|
+
return;
|
|
21552
|
+
}
|
|
21553
|
+
requestAnimationFrame(step);
|
|
21554
|
+
};
|
|
21555
|
+
if (from === to) {
|
|
21556
|
+
cb(new Error("Element already at target position"));
|
|
21557
|
+
return cancel;
|
|
21558
|
+
}
|
|
21559
|
+
requestAnimationFrame(step);
|
|
21560
|
+
return cancel;
|
|
21561
|
+
}
|
|
21562
|
+
const styles = {
|
|
21563
|
+
width: 99,
|
|
21564
|
+
height: 99,
|
|
21565
|
+
position: "absolute",
|
|
21566
|
+
top: -9999,
|
|
21567
|
+
overflow: "scroll"
|
|
21568
|
+
};
|
|
21569
|
+
function ScrollbarSize(props) {
|
|
21570
|
+
const {
|
|
21571
|
+
onChange,
|
|
21572
|
+
...other
|
|
21573
|
+
} = props;
|
|
21574
|
+
const scrollbarHeight = React.useRef();
|
|
21575
|
+
const nodeRef = React.useRef(null);
|
|
21576
|
+
const setMeasurements = () => {
|
|
21577
|
+
scrollbarHeight.current = nodeRef.current.offsetHeight - nodeRef.current.clientHeight;
|
|
21578
|
+
};
|
|
21579
|
+
useEnhancedEffect(() => {
|
|
21580
|
+
const handleResize = debounce$1(() => {
|
|
21581
|
+
const prevHeight = scrollbarHeight.current;
|
|
21582
|
+
setMeasurements();
|
|
21583
|
+
if (prevHeight !== scrollbarHeight.current) {
|
|
21584
|
+
onChange(scrollbarHeight.current);
|
|
21585
|
+
}
|
|
21586
|
+
});
|
|
21587
|
+
const containerWindow = ownerWindow$1(nodeRef.current);
|
|
21588
|
+
containerWindow.addEventListener("resize", handleResize);
|
|
21589
|
+
return () => {
|
|
21590
|
+
handleResize.clear();
|
|
21591
|
+
containerWindow.removeEventListener("resize", handleResize);
|
|
21592
|
+
};
|
|
21593
|
+
}, [onChange]);
|
|
21594
|
+
React.useEffect(() => {
|
|
21595
|
+
setMeasurements();
|
|
21596
|
+
onChange(scrollbarHeight.current);
|
|
21597
|
+
}, [onChange]);
|
|
21598
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
21599
|
+
style: styles,
|
|
21600
|
+
...other,
|
|
21601
|
+
ref: nodeRef
|
|
21602
|
+
});
|
|
21603
|
+
}
|
|
21604
|
+
process.env.NODE_ENV !== "production" ? ScrollbarSize.propTypes = {
|
|
21605
|
+
onChange: PropTypes.func.isRequired
|
|
21606
|
+
} : void 0;
|
|
21607
|
+
function getTabScrollButtonUtilityClass(slot) {
|
|
21608
|
+
return generateUtilityClass("MuiTabScrollButton", slot);
|
|
21609
|
+
}
|
|
21610
|
+
const tabScrollButtonClasses = generateUtilityClasses("MuiTabScrollButton", ["root", "vertical", "horizontal", "disabled"]);
|
|
21611
|
+
const useUtilityClasses$2 = (ownerState) => {
|
|
21612
|
+
const {
|
|
21613
|
+
classes,
|
|
21614
|
+
orientation,
|
|
21615
|
+
disabled
|
|
21616
|
+
} = ownerState;
|
|
21617
|
+
const slots = {
|
|
21618
|
+
root: ["root", orientation, disabled && "disabled"]
|
|
21619
|
+
};
|
|
21620
|
+
return composeClasses(slots, getTabScrollButtonUtilityClass, classes);
|
|
21621
|
+
};
|
|
21622
|
+
const TabScrollButtonRoot = styled(ButtonBase, {
|
|
21623
|
+
name: "MuiTabScrollButton",
|
|
21624
|
+
slot: "Root",
|
|
21625
|
+
overridesResolver: (props, styles2) => {
|
|
21626
|
+
const {
|
|
21627
|
+
ownerState
|
|
21628
|
+
} = props;
|
|
21629
|
+
return [styles2.root, ownerState.orientation && styles2[ownerState.orientation]];
|
|
21630
|
+
}
|
|
21631
|
+
})({
|
|
21632
|
+
width: 40,
|
|
21633
|
+
flexShrink: 0,
|
|
21634
|
+
opacity: 0.8,
|
|
21635
|
+
[`&.${tabScrollButtonClasses.disabled}`]: {
|
|
21636
|
+
opacity: 0
|
|
21637
|
+
},
|
|
21638
|
+
variants: [{
|
|
21639
|
+
props: {
|
|
21640
|
+
orientation: "vertical"
|
|
21641
|
+
},
|
|
21642
|
+
style: {
|
|
21643
|
+
width: "100%",
|
|
21644
|
+
height: 40,
|
|
21645
|
+
"& svg": {
|
|
21646
|
+
transform: "var(--TabScrollButton-svgRotate)"
|
|
21647
|
+
}
|
|
21648
|
+
}
|
|
21649
|
+
}]
|
|
21650
|
+
});
|
|
21651
|
+
const TabScrollButton = /* @__PURE__ */ React.forwardRef(function TabScrollButton2(inProps, ref) {
|
|
21652
|
+
const props = useDefaultProps({
|
|
21653
|
+
props: inProps,
|
|
21654
|
+
name: "MuiTabScrollButton"
|
|
21655
|
+
});
|
|
21656
|
+
const {
|
|
21657
|
+
className,
|
|
21658
|
+
slots = {},
|
|
21659
|
+
slotProps = {},
|
|
21660
|
+
direction,
|
|
21661
|
+
orientation,
|
|
21662
|
+
disabled,
|
|
21663
|
+
...other
|
|
21664
|
+
} = props;
|
|
21665
|
+
const isRtl = useRtl();
|
|
21666
|
+
const ownerState = {
|
|
21667
|
+
isRtl,
|
|
21668
|
+
...props
|
|
21669
|
+
};
|
|
21670
|
+
const classes = useUtilityClasses$2(ownerState);
|
|
21671
|
+
const StartButtonIcon = slots.StartScrollButtonIcon ?? KeyboardArrowLeft;
|
|
21672
|
+
const EndButtonIcon = slots.EndScrollButtonIcon ?? KeyboardArrowRight;
|
|
21673
|
+
const startButtonIconProps = useSlotProps({
|
|
21674
|
+
elementType: StartButtonIcon,
|
|
21675
|
+
externalSlotProps: slotProps.startScrollButtonIcon,
|
|
21676
|
+
additionalProps: {
|
|
21677
|
+
fontSize: "small"
|
|
21678
|
+
},
|
|
21679
|
+
ownerState
|
|
21680
|
+
});
|
|
21681
|
+
const endButtonIconProps = useSlotProps({
|
|
21682
|
+
elementType: EndButtonIcon,
|
|
20960
21683
|
externalSlotProps: slotProps.endScrollButtonIcon,
|
|
20961
21684
|
additionalProps: {
|
|
20962
21685
|
fontSize: "small"
|
|
@@ -22447,7 +23170,7 @@ const ComboDropdown = ({
|
|
|
22447
23170
|
document.addEventListener("mousedown", handleClickOutside);
|
|
22448
23171
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
22449
23172
|
}, []);
|
|
22450
|
-
const
|
|
23173
|
+
const normalizeOptions2 = (opts) => opts.map((opt) => {
|
|
22451
23174
|
if (typeof opt === "string") return { label: opt, value: opt };
|
|
22452
23175
|
return {
|
|
22453
23176
|
label: opt[optionLabelKey],
|
|
@@ -22457,29 +23180,47 @@ const ComboDropdown = ({
|
|
|
22457
23180
|
const handleInputChange = (e) => {
|
|
22458
23181
|
const val = e.target.value;
|
|
22459
23182
|
setInputValue(val);
|
|
22460
|
-
|
|
22461
|
-
|
|
22462
|
-
|
|
22463
|
-
|
|
22464
|
-
|
|
22465
|
-
|
|
22466
|
-
|
|
22467
|
-
|
|
22468
|
-
|
|
22469
|
-
|
|
22470
|
-
);
|
|
22471
|
-
setFilteredOptions(filtered);
|
|
22472
|
-
setShowDropdown(true);
|
|
22473
|
-
setHighlightIndex(-1);
|
|
22474
|
-
}
|
|
23183
|
+
const normalized = normalizeOptions2(options);
|
|
23184
|
+
const filtered = normalized.filter(
|
|
23185
|
+
(opt) => {
|
|
23186
|
+
var _a;
|
|
23187
|
+
return (_a = opt.label) == null ? void 0 : _a.toLowerCase().includes(val.toLowerCase());
|
|
23188
|
+
}
|
|
23189
|
+
);
|
|
23190
|
+
setFilteredOptions(filtered);
|
|
23191
|
+
setShowDropdown(true);
|
|
23192
|
+
setHighlightIndex(-1);
|
|
22475
23193
|
};
|
|
22476
23194
|
const handleSelect = (val, label2) => {
|
|
22477
23195
|
setInputValue(label2);
|
|
22478
|
-
|
|
23196
|
+
onChange(name, val);
|
|
23197
|
+
setShowDropdown(false);
|
|
23198
|
+
setHighlightIndex(-1);
|
|
23199
|
+
};
|
|
23200
|
+
const handleBlur = () => {
|
|
23201
|
+
const val = inputValue.trim();
|
|
23202
|
+
const normalized = normalizeOptions2(options);
|
|
23203
|
+
const matchedOption = normalized.find(
|
|
23204
|
+
(opt) => opt.label.toLowerCase() === val.toLowerCase()
|
|
23205
|
+
);
|
|
23206
|
+
if (matchedOption) {
|
|
23207
|
+
setInputValue(matchedOption.label);
|
|
23208
|
+
onChange(name, matchedOption.value);
|
|
23209
|
+
} else if (mode === "both") {
|
|
22479
23210
|
onChange(name, val);
|
|
23211
|
+
} else if (mode === "type") {
|
|
23212
|
+
onChange(name, val);
|
|
23213
|
+
} else {
|
|
23214
|
+
const selected = normalized.find(
|
|
23215
|
+
(opt) => opt.value === value
|
|
23216
|
+
);
|
|
23217
|
+
if (selected) {
|
|
23218
|
+
setInputValue(selected.label);
|
|
23219
|
+
} else {
|
|
23220
|
+
setInputValue("");
|
|
23221
|
+
}
|
|
22480
23222
|
}
|
|
22481
23223
|
setShowDropdown(false);
|
|
22482
|
-
setHighlightIndex(-1);
|
|
22483
23224
|
};
|
|
22484
23225
|
const handleKeyDown = (e) => {
|
|
22485
23226
|
if (!showDropdown || filteredOptions.length === 0) return;
|
|
@@ -22506,7 +23247,7 @@ const ComboDropdown = ({
|
|
|
22506
23247
|
const toggleDropdown = () => {
|
|
22507
23248
|
if (disabled) return;
|
|
22508
23249
|
if (!showDropdown && mode !== "type") {
|
|
22509
|
-
setFilteredOptions(
|
|
23250
|
+
setFilteredOptions(normalizeOptions2(options));
|
|
22510
23251
|
}
|
|
22511
23252
|
setShowDropdown((prev) => {
|
|
22512
23253
|
var _a;
|
|
@@ -22531,15 +23272,16 @@ const ComboDropdown = ({
|
|
|
22531
23272
|
name,
|
|
22532
23273
|
value: inputValue,
|
|
22533
23274
|
onChange: handleInputChange,
|
|
23275
|
+
onBlur: handleBlur,
|
|
22534
23276
|
onFocus: () => {
|
|
22535
23277
|
if (mode !== "type") {
|
|
22536
|
-
setFilteredOptions(
|
|
23278
|
+
setFilteredOptions(normalizeOptions2(options));
|
|
22537
23279
|
setShowDropdown(true);
|
|
22538
23280
|
}
|
|
22539
23281
|
},
|
|
22540
23282
|
onClick: () => {
|
|
22541
23283
|
if (mode !== "type") {
|
|
22542
|
-
setFilteredOptions(
|
|
23284
|
+
setFilteredOptions(normalizeOptions2(options));
|
|
22543
23285
|
setShowDropdown(true);
|
|
22544
23286
|
}
|
|
22545
23287
|
},
|
|
@@ -28519,6 +29261,11 @@ const CustomInput = ({
|
|
|
28519
29261
|
const [showPassword, setShowPassword] = useState(false);
|
|
28520
29262
|
const [amountInWords, setAmountInWords] = useState("");
|
|
28521
29263
|
const [enable, setEnable] = useState(true);
|
|
29264
|
+
useEffect(() => {
|
|
29265
|
+
if (value) {
|
|
29266
|
+
validate(value);
|
|
29267
|
+
}
|
|
29268
|
+
}, [value]);
|
|
28522
29269
|
console.log(enable);
|
|
28523
29270
|
const validate = (val) => {
|
|
28524
29271
|
const raw = category === "amount" ? removeCommas(val) : val;
|
|
@@ -28556,7 +29303,7 @@ const CustomInput = ({
|
|
|
28556
29303
|
break;
|
|
28557
29304
|
}
|
|
28558
29305
|
case "mobile":
|
|
28559
|
-
if (val.length
|
|
29306
|
+
if (val.length < 12) return setError("Invalid mobile number");
|
|
28560
29307
|
if (val.length == 10) setEnable(true);
|
|
28561
29308
|
break;
|
|
28562
29309
|
case "aadhaar":
|
|
@@ -28742,7 +29489,6 @@ const CustomInput = ({
|
|
|
28742
29489
|
const handleChange = (e) => {
|
|
28743
29490
|
let val;
|
|
28744
29491
|
if (category == "mobile") {
|
|
28745
|
-
alert(val.length);
|
|
28746
29492
|
console.log(e);
|
|
28747
29493
|
val = e;
|
|
28748
29494
|
validate(val);
|
|
@@ -30368,14 +31114,512 @@ function DynamicTabs({
|
|
|
30368
31114
|
))
|
|
30369
31115
|
}
|
|
30370
31116
|
) }),
|
|
30371
|
-
tabs.map((tab, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(CustomTabPanel, { value, index, className: "focus:outline-none !pl-0 !pb-0
|
|
31117
|
+
tabs.map((tab, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(CustomTabPanel, { value, index, className: "focus:outline-none !pr-0 !pt-0 !pl-0 !pb-0 sm:!pr-2 ", children: tab.content }, index))
|
|
30372
31118
|
] });
|
|
30373
31119
|
}
|
|
31120
|
+
const ArrowDropDownIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
|
|
31121
|
+
d: "m7 10 5 5 5-5z"
|
|
31122
|
+
}), "ArrowDropDown");
|
|
31123
|
+
const normalizeOptions = (options, labelKey, valueKey) => {
|
|
31124
|
+
return options.map((opt) => ({
|
|
31125
|
+
label: opt[labelKey],
|
|
31126
|
+
value: opt[valueKey],
|
|
31127
|
+
raw: opt
|
|
31128
|
+
}));
|
|
31129
|
+
};
|
|
31130
|
+
const PowerDropdown = ({
|
|
31131
|
+
label,
|
|
31132
|
+
options = [],
|
|
31133
|
+
value,
|
|
31134
|
+
onChange,
|
|
31135
|
+
optionLabelKey = "name",
|
|
31136
|
+
optionValueKey = "id",
|
|
31137
|
+
mode = "both",
|
|
31138
|
+
// select | type | both
|
|
31139
|
+
displayFormat = "list",
|
|
31140
|
+
// list | table
|
|
31141
|
+
placeholder = "Search or select...",
|
|
31142
|
+
allowNewValue = false,
|
|
31143
|
+
// tableHeaders = [],
|
|
31144
|
+
columnWidths = [],
|
|
31145
|
+
height: height2 = "40px",
|
|
31146
|
+
error,
|
|
31147
|
+
disabled,
|
|
31148
|
+
saveOptionTitle
|
|
31149
|
+
}) => {
|
|
31150
|
+
console.log("options", options);
|
|
31151
|
+
console.log("columnWidths", columnWidths);
|
|
31152
|
+
const [inputVal, setInputVal] = useState("");
|
|
31153
|
+
console.log("inputVal", inputVal);
|
|
31154
|
+
const [dropdownOpen, setDropdownOpen] = useState(false);
|
|
31155
|
+
const [focusedIndex, setFocusedIndex] = useState(-1);
|
|
31156
|
+
const [suggestion, setSuggestion] = useState("");
|
|
31157
|
+
const [isInputFocused, setIsInputFocused] = useState(false);
|
|
31158
|
+
const [lastSelectedItem, setLastSelectedItem] = useState(null);
|
|
31159
|
+
const [localOptions, setLocalOptions] = useState(
|
|
31160
|
+
() => normalizeOptions(options, optionLabelKey, optionValueKey)
|
|
31161
|
+
);
|
|
31162
|
+
const [showAddModal, setShowAddModal] = useState(false);
|
|
31163
|
+
const empDataFromDB = Object.keys(options[0]).reduce((acc, curr) => {
|
|
31164
|
+
return { ...acc, [curr]: "" };
|
|
31165
|
+
}, {});
|
|
31166
|
+
const [newEmployee, setNewEmployee] = useState(empDataFromDB);
|
|
31167
|
+
console.log(newEmployee, "newEmployee");
|
|
31168
|
+
console.log("opt", empDataFromDB);
|
|
31169
|
+
const handleAddNewClick = (e) => {
|
|
31170
|
+
e.stopPropagation();
|
|
31171
|
+
console.log("from add Emp", inputVal);
|
|
31172
|
+
console.log("from add Emp labelKey", optionLabelKey, newEmployee);
|
|
31173
|
+
console.log(newEmployee, "newEmployee before");
|
|
31174
|
+
const restructuredEmp = Object.keys(newEmployee).reduce((acc, curr) => {
|
|
31175
|
+
const val = curr === optionLabelKey ? inputVal : "";
|
|
31176
|
+
return { ...acc, [curr]: val };
|
|
31177
|
+
});
|
|
31178
|
+
setNewEmployee(restructuredEmp);
|
|
31179
|
+
setShowAddModal(true);
|
|
31180
|
+
};
|
|
31181
|
+
const handleAddEmployeeSubmit = () => {
|
|
31182
|
+
const newOption = {
|
|
31183
|
+
label: newEmployee.name,
|
|
31184
|
+
value: newEmployee.id,
|
|
31185
|
+
raw: { ...newEmployee }
|
|
31186
|
+
};
|
|
31187
|
+
console.log([...localOptions, newOption]);
|
|
31188
|
+
setLocalOptions([...localOptions, newOption]);
|
|
31189
|
+
setDropdownOpen(false);
|
|
31190
|
+
setShowAddModal(false);
|
|
31191
|
+
};
|
|
31192
|
+
useRef(null);
|
|
31193
|
+
const dropdownRef = useRef(null);
|
|
31194
|
+
const normalizedOptions = useMemo(
|
|
31195
|
+
() => normalizeOptions(options, optionLabelKey, optionValueKey),
|
|
31196
|
+
[options, optionLabelKey, optionValueKey]
|
|
31197
|
+
);
|
|
31198
|
+
const filteredOptions = useMemo(() => {
|
|
31199
|
+
return localOptions == null ? void 0 : localOptions.filter(
|
|
31200
|
+
(option) => {
|
|
31201
|
+
var _a;
|
|
31202
|
+
return (_a = option.label) == null ? void 0 : _a.toLowerCase().includes(inputVal.toLowerCase());
|
|
31203
|
+
}
|
|
31204
|
+
);
|
|
31205
|
+
}, [inputVal, localOptions]);
|
|
31206
|
+
const handleSelect = (option) => {
|
|
31207
|
+
setInputVal(option.label);
|
|
31208
|
+
console.log("option.raw selected", option.raw);
|
|
31209
|
+
onChange(option.raw);
|
|
31210
|
+
setDropdownOpen(false);
|
|
31211
|
+
};
|
|
31212
|
+
const handleBlur = (event) => {
|
|
31213
|
+
event.preventDefault();
|
|
31214
|
+
const htmlElement = document.getElementById("display_name");
|
|
31215
|
+
if (htmlElement) {
|
|
31216
|
+
htmlElement.innerHTML = "";
|
|
31217
|
+
}
|
|
31218
|
+
setTimeout(() => {
|
|
31219
|
+
if (!event.relatedTarget || !event.relatedTarget.closest(".table-container")) {
|
|
31220
|
+
setDropdownOpen(false);
|
|
31221
|
+
setFocusedIndex(-1);
|
|
31222
|
+
setIsInputFocused(false);
|
|
31223
|
+
if (mode !== "select" && allowNewValue && inputVal.trim()) {
|
|
31224
|
+
normalizedOptions.find(
|
|
31225
|
+
(opt) => opt.label.toLowerCase() === inputVal.toLowerCase()
|
|
31226
|
+
);
|
|
31227
|
+
}
|
|
31228
|
+
if (htmlElement) {
|
|
31229
|
+
htmlElement.innerHTML = "";
|
|
31230
|
+
}
|
|
31231
|
+
}
|
|
31232
|
+
}, 100);
|
|
31233
|
+
};
|
|
31234
|
+
const handleKeyDown = (e) => {
|
|
31235
|
+
if (!dropdownOpen && ["ArrowDown", "Enter"].includes(e.key)) {
|
|
31236
|
+
setDropdownOpen(true);
|
|
31237
|
+
return;
|
|
31238
|
+
}
|
|
31239
|
+
if (e.key === "ArrowDown") {
|
|
31240
|
+
setFocusedIndex((prev) => (prev + 1) % filteredOptions.length);
|
|
31241
|
+
} else if (e.key === "ArrowUp") {
|
|
31242
|
+
setFocusedIndex(
|
|
31243
|
+
(prev) => (prev - 1 + filteredOptions.length) % filteredOptions.length
|
|
31244
|
+
);
|
|
31245
|
+
} else if (e.key === "Enter" && focusedIndex >= 0) {
|
|
31246
|
+
handleSelect(filteredOptions[focusedIndex]);
|
|
31247
|
+
} else if (e.key === "Tab" && suggestion) {
|
|
31248
|
+
e.preventDefault();
|
|
31249
|
+
setInputVal(suggestion);
|
|
31250
|
+
const matched = normalizedOptions.find(
|
|
31251
|
+
(opt) => opt.label.toLowerCase() === suggestion.toLowerCase()
|
|
31252
|
+
);
|
|
31253
|
+
if (matched) {
|
|
31254
|
+
handleSelect(matched);
|
|
31255
|
+
}
|
|
31256
|
+
}
|
|
31257
|
+
};
|
|
31258
|
+
const getFontSizeFromWidth = (width2) => {
|
|
31259
|
+
const numericWidth = parseFloat(width2);
|
|
31260
|
+
if (numericWidth >= 40) return "1rem";
|
|
31261
|
+
if (numericWidth >= 25) return "0.9rem";
|
|
31262
|
+
if (numericWidth >= 15) return "0.8rem";
|
|
31263
|
+
return "0.75rem";
|
|
31264
|
+
};
|
|
31265
|
+
const generateColumns = () => {
|
|
31266
|
+
if (options && options.length > 0) {
|
|
31267
|
+
const firstItem = options[0];
|
|
31268
|
+
console.log("firstItem in columns", firstItem);
|
|
31269
|
+
const keys = Object.keys(firstItem).slice(1);
|
|
31270
|
+
console.log("keys in columns", keys);
|
|
31271
|
+
const defaultWidth = `${100 / 3}%`;
|
|
31272
|
+
console.log("columnWidths in generateColumns", columnWidths.length > 0);
|
|
31273
|
+
return keys.slice(0, columnWidths.length > 0 ? columnWidths.length : 3).map((key, index) => {
|
|
31274
|
+
const width2 = columnWidths.length > 0 ? `${columnWidths[index]}%` : defaultWidth;
|
|
31275
|
+
console.log("columnWidths.length", columnWidths.length);
|
|
31276
|
+
console.log("columns width", width2);
|
|
31277
|
+
return {
|
|
31278
|
+
key,
|
|
31279
|
+
label: key.charAt(0).toUpperCase() + key.slice(1).replace(/_/g, " "),
|
|
31280
|
+
width: width2,
|
|
31281
|
+
fontSize: getFontSizeFromWidth(width2)
|
|
31282
|
+
};
|
|
31283
|
+
});
|
|
31284
|
+
}
|
|
31285
|
+
return [];
|
|
31286
|
+
};
|
|
31287
|
+
console.log("generateColumns()", generateColumns());
|
|
31288
|
+
const columns = useMemo(() => generateColumns(), [options, columnWidths]);
|
|
31289
|
+
console.log("columns", columns);
|
|
31290
|
+
useEffect(() => {
|
|
31291
|
+
setInputVal((value == null ? void 0 : value[optionLabelKey]) || "");
|
|
31292
|
+
}, [value, optionLabelKey]);
|
|
31293
|
+
useEffect(() => {
|
|
31294
|
+
if (!suggestion) {
|
|
31295
|
+
setFocusedIndex(-1);
|
|
31296
|
+
return;
|
|
31297
|
+
}
|
|
31298
|
+
const matchIndex = filteredOptions.findIndex(
|
|
31299
|
+
(opt) => opt.label.toLowerCase() === suggestion.toLowerCase()
|
|
31300
|
+
);
|
|
31301
|
+
setFocusedIndex(matchIndex);
|
|
31302
|
+
}, [suggestion, filteredOptions]);
|
|
31303
|
+
useEffect(() => {
|
|
31304
|
+
setLocalOptions(normalizeOptions(options, optionLabelKey, optionValueKey));
|
|
31305
|
+
}, [options, optionLabelKey, optionValueKey]);
|
|
31306
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
31307
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("style", { children: `
|
|
31308
|
+
.custom-scrollbar::-webkit-scrollbar {
|
|
31309
|
+
width: 8px;
|
|
31310
|
+
}
|
|
31311
|
+
|
|
31312
|
+
.custom-scrollbar::-webkit-scrollbar-track {
|
|
31313
|
+
background: #f1f1f1;
|
|
31314
|
+
}
|
|
31315
|
+
|
|
31316
|
+
.custom-scrollbar::-webkit-scrollbar-thumb {
|
|
31317
|
+
background: #888;
|
|
31318
|
+
border-radius: 4px;
|
|
31319
|
+
}
|
|
31320
|
+
|
|
31321
|
+
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
|
|
31322
|
+
background: #555;
|
|
31323
|
+
}
|
|
31324
|
+
` }),
|
|
31325
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { position: "relative", width: "100%" }, children: [
|
|
31326
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31327
|
+
Typography,
|
|
31328
|
+
{
|
|
31329
|
+
className: "heading",
|
|
31330
|
+
style: {
|
|
31331
|
+
marginBottom: "0.5rem",
|
|
31332
|
+
textAlign: "left",
|
|
31333
|
+
fontWeight: "500",
|
|
31334
|
+
fontSize: "14px",
|
|
31335
|
+
lineHeight: "20px",
|
|
31336
|
+
color: "#212529",
|
|
31337
|
+
textTransform: "capitalize"
|
|
31338
|
+
},
|
|
31339
|
+
children: label
|
|
31340
|
+
}
|
|
31341
|
+
),
|
|
31342
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
31343
|
+
"div",
|
|
31344
|
+
{
|
|
31345
|
+
style: {
|
|
31346
|
+
display: "flex",
|
|
31347
|
+
alignItems: "center",
|
|
31348
|
+
border: `1px solid ${error ? "red" : "#ccc"}`,
|
|
31349
|
+
borderRadius: "4px",
|
|
31350
|
+
height: height2,
|
|
31351
|
+
backgroundColor: disabled ? "#f5f5f5" : "white",
|
|
31352
|
+
boxShadow: isInputFocused ? "0 0 5px 2px skyblue" : "none",
|
|
31353
|
+
transition: "box-shadow 0.2s ease-in-out"
|
|
31354
|
+
},
|
|
31355
|
+
children: [
|
|
31356
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { position: "relative", width: "100%" }, children: [
|
|
31357
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31358
|
+
"input",
|
|
31359
|
+
{
|
|
31360
|
+
value: suggestion && inputVal && suggestion.toLowerCase().startsWith(inputVal.toLowerCase()) ? suggestion : "",
|
|
31361
|
+
disabled: true,
|
|
31362
|
+
"aria-hidden": true,
|
|
31363
|
+
style: {
|
|
31364
|
+
position: "absolute",
|
|
31365
|
+
top: "8px",
|
|
31366
|
+
left: "7px",
|
|
31367
|
+
width: "100%",
|
|
31368
|
+
border: "none",
|
|
31369
|
+
outline: "none",
|
|
31370
|
+
color: "#ccc",
|
|
31371
|
+
backgroundColor: "transparent",
|
|
31372
|
+
fontSize: "16px",
|
|
31373
|
+
fontFamily: "inherit",
|
|
31374
|
+
pointerEvents: "none",
|
|
31375
|
+
zIndex: 0,
|
|
31376
|
+
boxSizing: "border-box"
|
|
31377
|
+
}
|
|
31378
|
+
}
|
|
31379
|
+
),
|
|
31380
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31381
|
+
"input",
|
|
31382
|
+
{
|
|
31383
|
+
value: inputVal.charAt(0).toUpperCase() + inputVal.slice(1),
|
|
31384
|
+
onChange: (e) => {
|
|
31385
|
+
const newVal = e.target.value;
|
|
31386
|
+
setInputVal(newVal);
|
|
31387
|
+
setDropdownOpen(true);
|
|
31388
|
+
setFocusedIndex(-1);
|
|
31389
|
+
const match = filteredOptions.find(
|
|
31390
|
+
(opt) => opt.label.toLowerCase().startsWith(newVal.toLowerCase())
|
|
31391
|
+
);
|
|
31392
|
+
setSuggestion((match == null ? void 0 : match.label) || "");
|
|
31393
|
+
},
|
|
31394
|
+
onKeyDown: handleKeyDown,
|
|
31395
|
+
style: {
|
|
31396
|
+
border: "none",
|
|
31397
|
+
borderRadius: "4px",
|
|
31398
|
+
outline: "none",
|
|
31399
|
+
width: "100%",
|
|
31400
|
+
background: "transparent",
|
|
31401
|
+
color: "black",
|
|
31402
|
+
caretColor: "black",
|
|
31403
|
+
position: "relative",
|
|
31404
|
+
zIndex: "1",
|
|
31405
|
+
fontSize: "16px",
|
|
31406
|
+
fontFamily: "inherit",
|
|
31407
|
+
padding: "8px",
|
|
31408
|
+
paddingRight: "10%",
|
|
31409
|
+
boxSizing: "border-box"
|
|
31410
|
+
},
|
|
31411
|
+
onFocus: (e) => {
|
|
31412
|
+
setIsInputFocused(true);
|
|
31413
|
+
!disabled && setDropdownOpen(true);
|
|
31414
|
+
},
|
|
31415
|
+
onBlur: handleBlur
|
|
31416
|
+
}
|
|
31417
|
+
)
|
|
31418
|
+
] }),
|
|
31419
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31420
|
+
ArrowDropDownIcon,
|
|
31421
|
+
{
|
|
31422
|
+
onClick: () => !disabled && setDropdownOpen((prev) => !prev),
|
|
31423
|
+
style: {
|
|
31424
|
+
cursor: disabled ? "not-allowed" : "pointer",
|
|
31425
|
+
color: "gray"
|
|
31426
|
+
}
|
|
31427
|
+
}
|
|
31428
|
+
)
|
|
31429
|
+
]
|
|
31430
|
+
}
|
|
31431
|
+
),
|
|
31432
|
+
dropdownOpen && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31433
|
+
"div",
|
|
31434
|
+
{
|
|
31435
|
+
ref: dropdownRef,
|
|
31436
|
+
style: {
|
|
31437
|
+
position: "absolute",
|
|
31438
|
+
zIndex: 10,
|
|
31439
|
+
width: "100%",
|
|
31440
|
+
backgroundColor: "white",
|
|
31441
|
+
border: "1px solid #ccc",
|
|
31442
|
+
maxHeight: 200,
|
|
31443
|
+
overflowY: "auto",
|
|
31444
|
+
marginTop: 4
|
|
31445
|
+
},
|
|
31446
|
+
children: filteredOptions.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
31447
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { p: 1, variant: "body2", children: "No results found" }),
|
|
31448
|
+
allowNewValue ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31449
|
+
Button,
|
|
31450
|
+
{
|
|
31451
|
+
onMouseDown: handleAddNewClick,
|
|
31452
|
+
style: { marginTop: 8 },
|
|
31453
|
+
type: "button",
|
|
31454
|
+
children: saveOptionTitle
|
|
31455
|
+
}
|
|
31456
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {})
|
|
31457
|
+
] }) : displayFormat === "table" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31458
|
+
TableContainer,
|
|
31459
|
+
{
|
|
31460
|
+
component: Paper,
|
|
31461
|
+
className: "table-container overflow-x-hidden w-ful mt-0 h-full max-h-[60vh] overflow-y-auto shadow-2xl",
|
|
31462
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
31463
|
+
Table,
|
|
31464
|
+
{
|
|
31465
|
+
stickyHeader: true,
|
|
31466
|
+
size: "small",
|
|
31467
|
+
sx: {
|
|
31468
|
+
tableLayout: "fixed",
|
|
31469
|
+
width: "100%",
|
|
31470
|
+
overflowX: "hidden",
|
|
31471
|
+
border: "1px solid #aaa",
|
|
31472
|
+
borderCollapse: "collapse"
|
|
31473
|
+
},
|
|
31474
|
+
children: [
|
|
31475
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableHead, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(TableRow, { children: columns.map((column, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31476
|
+
TableCell,
|
|
31477
|
+
{
|
|
31478
|
+
sx: {
|
|
31479
|
+
width: column.width,
|
|
31480
|
+
padding: "8px",
|
|
31481
|
+
fontSize: column.fontSize || "0.9rem",
|
|
31482
|
+
boxSizing: "border-box",
|
|
31483
|
+
overflow: "hidden",
|
|
31484
|
+
whiteSpace: "nowrap",
|
|
31485
|
+
textOverflow: "ellipsis",
|
|
31486
|
+
// Inline styles from .table-head-cell
|
|
31487
|
+
backgroundColor: "#1976d2",
|
|
31488
|
+
color: "white",
|
|
31489
|
+
fontWeight: "bold",
|
|
31490
|
+
position: "sticky",
|
|
31491
|
+
top: 0,
|
|
31492
|
+
zIndex: 1,
|
|
31493
|
+
border: "1px solid #aaa"
|
|
31494
|
+
},
|
|
31495
|
+
children: column.label
|
|
31496
|
+
},
|
|
31497
|
+
index
|
|
31498
|
+
)) }) }),
|
|
31499
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableBody, { children: filteredOptions.map((opt, idx) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31500
|
+
TableRow,
|
|
31501
|
+
{
|
|
31502
|
+
onMouseDown: () => handleSelect(opt),
|
|
31503
|
+
hover: true,
|
|
31504
|
+
sx: {
|
|
31505
|
+
cursor: "pointer",
|
|
31506
|
+
height: 48,
|
|
31507
|
+
scrollBehavior: "smooth",
|
|
31508
|
+
backgroundColor: focusedIndex === idx ? "#fff54f" : idx % 2 === 0 ? "#f5f5f5" : "white",
|
|
31509
|
+
"&:hover": {
|
|
31510
|
+
backgroundColor: "#e3f2fd"
|
|
31511
|
+
}
|
|
31512
|
+
},
|
|
31513
|
+
children: columns.map((column, cellIndex) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
31514
|
+
TableCell,
|
|
31515
|
+
{
|
|
31516
|
+
sx: {
|
|
31517
|
+
width: column.width,
|
|
31518
|
+
padding: "6px",
|
|
31519
|
+
fontSize: column.fontSize || "0.9rem",
|
|
31520
|
+
boxSizing: "border-box",
|
|
31521
|
+
overflow: "hidden",
|
|
31522
|
+
whiteSpace: "nowrap",
|
|
31523
|
+
textOverflow: "ellipsis",
|
|
31524
|
+
border: "1px solid #aaa"
|
|
31525
|
+
},
|
|
31526
|
+
children: [
|
|
31527
|
+
opt.raw[column.key],
|
|
31528
|
+
console.log(opt, "opt in tablecell")
|
|
31529
|
+
]
|
|
31530
|
+
},
|
|
31531
|
+
cellIndex
|
|
31532
|
+
))
|
|
31533
|
+
},
|
|
31534
|
+
idx
|
|
31535
|
+
)) })
|
|
31536
|
+
]
|
|
31537
|
+
}
|
|
31538
|
+
)
|
|
31539
|
+
}
|
|
31540
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, children: filteredOptions.map((opt, idx) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31541
|
+
"li",
|
|
31542
|
+
{
|
|
31543
|
+
onMouseDown: () => handleSelect(opt),
|
|
31544
|
+
style: {
|
|
31545
|
+
padding: 8,
|
|
31546
|
+
backgroundColor: focusedIndex === idx ? "#eee" : "white",
|
|
31547
|
+
cursor: "pointer"
|
|
31548
|
+
},
|
|
31549
|
+
children: opt.label
|
|
31550
|
+
},
|
|
31551
|
+
idx
|
|
31552
|
+
)) })
|
|
31553
|
+
}
|
|
31554
|
+
),
|
|
31555
|
+
error && /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { color: "error", children: error })
|
|
31556
|
+
] }),
|
|
31557
|
+
showAddModal && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31558
|
+
"div",
|
|
31559
|
+
{
|
|
31560
|
+
style: {
|
|
31561
|
+
position: "fixed",
|
|
31562
|
+
top: 0,
|
|
31563
|
+
left: 0,
|
|
31564
|
+
width: "100%",
|
|
31565
|
+
height: "100%",
|
|
31566
|
+
background: "rgba(0,0,0,0.2)",
|
|
31567
|
+
display: "flex",
|
|
31568
|
+
alignItems: "center",
|
|
31569
|
+
justifyContent: "center",
|
|
31570
|
+
zIndex: 9999
|
|
31571
|
+
},
|
|
31572
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
31573
|
+
"div",
|
|
31574
|
+
{
|
|
31575
|
+
style: {
|
|
31576
|
+
background: "#fff",
|
|
31577
|
+
padding: "2rem",
|
|
31578
|
+
borderRadius: "8px",
|
|
31579
|
+
width: "300px"
|
|
31580
|
+
},
|
|
31581
|
+
children: [
|
|
31582
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { children: "Add New Employee" }),
|
|
31583
|
+
Object.keys(options[0]).map((key) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31584
|
+
CustomInput,
|
|
31585
|
+
{
|
|
31586
|
+
label: key,
|
|
31587
|
+
name: key,
|
|
31588
|
+
value: newEmployee[key],
|
|
31589
|
+
onChange: (name, value2) => setNewEmployee((prev) => ({ ...prev, [key]: value2 })),
|
|
31590
|
+
disabled: key === "_id",
|
|
31591
|
+
width: "100%",
|
|
31592
|
+
placeholder: key,
|
|
31593
|
+
type: "text",
|
|
31594
|
+
category: "text",
|
|
31595
|
+
isRequired: true
|
|
31596
|
+
}
|
|
31597
|
+
)),
|
|
31598
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { marginTop: 16, textAlign: "right" }, children: [
|
|
31599
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: () => setShowAddModal(false), children: "Cancel" }),
|
|
31600
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31601
|
+
"button",
|
|
31602
|
+
{
|
|
31603
|
+
onClick: handleAddEmployeeSubmit,
|
|
31604
|
+
disabled: !newEmployee.name,
|
|
31605
|
+
style: { marginLeft: 8 },
|
|
31606
|
+
children: "Save"
|
|
31607
|
+
}
|
|
31608
|
+
)
|
|
31609
|
+
] })
|
|
31610
|
+
]
|
|
31611
|
+
}
|
|
31612
|
+
)
|
|
31613
|
+
}
|
|
31614
|
+
)
|
|
31615
|
+
] });
|
|
31616
|
+
};
|
|
30374
31617
|
export {
|
|
30375
31618
|
ComboDropdown as MytekComboDropdown,
|
|
30376
31619
|
CustomInput as MytekInputField,
|
|
30377
31620
|
Loader as MytekLoader,
|
|
30378
31621
|
Mt_MessageBox as MytekMessageBox,
|
|
31622
|
+
PowerDropdown as MytekPowerCombo,
|
|
30379
31623
|
RadioButton as MytekRadioButton,
|
|
30380
31624
|
DynamicTabs as MytekTab,
|
|
30381
31625
|
MasterTable as MytekTable,
|