@m4l/components 0.1.27 → 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.
Files changed (93) hide show
  1. package/assets/Logo/index.228dcb5a.js +42 -35
  2. package/commonjs.565e6834.js +5 -5
  3. package/components/CommonActions/components/ActionCancel/index.e498eeb2.js +17 -0
  4. package/components/CommonActions/components/ActionFormCancel/index.4ff0ad73.js +64 -0
  5. package/components/CommonActions/components/ActionFormIntro/index.ca4d2674.js +28 -22
  6. package/components/CommonActions/components/ActionIntro/index.60ef7bd7.js +18 -0
  7. package/components/CommonActions/components/Actions/index.0645e30f.js +867 -0
  8. package/components/DataGrid/index.76d8fd25.js +1075 -0
  9. package/components/DynamicFilter/index.342ba5fe.js +1577 -0
  10. package/components/ErrorLabel/index.c8615f16.js +13 -12
  11. package/components/Icon/index.619c31c4.js +65 -53
  12. package/components/Image/index.93d5f37f.js +190 -0
  13. package/components/Loadable/index.f5518558.js +8 -8
  14. package/components/ModalDialog/index.9ea10764.js +184 -0
  15. package/components/NoItemSelected/{index.9609a7f7.js → index.46d2f632.js} +52 -41
  16. package/components/ObjectLogs/index.f941fb79.js +288 -0
  17. package/components/Page/index.4237c241.js +22 -20
  18. package/components/PaperForm/index.ec9cb8c9.js +66 -59
  19. package/components/Period/index.2941fbda.js +249 -0
  20. package/components/PropertyValue/index.dfcfe1ba.js +95 -65
  21. package/components/Resizeable/index.45995d2b.js +19 -19
  22. package/components/ScrollBar/index.39eeb2de.js +26 -21
  23. package/components/ScrollToTop/index.e06f98f6.js +8 -7
  24. package/components/SplitLayout/index.4032673d.js +35 -33
  25. package/components/animate/LoadingScreen/index.1d0c4307.js +33 -33
  26. package/components/animate/MotionContainer/index.8d9f9d80.js +25 -22
  27. package/components/animate/MotionLazyContainer/index.572dd012.js +10 -10
  28. package/components/animate/features.0fbf41e1.js +3 -3
  29. package/components/animate/variants/bounce.784aaaaa.js +16 -13
  30. package/components/animate/variants/container.11f82b76.js +8 -6
  31. package/components/animate/variants/fade.b561c0fc.js +32 -28
  32. package/components/animate/variants/transition.bd46b9ce.js +17 -12
  33. package/components/formatters/BooleanFormatter/index.8da35c9c.js +46 -33
  34. package/components/formatters/DateFormatter/index.1b9baacc.js +49 -37
  35. package/components/formatters/index.689a8086.js +119 -0
  36. package/components/hook-form/RHFAutocomplete/index.59a68f9f.js +224 -0
  37. package/components/hook-form/RHFAutocompleteAsync/index.c3083062.js +87 -0
  38. package/components/hook-form/RHFCheckbox/index.6dcec9e2.js +49 -39
  39. package/components/hook-form/RHFDateTime/index.9231a7c7.js +69 -56
  40. package/components/hook-form/RHFMultiCheckbox/index.2680b3b6.js +23 -23
  41. package/components/hook-form/RHFPeriod/index.64a228d5.js +55 -0
  42. package/components/hook-form/RHFRadioGroup/index.b3335e13.js +29 -29
  43. package/components/hook-form/RHFSelect/index.b6ca8bb2.js +24 -24
  44. package/components/hook-form/RHFTextField/index.f9aaaa90.js +110 -93
  45. package/components/hook-form/RHFUpload/{index.ec4d5326.js → index.d5cc7c13.js} +151 -130
  46. package/components/mui_extended/Accordion/index.a02ac6ae.js +73 -69
  47. package/components/mui_extended/Avatar/index.fe06afd7.js +44 -34
  48. package/components/mui_extended/BoxIcon/index.e638ecc8.js +10 -10
  49. package/components/mui_extended/Breadcrumbs/index.5e37d903.js +49 -44
  50. package/components/mui_extended/Button/index.53b56958.js +178 -0
  51. package/components/mui_extended/CircularProgress/index.ad569afd.js +8 -6
  52. package/components/mui_extended/IconButton/index.a321e5cb.js +82 -67
  53. package/components/mui_extended/LinkWithRoute/index.16436ab8.js +25 -21
  54. package/components/mui_extended/Pager/index.c0865b70.js +141 -0
  55. package/components/mui_extended/Popover/index.705275a4.js +278 -0
  56. package/components/mui_extended/Tab/index.e0653a0a.js +25 -21
  57. package/components/mui_extended/Typography/index.e5494696.js +25 -21
  58. package/contexts/ModalContext/index.b92fa565.js +153 -0
  59. package/contexts/ModalContext/{components → subcomponents}/ContentConfirm/index.d.ts +0 -0
  60. package/contexts/ModalContext/{components → subcomponents}/ContentConfirm/styles.d.ts +0 -0
  61. package/contexts/ModalContext/{components → subcomponents}/ContentConfirm/types.d.ts +0 -0
  62. package/contexts/RHFormContext/index.b142190a.js +63 -0
  63. package/hooks/useFormAddEdit/index.d4845f1a.js +40 -22
  64. package/hooks/useModal/index.5fee01a3.js +11 -0
  65. package/index.js +153 -153
  66. package/package.json +2 -1
  67. package/react-data-grid.d46d625e.js +2206 -1663
  68. package/react-draggable.20e95c61.js +800 -553
  69. package/react-json-view.f56a7f8e.js +2344 -2340
  70. package/react-resizable.5277deaf.js +470 -298
  71. package/react-splitter-layout.7810ac1b.js +130 -128
  72. package/utils/index.214d9542.js +500 -354
  73. package/components/CommonActions/components/ActionCancel/index.431160ba.js +0 -17
  74. package/components/CommonActions/components/ActionFormCancel/index.6a0f34aa.js +0 -49
  75. package/components/CommonActions/components/ActionIntro/index.85557b90.js +0 -18
  76. package/components/CommonActions/components/Actions/index.edeb05c2.js +0 -742
  77. package/components/DataGrid/index.2ce9da7d.js +0 -894
  78. package/components/DynamicFilter/index.e1d4a948.js +0 -1157
  79. package/components/Image/index.c9da2d5a.js +0 -152
  80. package/components/ModalDialog/index.ad61757f.js +0 -168
  81. package/components/ObjectLogs/index.6ebaec71.js +0 -266
  82. package/components/Period/index.81de7941.js +0 -175
  83. package/components/contexts/RHFormContext/index.33dba822.js +0 -56
  84. package/components/formatters/index.c2a9b55d.js +0 -106
  85. package/components/hook-form/RHFAutocomplete/index.5eee9d7c.js +0 -174
  86. package/components/hook-form/RHFAutocompleteAsync/index.757b5080.js +0 -65
  87. package/components/hook-form/RHFPeriod/index.e08fb1ab.js +0 -51
  88. package/components/mui_extended/Button/index.51dae0bb.js +0 -144
  89. package/components/mui_extended/Pager/index.1dc45f5e.js +0 -126
  90. package/components/mui_extended/Popover/index.cb2ccc66.js +0 -252
  91. package/contexts/ModalContext/index.9ebc793c.js +0 -136
  92. package/hooks/useModal/index.34f5978e.js +0 -11
  93. package/node_modules.168cb897.js +0 -55
@@ -1,86 +1,93 @@
1
- import { Link as d } from "react-router-dom";
2
- import { useTheme as f } from "@mui/material/styles";
3
- import { Box as h } from "@mui/material";
4
- import { jsx as o, jsxs as t, Fragment as a } from "react/jsx-runtime";
5
- function G({
6
- disabledLink: s = !1,
7
- sx: n
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 e = f(), i = e.palette.primary.light, r = e.palette.primary.main, p = e.palette.primary.dark, l = /* @__PURE__ */ o(h, {
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
- ...n
17
+ ...sx
14
18
  },
15
- children: /* @__PURE__ */ t("svg", {
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__ */ t("defs", {
21
- children: [/* @__PURE__ */ t("linearGradient", {
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__ */ o("stop", {
31
+ children: [/* @__PURE__ */ jsx("stop", {
28
32
  offset: "0%",
29
- stopColor: p
30
- }), /* @__PURE__ */ o("stop", {
33
+ stopColor: PRIMARY_DARK
34
+ }), /* @__PURE__ */ jsx("stop", {
31
35
  offset: "100%",
32
- stopColor: r
36
+ stopColor: PRIMARY_MAIN
33
37
  })]
34
- }), /* @__PURE__ */ t("linearGradient", {
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__ */ o("stop", {
44
+ children: [/* @__PURE__ */ jsx("stop", {
41
45
  offset: "0%",
42
- stopColor: i
43
- }), /* @__PURE__ */ o("stop", {
46
+ stopColor: PRIMARY_LIGHT
47
+ }), /* @__PURE__ */ jsx("stop", {
44
48
  offset: "100%",
45
- stopColor: r
49
+ stopColor: PRIMARY_MAIN
46
50
  })]
47
- }), /* @__PURE__ */ t("linearGradient", {
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__ */ o("stop", {
57
+ children: [/* @__PURE__ */ jsx("stop", {
54
58
  offset: "0%",
55
- stopColor: i
56
- }), /* @__PURE__ */ o("stop", {
59
+ stopColor: PRIMARY_LIGHT
60
+ }), /* @__PURE__ */ jsx("stop", {
57
61
  offset: "100%",
58
- stopColor: r
62
+ stopColor: PRIMARY_MAIN
59
63
  })]
60
64
  })]
61
- }), /* @__PURE__ */ t("g", {
65
+ }), /* @__PURE__ */ jsxs("g", {
62
66
  fillRule: "evenodd",
63
67
  clipRule: "evenodd",
64
- children: [/* @__PURE__ */ o("path", {
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__ */ o("path", {
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__ */ o("path", {
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
- return s ? /* @__PURE__ */ o(a, {
78
- children: l
79
- }) : /* @__PURE__ */ o(d, {
81
+ if (disabledLink) {
82
+ return /* @__PURE__ */ jsx(Fragment, {
83
+ children: logo
84
+ });
85
+ }
86
+ return /* @__PURE__ */ jsx(Link, {
80
87
  to: "/",
81
- children: l
88
+ children: logo
82
89
  });
83
90
  }
84
91
  export {
85
- G as L
92
+ Logo as L
86
93
  };
@@ -2,11 +2,11 @@ import "react";
2
2
  import "prop-types";
3
3
  import "react-dom";
4
4
  import "clsx";
5
- var f = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
6
- function a(e) {
7
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
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
- f as c,
11
- a as g
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 as m, useFormState as s } from "react-hook-form";
2
- import { useModuleDictionary as a, useModuleSkeleton as c } from "@m4l/core";
3
- import { LoadingButton as u } from "@mui/lab";
4
- import { Skeleton as l } from "@mui/material";
5
- import { jsx as o } from "react/jsx-runtime";
6
- function h(t) {
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: n
9
- } = a(), r = c(), {
10
- control: i
11
- } = m(), {
12
- isSubmitting: e
13
- } = s({
14
- control: i
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
- return r ? /* @__PURE__ */ o(l, {
17
- variant: "text",
18
- width: 57,
19
- height: 30
20
- }) : /* @__PURE__ */ o(u, {
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: e,
25
- ...t,
26
- children: n("common_actions.intro")
30
+ loading: isSubmitting,
31
+ ...props,
32
+ children: getLabel("common_actions.intro")
27
33
  });
28
34
  }
29
35
  export {
30
- h as A
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
+ };