@m4l/components 3.1.6 → 3.1.8

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 (203) hide show
  1. package/components/mui_extended/IconButton/index.d.ts +1 -1
  2. package/components/mui_extended/MenuActions/slots/MenuActionsSlots.d.ts +2 -4
  3. package/index.js +183 -339
  4. package/node_modules-CQtkw0uG.js +7350 -0
  5. package/package.json +1 -1
  6. package/vendor-AfIOyqRr.js +24636 -0
  7. package/components/AccountPopover/index-BdnzI23R.js +0 -334
  8. package/components/AppBar/index-Dvrx1jsr.js +0 -93
  9. package/components/BaseModule/index-BQ2UIUCy.js +0 -30
  10. package/components/CommonActions/components/ActionCancel/index-DSVEMl41.js +0 -12
  11. package/components/CommonActions/components/ActionFormCancel/index-DMsGH0wx.js +0 -56
  12. package/components/CommonActions/components/ActionFormIntro/index-C8zb7R3W.js +0 -33
  13. package/components/CommonActions/components/ActionIntro/index-BNIG3KAH.js +0 -25
  14. package/components/CommonActions/components/Actions/index-90JsZTzb.js +0 -70
  15. package/components/DataGrid/constants-8L7QgBKi.js +0 -10
  16. package/components/DataGrid/formatters/ColumnBooleanFormatter/index-ZsSxUL_T.js +0 -26
  17. package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/index-D-gZpvcm.js +0 -22
  18. package/components/DataGrid/formatters/ColumnDateFormatter/index-CKg8CJ6A.js +0 -19
  19. package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/index-kZGiDU5k.js +0 -23
  20. package/components/DataGrid/formatters/ColumnNestedValueFormatter/index-BslXGK-A.js +0 -14
  21. package/components/DataGrid/formatters/ColumnPointsFormatter/index-BXGW2CsK.js +0 -10
  22. package/components/DataGrid/formatters/ColumnPriceFormatter/index-O11tBykn.js +0 -10
  23. package/components/DataGrid/formatters/ColumnSetCheckFormatter/index-BaCawLr1.js +0 -36
  24. package/components/DataGrid/formatters/ColumnUncertaintyFormatter/index-Cq7a-jnE.js +0 -10
  25. package/components/DataGrid/formatters/index-iKq2iRoa.js +0 -13
  26. package/components/DataGrid/index-DGHnRo8z.js +0 -908
  27. package/components/DataGrid/subcomponents/Actions/index-BhBvobKS.js +0 -549
  28. package/components/DataGrid/subcomponents/editors/TextEditor/index-BIFm8akr.js +0 -80
  29. package/components/DragResizeWindow/index-D2jLYExo.js +0 -505
  30. package/components/DynamicFilter/constants-ByqmFATV.js +0 -31
  31. package/components/DynamicFilter/dictionary-D9Z9YGDb.js +0 -51
  32. package/components/DynamicFilter/index-CRmtRWlr.js +0 -116
  33. package/components/DynamicFilter/slots/SlotsEnum-cawFeNzx.js +0 -34
  34. package/components/DynamicFilter/slots/dynamicFilterSlots-CQiB8TmY.js +0 -151
  35. package/components/DynamicFilter/slots/index-l0sNRNKZ.js +0 -1
  36. package/components/DynamicFilter/store/index-DoIifWTk.js +0 -254
  37. package/components/DynamicFilter/subcomponents/AppliedFilterChip/index-DQESCg04.js +0 -60
  38. package/components/DynamicFilter/subcomponents/AppliedFilters/index-CGmflaoY.js +0 -26
  39. package/components/DynamicFilter/subcomponents/DynamicFilterBase/index-BfH6YHNi.js +0 -40
  40. package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index-Dv3KjuYK.js +0 -129
  41. package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/index-BnhNICK4.js +0 -171
  42. package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/index-CNN6DeHY.js +0 -153
  43. package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index-C2dNPFtM.js +0 -146
  44. package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/index-B03ahaU6.js +0 -114
  45. package/components/DynamicFilter/subcomponents/FieldTypes/index-EF7A6WnZ.js +0 -38
  46. package/components/DynamicFilter/subcomponents/FilterActions/index-CQtA2ELu.js +0 -88
  47. package/components/DynamicFilter/subcomponents/InputFilter/index-EXbXDSZA.js +0 -188
  48. package/components/DynamicFilter/subcomponents/PopoverFilter/index-BX8YCh9v.js +0 -158
  49. package/components/DynamicFilter/subcomponents/PopoverMenuFields/index-DvAYf5-a.js +0 -63
  50. package/components/FieldLabel/index-C8od8D0w.js +0 -54
  51. package/components/GridLayout/index-EPw3AYiQ.js +0 -1044
  52. package/components/GridLayout/subcomponents/Griditem/index-B8Q7iMhr.js +0 -395
  53. package/components/GridLayout/subcomponents/Responsive/index-D6BbBdVx.js +0 -348
  54. package/components/GridLayout/subcomponents/SizeProvider/index-OhbtnEN4.js +0 -71
  55. package/components/HelperText/index-sLK3dYG0.js +0 -50
  56. package/components/Icon/index-BJF_0F6d.js +0 -176
  57. package/components/Image/index-BxphCFC7.js +0 -175
  58. package/components/LanguagePopover/index-CkKie1Ph.js +0 -179
  59. package/components/LinearProgressIndeterminate/index-CTvXOPRx.js +0 -55
  60. package/components/Loadable/index-BMbi9ISF.js +0 -9
  61. package/components/LoadingError/index-BaaPhmyF.js +0 -89
  62. package/components/MFIsolationApp/index-BfHLGDcN.js +0 -169
  63. package/components/MFLoader/index-B8FmSpE7.js +0 -299
  64. package/components/ModalDialog/index-WSVr5sZr.js +0 -77
  65. package/components/NavLink/index-CKgi5l5M.js +0 -55
  66. package/components/NoItemSelected/index-BKsZKc_f.js +0 -54
  67. package/components/ObjectLogs/index-BJkjYQaa.js +0 -233
  68. package/components/PDFViewer/index-Cnbioqzo.js +0 -51
  69. package/components/Page/index-DSSwuNSp.js +0 -117
  70. package/components/PaperForm/index-C1OKDnuY.js +0 -59
  71. package/components/Period/index-DYE7Bj45.js +0 -238
  72. package/components/PrintingSystem/index-BkfHXcTV.js +0 -187
  73. package/components/PrintingSystem/subcomponents/BodyNode/index-Btg2zXVQ.js +0 -49
  74. package/components/PrintingSystem/subcomponents/ChartNode/index-GLjhqKd2.js +0 -105
  75. package/components/PrintingSystem/subcomponents/DividerNode/index-D9T1MWQd.js +0 -20
  76. package/components/PrintingSystem/subcomponents/FooterNode/index-C3LET1ZY.js +0 -49
  77. package/components/PrintingSystem/subcomponents/GridNode/index-BPz7lGvC.js +0 -74
  78. package/components/PrintingSystem/subcomponents/HeaderNode/index-DY4Yci1r.js +0 -49
  79. package/components/PrintingSystem/subcomponents/PaperNode/index-BYoGJll5.js +0 -30
  80. package/components/PrintingSystem/subcomponents/PropertyValueNode/index-vFZ5Skyl.js +0 -47
  81. package/components/PrintingSystem/subcomponents/SectionNode/index-BNqGWpcj.js +0 -49
  82. package/components/PrintingSystem/subcomponents/TextBoxNode/index-wgdfWbfF.js +0 -24
  83. package/components/PropertyValue/index-dwO3Qo0Y.js +0 -264
  84. package/components/Resizeable/index-CHseEYjL.js +0 -20
  85. package/components/ScrollBar/index-BYMy_qJE.js +0 -35
  86. package/components/ScrollToTop/index-TxORk5dB.js +0 -12
  87. package/components/SideBar/index-DqKD_S9_.js +0 -758
  88. package/components/SplitLayout/index-D4lxi0ig.js +0 -89
  89. package/components/ToastContainer/index-jnQcIcV1.js +0 -191
  90. package/components/WrapperComponent/index-BHV-CsDU.js +0 -14
  91. package/components/animate/LoadingScreen/index-CTGGa4Yt.js +0 -70
  92. package/components/animate/MotionContainer/index-eartnWyO.js +0 -34
  93. package/components/animate/MotionLazyContainer/index-Be8osTiG.js +0 -9
  94. package/components/animate/PropagateLoader/index-Bkq8V2SN.js +0 -23
  95. package/components/animate/features-BbnE33u3.js +0 -5
  96. package/components/animate/index-9dC9NmWv.js +0 -89
  97. package/components/animate/variants/bounce-DanQqHAX.js +0 -101
  98. package/components/animate/variants/container-Dmpr6tg5.js +0 -22
  99. package/components/animate/variants/fade-CAOJNn06.js +0 -65
  100. package/components/animate/variants/index-l0sNRNKZ.js +0 -1
  101. package/components/animate/variants/transition-B9W5SWTa.js +0 -20
  102. package/components/areas/components/AreasAdmin/index-BU9AX60_.js +0 -699
  103. package/components/areas/components/AreasViewer/index-CPlZxIzK.js +0 -805
  104. package/components/areas/components/index-l0sNRNKZ.js +0 -1
  105. package/components/areas/constants-rqODZNZe.js +0 -6
  106. package/components/areas/contexts/AreasContext/index-DGguLxcX.js +0 -1110
  107. package/components/areas/contexts/DynamicMFParmsContext/index-22c6E7vK.js +0 -36
  108. package/components/areas/contexts/WindowToolsMFContext/index-DkE30fhm.js +0 -12
  109. package/components/areas/contexts/index-l0sNRNKZ.js +0 -1
  110. package/components/areas/dictionary-YUsP9beq.js +0 -36
  111. package/components/areas/hooks/index-l0sNRNKZ.js +0 -1
  112. package/components/areas/hooks/useAreas/index-DBXtbtIu.js +0 -11
  113. package/components/areas/hooks/useDynamicMFParameters/index-DhbcZPs9.js +0 -12
  114. package/components/areas/hooks/useSetWindowsTitle/useSetWindowsTitle-BzPD-miW.js +0 -31
  115. package/components/areas/hooks/useWindowToolsMF/index-BECQfhbC.js +0 -10
  116. package/components/areas/icons-CwFr-alN.js +0 -24
  117. package/components/areas/index-B_Odny9h.js +0 -22
  118. package/components/commercial/AppBarCommercial/index-faX1fxjn.js +0 -28
  119. package/components/commercial/SectionCommercial/index-Dspd2Hd7.js +0 -56
  120. package/components/commercial/TopBar/index-zACdM_C0.js +0 -232
  121. package/components/commercial/index-9P0yOdH4.js +0 -81
  122. package/components/formatters/BooleanFormatter/index-PoFZ3r_m.js +0 -44
  123. package/components/formatters/DateFormatter/index-CGcRZ8BA.js +0 -43
  124. package/components/formatters/PointsFormatter/index-C7sR8iqk.js +0 -25
  125. package/components/formatters/PriceFormatter/index-CsvRawmc.js +0 -35
  126. package/components/formatters/UncertaintyFormatter/index-B9ESVEVp.js +0 -29
  127. package/components/formatters/index-CEJ6VCMb.js +0 -109
  128. package/components/hook-form/HelperError/index-DRvAkpwm.js +0 -19
  129. package/components/hook-form/RHFAutocomplete/index-DS57m8AX.js +0 -657
  130. package/components/hook-form/RHFAutocompleteAsync/index-Bu6NYmG_.js +0 -226
  131. package/components/hook-form/RHFCheckbox/index-BsB42rRc.js +0 -132
  132. package/components/hook-form/RHFColorPicker/index-Dox0FPrV.js +0 -191
  133. package/components/hook-form/RHFDateTime/index-ef19Az1N.js +0 -190
  134. package/components/hook-form/RHFMultiCheckbox/index-BARudV1A.js +0 -34
  135. package/components/hook-form/RHFPeriod/index-DyRLTD0w.js +0 -98
  136. package/components/hook-form/RHFRadioGroup/index-pgTLVF9t.js +0 -52
  137. package/components/hook-form/RHFSelect/index-LdwRuFz-.js +0 -29
  138. package/components/hook-form/RHFTextField/index-BgsElxUF.js +0 -337
  139. package/components/hook-form/RHFUpload/index-B6m3ypzh.js +0 -253
  140. package/components/maps/components/GpsTools/index-CeLi75XZ.js +0 -1948
  141. package/components/maps/components/Map/index-D4B8Lfgv.js +0 -2545
  142. package/components/maps/index-Ci-7-FHg.js +0 -7
  143. package/components/modal/WindowBase-CkftshqR.js +0 -44
  144. package/components/modal/WindowConfirm-C5YnzF-B.js +0 -73
  145. package/components/modal/index-CydPIpKZ.js +0 -65
  146. package/components/mui_extended/Accordion/index-jF2uxSmi.js +0 -124
  147. package/components/mui_extended/Avatar/index-CHmsrmfc.js +0 -64
  148. package/components/mui_extended/Badge/index-B_BGIjkQ.js +0 -29
  149. package/components/mui_extended/BoxIcon/index-BUTJ2tKw.js +0 -22
  150. package/components/mui_extended/Breadcrumbs/index-DTS7rOZH.js +0 -86
  151. package/components/mui_extended/Button/index-CgvCim_g.js +0 -222
  152. package/components/mui_extended/CheckBox-H73kpinr.js +0 -76
  153. package/components/mui_extended/CircularProgress/index-Bnnti_G6.js +0 -8
  154. package/components/mui_extended/IconButton/classes/constants-ChY2jKkp.js +0 -4
  155. package/components/mui_extended/IconButton/classes/index-BxjJGAqZ.js +0 -45
  156. package/components/mui_extended/IconButton/index-B8lOMybH.js +0 -117
  157. package/components/mui_extended/IconButton/styledIconButton-fAsbGoFS.js +0 -7
  158. package/components/mui_extended/IconButton/types-l0sNRNKZ.js +0 -1
  159. package/components/mui_extended/LinearProgress/index-CGgW8jq2.js +0 -9
  160. package/components/mui_extended/LinkWithRoute/index-BC2miUjR.js +0 -15
  161. package/components/mui_extended/MenuActions/MenuActions-DA_aS7o5.js +0 -149
  162. package/components/mui_extended/MenuActions/constants-BwsU9chA.js +0 -10
  163. package/components/mui_extended/MenuActions/dictionary-Dj_07puT.js +0 -11
  164. package/components/mui_extended/MenuActions/slots/MenuActionsEnum-Bu-L6eWU.js +0 -13
  165. package/components/mui_extended/MenuActions/slots/MenuActionsSlots-BVp0M8fu.js +0 -47
  166. package/components/mui_extended/Pager/index-Dtk4aUiU.js +0 -257
  167. package/components/mui_extended/Popover/index-Dl1PwIS2.js +0 -153
  168. package/components/mui_extended/Stack/index-CRzpVi2a.js +0 -31
  169. package/components/mui_extended/Tab/index-DmrsMLOq.js +0 -129
  170. package/components/mui_extended/ToggleButton/index-CAnHC1N-.js +0 -18
  171. package/components/mui_extended/Tooltip/index-B8QUytCK.js +0 -42
  172. package/components/mui_extended/Typography/index-DXq1fG8k.js +0 -54
  173. package/components/mui_extended/index-l0sNRNKZ.js +0 -1
  174. package/components/popups/PopupsProvider/index-DhSxmtfJ.js +0 -172
  175. package/components/popups/PopupsViewer/constants-DuyD7aCn.js +0 -4
  176. package/components/popups/PopupsViewer/icons-BUujqqbu.js +0 -7
  177. package/components/popups/PopupsViewer/index-CMI1SK_O.js +0 -172
  178. package/components/popups/PopupsViewer/slots/index-B98CiRLa.js +0 -14
  179. package/components/popups/PopupsViewer/slots/popupsViewerSlots-DOkmuvnx.js +0 -46
  180. package/components/popups/index-l0sNRNKZ.js +0 -1
  181. package/contexts/ModalContext/index-Bp_s1qUm.js +0 -39
  182. package/contexts/RHFormContext/index-BQ0XWrpK.js +0 -78
  183. package/hocs/withToggle/index-C1_DMZD3.js +0 -14
  184. package/hooks/useFormAddEdit/index-dLVQB7hC.js +0 -90
  185. package/hooks/useFormReadyForUpdate/index-B3HygFCM.js +0 -20
  186. package/hooks/useModal/index-69rbrQ0v.js +0 -10
  187. package/hooks/useSizeContainer/index-D4hDjM1P.js +0 -37
  188. package/hooks/useStateRef/index-C3P6ZK3m.js +0 -15
  189. package/hooks/useTab/index-DYRxOmMI.js +0 -12
  190. package/react-data-grid-BfYuZ6AK.js +0 -2606
  191. package/react-draggable-DsCPdgQP.js +0 -811
  192. package/react-json-view-bhqIAaNg.js +0 -2576
  193. package/react-resizable-eBbFl2dX.js +0 -618
  194. package/react-spinners-TpKN9lZg.js +0 -123
  195. package/react-splitter-layout-C-JTsNGs.js +0 -158
  196. package/styles/DynamicFilter-CJFsIegc.js +0 -319
  197. package/styles/MenuActions-lTi-ynPM.js +0 -42
  198. package/styles/index-CqpubQQr.js +0 -1691
  199. package/test/constants_no_mock-CF-669v-.js +0 -4
  200. package/test/getNameDataTestId-BaBTWhBr.js +0 -10
  201. package/utils/index-DiMrtgIu.js +0 -502
  202. /package/components/GridLayout/subcomponents/{Griditem → GridItem}/index.d.ts +0 -0
  203. /package/components/GridLayout/subcomponents/{Griditem → GridItem}/types.d.ts +0 -0
@@ -1,222 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { useModuleSkeleton } from "@m4l/core";
3
- import { generateUtilityClasses, generateUtilityClass, Skeleton, IconButton, Tooltip } from "@mui/material";
4
- import MuiButton from "@mui/material/Button";
5
- import { aA as ButtonRoot, aB as WrapperImageButton, aC as LoadingButtonRoot } from "../../../styles/index-CqpubQQr.js";
6
- import { unstable_composeClasses } from "@mui/base";
7
- import clsx from "clsx";
8
- import { useMemo } from "react";
9
- import { I as Image } from "../../Image/index-BxphCFC7.js";
10
- import { T as TEST_PROP_ID } from "../../../test/constants_no_mock-CF-669v-.js";
11
- import { LoadingButton as LoadingButton$1 } from "@mui/lab";
12
- import { T as Typography } from "../Typography/index-DXq1fG8k.js";
13
- const componentName$2 = "M4LButton";
14
- const buttonClasses = generateUtilityClasses(componentName$2, [
15
- /* elements */
16
- "root",
17
- "skeleton",
18
- /* states or variants of elements */
19
- "sizeSmall",
20
- "sizeMedium",
21
- "variantOutlined",
22
- "variantContained",
23
- "variantText",
24
- "isDisabled",
25
- "colorError",
26
- "colorSuccess",
27
- "colorWarning",
28
- /**Toggle */
29
- "togglePressed",
30
- "toggleNotPressed"
31
- ]);
32
- function getButtonUtilityClass(slot) {
33
- return generateUtilityClass(componentName$2, slot);
34
- }
35
- const useUtilityClasses$2 = (onwerState) => {
36
- const slots = {
37
- root: [
38
- "root",
39
- onwerState.size === "small" && "sizeSmall",
40
- onwerState.size === "medium" && "sizeMedium",
41
- onwerState.variant === "outlined" && "variantOutlined",
42
- onwerState.variant === "contained" && "variantContained",
43
- onwerState.variant === "text" && "variantText",
44
- onwerState.isDisabled && "isDisabled",
45
- onwerState.colorState === "error" && "colorError",
46
- onwerState.colorState === "success" && "colorSuccess",
47
- onwerState.colorState === "warning" && "colorWarning"
48
- ],
49
- skeleton: ["skeleton"]
50
- };
51
- const composedClasses = unstable_composeClasses(slots, getButtonUtilityClass, {});
52
- return {
53
- ...composedClasses
54
- };
55
- };
56
- const Button = (props) => {
57
- const {
58
- size = "small",
59
- variant = "contained",
60
- className,
61
- disabled,
62
- skeletonWidth = "100px",
63
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
64
- skeletonHeight = "28px",
65
- colorState,
66
- ...others
67
- } = props;
68
- const isSkeleton = useModuleSkeleton();
69
- const ownerState = {
70
- size,
71
- variant,
72
- isDisabled: disabled,
73
- colorState
74
- };
75
- const classes = useUtilityClasses$2(ownerState);
76
- return (
77
- /* ButtonRoot: Contenedor principal del componente, es usado para aplicar los estilos css de los overrides que
78
- provienen del objeto del tema. Se usa para garantizar de que estos estilos no se propaguen a
79
- otros componentes de la plataforna web. */
80
- /* @__PURE__ */ jsx(ButtonRoot, { className: clsx(classes.root, className), "data-testid": "ButtonRoot", children: !isSkeleton ? (
81
- /* MuiButton: Componente botón proporcionado por la librería externa material ui. */
82
- /* @__PURE__ */ jsx(MuiButton, { ...others, variant, size, disableRipple: true, disabled })
83
- ) : (
84
- /* MuiSkeleton: Componente extendido de mui que se usa para mostrar la versión provisional de elementos en
85
- la plataforma web. */
86
- /* @__PURE__ */ jsx(
87
- Skeleton,
88
- {
89
- className: classes.skeleton,
90
- "data-testid": "MuiSkeleton",
91
- variant: "rectangular",
92
- width: skeletonWidth
93
- }
94
- )
95
- ) })
96
- );
97
- };
98
- const componentName$1 = "M4LImageButton";
99
- generateUtilityClasses(componentName$1, [
100
- /* elements */
101
- "root"
102
- /* states or variants of elements */
103
- ]);
104
- function getImageButtonUtilityClass(slot) {
105
- return generateUtilityClass(componentName$1, slot);
106
- }
107
- const useUtilityClasses$1 = () => {
108
- const slots = {
109
- root: ["root"]
110
- };
111
- const composedClasses = unstable_composeClasses(slots, getImageButtonUtilityClass, {});
112
- return {
113
- ...composedClasses
114
- };
115
- };
116
- const IMAGEBUTTON_PREFIX = "ImageButton";
117
- const getNameDataTestId$1 = (KEY) => {
118
- return `${IMAGEBUTTON_PREFIX}-${KEY}`;
119
- };
120
- function ImageButton({
121
- src,
122
- width,
123
- height,
124
- tooltip,
125
- sx = { width, height },
126
- ...other
127
- }) {
128
- const finalTooltip = tooltip;
129
- const classes = useUtilityClasses$1();
130
- const imageButton = useMemo(() => {
131
- return /* @__PURE__ */ jsx(IconButton, { sx, ...other, children: /* @__PURE__ */ jsx(Image, { src }) });
132
- }, [src, width, height, sx]);
133
- return /* @__PURE__ */ jsx(
134
- WrapperImageButton,
135
- {
136
- className: classes.root,
137
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId$1("root") } : {},
138
- children: finalTooltip ? /* @__PURE__ */ jsx(Tooltip, { title: finalTooltip || "", children: imageButton }) : imageButton
139
- }
140
- );
141
- }
142
- const componentName = "M4LLoadingButton";
143
- generateUtilityClasses(
144
- componentName,
145
- [
146
- /* elements */
147
- "root",
148
- "skeleton",
149
- /* states or variants of elements */
150
- "sizeSmall",
151
- "sizeMedium",
152
- "variantOutlined",
153
- "variantContained",
154
- "variantText",
155
- "isDisabled"
156
- ]
157
- );
158
- function getLoadingButtonUtilityClass(slot) {
159
- return generateUtilityClass(componentName, slot);
160
- }
161
- const useUtilityClasses = (onwerState) => {
162
- const slots = {
163
- root: [
164
- "root",
165
- onwerState.size === "small" && "sizeSmall",
166
- onwerState.size === "medium" && "sizeMedium",
167
- onwerState.variant === "outlined" && "variantOutlined",
168
- onwerState.variant === "contained" && "variantContained",
169
- onwerState.variant === "text" && "variantText",
170
- onwerState.isDisabled && "isDisabled"
171
- ],
172
- skeleton: ["skeleton"]
173
- };
174
- const composedClasses = unstable_composeClasses(slots, getLoadingButtonUtilityClass, {});
175
- return {
176
- ...composedClasses
177
- };
178
- };
179
- const LOADINGBUTTON_PREFIX = "M4LoadingButton";
180
- const getNameDataTestId = (KEY) => {
181
- return `${LOADINGBUTTON_PREFIX}-${KEY}`;
182
- };
183
- const LoadingButton = (props) => {
184
- const {
185
- children,
186
- skeletonWidth = "100%",
187
- size = "small",
188
- variant = "contained",
189
- disabled,
190
- className,
191
- ...other
192
- } = props;
193
- const isSkeleton = useModuleSkeleton();
194
- const ownerState = {
195
- size,
196
- variant,
197
- isDisabled: disabled
198
- };
199
- const classes = useUtilityClasses(ownerState);
200
- return /* @__PURE__ */ jsx(
201
- LoadingButtonRoot,
202
- {
203
- className: clsx(classes.root, className),
204
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("root") } : {},
205
- children: !isSkeleton ? /* @__PURE__ */ jsx(LoadingButton$1, { ...other, variant, size, children: /* @__PURE__ */ jsx(Typography, { variant: "action", children }) }) : /* @__PURE__ */ jsx(
206
- Skeleton,
207
- {
208
- className: classes.skeleton,
209
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("skeleton") } : {},
210
- variant: "rectangular",
211
- width: skeletonWidth
212
- }
213
- )
214
- }
215
- );
216
- };
217
- export {
218
- Button as B,
219
- ImageButton as I,
220
- LoadingButton as L,
221
- buttonClasses as b
222
- };
@@ -1,76 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { generateUtilityClasses, generateUtilityClass, Skeleton, Checkbox } from "@mui/material";
3
- import clsx from "clsx";
4
- import { useResponsiveDesktop } from "@m4l/graphics";
5
- import { unstable_composeClasses } from "@mui/base";
6
- import { useModuleSkeleton } from "@m4l/core";
7
- import { forwardRef } from "react";
8
- import { aD as CheckBoxRoot } from "../../styles/index-CqpubQQr.js";
9
- import { F as FieldLabel } from "../FieldLabel/index-C8od8D0w.js";
10
- const COMPONENT_CLASS_NAME = "M4LCheckBox";
11
- generateUtilityClasses(COMPONENT_CLASS_NAME, [
12
- /* elements */
13
- "root",
14
- "skeleton",
15
- /* states or variants of elements */
16
- "small",
17
- "medium",
18
- "stateDisabled"
19
- ]);
20
- function getRHFCheckboxUtilityClass(slot) {
21
- return generateUtilityClass(COMPONENT_CLASS_NAME, slot);
22
- }
23
- const useUtilityClasses = (ownerState) => {
24
- const slots = {
25
- root: [
26
- "root",
27
- ownerState.size === "small" && "small",
28
- ownerState.size === "medium" && "medium",
29
- ownerState.disabled && "stateDisabled"
30
- ],
31
- skeleton: ["skeleton"]
32
- };
33
- const composedClasses = unstable_composeClasses(slots, getRHFCheckboxUtilityClass, {});
34
- return {
35
- ...composedClasses
36
- };
37
- };
38
- const SkeletonCheckBox = (props) => {
39
- const { classes } = props;
40
- return /* @__PURE__ */ jsx("div", { className: classes.skeleton, children: /* @__PURE__ */ jsx(Skeleton, { variant: "rounded", width: "18px", height: "18px" }) });
41
- };
42
- const CheckBox = forwardRef((props, ref) => {
43
- const {
44
- className,
45
- size = "small",
46
- disabled,
47
- label,
48
- mandatory,
49
- mandatoryMessage,
50
- helperMessage,
51
- htmlFor
52
- } = props;
53
- const isDesktop = useResponsiveDesktop();
54
- const isSkeleton = useModuleSkeleton();
55
- const ownerState = {
56
- size: !isDesktop ? "medium" : size,
57
- disabled
58
- };
59
- const classes = useUtilityClasses(ownerState);
60
- return /* @__PURE__ */ jsxs(CheckBoxRoot, { className: clsx(classes.root, className), ref, children: [
61
- !isSkeleton ? /* @__PURE__ */ jsx(Checkbox, { id: htmlFor, ...props }) : /* @__PURE__ */ jsx(SkeletonCheckBox, { classes }),
62
- label && /* @__PURE__ */ jsx(
63
- FieldLabel,
64
- {
65
- label,
66
- mandatory,
67
- mandatoryMessage,
68
- helperMessage,
69
- htmlFor
70
- }
71
- )
72
- ] });
73
- });
74
- export {
75
- CheckBox as C
76
- };
@@ -1,8 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { CircularProgress as CircularProgress$1 } from "@mui/material";
3
- const CircularProgress = (props) => {
4
- return /* @__PURE__ */ jsx(CircularProgress$1, { ...props });
5
- };
6
- export {
7
- CircularProgress as C
8
- };
@@ -1,4 +0,0 @@
1
- const componentName = "M4LIconButton";
2
- export {
3
- componentName as c
4
- };
@@ -1,45 +0,0 @@
1
- import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
2
- import { unstable_composeClasses } from "@mui/base";
3
- import { c as componentName } from "./constants-ChY2jKkp.js";
4
- const iconButtonClasses = generateUtilityClasses(componentName, [
5
- /* elements */
6
- "root",
7
- "skeleton",
8
- /* states or variants of elements */
9
- "sizemSall",
10
- "sizeMedium",
11
- "variantPrimary",
12
- "variantSecondary",
13
- "variantLine",
14
- "isFocus",
15
- "isDisabled",
16
- /**Toggle */
17
- "togglePressed",
18
- "toggleNotPressed"
19
- ]);
20
- function getIconButtonUtilityClass(slot) {
21
- return generateUtilityClass(componentName, slot);
22
- }
23
- const useUtilityClasses = (ownerState) => {
24
- const slots = {
25
- root: [
26
- "root",
27
- ownerState.size === "small" && "sizeSmall",
28
- ownerState.size === "medium" && "sizeMedium",
29
- ownerState.variant === "primary" && ownerState.isSkeleton !== true && "variantPrimary",
30
- ownerState.variant === "secondary" && ownerState.isSkeleton !== true && "variantSecondary",
31
- ownerState.variant === "line" && ownerState.isSkeleton !== true && "variantLine",
32
- ownerState.isFocus && !ownerState.isDisabled && "isFocus",
33
- ownerState.isDisabled && "isDisabled"
34
- ],
35
- skeleton: ["skeleton"]
36
- };
37
- const composedClasses = unstable_composeClasses(slots, getIconButtonUtilityClass, {});
38
- return {
39
- ...composedClasses
40
- };
41
- };
42
- export {
43
- iconButtonClasses as i,
44
- useUtilityClasses as u
45
- };
@@ -1,117 +0,0 @@
1
- import { jsx, Fragment } from "react/jsx-runtime";
2
- import clsx from "clsx";
3
- import { u as useUtilityClasses, i as iconButtonClasses } from "./classes/index-BxjJGAqZ.js";
4
- import { w as withToggle } from "../../../hocs/withToggle/index-C1_DMZD3.js";
5
- import { useMemo, useState } from "react";
6
- import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
7
- import { Skeleton, Tooltip, IconButton as IconButton$1 } from "@mui/material";
8
- import { I as Icon } from "../../Icon/index-BJF_0F6d.js";
9
- import { I as IconButtonRoot } from "./styledIconButton-fAsbGoFS.js";
10
- import { useResponsiveDesktop } from "@m4l/graphics";
11
- const SkeletonIconButton = (props) => {
12
- const { classes } = props;
13
- return /* @__PURE__ */ jsx(
14
- Skeleton,
15
- {
16
- variant: "rectangular",
17
- className: classes.skeleton,
18
- "data-testid": "SkeletonIconButton"
19
- }
20
- );
21
- };
22
- const IconButton = (props) => {
23
- const {
24
- src,
25
- tooltip,
26
- size = "small",
27
- dictionaryTooltipId,
28
- rotationAngle,
29
- variant = "line",
30
- disabled,
31
- className,
32
- onClick,
33
- ...other
34
- } = props;
35
- const { getLabel } = useModuleDictionary();
36
- const isDesktop = useResponsiveDesktop();
37
- const isSkeleton = useModuleSkeleton();
38
- const finalTooltip = useMemo(() => {
39
- if (disabled) {
40
- return void 0;
41
- }
42
- if (tooltip && tooltip !== "") {
43
- return tooltip;
44
- }
45
- if (dictionaryTooltipId && getLabel) {
46
- return getLabel(dictionaryTooltipId);
47
- }
48
- return void 0;
49
- }, [tooltip, dictionaryTooltipId, getLabel, disabled]);
50
- const [
51
- isfocus
52
- /* setIsFocus */
53
- ] = useState(false);
54
- const ownerState = {
55
- variant,
56
- size: isDesktop ? size : "medium",
57
- isSkeleton,
58
- isFocus: disabled ? false : isfocus,
59
- isDisabled: disabled
60
- };
61
- const classes = useUtilityClasses(ownerState);
62
- return (
63
- /* IconButtonRoot: Contenedor principal del componente, es usado para aplicar los estilos css de los overrides que
64
- provienen del objeto del tema. Se usa para garantizar de que estos estilos no se propaguen a
65
- otros componentes de la plataforna web. */
66
- /* @__PURE__ */ jsx(IconButtonRoot, { className: clsx(classes.root, className), "data-testid": "IconButtonRoot", children: !isSkeleton ? (
67
- // eslint-disable-next-line react/jsx-no-useless-fragment
68
- /* @__PURE__ */ jsx(Fragment, { children: finalTooltip ? (
69
- /* Este bloque corresponde al caso en el que requiera tooltip en el componente. */
70
- /* @__PURE__ */ jsx(Tooltip, { title: finalTooltip || "", children: /* @__PURE__ */ jsx(
71
- IconButton$1,
72
- {
73
- ...other,
74
- onClick,
75
- disableRipple: true,
76
- disabled,
77
- children: /* @__PURE__ */ jsx(Icon, { src, size })
78
- }
79
- ) })
80
- ) : (
81
- /* Este bloque corresponde al caso en que solo se rquiera cargar el botón con icono. */
82
- /* @__PURE__ */ jsx(
83
- IconButton$1,
84
- {
85
- ...other,
86
- onClick,
87
- disableRipple: true,
88
- disabled,
89
- children: /* @__PURE__ */ jsx(Icon, { src, size: isDesktop ? size : "medium", rotationAngle })
90
- }
91
- )
92
- ) })
93
- ) : /* @__PURE__ */ jsx(SkeletonIconButton, { classes }) })
94
- );
95
- };
96
- const ToggleAbleIconButton = ({
97
- onToggle,
98
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
99
- isToggled,
100
- ...props
101
- }) => {
102
- return /* @__PURE__ */ jsx(
103
- IconButton,
104
- {
105
- onClick: onToggle,
106
- ...props,
107
- className: clsx(
108
- onToggle ? iconButtonClasses.togglePressed : iconButtonClasses.toggleNotPressed
109
- )
110
- }
111
- );
112
- };
113
- const ToggleIconButton = withToggle(ToggleAbleIconButton);
114
- export {
115
- IconButton as I,
116
- ToggleIconButton as T
117
- };
@@ -1,7 +0,0 @@
1
- import { styled } from "@mui/material/styles";
2
- const IconButtonRoot = styled("div")(({ theme }) => ({
3
- ...theme.components?.M4LIconButton?.styleOverrides
4
- }));
5
- export {
6
- IconButtonRoot as I
7
- };
@@ -1,9 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { LinearProgress as LinearProgress$1 } from "@mui/material";
3
- const LinearProgress = (props) => {
4
- const { ...other } = props;
5
- return /* @__PURE__ */ jsx(LinearProgress$1, { ...other });
6
- };
7
- export {
8
- LinearProgress as L
9
- };
@@ -1,15 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { Link as Link$1 } from "react-router-dom";
3
- import { Skeleton, Link } from "@mui/material";
4
- import { useModuleSkeleton } from "@m4l/core";
5
- const LinkWithRoute = (props) => {
6
- const { to, children, skeletonWidth = "100%", skeletonHeight = "14px", ...other } = props;
7
- const isSkeleton = useModuleSkeleton();
8
- if (isSkeleton) {
9
- return /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: skeletonWidth, height: skeletonHeight });
10
- }
11
- return /* @__PURE__ */ jsx(Link, { component: Link$1, to, ...other, children });
12
- };
13
- export {
14
- LinkWithRoute as L
15
- };
@@ -1,149 +0,0 @@
1
- import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import React__default, { useState, useEffect, useMemo } from "react";
3
- import { useTheme } from "@mui/material/styles";
4
- import { useEnvironment, useModuleDictionary } from "@m4l/core";
5
- import { I as ICON_PATH, a as ICONS } from "./constants-BwsU9chA.js";
6
- import { g as getMenuActionsDictionary, D as DICTIONARY } from "./dictionary-Dj_07puT.js";
7
- import { R as RootStyled, M as MenuItemStyled, I as IconButtonUrlStyled, L as LabelMenuItemStyled, a as LabelEmptyStyled, B as BadgeStyled, b as IconButtonStyled } from "./slots/MenuActionsSlots-BVp0M8fu.js";
8
- function MenuActions(props) {
9
- const {
10
- menuActions,
11
- endListElement,
12
- menuActionSx,
13
- iconButtonClassName = "",
14
- objItem = {},
15
- urlIcon,
16
- toolTip = "",
17
- marginTop = -1,
18
- marginBottom,
19
- marginLeft,
20
- marginRight,
21
- width = 200,
22
- withBadge = false,
23
- badgeContent,
24
- arrowType = "right-top",
25
- externalOpen = null,
26
- externalClose,
27
- ...other
28
- } = props;
29
- const { host_static_assets, environment_assets } = useEnvironment();
30
- const { getLabel } = useModuleDictionary();
31
- const [open, setOpen] = useState(null);
32
- const handleOpen = (event) => {
33
- setOpen(event.currentTarget);
34
- };
35
- const theme = useTheme();
36
- useEffect(() => {
37
- let mounted = true;
38
- if (mounted) {
39
- setOpen(externalOpen);
40
- }
41
- return function cleanUp() {
42
- mounted = false;
43
- };
44
- }, [externalOpen]);
45
- const urlFinalIcon = useMemo(() => {
46
- if (urlIcon) return urlIcon;
47
- return `${host_static_assets}/${environment_assets}/${ICON_PATH}/${ICONS.MENU}`;
48
- }, [urlIcon, host_static_assets, environment_assets]);
49
- const handleClose = (e) => {
50
- e.stopPropagation();
51
- setOpen(null);
52
- externalClose && externalClose(null);
53
- };
54
- const handleClick = (e, menuAction) => {
55
- e.stopPropagation();
56
- setOpen(null);
57
- menuAction.onClick();
58
- };
59
- const finalActions = useMemo(() => {
60
- let ret;
61
- if (typeof menuActions !== "function") {
62
- ret = menuActions;
63
- } else {
64
- ret = menuActions(objItem);
65
- }
66
- return ret;
67
- }, [menuActions, objItem]);
68
- const IconButtonElement = (
69
- // eslint-disable-next-line react/jsx-no-useless-fragment
70
- /* @__PURE__ */ jsx(Fragment, { children: withBadge ? /* @__PURE__ */ jsx(BadgeStyled, { ownerState: {}, badgeContent, children: /* @__PURE__ */ jsx(
71
- IconButtonStyled,
72
- {
73
- ownerState: {},
74
- src: urlFinalIcon,
75
- onClick: handleOpen,
76
- tooltip: toolTip,
77
- className: iconButtonClassName
78
- }
79
- ) }) : /* @__PURE__ */ jsx(
80
- IconButtonStyled,
81
- {
82
- ownerState: {},
83
- src: urlFinalIcon,
84
- onClick: handleOpen,
85
- tooltip: toolTip,
86
- className: iconButtonClassName
87
- }
88
- ) })
89
- );
90
- return /* @__PURE__ */ jsxs(Fragment, { children: [
91
- IconButtonElement,
92
- /* @__PURE__ */ jsxs(
93
- RootStyled,
94
- {
95
- ownerState: {},
96
- id: "Popover",
97
- open: Boolean(open),
98
- anchorEl: open,
99
- onClose: handleClose,
100
- arrowType,
101
- sx: {
102
- marginTop,
103
- marginBottom,
104
- marginLeft,
105
- marginRight,
106
- width,
107
- maxWidth: 300,
108
- "& .MuiMenuItem-root": { px: 1, typography: "body2", borderRadius: 0.75 },
109
- ...theme.components?.M4LMenuActions?.styleOverrides,
110
- ...menuActionSx
111
- },
112
- ...other,
113
- children: [
114
- finalActions.map(
115
- (menuAction, index) => menuAction.label || menuAction.dictionaryId ? /* @__PURE__ */ jsxs(
116
- MenuItemStyled,
117
- {
118
- dense: true,
119
- onClick: (e) => {
120
- handleClick(e, menuAction);
121
- },
122
- sx: { color: menuAction.color ?? "text.main" },
123
- disabled: menuAction.disabled,
124
- ownerState: { variant: menuAction.variant, color: menuAction.color },
125
- children: [
126
- menuAction.urlIcon ? /* @__PURE__ */ jsx(
127
- IconButtonUrlStyled,
128
- {
129
- ownerState: { variant: menuAction.variant },
130
- src: menuAction.urlIcon
131
- }
132
- ) : null,
133
- /* @__PURE__ */ jsx(LabelMenuItemStyled, { ownerState: {}, children: menuAction.label || menuAction.dictionaryId && getLabel(menuAction.dictionaryId) })
134
- ]
135
- },
136
- `menu_action_${index}`
137
- ) : /* @__PURE__ */ jsx(LabelEmptyStyled, { ownerState: {}, children: getLabel(getMenuActionsDictionary(DICTIONARY.no_actions_label)) }, `menu_action_${index}`)
138
- ),
139
- endListElement ? endListElement : null
140
- ]
141
- }
142
- )
143
- ] });
144
- }
145
- const MemonizedMenuActions = React__default.memo(MenuActions);
146
- export {
147
- MenuActions as M,
148
- MemonizedMenuActions as a
149
- };
@@ -1,10 +0,0 @@
1
- const ICON_PATH = "frontend/components/menu_actions/assets/icons";
2
- const ICONS = {
3
- MENU: "menu.svg"
4
- };
5
- const MENU_ACTIONS_KEY_COMPONENT = "M4LMenuActions";
6
- export {
7
- ICON_PATH as I,
8
- MENU_ACTIONS_KEY_COMPONENT as M,
9
- ICONS as a
10
- };
@@ -1,11 +0,0 @@
1
- const MENU_ACTIONS_DICTIONARY_ID = "menu_actions";
2
- const DICTIONARY = {
3
- no_actions_label: "no_actions_label"
4
- };
5
- const getMenuActionsDictionary = (key) => {
6
- return `${MENU_ACTIONS_DICTIONARY_ID}.${key}`;
7
- };
8
- export {
9
- DICTIONARY as D,
10
- getMenuActionsDictionary as g
11
- };