@m4l/components 0.1.12 → 0.1.13

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 (143) hide show
  1. package/assets/Logo/index.228dcb5a.js +86 -0
  2. package/commonjs.565e6834.js +12 -0
  3. package/components/CommonActions/components/ActionCancel/index.cba1b460.js +17 -0
  4. package/components/CommonActions/components/ActionFormCancel/index.be2fe891.js +49 -0
  5. package/components/CommonActions/components/ActionFormIntro/index.ca4d2674.js +31 -0
  6. package/components/CommonActions/components/ActionIntro/index.cc4b1e0e.js +18 -0
  7. package/components/CommonActions/components/Actions/index.e8148d98.js +743 -0
  8. package/components/CompanyLogo/{index.js → index.f81c179c.js} +42 -48
  9. package/components/DataGrid/index.b688877d.js +894 -0
  10. package/components/DynamicFilter/index.82ce857e.js +1158 -0
  11. package/components/ErrorLabel/index.c8615f16.js +19 -0
  12. package/components/Icon/index.cbca79b0.js +70 -0
  13. package/components/Image/index.e790b50b.js +122 -0
  14. package/components/LanguagePopover/index.3d9611cb.js +87 -0
  15. package/components/Loadable/index.f5518558.js +15 -0
  16. package/components/ModalDialog/index.3850c053.js +168 -0
  17. package/components/NoItemSelected/{index.js → index.12f0ca67.js} +43 -50
  18. package/components/ObjectLogs/index.27ef875d.js +266 -0
  19. package/components/Page/index.6d69977e.js +35 -0
  20. package/components/Page/index.d.ts +1 -1
  21. package/components/PaperForm/index.d7c74064.js +105 -0
  22. package/components/Period/index.5e68286a.js +160 -0
  23. package/components/PropertyValue/index.ab3dd7e9.js +116 -0
  24. package/components/Resizeable/{index.js → index.45995d2b.js} +21 -19
  25. package/components/ScrollBar/index.39eeb2de.js +49 -0
  26. package/components/ScrollToTop/index.e06f98f6.js +11 -0
  27. package/components/SplitLayout/{index.js → index.4032673d.js} +35 -35
  28. package/components/animate/IconButtonAnimate/index.d.ts +1 -1
  29. package/components/animate/LoadingScreen/{index.js → index.f1cec7db.js} +29 -27
  30. package/components/animate/MotionContainer/index.8d9f9d80.js +30 -0
  31. package/components/animate/MotionLazyContainer/index.572dd012.js +15 -0
  32. package/components/animate/features.0fbf41e1.js +5 -0
  33. package/components/animate/variants/{bounce.js → bounce.784aaaaa.js} +15 -16
  34. package/components/animate/variants/container.11f82b76.js +20 -0
  35. package/components/animate/variants/fade.b561c0fc.js +59 -0
  36. package/components/animate/variants/{index.js → index.7a912140.js} +0 -0
  37. package/components/animate/variants/transition.bd46b9ce.js +15 -0
  38. package/components/formatters/BooleanFormatter/index.cca53b7f.js +42 -0
  39. package/components/formatters/DateFormatter/index.ad8d9b8e.js +57 -0
  40. package/components/formatters/index.55856d65.js +106 -0
  41. package/components/hook-form/FormProvider/index.257acd9f.js +55 -0
  42. package/components/hook-form/RHFAutocomplete/index.6ed76d4c.js +122 -0
  43. package/components/hook-form/RHFAutocompleteAsync/index.8f2c97ea.js +153 -0
  44. package/components/hook-form/RHFCheckbox/index.f9ce6c39.js +59 -0
  45. package/components/hook-form/RHFDateTime/index.fc5cbafe.js +68 -0
  46. package/components/hook-form/RHFMultiCheckbox/index.2680b3b6.js +34 -0
  47. package/components/hook-form/RHFPeriod/index.23c254e9.js +45 -0
  48. package/components/hook-form/RHFRadioGroup/index.b3335e13.js +43 -0
  49. package/components/hook-form/RHFSelect/index.b6ca8bb2.js +36 -0
  50. package/components/hook-form/RHFTextField/index.4c455f75.js +77 -0
  51. package/components/hook-form/RHFTextField/index.d.ts +1 -1
  52. package/components/hook-form/RHFUpload/index.ed3d739f.js +244 -0
  53. package/components/mui_extended/Accordion/index.2116e423.js +103 -0
  54. package/components/mui_extended/Avatar/index.0a2a4523.js +32 -0
  55. package/components/mui_extended/Avatar/index.d.ts +1 -1
  56. package/components/mui_extended/BoxIcon/index.e638ecc8.js +22 -0
  57. package/components/mui_extended/Breadcrumbs/index.5e37d903.js +89 -0
  58. package/components/mui_extended/Button/index.84d8898c.js +110 -0
  59. package/components/mui_extended/IconButton/index.88f3aadb.js +98 -0
  60. package/components/mui_extended/LinkWithRoute/index.d4b263de.js +28 -0
  61. package/components/mui_extended/MenuPopover/index.488fc536.js +131 -0
  62. package/components/mui_extended/Pager/index.0576814f.js +126 -0
  63. package/components/mui_extended/Tab/index.e0653a0a.js +28 -0
  64. package/components/mui_extended/Typography/index.0c4604b3.js +22 -0
  65. package/contexts/ModalContext/index.2188b69e.js +150 -0
  66. package/hooks/useFormAddEdit/index.d4845f1a.js +26 -0
  67. package/hooks/useModal/index.6571d2d9.js +6 -0
  68. package/index.js +162 -70
  69. package/lodash.e09401f0.js +32 -0
  70. package/node_modules.168cb897.js +55 -0
  71. package/package.json +1 -1
  72. package/react-data-grid.d46d625e.js +2115 -0
  73. package/react-draggable.20e95c61.js +714 -0
  74. package/react-json-view.f56a7f8e.js +2762 -0
  75. package/react-lazy-load-image-component.45b56650.js +784 -0
  76. package/react-resizable.5277deaf.js +371 -0
  77. package/react-splitter-layout.7810ac1b.js +165 -0
  78. package/utils/index.214d9542.js +435 -0
  79. package/assets/Logo/index.js +0 -91
  80. package/commonjs.js +0 -9
  81. package/components/CommonActions/components/ActionCancel/index.js +0 -15
  82. package/components/CommonActions/components/ActionFormCancel/index.js +0 -62
  83. package/components/CommonActions/components/ActionFormIntro/index.js +0 -35
  84. package/components/CommonActions/components/ActionIntro/index.js +0 -16
  85. package/components/CommonActions/components/Actions/index.js +0 -859
  86. package/components/DataGrid/index.js +0 -1067
  87. package/components/DynamicFilter/index.js +0 -1573
  88. package/components/ErrorLabel/index.js +0 -18
  89. package/components/Icon/index.js +0 -80
  90. package/components/Image/index.js +0 -128
  91. package/components/LanguagePopover/index.js +0 -93
  92. package/components/Loadable/index.js +0 -13
  93. package/components/ModalDialog/index.js +0 -180
  94. package/components/ObjectLogs/index.js +0 -284
  95. package/components/Page/index.js +0 -36
  96. package/components/PaperForm/index.js +0 -110
  97. package/components/Period/index.js +0 -230
  98. package/components/PropertyValue/index.js +0 -142
  99. package/components/ScrollBar/index.js +0 -52
  100. package/components/ScrollToTop/index.js +0 -10
  101. package/components/animate/MotionContainer/index.js +0 -31
  102. package/components/animate/MotionLazyContainer/index.js +0 -13
  103. package/components/animate/features.js +0 -2
  104. package/components/animate/variants/container.js +0 -20
  105. package/components/animate/variants/fade.js +0 -61
  106. package/components/animate/variants/transition.js +0 -16
  107. package/components/formatters/BooleanFormatter/index.js +0 -52
  108. package/components/formatters/DateFormatter/index.js +0 -66
  109. package/components/formatters/index.js +0 -112
  110. package/components/hook-form/FormProvider/index.js +0 -61
  111. package/components/hook-form/RHFAutocomplete/index.js +0 -144
  112. package/components/hook-form/RHFAutocompleteAsync/index.js +0 -191
  113. package/components/hook-form/RHFCheckbox/index.js +0 -65
  114. package/components/hook-form/RHFDateTime/index.js +0 -79
  115. package/components/hook-form/RHFMultiCheckbox/index.js +0 -32
  116. package/components/hook-form/RHFPeriod/index.js +0 -47
  117. package/components/hook-form/RHFRadioGroup/index.js +0 -41
  118. package/components/hook-form/RHFSelect/index.js +0 -34
  119. package/components/hook-form/RHFTextField/index.js +0 -87
  120. package/components/hook-form/RHFUpload/index.js +0 -255
  121. package/components/mui_extended/Accordion/index.js +0 -105
  122. package/components/mui_extended/Avatar/index.js +0 -33
  123. package/components/mui_extended/BoxIcon/index.js +0 -20
  124. package/components/mui_extended/Breadcrumbs/index.js +0 -92
  125. package/components/mui_extended/Button/index.js +0 -131
  126. package/components/mui_extended/IconButton/index.js +0 -108
  127. package/components/mui_extended/LinkWithRoute/index.js +0 -30
  128. package/components/mui_extended/MenuPopover/index.js +0 -135
  129. package/components/mui_extended/Pager/index.js +0 -137
  130. package/components/mui_extended/Tab/index.js +0 -30
  131. package/components/mui_extended/Typography/index.js +0 -21
  132. package/contexts/ModalContext/index.js +0 -165
  133. package/hooks/useFormAddEdit/index.js +0 -42
  134. package/hooks/useModal/index.js +0 -4
  135. package/lodash.js +0 -62
  136. package/node_modules.js +0 -54
  137. package/react-data-grid.js +0 -2652
  138. package/react-draggable.js +0 -960
  139. package/react-json-view.js +0 -2764
  140. package/react-lazy-load-image-component.js +0 -792
  141. package/react-resizable.js +0 -541
  142. package/react-splitter-layout.js +0 -165
  143. package/utils/index.js +0 -572
@@ -1,131 +0,0 @@
1
- import { useModuleSkeleton, useEnvironment } from "@m4l/core";
2
- import MuiButton from "@mui/material/Button";
3
- import { styled, Skeleton } from "@mui/material";
4
- import { jsx } from "react/jsx-runtime";
5
- import { LoadingButton as LoadingButton$1 } from "@mui/lab";
6
- import { styled as styled$1, alpha } from "@mui/material/styles";
7
- import { I as IconButton } from "../IconButton/index.js";
8
- import { u as useBase } from "../../DynamicFilter/index.js";
9
- import { useMemo } from "react";
10
- const SKTButton = styled(Skeleton)(({
11
- theme
12
- }) => ({
13
- borderRadius: theme.spacing(0.5)
14
- }));
15
- const Button = (props) => {
16
- const isSkeleton = useModuleSkeleton();
17
- if (isSkeleton) {
18
- return /* @__PURE__ */ jsx(SKTButton, {
19
- variant: "rectangular",
20
- width: "100px",
21
- height: "36px"
22
- });
23
- }
24
- return /* @__PURE__ */ jsx(MuiButton, {
25
- ...props
26
- });
27
- };
28
- const WrapperSKTLoadingButton = styled$1("div")(({
29
- theme
30
- }) => ({
31
- display: "flex",
32
- width: "100%",
33
- borderRadius: theme.spacing(1),
34
- overflow: "hidden"
35
- }));
36
- const SKTLoadingButton = () => /* @__PURE__ */ jsx(WrapperSKTLoadingButton, {
37
- id: "WrapperSKTLoadingButton",
38
- children: /* @__PURE__ */ jsx(Skeleton, {
39
- variant: "rectangular",
40
- width: "100%",
41
- height: "48px"
42
- })
43
- });
44
- const LoadingButton = (props) => {
45
- const {
46
- isSkeleton,
47
- children,
48
- ...other
49
- } = props;
50
- if (isSkeleton) {
51
- return /* @__PURE__ */ jsx(SKTLoadingButton, {});
52
- }
53
- return /* @__PURE__ */ jsx(LoadingButton$1, {
54
- ...other,
55
- children
56
- });
57
- };
58
- const SKTWrapperFilterButton = styled$1("div")(({
59
- theme
60
- }) => ({
61
- display: "flex",
62
- justifyContent: "center",
63
- alignItems: "center",
64
- minWidth: theme.spacing(3.75),
65
- height: theme.spacing(3.75),
66
- background: alpha(theme.palette.primary.main, 0.3)
67
- }));
68
- const WrapperFilterButton = styled$1("div")(() => ({
69
- "&.isDirty": {
70
- animationName: "dirtyEffect",
71
- animationDuration: "1s",
72
- animationFillMode: "both",
73
- animationIterationCount: "infinite",
74
- transition: "all .3s",
75
- "@keyframes dirtyEffect": {
76
- "20%": {
77
- opacity: 1
78
- },
79
- "50%": {
80
- opacity: 0.5
81
- },
82
- "100%": {
83
- opacity: 1
84
- }
85
- }
86
- },
87
- "&.isDirtyError": {}
88
- }));
89
- function FilterButton() {
90
- const {
91
- isSkeleton,
92
- fireOnChangeFilters,
93
- automatic,
94
- isDirty,
95
- isValid
96
- } = useBase();
97
- const {
98
- host_static_assets,
99
- environment_assets
100
- } = useEnvironment();
101
- if (isSkeleton) {
102
- return /* @__PURE__ */ jsx(SKTWrapperFilterButton, {
103
- children: /* @__PURE__ */ jsx(Skeleton, {
104
- variant: "circular",
105
- width: 20,
106
- height: 20
107
- })
108
- });
109
- }
110
- const color = useMemo(() => {
111
- if (automatic || !isDirty) {
112
- return "action.active";
113
- }
114
- if (!isValid) {
115
- return "error.main";
116
- }
117
- return "primary.main";
118
- }, [automatic, isValid, isDirty]);
119
- return /* @__PURE__ */ jsx(WrapperFilterButton, {
120
- id: "WrapperFilterButton",
121
- className: isDirty && isValid ? "isDirty" : "",
122
- children: /* @__PURE__ */ jsx(IconButton, {
123
- bgColor: color,
124
- dictionaryTooltip: "dynamic_filter.filter_tooltip",
125
- onClick: () => fireOnChangeFilters(),
126
- "aria-label": "settings",
127
- src: `${host_static_assets}/${environment_assets}/frontend/components/dynamic_filter/assets/icons/${automatic ? "refresh" : "search"}.svg`
128
- })
129
- });
130
- }
131
- export { Button as B, FilterButton as F, LoadingButton as L };
@@ -1,108 +0,0 @@
1
- import { m } from "framer-motion";
2
- import { forwardRef, useMemo } from "react";
3
- import { IconButton as IconButton$1, Box, Skeleton, Tooltip } from "@mui/material";
4
- import { jsx } from "react/jsx-runtime";
5
- import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
6
- import { I as Icon } from "../../Icon/index.js";
7
- const varSmall = {
8
- hover: {
9
- scale: 1.1
10
- },
11
- tap: {
12
- scale: 0.95
13
- }
14
- };
15
- const varMedium = {
16
- hover: {
17
- scale: 1.09
18
- },
19
- tap: {
20
- scale: 0.97
21
- }
22
- };
23
- const varLarge = {
24
- hover: {
25
- scale: 1.08
26
- },
27
- tap: {
28
- scale: 0.99
29
- }
30
- };
31
- function AnimateWrap({
32
- size,
33
- children
34
- }) {
35
- const isSmall = size === "small";
36
- const isLarge = size === "large";
37
- return /* @__PURE__ */ jsx(Box, {
38
- component: m.div,
39
- whileTap: "tap",
40
- whileHover: "hover",
41
- variants: isSmall && varSmall || isLarge && varLarge || varMedium,
42
- sx: {
43
- display: "inline-flex"
44
- },
45
- children
46
- });
47
- }
48
- const IconButtonAnimate = forwardRef(({
49
- children,
50
- size = "medium",
51
- ...other
52
- }, ref) => /* @__PURE__ */ jsx(AnimateWrap, {
53
- size,
54
- children: /* @__PURE__ */ jsx(IconButton$1, {
55
- size,
56
- ref,
57
- ...other,
58
- children
59
- })
60
- }));
61
- IconButtonAnimate.displayName = "IconButtonAnimate";
62
- function IconButton({
63
- src,
64
- tooltip,
65
- size = "small",
66
- dictionaryTooltip,
67
- bgColor = "primary.active",
68
- ...other
69
- }) {
70
- const {
71
- getLabel
72
- } = useModuleDictionary();
73
- const isSkeleton = useModuleSkeleton();
74
- const finalTooltip = useMemo(() => {
75
- if (dictionaryTooltip && getLabel) {
76
- return getLabel(dictionaryTooltip);
77
- }
78
- return tooltip;
79
- }, [dictionaryTooltip, getLabel]);
80
- if (isSkeleton) {
81
- return /* @__PURE__ */ jsx(Skeleton, {
82
- variant: "circular",
83
- width: "30px",
84
- height: "30px"
85
- });
86
- }
87
- return finalTooltip ? /* @__PURE__ */ jsx(Tooltip, {
88
- title: finalTooltip || "",
89
- children: /* @__PURE__ */ jsx("div", {
90
- children: /* @__PURE__ */ jsx(IconButton$1, {
91
- size,
92
- ...other,
93
- children: /* @__PURE__ */ jsx(Icon, {
94
- src,
95
- bgColor: other.disabled ? "action.disabled" : bgColor
96
- })
97
- })
98
- })
99
- }) : /* @__PURE__ */ jsx(IconButton$1, {
100
- size,
101
- ...other,
102
- children: /* @__PURE__ */ jsx(Icon, {
103
- src,
104
- bgColor: other.disabled ? "action.disabled" : bgColor
105
- })
106
- });
107
- }
108
- export { IconButton as I, IconButtonAnimate as a };
@@ -1,30 +0,0 @@
1
- import { Link as Link$1 } from "react-router-dom";
2
- import { Skeleton, Link } from "@mui/material";
3
- import { jsx } from "react/jsx-runtime";
4
- const LinkWithRoute = (props) => {
5
- const {
6
- to,
7
- children,
8
- skeletonProps = {},
9
- ...other
10
- } = props;
11
- const {
12
- isSkeleton = false,
13
- width = "100%",
14
- height = "14px"
15
- } = skeletonProps;
16
- if (isSkeleton) {
17
- return /* @__PURE__ */ jsx(Skeleton, {
18
- variant: "text",
19
- width,
20
- height
21
- });
22
- }
23
- return /* @__PURE__ */ jsx(Link, {
24
- component: Link$1,
25
- to,
26
- ...other,
27
- children
28
- });
29
- };
30
- export { LinkWithRoute as L };
@@ -1,135 +0,0 @@
1
- import { styled } from "@mui/material/styles";
2
- import { Popover } from "@mui/material";
3
- import { jsxs, jsx } from "react/jsx-runtime";
4
- const ArrowStyle = styled("span")(({
5
- arrow,
6
- theme
7
- }) => {
8
- const SIZE = 12;
9
- const POSITION = -(SIZE / 2);
10
- const borderStyle = `solid 1px ${theme.palette.grey[50012]}`;
11
- const topStyle = {
12
- borderRadius: "0 0 3px 0",
13
- top: POSITION,
14
- borderBottom: borderStyle,
15
- borderRight: borderStyle
16
- };
17
- const bottomStyle = {
18
- borderRadius: "3px 0 0 0",
19
- bottom: POSITION,
20
- borderTop: borderStyle,
21
- borderLeft: borderStyle
22
- };
23
- const leftStyle = {
24
- borderRadius: "0 3px 0 0",
25
- left: POSITION,
26
- borderTop: borderStyle,
27
- borderRight: borderStyle
28
- };
29
- const rightStyle = {
30
- borderRadius: "0 0 0 3px",
31
- right: POSITION,
32
- borderBottom: borderStyle,
33
- borderLeft: borderStyle
34
- };
35
- return {
36
- display: "none",
37
- [theme.breakpoints.up("sm")]: {
38
- zIndex: 1,
39
- width: SIZE,
40
- height: SIZE,
41
- content: "''",
42
- position: "absolute",
43
- display: "block",
44
- transform: "rotate(-135deg)",
45
- background: theme.palette.background.paper
46
- },
47
- ...arrow === "top-left" && {
48
- ...topStyle,
49
- left: 20
50
- },
51
- ...arrow === "top-center" && {
52
- ...topStyle,
53
- left: 0,
54
- right: 0,
55
- margin: "auto"
56
- },
57
- ...arrow === "top-right" && {
58
- ...topStyle,
59
- right: 20
60
- },
61
- ...arrow === "bottom-left" && {
62
- ...bottomStyle,
63
- left: 20
64
- },
65
- ...arrow === "bottom-center" && {
66
- ...bottomStyle,
67
- left: 0,
68
- right: 0,
69
- margin: "auto"
70
- },
71
- ...arrow === "bottom-right" && {
72
- ...bottomStyle,
73
- right: 20
74
- },
75
- ...arrow === "left-top" && {
76
- ...leftStyle,
77
- top: 20
78
- },
79
- ...arrow === "left-center" && {
80
- ...leftStyle,
81
- top: 0,
82
- bottom: 0,
83
- margin: "auto"
84
- },
85
- ...arrow === "left-bottom" && {
86
- ...leftStyle,
87
- bottom: 20
88
- },
89
- ...arrow === "right-top" && {
90
- ...rightStyle,
91
- top: 20
92
- },
93
- ...arrow === "right-center" && {
94
- ...rightStyle,
95
- top: 0,
96
- bottom: 0,
97
- margin: "auto"
98
- },
99
- ...arrow === "right-bottom" && {
100
- ...rightStyle,
101
- bottom: 20
102
- }
103
- };
104
- });
105
- function MenuPopover({
106
- children,
107
- arrow = "top-right",
108
- disabledArrow,
109
- sx,
110
- ...other
111
- }) {
112
- return /* @__PURE__ */ jsxs(Popover, {
113
- anchorOrigin: {
114
- vertical: "bottom",
115
- horizontal: "right"
116
- },
117
- transformOrigin: {
118
- vertical: "top",
119
- horizontal: "right"
120
- },
121
- PaperProps: {
122
- sx: {
123
- p: 1,
124
- width: 200,
125
- overflow: "inherit",
126
- ...sx
127
- }
128
- },
129
- ...other,
130
- children: [!disabledArrow && /* @__PURE__ */ jsx(ArrowStyle, {
131
- arrow
132
- }), children]
133
- });
134
- }
135
- export { MenuPopover as M };
@@ -1,137 +0,0 @@
1
- import { useMemo } from "react";
2
- import { Skeleton, TablePagination } from "@mui/material";
3
- import { P as PagerActions } from "../../CommonActions/components/Actions/index.js";
4
- import { styled } from "@mui/material/styles";
5
- import { jsxs, jsx } from "react/jsx-runtime";
6
- styled("div")(() => ({
7
- display: "flex",
8
- flexDirection: "column",
9
- height: "100%",
10
- overflow: "hidden"
11
- }));
12
- const SKTWrapperPagerActions = styled("div")(({ theme }) => ({
13
- width: "100%",
14
- display: "flex",
15
- justifyContent: "center",
16
- alignItems: "center",
17
- marginLeft: theme.spacing(3)
18
- }));
19
- const SKTSvgIconButtonContainer = styled("div")(({ theme }) => ({
20
- display: "flex",
21
- marginLeft: theme.spacing(3)
22
- }));
23
- const SKTSvgIconButton = styled("div")(({ theme }) => ({
24
- display: "flex",
25
- justifyContent: "center",
26
- alignItems: "center",
27
- width: theme.spacing(3.75),
28
- height: theme.spacing(3.75)
29
- }));
30
- const SKTWrapperRowsPerPage = styled("div")(({ theme }) => ({
31
- display: "grid",
32
- gridTemplateColumns: "auto auto",
33
- gridGap: theme.spacing(1),
34
- marginRight: theme.spacing(3)
35
- }));
36
- function Pager(props) {
37
- const {
38
- totalRecords,
39
- rowsPerPageOptions = [5, 10, 2],
40
- rowsPerPage = 25,
41
- page,
42
- onPageChange,
43
- onRowsPerPageChange,
44
- labelRows = "Rows per page",
45
- labelOf = "Of",
46
- isSkeleton = "false",
47
- isDesktop
48
- } = props;
49
- const currentPage = useMemo(() => {
50
- if (rowsPerPage * page > totalRecords) {
51
- return Math.floor(totalRecords / rowsPerPage);
52
- }
53
- return page;
54
- }, [page, rowsPerPage, totalRecords]);
55
- const handleChangeRowsPerPage = (event) => {
56
- onRowsPerPageChange(parseInt(event.target.value, 10));
57
- onPageChange(0);
58
- };
59
- const handleChangePage = (_event, newPage) => {
60
- onPageChange(newPage);
61
- };
62
- if (isSkeleton) {
63
- return /* @__PURE__ */ jsxs(SKTWrapperPagerActions, {
64
- children: [/* @__PURE__ */ jsxs(SKTWrapperRowsPerPage, {
65
- children: [/* @__PURE__ */ jsx(Skeleton, {
66
- variant: "text",
67
- width: "40px",
68
- height: "16px"
69
- }), /* @__PURE__ */ jsx(Skeleton, {
70
- variant: "text",
71
- width: "20px",
72
- height: "16px"
73
- })]
74
- }), /* @__PURE__ */ jsx(Skeleton, {
75
- variant: "text",
76
- width: "50px",
77
- height: "16px"
78
- }), /* @__PURE__ */ jsxs(SKTSvgIconButtonContainer, {
79
- children: [/* @__PURE__ */ jsx(SKTSvgIconButton, {
80
- children: /* @__PURE__ */ jsx(Skeleton, {
81
- variant: "circular",
82
- width: 20,
83
- height: 20
84
- })
85
- }), /* @__PURE__ */ jsx(SKTSvgIconButton, {
86
- children: /* @__PURE__ */ jsx(Skeleton, {
87
- variant: "circular",
88
- width: 20,
89
- height: 20
90
- })
91
- }), /* @__PURE__ */ jsx(SKTSvgIconButton, {
92
- children: /* @__PURE__ */ jsx(Skeleton, {
93
- variant: "circular",
94
- width: 20,
95
- height: 20
96
- })
97
- }), /* @__PURE__ */ jsx(SKTSvgIconButton, {
98
- children: /* @__PURE__ */ jsx(Skeleton, {
99
- variant: "circular",
100
- width: 20,
101
- height: 20
102
- })
103
- })]
104
- })]
105
- });
106
- }
107
- return /* @__PURE__ */ jsx(TablePagination, {
108
- id: "TablePagination",
109
- rowsPerPageOptions,
110
- component: "div",
111
- count: totalRecords,
112
- rowsPerPage,
113
- page: currentPage,
114
- onPageChange: handleChangePage,
115
- onRowsPerPageChange: handleChangeRowsPerPage,
116
- labelDisplayedRows: isDesktop ? ({
117
- from,
118
- to,
119
- count
120
- }) => `${from}-${to} ${labelOf} ${count}` : () => ``,
121
- labelRowsPerPage: isDesktop ? labelRows : "",
122
- ActionsComponent: PagerActions
123
- });
124
- }
125
- function getPagerComponentsDictionary() {
126
- return ["pager"];
127
- }
128
- const defaultPagerDictionary = {
129
- pager: {
130
- first: "First",
131
- previous: "Previous",
132
- before: "Before",
133
- last: "Last",
134
- of: "of"
135
- }
136
- };
137
- export { Pager as P, defaultPagerDictionary as d, getPagerComponentsDictionary as g };
@@ -1,30 +0,0 @@
1
- import { useModuleSkeleton } from "@m4l/core";
2
- import { Skeleton, Tab as Tab$1 } from "@mui/material";
3
- import { styled } from "@mui/material/styles";
4
- import { jsx } from "react/jsx-runtime";
5
- const SKTTabWrapper = styled("div")(({
6
- theme
7
- }) => ({
8
- padding: theme.spacing(1.5, 2)
9
- }));
10
- function Tab(props) {
11
- const {
12
- SKTWidth,
13
- SKTHeight,
14
- ...other
15
- } = props;
16
- const isSkeleton = useModuleSkeleton();
17
- if (isSkeleton) {
18
- return /* @__PURE__ */ jsx(SKTTabWrapper, {
19
- children: /* @__PURE__ */ jsx(Skeleton, {
20
- variant: "text",
21
- width: SKTWidth,
22
- height: SKTHeight
23
- })
24
- });
25
- }
26
- return /* @__PURE__ */ jsx(Tab$1, {
27
- ...other
28
- });
29
- }
30
- export { Tab as T };
@@ -1,21 +0,0 @@
1
- import { Skeleton, Typography as Typography$1 } from "@mui/material";
2
- import { jsx } from "react/jsx-runtime";
3
- function Typography(props) {
4
- const {
5
- skeletonProps = {},
6
- ...other
7
- } = props;
8
- const {
9
- isSkeleton = "false",
10
- width = "100%",
11
- height = "14px"
12
- } = skeletonProps;
13
- return isSkeleton ? /* @__PURE__ */ jsx(Skeleton, {
14
- variant: "text",
15
- width,
16
- height
17
- }) : /* @__PURE__ */ jsx(Typography$1, {
18
- ...other
19
- });
20
- }
21
- export { Typography as T };