@gridsuite/commons-ui 0.47.0 → 0.48.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.
Files changed (105) hide show
  1. package/dist/components/AuthenticationRouter/AuthenticationRouter.d.ts +10 -0
  2. package/dist/components/AuthenticationRouter/index.d.ts +1 -0
  3. package/dist/components/CardErrorBoundary/card-error-boundary.d.ts +18 -0
  4. package/dist/components/CardErrorBoundary/index.d.ts +1 -0
  5. package/dist/components/DirectoryItemSelector/directory-item-selector.d.ts +22 -0
  6. package/dist/components/DirectoryItemSelector/directory-item-selector.js +254 -0
  7. package/dist/components/ElementSearchDialog/element-search-dialog.d.ts +16 -0
  8. package/dist/components/ElementSearchDialog/equipment-item.d.ts +16 -0
  9. package/dist/components/ElementSearchDialog/index.d.ts +2 -0
  10. package/dist/components/ElementSearchDialog/tag-renderer.d.ts +11 -0
  11. package/dist/components/FlatParameters/FlatParameters.d.ts +10 -0
  12. package/dist/components/FlatParameters/index.d.ts +1 -0
  13. package/dist/components/Login/Login.d.ts +5 -0
  14. package/dist/components/Login/Logout.d.ts +5 -0
  15. package/dist/components/Login/index.d.ts +1 -0
  16. package/dist/components/MuiVirtualizedTable/ColumnHeader.d.ts +4 -0
  17. package/dist/components/MuiVirtualizedTable/KeyedColumnsRowIndexer.d.ts +104 -0
  18. package/dist/components/MuiVirtualizedTable/MuiVirtualizedTable.d.ts +131 -0
  19. package/dist/components/MuiVirtualizedTable/index.d.ts +2 -0
  20. package/dist/components/MultipleSelectionDialog/MultipleSelectionDialog.d.ts +10 -0
  21. package/dist/components/MultipleSelectionDialog/index.d.ts +1 -0
  22. package/dist/components/OverflowableText/index.d.ts +1 -0
  23. package/dist/components/OverflowableText/overflowable-text.d.ts +2 -0
  24. package/dist/components/ReportViewer/filter-button.d.ts +1 -0
  25. package/dist/components/ReportViewer/index.d.ts +1 -0
  26. package/dist/components/ReportViewer/log-report-item.d.ts +68 -0
  27. package/dist/components/ReportViewer/log-report.d.ts +21 -0
  28. package/dist/components/ReportViewer/log-table.d.ts +8 -0
  29. package/dist/components/ReportViewer/multi-select-list.d.ts +1 -0
  30. package/dist/components/ReportViewer/report-item.d.ts +13 -0
  31. package/dist/components/ReportViewer/report-tree-view-context.d.ts +2 -0
  32. package/dist/components/ReportViewer/report-viewer.d.ts +4 -0
  33. package/dist/components/ReportViewerDialog/index.d.ts +1 -0
  34. package/dist/components/ReportViewerDialog/report-viewer-dialog.d.ts +1 -0
  35. package/dist/components/SignInCallbackHandler/SignInCallbackHandler.d.ts +5 -0
  36. package/dist/components/SignInCallbackHandler/index.d.ts +1 -0
  37. package/dist/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.d.ts +5 -0
  38. package/dist/components/SilentRenewCallbackHandler/index.d.ts +1 -0
  39. package/dist/components/SnackbarProvider/SnackbarProvider.d.ts +3 -0
  40. package/dist/components/SnackbarProvider/index.d.ts +1 -0
  41. package/dist/components/TopBar/AboutDialog.d.ts +24 -0
  42. package/dist/components/TopBar/GridLogo.d.ts +34 -0
  43. package/dist/components/TopBar/TopBar.d.ts +53 -0
  44. package/dist/components/TopBar/index.d.ts +3 -0
  45. package/dist/components/TreeViewFinder/TreeViewFinder.d.ts +57 -0
  46. package/dist/components/TreeViewFinder/index.d.ts +1 -0
  47. package/dist/components/react-hook-form/autocomplete-input.d.ts +30 -0
  48. package/dist/components/react-hook-form/booleans/boolean-input.d.ts +16 -0
  49. package/dist/components/react-hook-form/booleans/checkbox-input.d.ts +14 -0
  50. package/dist/components/react-hook-form/booleans/switch-input.d.ts +14 -0
  51. package/dist/components/react-hook-form/directory-items-input.d.ts +28 -0
  52. package/dist/components/react-hook-form/directory-items-input.js +185 -0
  53. package/dist/components/react-hook-form/error-management/error-input.d.ts +5 -0
  54. package/dist/components/react-hook-form/error-management/field-error-alert.d.ts +4 -0
  55. package/dist/components/react-hook-form/error-management/mid-form-error.d.ts +4 -0
  56. package/dist/components/react-hook-form/numbers/float-input.d.ts +18 -0
  57. package/dist/components/react-hook-form/numbers/integer-input.d.ts +18 -0
  58. package/dist/components/react-hook-form/numbers/utils.d.ts +2 -0
  59. package/dist/components/react-hook-form/radio-input.d.ts +18 -0
  60. package/dist/components/react-hook-form/raw-read-only-input.d.ts +9 -0
  61. package/dist/components/react-hook-form/raw-read-only-input.js +10 -0
  62. package/dist/components/react-hook-form/select-input.d.ts +17 -0
  63. package/dist/components/react-hook-form/slider-input.d.ts +21 -0
  64. package/dist/components/react-hook-form/text-input.d.ts +33 -0
  65. package/dist/components/react-hook-form/utils/cancel-button.d.ts +10 -0
  66. package/dist/components/react-hook-form/utils/field-label.d.ts +6 -0
  67. package/dist/components/react-hook-form/utils/functions.d.ts +11 -0
  68. package/dist/components/react-hook-form/utils/functions.js +5 -0
  69. package/dist/components/react-hook-form/utils/submit-button.d.ts +10 -0
  70. package/dist/components/react-hook-form/utils/text-field-with-adornment.d.ts +12 -0
  71. package/dist/components/translations/card-error-boundary-en.d.ts +12 -0
  72. package/dist/components/translations/card-error-boundary-fr.d.ts +12 -0
  73. package/dist/components/translations/common-button-en.d.ts +5 -0
  74. package/dist/components/translations/common-button-fr.d.ts +5 -0
  75. package/dist/components/translations/element-search-en.d.ts +11 -0
  76. package/dist/components/translations/element-search-fr.d.ts +11 -0
  77. package/dist/components/translations/equipment-search-en.d.ts +25 -0
  78. package/dist/components/translations/equipment-search-fr.d.ts +25 -0
  79. package/dist/components/translations/flat-parameters-en.d.ts +12 -0
  80. package/dist/components/translations/flat-parameters-fr.d.ts +12 -0
  81. package/dist/components/translations/login-en.d.ts +18 -0
  82. package/dist/components/translations/login-fr.d.ts +18 -0
  83. package/dist/components/translations/multiple-selection-dialog-en.d.ts +12 -0
  84. package/dist/components/translations/multiple-selection-dialog-fr.d.ts +12 -0
  85. package/dist/components/translations/report-viewer-en.d.ts +12 -0
  86. package/dist/components/translations/report-viewer-fr.d.ts +12 -0
  87. package/dist/components/translations/table-en.d.ts +10 -0
  88. package/dist/components/translations/table-fr.d.ts +10 -0
  89. package/dist/components/translations/top-bar-en.d.ts +31 -0
  90. package/dist/components/translations/top-bar-fr.d.ts +31 -0
  91. package/dist/components/translations/treeview-finder-en.d.ts +16 -0
  92. package/dist/components/translations/treeview-finder-fr.d.ts +16 -0
  93. package/dist/hooks/useDebounce.d.ts +1 -0
  94. package/dist/hooks/useSnackMessage.d.ts +5 -0
  95. package/dist/index.d.ts +10 -1
  96. package/dist/index.js +4 -0
  97. package/dist/utils/AuthService.d.ts +9 -0
  98. package/dist/utils/ElementType.d.ts +13 -0
  99. package/dist/utils/ElementType.js +6 -2
  100. package/dist/utils/EquipmentType.d.ts +136 -0
  101. package/dist/utils/UserManagerMock.d.ts +34 -0
  102. package/dist/utils/actions.d.ts +50 -0
  103. package/dist/utils/algos.d.ts +7 -0
  104. package/dist/utils/styles.d.ts +5 -0
  105. package/package.json +1 -1
@@ -0,0 +1,10 @@
1
+ export default AuthenticationRouter;
2
+ declare function AuthenticationRouter({ userManager, signInCallbackError, authenticationRouterError, showAuthenticationRouterLogin, dispatch, navigate, location, }: {
3
+ userManager: any;
4
+ signInCallbackError: any;
5
+ authenticationRouterError: any;
6
+ showAuthenticationRouterLogin: any;
7
+ dispatch: any;
8
+ navigate: any;
9
+ location: any;
10
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { default } from "./AuthenticationRouter";
@@ -0,0 +1,18 @@
1
+ export default CardErrorBoundary;
2
+ declare class CardErrorBoundary extends React.Component<any, any, any> {
3
+ static getDerivedStateFromError(error: any): {
4
+ hasError: boolean;
5
+ error: any;
6
+ };
7
+ constructor(props: any);
8
+ state: {
9
+ hasError: boolean;
10
+ expanded: boolean;
11
+ error: undefined;
12
+ };
13
+ handleExpandClick(): void;
14
+ handleReloadClick(): void;
15
+ componentDidCatch(error: any, errorInfo: any): void;
16
+ render(): any;
17
+ }
18
+ import React from 'react';
@@ -0,0 +1 @@
1
+ export { default } from "./card-error-boundary";
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Copyright (c) 2022, RTE (http://www.rte-france.com)
3
+ * This Source Code Form is subject to the terms of the Mozilla Public
4
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
5
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
+ */
7
+ /// <reference types="node" />
8
+ import { FunctionComponent } from 'react';
9
+ import { UUID } from 'crypto';
10
+ interface DirectoryItemSelectorProps {
11
+ open: boolean;
12
+ onClose: any;
13
+ types: string[];
14
+ equipmentTypes?: string[];
15
+ title: string;
16
+ itemFilter?: any;
17
+ fetchDirectoryContent: (directoryUuid: UUID, elementTypes: string[]) => Promise<any>;
18
+ fetchRootFolders: (types: string[]) => Promise<any>;
19
+ fetchElementsInfos: (ids: UUID[], elementTypes: string[], equipmentTypes?: string[]) => Promise<any>;
20
+ }
21
+ declare const DirectoryItemSelector: FunctionComponent<DirectoryItemSelectorProps>;
22
+ export default DirectoryItemSelector;
@@ -0,0 +1,254 @@
1
+ import { jsx, Fragment } from "react/jsx-runtime";
2
+ import { useState, useRef, useCallback, useEffect } from "react";
3
+ import { elementType, getFileIcon } from "../../utils/ElementType.js";
4
+ import { useSnackMessage } from "../../hooks/useSnackMessage.js";
5
+ import TreeViewFinder from "../TreeViewFinder/TreeViewFinder.js";
6
+ const styles = {
7
+ icon: (theme) => ({
8
+ marginRight: theme.spacing(1),
9
+ width: "18px",
10
+ height: "18px"
11
+ })
12
+ };
13
+ const DirectoryItemSelector = ({
14
+ open,
15
+ onClose,
16
+ types,
17
+ equipmentTypes,
18
+ title,
19
+ itemFilter,
20
+ fetchDirectoryContent,
21
+ fetchRootFolders,
22
+ fetchElementsInfos
23
+ }) => {
24
+ const [data, setData] = useState([]);
25
+ const [rootDirectories, setRootDirectories] = useState([]);
26
+ const nodeMap = useRef({});
27
+ const dataRef = useRef([]);
28
+ dataRef.current = data;
29
+ const rootsRef = useRef([]);
30
+ rootsRef.current = rootDirectories;
31
+ const { snackError } = useSnackMessage();
32
+ const openRef = useRef();
33
+ openRef.current = open;
34
+ const contentFilter = useCallback(
35
+ () => /* @__PURE__ */ new Set([elementType.DIRECTORY, ...types]),
36
+ [types]
37
+ );
38
+ const convertChildren = useCallback((children) => {
39
+ return children.map((e) => {
40
+ return {
41
+ id: e.elementUuid,
42
+ name: e.elementName,
43
+ specificMetadata: e.specificMetadata,
44
+ icon: getFileIcon(e.type, styles.icon),
45
+ children: e.type === elementType.DIRECTORY ? convertChildren(e.children) : void 0,
46
+ childrenCount: e.type === elementType.DIRECTORY ? e.subdirectoriesCount : void 0
47
+ };
48
+ });
49
+ }, []);
50
+ const convertRoots = useCallback(
51
+ (newRoots) => {
52
+ return newRoots.map((e) => {
53
+ return {
54
+ id: e.elementUuid,
55
+ name: e.elementName,
56
+ icon: getFileIcon(e.type, styles.icon),
57
+ children: e.type === elementType.DIRECTORY ? convertChildren(
58
+ nodeMap.current[e.elementUuid].children
59
+ ) : void 0,
60
+ childrenCount: e.type === elementType.DIRECTORY ? e.subdirectoriesCount : void 0
61
+ };
62
+ });
63
+ },
64
+ [convertChildren]
65
+ );
66
+ const addToDirectory = useCallback(
67
+ (nodeId, content) => {
68
+ let [nrs, mdr] = updatedTree(
69
+ rootsRef.current,
70
+ nodeMap.current,
71
+ nodeId,
72
+ content
73
+ );
74
+ setRootDirectories(nrs);
75
+ nodeMap.current = mdr;
76
+ setData(convertRoots(nrs));
77
+ },
78
+ [convertRoots]
79
+ );
80
+ const updateRootDirectories = useCallback(() => {
81
+ fetchRootFolders(types).then((data2) => {
82
+ let [nrs, mdr] = updatedTree(
83
+ rootsRef.current,
84
+ nodeMap.current,
85
+ null,
86
+ data2
87
+ );
88
+ setRootDirectories(nrs);
89
+ nodeMap.current = mdr;
90
+ setData(convertRoots(nrs));
91
+ }).catch((error) => {
92
+ snackError({
93
+ messageTxt: error.message,
94
+ headerId: "DirectoryItemSelector"
95
+ });
96
+ });
97
+ }, [convertRoots, types, snackError, fetchRootFolders]);
98
+ useEffect(() => {
99
+ if (open) {
100
+ updateRootDirectories();
101
+ }
102
+ }, [open, updateRootDirectories]);
103
+ const fetchDirectory = useCallback(
104
+ (nodeId) => {
105
+ fetchDirectoryContent(nodeId, types).then((children) => {
106
+ const childrenMatchedTypes = children.filter(
107
+ (item) => contentFilter().has(item.type)
108
+ );
109
+ if (childrenMatchedTypes.length > 0 && equipmentTypes && equipmentTypes.length > 0) {
110
+ fetchElementsInfos(
111
+ childrenMatchedTypes.map((e) => e.elementUuid),
112
+ types,
113
+ equipmentTypes
114
+ ).then((childrenWithMetadata) => {
115
+ const children2 = itemFilter ? childrenWithMetadata.filter((val) => {
116
+ if (val.type === elementType.DIRECTORY) {
117
+ return true;
118
+ }
119
+ return itemFilter(val);
120
+ }) : childrenWithMetadata;
121
+ addToDirectory(nodeId, children2);
122
+ });
123
+ } else {
124
+ addToDirectory(nodeId, childrenMatchedTypes);
125
+ }
126
+ }).catch((error) => {
127
+ console.warn(
128
+ `Could not update subs (and content) of '${nodeId}' : ${error.message}`
129
+ );
130
+ });
131
+ },
132
+ [
133
+ types,
134
+ equipmentTypes,
135
+ itemFilter,
136
+ contentFilter,
137
+ addToDirectory,
138
+ fetchDirectoryContent,
139
+ fetchElementsInfos
140
+ ]
141
+ );
142
+ function sortHandlingDirectories(a, b) {
143
+ if (a.children && !b.children) {
144
+ return -1;
145
+ } else if (b.children && !a.children) {
146
+ return 1;
147
+ }
148
+ return a.name.localeCompare(b.name);
149
+ }
150
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
151
+ TreeViewFinder,
152
+ {
153
+ multiselect: true,
154
+ onTreeBrowse: fetchDirectory,
155
+ data,
156
+ onlyLeaves: true,
157
+ sortMethod: sortHandlingDirectories,
158
+ title,
159
+ onClose,
160
+ open
161
+ }
162
+ ) });
163
+ };
164
+ function updatedTree(prevRoots, prevMap, nodeId, children) {
165
+ var _a;
166
+ const nextChildren = children.sort((a, b) => a.elementName.localeCompare(b.elementName)).map((n) => {
167
+ let pn = prevMap[n.elementUuid];
168
+ if (!pn) {
169
+ return { ...n, children: [], parentUuid: nodeId };
170
+ } else if (n.elementName === pn.elementName && sameRights(n.accessRights, pn.accessRights) && n.subdirectoriesCount === pn.subdirectoriesCount && nodeId === pn.parentUuid) {
171
+ return pn;
172
+ } else {
173
+ if (pn.parentUuid !== nodeId) {
174
+ console.warn("reparent " + pn.parentUuid + " -> " + nodeId);
175
+ }
176
+ return {
177
+ ...pn,
178
+ elementName: n.elementName,
179
+ accessRights: n.accessRights,
180
+ subdirectoriesCount: n.subdirectoriesCount,
181
+ parentUuid: nodeId
182
+ };
183
+ }
184
+ });
185
+ const prevChildren = nodeId ? (_a = prevMap[nodeId]) == null ? void 0 : _a.children : prevRoots;
186
+ if ((prevChildren == null ? void 0 : prevChildren.length) === nextChildren.length && prevChildren.every((e, i) => e === nextChildren[i])) {
187
+ return [prevRoots, prevMap];
188
+ }
189
+ let nextUuids = new Set(children ? children.map((n) => n.elementUuid) : []);
190
+ let prevUuids = prevChildren ? prevChildren.map((n) => n.elementUuid) : [];
191
+ let mayNodeId = nodeId ? [nodeId] : [];
192
+ let nonCopyUuids = /* @__PURE__ */ new Set([
193
+ ...nextUuids,
194
+ ...mayNodeId,
195
+ ...Array.prototype.concat(
196
+ ...prevUuids.filter((u) => !nextUuids.has(u)).map(
197
+ (u) => flattenDownNodes(prevMap[u], (n) => n.children).map(
198
+ (n) => n.elementUuid
199
+ )
200
+ )
201
+ )
202
+ ]);
203
+ const prevNode = nodeId ? prevMap[nodeId] : {};
204
+ const nextNode = {
205
+ elementUuid: nodeId,
206
+ parentUuid: null,
207
+ ...prevNode,
208
+ children: nextChildren,
209
+ subdirectoriesCount: nextChildren.length
210
+ };
211
+ const nextMap = Object.fromEntries([
212
+ ...Object.entries(prevMap).filter(([k, v], i) => !nonCopyUuids.has(k)),
213
+ ...nextChildren.map((n) => [n.elementUuid, n]),
214
+ ...refreshedUpNodes(prevMap, nextNode).map((n) => [n.elementUuid, n])
215
+ ]);
216
+ const nextRoots = nodeId === null ? nextChildren : prevRoots.map((r) => nextMap[r.elementUuid]);
217
+ return [nextRoots, nextMap];
218
+ }
219
+ function sameRights(a, b) {
220
+ if (!a && !b) {
221
+ return true;
222
+ }
223
+ if (!a || !b) {
224
+ return false;
225
+ }
226
+ return a.isPrivate === b.isPrivate;
227
+ }
228
+ function flattenDownNodes(n, cef) {
229
+ const subs = cef(n);
230
+ if (subs.length === 0) {
231
+ return [n];
232
+ }
233
+ return Array.prototype.concat(
234
+ [n],
235
+ ...subs.map((sn) => flattenDownNodes(sn, cef))
236
+ );
237
+ }
238
+ function refreshedUpNodes(m, nn) {
239
+ if (!(nn == null ? void 0 : nn.elementUuid)) {
240
+ return [];
241
+ }
242
+ if (nn.parentUuid === null) {
243
+ return [nn];
244
+ }
245
+ const parent = m[nn.parentUuid];
246
+ const nextChildren = parent.children.map(
247
+ (c) => c.elementUuid === nn.elementUuid ? nn : c
248
+ );
249
+ const nextParent = { ...parent, children: nextChildren };
250
+ return [nn, ...refreshedUpNodes(m, nextParent)];
251
+ }
252
+ export {
253
+ DirectoryItemSelector as default
254
+ };
@@ -0,0 +1,16 @@
1
+ export default ElementSearchDialog;
2
+ declare function ElementSearchDialog(props: any): import("react/jsx-runtime").JSX.Element;
3
+ declare namespace ElementSearchDialog {
4
+ namespace propTypes {
5
+ const open: PropTypes.Validator<boolean>;
6
+ const onClose: PropTypes.Validator<(...args: any[]) => any>;
7
+ const searchingLabel: PropTypes.Requireable<string>;
8
+ const onSearchTermChange: PropTypes.Validator<(...args: any[]) => any>;
9
+ const onSelectionChange: PropTypes.Validator<(...args: any[]) => any>;
10
+ const elementsFound: PropTypes.Validator<any[]>;
11
+ const renderElement: PropTypes.Validator<(...args: any[]) => any>;
12
+ const searchTermDisabled: PropTypes.Requireable<boolean>;
13
+ const searchTermDisableReason: PropTypes.Requireable<string>;
14
+ }
15
+ }
16
+ import PropTypes from 'prop-types';
@@ -0,0 +1,16 @@
1
+ export function EquipmentItem({ inputValue, suffixRenderer, element, showsJustText, ...props }: {
2
+ [x: string]: any;
3
+ inputValue: any;
4
+ suffixRenderer?: {
5
+ ({ props, element }: {
6
+ props: any;
7
+ element: any;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ propTypes: {
10
+ element: import("prop-types").Requireable<object>;
11
+ props: import("prop-types").Requireable<object>;
12
+ };
13
+ } | undefined;
14
+ element: any;
15
+ showsJustText?: boolean | undefined;
16
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default } from "./element-search-dialog";
2
+ export { TagRenderer } from "./tag-renderer";
@@ -0,0 +1,11 @@
1
+ export function TagRenderer({ props, element }: {
2
+ props: any;
3
+ element: any;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ export namespace TagRenderer {
6
+ namespace propTypes {
7
+ const element: PropTypes.Requireable<object>;
8
+ const props: PropTypes.Requireable<object>;
9
+ }
10
+ }
11
+ import PropTypes from 'prop-types';
@@ -0,0 +1,10 @@
1
+ export function extractDefault(paramDescription: any): any;
2
+ export function FlatParameters({ paramsAsArray, initValues, onChange, variant, showSeparator, selectionWithDialog, }: {
3
+ paramsAsArray: any;
4
+ initValues: any;
5
+ onChange: any;
6
+ variant?: string | undefined;
7
+ showSeparator?: boolean | undefined;
8
+ selectionWithDialog?: ((param: any) => boolean) | undefined;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ export default FlatParameters;
@@ -0,0 +1 @@
1
+ export { default } from "./FlatParameters";
@@ -0,0 +1,5 @@
1
+ export default Login;
2
+ declare function Login({ onLoginClick, disabled }: {
3
+ onLoginClick: any;
4
+ disabled: any;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export default Logout;
2
+ declare function Logout({ onLogoutClick, disabled }: {
3
+ onLogoutClick: any;
4
+ disabled: any;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { default } from "./Login";
@@ -0,0 +1,4 @@
1
+ export const ColumnHeader: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
2
+ declare const _default: import("@emotion/styled").StyledComponent<React.RefAttributes<any> & import("@mui/system").MUIStyledCommonProps<import("@mui/system").Theme>, {}, {}>;
3
+ export default _default;
4
+ import React from 'react';
@@ -0,0 +1,104 @@
1
+ export namespace CHANGE_WAYS {
2
+ const SIMPLE: string;
3
+ const TAIL: string;
4
+ const AMEND: string;
5
+ const REMOVE: string;
6
+ }
7
+ export const noOpHelper: Readonly<{
8
+ debugName: "noOp";
9
+ maintainsStats: false;
10
+ initStat: () => undefined;
11
+ updateStat: (colStat: any, value: any) => void;
12
+ accepts: (value: any, userParams: any, outerParams: any) => true;
13
+ }>;
14
+ export const collectibleHelper: Readonly<{
15
+ debugName: "collectible";
16
+ maintainsStats: true;
17
+ initStat: () => {
18
+ seen: {};
19
+ kept: {};
20
+ };
21
+ updateStat: (colStat: any, cellValue: any, isForKeep: any) => void;
22
+ accepts: (value: any, userParams: any, outerParams: any) => any;
23
+ }>;
24
+ export function getHelper(column: any): Readonly<{
25
+ debugName: "noOp";
26
+ maintainsStats: false;
27
+ initStat: () => undefined;
28
+ updateStat: (colStat: any, value: any) => void;
29
+ accepts: (value: any, userParams: any, outerParams: any) => true;
30
+ }> | Readonly<{
31
+ debugName: "num";
32
+ maintainsStats: true;
33
+ initStat: () => {
34
+ imin: null;
35
+ imax: null;
36
+ };
37
+ updateStat: (colStat: any, value: any) => void;
38
+ accepts: (value: any, userParams: any, outerParams: any) => true;
39
+ }> | Readonly<{
40
+ debugName: "collectible";
41
+ maintainsStats: true;
42
+ initStat: () => {
43
+ seen: {};
44
+ kept: {};
45
+ };
46
+ updateStat: (colStat: any, cellValue: any, isForKeep: any) => void;
47
+ accepts: (value: any, userParams: any, outerParams: any) => any;
48
+ }>;
49
+ /**
50
+ * A rows indexer for MuiVirtualizedTable to delegate to an instance of it
51
+ * for filtering, grouping and multi-column sorting via
52
+ * a view index to model index array.
53
+ */
54
+ export class KeyedColumnsRowIndexer {
55
+ static get CHANGE_WAYS(): {
56
+ SIMPLE: string;
57
+ TAIL: string;
58
+ AMEND: string;
59
+ REMOVE: string;
60
+ };
61
+ constructor(isThreeState?: boolean, singleColumnByDefault?: boolean, delegatorCallback?: null, versionSetter?: null);
62
+ _versionSetter: any;
63
+ version: number;
64
+ filterVersion: number;
65
+ delegatorCallback: any;
66
+ indirectionStatus: string | null;
67
+ isThreeState: boolean;
68
+ singleColumnByDefault: boolean;
69
+ lastUsedRank: number;
70
+ sortingState: any;
71
+ groupingCount: number;
72
+ byColFilter: {} | null;
73
+ byRowFilter: any;
74
+ hasVersionSetter: () => boolean;
75
+ getVersion: () => number;
76
+ _bumpVersion: (isFilter?: boolean) => void;
77
+ updatePreferences: (preferences: any) => false | undefined;
78
+ preFilterRowMapping: (columns: any, rows: any, rowFilter: any) => {
79
+ rowAndOrigIndex: any[][];
80
+ colsStats: {};
81
+ rowsCount: any;
82
+ } | null;
83
+ makeGroupAndSortIndirector: (preFilteredRowPairs: any, columns: any) => any;
84
+ getSortingAsKeyAndCodedRank: () => any;
85
+ updateSortingFromUser: (colKey: any, change_way: any) => boolean;
86
+ codedRankByColumnIndex: (columns: any) => number[] | null;
87
+ columnSortingSignedRank: (colKey: any) => number;
88
+ highestCodedColumn: (columns: any) => number;
89
+ _getColFilterParams: (colKey: any, isForUser: any) => any;
90
+ _setColFilterParams: (colKey: any, params: any, isForUser: any) => boolean;
91
+ getColFilterOuterParams: (colKey: any) => any;
92
+ setColFilterOuterParams: (colKey: any, outerParams: any) => boolean;
93
+ getColFilterUserParams: (colKey: any) => any;
94
+ setColFilterUserParams: (colKey: any, params: any) => boolean;
95
+ getUserFiltering: () => {};
96
+ updateRowFiltering: (rowFilterFunc: any) => void;
97
+ }
98
+ export namespace forTesting {
99
+ export { codedColumnsFromKeyAndDirection };
100
+ export { makeCompositeComparatorFromCodedColumns };
101
+ }
102
+ declare function codedColumnsFromKeyAndDirection(keyAndDirections: any, columns: any): number[] | null;
103
+ declare function makeCompositeComparatorFromCodedColumns(codedColumns: any, columns: any, rowExtractor: any): (row_a_i: any, row_b_i: any) => number;
104
+ export {};
@@ -0,0 +1,131 @@
1
+ export const DEFAULT_CELL_PADDING: 16;
2
+ export const DEFAULT_HEADER_HEIGHT: 48;
3
+ export const DEFAULT_ROW_HEIGHT: 48;
4
+ export function generateMuiVirtualizedTableClass(className: any): string;
5
+ declare const _default: import("@emotion/styled").StyledComponent<Pick<PropTypes.InferProps<{
6
+ name: PropTypes.Requireable<string>;
7
+ classes: PropTypes.Requireable<object>;
8
+ rows: PropTypes.Requireable<any[]>;
9
+ columns: PropTypes.Validator<(PropTypes.InferProps<{
10
+ dataKey: PropTypes.Validator<string>;
11
+ label: PropTypes.Validator<string>;
12
+ numeric: PropTypes.Requireable<boolean>;
13
+ width: PropTypes.Requireable<number>;
14
+ minWidth: PropTypes.Requireable<number>;
15
+ maxWidth: PropTypes.Requireable<number>;
16
+ unit: PropTypes.Requireable<string>;
17
+ fractionDigits: PropTypes.Requireable<number>;
18
+ extra: PropTypes.Requireable<PropTypes.ReactElementLike>;
19
+ }> | null | undefined)[]>;
20
+ enableExportCSV: PropTypes.Requireable<boolean>;
21
+ exportCSVDataKeys: PropTypes.Requireable<any[]>;
22
+ sort: PropTypes.Requireable<(...args: any[]) => any>;
23
+ sortable: PropTypes.Requireable<boolean>;
24
+ indexer: PropTypes.Requireable<object>;
25
+ headerHeight: PropTypes.Requireable<number>;
26
+ onRowClick: PropTypes.Requireable<(...args: any[]) => any>;
27
+ onCellClick: PropTypes.Requireable<(...args: any[]) => any>;
28
+ rowHeight: PropTypes.Requireable<number>;
29
+ filter: PropTypes.Requireable<(...args: any[]) => any>;
30
+ tooltipSx: PropTypes.Requireable<object>;
31
+ }>, "filter" | "name" | "rows" | "columns" | "sort" | "tooltipSx" | "indexer" | "sortable" | "exportCSVDataKeys" | "onRowClick" | "onCellClick"> & {
32
+ classes?: object | null | undefined;
33
+ headerHeight?: number | null | undefined;
34
+ enableExportCSV?: boolean | null | undefined;
35
+ rowHeight?: number | null | undefined;
36
+ } & {} & import("@mui/system").MUIStyledCommonProps<import("@mui/system").Theme>, {}, {
37
+ ref?: React.Ref<MuiVirtualizedTable> | undefined;
38
+ }>;
39
+ export default _default;
40
+ import PropTypes from 'prop-types';
41
+ declare class MuiVirtualizedTable extends React.PureComponent<any, any, any> {
42
+ static defaultProps: {
43
+ headerHeight: number;
44
+ rowHeight: number;
45
+ enableExportCSV: boolean;
46
+ classes: {};
47
+ };
48
+ constructor(props: any, context: any);
49
+ _computeHeaderSize(): void;
50
+ _registerHeader(label: any, header: any): void;
51
+ _registerObserver(element: any): void;
52
+ headers: React.RefObject<any>;
53
+ observer: IntersectionObserver;
54
+ state: {
55
+ headerHeight: any;
56
+ indexer: any;
57
+ indirectionVersion: number;
58
+ popoverAnchorEl: null;
59
+ popoverColKey: null;
60
+ deferredFilterChange: null;
61
+ };
62
+ setVersion: (v: any) => void;
63
+ componentDidUpdate(oldProps: any): void;
64
+ componentDidMount(): void;
65
+ componentWillUnmount(): void;
66
+ computeDataWidth: (text: any) => any;
67
+ sizes: import("memoize-one").MemoizedFn<(this: any, columns: any, rows: any, rowGetter: any) => {}>;
68
+ openPopover: (popoverTarget: any, colKey: any) => void;
69
+ dropDownVisible: any;
70
+ handleKeyDownOnPopover: (evt: any) => void;
71
+ closePopover: (evt: any, reason: any) => void;
72
+ makeColumnFilterEditor: () => import("react/jsx-runtime").JSX.Element;
73
+ _commitFilterChange: () => boolean;
74
+ onFilterParamsChange(newVal: any, colKey: any): void;
75
+ sortClickHandler: (evt: any, name: any, columnIndex: any) => void;
76
+ filterClickHandler: (evt: any, target: any, columnIndex: any) => void;
77
+ sortableHeader: ({ label, columnIndex }: {
78
+ label: any;
79
+ columnIndex: any;
80
+ }) => import("react/jsx-runtime").JSX.Element;
81
+ simpleHeaderRenderer: ({ label }: {
82
+ label: any;
83
+ }) => import("react/jsx-runtime").JSX.Element;
84
+ getRowClassName: ({ index, rowGetter }: {
85
+ index: any;
86
+ rowGetter: any;
87
+ }) => string;
88
+ onClickableRowClick: (event: any) => void;
89
+ cellRenderer: ({ cellData, columnIndex, rowIndex }: {
90
+ cellData: any;
91
+ columnIndex: any;
92
+ rowIndex: any;
93
+ }) => import("react/jsx-runtime").JSX.Element;
94
+ getDisplayValue(column: any, cellData: any): any;
95
+ makeHeaderRenderer(dataKey: any, columnIndex: any): (headerProps: any) => import("react/jsx-runtime").JSX.Element;
96
+ makeSizedTable: (height: any, width: any, sizes: any, reorderedIndex: any, rowGetter: any) => import("react/jsx-runtime").JSX.Element;
97
+ getCSVFilename: () => any;
98
+ getCSVData: () => Promise<{}[]>;
99
+ csvHeaders: import("memoize-one").MemoizedFn<(this: any, columns: any, exportCSVDataKeys: any) => any[]>;
100
+ render(): import("react/jsx-runtime").JSX.Element;
101
+ }
102
+ declare namespace MuiVirtualizedTable {
103
+ namespace propTypes {
104
+ const name: PropTypes.Requireable<string>;
105
+ const classes: PropTypes.Requireable<object>;
106
+ const rows: PropTypes.Requireable<any[]>;
107
+ const columns: PropTypes.Validator<(PropTypes.InferProps<{
108
+ dataKey: PropTypes.Validator<string>;
109
+ label: PropTypes.Validator<string>;
110
+ numeric: PropTypes.Requireable<boolean>;
111
+ width: PropTypes.Requireable<number>;
112
+ minWidth: PropTypes.Requireable<number>;
113
+ maxWidth: PropTypes.Requireable<number>;
114
+ unit: PropTypes.Requireable<string>;
115
+ fractionDigits: PropTypes.Requireable<number>;
116
+ extra: PropTypes.Requireable<PropTypes.ReactElementLike>;
117
+ }> | null | undefined)[]>;
118
+ const enableExportCSV: PropTypes.Requireable<boolean>;
119
+ const exportCSVDataKeys: PropTypes.Requireable<any[]>;
120
+ const sort: PropTypes.Requireable<(...args: any[]) => any>;
121
+ const sortable: PropTypes.Requireable<boolean>;
122
+ const indexer: PropTypes.Requireable<object>;
123
+ const headerHeight: PropTypes.Requireable<number>;
124
+ const onRowClick: PropTypes.Requireable<(...args: any[]) => any>;
125
+ const onCellClick: PropTypes.Requireable<(...args: any[]) => any>;
126
+ const rowHeight: PropTypes.Requireable<number>;
127
+ const filter: PropTypes.Requireable<(...args: any[]) => any>;
128
+ const tooltipSx: PropTypes.Requireable<object>;
129
+ }
130
+ }
131
+ import React from 'react';
@@ -0,0 +1,2 @@
1
+ export { default, generateMuiVirtualizedTableClass } from "./MuiVirtualizedTable";
2
+ export { KeyedColumnsRowIndexer, CHANGE_WAYS } from "./KeyedColumnsRowIndexer";
@@ -0,0 +1,10 @@
1
+ export default MultipleSelectionDialog;
2
+ declare function MultipleSelectionDialog({ options, selectedOptions, open, getOptionLabel, handleClose, handleValidate, titleId, }: {
3
+ options: any;
4
+ selectedOptions: any;
5
+ open: any;
6
+ getOptionLabel: any;
7
+ handleClose: any;
8
+ handleValidate: any;
9
+ titleId: any;
10
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { default } from "./MultipleSelectionDialog";
@@ -0,0 +1 @@
1
+ export { default } from "./overflowable-text";
@@ -0,0 +1,2 @@
1
+ export const OverflowableText: import("@emotion/styled").StyledComponent<any, {}, {}>;
2
+ export default OverflowableText;
@@ -0,0 +1 @@
1
+ export function FilterButton({ selectedItems, setSelectedItems }: Object): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { default } from "./report-viewer";