@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.
Files changed (130) hide show
  1. package/components/Pager/subcomponents/CustomTablePagination/CustomTablePagination.d.ts.map +1 -1
  2. package/components/Pager/subcomponents/CustomTablePagination/CustomTablePagination.js +61 -53
  3. package/components/datagrids/Datagrid.styles.d.ts.map +1 -1
  4. package/components/datagrids/Datagrid.styles.js +298 -332
  5. package/components/datagrids/components/BaseDataGrid/BaseDataGrid.d.ts.map +1 -1
  6. package/components/datagrids/components/BaseDataGrid/BaseDataGrid.js +95 -101
  7. package/components/datagrids/constants.d.ts +0 -3
  8. package/components/datagrids/constants.d.ts.map +1 -1
  9. package/components/datagrids/constants.js +5 -7
  10. package/components/datagrids/contexts/DataGridContext/DataGridContext.d.ts.map +1 -1
  11. package/components/datagrids/contexts/DataGridContext/DataGridContext.js +102 -112
  12. package/components/datagrids/contexts/DataGridContext/types.d.ts +3 -18
  13. package/components/datagrids/contexts/DataGridContext/types.d.ts.map +1 -1
  14. package/components/datagrids/dictionary.d.ts +0 -4
  15. package/components/datagrids/dictionary.d.ts.map +1 -1
  16. package/components/datagrids/dictionary.js +9 -16
  17. package/components/datagrids/helpers/index.d.ts +0 -3
  18. package/components/datagrids/helpers/index.d.ts.map +1 -1
  19. package/components/datagrids/hooks/index.d.ts +0 -2
  20. package/components/datagrids/hooks/index.d.ts.map +1 -1
  21. package/components/datagrids/hooks/useRemeasureOnReady/useRemeasureOnReady.d.ts +1 -4
  22. package/components/datagrids/hooks/useRemeasureOnReady/useRemeasureOnReady.d.ts.map +1 -1
  23. package/components/datagrids/hooks/useRemeasureOnReady/useRemeasureOnReady.js +25 -33
  24. package/components/datagrids/index.d.ts +2 -4
  25. package/components/datagrids/index.d.ts.map +1 -1
  26. package/components/datagrids/slots/DataGridEnum.d.ts +0 -4
  27. package/components/datagrids/slots/DataGridEnum.d.ts.map +1 -1
  28. package/components/datagrids/slots/DataGridEnum.js +4 -5
  29. package/components/datagrids/slots/DataGridSlot.d.ts +0 -11
  30. package/components/datagrids/slots/DataGridSlot.d.ts.map +1 -1
  31. package/components/datagrids/slots/DataGridSlot.js +113 -121
  32. package/components/datagrids/subcomponents/index.d.ts +0 -1
  33. package/components/datagrids/subcomponents/index.d.ts.map +1 -1
  34. package/components/datagrids/types.d.ts +4 -77
  35. package/components/datagrids/types.d.ts.map +1 -1
  36. package/components/datagrids/views/CardsView/CardsView.d.ts.map +1 -1
  37. package/components/datagrids/views/CardsView/CardsView.js +61 -64
  38. package/components/datagrids/views/CardsView/hooks/useCardsPerRow/useCardsPerRow.d.ts.map +1 -1
  39. package/components/datagrids/views/CardsView/hooks/useCardsPerRow/useCardsPerRow.js +14 -18
  40. package/components/datagrids/views/ListView/ListView.d.ts.map +1 -1
  41. package/components/datagrids/views/ListView/ListView.js +38 -41
  42. package/components/datagrids/views/TableView/TableView.d.ts.map +1 -1
  43. package/components/datagrids/views/TableView/TableView.js +73 -76
  44. package/components/datagrids/views/TableView/helpers/getDragHeaderRenderer/getDragHeaderRenderer.d.ts +0 -1
  45. package/components/datagrids/views/TableView/helpers/getDragHeaderRenderer/getDragHeaderRenderer.d.ts.map +1 -1
  46. package/components/datagrids/views/TableView/helpers/getDragHeaderRenderer/getDragHeaderRenderer.js +8 -9
  47. package/components/datagrids/views/TableView/hooks/useHeaderMenuActions/useHeaderMenuActions.d.ts.map +1 -1
  48. package/components/datagrids/views/TableView/hooks/useHeaderMenuActions/useHeaderMenuActions.js +138 -117
  49. package/components/datagrids/views/TableView/hooks/useSortColumnsRows/useSortColumnsRows.d.ts.map +1 -1
  50. package/components/datagrids/views/TableView/hooks/useSortColumnsRows/useSortColumnsRows.js +54 -57
  51. package/components/datagrids/views/TableView/subcomponents/DraggableHeaderRenderer/DraggableHeaderRenderer.d.ts.map +1 -1
  52. package/components/datagrids/views/TableView/subcomponents/DraggableHeaderRenderer/DraggableHeaderRenderer.js +82 -108
  53. package/components/datagrids/views/TableView/subcomponents/DraggableHeaderRenderer/types.d.ts +0 -2
  54. package/components/datagrids/views/TableView/subcomponents/DraggableHeaderRenderer/types.d.ts.map +1 -1
  55. package/components/extended/mui/Accordion/Accordion.d.ts.map +1 -1
  56. package/components/extended/mui/Accordion/Accordion.js +66 -64
  57. package/components/extended/mui/Accordion/slots/AccordionEnum.d.ts +1 -0
  58. package/components/extended/mui/Accordion/slots/AccordionEnum.d.ts.map +1 -1
  59. package/components/extended/mui/Accordion/slots/AccordionEnum.js +2 -2
  60. package/components/extended/mui/Accordion/slots/AccordionSlots.d.ts +3 -0
  61. package/components/extended/mui/Accordion/slots/AccordionSlots.d.ts.map +1 -1
  62. package/components/extended/mui/Accordion/slots/AccordionSlots.js +19 -15
  63. package/components/extended/mui/Accordion/styles.d.ts.map +1 -1
  64. package/components/extended/mui/Accordion/styles.js +12 -2
  65. package/components/extended/mui/Accordion/types.d.ts +4 -0
  66. package/components/extended/mui/Accordion/types.d.ts.map +1 -1
  67. package/index.js +722 -725
  68. package/package.json +8 -8
  69. package/components/Pager/subcomponents/RowsPerPageSelect/RowsPerPageSelect.d.ts +0 -7
  70. package/components/Pager/subcomponents/RowsPerPageSelect/RowsPerPageSelect.d.ts.map +0 -1
  71. package/components/Pager/subcomponents/RowsPerPageSelect/RowsPerPageSelect.js +0 -28
  72. package/components/Pager/subcomponents/RowsPerPageSelect/types.d.ts +0 -20
  73. package/components/Pager/subcomponents/RowsPerPageSelect/types.d.ts.map +0 -1
  74. package/components/datagrids/helpers/normalizeHeaderClickDeferMs.d.ts +0 -5
  75. package/components/datagrids/helpers/normalizeHeaderClickDeferMs.d.ts.map +0 -1
  76. package/components/datagrids/helpers/normalizeHeaderClickDeferMs.js +0 -7
  77. package/components/datagrids/helpers/shared/attachScrollElement/attachScrollElement.d.ts +0 -9
  78. package/components/datagrids/helpers/shared/attachScrollElement/attachScrollElement.d.ts.map +0 -1
  79. package/components/datagrids/helpers/shared/attachScrollElement/attachScrollElement.js +0 -14
  80. package/components/datagrids/helpers/shared/attachScrollElement/index.d.ts +0 -3
  81. package/components/datagrids/helpers/shared/attachScrollElement/index.d.ts.map +0 -1
  82. package/components/datagrids/helpers/shared/attachScrollElement/types.d.ts +0 -14
  83. package/components/datagrids/helpers/shared/attachScrollElement/types.d.ts.map +0 -1
  84. package/components/datagrids/helpers/shared/buildCursorExportPaginationInfo/buildCursorExportPaginationInfo.d.ts +0 -4
  85. package/components/datagrids/helpers/shared/buildCursorExportPaginationInfo/buildCursorExportPaginationInfo.d.ts.map +0 -1
  86. package/components/datagrids/helpers/shared/buildCursorExportPaginationInfo/buildCursorExportPaginationInfo.js +0 -14
  87. package/components/datagrids/helpers/shared/buildCursorExportPaginationInfo/index.d.ts +0 -3
  88. package/components/datagrids/helpers/shared/buildCursorExportPaginationInfo/index.d.ts.map +0 -1
  89. package/components/datagrids/helpers/shared/buildCursorExportPaginationInfo/types.d.ts +0 -11
  90. package/components/datagrids/helpers/shared/buildCursorExportPaginationInfo/types.d.ts.map +0 -1
  91. package/components/datagrids/helpers/shared/isNearBottom/index.d.ts +0 -2
  92. package/components/datagrids/helpers/shared/isNearBottom/index.d.ts.map +0 -1
  93. package/components/datagrids/helpers/shared/isNearBottom/isNearBottom.d.ts +0 -15
  94. package/components/datagrids/helpers/shared/isNearBottom/isNearBottom.d.ts.map +0 -1
  95. package/components/datagrids/helpers/shared/isNearBottom/isNearBottom.js +0 -6
  96. package/components/datagrids/hooks/shared/useInfiniteScroll/index.d.ts +0 -3
  97. package/components/datagrids/hooks/shared/useInfiniteScroll/index.d.ts.map +0 -1
  98. package/components/datagrids/hooks/shared/useInfiniteScroll/types.d.ts +0 -20
  99. package/components/datagrids/hooks/shared/useInfiniteScroll/types.d.ts.map +0 -1
  100. package/components/datagrids/hooks/shared/useInfiniteScroll/useInfiniteScroll.d.ts +0 -13
  101. package/components/datagrids/hooks/shared/useInfiniteScroll/useInfiniteScroll.d.ts.map +0 -1
  102. package/components/datagrids/hooks/shared/useInfiniteScroll/useInfiniteScroll.js +0 -38
  103. package/components/datagrids/hooks/useInfiniteScrollGate/index.d.ts +0 -3
  104. package/components/datagrids/hooks/useInfiniteScrollGate/index.d.ts.map +0 -1
  105. package/components/datagrids/hooks/useInfiniteScrollGate/types.d.ts +0 -32
  106. package/components/datagrids/hooks/useInfiniteScrollGate/types.d.ts.map +0 -1
  107. package/components/datagrids/hooks/useInfiniteScrollGate/useInfiniteScrollGate.d.ts +0 -17
  108. package/components/datagrids/hooks/useInfiniteScrollGate/useInfiniteScrollGate.d.ts.map +0 -1
  109. package/components/datagrids/hooks/useInfiniteScrollGate/useInfiniteScrollGate.js +0 -20
  110. package/components/datagrids/subcomponents/InfiniteScrollStatus/InfiniteScrollStatus.d.ts +0 -9
  111. package/components/datagrids/subcomponents/InfiniteScrollStatus/InfiniteScrollStatus.d.ts.map +0 -1
  112. package/components/datagrids/subcomponents/InfiniteScrollStatus/InfiniteScrollStatus.js +0 -65
  113. package/components/datagrids/subcomponents/InfiniteScrollStatus/index.d.ts +0 -3
  114. package/components/datagrids/subcomponents/InfiniteScrollStatus/index.d.ts.map +0 -1
  115. package/components/datagrids/subcomponents/InfiniteScrollStatus/types.d.ts +0 -11
  116. package/components/datagrids/subcomponents/InfiniteScrollStatus/types.d.ts.map +0 -1
  117. package/components/datagrids/views/CardsView/helpers/observeContainerWidth/index.d.ts +0 -3
  118. package/components/datagrids/views/CardsView/helpers/observeContainerWidth/index.d.ts.map +0 -1
  119. package/components/datagrids/views/CardsView/helpers/observeContainerWidth/observeContainerWidth.d.ts +0 -9
  120. package/components/datagrids/views/CardsView/helpers/observeContainerWidth/observeContainerWidth.d.ts.map +0 -1
  121. package/components/datagrids/views/CardsView/helpers/observeContainerWidth/observeContainerWidth.js +0 -13
  122. package/components/datagrids/views/CardsView/helpers/observeContainerWidth/types.d.ts +0 -14
  123. package/components/datagrids/views/CardsView/helpers/observeContainerWidth/types.d.ts.map +0 -1
  124. package/components/datagrids/views/CardsView/hooks/useCardsPerRow/types.d.ts +0 -15
  125. package/components/datagrids/views/CardsView/hooks/useCardsPerRow/types.d.ts.map +0 -1
  126. package/components/datagrids/views/TableView/hooks/useColumnSortRules/index.d.ts +0 -2
  127. package/components/datagrids/views/TableView/hooks/useColumnSortRules/index.d.ts.map +0 -1
  128. package/components/datagrids/views/TableView/hooks/useColumnSortRules/useColumnSortRules.d.ts +0 -25
  129. package/components/datagrids/views/TableView/hooks/useColumnSortRules/useColumnSortRules.d.ts.map +0 -1
  130. 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,qDAmGtE,CAAC"}
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 O, Fragment as j, jsx as w } from "@emotion/react/jsx-runtime";
2
- import { PagerActions as E } from "../PagerActions/PagerActions.js";
3
- import { RowsPerPageSelect as I } from "../RowsPerPageSelect/RowsPerPageSelect.js";
4
- import { useState as L, useMemo as n, useEffect as T, useCallback as z } from "react";
5
- import { useModuleDictionary as k } from "@m4l/core";
6
- import { PAGER_DICTIONARY as m } from "../../dicctionary.js";
7
- import { ActionsContainerStyled as v } from "../../slots/PagerSlots.js";
8
- const J = (y) => {
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: e,
11
- page: P,
12
- rowsPerPage: i = 25,
13
- rowsPerPageOptions: g = [10, 25, 50, 100],
14
- onRowsPerPageChange: u,
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: f,
17
- labelOf: h,
18
- labelTotalRows: A
19
- } = y, [r, p] = L(i), [R, d] = L(Math.max(0, P)), { getLabel: o } = k(), s = n(() => Math.max(1, Math.ceil(e / r)), [e, r]);
20
- T(() => {
21
- d(Math.max(0, Math.min(P, s - 1)));
22
- }, [P, s]), T(() => {
23
- g.includes(i) && p(i);
24
- }, [i, g]);
25
- const l = n(() => Math.max(0, Math.min(R, s - 1)), [R, s]), b = n(() => o(m.page), [o]), M = n(() => o(m.rows), [o]), S = n(() => o(m.rows_per_page), [o]), C = n(() => o(m.no_records), [o]), _ = n(() => {
26
- if (e === 0)
27
- return C;
28
- const a = l + 1;
29
- return `${b} ${a} ${h} ${s}`;
30
- }, [l, s, e, h, b, C]), $ = z((a) => {
31
- const t = Number(a.id), N = Math.ceil(e / t), x = Math.min(l, N - 1);
32
- p(t), d(x), u && u({ id: t, value: t, label: `${t} ${M}` }), c && c(null, x);
33
- }, [e, l, M, c, u]), D = z((a) => {
34
- a && $(a);
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__ */ O(j, { children: [
37
- g?.length > 1 ? /* @__PURE__ */ w(
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: f,
41
- totalRowText: `${A}: ${Math.min(r, e - l * r)} ${h} ${e}`,
42
- labelRowsPerPage: S,
43
- rowsPerPage: r,
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: (a, t) => {
57
- d(t), c && c(a, t);
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
- J as CustomTablePagination
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,cA09C5B,CAAC"}
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"}