@gridsuite/commons-ui 0.77.2 → 0.78.0
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/components/index.d.ts +0 -1
- package/dist/components/index.js +0 -13
- package/dist/index.js +0 -13
- package/package.json +1 -3
- package/dist/components/muiVirtualizedTable/ColumnHeader.d.ts +0 -26
- package/dist/components/muiVirtualizedTable/ColumnHeader.js +0 -108
- package/dist/components/muiVirtualizedTable/KeyedColumnsRowIndexer.d.ts +0 -130
- package/dist/components/muiVirtualizedTable/KeyedColumnsRowIndexer.js +0 -521
- package/dist/components/muiVirtualizedTable/MuiVirtualizedTable.d.ts +0 -97
- package/dist/components/muiVirtualizedTable/MuiVirtualizedTable.js +0 -692
- package/dist/components/muiVirtualizedTable/index.d.ts +0 -8
- package/dist/components/muiVirtualizedTable/index.js +0 -15
|
@@ -14,7 +14,6 @@ export * from './elementSearch';
|
|
|
14
14
|
export * from './filter';
|
|
15
15
|
export * from './flatParameters';
|
|
16
16
|
export * from './inputs';
|
|
17
|
-
export * from './muiVirtualizedTable';
|
|
18
17
|
export * from './multipleSelectionDialog';
|
|
19
18
|
export * from './overflowableText';
|
|
20
19
|
export * from './snackbarProvider';
|
package/dist/components/index.js
CHANGED
|
@@ -90,8 +90,6 @@ import { GroupValueEditor } from "./inputs/reactQueryBuilder/compositeRuleEditor
|
|
|
90
90
|
import { RuleValueEditor } from "./inputs/reactQueryBuilder/compositeRuleEditor/RuleValueEditor.js";
|
|
91
91
|
import { useConvertValue } from "./inputs/reactQueryBuilder/hooks/useConvertValue.js";
|
|
92
92
|
import { useValid } from "./inputs/reactQueryBuilder/hooks/useValid.js";
|
|
93
|
-
import { ChangeWays, KeyedColumnsRowIndexer, collectibleHelper, forTesting, getHelper, noOpHelper } from "./muiVirtualizedTable/KeyedColumnsRowIndexer.js";
|
|
94
|
-
import { DEFAULT_CELL_PADDING, DEFAULT_HEADER_HEIGHT, DEFAULT_ROW_HEIGHT, MuiVirtualizedTable, generateMuiVirtualizedTableClass } from "./muiVirtualizedTable/MuiVirtualizedTable.js";
|
|
95
93
|
import { MultipleSelectionDialog } from "./multipleSelectionDialog/MultipleSelectionDialog.js";
|
|
96
94
|
import { OverflowableText } from "./overflowableText/OverflowableText.js";
|
|
97
95
|
import { SnackbarProvider } from "./snackbarProvider/SnackbarProvider.js";
|
|
@@ -118,7 +116,6 @@ export {
|
|
|
118
116
|
CUSTOM_AGGRID_THEME,
|
|
119
117
|
CancelButton,
|
|
120
118
|
CardErrorBoundary,
|
|
121
|
-
ChangeWays,
|
|
122
119
|
CheckBoxList,
|
|
123
120
|
CheckboxInput,
|
|
124
121
|
CombinatorSelector,
|
|
@@ -133,10 +130,7 @@ export {
|
|
|
133
130
|
CustomFormProvider,
|
|
134
131
|
CustomMuiDialog,
|
|
135
132
|
CustomReactQueryBuilder,
|
|
136
|
-
DEFAULT_CELL_PADDING,
|
|
137
|
-
DEFAULT_HEADER_HEIGHT,
|
|
138
133
|
DEFAULT_RANGE_VALUE,
|
|
139
|
-
DEFAULT_ROW_HEIGHT,
|
|
140
134
|
DISTRIBUTION_KEY,
|
|
141
135
|
DataType,
|
|
142
136
|
DescriptionField,
|
|
@@ -173,7 +167,6 @@ export {
|
|
|
173
167
|
GroupValueEditor,
|
|
174
168
|
InputWithPopupConfirmation,
|
|
175
169
|
IntegerInput,
|
|
176
|
-
KeyedColumnsRowIndexer,
|
|
177
170
|
LOAD_TYPE_OPTIONS,
|
|
178
171
|
Login,
|
|
179
172
|
LogoText,
|
|
@@ -181,7 +174,6 @@ export {
|
|
|
181
174
|
MidFormError,
|
|
182
175
|
ModifyElementSelection,
|
|
183
176
|
MuiSelectInput,
|
|
184
|
-
MuiVirtualizedTable,
|
|
185
177
|
MultipleAutocompleteInput,
|
|
186
178
|
MultipleSelectionDialog,
|
|
187
179
|
NAME,
|
|
@@ -227,23 +219,19 @@ export {
|
|
|
227
219
|
UserManagerMock,
|
|
228
220
|
ValueEditor,
|
|
229
221
|
ValueSelector,
|
|
230
|
-
collectibleHelper,
|
|
231
222
|
countRules,
|
|
232
223
|
dispatchUser,
|
|
233
224
|
expertFilterSchema,
|
|
234
225
|
explicitNamingFilterSchema,
|
|
235
226
|
exportExpertRules,
|
|
236
227
|
extractDefault,
|
|
237
|
-
forTesting,
|
|
238
228
|
genHelperError,
|
|
239
229
|
genHelperPreviousValue,
|
|
240
|
-
generateMuiVirtualizedTableClass,
|
|
241
230
|
generateTreeViewFinderClass,
|
|
242
231
|
getCriteriaBasedFormData,
|
|
243
232
|
getCriteriaBasedSchema,
|
|
244
233
|
getExpertFilterEmptyFormData,
|
|
245
234
|
getExplicitNamingFilterEmptyFormData,
|
|
246
|
-
getHelper,
|
|
247
235
|
getNumberOfSiblings,
|
|
248
236
|
getOperators,
|
|
249
237
|
getPreLoginPath,
|
|
@@ -260,7 +248,6 @@ export {
|
|
|
260
248
|
isIntegerNumber,
|
|
261
249
|
login,
|
|
262
250
|
logout,
|
|
263
|
-
noOpHelper,
|
|
264
251
|
queryValidator,
|
|
265
252
|
recursiveRemove,
|
|
266
253
|
rqbQuerySchemaValidator,
|
package/dist/index.js
CHANGED
|
@@ -91,8 +91,6 @@ import { GroupValueEditor } from "./components/inputs/reactQueryBuilder/composit
|
|
|
91
91
|
import { RuleValueEditor } from "./components/inputs/reactQueryBuilder/compositeRuleEditor/RuleValueEditor.js";
|
|
92
92
|
import { useConvertValue } from "./components/inputs/reactQueryBuilder/hooks/useConvertValue.js";
|
|
93
93
|
import { useValid } from "./components/inputs/reactQueryBuilder/hooks/useValid.js";
|
|
94
|
-
import { ChangeWays, KeyedColumnsRowIndexer, collectibleHelper, forTesting, getHelper, noOpHelper } from "./components/muiVirtualizedTable/KeyedColumnsRowIndexer.js";
|
|
95
|
-
import { DEFAULT_CELL_PADDING, DEFAULT_HEADER_HEIGHT, DEFAULT_ROW_HEIGHT, MuiVirtualizedTable, generateMuiVirtualizedTableClass } from "./components/muiVirtualizedTable/MuiVirtualizedTable.js";
|
|
96
94
|
import { MultipleSelectionDialog } from "./components/multipleSelectionDialog/MultipleSelectionDialog.js";
|
|
97
95
|
import { OverflowableText } from "./components/overflowableText/OverflowableText.js";
|
|
98
96
|
import { SnackbarProvider } from "./components/snackbarProvider/SnackbarProvider.js";
|
|
@@ -200,7 +198,6 @@ export {
|
|
|
200
198
|
CUSTOM_AGGRID_THEME,
|
|
201
199
|
CancelButton,
|
|
202
200
|
CardErrorBoundary,
|
|
203
|
-
ChangeWays,
|
|
204
201
|
CheckBoxList,
|
|
205
202
|
CheckboxInput,
|
|
206
203
|
CombinatorSelector,
|
|
@@ -216,10 +213,7 @@ export {
|
|
|
216
213
|
CustomMuiDialog,
|
|
217
214
|
CustomReactQueryBuilder,
|
|
218
215
|
DARK_THEME,
|
|
219
|
-
DEFAULT_CELL_PADDING,
|
|
220
|
-
DEFAULT_HEADER_HEIGHT,
|
|
221
216
|
DEFAULT_RANGE_VALUE,
|
|
222
|
-
DEFAULT_ROW_HEIGHT,
|
|
223
217
|
DEGREE,
|
|
224
218
|
DISTRIBUTION_KEY,
|
|
225
219
|
DanglingLine,
|
|
@@ -270,7 +264,6 @@ export {
|
|
|
270
264
|
KILO_AMPERE,
|
|
271
265
|
KILO_METER,
|
|
272
266
|
KILO_VOLT,
|
|
273
|
-
KeyedColumnsRowIndexer,
|
|
274
267
|
LANG_ENGLISH,
|
|
275
268
|
LANG_FRENCH,
|
|
276
269
|
LANG_SYSTEM,
|
|
@@ -293,7 +286,6 @@ export {
|
|
|
293
286
|
ModificationType,
|
|
294
287
|
ModifyElementSelection,
|
|
295
288
|
MuiSelectInput,
|
|
296
|
-
MuiVirtualizedTable,
|
|
297
289
|
MultipleAutocompleteInput,
|
|
298
290
|
MultipleSelectionDialog,
|
|
299
291
|
NAME,
|
|
@@ -364,7 +356,6 @@ export {
|
|
|
364
356
|
cardErrorBoundaryEn,
|
|
365
357
|
cardErrorBoundaryFr,
|
|
366
358
|
catchErrorHandler,
|
|
367
|
-
collectibleHelper,
|
|
368
359
|
commonButtonEn,
|
|
369
360
|
commonButtonFr,
|
|
370
361
|
convertInputValue,
|
|
@@ -409,10 +400,8 @@ export {
|
|
|
409
400
|
filterFr,
|
|
410
401
|
flatParametersEn,
|
|
411
402
|
flatParametersFr,
|
|
412
|
-
forTesting,
|
|
413
403
|
genHelperError,
|
|
414
404
|
genHelperPreviousValue,
|
|
415
|
-
generateMuiVirtualizedTableClass,
|
|
416
405
|
generateTreeViewFinderClass,
|
|
417
406
|
getComputedLanguage,
|
|
418
407
|
getCriteriaBasedFormData,
|
|
@@ -421,7 +410,6 @@ export {
|
|
|
421
410
|
getExpertFilterEmptyFormData,
|
|
422
411
|
getExplicitNamingFilterEmptyFormData,
|
|
423
412
|
getFileIcon,
|
|
424
|
-
getHelper,
|
|
425
413
|
getNumberOfSiblings,
|
|
426
414
|
getOperators,
|
|
427
415
|
getPreLoginPath,
|
|
@@ -459,7 +447,6 @@ export {
|
|
|
459
447
|
multipleSelectionDialogFr,
|
|
460
448
|
networkModificationsEn,
|
|
461
449
|
networkModificationsFr,
|
|
462
|
-
noOpHelper,
|
|
463
450
|
queryValidator,
|
|
464
451
|
recursiveRemove,
|
|
465
452
|
reportViewerEn,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridsuite/commons-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.78.0",
|
|
4
4
|
"description": "common react components for gridsuite applications",
|
|
5
5
|
"engines": {
|
|
6
6
|
"npm": ">=9",
|
|
@@ -42,7 +42,6 @@
|
|
|
42
42
|
"react-dnd": "^16.0.1",
|
|
43
43
|
"react-dnd-html5-backend": "^16.0.1",
|
|
44
44
|
"react-querybuilder": "^7.2.0",
|
|
45
|
-
"react-virtualized": "^9.22.5",
|
|
46
45
|
"reconnecting-websocket": "^4.4.0",
|
|
47
46
|
"uuid": "^9.0.1"
|
|
48
47
|
},
|
|
@@ -97,7 +96,6 @@
|
|
|
97
96
|
"@types/react-beautiful-dnd": "^13.1.8",
|
|
98
97
|
"@types/react-dom": "^18.2.24",
|
|
99
98
|
"@types/react-resizable": "^3.0.7",
|
|
100
|
-
"@types/react-virtualized": "^9.21.29",
|
|
101
99
|
"@types/utf-8-validate": "^5.0.2",
|
|
102
100
|
"@types/uuid": "^9.0.8",
|
|
103
101
|
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { BoxProps, Theme } from '@mui/material';
|
|
2
|
-
import { FilterAltOutlined as FilterAltOutlinedIcon } from '@mui/icons-material';
|
|
3
|
-
import { ComponentProps, ReactNode } from 'react';
|
|
4
|
-
|
|
5
|
-
interface SortButtonProps {
|
|
6
|
-
signedRank?: number;
|
|
7
|
-
headerHovered: boolean;
|
|
8
|
-
hovered?: boolean;
|
|
9
|
-
onClick: BoxProps['onClick'];
|
|
10
|
-
}
|
|
11
|
-
interface FilterButtonProps {
|
|
12
|
-
filterLevel: number;
|
|
13
|
-
headerHovered: boolean;
|
|
14
|
-
onClick: ComponentProps<typeof FilterAltOutlinedIcon>['onClick'];
|
|
15
|
-
}
|
|
16
|
-
export interface ColumnHeaderProps extends BoxProps {
|
|
17
|
-
label: ReactNode;
|
|
18
|
-
numeric: boolean;
|
|
19
|
-
sortSignedRank: SortButtonProps['signedRank'];
|
|
20
|
-
filterLevel: FilterButtonProps['filterLevel'];
|
|
21
|
-
onSortClick: SortButtonProps['onClick'];
|
|
22
|
-
onFilterClick: FilterButtonProps['onClick'];
|
|
23
|
-
}
|
|
24
|
-
export declare const ColumnHeaderComponent: import('react').ForwardRefExoticComponent<Omit<ColumnHeaderProps, "ref"> & import("react").RefAttributes<import("@mui/types").OverridableComponent<import("@mui/system").BoxTypeMap<{}, "div", Theme>>>>;
|
|
25
|
-
export declare const ColumnHeader: import('@emotion/styled').StyledComponent<Omit<ColumnHeaderProps, "ref"> & import("react").RefAttributes<import("@mui/types").OverridableComponent<import("@mui/system").BoxTypeMap<{}, "div", Theme>>> & import("@mui/system").MUIStyledCommonProps<import("@mui/system").Theme>, {}, {}>;
|
|
26
|
-
export {};
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, useState, useCallback, useRef, useMemo } from "react";
|
|
3
|
-
import { ArrowUpward, ArrowDownward, FilterAltOutlined } from "@mui/icons-material";
|
|
4
|
-
import { styled } from "@mui/system";
|
|
5
|
-
import { Box } from "@mui/material";
|
|
6
|
-
import { mergeSx } from "../../utils/styles.js";
|
|
7
|
-
const styles = {
|
|
8
|
-
label: {
|
|
9
|
-
fontWeight: "bold",
|
|
10
|
-
fontSize: "0.875rem"
|
|
11
|
-
// to mimic TableCellRoot 'binding'
|
|
12
|
-
},
|
|
13
|
-
divFlex: {
|
|
14
|
-
display: "flex",
|
|
15
|
-
flexDirection: "row",
|
|
16
|
-
alignItems: "center",
|
|
17
|
-
height: "100%"
|
|
18
|
-
},
|
|
19
|
-
divNum: {
|
|
20
|
-
flexDirection: "row-reverse",
|
|
21
|
-
textAlign: "right"
|
|
22
|
-
},
|
|
23
|
-
sortDiv: {
|
|
24
|
-
display: "flex",
|
|
25
|
-
flexDirection: "column",
|
|
26
|
-
alignItems: "center"
|
|
27
|
-
},
|
|
28
|
-
sortButton: {
|
|
29
|
-
fill: "currentcolor"
|
|
30
|
-
},
|
|
31
|
-
filterButton: {
|
|
32
|
-
stroke: "currentcolor"
|
|
33
|
-
},
|
|
34
|
-
filterTooLossy: (theme) => ({
|
|
35
|
-
stroke: theme.palette.secondary.main
|
|
36
|
-
}),
|
|
37
|
-
transparent: {
|
|
38
|
-
opacity: 0
|
|
39
|
-
},
|
|
40
|
-
hovered: {
|
|
41
|
-
opacity: 0.5
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
function SortButton({ signedRank = 0, ...props }) {
|
|
45
|
-
const sortRank = Math.abs(signedRank);
|
|
46
|
-
const visibilityStyle = (!signedRank || void 0) && (props.headerHovered ? styles.hovered : styles.transparent);
|
|
47
|
-
return /* @__PURE__ */ jsxs(Box, { sx: styles.sortDiv, onClick: props.onClick, children: [
|
|
48
|
-
signedRank >= 0 ? /* @__PURE__ */ jsx(ArrowUpward, { sx: visibilityStyle }) : /* @__PURE__ */ jsx(ArrowDownward, { sx: visibilityStyle }),
|
|
49
|
-
sortRank > 1 && !props.hovered && /* @__PURE__ */ jsx("sub", { children: sortRank })
|
|
50
|
-
] });
|
|
51
|
-
}
|
|
52
|
-
function FilterButton(props) {
|
|
53
|
-
const { filterLevel, headerHovered, onClick } = props;
|
|
54
|
-
const visibilityStyle = !filterLevel && (headerHovered ? styles.hovered : styles.transparent);
|
|
55
|
-
return /* @__PURE__ */ jsx(
|
|
56
|
-
FilterAltOutlined,
|
|
57
|
-
{
|
|
58
|
-
onClick,
|
|
59
|
-
sx: mergeSx(
|
|
60
|
-
styles.filterButton,
|
|
61
|
-
// @ts-ignore type incompatibility of styles
|
|
62
|
-
filterLevel > 1 && styles.filterTooLossy,
|
|
63
|
-
visibilityStyle
|
|
64
|
-
)
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
const ColumnHeaderComponent = forwardRef((props, ref) => {
|
|
69
|
-
const { className, label, numeric, sortSignedRank, filterLevel, onSortClick, onFilterClick, onContextMenu, style } = props;
|
|
70
|
-
const [hovered, setHovered] = useState(false);
|
|
71
|
-
const onHover = useCallback((evt) => {
|
|
72
|
-
setHovered(evt.type === "mouseenter");
|
|
73
|
-
}, []);
|
|
74
|
-
const topmostDiv = useRef();
|
|
75
|
-
const handleFilterClick = useMemo(() => {
|
|
76
|
-
if (!onFilterClick) {
|
|
77
|
-
return void 0;
|
|
78
|
-
}
|
|
79
|
-
return (evt) => {
|
|
80
|
-
onFilterClick(evt);
|
|
81
|
-
};
|
|
82
|
-
}, [onFilterClick]);
|
|
83
|
-
return (
|
|
84
|
-
// @ts-ignore it does not let us define Box with onMouseEnter/onMouseLeave attributes with 'div' I think, not sure though
|
|
85
|
-
/* @__PURE__ */ jsxs(
|
|
86
|
-
Box,
|
|
87
|
-
{
|
|
88
|
-
ref: topmostDiv,
|
|
89
|
-
onMouseEnter: onHover,
|
|
90
|
-
onMouseLeave: onHover,
|
|
91
|
-
sx: mergeSx(styles.divFlex, numeric ? styles.divNum : void 0),
|
|
92
|
-
className,
|
|
93
|
-
style,
|
|
94
|
-
onContextMenu,
|
|
95
|
-
children: [
|
|
96
|
-
/* @__PURE__ */ jsx(Box, { ref, sx: styles.label, children: label }),
|
|
97
|
-
onSortClick && /* @__PURE__ */ jsx(SortButton, { headerHovered: hovered, onClick: onSortClick, signedRank: sortSignedRank }),
|
|
98
|
-
handleFilterClick && /* @__PURE__ */ jsx(FilterButton, { headerHovered: hovered, onClick: handleFilterClick, filterLevel })
|
|
99
|
-
]
|
|
100
|
-
}
|
|
101
|
-
)
|
|
102
|
-
);
|
|
103
|
-
});
|
|
104
|
-
const ColumnHeader = styled(ColumnHeaderComponent)({});
|
|
105
|
-
export {
|
|
106
|
-
ColumnHeader,
|
|
107
|
-
ColumnHeaderComponent
|
|
108
|
-
};
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { ColumnProps } from 'react-virtualized';
|
|
2
|
-
import { ReactElement } from 'react';
|
|
3
|
-
|
|
4
|
-
export interface RowProps {
|
|
5
|
-
notClickable?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export interface CustomColumnProps extends ColumnProps {
|
|
8
|
-
sortable?: boolean;
|
|
9
|
-
numeric?: boolean;
|
|
10
|
-
indexer?: KeyedColumnsRowIndexer;
|
|
11
|
-
label: string;
|
|
12
|
-
clickable?: boolean;
|
|
13
|
-
fractionDigits?: number;
|
|
14
|
-
unit?: number;
|
|
15
|
-
extra?: ReactElement;
|
|
16
|
-
nostat?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare enum ChangeWays {
|
|
19
|
-
SIMPLE = "Simple",
|
|
20
|
-
TAIL = "Tail",
|
|
21
|
-
AMEND = "Amend",
|
|
22
|
-
REMOVE = "Remove"
|
|
23
|
-
}
|
|
24
|
-
export interface ColStat {
|
|
25
|
-
imin?: number | null;
|
|
26
|
-
imax?: number | null;
|
|
27
|
-
seen?: any;
|
|
28
|
-
kept?: any;
|
|
29
|
-
}
|
|
30
|
-
export declare const noOpHelper: Readonly<{
|
|
31
|
-
debugName: "noOp";
|
|
32
|
-
maintainsStats: false;
|
|
33
|
-
initStat: () => undefined;
|
|
34
|
-
updateStat: (colStat: ColStat, value: number) => void;
|
|
35
|
-
accepts: (value: any, userParams: any[] | undefined, outerParams: any[] | undefined) => true;
|
|
36
|
-
}>;
|
|
37
|
-
export declare const collectibleHelper: Readonly<{
|
|
38
|
-
debugName: "collectible";
|
|
39
|
-
maintainsStats: true;
|
|
40
|
-
initStat: () => {
|
|
41
|
-
seen: {};
|
|
42
|
-
kept: {};
|
|
43
|
-
};
|
|
44
|
-
updateStat: (colStat: ColStat, cellValue: number, isForKeep: boolean) => void;
|
|
45
|
-
accepts: (value: number, userParams: any[] | undefined, outerParams: any[] | undefined) => boolean;
|
|
46
|
-
}>;
|
|
47
|
-
export declare const getHelper: (column?: CustomColumnProps) => Readonly<{
|
|
48
|
-
debugName: "noOp";
|
|
49
|
-
maintainsStats: false;
|
|
50
|
-
initStat: () => undefined;
|
|
51
|
-
updateStat: (colStat: ColStat, value: number) => void;
|
|
52
|
-
accepts: (value: any, userParams: any[] | undefined, outerParams: any[] | undefined) => true;
|
|
53
|
-
}> | Readonly<{
|
|
54
|
-
debugName: "num";
|
|
55
|
-
maintainsStats: true;
|
|
56
|
-
initStat: () => {
|
|
57
|
-
imin: null;
|
|
58
|
-
imax: null;
|
|
59
|
-
};
|
|
60
|
-
updateStat: (colStat: ColStat, value: number) => void;
|
|
61
|
-
accepts: (value: number, userParams: any[] | undefined, outerParams: any[] | undefined) => true;
|
|
62
|
-
}> | Readonly<{
|
|
63
|
-
debugName: "collectible";
|
|
64
|
-
maintainsStats: true;
|
|
65
|
-
initStat: () => {
|
|
66
|
-
seen: {};
|
|
67
|
-
kept: {};
|
|
68
|
-
};
|
|
69
|
-
updateStat: (colStat: ColStat, cellValue: number, isForKeep: boolean) => void;
|
|
70
|
-
accepts: (value: number, userParams: any[] | undefined, outerParams: any[] | undefined) => boolean;
|
|
71
|
-
}>;
|
|
72
|
-
export interface Preferences {
|
|
73
|
-
isThreeState: boolean;
|
|
74
|
-
singleColumnByDefault: boolean;
|
|
75
|
-
}
|
|
76
|
-
export interface FilteredRows {
|
|
77
|
-
rowAndOrigIndex: [RowProps, number][];
|
|
78
|
-
colsStats: Record<string, ColStat>;
|
|
79
|
-
rowsCount: number;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* A rows indexer for MuiVirtualizedTable to delegate to an instance of it
|
|
83
|
-
* for filtering, grouping and multi-column sorting via
|
|
84
|
-
* a view index to model index array.
|
|
85
|
-
*/
|
|
86
|
-
export declare class KeyedColumnsRowIndexer {
|
|
87
|
-
static get CHANGE_WAYS(): typeof ChangeWays;
|
|
88
|
-
versionSetter: ((version: number) => void) | null;
|
|
89
|
-
byColFilter: Record<string, {
|
|
90
|
-
userParams?: any[];
|
|
91
|
-
outerParams?: any[];
|
|
92
|
-
}> | null;
|
|
93
|
-
byRowFilter: ((row: RowProps) => boolean) | null;
|
|
94
|
-
delegatorCallback: ((instance: KeyedColumnsRowIndexer, callback: (input: any) => void) => void) | null;
|
|
95
|
-
filterVersion: number;
|
|
96
|
-
groupingCount: number;
|
|
97
|
-
indirectionStatus: string | null;
|
|
98
|
-
isThreeState: boolean;
|
|
99
|
-
lastUsedRank: number;
|
|
100
|
-
singleColumnByDefault: boolean;
|
|
101
|
-
sortingState: [string, string | undefined][] | null;
|
|
102
|
-
version: number;
|
|
103
|
-
constructor(isThreeState?: boolean, singleColumnByDefault?: boolean, delegatorCallback?: null, versionSetter?: ((version: number) => void) | null);
|
|
104
|
-
hasVersionSetter: () => boolean;
|
|
105
|
-
getVersion: () => number;
|
|
106
|
-
bumpVersion: (isFilter?: boolean) => void;
|
|
107
|
-
updatePreferences: (preferences: Preferences) => boolean;
|
|
108
|
-
preFilterRowMapping: (columns: CustomColumnProps[], rows: RowProps[], rowFilter: (row: RowProps) => boolean) => FilteredRows | null;
|
|
109
|
-
makeGroupAndSortIndirector: (preFilteredRowPairs: FilteredRows | null, columns: CustomColumnProps[]) => number[] | null;
|
|
110
|
-
getSortingAsKeyAndCodedRank: () => (string | number)[][];
|
|
111
|
-
updateSortingFromUser: (colKey: string, change_way: ChangeWays) => boolean;
|
|
112
|
-
codedRankByColumnIndex: (columns: CustomColumnProps[]) => number[] | null;
|
|
113
|
-
columnSortingSignedRank: (colKey: string) => number;
|
|
114
|
-
highestCodedColumn: (columns: CustomColumnProps[]) => number;
|
|
115
|
-
getColFilterParams: (colKey: string | null, isForUser: boolean) => any[] | undefined;
|
|
116
|
-
setColFilterParams: (colKey: string | null, params: any[] | null, isForUser: boolean) => boolean;
|
|
117
|
-
getColFilterOuterParams: (colKey: string | null) => any[] | undefined;
|
|
118
|
-
setColFilterOuterParams: (colKey: string, outerParams: any[]) => boolean;
|
|
119
|
-
getColFilterUserParams: (colKey: string | null) => any[] | undefined;
|
|
120
|
-
setColFilterUserParams: (colKey: string | null, params: any[] | null) => boolean;
|
|
121
|
-
getUserFiltering: () => Record<string, object>;
|
|
122
|
-
updateRowFiltering: (rowFilterFunc: (row: RowProps) => boolean) => void;
|
|
123
|
-
}
|
|
124
|
-
export declare const forTesting: {
|
|
125
|
-
codedColumnsFromKeyAndDirection: (keyAndDirections: [
|
|
126
|
-
string,
|
|
127
|
-
string | undefined
|
|
128
|
-
][] | null, columns: CustomColumnProps[]) => number[] | null;
|
|
129
|
-
makeCompositeComparatorFromCodedColumns: (codedColumns: number[] | null, columns: CustomColumnProps[], rowExtractor: (row: [Record<string, number | string | undefined>, number][]) => Record<string, number | string | undefined>) => (row_a_i: [Record<string, number | string | undefined>, number][], row_b_i: [Record<string, number | string | undefined>, number][]) => number;
|
|
130
|
-
};
|