@m4l/components 0.1.26 → 0.1.28
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/assets/Logo/index.228dcb5a.js +42 -35
- package/commonjs.565e6834.js +5 -5
- package/components/CommonActions/components/ActionCancel/index.e498eeb2.js +17 -0
- package/components/CommonActions/components/ActionFormCancel/index.4ff0ad73.js +64 -0
- package/components/CommonActions/components/ActionFormIntro/index.ca4d2674.js +28 -22
- package/components/CommonActions/components/ActionIntro/index.60ef7bd7.js +18 -0
- package/components/CommonActions/components/Actions/index.0645e30f.js +867 -0
- package/components/DataGrid/index.76d8fd25.js +1075 -0
- package/components/DynamicFilter/index.342ba5fe.js +1577 -0
- package/components/ErrorLabel/index.c8615f16.js +13 -12
- package/components/Icon/index.619c31c4.js +96 -0
- package/components/Icon/types.d.ts +2 -1
- package/components/Image/index.93d5f37f.js +190 -0
- package/components/Loadable/index.f5518558.js +8 -8
- package/components/ModalDialog/index.9ea10764.js +184 -0
- package/components/NoItemSelected/{index.9609a7f7.js → index.46d2f632.js} +52 -41
- package/components/ObjectLogs/index.f941fb79.js +288 -0
- package/components/Page/index.4237c241.js +22 -20
- package/components/PaperForm/index.ec9cb8c9.js +112 -0
- package/components/Period/index.2941fbda.js +249 -0
- package/components/PropertyValue/index.dfcfe1ba.js +147 -0
- package/components/PropertyValue/styles.d.ts +2 -1
- package/components/PropertyValue/types.d.ts +3 -3
- package/components/Resizeable/index.45995d2b.js +19 -19
- package/components/ScrollBar/index.39eeb2de.js +26 -21
- package/components/ScrollToTop/index.e06f98f6.js +8 -7
- package/components/SplitLayout/index.4032673d.js +35 -33
- package/components/animate/LoadingScreen/index.1d0c4307.js +33 -33
- package/components/animate/MotionContainer/index.8d9f9d80.js +25 -22
- package/components/animate/MotionLazyContainer/index.572dd012.js +10 -10
- package/components/animate/features.0fbf41e1.js +3 -3
- package/components/animate/variants/bounce.784aaaaa.js +16 -13
- package/components/animate/variants/container.11f82b76.js +8 -6
- package/components/animate/variants/fade.b561c0fc.js +32 -28
- package/components/animate/variants/transition.bd46b9ce.js +17 -12
- package/components/formatters/BooleanFormatter/index.8da35c9c.js +55 -0
- package/components/formatters/DateFormatter/index.1b9baacc.js +69 -0
- package/components/formatters/index.689a8086.js +119 -0
- package/components/hook-form/RHFAutocomplete/index.59a68f9f.js +224 -0
- package/components/hook-form/RHFAutocompleteAsync/index.c3083062.js +87 -0
- package/components/hook-form/RHFCheckbox/index.6dcec9e2.js +49 -39
- package/components/hook-form/RHFDateTime/index.9231a7c7.js +69 -56
- package/components/hook-form/RHFMultiCheckbox/index.2680b3b6.js +23 -23
- package/components/hook-form/RHFPeriod/index.64a228d5.js +55 -0
- package/components/hook-form/RHFRadioGroup/index.b3335e13.js +29 -29
- package/components/hook-form/RHFSelect/index.b6ca8bb2.js +24 -24
- package/components/hook-form/RHFTextField/index.f9aaaa90.js +146 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/{components → subcomponents}/UploadImage/index.d.ts +0 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/{components → subcomponents}/UploadImage/styles.d.ts +4 -3
- package/components/hook-form/RHFUpload/RHFUploadImage/{components → subcomponents}/UploadImage/subcomponents/Skeleton/index.d.ts +0 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/{components → subcomponents}/UploadImage/subcomponents/Skeleton/styles.d.ts +0 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/{components → subcomponents}/UploadImage/types.d.ts +0 -0
- package/components/hook-form/RHFUpload/index.d5cc7c13.js +285 -0
- package/components/mui_extended/Accordion/index.a02ac6ae.js +107 -0
- package/components/mui_extended/Avatar/index.fe06afd7.js +51 -0
- package/components/mui_extended/BoxIcon/index.e638ecc8.js +10 -10
- package/components/mui_extended/Breadcrumbs/index.5e37d903.js +49 -44
- package/components/mui_extended/Button/index.53b56958.js +178 -0
- package/components/mui_extended/CircularProgress/index.ad569afd.js +8 -6
- package/components/mui_extended/IconButton/index.a321e5cb.js +120 -0
- package/components/mui_extended/IconButton/index.d.ts +1 -1
- package/components/mui_extended/LinkWithRoute/index.16436ab8.js +25 -21
- package/components/mui_extended/Pager/index.c0865b70.js +141 -0
- package/components/mui_extended/Popover/index.705275a4.js +278 -0
- package/components/mui_extended/Tab/index.e0653a0a.js +25 -21
- package/components/mui_extended/Typography/index.e5494696.js +25 -21
- package/contexts/ModalContext/index.b92fa565.js +153 -0
- package/contexts/ModalContext/{components → subcomponents}/ContentConfirm/index.d.ts +0 -0
- package/contexts/ModalContext/{components → subcomponents}/ContentConfirm/styles.d.ts +0 -0
- package/contexts/ModalContext/{components → subcomponents}/ContentConfirm/types.d.ts +0 -0
- package/contexts/RHFormContext/index.b142190a.js +63 -0
- package/hooks/useFormAddEdit/index.d4845f1a.js +40 -22
- package/hooks/useModal/index.5fee01a3.js +11 -0
- package/index.js +153 -153
- package/package.json +2 -1
- package/react-data-grid.d46d625e.js +2206 -1663
- package/react-draggable.20e95c61.js +800 -553
- package/react-json-view.f56a7f8e.js +2344 -2340
- package/react-resizable.5277deaf.js +470 -298
- package/react-splitter-layout.7810ac1b.js +130 -128
- package/utils/index.214d9542.js +500 -354
- package/components/CommonActions/components/ActionCancel/index.6736b782.js +0 -17
- package/components/CommonActions/components/ActionFormCancel/index.281ee166.js +0 -49
- package/components/CommonActions/components/ActionIntro/index.4665a611.js +0 -18
- package/components/CommonActions/components/Actions/index.cd7b2671.js +0 -742
- package/components/DataGrid/index.2caf6231.js +0 -894
- package/components/DynamicFilter/index.f2377369.js +0 -1157
- package/components/Icon/index.f569765b.js +0 -82
- package/components/Image/index.c9da2d5a.js +0 -152
- package/components/ModalDialog/index.bee344a5.js +0 -168
- package/components/ObjectLogs/index.6b6f95e6.js +0 -266
- package/components/PaperForm/index.3f8c7ef2.js +0 -105
- package/components/Period/index.a112ce37.js +0 -175
- package/components/PropertyValue/index.ab3dd7e9.js +0 -116
- package/components/contexts/RHFormContext/index.33dba822.js +0 -56
- package/components/formatters/BooleanFormatter/index.3ec56305.js +0 -42
- package/components/formatters/DateFormatter/index.08d8823b.js +0 -57
- package/components/formatters/index.6959c2de.js +0 -106
- package/components/hook-form/RHFAutocomplete/index.5eee9d7c.js +0 -174
- package/components/hook-form/RHFAutocompleteAsync/index.757b5080.js +0 -65
- package/components/hook-form/RHFPeriod/index.979d0898.js +0 -51
- package/components/hook-form/RHFTextField/index.ba2a8f67.js +0 -129
- package/components/hook-form/RHFUpload/index.6347159a.js +0 -258
- package/components/mui_extended/Accordion/index.49f5df8e.js +0 -103
- package/components/mui_extended/Avatar/index.dadb0528.js +0 -37
- package/components/mui_extended/Button/index.52d18aea.js +0 -144
- package/components/mui_extended/IconButton/index.4b5ce8b5.js +0 -103
- package/components/mui_extended/Pager/index.951b6975.js +0 -126
- package/components/mui_extended/Popover/index.4da8587a.js +0 -252
- package/contexts/ModalContext/index.5388dfd5.js +0 -136
- package/hooks/useModal/index.3b1ff084.js +0 -11
- package/node_modules.168cb897.js +0 -55
|
@@ -1,86 +1,93 @@
|
|
|
1
|
-
import { Link
|
|
2
|
-
import { useTheme
|
|
3
|
-
import { Box
|
|
4
|
-
import { jsx
|
|
5
|
-
function
|
|
6
|
-
disabledLink
|
|
7
|
-
sx
|
|
1
|
+
import { Link } from "react-router-dom";
|
|
2
|
+
import { useTheme } from "@mui/material/styles";
|
|
3
|
+
import { Box } from "@mui/material";
|
|
4
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
5
|
+
function Logo({
|
|
6
|
+
disabledLink = false,
|
|
7
|
+
sx
|
|
8
8
|
}) {
|
|
9
|
-
const
|
|
9
|
+
const theme = useTheme();
|
|
10
|
+
const PRIMARY_LIGHT = theme.palette.primary.light;
|
|
11
|
+
const PRIMARY_MAIN = theme.palette.primary.main;
|
|
12
|
+
const PRIMARY_DARK = theme.palette.primary.dark;
|
|
13
|
+
const logo = /* @__PURE__ */ jsx(Box, {
|
|
10
14
|
sx: {
|
|
11
15
|
width: 40,
|
|
12
16
|
height: 40,
|
|
13
|
-
...
|
|
17
|
+
...sx
|
|
14
18
|
},
|
|
15
|
-
children: /* @__PURE__ */
|
|
19
|
+
children: /* @__PURE__ */ jsxs("svg", {
|
|
16
20
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17
21
|
width: "100%",
|
|
18
22
|
height: "100%",
|
|
19
23
|
viewBox: "0 0 512 512",
|
|
20
|
-
children: [/* @__PURE__ */
|
|
21
|
-
children: [/* @__PURE__ */
|
|
24
|
+
children: [/* @__PURE__ */ jsxs("defs", {
|
|
25
|
+
children: [/* @__PURE__ */ jsxs("linearGradient", {
|
|
22
26
|
id: "BG1",
|
|
23
27
|
x1: "100%",
|
|
24
28
|
x2: "50%",
|
|
25
29
|
y1: "9.946%",
|
|
26
30
|
y2: "50%",
|
|
27
|
-
children: [/* @__PURE__ */
|
|
31
|
+
children: [/* @__PURE__ */ jsx("stop", {
|
|
28
32
|
offset: "0%",
|
|
29
|
-
stopColor:
|
|
30
|
-
}), /* @__PURE__ */
|
|
33
|
+
stopColor: PRIMARY_DARK
|
|
34
|
+
}), /* @__PURE__ */ jsx("stop", {
|
|
31
35
|
offset: "100%",
|
|
32
|
-
stopColor:
|
|
36
|
+
stopColor: PRIMARY_MAIN
|
|
33
37
|
})]
|
|
34
|
-
}), /* @__PURE__ */
|
|
38
|
+
}), /* @__PURE__ */ jsxs("linearGradient", {
|
|
35
39
|
id: "BG2",
|
|
36
40
|
x1: "50%",
|
|
37
41
|
x2: "50%",
|
|
38
42
|
y1: "0%",
|
|
39
43
|
y2: "100%",
|
|
40
|
-
children: [/* @__PURE__ */
|
|
44
|
+
children: [/* @__PURE__ */ jsx("stop", {
|
|
41
45
|
offset: "0%",
|
|
42
|
-
stopColor:
|
|
43
|
-
}), /* @__PURE__ */
|
|
46
|
+
stopColor: PRIMARY_LIGHT
|
|
47
|
+
}), /* @__PURE__ */ jsx("stop", {
|
|
44
48
|
offset: "100%",
|
|
45
|
-
stopColor:
|
|
49
|
+
stopColor: PRIMARY_MAIN
|
|
46
50
|
})]
|
|
47
|
-
}), /* @__PURE__ */
|
|
51
|
+
}), /* @__PURE__ */ jsxs("linearGradient", {
|
|
48
52
|
id: "BG3",
|
|
49
53
|
x1: "50%",
|
|
50
54
|
x2: "50%",
|
|
51
55
|
y1: "0%",
|
|
52
56
|
y2: "100%",
|
|
53
|
-
children: [/* @__PURE__ */
|
|
57
|
+
children: [/* @__PURE__ */ jsx("stop", {
|
|
54
58
|
offset: "0%",
|
|
55
|
-
stopColor:
|
|
56
|
-
}), /* @__PURE__ */
|
|
59
|
+
stopColor: PRIMARY_LIGHT
|
|
60
|
+
}), /* @__PURE__ */ jsx("stop", {
|
|
57
61
|
offset: "100%",
|
|
58
|
-
stopColor:
|
|
62
|
+
stopColor: PRIMARY_MAIN
|
|
59
63
|
})]
|
|
60
64
|
})]
|
|
61
|
-
}), /* @__PURE__ */
|
|
65
|
+
}), /* @__PURE__ */ jsxs("g", {
|
|
62
66
|
fillRule: "evenodd",
|
|
63
67
|
clipRule: "evenodd",
|
|
64
|
-
children: [/* @__PURE__ */
|
|
68
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
65
69
|
fill: "url(#BG1)",
|
|
66
70
|
d: "m1.9 136.9 208.3 120.3v240.5L1.9 377.5z"
|
|
67
|
-
}), /* @__PURE__ */
|
|
71
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
68
72
|
fill: "url(#BG2)",
|
|
69
73
|
d: "m226.8 257.2 208.5-120.3v240.6L226.8 497.8z"
|
|
70
|
-
}), /* @__PURE__ */
|
|
74
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
71
75
|
fill: "url(#BG3)",
|
|
72
76
|
d: "M218.6 242.8 10.2 122.5 218.6 2.2 427 122.5z"
|
|
73
77
|
})]
|
|
74
78
|
})]
|
|
75
79
|
})
|
|
76
80
|
});
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
81
|
+
if (disabledLink) {
|
|
82
|
+
return /* @__PURE__ */ jsx(Fragment, {
|
|
83
|
+
children: logo
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
return /* @__PURE__ */ jsx(Link, {
|
|
80
87
|
to: "/",
|
|
81
|
-
children:
|
|
88
|
+
children: logo
|
|
82
89
|
});
|
|
83
90
|
}
|
|
84
91
|
export {
|
|
85
|
-
|
|
92
|
+
Logo as L
|
|
86
93
|
};
|
package/commonjs.565e6834.js
CHANGED
|
@@ -2,11 +2,11 @@ import "react";
|
|
|
2
2
|
import "prop-types";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
import "clsx";
|
|
5
|
-
var
|
|
6
|
-
function
|
|
7
|
-
return
|
|
5
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
6
|
+
function getDefaultExportFromCjs(x) {
|
|
7
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
commonjsGlobal as c,
|
|
11
|
+
getDefaultExportFromCjs as g
|
|
12
12
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useModuleDictionary } from "@m4l/core";
|
|
2
|
+
import { B as Button } from "../../../mui_extended/Button/index.53b56958.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
const ActionCancel = (props) => {
|
|
5
|
+
const {
|
|
6
|
+
getLabel
|
|
7
|
+
} = useModuleDictionary();
|
|
8
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
9
|
+
variant: "outlined",
|
|
10
|
+
color: "inherit",
|
|
11
|
+
...props,
|
|
12
|
+
children: getLabel("common_actions.cancel")
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
ActionCancel as A
|
|
17
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { useFormContext, useFormState } from "react-hook-form";
|
|
2
|
+
import { useNavigate } from "react-router-dom";
|
|
3
|
+
import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
4
|
+
import { Skeleton } from "@mui/material";
|
|
5
|
+
import { B as Button } from "../../../mui_extended/Button/index.53b56958.js";
|
|
6
|
+
import { useCallback } from "react";
|
|
7
|
+
import { u as useModal } from "../../../../hooks/useModal/index.5fee01a3.js";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
function ActionFormCancel(props) {
|
|
10
|
+
const {
|
|
11
|
+
to,
|
|
12
|
+
navigateOptions = {
|
|
13
|
+
replace: false
|
|
14
|
+
}
|
|
15
|
+
} = props;
|
|
16
|
+
const {
|
|
17
|
+
getLabel
|
|
18
|
+
} = useModuleDictionary();
|
|
19
|
+
const isSkeleton = useModuleSkeleton();
|
|
20
|
+
const {
|
|
21
|
+
openModalConfirm
|
|
22
|
+
} = useModal();
|
|
23
|
+
const navigate = useNavigate();
|
|
24
|
+
const {
|
|
25
|
+
control
|
|
26
|
+
} = useFormContext();
|
|
27
|
+
const {
|
|
28
|
+
isDirty
|
|
29
|
+
} = useFormState({
|
|
30
|
+
control
|
|
31
|
+
});
|
|
32
|
+
const onConfirmCancel = () => {
|
|
33
|
+
navigate(to, navigateOptions);
|
|
34
|
+
};
|
|
35
|
+
const onClickCancel = useCallback(() => {
|
|
36
|
+
if (isDirty) {
|
|
37
|
+
openModalConfirm({
|
|
38
|
+
variant: "warning",
|
|
39
|
+
title: getLabel("common_actions.confirm_quit_title"),
|
|
40
|
+
msg: getLabel("common_actions.confirm_quit_msg"),
|
|
41
|
+
onClickIntro: onConfirmCancel
|
|
42
|
+
});
|
|
43
|
+
} else {
|
|
44
|
+
onConfirmCancel();
|
|
45
|
+
}
|
|
46
|
+
}, [getLabel, isDirty, onConfirmCancel, openModalConfirm]);
|
|
47
|
+
if (isSkeleton) {
|
|
48
|
+
return /* @__PURE__ */ jsx(Skeleton, {
|
|
49
|
+
variant: "text",
|
|
50
|
+
width: 57,
|
|
51
|
+
height: 30
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
55
|
+
variant: "outlined",
|
|
56
|
+
color: "inherit",
|
|
57
|
+
onClick: onClickCancel,
|
|
58
|
+
...props,
|
|
59
|
+
children: getLabel("common_actions.cancel")
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
ActionFormCancel as A
|
|
64
|
+
};
|
|
@@ -1,31 +1,37 @@
|
|
|
1
|
-
import { useFormContext
|
|
2
|
-
import { useModuleDictionary
|
|
3
|
-
import { LoadingButton
|
|
4
|
-
import { Skeleton
|
|
5
|
-
import { jsx
|
|
6
|
-
function
|
|
1
|
+
import { useFormContext, useFormState } from "react-hook-form";
|
|
2
|
+
import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
3
|
+
import { LoadingButton } from "@mui/lab";
|
|
4
|
+
import { Skeleton } from "@mui/material";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
function ActionFormIntro(props) {
|
|
7
7
|
const {
|
|
8
|
-
getLabel
|
|
9
|
-
} =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} =
|
|
14
|
-
|
|
8
|
+
getLabel
|
|
9
|
+
} = useModuleDictionary();
|
|
10
|
+
const isSkeleton = useModuleSkeleton();
|
|
11
|
+
const {
|
|
12
|
+
control
|
|
13
|
+
} = useFormContext();
|
|
14
|
+
const {
|
|
15
|
+
isSubmitting
|
|
16
|
+
} = useFormState({
|
|
17
|
+
control
|
|
15
18
|
});
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
if (isSkeleton) {
|
|
20
|
+
return /* @__PURE__ */ jsx(Skeleton, {
|
|
21
|
+
variant: "text",
|
|
22
|
+
width: 57,
|
|
23
|
+
height: 30
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return /* @__PURE__ */ jsx(LoadingButton, {
|
|
21
27
|
variant: "contained",
|
|
22
28
|
type: "submit",
|
|
23
29
|
color: "primary",
|
|
24
|
-
loading:
|
|
25
|
-
...
|
|
26
|
-
children:
|
|
30
|
+
loading: isSubmitting,
|
|
31
|
+
...props,
|
|
32
|
+
children: getLabel("common_actions.intro")
|
|
27
33
|
});
|
|
28
34
|
}
|
|
29
35
|
export {
|
|
30
|
-
|
|
36
|
+
ActionFormIntro as A
|
|
31
37
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useModuleDictionary } from "@m4l/core";
|
|
2
|
+
import { B as Button } from "../../../mui_extended/Button/index.53b56958.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
const ActionIntro = (props) => {
|
|
5
|
+
const {
|
|
6
|
+
getLabel
|
|
7
|
+
} = useModuleDictionary();
|
|
8
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
9
|
+
variant: "contained",
|
|
10
|
+
type: "submit",
|
|
11
|
+
color: "primary",
|
|
12
|
+
...props,
|
|
13
|
+
children: getLabel("common_actions.intro")
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
ActionIntro as A
|
|
18
|
+
};
|