@m4l/components 0.1.80 → 0.1.82
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 +9 -1
- package/components/AccountPopover/AccountPopover.d.ts +21 -0
- package/components/AccountPopover/classes/types.d.ts +1 -1
- package/components/AccountPopover/{index.00d1d15f.js → index.0ba26726.js} +68 -72
- package/components/AccountPopover/subcomponents/MyAvatar/index.d.ts +2 -2
- package/components/AccountPopover/subcomponents/MyAvatar/types.d.ts +7 -0
- package/components/AccountPopover/subcomponents/PopOver/index.d.ts +6 -0
- package/components/AccountPopover/subcomponents/PopOver/types.d.ts +5 -4
- package/components/AccountPopover/types.d.ts +3 -4
- package/components/AppBar/{index.c85b100d.js → index.fadcefc6.js} +7 -7
- package/components/CommonActions/components/ActionCancel/{index.1051a117.js → index.6cf96d04.js} +2 -2
- package/components/CommonActions/components/ActionFormCancel/{index.a0d727b2.js → index.a0335cbf.js} +15 -15
- package/components/CommonActions/components/ActionFormIntro/{index.a20dc88d.js → index.273b1b9f.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.bfe3256c.js → index.856df8ef.js} +2 -2
- package/components/CommonActions/components/Actions/{index.19d67bc6.js → index.5abb6ac4.js} +13 -13
- package/components/DataGrid/classes/index.d.ts +1 -0
- package/components/DataGrid/classes/types.d.ts +1 -0
- package/components/DataGrid/constants.d.ts +1 -0
- package/components/DataGrid/{index.2f175eba.js → index.03ad08af.js} +28 -681
- package/components/DataGrid/subcomponents/Actions/index.db54ec98.js +621 -0
- package/components/DataGrid/subcomponents/editors/TextEditor/index.91380a55.js +64 -0
- package/components/DynamicFilter/constants.d.ts +1 -1
- package/components/DynamicFilter/{index.c1f9d560.js → index.9b72180b.js} +28 -28
- package/components/GridLayout/GridLayout.d.ts +1 -0
- package/components/GridLayout/classes/index.d.ts +4 -0
- package/components/GridLayout/classes/types.d.ts +17 -0
- package/components/GridLayout/constants.d.ts +26 -0
- package/components/GridLayout/{index.a792aacb.js → index.76bccc4f.js} +322 -575
- package/components/GridLayout/index.d.ts +4 -3
- package/components/GridLayout/subcomponents/Griditem/index.01fc14c3.js +370 -0
- package/components/GridLayout/subcomponents/Griditem/index.d.ts +9 -0
- package/components/GridLayout/subcomponents/Griditem/types.d.ts +103 -0
- package/components/GridLayout/subcomponents/Responsive/helper.d.ts +10 -0
- package/components/GridLayout/subcomponents/Responsive/index.d.ts +15 -2
- package/components/GridLayout/{Responsive/index.1671380a.js → subcomponents/Responsive/index.e589d8bf.js} +95 -139
- package/components/GridLayout/subcomponents/Responsive/responsiveUtils.d.ts +3 -6
- package/components/GridLayout/subcomponents/Responsive/types.d.ts +114 -33
- package/components/GridLayout/{WidthProvider/index.9a26dfe4.js → subcomponents/WidthProvider/index.50dafd87.js} +5 -5
- package/components/GridLayout/subcomponents/WidthProvider/index.d.ts +4 -5
- package/components/GridLayout/types.d.ts +83 -18
- package/components/GridLayout/utils.d.ts +15 -12
- package/components/HelperText/{index.6ef76993.js → index.6c3adb40.js} +7 -7
- package/components/Icon/{index.9fcd1476.js → index.2414ff25.js} +1 -1
- package/components/LanguagePopover/{index.1564bd08.js → index.66e11634.js} +7 -7
- package/components/ModalDialog/{index.fbc4cd71.js → index.4dc1c8ed.js} +4 -4
- package/components/NavLink/{index.6c9c2588.js → index.5859e048.js} +7 -7
- package/components/ObjectLogs/{index.eab1c15f.js → index.51de2deb.js} +17 -17
- package/components/PaperForm/{index.ba38a0bd.js → index.f931dc02.js} +1 -1
- package/components/Period/{index.26071a16.js → index.4fd9df2a.js} +14 -14
- package/components/PropertyValue/{index.18d3c0fd.js → index.1b09f426.js} +1 -1
- package/components/ScrollBar/{index.bbe48f4d.js → index.d4410cb5.js} +5 -0
- package/components/SideBar/{index.2f497e6c.js → index.72564ef2.js} +11 -6
- package/components/animate/AnimatedScroll/animatedScroll.d.ts +3 -0
- package/components/animate/AnimatedScroll/index.d.ts +1 -0
- package/components/animate/AnimatedScroll/types.d.ts +5 -0
- package/components/animate/index.4e9774a6.js +150 -0
- package/components/animate/index.d.ts +1 -0
- package/components/areas/components/AreasAdmin/{index.7a0dabbe.js → index.f011d49d.js} +60 -49
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/PanelWindowPopUp/index.d.ts +1 -1
- package/components/areas/components/AreasViewer/{index.fd49f06c.js → index.51a52736.js} +41 -153
- package/components/areas/components/{index.7756928a.js → index.f496660b.js} +11 -11
- package/components/areas/contexts/AreasContext/helper.d.ts +2 -2
- package/components/areas/contexts/AreasContext/{index.0a08a08b.js → index.9820bc7f.js} +12 -6
- package/components/areas/contexts/AreasContext/types.d.ts +4 -4
- package/components/areas/contexts/{index.b303b664.js → index.361acb6f.js} +1 -1
- package/components/areas/hooks/useAreas/{index.c6eb2569.js → index.b403f383.js} +1 -1
- package/components/areas/{index.6e67d89a.js → index.eacab372.js} +11 -11
- package/components/formatters/BooleanFormatter/{index.e8de8e4c.js → index.32de0803.js} +1 -1
- package/components/formatters/{index.67aeb049.js → index.d16d2331.js} +2 -2
- package/components/hook-form/RHFAutocomplete/{index.d1bbb015.js → index.6edb51b1.js} +8 -8
- package/components/hook-form/RHFAutocompleteAsync/{index.f9a9ef48.js → index.c2ca5c66.js} +1 -1
- package/components/hook-form/RHFCheckbox/{index.7b4a21d7.js → index.c6c3933b.js} +8 -8
- package/components/hook-form/RHFDateTime/{index.46cf616e.js → index.3add0fa4.js} +8 -8
- package/components/hook-form/RHFPeriod/{index.ce513149.js → index.72edef4d.js} +2 -2
- package/components/hook-form/RHFTextField/{index.f7ee202c.js → index.20daa95e.js} +3 -3
- package/components/hook-form/RHFUpload/{index.1befd5bb.js → index.cc5adc15.js} +8 -8
- package/components/modal/{WindowBase.7e19843e.js → WindowBase.4016485b.js} +9 -9
- package/components/modal/{WindowConfirm.12a9608a.js → WindowConfirm.f148e495.js} +16 -16
- package/components/modal/{index.b0a7236c.js → index.e9fece72.js} +13 -13
- package/components/mui_extended/Accordion/{index.a6447bf8.js → index.42cef1c7.js} +3 -3
- package/components/mui_extended/Avatar/types.d.ts +3 -1
- package/components/mui_extended/Button/classes/types.d.ts +3 -0
- package/components/mui_extended/Button/{index.4288f9fc.js → index.40af964e.js} +8 -3
- package/components/mui_extended/Button/types.d.ts +2 -1
- package/components/mui_extended/IconButton/{index.12f1a3c3.js → index.a318316e.js} +1 -1
- package/components/mui_extended/MenuActions/{index.43a2e1ae.js → index.f6bfdd40.js} +2 -2
- package/components/mui_extended/Pager/classes/index.d.ts +12 -0
- package/components/mui_extended/Pager/classes/types.d.ts +12 -4
- package/components/mui_extended/Pager/{index.82e89328.js → index.da26e9d4.js} +114 -62
- package/components/mui_extended/Pager/subcomponents/CustomTablePagination/index.d.ts +3 -0
- package/components/mui_extended/Pager/subcomponents/CustomTablePagination/types.d.ts +12 -0
- package/components/mui_extended/Pager/{components → subcomponents}/PagerActions/types.d.ts +2 -0
- package/components/mui_extended/Tab/{index.c39a6681.js → index.0d5f96e6.js} +1 -1
- package/components/mui_extended/{index.d78bde19.js → index.f6a356b9.js} +7 -7
- package/contexts/ModalContext/{index.89805978.js → index.efc1135a.js} +1 -1
- package/contexts/RHFormContext/{index.fe175bab.js → index.b9266262.js} +1 -1
- package/hooks/useModal/{index.e1c5c31e.js → index.9b0cc3fe.js} +1 -1
- package/index.js +92 -88
- package/package.json +1 -2
- package/{vendor.f57d47a7.js → vendor.88ed58a5.js} +51 -48
- package/components/AccountPopover/subcomponents/MyAvatar/createAvatar.d.ts +0 -4
- package/components/GridLayout/subcomponents/GridItem/index.d.ts +0 -26
- package/components/GridLayout/subcomponents/GridItem/types.d.ts +0 -78
- package/components/animate/index.1f8eadd4.js +0 -66
- /package/components/mui_extended/Pager/{components → subcomponents}/PagerActions/index.d.ts +0 -0
|
@@ -3,8 +3,8 @@ import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
|
3
3
|
import { IconButton, MenuItem, Badge } from "@mui/material";
|
|
4
4
|
import { P as Popover } from "../Popover/index.9f35d0eb.js";
|
|
5
5
|
import { styled } from "@mui/material/styles";
|
|
6
|
-
import { I as Icon } from "../../Icon/index.
|
|
7
|
-
import { I as IconButton$1 } from "../IconButton/index.
|
|
6
|
+
import { I as Icon } from "../../Icon/index.2414ff25.js";
|
|
7
|
+
import { I as IconButton$1 } from "../IconButton/index.a318316e.js";
|
|
8
8
|
import clsx from "clsx";
|
|
9
9
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
10
10
|
styled(IconButton)(() => ({}));
|
|
@@ -2,9 +2,21 @@ import { PagerClassesType } from './types';
|
|
|
2
2
|
export declare const pagerClasses: PagerClassesType;
|
|
3
3
|
export declare function getPagerUtilityClass(slot: string): string;
|
|
4
4
|
export declare const pagerUtilityClasses: () => {
|
|
5
|
+
select: string;
|
|
5
6
|
root: string;
|
|
6
7
|
skeletonRoot: string;
|
|
8
|
+
labelRowsPerPageContainer: string;
|
|
9
|
+
selectMenuPopover: string;
|
|
10
|
+
selectMenuItem: string;
|
|
11
|
+
labelDisplayRows: string;
|
|
12
|
+
pagerActions: string;
|
|
13
|
+
customTablePaginationRoot: string;
|
|
7
14
|
skeletonRowsPerPage: string;
|
|
8
15
|
skeletonButtonContainer: string;
|
|
9
16
|
skeletonIconButton: string;
|
|
17
|
+
actionIconFirstPage: string;
|
|
18
|
+
actionIconPrevious: string;
|
|
19
|
+
actionIconNextPage: string;
|
|
20
|
+
actionIconLastPage: string;
|
|
21
|
+
labelRowsPager: string;
|
|
10
22
|
};
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { pagerUtilityClasses } from ".";
|
|
2
2
|
export interface PagerClassesType {
|
|
3
3
|
root: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
labelRowsPerPageContainer: string;
|
|
5
|
+
labelRowsPager: string;
|
|
6
|
+
select: string;
|
|
7
|
+
selectMenuPopover: string;
|
|
8
|
+
selectMenuItem: string;
|
|
9
|
+
labelDisplayRows: string;
|
|
10
|
+
pagerActions: string;
|
|
11
|
+
customTablePaginationRoot: string;
|
|
12
|
+
actionIconFirstPage: string;
|
|
13
|
+
actionIconPrevious: string;
|
|
14
|
+
actionIconNextPage: string;
|
|
15
|
+
actionIconLastPage: string;
|
|
8
16
|
}
|
|
9
17
|
export declare type PagerClassesKey = keyof PagerClassesType;
|
|
10
18
|
export declare type Classes = ReturnType<typeof pagerUtilityClasses>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
|
-
import { generateUtilityClasses, generateUtilityClass, TablePagination, Skeleton } from "@mui/material";
|
|
3
2
|
import { styled } from "@mui/material/styles";
|
|
4
|
-
import { I as IconButton } from "../IconButton/index.
|
|
3
|
+
import { I as IconButton } from "../IconButton/index.a318316e.js";
|
|
5
4
|
import { useEnvironment } from "@m4l/core";
|
|
6
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
5
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
6
|
+
import { generateUtilityClasses, generateUtilityClass, useTheme, Select, InputBase, MenuItem } from "@mui/material";
|
|
7
7
|
import { unstable_composeClasses } from "@mui/base";
|
|
8
|
+
import { T as Typography } from "../Typography/index.443590d6.js";
|
|
8
9
|
const WrapperPagerActions = styled("div")(({ theme }) => ({
|
|
9
10
|
width: "100%",
|
|
10
11
|
justifyContent: "center",
|
|
@@ -21,7 +22,8 @@ function PagerActions(props) {
|
|
|
21
22
|
count,
|
|
22
23
|
page,
|
|
23
24
|
rowsPerPage,
|
|
24
|
-
onPageChange
|
|
25
|
+
onPageChange,
|
|
26
|
+
classes
|
|
25
27
|
} = props;
|
|
26
28
|
const {
|
|
27
29
|
host_static_assets,
|
|
@@ -40,31 +42,35 @@ function PagerActions(props) {
|
|
|
40
42
|
onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));
|
|
41
43
|
};
|
|
42
44
|
return /* @__PURE__ */ jsxs(WrapperPagerActions, {
|
|
43
|
-
|
|
45
|
+
className: classes.pagerActions,
|
|
44
46
|
children: [/* @__PURE__ */ jsx(IconButton, {
|
|
45
47
|
id: "test_bruce",
|
|
46
48
|
dictionaryTooltipId: "pager.first",
|
|
47
49
|
onClick: handleFirstPageButtonClick,
|
|
48
50
|
disabled: page === 0,
|
|
49
51
|
"aria-label": "first page",
|
|
52
|
+
className: classes.actionIconFirstPage,
|
|
50
53
|
src: `${host_static_assets}/${environment_assets}/frontend/components/pager/assets/icons/first.svg`
|
|
51
54
|
}), /* @__PURE__ */ jsx(IconButton, {
|
|
52
55
|
dictionaryTooltipId: "pager.previous",
|
|
53
56
|
onClick: handleBackButtonClick,
|
|
54
57
|
disabled: page === 0,
|
|
55
58
|
"aria-label": "first page",
|
|
59
|
+
className: classes.actionIconPrevious,
|
|
56
60
|
src: `${host_static_assets}/${environment_assets}/frontend/components/pager/assets/icons/previous.svg`
|
|
57
61
|
}), /* @__PURE__ */ jsx(IconButton, {
|
|
58
62
|
dictionaryTooltipId: "pager.next",
|
|
59
63
|
onClick: handleNextButtonClick,
|
|
60
64
|
disabled: page >= Math.ceil(count / rowsPerPage) - 1,
|
|
61
65
|
"aria-label": "next page",
|
|
66
|
+
className: classes.actionIconNextPage,
|
|
62
67
|
src: `${host_static_assets}/${environment_assets}/frontend/components/pager/assets/icons/next.svg`
|
|
63
68
|
}), /* @__PURE__ */ jsx(IconButton, {
|
|
64
69
|
dictionaryTooltipId: "pager.last",
|
|
65
70
|
onClick: handleLastPageButtonClick,
|
|
66
71
|
disabled: page >= Math.ceil(count / rowsPerPage) - 1,
|
|
67
72
|
"aria-label": "last page",
|
|
73
|
+
className: classes.actionIconLastPage,
|
|
68
74
|
src: `${host_static_assets}/${environment_assets}/frontend/components/pager/assets/icons/last.svg`
|
|
69
75
|
})]
|
|
70
76
|
});
|
|
@@ -105,10 +111,22 @@ styled("div")(({ theme }) => ({
|
|
|
105
111
|
const componentName = "M4LPager";
|
|
106
112
|
generateUtilityClasses(componentName, [
|
|
107
113
|
"root",
|
|
114
|
+
"labelRowsPerPageContainer",
|
|
115
|
+
"labelRowsPager",
|
|
116
|
+
"select",
|
|
117
|
+
"selectMenuItem",
|
|
118
|
+
"selectMenuPopover",
|
|
119
|
+
"labelDisplayRows",
|
|
120
|
+
"pagerActions",
|
|
121
|
+
"customTablePaginationRoot",
|
|
108
122
|
"skeletonRoot",
|
|
109
123
|
"skeletonRowsPerPage",
|
|
110
124
|
"skeletonButtonContainer",
|
|
111
|
-
"skeletonIconButton"
|
|
125
|
+
"skeletonIconButton",
|
|
126
|
+
"actionIconFirstPage",
|
|
127
|
+
"actionIconPrevious",
|
|
128
|
+
"actionIconNextPage",
|
|
129
|
+
"actionIconLastPage"
|
|
112
130
|
]);
|
|
113
131
|
function getPagerUtilityClass(slot) {
|
|
114
132
|
return generateUtilityClass(componentName, slot);
|
|
@@ -116,16 +134,101 @@ function getPagerUtilityClass(slot) {
|
|
|
116
134
|
const pagerUtilityClasses = () => {
|
|
117
135
|
const slots = {
|
|
118
136
|
root: ["root"],
|
|
137
|
+
labelRowsPerPageContainer: ["labelRowsPerPageContainer"],
|
|
138
|
+
labelRowsPager: ["labelRowsBager"],
|
|
139
|
+
select: ["select"],
|
|
140
|
+
selectMenuPopover: ["selectMenuPopover"],
|
|
141
|
+
selectMenuItem: ["selectMenuItem"],
|
|
142
|
+
labelDisplayRows: ["labelDisplayRows"],
|
|
143
|
+
pagerActions: ["pagerActions"],
|
|
144
|
+
customTablePaginationRoot: ["customTablePaginationRoot"],
|
|
119
145
|
skeletonRoot: ["skeletonRoot"],
|
|
120
146
|
skeletonRowsPerPage: ["skeletonRowsPerPage"],
|
|
121
147
|
skeletonButtonContainer: ["skeletonButtonContainer"],
|
|
122
|
-
skeletonIconButton: ["skeletonIconButton"]
|
|
148
|
+
skeletonIconButton: ["skeletonIconButton"],
|
|
149
|
+
actionIconFirstPage: ["actionIconFirstPage"],
|
|
150
|
+
actionIconPrevious: ["actionIconPrevious"],
|
|
151
|
+
actionIconNextPage: ["actionIconNextPage"],
|
|
152
|
+
actionIconLastPage: ["actionIconLastPage"]
|
|
123
153
|
};
|
|
124
154
|
const composedClasses = unstable_composeClasses(slots, getPagerUtilityClass, {});
|
|
125
155
|
return {
|
|
126
156
|
...composedClasses
|
|
127
157
|
};
|
|
128
158
|
};
|
|
159
|
+
const CustomTablePagination = (props) => {
|
|
160
|
+
const {
|
|
161
|
+
count,
|
|
162
|
+
page,
|
|
163
|
+
rowsPerPage,
|
|
164
|
+
rowsPerPageOptions = [10, 25, 50, 100],
|
|
165
|
+
labelRowsPerPage,
|
|
166
|
+
classes,
|
|
167
|
+
onRowsPerPageChange,
|
|
168
|
+
onPageChange,
|
|
169
|
+
SelectProps,
|
|
170
|
+
labelDisplayedRows = defaultLabelDisplayedRows,
|
|
171
|
+
ActionsComponent
|
|
172
|
+
} = props;
|
|
173
|
+
const theme = useTheme();
|
|
174
|
+
function defaultLabelDisplayedRows({
|
|
175
|
+
from,
|
|
176
|
+
to,
|
|
177
|
+
count: count2
|
|
178
|
+
}) {
|
|
179
|
+
return `${from}\u2013${to} of ${count2 !== -1 ? count2 : `more than ${to}`}`;
|
|
180
|
+
}
|
|
181
|
+
const getLabelDisplayedRowsTo = () => {
|
|
182
|
+
if (count === -1) {
|
|
183
|
+
return (page + 1) * rowsPerPage;
|
|
184
|
+
}
|
|
185
|
+
return rowsPerPage === -1 ? count : Math.min(count, (page + 1) * rowsPerPage);
|
|
186
|
+
};
|
|
187
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
188
|
+
children: [rowsPerPageOptions?.length > 1 ? /* @__PURE__ */ jsxs("div", {
|
|
189
|
+
className: classes.labelRowsPerPageContainer,
|
|
190
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
191
|
+
variant: "body",
|
|
192
|
+
children: labelRowsPerPage
|
|
193
|
+
}), /* @__PURE__ */ jsx(Select, {
|
|
194
|
+
variant: "standard",
|
|
195
|
+
...!SelectProps?.variant && {
|
|
196
|
+
input: /* @__PURE__ */ jsx(InputBase, {})
|
|
197
|
+
},
|
|
198
|
+
value: rowsPerPage,
|
|
199
|
+
onChange: onRowsPerPageChange,
|
|
200
|
+
className: classes.select,
|
|
201
|
+
MenuProps: {
|
|
202
|
+
className: classes.selectMenuPopover,
|
|
203
|
+
sx: {
|
|
204
|
+
...theme.components?.M4LPagerMenuPopover?.styleOverrides
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
...SelectProps,
|
|
208
|
+
children: rowsPerPageOptions.map((item, idx) => /* @__PURE__ */ jsx(MenuItem, {
|
|
209
|
+
className: classes.selectMenuItem,
|
|
210
|
+
value: item,
|
|
211
|
+
children: item
|
|
212
|
+
}, `${classes.selectMenuItem}-${idx}`))
|
|
213
|
+
})]
|
|
214
|
+
}) : null, /* @__PURE__ */ jsx(Typography, {
|
|
215
|
+
variant: "body",
|
|
216
|
+
className: classes.labelDisplayRows,
|
|
217
|
+
children: labelDisplayedRows({
|
|
218
|
+
from: count === 0 ? 0 : page * rowsPerPage + 1,
|
|
219
|
+
to: getLabelDisplayedRowsTo(),
|
|
220
|
+
count: count === -1 ? -1 : count,
|
|
221
|
+
page
|
|
222
|
+
})
|
|
223
|
+
}), /* @__PURE__ */ jsx(ActionsComponent, {
|
|
224
|
+
count,
|
|
225
|
+
page,
|
|
226
|
+
rowsPerPage,
|
|
227
|
+
onPageChange: () => onPageChange,
|
|
228
|
+
classes
|
|
229
|
+
})]
|
|
230
|
+
});
|
|
231
|
+
};
|
|
129
232
|
function Pager(props) {
|
|
130
233
|
const {
|
|
131
234
|
totalRecords,
|
|
@@ -136,7 +239,6 @@ function Pager(props) {
|
|
|
136
239
|
onRowsPerPageChange,
|
|
137
240
|
labelRows = "Rows per page",
|
|
138
241
|
labelOf = "Of",
|
|
139
|
-
isSkeleton = "false",
|
|
140
242
|
isDesktop
|
|
141
243
|
} = props;
|
|
142
244
|
const currentPage = useMemo(() => {
|
|
@@ -145,7 +247,7 @@ function Pager(props) {
|
|
|
145
247
|
}
|
|
146
248
|
return page;
|
|
147
249
|
}, [page, rowsPerPage, totalRecords]);
|
|
148
|
-
const handleChangeRowsPerPage = (event) => {
|
|
250
|
+
const handleChangeRowsPerPage = (event, _child) => {
|
|
149
251
|
onRowsPerPageChange(parseInt(event.target.value, 10));
|
|
150
252
|
onPageChange(0);
|
|
151
253
|
};
|
|
@@ -155,12 +257,12 @@ function Pager(props) {
|
|
|
155
257
|
const classes = pagerUtilityClasses();
|
|
156
258
|
return /* @__PURE__ */ jsx(PagerRoot, {
|
|
157
259
|
className: classes.root,
|
|
158
|
-
children:
|
|
159
|
-
id: "TablePagination",
|
|
260
|
+
children: /* @__PURE__ */ jsx(CustomTablePagination, {
|
|
160
261
|
rowsPerPageOptions,
|
|
161
|
-
component: "div",
|
|
162
262
|
count: totalRecords,
|
|
163
263
|
rowsPerPage,
|
|
264
|
+
classes,
|
|
265
|
+
labelRowsPerPage: labelRows,
|
|
164
266
|
page: currentPage,
|
|
165
267
|
onPageChange: handleChangePage,
|
|
166
268
|
onRowsPerPageChange: handleChangeRowsPerPage,
|
|
@@ -169,57 +271,7 @@ function Pager(props) {
|
|
|
169
271
|
to,
|
|
170
272
|
count
|
|
171
273
|
}) => `${from}-${to} ${labelOf} ${count}` : () => ``,
|
|
172
|
-
labelRowsPerPage: isDesktop ? labelRows : "",
|
|
173
274
|
ActionsComponent: PagerActions
|
|
174
|
-
}) : /* @__PURE__ */ jsxs("div", {
|
|
175
|
-
className: classes.skeletonRoot,
|
|
176
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
177
|
-
className: classes.skeletonRowsPerPage,
|
|
178
|
-
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
179
|
-
variant: "text",
|
|
180
|
-
width: "40px",
|
|
181
|
-
height: "16px"
|
|
182
|
-
}), /* @__PURE__ */ jsx(Skeleton, {
|
|
183
|
-
variant: "text",
|
|
184
|
-
width: "20px",
|
|
185
|
-
height: "16px"
|
|
186
|
-
})]
|
|
187
|
-
}), /* @__PURE__ */ jsx(Skeleton, {
|
|
188
|
-
variant: "text",
|
|
189
|
-
width: "50px",
|
|
190
|
-
height: "16px"
|
|
191
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
192
|
-
className: classes.skeletonButtonContainer,
|
|
193
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
194
|
-
className: classes.skeletonIconButton,
|
|
195
|
-
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
196
|
-
variant: "circular",
|
|
197
|
-
width: 20,
|
|
198
|
-
height: 20
|
|
199
|
-
})
|
|
200
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
201
|
-
className: classes.skeletonIconButton,
|
|
202
|
-
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
203
|
-
variant: "circular",
|
|
204
|
-
width: 20,
|
|
205
|
-
height: 20
|
|
206
|
-
})
|
|
207
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
208
|
-
className: classes.skeletonIconButton,
|
|
209
|
-
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
210
|
-
variant: "circular",
|
|
211
|
-
width: 20,
|
|
212
|
-
height: 20
|
|
213
|
-
})
|
|
214
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
215
|
-
className: classes.skeletonIconButton,
|
|
216
|
-
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
217
|
-
variant: "circular",
|
|
218
|
-
width: 20,
|
|
219
|
-
height: 20
|
|
220
|
-
})
|
|
221
|
-
})]
|
|
222
|
-
})]
|
|
223
275
|
})
|
|
224
276
|
});
|
|
225
277
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SelectChangeEvent, TablePaginationProps } from "@mui/material";
|
|
2
|
+
import { Classes } from "../../classes/types";
|
|
3
|
+
import { PagerActionsProps } from "../PagerActions/types";
|
|
4
|
+
import { ReactNode } from "react";
|
|
5
|
+
export declare type CustomTablePaginationProps = {
|
|
6
|
+
rowsPerPageOptions: number[];
|
|
7
|
+
onPageChange: (_event: unknown, newPage: number) => void;
|
|
8
|
+
labelRowsPerPage: string;
|
|
9
|
+
classes: Classes;
|
|
10
|
+
onRowsPerPageChange: (event: SelectChangeEvent<unknown>, child: ReactNode) => void;
|
|
11
|
+
ActionsComponent: React.ElementType<PagerActionsProps>;
|
|
12
|
+
} & Omit<TablePaginationProps, 'onPageChange' | 'onRowsPerPageChange' | 'classes' | 'ActionsComponent'>;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { Classes } from "../../classes/types";
|
|
2
3
|
export interface PagerActionsProps {
|
|
3
4
|
count: number;
|
|
4
5
|
page: number;
|
|
5
6
|
rowsPerPage: number;
|
|
6
7
|
onPageChange: (event: React.MouseEvent<HTMLButtonElement>, newPage: number) => void;
|
|
8
|
+
classes: Classes;
|
|
7
9
|
}
|
|
@@ -4,7 +4,7 @@ import { styled } from "@mui/material/styles";
|
|
|
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.88ed58a5.js";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
9
|
const TabRoot = styled("div")(({
|
|
10
10
|
theme
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import "@mui/material";
|
|
2
2
|
import "react";
|
|
3
3
|
import "@m4l/core";
|
|
4
|
-
import "../Icon/index.
|
|
4
|
+
import "../Icon/index.2414ff25.js";
|
|
5
5
|
import "clsx";
|
|
6
6
|
import "react/jsx-runtime";
|
|
7
|
-
import "./IconButton/index.
|
|
7
|
+
import "./IconButton/index.a318316e.js";
|
|
8
8
|
import "@m4l/graphics";
|
|
9
|
-
import "./Accordion/index.
|
|
9
|
+
import "./Accordion/index.42cef1c7.js";
|
|
10
10
|
import "./Typography/index.443590d6.js";
|
|
11
11
|
import "./Avatar/index.75e6ed57.js";
|
|
12
12
|
import "react-router-dom";
|
|
13
13
|
import "@mui/material/Button";
|
|
14
|
-
import "./Button/index.
|
|
14
|
+
import "./Button/index.40af964e.js";
|
|
15
15
|
import "./CheckBox.5f6c78b0.js";
|
|
16
16
|
import "./Badge/index.cad260fe.js";
|
|
17
17
|
import "../Image/index.c18ebf5a.js";
|
|
18
18
|
import "@mui/lab";
|
|
19
|
-
import "./MenuActions/index.
|
|
19
|
+
import "./MenuActions/index.f6bfdd40.js";
|
|
20
20
|
import "./Popover/index.9f35d0eb.js";
|
|
21
|
-
import "./Pager/index.
|
|
22
|
-
import "./Tab/index.
|
|
21
|
+
import "./Pager/index.da26e9d4.js";
|
|
22
|
+
import "./Tab/index.0d5f96e6.js";
|
|
23
23
|
import "./Tooltip/index.5a795dcd.js";
|
|
@@ -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.4dc1c8ed.js";
|
|
3
3
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
4
4
|
const ModalContext = createContext(null);
|
|
5
5
|
function ModalProvider({
|
|
@@ -2,7 +2,7 @@ import { useEffect } from "react";
|
|
|
2
2
|
import { useForm, FormProvider } from "react-hook-form";
|
|
3
3
|
import { yupResolver } from "@hookform/resolvers/yup";
|
|
4
4
|
import { styled } from "@mui/material/styles";
|
|
5
|
-
import { S as ScrollBar } from "../../components/ScrollBar/index.
|
|
5
|
+
import { S as ScrollBar } from "../../components/ScrollBar/index.d4410cb5.js";
|
|
6
6
|
import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
7
7
|
import { unstable_composeClasses } from "@mui/base";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -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.efc1135a.js";
|
|
3
3
|
function useModal() {
|
|
4
4
|
const context = useContext(ModalContext);
|
|
5
5
|
if (!context)
|