@simple-table/react 3.0.0-beta.15 → 3.0.0-beta.16
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/initialization/TableInitializer.d.ts +4 -1
- package/dist/types/core/src/index.d.ts +2 -1
- package/dist/types/core/src/types/ColumnEditorConfig.d.ts +5 -2
- package/dist/types/core/src/types/ColumnEditorCustomRendererProps.d.ts +14 -0
- package/dist/types/react/src/index.d.ts +2 -2
- package/dist/types/react/src/types.d.ts +5 -3
- package/package.json +2 -2
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"),r=require("react"),t=require("simple-table-core"),n=require("react-dom/server");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("simple-table-core"),n=require("react-dom/server");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function d(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t}function i(r){return t=>{const o=document.createElement("div");return o.innerHTML=n.renderToStaticMarkup(e.jsx(r,Object.assign({},t))),o}}function c(r){const t=document.createElement("div");return t.innerHTML=n.renderToStaticMarkup(e.jsx(e.Fragment,{children:r})),t}function a(r){return n.renderToStaticMarkup(e.jsx(e.Fragment,{children:r}))}function u(e){return"function"==typeof e}function s(e){const{cellRenderer:r,headerRenderer:t,children:n,nestedTable:o}=e,c=d(e,["cellRenderer","headerRenderer","children","nestedTable"]),a=Object.assign({},c);if(r&&(a.cellRenderer=i(r)),t&&(a.headerRenderer=i(t)),n&&(a.children=n.map(s)),o){const e=Object.assign(Object.assign({},o),{rows:[]});a.nestedTable=l(e)}return a}function l(e){const{defaultHeaders:r,footerRenderer:t,emptyStateRenderer:n,errorStateRenderer:o,loadingStateRenderer:l,tableEmptyStateRenderer:f,headerDropdown:p,columnEditorConfig:m,icons:R}=e,b=d(e,["defaultHeaders","footerRenderer","emptyStateRenderer","errorStateRenderer","loadingStateRenderer","tableEmptyStateRenderer","headerDropdown","columnEditorConfig","icons"]),S=Object.assign(Object.assign({},b),{defaultHeaders:r.map(s)});if(void 0!==t&&(S.footerRenderer=i(t)),void 0!==n)if(u(n))S.emptyStateRenderer=i(n);else{const e=n;S.emptyStateRenderer=()=>c(e)}if(void 0!==o)if(u(o))S.errorStateRenderer=i(o);else{const e=o;S.errorStateRenderer=()=>c(e)}if(void 0!==l)if(u(l))S.loadingStateRenderer=i(l);else{const e=l;S.loadingStateRenderer=()=>c(e)}return void 0!==f&&(S.tableEmptyStateRenderer=null===f?null:c(f)),void 0!==p&&(S.headerDropdown=i(p)),void 0!==m&&(S.columnEditorConfig=function(e){const{rowRenderer:r,customRenderer:t}=e,n=d(e,["rowRenderer","customRenderer"]);return Object.assign(Object.assign(Object.assign({},n),r?{rowRenderer:i(r)}:{}),t?{customRenderer:i(t)}:{})}(m)),void 0!==R&&(S.icons=function(e){const r={};for(const[t,n]of Object.entries(e))null!=n&&(r[t]="string"==typeof n||n instanceof HTMLElement||n instanceof SVGElement?n:a(n));return r}(R)),S}"function"==typeof SuppressedError&&SuppressedError;const f=o(r).default.forwardRef(function(n,o){const d=r.useRef(null),i=r.useRef(null),c=n;return r.useEffect(()=>{if(!d.current)return;const e=new t.SimpleTableVanilla(d.current,l(c));if(e.mount(),i.current=e,o){const r=e.getAPI();"function"==typeof o?o(r):o.current=r}return()=>{e.destroy(),i.current=null,o&&"function"!=typeof o&&(o.current=null)}},[]),r.useEffect(()=>{var e;null===(e=i.current)||void 0===e||e.update(l(c))}),e.jsx("div",{ref:d})});f.displayName="SimpleTable",exports.SimpleTable=f;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.es.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,Fragment as r}from"react/jsx-runtime";import n,{useRef as t,useEffect as o}from"react";import{SimpleTableVanilla as d}from"simple-table-core";import{renderToStaticMarkup as i}from"react-dom/server";function c(e,r){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(e);o<t.length;o++)r.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(n[t[o]]=e[t[o]])}return n}function a(r){return n=>{const t=document.createElement("div");return t.innerHTML=i(e(r,Object.assign({},n))),t}}function
|
|
1
|
+
import{jsx as e,Fragment as r}from"react/jsx-runtime";import n,{useRef as t,useEffect as o}from"react";import{SimpleTableVanilla as d}from"simple-table-core";import{renderToStaticMarkup as i}from"react-dom/server";function c(e,r){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(e);o<t.length;o++)r.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(n[t[o]]=e[t[o]])}return n}function a(r){return n=>{const t=document.createElement("div");return t.innerHTML=i(e(r,Object.assign({},n))),t}}function s(n){const t=document.createElement("div");return t.innerHTML=i(e(r,{children:n})),t}function l(n){return i(e(r,{children:n}))}function u(e){return"function"==typeof e}function f(e){const{cellRenderer:r,headerRenderer:n,children:t,nestedTable:o}=e,d=c(e,["cellRenderer","headerRenderer","children","nestedTable"]),i=Object.assign({},d);if(r&&(i.cellRenderer=a(r)),n&&(i.headerRenderer=a(n)),t&&(i.children=t.map(f)),o){const e=Object.assign(Object.assign({},o),{rows:[]});i.nestedTable=p(e)}return i}function p(e){const{defaultHeaders:r,footerRenderer:n,emptyStateRenderer:t,errorStateRenderer:o,loadingStateRenderer:d,tableEmptyStateRenderer:i,headerDropdown:p,columnEditorConfig:m,icons:R}=e,b=c(e,["defaultHeaders","footerRenderer","emptyStateRenderer","errorStateRenderer","loadingStateRenderer","tableEmptyStateRenderer","headerDropdown","columnEditorConfig","icons"]),y=Object.assign(Object.assign({},b),{defaultHeaders:r.map(f)});if(void 0!==n&&(y.footerRenderer=a(n)),void 0!==t)if(u(t))y.emptyStateRenderer=a(t);else{const e=t;y.emptyStateRenderer=()=>s(e)}if(void 0!==o)if(u(o))y.errorStateRenderer=a(o);else{const e=o;y.errorStateRenderer=()=>s(e)}if(void 0!==d)if(u(d))y.loadingStateRenderer=a(d);else{const e=d;y.loadingStateRenderer=()=>s(e)}return void 0!==i&&(y.tableEmptyStateRenderer=null===i?null:s(i)),void 0!==p&&(y.headerDropdown=a(p)),void 0!==m&&(y.columnEditorConfig=function(e){const{rowRenderer:r,customRenderer:n}=e,t=c(e,["rowRenderer","customRenderer"]);return Object.assign(Object.assign(Object.assign({},t),r?{rowRenderer:a(r)}:{}),n?{customRenderer:a(n)}:{})}(m)),void 0!==R&&(y.icons=function(e){const r={};for(const[n,t]of Object.entries(e))null!=t&&(r[n]="string"==typeof t||t instanceof HTMLElement||t instanceof SVGElement?t:l(t));return r}(R)),y}"function"==typeof SuppressedError&&SuppressedError;const m=n.forwardRef(function(r,n){const i=t(null),c=t(null),a=r;return o(()=>{if(!i.current)return;const e=new d(i.current,p(a));if(e.mount(),c.current=e,n){const r=e.getAPI();"function"==typeof n?n(r):n.current=r}return()=>{e.destroy(),c.current=null,n&&"function"!=typeof n&&(n.current=null)}},[]),o(()=>{var e;null===(e=c.current)||void 0===e||e.update(p(a))}),e("div",{ref:i})});m.displayName="SimpleTable";export{m as SimpleTable};
|
|
2
2
|
//# sourceMappingURL=index.es.js.map
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { SimpleTableConfig } from "../../types/SimpleTableConfig";
|
|
2
2
|
import { CustomTheme } from "../../types/CustomTheme";
|
|
3
|
+
import { ColumnEditorRowRenderer } from "../../types/ColumnEditorRowRendererProps";
|
|
4
|
+
import { ColumnEditorCustomRenderer } from "../../types/ColumnEditorCustomRendererProps";
|
|
3
5
|
import HeaderObject, { Accessor } from "../../types/HeaderObject";
|
|
4
6
|
export interface ResolvedIcons {
|
|
5
7
|
drag: string | HTMLElement | SVGSVGElement;
|
|
@@ -18,7 +20,8 @@ export interface MergedColumnEditorConfig {
|
|
|
18
20
|
searchPlaceholder: string;
|
|
19
21
|
allowColumnPinning: boolean;
|
|
20
22
|
searchFunction?: (header: HeaderObject, searchText: string) => boolean;
|
|
21
|
-
rowRenderer?:
|
|
23
|
+
rowRenderer?: ColumnEditorRowRenderer;
|
|
24
|
+
customRenderer?: ColumnEditorCustomRenderer;
|
|
22
25
|
}
|
|
23
26
|
export declare class TableInitializer {
|
|
24
27
|
static resolveIcons(config: SimpleTableConfig): ResolvedIcons;
|
|
@@ -31,6 +31,7 @@ import type HeaderRendererProps from "./types/HeaderRendererProps";
|
|
|
31
31
|
import type { HeaderRenderer, HeaderRendererComponents } from "./types/HeaderRendererProps";
|
|
32
32
|
import type ColumnEditorRowRendererProps from "./types/ColumnEditorRowRendererProps";
|
|
33
33
|
import type { ColumnEditorRowRenderer, ColumnEditorRowRendererComponents } from "./types/ColumnEditorRowRendererProps";
|
|
34
|
+
import type { ColumnEditorCustomRendererProps, ColumnEditorCustomRenderer } from "./types/ColumnEditorCustomRendererProps";
|
|
34
35
|
import type HeaderDropdownProps from "./types/HeaderDropdownProps";
|
|
35
36
|
import type { HeaderDropdown } from "./types/HeaderDropdownProps";
|
|
36
37
|
import type { RowButtonProps } from "./types/RowButton";
|
|
@@ -45,4 +46,4 @@ import type { SimpleTableProps } from "./types/SimpleTableProps";
|
|
|
45
46
|
import type { RowId } from "./types/RowId";
|
|
46
47
|
import type { PinnedSectionsState } from "./types/PinnedSectionsState";
|
|
47
48
|
export { SimpleTableVanilla };
|
|
48
|
-
export type { Accessor, AggregationConfig, AggregationType, BoundingBox, Cell, CellChangeProps, CellClickProps, CellRenderer, CellRendererProps, CellValue, ChartOptions, ColumnEditorConfig, ColumnEditorRowRenderer, ColumnEditorRowRendererComponents, ColumnEditorRowRendererProps, ColumnEditorSearchFunction, ColumnType, ColumnVisibilityState, Comparator, ComparatorProps, CustomTheme, CustomThemeProps, DragHandlerProps, EmptyStateRenderer, EmptyStateRendererProps, EnumOption, ErrorStateRenderer, ErrorStateRendererProps, ExportToCSVProps, ExportValueGetter, ExportValueProps, FilterCondition, FooterRendererProps, GetRowId, GetRowIdParams, IconsConfig, LoadingStateRenderer, LoadingStateRendererProps, HeaderDropdown, HeaderDropdownProps, HeaderObject, HeaderRenderer, HeaderRendererProps, HeaderRendererComponents, OnRowGroupExpandProps, OnSortProps, QuickFilterConfig, QuickFilterGetter, QuickFilterGetterProps, QuickFilterMode, Row, RowButtonProps, RowId, RowSelectionChangeProps, RowState, SetHeaderRenameProps, SharedTableProps, ShowWhen, SimpleTableConfig, SimpleTableProps, SortColumn, TableAPI, TableFilterState, TableHeaderProps, TableRefType, TableRowProps, Theme, PinnedSectionsState, UpdateDataProps, ValueFormatter, ValueFormatterProps, ValueGetter, ValueGetterProps, };
|
|
49
|
+
export type { Accessor, AggregationConfig, AggregationType, BoundingBox, Cell, CellChangeProps, CellClickProps, CellRenderer, CellRendererProps, CellValue, ChartOptions, ColumnEditorConfig, ColumnEditorCustomRenderer, ColumnEditorCustomRendererProps, ColumnEditorRowRenderer, ColumnEditorRowRendererComponents, ColumnEditorRowRendererProps, ColumnEditorSearchFunction, ColumnType, ColumnVisibilityState, Comparator, ComparatorProps, CustomTheme, CustomThemeProps, DragHandlerProps, EmptyStateRenderer, EmptyStateRendererProps, EnumOption, ErrorStateRenderer, ErrorStateRendererProps, ExportToCSVProps, ExportValueGetter, ExportValueProps, FilterCondition, FooterRendererProps, GetRowId, GetRowIdParams, IconsConfig, LoadingStateRenderer, LoadingStateRendererProps, HeaderDropdown, HeaderDropdownProps, HeaderObject, HeaderRenderer, HeaderRendererProps, HeaderRendererComponents, OnRowGroupExpandProps, OnSortProps, QuickFilterConfig, QuickFilterGetter, QuickFilterGetterProps, QuickFilterMode, Row, RowButtonProps, RowId, RowSelectionChangeProps, RowState, SetHeaderRenameProps, SharedTableProps, ShowWhen, SimpleTableConfig, SimpleTableProps, SortColumn, TableAPI, TableFilterState, TableHeaderProps, TableRefType, TableRowProps, Theme, PinnedSectionsState, UpdateDataProps, ValueFormatter, ValueFormatterProps, ValueGetter, ValueGetterProps, };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import HeaderObject from "./HeaderObject";
|
|
2
2
|
import { ColumnEditorRowRenderer } from "./ColumnEditorRowRendererProps";
|
|
3
|
+
import { ColumnEditorCustomRenderer } from "./ColumnEditorCustomRendererProps";
|
|
3
4
|
/**
|
|
4
5
|
* Custom search function for filtering columns in the column editor
|
|
5
6
|
* @param header - The header object to check
|
|
@@ -26,7 +27,9 @@ export interface ColumnEditorConfig {
|
|
|
26
27
|
allowColumnPinning?: boolean;
|
|
27
28
|
/** Custom renderer for column editor row layout to reposition icons and labels */
|
|
28
29
|
rowRenderer?: ColumnEditorRowRenderer;
|
|
30
|
+
/** Custom renderer for the entire column editor panel. Receives pre-built sections (search, list, reset) and headers. */
|
|
31
|
+
customRenderer?: ColumnEditorCustomRenderer;
|
|
29
32
|
}
|
|
30
|
-
export declare const DEFAULT_COLUMN_EDITOR_CONFIG: Required<Omit<ColumnEditorConfig, "searchFunction" | "rowRenderer">>;
|
|
33
|
+
export declare const DEFAULT_COLUMN_EDITOR_CONFIG: Required<Omit<ColumnEditorConfig, "searchFunction" | "rowRenderer" | "customRenderer">>;
|
|
31
34
|
/** Column editor config with defaults applied (text, searchEnabled, searchPlaceholder are required) */
|
|
32
|
-
export type MergedColumnEditorConfig = Required<Pick<ColumnEditorConfig, "text" | "searchEnabled" | "searchPlaceholder" | "allowColumnPinning">> & Pick<ColumnEditorConfig, "searchFunction" | "rowRenderer">;
|
|
35
|
+
export type MergedColumnEditorConfig = Required<Pick<ColumnEditorConfig, "text" | "searchEnabled" | "searchPlaceholder" | "allowColumnPinning">> & Pick<ColumnEditorConfig, "searchFunction" | "rowRenderer" | "customRenderer">;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type HeaderObject from "./HeaderObject";
|
|
2
|
+
export interface ColumnEditorCustomRendererProps {
|
|
3
|
+
/** The current headers array */
|
|
4
|
+
headers: HeaderObject[];
|
|
5
|
+
/** Pre-built search input section, or null if search is disabled */
|
|
6
|
+
searchSection: HTMLElement | null;
|
|
7
|
+
/** Pre-built column list section with drag-and-drop, checkboxes, etc. */
|
|
8
|
+
listSection: HTMLElement;
|
|
9
|
+
/** Pre-built reset button section, or null if no default headers are configured */
|
|
10
|
+
resetSection: HTMLElement | null;
|
|
11
|
+
/** Function to reset columns to their default configuration */
|
|
12
|
+
resetColumns?: () => void;
|
|
13
|
+
}
|
|
14
|
+
export type ColumnEditorCustomRenderer = (props: ColumnEditorCustomRendererProps) => HTMLElement | string | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default as SimpleTable } from "./SimpleTable";
|
|
2
|
-
export type { SimpleTableReactProps, TableInstance, ReactHeaderObject, ReactColumnEditorConfig, ReactIconsConfig, ReactIconElement, ReactCellRenderer, ReactHeaderRenderer, ReactFooterRenderer, ReactHeaderDropdown, ReactColumnEditorRowRenderer, ReactLoadingStateRenderer, ReactErrorStateRenderer, ReactEmptyStateRenderer, } from "./types";
|
|
3
|
-
export type { Accessor, AggregationConfig, AggregationType, BoundingBox, Cell, CellChangeProps, CellClickProps, CellRenderer, CellRendererProps, CellValue, ChartOptions, ColumnEditorConfig, ColumnEditorRowRenderer, ColumnEditorRowRendererComponents, ColumnEditorRowRendererProps, ColumnEditorSearchFunction, ColumnType, ColumnVisibilityState, Comparator, ComparatorProps, CustomTheme, CustomThemeProps, DragHandlerProps, EmptyStateRenderer, EmptyStateRendererProps, EnumOption, ErrorStateRenderer, ErrorStateRendererProps, ExportToCSVProps, ExportValueGetter, ExportValueProps, FilterCondition, FooterRendererProps, GetRowId, GetRowIdParams, HeaderDropdown, HeaderDropdownProps, HeaderObject, HeaderRenderer, HeaderRendererComponents, HeaderRendererProps, 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";
|
|
2
|
+
export type { SimpleTableReactProps, TableInstance, ReactHeaderObject, ReactColumnEditorConfig, ReactIconsConfig, ReactIconElement, ReactCellRenderer, ReactHeaderRenderer, ReactFooterRenderer, ReactHeaderDropdown, ReactColumnEditorRowRenderer, ReactColumnEditorCustomRenderer, ReactLoadingStateRenderer, ReactErrorStateRenderer, ReactEmptyStateRenderer, } from "./types";
|
|
3
|
+
export type { Accessor, AggregationConfig, AggregationType, BoundingBox, Cell, CellChangeProps, CellClickProps, CellRenderer, CellRendererProps, CellValue, ChartOptions, ColumnEditorConfig, ColumnEditorRowRenderer, ColumnEditorRowRendererComponents, ColumnEditorCustomRenderer, ColumnEditorCustomRendererProps, ColumnEditorRowRendererProps, ColumnEditorSearchFunction, ColumnType, ColumnVisibilityState, Comparator, ComparatorProps, CustomTheme, CustomThemeProps, DragHandlerProps, EmptyStateRenderer, EmptyStateRendererProps, EnumOption, ErrorStateRenderer, ErrorStateRendererProps, ExportToCSVProps, ExportValueGetter, ExportValueProps, FilterCondition, FooterRendererProps, GetRowId, GetRowIdParams, HeaderDropdown, HeaderDropdownProps, HeaderObject, HeaderRenderer, HeaderRendererComponents, HeaderRendererProps, 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";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type React from "react";
|
|
2
|
-
import type { SimpleTableProps, SimpleTableConfig, HeaderObject, TableAPI, CellRendererProps, HeaderRendererProps, FooterRendererProps, LoadingStateRendererProps, ErrorStateRendererProps, EmptyStateRendererProps, HeaderDropdownProps, ColumnEditorRowRendererProps, ColumnEditorConfig } from "simple-table-core";
|
|
2
|
+
import type { SimpleTableProps, SimpleTableConfig, HeaderObject, TableAPI, CellRendererProps, HeaderRendererProps, FooterRendererProps, LoadingStateRendererProps, ErrorStateRendererProps, EmptyStateRendererProps, HeaderDropdownProps, ColumnEditorRowRendererProps, ColumnEditorCustomRendererProps, ColumnEditorConfig } from "simple-table-core";
|
|
3
3
|
export interface TableInstance {
|
|
4
4
|
mount(): void;
|
|
5
5
|
update(config: Partial<SimpleTableConfig>): void;
|
|
@@ -25,11 +25,13 @@ export type ReactHeaderRenderer = React.ComponentType<HeaderRendererProps>;
|
|
|
25
25
|
export type ReactFooterRenderer = React.ComponentType<FooterRendererProps>;
|
|
26
26
|
export type ReactHeaderDropdown = React.ComponentType<HeaderDropdownProps>;
|
|
27
27
|
export type ReactColumnEditorRowRenderer = React.ComponentType<ColumnEditorRowRendererProps>;
|
|
28
|
+
export type ReactColumnEditorCustomRenderer = React.ComponentType<ColumnEditorCustomRendererProps>;
|
|
28
29
|
export type ReactLoadingStateRenderer = React.ComponentType<LoadingStateRendererProps> | React.ReactNode;
|
|
29
30
|
export type ReactErrorStateRenderer = React.ComponentType<ErrorStateRendererProps> | React.ReactNode;
|
|
30
31
|
export type ReactEmptyStateRenderer = React.ComponentType<EmptyStateRendererProps> | React.ReactNode;
|
|
31
|
-
export interface ReactColumnEditorConfig extends Omit<ColumnEditorConfig, "rowRenderer"> {
|
|
32
|
+
export interface ReactColumnEditorConfig extends Omit<ColumnEditorConfig, "rowRenderer" | "customRenderer"> {
|
|
32
33
|
rowRenderer?: ReactColumnEditorRowRenderer;
|
|
34
|
+
customRenderer?: ReactColumnEditorCustomRenderer;
|
|
33
35
|
}
|
|
34
36
|
export interface ReactHeaderObject extends Omit<HeaderObject, "cellRenderer" | "headerRenderer" | "children" | "nestedTable"> {
|
|
35
37
|
cellRenderer?: ReactCellRenderer;
|
|
@@ -48,4 +50,4 @@ export interface SimpleTableReactProps extends Omit<SimpleTableProps, "tableRef"
|
|
|
48
50
|
columnEditorConfig?: ReactColumnEditorConfig;
|
|
49
51
|
icons?: ReactIconsConfig;
|
|
50
52
|
}
|
|
51
|
-
export type { CellRendererProps, HeaderRendererProps, FooterRendererProps, LoadingStateRendererProps, ErrorStateRendererProps, EmptyStateRendererProps, HeaderDropdownProps, ColumnEditorRowRendererProps, };
|
|
53
|
+
export type { CellRendererProps, HeaderRendererProps, FooterRendererProps, LoadingStateRendererProps, ErrorStateRendererProps, EmptyStateRendererProps, HeaderDropdownProps, ColumnEditorRowRendererProps, ColumnEditorCustomRendererProps, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simple-table/react",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.16",
|
|
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.0-beta.
|
|
32
|
+
"simple-table-core": "3.0.0-beta.16"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@rollup/plugin-alias": "^4.0.4",
|