@m4l/components 0.1.95 → 0.1.97

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 (127) hide show
  1. package/@types/export.d.ts +13 -4
  2. package/{commonjs.565e6834.js → commonjs.333e55c7.js} +5 -0
  3. package/components/AccountPopover/{index.3711d526.js → index.252cc907.js} +2 -4
  4. package/components/AccountPopover/index.d.ts +1 -0
  5. package/components/AppBar/AppBar.d.ts +24 -0
  6. package/components/AppBar/classes/index.d.ts +2 -0
  7. package/components/AppBar/classes/types.d.ts +2 -0
  8. package/components/AppBar/{index.512042a9.js → index.f1a995c7.js} +26 -5
  9. package/components/AppBar/types.d.ts +14 -0
  10. package/components/CommonActions/components/ActionCancel/{index.bb383946.js → index.918fe98b.js} +2 -2
  11. package/components/CommonActions/components/ActionFormCancel/{index.97ecdeef.js → index.8b12f4b2.js} +5 -14
  12. package/components/CommonActions/components/ActionFormIntro/{index.3deddb07.js → index.c2e8b360.js} +2 -2
  13. package/components/CommonActions/components/ActionIntro/{index.4bc5780e.js → index.ee716861.js} +2 -2
  14. package/components/CommonActions/components/Actions/{index.ccf731c1.js → index.2f6286eb.js} +1 -1
  15. package/components/DataGrid/formatters/columnPointsFormatter/{index.5e645334.js → index.a19b7b90.js} +1 -1
  16. package/components/DataGrid/{index.47a152d0.js → index.227eb189.js} +6 -7
  17. package/components/DataGrid/subcomponents/Actions/{index.8d9feca6.js → index.1b896eae.js} +9 -9
  18. package/components/DataGrid/types.d.ts +3 -0
  19. package/components/DraggableWindow/{index.8f423ed7.js → index.f9f067bd.js} +1 -1
  20. package/components/DynamicFilter/classes/index.d.ts +1 -1
  21. package/components/DynamicFilter/classes/types.d.ts +1 -0
  22. package/components/DynamicFilter/{index.a50a1483.js → index.91f911cc.js} +16 -12
  23. package/components/GridLayout/{index.4a245d9e.js → index.e8c04242.js} +2 -2
  24. package/components/GridLayout/subcomponents/Griditem/{index.ea745285.js → index.4d38f12e.js} +3 -3
  25. package/components/GridLayout/subcomponents/Responsive/{index.edb59c22.js → index.e25df1dc.js} +1 -1
  26. package/components/Icon/index.4e424a81.js +248 -0
  27. package/components/Icon/types.d.ts +1 -0
  28. package/components/Image/{index.9799dfc0.js → index.8b134b95.js} +44 -2
  29. package/components/Image/types.d.ts +2 -2
  30. package/components/LanguagePopover/{index.087b430d.js → index.c5eb0191.js} +2 -2
  31. package/components/LinearProgressIndeterminate/{index.c46da124.js → index.a0ad2d9e.js} +1 -1
  32. package/components/LoadingError/{index.08cf9728.js → index.536db030.js} +3 -3
  33. package/components/MFLoader/{index.4b531d2d.js → index.3ba9d320.js} +1 -1
  34. package/components/ModalDialog/{index.ec55087e.js → index.89e26413.js} +4 -4
  35. package/components/NoItemSelected/{index.8a2a13f8.js → index.216d87c8.js} +1 -1
  36. package/components/ObjectLogs/{index.55b5c933.js → index.882325f1.js} +6 -6
  37. package/components/Page/{index.49d18c85.js → index.c100afa4.js} +1 -1
  38. package/components/PaperForm/{index.a2b69977.js → index.b7918854.js} +1 -1
  39. package/components/Period/{index.8cccbb4b.js → index.5f3af84b.js} +2 -2
  40. package/components/PrintingSystem/{index.d1fd7818.js → index.2147b2c3.js} +14 -13
  41. package/components/PrintingSystem/subcomponents/BodyNode/{index.f6410daa.js → index.7bed0f05.js} +1 -1
  42. package/components/PrintingSystem/subcomponents/ChartNode/{index.6b30abe0.js → index.c552eb03.js} +1 -1
  43. package/components/PrintingSystem/subcomponents/DividerNode/{index.dcac3bc0.js → index.007d01ab.js} +1 -1
  44. package/components/PrintingSystem/subcomponents/FooterNode/{index.dd21921e.js → index.72ef9241.js} +1 -1
  45. package/components/PrintingSystem/subcomponents/GridNode/{index.eb5ebe06.js → index.2fac7376.js} +1 -1
  46. package/components/PrintingSystem/subcomponents/HeaderNode/{index.48e8769c.js → index.01ae9ede.js} +1 -1
  47. package/components/PrintingSystem/subcomponents/PaperNode/{index.ccec72dc.js → index.cfd86519.js} +1 -1
  48. package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.807e0343.js → index.c4fa3813.js} +1 -1
  49. package/components/PrintingSystem/subcomponents/QRImageNode/index.d.ts +3 -0
  50. package/components/PrintingSystem/subcomponents/QRImageNode/types.d.ts +3 -0
  51. package/components/PrintingSystem/subcomponents/SectionNode/{index.622df623.js → index.13e656ad.js} +1 -1
  52. package/components/PrintingSystem/subcomponents/TextBoxNode/{index.f06ac3d5.js → index.0c3db261.js} +1 -1
  53. package/components/PrintingSystem/types.d.ts +10 -1
  54. package/components/PropertyValue/classes/index.d.ts +1 -1
  55. package/components/PropertyValue/classes/types.d.ts +4 -1
  56. package/components/PropertyValue/index.3d5e8c52.js +206 -0
  57. package/components/PropertyValue/types.d.ts +5 -7
  58. package/components/Resizeable/{index.8c53c1fa.js → index.6478d7d8.js} +1 -1
  59. package/components/SideBar/classes/index.d.ts +1 -1
  60. package/components/SideBar/{index.ce301edd.js → index.ed0211ba.js} +11 -11
  61. package/components/SideBar/types.d.ts +3 -3
  62. package/components/SplitLayout/{index.9ef430f6.js → index.30fd5861.js} +1 -1
  63. package/components/ToastContainer/ToastContainer.d.ts +3 -0
  64. package/components/ToastContainer/classes/constants.d.ts +1 -0
  65. package/components/ToastContainer/classes/index.d.ts +8 -0
  66. package/components/ToastContainer/classes/types.d.ts +9 -0
  67. package/components/ToastContainer/index.2343fd28.js +87 -0
  68. package/components/ToastContainer/index.d.ts +2 -0
  69. package/components/ToastContainer/subcomponents/ToastMessage/index.d.ts +3 -0
  70. package/components/ToastContainer/subcomponents/ToastMessage/types.d.ts +5 -0
  71. package/components/ToastContainer/types.d.ts +4 -0
  72. package/components/areas/components/AreasAdmin/{index.3c182644.js → index.917f9ff2.js} +11 -11
  73. package/components/areas/components/AreasViewer/{index.a0a969e7.js → index.7d3415a5.js} +15 -15
  74. package/components/areas/contexts/AreasContext/{index.d43aceaf.js → index.e3324e71.js} +4 -4
  75. package/components/areas/hooks/useAreas/{index.6a1d525c.js → index.c6264add.js} +1 -1
  76. package/components/formatters/BooleanFormatter/{index.00596be3.js → index.35005602.js} +2 -2
  77. package/components/formatters/PointsFormatter/{index.80a4e414.js → index.5c94c5e8.js} +2 -2
  78. package/components/formatters/PointsFormatter/index.d.ts +1 -1
  79. package/components/formatters/{index.1906141f.js → index.e8bd78a5.js} +1 -1
  80. package/components/hook-form/RHFAutocomplete/classes/types.d.ts +2 -0
  81. package/components/hook-form/RHFAutocomplete/{index.a5f1034a.js → index.b01b97e3.js} +26 -35
  82. package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/index.d.ts +1 -1
  83. package/components/hook-form/RHFAutocomplete/subcomponents/Skeleton/types.d.ts +1 -2
  84. package/components/hook-form/RHFAutocomplete/types.d.ts +8 -3
  85. package/components/hook-form/RHFAutocompleteAsync/{index.047ff594.js → index.8241ce18.js} +1 -1
  86. package/components/hook-form/RHFColorPicker/classes/constants.d.ts +1 -0
  87. package/components/hook-form/RHFColorPicker/classes/index.d.ts +11 -0
  88. package/components/hook-form/RHFColorPicker/classes/types.d.ts +11 -0
  89. package/components/hook-form/RHFColorPicker/index.d.ts +9 -0
  90. package/components/hook-form/RHFColorPicker/subcomponents/Skeleton/indext.d.ts +2 -0
  91. package/components/hook-form/RHFColorPicker/types.d.ts +8 -0
  92. package/components/hook-form/RHFDateTime/{index.a273293c.js → index.e8ea2555.js} +1 -1
  93. package/components/hook-form/RHFDateTime/types.d.ts +0 -1
  94. package/components/hook-form/RHFPeriod/{index.53827a17.js → index.584f515c.js} +1 -1
  95. package/components/hook-form/RHFTextField/{index.5801338a.js → index.87c99323.js} +2 -2
  96. package/components/hook-form/RHFUpload/{index.f04df1c9.js → index.f2983d70.js} +4 -4
  97. package/components/hook-form/index.d.ts +1 -0
  98. package/components/index.d.ts +1 -0
  99. package/components/modal/{WindowBase.beb2fb3e.js → WindowBase.b1f12376.js} +3 -3
  100. package/components/modal/{WindowConfirm.477e6f63.js → WindowConfirm.481ef7a0.js} +6 -6
  101. package/components/mui_extended/Accordion/{index.08ff7e2f.js → index.54101c95.js} +3 -3
  102. package/components/mui_extended/Button/classes/types.d.ts +2 -0
  103. package/components/mui_extended/Button/{index.857c2dfe.js → index.158a9a65.js} +3 -3
  104. package/components/mui_extended/IconButton/{index.5499ffdb.js → index.3c568901.js} +1 -1
  105. package/components/mui_extended/LoadingButton/classes/constants.d.ts +1 -1
  106. package/components/mui_extended/MenuActions/{index.d8d0c00e.js → index.4817512a.js} +2 -2
  107. package/components/mui_extended/Pager/{index.47343062.js → index.ba2163c2.js} +1 -1
  108. package/components/mui_extended/Tab/{index.2f9a6815.js → index.ed3c7b65.js} +1 -1
  109. package/contexts/ModalContext/{index.436c2938.js → index.b39d303d.js} +1 -1
  110. package/hooks/useFormAddEdit/{index.b9ccd95f.js → index.6929cc88.js} +5 -4
  111. package/hooks/useFormAddEdit/types.d.ts +1 -0
  112. package/hooks/useModal/{index.05d1821e.js → index.abdc0962.js} +1 -1
  113. package/index.js +106 -91
  114. package/node_modules.a40403af.js +6921 -0
  115. package/package.json +4 -2
  116. package/{react-draggable.e4725f3a.js → react-draggable.ee21cb7e.js} +4 -4
  117. package/{react-json-view.57125fcf.js → react-json-view.5636414a.js} +1 -1
  118. package/{react-resizable.c07d63fb.js → react-resizable.ee028152.js} +5 -5
  119. package/{react-splitter-layout.8b1655c8.js → react-splitter-layout.c5d98bf7.js} +3 -3
  120. package/vendor.c4bc5f4d.js +249 -0
  121. package/components/Icon/index.11a7a77c.js +0 -147
  122. package/components/PropertyValue/index.4ae0bb21.js +0 -220
  123. package/components/PropertyValue/skeleton.d.ts +0 -3
  124. package/vendor.6019bf6e.js +0 -104
  125. /package/components/GridLayout/subcomponents/{Griditem → GridItem}/index.d.ts +0 -0
  126. /package/components/GridLayout/subcomponents/{Griditem → GridItem}/types.d.ts +0 -0
  127. /package/utils/{index.6469f148.js → index.de903261.js} +0 -0
@@ -0,0 +1,248 @@
1
+ import React__default, { useState, useEffect } from "react";
2
+ import { useEnvironment } from "@m4l/core";
3
+ import { styled, generateUtilityClasses, generateUtilityClass, Skeleton } from "@mui/material";
4
+ import { u as useSideBar, g as getNameDataTestId$1 } from "../SideBar/index.ed0211ba.js";
5
+ import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
6
+ import { jsx } from "react/jsx-runtime";
7
+ import { unstable_composeClasses } from "@mui/base";
8
+ import clsx from "clsx";
9
+ import { useResponsiveDesktop } from "@m4l/graphics";
10
+ const IconRoot = styled("div")(({
11
+ theme
12
+ }) => ({
13
+ ...theme.components?.M4LIcon?.styleOverrides
14
+ }));
15
+ const DivIcon = styled("div", {
16
+ shouldForwardProp: (props) => props !== "src" && props !== "rotationAngle"
17
+ })(({
18
+ src,
19
+ rotationAngle
20
+ }) => ({
21
+ maskPosition: "center",
22
+ maskRepeat: "no-repeat",
23
+ maskSize: "cover",
24
+ WebkitMaskRepeat: "no-repeat",
25
+ mask: `url('data:image/svg+xml;base64,${src}')`,
26
+ WebkitMask: `url('data:image/svg+xml;base64,${src}')`,
27
+ WebkitMaskSize: "cover",
28
+ ...rotationAngle && {
29
+ transform: `rotate(${rotationAngle}deg)`
30
+ }
31
+ }));
32
+ const componentName = "M4LIcon";
33
+ generateUtilityClasses(componentName, [
34
+ "root",
35
+ "icon",
36
+ "variantSkeleton",
37
+ "sizeExtraSmall",
38
+ "sizeSmall",
39
+ "sizeMedium",
40
+ "sizeLarge",
41
+ "sizeExtraLarge",
42
+ "rotationAngle"
43
+ ]);
44
+ function getIconClassesUtilityClass(slot) {
45
+ return generateUtilityClass(componentName, slot);
46
+ }
47
+ const useUtilityClasses = (ownerState) => {
48
+ const slots = {
49
+ root: ["root"],
50
+ icon: ["icon", ownerState.size === "extraSmall" && "sizeExtraSmall", ownerState.size === "small" && "sizeSmall", ownerState.size === "medium" && "sizeMedium", ownerState.size === "large" && "sizeLarge", ownerState.size === "extraLarge" && "sizeExtraLarge", ownerState.rotationAngle ? "rotationAngle" : ""],
51
+ variantSkeleton: ["variantSkeleton", ownerState.size === "extraSmall" && "sizeExtraSmall", ownerState.size === "small" && "sizeSmall", ownerState.size === "medium" && "sizeMedium", ownerState.size === "large" && "sizeLarge", ownerState.size === "extraLarge" && "sizeExtraLarge"]
52
+ };
53
+ const composedClasses = unstable_composeClasses(slots, getIconClassesUtilityClass, {});
54
+ return {
55
+ ...composedClasses
56
+ };
57
+ };
58
+ const ICON_PREFIX = "Icon";
59
+ const getNameDataTestId = (KEY) => {
60
+ return `${ICON_PREFIX}-${KEY}`;
61
+ };
62
+ function Icon(props) {
63
+ const {
64
+ src,
65
+ size = "small",
66
+ rotationAngle,
67
+ testingProps,
68
+ className,
69
+ memorizeResource = true
70
+ } = props;
71
+ const [resource, setResource] = useState(testingProps?.resource || void 0);
72
+ const isDesktop = useResponsiveDesktop();
73
+ if (memorizeResource) {
74
+ useEffect(() => {
75
+ let mounted = true;
76
+ (async function networkOperation() {
77
+ await fetch(src).then((response) => {
78
+ return response.text() || "";
79
+ }).then((xml) => {
80
+ xml = xml.match(
81
+ /(<svg\b[^>]*\s*(viewBox="(\b[^"]*)").*?>([\s\S]*?)<\/svg>|<svg>([\s\S]*?)<\/svg>)/g
82
+ )?.toString() || "";
83
+ if (mounted) {
84
+ setResource(window.btoa(xml));
85
+ }
86
+ }).catch((_err) => {
87
+ });
88
+ })();
89
+ return function clenUp() {
90
+ mounted = false;
91
+ };
92
+ }, [src]);
93
+ }
94
+ const ownerState = {
95
+ size: isDesktop ? size : "medium",
96
+ rotationAngle
97
+ };
98
+ const classes = useUtilityClasses(ownerState);
99
+ if (!memorizeResource) {
100
+ return /* @__PURE__ */ jsx(IconRoot, {
101
+ className: clsx(classes.root, className),
102
+ children: /* @__PURE__ */ jsx("img", {
103
+ src,
104
+ alt: src,
105
+ className: ""
106
+ })
107
+ });
108
+ }
109
+ return /* @__PURE__ */ jsx(IconRoot, {
110
+ className: clsx(classes.root, className),
111
+ ...process.env.NODE_ENV !== "production" ? {
112
+ [TEST_PROP_ID]: getNameDataTestId("root")
113
+ } : {},
114
+ children: resource ? /* @__PURE__ */ jsx(DivIcon, {
115
+ className: classes.icon,
116
+ src: resource,
117
+ rotationAngle,
118
+ ...process.env.NODE_ENV !== "production" ? {
119
+ [TEST_PROP_ID]: getNameDataTestId("icon")
120
+ } : {}
121
+ }) : /* @__PURE__ */ jsx(Skeleton, {
122
+ variant: "rectangular",
123
+ className: classes.variantSkeleton,
124
+ ...process.env.NODE_ENV !== "production" ? {
125
+ [TEST_PROP_ID]: getNameDataTestId("variantSkeleton")
126
+ } : {}
127
+ })
128
+ });
129
+ }
130
+ var UnfoldMoreHorizontalIcon = {};
131
+ Object.defineProperty(UnfoldMoreHorizontalIcon, "__esModule", {
132
+ value: true
133
+ });
134
+ var _extends$1 = Object.assign || function(target) {
135
+ for (var i = 1; i < arguments.length; i++) {
136
+ var source = arguments[i];
137
+ for (var key in source) {
138
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
139
+ target[key] = source[key];
140
+ }
141
+ }
142
+ }
143
+ return target;
144
+ };
145
+ var _react$1 = React__default;
146
+ var _react2$1 = _interopRequireDefault$1(_react$1);
147
+ function _interopRequireDefault$1(obj) {
148
+ return obj && obj.__esModule ? obj : { default: obj };
149
+ }
150
+ function _objectWithoutProperties$1(obj, keys) {
151
+ var target = {};
152
+ for (var i in obj) {
153
+ if (keys.indexOf(i) >= 0)
154
+ continue;
155
+ if (!Object.prototype.hasOwnProperty.call(obj, i))
156
+ continue;
157
+ target[i] = obj[i];
158
+ }
159
+ return target;
160
+ }
161
+ var DEFAULT_SIZE$1 = 24;
162
+ var _default$1 = UnfoldMoreHorizontalIcon.default = function(_ref) {
163
+ var _ref$fill = _ref.fill, fill = _ref$fill === void 0 ? "currentColor" : _ref$fill, _ref$width = _ref.width, width = _ref$width === void 0 ? DEFAULT_SIZE$1 : _ref$width, _ref$height = _ref.height, height = _ref$height === void 0 ? DEFAULT_SIZE$1 : _ref$height, _ref$style = _ref.style, style = _ref$style === void 0 ? {} : _ref$style, props = _objectWithoutProperties$1(_ref, ["fill", "width", "height", "style"]);
164
+ return _react2$1.default.createElement(
165
+ "svg",
166
+ _extends$1({
167
+ viewBox: "0 0 " + DEFAULT_SIZE$1 + " " + DEFAULT_SIZE$1,
168
+ style: _extends$1({ fill, width, height }, style)
169
+ }, props),
170
+ _react2$1.default.createElement("path", { d: "M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z" })
171
+ );
172
+ };
173
+ var CheckIcon = {};
174
+ Object.defineProperty(CheckIcon, "__esModule", {
175
+ value: true
176
+ });
177
+ var _extends = Object.assign || function(target) {
178
+ for (var i = 1; i < arguments.length; i++) {
179
+ var source = arguments[i];
180
+ for (var key in source) {
181
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
182
+ target[key] = source[key];
183
+ }
184
+ }
185
+ }
186
+ return target;
187
+ };
188
+ var _react = React__default;
189
+ var _react2 = _interopRequireDefault(_react);
190
+ function _interopRequireDefault(obj) {
191
+ return obj && obj.__esModule ? obj : { default: obj };
192
+ }
193
+ function _objectWithoutProperties(obj, keys) {
194
+ var target = {};
195
+ for (var i in obj) {
196
+ if (keys.indexOf(i) >= 0)
197
+ continue;
198
+ if (!Object.prototype.hasOwnProperty.call(obj, i))
199
+ continue;
200
+ target[i] = obj[i];
201
+ }
202
+ return target;
203
+ }
204
+ var DEFAULT_SIZE = 24;
205
+ var _default = CheckIcon.default = function(_ref) {
206
+ var _ref$fill = _ref.fill, fill = _ref$fill === void 0 ? "currentColor" : _ref$fill, _ref$width = _ref.width, width = _ref$width === void 0 ? DEFAULT_SIZE : _ref$width, _ref$height = _ref.height, height = _ref$height === void 0 ? DEFAULT_SIZE : _ref$height, _ref$style = _ref.style, style = _ref$style === void 0 ? {} : _ref$style, props = _objectWithoutProperties(_ref, ["fill", "width", "height", "style"]);
207
+ return _react2.default.createElement(
208
+ "svg",
209
+ _extends({
210
+ viewBox: "0 0 " + DEFAULT_SIZE + " " + DEFAULT_SIZE,
211
+ style: _extends({ fill, width, height }, style)
212
+ }, props),
213
+ _react2.default.createElement("path", { d: "M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" })
214
+ );
215
+ };
216
+ const ArrowIconRoot = styled("div")(() => ({
217
+ display: "flex",
218
+ alignSelf: "center",
219
+ lineHeight: 0
220
+ }));
221
+ function ArrowIcon(props) {
222
+ const {
223
+ openState
224
+ } = props;
225
+ const {
226
+ host_static_assets,
227
+ environment_assets
228
+ } = useEnvironment();
229
+ const {
230
+ classes
231
+ } = useSideBar();
232
+ return /* @__PURE__ */ jsx(ArrowIconRoot, {
233
+ className: classes.arrowIconRoot,
234
+ ...process.env.NODE_ENV !== "production" ? {
235
+ [TEST_PROP_ID]: getNameDataTestId$1("arrowIconRoot")
236
+ } : {},
237
+ children: /* @__PURE__ */ jsx(Icon, {
238
+ src: `${host_static_assets}/${environment_assets}/frontend/components/sidebar/assets/icons/ChevronRight.svg`,
239
+ rotationAngle: openState ? 90 : 0
240
+ })
241
+ });
242
+ }
243
+ export {
244
+ ArrowIcon as A,
245
+ Icon as I,
246
+ _default$1 as _,
247
+ _default as a
248
+ };
@@ -8,6 +8,7 @@ export interface IconProps {
8
8
  rotationAngle?: number;
9
9
  testingProps?: TestingProps;
10
10
  className?: string;
11
+ memorizeResource?: boolean;
11
12
  }
12
13
  export declare type DivIconProps = Pick<IconProps, 'src' | 'rotationAngle'>;
13
14
  export declare type WrapperPlaceHolderProps = {
@@ -5,7 +5,8 @@ import { jsx, Fragment, jsxs } from "react/jsx-runtime";
5
5
  import { styled, Skeleton as Skeleton$1, generateUtilityClasses, generateUtilityClass } from "@mui/material";
6
6
  import { unstable_composeClasses } from "@mui/base";
7
7
  import clsx from "clsx";
8
- import { g as getEvalValue, c as classes, a as getSize } from "../PrintingSystem/index.d1fd7818.js";
8
+ import { g as getEvalValue, c as classes, a as getSize } from "../PrintingSystem/index.2147b2c3.js";
9
+ import { Q as QRCode } from "../../node_modules.a40403af.js";
9
10
  function isIntersectionObserverAvailable() {
10
11
  return typeof window !== "undefined" && "IntersectionObserver" in window && "IntersectionObserverEntry" in window;
11
12
  }
@@ -278,7 +279,9 @@ function Image(props) {
278
279
  ...width && height ? {
279
280
  style: {
280
281
  minWidth: width,
281
- minHeight: height
282
+ minHeight: height,
283
+ width,
284
+ height
282
285
  }
283
286
  } : {
284
287
  sx: {
@@ -344,7 +347,46 @@ const ImageNode = (props) => {
344
347
  }
345
348
  });
346
349
  };
350
+ const convertToPx = (size, magnitud) => {
351
+ if (isNaN(size)) {
352
+ return 0;
353
+ }
354
+ if (magnitud === "px") {
355
+ return size;
356
+ }
357
+ switch (magnitud) {
358
+ case "cm":
359
+ return size * 37.8;
360
+ case "mm":
361
+ return size * 3.78;
362
+ case "in":
363
+ return size * 96;
364
+ case "pt":
365
+ return size * 1.33;
366
+ case "pc":
367
+ return size * 16;
368
+ default:
369
+ return 100;
370
+ }
371
+ };
372
+ const QRImageNode = (props) => {
373
+ const {
374
+ url,
375
+ size = 8,
376
+ color
377
+ } = props;
378
+ const {
379
+ unitSize
380
+ } = useBase();
381
+ return /* @__PURE__ */ jsx(QRCode, {
382
+ value: url,
383
+ size: convertToPx(size, unitSize),
384
+ fgColor: color,
385
+ renderAs: "canvas"
386
+ });
387
+ };
347
388
  export {
348
389
  Image as I,
390
+ QRImageNode as Q,
349
391
  ImageNode as a
350
392
  };
@@ -12,8 +12,8 @@ export interface TestingProps {
12
12
  isVisible?: boolean;
13
13
  }
14
14
  export interface BaseImageProps {
15
- width?: string;
16
- height?: string;
15
+ width?: string | number;
16
+ height?: string | number;
17
17
  }
18
18
  export interface IntersectComponentProps extends BaseImageProps {
19
19
  setIsVisible: (visible: boolean) => void;
@@ -1,8 +1,8 @@
1
1
  import { useState, useEffect } from "react";
2
2
  import { styled, generateUtilityClasses, generateUtilityClass, Stack, MenuItem } from "@mui/material";
3
- import { I as Image } from "../Image/index.9799dfc0.js";
3
+ import { I as Image } from "../Image/index.8b134b95.js";
4
4
  import { useLocales } from "@m4l/graphics";
5
- import { I as ImageButton } from "../mui_extended/Button/index.857c2dfe.js";
5
+ import { I as ImageButton } from "../mui_extended/Button/index.158a9a65.js";
6
6
  import { useEnvironment, useNetwork } from "@m4l/core";
7
7
  import { unstable_composeClasses } from "@mui/base";
8
8
  import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
@@ -1,7 +1,7 @@
1
1
  import clsx from "clsx";
2
2
  import { generateUtilityClasses, styled } from "@mui/material";
3
3
  import { unstable_composeClasses } from "@mui/base";
4
- import { g as getComponentUtilityClass } from "../../utils/index.6469f148.js";
4
+ import { g as getComponentUtilityClass } from "../../utils/index.de903261.js";
5
5
  import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  const LINEAR_PROGRESS_INDETERMINATE_CLASS_NAME = "M4LinearProgressIndeterminate";
@@ -3,10 +3,10 @@ import { I as ICONS } from "../areas/icons.8266ccc8.js";
3
3
  import { generateUtilityClasses, generateUtilityClass, styled } from "@mui/material";
4
4
  import { unstable_composeClasses } from "@mui/base";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
- import { L as LinearProgressIndeterminate } from "../LinearProgressIndeterminate/index.c46da124.js";
7
- import { I as Icon } from "../Icon/index.11a7a77c.js";
6
+ import { L as LinearProgressIndeterminate } from "../LinearProgressIndeterminate/index.a0ad2d9e.js";
7
+ import { I as Icon } from "../Icon/index.4e424a81.js";
8
8
  import { T as Typography } from "../mui_extended/Typography/index.379dd374.js";
9
- import { B as Button } from "../mui_extended/Button/index.857c2dfe.js";
9
+ import { B as Button } from "../mui_extended/Button/index.158a9a65.js";
10
10
  const componentName = "M4LoadingError";
11
11
  generateUtilityClasses(componentName, [
12
12
  "root",
@@ -12,7 +12,7 @@ import { generateUtilityClasses, generateUtilityClass, styled } from "@mui/mater
12
12
  import { unstable_composeClasses } from "@mui/base";
13
13
  import { jsx, jsxs } from "react/jsx-runtime";
14
14
  import { L as LinearProgress } from "../mui_extended/LinearProgress/index.c92b9ba9.js";
15
- import { L as LoadingError } from "../LoadingError/index.08cf9728.js";
15
+ import { L as LoadingError } from "../LoadingError/index.536db030.js";
16
16
  const componentName = "M4LMFLoader";
17
17
  const mfLoaderClasses = generateUtilityClasses(componentName, [
18
18
  "root",
@@ -1,11 +1,11 @@
1
1
  import { useTheme, Dialog, Paper } from "@mui/material";
2
- import { c as cjs } from "../../react-draggable.e4725f3a.js";
3
- import { u as useModal } from "../../hooks/useModal/index.05d1821e.js";
4
- import { R as ResizeableWindow } from "../Resizeable/index.8c53c1fa.js";
2
+ import { c as cjs } from "../../react-draggable.ee21cb7e.js";
3
+ import { u as useModal } from "../../hooks/useModal/index.abdc0962.js";
4
+ import { R as ResizeableWindow } from "../Resizeable/index.6478d7d8.js";
5
5
  import { useResponsiveDesktop } from "@m4l/graphics";
6
6
  import { m as modalUtilityClasses } from "../modal/index.61389369.js";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
- import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.ccf731c1.js";
8
+ import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.2f6286eb.js";
9
9
  const DragabblePaperComponent = (props) => {
10
10
  return /* @__PURE__ */ jsx(cjs.exports, {
11
11
  handle: ".m4l_draggable_handle",
@@ -1,6 +1,6 @@
1
1
  import { useEnvironment, useModuleDictionary, useModuleSkeleton } from "@m4l/core";
2
2
  import { styled } from "@mui/material/styles";
3
- import { I as Image } from "../Image/index.9799dfc0.js";
3
+ import { I as Image } from "../Image/index.8b134b95.js";
4
4
  import { generateUtilityClasses, generateUtilityClass, Skeleton } from "@mui/material";
5
5
  import { useMemo } from "react";
6
6
  import { unstable_composeClasses } from "@mui/base";
@@ -1,18 +1,18 @@
1
1
  import { useState, useEffect, useCallback, useMemo } from "react";
2
2
  import { useNetwork, useModuleDictionary, useEnvironment, usePaginate } from "@m4l/core";
3
3
  import { styled } from "@mui/material/styles";
4
- import { c as DataGrid, g as getDataGridComponentsDictionary } from "../DataGrid/index.47a152d0.js";
4
+ import { c as DataGrid, g as getDataGridComponentsDictionary } from "../DataGrid/index.227eb189.js";
5
5
  import { D as DateFormatter } from "../formatters/DateFormatter/index.578a9f53.js";
6
6
  import { Tooltip, IconButton } from "@mui/material";
7
7
  import { useHostTheme, useResponsiveDesktop } from "@m4l/graphics";
8
- import { R as ReactJson } from "../../react-json-view.57125fcf.js";
8
+ import { R as ReactJson } from "../../react-json-view.5636414a.js";
9
9
  import { S as ScrollBar } from "../ScrollBar/index.65bb2930.js";
10
10
  import { jsx, jsxs } from "react/jsx-runtime";
11
- import { u as useModal } from "../../hooks/useModal/index.05d1821e.js";
12
- import { I as Icon } from "../Icon/index.11a7a77c.js";
11
+ import { u as useModal } from "../../hooks/useModal/index.abdc0962.js";
12
+ import { I as Icon } from "../Icon/index.4e424a81.js";
13
13
  import { S as Stack } from "../mui_extended/Stack/index.0e53197c.js";
14
- import { W as WindowBase } from "../modal/WindowBase.beb2fb3e.js";
15
- import { D as DynamicFilter, g as getDynamicFilterComponentsDictionary } from "../DynamicFilter/index.a50a1483.js";
14
+ import { W as WindowBase } from "../modal/WindowBase.b1f12376.js";
15
+ import { D as DynamicFilter, g as getDynamicFilterComponentsDictionary } from "../DynamicFilter/index.91f911cc.js";
16
16
  import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
17
17
  const Container = styled("div")(() => ({
18
18
  height: "100%",
@@ -1,5 +1,5 @@
1
1
  import { useBase, BaseProvider, useModuleSkeleton } from "@m4l/core";
2
- import { c as classes, a as getSize, F as FactoryRender } from "../PrintingSystem/index.d1fd7818.js";
2
+ import { c as classes, a as getSize, F as FactoryRender } from "../PrintingSystem/index.2147b2c3.js";
3
3
  import clsx from "clsx";
4
4
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
5
5
  import React__default from "react";
@@ -1,7 +1,7 @@
1
1
  import { styled } from "@mui/material/styles";
2
2
  import { useModuleSkeleton } from "@m4l/core";
3
3
  import { Skeleton, generateUtilityClasses, generateUtilityClass } from "@mui/material";
4
- import { I as Icon } from "../Icon/index.11a7a77c.js";
4
+ import { I as Icon } from "../Icon/index.4e424a81.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { unstable_composeClasses } from "@mui/base";
7
7
  const PaperFormRoot = styled("div")(({
@@ -1,8 +1,8 @@
1
1
  import { useModuleDictionary, useModuleSkeleton, useEnvironment } from "@m4l/core";
2
2
  import { styled, generateUtilityClasses, generateUtilityClass, Autocomplete, TextField, Skeleton } from "@mui/material";
3
3
  import { useMemo } from "react";
4
- import { I as Icon } from "../Icon/index.11a7a77c.js";
5
- import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.ccf731c1.js";
4
+ import { I as Icon } from "../Icon/index.4e424a81.js";
5
+ import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.2f6286eb.js";
6
6
  import { unstable_composeClasses } from "@mui/base";
7
7
  import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
8
8
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
@@ -1,21 +1,21 @@
1
1
  import { getPropertyByString } from "@m4l/core";
2
2
  import { generateUtilityClasses } from "@mui/material";
3
3
  import { unstable_composeClasses } from "@mui/base";
4
- import { g as getComponentUtilityClass } from "../../utils/index.6469f148.js";
4
+ import { g as getComponentUtilityClass } from "../../utils/index.de903261.js";
5
5
  import { styled, useTheme } from "@mui/material/styles";
6
6
  import clsx from "clsx";
7
- import { D as DividerNode } from "./subcomponents/DividerNode/index.dcac3bc0.js";
8
- import { S as SectionNode } from "./subcomponents/SectionNode/index.622df623.js";
9
- import { T as TextBoxNode } from "./subcomponents/TextBoxNode/index.f06ac3d5.js";
10
- import { H as HeaderNode } from "./subcomponents/HeaderNode/index.48e8769c.js";
11
- import { a as ImageNode } from "../Image/index.9799dfc0.js";
12
- import { B as BodyNode } from "./subcomponents/BodyNode/index.f6410daa.js";
13
- import { F as FooterNode } from "./subcomponents/FooterNode/index.dd21921e.js";
14
- import { P as PaperNode } from "./subcomponents/PaperNode/index.ccec72dc.js";
15
- import { P as PropertyValueNode } from "./subcomponents/PropertyValueNode/index.807e0343.js";
16
- import { G as GridNode } from "./subcomponents/GridNode/index.eb5ebe06.js";
17
- import { C as ChartNode } from "./subcomponents/ChartNode/index.6b30abe0.js";
18
- import { P as PagerNode, a as PageRender } from "../Page/index.49d18c85.js";
7
+ import { D as DividerNode } from "./subcomponents/DividerNode/index.007d01ab.js";
8
+ import { S as SectionNode } from "./subcomponents/SectionNode/index.13e656ad.js";
9
+ import { T as TextBoxNode } from "./subcomponents/TextBoxNode/index.0c3db261.js";
10
+ import { H as HeaderNode } from "./subcomponents/HeaderNode/index.01ae9ede.js";
11
+ import { a as ImageNode, Q as QRImageNode } from "../Image/index.8b134b95.js";
12
+ import { B as BodyNode } from "./subcomponents/BodyNode/index.7bed0f05.js";
13
+ import { F as FooterNode } from "./subcomponents/FooterNode/index.72ef9241.js";
14
+ import { P as PaperNode } from "./subcomponents/PaperNode/index.cfd86519.js";
15
+ import { P as PropertyValueNode } from "./subcomponents/PropertyValueNode/index.c4fa3813.js";
16
+ import { G as GridNode } from "./subcomponents/GridNode/index.2fac7376.js";
17
+ import { C as ChartNode } from "./subcomponents/ChartNode/index.c552eb03.js";
18
+ import { P as PagerNode, a as PageRender } from "../Page/index.c100afa4.js";
19
19
  import { jsxs, jsx } from "react/jsx-runtime";
20
20
  import { forwardRef, useRef, useImperativeHandle } from "react";
21
21
  const componentName = "M4LPrintingSystem";
@@ -145,6 +145,7 @@ const FactoryRender = (props) => {
145
145
  grid: GridNode,
146
146
  chart: ChartNode,
147
147
  pager: PagerNode,
148
+ qrImage: QRImageNode,
148
149
  __default__: () => {
149
150
  throw new Error("Type no defined");
150
151
  }
@@ -1,5 +1,5 @@
1
1
  import { useBase } from "@m4l/core";
2
- import { c as classes, a as getSize } from "../../index.d1fd7818.js";
2
+ import { c as classes, a as getSize } from "../../index.2147b2c3.js";
3
3
  import clsx from "clsx";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  const BodyNode = (props) => {
@@ -1,4 +1,4 @@
1
- import { g as getEvalValue, c as classes } from "../../index.d1fd7818.js";
1
+ import { g as getEvalValue, c as classes } from "../../index.2147b2c3.js";
2
2
  import clsx from "clsx";
3
3
  import { createRef, useEffect } from "react";
4
4
  import { Chart, registerables } from "chart.js";
@@ -1,4 +1,4 @@
1
- import { c as classes } from "../../index.d1fd7818.js";
1
+ import { c as classes } from "../../index.2147b2c3.js";
2
2
  import clsx from "clsx";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  const DividerNode = (props) => {
@@ -1,5 +1,5 @@
1
1
  import { useBase } from "@m4l/core";
2
- import { c as classes, a as getSize } from "../../index.d1fd7818.js";
2
+ import { c as classes, a as getSize } from "../../index.2147b2c3.js";
3
3
  import clsx from "clsx";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  const FooterNode = (props) => {
@@ -1,5 +1,5 @@
1
1
  import { useBase, getPropertyByString } from "@m4l/core";
2
- import { c as classes, a as getSize, g as getEvalValue } from "../../index.d1fd7818.js";
2
+ import { c as classes, a as getSize, g as getEvalValue } from "../../index.2147b2c3.js";
3
3
  import clsx from "clsx";
4
4
  import { jsxs, jsx } from "react/jsx-runtime";
5
5
  const GridNode = (props) => {
@@ -1,5 +1,5 @@
1
1
  import { useBase } from "@m4l/core";
2
- import { c as classes, a as getSize } from "../../index.d1fd7818.js";
2
+ import { c as classes, a as getSize } from "../../index.2147b2c3.js";
3
3
  import clsx from "clsx";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  const HeaderNode = (props) => {
@@ -1,5 +1,5 @@
1
1
  import { useBase } from "@m4l/core";
2
- import { g as getEvalValue, c as classes } from "../../index.d1fd7818.js";
2
+ import { g as getEvalValue, c as classes } from "../../index.2147b2c3.js";
3
3
  import clsx from "clsx";
4
4
  import { jsxs, jsx } from "react/jsx-runtime";
5
5
  const PaperNode = (props) => {
@@ -1,5 +1,5 @@
1
1
  import { useBase, evaluateWithContext } from "@m4l/core";
2
- import { c as classes, a as getSize } from "../../index.d1fd7818.js";
2
+ import { c as classes, a as getSize } from "../../index.2147b2c3.js";
3
3
  import clsx from "clsx";
4
4
  import { jsxs, jsx } from "react/jsx-runtime";
5
5
  const PropertyValueNode = (props) => {
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { QRImageNodeProps } from './types';
3
+ export declare const QRImageNode: (props: QRImageNodeProps) => import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { QRImageNode } from "../../types";
2
+ export interface QRImageNodeProps extends QRImageNode {
3
+ }
@@ -1,5 +1,5 @@
1
1
  import { useBase } from "@m4l/core";
2
- import { c as classes, a as getSize } from "../../index.d1fd7818.js";
2
+ import { c as classes, a as getSize } from "../../index.2147b2c3.js";
3
3
  import clsx from "clsx";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  const SectionNode = (props) => {
@@ -1,5 +1,5 @@
1
1
  import { useBase } from "@m4l/core";
2
- import { g as getEvalValue, c as classes } from "../../index.d1fd7818.js";
2
+ import { g as getEvalValue, c as classes } from "../../index.2147b2c3.js";
3
3
  import clsx from "clsx";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  const TextBoxNode = (props) => {
@@ -115,6 +115,15 @@ export interface ImageNode extends BaseNode {
115
115
  width?: number;
116
116
  height?: number;
117
117
  }
118
+ /**
119
+ * QReNode: Componente para visualizar una imagen qr.
120
+ */
121
+ export interface QRImageNode extends BaseNode {
122
+ type: 'qrImage';
123
+ url: string;
124
+ size?: number;
125
+ color?: string;
126
+ }
118
127
  /**
119
128
  * HeaderNode: Componente para visualizar la cabecera del documento.
120
129
  */
@@ -201,7 +210,7 @@ export interface ChartNode extends Omit<BaseNode, 'children'> {
201
210
  messageX: string;
202
211
  messageY: string;
203
212
  }
204
- export declare type NodePrint = SectionNode | TextBoxNode | ImageNode | HeaderNode | BodyNode | FooterNode | PaperNode | PropertyValue | DividerNode | GridNode | ChartNode | PagerNode;
213
+ export declare type NodePrint = SectionNode | TextBoxNode | ImageNode | HeaderNode | BodyNode | FooterNode | PaperNode | PropertyValue | DividerNode | GridNode | ChartNode | PagerNode | QRImageNode;
205
214
  export declare type NodePrintComponent = ((props: PageNodeProps) => React.JSX.Element) | ((props: SectionNodeProps) => React.JSX.Element) | ((props: HeaderNodeProps) => React.JSX.Element) | ((props: BodyNodeProps) => React.JSX.Element) | ((props: FooterNodeProps) => React.JSX.Element) | ((props: PaperNodeProps) => React.JSX.Element) | ((props: PropertyValueNodeProps) => React.JSX.Element) | ((props: GridNodeProps) => React.JSX.Element) | ((props: ChartNodeProps) => React.JSX.Element);
206
215
  export interface PrintingSystemProps {
207
216
  templateData: RootNode;
@@ -6,5 +6,5 @@ export declare const propertyValueUtilityClasses: (ownerState: OwnerState) => {
6
6
  value: string;
7
7
  root: string;
8
8
  property: string;
9
- skeletonProperty: string;
9
+ iconProperty: string;
10
10
  };