@m4l/components 0.2.25 → 0.2.26

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.
Files changed (129) hide show
  1. package/@types/export.d.ts +3 -0
  2. package/components/AccountPopover/{index.505e278a.js → index.e31fc908.js} +2 -2
  3. package/components/AppBar/{index.7106417d.js → index.4945897e.js} +3 -4
  4. package/components/CommonActions/components/ActionCancel/{index.de862adf.js → index.33a748be.js} +2 -2
  5. package/components/CommonActions/components/ActionFormCancel/{index.3fd5c858.js → index.9a965204.js} +4 -4
  6. package/components/CommonActions/components/ActionFormIntro/{index.07394f62.js → index.7add0125.js} +2 -2
  7. package/components/CommonActions/components/ActionIntro/{index.79fc2386.js → index.ac7cd0ee.js} +2 -2
  8. package/components/CommonActions/components/Actions/{index.2f6286eb.js → index.389f9b28.js} +1 -2
  9. package/components/DataGrid/formatters/ColumnBooleanFormatter/{index.36270dd1.js → index.f731d23f.js} +1 -1
  10. package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/{index.8b008692.js → index.ad82747c.js} +1 -1
  11. package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/{index.cb308086.js → index.64854fdd.js} +1 -1
  12. package/components/DataGrid/formatters/ColumnPointsFormatter/{index.f3d6036f.js → index.4335c26b.js} +1 -1
  13. package/components/DataGrid/{index.b1eafce1.js → index.1c695ed3.js} +4 -5
  14. package/components/DataGrid/subcomponents/Actions/{index.9af87fa1.js → index.4a402633.js} +11 -12
  15. package/components/DataGrid/subcomponents/editors/TextEditor/{index.91380a55.js → index.eac1749c.js} +12 -1
  16. package/components/DragResizeWindow/{index.051c743d.js → index.f84451f8.js} +2 -3
  17. package/components/DynamicFilter/{index.b93e5649.js → index.22ba3195.js} +16 -16
  18. package/components/FieldLabel/FieldLabel.d.ts +2 -0
  19. package/components/FieldLabel/classes/constants.d.ts +1 -0
  20. package/components/FieldLabel/classes/index.d.ts +10 -0
  21. package/components/FieldLabel/classes/types.d.ts +11 -0
  22. package/components/FieldLabel/index.1da2a28d.js +82 -0
  23. package/components/FieldLabel/index.d.ts +1 -0
  24. package/components/FieldLabel/types.d.ts +8 -0
  25. package/components/HamburgerMenu/{index.25029e23.js → index.1663edef.js} +2 -2
  26. package/components/Icon/{index.b920baf8.js → index.8c744412.js} +1 -1
  27. package/components/Image/{index.d034ca68.js → index.39b3b9d9.js} +3 -4
  28. package/components/LanguagePopover/{index.e54c5cc7.js → index.80896e49.js} +3 -3
  29. package/components/LoadingError/{index.123e16f8.js → index.9c64680a.js} +2 -2
  30. package/components/MFLoader/{index.52096ea5.js → index.7cd7c372.js} +1 -1
  31. package/components/ModalDialog/{index.2e931b5f.js → index.ce0f4d16.js} +3 -3
  32. package/components/NoItemSelected/{index.1024b856.js → index.ffba558b.js} +2 -3
  33. package/components/ObjectLogs/{index.d10f4a2f.js → index.dd6a5009.js} +7 -8
  34. package/components/PDFViewer/{index.98852f91.js → index.093ddd35.js} +1 -1
  35. package/components/Page/{index.def863f2.js → index.1b20a73e.js} +1 -1
  36. package/components/PaperForm/{index.8a617a66.js → index.42e78a24.js} +2 -3
  37. package/components/Period/classes/index.d.ts +3 -1
  38. package/components/Period/classes/types.d.ts +6 -1
  39. package/components/Period/{index.d80dff10.js → index.6e8d92dc.js} +76 -61
  40. package/components/Period/subcomponents/SkeletonPeriod/index.d.ts +2 -0
  41. package/components/Period/subcomponents/SkeletonPeriod/types.d.ts +4 -0
  42. package/components/Period/types.d.ts +4 -1
  43. package/components/PrintingSystem/{index.2e17cae5.js → index.c2d21657.js} +14 -14
  44. package/components/PrintingSystem/subcomponents/BodyNode/{index.c5ffe20a.js → index.c7b59f3f.js} +1 -1
  45. package/components/PrintingSystem/subcomponents/ChartNode/{index.020c037c.js → index.263f02f0.js} +1 -1
  46. package/components/PrintingSystem/subcomponents/DividerNode/{index.78b023bb.js → index.f00c44f3.js} +1 -1
  47. package/components/PrintingSystem/subcomponents/FooterNode/{index.b29fc1e9.js → index.fb323704.js} +1 -1
  48. package/components/PrintingSystem/subcomponents/GridNode/{index.11626284.js → index.1ed935be.js} +1 -1
  49. package/components/PrintingSystem/subcomponents/HeaderNode/{index.ef44c8ab.js → index.5173c74a.js} +1 -1
  50. package/components/PrintingSystem/subcomponents/PaperNode/{index.d72d224b.js → index.fad64696.js} +1 -1
  51. package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.8e53440c.js → index.3a3e5fd0.js} +1 -1
  52. package/components/PrintingSystem/subcomponents/SectionNode/{index.0b66458e.js → index.2890fc12.js} +1 -1
  53. package/components/PrintingSystem/subcomponents/TextBoxNode/{index.b4c72fef.js → index.148708e6.js} +1 -1
  54. package/components/PropertyValue/{index.3b6670d4.js → index.4ea5af0f.js} +2 -3
  55. package/components/Resizeable/{index.0eb66c37.js → index.8db8f77d.js} +1 -1
  56. package/components/ScrollBar/{index.010f1b9d.js → index.7dfc2f29.js} +4 -3
  57. package/components/ScrollBar/index.d.ts +2 -2
  58. package/components/SideBar/classes/index.d.ts +7 -2
  59. package/components/SideBar/classes/types.d.ts +6 -1
  60. package/components/SideBar/constants.d.ts +2 -0
  61. package/components/SideBar/context/sideBarContext/types.d.ts +3 -1
  62. package/components/SideBar/{index.cdb70977.js → index.141dac10.js} +251 -410
  63. package/components/SideBar/subcomponents/ContentDesktop/subcomponents/CollapseButton/index.d.ts +1 -1
  64. package/components/SideBar/subcomponents/ContentDesktop/subcomponents/ContentComponent/index.d.ts +1 -0
  65. package/components/SideBar/subcomponents/ContentGroups/index.d.ts +1 -1
  66. package/components/SideBar/types.d.ts +1 -4
  67. package/components/SplitLayout/{index.30fd5861.js → index.3856385c.js} +1 -2
  68. package/components/ToastContainer/{index.97fdba82.js → index.98c4873e.js} +2 -2
  69. package/components/areas/components/AreasAdmin/{index.e4f0ccc1.js → index.debe3e3d.js} +13 -14
  70. package/components/areas/components/AreasViewer/{index.f87c63ca.js → index.82a22acb.js} +9 -10
  71. package/components/areas/contexts/AreasContext/{index.3e3d8c62.js → index.0dc69929.js} +2 -2
  72. package/components/areas/hooks/useAreas/{index.b18fe111.js → index.ca15a4b6.js} +1 -1
  73. package/components/commercial/TopBar/{index.8e2163f7.js → index.32a332c4.js} +5 -18
  74. package/components/formatters/BooleanFormatter/{index.b3052107.js → index.0703a256.js} +2 -2
  75. package/components/formatters/PointsFormatter/{index.5c94c5e8.js → index.8a4fa393.js} +4 -4
  76. package/components/formatters/{index.95cc337e.js → index.94be7098.js} +1 -1
  77. package/components/hook-form/RHFAutocomplete/{index.cf399b24.js → index.993794f8.js} +22 -11
  78. package/components/hook-form/RHFAutocomplete/types.d.ts +5 -6
  79. package/components/hook-form/RHFAutocompleteAsync/{index.b2b75475.js → index.924c6473.js} +2 -3
  80. package/components/hook-form/RHFCheckbox/{index.a38715e3.js → index.f1fd5789.js} +18 -8
  81. package/components/hook-form/RHFCheckbox/types.d.ts +2 -1
  82. package/components/hook-form/RHFColorPicker/RFHColorPicker.d.ts +8 -0
  83. package/components/hook-form/RHFColorPicker/classes/index.d.ts +2 -1
  84. package/components/hook-form/RHFColorPicker/classes/types.d.ts +2 -0
  85. package/components/hook-form/RHFColorPicker/dictionary.d.ts +1 -0
  86. package/components/hook-form/RHFColorPicker/index.60b50052.js +188 -0
  87. package/components/hook-form/RHFColorPicker/index.d.ts +2 -8
  88. package/components/hook-form/RHFColorPicker/subcomponents/Skeleton/indext.d.ts +2 -1
  89. package/components/hook-form/RHFColorPicker/subcomponents/Skeleton/types.d.ts +3 -0
  90. package/components/hook-form/RHFColorPicker/types.d.ts +11 -2
  91. package/components/hook-form/RHFDateTime/classes/types.d.ts +2 -0
  92. package/components/hook-form/RHFDateTime/{index.5a673a96.js → index.2396ea4a.js} +35 -37
  93. package/components/hook-form/RHFDateTime/subcomponents/Skeleton/types.d.ts +3 -2
  94. package/components/hook-form/RHFDateTime/types.d.ts +2 -1
  95. package/components/hook-form/RHFPeriod/{index.4205c8ab.js → index.011965ef.js} +18 -4
  96. package/components/hook-form/RHFPeriod/types.d.ts +3 -1
  97. package/components/hook-form/RHFTextField/{index.fbb29ee1.js → index.fb0d1cac.js} +21 -12
  98. package/components/hook-form/RHFTextField/types.d.ts +2 -2
  99. package/components/hook-form/RHFTextFieldPassword/types.d.ts +0 -1
  100. package/components/hook-form/RHFUpload/{index.05d7e2a7.js → index.e5f734b8.js} +4 -5
  101. package/components/hook-form/index.d.ts +1 -1
  102. package/components/index.d.ts +1 -0
  103. package/components/modal/{WindowBase.998b8a38.js → WindowBase.dd1d2d7b.js} +3 -3
  104. package/components/modal/{WindowConfirm.55ac3c8f.js → WindowConfirm.4501497a.js} +6 -6
  105. package/components/mui_extended/Accordion/{index.fb4eb664.js → index.4393eca9.js} +2 -2
  106. package/components/mui_extended/Button/{index.e520bd15.js → index.93389adb.js} +1 -1
  107. package/components/mui_extended/CheckBox/types.d.ts +2 -1
  108. package/components/mui_extended/{CheckBox.e662d20c.js → CheckBox.840a443f.js} +21 -23
  109. package/components/mui_extended/IconButton/{index.9ea23f87.js → index.383f5496.js} +1 -1
  110. package/components/mui_extended/MenuActions/{index.fa7c26a5.js → index.e6e3aac8.js} +4 -5
  111. package/components/mui_extended/Pager/{index.0c703574.js → index.5791276c.js} +2 -3
  112. package/components/mui_extended/Popover/{index.b3eca6b1.js → index.d85de73b.js} +1 -2
  113. package/components/mui_extended/Tab/{index.409b9c74.js → index.2068925d.js} +2 -3
  114. package/components/mui_extended/ToggleButton/{index.bcaea74b.js → index.4ac1f974.js} +1 -1
  115. package/components/mui_extended/ToggleIconButton/{index.131772d7.js → index.8ca0114f.js} +1 -1
  116. package/contexts/ModalContext/{index.978a412d.js → index.dde4e35a.js} +1 -1
  117. package/contexts/RHFormContext/{index.7769076a.js → index.7b2a8723.js} +1 -2
  118. package/hooks/useFormAddEdit/{index.4caddd24.js → index.7fdad61d.js} +2 -2
  119. package/hooks/useModal/{index.786a4439.js → index.2f1d6a07.js} +1 -1
  120. package/hooks/useTab/{index.eee18a49.js → index.c0564138.js} +1 -1
  121. package/index.js +118 -115
  122. package/{node_modules.71622512.js → node_modules.585eab0e.js} +1 -1
  123. package/package.json +1 -1
  124. package/{vendor.a735310a.js → vendor.173d0b89.js} +68 -67
  125. package/components/SideBar/subcomponents/ContentGroups/subcomponents/Skeleton/index.d.ts +0 -1
  126. package/components/SideBar/subcomponents/ContentGroups/subcomponents/Skeleton/types.d.ts +0 -3
  127. package/components/SideBar/subcomponents/ContentGroups/type.d.ts +0 -7
  128. package/components/hook-form/RHFColorPicker/index.48a1ee1b.js +0 -153
  129. package/components/mui_extended/Popover/index.d.ts +0 -2
@@ -0,0 +1,188 @@
1
+ import { useState } from "react";
2
+ import { useFormContext, useWatch, Controller } from "react-hook-form";
3
+ import { useModuleSkeleton, useEnvironment, useModuleDictionary } from "@m4l/core";
4
+ import { S as SketchPicker } from "../../../node_modules.585eab0e.js";
5
+ import "lodash-es/debounce";
6
+ import "lodash-es/each";
7
+ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
8
+ import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
9
+ import { generateUtilityClasses, generateUtilityClass, styled, Skeleton } from "@mui/material";
10
+ import { unstable_composeClasses } from "@mui/base";
11
+ import { useTheme } from "@mui/material/styles";
12
+ import { useResponsiveDesktop } from "@m4l/graphics";
13
+ import { F as FieldLabel } from "../../FieldLabel/index.1da2a28d.js";
14
+ import { P as Popover } from "../../mui_extended/Popover/index.d85de73b.js";
15
+ import { I as Icon } from "../../Icon/index.8c744412.js";
16
+ import { B as Button } from "../../mui_extended/Button/index.93389adb.js";
17
+ const componentName = "M4LRHFColorPicker";
18
+ const colorPickerClasses = generateUtilityClasses(componentName, [
19
+ "root",
20
+ "popoverRoot",
21
+ "containerFieldColor",
22
+ "fieldColor",
23
+ "containerPicker",
24
+ "skeleton",
25
+ "sizeSmall",
26
+ "sizeMedium"
27
+ ]);
28
+ function getRHFColorPickerUtilityClass(slot) {
29
+ return generateUtilityClass(componentName, slot);
30
+ }
31
+ const useUtilityClasses = (owmerState) => {
32
+ const slots = {
33
+ root: ["root", owmerState.size === "small" && "sizeSmall", owmerState.size === "medium" && "sizeMedium"],
34
+ popoverRoot: ["popoverRoot"],
35
+ containerFieldColor: ["containerFieldColor"],
36
+ fieldColor: ["boxColor"],
37
+ containerPicker: ["containerPicker"],
38
+ skeleton: ["skeleton"]
39
+ };
40
+ const composedClasses = unstable_composeClasses(slots, getRHFColorPickerUtilityClass, {});
41
+ return {
42
+ ...composedClasses
43
+ };
44
+ };
45
+ const RHFColorPickerRoot = styled("div")(({ theme }) => ({
46
+ ...theme.components?.M4LRHFColorPicker?.styleOverrides
47
+ }));
48
+ const RHFColorPickerSkeleton = (props) => {
49
+ const {
50
+ label
51
+ } = props;
52
+ return /* @__PURE__ */ jsxs("div", {
53
+ className: colorPickerClasses.skeleton,
54
+ children: [label && /* @__PURE__ */ jsx(Skeleton, {
55
+ variant: "text",
56
+ width: "30%",
57
+ height: "14px"
58
+ }), /* @__PURE__ */ jsx(Skeleton, {
59
+ className: colorPickerClasses.skeleton,
60
+ variant: "rectangular",
61
+ width: 20,
62
+ height: 20
63
+ })]
64
+ });
65
+ };
66
+ const RHFColorPicker = (props) => {
67
+ const {
68
+ name,
69
+ size = "small",
70
+ label,
71
+ mandatory,
72
+ mandatoryMessage,
73
+ helperMessage
74
+ } = props;
75
+ const {
76
+ control,
77
+ setValue,
78
+ trigger
79
+ } = useFormContext();
80
+ const isSkeleton = useModuleSkeleton();
81
+ const {
82
+ host_static_assets,
83
+ environment_assets
84
+ } = useEnvironment();
85
+ const theme = useTheme();
86
+ const currentColor = useWatch({
87
+ name,
88
+ control
89
+ });
90
+ const isDesktop = useResponsiveDesktop();
91
+ const [tempColor, setTempColor] = useState(() => currentColor || "#ffffff");
92
+ const [anchorEl, setAnchorEl] = useState(null);
93
+ const {
94
+ getLabel
95
+ } = useModuleDictionary();
96
+ const handleColorChange = (color) => {
97
+ console.log("react color pick", color.hex);
98
+ setTempColor(color.hex);
99
+ };
100
+ const handleApprove = () => {
101
+ setAnchorEl(null);
102
+ if (tempColor !== currentColor) {
103
+ setValue(name, tempColor);
104
+ trigger(name);
105
+ }
106
+ };
107
+ const ownerState = {
108
+ size: isDesktop ? size : "medium"
109
+ };
110
+ const classes = useUtilityClasses(ownerState);
111
+ return /* @__PURE__ */ jsx(RHFColorPickerRoot, {
112
+ className: classes.root,
113
+ children: !isSkeleton ? /* @__PURE__ */ jsx(Controller, {
114
+ name,
115
+ control,
116
+ defaultValue: "",
117
+ render: ({
118
+ field: {
119
+ value
120
+ },
121
+ fieldState: {
122
+ error
123
+ }
124
+ }) => /* @__PURE__ */ jsxs(Fragment, {
125
+ children: [label && /* @__PURE__ */ jsx(FieldLabel, {
126
+ label,
127
+ mandatory,
128
+ mandatoryMessage,
129
+ helperMessage
130
+ }), /* @__PURE__ */ jsxs("div", {
131
+ className: classes.containerFieldColor,
132
+ onClick: (event) => setAnchorEl(event.currentTarget),
133
+ children: [/* @__PURE__ */ jsx("div", {
134
+ className: classes.fieldColor,
135
+ style: {
136
+ backgroundColor: value
137
+ }
138
+ }), /* @__PURE__ */ jsx(Icon, {
139
+ src: `${host_static_assets}/${environment_assets}/frontend/components/rhfcolorpicker/assets/icons/chevron_right.svg`
140
+ })]
141
+ }), error?.message && /* @__PURE__ */ jsx(HelperText, {
142
+ variant: "error",
143
+ message: error?.message + ""
144
+ }), /* @__PURE__ */ jsx(Popover, {
145
+ open: Boolean(anchorEl),
146
+ arrowType: "top-center",
147
+ className: classes.popoverRoot,
148
+ anchorEl,
149
+ onClose: () => setAnchorEl(null),
150
+ anchorOrigin: {
151
+ vertical: "bottom",
152
+ horizontal: "center"
153
+ },
154
+ transformOrigin: {
155
+ vertical: "top",
156
+ horizontal: "center"
157
+ },
158
+ sx: {
159
+ mt: "12px",
160
+ ml: -1.25,
161
+ ...theme.components?.M4LRHFColorPickerPopoverRoot?.styleOverrides
162
+ },
163
+ children: /* @__PURE__ */ jsxs("div", {
164
+ className: classes.containerPicker,
165
+ children: [/* @__PURE__ */ jsx(SketchPicker, {
166
+ color: tempColor,
167
+ onChange: handleColorChange,
168
+ disableAlpha: true
169
+ }), /* @__PURE__ */ jsx(Button, {
170
+ variant: "contained",
171
+ onClick: handleApprove,
172
+ children: getLabel("rhfcolorpicker.accept")
173
+ })]
174
+ })
175
+ })]
176
+ })
177
+ }) : /* @__PURE__ */ jsx(RHFColorPickerSkeleton, {
178
+ label
179
+ })
180
+ });
181
+ };
182
+ function getRHFColorPickerComponentsDictionary() {
183
+ return ["rhfcolorpicker"];
184
+ }
185
+ export {
186
+ RHFColorPicker as R,
187
+ getRHFColorPickerComponentsDictionary as g
188
+ };
@@ -1,8 +1,2 @@
1
- import { RHFColorPickerProps } from './types';
2
- /**
3
- * Componente RHFColorPicker para seleccionar colores con React Hook Form.
4
- * @component
5
- * @param {RHFColorPickerProps} props - Propiedades del componente.
6
- * @returns {JSX.Element} - Elemento JSX que representa el componente.
7
- */
8
- export declare const RHFColorPicker: (props: RHFColorPickerProps) => import("react/jsx-runtime").JSX.Element;
1
+ export { RHFColorPicker } from './RFHColorPicker';
2
+ export { getRHFColorPickerComponentsDictionary } from './dictionary';
@@ -1 +1,2 @@
1
- export declare const Skeleton: () => import("react/jsx-runtime").JSX.Element;
1
+ import { RHFColorPickerSkeletoProps } from './types';
2
+ export declare const RHFColorPickerSkeleton: (props: RHFColorPickerSkeletoProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { RHFColorPickerProps } from "../../types";
2
+ export interface RHFColorPickerSkeletoProps extends Pick<RHFColorPickerProps, 'label'> {
3
+ }
@@ -1,8 +1,17 @@
1
- export interface RHFColorPickerProps {
1
+ import { FieldLabelProps } from "../../FieldLabel/types";
2
+ export interface RHFColorPickerProps extends Omit<FieldLabelProps, 'label'> {
3
+ /**
4
+ * Nombre de etiqueta del campo
5
+ */
6
+ label?: string;
2
7
  /**
3
8
  * Identificador del campo dentro del formulario de react hook form
4
9
  */
5
10
  name: string;
11
+ /**
12
+ * Variaciones de tamaño para el componente
13
+ */
14
+ size?: 'small' | 'medium';
6
15
  }
7
- export interface OwnerState {
16
+ export interface OwnerState extends Pick<RHFColorPickerProps, 'size'> {
8
17
  }
@@ -1,3 +1,4 @@
1
+ import { useUtilityClasses } from ".";
1
2
  export interface RHFDateTimeClassesType {
2
3
  root: string;
3
4
  skeleton: string;
@@ -11,3 +12,4 @@ export interface RHFDateTimeClassesType {
11
12
  variantError: string;
12
13
  }
13
14
  export declare type RHFDateTimeClassesKey = keyof RHFDateTimeClassesType;
15
+ export declare type RHFDateTimeClasses = ReturnType<typeof useUtilityClasses>;
@@ -1,45 +1,37 @@
1
1
  import { useFormContext, Controller } from "react-hook-form";
2
2
  import { DateTimePicker } from "@mui/x-date-pickers";
3
3
  import { useEnvironment, useModuleSkeleton } from "@m4l/core";
4
- import { Skeleton, generateUtilityClasses, generateUtilityClass, styled as styled$1 } from "@mui/material";
5
- import { styled } from "@mui/material/styles";
6
- import { jsxs, jsx, Fragment } from "react/jsx-runtime";
4
+ import { Skeleton, generateUtilityClasses, generateUtilityClass, styled } from "@mui/material";
5
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
7
6
  import { useFormatter, useResponsiveDesktop } from "@m4l/graphics";
8
7
  import { useState, useEffect } from "react";
9
8
  import { unstable_composeClasses } from "@mui/base";
10
9
  import clsx from "clsx";
11
10
  import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
12
11
  import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
13
- import { T as Typography } from "../../mui_extended/Typography/index.379dd374.js";
14
- import { I as Icon } from "../../Icon/index.b920baf8.js";
15
- const SKTRHFWrapperTextField = styled("div")(({
16
- theme
17
- }) => ({
18
- display: "flex",
19
- width: "100%",
20
- height: "42.25px",
21
- alignItems: "center",
22
- justifyContent: "space-between",
23
- border: `1px solid ${theme.palette.divider}`,
24
- padding: "0 14px",
25
- borderRadius: theme.spacing(0.5)
26
- }));
12
+ import { F as FieldLabel } from "../../FieldLabel/index.1da2a28d.js";
13
+ import { I as Icon } from "../../Icon/index.8c744412.js";
27
14
  const SkeletonRHFDateTime = (props) => {
28
15
  const {
29
16
  skeletonWidth,
30
17
  skeletonHeight,
31
- className
32
- } = props;
33
- return /* @__PURE__ */ jsxs(SKTRHFWrapperTextField, {
34
18
  className,
35
- children: [/* @__PURE__ */ jsx(Skeleton, {
19
+ label
20
+ } = props;
21
+ return /* @__PURE__ */ jsxs(Fragment, {
22
+ children: [label && /* @__PURE__ */ jsx(Skeleton, {
36
23
  variant: "text",
37
- width: skeletonWidth,
38
- height: skeletonHeight
39
- }), /* @__PURE__ */ jsx(Skeleton, {
40
- variant: "circular",
41
- width: "20px",
42
- height: "20px"
24
+ height: "14px",
25
+ width: "30%"
26
+ }), /* @__PURE__ */ jsxs("div", {
27
+ className: className.skeleton,
28
+ children: [/* @__PURE__ */ jsx(Skeleton, {
29
+ variant: "text",
30
+ width: skeletonWidth,
31
+ height: skeletonHeight
32
+ }), /* @__PURE__ */ jsx(Skeleton, {
33
+ variant: "circular"
34
+ })]
43
35
  })]
44
36
  });
45
37
  };
@@ -69,7 +61,7 @@ const useUtilityClasses = (ownerState) => {
69
61
  ...composedClasses
70
62
  };
71
63
  };
72
- const RHFDateTimeRoot = styled$1("div")(({ theme }) => ({
64
+ const RHFDateTimeRoot = styled("div")(({ theme }) => ({
73
65
  ...theme.components?.M4LRHFDateTime?.styleOverrides
74
66
  }));
75
67
  const RHFDATETIME_PREFIX = "RHFDateTime";
@@ -86,7 +78,9 @@ function RHFDateTime(props) {
86
78
  skeletonHeight = 14,
87
79
  className,
88
80
  label,
89
- helperMessage
81
+ helperMessage,
82
+ mandatory,
83
+ mandatoryMessage
90
84
  } = props;
91
85
  const {
92
86
  host_static_assets,
@@ -152,10 +146,13 @@ function RHFDateTime(props) {
152
146
  error
153
147
  }
154
148
  }) => {
149
+ console.log("RHFDateTime value", typeof value);
155
150
  return /* @__PURE__ */ jsxs(Fragment, {
156
- children: [label && /* @__PURE__ */ jsx(Typography, {
157
- variant: "body",
158
- children: label
151
+ children: [label && /* @__PURE__ */ jsx(FieldLabel, {
152
+ label,
153
+ mandatory,
154
+ mandatoryMessage,
155
+ helperMessage
159
156
  }), /* @__PURE__ */ jsx(DateTimePicker, {
160
157
  sx: {
161
158
  "& .MuiTouchRipple-root": {
@@ -180,16 +177,17 @@ function RHFDateTime(props) {
180
177
  format: datetimeFormat
181
178
  }
182
179
  }
183
- }), currentVariant ? /* @__PURE__ */ jsx(HelperText, {
184
- variant: currentVariant,
185
- message: currentVariant !== "error" ? helperMessage : error?.message
186
- }) : null]
180
+ }), error?.message && /* @__PURE__ */ jsx(HelperText, {
181
+ variant: "error",
182
+ message: error?.message + ""
183
+ })]
187
184
  });
188
185
  }
189
186
  }) : /* @__PURE__ */ jsx(SkeletonRHFDateTime, {
190
187
  skeletonWidth,
191
188
  skeletonHeight,
192
- className: classes.skeleton
189
+ className: classes,
190
+ label
193
191
  })
194
192
  });
195
193
  }
@@ -1,4 +1,5 @@
1
1
  import { RHFDateTimeProps } from '../../types';
2
- export interface SkeletonRHFDateTimeProps extends Pick<RHFDateTimeProps, 'skeletonWidth' | 'skeletonHeight'> {
3
- className: string;
2
+ import { RHFDateTimeClasses } from '../../classes/types';
3
+ export interface SkeletonRHFDateTimeProps extends Pick<RHFDateTimeProps, 'skeletonWidth' | 'skeletonHeight' | 'label'> {
4
+ className: RHFDateTimeClasses;
4
5
  }
@@ -1,4 +1,5 @@
1
- export interface RHFDateTimeProps {
1
+ import { FieldLabelProps } from "../../FieldLabel/types";
2
+ export interface RHFDateTimeProps extends Omit<FieldLabelProps, 'label'> {
2
3
  skeletonWidth?: string | number;
3
4
  skeletonHeight?: string | number;
4
5
  name: string;
@@ -3,7 +3,8 @@ import { useFormContext, Controller } from "react-hook-form";
3
3
  import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
4
4
  import { unstable_composeClasses } from "@mui/base";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
- import { P as Period } from "../../Period/index.d80dff10.js";
6
+ import { F as FieldLabel } from "../../FieldLabel/index.1da2a28d.js";
7
+ import { P as Period } from "../../Period/index.6e8d92dc.js";
7
8
  const RHFPeriodRoot = styled("div")(({
8
9
  theme
9
10
  }) => ({
@@ -37,7 +38,12 @@ const RHFPeriod = (props) => {
37
38
  readOnly,
38
39
  skeletonWidth,
39
40
  skeletonHeight,
40
- state
41
+ state,
42
+ label,
43
+ mandatory,
44
+ mandatoryMessage,
45
+ helperMessage,
46
+ size
41
47
  } = props;
42
48
  const {
43
49
  control
@@ -55,16 +61,24 @@ const RHFPeriod = (props) => {
55
61
  error
56
62
  }
57
63
  }) => {
64
+ console.log("value RHFPeriod", value);
58
65
  return /* @__PURE__ */ jsxs(RHFPeriodRoot, {
59
66
  className: classes.root,
60
- children: [/* @__PURE__ */ jsx(Period, {
67
+ children: [label && /* @__PURE__ */ jsx(FieldLabel, {
68
+ label,
69
+ mandatory,
70
+ mandatoryMessage,
71
+ helperMessage
72
+ }), /* @__PURE__ */ jsx(Period, {
61
73
  value,
62
74
  onChange,
63
75
  state: !!error === true ? "error" : state,
64
76
  readOnly,
65
77
  skeletonWidth,
66
- skeletonHeight
78
+ skeletonHeight,
79
+ size
67
80
  }), error && /* @__PURE__ */ jsx(HelperText, {
81
+ variant: "error",
68
82
  message: error.message || ""
69
83
  })]
70
84
  });
@@ -1,6 +1,8 @@
1
+ import { FieldLabelProps } from '../../FieldLabel/types';
1
2
  import { PeriodProps, PeriodState, PeriodVariant } from '../../../components/Period/types';
2
- export interface RHFPeriodProps extends Pick<PeriodProps, 'readOnly' | 'skeletonWidth' | 'skeletonHeight'> {
3
+ export interface RHFPeriodProps extends Pick<PeriodProps, 'readOnly' | 'skeletonWidth' | 'skeletonHeight' | 'size'>, Omit<FieldLabelProps, 'label'> {
3
4
  name: string;
4
5
  variant?: PeriodVariant;
5
6
  state?: PeriodState;
7
+ label?: string;
6
8
  }
@@ -1,16 +1,15 @@
1
1
  import { useModuleSkeleton, useEnvironment } from "@m4l/core";
2
2
  import { styled, Skeleton, generateUtilityClasses, TextField, InputAdornment, generateUtilityClass } from "@mui/material";
3
3
  import { forwardRef, useState, useEffect } from "react";
4
- import { I as IconButton } from "../../mui_extended/IconButton/index.9ea23f87.js";
4
+ import { I as IconButton } from "../../mui_extended/IconButton/index.383f5496.js";
5
5
  import { useFormContext, Controller } from "react-hook-form";
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
- import { styled as styled$1 } from "@mui/material/styles";
9
8
  import { unstable_composeClasses } from "@mui/base";
10
9
  import { g as getComponentUtilityClass } from "../../../utils/index.de903261.js";
11
- import { T as Typography } from "../../mui_extended/Typography/index.379dd374.js";
12
10
  import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
13
11
  import { useResponsiveDesktop } from "@m4l/graphics";
12
+ import { F as FieldLabel } from "../../FieldLabel/index.1da2a28d.js";
14
13
  const SkeletonTextFieldRoot = styled("div")(() => ({
15
14
  display: "flex",
16
15
  flexDirection: "column",
@@ -74,12 +73,12 @@ const SkeletonTextField = (props) => {
74
73
  })]
75
74
  });
76
75
  };
77
- const RHFTextFieldRoot = styled$1("div")(({
76
+ const RHFTextFieldRoot = styled("div")(({
78
77
  theme
79
78
  }) => ({
80
79
  ...theme.components?.M4LRHFTextField?.styleOverrides
81
80
  }));
82
- styled$1("div")(({
81
+ styled("div")(({
83
82
  theme
84
83
  }) => ({
85
84
  display: "flex",
@@ -144,6 +143,9 @@ const RHFTextField = forwardRef((props, ref) => {
144
143
  variant,
145
144
  helperMessage = "",
146
145
  disabled,
146
+ mandatory,
147
+ mandatoryMessage,
148
+ helperText,
147
149
  ...other
148
150
  } = props;
149
151
  const {
@@ -209,11 +211,12 @@ const RHFTextField = forwardRef((props, ref) => {
209
211
  onChange(event);
210
212
  };
211
213
  return /* @__PURE__ */ jsxs(Fragment, {
212
- children: [label ? /* @__PURE__ */ jsx(Typography, {
213
- variant: "body",
214
- className: classes.label,
215
- children: label
216
- }) : null, /* @__PURE__ */ jsx(TextField, {
214
+ children: [label && /* @__PURE__ */ jsx(FieldLabel, {
215
+ label,
216
+ mandatory,
217
+ mandatoryMessage,
218
+ helperMessage
219
+ }), /* @__PURE__ */ jsx(TextField, {
217
220
  variant: "outlined",
218
221
  disabled,
219
222
  ref,
@@ -270,7 +273,7 @@ const RHFTextField = forwardRef((props, ref) => {
270
273
  });
271
274
  });
272
275
  RHFTextField.displayName = "RHFTextField";
273
- const RHFTextFieldPasswordRoot = styled$1("div")(({
276
+ const RHFTextFieldPasswordRoot = styled("div")(({
274
277
  theme
275
278
  }) => ({
276
279
  ...theme.components?.M4LRHFTextFieldPassword?.styleOverrides
@@ -300,7 +303,10 @@ const RHFTextFieldPassword = (props) => {
300
303
  label,
301
304
  skeletonWidth,
302
305
  skeletonHeight,
303
- size
306
+ size,
307
+ mandatory,
308
+ mandatoryMessage,
309
+ helperMessage
304
310
  } = props;
305
311
  const [showPassword, setShowPassword] = useState(false);
306
312
  const {
@@ -321,6 +327,9 @@ const RHFTextFieldPassword = (props) => {
321
327
  skeletonWidth,
322
328
  skeletonHeight,
323
329
  size,
330
+ mandatory,
331
+ mandatoryMessage,
332
+ helperMessage,
324
333
  InputProps: {
325
334
  endAdornment: /* @__PURE__ */ jsx(InputAdornment, {
326
335
  position: "end",
@@ -1,7 +1,8 @@
1
1
  import { TextFieldProps } from '@mui/material';
2
2
  import { ReactElement } from 'react';
3
+ import { FieldLabelProps } from '../../FieldLabel/types';
3
4
  export declare type RHFTextFieldVariants = 'info' | 'success' | 'warning';
4
- export interface RHFTextFieldProps extends Omit<TextFieldProps, 'size' | 'inputProps' | 'variant' | 'label'> {
5
+ export interface RHFTextFieldProps extends Omit<TextFieldProps, 'size' | 'inputProps' | 'variant' | 'label'>, Omit<FieldLabelProps, 'label'> {
5
6
  skeletonWidth?: string | number;
6
7
  skeletonHeight?: string | number;
7
8
  name: string;
@@ -9,7 +10,6 @@ export interface RHFTextFieldProps extends Omit<TextFieldProps, 'size' | 'inputP
9
10
  startIcon?: ReactElement;
10
11
  endIcon?: ReactElement;
11
12
  variant?: RHFTextFieldVariants;
12
- helperMessage?: string;
13
13
  label?: string;
14
14
  }
15
15
  export interface RHFTextFieldState extends Pick<RHFTextFieldProps, 'size' | 'disabled'> {
@@ -1,4 +1,3 @@
1
1
  import { RHFTextFieldProps } from '../RHFTextField/types';
2
2
  export interface RHFTextFieldPasswordProps extends RHFTextFieldProps {
3
- label: string;
4
3
  }
@@ -2,15 +2,14 @@ import { useCallback } from "react";
2
2
  import { useFormContext, Controller } from "react-hook-form";
3
3
  import require$$0 from "lodash/isString";
4
4
  import { useDropzone } from "react-dropzone";
5
- import { I as Image } from "../../Image/index.d034ca68.js";
5
+ import { I as Image } from "../../Image/index.39b3b9d9.js";
6
6
  import { useEnvironment, useModuleDictionary, useModuleSkeleton } from "@m4l/core";
7
- import { styled } from "@mui/material/styles";
8
- import { Skeleton, generateUtilityClasses, generateUtilityClass, styled as styled$1 } from "@mui/material";
7
+ import { styled, Skeleton, generateUtilityClasses, generateUtilityClass } from "@mui/material";
9
8
  import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
10
9
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
11
10
  import { unstable_composeClasses } from "@mui/base";
12
11
  import { T as Typography } from "../../mui_extended/Typography/index.379dd374.js";
13
- import { B as Button } from "../../mui_extended/Button/index.e520bd15.js";
12
+ import { B as Button } from "../../mui_extended/Button/index.93389adb.js";
14
13
  import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
15
14
  const UploadImageRoot = styled("div")(({
16
15
  theme
@@ -194,7 +193,7 @@ function UploadImage({
194
193
  })
195
194
  });
196
195
  }
197
- const WrapperRHFUploadImage = styled$1("div")(() => ({
196
+ const WrapperRHFUploadImage = styled("div")(() => ({
198
197
  width: "inherit",
199
198
  height: "inherit",
200
199
  padding: "1px"
@@ -1,5 +1,5 @@
1
1
  export { RHFAutocomplete } from './RHFAutocomplete/RHFAutocomplete';
2
- export { RHFColorPicker } from './RHFColorPicker';
2
+ export * from './RHFColorPicker';
3
3
  export { getRHFAutocompleteComponentsDictionary } from './RHFAutocomplete/dictionary';
4
4
  export { RHFAutocompleteAsync } from './RHFAutocompleteAsync/RHFAutocompleteAsync';
5
5
  export { getRHFAutocompleteAsyncComponentsDictionary } from './RHFAutocompleteAsync/dictionary';
@@ -13,6 +13,7 @@ export { getDataGridComponentsDictionary as getGridComponentsDictionary } from '
13
13
  export { TextEditor, NumberEditor } from './DataGrid/subcomponents/editors/TextEditor';
14
14
  export { getDataGridRowsFromSet } from './DataGrid/utils/getDataGridRowsFromSet';
15
15
  export * from './DynamicFilter/index';
16
+ export * from './FieldLabel';
16
17
  export * from './HelperText';
17
18
  export * from './CommonActions/';
18
19
  export * from './CommonActions/dictionary';
@@ -2,9 +2,9 @@ import { m as modalUtilityClasses } from "./index.61389369.js";
2
2
  import { useEnvironment } from "@m4l/core";
3
3
  import clsx from "clsx";
4
4
  import { jsxs, jsx } from "react/jsx-runtime";
5
- import { I as IconButton } from "../mui_extended/IconButton/index.9ea23f87.js";
6
- import { I as Icon } from "../Icon/index.b920baf8.js";
7
- import { u as useModal } from "../../hooks/useModal/index.786a4439.js";
5
+ import { I as IconButton } from "../mui_extended/IconButton/index.383f5496.js";
6
+ import { I as Icon } from "../Icon/index.8c744412.js";
7
+ import { u as useModal } from "../../hooks/useModal/index.2f1d6a07.js";
8
8
  const Header = (props) => {
9
9
  const {
10
10
  title,
@@ -1,13 +1,13 @@
1
- import { A as Actions } from "../CommonActions/components/Actions/index.2f6286eb.js";
1
+ import { A as Actions } from "../CommonActions/components/Actions/index.389f9b28.js";
2
2
  import { Typography } from "@mui/material";
3
3
  import { useModuleDictionary, useEnvironment } from "@m4l/core";
4
- import { u as useModal } from "../../hooks/useModal/index.786a4439.js";
4
+ import { u as useModal } from "../../hooks/useModal/index.2f1d6a07.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
- import { I as Image } from "../Image/index.d034ca68.js";
6
+ import { I as Image } from "../Image/index.39b3b9d9.js";
7
7
  import { m as modalUtilityClasses } from "./index.61389369.js";
8
- import { W as WindowBase } from "./WindowBase.998b8a38.js";
9
- import { A as ActionCancel } from "../CommonActions/components/ActionCancel/index.de862adf.js";
10
- import { A as ActionIntro } from "../CommonActions/components/ActionIntro/index.79fc2386.js";
8
+ import { W as WindowBase } from "./WindowBase.dd1d2d7b.js";
9
+ import { A as ActionCancel } from "../CommonActions/components/ActionCancel/index.33a748be.js";
10
+ import { A as ActionIntro } from "../CommonActions/components/ActionIntro/index.ac7cd0ee.js";
11
11
  const dictionary = {
12
12
  MESSAGE: "common_actions.confirm_quit_msg"
13
13
  };
@@ -1,12 +1,12 @@
1
1
  import { generateUtilityClasses, generateUtilityClass, styled, Accordion as Accordion$1, AccordionSummary, AccordionDetails } from "@mui/material";
2
- import { I as IconButton } from "../IconButton/index.9ea23f87.js";
2
+ import { I as IconButton } from "../IconButton/index.383f5496.js";
3
3
  import { useEnvironment } from "@m4l/core";
4
4
  import { unstable_composeClasses } from "@mui/base";
5
5
  import clsx from "clsx";
6
6
  import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
7
7
  import { g as getNameDataTestId } from "../../../test/getNameDataTestId.14875ec7.js";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
- import { I as Icon } from "../../Icon/index.b920baf8.js";
9
+ import { I as Icon } from "../../Icon/index.8c744412.js";
10
10
  import { T as Typography } from "../Typography/index.379dd374.js";
11
11
  const componentName = "M4LAccordion";
12
12
  generateUtilityClasses(componentName, [