@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.
- package/@types/export.d.ts +13 -4
- package/{commonjs.565e6834.js → commonjs.333e55c7.js} +5 -0
- package/components/AccountPopover/{index.3711d526.js → index.252cc907.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.512042a9.js → index.f1a995c7.js} +26 -5
- package/components/AppBar/types.d.ts +14 -0
- package/components/CommonActions/components/ActionCancel/{index.bb383946.js → index.918fe98b.js} +2 -2
- package/components/CommonActions/components/ActionFormCancel/{index.97ecdeef.js → index.8b12f4b2.js} +5 -14
- package/components/CommonActions/components/ActionFormIntro/{index.3deddb07.js → index.c2e8b360.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.4bc5780e.js → index.ee716861.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.47a152d0.js → index.227eb189.js} +6 -7
- package/components/DataGrid/subcomponents/Actions/{index.8d9feca6.js → index.1b896eae.js} +9 -9
- package/components/DataGrid/types.d.ts +3 -0
- 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.a50a1483.js → index.91f911cc.js} +16 -12
- 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.4e424a81.js +248 -0
- package/components/Icon/types.d.ts +1 -0
- package/components/Image/{index.9799dfc0.js → index.8b134b95.js} +44 -2
- package/components/Image/types.d.ts +2 -2
- package/components/LanguagePopover/{index.087b430d.js → index.c5eb0191.js} +2 -2
- package/components/LinearProgressIndeterminate/{index.c46da124.js → index.a0ad2d9e.js} +1 -1
- package/components/LoadingError/{index.08cf9728.js → index.536db030.js} +3 -3
- package/components/MFLoader/{index.4b531d2d.js → index.3ba9d320.js} +1 -1
- package/components/ModalDialog/{index.ec55087e.js → index.89e26413.js} +4 -4
- package/components/NoItemSelected/{index.8a2a13f8.js → index.216d87c8.js} +1 -1
- package/components/ObjectLogs/{index.55b5c933.js → index.882325f1.js} +6 -6
- package/components/Page/{index.49d18c85.js → index.c100afa4.js} +1 -1
- package/components/PaperForm/{index.a2b69977.js → index.b7918854.js} +1 -1
- package/components/Period/{index.8cccbb4b.js → index.5f3af84b.js} +2 -2
- package/components/PrintingSystem/{index.d1fd7818.js → index.2147b2c3.js} +14 -13
- package/components/PrintingSystem/subcomponents/BodyNode/{index.f6410daa.js → index.7bed0f05.js} +1 -1
- package/components/PrintingSystem/subcomponents/ChartNode/{index.6b30abe0.js → index.c552eb03.js} +1 -1
- package/components/PrintingSystem/subcomponents/DividerNode/{index.dcac3bc0.js → index.007d01ab.js} +1 -1
- package/components/PrintingSystem/subcomponents/FooterNode/{index.dd21921e.js → index.72ef9241.js} +1 -1
- package/components/PrintingSystem/subcomponents/GridNode/{index.eb5ebe06.js → index.2fac7376.js} +1 -1
- package/components/PrintingSystem/subcomponents/HeaderNode/{index.48e8769c.js → index.01ae9ede.js} +1 -1
- package/components/PrintingSystem/subcomponents/PaperNode/{index.ccec72dc.js → index.cfd86519.js} +1 -1
- package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.807e0343.js → index.c4fa3813.js} +1 -1
- package/components/PrintingSystem/subcomponents/QRImageNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/QRImageNode/types.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/SectionNode/{index.622df623.js → index.13e656ad.js} +1 -1
- package/components/PrintingSystem/subcomponents/TextBoxNode/{index.f06ac3d5.js → index.0c3db261.js} +1 -1
- 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.3d5e8c52.js +206 -0
- package/components/PropertyValue/types.d.ts +5 -7
- package/components/Resizeable/{index.8c53c1fa.js → index.6478d7d8.js} +1 -1
- package/components/SideBar/classes/index.d.ts +1 -1
- package/components/SideBar/{index.ce301edd.js → index.ed0211ba.js} +11 -11
- 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 +3 -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.2343fd28.js +87 -0
- package/components/ToastContainer/index.d.ts +2 -0
- package/components/ToastContainer/subcomponents/ToastMessage/index.d.ts +3 -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.3c182644.js → index.917f9ff2.js} +11 -11
- package/components/areas/components/AreasViewer/{index.a0a969e7.js → index.7d3415a5.js} +15 -15
- package/components/areas/contexts/AreasContext/{index.d43aceaf.js → index.e3324e71.js} +4 -4
- package/components/areas/hooks/useAreas/{index.6a1d525c.js → index.c6264add.js} +1 -1
- package/components/formatters/BooleanFormatter/{index.00596be3.js → index.35005602.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.1906141f.js → index.e8bd78a5.js} +1 -1
- package/components/hook-form/RHFAutocomplete/classes/types.d.ts +2 -0
- package/components/hook-form/RHFAutocomplete/{index.a5f1034a.js → index.b01b97e3.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.047ff594.js → index.8241ce18.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 +9 -0
- package/components/hook-form/RHFColorPicker/subcomponents/Skeleton/indext.d.ts +2 -0
- package/components/hook-form/RHFColorPicker/types.d.ts +8 -0
- package/components/hook-form/RHFDateTime/{index.a273293c.js → index.e8ea2555.js} +1 -1
- package/components/hook-form/RHFDateTime/types.d.ts +0 -1
- package/components/hook-form/RHFPeriod/{index.53827a17.js → index.584f515c.js} +1 -1
- package/components/hook-form/RHFTextField/{index.5801338a.js → index.87c99323.js} +2 -2
- package/components/hook-form/RHFUpload/{index.f04df1c9.js → index.f2983d70.js} +4 -4
- package/components/hook-form/index.d.ts +1 -0
- package/components/index.d.ts +1 -0
- package/components/modal/{WindowBase.beb2fb3e.js → WindowBase.b1f12376.js} +3 -3
- package/components/modal/{WindowConfirm.477e6f63.js → WindowConfirm.481ef7a0.js} +6 -6
- package/components/mui_extended/Accordion/{index.08ff7e2f.js → index.54101c95.js} +3 -3
- package/components/mui_extended/Button/classes/types.d.ts +2 -0
- package/components/mui_extended/Button/{index.857c2dfe.js → index.158a9a65.js} +3 -3
- package/components/mui_extended/IconButton/{index.5499ffdb.js → index.3c568901.js} +1 -1
- package/components/mui_extended/LoadingButton/classes/constants.d.ts +1 -1
- package/components/mui_extended/MenuActions/{index.d8d0c00e.js → index.4817512a.js} +2 -2
- package/components/mui_extended/Pager/{index.47343062.js → index.ba2163c2.js} +1 -1
- package/components/mui_extended/Tab/{index.2f9a6815.js → index.ed3c7b65.js} +1 -1
- package/contexts/ModalContext/{index.436c2938.js → index.b39d303d.js} +1 -1
- package/hooks/useFormAddEdit/{index.b9ccd95f.js → index.6929cc88.js} +5 -4
- package/hooks/useFormAddEdit/types.d.ts +1 -0
- package/hooks/useModal/{index.05d1821e.js → index.abdc0962.js} +1 -1
- package/index.js +106 -91
- package/node_modules.a40403af.js +6921 -0
- package/package.json +4 -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.c4bc5f4d.js +249 -0
- package/components/Icon/index.11a7a77c.js +0 -147
- package/components/PropertyValue/index.4ae0bb21.js +0 -220
- package/components/PropertyValue/skeleton.d.ts +0 -3
- package/vendor.6019bf6e.js +0 -104
- /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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getPropertyByString } from "@m4l/core";
|
|
2
2
|
import { W as WrapperComponent } from "../../WrapperComponent/index.5e872594.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
function getFormatPoints(obProps, fieldValue, fieldUnit) {
|
|
4
|
+
function getFormatPoints(obProps, fieldValue, fieldUnit, chainPoint) {
|
|
5
5
|
let result = "";
|
|
6
6
|
const points = getPropertyByString(obProps, fieldValue);
|
|
7
7
|
const unit = getPropertyByString(obProps, fieldUnit) || "";
|
|
@@ -10,7 +10,7 @@ function getFormatPoints(obProps, fieldValue, fieldUnit) {
|
|
|
10
10
|
}
|
|
11
11
|
points.map((point) => {
|
|
12
12
|
if (point) {
|
|
13
|
-
result = result.concat(`[${point}${unit}]`);
|
|
13
|
+
result = !chainPoint ? result.concat(`[${point}${unit}]`) : result.concat(`[${getPropertyByString(point, chainPoint)}${unit}]`);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
return result;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { PointsFormatterProps } from './types';
|
|
3
|
-
export declare function getFormatPoints(obProps: any, fieldValue: string, fieldUnit: string): string;
|
|
3
|
+
export declare function getFormatPoints(obProps: any, fieldValue: string, fieldUnit: string, chainPoint?: string): string;
|
|
4
4
|
export declare function PointsFormatter(props: PointsFormatterProps): import("react").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import "@mui/base";
|
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { W as WrapperComponent } from "../WrapperComponent/index.5e872594.js";
|
|
5
5
|
import { useModuleDictionary } from "@m4l/core";
|
|
6
|
-
import { a as BOOLEAN_FORMATTER_DICTIONARY_KEY } from "./BooleanFormatter/index.
|
|
6
|
+
import { a as BOOLEAN_FORMATTER_DICTIONARY_KEY } from "./BooleanFormatter/index.35005602.js";
|
|
7
7
|
const COMPONENT_CLASS_NAME = "M4LFormatter";
|
|
8
8
|
const formatterClasses = generateUtilityClasses(COMPONENT_CLASS_NAME, [
|
|
9
9
|
"root",
|
|
@@ -9,7 +9,9 @@ export interface RHFAutocompleteClassesType {
|
|
|
9
9
|
skeletonContainerText: string;
|
|
10
10
|
iconDown: string;
|
|
11
11
|
variantInfo: string;
|
|
12
|
+
variantImage: string;
|
|
12
13
|
isDisabled: string;
|
|
14
|
+
imageWidthDefined: string;
|
|
13
15
|
variantSuccess: string;
|
|
14
16
|
variantWarning: string;
|
|
15
17
|
variantError: string;
|
|
@@ -2,15 +2,15 @@ import { useModuleDictionary, useModuleSkeleton, useEnvironment } from "@m4l/cor
|
|
|
2
2
|
import { useFormContext, Controller } from "react-hook-form";
|
|
3
3
|
import { Skeleton, generateUtilityClasses, generateUtilityClass, useTheme, Autocomplete, Popper, TextField, CircularProgress } from "@mui/material";
|
|
4
4
|
import { styled } from "@mui/material/styles";
|
|
5
|
-
import { I as Image } from "../../Image/index.
|
|
5
|
+
import { I as Image } from "../../Image/index.8b134b95.js";
|
|
6
6
|
import { useMemo, useRef, useState, useEffect } from "react";
|
|
7
7
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
8
8
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
9
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
10
9
|
import { T as Typography } from "../../mui_extended/Typography/index.379dd374.js";
|
|
10
|
+
import { unstable_composeClasses } from "@mui/base";
|
|
11
11
|
import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
|
|
12
12
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
13
|
-
import { I as IconButton } from "../../mui_extended/IconButton/index.
|
|
13
|
+
import { I as IconButton } from "../../mui_extended/IconButton/index.3c568901.js";
|
|
14
14
|
const AutocompleteRoot = styled("div")(({
|
|
15
15
|
theme
|
|
16
16
|
}) => ({
|
|
@@ -28,7 +28,7 @@ const RHFTAUTOCOMPLET_ROOT_TEST_ID = "RHFAutocomplete";
|
|
|
28
28
|
const getNameDataTestId = (KEY) => {
|
|
29
29
|
return `${RHFAUTOCOMPLETE_PREFIX}-${KEY}`;
|
|
30
30
|
};
|
|
31
|
-
function withRenderOption(getUrlImage, classes) {
|
|
31
|
+
function withRenderOption(getUrlImage, classes, imageWidth) {
|
|
32
32
|
return function RenderOption(optionProps, option) {
|
|
33
33
|
return /* @__PURE__ */ jsxs(WrapperOption, {
|
|
34
34
|
...optionProps,
|
|
@@ -37,18 +37,19 @@ function withRenderOption(getUrlImage, classes) {
|
|
|
37
37
|
[TEST_PROP_ID]: getNameDataTestId("withImage")
|
|
38
38
|
} : {},
|
|
39
39
|
children: [/* @__PURE__ */ jsx(Image, {
|
|
40
|
-
src: getUrlImage(option)
|
|
41
|
-
|
|
40
|
+
src: getUrlImage(option),
|
|
41
|
+
width: imageWidth,
|
|
42
|
+
height: "100%"
|
|
43
|
+
}), /* @__PURE__ */ jsx(Typography, {
|
|
44
|
+
variant: "body",
|
|
45
|
+
children: optionProps.key
|
|
46
|
+
})]
|
|
42
47
|
});
|
|
43
48
|
};
|
|
44
49
|
}
|
|
45
50
|
const SkeletonRHFAutocomplete = (props) => {
|
|
46
51
|
const {
|
|
47
52
|
withImage,
|
|
48
|
-
skeletonWidth,
|
|
49
|
-
skeletonHeight,
|
|
50
|
-
imageWidth,
|
|
51
|
-
imageHeight,
|
|
52
53
|
classes,
|
|
53
54
|
hasLabel
|
|
54
55
|
} = props;
|
|
@@ -67,9 +68,7 @@ const SkeletonRHFAutocomplete = (props) => {
|
|
|
67
68
|
children: [/* @__PURE__ */ jsx("div", {
|
|
68
69
|
className: classes.skeletonContainerText,
|
|
69
70
|
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
70
|
-
variant: "text"
|
|
71
|
-
width: skeletonWidth,
|
|
72
|
-
height: skeletonHeight
|
|
71
|
+
variant: "text"
|
|
73
72
|
})
|
|
74
73
|
}), /* @__PURE__ */ jsx(Skeleton, {
|
|
75
74
|
variant: "circular",
|
|
@@ -81,18 +80,11 @@ const SkeletonRHFAutocomplete = (props) => {
|
|
|
81
80
|
})]
|
|
82
81
|
}) : /* @__PURE__ */ jsxs(Fragment, {
|
|
83
82
|
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
84
|
-
variant: "circular"
|
|
85
|
-
width: imageWidth,
|
|
86
|
-
height: imageHeight,
|
|
87
|
-
sx: {
|
|
88
|
-
minWidth: imageWidth
|
|
89
|
-
}
|
|
83
|
+
variant: "circular"
|
|
90
84
|
}), /* @__PURE__ */ jsx("div", {
|
|
91
85
|
className: classes.skeletonContainerText,
|
|
92
86
|
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
93
|
-
variant: "text"
|
|
94
|
-
width: skeletonWidth,
|
|
95
|
-
height: skeletonHeight
|
|
87
|
+
variant: "text"
|
|
96
88
|
})
|
|
97
89
|
}), /* @__PURE__ */ jsx(Skeleton, {
|
|
98
90
|
variant: "circular",
|
|
@@ -117,7 +109,9 @@ generateUtilityClasses(componentName, [
|
|
|
117
109
|
"skeletonContainerText",
|
|
118
110
|
"iconDown",
|
|
119
111
|
"variantInfo",
|
|
112
|
+
"variantImage",
|
|
120
113
|
"isDisabled",
|
|
114
|
+
"imageWidthDefined",
|
|
121
115
|
"variantSuccess",
|
|
122
116
|
"variantWarning",
|
|
123
117
|
"variantError",
|
|
@@ -130,11 +124,11 @@ function getRHFAutocompleteClassesUtilityClass(slot) {
|
|
|
130
124
|
}
|
|
131
125
|
const useUtilityClasses = (ownerState) => {
|
|
132
126
|
const slots = {
|
|
133
|
-
root: ["root", ownerState.size === "small" && "sizeSmall", ownerState.size === "medium" && "sizeMedium", ownerState.focus && "isFocus", ownerState.disabled && "isDisabled", ownerState.
|
|
127
|
+
root: ["root", ownerState.size === "small" && "sizeSmall", ownerState.size === "medium" && "sizeMedium", ownerState.focus && "isFocus", ownerState.disabled && "isDisabled", ownerState.semantics === "info" && "variantInfo", ownerState.semantics === "success" && "variantSuccess", ownerState.semantics === "warning" && "variantWarning", ownerState.semantics === "error" && "variantError", ownerState.imageWidthDefined && "imageWidthDefined"],
|
|
134
128
|
withImage: ["withImage"],
|
|
135
129
|
skeleton: ["skeleton"],
|
|
136
130
|
label: ["label"],
|
|
137
|
-
popper: ["popper"],
|
|
131
|
+
popper: ["popper", ownerState.size === "small" && "sizeSmall", ownerState.size === "medium" && "sizeMedium", ownerState.imageWidthDefined && "imageWidthDefined"],
|
|
138
132
|
skeletonRoot: ["skeletonRoot"],
|
|
139
133
|
skeletonContainerText: ["SkeletonContainerText"],
|
|
140
134
|
iconDown: ["iconDown"]
|
|
@@ -155,8 +149,6 @@ function RHFAutocomplete(props) {
|
|
|
155
149
|
options,
|
|
156
150
|
disabled,
|
|
157
151
|
getOptionUrlImage,
|
|
158
|
-
imageWidth = "24px",
|
|
159
|
-
imageHeight = "24px",
|
|
160
152
|
onOpen,
|
|
161
153
|
onClose,
|
|
162
154
|
loading,
|
|
@@ -164,6 +156,7 @@ function RHFAutocomplete(props) {
|
|
|
164
156
|
helperMessage,
|
|
165
157
|
size = "small",
|
|
166
158
|
onChangeFilterParmsLocal,
|
|
159
|
+
imageWidth,
|
|
167
160
|
...other
|
|
168
161
|
} = props;
|
|
169
162
|
const {
|
|
@@ -232,8 +225,9 @@ function RHFAutocomplete(props) {
|
|
|
232
225
|
const ownerState = {
|
|
233
226
|
size: !isDesktop ? "medium" : size,
|
|
234
227
|
focus: isFocus,
|
|
235
|
-
|
|
236
|
-
disabled
|
|
228
|
+
semantics: currentVariant,
|
|
229
|
+
disabled,
|
|
230
|
+
imageWidthDefined: imageWidth ? true : false
|
|
237
231
|
};
|
|
238
232
|
const classes = useUtilityClasses(ownerState);
|
|
239
233
|
const theme = useTheme();
|
|
@@ -285,11 +279,12 @@ function RHFAutocomplete(props) {
|
|
|
285
279
|
inputValue,
|
|
286
280
|
clearOnBlur: false,
|
|
287
281
|
PopperComponent: (props2) => {
|
|
282
|
+
console.log("Autocomplete open Popover");
|
|
288
283
|
return /* @__PURE__ */ jsx(Popper, {
|
|
289
284
|
...props2,
|
|
290
285
|
className: classes.popper,
|
|
291
286
|
placement: "bottom-start",
|
|
292
|
-
placeholder:
|
|
287
|
+
placeholder: void 0,
|
|
293
288
|
sx: {
|
|
294
289
|
...theme.components?.M4LRHFAutocompletePopover?.styleOverrides
|
|
295
290
|
}
|
|
@@ -322,7 +317,7 @@ function RHFAutocomplete(props) {
|
|
|
322
317
|
}),
|
|
323
318
|
disabled,
|
|
324
319
|
noOptionsText: getLabel("rhf_autocomplete.no_options"),
|
|
325
|
-
renderOption: withImage ? withRenderOption(getOptionUrlImageLocal, classes) : void 0,
|
|
320
|
+
renderOption: withImage ? withRenderOption(getOptionUrlImageLocal, classes, imageWidth) : void 0,
|
|
326
321
|
renderInput: (params) => {
|
|
327
322
|
return /* @__PURE__ */ jsx(TextField, {
|
|
328
323
|
...params,
|
|
@@ -339,7 +334,7 @@ function RHFAutocomplete(props) {
|
|
|
339
334
|
startAdornment: withImage && value ? /* @__PURE__ */ jsx(Image, {
|
|
340
335
|
src: getOptionUrlImageLocal(value),
|
|
341
336
|
width: imageWidth,
|
|
342
|
-
height:
|
|
337
|
+
height: "100%"
|
|
343
338
|
}, "ImageTextField") : null,
|
|
344
339
|
endAdornment: /* @__PURE__ */ jsx(Fragment, {
|
|
345
340
|
children: loading ? /* @__PURE__ */ jsx(CircularProgress, {
|
|
@@ -366,10 +361,6 @@ function RHFAutocomplete(props) {
|
|
|
366
361
|
}
|
|
367
362
|
}) : /* @__PURE__ */ jsx(SkeletonRHFAutocomplete, {
|
|
368
363
|
withImage,
|
|
369
|
-
skeletonWidth,
|
|
370
|
-
skeletonHeight,
|
|
371
|
-
imageWidth,
|
|
372
|
-
imageHeight,
|
|
373
364
|
classes,
|
|
374
365
|
hasLabel: label
|
|
375
366
|
})
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { GetOptionString } from '../../types';
|
|
3
|
-
export declare function withRenderOption<T>(getUrlImage: GetOptionString<T>, classes: any): (optionProps: HTMLAttributes<HTMLLIElement>, option: T) => import("react").JSX.Element;
|
|
3
|
+
export declare function withRenderOption<T>(getUrlImage: GetOptionString<T>, classes: any, imageWidth: string | number | undefined): (optionProps: HTMLAttributes<HTMLLIElement>, option: T) => import("react").JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Classes } from '../../classes/types';
|
|
2
|
-
|
|
3
|
-
export interface SkeletonRHFAutocompleteProps extends Pick<RHFAutocompleteProps<any>, 'skeletonWidth' | 'skeletonHeight' | 'imageWidth' | 'imageHeight'> {
|
|
2
|
+
export interface SkeletonRHFAutocompleteProps {
|
|
4
3
|
withImage: boolean;
|
|
5
4
|
classes: Classes;
|
|
6
5
|
hasLabel?: string;
|
|
@@ -8,21 +8,26 @@ export declare type RHFAutocompleteProps<T> = {
|
|
|
8
8
|
options: Array<T>;
|
|
9
9
|
getOptionLabel: (option: T) => string;
|
|
10
10
|
getOptionUrlImage?: (option: T) => string;
|
|
11
|
+
/**
|
|
12
|
+
* El valor de tamaño en anchura que va a tener el elemento de imagen.
|
|
13
|
+
*/
|
|
14
|
+
imageWidth?: string | number;
|
|
11
15
|
isOptionEqualToValue: (option: T, value: T) => boolean;
|
|
12
16
|
skeletonWidth?: string | number;
|
|
13
17
|
skeletonHeight?: string | number;
|
|
14
18
|
size?: Pick<RHFTextFieldProps, 'size'>;
|
|
15
19
|
label: string;
|
|
16
|
-
imageWidth?: string;
|
|
17
|
-
imageHeight?: string;
|
|
18
20
|
loading?: boolean;
|
|
19
21
|
variant?: RHFAutocompleteVariants;
|
|
20
22
|
helperMessage?: string;
|
|
21
23
|
onOpen?: (event: React.SyntheticEvent) => void;
|
|
22
24
|
onClose?: (event: React.SyntheticEvent, reason: AutocompleteCloseReason) => void;
|
|
23
25
|
onChangeFilterParmsLocal?: (newValue: string, reason: AutocompleteInputChangeReason) => void;
|
|
26
|
+
imageHeight?: string | number;
|
|
24
27
|
} & TextFieldProps;
|
|
25
28
|
export interface OwnerState extends Pick<RHFTextFieldProps, 'size' | 'disabled'> {
|
|
26
29
|
focus: boolean;
|
|
27
|
-
|
|
30
|
+
semantics: RHFAutocompleteVariants | 'error' | null;
|
|
31
|
+
variant?: 'withImage';
|
|
32
|
+
imageWidthDefined: boolean;
|
|
28
33
|
}
|
|
@@ -6,7 +6,7 @@ import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
|
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 } from "react/jsx-runtime";
|
|
9
|
-
import { R as RHFAutocomplete, g as getRHFAutocompleteComponentsDictionary } from "../RHFAutocomplete/index.
|
|
9
|
+
import { R as RHFAutocomplete, g as getRHFAutocompleteComponentsDictionary } from "../RHFAutocomplete/index.b01b97e3.js";
|
|
10
10
|
styled("div")(() => ({
|
|
11
11
|
display: "flex",
|
|
12
12
|
width: "100%",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const componentName = "M4LRHFColorPicker";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RHFColorPickerClassesType } from './types';
|
|
2
|
+
export declare const colorPickerClasses: RHFColorPickerClassesType;
|
|
3
|
+
export declare function getRHFColorPickerUtilityClass(slot: string): string;
|
|
4
|
+
export declare const useUtilityClasses: () => {
|
|
5
|
+
root: string;
|
|
6
|
+
skeleton: string;
|
|
7
|
+
popoverRoot: string;
|
|
8
|
+
containerFieldColor: string;
|
|
9
|
+
containerPicker: string;
|
|
10
|
+
fieldColor: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useUtilityClasses } from ".";
|
|
2
|
+
export interface RHFColorPickerClassesType {
|
|
3
|
+
root: string;
|
|
4
|
+
popoverRoot: string;
|
|
5
|
+
containerFieldColor: string;
|
|
6
|
+
fieldColor: string;
|
|
7
|
+
containerPicker: string;
|
|
8
|
+
skeleton: string;
|
|
9
|
+
}
|
|
10
|
+
export declare type RHFColorPickerClassesKey = keyof RHFColorPickerClassesType;
|
|
11
|
+
export declare type Classes = ReturnType<typeof useUtilityClasses>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { RHFColorPickerProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Componente RHFColorPicker para seleccionar colores con React Hook Form.
|
|
5
|
+
* @component
|
|
6
|
+
* @param {RHFColorPickerProps} props - Propiedades del componente.
|
|
7
|
+
* @returns {JSX.Element} - Elemento JSX que representa el componente.
|
|
8
|
+
*/
|
|
9
|
+
export declare const RHFColorPicker: (props: RHFColorPickerProps) => import("react").JSX.Element;
|
|
@@ -11,7 +11,7 @@ import clsx from "clsx";
|
|
|
11
11
|
import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
|
|
12
12
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
13
13
|
import { T as Typography } from "../../mui_extended/Typography/index.379dd374.js";
|
|
14
|
-
import { I as Icon } from "../../Icon/index.
|
|
14
|
+
import { I as Icon } from "../../Icon/index.4e424a81.js";
|
|
15
15
|
const SKTRHFWrapperTextField = styled("div")(({
|
|
16
16
|
theme
|
|
17
17
|
}) => ({
|
|
@@ -3,7 +3,7 @@ import { useFormContext, Controller } from "react-hook-form";
|
|
|
3
3
|
import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
|
|
4
4
|
import { unstable_composeClasses } from "@mui/base";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { P as Period } from "../../Period/index.
|
|
6
|
+
import { P as Period } from "../../Period/index.5f3af84b.js";
|
|
7
7
|
const RHFPeriodRoot = styled("div")(({
|
|
8
8
|
theme
|
|
9
9
|
}) => ({
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { useModuleSkeleton, useEnvironment } from "@m4l/core";
|
|
2
2
|
import { styled, Skeleton, generateUtilityClasses, TextField, InputAdornment, generateUtilityClass } from "@mui/material";
|
|
3
3
|
import { forwardRef, useState, useEffect } from "react";
|
|
4
|
-
import { I as IconButton } from "../../mui_extended/IconButton/index.
|
|
4
|
+
import { I as IconButton } from "../../mui_extended/IconButton/index.3c568901.js";
|
|
5
5
|
import { useFormContext, Controller } from "react-hook-form";
|
|
6
6
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
7
7
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
8
8
|
import { styled as styled$1 } from "@mui/material/styles";
|
|
9
9
|
import { unstable_composeClasses } from "@mui/base";
|
|
10
|
-
import { g as getComponentUtilityClass } from "../../../utils/index.
|
|
10
|
+
import { g as getComponentUtilityClass } from "../../../utils/index.de903261.js";
|
|
11
11
|
import { T as Typography } from "../../mui_extended/Typography/index.379dd374.js";
|
|
12
12
|
import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
|
|
13
13
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useCallback } from "react";
|
|
2
2
|
import { useFormContext, Controller } from "react-hook-form";
|
|
3
|
-
import
|
|
3
|
+
import require$$0 from "lodash/isString";
|
|
4
4
|
import { useDropzone } from "react-dropzone";
|
|
5
|
-
import { I as Image } from "../../Image/index.
|
|
5
|
+
import { I as Image } from "../../Image/index.8b134b95.js";
|
|
6
6
|
import { useEnvironment, useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
7
7
|
import { styled } from "@mui/material/styles";
|
|
8
8
|
import { Skeleton, generateUtilityClasses, generateUtilityClass, styled as styled$1 } from "@mui/material";
|
|
@@ -10,7 +10,7 @@ import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
|
10
10
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
11
11
|
import { unstable_composeClasses } from "@mui/base";
|
|
12
12
|
import { T as Typography } from "../../mui_extended/Typography/index.379dd374.js";
|
|
13
|
-
import { B as Button } from "../../mui_extended/Button/index.
|
|
13
|
+
import { B as Button } from "../../mui_extended/Button/index.158a9a65.js";
|
|
14
14
|
import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
|
|
15
15
|
const UploadImageRoot = styled("div")(({
|
|
16
16
|
theme
|
|
@@ -140,7 +140,7 @@ function UploadImage({
|
|
|
140
140
|
} : {},
|
|
141
141
|
children: /* @__PURE__ */ jsx(Image, {
|
|
142
142
|
alt: "bgImageUploadImage",
|
|
143
|
-
src:
|
|
143
|
+
src: require$$0(file) ? file : file.preview || "",
|
|
144
144
|
ratio: "1:1"
|
|
145
145
|
})
|
|
146
146
|
}), /* @__PURE__ */ jsx("div", {
|
|
@@ -3,6 +3,7 @@ export { getRHFAutocompleteComponentsDictionary } from './RHFAutocomplete/dictio
|
|
|
3
3
|
export { RHFAutocompleteAsync } from './RHFAutocompleteAsync/RHFAutocompleteAsync';
|
|
4
4
|
export { getRHFAutocompleteAsyncComponentsDictionary } from './RHFAutocompleteAsync/dictionary';
|
|
5
5
|
export * from './RHFCheckbox/RHFCheckbox';
|
|
6
|
+
export { RHFColorPicker } from './RHFColorPicker';
|
|
6
7
|
export { RHFDateTime } from './RHFDateTime';
|
|
7
8
|
export { RHFMultiCheckbox } from './RHFMultiCheckbox';
|
|
8
9
|
export { RHFSelect } from './RHFSelect';
|
package/components/index.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export * from './ResizeableWindow';
|
|
|
40
40
|
export * from './ScrollBar';
|
|
41
41
|
export { ScrollToTop } from './ScrollToTop';
|
|
42
42
|
export * from './SplitLayout/SplitLayout';
|
|
43
|
+
export * from './ToastContainer';
|
|
43
44
|
export * from './SideBar';
|
|
44
45
|
export * from './AppBar';
|
|
45
46
|
export * from './AccountPopover';
|
|
@@ -2,9 +2,9 @@ import { m as modalUtilityClasses } from "./index.61389369.js";
|
|
|
2
2
|
import { useEnvironment } from "@m4l/core";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
5
|
-
import { I as IconButton } from "../mui_extended/IconButton/index.
|
|
6
|
-
import { I as Icon } from "../Icon/index.
|
|
7
|
-
import { u as useModal } from "../../hooks/useModal/index.
|
|
5
|
+
import { I as IconButton } from "../mui_extended/IconButton/index.3c568901.js";
|
|
6
|
+
import { I as Icon } from "../Icon/index.4e424a81.js";
|
|
7
|
+
import { u as useModal } from "../../hooks/useModal/index.abdc0962.js";
|
|
8
8
|
const Header = (props) => {
|
|
9
9
|
const {
|
|
10
10
|
title,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { A as Actions } from "../CommonActions/components/Actions/index.
|
|
1
|
+
import { A as Actions } from "../CommonActions/components/Actions/index.2f6286eb.js";
|
|
2
2
|
import { Typography } from "@mui/material";
|
|
3
3
|
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
4
|
-
import { u as useModal } from "../../hooks/useModal/index.
|
|
4
|
+
import { u as useModal } from "../../hooks/useModal/index.abdc0962.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { I as Image } from "../Image/index.
|
|
6
|
+
import { I as Image } from "../Image/index.8b134b95.js";
|
|
7
7
|
import { m as modalUtilityClasses } from "./index.61389369.js";
|
|
8
|
-
import { W as WindowBase } from "./WindowBase.
|
|
9
|
-
import { A as ActionCancel } from "../CommonActions/components/ActionCancel/index.
|
|
10
|
-
import { A as ActionIntro } from "../CommonActions/components/ActionIntro/index.
|
|
8
|
+
import { W as WindowBase } from "./WindowBase.b1f12376.js";
|
|
9
|
+
import { A as ActionCancel } from "../CommonActions/components/ActionCancel/index.918fe98b.js";
|
|
10
|
+
import { A as ActionIntro } from "../CommonActions/components/ActionIntro/index.ee716861.js";
|
|
11
11
|
const dictionary = {
|
|
12
12
|
MESSAGE: "common_actions.confirm_quit_msg"
|
|
13
13
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { generateUtilityClasses, generateUtilityClass, styled, Accordion as Accordion$1, AccordionSummary, AccordionDetails } from "@mui/material";
|
|
2
|
-
import { I as IconButton } from "../IconButton/index.
|
|
2
|
+
import { I as IconButton } from "../IconButton/index.3c568901.js";
|
|
3
3
|
import { useEnvironment } from "@m4l/core";
|
|
4
4
|
import { unstable_composeClasses } from "@mui/base";
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
7
|
-
import { g as getNameDataTestId } from "../../../vendor.
|
|
7
|
+
import { g as getNameDataTestId } from "../../../vendor.c4bc5f4d.js";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { I as Icon } from "../../Icon/index.
|
|
9
|
+
import { I as Icon } from "../../Icon/index.4e424a81.js";
|
|
10
10
|
import { T as Typography } from "../Typography/index.379dd374.js";
|
|
11
11
|
const componentName = "M4LAccordion";
|
|
12
12
|
generateUtilityClasses(componentName, [
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useUtilityClasses } from ".";
|
|
1
2
|
export interface ButtonClassesType {
|
|
2
3
|
root: string;
|
|
3
4
|
skeleton: string;
|
|
@@ -12,3 +13,4 @@ export interface ButtonClassesType {
|
|
|
12
13
|
colorWarning: string;
|
|
13
14
|
}
|
|
14
15
|
export declare type ButtonClassesKey = keyof ButtonClassesType;
|
|
16
|
+
export declare type Classes = ReturnType<typeof useUtilityClasses>;
|
|
@@ -5,7 +5,7 @@ import { unstable_composeClasses } from "@mui/base";
|
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { useMemo } from "react";
|
|
8
|
-
import { I as Image } from "../../Image/index.
|
|
8
|
+
import { I as Image } from "../../Image/index.8b134b95.js";
|
|
9
9
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
10
10
|
import { LoadingButton as LoadingButton$1 } from "@mui/lab";
|
|
11
11
|
import { T as Typography } from "../Typography/index.379dd374.js";
|
|
@@ -144,7 +144,7 @@ function ImageButton({
|
|
|
144
144
|
}) : imageButton
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
|
-
const componentName = "
|
|
147
|
+
const componentName = "M4LLoadingButton";
|
|
148
148
|
generateUtilityClasses(componentName, [
|
|
149
149
|
"root",
|
|
150
150
|
"skeleton",
|
|
@@ -169,7 +169,7 @@ const useUtilityClasses = (onwerState) => {
|
|
|
169
169
|
};
|
|
170
170
|
};
|
|
171
171
|
const LoadingButtonRoot = styled("div")(({ theme }) => ({
|
|
172
|
-
...theme.components?.
|
|
172
|
+
...theme.components?.M4LLoadingButton?.styleOverrides
|
|
173
173
|
}));
|
|
174
174
|
const LOADINGBUTTON_PREFIX = "M4LoadingButton";
|
|
175
175
|
const getNameDataTestId = (KEY) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useMemo, useState } from "react";
|
|
2
2
|
import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
3
3
|
import { Skeleton, styled, generateUtilityClasses, generateUtilityClass, Tooltip, IconButton as IconButton$1 } from "@mui/material";
|
|
4
|
-
import { I as Icon } from "../../Icon/index.
|
|
4
|
+
import { I as Icon } from "../../Icon/index.4e424a81.js";
|
|
5
5
|
import { jsx, Fragment } from "react/jsx-runtime";
|
|
6
6
|
import { unstable_composeClasses } from "@mui/base";
|
|
7
7
|
import clsx from "clsx";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const componentName = "
|
|
1
|
+
export declare const componentName = "M4LLoadingButton";
|
|
@@ -3,12 +3,12 @@ import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
|
3
3
|
import { IconButton, generateUtilityClasses, generateUtilityClass, useTheme, MenuItem } from "@mui/material";
|
|
4
4
|
import { P as Popover } from "../Popover/index.b3eca6b1.js";
|
|
5
5
|
import { styled } from "@mui/material/styles";
|
|
6
|
-
import { I as Icon } from "../../Icon/index.
|
|
6
|
+
import { I as Icon } from "../../Icon/index.4e424a81.js";
|
|
7
7
|
import clsx from "clsx";
|
|
8
8
|
import { unstable_composeClasses } from "@mui/base";
|
|
9
9
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
10
10
|
import { B as Badge } from "../Badge/index.09f5aee5.js";
|
|
11
|
-
import { I as IconButton$1 } from "../IconButton/index.
|
|
11
|
+
import { I as IconButton$1 } from "../IconButton/index.3c568901.js";
|
|
12
12
|
styled(IconButton)(() => ({}));
|
|
13
13
|
const LabelMemuItem = styled("div")(({
|
|
14
14
|
theme
|
|
@@ -2,7 +2,7 @@ import { useMemo } from "react";
|
|
|
2
2
|
import { styled } from "@mui/material/styles";
|
|
3
3
|
import { generateUtilityClasses, generateUtilityClass, useTheme, Select, InputBase, MenuItem } from "@mui/material";
|
|
4
4
|
import { unstable_composeClasses } from "@mui/base";
|
|
5
|
-
import { I as IconButton } from "../IconButton/index.
|
|
5
|
+
import { I as IconButton } from "../IconButton/index.3c568901.js";
|
|
6
6
|
import { useEnvironment } from "@m4l/core";
|
|
7
7
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
8
8
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
@@ -5,7 +5,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
5
5
|
import { useModuleSkeleton } from "@m4l/core";
|
|
6
6
|
import { styled as styled$1 } from "@mui/material/styles";
|
|
7
7
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
8
|
-
import { g as getNameDataTestId } from "../../../vendor.
|
|
8
|
+
import { g as getNameDataTestId } from "../../../vendor.c4bc5f4d.js";
|
|
9
9
|
const componentName$2 = "M4LTabs";
|
|
10
10
|
generateUtilityClasses(componentName$2, [
|
|
11
11
|
"root"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createContext, useState } from "react";
|
|
2
|
-
import { M as ModalDialog } from "../../components/ModalDialog/index.
|
|
2
|
+
import { M as ModalDialog } from "../../components/ModalDialog/index.89e26413.js";
|
|
3
3
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
4
4
|
const ModalContext = createContext(null);
|
|
5
5
|
function ModalProvider({
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { useNetwork, useFlags, useModuleDictionary } from "@m4l/core";
|
|
2
2
|
import { useState, useEffect } from "react";
|
|
3
|
-
import { u as useModal } from "../useModal/index.
|
|
3
|
+
import { u as useModal } from "../useModal/index.abdc0962.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import { W as WindowConfirm } from "../../components/modal/WindowConfirm.
|
|
5
|
+
import { W as WindowConfirm } from "../../components/modal/WindowConfirm.481ef7a0.js";
|
|
6
6
|
const useFormAddEdit = (props) => {
|
|
7
7
|
const {
|
|
8
8
|
initialValues,
|
|
9
9
|
objectId,
|
|
10
10
|
endPoint,
|
|
11
|
-
formatDataEnpoint
|
|
11
|
+
formatDataEnpoint,
|
|
12
|
+
queryParamas
|
|
12
13
|
} = props;
|
|
13
14
|
const {
|
|
14
15
|
openModal
|
|
@@ -36,7 +37,7 @@ const useFormAddEdit = (props) => {
|
|
|
36
37
|
if (statusLoad === "edit") {
|
|
37
38
|
networkOperation({
|
|
38
39
|
method: "GET",
|
|
39
|
-
endPoint: `${endPoint}/${objectId}`
|
|
40
|
+
endPoint: queryParamas ? `${endPoint}/${objectId}?${queryParamas}` : `${endPoint}/${objectId}`
|
|
40
41
|
}).then((response) => {
|
|
41
42
|
if (mounted) {
|
|
42
43
|
if (formatDataEnpoint) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useContext } from "react";
|
|
2
|
-
import { M as ModalContext } from "../../contexts/ModalContext/index.
|
|
2
|
+
import { M as ModalContext } from "../../contexts/ModalContext/index.b39d303d.js";
|
|
3
3
|
function useModal() {
|
|
4
4
|
const context = useContext(ModalContext);
|
|
5
5
|
if (!context)
|