@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,175 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { g as ImageRoot } from "../../styles/index-CqpubQQr.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-BkfHXcTV.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-BxphCFC7.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-CqpubQQr.js";
7
- import { I as ImageButton } from "../mui_extended/Button/index-CgvCim_g.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-Dl1PwIS2.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-CqpubQQr.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-CqpubQQr.js";
7
- import { L as LinearProgressIndeterminate } from "../LinearProgressIndeterminate/index-CTvXOPRx.js";
8
- import { I as Icon } from "../Icon/index-BJF_0F6d.js";
9
- import { T as Typography } from "../mui_extended/Typography/index-DXq1fG8k.js";
10
- import { B as Button } from "../mui_extended/Button/index-CgvCim_g.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-jnQcIcV1.js";
10
- import { format } from "date-fns";
11
- import { defaultThemeOptions, fnComponentsOverrides } from "@m4l/styles";
12
- import { B as BaseModule } from "../BaseModule/index-BQ2UIUCy.js";
13
- import { A as AreasProvider } from "../areas/contexts/AreasContext/index-DGguLxcX.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
- };