@simple-table/react 3.0.3 → 3.0.5
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/cjs/index.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/types/core/src/core/rendering/RenderOrchestrator.d.ts +7 -0
- package/dist/types/core/src/managers/ScrollManager.d.ts +3 -0
- package/dist/types/core/src/utils/rowProcessing.d.ts +19 -0
- package/dist/types/react/src/index.d.ts +1 -2
- package/dist/types/react/src/types.d.ts +8 -6
- package/package.json +2 -2
- package/dist/types/react/src/defaultHeadersFromCore.d.ts +0 -12
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=require("simple-table-core"),r=require("react-dom"),o=require("react-dom/client"),c=require("react-dom/server");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function i(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t}function u({node:t}){const r=n.useRef(null);return n.useLayoutEffect(()=>{const e=r.current;if(e)return e.appendChild(t),()=>{t.parentNode===e&&e.removeChild(t)}},[t]),e.jsx("span",{ref:r,style:{display:"contents"}})}function a(n){if(null!=n)return"string"==typeof n?n:n instanceof Node?e.jsx(u,{node:n}):void 0}function d(e,n){queueMicrotask(()=>{r.flushSync(()=>{e.render(n)})})}function l(n){return t=>{const r=document.createElement("div");return d(o.createRoot(r),e.jsx(n,Object.assign({},t))),r}}function f(n){return t=>{const r=document.createElement("div"),c=o.createRoot(r),s=Object.assign(Object.assign({},t),{searchSection:t.searchSection?a(t.searchSection):null,listSection:a(t.listSection),resetSection:t.resetSection?a(t.resetSection):null});return d(c,e.jsx(n,Object.assign({},s))),r}}function p(n){const t=document.createElement("div");return t.innerHTML=c.renderToStaticMarkup(e.jsx(e.Fragment,{children:n})),function(e){const n=Array.from(e.childNodes).filter(e=>e.nodeType!==Node.TEXT_NODE||null!=e.textContent&&""!==e.textContent.trim());return 1===n.length&&n[0]instanceof HTMLElement?(e.removeChild(n[0]),n[0]):e}(t)}function m(n){return c.renderToStaticMarkup(e.jsx(e.Fragment,{children:n}))}function b(e){return"function"==typeof e}function g(n){const{cellRenderer:t,headerRenderer:r,children:c,nestedTable:s}=n,u=i(n,["cellRenderer","headerRenderer","children","nestedTable"]),a=Object.assign({},u);var f;if(t&&(a.cellRenderer=(f=t,n=>{const t=document.createElement("div");return t.style.display="contents",d(o.createRoot(t),e.jsx(f,Object.assign({},n))),t})),r&&(a.headerRenderer=l(r)),c&&(a.children=c.map(g)),s){const e=Object.assign(Object.assign({},s),{rows:[]});a.nestedTable=R(e)}return a}function R(n){const{defaultHeaders:t,rows:r,footerRenderer:c,emptyStateRenderer:s,errorStateRenderer:u,loadingStateRenderer:R,tableEmptyStateRenderer:j,headerDropdown:y,columnEditorConfig:O,icons:S,onColumnOrderChange:h,onColumnWidthChange:v,onHeaderEdit:C,onColumnSelect:E}=n,x=i(n,["defaultHeaders","rows","footerRenderer","emptyStateRenderer","errorStateRenderer","loadingStateRenderer","tableEmptyStateRenderer","headerDropdown","columnEditorConfig","icons","onColumnOrderChange","onColumnWidthChange","onHeaderEdit","onColumnSelect"]),w=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},x),{rows:r,defaultHeaders:t.map(g)}),h?{onColumnOrderChange:e=>h(e)}:{}),v?{onColumnWidthChange:e=>v(e)}:{}),C?{onHeaderEdit:(e,n)=>C(e,n)}:{}),E?{onColumnSelect:e=>E(e)}:{});if(void 0!==c&&(w.footerRenderer=l(c)),void 0!==s)if(b(s))w.emptyStateRenderer=l(s);else{const e=s;w.emptyStateRenderer=()=>p(e)}if(void 0!==u)if(b(u))w.errorStateRenderer=l(u);else{const e=u;w.errorStateRenderer=()=>p(e)}if(void 0!==R)if(b(R))w.loadingStateRenderer=l(R);else{const e=R;w.loadingStateRenderer=()=>p(e)}return void 0!==j&&(w.tableEmptyStateRenderer=null===j?null:p(j)),void 0!==y&&(w.headerDropdown=l(y)),void 0!==O&&(w.columnEditorConfig=function(n){const{rowRenderer:t,customRenderer:r}=n,c=i(n,["rowRenderer","customRenderer"]);return Object.assign(Object.assign(Object.assign({},c),t?{rowRenderer:(s=t,n=>{const t=document.createElement("div"),r=o.createRoot(t),c=Object.assign(Object.assign({},n),{components:(i=n.components,{expandIcon:a(i.expandIcon),checkbox:a(i.checkbox),dragIcon:a(i.dragIcon),labelContent:a(i.labelContent),pinIcon:a(i.pinIcon)})});var i;return d(r,e.jsx(s,Object.assign({},c))),t})}:{}),r?{customRenderer:f(r)}:{});var s}(O)),void 0!==S&&(w.icons=function(e){const n={};for(const[t,r]of Object.entries(e))null!=r&&(n[t]="string"==typeof r||r instanceof HTMLElement||r instanceof SVGElement?r:m(r));return n}(S)),w}"function"==typeof SuppressedError&&SuppressedError;const j=s(n).default.forwardRef(function(r,o){const c=n.useRef(null),s=n.useRef(null),u=n.useRef(void 0),a=n.useRef(null),d=r;return n.useLayoutEffect(()=>{if(!c.current)return;let e=!1;return queueMicrotask(()=>{if(e||!c.current)return;const n=new t.SimpleTableVanilla(c.current,R(d));if(n.mount(),s.current=n,o){const e=n.getAPI();"function"==typeof o?o(e):o.current=e}}),()=>{e=!0;const n=s.current;n&&(n.destroy(),s.current=null,u.current=void 0,a.current=null,o&&"function"!=typeof o&&(o.current=null))}},[]),n.useLayoutEffect(()=>{const e=s.current;if(!e)return;if(null!==a.current&&!function(e,n){const t=new Set([...Object.keys(e),...Object.keys(n)]);for(const r of t)if(e[r]!==n[r])return!0;return!1}(a.current,d))return;a.current=d;const n=R(d);queueMicrotask(()=>{if(s.current!==e)return;if(u.current!==d.defaultHeaders)return u.current=d.defaultHeaders,void e.update(n);const t=i(n,["defaultHeaders"]);e.update(t)})},[d]),e.jsx("div",{ref:c})});j.displayName="SimpleTable",Object.defineProperty(exports,"asRows",{enumerable:!0,get:function(){return t.asRows}}),exports.SimpleTable=j;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.es.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,Fragment as
|
|
1
|
+
import{jsx as e,Fragment as n}from"react/jsx-runtime";import r,{useRef as t,useLayoutEffect as o}from"react";import{SimpleTableVanilla as c}from"simple-table-core";export{asRows}from"simple-table-core";import{flushSync as i}from"react-dom";import{createRoot as s}from"react-dom/client";import{renderToStaticMarkup as d}from"react-dom/server";function a(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(e);o<t.length;o++)n.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(r[t[o]]=e[t[o]])}return r}function u({node:n}){const r=t(null);return o(()=>{const e=r.current;if(e)return e.appendChild(n),()=>{n.parentNode===e&&e.removeChild(n)}},[n]),e("span",{ref:r,style:{display:"contents"}})}function l(n){if(null!=n)return"string"==typeof n?n:n instanceof Node?e(u,{node:n}):void 0}function f(e,n){queueMicrotask(()=>{i(()=>{e.render(n)})})}function m(n){return r=>{const t=document.createElement("div");return f(s(t),e(n,Object.assign({},r))),t}}function p(n){return r=>{const t=document.createElement("div"),o=s(t),c=Object.assign(Object.assign({},r),{searchSection:r.searchSection?l(r.searchSection):null,listSection:l(r.listSection),resetSection:r.resetSection?l(r.resetSection):null});return f(o,e(n,Object.assign({},c))),t}}function b(r){const t=document.createElement("div");return t.innerHTML=d(e(n,{children:r})),function(e){const n=Array.from(e.childNodes).filter(e=>e.nodeType!==Node.TEXT_NODE||null!=e.textContent&&""!==e.textContent.trim());return 1===n.length&&n[0]instanceof HTMLElement?(e.removeChild(n[0]),n[0]):e}(t)}function g(r){return d(e(n,{children:r}))}function O(e){return"function"==typeof e}function S(n){const{cellRenderer:r,headerRenderer:t,children:o,nestedTable:c}=n,i=a(n,["cellRenderer","headerRenderer","children","nestedTable"]),d=Object.assign({},i);var u;if(r&&(d.cellRenderer=(u=r,n=>{const r=document.createElement("div");return r.style.display="contents",f(s(r),e(u,Object.assign({},n))),r})),t&&(d.headerRenderer=m(t)),o&&(d.children=o.map(S)),c){const e=Object.assign(Object.assign({},c),{rows:[]});d.nestedTable=h(e)}return d}function h(n){const{defaultHeaders:r,rows:t,footerRenderer:o,emptyStateRenderer:c,errorStateRenderer:i,loadingStateRenderer:d,tableEmptyStateRenderer:u,headerDropdown:h,columnEditorConfig:y,icons:R,onColumnOrderChange:j,onColumnWidthChange:v,onHeaderEdit:C,onColumnSelect:E}=n,w=a(n,["defaultHeaders","rows","footerRenderer","emptyStateRenderer","errorStateRenderer","loadingStateRenderer","tableEmptyStateRenderer","headerDropdown","columnEditorConfig","icons","onColumnOrderChange","onColumnWidthChange","onHeaderEdit","onColumnSelect"]),H=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},w),{rows:t,defaultHeaders:r.map(S)}),j?{onColumnOrderChange:e=>j(e)}:{}),v?{onColumnWidthChange:e=>v(e)}:{}),C?{onHeaderEdit:(e,n)=>C(e,n)}:{}),E?{onColumnSelect:e=>E(e)}:{});if(void 0!==o&&(H.footerRenderer=m(o)),void 0!==c)if(O(c))H.emptyStateRenderer=m(c);else{const e=c;H.emptyStateRenderer=()=>b(e)}if(void 0!==i)if(O(i))H.errorStateRenderer=m(i);else{const e=i;H.errorStateRenderer=()=>b(e)}if(void 0!==d)if(O(d))H.loadingStateRenderer=m(d);else{const e=d;H.loadingStateRenderer=()=>b(e)}return void 0!==u&&(H.tableEmptyStateRenderer=null===u?null:b(u)),void 0!==h&&(H.headerDropdown=m(h)),void 0!==y&&(H.columnEditorConfig=function(n){const{rowRenderer:r,customRenderer:t}=n,o=a(n,["rowRenderer","customRenderer"]);return Object.assign(Object.assign(Object.assign({},o),r?{rowRenderer:(c=r,n=>{const r=document.createElement("div"),t=s(r),o=Object.assign(Object.assign({},n),{components:(i=n.components,{expandIcon:l(i.expandIcon),checkbox:l(i.checkbox),dragIcon:l(i.dragIcon),labelContent:l(i.labelContent),pinIcon:l(i.pinIcon)})});var i;return f(t,e(c,Object.assign({},o))),r})}:{}),t?{customRenderer:p(t)}:{});var c}(y)),void 0!==R&&(H.icons=function(e){const n={};for(const[r,t]of Object.entries(e))null!=t&&(n[r]="string"==typeof t||t instanceof HTMLElement||t instanceof SVGElement?t:g(t));return n}(R)),H}"function"==typeof SuppressedError&&SuppressedError;const y=r.forwardRef(function(n,r){const i=t(null),s=t(null),d=t(void 0),u=t(null),l=n;return o(()=>{if(!i.current)return;let e=!1;return queueMicrotask(()=>{if(e||!i.current)return;const n=new c(i.current,h(l));if(n.mount(),s.current=n,r){const e=n.getAPI();"function"==typeof r?r(e):r.current=e}}),()=>{e=!0;const n=s.current;n&&(n.destroy(),s.current=null,d.current=void 0,u.current=null,r&&"function"!=typeof r&&(r.current=null))}},[]),o(()=>{const e=s.current;if(!e)return;if(null!==u.current&&!function(e,n){const r=new Set([...Object.keys(e),...Object.keys(n)]);for(const t of r)if(e[t]!==n[t])return!0;return!1}(u.current,l))return;u.current=l;const n=h(l);queueMicrotask(()=>{if(s.current!==e)return;if(d.current!==l.defaultHeaders)return d.current=l.defaultHeaders,void e.update(n);const r=a(n,["defaultHeaders"]);e.update(r)})},[l]),e("div",{ref:i})});y.displayName="SimpleTable";export{y as SimpleTable};
|
|
2
2
|
//# sourceMappingURL=index.es.js.map
|
|
@@ -92,6 +92,13 @@ export declare class RenderOrchestrator {
|
|
|
92
92
|
private lastRowsRef;
|
|
93
93
|
private flattenedRowsCache;
|
|
94
94
|
private lastProcessedResult;
|
|
95
|
+
/** Fingerprint for skipping pagination + height-map work on vertical scroll frames. */
|
|
96
|
+
private processRowsScrollReuseKey;
|
|
97
|
+
private processRowsScrollReuseBase;
|
|
98
|
+
/** Last painted virtual row range on scroll-raf; when unchanged, DOM work is redundant (native scroll moves content). */
|
|
99
|
+
private lastScrollRafPaintedRange;
|
|
100
|
+
/** Reuse normalized headers across scroll frames when layout inputs are unchanged. */
|
|
101
|
+
private scrollRafHeadersMemo;
|
|
95
102
|
constructor();
|
|
96
103
|
getCachedFlattenResult(): FlattenRowsResult | null;
|
|
97
104
|
getLastProcessedResult(): ProcessRowsResult | null;
|
|
@@ -19,10 +19,13 @@ export declare class ScrollManager {
|
|
|
19
19
|
private subscribers;
|
|
20
20
|
private lastScrollTop;
|
|
21
21
|
private scrollTimeoutId;
|
|
22
|
+
/** Coalesce scroll-driven subscriber notifications to one rAF (avoids sync storms + reflow). */
|
|
23
|
+
private notifySubscribersRafId;
|
|
22
24
|
constructor(config: ScrollManagerConfig);
|
|
23
25
|
updateConfig(config: Partial<ScrollManagerConfig>): void;
|
|
24
26
|
subscribe(callback: StateChangeCallback): () => void;
|
|
25
27
|
private notifySubscribers;
|
|
28
|
+
private scheduleNotifySubscribersFromScroll;
|
|
26
29
|
handleScroll(scrollTop: number, scrollLeft: number, containerHeight: number, contentHeight: number): void;
|
|
27
30
|
setScrolling(isScrolling: boolean): void;
|
|
28
31
|
getState(): ScrollManagerState;
|
|
@@ -34,3 +34,22 @@ export interface ProcessRowsResult {
|
|
|
34
34
|
heightMap: CumulativeHeightMap | undefined;
|
|
35
35
|
}
|
|
36
36
|
export declare function processRows(config: ProcessRowsConfig): ProcessRowsResult;
|
|
37
|
+
/** Layout inputs that do not depend on scroll position (reuse across scroll-raf frames). */
|
|
38
|
+
export interface ProcessRowsScrollReuseBase {
|
|
39
|
+
currentTableRows: TableRow[];
|
|
40
|
+
paginatedHeightOffsets: HeightOffsets | undefined;
|
|
41
|
+
heightMap: CumulativeHeightMap | undefined;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Recomputes only viewport-dependent fields when pagination, height map, and row list
|
|
45
|
+
* are unchanged (vertical scroll only). Avoids re-running applyPagination and
|
|
46
|
+
* buildCumulativeHeightMap on every scroll frame.
|
|
47
|
+
*/
|
|
48
|
+
export declare function recomputeProcessRowsViewport(base: ProcessRowsScrollReuseBase, config: {
|
|
49
|
+
contentHeight: number | undefined;
|
|
50
|
+
rowHeight: number;
|
|
51
|
+
scrollTop: number;
|
|
52
|
+
scrollDirection?: "up" | "down" | "none";
|
|
53
|
+
enableStickyParents: boolean;
|
|
54
|
+
rowGrouping?: Accessor[];
|
|
55
|
+
}): ProcessRowsResult;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { default as SimpleTable } from "./SimpleTable";
|
|
2
2
|
export { asRows } from "simple-table-core";
|
|
3
|
-
export { defaultHeaderFromCore, defaultHeadersFromCore, mapToReactHeaderObjects, } from "./defaultHeadersFromCore";
|
|
4
3
|
export type { SimpleTableReactProps, TableInstance, ReactHeaderObject, ReactColumnEditorConfig, ReactIconsConfig, ReactIconElement, ReactCellRenderer, ReactHeaderRenderer, ReactFooterRenderer, ReactHeaderDropdown, ReactColumnEditorRowRenderer, ReactColumnEditorCustomRenderer, ReactLoadingStateRenderer, ReactErrorStateRenderer, ReactEmptyStateRenderer, HeaderRendererComponents, HeaderRendererProps, ColumnEditorRowRendererComponents, ColumnEditorRowRendererProps, FooterRendererProps, HeaderDropdownProps, } from "./types";
|
|
5
|
-
export type { Accessor, AggregationConfig, AggregationType, BoundingBox, Cell, CellChangeProps, CellClickProps, CellRenderer, CellRendererProps, CellValue, ChartOptions, ColumnEditorConfig, ColumnEditorRowRenderer, ColumnEditorCustomRenderer, ColumnEditorCustomRendererProps, ColumnEditorSearchFunction, ColumnType, ColumnVisibilityState, Comparator, ComparatorProps, CustomTheme, CustomThemeProps, DragHandlerProps, EmptyStateRenderer, EmptyStateRendererProps, EnumOption, ErrorStateRenderer, ErrorStateRendererProps, ExportToCSVProps, ExportValueGetter, ExportValueProps, FilterCondition, GetRowId, GetRowIdParams, HeaderDropdown,
|
|
4
|
+
export type { Accessor, AggregationConfig, AggregationType, BoundingBox, Cell, CellChangeProps, CellClickProps, CellRenderer, CellRendererProps, CellValue, ChartOptions, ColumnEditorConfig, ColumnEditorRowRenderer, ColumnEditorCustomRenderer, ColumnEditorCustomRendererProps, ColumnEditorSearchFunction, ColumnType, ColumnVisibilityState, Comparator, ComparatorProps, CustomTheme, CustomThemeProps, DragHandlerProps, EmptyStateRenderer, EmptyStateRendererProps, EnumOption, ErrorStateRenderer, ErrorStateRendererProps, ExportToCSVProps, ExportValueGetter, ExportValueProps, FilterCondition, GetRowId, GetRowIdParams, HeaderDropdown, HeaderRenderer, IconsConfig, LoadingStateRenderer, LoadingStateRendererProps, OnRowGroupExpandProps, OnSortProps, QuickFilterConfig, QuickFilterGetter, QuickFilterGetterProps, QuickFilterMode, Row, RowButtonProps, RowId, RowSelectionChangeProps, RowState, SetHeaderRenameProps, SharedTableProps, ShowWhen, SimpleTableConfig, SimpleTableProps, SortColumn, TableAPI, TableFilterState, TableHeaderProps, TableRowProps, Theme, UpdateDataProps, ValueFormatter, ValueFormatterProps, ValueGetter, ValueGetterProps, } from "simple-table-core";
|
|
@@ -62,10 +62,8 @@ export interface ReactColumnEditorConfig extends Omit<ColumnEditorConfig, "rowRe
|
|
|
62
62
|
customRenderer?: ReactColumnEditorCustomRenderer;
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
|
-
* Column definition for `defaultHeaders`: same column metadata as core
|
|
66
|
-
* `cellRenderer` / `headerRenderer` / `children` / `nestedTable` are React-only.
|
|
67
|
-
* defs authored against core types, import `defaultHeadersFromCore`, `defaultHeaderFromCore`, or
|
|
68
|
-
* `mapToReactHeaderObjects` (after spreading core columns and adding React renderers).
|
|
65
|
+
* Column definition for `defaultHeaders`: same column metadata as core columns, but
|
|
66
|
+
* `cellRenderer` / `headerRenderer` / `children` / `nestedTable` are React-only.
|
|
69
67
|
*/
|
|
70
68
|
export interface ReactHeaderObject extends Omit<HeaderObject, "cellRenderer" | "headerRenderer" | "children" | "nestedTable"> {
|
|
71
69
|
cellRenderer?: ReactCellRenderer;
|
|
@@ -74,8 +72,12 @@ export interface ReactHeaderObject extends Omit<HeaderObject, "cellRenderer" | "
|
|
|
74
72
|
/** Nested grid: React table props minus row data and inherited state renderers. */
|
|
75
73
|
nestedTable?: Omit<SimpleTableReactProps, "rows" | "loadingStateRenderer" | "errorStateRenderer" | "emptyStateRenderer" | "tableEmptyStateRenderer">;
|
|
76
74
|
}
|
|
77
|
-
export interface SimpleTableReactProps extends Omit<SimpleTableProps, "defaultHeaders" | "footerRenderer" | "emptyStateRenderer" | "errorStateRenderer" | "loadingStateRenderer" | "tableEmptyStateRenderer" | "headerDropdown" | "columnEditorConfig" | "icons" | "rows"> {
|
|
78
|
-
defaultHeaders: ReactHeaderObject
|
|
75
|
+
export interface SimpleTableReactProps extends Omit<SimpleTableProps, "defaultHeaders" | "footerRenderer" | "emptyStateRenderer" | "errorStateRenderer" | "loadingStateRenderer" | "tableEmptyStateRenderer" | "headerDropdown" | "columnEditorConfig" | "icons" | "rows" | "onColumnOrderChange" | "onColumnWidthChange" | "onHeaderEdit" | "onColumnSelect"> {
|
|
76
|
+
defaultHeaders: ReadonlyArray<ReactHeaderObject>;
|
|
77
|
+
onColumnOrderChange?: (newHeaders: ReactHeaderObject[]) => void;
|
|
78
|
+
onColumnWidthChange?: (headers: ReactHeaderObject[]) => void;
|
|
79
|
+
onHeaderEdit?: (header: ReactHeaderObject, newLabel: string) => void;
|
|
80
|
+
onColumnSelect?: (header: ReactHeaderObject) => void;
|
|
79
81
|
/** Row data: any object rows (domain models) or core `Row[]`; cast to vanilla `Row[]` inside the adapter. */
|
|
80
82
|
rows: ReadonlyArray<Row> | ReadonlyArray<object>;
|
|
81
83
|
footerRenderer?: ReactFooterRenderer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simple-table/react",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/index.es.js",
|
|
6
6
|
"types": "dist/types/react/src/index.d.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"react-dom": ">=18.0.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"simple-table-core": "3.0.
|
|
32
|
+
"simple-table-core": "3.0.5"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@rollup/plugin-alias": "^4.0.4",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { HeaderObject } from "simple-table-core";
|
|
2
|
-
import type { ReactHeaderObject } from "./types";
|
|
3
|
-
/** Single column from a core/shared config, typed for React `defaultHeaders`. */
|
|
4
|
-
export declare function defaultHeaderFromCore(header: HeaderObject): ReactHeaderObject;
|
|
5
|
-
/** Column tree from `simple-table-core` or shared configs, typed for React `defaultHeaders`. */
|
|
6
|
-
export declare function defaultHeadersFromCore(headers: readonly HeaderObject[]): ReactHeaderObject[];
|
|
7
|
-
/**
|
|
8
|
-
* Use after mapping over {@link HeaderObject} and spreading into `{ ...h, cellRenderer }` (or
|
|
9
|
-
* `headerRenderer`). TypeScript keeps vanilla renderer types on the spread; this asserts the
|
|
10
|
-
* React-only column shape for `defaultHeaders`.
|
|
11
|
-
*/
|
|
12
|
-
export declare function mapToReactHeaderObjects(columns: readonly object[]): ReactHeaderObject[];
|