@infinite-table/infinite-react 3.1.6 → 3.2.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/index.css +1 -1
- package/index.d.ts +293 -74
- package/index.dev.js +2093 -570
- package/index.dev.mjs +2014 -495
- package/index.js +2 -2
- package/index.mjs +2 -2
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import React__default, { CSSProperties, HTMLProps, RefCallback, MutableRefObject, MouseEvent, KeyboardEvent, ReactNode } from 'react';
|
|
2
|
+
import React__default, { CSSProperties, HTMLProps, RefCallback, MutableRefObject, MouseEvent, KeyboardEvent, ReactNode, EffectCallback } from 'react';
|
|
3
3
|
|
|
4
4
|
declare type SortDir = 1 | -1;
|
|
5
5
|
declare type MultisortInfo<T> = {
|
|
@@ -249,6 +249,7 @@ declare type Prettify<T> = {
|
|
|
249
249
|
declare type NonUndefined<T> = T extends undefined ? never : T;
|
|
250
250
|
|
|
251
251
|
declare type InfiniteTableToggleGroupRowFn = (groupKeys: any[]) => void;
|
|
252
|
+
declare type InfiniteTableToggleRowDetailsFn = (id: any) => void;
|
|
252
253
|
declare type InfiniteTableSelectRowFn = (id: any) => void;
|
|
253
254
|
declare type InfiniteTableColumnHeaderParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
|
|
254
255
|
dragging: boolean;
|
|
@@ -280,6 +281,7 @@ declare type InfiniteTableColumnHeaderParam<DATA_TYPE, COL_TYPE = InfiniteTableC
|
|
|
280
281
|
declare type InfiniteTableColumnRenderBag = {
|
|
281
282
|
value: string | number | Renderable;
|
|
282
283
|
groupIcon?: Renderable;
|
|
284
|
+
rowDetailsIcon?: Renderable;
|
|
283
285
|
all?: Renderable;
|
|
284
286
|
selectionCheckBox?: Renderable;
|
|
285
287
|
};
|
|
@@ -301,6 +303,10 @@ declare type InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE = InfiniteTa
|
|
|
301
303
|
toggleGroupRow: InfiniteTableToggleGroupRowFn;
|
|
302
304
|
toggleCurrentGroupRowSelection: () => void;
|
|
303
305
|
toggleCurrentRowSelection: () => void;
|
|
306
|
+
toggleCurrentRowDetails: () => void;
|
|
307
|
+
toggleRowDetails: InfiniteTableToggleRowDetailsFn;
|
|
308
|
+
expandRowDetails: InfiniteTableToggleRowDetailsFn;
|
|
309
|
+
collapseRowDetails: InfiniteTableToggleRowDetailsFn;
|
|
304
310
|
rowHasSelectedCells: boolean;
|
|
305
311
|
cellSelected: boolean;
|
|
306
312
|
selectCurrentRow: () => void;
|
|
@@ -435,6 +441,7 @@ declare type InfiniteTableColumn<DATA_TYPE> = {
|
|
|
435
441
|
minWidth?: number;
|
|
436
442
|
maxWidth?: number;
|
|
437
443
|
renderGroupIcon?: InfiniteTableColumnRenderFunctionForGroupRows<DATA_TYPE>;
|
|
444
|
+
renderRowDetailsIcon?: boolean | InfiniteTableColumnRenderFunction<DATA_TYPE>;
|
|
438
445
|
renderSortIcon?: InfiniteTableColumnHeaderRenderFunction<DATA_TYPE>;
|
|
439
446
|
renderFilterIcon?: InfiniteTableColumnHeaderRenderFunction<DATA_TYPE>;
|
|
440
447
|
renderSelectionCheckBox?: boolean | InfiniteTableColumnRenderFunction<DATA_TYPE>;
|
|
@@ -570,6 +577,7 @@ declare type OnAvailableSizeChange = (size: Size) => void;
|
|
|
570
577
|
declare class MatrixBrain extends Logger {
|
|
571
578
|
private scrolling;
|
|
572
579
|
private width;
|
|
580
|
+
name: string;
|
|
573
581
|
private height;
|
|
574
582
|
private cols;
|
|
575
583
|
private rows;
|
|
@@ -788,6 +796,19 @@ declare class MatrixBrain extends Logger {
|
|
|
788
796
|
destroy: () => void;
|
|
789
797
|
}
|
|
790
798
|
|
|
799
|
+
declare class RowSizeCache {
|
|
800
|
+
rowHeight: Map<number, number>;
|
|
801
|
+
rowDetailHeight: Map<number, number>;
|
|
802
|
+
getTotalRowHeight(index: number): number;
|
|
803
|
+
getRowHeight: (index: number) => number;
|
|
804
|
+
getRowDetailHeight: (index: number) => number;
|
|
805
|
+
getSize(index: number): {
|
|
806
|
+
rowHeight: number;
|
|
807
|
+
rowDetailHeight: number;
|
|
808
|
+
totalRowHeight: number;
|
|
809
|
+
};
|
|
810
|
+
}
|
|
811
|
+
|
|
791
812
|
declare type CellSelectionPosition<ROW_PRIMARY_KEY_TYPE = any, COL_ID = string> = [ROW_PRIMARY_KEY_TYPE, COL_ID];
|
|
792
813
|
declare type CellSelectionStateObject = {
|
|
793
814
|
selectedCells: CellSelectionPosition[];
|
|
@@ -1008,6 +1029,8 @@ interface InfiniteTableComputedValues<T> {
|
|
|
1008
1029
|
};
|
|
1009
1030
|
multiRowSelector: MultiRowSelector;
|
|
1010
1031
|
multiCellSelector: MultiCellSelector;
|
|
1032
|
+
computedRowHeight: number | ((index: number) => number);
|
|
1033
|
+
computedRowSizeCacheForDetails: RowSizeCache | undefined;
|
|
1011
1034
|
renderSelectionCheckBox: boolean;
|
|
1012
1035
|
rowspan?: MatrixBrainOptions['rowspan'];
|
|
1013
1036
|
computedPinnedStartOverflow: boolean;
|
|
@@ -1038,6 +1061,164 @@ declare type PointCoords = {
|
|
|
1038
1061
|
left: number;
|
|
1039
1062
|
};
|
|
1040
1063
|
|
|
1064
|
+
declare type ComponentStateContext<T_STATE, T_ACTIONS> = {
|
|
1065
|
+
getComponentState: () => T_STATE;
|
|
1066
|
+
componentState: T_STATE;
|
|
1067
|
+
componentActions: T_ACTIONS;
|
|
1068
|
+
assignState: (state: Partial<T_STATE>) => void;
|
|
1069
|
+
replaceState: (state: T_STATE) => void;
|
|
1070
|
+
};
|
|
1071
|
+
declare type ComponentStateGeneratedActions<T_STATE> = {
|
|
1072
|
+
[k in keyof T_STATE]: T_STATE[k] | React.SetStateAction<T_STATE[k]>;
|
|
1073
|
+
};
|
|
1074
|
+
declare type ComponentInterceptedActions<T_STATE> = {
|
|
1075
|
+
[k in keyof T_STATE]?: (value: T_STATE[k], { actions, state, }: {
|
|
1076
|
+
actions: ComponentStateGeneratedActions<T_STATE>;
|
|
1077
|
+
state: T_STATE;
|
|
1078
|
+
}) => void | boolean;
|
|
1079
|
+
};
|
|
1080
|
+
declare type ComponentMappedCallbacks<T_STATE> = {
|
|
1081
|
+
[k in keyof T_STATE]: (value: T_STATE[k], state: T_STATE) => {
|
|
1082
|
+
callbackName: string;
|
|
1083
|
+
callbackParams: any[];
|
|
1084
|
+
};
|
|
1085
|
+
};
|
|
1086
|
+
declare type ComponentStateActions<T_STATE> = ComponentStateGeneratedActions<T_STATE>;
|
|
1087
|
+
|
|
1088
|
+
declare type ForwardPropsToStateFnResult<TYPE_PROPS, TYPE_RESULT, COMPONENT_SETUP_STATE> = {
|
|
1089
|
+
[propName in keyof TYPE_PROPS & keyof TYPE_RESULT]: 1 | ((value: TYPE_PROPS[propName], setupState: COMPONENT_SETUP_STATE) => TYPE_RESULT[propName]);
|
|
1090
|
+
};
|
|
1091
|
+
declare type ComponentStateRootConfig<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT_SETUP_STATE = {}, COMPONENT_DERIVED_STATE = {}, T_ACTIONS = {}, T_PARENT_STATE = {}> = {
|
|
1092
|
+
debugName?: string;
|
|
1093
|
+
initSetupState?: (props: T_PROPS) => COMPONENT_SETUP_STATE;
|
|
1094
|
+
layoutEffect?: boolean;
|
|
1095
|
+
forwardProps?: (setupState: COMPONENT_SETUP_STATE) => ForwardPropsToStateFnResult<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT_SETUP_STATE>;
|
|
1096
|
+
allowedControlledPropOverrides?: Record<keyof T_PROPS, true>;
|
|
1097
|
+
interceptActions?: ComponentInterceptedActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>;
|
|
1098
|
+
mappedCallbacks?: ComponentMappedCallbacks<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>;
|
|
1099
|
+
onPropChange?: (params: {
|
|
1100
|
+
name: keyof T_PROPS;
|
|
1101
|
+
oldValue: any;
|
|
1102
|
+
newValue: any;
|
|
1103
|
+
}, props: T_PROPS, actions: ComponentStateActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>, state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>) => void;
|
|
1104
|
+
onPropsChange?: (newPropValues: {
|
|
1105
|
+
[k in keyof T_PROPS]?: {
|
|
1106
|
+
newValue: T_PROPS[k];
|
|
1107
|
+
oldValue: T_PROPS[k];
|
|
1108
|
+
};
|
|
1109
|
+
}, props: T_PROPS, actions: ComponentStateActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>, state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>) => void;
|
|
1110
|
+
mapPropsToState?: (params: {
|
|
1111
|
+
props: T_PROPS;
|
|
1112
|
+
state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>;
|
|
1113
|
+
oldState: null | (COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>);
|
|
1114
|
+
parentState: T_PARENT_STATE | null;
|
|
1115
|
+
}) => COMPONENT_DERIVED_STATE;
|
|
1116
|
+
concludeReducer?: (params: {
|
|
1117
|
+
previousState: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & COMPONENT_DERIVED_STATE;
|
|
1118
|
+
state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & COMPONENT_DERIVED_STATE;
|
|
1119
|
+
updatedProps: Partial<T_PROPS> | null;
|
|
1120
|
+
parentState: T_PARENT_STATE | null;
|
|
1121
|
+
}) => COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & COMPONENT_DERIVED_STATE;
|
|
1122
|
+
getReducerActions?: (dispatch: React$1.Dispatch<any>) => T_ACTIONS;
|
|
1123
|
+
getParentState?: () => T_PARENT_STATE;
|
|
1124
|
+
cleanup?: (state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & COMPONENT_DERIVED_STATE) => void;
|
|
1125
|
+
onControlledPropertyChange?: (name: string, newValue: any, oldValue: any) => void | ((value: any, oldValue: any) => any);
|
|
1126
|
+
};
|
|
1127
|
+
declare function getComponentStateRoot<T_PROPS, COMPONENT_MAPPED_STATE extends object, COMPONENT_SETUP_STATE extends object = {}, COMPONENT_DERIVED_STATE extends object = {}, T_ACTIONS = {}, T_PARENT_STATE = {}>(config: ComponentStateRootConfig<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT_SETUP_STATE, COMPONENT_DERIVED_STATE, T_ACTIONS, T_PARENT_STATE>): React$1.NamedExoticComponent<T_PROPS & {
|
|
1128
|
+
children: React$1.ReactNode;
|
|
1129
|
+
}>;
|
|
1130
|
+
declare function useComponentState<COMPONENT_STATE>(): ComponentStateContext<COMPONENT_STATE, ComponentStateGeneratedActions<COMPONENT_STATE>>;
|
|
1131
|
+
|
|
1132
|
+
declare type DataSourceStateRestoreForDetails<T> = {
|
|
1133
|
+
originalDataArray: DataSourceState<T>['originalDataArray'] | undefined;
|
|
1134
|
+
groupBy: DataSourceState<T>['groupBy'] | undefined;
|
|
1135
|
+
groupRowsState: DataSourceState<T>['groupRowsState'] | undefined;
|
|
1136
|
+
pivotBy: DataSourceState<T>['pivotBy'] | undefined;
|
|
1137
|
+
sortInfo: DataSourceState<T>['sortInfo'] | undefined;
|
|
1138
|
+
filterValue: DataSourceState<T>['filterValue'] | undefined;
|
|
1139
|
+
livePaginationCursor: DataSourceState<T>['livePaginationCursor'] | undefined;
|
|
1140
|
+
};
|
|
1141
|
+
declare type RowDetailsCacheKey = string | number;
|
|
1142
|
+
declare type RowDetailsCacheEntry = {
|
|
1143
|
+
all?: boolean;
|
|
1144
|
+
groupBy?: boolean;
|
|
1145
|
+
sortInfo?: boolean;
|
|
1146
|
+
filterValue?: boolean;
|
|
1147
|
+
data?: boolean;
|
|
1148
|
+
livePaginationCursor?: boolean;
|
|
1149
|
+
columnOrder?: boolean;
|
|
1150
|
+
};
|
|
1151
|
+
|
|
1152
|
+
interface RowDetailsCacheStorage<_K, T> {
|
|
1153
|
+
add(key: any, value: T): void;
|
|
1154
|
+
get(key: any): T | undefined;
|
|
1155
|
+
delete(key: any): void;
|
|
1156
|
+
has(key: any): boolean;
|
|
1157
|
+
}
|
|
1158
|
+
interface RowDetailsCacheStorageForCurrentRow<T = RowDetailsCacheEntry> {
|
|
1159
|
+
add(value: T): void;
|
|
1160
|
+
get(): T | undefined;
|
|
1161
|
+
delete(): void;
|
|
1162
|
+
has(): boolean;
|
|
1163
|
+
}
|
|
1164
|
+
declare class RowDetailsCache<K = RowDetailsCacheKey, T = RowDetailsCacheEntry> implements RowDetailsCacheStorage<K, T> {
|
|
1165
|
+
private cacheStorage;
|
|
1166
|
+
constructor(cache?: boolean | number);
|
|
1167
|
+
add(key: K, value: T): void;
|
|
1168
|
+
get(key: K): T | undefined;
|
|
1169
|
+
delete(key: K): void;
|
|
1170
|
+
has(key: K): boolean;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
declare type BooleanCollectionStateKeys<KeyType> = true | KeyType[];
|
|
1174
|
+
declare type BooleanCollectionStateObject<KeyType> = {
|
|
1175
|
+
positiveItems: BooleanCollectionStateKeys<KeyType>;
|
|
1176
|
+
negativeItems: BooleanCollectionStateKeys<KeyType>;
|
|
1177
|
+
};
|
|
1178
|
+
declare abstract class BooleanCollectionState<StateObject, KeyType> {
|
|
1179
|
+
protected positiveMap?: Map<KeyType, true>;
|
|
1180
|
+
protected negativeMap?: Map<KeyType, true>;
|
|
1181
|
+
protected allNegative: boolean;
|
|
1182
|
+
protected allPositive: boolean;
|
|
1183
|
+
private initialState;
|
|
1184
|
+
constructor(state: BooleanCollectionStateObject<KeyType> | BooleanCollectionState<StateObject, KeyType>);
|
|
1185
|
+
abstract getPositiveFromState(state: StateObject): BooleanCollectionStateKeys<KeyType>;
|
|
1186
|
+
abstract getNegativeFromState(state: StateObject): BooleanCollectionStateKeys<KeyType>;
|
|
1187
|
+
abstract getState(): StateObject;
|
|
1188
|
+
protected getInitialState(): BooleanCollectionStateObject<KeyType>;
|
|
1189
|
+
destroy(): void;
|
|
1190
|
+
private update;
|
|
1191
|
+
protected isDefaultNegativeSelection(): boolean;
|
|
1192
|
+
protected isDefaultPositiveSelection(): boolean;
|
|
1193
|
+
protected areAllNegative(): boolean;
|
|
1194
|
+
protected areAllPositive(): boolean;
|
|
1195
|
+
protected makeAllNegative(): void;
|
|
1196
|
+
protected makeAllPositive(): void;
|
|
1197
|
+
protected isItemPositive(key: KeyType): boolean;
|
|
1198
|
+
protected isItemNegative(key: KeyType): boolean;
|
|
1199
|
+
protected setItemValue(key: KeyType, shouldMakePositive: boolean): void;
|
|
1200
|
+
protected makeItemNegative(key: KeyType): void;
|
|
1201
|
+
protected makeItemPositive(key: KeyType): void;
|
|
1202
|
+
protected toggleItem(key: KeyType): void;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
declare class RowDetailsState<KeyType = any> extends BooleanCollectionState<DataSourcePropRowDetailsStateObject<KeyType>, KeyType> {
|
|
1206
|
+
constructor(state: DataSourcePropRowDetailsStateObject<KeyType> | RowDetailsState<KeyType>);
|
|
1207
|
+
getState(): DataSourcePropRowDetailsStateObject<KeyType>;
|
|
1208
|
+
getPositiveFromState(state: DataSourcePropRowDetailsStateObject<KeyType>): true | KeyType[];
|
|
1209
|
+
getNegativeFromState(state: DataSourcePropRowDetailsStateObject<KeyType>): true | KeyType[];
|
|
1210
|
+
areAllCollapsed(): boolean;
|
|
1211
|
+
areAllExpanded(): boolean;
|
|
1212
|
+
collapseAll(): void;
|
|
1213
|
+
expandAll(): void;
|
|
1214
|
+
isRowDetailsExpanded: (key: KeyType) => boolean;
|
|
1215
|
+
isRowDetailsCollapsed(key: KeyType): boolean;
|
|
1216
|
+
setRowDetailsExpanded(key: KeyType, shouldExpand: boolean): void;
|
|
1217
|
+
collapseRowDetails(key: KeyType): void;
|
|
1218
|
+
expandRowDetails(key: KeyType): void;
|
|
1219
|
+
toggleRowDetails(key: KeyType): void;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1041
1222
|
declare type TableRenderCellFnParam = {
|
|
1042
1223
|
domRef: RefCallback<HTMLElement>;
|
|
1043
1224
|
rowIndex: number;
|
|
@@ -1054,23 +1235,43 @@ declare type TableRenderCellFnParam = {
|
|
|
1054
1235
|
onMouseEnter: VoidFunction;
|
|
1055
1236
|
onMouseLeave: VoidFunction;
|
|
1056
1237
|
};
|
|
1238
|
+
declare type TableRenderDetailRowFnParam = {
|
|
1239
|
+
domRef: RefCallback<HTMLElement>;
|
|
1240
|
+
rowIndex: number;
|
|
1241
|
+
hidden: boolean;
|
|
1242
|
+
height: number;
|
|
1243
|
+
rowFixed: FixedPosition;
|
|
1244
|
+
onMouseEnter: VoidFunction;
|
|
1245
|
+
onMouseLeave: VoidFunction;
|
|
1246
|
+
};
|
|
1057
1247
|
declare type TableRenderCellFn = (param: TableRenderCellFnParam) => Renderable;
|
|
1248
|
+
declare type TableRenderDetailRowFn = (param: TableRenderDetailRowFnParam) => Renderable;
|
|
1058
1249
|
declare class ReactHeadlessTableRenderer extends Logger {
|
|
1059
1250
|
private brain;
|
|
1251
|
+
debugId: string;
|
|
1060
1252
|
private destroyed;
|
|
1061
1253
|
private scrolling;
|
|
1062
1254
|
cellHoverClassNames: string[];
|
|
1063
|
-
name: string;
|
|
1064
1255
|
private itemDOMElements;
|
|
1065
1256
|
private itemDOMRefs;
|
|
1066
1257
|
private updaters;
|
|
1258
|
+
private detailRowDOMElements;
|
|
1259
|
+
private detailRowDOMRefs;
|
|
1260
|
+
private detailRowUpdaters;
|
|
1067
1261
|
private mappedCells;
|
|
1262
|
+
private mappedDetailRows;
|
|
1068
1263
|
private items;
|
|
1264
|
+
private detailItems;
|
|
1069
1265
|
private currentHoveredRow;
|
|
1070
1266
|
private onDestroy;
|
|
1071
1267
|
private hoverRowUpdatesInProgress;
|
|
1072
1268
|
private infiniteNode;
|
|
1073
1269
|
private getInfiniteNode;
|
|
1270
|
+
setDetailTransform: (element: HTMLElement, _rowIndex: number, { y, scrollTop, scrollLeft, }: {
|
|
1271
|
+
y: number;
|
|
1272
|
+
scrollTop?: boolean | undefined;
|
|
1273
|
+
scrollLeft?: number | undefined;
|
|
1274
|
+
}) => void;
|
|
1074
1275
|
setTransform: (element: HTMLElement, _rowIndex: number, colIndex: number, { x, y, scrollLeft, scrollTop, }: {
|
|
1075
1276
|
x: number;
|
|
1076
1277
|
y: number;
|
|
@@ -1107,15 +1308,18 @@ declare class ReactHeadlessTableRenderer extends Logger {
|
|
|
1107
1308
|
isCellRendered: (rowIndex: number, colIndex: number) => boolean;
|
|
1108
1309
|
isColumnRendered: (colIndex: number) => boolean;
|
|
1109
1310
|
getExtraSpanCellsForRange: (range: TableRenderRange) => [number, number][];
|
|
1110
|
-
renderRange: (range: TableRenderRange, { renderCell, force, onRender, }: {
|
|
1311
|
+
renderRange: (range: TableRenderRange, { renderCell, renderDetailRow, force, onRender, }: {
|
|
1111
1312
|
force?: boolean | undefined;
|
|
1112
1313
|
renderCell: TableRenderCellFn;
|
|
1314
|
+
renderDetailRow?: TableRenderDetailRowFn | undefined;
|
|
1113
1315
|
onRender: (items: Renderable[]) => void;
|
|
1114
1316
|
}) => Renderable[];
|
|
1115
1317
|
private renderElement;
|
|
1318
|
+
private renderDetailElement;
|
|
1116
1319
|
getFixedRanges: (currentRenderRange: TableRenderRange) => TableRenderRange[];
|
|
1117
1320
|
private isCellFixed;
|
|
1118
1321
|
private isCellCovered;
|
|
1322
|
+
private renderDetailRowAtElement;
|
|
1119
1323
|
private renderCellAtElement;
|
|
1120
1324
|
private onMouseEnter;
|
|
1121
1325
|
private addHoverClass;
|
|
@@ -1123,6 +1327,7 @@ declare class ReactHeadlessTableRenderer extends Logger {
|
|
|
1123
1327
|
private removeHoverClass;
|
|
1124
1328
|
private updateHoverClassNamesForRow;
|
|
1125
1329
|
private updateElementPosition;
|
|
1330
|
+
private updateDetailElementPosition;
|
|
1126
1331
|
private onScrollStart;
|
|
1127
1332
|
private onScrollStop;
|
|
1128
1333
|
adjustFixedElementsOnScroll: (scrollPosition?: ScrollPosition) => void;
|
|
@@ -1130,28 +1335,6 @@ declare class ReactHeadlessTableRenderer extends Logger {
|
|
|
1130
1335
|
reset(): void;
|
|
1131
1336
|
}
|
|
1132
1337
|
|
|
1133
|
-
declare type ComponentStateContext<T_STATE, T_ACTIONS> = {
|
|
1134
|
-
getComponentState: () => T_STATE;
|
|
1135
|
-
componentState: T_STATE;
|
|
1136
|
-
componentActions: T_ACTIONS;
|
|
1137
|
-
};
|
|
1138
|
-
declare type ComponentStateGeneratedActions<T_STATE> = {
|
|
1139
|
-
[k in keyof T_STATE]: T_STATE[k] | React.SetStateAction<T_STATE[k]>;
|
|
1140
|
-
};
|
|
1141
|
-
declare type ComponentInterceptedActions<T_STATE> = {
|
|
1142
|
-
[k in keyof T_STATE]?: (value: T_STATE[k], { actions, state, }: {
|
|
1143
|
-
actions: ComponentStateGeneratedActions<T_STATE>;
|
|
1144
|
-
state: T_STATE;
|
|
1145
|
-
}) => void | boolean;
|
|
1146
|
-
};
|
|
1147
|
-
declare type ComponentMappedCallbacks<T_STATE> = {
|
|
1148
|
-
[k in keyof T_STATE]: (value: T_STATE[k], state: T_STATE) => {
|
|
1149
|
-
callbackName: string;
|
|
1150
|
-
callbackParams: any[];
|
|
1151
|
-
};
|
|
1152
|
-
};
|
|
1153
|
-
declare type ComponentStateActions<T_STATE> = ComponentStateGeneratedActions<T_STATE>;
|
|
1154
|
-
|
|
1155
1338
|
declare type SubscriptionCallbackOnChangeFn<T> = (node: T | null) => void;
|
|
1156
1339
|
interface SubscriptionCallback<T> {
|
|
1157
1340
|
(node: T, callback?: () => void): void;
|
|
@@ -1197,6 +1380,7 @@ interface InfiniteTableSetupState<T> {
|
|
|
1197
1380
|
focusDetectDOMRef: MutableRefObject<HTMLDivElement | null>;
|
|
1198
1381
|
activeCellIndicatorDOMRef: MutableRefObject<HTMLDivElement | null>;
|
|
1199
1382
|
onRowHeightCSSVarChange: SubscriptionCallback<number>;
|
|
1383
|
+
onRowDetailHeightCSSVarChange: SubscriptionCallback<number>;
|
|
1200
1384
|
onColumnMenuClick: SubscriptionCallback<{
|
|
1201
1385
|
target: HTMLElement | EventTarget;
|
|
1202
1386
|
column: InfiniteTableComputedColumn<T>;
|
|
@@ -1262,13 +1446,16 @@ declare type InfiniteTablePropPivotTotalColumnPosition = false | 'start' | 'end'
|
|
|
1262
1446
|
declare type InfiniteTablePropPivotGrandTotalColumnPosition = InfiniteTablePropPivotTotalColumnPosition;
|
|
1263
1447
|
interface InfiniteTableMappedState<T> {
|
|
1264
1448
|
id: InfiniteTableProps<T>['id'];
|
|
1449
|
+
debugId: InfiniteTableProps<T>['debugId'];
|
|
1265
1450
|
scrollTopKey: InfiniteTableProps<T>['scrollTopKey'];
|
|
1451
|
+
rowDetailRenderer: InfiniteTableProps<T>['rowDetailRenderer'];
|
|
1266
1452
|
multiSortBehavior: NonUndefined<InfiniteTableProps<T>['multiSortBehavior']>;
|
|
1267
1453
|
viewportReservedWidth: InfiniteTableProps<T>['viewportReservedWidth'];
|
|
1268
1454
|
resizableColumns: InfiniteTableProps<T>['resizableColumns'];
|
|
1269
1455
|
groupColumn: InfiniteTableProps<T>['groupColumn'];
|
|
1270
1456
|
onKeyDown: InfiniteTableProps<T>['onKeyDown'];
|
|
1271
1457
|
onCellClick: InfiniteTableProps<T>['onCellClick'];
|
|
1458
|
+
rowDetailsCache: RowDetailsCache<RowDetailsCacheKey, RowDetailsCacheEntry>;
|
|
1272
1459
|
headerOptions: NonUndefined<InfiniteTableProps<T>['headerOptions']>;
|
|
1273
1460
|
onScrollbarsChange: InfiniteTableProps<T>['onScrollbarsChange'];
|
|
1274
1461
|
getContextMenuItems: InfiniteTableProps<T>['getContextMenuItems'];
|
|
@@ -1337,7 +1524,8 @@ interface InfiniteTableMappedState<T> {
|
|
|
1337
1524
|
showHoverRows: NonUndefined<InfiniteTableProps<T>['showHoverRows']>;
|
|
1338
1525
|
header: NonUndefined<InfiniteTableProps<T>['header']>;
|
|
1339
1526
|
virtualizeColumns: NonUndefined<InfiniteTableProps<T>['virtualizeColumns']>;
|
|
1340
|
-
rowHeight: number;
|
|
1527
|
+
rowHeight: number | ((rowInfo: InfiniteTableRowInfo<T>) => number);
|
|
1528
|
+
rowDetailHeight: number | ((rowInfo: InfiniteTableRowInfo<T>) => number);
|
|
1341
1529
|
columnHeaderHeight: number;
|
|
1342
1530
|
licenseKey: NonUndefined<InfiniteTableProps<T>['licenseKey']>;
|
|
1343
1531
|
columnVisibility: InfiniteTablePropColumnVisibility;
|
|
@@ -1352,6 +1540,9 @@ interface InfiniteTableDerivedState<T> {
|
|
|
1352
1540
|
groupBy: DataSourceProps<T>['groupBy'];
|
|
1353
1541
|
computedColumns: Map<string, InfiniteTableColumn<T>>;
|
|
1354
1542
|
initialColumns: InfiniteTableProps<T>['columns'];
|
|
1543
|
+
rowDetailsState: RowDetailsState<T> | undefined;
|
|
1544
|
+
isRowDetailsExpanded: InfiniteTableProps<T>['isRowDetailsExpanded'] | undefined;
|
|
1545
|
+
isRowDetailsEnabled: NonUndefined<InfiniteTableProps<T>['isRowDetailsEnabled']> | boolean;
|
|
1355
1546
|
showColumnFilters: NonUndefined<InfiniteTableProps<T>['showColumnFilters']>;
|
|
1356
1547
|
groupRenderStrategy: NonUndefined<InfiniteTableProps<T>['groupRenderStrategy']>;
|
|
1357
1548
|
columnHeaderCssEllipsis: NonUndefined<InfiniteTableProps<T>['columnHeaderCssEllipsis']>;
|
|
@@ -1360,6 +1551,7 @@ interface InfiniteTableDerivedState<T> {
|
|
|
1360
1551
|
columnGroupsMaxDepth: number;
|
|
1361
1552
|
computedColumnGroups: InfiniteTablePropColumnGroupsMap;
|
|
1362
1553
|
rowHeightCSSVar: string;
|
|
1554
|
+
rowDetailHeightCSSVar: string;
|
|
1363
1555
|
columnHeaderHeightCSSVar: string;
|
|
1364
1556
|
controlledColumnVisibility: boolean;
|
|
1365
1557
|
}
|
|
@@ -1437,6 +1629,7 @@ declare type InfiniteTableEventHandlerContext<T> = {
|
|
|
1437
1629
|
actions: InfiniteTableActions<T>;
|
|
1438
1630
|
cloneRowSelection: (rowSelection: RowSelectionState<T>) => RowSelectionState<T>;
|
|
1439
1631
|
getDataSourceState: () => DataSourceState<T>;
|
|
1632
|
+
getDataSourceMasterContext: () => DataSourceMasterDetailContextValue | undefined;
|
|
1440
1633
|
dataSourceActions: DataSourceComponentActions<T>;
|
|
1441
1634
|
api: InfiniteTableApi<T>;
|
|
1442
1635
|
dataSourceApi: DataSourceApi<T>;
|
|
@@ -1461,6 +1654,7 @@ interface InfiniteTableContextValue<T> {
|
|
|
1461
1654
|
getComputed: () => InfiniteTableComputedValues<T>;
|
|
1462
1655
|
getState: () => InfiniteTableState<T>;
|
|
1463
1656
|
getDataSourceState: () => DataSourceState<T>;
|
|
1657
|
+
getDataSourceMasterContext: () => DataSourceMasterDetailContextValue | undefined;
|
|
1464
1658
|
}
|
|
1465
1659
|
interface InfiniteTablePublicContext<T> {
|
|
1466
1660
|
api: InfiniteTableApi<T>;
|
|
@@ -1601,6 +1795,7 @@ declare class Indexer<DataType, PrimaryKeyType = string> {
|
|
|
1601
1795
|
|
|
1602
1796
|
interface DataSourceDataParams<T> {
|
|
1603
1797
|
originalDataArray: T[];
|
|
1798
|
+
masterRowInfo?: InfiniteTableRowInfo<any>;
|
|
1604
1799
|
sortInfo?: DataSourceSortInfo<T>;
|
|
1605
1800
|
groupBy?: DataSourcePropGroupBy<T>;
|
|
1606
1801
|
pivotBy?: DataSourcePropPivotBy<T>;
|
|
@@ -1639,6 +1834,10 @@ declare type DataSourcePropGroupRowsStateObject<KeyType> = {
|
|
|
1639
1834
|
expandedRows: DataSourceGroupRowsList<KeyType>;
|
|
1640
1835
|
collapsedRows: DataSourceGroupRowsList<KeyType>;
|
|
1641
1836
|
};
|
|
1837
|
+
declare type DataSourcePropRowDetailsStateObject<KeyType> = {
|
|
1838
|
+
expandedRows: true | KeyType[];
|
|
1839
|
+
collapsedRows: true | KeyType[];
|
|
1840
|
+
};
|
|
1642
1841
|
declare type DataSourcePropGroupBy<T> = DataSourceGroupBy<T>[];
|
|
1643
1842
|
declare type DataSourcePropPivotBy<T> = DataSourcePivotBy<T>[];
|
|
1644
1843
|
interface DataSourceMappedState<T> {
|
|
@@ -1646,6 +1845,7 @@ interface DataSourceMappedState<T> {
|
|
|
1646
1845
|
livePagination: DataSourceProps<T>['livePagination'];
|
|
1647
1846
|
refetchKey: NonUndefined<DataSourceProps<T>['refetchKey']>;
|
|
1648
1847
|
isRowSelected: DataSourceProps<T>['isRowSelected'];
|
|
1848
|
+
debugId: DataSourceProps<T>['debugId'];
|
|
1649
1849
|
onDataArrayChange: DataSourceProps<T>['onDataArrayChange'];
|
|
1650
1850
|
onDataMutations: DataSourceProps<T>['onDataMutations'];
|
|
1651
1851
|
onReady: DataSourceProps<T>['onReady'];
|
|
@@ -1713,7 +1913,11 @@ declare type LazyRowInfoGroup<DataType> = {
|
|
|
1713
1913
|
declare type LazyGroupDataDeepMap<DataType, KeyType = string> = DeepMap<KeyType, LazyRowInfoGroup<DataType>>;
|
|
1714
1914
|
interface DataSourceSetupState<T> {
|
|
1715
1915
|
indexer: Indexer<T, any>;
|
|
1916
|
+
getDataSourceMasterContextRef: React$1.MutableRefObject<() => DataSourceMasterDetailContextValue | undefined>;
|
|
1917
|
+
destroyedRef: React$1.MutableRefObject<boolean>;
|
|
1716
1918
|
idToIndexMap: Map<any, number>;
|
|
1919
|
+
detailDataSourcesStateToRestore: Map<any, Partial<DataSourceStateRestoreForDetails<any>>>;
|
|
1920
|
+
stateReadyAsDetails: boolean;
|
|
1717
1921
|
cache?: DataSourceCache<T>;
|
|
1718
1922
|
unfilteredCount: number;
|
|
1719
1923
|
filteredCount: number;
|
|
@@ -1731,6 +1935,7 @@ interface DataSourceSetupState<T> {
|
|
|
1731
1935
|
originalLazyGroupData: LazyGroupDataDeepMap<T>;
|
|
1732
1936
|
originalLazyGroupDataChangeDetect: number | string;
|
|
1733
1937
|
scrollStopDelayUpdatedByTable: number;
|
|
1938
|
+
onCleanup: SubscriptionCallback<DataSourceState<T>>;
|
|
1734
1939
|
notifyScrollbarsChange: SubscriptionCallback<Scrollbars>;
|
|
1735
1940
|
notifyScrollStop: SubscriptionCallback<ScrollStopInfo>;
|
|
1736
1941
|
notifyRenderRangeChange: SubscriptionCallback<RenderRange>;
|
|
@@ -1809,6 +2014,7 @@ interface DataSourceApi<T> {
|
|
|
1809
2014
|
declare type DataSourcePropRowInfoReducers<T> = Record<string, DataSourceRowInfoReducer<T>>;
|
|
1810
2015
|
declare type DataSourceRowInfoReducer<T> = DataSourceRawReducer<InfiniteTableRowInfo<T>, any>;
|
|
1811
2016
|
declare type DataSourceProps<T> = {
|
|
2017
|
+
debugId?: string;
|
|
1812
2018
|
children: React$1.ReactNode | ((contextData: DataSourceState<T>) => React$1.ReactNode);
|
|
1813
2019
|
primaryKey: keyof T | ((data: T) => string);
|
|
1814
2020
|
/**
|
|
@@ -1975,9 +2181,16 @@ declare type DataSourceComponentActions<T> = ComponentStateActions<DataSourceSta
|
|
|
1975
2181
|
interface DataSourceContextValue<T> {
|
|
1976
2182
|
api: DataSourceApi<T>;
|
|
1977
2183
|
getState: () => DataSourceState<T>;
|
|
2184
|
+
assignState: (state: Partial<DataSourceState<T>>) => void;
|
|
2185
|
+
getDataSourceMasterContext: () => DataSourceMasterDetailContextValue | undefined;
|
|
1978
2186
|
componentState: DataSourceState<T>;
|
|
1979
2187
|
componentActions: DataSourceComponentActions<T>;
|
|
1980
2188
|
}
|
|
2189
|
+
interface DataSourceMasterDetailContextValue {
|
|
2190
|
+
registerDetail: (detail: DataSourceContextValue<any>) => void;
|
|
2191
|
+
shouldRestoreState: boolean;
|
|
2192
|
+
masterRowInfo: InfiniteTableRowInfo<any>;
|
|
2193
|
+
}
|
|
1981
2194
|
declare enum DataSourceActionType {
|
|
1982
2195
|
INIT = "INIT"
|
|
1983
2196
|
}
|
|
@@ -2010,6 +2223,7 @@ declare type InfiniteTableRowInfoDataDiscriminator_RowInfoNormal<T> = {
|
|
|
2010
2223
|
data: T;
|
|
2011
2224
|
isGroupRow: false;
|
|
2012
2225
|
rowActive: boolean;
|
|
2226
|
+
rowDetailState: false | 'expanded' | 'collapsed';
|
|
2013
2227
|
rowInfo: InfiniteTable_NoGrouping_RowInfoNormal<T> | InfiniteTable_HasGrouping_RowInfoNormal<T>;
|
|
2014
2228
|
field?: keyof T;
|
|
2015
2229
|
value: any;
|
|
@@ -2020,6 +2234,7 @@ declare type InfiniteTableRowInfoDataDiscriminator_RowInfoGroup<T> = {
|
|
|
2020
2234
|
rowActive: boolean;
|
|
2021
2235
|
data: Partial<T> | null;
|
|
2022
2236
|
rowInfo: InfiniteTable_HasGrouping_RowInfoGroup<T>;
|
|
2237
|
+
rowDetailState: false | 'expanded' | 'collapsed';
|
|
2023
2238
|
isGroupRow: true;
|
|
2024
2239
|
field?: keyof T;
|
|
2025
2240
|
value: any;
|
|
@@ -2464,6 +2679,16 @@ declare type MenuColumnRenderParam = {
|
|
|
2464
2679
|
domProps: HTMLProps<HTMLDivElement>;
|
|
2465
2680
|
};
|
|
2466
2681
|
|
|
2682
|
+
declare type InfiniteTableRowDetailsApi = {
|
|
2683
|
+
isRowDetailsExpanded(pk: any): boolean;
|
|
2684
|
+
isRowDetailsCollapsed(pk: any): boolean;
|
|
2685
|
+
expandRowDetails(pk: any): void;
|
|
2686
|
+
collapseRowDetails(pk: any): void;
|
|
2687
|
+
toggleRowDetails(pk: any): void;
|
|
2688
|
+
collapseAllDetails(): void;
|
|
2689
|
+
expandAllDetails(): void;
|
|
2690
|
+
};
|
|
2691
|
+
|
|
2467
2692
|
declare type LoadMaskProps = {
|
|
2468
2693
|
visible: boolean;
|
|
2469
2694
|
children: Renderable;
|
|
@@ -2518,6 +2743,7 @@ declare type InfiniteTableColumnType<T> = {
|
|
|
2518
2743
|
components?: InfiniteTableColumn<T>['components'];
|
|
2519
2744
|
renderMenuIcon?: InfiniteTableColumn<T>['renderMenuIcon'];
|
|
2520
2745
|
renderSortIcon?: InfiniteTableColumn<T>['renderSortIcon'];
|
|
2746
|
+
renderRowDetailsIcon?: InfiniteTableColumn<T>['renderRowDetailsIcon'];
|
|
2521
2747
|
renderSelectionCheckBox?: InfiniteTableColumn<T>['renderSelectionCheckBox'];
|
|
2522
2748
|
renderHeaderSelectionCheckBox?: InfiniteTableColumn<T>['renderHeaderSelectionCheckBox'];
|
|
2523
2749
|
renderValue?: InfiniteTableColumn<T>['renderValue'];
|
|
@@ -2595,6 +2821,7 @@ declare type MultiSortBehaviorOptions = {
|
|
|
2595
2821
|
multiSortBehavior?: InfiniteTablePropMultiSortBehavior;
|
|
2596
2822
|
};
|
|
2597
2823
|
interface InfiniteTableApi<T> {
|
|
2824
|
+
get rowDetailsApi(): InfiniteTableRowDetailsApi;
|
|
2598
2825
|
get rowSelectionApi(): InfiniteTableRowSelectionApi;
|
|
2599
2826
|
get cellSelectionApi(): InfiniteTableCellSelectionApi<T>;
|
|
2600
2827
|
setColumnOrder: (columnOrder: InfiniteTablePropColumnOrder) => void;
|
|
@@ -2759,6 +2986,7 @@ declare type InfiniteTablePropOnEditRejectedParams<T> = InfiniteTableRowInfoData
|
|
|
2759
2986
|
declare type InfiniteTablePropOnEditPersistParams<T> = InfiniteTablePropOnEditAcceptedParams<T>;
|
|
2760
2987
|
declare type InfiniteTablePropMultiSortBehavior = 'append' | 'replace';
|
|
2761
2988
|
interface InfiniteTableProps<T> {
|
|
2989
|
+
debugId?: string;
|
|
2762
2990
|
columns: InfiniteTablePropColumns<T>;
|
|
2763
2991
|
pivotColumns?: InfiniteTableColumnsMap<T, InfiniteTablePivotColumn<T>>;
|
|
2764
2992
|
loadingText?: Renderable;
|
|
@@ -2817,7 +3045,15 @@ interface InfiniteTableProps<T> {
|
|
|
2817
3045
|
onColumnVisibilityChange?: (columnVisibility: InfiniteTablePropColumnVisibility) => void;
|
|
2818
3046
|
columnTypes?: InfiniteTablePropColumnTypes<T>;
|
|
2819
3047
|
showSeparatePivotColumnForSingleAggregation?: boolean;
|
|
2820
|
-
|
|
3048
|
+
isRowDetailsExpanded?: (rowInfo: InfiniteTableRowInfo<T>) => boolean;
|
|
3049
|
+
isRowDetailsEnabled?: (rowInfo: InfiniteTableRowInfo<T>) => boolean;
|
|
3050
|
+
rowDetailsCache?: boolean | number;
|
|
3051
|
+
rowDetailsState?: RowDetailsState | DataSourcePropRowDetailsStateObject<any>;
|
|
3052
|
+
defaultRowDetailsState?: RowDetailsState | DataSourcePropRowDetailsStateObject<any>;
|
|
3053
|
+
onRowDetailsStateChange?: (rowDetailsState: RowDetailsState) => void;
|
|
3054
|
+
rowHeight?: number | string | ((rowInfo: InfiniteTableRowInfo<T>) => number);
|
|
3055
|
+
rowDetailHeight?: number | string | ((rowInfo: InfiniteTableRowInfo<T>) => number);
|
|
3056
|
+
rowDetailRenderer?: (rowInfo: InfiniteTableRowInfo<T>, cache: RowDetailsCacheStorageForCurrentRow<RowDetailsCacheEntry>) => Renderable;
|
|
2821
3057
|
rowStyle?: InfiniteTablePropRowStyle<T>;
|
|
2822
3058
|
cellStyle?: InfiniteTablePropCellStyle<T>;
|
|
2823
3059
|
cellClassName?: InfiniteTablePropCellClassName<T>;
|
|
@@ -2971,53 +3207,12 @@ declare namespace Menu {
|
|
|
2971
3207
|
};
|
|
2972
3208
|
}
|
|
2973
3209
|
|
|
3210
|
+
declare function useEffectWithChanges<T>(fn: (changes: Record<keyof T, any>, prevValues: Record<string, any>) => void | (() => void), deps: Record<keyof T, any>): void;
|
|
3211
|
+
declare function useEffectWithObject(fn: EffectCallback, deps: Record<string, any>): void;
|
|
3212
|
+
|
|
2974
3213
|
declare function StringFilterEditor<T>(): React$1.JSX.Element;
|
|
2975
3214
|
declare function NumberFilterEditor<T>(): React$1.JSX.Element;
|
|
2976
3215
|
|
|
2977
|
-
declare type ForwardPropsToStateFnResult<TYPE_PROPS, TYPE_RESULT, COMPONENT_SETUP_STATE> = {
|
|
2978
|
-
[propName in keyof TYPE_PROPS & keyof TYPE_RESULT]: 1 | ((value: TYPE_PROPS[propName], setupState: COMPONENT_SETUP_STATE) => TYPE_RESULT[propName]);
|
|
2979
|
-
};
|
|
2980
|
-
declare type ComponentStateRootConfig<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT_SETUP_STATE = {}, COMPONENT_DERIVED_STATE = {}, T_ACTIONS = {}, T_PARENT_STATE = {}> = {
|
|
2981
|
-
debugName?: string;
|
|
2982
|
-
initSetupState?: () => COMPONENT_SETUP_STATE;
|
|
2983
|
-
layoutEffect?: boolean;
|
|
2984
|
-
forwardProps?: (setupState: COMPONENT_SETUP_STATE) => ForwardPropsToStateFnResult<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT_SETUP_STATE>;
|
|
2985
|
-
allowedControlledPropOverrides?: Record<keyof T_PROPS, true>;
|
|
2986
|
-
interceptActions?: ComponentInterceptedActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>;
|
|
2987
|
-
mappedCallbacks?: ComponentMappedCallbacks<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>;
|
|
2988
|
-
onPropChange?: (params: {
|
|
2989
|
-
name: keyof T_PROPS;
|
|
2990
|
-
oldValue: any;
|
|
2991
|
-
newValue: any;
|
|
2992
|
-
}, props: T_PROPS, actions: ComponentStateActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>, state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>) => void;
|
|
2993
|
-
onPropsChange?: (newPropValues: {
|
|
2994
|
-
[k in keyof T_PROPS]?: {
|
|
2995
|
-
newValue: T_PROPS[k];
|
|
2996
|
-
oldValue: T_PROPS[k];
|
|
2997
|
-
};
|
|
2998
|
-
}, props: T_PROPS, actions: ComponentStateActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>, state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>) => void;
|
|
2999
|
-
mapPropsToState?: (params: {
|
|
3000
|
-
props: T_PROPS;
|
|
3001
|
-
state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>;
|
|
3002
|
-
oldState: null | (COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>);
|
|
3003
|
-
parentState: T_PARENT_STATE | null;
|
|
3004
|
-
}) => COMPONENT_DERIVED_STATE;
|
|
3005
|
-
concludeReducer?: (params: {
|
|
3006
|
-
previousState: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & COMPONENT_DERIVED_STATE;
|
|
3007
|
-
state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & COMPONENT_DERIVED_STATE;
|
|
3008
|
-
updatedProps: Partial<T_PROPS> | null;
|
|
3009
|
-
parentState: T_PARENT_STATE | null;
|
|
3010
|
-
}) => COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & COMPONENT_DERIVED_STATE;
|
|
3011
|
-
getReducerActions?: (dispatch: React$1.Dispatch<any>) => T_ACTIONS;
|
|
3012
|
-
getParentState?: () => T_PARENT_STATE;
|
|
3013
|
-
cleanup?: (state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & COMPONENT_DERIVED_STATE) => void;
|
|
3014
|
-
onControlledPropertyChange?: (name: string, newValue: any, oldValue: any) => void | ((value: any, oldValue: any) => any);
|
|
3015
|
-
};
|
|
3016
|
-
declare function getComponentStateRoot<T_PROPS, COMPONENT_MAPPED_STATE extends object, COMPONENT_SETUP_STATE extends object = {}, COMPONENT_DERIVED_STATE extends object = {}, T_ACTIONS = {}, T_PARENT_STATE = {}>(config: ComponentStateRootConfig<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT_SETUP_STATE, COMPONENT_DERIVED_STATE, T_ACTIONS, T_PARENT_STATE>): React$1.NamedExoticComponent<T_PROPS & {
|
|
3017
|
-
children: React$1.ReactNode;
|
|
3018
|
-
}>;
|
|
3019
|
-
declare function useComponentState<COMPONENT_STATE>(): ComponentStateContext<COMPONENT_STATE, ComponentStateGeneratedActions<COMPONENT_STATE>>;
|
|
3020
|
-
|
|
3021
3216
|
declare type InterceptedMapFns<K, V> = {
|
|
3022
3217
|
set?: (k: K, v: V) => void;
|
|
3023
3218
|
beforeClear?: (map: Map<K, V>) => void;
|
|
@@ -3032,6 +3227,32 @@ declare type InterceptedMapFns<K, V> = {
|
|
|
3032
3227
|
*/
|
|
3033
3228
|
declare function interceptMap<K, V>(map: Map<K, V>, fns: InterceptedMapFns<K, V>): () => void;
|
|
3034
3229
|
|
|
3230
|
+
declare class FixedSizeSet<T> {
|
|
3231
|
+
private currentSet;
|
|
3232
|
+
private maxSize;
|
|
3233
|
+
private orderRefs;
|
|
3234
|
+
static DEFAULT_SIZE: number;
|
|
3235
|
+
constructor(clone?: readonly T[] | null | number, size?: number);
|
|
3236
|
+
values(): IterableIterator<T>;
|
|
3237
|
+
get size(): number;
|
|
3238
|
+
delete(el: T): boolean;
|
|
3239
|
+
has(el: T): boolean;
|
|
3240
|
+
add(el: T): this;
|
|
3241
|
+
}
|
|
3242
|
+
|
|
3243
|
+
declare class WeakFixedSizeSet<T extends object> {
|
|
3244
|
+
private currentSet;
|
|
3245
|
+
private maxSize;
|
|
3246
|
+
private orderRefs;
|
|
3247
|
+
static DEFAULT_SIZE: number;
|
|
3248
|
+
constructor(clone?: readonly T[] | null | number, size?: number);
|
|
3249
|
+
values(): IterableIterator<T>;
|
|
3250
|
+
get size(): number;
|
|
3251
|
+
delete(el: T): boolean;
|
|
3252
|
+
has(el: T): boolean;
|
|
3253
|
+
add(el: T): this;
|
|
3254
|
+
}
|
|
3255
|
+
|
|
3035
3256
|
declare type DebugLogger = {
|
|
3036
3257
|
(...args: any[]): void;
|
|
3037
3258
|
extend: (channelName: string) => DebugLogger;
|
|
@@ -3049,8 +3270,6 @@ declare const debug: {
|
|
|
3049
3270
|
logFn: DebugLogger['logFn'];
|
|
3050
3271
|
};
|
|
3051
3272
|
|
|
3052
|
-
declare function useEffectWithChanges<T>(fn: (changes: Record<keyof T, any>, prevValues: Record<string, any>) => void | (() => void), deps: Record<keyof T, any>): void;
|
|
3053
|
-
|
|
3054
3273
|
declare const components: {
|
|
3055
3274
|
CheckBox: typeof InfiniteCheckBox;
|
|
3056
3275
|
LoadMask: (props: LoadMaskProps) => React$1.JSX.Element;
|
|
@@ -3059,4 +3278,4 @@ declare const components: {
|
|
|
3059
3278
|
NumberFilterEditor: typeof NumberFilterEditor;
|
|
3060
3279
|
};
|
|
3061
3280
|
|
|
3062
|
-
export { AdvancedAlignable, CellSelectionState, ColumnTypeWithInherit, DataSource, DataSourceAction, DataSourceActionType, DataSourceAggregationReducer, DataSourceApi, DataSourceCRUDParam, DataSourceComponentActions, DataSourceContextValue, DataSourceData, DataSourceDataParams, DataSourceDataParamsChanges, DataSourceDerivedState, DataSourceFilterFunctionParam, DataSourceFilterOperator, DataSourceFilterOperatorFunction, DataSourceFilterOperatorFunctionParam, DataSourceFilterType, DataSourceFilterValueItem, DataSourceFilterValueItemValueGetter, DataSourceGroupBy, DataSourceGroupRowsList, DataSourceInsertParam, DataSourceLivePaginationCursorFn, DataSourceLivePaginationCursorParams, DataSourceLivePaginationCursorValue, DataSourceMappedState, DataSourceMappings, DataSourcePivotBy, DataSourcePropAggregationReducers, DataSourcePropCellSelection, DataSourcePropCellSelection_MultiCell, DataSourcePropCellSelection_SingleCell, DataSourcePropFilterFunction, DataSourcePropFilterTypes, DataSourcePropFilterValue, DataSourcePropGroupBy, DataSourcePropGroupRowsStateObject, DataSourcePropIsRowSelected, DataSourcePropLivePaginationCursor, DataSourcePropMultiRowSelectionChangeParamType, DataSourcePropOnCellSelectionChange, DataSourcePropOnCellSelectionChange_MultiCell, DataSourcePropOnCellSelectionChange_SingleCell, DataSourcePropOnRowSelectionChange, DataSourcePropOnRowSelectionChange_MultiRow, DataSourcePropOnRowSelectionChange_SingleRow, DataSourcePropPivotBy, DataSourcePropRowInfoReducers, DataSourcePropRowSelection, DataSourcePropRowSelection_MultiRow, DataSourcePropRowSelection_SingleRow, DataSourcePropSelectionMode, DataSourcePropSortFn, DataSourcePropSortInfo, DataSourcePropSortTypes, DataSourceProps, DataSourceRawReducer, DataSourceRemoteData, DataSourceRowInfoReducer, DataSourceSetupState, DataSourceSingleSortInfo, DataSourceSortInfo, DataSourceState, DebugLogger, DeepMap, ElementContainerGetter, GroupRowsState, InfiniteColumnEditorContextType, InfiniteTable, InfiniteTableAction, InfiniteTableActionType, InfiniteTableApi, InfiniteTableClassName, InfiniteTableColumn, InfiniteTableColumnAggregator, InfiniteTableColumnApi, InfiniteTableColumnCellContextType, InfiniteTableColumnComparer, InfiniteTableColumnGroup, InfiniteTableColumnRenderFunctionForGroupRows, InfiniteTableColumnRenderFunctionForNormalRows, InfiniteTableColumnRenderValueParam, InfiniteTableColumnRowspanParam, InfiniteTableColumnSizingOptions, InfiniteTableColumnValueFormatterParams, InfiniteTableColumnValueGetterParams, InfiniteTableColumnsMap, InfiniteTableComponent, InfiniteTableComputedColumn, InfiniteTableComputedValues, InfiniteTableContextValue, InfiniteTableGroupColumnBase, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnGetterOptions, InfiniteTablePivotColumn, InfiniteTablePropAutoSizeColumnsKey, InfiniteTablePropColumnGroups, InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnSizing, InfiniteTablePropColumnTypes, InfiniteTablePropColumnVisibility, InfiniteTablePropColumns, InfiniteTablePropComponents, InfiniteTablePropGetCellContextMenuItems, InfiniteTablePropGetColumnMenuItems, InfiniteTablePropGroupColumn, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropHeaderOptions, InfiniteTablePropKeyboardNavigation, InfiniteTablePropMultiSortBehavior, InfiniteTablePropRowClassName, InfiniteTablePropRowStyle, InfiniteTableProps, InfiniteTableRowClassNameFn, InfiniteTableRowInfo, InfiniteTableRowStyleFn, InfiniteTableState, LazyGroupDataDeepMap, LazyGroupDataItem, LazyRowInfoGroup, Menu, MenuChildrenFnParam, MenuColumn, MenuColumnRenderParam, MenuDecoration, MenuIconProps, MenuItemActionContext, MenuItemDefinition, MenuItemObject, MenuProps, MenuRenderable, MenuRuntimeItem, MenuRuntimeItemSelectable, MenuSeparator, OverlayShowParams, RowSelectionState, Scrollbars, ShowOverlayFn, components, debounce, debug, defaultFilterTypes, defaultFilterTypes as filterTypes, flatten, getComponentStateRoot, group, interceptMap, multisort, useComponentState, useDataSource, useEffectWithChanges, useInfiniteColumnCell, useInfiniteColumnEditor, useInfiniteColumnFilterEditor, useInfiniteHeaderCell, useOverlay, useOverlayPortal, useRowInfoReducers };
|
|
3281
|
+
export { AdvancedAlignable, CellSelectionState, ColumnTypeWithInherit, DataSource, DataSourceAction, DataSourceActionType, DataSourceAggregationReducer, DataSourceApi, DataSourceCRUDParam, DataSourceComponentActions, DataSourceContextValue, DataSourceData, DataSourceDataParams, DataSourceDataParamsChanges, DataSourceDerivedState, DataSourceFilterFunctionParam, DataSourceFilterOperator, DataSourceFilterOperatorFunction, DataSourceFilterOperatorFunctionParam, DataSourceFilterType, DataSourceFilterValueItem, DataSourceFilterValueItemValueGetter, DataSourceGroupBy, DataSourceGroupRowsList, DataSourceInsertParam, DataSourceLivePaginationCursorFn, DataSourceLivePaginationCursorParams, DataSourceLivePaginationCursorValue, DataSourceMappedState, DataSourceMappings, DataSourceMasterDetailContextValue, DataSourcePivotBy, DataSourcePropAggregationReducers, DataSourcePropCellSelection, DataSourcePropCellSelection_MultiCell, DataSourcePropCellSelection_SingleCell, DataSourcePropFilterFunction, DataSourcePropFilterTypes, DataSourcePropFilterValue, DataSourcePropGroupBy, DataSourcePropGroupRowsStateObject, DataSourcePropIsRowSelected, DataSourcePropLivePaginationCursor, DataSourcePropMultiRowSelectionChangeParamType, DataSourcePropOnCellSelectionChange, DataSourcePropOnCellSelectionChange_MultiCell, DataSourcePropOnCellSelectionChange_SingleCell, DataSourcePropOnRowSelectionChange, DataSourcePropOnRowSelectionChange_MultiRow, DataSourcePropOnRowSelectionChange_SingleRow, DataSourcePropPivotBy, DataSourcePropRowDetailsStateObject, DataSourcePropRowInfoReducers, DataSourcePropRowSelection, DataSourcePropRowSelection_MultiRow, DataSourcePropRowSelection_SingleRow, DataSourcePropSelectionMode, DataSourcePropSortFn, DataSourcePropSortInfo, DataSourcePropSortTypes, DataSourceProps, DataSourceRawReducer, DataSourceRemoteData, DataSourceRowInfoReducer, DataSourceSetupState, DataSourceSingleSortInfo, DataSourceSortInfo, DataSourceState, DebugLogger, DeepMap, ElementContainerGetter, FixedSizeSet, GroupRowsState, InfiniteColumnEditorContextType, InfiniteTable, InfiniteTableAction, InfiniteTableActionType, InfiniteTableApi, InfiniteTableClassName, InfiniteTableColumn, InfiniteTableColumnAggregator, InfiniteTableColumnApi, InfiniteTableColumnCellContextType, InfiniteTableColumnComparer, InfiniteTableColumnGroup, InfiniteTableColumnRenderFunctionForGroupRows, InfiniteTableColumnRenderFunctionForNormalRows, InfiniteTableColumnRenderValueParam, InfiniteTableColumnRowspanParam, InfiniteTableColumnSizingOptions, InfiniteTableColumnValueFormatterParams, InfiniteTableColumnValueGetterParams, InfiniteTableColumnsMap, InfiniteTableComponent, InfiniteTableComputedColumn, InfiniteTableComputedValues, InfiniteTableContextValue, InfiniteTableGroupColumnBase, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnGetterOptions, InfiniteTablePivotColumn, InfiniteTablePropAutoSizeColumnsKey, InfiniteTablePropColumnGroups, InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnSizing, InfiniteTablePropColumnTypes, InfiniteTablePropColumnVisibility, InfiniteTablePropColumns, InfiniteTablePropComponents, InfiniteTablePropGetCellContextMenuItems, InfiniteTablePropGetColumnMenuItems, InfiniteTablePropGroupColumn, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropHeaderOptions, InfiniteTablePropKeyboardNavigation, InfiniteTablePropMultiSortBehavior, InfiniteTablePropRowClassName, InfiniteTablePropRowStyle, InfiniteTableProps, InfiniteTableRowClassNameFn, InfiniteTableRowInfo, InfiniteTableRowStyleFn, InfiniteTableState, LazyGroupDataDeepMap, LazyGroupDataItem, LazyRowInfoGroup, Menu, MenuChildrenFnParam, MenuColumn, MenuColumnRenderParam, MenuDecoration, MenuIconProps, MenuItemActionContext, MenuItemDefinition, MenuItemObject, MenuProps, MenuRenderable, MenuRuntimeItem, MenuRuntimeItemSelectable, MenuSeparator, OverlayShowParams, RowDetailsCache, RowSelectionState, Scrollbars, ShowOverlayFn, WeakFixedSizeSet, components, debounce, debug, defaultFilterTypes, defaultFilterTypes as filterTypes, flatten, getComponentStateRoot, group, interceptMap, multisort, useComponentState, useDataSource, useEffectWithChanges, useEffectWithObject, useInfiniteColumnCell, useInfiniteColumnEditor, useInfiniteColumnFilterEditor, useInfiniteHeaderCell, useOverlay, useOverlayPortal, useRowInfoReducers };
|