@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,103 +1,107 @@
1
- import { Skeleton as d, Accordion as f, AccordionSummary as x, AccordionDetails as b } from "@mui/material";
2
- import { I as v } from "../IconButton/index.a321e5cb.js";
3
- import { useEnvironment as y, useModuleSkeleton as I } from "@m4l/core";
4
- import { I as S } from "../../Icon/index.619c31c4.js";
5
- import { styled as c } from "@mui/material/styles";
6
- import { jsx as t, jsxs as s } from "react/jsx-runtime";
7
- c("div")(({
8
- theme: n
1
+ import { Skeleton, Accordion as Accordion$1, AccordionSummary, AccordionDetails } from "@mui/material";
2
+ import { I as IconButton } from "../IconButton/index.a321e5cb.js";
3
+ import { useEnvironment, useModuleSkeleton } from "@m4l/core";
4
+ import { I as Icon } from "../../Icon/index.619c31c4.js";
5
+ import { styled } from "@mui/material/styles";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ styled("div")(({
8
+ theme
9
9
  }) => ({
10
10
  display: "flex",
11
11
  justifyContent: "space-between",
12
12
  alignItems: "center",
13
- borderRadius: n.spacing(0.5),
14
- height: n.spacing(4.5),
15
- minHeight: n.spacing(4.5),
16
- backgroundColor: n.palette.background.header,
17
- paddingLeft: n.spacing(2),
18
- paddingRight: n.spacing(2),
13
+ borderRadius: theme.spacing(0.5),
14
+ height: theme.spacing(4.5),
15
+ minHeight: theme.spacing(4.5),
16
+ backgroundColor: theme.palette.background.header,
17
+ paddingLeft: theme.spacing(2),
18
+ paddingRight: theme.spacing(2),
19
19
  marginBottom: "0px"
20
20
  }));
21
- const l = c("div")(({
22
- theme: n
21
+ const WrapperAccordionLabel = styled("div")(({
22
+ theme
23
23
  }) => ({
24
24
  display: "flex",
25
25
  justifyContent: "flex-start",
26
26
  alignItems: "center",
27
- gap: n.spacing(2)
28
- })), A = c("span")(({
29
- theme: n
27
+ gap: theme.spacing(2)
28
+ }));
29
+ const Label = styled("span")(({
30
+ theme
30
31
  }) => ({
31
- ...n.typography.subtitle2
32
- })), k = (n) => {
32
+ ...theme.typography.subtitle2
33
+ }));
34
+ const AccordionLabel = (props) => {
33
35
  const {
34
- isSkeleton: e,
35
- label: i,
36
- SKTWidht: r,
37
- SKTHeight: a,
38
- labelIcon: o
39
- } = n;
40
- return /* @__PURE__ */ t("div", {
41
- children: e ? /* @__PURE__ */ s(l, {
42
- children: [o && /* @__PURE__ */ t(d, {
36
+ isSkeleton,
37
+ label,
38
+ SKTWidht,
39
+ SKTHeight,
40
+ labelIcon
41
+ } = props;
42
+ return /* @__PURE__ */ jsx("div", {
43
+ children: isSkeleton ? /* @__PURE__ */ jsxs(WrapperAccordionLabel, {
44
+ children: [labelIcon && /* @__PURE__ */ jsx(Skeleton, {
43
45
  variant: "circular",
44
46
  width: "16px",
45
47
  height: "16px"
46
- }), /* @__PURE__ */ t(d, {
48
+ }), /* @__PURE__ */ jsx(Skeleton, {
47
49
  variant: "text",
48
- width: r,
49
- height: a
50
+ width: SKTWidht,
51
+ height: SKTHeight
50
52
  })]
51
- }) : /* @__PURE__ */ s(l, {
52
- children: [o && /* @__PURE__ */ t(S, {
53
- src: o
54
- }), /* @__PURE__ */ t(A, {
55
- children: i
53
+ }) : /* @__PURE__ */ jsxs(WrapperAccordionLabel, {
54
+ children: [labelIcon && /* @__PURE__ */ jsx(Icon, {
55
+ src: labelIcon
56
+ }), /* @__PURE__ */ jsx(Label, {
57
+ children: label
56
58
  })]
57
59
  })
58
60
  });
59
61
  };
60
- function E(n) {
62
+ function Accordion(props) {
63
+ const {
64
+ label,
65
+ SKTWidht,
66
+ SKTHeight,
67
+ children,
68
+ accordionProps,
69
+ summaryProps,
70
+ labelIcon
71
+ } = props;
61
72
  const {
62
- label: e,
63
- SKTWidht: i,
64
- SKTHeight: r,
65
- children: a,
66
- accordionProps: o,
67
- summaryProps: p,
68
- labelIcon: u
69
- } = n, {
70
- host_static_assets: g,
71
- environment_assets: h
72
- } = y(), m = I();
73
- return /* @__PURE__ */ s(f, {
73
+ host_static_assets,
74
+ environment_assets
75
+ } = useEnvironment();
76
+ const isSkeleton = useModuleSkeleton();
77
+ return /* @__PURE__ */ jsxs(Accordion$1, {
74
78
  variant: "outlined",
75
- square: !0,
79
+ square: true,
76
80
  TransitionProps: {
77
- unmountOnExit: !0
81
+ unmountOnExit: true
78
82
  },
79
- defaultExpanded: !0,
80
- ...o,
81
- children: [/* @__PURE__ */ t(x, {
83
+ defaultExpanded: true,
84
+ ...accordionProps,
85
+ children: [/* @__PURE__ */ jsx(AccordionSummary, {
82
86
  "aria-controls": "expanded-content",
83
- disableTouchRipple: !1,
84
- expandIcon: /* @__PURE__ */ t(v, {
87
+ disableTouchRipple: false,
88
+ expandIcon: /* @__PURE__ */ jsx(IconButton, {
85
89
  "aria-label": "settings",
86
- src: `${g}/${h}/frontend/components/accordion/assets/icons/expanded.svg`
90
+ src: `${host_static_assets}/${environment_assets}/frontend/components/accordion/assets/icons/expanded.svg`
87
91
  }),
88
- ...p,
89
- children: /* @__PURE__ */ t(k, {
90
- isSkeleton: m,
91
- label: e,
92
- SKTWidht: i,
93
- SKTHeight: r,
94
- labelIcon: u
92
+ ...summaryProps,
93
+ children: /* @__PURE__ */ jsx(AccordionLabel, {
94
+ isSkeleton,
95
+ label,
96
+ SKTWidht,
97
+ SKTHeight,
98
+ labelIcon
95
99
  })
96
- }), /* @__PURE__ */ t(b, {
97
- children: a
100
+ }), /* @__PURE__ */ jsx(AccordionDetails, {
101
+ children
98
102
  })]
99
103
  });
100
104
  }
101
105
  export {
102
- E as A
106
+ Accordion as A
103
107
  };
@@ -1,41 +1,51 @@
1
- import { forwardRef as m } from "react";
2
- import { useTheme as p } from "@mui/material/styles";
3
- import { Skeleton as u, Avatar as s } from "@mui/material";
4
- import { useModuleSkeleton as f } from "@m4l/core";
5
- import { jsx as t } from "react/jsx-runtime";
6
- const l = () => /* @__PURE__ */ t(u, {
7
- variant: "circular",
8
- width: "32px",
9
- height: "32px"
10
- }), c = m(({
11
- color: r = "default",
12
- children: o,
13
- sx: a,
14
- ...n
15
- }, i) => {
16
- const e = p();
17
- return f() ? /* @__PURE__ */ t(l, {}) : r === "default" ? /* @__PURE__ */ t(s, {
18
- ref: i,
19
- sx: {
20
- cursor: "pointer",
21
- ...a
22
- },
23
- ...n,
24
- children: o
25
- }) : /* @__PURE__ */ t(s, {
26
- ref: i,
1
+ import { forwardRef } from "react";
2
+ import { useTheme } from "@mui/material/styles";
3
+ import { Skeleton, Avatar as Avatar$1 } from "@mui/material";
4
+ import { useModuleSkeleton } from "@m4l/core";
5
+ import { jsx } from "react/jsx-runtime";
6
+ const SkeletonAvatar = () => {
7
+ return /* @__PURE__ */ jsx(Skeleton, {
8
+ variant: "circular",
9
+ width: "32px",
10
+ height: "32px"
11
+ });
12
+ };
13
+ const Avatar = forwardRef(({
14
+ color = "default",
15
+ children,
16
+ sx,
17
+ ...other
18
+ }, ref) => {
19
+ const theme = useTheme();
20
+ const isSkeleton = useModuleSkeleton();
21
+ if (isSkeleton) {
22
+ return /* @__PURE__ */ jsx(SkeletonAvatar, {});
23
+ }
24
+ if (color === "default") {
25
+ return /* @__PURE__ */ jsx(Avatar$1, {
26
+ ref,
27
+ sx: {
28
+ cursor: "pointer",
29
+ ...sx
30
+ },
31
+ ...other,
32
+ children
33
+ });
34
+ }
35
+ return /* @__PURE__ */ jsx(Avatar$1, {
36
+ ref,
27
37
  sx: {
28
- fontWeight: e.typography.fontWeightMedium,
29
- color: e.palette[r].contrastText,
30
- backgroundColor: e.palette[r].main,
38
+ fontWeight: theme.typography.fontWeightMedium,
39
+ color: theme.palette[color].contrastText,
40
+ backgroundColor: theme.palette[color].main,
31
41
  cursor: "pointer",
32
- ...a
42
+ ...sx
33
43
  },
34
- ...n,
35
- children: o
44
+ ...other,
45
+ children
36
46
  });
37
47
  });
38
- c.displayName = "Avatar";
48
+ Avatar.displayName = "Avatar";
39
49
  export {
40
- c as A
50
+ Avatar as A
41
51
  };
@@ -1,22 +1,22 @@
1
- import { Box as r } from "@mui/material";
2
- import { jsx as t } from "react/jsx-runtime";
3
- function a({
4
- src: o,
5
- sx: n
1
+ import { Box } from "@mui/material";
2
+ import { jsx } from "react/jsx-runtime";
3
+ function BoxIcon({
4
+ src,
5
+ sx
6
6
  }) {
7
- return /* @__PURE__ */ t(r, {
7
+ return /* @__PURE__ */ jsx(Box, {
8
8
  component: "span",
9
9
  sx: {
10
10
  width: 20,
11
11
  height: 20,
12
12
  display: "inline-block",
13
13
  bgcolor: "currentColor",
14
- mask: `url(${o}) no-repeat center / contain`,
15
- WebkitMask: `url(${o}) no-repeat center / contain`,
16
- ...n
14
+ mask: `url(${src}) no-repeat center / contain`,
15
+ WebkitMask: `url(${src}) no-repeat center / contain`,
16
+ ...sx
17
17
  }
18
18
  });
19
19
  }
20
20
  export {
21
- a as B
21
+ BoxIcon as B
22
22
  };
@@ -1,23 +1,24 @@
1
- import { useMemo as c } from "react";
2
- import { useModuleDictionary as m } from "@m4l/core";
3
- import { Link as u, Box as l, Typography as x, Breadcrumbs as f } from "@mui/material";
4
- import { Link as b } from "react-router-dom";
5
- import { jsxs as g, jsx as i } from "react/jsx-runtime";
6
- function d({
7
- link: s
1
+ import { useMemo } from "react";
2
+ import { useModuleDictionary } from "@m4l/core";
3
+ import { Link, Box, Typography, Breadcrumbs as Breadcrumbs$1 } from "@mui/material";
4
+ import { Link as Link$1 } from "react-router-dom";
5
+ import { jsxs, jsx } from "react/jsx-runtime";
6
+ function LinkItem({
7
+ link
8
8
  }) {
9
9
  const {
10
- href: e,
11
- name: n,
12
- icon: a,
13
- dictionaryField: o
14
- } = s, {
15
- getLabel: r
16
- } = m();
17
- return /* @__PURE__ */ g(u, {
10
+ href,
11
+ name,
12
+ icon,
13
+ dictionaryField: dictionaryDescription
14
+ } = link;
15
+ const {
16
+ getLabel
17
+ } = useModuleDictionary();
18
+ return /* @__PURE__ */ jsxs(Link, {
18
19
  variant: "body2",
19
- component: b,
20
- to: e || "#",
20
+ component: Link$1,
21
+ to: href || "#",
21
22
  sx: {
22
23
  lineHeight: 2,
23
24
  display: "flex",
@@ -27,7 +28,7 @@ function d({
27
28
  display: "inherit"
28
29
  }
29
30
  },
30
- children: [a && /* @__PURE__ */ i(l, {
31
+ children: [icon && /* @__PURE__ */ jsx(Box, {
31
32
  sx: {
32
33
  mr: 1,
33
34
  "& svg": {
@@ -35,29 +36,33 @@ function d({
35
36
  height: 20
36
37
  }
37
38
  },
38
- children: a
39
- }), o !== void 0 && r ? r(o) : n]
40
- }, n);
39
+ children: icon
40
+ }), dictionaryDescription !== void 0 && getLabel ? getLabel(dictionaryDescription) : name]
41
+ }, name);
41
42
  }
42
- function D(s) {
43
+ function Breadcrumbs(props) {
44
+ const {
45
+ links,
46
+ activeLast = false,
47
+ ...other
48
+ } = props;
43
49
  const {
44
- links: e,
45
- activeLast: n = !1,
46
- ...a
47
- } = s, {
48
- getLabel: o
49
- } = m(), r = c(() => {
50
- if (e.length === 0)
50
+ getLabel
51
+ } = useModuleDictionary();
52
+ const currentLink = useMemo(() => {
53
+ if (links.length === 0)
51
54
  return "";
52
55
  const {
53
- dictionaryField: t
54
- } = e[e.length - 1];
55
- return o(t);
56
- }, [o, e]), p = c(() => e.map((t) => /* @__PURE__ */ i(d, {
57
- link: t
58
- }, t.name)), [e]), h = c(() => e.map((t) => t.name !== r ? /* @__PURE__ */ i(d, {
59
- link: t
60
- }, t.name) : /* @__PURE__ */ i(x, {
56
+ dictionaryField
57
+ } = links[links.length - 1];
58
+ return getLabel(dictionaryField);
59
+ }, [getLabel, links]);
60
+ const listDefault = useMemo(() => links.map((link) => /* @__PURE__ */ jsx(LinkItem, {
61
+ link
62
+ }, link.name)), [links]);
63
+ const listActiveLast = useMemo(() => links.map((link) => link.name !== currentLink ? /* @__PURE__ */ jsx(LinkItem, {
64
+ link
65
+ }, link.name) : /* @__PURE__ */ jsx(Typography, {
61
66
  variant: "body2",
62
67
  sx: {
63
68
  maxWidth: 260,
@@ -66,11 +71,11 @@ function D(s) {
66
71
  color: "text.disabled",
67
72
  textOverflow: "ellipsis"
68
73
  },
69
- children: r
70
- }, t.name)), [r, e]);
71
- return /* @__PURE__ */ i(f, {
74
+ children: currentLink
75
+ }, link.name)), [currentLink, links]);
76
+ return /* @__PURE__ */ jsx(Breadcrumbs$1, {
72
77
  id: "MUIBreadcrumbs",
73
- separator: /* @__PURE__ */ i(l, {
78
+ separator: /* @__PURE__ */ jsx(Box, {
74
79
  component: "span",
75
80
  sx: {
76
81
  width: 4,
@@ -80,10 +85,10 @@ function D(s) {
80
85
  bgcolor: "text.disabled"
81
86
  }
82
87
  }),
83
- ...a,
84
- children: n ? p : h
88
+ ...other,
89
+ children: activeLast ? listDefault : listActiveLast
85
90
  });
86
91
  }
87
92
  export {
88
- D as B
93
+ Breadcrumbs as B
89
94
  };
@@ -0,0 +1,178 @@
1
+ import { useModuleSkeleton, useEnvironment, useModuleDictionary } from "@m4l/core";
2
+ import { Skeleton, styled, IconButton as IconButton$1, Tooltip } from "@mui/material";
3
+ import MuiButton from "@mui/material/Button";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { LoadingButton as LoadingButton$1 } from "@mui/lab";
6
+ import { I as IconButton } from "../IconButton/index.a321e5cb.js";
7
+ import { styled as styled$1, alpha } from "@mui/material/styles";
8
+ import { u as useBase } from "../../DynamicFilter/index.342ba5fe.js";
9
+ import { useMemo } from "react";
10
+ import { I as Image } from "../../Image/index.93d5f37f.js";
11
+ const Button = (props) => {
12
+ const isSkeleton = useModuleSkeleton();
13
+ if (isSkeleton) {
14
+ return /* @__PURE__ */ jsx(Skeleton, {
15
+ sx: {
16
+ borderRadius: 2
17
+ },
18
+ variant: "rectangular",
19
+ width: "100px",
20
+ height: "36px"
21
+ });
22
+ }
23
+ return /* @__PURE__ */ jsx(MuiButton, {
24
+ ...props
25
+ });
26
+ };
27
+ const WrapperSkeleton = styled("div")(({
28
+ theme
29
+ }) => ({
30
+ display: "flex",
31
+ width: "100%",
32
+ borderRadius: theme.spacing(1),
33
+ overflow: "hidden"
34
+ }));
35
+ const SkeletonLoadingButton = () => /* @__PURE__ */ jsx(WrapperSkeleton, {
36
+ id: "WrapperSKTLoadingButton",
37
+ children: /* @__PURE__ */ jsx(Skeleton, {
38
+ variant: "rectangular",
39
+ width: "100%",
40
+ height: "48px"
41
+ })
42
+ });
43
+ const LoadingButton = (props) => {
44
+ const {
45
+ children,
46
+ ...other
47
+ } = props;
48
+ const isSkeleton = useModuleSkeleton();
49
+ if (isSkeleton) {
50
+ return /* @__PURE__ */ jsx(SkeletonLoadingButton, {});
51
+ }
52
+ return /* @__PURE__ */ jsx(LoadingButton$1, {
53
+ ...other,
54
+ children
55
+ });
56
+ };
57
+ const SKTWrapperFilterButton = styled$1("div")(({
58
+ theme
59
+ }) => ({
60
+ display: "flex",
61
+ justifyContent: "center",
62
+ alignItems: "center",
63
+ minWidth: theme.spacing(3.75),
64
+ height: theme.spacing(3.75),
65
+ background: alpha(theme.palette.primary.main, 0.3)
66
+ }));
67
+ const WrapperFilterButton = styled$1("div")(() => ({
68
+ "&.isDirty": {
69
+ animationName: "dirtyEffect",
70
+ animationDuration: "1s",
71
+ animationFillMode: "both",
72
+ animationIterationCount: "infinite",
73
+ transition: "all .3s",
74
+ "@keyframes dirtyEffect": {
75
+ "20%": {
76
+ opacity: 1
77
+ },
78
+ "50%": {
79
+ opacity: 0.5
80
+ },
81
+ "100%": {
82
+ opacity: 1
83
+ }
84
+ }
85
+ },
86
+ "&.isDirtyError": {}
87
+ }));
88
+ function FilterButton() {
89
+ const {
90
+ isSkeleton,
91
+ fireOnChangeFilters,
92
+ automatic,
93
+ isDirty,
94
+ isValid
95
+ } = useBase();
96
+ const {
97
+ host_static_assets,
98
+ environment_assets
99
+ } = useEnvironment();
100
+ if (isSkeleton) {
101
+ return /* @__PURE__ */ jsx(SKTWrapperFilterButton, {
102
+ children: /* @__PURE__ */ jsx(Skeleton, {
103
+ variant: "circular",
104
+ width: 20,
105
+ height: 20
106
+ })
107
+ });
108
+ }
109
+ const color = useMemo(() => {
110
+ if (automatic || !isDirty) {
111
+ return "action.active";
112
+ }
113
+ if (!isValid) {
114
+ return "error.main";
115
+ }
116
+ return "primary.main";
117
+ }, [automatic, isValid, isDirty]);
118
+ return /* @__PURE__ */ jsx(WrapperFilterButton, {
119
+ id: "WrapperFilterButton",
120
+ className: isDirty && isValid ? "isDirty" : "",
121
+ children: /* @__PURE__ */ jsx(IconButton, {
122
+ bgColor: color,
123
+ dictionaryTooltip: "dynamic_filter.filter_tooltip",
124
+ onClick: () => fireOnChangeFilters(),
125
+ "aria-label": "settings",
126
+ src: `${host_static_assets}/${environment_assets}/frontend/components/dynamic_filter/assets/icons/${automatic ? "refresh" : "search"}.svg`
127
+ })
128
+ });
129
+ }
130
+ function ImageButton({
131
+ src,
132
+ width,
133
+ height,
134
+ className,
135
+ useIntersectionObserver,
136
+ skeletonVariant = "circle",
137
+ tooltip,
138
+ dictionaryTooltip,
139
+ sx = {
140
+ width: 40,
141
+ height: 40
142
+ },
143
+ ...other
144
+ }) {
145
+ const {
146
+ getLabel
147
+ } = useModuleDictionary();
148
+ const finalTooltip = useMemo(() => {
149
+ if (dictionaryTooltip && getLabel) {
150
+ return getLabel(dictionaryTooltip);
151
+ }
152
+ return tooltip;
153
+ }, [tooltip, dictionaryTooltip, getLabel]);
154
+ const imageButton = useMemo(() => {
155
+ return /* @__PURE__ */ jsx(IconButton$1, {
156
+ sx,
157
+ className: `m4l_image_button ${className ? className : ""}`,
158
+ ...other,
159
+ children: /* @__PURE__ */ jsx(Image, {
160
+ src,
161
+ width,
162
+ height,
163
+ useIntersectionObserver,
164
+ skeletonVariant
165
+ })
166
+ });
167
+ }, [src, width, height, useIntersectionObserver, skeletonVariant, sx]);
168
+ return finalTooltip ? /* @__PURE__ */ jsx(Tooltip, {
169
+ title: finalTooltip || "",
170
+ children: imageButton
171
+ }) : imageButton;
172
+ }
173
+ export {
174
+ Button as B,
175
+ FilterButton as F,
176
+ ImageButton as I,
177
+ LoadingButton as L
178
+ };
@@ -1,8 +1,10 @@
1
- import { CircularProgress as s } from "@mui/material";
2
- import { jsx as o } from "react/jsx-runtime";
3
- const i = (r) => /* @__PURE__ */ o(s, {
4
- ...r
5
- });
1
+ import { CircularProgress as CircularProgress$1 } from "@mui/material";
2
+ import { jsx } from "react/jsx-runtime";
3
+ const CircularProgress = (props) => {
4
+ return /* @__PURE__ */ jsx(CircularProgress$1, {
5
+ ...props
6
+ });
7
+ };
6
8
  export {
7
- i as C
9
+ CircularProgress as C
8
10
  };