@m4l/components 0.1.96 → 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 (121) 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.191d34e0.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.b55a41f1.js → index.f1a995c7.js} +26 -5
  9. package/components/AppBar/types.d.ts +14 -0
  10. package/components/CommonActions/components/ActionCancel/{index.c67788d8.js → index.918fe98b.js} +1 -1
  11. package/components/CommonActions/components/ActionFormCancel/{index.093c1311.js → index.8b12f4b2.js} +4 -13
  12. package/components/CommonActions/components/ActionFormIntro/{index.d7989234.js → index.c2e8b360.js} +1 -1
  13. package/components/CommonActions/components/ActionIntro/{index.984a6a98.js → index.ee716861.js} +1 -1
  14. package/components/DataGrid/formatters/columnPointsFormatter/{index.5e645334.js → index.a19b7b90.js} +1 -1
  15. package/components/DataGrid/{index.21de89b0.js → index.227eb189.js} +6 -7
  16. package/components/DataGrid/subcomponents/Actions/{index.1d470ca9.js → index.1b896eae.js} +8 -8
  17. package/components/DataGrid/types.d.ts +3 -0
  18. package/components/DraggableWindow/{index.06bf649f.js → index.f9f067bd.js} +1 -1
  19. package/components/DynamicFilter/classes/index.d.ts +1 -1
  20. package/components/DynamicFilter/classes/types.d.ts +1 -0
  21. package/components/DynamicFilter/{index.2c779d01.js → index.91f911cc.js} +14 -10
  22. package/components/GridLayout/{index.ed6dedb0.js → index.e8c04242.js} +2 -2
  23. package/components/GridLayout/subcomponents/Griditem/{index.22a009a1.js → index.4d38f12e.js} +3 -3
  24. package/components/GridLayout/subcomponents/Responsive/{index.54d49969.js → index.e25df1dc.js} +1 -1
  25. package/components/Icon/index.4e424a81.js +248 -0
  26. package/components/Icon/types.d.ts +1 -0
  27. package/components/Image/{index.488e0da6.js → index.8b134b95.js} +44 -2
  28. package/components/Image/types.d.ts +2 -2
  29. package/components/LanguagePopover/{index.c3e5f643.js → index.c5eb0191.js} +2 -2
  30. package/components/LoadingError/{index.f0b3beb0.js → index.536db030.js} +2 -2
  31. package/components/MFLoader/{index.511dfd02.js → index.3ba9d320.js} +1 -1
  32. package/components/ModalDialog/{index.8948a3eb.js → index.89e26413.js} +3 -3
  33. package/components/NoItemSelected/{index.25271572.js → index.216d87c8.js} +1 -1
  34. package/components/ObjectLogs/{index.8dad4c0d.js → index.882325f1.js} +6 -6
  35. package/components/Page/{index.d9eca5f7.js → index.c100afa4.js} +1 -1
  36. package/components/PaperForm/{index.c0d81f4a.js → index.b7918854.js} +1 -1
  37. package/components/Period/{index.117531d9.js → index.5f3af84b.js} +1 -1
  38. package/components/PrintingSystem/{index.3d308b6a.js → index.2147b2c3.js} +13 -12
  39. package/components/PrintingSystem/subcomponents/BodyNode/{index.e659b2bd.js → index.7bed0f05.js} +1 -1
  40. package/components/PrintingSystem/subcomponents/ChartNode/{index.978f2ac6.js → index.c552eb03.js} +1 -1
  41. package/components/PrintingSystem/subcomponents/DividerNode/{index.2560238c.js → index.007d01ab.js} +1 -1
  42. package/components/PrintingSystem/subcomponents/FooterNode/{index.3823efb6.js → index.72ef9241.js} +1 -1
  43. package/components/PrintingSystem/subcomponents/GridNode/{index.a138032a.js → index.2fac7376.js} +1 -1
  44. package/components/PrintingSystem/subcomponents/HeaderNode/{index.7f836dc8.js → index.01ae9ede.js} +1 -1
  45. package/components/PrintingSystem/subcomponents/PaperNode/{index.f93990b9.js → index.cfd86519.js} +1 -1
  46. package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.bd1a15b2.js → index.c4fa3813.js} +1 -1
  47. package/components/PrintingSystem/subcomponents/QRImageNode/index.d.ts +3 -0
  48. package/components/PrintingSystem/subcomponents/QRImageNode/types.d.ts +3 -0
  49. package/components/PrintingSystem/subcomponents/SectionNode/{index.2504139a.js → index.13e656ad.js} +1 -1
  50. package/components/PrintingSystem/subcomponents/TextBoxNode/{index.0a5c2f69.js → index.0c3db261.js} +1 -1
  51. package/components/PrintingSystem/types.d.ts +10 -1
  52. package/components/PropertyValue/classes/index.d.ts +1 -1
  53. package/components/PropertyValue/classes/types.d.ts +4 -1
  54. package/components/PropertyValue/index.3d5e8c52.js +206 -0
  55. package/components/PropertyValue/types.d.ts +5 -7
  56. package/components/Resizeable/{index.840f7167.js → index.6478d7d8.js} +1 -1
  57. package/components/SideBar/classes/index.d.ts +1 -1
  58. package/components/SideBar/{index.01219373.js → index.ed0211ba.js} +10 -10
  59. package/components/SideBar/types.d.ts +3 -3
  60. package/components/SplitLayout/{index.9ef430f6.js → index.30fd5861.js} +1 -1
  61. package/components/ToastContainer/ToastContainer.d.ts +3 -0
  62. package/components/ToastContainer/classes/constants.d.ts +1 -0
  63. package/components/ToastContainer/classes/index.d.ts +8 -0
  64. package/components/ToastContainer/classes/types.d.ts +9 -0
  65. package/components/ToastContainer/index.2343fd28.js +87 -0
  66. package/components/ToastContainer/index.d.ts +2 -0
  67. package/components/ToastContainer/subcomponents/ToastMessage/index.d.ts +3 -0
  68. package/components/ToastContainer/subcomponents/ToastMessage/types.d.ts +5 -0
  69. package/components/ToastContainer/types.d.ts +4 -0
  70. package/components/areas/components/AreasAdmin/{index.93b51dc1.js → index.917f9ff2.js} +9 -9
  71. package/components/areas/components/AreasViewer/{index.288ca252.js → index.7d3415a5.js} +13 -13
  72. package/components/areas/contexts/AreasContext/{index.0e1ecf07.js → index.e3324e71.js} +4 -4
  73. package/components/areas/hooks/useAreas/{index.6905c4b2.js → index.c6264add.js} +1 -1
  74. package/components/formatters/BooleanFormatter/{index.d9d8740a.js → index.35005602.js} +2 -2
  75. package/components/formatters/PointsFormatter/{index.80a4e414.js → index.5c94c5e8.js} +2 -2
  76. package/components/formatters/PointsFormatter/index.d.ts +1 -1
  77. package/components/formatters/{index.7c63a4a0.js → index.e8bd78a5.js} +1 -1
  78. package/components/hook-form/RHFAutocomplete/classes/types.d.ts +2 -0
  79. package/components/hook-form/RHFAutocomplete/{index.5a3c565f.js → index.b01b97e3.js} +26 -35
  80. package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/index.d.ts +1 -1
  81. package/components/hook-form/RHFAutocomplete/subcomponents/Skeleton/types.d.ts +1 -2
  82. package/components/hook-form/RHFAutocomplete/types.d.ts +8 -3
  83. package/components/hook-form/RHFAutocompleteAsync/{index.fa72c407.js → index.8241ce18.js} +1 -1
  84. package/components/hook-form/RHFColorPicker/classes/constants.d.ts +1 -0
  85. package/components/hook-form/RHFColorPicker/classes/index.d.ts +11 -0
  86. package/components/hook-form/RHFColorPicker/classes/types.d.ts +11 -0
  87. package/components/hook-form/RHFColorPicker/index.d.ts +9 -0
  88. package/components/hook-form/RHFColorPicker/subcomponents/Skeleton/indext.d.ts +2 -0
  89. package/components/hook-form/RHFColorPicker/types.d.ts +8 -0
  90. package/components/hook-form/RHFDateTime/{index.a3af80f5.js → index.e8ea2555.js} +1 -1
  91. package/components/hook-form/RHFDateTime/types.d.ts +0 -1
  92. package/components/hook-form/RHFPeriod/{index.c7abf157.js → index.584f515c.js} +1 -1
  93. package/components/hook-form/RHFTextField/{index.e18d3338.js → index.87c99323.js} +1 -1
  94. package/components/hook-form/RHFUpload/{index.215802bf.js → index.f2983d70.js} +4 -4
  95. package/components/hook-form/index.d.ts +1 -0
  96. package/components/index.d.ts +1 -0
  97. package/components/modal/{WindowBase.2dbdb419.js → WindowBase.b1f12376.js} +3 -3
  98. package/components/modal/{WindowConfirm.50339f4d.js → WindowConfirm.481ef7a0.js} +5 -5
  99. package/components/mui_extended/Accordion/{index.e82c4e9d.js → index.54101c95.js} +3 -3
  100. package/components/mui_extended/Button/classes/types.d.ts +2 -0
  101. package/components/mui_extended/Button/{index.98f6513b.js → index.158a9a65.js} +3 -3
  102. package/components/mui_extended/IconButton/{index.331e3b53.js → index.3c568901.js} +1 -1
  103. package/components/mui_extended/LoadingButton/classes/constants.d.ts +1 -1
  104. package/components/mui_extended/MenuActions/{index.ad3f1fd3.js → index.4817512a.js} +2 -2
  105. package/components/mui_extended/Pager/{index.94bf4bab.js → index.ba2163c2.js} +1 -1
  106. package/components/mui_extended/Tab/{index.a3b6234b.js → index.ed3c7b65.js} +1 -1
  107. package/contexts/ModalContext/{index.6352bd4f.js → index.b39d303d.js} +1 -1
  108. package/hooks/useFormAddEdit/{index.6f0613b4.js → index.6929cc88.js} +2 -2
  109. package/hooks/useModal/{index.54dc459a.js → index.abdc0962.js} +1 -1
  110. package/index.js +103 -88
  111. package/node_modules.a40403af.js +6921 -0
  112. package/package.json +4 -2
  113. package/{react-draggable.b86ca282.js → react-draggable.ee21cb7e.js} +3 -3
  114. package/{react-json-view.57125fcf.js → react-json-view.5636414a.js} +1 -1
  115. package/{react-resizable.60704e26.js → react-resizable.ee028152.js} +4 -4
  116. package/{react-splitter-layout.8b1655c8.js → react-splitter-layout.c5d98bf7.js} +3 -3
  117. package/vendor.c4bc5f4d.js +249 -0
  118. package/components/Icon/index.b73eb296.js +0 -147
  119. package/components/PropertyValue/index.c6b9cb7d.js +0 -220
  120. package/components/PropertyValue/skeleton.d.ts +0 -3
  121. package/vendor.7eac5d69.js +0 -104
@@ -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.3d308b6a.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.488e0da6.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.98f6513b.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";
@@ -4,9 +4,9 @@ import { generateUtilityClasses, generateUtilityClass, styled } from "@mui/mater
4
4
  import { unstable_composeClasses } from "@mui/base";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { L as LinearProgressIndeterminate } from "../LinearProgressIndeterminate/index.a0ad2d9e.js";
7
- import { I as Icon } from "../Icon/index.b73eb296.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.98f6513b.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.f0b3beb0.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,7 +1,7 @@
1
1
  import { useTheme, Dialog, Paper } from "@mui/material";
2
- import { c as cjs } from "../../react-draggable.b86ca282.js";
3
- import { u as useModal } from "../../hooks/useModal/index.54dc459a.js";
4
- import { R as ResizeableWindow } from "../Resizeable/index.840f7167.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";
@@ -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.488e0da6.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.21de89b0.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.54dc459a.js";
12
- import { I as Icon } from "../Icon/index.b73eb296.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.2dbdb419.js";
15
- import { D as DynamicFilter, g as getDynamicFilterComponentsDictionary } from "../DynamicFilter/index.2c779d01.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.3d308b6a.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.b73eb296.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,7 +1,7 @@
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.b73eb296.js";
4
+ import { I as Icon } from "../Icon/index.4e424a81.js";
5
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";
@@ -4,18 +4,18 @@ import { unstable_composeClasses } from "@mui/base";
4
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.2560238c.js";
8
- import { S as SectionNode } from "./subcomponents/SectionNode/index.2504139a.js";
9
- import { T as TextBoxNode } from "./subcomponents/TextBoxNode/index.0a5c2f69.js";
10
- import { H as HeaderNode } from "./subcomponents/HeaderNode/index.7f836dc8.js";
11
- import { a as ImageNode } from "../Image/index.488e0da6.js";
12
- import { B as BodyNode } from "./subcomponents/BodyNode/index.e659b2bd.js";
13
- import { F as FooterNode } from "./subcomponents/FooterNode/index.3823efb6.js";
14
- import { P as PaperNode } from "./subcomponents/PaperNode/index.f93990b9.js";
15
- import { P as PropertyValueNode } from "./subcomponents/PropertyValueNode/index.bd1a15b2.js";
16
- import { G as GridNode } from "./subcomponents/GridNode/index.a138032a.js";
17
- import { C as ChartNode } from "./subcomponents/ChartNode/index.978f2ac6.js";
18
- import { P as PagerNode, a as PageRender } from "../Page/index.d9eca5f7.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.3d308b6a.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.3d308b6a.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.3d308b6a.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.3d308b6a.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.3d308b6a.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.3d308b6a.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.3d308b6a.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.3d308b6a.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.3d308b6a.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.3d308b6a.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
  };
@@ -3,9 +3,12 @@ export interface PropertyValueClassesType {
3
3
  root: string;
4
4
  property: string;
5
5
  value: string;
6
- skeletonProperty: string;
6
+ iconProperty: string;
7
7
  isDisabled: string;
8
8
  isFocus: string;
9
+ variantIsForm: string;
10
+ isTabSelected: string;
11
+ isMobile: string;
9
12
  }
10
13
  export declare type PropertyValueClassesKey = keyof PropertyValueClassesType;
11
14
  export declare type Classes = ReturnType<typeof propertyValueUtilityClasses>;