@agregio-solutions/design-system 1.76.0 → 1.76.1
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/dist/design-system.cjs
CHANGED
|
@@ -1551,7 +1551,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Po]+=1);const $m=l.createCont
|
|
|
1551
1551
|
width: 100%;
|
|
1552
1552
|
`,XB=S.td`
|
|
1553
1553
|
padding: var(--spacing-sm);
|
|
1554
|
-
`;function JB({table:e,pagination:t,renderSubComponent:n,...
|
|
1554
|
+
`;function JB({table:e,pagination:t,renderSubComponent:n,itemsPerPageOptions:r,...a}){const o=e.getState().columnFilters.length>0||e.getState().globalFilter?.length>0;return d.jsxs("div",{...a,children:[d.jsx(YB,{children:d.jsxs(Ep,{children:[d.jsx("thead",{children:e.getHeaderGroups().map(i=>d.jsx("tr",{children:i.headers.map(u=>d.jsx(l.Fragment,{children:D4(u.column.columnDef.header,u.getContext())},u.id))},i.id))}),d.jsx("tbody",{children:e.getRowModel().rows.map(i=>d.jsxs(l.Fragment,{children:[d.jsx($p,{depth:i.depth,"data-sub-row-expanded":i.getIsExpanded(),"data-is-sub-row":!!i.getParentRow(),children:i.getVisibleCells().map(u=>d.jsx(l.Fragment,{children:D4(u.column.columnDef.cell,u.getContext())},u.id))}),i.getIsExpanded()&&!!n&&d.jsx("tr",{children:d.jsx(XB,{colSpan:i.getVisibleCells().length,children:n({row:i})})})]},i.id))})]})}),e.getRowCount()===0&&d.jsx(GB,{withFilters:o}),!!t&&d.jsx(wp,{count:e.getRowCount(),onPageChange:e.setPageIndex,pageIndex:t.pageIndex,onItemsPerPageChange:e.setPageSize,itemsPerPage:t.pageSize,itemsPerPageOptions:r,style:{marginTop:"16px"}})]})}const QB=S.td`
|
|
1555
1555
|
padding: 0;
|
|
1556
1556
|
|
|
1557
1557
|
&[data-border="left"],
|
package/dist/design-system.js
CHANGED
|
@@ -27279,38 +27279,39 @@ function cI({
|
|
|
27279
27279
|
table: e,
|
|
27280
27280
|
pagination: t,
|
|
27281
27281
|
renderSubComponent: n,
|
|
27282
|
-
|
|
27282
|
+
itemsPerPageOptions: r,
|
|
27283
|
+
...a
|
|
27283
27284
|
}) {
|
|
27284
|
-
const
|
|
27285
|
-
return /* @__PURE__ */ Z("div", { ...
|
|
27285
|
+
const o = e.getState().columnFilters.length > 0 || e.getState().globalFilter?.length > 0;
|
|
27286
|
+
return /* @__PURE__ */ Z("div", { ...a, children: [
|
|
27286
27287
|
/* @__PURE__ */ f(rk, { children: /* @__PURE__ */ Z(QB, { children: [
|
|
27287
|
-
/* @__PURE__ */ f("thead", { children: e.getHeaderGroups().map((
|
|
27288
|
-
|
|
27289
|
-
|
|
27290
|
-
) },
|
|
27291
|
-
/* @__PURE__ */ f("tbody", { children: e.getRowModel().rows.map((
|
|
27288
|
+
/* @__PURE__ */ f("thead", { children: e.getHeaderGroups().map((i) => /* @__PURE__ */ f("tr", { children: i.headers.map((u) => /* @__PURE__ */ f(y.Fragment, { children: V4(
|
|
27289
|
+
u.column.columnDef.header,
|
|
27290
|
+
u.getContext()
|
|
27291
|
+
) }, u.id)) }, i.id)) }),
|
|
27292
|
+
/* @__PURE__ */ f("tbody", { children: e.getRowModel().rows.map((i) => /* @__PURE__ */ Z(bh, { children: [
|
|
27292
27293
|
/* @__PURE__ */ f(
|
|
27293
27294
|
LB,
|
|
27294
27295
|
{
|
|
27295
|
-
depth:
|
|
27296
|
-
"data-sub-row-expanded":
|
|
27297
|
-
"data-is-sub-row": !!
|
|
27298
|
-
children:
|
|
27299
|
-
|
|
27300
|
-
|
|
27301
|
-
) },
|
|
27296
|
+
depth: i.depth,
|
|
27297
|
+
"data-sub-row-expanded": i.getIsExpanded(),
|
|
27298
|
+
"data-is-sub-row": !!i.getParentRow(),
|
|
27299
|
+
children: i.getVisibleCells().map((u) => /* @__PURE__ */ f(y.Fragment, { children: V4(
|
|
27300
|
+
u.column.columnDef.cell,
|
|
27301
|
+
u.getContext()
|
|
27302
|
+
) }, u.id))
|
|
27302
27303
|
}
|
|
27303
27304
|
),
|
|
27304
|
-
|
|
27305
|
+
i.getIsExpanded() && !!n && /* @__PURE__ */ f("tr", { children: /* @__PURE__ */ f(
|
|
27305
27306
|
ak,
|
|
27306
27307
|
{
|
|
27307
|
-
colSpan:
|
|
27308
|
-
children: n({ row:
|
|
27308
|
+
colSpan: i.getVisibleCells().length,
|
|
27309
|
+
children: n({ row: i })
|
|
27309
27310
|
}
|
|
27310
27311
|
) })
|
|
27311
|
-
] },
|
|
27312
|
+
] }, i.id)) })
|
|
27312
27313
|
] }) }),
|
|
27313
|
-
e.getRowCount() === 0 && /* @__PURE__ */ f(tk, { withFilters:
|
|
27314
|
+
e.getRowCount() === 0 && /* @__PURE__ */ f(tk, { withFilters: o }),
|
|
27314
27315
|
!!t && /* @__PURE__ */ f(
|
|
27315
27316
|
YB,
|
|
27316
27317
|
{
|
|
@@ -27319,6 +27320,7 @@ function cI({
|
|
|
27319
27320
|
pageIndex: t.pageIndex,
|
|
27320
27321
|
onItemsPerPageChange: e.setPageSize,
|
|
27321
27322
|
itemsPerPage: t.pageSize,
|
|
27323
|
+
itemsPerPageOptions: r,
|
|
27322
27324
|
style: { marginTop: "16px" }
|
|
27323
27325
|
}
|
|
27324
27326
|
)
|
|
@@ -23,6 +23,10 @@ type Props<TData> = {
|
|
|
23
23
|
renderSubComponent?: (props: {
|
|
24
24
|
row: Row<TData>;
|
|
25
25
|
}) => React.ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* The list of available page sizes.
|
|
28
|
+
*/
|
|
29
|
+
itemsPerPageOptions?: number[];
|
|
26
30
|
};
|
|
27
|
-
export default function DataTable<TData>({ table, pagination, renderSubComponent, ...divProps }: Props<TData>): React.ReactElement;
|
|
31
|
+
export default function DataTable<TData>({ table, pagination, renderSubComponent, itemsPerPageOptions, ...divProps }: Props<TData>): React.ReactElement;
|
|
28
32
|
export {};
|
package/package.json
CHANGED