@m4l/components 0.2.3 → 0.2.4
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.
- package/@types/export.d.ts +16 -4
- package/{commonjs.565e6834.js → commonjs.333e55c7.js} +5 -0
- package/components/AccountPopover/{index.3f67361e.js → index.2604c389.js} +2 -4
- package/components/AccountPopover/index.d.ts +1 -0
- package/components/AppBar/AppBar.d.ts +24 -0
- package/components/AppBar/classes/index.d.ts +2 -0
- package/components/AppBar/classes/types.d.ts +2 -0
- package/components/AppBar/{index.f78b52c7.js → index.9522f237.js} +26 -5
- package/components/AppBar/types.d.ts +14 -0
- package/components/CommonActions/components/ActionCancel/{index.5916fb86.js → index.06539086.js} +2 -2
- package/components/CommonActions/components/ActionFormCancel/{index.dbd002ab.js → index.33fc6c79.js} +5 -14
- package/components/CommonActions/components/ActionFormIntro/{index.c7acf718.js → index.5a719043.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.789d82ed.js → index.3e8a2e60.js} +2 -2
- package/components/CommonActions/components/Actions/{index.ccf731c1.js → index.2f6286eb.js} +1 -1
- package/components/DataGrid/formatters/columnPointsFormatter/{index.5e645334.js → index.a19b7b90.js} +1 -1
- package/components/DataGrid/{index.71fae988.js → index.8fbcf147.js} +8 -9
- package/components/DataGrid/subcomponents/Actions/{index.ea3fb0b2.js → index.bad681dc.js} +9 -9
- package/components/DraggableWindow/{index.8f423ed7.js → index.f9f067bd.js} +1 -1
- package/components/DynamicFilter/classes/index.d.ts +1 -1
- package/components/DynamicFilter/classes/types.d.ts +1 -0
- package/components/DynamicFilter/{index.69c2e381.js → index.cd7691e0.js} +17 -13
- package/components/GridLayout/{index.4a245d9e.js → index.e8c04242.js} +2 -2
- package/components/GridLayout/subcomponents/Griditem/{index.ea745285.js → index.4d38f12e.js} +3 -3
- package/components/GridLayout/subcomponents/Responsive/{index.edb59c22.js → index.e25df1dc.js} +1 -1
- package/components/Icon/index.05984e7f.js +248 -0
- package/components/Icon/types.d.ts +1 -0
- package/components/Image/{index.9799dfc0.js → index.bf37e923.js} +46 -4
- package/components/Image/types.d.ts +2 -2
- package/components/LanguagePopover/{index.b8fd6ccc.js → index.5ff37dbf.js} +2 -2
- package/components/LinearProgressIndeterminate/{index.c46da124.js → index.a0ad2d9e.js} +1 -1
- package/components/LoadingError/{index.19b6eeb6.js → index.fabad214.js} +3 -3
- package/components/MFLoader/{index.56cd1993.js → index.7b4ee2a4.js} +1 -1
- package/components/ModalDialog/{index.ec55087e.js → index.89e26413.js} +4 -4
- package/components/NoItemSelected/{index.8a2a13f8.js → index.7db73e77.js} +1 -1
- package/components/ObjectLogs/{index.7150b3a9.js → index.9c353020.js} +7 -7
- package/components/PDFViewer/PDFViewer.d.ts +2 -0
- package/components/PDFViewer/classes/constants.d.ts +1 -0
- package/components/PDFViewer/classes/index.d.ts +7 -0
- package/components/PDFViewer/classes/types.d.ts +7 -0
- package/components/PDFViewer/index.5c2db67a.js +63 -0
- package/components/PDFViewer/index.d.ts +1 -0
- package/components/PDFViewer/types.d.ts +3 -0
- package/components/Page/{index.49d18c85.js → index.710cb16f.js} +1 -1
- package/components/PaperForm/{index.637c8cb4.js → index.7ea3883f.js} +1 -1
- package/components/Period/{index.c964884f.js → index.0aa8e507.js} +2 -2
- package/components/PrintingSystem/{index.d1fd7818.js → index.ed3b22b7.js} +15 -43
- package/components/PrintingSystem/subcomponents/BodyNode/{index.f6410daa.js → index.7acc6016.js} +1 -1
- package/components/PrintingSystem/subcomponents/ChartNode/{index.6b30abe0.js → index.e4a23bdd.js} +4 -4
- package/components/PrintingSystem/subcomponents/DividerNode/{index.dcac3bc0.js → index.16fff262.js} +1 -1
- package/components/PrintingSystem/subcomponents/FooterNode/{index.dd21921e.js → index.6c67dec0.js} +1 -1
- package/components/PrintingSystem/subcomponents/GridNode/{index.eb5ebe06.js → index.f466062b.js} +4 -4
- package/components/PrintingSystem/subcomponents/HeaderNode/{index.48e8769c.js → index.77d3d39a.js} +1 -1
- package/components/PrintingSystem/subcomponents/PaperNode/{index.ccec72dc.js → index.2a3d54a3.js} +4 -4
- package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.807e0343.js → index.e71ad971.js} +1 -1
- package/components/PrintingSystem/subcomponents/QRImageNode/index.d.ts +2 -0
- package/components/PrintingSystem/subcomponents/QRImageNode/types.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/SectionNode/{index.622df623.js → index.ce4f6d16.js} +1 -1
- package/components/PrintingSystem/subcomponents/TextBoxNode/{index.f06ac3d5.js → index.850d20a1.js} +3 -3
- package/components/PrintingSystem/types.d.ts +10 -1
- package/components/PropertyValue/classes/index.d.ts +1 -1
- package/components/PropertyValue/classes/types.d.ts +4 -1
- package/components/PropertyValue/index.37d91d0c.js +206 -0
- package/components/PropertyValue/types.d.ts +5 -7
- package/components/Resizeable/{index.8c53c1fa.js → index.6478d7d8.js} +1 -1
- package/components/ScrollBar/{index.65bb2930.js → index.010f1b9d.js} +5 -1
- package/components/SideBar/classes/index.d.ts +1 -1
- package/components/SideBar/{index.83ee1067.js → index.58d29b84.js} +12 -12
- package/components/SideBar/types.d.ts +3 -3
- package/components/SplitLayout/{index.9ef430f6.js → index.30fd5861.js} +1 -1
- package/components/ToastContainer/ToastContainer.d.ts +2 -0
- package/components/ToastContainer/classes/constants.d.ts +1 -0
- package/components/ToastContainer/classes/index.d.ts +8 -0
- package/components/ToastContainer/classes/types.d.ts +9 -0
- package/components/ToastContainer/index.d.ts +2 -0
- package/components/ToastContainer/index.ed440301.js +87 -0
- package/components/ToastContainer/subcomponents/ToastMessage/index.d.ts +2 -0
- package/components/ToastContainer/subcomponents/ToastMessage/types.d.ts +5 -0
- package/components/ToastContainer/types.d.ts +4 -0
- package/components/areas/components/AreasAdmin/{index.90da0626.js → index.a14ba797.js} +12 -12
- package/components/areas/components/AreasViewer/{index.eb166eca.js → index.c4545f2d.js} +15 -15
- package/components/areas/contexts/AreasContext/{index.1c3f87a7.js → index.54893ef7.js} +4 -4
- package/components/areas/hooks/useAreas/{index.58ac16d2.js → index.a15b3d9c.js} +1 -1
- package/components/formatters/BooleanFormatter/{index.fffdef5e.js → index.4f3cbdce.js} +2 -2
- package/components/formatters/PointsFormatter/{index.80a4e414.js → index.5c94c5e8.js} +2 -2
- package/components/formatters/PointsFormatter/index.d.ts +1 -1
- package/components/formatters/{index.7ee9ae5d.js → index.4ca6946d.js} +1 -1
- package/components/hook-form/RHFAutocomplete/classes/types.d.ts +2 -0
- package/components/hook-form/RHFAutocomplete/{index.31e92edb.js → index.0ce87ac3.js} +26 -35
- package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/index.d.ts +1 -1
- package/components/hook-form/RHFAutocomplete/subcomponents/Skeleton/types.d.ts +1 -2
- package/components/hook-form/RHFAutocomplete/types.d.ts +8 -3
- package/components/hook-form/RHFAutocompleteAsync/{index.6c5648f7.js → index.57789d3a.js} +1 -1
- package/components/hook-form/RHFColorPicker/classes/constants.d.ts +1 -0
- package/components/hook-form/RHFColorPicker/classes/index.d.ts +11 -0
- package/components/hook-form/RHFColorPicker/classes/types.d.ts +11 -0
- package/components/hook-form/RHFColorPicker/index.d.ts +6 -0
- package/components/hook-form/RHFColorPicker/index.d00a2b53.js +150 -0
- package/components/hook-form/RHFColorPicker/subcomponents/Skeleton/indext.d.ts +1 -0
- package/components/hook-form/RHFColorPicker/types.d.ts +5 -0
- package/components/hook-form/RHFDateTime/{index.a5ba00d5.js → index.ae5d3a39.js} +1 -1
- package/components/hook-form/RHFDateTime/types.d.ts +0 -1
- package/components/hook-form/RHFPeriod/{index.fd29d20c.js → index.ae9bcf41.js} +1 -1
- package/components/hook-form/RHFTextField/{index.22203742.js → index.80cc07e0.js} +2 -2
- package/components/hook-form/RHFUpload/{index.aef0f459.js → index.587aac00.js} +4 -4
- package/components/index.d.ts +2 -0
- package/components/maps/components/GpsTools/{index.ed49dc90.js → index.889b0c39.js} +17 -17
- package/components/maps/components/Map/{index.9fcc381d.js → index.665e5c5d.js} +4 -4
- package/components/modal/{WindowBase.2f29424e.js → WindowBase.ea17cf20.js} +3 -3
- package/components/modal/{WindowConfirm.1d1d9cd2.js → WindowConfirm.19ddbd5d.js} +6 -6
- package/components/mui_extended/Accordion/{index.c8c7d392.js → index.b9b427d7.js} +3 -3
- package/components/mui_extended/Button/classes/types.d.ts +2 -0
- package/components/mui_extended/Button/{index.bd3371a3.js → index.570fd3a4.js} +3 -3
- package/components/mui_extended/IconButton/{index.dd9f297b.js → index.26de70bd.js} +1 -1
- package/components/mui_extended/LoadingButton/classes/constants.d.ts +1 -1
- package/components/mui_extended/MenuActions/{index.46c5f7c7.js → index.8c02ff61.js} +2 -2
- package/components/mui_extended/Pager/{index.e4e66ac8.js → index.5629e82b.js} +1 -1
- package/components/mui_extended/Tab/{index.a85b2dab.js → index.724d5948.js} +1 -1
- package/components/mui_extended/ToggleButton/{index.b030c4ec.js → index.21a1f8e5.js} +1 -1
- package/components/mui_extended/ToggleIconButton/{index.e0854091.js → index.00f13c40.js} +1 -1
- package/contexts/ModalContext/{index.436c2938.js → index.b39d303d.js} +1 -1
- package/hooks/useFormAddEdit/{index.16083a43.js → index.32aa4f64.js} +2 -2
- package/hooks/useModal/{index.05d1821e.js → index.abdc0962.js} +1 -1
- package/hooks/useTab/{index.19c8a409.js → index.991b13a7.js} +1 -1
- package/index.js +99 -84
- package/node_modules.8f15d11f.js +6921 -0
- package/package.json +5 -2
- package/{react-draggable.e4725f3a.js → react-draggable.ee21cb7e.js} +4 -4
- package/{react-json-view.57125fcf.js → react-json-view.5636414a.js} +1 -1
- package/{react-resizable.c07d63fb.js → react-resizable.ee028152.js} +5 -5
- package/{react-splitter-layout.8b1655c8.js → react-splitter-layout.c5d98bf7.js} +3 -3
- package/{vendor.384f1182.js → vendor.8f8b0ac9.js} +62 -60
- package/components/Icon/index.f1161f32.js +0 -147
- package/components/PrintingSystem/utils/getEvalValue/index.d.ts +0 -1
- package/components/PropertyValue/index.8fcce0c2.js +0 -220
- package/components/PropertyValue/skeleton.d.ts +0 -2
- package/components/hook-form/RHFColorPicker/index.259b6f38.js +0 -61
- /package/components/GridLayout/subcomponents/{Griditem → GridItem}/index.d.ts +0 -0
- /package/components/GridLayout/subcomponents/{Griditem → GridItem}/types.d.ts +0 -0
- /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.58d29b84.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 = {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { useBase, useModuleSkeleton, BaseProvider, useEnvironment } from "@m4l/core";
|
|
1
|
+
import { useBase, useModuleSkeleton, BaseProvider, useEnvironment, evaluateWithContext } from "@m4l/core";
|
|
2
2
|
import { forwardRef, useState, useRef, useImperativeHandle, useEffect, useMemo } from "react";
|
|
3
3
|
import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
|
|
4
4
|
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 {
|
|
8
|
+
import { c as classes, g as getSize } from "../PrintingSystem/index.ed3b22b7.js";
|
|
9
|
+
import { Q as QRCode } from "../../node_modules.8f15d11f.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: {
|
|
@@ -333,7 +336,7 @@ const ImageNode = (props) => {
|
|
|
333
336
|
host_static_assets,
|
|
334
337
|
environment_assets
|
|
335
338
|
} = useEnvironment();
|
|
336
|
-
const resourceImg =
|
|
339
|
+
const resourceImg = evaluateWithContext(sourceData, src);
|
|
337
340
|
return /* @__PURE__ */ jsx("img", {
|
|
338
341
|
src: `${host_static_assets}/${environment_assets}/${resourceImg}`,
|
|
339
342
|
className: clsx(classes.imageNodeRoot, className),
|
|
@@ -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.
|
|
3
|
+
import { I as Image } from "../Image/index.bf37e923.js";
|
|
4
4
|
import { useLocales } from "@m4l/graphics";
|
|
5
|
-
import { I as ImageButton } from "../mui_extended/Button/index.
|
|
5
|
+
import { I as ImageButton } from "../mui_extended/Button/index.570fd3a4.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.
|
|
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.
|
|
7
|
-
import { I as Icon } from "../Icon/index.
|
|
6
|
+
import { L as LinearProgressIndeterminate } from "../LinearProgressIndeterminate/index.a0ad2d9e.js";
|
|
7
|
+
import { I as Icon } from "../Icon/index.05984e7f.js";
|
|
8
8
|
import { T as Typography } from "../mui_extended/Typography/index.379dd374.js";
|
|
9
|
-
import { B as Button } from "../mui_extended/Button/index.
|
|
9
|
+
import { B as Button } from "../mui_extended/Button/index.570fd3a4.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.
|
|
15
|
+
import { L as LoadingError } from "../LoadingError/index.fabad214.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.
|
|
3
|
-
import { u as useModal } from "../../hooks/useModal/index.
|
|
4
|
-
import { R as ResizeableWindow } from "../Resizeable/index.
|
|
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.
|
|
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.
|
|
3
|
+
import { I as Image } from "../Image/index.bf37e923.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.
|
|
4
|
+
import { c as DataGrid, g as getDataGridComponentsDictionary } from "../DataGrid/index.8fbcf147.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.
|
|
9
|
-
import { S as ScrollBar } from "../ScrollBar/index.
|
|
8
|
+
import { R as ReactJson } from "../../react-json-view.5636414a.js";
|
|
9
|
+
import { S as ScrollBar } from "../ScrollBar/index.010f1b9d.js";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
-
import { u as useModal } from "../../hooks/useModal/index.
|
|
12
|
-
import { I as Icon } from "../Icon/index.
|
|
11
|
+
import { u as useModal } from "../../hooks/useModal/index.abdc0962.js";
|
|
12
|
+
import { I as Icon } from "../Icon/index.05984e7f.js";
|
|
13
13
|
import { S as Stack } from "../mui_extended/Stack/index.0e53197c.js";
|
|
14
|
-
import { W as WindowBase } from "../modal/WindowBase.
|
|
15
|
-
import { D as DynamicFilter, g as getDynamicFilterComponentsDictionary } from "../DynamicFilter/index.
|
|
14
|
+
import { W as WindowBase } from "../modal/WindowBase.ea17cf20.js";
|
|
15
|
+
import { D as DynamicFilter, g as getDynamicFilterComponentsDictionary } from "../DynamicFilter/index.cd7691e0.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%",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const componentName = "M4LPDFViewer";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PDFViewerClassesType } from './types';
|
|
2
|
+
export declare const pdfViewerClasses: PDFViewerClassesType;
|
|
3
|
+
export declare function getPDFViewerUtilityClass(slot: string): string;
|
|
4
|
+
export declare const pdfviewerUtilityClasses: () => {
|
|
5
|
+
root: string;
|
|
6
|
+
buttonDownload: string;
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { pdfviewerUtilityClasses } from ".";
|
|
2
|
+
export interface PDFViewerClassesType {
|
|
3
|
+
root: string;
|
|
4
|
+
buttonDownload: string;
|
|
5
|
+
}
|
|
6
|
+
export declare type PDFViewerClassesKey = keyof PDFViewerClassesType;
|
|
7
|
+
export declare type Classes = ReturnType<typeof pdfviewerUtilityClasses>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { styled, generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
2
|
+
import { unstable_composeClasses } from "@mui/base";
|
|
3
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
4
|
+
import { B as Button } from "../mui_extended/Button/index.570fd3a4.js";
|
|
5
|
+
const PDFVeiwerRoot = styled("div")(({ theme }) => ({
|
|
6
|
+
...theme.components?.M4LPDFViewer?.styleOverrides
|
|
7
|
+
}));
|
|
8
|
+
const componentName = "M4LPDFViewer";
|
|
9
|
+
generateUtilityClasses(componentName, [
|
|
10
|
+
"root",
|
|
11
|
+
"buttonDownload"
|
|
12
|
+
]);
|
|
13
|
+
function getPDFViewerUtilityClass(slot) {
|
|
14
|
+
return generateUtilityClass(componentName, slot);
|
|
15
|
+
}
|
|
16
|
+
const pdfviewerUtilityClasses = () => {
|
|
17
|
+
const slots = {
|
|
18
|
+
root: ["root"],
|
|
19
|
+
buttonDownload: ["buttonDownload"]
|
|
20
|
+
};
|
|
21
|
+
const composedClasses = unstable_composeClasses(slots, getPDFViewerUtilityClass, {});
|
|
22
|
+
return {
|
|
23
|
+
...composedClasses
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
const PDFViewer = (props) => {
|
|
27
|
+
const {
|
|
28
|
+
pdfUrl
|
|
29
|
+
} = props;
|
|
30
|
+
console.log("pdfUrl", pdfUrl);
|
|
31
|
+
const handleDownload = async () => {
|
|
32
|
+
try {
|
|
33
|
+
const response = await fetch(pdfUrl);
|
|
34
|
+
const blob = await response.blob();
|
|
35
|
+
const url = window.URL.createObjectURL(new Blob([blob]));
|
|
36
|
+
const link = document.createElement("a");
|
|
37
|
+
link.href = url;
|
|
38
|
+
link.download = pdfUrl.substring(pdfUrl.lastIndexOf("/") + 1);
|
|
39
|
+
document.body.appendChild(link);
|
|
40
|
+
link.click();
|
|
41
|
+
document.body.removeChild(link);
|
|
42
|
+
} catch (error) {
|
|
43
|
+
console.error("Error al descargar el PDF:", error);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
const classes = pdfviewerUtilityClasses();
|
|
47
|
+
return /* @__PURE__ */ jsxs(PDFVeiwerRoot, {
|
|
48
|
+
className: classes.root,
|
|
49
|
+
children: [/* @__PURE__ */ jsx("embed", {
|
|
50
|
+
src: pdfUrl,
|
|
51
|
+
type: "application/pdf",
|
|
52
|
+
width: "100%",
|
|
53
|
+
height: "100%"
|
|
54
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
55
|
+
onClick: handleDownload,
|
|
56
|
+
variant: "contained",
|
|
57
|
+
children: "Descargar PDF"
|
|
58
|
+
})]
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
export {
|
|
62
|
+
PDFViewer as P
|
|
63
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PDFViewer } from '../PDFViewer/PDFViewer';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useBase, BaseProvider, useModuleSkeleton } from "@m4l/core";
|
|
2
|
-
import { c as classes,
|
|
2
|
+
import { c as classes, g as getSize, F as FactoryRender } from "../PrintingSystem/index.ed3b22b7.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.
|
|
4
|
+
import { I as Icon } from "../Icon/index.05984e7f.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.
|
|
5
|
-
import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.
|
|
4
|
+
import { I as Icon } from "../Icon/index.05984e7f.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";
|