@m4l/components 3.1.7 → 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 (201) hide show
  1. package/index.js +183 -340
  2. package/node_modules-CQtkw0uG.js +7350 -0
  3. package/package.json +1 -1
  4. package/vendor-AfIOyqRr.js +24636 -0
  5. package/components/AccountPopover/index-Dm2-k-Mv.js +0 -334
  6. package/components/AppBar/index-i0rhG3J1.js +0 -93
  7. package/components/BaseModule/index-CiNNlxzS.js +0 -30
  8. package/components/CommonActions/components/ActionCancel/index-CIdpDXkr.js +0 -12
  9. package/components/CommonActions/components/ActionFormCancel/index-CpyASN3q.js +0 -56
  10. package/components/CommonActions/components/ActionFormIntro/index-7KKtcUra.js +0 -33
  11. package/components/CommonActions/components/ActionIntro/index-CqqDZZcG.js +0 -25
  12. package/components/CommonActions/components/Actions/index-CuG1pnXW.js +0 -70
  13. package/components/DataGrid/constants-8L7QgBKi.js +0 -10
  14. package/components/DataGrid/formatters/ColumnBooleanFormatter/index-CveSCbq_.js +0 -26
  15. package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/index-CHqvieM2.js +0 -22
  16. package/components/DataGrid/formatters/ColumnDateFormatter/index-CKg8CJ6A.js +0 -19
  17. package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/index-DE6bwaKP.js +0 -23
  18. package/components/DataGrid/formatters/ColumnNestedValueFormatter/index-BslXGK-A.js +0 -14
  19. package/components/DataGrid/formatters/ColumnPointsFormatter/index-BXGW2CsK.js +0 -10
  20. package/components/DataGrid/formatters/ColumnPriceFormatter/index-O11tBykn.js +0 -10
  21. package/components/DataGrid/formatters/ColumnSetCheckFormatter/index-BaCawLr1.js +0 -36
  22. package/components/DataGrid/formatters/ColumnUncertaintyFormatter/index-Cq7a-jnE.js +0 -10
  23. package/components/DataGrid/formatters/index-CrZXPa0e.js +0 -13
  24. package/components/DataGrid/index-BZ-lbmuU.js +0 -908
  25. package/components/DataGrid/subcomponents/Actions/index-CHvPZ4Ru.js +0 -549
  26. package/components/DataGrid/subcomponents/editors/TextEditor/index-BIFm8akr.js +0 -80
  27. package/components/DragResizeWindow/index-D2jLYExo.js +0 -505
  28. package/components/DynamicFilter/constants-ByqmFATV.js +0 -31
  29. package/components/DynamicFilter/dictionary-PrbXU3VZ.js +0 -51
  30. package/components/DynamicFilter/index-DZiJc9h7.js +0 -116
  31. package/components/DynamicFilter/slots/SlotsEnum-cawFeNzx.js +0 -34
  32. package/components/DynamicFilter/slots/dynamicFilterSlots-DHxelhXP.js +0 -151
  33. package/components/DynamicFilter/slots/index-l0sNRNKZ.js +0 -1
  34. package/components/DynamicFilter/store/index-BT-eWVnJ.js +0 -254
  35. package/components/DynamicFilter/subcomponents/AppliedFilterChip/index-B32bAzi-.js +0 -60
  36. package/components/DynamicFilter/subcomponents/AppliedFilters/index-Bha19drV.js +0 -26
  37. package/components/DynamicFilter/subcomponents/DynamicFilterBase/index-BmvzoHit.js +0 -40
  38. package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index-BcO3SlP5.js +0 -129
  39. package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/index-BCJhpNS8.js +0 -171
  40. package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/index-DCNhz68u.js +0 -153
  41. package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index-BdypjM1Y.js +0 -146
  42. package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/index-D-NFIVnK.js +0 -114
  43. package/components/DynamicFilter/subcomponents/FieldTypes/index-BwQHJqk9.js +0 -38
  44. package/components/DynamicFilter/subcomponents/FilterActions/index-B9UWmk07.js +0 -88
  45. package/components/DynamicFilter/subcomponents/InputFilter/index-CfGb1TfV.js +0 -188
  46. package/components/DynamicFilter/subcomponents/PopoverFilter/index-DkfRGrlO.js +0 -158
  47. package/components/DynamicFilter/subcomponents/PopoverMenuFields/index-DSegwAm2.js +0 -63
  48. package/components/FieldLabel/index-CI57EizR.js +0 -54
  49. package/components/GridLayout/index-C4HyxNYX.js +0 -1044
  50. package/components/GridLayout/subcomponents/Griditem/index-C7jT4s8t.js +0 -395
  51. package/components/GridLayout/subcomponents/Responsive/index-BKcU2OnF.js +0 -348
  52. package/components/GridLayout/subcomponents/SizeProvider/index-1aJ-e_54.js +0 -71
  53. package/components/HelperText/index-Crn_XIPF.js +0 -50
  54. package/components/Icon/index-C89MAkeH.js +0 -176
  55. package/components/Image/index-COp8vP0X.js +0 -175
  56. package/components/LanguagePopover/index-BA2Igs9L.js +0 -179
  57. package/components/LinearProgressIndeterminate/index-BwI756Mb.js +0 -55
  58. package/components/Loadable/index-BMbi9ISF.js +0 -9
  59. package/components/LoadingError/index-Cf0oGUrL.js +0 -89
  60. package/components/MFIsolationApp/index-V4R55hNU.js +0 -169
  61. package/components/MFLoader/index-BI8vQZSH.js +0 -299
  62. package/components/ModalDialog/index-CEVQBQ7W.js +0 -77
  63. package/components/NavLink/index-D1S_vtFO.js +0 -55
  64. package/components/NoItemSelected/index-B9oM26AX.js +0 -54
  65. package/components/ObjectLogs/index-CiXOJpS4.js +0 -233
  66. package/components/PDFViewer/index-GVN2rfd6.js +0 -51
  67. package/components/Page/index-DZMkYmr4.js +0 -117
  68. package/components/PaperForm/index-DwgAfjci.js +0 -59
  69. package/components/Period/index-2pJG3VmY.js +0 -238
  70. package/components/PrintingSystem/index-B2qcnfw0.js +0 -187
  71. package/components/PrintingSystem/subcomponents/BodyNode/index-Cv2aoy8S.js +0 -49
  72. package/components/PrintingSystem/subcomponents/ChartNode/index-BmJm8v_C.js +0 -105
  73. package/components/PrintingSystem/subcomponents/DividerNode/index-MpFhE-H0.js +0 -20
  74. package/components/PrintingSystem/subcomponents/FooterNode/index-ZEcWdMSM.js +0 -49
  75. package/components/PrintingSystem/subcomponents/GridNode/index-SsKax2xu.js +0 -74
  76. package/components/PrintingSystem/subcomponents/HeaderNode/index-Cs8TOOBL.js +0 -49
  77. package/components/PrintingSystem/subcomponents/PaperNode/index-DBb25Ecg.js +0 -30
  78. package/components/PrintingSystem/subcomponents/PropertyValueNode/index-CTVn7J9Q.js +0 -47
  79. package/components/PrintingSystem/subcomponents/SectionNode/index-iYPM3EaS.js +0 -49
  80. package/components/PrintingSystem/subcomponents/TextBoxNode/index-DGjXCFKJ.js +0 -24
  81. package/components/PropertyValue/index-Bh-Jnrte.js +0 -264
  82. package/components/Resizeable/index-DdP1xfE9.js +0 -20
  83. package/components/ScrollBar/index-f2URPPE2.js +0 -35
  84. package/components/ScrollToTop/index-TxORk5dB.js +0 -12
  85. package/components/SideBar/index-PUBBe0yH.js +0 -758
  86. package/components/SplitLayout/index-Bu1hcO6G.js +0 -89
  87. package/components/ToastContainer/index-DK1d8NNd.js +0 -191
  88. package/components/WrapperComponent/index-BHV-CsDU.js +0 -14
  89. package/components/animate/LoadingScreen/index-CkVLOrMz.js +0 -70
  90. package/components/animate/MotionContainer/index-eartnWyO.js +0 -34
  91. package/components/animate/MotionLazyContainer/index-Be8osTiG.js +0 -9
  92. package/components/animate/PropagateLoader/index-Bkq8V2SN.js +0 -23
  93. package/components/animate/features-BbnE33u3.js +0 -5
  94. package/components/animate/index-BsWiJfzp.js +0 -89
  95. package/components/animate/variants/bounce-DanQqHAX.js +0 -101
  96. package/components/animate/variants/container-Dmpr6tg5.js +0 -22
  97. package/components/animate/variants/fade-CAOJNn06.js +0 -65
  98. package/components/animate/variants/index-l0sNRNKZ.js +0 -1
  99. package/components/animate/variants/transition-B9W5SWTa.js +0 -20
  100. package/components/areas/components/AreasAdmin/index-OxQU3P8Y.js +0 -699
  101. package/components/areas/components/AreasViewer/index-DQ0aPioP.js +0 -805
  102. package/components/areas/components/index-l0sNRNKZ.js +0 -1
  103. package/components/areas/constants-rqODZNZe.js +0 -6
  104. package/components/areas/contexts/AreasContext/index-BqRlA7JA.js +0 -1110
  105. package/components/areas/contexts/DynamicMFParmsContext/index-22c6E7vK.js +0 -36
  106. package/components/areas/contexts/WindowToolsMFContext/index-DkE30fhm.js +0 -12
  107. package/components/areas/contexts/index-l0sNRNKZ.js +0 -1
  108. package/components/areas/dictionary-YUsP9beq.js +0 -36
  109. package/components/areas/hooks/index-l0sNRNKZ.js +0 -1
  110. package/components/areas/hooks/useAreas/index-BSbwbJLS.js +0 -11
  111. package/components/areas/hooks/useDynamicMFParameters/index-DhbcZPs9.js +0 -12
  112. package/components/areas/hooks/useSetWindowsTitle/useSetWindowsTitle-BzPD-miW.js +0 -31
  113. package/components/areas/hooks/useWindowToolsMF/index-BECQfhbC.js +0 -10
  114. package/components/areas/icons-CwFr-alN.js +0 -24
  115. package/components/areas/index-B_Odny9h.js +0 -22
  116. package/components/commercial/AppBarCommercial/index-CHq3P3GY.js +0 -28
  117. package/components/commercial/SectionCommercial/index-BeABGtdr.js +0 -56
  118. package/components/commercial/TopBar/index-F1repmti.js +0 -232
  119. package/components/commercial/index-CxDzs6Ax.js +0 -81
  120. package/components/formatters/BooleanFormatter/index-DktIidqW.js +0 -44
  121. package/components/formatters/DateFormatter/index-CGcRZ8BA.js +0 -43
  122. package/components/formatters/PointsFormatter/index-C7sR8iqk.js +0 -25
  123. package/components/formatters/PriceFormatter/index-CsvRawmc.js +0 -35
  124. package/components/formatters/UncertaintyFormatter/index-B9ESVEVp.js +0 -29
  125. package/components/formatters/index-pnJhDYKe.js +0 -109
  126. package/components/hook-form/HelperError/index-BVnmUazV.js +0 -19
  127. package/components/hook-form/RHFAutocomplete/index-BtPL16HR.js +0 -657
  128. package/components/hook-form/RHFAutocompleteAsync/index-BfzjLHG8.js +0 -226
  129. package/components/hook-form/RHFCheckbox/index-Vyttu8Vx.js +0 -132
  130. package/components/hook-form/RHFColorPicker/index-Cxxb5Wa_.js +0 -191
  131. package/components/hook-form/RHFDateTime/index-CW1Slb-f.js +0 -190
  132. package/components/hook-form/RHFMultiCheckbox/index-BARudV1A.js +0 -34
  133. package/components/hook-form/RHFPeriod/index-r-HeIOoZ.js +0 -98
  134. package/components/hook-form/RHFRadioGroup/index-CTD-0zKo.js +0 -52
  135. package/components/hook-form/RHFSelect/index-LdwRuFz-.js +0 -29
  136. package/components/hook-form/RHFTextField/index-B6ufruSB.js +0 -337
  137. package/components/hook-form/RHFUpload/index-CDPbm8NR.js +0 -253
  138. package/components/maps/components/GpsTools/index-5MXlhIEt.js +0 -1948
  139. package/components/maps/components/Map/index-2Lx5ARXa.js +0 -2546
  140. package/components/maps/index-Ci-7-FHg.js +0 -7
  141. package/components/modal/WindowBase-Gd27v5FU.js +0 -44
  142. package/components/modal/WindowConfirm-u6vAMFo7.js +0 -73
  143. package/components/modal/index-CydPIpKZ.js +0 -65
  144. package/components/mui_extended/Accordion/index-DMLYJL7o.js +0 -124
  145. package/components/mui_extended/Avatar/index-ClBa-6eF.js +0 -64
  146. package/components/mui_extended/Badge/index-zI-F_Qkq.js +0 -29
  147. package/components/mui_extended/BoxIcon/index-BUTJ2tKw.js +0 -22
  148. package/components/mui_extended/Breadcrumbs/index-DTS7rOZH.js +0 -86
  149. package/components/mui_extended/Button/index-CGfZbaea.js +0 -222
  150. package/components/mui_extended/CheckBox-BXUrbonB.js +0 -76
  151. package/components/mui_extended/CircularProgress/index-Bnnti_G6.js +0 -8
  152. package/components/mui_extended/IconButton/classes/constants-ChY2jKkp.js +0 -4
  153. package/components/mui_extended/IconButton/classes/index-BxjJGAqZ.js +0 -45
  154. package/components/mui_extended/IconButton/index-CusYFjie.js +0 -97
  155. package/components/mui_extended/IconButton/styledIconButton-fAsbGoFS.js +0 -7
  156. package/components/mui_extended/LinearProgress/index-CGgW8jq2.js +0 -9
  157. package/components/mui_extended/LinkWithRoute/index-BC2miUjR.js +0 -15
  158. package/components/mui_extended/MenuActions/MenuActions-C6CjSU6C.js +0 -149
  159. package/components/mui_extended/MenuActions/constants-BwsU9chA.js +0 -10
  160. package/components/mui_extended/MenuActions/dictionary-Dj_07puT.js +0 -11
  161. package/components/mui_extended/MenuActions/slots/MenuActionsEnum-Bu-L6eWU.js +0 -13
  162. package/components/mui_extended/MenuActions/slots/MenuActionsSlots-D65KZAKF.js +0 -46
  163. package/components/mui_extended/Pager/index-DCbxiTZA.js +0 -257
  164. package/components/mui_extended/Popover/index-DfrJAQkV.js +0 -153
  165. package/components/mui_extended/Stack/index-DzEeCYfp.js +0 -31
  166. package/components/mui_extended/Tab/index-Bu3dPidV.js +0 -129
  167. package/components/mui_extended/ToggleButton/index-C9cBkT1V.js +0 -18
  168. package/components/mui_extended/ToggleIconButton/index--0b3Td6C.js +0 -26
  169. package/components/mui_extended/Tooltip/index-B8QUytCK.js +0 -42
  170. package/components/mui_extended/Typography/index-Cf_4Zw8f.js +0 -54
  171. package/components/mui_extended/index-l0sNRNKZ.js +0 -1
  172. package/components/popups/PopupsProvider/index-DhSxmtfJ.js +0 -172
  173. package/components/popups/PopupsViewer/constants-DuyD7aCn.js +0 -4
  174. package/components/popups/PopupsViewer/icons-BUujqqbu.js +0 -7
  175. package/components/popups/PopupsViewer/index-BecevSns.js +0 -172
  176. package/components/popups/PopupsViewer/slots/index-B98CiRLa.js +0 -14
  177. package/components/popups/PopupsViewer/slots/popupsViewerSlots-BXH77nCF.js +0 -46
  178. package/components/popups/index-l0sNRNKZ.js +0 -1
  179. package/contexts/ModalContext/index-CPfNnfTL.js +0 -39
  180. package/contexts/RHFormContext/index-D_nK759o.js +0 -78
  181. package/hocs/withToggle/index-C1_DMZD3.js +0 -14
  182. package/hooks/useFormAddEdit/index-D9oSjUn1.js +0 -90
  183. package/hooks/useFormReadyForUpdate/index-B3HygFCM.js +0 -20
  184. package/hooks/useModal/index-BJSQOX3U.js +0 -10
  185. package/hooks/useSizeContainer/index-D4hDjM1P.js +0 -37
  186. package/hooks/useStateRef/index-C3P6ZK3m.js +0 -15
  187. package/hooks/useTab/index-B_GEQFOP.js +0 -12
  188. package/react-data-grid-BfYuZ6AK.js +0 -2606
  189. package/react-draggable-DsCPdgQP.js +0 -811
  190. package/react-json-view-bhqIAaNg.js +0 -2576
  191. package/react-resizable-eBbFl2dX.js +0 -618
  192. package/react-spinners-TpKN9lZg.js +0 -123
  193. package/react-splitter-layout-C-JTsNGs.js +0 -158
  194. package/styles/DynamicFilter-CJFsIegc.js +0 -319
  195. package/styles/MenuActions-lTi-ynPM.js +0 -42
  196. package/styles/index-DKj6m8SL.js +0 -1691
  197. package/test/constants_no_mock-CF-669v-.js +0 -4
  198. package/test/getNameDataTestId-BaBTWhBr.js +0 -10
  199. package/utils/index-DiMrtgIu.js +0 -502
  200. /package/components/GridLayout/subcomponents/{Griditem → GridItem}/index.d.ts +0 -0
  201. /package/components/GridLayout/subcomponents/{Griditem → GridItem}/types.d.ts +0 -0
@@ -1,175 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { g as ImageRoot } from "../../styles/index-DKj6m8SL.js";
3
- import { T as TEST_PROP_ID } from "../../test/constants_no_mock-CF-669v-.js";
4
- import clsx from "clsx";
5
- import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
6
- import { unstable_composeClasses } from "@mui/base";
7
- import { useBase, useEnvironment, evaluateWithContext } from "@m4l/core";
8
- import { c as classes, g as getSize } from "../PrintingSystem/index-B2qcnfw0.js";
9
- import QRCode from "qrcode.react";
10
- const ratioOptions = {
11
- "1.168:1": {
12
- width: 1.168,
13
- height: 1
14
- },
15
- "16:9": {
16
- width: 16,
17
- height: 9
18
- },
19
- "1:1": {
20
- width: 1,
21
- height: 1
22
- },
23
- "1:1.168": {
24
- width: 1,
25
- height: 1.168
26
- },
27
- "2:1": {
28
- width: 2,
29
- height: 1
30
- },
31
- "2:3": {
32
- width: 2,
33
- height: 3
34
- },
35
- "3:1": {
36
- width: 3,
37
- height: 1
38
- },
39
- "3:2": {
40
- width: 3,
41
- height: 2
42
- },
43
- "3:4": {
44
- width: 3,
45
- height: 4
46
- },
47
- "4:3": {
48
- width: 4,
49
- height: 3
50
- },
51
- "5:2": {
52
- width: 5,
53
- height: 2
54
- }
55
- };
56
- const getRatioValues = (ratio) => {
57
- const numType = ratioOptions[ratio];
58
- const numRef = numType.width / numType.height;
59
- if (numRef >= 1) {
60
- return {
61
- width: "100%",
62
- height: `${Math.trunc(numRef * 100)}%`
63
- };
64
- } else {
65
- return {
66
- width: `${Math.trunc(numRef * 100)}%`,
67
- height: "100%"
68
- };
69
- }
70
- };
71
- const IMAGE_PREFIX = "Image";
72
- const getNameDataTestId = (KEY) => {
73
- return `${IMAGE_PREFIX}-${KEY}`;
74
- };
75
- const componentName = "M4LImage";
76
- generateUtilityClasses(componentName, [
77
- /* elements */
78
- "root",
79
- "img"
80
- /* states or variants of elements */
81
- ]);
82
- function getImagenClassesUtilityClass(slot) {
83
- return generateUtilityClass(componentName, slot);
84
- }
85
- const useUtilityClasses = () => {
86
- const slots = {
87
- root: ["root"],
88
- img: ["img"]
89
- };
90
- const composedClasses = unstable_composeClasses(slots, getImagenClassesUtilityClass, {});
91
- return {
92
- ...composedClasses
93
- };
94
- };
95
- function Image(props) {
96
- const { src, alt, width, height, ratio = "1:1", className } = props;
97
- const ratioImage = getRatioValues(ratio);
98
- const classes2 = useUtilityClasses();
99
- return (
100
- /* BaseProvider: Es el contexto de valores propio del componente, se usa para propagar información dentro de su estructura evitando así implementar
101
- una asignación por propiedades. */
102
- /* @__PURE__ */ jsx(
103
- ImageRoot,
104
- {
105
- className: clsx(classes2.root, className),
106
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("root") } : {},
107
- style: width && height ? { minWidth: width, minHeight: height, width, height } : { width: "100%", height: "100%" },
108
- children: /* @__PURE__ */ jsx(
109
- "img",
110
- {
111
- alt,
112
- src,
113
- className: classes2.img,
114
- width: !width ? "100%" : ratioImage.width,
115
- height: !height ? "100%" : ratioImage.height,
116
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("img") } : {}
117
- }
118
- )
119
- }
120
- )
121
- );
122
- }
123
- const ImageNode = (props) => {
124
- const { className, style, src, width = "100%", height = "100%" } = props;
125
- const { unitSize, sourceData } = useBase();
126
- const { host_static_assets, environment_assets } = useEnvironment();
127
- const resourceImg = evaluateWithContext(sourceData, src);
128
- return (
129
- // eslint-disable-next-line jsx-a11y/alt-text
130
- /* @__PURE__ */ jsx(
131
- "img",
132
- {
133
- src: `${host_static_assets}/${environment_assets}/${resourceImg}`,
134
- className: clsx(classes.imageNodeRoot, className),
135
- style: {
136
- width: getSize(width, unitSize),
137
- height: getSize(height, unitSize),
138
- ...style
139
- }
140
- }
141
- )
142
- );
143
- };
144
- const convertToPx = (size, magnitud) => {
145
- if (isNaN(size)) {
146
- return 0;
147
- }
148
- if (magnitud === "px") {
149
- return size;
150
- }
151
- switch (magnitud) {
152
- case "cm":
153
- return size * 37.8;
154
- case "mm":
155
- return size * 3.78;
156
- case "in":
157
- return size * 96;
158
- case "pt":
159
- return size * 1.33;
160
- case "pc":
161
- return size * 16;
162
- default:
163
- return 100;
164
- }
165
- };
166
- const QRImageNode = (props) => {
167
- const { url, size = 8, color } = props;
168
- const { unitSize } = useBase();
169
- return /* @__PURE__ */ jsx(QRCode, { value: url, size: convertToPx(size, unitSize), fgColor: color, renderAs: "canvas" });
170
- };
171
- export {
172
- Image as I,
173
- QRImageNode as Q,
174
- ImageNode as a
175
- };
@@ -1,179 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { useState, useEffect } from "react";
3
- import { generateUtilityClasses, generateUtilityClass, Stack, MenuItem } from "@mui/material";
4
- import { I as Image } from "../Image/index-COp8vP0X.js";
5
- import { useLocales } from "@m4l/graphics";
6
- import { L as LanguagePopoverRoot, h as ContainerMenuItems, i as ContainerProgress, j as ContainerImage, k as LabelItem } from "../../styles/index-DKj6m8SL.js";
7
- import { I as ImageButton } from "../mui_extended/Button/index-CGfZbaea.js";
8
- import { useEnvironment, useNetwork } from "@m4l/core";
9
- import { unstable_composeClasses } from "@mui/base";
10
- import { T as TEST_PROP_ID } from "../../test/constants_no_mock-CF-669v-.js";
11
- import { C as CircularProgress } from "../mui_extended/CircularProgress/index-Bnnti_G6.js";
12
- import { P as Popover } from "../mui_extended/Popover/index-DfrJAQkV.js";
13
- const componentName = "M4LanguagePopover";
14
- generateUtilityClasses(
15
- componentName,
16
- [
17
- /* elements */
18
- "root",
19
- "containerItems",
20
- "containerProgress",
21
- "labelItem",
22
- "imageButton"
23
- /* states or variants of elements */
24
- ]
25
- );
26
- function getM4LanguagePopoverClassesUtilityClass(slot) {
27
- return generateUtilityClass(componentName, slot);
28
- }
29
- const useUtilityClasses = () => {
30
- const slots = {
31
- root: ["root"],
32
- containerItems: ["containerItems"],
33
- containerProgress: ["containerProgress"],
34
- labelItem: ["labelItem"]
35
- };
36
- const composedClasses = unstable_composeClasses(slots, getM4LanguagePopoverClassesUtilityClass, {});
37
- return {
38
- ...composedClasses
39
- };
40
- };
41
- const LANGUAGEPOPOVER_PREFIX = "LanguagePopover";
42
- const getNameDataTestId = (KEY) => {
43
- return `${LANGUAGEPOPOVER_PREFIX}-${KEY}`;
44
- };
45
- function LanguagePopover(props) {
46
- const { testingProps } = props;
47
- const { currentLocale, onChangeLocale } = useLocales();
48
- const { domain_token } = useEnvironment();
49
- const { networkOperation } = useNetwork();
50
- const [open, setOpen] = useState(testingProps?.open || null);
51
- const [loading, setLoading] = useState(testingProps?.loading || false);
52
- const [allLocales, setAllLocales] = useState(
53
- testingProps?.allLocales || []
54
- );
55
- const handleOpen = (event) => {
56
- setOpen(event.currentTarget);
57
- };
58
- const handleClose = () => {
59
- setOpen(null);
60
- };
61
- useEffect(() => {
62
- let mounted = true;
63
- if (open === null || loading || allLocales.length > 0) {
64
- return;
65
- }
66
- setLoading(true);
67
- networkOperation({
68
- method: "GET",
69
- endPoint: `na/locales`,
70
- parms: { domain_token }
71
- }).then((response) => {
72
- if (mounted) {
73
- !testingProps && setAllLocales(response.data);
74
- }
75
- }).finally(() => {
76
- setLoading(false);
77
- });
78
- return function cleanUp() {
79
- mounted = false;
80
- };
81
- }, [open]);
82
- const classes = useUtilityClasses();
83
- return (
84
- /* LanguagePopoverRoot: Contenedor principal del componente, es usado para aplicar los estilos css de los overrides que
85
- provienen del objeto del tema. Se usa para garantizar de que estos estilos no se propaguen a otros componentes
86
- de la plataforna web. */
87
- /* @__PURE__ */ jsxs(
88
- LanguagePopoverRoot,
89
- {
90
- className: classes.root,
91
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("root") } : {},
92
- children: [
93
- /* @__PURE__ */ jsx(
94
- ImageButton,
95
- {
96
- className: classes.imageButton,
97
- onClick: handleOpen,
98
- sx: {
99
- width: 28,
100
- height: 28,
101
- ...open && { bgcolor: "action.selected" }
102
- },
103
- src: currentLocale?.url_icon || "",
104
- alt: currentLocale?.name,
105
- width: "24px",
106
- height: "24px",
107
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("imageButton") } : {}
108
- }
109
- ),
110
- /* @__PURE__ */ jsx(
111
- Popover,
112
- {
113
- arrowType: "top-right",
114
- open: Boolean(open),
115
- anchorEl: open,
116
- anchorOrigin: { vertical: "bottom", horizontal: "right" },
117
- onClose: handleClose,
118
- sx: {
119
- mt: 1.5,
120
- ml: 0.75,
121
- width: 180,
122
- rowGap: "100px",
123
- "& .MuiMenuItem-root": { px: 1, typography: "body2", borderRadius: 0.75 }
124
- },
125
- children: /* @__PURE__ */ jsxs(
126
- ContainerMenuItems,
127
- {
128
- className: classes.containerItems,
129
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("containerItems") } : {},
130
- children: [
131
- allLocales.length === 0 && /* CircularProgress: Componente extendido que proporciona una animación de carga circular, el cual
132
- será visible hasta que se complete la operación de red asociada a la lista de idiomas disponibles. */
133
- /* @__PURE__ */ jsx(
134
- ContainerProgress,
135
- {
136
- className: classes.containerProgress,
137
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("containerProgress") } : {},
138
- children: /* @__PURE__ */ jsx(CircularProgress, { size: "20px" })
139
- }
140
- ),
141
- allLocales.length > 0 && /* Stack, MenuItem, Image, LabelItem: El grupo de componentes conforma las opciones del menú de idioma,
142
- se replica dependiendo de la cantidad de elementos que existan en la lista allLocales */
143
- /* @__PURE__ */ jsx(Stack, { spacing: 0.75, children: allLocales.map((option) => /* @__PURE__ */ jsxs(
144
- MenuItem,
145
- {
146
- selected: option.lang === currentLocale?.lang && option?.script === currentLocale?.script && option?.region === currentLocale?.region,
147
- onClick: () => {
148
- onChangeLocale(option);
149
- handleClose();
150
- },
151
- children: [
152
- /* @__PURE__ */ jsx(ContainerImage, { children: /* @__PURE__ */ jsx(Image, { alt: option.name, src: option.url_icon, ratio: "1:1" }) }),
153
- /* @__PURE__ */ jsx(
154
- LabelItem,
155
- {
156
- className: classes.labelItem,
157
- ...process.env.NODE_ENV !== "production" ? {
158
- [TEST_PROP_ID]: getNameDataTestId("labelItem")
159
- } : {},
160
- children: option.name
161
- }
162
- )
163
- ]
164
- },
165
- option.lang || option.script || option.region
166
- )) })
167
- ]
168
- }
169
- )
170
- }
171
- )
172
- ]
173
- }
174
- )
175
- );
176
- }
177
- export {
178
- LanguagePopover as L
179
- };
@@ -1,55 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import clsx from "clsx";
3
- import { generateUtilityClasses } from "@mui/material";
4
- import { unstable_composeClasses } from "@mui/base";
5
- import { g as getComponentUtilityClass } from "../../utils/index-DiMrtgIu.js";
6
- import { l as LinearProgressIndeterminateRoot } from "../../styles/index-DKj6m8SL.js";
7
- import { T as TEST_PROP_ID } from "../../test/constants_no_mock-CF-669v-.js";
8
- const LINEAR_PROGRESS_INDETERMINATE_CLASS_NAME = "M4LinearProgressIndeterminate";
9
- generateUtilityClasses(
10
- LINEAR_PROGRESS_INDETERMINATE_CLASS_NAME,
11
- [
12
- /* elements */
13
- "root",
14
- "windowLinearProgressBar"
15
- /* states or variants of elements */
16
- ],
17
- LINEAR_PROGRESS_INDETERMINATE_CLASS_NAME
18
- );
19
- const useLinearProgressIndeterminateUtilityClasses = () => {
20
- const slots = {
21
- root: ["root"],
22
- windowLinearProgressBar: ["windowLinearProgressBar"]
23
- };
24
- return unstable_composeClasses(
25
- slots,
26
- getComponentUtilityClass(LINEAR_PROGRESS_INDETERMINATE_CLASS_NAME),
27
- {}
28
- );
29
- };
30
- const ICON_PREFIX = "M4LinearProgressIndeterminate";
31
- const getNameLinearProgressIndeterminateDataTestId = (KEY) => {
32
- return `${ICON_PREFIX}-${KEY}`;
33
- };
34
- const classes = useLinearProgressIndeterminateUtilityClasses();
35
- const LinearProgressIndeterminate = () => {
36
- return /* @__PURE__ */ jsx(
37
- LinearProgressIndeterminateRoot,
38
- {
39
- className: clsx(classes.root, "borealisBar"),
40
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameLinearProgressIndeterminateDataTestId("root") } : {},
41
- children: /* @__PURE__ */ jsx(
42
- "div",
43
- {
44
- className: classes.windowLinearProgressBar,
45
- ...process.env.NODE_ENV !== "production" ? {
46
- [TEST_PROP_ID]: getNameLinearProgressIndeterminateDataTestId("windowLinearProgressBar")
47
- } : {}
48
- }
49
- )
50
- }
51
- );
52
- };
53
- export {
54
- LinearProgressIndeterminate as L
55
- };
@@ -1,9 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { Suspense } from "react";
3
- import { P as PropagateLoader } from "../animate/PropagateLoader/index-Bkq8V2SN.js";
4
- const Loadable = (Component) => function EmbededLoadable(props) {
5
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(PropagateLoader, {}), children: /* @__PURE__ */ jsx(Component, { ...props }) });
6
- };
7
- export {
8
- Loadable as L
9
- };
@@ -1,89 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { useEnvironment, useModuleDictionary } from "@m4l/core";
3
- import { I as ICONS } from "../areas/icons-CwFr-alN.js";
4
- import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
5
- import { unstable_composeClasses } from "@mui/base";
6
- import { m as LoadingErrorRoot } from "../../styles/index-DKj6m8SL.js";
7
- import { L as LinearProgressIndeterminate } from "../LinearProgressIndeterminate/index-BwI756Mb.js";
8
- import { I as Icon } from "../Icon/index-C89MAkeH.js";
9
- import { T as Typography } from "../mui_extended/Typography/index-Cf_4Zw8f.js";
10
- import { B as Button } from "../mui_extended/Button/index-CGfZbaea.js";
11
- const componentName = "M4LoadingError";
12
- generateUtilityClasses(componentName, [
13
- /* elements */
14
- "root",
15
- "loadingErrorLoading",
16
- "loadingError",
17
- "loadingErrorIcon",
18
- "loadingErrorTitle",
19
- "loadingErrorDescription",
20
- "loadingErrorDivider",
21
- "loadingErrorTextAction",
22
- "titleDescription"
23
- /* states or variants of elements */
24
- ]);
25
- function getLoadingErrorUtilityClass(slot) {
26
- return generateUtilityClass(componentName, slot);
27
- }
28
- const loadingErrorUtilityClasses = () => {
29
- const slots = {
30
- root: ["root"],
31
- loadingErrorLoading: ["loadingErrorLoading"],
32
- loadingError: ["loadingError"],
33
- loadingErrorIcon: ["loadingErrorIcon"],
34
- loadingErrorTitle: ["loadingErrorTitle"],
35
- loadingErrorDescription: ["loadingErrorDescription"],
36
- loadingErrorDivider: ["loadingErrorDivider"],
37
- loadingErrorTextAction: ["loadingErrorTextAction"],
38
- titleDescription: ["titleDescription"]
39
- };
40
- const composedClasses = unstable_composeClasses(slots, getLoadingErrorUtilityClass, {});
41
- return {
42
- ...composedClasses
43
- };
44
- };
45
- const LoadingError = (props) => {
46
- const { status, action, title, description, recommendation, introMessage, errorIcon } = props;
47
- const { host_static_assets, environment_assets } = useEnvironment();
48
- const { getLabel } = useModuleDictionary();
49
- const classes = loadingErrorUtilityClasses();
50
- return /* @__PURE__ */ jsx(LoadingErrorRoot, { className: classes.root, children: status !== "error" ? /* @__PURE__ */ jsx("div", { className: classes.loadingErrorLoading, children: /* @__PURE__ */ jsx(LinearProgressIndeterminate, {}) }) : /* @__PURE__ */ jsxs("div", { className: classes.loadingError, children: [
51
- /* @__PURE__ */ jsx(
52
- Icon,
53
- {
54
- className: classes.loadingErrorIcon,
55
- src: errorIcon ? errorIcon : `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.NAVIGATE_ERROR}`
56
- }
57
- ),
58
- /* @__PURE__ */ jsxs("div", { className: classes.titleDescription, children: [
59
- /* @__PURE__ */ jsx(Typography, { variant: "h3", skeletonWidth: "100px", className: classes.loadingErrorTitle, children: title ? title : getLabel("loading_error.label_error_title") }),
60
- /* @__PURE__ */ jsx(
61
- Typography,
62
- {
63
- variant: "subtitle",
64
- skeletonWidth: "100px",
65
- className: classes.loadingErrorDescription,
66
- children: description ? description : getLabel("loading_error.label_error_description")
67
- }
68
- )
69
- ] }),
70
- /* @__PURE__ */ jsx("div", { className: classes.loadingErrorDivider }),
71
- /* @__PURE__ */ jsx(
72
- Typography,
73
- {
74
- variant: "paragraph",
75
- skeletonWidth: "100px",
76
- className: classes.loadingErrorTextAction,
77
- children: recommendation ? recommendation : getLabel("loading_error.label_error_recommendation")
78
- }
79
- ),
80
- /* @__PURE__ */ jsx(Button, { onClick: action, children: introMessage ? introMessage : getLabel("loading_error.label_error_intro") })
81
- ] }) });
82
- };
83
- const getLoadingErrorComponentsDictionary = () => {
84
- return ["loading_error"];
85
- };
86
- export {
87
- LoadingError as L,
88
- getLoadingErrorComponentsDictionary as g
89
- };
@@ -1,169 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { useEffect, useMemo, useCallback } from "react";
3
- import { unstable_HistoryRouter } from "react-router-dom";
4
- import { createBrowserHistory } from "history";
5
- import EventEmitter from "eventemitter3";
6
- import NProgress from "nprogress";
7
- import { HostThemeProvider, FormatterProvider, LocalesProvider, getLocaleFromNetwork, ResponsiveContainerProvider } from "@m4l/graphics";
8
- import { useAuth, DomainCountryProvider, EnvironmentProvider, HostToolsProvider, NetworkProvider, axiosOperation, AuthProvider } from "@m4l/core";
9
- import { c as createToaster, T as ToastContainer } from "../ToastContainer/index-DK1d8NNd.js";
10
- import { format } from "date-fns";
11
- import { defaultThemeOptions, fnComponentsOverrides } from "@m4l/styles";
12
- import { B as BaseModule } from "../BaseModule/index-CiNNlxzS.js";
13
- import { A as AreasProvider } from "../areas/contexts/AreasContext/index-BqRlA7JA.js";
14
- function MFAuthApp(props) {
15
- const { children, user, pwd } = props;
16
- const { isAuthenticated, isInitialized, login, user: authUser } = useAuth();
17
- useEffect(() => {
18
- if (isInitialized && isAuthenticated === false) {
19
- login(user, pwd, false);
20
- }
21
- }, [isInitialized, isAuthenticated]);
22
- if (!isAuthenticated) return /* @__PURE__ */ jsx("div", { children: "Pendiente por autenticarse" });
23
- const domianCountry = {
24
- id: 1,
25
- currency: "USD",
26
- currency_decimal_digits: 2,
27
- decimal_symbol: ".",
28
- thousands_symbol: ","
29
- };
30
- if (authUser?.domain_country) {
31
- domianCountry.id = authUser?.domain_country.id ?? domianCountry.id;
32
- domianCountry.currency = authUser?.domain_country.currency ?? domianCountry.currency;
33
- domianCountry.currency_decimal_digits = authUser?.domain_country.currency_decimal_digits ?? domianCountry.currency_decimal_digits;
34
- domianCountry.decimal_symbol = authUser?.domain_country.decimal_symbol ?? domianCountry.decimal_symbol;
35
- domianCountry.thousands_symbol = authUser?.domain_country?.thousands_symbol ?? domianCountry.thousands_symbol;
36
- }
37
- return /* @__PURE__ */ jsx(
38
- HostThemeProvider,
39
- {
40
- hostThemeOptions: defaultThemeOptions,
41
- fnComponentsOverrides,
42
- isMicroFrontEnd: true,
43
- children: /* @__PURE__ */ jsx(DomainCountryProvider, { ...domianCountry, isMicroFrontEnd: false, children: /* @__PURE__ */ jsx(
44
- FormatterProvider,
45
- {
46
- isMicroFrontEnd: false,
47
- dateFormatter: {
48
- formatDate: format
49
- },
50
- currencyFormatter: {
51
- code: domianCountry.currency,
52
- decimalDigits: domianCountry.currency_decimal_digits
53
- },
54
- children
55
- }
56
- ) })
57
- }
58
- );
59
- }
60
- const TOAST_CONTAINER_ID = "toast-host";
61
- const history = createBrowserHistory({ window });
62
- function MFIsolationApp(props) {
63
- const {
64
- children,
65
- user,
66
- pwd,
67
- database = "domain",
68
- // 'domain
69
- host_api_local,
70
- host_api_remote,
71
- host_static_assets,
72
- environment_assets,
73
- moduleId,
74
- skeletonFlags,
75
- moduleNameField,
76
- privileges,
77
- componentsDictionary,
78
- onLoad,
79
- activeAreasNetwork = false,
80
- activeCookiesFromNetwork = false,
81
- observedDivRef
82
- } = props;
83
- const eventEmitter = useMemo(() => new EventEmitter(), []);
84
- const events_add_listener = useCallback(
85
- (eventName, handler) => {
86
- eventEmitter.on(eventName, handler);
87
- },
88
- [eventEmitter]
89
- );
90
- const events_remove_listener = useCallback(
91
- (eventName, handler) => {
92
- if (handler === null) {
93
- eventEmitter.removeListener(eventName);
94
- return;
95
- }
96
- eventEmitter.removeListener(eventName, handler);
97
- },
98
- [eventEmitter]
99
- );
100
- const events_emit = useCallback(
101
- (eventName, arg) => {
102
- eventEmitter.emit(eventName, arg);
103
- },
104
- [eventEmitter]
105
- );
106
- const startProgress = () => {
107
- NProgress.configure({
108
- showSpinner: true
109
- });
110
- NProgress.start();
111
- };
112
- const stopProgress = () => {
113
- NProgress.done();
114
- };
115
- const environment = useMemo(
116
- () => ({
117
- host: "",
118
- isLocalhost: true,
119
- domain_token: "lab1",
120
- database,
121
- host_api_local,
122
- host_api_remote,
123
- host_static_assets,
124
- environment_assets
125
- }),
126
- []
127
- );
128
- const toaster = createToaster(TOAST_CONTAINER_ID);
129
- const hostTools = useMemo(
130
- () => ({
131
- history,
132
- toast: toaster,
133
- startProgress,
134
- stopProgress,
135
- events_add_listener,
136
- events_remove_listener,
137
- events_emit
138
- }),
139
- []
140
- );
141
- return /* @__PURE__ */ jsx(EnvironmentProvider, { ...environment, children: /* @__PURE__ */ jsx(HostToolsProvider, { ...hostTools, children: /* @__PURE__ */ jsx(NetworkProvider, { axiosOperation, children: /* @__PURE__ */ jsx(unstable_HistoryRouter, { history, children: /* @__PURE__ */ jsx(LocalesProvider, { isMicroFrontEnd: false, getLocaleFromNetwork, children: /* @__PURE__ */ jsx(AuthProvider, { children: /* @__PURE__ */ jsxs(MFAuthApp, { user, pwd, children: [
142
- /* @__PURE__ */ jsx(ToastContainer, { containerId: TOAST_CONTAINER_ID }),
143
- /* @__PURE__ */ jsx(
144
- BaseModule,
145
- {
146
- moduleId,
147
- privileges,
148
- skeletonFlags,
149
- componentsDictionary,
150
- moduleNameField,
151
- children: /* @__PURE__ */ jsx(
152
- AreasProvider,
153
- {
154
- onLoad,
155
- loadAreasFromNetwork: activeAreasNetwork,
156
- loadCookiesFromNetwork: activeCookiesFromNetwork,
157
- onSelectLayout: (modId) => {
158
- console.log("onSelectLayout", modId);
159
- },
160
- children: /* @__PURE__ */ jsx(ResponsiveContainerProvider, { observedDivRef, children })
161
- }
162
- )
163
- }
164
- )
165
- ] }) }) }) }) }) }) });
166
- }
167
- export {
168
- MFIsolationApp as M
169
- };