mig-schema-table 4.2.4 → 4.2.6
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/component/SchemaTable/index.d.ts +10 -7
- package/dist/component/provider/SchemaTableContext.d.ts +15 -3
- package/dist/{index-C4n9c7D7.js → index-DJ72GHn6.js} +4779 -4758
- package/dist/{index-BeuaAtOX.js → index-JJxVX8uT.js} +1 -1
- package/dist/mig-schema-table.es.js +1 -1
- package/dist/mig-schema-table.umd.js +50 -50
- package/package.json +1 -1
- package/dist/component/hooks/useTranslate.d.ts +0 -1
|
@@ -19,11 +19,11 @@ export interface ICustomElementProps {
|
|
|
19
19
|
renderData?: IRenderData[];
|
|
20
20
|
}
|
|
21
21
|
export interface ISchemaTableProps<T> {
|
|
22
|
-
Heading?: React.
|
|
23
|
-
setSortAsc
|
|
24
|
-
setSortColumn
|
|
25
|
-
sortAsc
|
|
26
|
-
sortColumn
|
|
22
|
+
Heading?: React.ComponentType<VariableSizeListProps & {
|
|
23
|
+
setSortAsc?: Dispatch<SetStateAction<boolean>>;
|
|
24
|
+
setSortColumn?: Dispatch<SetStateAction<string>>;
|
|
25
|
+
sortAsc?: boolean;
|
|
26
|
+
sortColumn?: string;
|
|
27
27
|
sortedRenderData?: IRenderData[];
|
|
28
28
|
}>;
|
|
29
29
|
checkedIndexes?: number[];
|
|
@@ -31,6 +31,9 @@ export interface ISchemaTableProps<T> {
|
|
|
31
31
|
[propName: string]: IColumnConfig<T>;
|
|
32
32
|
};
|
|
33
33
|
CustomElement?: React.ComponentType<ICustomElementProps>;
|
|
34
|
+
customElementProps?: {
|
|
35
|
+
[controlProp: string]: unknown;
|
|
36
|
+
};
|
|
34
37
|
data: T[] | ((getDataProps: IGetDataProps) => Promise<T[]>);
|
|
35
38
|
defaultColumnFilters?: IColumnFilterMap;
|
|
36
39
|
defaultSortAsc?: boolean;
|
|
@@ -46,7 +49,7 @@ export interface ISchemaTableProps<T> {
|
|
|
46
49
|
isSearchable?: boolean;
|
|
47
50
|
isSortable?: boolean;
|
|
48
51
|
maxHeight?: number;
|
|
49
|
-
onCheckedIndexesChange?:
|
|
52
|
+
onCheckedIndexesChange?: (newIndexes: number[]) => void;
|
|
50
53
|
onRowClick?: (rowData: T, dataIndex: number, event: React.MouseEvent) => void;
|
|
51
54
|
onRowDoubleClick?: (rowData: T, dataIndex: number, event: React.MouseEvent) => void;
|
|
52
55
|
onSearchEnter?: (searchQuery: string) => void;
|
|
@@ -74,5 +77,5 @@ export interface INumberColumnFilterValue {
|
|
|
74
77
|
filterEmpty?: true;
|
|
75
78
|
}
|
|
76
79
|
export type TColumnFilterValue = string | boolean | number | IDateColumnFilterValue | INumberColumnFilterValue | null;
|
|
77
|
-
declare const MemoizedSchemaTable: <T>(
|
|
80
|
+
declare const MemoizedSchemaTable: <T>({ Heading, checkedIndexes, config, CustomElement, customElementProps, data, defaultColumnFilters, defaultSortAsc, defaultSortColumn, disabledCheckedIndexes, enableAutoFocus, enableRowCounter, getRowClassName, getRowSelected, isColumnFilterable, isExportable, isResizable, isSearchable, isSortable, maxHeight, onCheckedIndexesChange, onRowClick, onRowDoubleClick, onSearchEnter, rowHeight, schema, searchPlaceholder, settingsStorageKey, style, translate, useFilterStateHash, width, tableRef, loadMoreItems, itemCount, }: ISchemaTableProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
78
81
|
export default MemoizedSchemaTable;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IRenderData } from '../types.ts';
|
|
1
|
+
import { IColumnConfig, IRenderData } from '../types.ts';
|
|
2
2
|
import { ReferenceObject, SchemaObject } from 'openapi3-ts/oas31';
|
|
3
|
-
import { IColumnFilterMap
|
|
3
|
+
import { IColumnFilterMap } from '../SchemaTable';
|
|
4
4
|
import { Dispatch, SetStateAction } from 'react';
|
|
5
5
|
import { IThMenuConfig } from '../SchemaTable/ThMenu';
|
|
6
6
|
import * as React from "react";
|
|
@@ -9,20 +9,32 @@ export interface ISchemaTableContext<T = any> {
|
|
|
9
9
|
columnFilterMap: IColumnFilterMap;
|
|
10
10
|
columnNames: string[];
|
|
11
11
|
columnWidths: number[];
|
|
12
|
+
config?: {
|
|
13
|
+
[propName: string]: IColumnConfig<T>;
|
|
14
|
+
};
|
|
15
|
+
disabledCheckedIndexes?: number[];
|
|
16
|
+
getRowClassName?: (rowData: T, dataIndex: number, filteredSortedData: IRenderData[]) => string;
|
|
17
|
+
getRowSelected?: (rowData: T, dataIndex: number) => boolean;
|
|
18
|
+
isColumnFilterable: boolean;
|
|
12
19
|
isItemLoaded: (rowIndex: number) => boolean;
|
|
20
|
+
isSortable: boolean;
|
|
21
|
+
onCheckedIndexesChange?: (newIndexes: number[]) => void;
|
|
22
|
+
onRowClick?: (rowData: T, dataIndex: number, event: React.MouseEvent) => void;
|
|
23
|
+
onRowDoubleClick?: (rowData: T, dataIndex: number, event: React.MouseEvent) => void;
|
|
13
24
|
properties: {
|
|
14
25
|
[propertyName: string]: SchemaObject | ReferenceObject;
|
|
15
26
|
};
|
|
16
27
|
required: string[];
|
|
17
|
-
schemaTableProps: ISchemaTableProps<T>;
|
|
18
28
|
setCustomColumnNames: Dispatch<SetStateAction<string[] | undefined>>;
|
|
19
29
|
setCustomColumnWidths: Dispatch<SetStateAction<number[] | undefined>>;
|
|
20
30
|
setMenuConfig: React.Dispatch<React.SetStateAction<IThMenuConfig<T> | undefined>>;
|
|
21
31
|
setSortAsc: React.Dispatch<React.SetStateAction<boolean>>;
|
|
22
32
|
setSortColumn: React.Dispatch<React.SetStateAction<string>>;
|
|
33
|
+
settingsStorageKey?: string;
|
|
23
34
|
sortAsc?: boolean;
|
|
24
35
|
sortColumn?: string;
|
|
25
36
|
sortedRenderData?: IRenderData[];
|
|
26
37
|
sourceData?: T[] | null;
|
|
38
|
+
translate: (key: string, ...args: Array<string | number>) => string;
|
|
27
39
|
}
|
|
28
40
|
export declare const SchemaTableContext: React.Context<ISchemaTableContext<any>>;
|