@m4l/components 0.1.79 → 0.1.80
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/@types/export.d.ts +31 -1
- package/components/AccountPopover/{index.d541e4e6.js → index.00d1d15f.js} +10 -6
- package/components/AppBar/{index.f90014de.js → index.c85b100d.js} +5 -4
- package/components/CommonActions/components/ActionCancel/{index.92536832.js → index.1051a117.js} +1 -1
- package/components/CommonActions/components/ActionFormCancel/{index.7fb1ed8d.js → index.a0d727b2.js} +12 -11
- package/components/CommonActions/components/ActionFormIntro/{index.bebc0c94.js → index.a20dc88d.js} +1 -1
- package/components/CommonActions/components/ActionIntro/{index.aa4e432e.js → index.bfe3256c.js} +1 -1
- package/components/CommonActions/components/Actions/{index.5732847f.js → index.19d67bc6.js} +10 -9
- package/components/DataGrid/classes/constants.d.ts +1 -0
- package/components/DataGrid/classes/index.d.ts +27 -0
- package/components/DataGrid/classes/types.d.ts +27 -0
- package/components/DataGrid/contexts/DataGridContext/types.d.ts +3 -1
- package/components/DataGrid/{index.302080d3.js → index.2f175eba.js} +173 -316
- package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/subcomponents/FormatterColumn/index.d.ts +2 -2
- package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/subcomponents/FormatterColumn/types.d.ts +3 -0
- package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/types.d.ts +2 -0
- package/components/DataGrid/types.d.ts +7 -0
- package/components/DynamicFilter/{index.0887320f.js → index.c1f9d560.js} +23 -22
- package/components/GridLayout/Responsive/{index.0905a698.js → index.1671380a.js} +1 -1
- package/components/GridLayout/{index.da6fd387.js → index.a792aacb.js} +2 -2
- package/components/HelperText/{index.29d5ad65.js → index.6ef76993.js} +5 -4
- package/components/LanguagePopover/{index.ce84f099.js → index.1564bd08.js} +5 -4
- package/components/ModalDialog/{index.ab432b77.js → index.fbc4cd71.js} +3 -3
- package/components/NavLink/{index.3bf44e30.js → index.6c9c2588.js} +5 -4
- package/components/ObjectLogs/{index.c947ded4.js → index.eab1c15f.js} +14 -13
- package/components/Period/{index.adc328ca.js → index.26071a16.js} +16 -15
- package/components/PropertyValue/{index.6b583e7a.js → index.18d3c0fd.js} +1 -1
- package/components/areas/components/AreasAdmin/{index.31905078.js → index.7a0dabbe.js} +23 -22
- package/components/areas/components/AreasViewer/{index.fe18bdbc.js → index.fd49f06c.js} +31 -30
- package/components/areas/components/{index.7ae189ba.js → index.7756928a.js} +8 -7
- package/components/areas/contexts/AreasContext/{index.1213c3ef.js → index.0a08a08b.js} +4 -4
- package/components/areas/contexts/{index.84d35ffe.js → index.b303b664.js} +1 -1
- package/components/areas/hooks/useAreas/{index.cd799cf6.js → index.c6eb2569.js} +1 -1
- package/components/areas/{index.6ee7a4eb.js → index.6e67d89a.js} +8 -7
- package/components/hook-form/RHFAutocomplete/classes/index.d.ts +4 -0
- package/components/hook-form/RHFAutocomplete/classes/types.d.ts +6 -0
- package/components/hook-form/RHFAutocomplete/{index.e52c1f6a.js → index.d1bbb015.js} +34 -51
- package/components/hook-form/RHFAutocomplete/subcomponents/Skeleton/types.d.ts +2 -1
- package/components/hook-form/RHFAutocompleteAsync/{index.a226b8ac.js → index.f9a9ef48.js} +1 -1
- package/components/hook-form/RHFCheckbox/{index.9619debd.js → index.7b4a21d7.js} +42 -67
- package/components/hook-form/RHFCheckbox/types.d.ts +2 -1
- package/components/hook-form/RHFDateTime/{index.5da7b839.js → index.46cf616e.js} +9 -7
- package/components/hook-form/RHFPeriod/{index.7e42c292.js → index.ce513149.js} +2 -2
- package/components/hook-form/RHFTextField/{index.13447584.js → index.f7ee202c.js} +4 -3
- package/components/hook-form/RHFUpload/{index.80071782.js → index.1befd5bb.js} +6 -5
- package/components/modal/{WindowBase.90d3c1d5.js → WindowBase.7e19843e.js} +8 -6
- package/components/modal/{WindowConfirm.835f8d13.js → WindowConfirm.12a9608a.js} +13 -12
- package/components/modal/{index.cd34ddb3.js → index.b0a7236c.js} +10 -9
- package/components/mui_extended/Accordion/{index.e8ba0755.js → index.a6447bf8.js} +1 -1
- package/components/mui_extended/Badge/classes/constants.d.ts +1 -1
- package/components/mui_extended/Badge/{index.8c2b8b66.js → index.cad260fe.js} +1 -1
- package/components/mui_extended/CheckBox/CheckBox.d.ts +3 -0
- package/components/mui_extended/CheckBox/classes/constants.d.ts +1 -0
- package/components/mui_extended/CheckBox/classes/index.d.ts +8 -0
- package/components/mui_extended/CheckBox/classes/types.d.ts +10 -0
- package/components/mui_extended/CheckBox/index.d.ts +1 -0
- package/components/mui_extended/CheckBox/subcomponents/Skeleton/index.d.ts +3 -0
- package/components/mui_extended/CheckBox/subcomponents/Skeleton/types.d.ts +4 -0
- package/components/mui_extended/CheckBox/types.d.ts +5 -0
- package/components/mui_extended/CheckBox.5f6c78b0.js +86 -0
- package/components/mui_extended/Pager/classes/constants.d.ts +1 -0
- package/components/mui_extended/Pager/classes/index.d.ts +10 -0
- package/components/mui_extended/Pager/classes/types.d.ts +10 -0
- package/components/mui_extended/Pager/{index.2f6d6d7d.js → index.82e89328.js} +67 -31
- package/components/mui_extended/Tab/{index.3c005df1.js → index.c39a6681.js} +1 -1
- package/components/mui_extended/index.d.ts +1 -0
- package/components/mui_extended/{index.ff59a512.js → index.d78bde19.js} +5 -4
- package/contexts/ModalContext/{index.feded672.js → index.89805978.js} +1 -1
- package/hooks/useModal/{index.6d238807.js → index.e1c5c31e.js} +1 -1
- package/index.js +46 -44
- package/package.json +1 -1
- package/{vendor.9b969b18.js → vendor.f57d47a7.js} +38 -37
- package/components/hook-form/RHFCheckbox/subcomponents/Skeleton/index.d.ts +0 -3
- package/components/hook-form/RHFCheckbox/subcomponents/Skeleton/types.d.ts +0 -5
|
@@ -7,23 +7,24 @@ import "react/jsx-runtime";
|
|
|
7
7
|
import "../../mui_extended/IconButton/index.12f1a3c3.js";
|
|
8
8
|
import "@m4l/graphics";
|
|
9
9
|
import "zustand";
|
|
10
|
-
import "../contexts/AreasContext/index.
|
|
11
|
-
import "./AreasAdmin/index.
|
|
10
|
+
import "../contexts/AreasContext/index.0a08a08b.js";
|
|
11
|
+
import "./AreasAdmin/index.7a0dabbe.js";
|
|
12
12
|
import "zustand/shallow";
|
|
13
13
|
import "../../ScrollBar/index.bbe48f4d.js";
|
|
14
|
-
import "../../mui_extended/Accordion/index.
|
|
14
|
+
import "../../mui_extended/Accordion/index.a6447bf8.js";
|
|
15
15
|
import "../../mui_extended/Typography/index.443590d6.js";
|
|
16
16
|
import "../../mui_extended/Avatar/index.75e6ed57.js";
|
|
17
17
|
import "react-router-dom";
|
|
18
18
|
import "@mui/material/Button";
|
|
19
19
|
import "../../mui_extended/Button/index.4288f9fc.js";
|
|
20
|
-
import "../../mui_extended/
|
|
20
|
+
import "../../mui_extended/CheckBox.5f6c78b0.js";
|
|
21
|
+
import "../../mui_extended/Badge/index.cad260fe.js";
|
|
21
22
|
import "../../Image/index.c18ebf5a.js";
|
|
22
23
|
import "@mui/lab";
|
|
23
24
|
import "../../mui_extended/MenuActions/index.43a2e1ae.js";
|
|
24
25
|
import "../../mui_extended/Popover/index.9f35d0eb.js";
|
|
25
|
-
import "../../mui_extended/Pager/index.
|
|
26
|
-
import "../../mui_extended/Tab/index.
|
|
26
|
+
import "../../mui_extended/Pager/index.82e89328.js";
|
|
27
|
+
import "../../mui_extended/Tab/index.c39a6681.js";
|
|
27
28
|
import "../../mui_extended/Tooltip/index.5a795dcd.js";
|
|
28
|
-
import "./AreasViewer/index.
|
|
29
|
+
import "./AreasViewer/index.fd49f06c.js";
|
|
29
30
|
import "../../LinearProgressIndeterminate/index.60dabc06.js";
|
|
@@ -5,13 +5,13 @@ import { useResponsiveDesktop, useFirstRender } from "@m4l/graphics";
|
|
|
5
5
|
import { useHostTools, useModuleDictionary, useNetwork, useModuleSkeleton, EmitEvents } from "@m4l/core";
|
|
6
6
|
import { devtools } from "zustand/middleware";
|
|
7
7
|
import { immer } from "zustand/middleware/immer";
|
|
8
|
-
import { u as useAreasViewerUtilityClasses } from "../../components/AreasViewer/index.
|
|
9
|
-
import { u as useAreasAdminUtilityClasses } from "../../components/AreasAdmin/index.
|
|
8
|
+
import { u as useAreasViewerUtilityClasses } from "../../components/AreasViewer/index.fd49f06c.js";
|
|
9
|
+
import { u as useAreasAdminUtilityClasses } from "../../components/AreasAdmin/index.7a0dabbe.js";
|
|
10
10
|
import { c as createDynamicMFStore } from "../DynamicMFParmsContext/index.1607c78e.js";
|
|
11
11
|
import { g as getAreasDictionary, D as DICCTIONARY } from "../../dictionary.afb7e3d9.js";
|
|
12
12
|
import "clsx";
|
|
13
|
-
import "../../../GridLayout/index.
|
|
14
|
-
import { a as addLayoutItemToBreakPointIfNoExists, b as addLayoutItemToBreakPoints, c as isEqualLayouts } from "../../../GridLayout/Responsive/index.
|
|
13
|
+
import "../../../GridLayout/index.a792aacb.js";
|
|
14
|
+
import { a as addLayoutItemToBreakPointIfNoExists, b as addLayoutItemToBreakPoints, c as isEqualLayouts } from "../../../GridLayout/Responsive/index.1671380a.js";
|
|
15
15
|
import { jsx } from "react/jsx-runtime";
|
|
16
16
|
import { debounce, cloneDeep } from "lodash";
|
|
17
17
|
const ROW_HEIGTH_GRIDLAYOUT = 20;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "./AreasContext/index.
|
|
1
|
+
import "./AreasContext/index.0a08a08b.js";
|
|
2
2
|
import "./WindowToolsMFContext/index.8f3e2a04.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useContext } from "react";
|
|
2
2
|
import { useStore } from "zustand";
|
|
3
|
-
import { A as AreasContext } from "../../contexts/AreasContext/index.
|
|
3
|
+
import { A as AreasContext } from "../../contexts/AreasContext/index.0a08a08b.js";
|
|
4
4
|
function useAreasStore(selector, equalityFn) {
|
|
5
5
|
const context = useContext(AreasContext);
|
|
6
6
|
if (!context)
|
|
@@ -7,25 +7,26 @@ import "react/jsx-runtime";
|
|
|
7
7
|
import "../mui_extended/IconButton/index.12f1a3c3.js";
|
|
8
8
|
import "@m4l/graphics";
|
|
9
9
|
import "zustand";
|
|
10
|
-
import "./contexts/AreasContext/index.
|
|
11
|
-
import "./components/AreasAdmin/index.
|
|
10
|
+
import "./contexts/AreasContext/index.0a08a08b.js";
|
|
11
|
+
import "./components/AreasAdmin/index.7a0dabbe.js";
|
|
12
12
|
import "zustand/shallow";
|
|
13
13
|
import "../ScrollBar/index.bbe48f4d.js";
|
|
14
|
-
import "../mui_extended/Accordion/index.
|
|
14
|
+
import "../mui_extended/Accordion/index.a6447bf8.js";
|
|
15
15
|
import "../mui_extended/Typography/index.443590d6.js";
|
|
16
16
|
import "../mui_extended/Avatar/index.75e6ed57.js";
|
|
17
17
|
import "react-router-dom";
|
|
18
18
|
import "@mui/material/Button";
|
|
19
19
|
import "../mui_extended/Button/index.4288f9fc.js";
|
|
20
|
-
import "../mui_extended/
|
|
20
|
+
import "../mui_extended/CheckBox.5f6c78b0.js";
|
|
21
|
+
import "../mui_extended/Badge/index.cad260fe.js";
|
|
21
22
|
import "../Image/index.c18ebf5a.js";
|
|
22
23
|
import "@mui/lab";
|
|
23
24
|
import "../mui_extended/MenuActions/index.43a2e1ae.js";
|
|
24
25
|
import "../mui_extended/Popover/index.9f35d0eb.js";
|
|
25
|
-
import "../mui_extended/Pager/index.
|
|
26
|
-
import "../mui_extended/Tab/index.
|
|
26
|
+
import "../mui_extended/Pager/index.82e89328.js";
|
|
27
|
+
import "../mui_extended/Tab/index.c39a6681.js";
|
|
27
28
|
import "../mui_extended/Tooltip/index.5a795dcd.js";
|
|
28
|
-
import "./components/AreasViewer/index.
|
|
29
|
+
import "./components/AreasViewer/index.fd49f06c.js";
|
|
29
30
|
import "../LinearProgressIndeterminate/index.60dabc06.js";
|
|
30
31
|
import "./contexts/WindowToolsMFContext/index.8f3e2a04.js";
|
|
31
32
|
import "./contexts/DynamicMFParmsContext/index.1607c78e.js";
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import { useUtilityClasses } from ".";
|
|
1
2
|
export interface RHFAutocompleteClassesType {
|
|
2
3
|
root: string;
|
|
3
4
|
withImage: string;
|
|
4
5
|
skeleton: string;
|
|
5
6
|
label: string;
|
|
7
|
+
popper: string;
|
|
8
|
+
skeletonRoot: string;
|
|
9
|
+
skeletonContainerText: string;
|
|
10
|
+
iconDown: string;
|
|
6
11
|
variantInfo: string;
|
|
7
12
|
isDisabled: string;
|
|
8
13
|
variantSuccess: string;
|
|
@@ -13,3 +18,4 @@ export interface RHFAutocompleteClassesType {
|
|
|
13
18
|
isFocus: string;
|
|
14
19
|
}
|
|
15
20
|
export declare type RHFAutocompleteClassesKey = keyof RHFAutocompleteClassesType;
|
|
21
|
+
export declare type Classes = ReturnType<typeof useUtilityClasses>;
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import { useModuleDictionary, useModuleSkeleton, useEnvironment } from "@m4l/core";
|
|
2
2
|
import { useFormContext, Controller } from "react-hook-form";
|
|
3
|
-
import {
|
|
3
|
+
import { Skeleton, generateUtilityClasses, generateUtilityClass, useTheme, Autocomplete, Popper, TextField, CircularProgress } from "@mui/material";
|
|
4
4
|
import { I as Image } from "../../Image/index.c18ebf5a.js";
|
|
5
5
|
import { useMemo, useRef, useState, useEffect } from "react";
|
|
6
6
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
7
7
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
8
8
|
import { T as Typography } from "../../mui_extended/Typography/index.443590d6.js";
|
|
9
|
-
import { H as HelperText } from "../../HelperText/index.
|
|
9
|
+
import { H as HelperText } from "../../HelperText/index.6ef76993.js";
|
|
10
10
|
import { I as IconButton } from "../../mui_extended/IconButton/index.12f1a3c3.js";
|
|
11
|
+
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
11
12
|
import { styled } from "@mui/material/styles";
|
|
12
13
|
import "clsx";
|
|
13
14
|
import { unstable_composeClasses } from "@mui/base";
|
|
14
15
|
import "../../Icon/index.9fcd1476.js";
|
|
15
|
-
import "
|
|
16
|
-
import "../../mui_extended/Accordion/index.e8ba0755.js";
|
|
16
|
+
import "../../mui_extended/Accordion/index.a6447bf8.js";
|
|
17
17
|
import "../../mui_extended/Avatar/index.75e6ed57.js";
|
|
18
18
|
import "react-router-dom";
|
|
19
19
|
import "@mui/material/Button";
|
|
20
20
|
import "../../mui_extended/Button/index.4288f9fc.js";
|
|
21
|
-
import "../../mui_extended/
|
|
21
|
+
import "../../mui_extended/CheckBox.5f6c78b0.js";
|
|
22
|
+
import "../../mui_extended/Badge/index.cad260fe.js";
|
|
22
23
|
import "@mui/lab";
|
|
23
24
|
import "../../mui_extended/MenuActions/index.43a2e1ae.js";
|
|
24
25
|
import "../../mui_extended/Popover/index.9f35d0eb.js";
|
|
25
|
-
import "../../mui_extended/Pager/index.
|
|
26
|
-
import "../../mui_extended/Tab/index.
|
|
26
|
+
import "../../mui_extended/Pager/index.82e89328.js";
|
|
27
|
+
import "../../mui_extended/Tab/index.c39a6681.js";
|
|
27
28
|
import "../../mui_extended/Tooltip/index.5a795dcd.js";
|
|
28
29
|
const AutocompleteRoot = styled("div")(({
|
|
29
30
|
theme
|
|
@@ -56,36 +57,6 @@ function withRenderOption(getUrlImage, classes) {
|
|
|
56
57
|
});
|
|
57
58
|
};
|
|
58
59
|
}
|
|
59
|
-
const WrapperSkeletonRHFAutocomplete = styled$1("div")(({
|
|
60
|
-
theme
|
|
61
|
-
}) => ({
|
|
62
|
-
width: "100%",
|
|
63
|
-
display: "flex",
|
|
64
|
-
justifyContent: "space-between",
|
|
65
|
-
alignItems: "center",
|
|
66
|
-
height: `${theme.spacing(4.5)}`,
|
|
67
|
-
border: `1px solid ${theme.palette.divider}`,
|
|
68
|
-
borderRadius: `${theme.spacing(1)}`,
|
|
69
|
-
padding: `0 ${theme.spacing(2)}`,
|
|
70
|
-
overflow: "hidden",
|
|
71
|
-
[theme.breakpoints.down("md")]: {
|
|
72
|
-
width: "100%"
|
|
73
|
-
}
|
|
74
|
-
}));
|
|
75
|
-
const SkeletonContainerText = styled$1("div")(({
|
|
76
|
-
theme
|
|
77
|
-
}) => ({
|
|
78
|
-
width: "100%",
|
|
79
|
-
height: "auto",
|
|
80
|
-
overflow: "hidden",
|
|
81
|
-
margin: theme.spacing(1.5)
|
|
82
|
-
}));
|
|
83
|
-
const SkeletonRHFAutocompleteRoot = styled$1("div")(() => ({
|
|
84
|
-
display: "flex",
|
|
85
|
-
flexDirection: "column",
|
|
86
|
-
gap: "4px",
|
|
87
|
-
width: "100%"
|
|
88
|
-
}));
|
|
89
60
|
const SkeletonRHFAutocomplete = (props) => {
|
|
90
61
|
const {
|
|
91
62
|
withImage,
|
|
@@ -96,21 +67,20 @@ const SkeletonRHFAutocomplete = (props) => {
|
|
|
96
67
|
classes,
|
|
97
68
|
hasLabel
|
|
98
69
|
} = props;
|
|
99
|
-
return /* @__PURE__ */ jsxs(
|
|
70
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
71
|
+
className: classes.skeletonRoot,
|
|
100
72
|
children: [(hasLabel || hasLabel?.length === 0) && /* @__PURE__ */ jsx(Skeleton, {
|
|
101
73
|
variant: "text",
|
|
102
74
|
width: "30%",
|
|
103
75
|
height: "16px"
|
|
104
|
-
}), /* @__PURE__ */ jsx(
|
|
76
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
105
77
|
className: classes.skeleton,
|
|
106
78
|
...process.env.NODE_ENV !== "production" ? {
|
|
107
79
|
[TEST_PROP_ID]: getNameDataTestId("skeleton")
|
|
108
80
|
} : {},
|
|
109
81
|
children: !withImage ? /* @__PURE__ */ jsxs(Fragment, {
|
|
110
|
-
children: [/* @__PURE__ */ jsx(
|
|
111
|
-
|
|
112
|
-
marginLeft: "0px"
|
|
113
|
-
},
|
|
82
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
83
|
+
className: classes.skeletonContainerText,
|
|
114
84
|
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
115
85
|
variant: "text",
|
|
116
86
|
width: skeletonWidth,
|
|
@@ -132,7 +102,8 @@ const SkeletonRHFAutocomplete = (props) => {
|
|
|
132
102
|
sx: {
|
|
133
103
|
minWidth: imageWidth
|
|
134
104
|
}
|
|
135
|
-
}), /* @__PURE__ */ jsx(
|
|
105
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
106
|
+
className: classes.skeletonContainerText,
|
|
136
107
|
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
137
108
|
variant: "text",
|
|
138
109
|
width: skeletonWidth,
|
|
@@ -156,6 +127,10 @@ generateUtilityClasses(componentName, [
|
|
|
156
127
|
"withImage",
|
|
157
128
|
"skeleton",
|
|
158
129
|
"label",
|
|
130
|
+
"popper",
|
|
131
|
+
"skeletonRoot",
|
|
132
|
+
"skeletonContainerText",
|
|
133
|
+
"iconDown",
|
|
159
134
|
"variantInfo",
|
|
160
135
|
"isDisabled",
|
|
161
136
|
"variantSuccess",
|
|
@@ -173,7 +148,11 @@ const useUtilityClasses = (ownerState) => {
|
|
|
173
148
|
root: ["root", ownerState.size === "small" && "sizeSmall", ownerState.size === "medium" && "sizeMedium", ownerState.focus && "isFocus", ownerState.disabled && "isDisabled", ownerState.variant === "info" && "variantInfo", ownerState.variant === "success" && "variantSuccess", ownerState.variant === "warning" && "variantWarning", ownerState.variant === "error" && "variantError"],
|
|
174
149
|
withImage: ["withImage"],
|
|
175
150
|
skeleton: ["skeleton"],
|
|
176
|
-
label: ["label"]
|
|
151
|
+
label: ["label"],
|
|
152
|
+
popper: ["popper"],
|
|
153
|
+
skeletonRoot: ["skeletonRoot"],
|
|
154
|
+
skeletonContainerText: ["SkeletonContainerText"],
|
|
155
|
+
iconDown: ["iconDown"]
|
|
177
156
|
};
|
|
178
157
|
const composedClasses = unstable_composeClasses(slots, getRHFAutocompleteClassesUtilityClass, {});
|
|
179
158
|
return {
|
|
@@ -213,6 +192,7 @@ function RHFAutocomplete(props) {
|
|
|
213
192
|
} = useEnvironment();
|
|
214
193
|
const autocompleteRef = useRef(null);
|
|
215
194
|
const [open, setOpen] = useState(false);
|
|
195
|
+
const isDesktop = useResponsiveDesktop();
|
|
216
196
|
const onCloseLocal = (event, reason) => {
|
|
217
197
|
setOpen(false);
|
|
218
198
|
if (onClose)
|
|
@@ -265,12 +245,13 @@ function RHFAutocomplete(props) {
|
|
|
265
245
|
setIsFocus(false);
|
|
266
246
|
};
|
|
267
247
|
const ownerState = {
|
|
268
|
-
size,
|
|
248
|
+
size: !isDesktop ? "medium" : size,
|
|
269
249
|
focus: isFocus,
|
|
270
250
|
variant: currentVariant,
|
|
271
251
|
disabled
|
|
272
252
|
};
|
|
273
253
|
const classes = useUtilityClasses(ownerState);
|
|
254
|
+
const theme = useTheme();
|
|
274
255
|
return /* @__PURE__ */ jsx(AutocompleteRoot, {
|
|
275
256
|
className: classes.root,
|
|
276
257
|
...process.env.NODE_ENV !== "production" ? {
|
|
@@ -309,6 +290,7 @@ function RHFAutocomplete(props) {
|
|
|
309
290
|
}), /* @__PURE__ */ jsx(Autocomplete, {
|
|
310
291
|
onKeyDown: checkKeyDown,
|
|
311
292
|
autoComplete: true,
|
|
293
|
+
size,
|
|
312
294
|
ref: autocompleteRef,
|
|
313
295
|
onFocus: handleFocus,
|
|
314
296
|
onBlur: handleBlur,
|
|
@@ -320,11 +302,10 @@ function RHFAutocomplete(props) {
|
|
|
320
302
|
PopperComponent: (props2) => {
|
|
321
303
|
return /* @__PURE__ */ jsx(Popper, {
|
|
322
304
|
...props2,
|
|
305
|
+
className: classes.popper,
|
|
323
306
|
placement: "bottom-start",
|
|
324
307
|
sx: {
|
|
325
|
-
|
|
326
|
-
top: "50px"
|
|
327
|
-
}
|
|
308
|
+
...theme.components?.M4LRHFAutocompletePopover?.styleOverrides
|
|
328
309
|
}
|
|
329
310
|
});
|
|
330
311
|
},
|
|
@@ -363,6 +344,7 @@ function RHFAutocomplete(props) {
|
|
|
363
344
|
shrink: true
|
|
364
345
|
},
|
|
365
346
|
fullWidth: true,
|
|
347
|
+
size,
|
|
366
348
|
SelectProps: {
|
|
367
349
|
native: true
|
|
368
350
|
},
|
|
@@ -378,9 +360,10 @@ function RHFAutocomplete(props) {
|
|
|
378
360
|
color: "inherit",
|
|
379
361
|
size: 20
|
|
380
362
|
}) : /* @__PURE__ */ jsx(IconButton, {
|
|
381
|
-
|
|
363
|
+
className: classes.iconDown,
|
|
364
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/RHFAutocompletarAsync/assets/icons/chevronDown.svg`,
|
|
382
365
|
onClick: (event) => onOpenLocal(event),
|
|
383
|
-
size
|
|
366
|
+
size
|
|
384
367
|
})
|
|
385
368
|
})
|
|
386
369
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { Classes } from '../../classes/types';
|
|
1
2
|
import { RHFAutocompleteProps } from '../../types';
|
|
2
3
|
export interface SkeletonRHFAutocompleteProps extends Pick<RHFAutocompleteProps<any>, 'skeletonWidth' | 'skeletonHeight' | 'imageWidth' | 'imageHeight'> {
|
|
3
4
|
withImage: boolean;
|
|
4
|
-
classes:
|
|
5
|
+
classes: Classes;
|
|
5
6
|
hasLabel?: string;
|
|
6
7
|
}
|
|
@@ -5,7 +5,7 @@ import { styled } from "@mui/material/styles";
|
|
|
5
5
|
import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
6
6
|
import { unstable_composeClasses } from "@mui/base";
|
|
7
7
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
8
|
-
import { R as RHFAutocomplete, g as getRHFAutocompleteComponentsDictionary } from "../RHFAutocomplete/index.
|
|
8
|
+
import { R as RHFAutocomplete, g as getRHFAutocompleteComponentsDictionary } from "../RHFAutocomplete/index.d1bbb015.js";
|
|
9
9
|
import { jsx } from "react/jsx-runtime";
|
|
10
10
|
styled("div")(() => ({
|
|
11
11
|
display: "flex",
|
|
@@ -1,71 +1,48 @@
|
|
|
1
1
|
import { useFormContext, Controller } from "react-hook-form";
|
|
2
|
-
import { styled
|
|
3
|
-
import {
|
|
4
|
-
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
5
|
-
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
6
|
-
import { styled as styled$1 } from "@mui/material/styles";
|
|
2
|
+
import { styled } from "@mui/material/styles";
|
|
3
|
+
import { Skeleton, generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
7
4
|
import { unstable_composeClasses } from "@mui/base";
|
|
8
|
-
import { H as HelperText } from "../../HelperText/index.
|
|
9
|
-
import { T as
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} = props;
|
|
34
|
-
return /* @__PURE__ */ jsxs(SkeletonRHFCheckBoxRoot, {
|
|
35
|
-
children: [/* @__PURE__ */ jsx(WrapperSkeletonCheckBox, {
|
|
36
|
-
className: classes.skeleton,
|
|
37
|
-
...process.env.NODE_ENV !== "production" ? {
|
|
38
|
-
[TEST_PROP_ID]: getNameDataTestId("skeleton", fieldName)
|
|
39
|
-
} : {},
|
|
40
|
-
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
41
|
-
variant: "rounded",
|
|
42
|
-
width: "18px",
|
|
43
|
-
height: "18px"
|
|
44
|
-
})
|
|
45
|
-
}), hasLabel && /* @__PURE__ */ jsx(Skeleton, {
|
|
46
|
-
variant: "text",
|
|
47
|
-
width: "70px",
|
|
48
|
-
height: "18px"
|
|
49
|
-
})]
|
|
50
|
-
});
|
|
51
|
-
};
|
|
52
|
-
const RHFCheckboxRoot = styled$1("div")(({
|
|
5
|
+
import { H as HelperText } from "../../HelperText/index.6ef76993.js";
|
|
6
|
+
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
7
|
+
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
8
|
+
import "react";
|
|
9
|
+
import "@m4l/core";
|
|
10
|
+
import "../../Icon/index.9fcd1476.js";
|
|
11
|
+
import "clsx";
|
|
12
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
13
|
+
import "../../mui_extended/IconButton/index.12f1a3c3.js";
|
|
14
|
+
import "../../mui_extended/Accordion/index.a6447bf8.js";
|
|
15
|
+
import "../../mui_extended/Typography/index.443590d6.js";
|
|
16
|
+
import "../../mui_extended/Avatar/index.75e6ed57.js";
|
|
17
|
+
import "react-router-dom";
|
|
18
|
+
import "@mui/material/Button";
|
|
19
|
+
import "../../mui_extended/Button/index.4288f9fc.js";
|
|
20
|
+
import { C as CheckBox } from "../../mui_extended/CheckBox.5f6c78b0.js";
|
|
21
|
+
import "../../mui_extended/Badge/index.cad260fe.js";
|
|
22
|
+
import "../../Image/index.c18ebf5a.js";
|
|
23
|
+
import "@mui/lab";
|
|
24
|
+
import "../../mui_extended/MenuActions/index.43a2e1ae.js";
|
|
25
|
+
import "../../mui_extended/Popover/index.9f35d0eb.js";
|
|
26
|
+
import "../../mui_extended/Pager/index.82e89328.js";
|
|
27
|
+
import "../../mui_extended/Tab/index.c39a6681.js";
|
|
28
|
+
import "../../mui_extended/Tooltip/index.5a795dcd.js";
|
|
29
|
+
const RHFCheckboxRoot = styled("div")(({
|
|
53
30
|
theme
|
|
54
31
|
}) => ({
|
|
55
32
|
...theme.components?.M4LRHFCheckbox?.styleOverrides
|
|
56
33
|
}));
|
|
57
|
-
styled
|
|
34
|
+
styled("div")(() => ({
|
|
58
35
|
display: "flex",
|
|
59
36
|
justifyContent: "center",
|
|
60
37
|
alignItems: "center",
|
|
61
38
|
padding: "8px"
|
|
62
39
|
}));
|
|
63
|
-
styled
|
|
40
|
+
styled(Skeleton)(() => ({
|
|
64
41
|
width: "20px",
|
|
65
42
|
height: "20px",
|
|
66
43
|
borderRadius: "4px"
|
|
67
44
|
}));
|
|
68
|
-
const ContainerCheckTypography = styled
|
|
45
|
+
const ContainerCheckTypography = styled("div")(() => ({
|
|
69
46
|
display: "flex",
|
|
70
47
|
alignItems: "center"
|
|
71
48
|
}));
|
|
@@ -92,6 +69,10 @@ const useUtilityClasses = (ownerState) => {
|
|
|
92
69
|
...composedClasses
|
|
93
70
|
};
|
|
94
71
|
};
|
|
72
|
+
const RHFCHEKCBOX_PREFIX = "RHFCheckbox";
|
|
73
|
+
const getNameDataTestId = (KEY, NAME) => {
|
|
74
|
+
return `${RHFCHEKCBOX_PREFIX}-${NAME}-${KEY}`;
|
|
75
|
+
};
|
|
95
76
|
function RHFCheckbox(props) {
|
|
96
77
|
const {
|
|
97
78
|
name,
|
|
@@ -99,15 +80,15 @@ function RHFCheckbox(props) {
|
|
|
99
80
|
label,
|
|
100
81
|
disabled = false
|
|
101
82
|
} = props;
|
|
102
|
-
const isSkeleton = useModuleSkeleton();
|
|
103
83
|
const {
|
|
104
84
|
control,
|
|
105
85
|
formState: {
|
|
106
86
|
errors
|
|
107
87
|
}
|
|
108
88
|
} = useFormContext();
|
|
89
|
+
const isDesktop = useResponsiveDesktop();
|
|
109
90
|
const ownerState = {
|
|
110
|
-
sizeCheck,
|
|
91
|
+
sizeCheck: !isDesktop ? "medium" : sizeCheck,
|
|
111
92
|
disabled,
|
|
112
93
|
error: errors[name] ? true : false
|
|
113
94
|
};
|
|
@@ -126,29 +107,23 @@ function RHFCheckbox(props) {
|
|
|
126
107
|
error
|
|
127
108
|
}
|
|
128
109
|
}) => {
|
|
129
|
-
return
|
|
130
|
-
children: [/* @__PURE__ */
|
|
110
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
111
|
+
children: [/* @__PURE__ */ jsx(ContainerCheckTypography, {
|
|
131
112
|
className: classes.checkTypography,
|
|
132
113
|
...process.env.NODE_ENV !== "production" ? {
|
|
133
114
|
[TEST_PROP_ID]: getNameDataTestId("checkTypography", name)
|
|
134
115
|
} : {},
|
|
135
|
-
children:
|
|
116
|
+
children: /* @__PURE__ */ jsx(CheckBox, {
|
|
136
117
|
size: sizeCheck,
|
|
137
118
|
...field,
|
|
138
119
|
checked: field.value,
|
|
139
120
|
disabled: disabled ? true : false,
|
|
140
|
-
disableRipple: true
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
children: label
|
|
144
|
-
})]
|
|
121
|
+
disableRipple: true,
|
|
122
|
+
label
|
|
123
|
+
})
|
|
145
124
|
}), error?.message && /* @__PURE__ */ jsx(HelperText, {
|
|
146
125
|
message: error?.message + ""
|
|
147
126
|
})]
|
|
148
|
-
}) : /* @__PURE__ */ jsx(SkeletonRHFCheckBox, {
|
|
149
|
-
classes,
|
|
150
|
-
hasLabel: !!label,
|
|
151
|
-
fieldName: name
|
|
152
127
|
});
|
|
153
128
|
}
|
|
154
129
|
})
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { FormControlLabelProps } from '@mui/material';
|
|
2
|
-
export interface RHFCheckboxProps extends Omit<FormControlLabelProps, 'control'> {
|
|
2
|
+
export interface RHFCheckboxProps extends Omit<FormControlLabelProps, 'control' | 'label'> {
|
|
3
3
|
name: string;
|
|
4
4
|
sizeCheck?: 'small' | 'medium';
|
|
5
|
+
label?: string;
|
|
5
6
|
}
|
|
6
7
|
export interface RHFMultiCheckboxProps extends Omit<FormControlLabelProps, 'control' | 'label'> {
|
|
7
8
|
name: string;
|
|
@@ -3,27 +3,28 @@ import { DateTimePicker } from "@mui/x-date-pickers";
|
|
|
3
3
|
import { useModuleSkeleton } from "@m4l/core";
|
|
4
4
|
import { Skeleton, generateUtilityClasses, generateUtilityClass, styled as styled$1 } from "@mui/material";
|
|
5
5
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
6
|
-
import { useFormatter } from "@m4l/graphics";
|
|
6
|
+
import { useFormatter, useResponsiveDesktop } from "@m4l/graphics";
|
|
7
7
|
import { useState, useEffect } from "react";
|
|
8
8
|
import clsx from "clsx";
|
|
9
9
|
import "../../Icon/index.9fcd1476.js";
|
|
10
10
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
11
11
|
import "../../mui_extended/IconButton/index.12f1a3c3.js";
|
|
12
|
-
import "../../mui_extended/Accordion/index.
|
|
12
|
+
import "../../mui_extended/Accordion/index.a6447bf8.js";
|
|
13
13
|
import { T as Typography } from "../../mui_extended/Typography/index.443590d6.js";
|
|
14
14
|
import "../../mui_extended/Avatar/index.75e6ed57.js";
|
|
15
15
|
import "react-router-dom";
|
|
16
16
|
import "@mui/material/Button";
|
|
17
17
|
import "../../mui_extended/Button/index.4288f9fc.js";
|
|
18
|
-
import "../../mui_extended/
|
|
18
|
+
import "../../mui_extended/CheckBox.5f6c78b0.js";
|
|
19
|
+
import "../../mui_extended/Badge/index.cad260fe.js";
|
|
19
20
|
import "../../Image/index.c18ebf5a.js";
|
|
20
21
|
import "@mui/lab";
|
|
21
22
|
import "../../mui_extended/MenuActions/index.43a2e1ae.js";
|
|
22
23
|
import "../../mui_extended/Popover/index.9f35d0eb.js";
|
|
23
|
-
import "../../mui_extended/Pager/index.
|
|
24
|
-
import "../../mui_extended/Tab/index.
|
|
24
|
+
import "../../mui_extended/Pager/index.82e89328.js";
|
|
25
|
+
import "../../mui_extended/Tab/index.c39a6681.js";
|
|
25
26
|
import "../../mui_extended/Tooltip/index.5a795dcd.js";
|
|
26
|
-
import { H as HelperText } from "../../HelperText/index.
|
|
27
|
+
import { H as HelperText } from "../../HelperText/index.6ef76993.js";
|
|
27
28
|
import { styled } from "@mui/material/styles";
|
|
28
29
|
import { unstable_composeClasses } from "@mui/base";
|
|
29
30
|
const SKTRHFWrapperTextField = styled("div")(({
|
|
@@ -131,10 +132,11 @@ function RHFDateTime(props) {
|
|
|
131
132
|
const handlerBlur = () => {
|
|
132
133
|
setIsFocus(false);
|
|
133
134
|
};
|
|
135
|
+
const isDesktop = useResponsiveDesktop();
|
|
134
136
|
const ownerState = {
|
|
135
137
|
isFocus,
|
|
136
138
|
disabled,
|
|
137
|
-
size,
|
|
139
|
+
size: isDesktop ? size : "medium",
|
|
138
140
|
variant: currentVariant
|
|
139
141
|
};
|
|
140
142
|
const classes = useUtilityClasses(ownerState);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { styled, generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
2
2
|
import { useFormContext, Controller } from "react-hook-form";
|
|
3
|
-
import { H as HelperText } from "../../HelperText/index.
|
|
4
|
-
import { P as Period } from "../../Period/index.
|
|
3
|
+
import { H as HelperText } from "../../HelperText/index.6ef76993.js";
|
|
4
|
+
import { P as Period } from "../../Period/index.26071a16.js";
|
|
5
5
|
import { unstable_composeClasses } from "@mui/base";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
const RHFPeriodRoot = styled("div")(({
|
|
@@ -6,13 +6,13 @@ import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
|
6
6
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
7
7
|
import "../../Icon/index.9fcd1476.js";
|
|
8
8
|
import "clsx";
|
|
9
|
-
import "@m4l/graphics";
|
|
9
|
+
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
10
10
|
import { useFormContext, Controller } from "react-hook-form";
|
|
11
11
|
import { styled as styled$1 } from "@mui/material/styles";
|
|
12
12
|
import { unstable_composeClasses } from "@mui/base";
|
|
13
13
|
import { g as getComponentUtilityClass } from "../../../utils/index.c43a95f4.js";
|
|
14
14
|
import { T as Typography } from "../../mui_extended/Typography/index.443590d6.js";
|
|
15
|
-
import { H as HelperText } from "../../HelperText/index.
|
|
15
|
+
import { H as HelperText } from "../../HelperText/index.6ef76993.js";
|
|
16
16
|
const SkeletonTextFieldRoot = styled("div")(() => ({
|
|
17
17
|
display: "flex",
|
|
18
18
|
flexDirection: "column",
|
|
@@ -156,6 +156,7 @@ const RHFTextField = forwardRef((props, ref) => {
|
|
|
156
156
|
} = useFormContext();
|
|
157
157
|
const [isFocus, setIsFocus] = useState(false);
|
|
158
158
|
const [currentVariant, setCurrentVariant] = useState(null);
|
|
159
|
+
const isDesktop = useResponsiveDesktop();
|
|
159
160
|
useEffect(() => {
|
|
160
161
|
if (errors[nameRHF]) {
|
|
161
162
|
setCurrentVariant("error");
|
|
@@ -173,7 +174,7 @@ const RHFTextField = forwardRef((props, ref) => {
|
|
|
173
174
|
};
|
|
174
175
|
const ownerState = {
|
|
175
176
|
type: type === "password" ? "password" : "text",
|
|
176
|
-
size,
|
|
177
|
+
size: !isDesktop ? "medium" : size,
|
|
177
178
|
focus: isFocus,
|
|
178
179
|
variant: currentVariant,
|
|
179
180
|
disabled
|