@1771technologies/lytenyte-pro 1.0.0-beta.11 → 1.0.0-beta.13

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/+types.d.ts CHANGED
@@ -1828,6 +1828,10 @@ export interface RowDataSourceClientPaginated<T> {
1828
1828
  * May return items synchronously or as a Promise.
1829
1829
  */
1830
1830
  readonly inFilterItems: (column: Column<T>) => Promise<FilterInFilterItem[]> | FilterInFilterItem[];
1831
+ /**
1832
+ * A client data source method to retrieve the raw data passed to the data source.
1833
+ */
1834
+ readonly rowData: (section: RowSection) => T[];
1831
1835
  }
1832
1836
  /**
1833
1837
  * Represents pagination-related state for the client row data source in
@@ -1921,6 +1925,10 @@ export interface RowDataSourceClient<T> {
1921
1925
  * May return items synchronously or as a Promise.
1922
1926
  */
1923
1927
  readonly inFilterItems: (column: Column<T>) => Promise<FilterInFilterItem[]> | FilterInFilterItem[];
1928
+ /**
1929
+ * A client data source method to retrieve the raw data passed to the data source.
1930
+ */
1931
+ readonly rowData: (section: RowSection) => T[];
1924
1932
  }
1925
1933
  /**
1926
1934
  * The row data source interface used by LyteNyte Grid to retrieve and manage row data.
@@ -2590,6 +2598,10 @@ export interface CellRendererParams<T> {
2590
2598
  * Indicates whether the row is in an indeterminate selection state.
2591
2599
  */
2592
2600
  readonly rowIndeterminate: boolean;
2601
+ /**
2602
+ * The pinning state of a row, used to fix it to the top or bottom of the grid.
2603
+ */
2604
+ readonly rowPin: RowPin;
2593
2605
  }
2594
2606
  /**
2595
2607
  * The parameters the `columnAutosize` method accepts.
@@ -33,6 +33,6 @@ const CellImpl = forwardRef(function Cell({ cell, children, ...props }, forwarde
33
33
  const rowMeta = useRowMeta();
34
34
  if (!row)
35
35
  return null;
36
- return (_jsxs(CellReact, { ...props, ref: forwarded, cell: cell, isEditing: isEditing, viewportWidth: cx.viewportWidthInner.useValue(), detailHeight: grid.api.rowDetailRenderedHeight(row ?? ""), rtl: cx.rtl.useValue(), xPosition: cx.xPositions.useValue(), yPosition: cx.yPositions.useValue(), children: [isEditing && _jsx(CellEditor, { cell: cell }), !isEditing && (_jsx(_Fragment, { children: typeof Renderer === "function" ? (_jsx(Renderer, { column: cell.column, rowSelected: rowMeta.selected, rowIndeterminate: rowMeta.indeterminate, row: row, grid: grid, rowIndex: cell.rowIndex, colIndex: cell.colIndex })) : (Renderer) }))] }));
36
+ return (_jsxs(CellReact, { ...props, ref: forwarded, cell: cell, isEditing: isEditing, viewportWidth: cx.viewportWidthInner.useValue(), detailHeight: grid.api.rowDetailRenderedHeight(row ?? ""), rtl: cx.rtl.useValue(), xPosition: cx.xPositions.useValue(), yPosition: cx.yPositions.useValue(), children: [isEditing && _jsx(CellEditor, { cell: cell }), !isEditing && (_jsx(_Fragment, { children: typeof Renderer === "function" ? (_jsx(Renderer, { column: cell.column, rowSelected: rowMeta.selected, rowIndeterminate: rowMeta.indeterminate, row: row, grid: grid, rowIndex: cell.rowIndex, colIndex: cell.colIndex, rowPin: cell.rowPin })) : (Renderer) }))] }));
37
37
  });
38
38
  export const Cell = fastDeepMemo(CellImpl);
@@ -457,6 +457,19 @@ export function makeClientDataSourcePaginated(p) {
457
457
  const grid = rdsStore.get(grid$);
458
458
  grid?.state.rowDataStore.rowClearCache();
459
459
  },
460
+ rowData: (section) => {
461
+ const d = [];
462
+ if (section === "top" || section === "flat") {
463
+ d.push(...rdsStore.get(topData));
464
+ }
465
+ if (section === "center" || section === "flat") {
466
+ d.push(...rdsStore.get(data));
467
+ }
468
+ if (section === "bottom" || section === "flat") {
469
+ d.push(...rdsStore.get(bottomData));
470
+ }
471
+ return d;
472
+ },
460
473
  rowExpand: (expansions) => {
461
474
  const grid = rdsStore.get(grid$);
462
475
  if (!grid)
@@ -567,6 +567,19 @@ export function makeClientDataSource(p) {
567
567
  const grid = rdsStore.get(grid$);
568
568
  grid?.state.rowDataStore.rowClearCache();
569
569
  },
570
+ rowData: (section) => {
571
+ const d = [];
572
+ if (section === "top" || section === "flat") {
573
+ d.push(...rdsStore.get(topData));
574
+ }
575
+ if (section === "center" || section === "flat") {
576
+ d.push(...rdsStore.get(data));
577
+ }
578
+ if (section === "bottom" || section === "flat") {
579
+ d.push(...rdsStore.get(bottomData));
580
+ }
581
+ return d;
582
+ },
570
583
  rowExpand: (expansions) => {
571
584
  const grid = rdsStore.get(grid$);
572
585
  if (!grid)
@@ -486,6 +486,19 @@ export function makeClientTreeDataSource(p) {
486
486
  const t = rdsStore.get(tree);
487
487
  grid.state.rowSelectedIds.set(new Set(t.idsAll));
488
488
  },
489
+ rowData: (section) => {
490
+ const d = [];
491
+ if (section === "top" || section === "flat") {
492
+ d.push(...rdsStore.get(topData));
493
+ }
494
+ if (section === "center" || section === "flat") {
495
+ d.push(...rdsStore.get(data));
496
+ }
497
+ if (section === "bottom" || section === "flat") {
498
+ d.push(...rdsStore.get(bottomData));
499
+ }
500
+ return d;
501
+ },
489
502
  rowAreAllSelected: (rowId) => {
490
503
  const g = rdsStore.get(grid$);
491
504
  if (!g)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@1771technologies/lytenyte-pro",
3
3
  "description": "Blazingly fast headless React data grid with 100s of features.",
4
- "version": "1.0.0-beta.11",
4
+ "version": "1.0.0-beta.13",
5
5
  "type": "module",
6
6
  "license": "COMMERCIAL",
7
7
  "files": [
@@ -49,12 +49,12 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@1771technologies/atom": "^1.0.2",
52
- "@1771technologies/lytenyte-core": "1.0.0-beta.11",
53
- "@1771technologies/lytenyte-dom-utils": "1.0.0-beta.11",
54
- "@1771technologies/lytenyte-dragon": "1.0.0-beta.11",
55
- "@1771technologies/lytenyte-js-utils": "1.0.0-beta.11",
56
- "@1771technologies/lytenyte-react-hooks": "1.0.0-beta.11",
57
- "@1771technologies/lytenyte-shared": "1.0.0-beta.11"
52
+ "@1771technologies/lytenyte-core": "1.0.0-beta.13",
53
+ "@1771technologies/lytenyte-shared": "1.0.0-beta.13",
54
+ "@1771technologies/lytenyte-dom-utils": "1.0.0-beta.13",
55
+ "@1771technologies/lytenyte-dragon": "1.0.0-beta.13",
56
+ "@1771technologies/lytenyte-js-utils": "1.0.0-beta.13",
57
+ "@1771technologies/lytenyte-react-hooks": "1.0.0-beta.13"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "react": "^18.0.0 || ^19.0.0",