@oc-digital/react-component-library 8.0.0 → 8.1.0-beta.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.
- package/build/EditableTable/Caret.d.ts +4 -0
- package/build/EditableTable/EditableTable.types.d.ts +9 -0
- package/build/EditableTable/defaultCompare.d.ts +1 -0
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/stories/Button.d.ts +28 -0
- package/build/stories/Button.stories.d.ts +10 -0
- package/build/stories/Header.d.ts +12 -0
- package/build/stories/Header.stories.d.ts +8 -0
- package/build/stories/Page.d.ts +3 -0
- package/build/stories/Page.stories.d.ts +8 -0
- package/build/style.css +1 -0
- package/package.json +1 -1
- package/build/ThemeProvider/index.d.ts +0 -5
|
@@ -12,6 +12,10 @@ export type ITableHeader = {
|
|
|
12
12
|
};
|
|
13
13
|
export type TableCellValues = null | undefined | string | number | Date | boolean | string[];
|
|
14
14
|
export type SynchCellWithStateFn = (rowIndex: number, columnId: string, value: TableCellValues, errorStatus: boolean, forceUpdate?: boolean, original?: RowData) => void;
|
|
15
|
+
export type SortMeta = {
|
|
16
|
+
sortingColumnId: string;
|
|
17
|
+
asc: boolean;
|
|
18
|
+
};
|
|
15
19
|
export type FieldConfig = {
|
|
16
20
|
[key: string]: {
|
|
17
21
|
validationRule?: SchemaOf<any>;
|
|
@@ -33,6 +37,8 @@ export type FieldConfig = {
|
|
|
33
37
|
onChangeValueModifier?: (value: string) => TableCellValues;
|
|
34
38
|
getCalculatedValue?: (values: RowData) => TableCellValues;
|
|
35
39
|
total?: boolean;
|
|
40
|
+
canUserSort?: boolean;
|
|
41
|
+
sortCompareFn?: (a: any, b: any) => number;
|
|
36
42
|
};
|
|
37
43
|
};
|
|
38
44
|
export interface IEditableTableProps {
|
|
@@ -60,6 +66,7 @@ export interface IEditableTableProps {
|
|
|
60
66
|
rowHeight?: number;
|
|
61
67
|
includeGlobalSearch?: boolean;
|
|
62
68
|
disableHeaderSelect?: boolean;
|
|
69
|
+
defaultSortMeta?: SortMeta | null;
|
|
63
70
|
}
|
|
64
71
|
type AdditionalCellProps = Pick<IEditableTableProps, "fieldConfig" | "syncCellWithState" | "setRows">;
|
|
65
72
|
export interface ExtendedCellProps extends AdditionalCellProps, CellProps<RowData> {
|
|
@@ -97,6 +104,8 @@ export interface ITableContentProps extends Pick<IEditableTableProps, "disabled"
|
|
|
97
104
|
selectedFlatRows: Row<RowData>[];
|
|
98
105
|
fieldConfig: FieldConfig;
|
|
99
106
|
tableHeaders: ITableHeader[];
|
|
107
|
+
sortMeta: SortMeta | null;
|
|
108
|
+
setSortMeta: React.Dispatch<React.SetStateAction<SortMeta | null>>;
|
|
100
109
|
}
|
|
101
110
|
export interface IGlobalFilterProps {
|
|
102
111
|
preGlobalFilteredRows: RowData[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const defaultCompare: (x: any, y: any) => 0 | 1 | -1;
|