@m4l/components 1.0.0 → 1.0.2

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 (95) hide show
  1. package/components/AccountPopover/{index.efc74d5c.js → index.ec031003.js} +5 -3
  2. package/components/AppBar/{index.fc126a22.js → index.1499770b.js} +4 -4
  3. package/components/DragResizeWindow/{index.46b380e1.js → index.5e316291.js} +3 -3
  4. package/components/DynamicFilter/{index.d9168c12.js → index.05e15fb8.js} +28 -211
  5. package/components/FieldLabel/{index.f9cdcc27.js → index.400a46e0.js} +4 -4
  6. package/components/GridLayout/{index.bb3b7769.js → index.7156fbc9.js} +2 -2
  7. package/components/GridLayout/subcomponents/Griditem/{index.bb23f651.js → index.8946f18e.js} +4 -4
  8. package/components/GridLayout/subcomponents/Responsive/{index.b8a2a121.js → index.3c68f0cb.js} +2 -2
  9. package/components/GridLayout/subcomponents/SizeProvider/{index.094bc6b5.js → index.a5b2190d.js} +1 -1
  10. package/components/HamburgerMenu/{index.5997af31.js → index.d57bca4c.js} +3 -3
  11. package/components/HelperText/{index.be949cdf.js → index.651a9b4b.js} +1 -1
  12. package/components/Icon/index.2e8ec5a1.js +209 -0
  13. package/components/Image/index.0d32558e.js +168 -0
  14. package/components/LoadingError/{index.9f00c83c.js → index.d137be81.js} +5 -4
  15. package/components/MFLoader/{index.402c1acc.js → index.2038aa6c.js} +3 -3
  16. package/components/ModalDialog/{index.ea9189c3.js → index.85d30f10.js} +4 -4
  17. package/components/NavLink/{index.4e548cee.js → index.badec599.js} +2 -2
  18. package/components/NoItemSelected/{index.418c8316.js → index.008154ce.js} +2 -2
  19. package/components/ObjectLogs/{index.bfa7dad3.js → index.65a6b1bc.js} +8 -7
  20. package/components/PDFViewer/{index.bb2eca5a.js → index.9677b02a.js} +2 -2
  21. package/components/Page/index.7482cf60.js +98 -0
  22. package/components/PaperForm/{index.8121e3da.js → index.e04f9f1f.js} +2 -2
  23. package/components/Period/{index.5233694b.js → index.3d695534.js} +8 -103
  24. package/components/PrintingSystem/{index.fb176a93.js → index.89493ad6.js} +15 -14
  25. package/components/PrintingSystem/subcomponents/BodyNode/{index.c1d61038.js → index.fdd8cebb.js} +1 -1
  26. package/components/PrintingSystem/subcomponents/ChartNode/{index.18bd9bad.js → index.12293a60.js} +1 -1
  27. package/components/PrintingSystem/subcomponents/DividerNode/{index.67d9f1b4.js → index.7fdad1df.js} +1 -1
  28. package/components/PrintingSystem/subcomponents/FooterNode/{index.eaee152a.js → index.fcaf9b2f.js} +1 -1
  29. package/components/PrintingSystem/subcomponents/GridNode/{index.f5f63a2a.js → index.03148990.js} +1 -1
  30. package/components/PrintingSystem/subcomponents/HeaderNode/{index.7de4e411.js → index.691b5c38.js} +1 -1
  31. package/components/PrintingSystem/subcomponents/PaperNode/{index.f9ccf22b.js → index.3699b685.js} +1 -1
  32. package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.f2f2e903.js → index.bcc87da8.js} +1 -1
  33. package/components/PrintingSystem/subcomponents/SectionNode/{index.540a4b19.js → index.659f28e5.js} +1 -1
  34. package/components/PrintingSystem/subcomponents/TextBoxNode/{index.41e7fcb0.js → index.137ebb7a.js} +1 -1
  35. package/components/PropertyValue/{index.9572c347.js → index.e31d4282.js} +3 -3
  36. package/components/Resizeable/{index.1f0c1359.js → index.8c72e36a.js} +1 -1
  37. package/components/ScrollBar/{index.adf0eade.js → index.9bfcc74f.js} +1 -1
  38. package/components/SideBar/{index.629ba840.js → index.004a2de1.js} +7 -31
  39. package/components/SplitLayout/{index.74091a81.js → index.aed78a1f.js} +1 -1
  40. package/components/ToastContainer/{index.f9b507b9.js → index.586b1194.js} +3 -3
  41. package/components/areas/constants.630a4f42.js +293 -0
  42. package/components/areas/contexts/AreasContext/{index.bb316000.js → index.81b748ec.js} +4 -4
  43. package/components/areas/{dictionary.7e74022a.js → dictionary.19b25583.js} +26 -34
  44. package/components/areas/hooks/useAreas/{index.e24bd74d.js → index.b02d5bdc.js} +1 -1
  45. package/components/hook-form/HelperError/index.fd10c3ab.js +19 -0
  46. package/components/hook-form/RHFAutocompleteAsync/index.ea3ba7a7.js +160 -0
  47. package/components/hook-form/RHFCheckbox/index.9ac452cc.js +143 -0
  48. package/components/hook-form/RHFColorPicker/index.25e4e643.js +191 -0
  49. package/components/hook-form/RHFDateTime/index.31a0537d.js +190 -0
  50. package/components/hook-form/RHFMultiCheckbox/index.437e6ba3.js +34 -0
  51. package/components/hook-form/RHFPeriod/index.c8868100.js +105 -0
  52. package/components/hook-form/RHFRadioGroup/index.11c0add8.js +35 -0
  53. package/components/hook-form/RHFSelect/index.c6c60ecc.js +29 -0
  54. package/components/hook-form/RHFTextField/index.2ae1f130.js +326 -0
  55. package/components/{Image/index.36a3d440.js → hook-form/RHFUpload/index.9eeaee0f.js} +32 -232
  56. package/components/maps/components/GpsTools/index.ef751d28.js +251 -0
  57. package/components/maps/{index.8ec46ce4.js → index.ba1ccfad.js} +21 -555
  58. package/components/modal/{WindowBase.a3ac7adc.js → WindowBase.c1e879e4.js} +4 -3
  59. package/components/modal/{WindowConfirm.e35da619.js → WindowConfirm.1a123368.js} +6 -6
  60. package/components/modal/{index.a0e30c8b.js → index.7ca17f55.js} +1 -1
  61. package/components/mui_extended/Accordion/index.391679d1.js +143 -0
  62. package/components/mui_extended/Avatar/index.3ba36655.js +63 -0
  63. package/components/mui_extended/Badge/index.3465d7fb.js +31 -0
  64. package/components/mui_extended/BoxIcon/index.d61e7ac5.js +22 -0
  65. package/components/mui_extended/Breadcrumbs/index.4a44883c.js +87 -0
  66. package/components/mui_extended/Button/index.a7dc6ef0.js +289 -0
  67. package/components/mui_extended/CheckBox/index.c5c8721c.js +76 -0
  68. package/components/mui_extended/CircularProgress/index.967e70b7.js +8 -0
  69. package/components/mui_extended/IconButton/index.87f4726c.js +120 -0
  70. package/components/{LinearProgressIndeterminate/index.de9d447c.js → mui_extended/LinearProgress/index.52edc848.js} +11 -4
  71. package/components/mui_extended/LinkWithRoute/index.288c51f3.js +15 -0
  72. package/components/{Page/index.fdf04592.js → mui_extended/Pager/index.46aec921.js} +9 -98
  73. package/components/mui_extended/Popover/index.8e5ac765.js +1041 -0
  74. package/components/mui_extended/Stack/index.fe363ca5.js +31 -0
  75. package/components/{maps/components/GpsTools/index.75880ce0.js → mui_extended/Tab/index.ad88441e.js} +674 -239
  76. package/components/mui_extended/ToggleButton/index.38ca2330.js +18 -0
  77. package/components/mui_extended/ToggleIconButton/index.7fbece74.js +24 -0
  78. package/components/mui_extended/Tooltip/index.49bb5ee1.js +40 -0
  79. package/components/mui_extended/Typography/index.2a1c68f8.js +55 -0
  80. package/components/popups/PopupsProvider/{index.18669fb4.js → index.3b43e55f.js} +1 -1
  81. package/components/popups/PopupsViewer/{index.ba354267.js → index.fb3f0c48.js} +5 -4
  82. package/contexts/ModalContext/{index.cf02e6bd.js → index.82f61407.js} +1 -1
  83. package/contexts/RHFormContext/{index.dc955a09.js → index.e942a298.js} +1 -1
  84. package/hooks/useFormAddEdit/{index.f156a2cd.js → index.fa430551.js} +2 -2
  85. package/hooks/useModal/{index.ef54bcf2.js → index.9fe41bde.js} +3 -3
  86. package/index.js +266 -239
  87. package/package.json +1 -1
  88. package/{react-draggable.5331add7.js → react-draggable.2df3b71a.js} +1 -1
  89. package/{react-resizable.37bfb965.js → react-resizable.c60f3843.js} +2 -2
  90. package/utils/{index.9ee4c99a.js → index.0660ee9c.js} +9 -62
  91. package/{vendor.a1ce6777.js → vendor.3eadfa16.js} +746 -3011
  92. package/components/Icon/index.d5fed418.js +0 -420
  93. package/components/LanguagePopover/index.e6fa2336.js +0 -184
  94. package/components/areas/constants.5387d83e.js +0 -412
  95. package/hooks/useTab/index.bce8b99e.js +0 -12
@@ -0,0 +1,168 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { styled } from "@mui/material/styles";
3
+ import { u as IMAGE_PREFIX, T as TEST_PROP_ID } from "../areas/constants.630a4f42.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.89493ad6.js";
9
+ import QRCode from "qrcode.react";
10
+ const ImageRoot = styled("div")(({ theme }) => ({
11
+ ...theme.components?.M4LImage?.styleOverrides
12
+ }));
13
+ const ratioOptions = {
14
+ "1.168:1": {
15
+ width: 1.168,
16
+ height: 1
17
+ },
18
+ "16:9": {
19
+ width: 16,
20
+ height: 9
21
+ },
22
+ "1:1": {
23
+ width: 1,
24
+ height: 1
25
+ },
26
+ "1:1.168": {
27
+ width: 1,
28
+ height: 1.168
29
+ },
30
+ "2:1": {
31
+ width: 2,
32
+ height: 1
33
+ },
34
+ "2:3": {
35
+ width: 2,
36
+ height: 3
37
+ },
38
+ "3:1": {
39
+ width: 3,
40
+ height: 1
41
+ },
42
+ "3:2": {
43
+ width: 3,
44
+ height: 2
45
+ },
46
+ "3:4": {
47
+ width: 3,
48
+ height: 4
49
+ },
50
+ "4:3": {
51
+ width: 4,
52
+ height: 3
53
+ },
54
+ "5:2": {
55
+ width: 5,
56
+ height: 2
57
+ }
58
+ };
59
+ const getRatioValues = (ratio) => {
60
+ const numType = ratioOptions[ratio];
61
+ const numRef = numType.width / numType.height;
62
+ if (numRef >= 1) {
63
+ return {
64
+ width: "100%",
65
+ height: `${Math.trunc(numRef * 100)}%`
66
+ };
67
+ } else {
68
+ return {
69
+ width: `${Math.trunc(numRef * 100)}%`,
70
+ height: "100%"
71
+ };
72
+ }
73
+ };
74
+ const getNameDataTestId = (KEY) => {
75
+ return `${IMAGE_PREFIX}-${KEY}`;
76
+ };
77
+ const componentName = "M4LImage";
78
+ generateUtilityClasses(componentName, [
79
+ "root",
80
+ "img"
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 /* @__PURE__ */ jsx(
100
+ ImageRoot,
101
+ {
102
+ className: clsx(classes2.root, className),
103
+ ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("root") } : {},
104
+ style: width && height ? { minWidth: width, minHeight: height, width, height } : { width: "100%", height: "100%" },
105
+ children: /* @__PURE__ */ jsx(
106
+ "img",
107
+ {
108
+ alt,
109
+ src,
110
+ className: classes2.img,
111
+ width: !width ? "100%" : ratioImage.width,
112
+ height: !height ? "100%" : ratioImage.height,
113
+ ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("img") } : {}
114
+ }
115
+ )
116
+ }
117
+ );
118
+ }
119
+ const ImageNode = (props) => {
120
+ const { className, style, src, width = "100%", height = "100%" } = props;
121
+ const { unitSize, sourceData } = useBase();
122
+ const { host_static_assets, environment_assets } = useEnvironment();
123
+ const resourceImg = evaluateWithContext(sourceData, src);
124
+ return /* @__PURE__ */ jsx(
125
+ "img",
126
+ {
127
+ src: `${host_static_assets}/${environment_assets}/${resourceImg}`,
128
+ className: clsx(classes.imageNodeRoot, className),
129
+ style: {
130
+ width: getSize(width, unitSize),
131
+ height: getSize(height, unitSize),
132
+ ...style
133
+ }
134
+ }
135
+ );
136
+ };
137
+ const convertToPx = (size, magnitud) => {
138
+ if (isNaN(size)) {
139
+ return 0;
140
+ }
141
+ if (magnitud === "px") {
142
+ return size;
143
+ }
144
+ switch (magnitud) {
145
+ case "cm":
146
+ return size * 37.8;
147
+ case "mm":
148
+ return size * 3.78;
149
+ case "in":
150
+ return size * 96;
151
+ case "pt":
152
+ return size * 1.33;
153
+ case "pc":
154
+ return size * 16;
155
+ default:
156
+ return 100;
157
+ }
158
+ };
159
+ const QRImageNode = (props) => {
160
+ const { url, size = 8, color } = props;
161
+ const { unitSize } = useBase();
162
+ return /* @__PURE__ */ jsx(QRCode, { value: url, size: convertToPx(size, unitSize), fgColor: color, renderAs: "canvas" });
163
+ };
164
+ export {
165
+ Image as I,
166
+ QRImageNode as Q,
167
+ ImageNode as a
168
+ };
@@ -3,11 +3,12 @@ import { useEnvironment, useModuleDictionary } from "@m4l/core";
3
3
  import { I as ICONS } from "../areas/icons.504ec098.js";
4
4
  import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
5
5
  import { unstable_composeClasses } from "@mui/base";
6
- import { K as componentName } from "../areas/constants.5387d83e.js";
6
+ import { v as componentName } from "../areas/constants.630a4f42.js";
7
7
  import { styled } from "@mui/material/styles";
8
- import { L as LinearProgressIndeterminate } from "../LinearProgressIndeterminate/index.de9d447c.js";
9
- import { I as Icon } from "../Icon/index.d5fed418.js";
10
- import { T as Typography, B as Button } from "../../vendor.a1ce6777.js";
8
+ import { L as LinearProgressIndeterminate } from "../mui_extended/LinearProgress/index.52edc848.js";
9
+ import { I as Icon } from "../Icon/index.2e8ec5a1.js";
10
+ import { T as Typography } from "../mui_extended/Typography/index.2a1c68f8.js";
11
+ import { B as Button } from "../mui_extended/Button/index.a7dc6ef0.js";
11
12
  generateUtilityClasses(componentName, [
12
13
  "root",
13
14
  "loadingErrorLoading",
@@ -11,9 +11,9 @@ import { useHostTheme, useFormatter, useLocales, useFirstRender } from "@m4l/gra
11
11
  import debounce from "lodash/debounce";
12
12
  import { generateUtilityClasses, generateUtilityClass, styled } from "@mui/material";
13
13
  import { unstable_composeClasses } from "@mui/base";
14
- import { O as componentName } from "../areas/constants.5387d83e.js";
15
- import { L as LinearProgress } from "../../vendor.a1ce6777.js";
16
- import { L as LoadingError } from "../LoadingError/index.9f00c83c.js";
14
+ import { w as componentName } from "../areas/constants.630a4f42.js";
15
+ import { a as LinearProgress } from "../mui_extended/LinearProgress/index.52edc848.js";
16
+ import { L as LoadingError } from "../LoadingError/index.d137be81.js";
17
17
  const mfLoaderClasses = generateUtilityClasses(componentName, [
18
18
  "root",
19
19
  "containerLinearProgress"
@@ -1,10 +1,10 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useTheme, Dialog, Paper } from "@mui/material";
3
- import { c as cjs } from "../../react-draggable.5331add7.js";
4
- import { u as useModal } from "../../hooks/useModal/index.ef54bcf2.js";
5
- import { R as ResizeableWindow } from "../Resizeable/index.1f0c1359.js";
3
+ import { c as cjs } from "../../react-draggable.2df3b71a.js";
4
+ import { u as useModal } from "../../hooks/useModal/index.9fe41bde.js";
5
+ import { R as ResizeableWindow } from "../Resizeable/index.8c72e36a.js";
6
6
  import { useIsMobile } from "@m4l/graphics";
7
- import { m as modalUtilityClasses } from "../modal/index.a0e30c8b.js";
7
+ import { m as modalUtilityClasses } from "../modal/index.7ca17f55.js";
8
8
  import { useState, useEffect } from "react";
9
9
  const DragabblePaperComponent = (props) => {
10
10
  return /* @__PURE__ */ jsx(cjs.exports, { handle: ".m4l_draggable_handle", cancel: '[class*="MuiDialogContent-root"]', children: /* @__PURE__ */ jsx(Paper, { sx: { maxHeight: "unset", maxWidth: "unset" }, ...props }) });
@@ -3,8 +3,8 @@ import { NavLink as NavLink$1 } from "react-router-dom";
3
3
  import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
4
4
  import { unstable_composeClasses } from "@mui/base";
5
5
  import { styled } from "@mui/material/styles";
6
- import { P as NAVLINK_PREFIX, T as TEST_PROP_ID } from "../areas/constants.5387d83e.js";
7
- import { T as Typography } from "../../vendor.a1ce6777.js";
6
+ import { x as NAVLINK_PREFIX, T as TEST_PROP_ID } from "../areas/constants.630a4f42.js";
7
+ import { T as Typography } from "../mui_extended/Typography/index.2a1c68f8.js";
8
8
  const componentName = "M4LNavLink";
9
9
  generateUtilityClasses(componentName, [
10
10
  "root"
@@ -1,11 +1,11 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { useEnvironment, useModuleDictionary, useModuleSkeleton } from "@m4l/core";
3
- import { I as Image } from "../Image/index.36a3d440.js";
3
+ import { I as Image } from "../Image/index.0d32558e.js";
4
4
  import { styled } from "@mui/material/styles";
5
5
  import { generateUtilityClasses, generateUtilityClass, Skeleton } from "@mui/material";
6
6
  import { useMemo } from "react";
7
7
  import { unstable_composeClasses } from "@mui/base";
8
- import { Q as componentName } from "../areas/constants.5387d83e.js";
8
+ import { y as componentName } from "../areas/constants.630a4f42.js";
9
9
  const WrapperNoItemSelected = styled("div")(({ theme }) => ({
10
10
  ...theme.components?.M4LNoItemSelected?.styleOverrides
11
11
  }));
@@ -2,16 +2,17 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useState, useEffect, useCallback, useMemo } from "react";
3
3
  import { useNetwork, useModuleDictionary, useEnvironment, usePaginate } from "@m4l/core";
4
4
  import { styled } from "@mui/material/styles";
5
- import { S as Stack, D as DateFormatter, g as DataGrid } from "../../vendor.a1ce6777.js";
5
+ import { D as DateFormatter, a as DataGrid } from "../../vendor.3eadfa16.js";
6
6
  import { Tooltip, IconButton } from "@mui/material";
7
7
  import { useHostTheme, useResponsiveDesktop } from "@m4l/graphics";
8
8
  import { R as ReactJson } from "../../react-json-view.57125fcf.js";
9
- import { S as ScrollBar } from "../ScrollBar/index.adf0eade.js";
10
- import { u as useModal } from "../../hooks/useModal/index.ef54bcf2.js";
11
- import { I as Icon } from "../Icon/index.d5fed418.js";
12
- import { W as WindowBase } from "../modal/WindowBase.a3ac7adc.js";
13
- import { D as DynamicFilter } from "../DynamicFilter/index.d9168c12.js";
14
- import { T as TEST_PROP_ID } from "../areas/constants.5387d83e.js";
9
+ import { S as ScrollBar } from "../ScrollBar/index.9bfcc74f.js";
10
+ import { u as useModal } from "../../hooks/useModal/index.9fe41bde.js";
11
+ import { I as Icon } from "../Icon/index.2e8ec5a1.js";
12
+ import { S as Stack } from "../mui_extended/Stack/index.fe363ca5.js";
13
+ import { W as WindowBase } from "../modal/WindowBase.c1e879e4.js";
14
+ import { D as DynamicFilter } from "../DynamicFilter/index.05e15fb8.js";
15
+ import { T as TEST_PROP_ID } from "../areas/constants.630a4f42.js";
15
16
  const Container = styled("div")(() => ({
16
17
  height: "100%",
17
18
  width: "100%",
@@ -1,8 +1,8 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { styled, generateUtilityClasses, generateUtilityClass } from "@mui/material";
3
3
  import { unstable_composeClasses } from "@mui/base";
4
- import { R as componentName } from "../areas/constants.5387d83e.js";
5
- import { B as Button } from "../../vendor.a1ce6777.js";
4
+ import { z as componentName } from "../areas/constants.630a4f42.js";
5
+ import { B as Button } from "../mui_extended/Button/index.a7dc6ef0.js";
6
6
  const PDFVeiwerRoot = styled("div")(({ theme }) => ({
7
7
  ...theme.components?.M4LPDFViewer?.styleOverrides
8
8
  }));
@@ -0,0 +1,98 @@
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import { useBase, BaseProvider, useModuleSkeleton } from "@m4l/core";
3
+ import { c as classes, g as getSize, F as FactoryRender } from "../PrintingSystem/index.89493ad6.js";
4
+ import clsx from "clsx";
5
+ import React__default from "react";
6
+ import { Helmet } from "react-helmet-async";
7
+ import { useLocales } from "@m4l/graphics";
8
+ const PageNode = (props) => {
9
+ const {
10
+ children,
11
+ style = {},
12
+ className = "",
13
+ width = "auto",
14
+ height = "auto",
15
+ paddingTop = "unset",
16
+ paddingRight = "unset",
17
+ paddingBottom = "unset",
18
+ paddingLeft = "unset",
19
+ gap = "unset"
20
+ } = props;
21
+ const { unitSize } = useBase();
22
+ return /* @__PURE__ */ jsx(
23
+ "div",
24
+ {
25
+ className: clsx(classes.pageNodeRoot, className),
26
+ style: {
27
+ width: getSize(width, unitSize),
28
+ gap: getSize(gap, unitSize),
29
+ height: getSize(height, unitSize),
30
+ minWidth: getSize(width, unitSize),
31
+ minHeight: typeof height === "number" ? `${height}${unitSize}` : height,
32
+ paddingTop: typeof paddingTop === "number" ? `${paddingTop}${unitSize}` : paddingTop,
33
+ paddingRight: typeof paddingRight === "number" ? `${paddingRight}${unitSize}` : paddingRight,
34
+ paddingBottom: typeof paddingBottom === "number" ? `${paddingBottom}${unitSize}` : paddingBottom,
35
+ paddingLeft: typeof paddingLeft === "number" ? `${paddingLeft}${unitSize}` : paddingLeft,
36
+ ...style
37
+ },
38
+ children
39
+ }
40
+ );
41
+ };
42
+ const PageRender = (props) => {
43
+ const {
44
+ data: parent,
45
+ id,
46
+ unitSize,
47
+ mainColor,
48
+ countPages,
49
+ HeaderGeneral,
50
+ FooterGeneral,
51
+ sourceData,
52
+ templateData
53
+ } = props;
54
+ const { children, ...otherProps } = parent || {};
55
+ return /* @__PURE__ */ jsx(
56
+ BaseProvider,
57
+ {
58
+ value: {
59
+ pageId: id,
60
+ unitSize,
61
+ mainColor,
62
+ countPages,
63
+ HeaderGeneral,
64
+ FooterGeneral,
65
+ templateData,
66
+ sourceData
67
+ },
68
+ children: /* @__PURE__ */ jsxs(PageNode, { ...otherProps, children: [
69
+ Array.isArray(children) && children.length > 0 ? children.map((subComponent, id2) => {
70
+ return /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
71
+ id2 === 0 && parent.type === "page" && children[0].type !== "header" ? HeaderGeneral ? /* @__PURE__ */ jsx(HeaderGeneral, { ancestor: parent }, `${parent.key}-header`) : null : null,
72
+ /* @__PURE__ */ jsx(FactoryRender, { data: subComponent }, `${parent.type}-${subComponent.key}`),
73
+ id2 === children.length - 1 && parent.type === "page" && children[children.length - 1].type !== "footer" ? FooterGeneral ? /* @__PURE__ */ jsx(FooterGeneral, { ancestor: parent }, `${parent.key}-footer`) : null : null
74
+ ] }, `fragment-page-${id2}`);
75
+ }) : null,
76
+ typeof children === "string" ? children : null
77
+ ] })
78
+ }
79
+ );
80
+ };
81
+ const HelmetPage = (props) => {
82
+ const { children, title, meta, subtitle } = props;
83
+ const localeString = useLocales().currentLocale?.localeString;
84
+ const isSkeleton = useModuleSkeleton();
85
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
86
+ !isSkeleton && /* @__PURE__ */ jsxs(Helmet, { children: [
87
+ /* @__PURE__ */ jsx("title", { children: `${title}${subtitle ? ` | ${subtitle}` : ""} ` }),
88
+ /* @__PURE__ */ jsx("html", { lang: localeString }),
89
+ meta
90
+ ] }),
91
+ children
92
+ ] });
93
+ };
94
+ HelmetPage.displayName = "Page";
95
+ export {
96
+ HelmetPage as H,
97
+ PageRender as P
98
+ };
@@ -2,9 +2,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { styled } from "@mui/material/styles";
3
3
  import { useModuleSkeleton } from "@m4l/core";
4
4
  import { Skeleton, generateUtilityClasses, generateUtilityClass } from "@mui/material";
5
- import { I as Icon } from "../Icon/index.d5fed418.js";
5
+ import { I as Icon } from "../Icon/index.2e8ec5a1.js";
6
6
  import { unstable_composeClasses } from "@mui/base";
7
- import { V as componentName } from "../areas/constants.5387d83e.js";
7
+ import { E as componentName } from "../areas/constants.630a4f42.js";
8
8
  const PaperFormRoot = styled("div")(({ theme }) => ({
9
9
  ...theme.components?.M4LPaperForm?.styleOverrides
10
10
  }));
@@ -1,27 +1,15 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
+ import { useModuleDictionary, useModuleSkeleton, useEnvironment } from "@m4l/core";
2
3
  import { styled } from "@mui/material/styles";
3
- import { useFormContext, Controller } from "react-hook-form";
4
- import { H as HelperText } from "../HelperText/index.be949cdf.js";
5
4
  import { generateUtilityClasses, generateUtilityClass, Skeleton, Autocomplete, TextField } from "@mui/material";
6
- import { unstable_composeClasses } from "@mui/base";
7
- import { W as componentName, X as PERIOD_PREFIX, T as TEST_PROP_ID, Y as componentName$1 } from "../areas/constants.5387d83e.js";
8
- import { useModuleDictionary, useModuleSkeleton, useEnvironment } from "@m4l/core";
9
- import { T as Typography, u as useFormFocus } from "../../vendor.a1ce6777.js";
10
- import { F as FieldLabel } from "../FieldLabel/index.f9cdcc27.js";
11
5
  import { useState, useMemo } from "react";
12
- import { d as dictionary, a as dictionary$1 } from "../areas/dictionary.7e74022a.js";
6
+ import { d as dictionary, a as dictionary$1 } from "../areas/dictionary.19b25583.js";
7
+ import { unstable_composeClasses } from "@mui/base";
8
+ import { F as componentName, P as PERIOD_PREFIX, T as TEST_PROP_ID } from "../areas/constants.630a4f42.js";
13
9
  import { useResponsiveDesktop } from "@m4l/graphics";
14
- import { a as IconButton } from "../Icon/index.d5fed418.js";
10
+ import { T as Typography } from "../mui_extended/Typography/index.2a1c68f8.js";
11
+ import { I as IconButton } from "../mui_extended/IconButton/index.87f4726c.js";
15
12
  import { W as WrapperComponent } from "../WrapperComponent/index.57964195.js";
16
- const RHFPeriodRoot = styled("div")(({ theme }) => ({
17
- width: "100%",
18
- display: "flex",
19
- flexDirection: "column",
20
- justifyContent: "center",
21
- alignItems: "flex-start",
22
- gap: theme.spacing(1),
23
- ...theme.components?.M4LRHFPeriod?.styleOverrides
24
- }));
25
13
  const ContainerPeriod = styled("div")(({ theme }) => ({
26
14
  ...theme.components?.M4LPeriod?.styleOverrides
27
15
  }));
@@ -287,88 +275,6 @@ const Period = (props) => {
287
275
  }
288
276
  );
289
277
  };
290
- generateUtilityClasses(componentName$1, [
291
- "root",
292
- "isFocus",
293
- "isTabSelected"
294
- ]);
295
- function getRHFPeriodUtilityClass(slot) {
296
- return generateUtilityClass(componentName$1, slot);
297
- }
298
- const RHFPeriodUtilityClasses = (ownerState) => {
299
- const slots = {
300
- root: ["root", ownerState.isFocus && "isFocus", ownerState.isTabSelected && "isTabSelected"]
301
- };
302
- const composedClasses = unstable_composeClasses(slots, getRHFPeriodUtilityClass, {});
303
- return {
304
- ...composedClasses
305
- };
306
- };
307
- const RHFPeriod = (props) => {
308
- const {
309
- name,
310
- readOnly,
311
- skeletonWidth,
312
- skeletonHeight,
313
- state,
314
- label,
315
- mandatory,
316
- mandatoryMessage,
317
- helperMessage,
318
- size
319
- } = props;
320
- const { control } = useFormContext();
321
- const isSkeleton = useModuleSkeleton();
322
- const { isFocus, isTabSelected, handlerFocus, handlerOnKeyUp, handlerOnBlur } = useFormFocus();
323
- const ownerState = {
324
- isFocus: !isSkeleton ? isFocus : false,
325
- isTabSelected: !isSkeleton ? isTabSelected : false
326
- };
327
- const classes = RHFPeriodUtilityClasses(ownerState);
328
- return /* @__PURE__ */ jsx(
329
- RHFPeriodRoot,
330
- {
331
- className: classes.root,
332
- tabIndex: 0,
333
- onFocus: handlerFocus,
334
- onBlur: handlerOnBlur,
335
- onKeyUp: handlerOnKeyUp,
336
- children: /* @__PURE__ */ jsx(
337
- Controller,
338
- {
339
- name,
340
- control,
341
- render: ({ field: { onChange, value }, fieldState: { error } }) => {
342
- return /* @__PURE__ */ jsxs(Fragment, { children: [
343
- label && /* @__PURE__ */ jsx(
344
- FieldLabel,
345
- {
346
- label,
347
- mandatory,
348
- mandatoryMessage,
349
- helperMessage
350
- }
351
- ),
352
- /* @__PURE__ */ jsx(
353
- Period,
354
- {
355
- value,
356
- onChange,
357
- state: !!error === true ? "error" : state,
358
- readOnly,
359
- skeletonWidth,
360
- skeletonHeight,
361
- size
362
- }
363
- ),
364
- error && /* @__PURE__ */ jsx(HelperText, { variant: "error", message: error.message || "" })
365
- ] });
366
- }
367
- }
368
- )
369
- }
370
- );
371
- };
372
278
  function getFormatPeriod(years, months, days) {
373
279
  const { getLabel } = useModuleDictionary();
374
280
  let period = "";
@@ -417,8 +323,7 @@ function PeriodFormatter(props) {
417
323
  return /* @__PURE__ */ jsx(Component, { children: getFormatPeriod(years, months, days) });
418
324
  }
419
325
  export {
420
- PeriodFormatter as P,
421
- RHFPeriod as R,
422
- Period as a,
326
+ Period as P,
327
+ PeriodFormatter as a,
423
328
  getFormatPeriod as g
424
329
  };
@@ -1,22 +1,23 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { generateUtilityClasses, styled } from "@mui/material";
3
3
  import { unstable_composeClasses } from "@mui/base";
4
- import { Z as componentName } from "../areas/constants.5387d83e.js";
5
- import { g as getComponentUtilityClass } from "../../utils/index.9ee4c99a.js";
4
+ import { G as componentName } from "../areas/constants.630a4f42.js";
5
+ import { g as getComponentUtilityClass } from "../../utils/index.0660ee9c.js";
6
6
  import clsx from "clsx";
7
- import { D as DividerNode } from "./subcomponents/DividerNode/index.67d9f1b4.js";
8
- import { S as SectionNode } from "./subcomponents/SectionNode/index.540a4b19.js";
9
- import { T as TextBoxNode } from "./subcomponents/TextBoxNode/index.41e7fcb0.js";
10
- import { H as HeaderNode } from "./subcomponents/HeaderNode/index.7de4e411.js";
11
- import { b as ImageNode, Q as QRImageNode } from "../Image/index.36a3d440.js";
12
- import { B as BodyNode } from "./subcomponents/BodyNode/index.c1d61038.js";
13
- import { F as FooterNode } from "./subcomponents/FooterNode/index.eaee152a.js";
14
- import { P as PaperNode } from "./subcomponents/PaperNode/index.f9ccf22b.js";
15
- import { P as PropertyValueNode } from "./subcomponents/PropertyValueNode/index.f2f2e903.js";
16
- import { G as GridNode } from "./subcomponents/GridNode/index.f5f63a2a.js";
17
- import { C as ChartNode } from "./subcomponents/ChartNode/index.18bd9bad.js";
18
- import { P as PagerNode, a as PageRender } from "../Page/index.fdf04592.js";
7
+ import { D as DividerNode } from "./subcomponents/DividerNode/index.7fdad1df.js";
8
+ import { S as SectionNode } from "./subcomponents/SectionNode/index.659f28e5.js";
9
+ import { T as TextBoxNode } from "./subcomponents/TextBoxNode/index.137ebb7a.js";
10
+ import { H as HeaderNode } from "./subcomponents/HeaderNode/index.691b5c38.js";
11
+ import { a as ImageNode, Q as QRImageNode } from "../Image/index.0d32558e.js";
12
+ import { B as BodyNode } from "./subcomponents/BodyNode/index.fdd8cebb.js";
13
+ import { F as FooterNode } from "./subcomponents/FooterNode/index.fcaf9b2f.js";
14
+ import { P as PaperNode } from "./subcomponents/PaperNode/index.3699b685.js";
15
+ import { P as PropertyValueNode } from "./subcomponents/PropertyValueNode/index.bcc87da8.js";
16
+ import { G as GridNode } from "./subcomponents/GridNode/index.03148990.js";
17
+ import { C as ChartNode } from "./subcomponents/ChartNode/index.12293a60.js";
18
+ import { P as PagerNode } from "../mui_extended/Pager/index.46aec921.js";
19
19
  import { useBase, evaluateWithContext } from "@m4l/core";
20
+ import { P as PageRender } from "../Page/index.7482cf60.js";
20
21
  import { forwardRef, useRef, useImperativeHandle } from "react";
21
22
  import { useTheme } from "@mui/material/styles";
22
23
  const classes = generateUtilityClasses(componentName, [
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useBase } from "@m4l/core";
3
- import { c as classes, g as getSize } from "../../index.fb176a93.js";
3
+ import { c as classes, g as getSize } from "../../index.89493ad6.js";
4
4
  import clsx from "clsx";
5
5
  const BodyNode = (props) => {
6
6
  const {
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { c as classes } from "../../index.fb176a93.js";
2
+ import { c as classes } from "../../index.89493ad6.js";
3
3
  import clsx from "clsx";
4
4
  import { createRef, useEffect } from "react";
5
5
  import { Chart, registerables } from "chart.js";
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { c as classes } from "../../index.fb176a93.js";
2
+ import { c as classes } from "../../index.89493ad6.js";
3
3
  import clsx from "clsx";
4
4
  const DividerNode = (props) => {
5
5
  const { direction = "vertical", className = "", style = {} } = props;
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useBase } from "@m4l/core";
3
- import { c as classes, g as getSize } from "../../index.fb176a93.js";
3
+ import { c as classes, g as getSize } from "../../index.89493ad6.js";
4
4
  import clsx from "clsx";
5
5
  const FooterNode = (props) => {
6
6
  const {
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useBase, getPropertyByString, evaluateWithContext } from "@m4l/core";
3
- import { c as classes, g as getSize } from "../../index.fb176a93.js";
3
+ import { c as classes, g as getSize } from "../../index.89493ad6.js";
4
4
  import clsx from "clsx";
5
5
  const GridNode = (props) => {
6
6
  const { style = {}, className = "", rows, columns } = props;
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useBase } from "@m4l/core";
3
- import { c as classes, g as getSize } from "../../index.fb176a93.js";
3
+ import { c as classes, g as getSize } from "../../index.89493ad6.js";
4
4
  import clsx from "clsx";
5
5
  const HeaderNode = (props) => {
6
6
  const {
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useBase, evaluateWithContext } from "@m4l/core";
3
- import { c as classes } from "../../index.fb176a93.js";
3
+ import { c as classes } from "../../index.89493ad6.js";
4
4
  import clsx from "clsx";
5
5
  const PaperNode = (props) => {
6
6
  const { children, style = {}, className = "", title, titleSecondary } = props;
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useBase, evaluateWithContext } from "@m4l/core";
3
- import { c as classes, g as getSize } from "../../index.fb176a93.js";
3
+ import { c as classes, g as getSize } from "../../index.89493ad6.js";
4
4
  import clsx from "clsx";
5
5
  const PropertyValueNode = (props) => {
6
6
  const {
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useBase } from "@m4l/core";
3
- import { c as classes, g as getSize } from "../../index.fb176a93.js";
3
+ import { c as classes, g as getSize } from "../../index.89493ad6.js";
4
4
  import clsx from "clsx";
5
5
  const SectionNode = (props) => {
6
6
  const {