@m4l/components 9.72.1-beta-m4lcom-785-data-grids-implementar-la-funcionalidad-de-scroll-infinito.0 → 9.73.0
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/components/Pager/subcomponents/CustomTablePagination/CustomTablePagination.d.ts.map +1 -1
- package/components/Pager/subcomponents/CustomTablePagination/CustomTablePagination.js +61 -53
- package/components/datagrids/Datagrid.styles.d.ts.map +1 -1
- package/components/datagrids/Datagrid.styles.js +298 -332
- package/components/datagrids/components/BaseDataGrid/BaseDataGrid.d.ts.map +1 -1
- package/components/datagrids/components/BaseDataGrid/BaseDataGrid.js +95 -101
- package/components/datagrids/constants.d.ts +0 -3
- package/components/datagrids/constants.d.ts.map +1 -1
- package/components/datagrids/constants.js +5 -7
- package/components/datagrids/contexts/DataGridContext/DataGridContext.d.ts.map +1 -1
- package/components/datagrids/contexts/DataGridContext/DataGridContext.js +102 -112
- package/components/datagrids/contexts/DataGridContext/types.d.ts +3 -18
- package/components/datagrids/contexts/DataGridContext/types.d.ts.map +1 -1
- package/components/datagrids/dictionary.d.ts +0 -4
- package/components/datagrids/dictionary.d.ts.map +1 -1
- package/components/datagrids/dictionary.js +9 -16
- package/components/datagrids/helpers/index.d.ts +0 -3
- package/components/datagrids/helpers/index.d.ts.map +1 -1
- package/components/datagrids/hooks/index.d.ts +0 -2
- package/components/datagrids/hooks/index.d.ts.map +1 -1
- package/components/datagrids/hooks/useRemeasureOnReady/useRemeasureOnReady.d.ts +1 -4
- package/components/datagrids/hooks/useRemeasureOnReady/useRemeasureOnReady.d.ts.map +1 -1
- package/components/datagrids/hooks/useRemeasureOnReady/useRemeasureOnReady.js +25 -33
- package/components/datagrids/index.d.ts +2 -4
- package/components/datagrids/index.d.ts.map +1 -1
- package/components/datagrids/slots/DataGridEnum.d.ts +0 -4
- package/components/datagrids/slots/DataGridEnum.d.ts.map +1 -1
- package/components/datagrids/slots/DataGridEnum.js +4 -5
- package/components/datagrids/slots/DataGridSlot.d.ts +0 -11
- package/components/datagrids/slots/DataGridSlot.d.ts.map +1 -1
- package/components/datagrids/slots/DataGridSlot.js +113 -121
- package/components/datagrids/subcomponents/index.d.ts +0 -1
- package/components/datagrids/subcomponents/index.d.ts.map +1 -1
- package/components/datagrids/types.d.ts +4 -77
- package/components/datagrids/types.d.ts.map +1 -1
- package/components/datagrids/views/CardsView/CardsView.d.ts.map +1 -1
- package/components/datagrids/views/CardsView/CardsView.js +61 -64
- package/components/datagrids/views/CardsView/hooks/useCardsPerRow/useCardsPerRow.d.ts.map +1 -1
- package/components/datagrids/views/CardsView/hooks/useCardsPerRow/useCardsPerRow.js +14 -18
- package/components/datagrids/views/ListView/ListView.d.ts.map +1 -1
- package/components/datagrids/views/ListView/ListView.js +38 -41
- package/components/datagrids/views/TableView/TableView.d.ts.map +1 -1
- package/components/datagrids/views/TableView/TableView.js +73 -76
- package/components/datagrids/views/TableView/helpers/getDragHeaderRenderer/getDragHeaderRenderer.d.ts +0 -1
- package/components/datagrids/views/TableView/helpers/getDragHeaderRenderer/getDragHeaderRenderer.d.ts.map +1 -1
- package/components/datagrids/views/TableView/helpers/getDragHeaderRenderer/getDragHeaderRenderer.js +8 -9
- package/components/datagrids/views/TableView/hooks/useHeaderMenuActions/useHeaderMenuActions.d.ts.map +1 -1
- package/components/datagrids/views/TableView/hooks/useHeaderMenuActions/useHeaderMenuActions.js +138 -117
- package/components/datagrids/views/TableView/hooks/useSortColumnsRows/useSortColumnsRows.d.ts.map +1 -1
- package/components/datagrids/views/TableView/hooks/useSortColumnsRows/useSortColumnsRows.js +54 -57
- package/components/datagrids/views/TableView/subcomponents/DraggableHeaderRenderer/DraggableHeaderRenderer.d.ts.map +1 -1
- package/components/datagrids/views/TableView/subcomponents/DraggableHeaderRenderer/DraggableHeaderRenderer.js +82 -108
- package/components/datagrids/views/TableView/subcomponents/DraggableHeaderRenderer/types.d.ts +0 -2
- package/components/datagrids/views/TableView/subcomponents/DraggableHeaderRenderer/types.d.ts.map +1 -1
- package/components/extended/mui/Accordion/Accordion.d.ts.map +1 -1
- package/components/extended/mui/Accordion/Accordion.js +66 -64
- package/components/extended/mui/Accordion/slots/AccordionEnum.d.ts +1 -0
- package/components/extended/mui/Accordion/slots/AccordionEnum.d.ts.map +1 -1
- package/components/extended/mui/Accordion/slots/AccordionEnum.js +2 -2
- package/components/extended/mui/Accordion/slots/AccordionSlots.d.ts +3 -0
- package/components/extended/mui/Accordion/slots/AccordionSlots.d.ts.map +1 -1
- package/components/extended/mui/Accordion/slots/AccordionSlots.js +19 -15
- package/components/extended/mui/Accordion/styles.d.ts.map +1 -1
- package/components/extended/mui/Accordion/styles.js +12 -2
- package/components/extended/mui/Accordion/types.d.ts +4 -0
- package/components/extended/mui/Accordion/types.d.ts.map +1 -1
- package/index.js +722 -725
- package/package.json +8 -8
- package/components/Pager/subcomponents/RowsPerPageSelect/RowsPerPageSelect.d.ts +0 -7
- package/components/Pager/subcomponents/RowsPerPageSelect/RowsPerPageSelect.d.ts.map +0 -1
- package/components/Pager/subcomponents/RowsPerPageSelect/RowsPerPageSelect.js +0 -28
- package/components/Pager/subcomponents/RowsPerPageSelect/types.d.ts +0 -20
- package/components/Pager/subcomponents/RowsPerPageSelect/types.d.ts.map +0 -1
- package/components/datagrids/helpers/normalizeHeaderClickDeferMs.d.ts +0 -5
- package/components/datagrids/helpers/normalizeHeaderClickDeferMs.d.ts.map +0 -1
- package/components/datagrids/helpers/normalizeHeaderClickDeferMs.js +0 -7
- package/components/datagrids/helpers/shared/attachScrollElement/attachScrollElement.d.ts +0 -9
- package/components/datagrids/helpers/shared/attachScrollElement/attachScrollElement.d.ts.map +0 -1
- package/components/datagrids/helpers/shared/attachScrollElement/attachScrollElement.js +0 -14
- package/components/datagrids/helpers/shared/attachScrollElement/index.d.ts +0 -3
- package/components/datagrids/helpers/shared/attachScrollElement/index.d.ts.map +0 -1
- package/components/datagrids/helpers/shared/attachScrollElement/types.d.ts +0 -14
- package/components/datagrids/helpers/shared/attachScrollElement/types.d.ts.map +0 -1
- package/components/datagrids/helpers/shared/buildCursorExportPaginationInfo/buildCursorExportPaginationInfo.d.ts +0 -4
- package/components/datagrids/helpers/shared/buildCursorExportPaginationInfo/buildCursorExportPaginationInfo.d.ts.map +0 -1
- package/components/datagrids/helpers/shared/buildCursorExportPaginationInfo/buildCursorExportPaginationInfo.js +0 -14
- package/components/datagrids/helpers/shared/buildCursorExportPaginationInfo/index.d.ts +0 -3
- package/components/datagrids/helpers/shared/buildCursorExportPaginationInfo/index.d.ts.map +0 -1
- package/components/datagrids/helpers/shared/buildCursorExportPaginationInfo/types.d.ts +0 -11
- package/components/datagrids/helpers/shared/buildCursorExportPaginationInfo/types.d.ts.map +0 -1
- package/components/datagrids/helpers/shared/isNearBottom/index.d.ts +0 -2
- package/components/datagrids/helpers/shared/isNearBottom/index.d.ts.map +0 -1
- package/components/datagrids/helpers/shared/isNearBottom/isNearBottom.d.ts +0 -15
- package/components/datagrids/helpers/shared/isNearBottom/isNearBottom.d.ts.map +0 -1
- package/components/datagrids/helpers/shared/isNearBottom/isNearBottom.js +0 -6
- package/components/datagrids/hooks/shared/useInfiniteScroll/index.d.ts +0 -3
- package/components/datagrids/hooks/shared/useInfiniteScroll/index.d.ts.map +0 -1
- package/components/datagrids/hooks/shared/useInfiniteScroll/types.d.ts +0 -20
- package/components/datagrids/hooks/shared/useInfiniteScroll/types.d.ts.map +0 -1
- package/components/datagrids/hooks/shared/useInfiniteScroll/useInfiniteScroll.d.ts +0 -13
- package/components/datagrids/hooks/shared/useInfiniteScroll/useInfiniteScroll.d.ts.map +0 -1
- package/components/datagrids/hooks/shared/useInfiniteScroll/useInfiniteScroll.js +0 -38
- package/components/datagrids/hooks/useInfiniteScrollGate/index.d.ts +0 -3
- package/components/datagrids/hooks/useInfiniteScrollGate/index.d.ts.map +0 -1
- package/components/datagrids/hooks/useInfiniteScrollGate/types.d.ts +0 -32
- package/components/datagrids/hooks/useInfiniteScrollGate/types.d.ts.map +0 -1
- package/components/datagrids/hooks/useInfiniteScrollGate/useInfiniteScrollGate.d.ts +0 -17
- package/components/datagrids/hooks/useInfiniteScrollGate/useInfiniteScrollGate.d.ts.map +0 -1
- package/components/datagrids/hooks/useInfiniteScrollGate/useInfiniteScrollGate.js +0 -20
- package/components/datagrids/subcomponents/InfiniteScrollStatus/InfiniteScrollStatus.d.ts +0 -9
- package/components/datagrids/subcomponents/InfiniteScrollStatus/InfiniteScrollStatus.d.ts.map +0 -1
- package/components/datagrids/subcomponents/InfiniteScrollStatus/InfiniteScrollStatus.js +0 -65
- package/components/datagrids/subcomponents/InfiniteScrollStatus/index.d.ts +0 -3
- package/components/datagrids/subcomponents/InfiniteScrollStatus/index.d.ts.map +0 -1
- package/components/datagrids/subcomponents/InfiniteScrollStatus/types.d.ts +0 -11
- package/components/datagrids/subcomponents/InfiniteScrollStatus/types.d.ts.map +0 -1
- package/components/datagrids/views/CardsView/helpers/observeContainerWidth/index.d.ts +0 -3
- package/components/datagrids/views/CardsView/helpers/observeContainerWidth/index.d.ts.map +0 -1
- package/components/datagrids/views/CardsView/helpers/observeContainerWidth/observeContainerWidth.d.ts +0 -9
- package/components/datagrids/views/CardsView/helpers/observeContainerWidth/observeContainerWidth.d.ts.map +0 -1
- package/components/datagrids/views/CardsView/helpers/observeContainerWidth/observeContainerWidth.js +0 -13
- package/components/datagrids/views/CardsView/helpers/observeContainerWidth/types.d.ts +0 -14
- package/components/datagrids/views/CardsView/helpers/observeContainerWidth/types.d.ts.map +0 -1
- package/components/datagrids/views/CardsView/hooks/useCardsPerRow/types.d.ts +0 -15
- package/components/datagrids/views/CardsView/hooks/useCardsPerRow/types.d.ts.map +0 -1
- package/components/datagrids/views/TableView/hooks/useColumnSortRules/index.d.ts +0 -2
- package/components/datagrids/views/TableView/hooks/useColumnSortRules/index.d.ts.map +0 -1
- package/components/datagrids/views/TableView/hooks/useColumnSortRules/useColumnSortRules.d.ts +0 -25
- package/components/datagrids/views/TableView/hooks/useColumnSortRules/useColumnSortRules.d.ts.map +0 -1
- package/components/datagrids/views/TableView/hooks/useColumnSortRules/useColumnSortRules.js +0 -97
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomTablePagination.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/Pager/subcomponents/CustomTablePagination/CustomTablePagination.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AASrD;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,OAAO,0BAA0B,
|
|
1
|
+
{"version":3,"file":"CustomTablePagination.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/Pager/subcomponents/CustomTablePagination/CustomTablePagination.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AASrD;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,OAAO,0BAA0B,qDA6GtE,CAAC"}
|
|
@@ -1,65 +1,73 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { PagerActions as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
const
|
|
1
|
+
import { jsxs as w, Fragment as N, jsx as g } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { PagerActions as O } from "../PagerActions/PagerActions.js";
|
|
3
|
+
import { useState as L, useMemo as r, useEffect as x, useCallback as T } from "react";
|
|
4
|
+
import { useModuleDictionary as j } from "@m4l/core";
|
|
5
|
+
import { PAGER_DICTIONARY as P } from "../../dicctionary.js";
|
|
6
|
+
import { ContainerTotalRowSelectStyled as E, TotalRowStyled as I, LabelSelectContainerStyled as W, RowsPerPageStyled as F, ActionsContainerStyled as G } from "../../slots/PagerSlots.js";
|
|
7
|
+
import { Select as V } from "../../../extended/mui/Select/Select.js";
|
|
8
|
+
const U = (v) => {
|
|
9
9
|
const {
|
|
10
|
-
count:
|
|
11
|
-
page:
|
|
12
|
-
rowsPerPage:
|
|
13
|
-
rowsPerPageOptions:
|
|
14
|
-
onRowsPerPageChange:
|
|
10
|
+
count: t,
|
|
11
|
+
page: u,
|
|
12
|
+
rowsPerPage: d = 25,
|
|
13
|
+
rowsPerPageOptions: l = [10, 25, 50, 100],
|
|
14
|
+
onRowsPerPageChange: h,
|
|
15
15
|
onPageChange: c,
|
|
16
|
-
size:
|
|
17
|
-
labelOf:
|
|
18
|
-
labelTotalRows:
|
|
19
|
-
} =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}, [
|
|
23
|
-
|
|
24
|
-
}, [
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
27
|
-
return
|
|
28
|
-
const
|
|
29
|
-
return `${
|
|
30
|
-
}, [
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
}, [
|
|
34
|
-
|
|
16
|
+
size: m,
|
|
17
|
+
labelOf: p,
|
|
18
|
+
labelTotalRows: z
|
|
19
|
+
} = v, [n, S] = L(d), [b, f] = L(Math.max(0, u)), { getLabel: o } = j(), s = r(() => Math.max(1, Math.ceil(t / n)), [t, n]);
|
|
20
|
+
x(() => {
|
|
21
|
+
f(Math.max(0, Math.min(u, s - 1)));
|
|
22
|
+
}, [u, s]), x(() => {
|
|
23
|
+
l.includes(d) && S(d);
|
|
24
|
+
}, [d, l]);
|
|
25
|
+
const i = r(() => Math.max(0, Math.min(b, s - 1)), [b, s]), R = r(() => o(P.page), [o]), C = r(() => o(P.rows), [o]), A = r(() => o(P.rows_per_page), [o]), M = r(() => o(P.no_records), [o]), _ = r(() => {
|
|
26
|
+
if (t === 0)
|
|
27
|
+
return M;
|
|
28
|
+
const e = i + 1;
|
|
29
|
+
return `${R} ${e} ${p} ${s}`;
|
|
30
|
+
}, [i, s, t, p, R, M]), $ = T((e) => {
|
|
31
|
+
const a = Number(e.id), D = Math.ceil(t / a), y = Math.min(i, D - 1);
|
|
32
|
+
S(a), f(y), h && h({ id: a, value: a, label: `${a} ${C}` }), c && c(null, y);
|
|
33
|
+
}, [t, i, C, c, h]), k = T((e) => {
|
|
34
|
+
e && $(e);
|
|
35
35
|
}, [$]);
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
|
|
38
|
-
I,
|
|
36
|
+
return /* @__PURE__ */ w(N, { children: [
|
|
37
|
+
l?.length > 1 ? /* @__PURE__ */ w(E, { children: [
|
|
38
|
+
/* @__PURE__ */ g(I, { skeletonWidth: 50, size: m, variant: "bodyStandard", children: `${z}: ${Math.min(n, t - i * n)} ${p} ${t}` }),
|
|
39
|
+
/* @__PURE__ */ w(W, { children: [
|
|
40
|
+
/* @__PURE__ */ g(F, { skeletonWidth: 50, size: m, variant: "bodyStandard", children: `${A}:` }),
|
|
41
|
+
/* @__PURE__ */ g(
|
|
42
|
+
V,
|
|
43
|
+
{
|
|
44
|
+
size: m,
|
|
45
|
+
value: l.includes(n) ? n.toString() : l[0].toString(),
|
|
46
|
+
onChange: k,
|
|
47
|
+
options: l.map((e) => ({
|
|
48
|
+
id: e.toString(),
|
|
49
|
+
value: e.toString(),
|
|
50
|
+
label: e.toString()
|
|
51
|
+
}))
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
] })
|
|
55
|
+
] }) : null,
|
|
56
|
+
/* @__PURE__ */ g(G, { children: /* @__PURE__ */ g(
|
|
57
|
+
O,
|
|
39
58
|
{
|
|
40
|
-
size:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
rowsPerPage:
|
|
44
|
-
rowsPerPageOptions: g,
|
|
45
|
-
onChange: D
|
|
46
|
-
}
|
|
47
|
-
) : null,
|
|
48
|
-
/* @__PURE__ */ w(v, { children: /* @__PURE__ */ w(
|
|
49
|
-
E,
|
|
50
|
-
{
|
|
51
|
-
size: f,
|
|
52
|
-
count: e,
|
|
53
|
-
page: l,
|
|
54
|
-
rowsPerPage: r,
|
|
59
|
+
size: m,
|
|
60
|
+
count: t,
|
|
61
|
+
page: i,
|
|
62
|
+
rowsPerPage: n,
|
|
55
63
|
pageCounter: _,
|
|
56
|
-
onPageChange: (
|
|
57
|
-
|
|
64
|
+
onPageChange: (e, a) => {
|
|
65
|
+
f(a), c && c(e, a);
|
|
58
66
|
}
|
|
59
67
|
}
|
|
60
68
|
) })
|
|
61
69
|
] });
|
|
62
70
|
};
|
|
63
71
|
export {
|
|
64
|
-
|
|
72
|
+
U as CustomTablePagination
|
|
65
73
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Datagrid.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/datagrids/Datagrid.styles.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAIzC,eAAO,MAAM,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"Datagrid.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/datagrids/Datagrid.styles.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAIzC,eAAO,MAAM,cAAc,EAAE,cAs7C5B,CAAC"}
|