@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.
@@ -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,...r}){const a=e.getState().columnFilters.length>0||e.getState().globalFilter?.length>0;return d.jsxs("div",{...r,children:[d.jsx(YB,{children:d.jsxs(Ep,{children:[d.jsx("thead",{children:e.getHeaderGroups().map(o=>d.jsx("tr",{children:o.headers.map(i=>d.jsx(l.Fragment,{children:D4(i.column.columnDef.header,i.getContext())},i.id))},o.id))}),d.jsx("tbody",{children:e.getRowModel().rows.map(o=>d.jsxs(l.Fragment,{children:[d.jsx($p,{depth:o.depth,"data-sub-row-expanded":o.getIsExpanded(),"data-is-sub-row":!!o.getParentRow(),children:o.getVisibleCells().map(i=>d.jsx(l.Fragment,{children:D4(i.column.columnDef.cell,i.getContext())},i.id))}),o.getIsExpanded()&&!!n&&d.jsx("tr",{children:d.jsx(XB,{colSpan:o.getVisibleCells().length,children:n({row:o})})})]},o.id))})]})}),e.getRowCount()===0&&d.jsx(GB,{withFilters:a}),!!t&&d.jsx(wp,{count:e.getRowCount(),onPageChange:e.setPageIndex,pageIndex:t.pageIndex,onItemsPerPageChange:e.setPageSize,itemsPerPage:t.pageSize,style:{marginTop:"16px"}})]})}const QB=S.td`
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"],
@@ -27279,38 +27279,39 @@ function cI({
27279
27279
  table: e,
27280
27280
  pagination: t,
27281
27281
  renderSubComponent: n,
27282
- ...r
27282
+ itemsPerPageOptions: r,
27283
+ ...a
27283
27284
  }) {
27284
- const a = e.getState().columnFilters.length > 0 || e.getState().globalFilter?.length > 0;
27285
- return /* @__PURE__ */ Z("div", { ...r, children: [
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((o) => /* @__PURE__ */ f("tr", { children: o.headers.map((i) => /* @__PURE__ */ f(y.Fragment, { children: V4(
27288
- i.column.columnDef.header,
27289
- i.getContext()
27290
- ) }, i.id)) }, o.id)) }),
27291
- /* @__PURE__ */ f("tbody", { children: e.getRowModel().rows.map((o) => /* @__PURE__ */ Z(bh, { children: [
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: o.depth,
27296
- "data-sub-row-expanded": o.getIsExpanded(),
27297
- "data-is-sub-row": !!o.getParentRow(),
27298
- children: o.getVisibleCells().map((i) => /* @__PURE__ */ f(y.Fragment, { children: V4(
27299
- i.column.columnDef.cell,
27300
- i.getContext()
27301
- ) }, i.id))
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
- o.getIsExpanded() && !!n && /* @__PURE__ */ f("tr", { children: /* @__PURE__ */ f(
27305
+ i.getIsExpanded() && !!n && /* @__PURE__ */ f("tr", { children: /* @__PURE__ */ f(
27305
27306
  ak,
27306
27307
  {
27307
- colSpan: o.getVisibleCells().length,
27308
- children: n({ row: o })
27308
+ colSpan: i.getVisibleCells().length,
27309
+ children: n({ row: i })
27309
27310
  }
27310
27311
  ) })
27311
- ] }, o.id)) })
27312
+ ] }, i.id)) })
27312
27313
  ] }) }),
27313
- e.getRowCount() === 0 && /* @__PURE__ */ f(tk, { withFilters: a }),
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agregio-solutions/design-system",
3
- "version": "1.76.0",
3
+ "version": "1.76.1",
4
4
  "description": "React Component library and Storybook that is part of the Design System for Agregio Solutions",
5
5
  "type": "module",
6
6
  "module": "dist/design-system.js",