@gridsuite/commons-ui 0.46.0 → 0.47.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 (183) hide show
  1. package/README.md +0 -17
  2. package/dist/components/AuthenticationRouter/AuthenticationRouter.js +147 -0
  3. package/dist/components/CardErrorBoundary/card-error-boundary.js +110 -0
  4. package/dist/components/ElementSearchDialog/element-search-dialog.js +139 -0
  5. package/dist/components/ElementSearchDialog/equipment-item.js +77 -0
  6. package/dist/components/ElementSearchDialog/tag-renderer.js +34 -0
  7. package/dist/components/FlatParameters/FlatParameters.js +411 -0
  8. package/dist/components/Login/Login.js +78 -0
  9. package/dist/components/Login/Logout.js +69 -0
  10. package/dist/components/MuiVirtualizedTable/ColumnHeader.js +127 -0
  11. package/dist/components/MuiVirtualizedTable/KeyedColumnsRowIndexer.js +548 -0
  12. package/dist/components/MuiVirtualizedTable/MuiVirtualizedTable.js +790 -0
  13. package/dist/components/MultipleSelectionDialog/MultipleSelectionDialog.js +87 -0
  14. package/dist/components/OverflowableText/overflowable-text.js +87 -0
  15. package/dist/components/ReportViewer/filter-button.js +64 -0
  16. package/dist/components/ReportViewer/log-report-item.js +95 -0
  17. package/dist/components/ReportViewer/log-report.js +49 -0
  18. package/dist/components/ReportViewer/log-table.js +131 -0
  19. package/dist/components/ReportViewer/multi-select-list.js +40 -0
  20. package/dist/components/ReportViewer/report-item.js +112 -0
  21. package/dist/components/ReportViewer/report-tree-view-context.js +8 -0
  22. package/dist/components/ReportViewer/report-viewer.js +158 -0
  23. package/dist/components/ReportViewerDialog/report-viewer-dialog.js +61 -0
  24. package/dist/components/SignInCallbackHandler/SignInCallbackHandler.js +13 -0
  25. package/dist/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.js +16 -0
  26. package/dist/components/SnackbarProvider/SnackbarProvider.js +28 -0
  27. package/dist/components/TopBar/AboutDialog.js +467 -0
  28. package/dist/components/TopBar/GridLogo.js +71 -0
  29. package/dist/components/TopBar/TopBar.js +679 -0
  30. package/dist/components/TreeViewFinder/TreeViewFinder.js +288 -0
  31. package/dist/components/react-hook-form/autocomplete-input.js +96 -0
  32. package/dist/components/react-hook-form/booleans/boolean-input.js +49 -0
  33. package/dist/components/react-hook-form/booleans/checkbox-input.js +24 -0
  34. package/dist/components/react-hook-form/booleans/switch-input.js +24 -0
  35. package/dist/components/react-hook-form/error-management/error-input.js +42 -0
  36. package/dist/components/react-hook-form/error-management/field-error-alert.js +9 -0
  37. package/dist/components/react-hook-form/error-management/mid-form-error.js +20 -0
  38. package/dist/components/react-hook-form/numbers/float-input.js +51 -0
  39. package/dist/components/react-hook-form/numbers/integer-input.js +36 -0
  40. package/dist/components/react-hook-form/numbers/utils.js +10 -0
  41. package/dist/components/react-hook-form/radio-input.js +44 -0
  42. package/dist/components/react-hook-form/select-input.js +31 -0
  43. package/dist/components/react-hook-form/slider-input.js +43 -0
  44. package/dist/components/react-hook-form/text-input.js +94 -0
  45. package/dist/components/react-hook-form/utils/cancel-button.js +16 -0
  46. package/dist/components/react-hook-form/utils/field-label.js +12 -0
  47. package/dist/components/react-hook-form/utils/functions.js +36 -0
  48. package/dist/components/react-hook-form/utils/submit-button.js +23 -0
  49. package/dist/components/react-hook-form/utils/text-field-with-adornment.js +96 -0
  50. package/dist/components/translations/card-error-boundary-en.js +8 -0
  51. package/dist/components/translations/card-error-boundary-fr.js +8 -0
  52. package/dist/components/translations/common-button-en.js +7 -0
  53. package/dist/components/translations/common-button-fr.js +7 -0
  54. package/dist/components/translations/element-search-en.js +7 -0
  55. package/dist/components/translations/element-search-fr.js +7 -0
  56. package/dist/components/translations/equipment-search-en.js +21 -0
  57. package/dist/components/translations/equipment-search-fr.js +21 -0
  58. package/dist/components/translations/flat-parameters-en.js +8 -0
  59. package/dist/components/translations/flat-parameters-fr.js +8 -0
  60. package/dist/components/translations/login-en.js +14 -0
  61. package/dist/components/translations/login-fr.js +14 -0
  62. package/dist/components/translations/multiple-selection-dialog-en.js +8 -0
  63. package/dist/components/translations/multiple-selection-dialog-fr.js +8 -0
  64. package/dist/components/translations/report-viewer-en.js +8 -0
  65. package/dist/components/translations/report-viewer-fr.js +8 -0
  66. package/dist/components/translations/table-en.js +6 -0
  67. package/dist/components/translations/table-fr.js +6 -0
  68. package/dist/components/translations/top-bar-en.js +27 -0
  69. package/dist/components/translations/top-bar-fr.js +27 -0
  70. package/dist/components/translations/treeview-finder-en.js +12 -0
  71. package/dist/components/translations/treeview-finder-fr.js +12 -0
  72. package/dist/hooks/useDebounce.js +17 -0
  73. package/{es/components/ElementSearchDialog/index.js → dist/hooks/useIntlRef.d.ts} +2 -2
  74. package/dist/hooks/useIntlRef.js +13 -0
  75. package/dist/hooks/useSnackMessage.js +81 -0
  76. package/dist/index.d.ts +225 -0
  77. package/dist/index.js +154 -0
  78. package/dist/utils/AuthService.js +336 -0
  79. package/dist/utils/ElementType.js +38 -0
  80. package/dist/utils/EquipmentType.js +132 -0
  81. package/dist/utils/UserManagerMock.js +85 -0
  82. package/dist/utils/actions.js +71 -0
  83. package/dist/utils/algos.js +24 -0
  84. package/dist/utils/styles.js +13 -0
  85. package/package.json +36 -21
  86. package/es/components/AuthenticationRouter/AuthenticationRouter.js +0 -102
  87. package/es/components/AuthenticationRouter/index.js +0 -7
  88. package/es/components/CardErrorBoundary/card-error-boundary.js +0 -138
  89. package/es/components/CardErrorBoundary/index.js +0 -7
  90. package/es/components/ElementSearchDialog/element-search-dialog.js +0 -153
  91. package/es/components/ElementSearchDialog/equipment-item.js +0 -63
  92. package/es/components/ElementSearchDialog/tag-renderer.js +0 -29
  93. package/es/components/FlatParameters/FlatParameters.js +0 -448
  94. package/es/components/FlatParameters/index.js +0 -8
  95. package/es/components/Login/Login.js +0 -79
  96. package/es/components/Login/Logout.js +0 -78
  97. package/es/components/Login/index.js +0 -7
  98. package/es/components/MuiVirtualizedTable/ColumnHeader.js +0 -125
  99. package/es/components/MuiVirtualizedTable/KeyedColumnsRowIndexer.js +0 -619
  100. package/es/components/MuiVirtualizedTable/MuiVirtualizedTable.js +0 -780
  101. package/es/components/MuiVirtualizedTable/index.js +0 -9
  102. package/es/components/MultipleSelectionDialog/MultipleSelectionDialog.js +0 -95
  103. package/es/components/MultipleSelectionDialog/index.js +0 -8
  104. package/es/components/OverflowableText/index.js +0 -7
  105. package/es/components/OverflowableText/overflowable-text.js +0 -81
  106. package/es/components/ReportViewer/filter-button.js +0 -77
  107. package/es/components/ReportViewer/index.js +0 -7
  108. package/es/components/ReportViewer/log-report-item.js +0 -97
  109. package/es/components/ReportViewer/log-report.js +0 -63
  110. package/es/components/ReportViewer/log-table.js +0 -130
  111. package/es/components/ReportViewer/multi-select-list.js +0 -56
  112. package/es/components/ReportViewer/report-item.js +0 -131
  113. package/es/components/ReportViewer/report-tree-view-context.js +0 -13
  114. package/es/components/ReportViewer/report-viewer.js +0 -167
  115. package/es/components/ReportViewerDialog/index.js +0 -7
  116. package/es/components/ReportViewerDialog/report-viewer-dialog.js +0 -67
  117. package/es/components/SignInCallbackHandler/SignInCallbackHandler.js +0 -19
  118. package/es/components/SignInCallbackHandler/index.js +0 -7
  119. package/es/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.js +0 -19
  120. package/es/components/SilentRenewCallbackHandler/index.js +0 -7
  121. package/es/components/SnackbarProvider/SnackbarProvider.js +0 -39
  122. package/es/components/SnackbarProvider/index.js +0 -7
  123. package/es/components/TopBar/AboutDialog.js +0 -456
  124. package/es/components/TopBar/GridLogo.js +0 -73
  125. package/es/components/TopBar/TopBar.js +0 -487
  126. package/es/components/TopBar/index.js +0 -9
  127. package/es/components/TreeViewFinder/TreeViewFinder.js +0 -341
  128. package/es/components/TreeViewFinder/index.js +0 -7
  129. package/es/components/images/powsybl_logo.svg +0 -35
  130. package/es/components/react-hook-form/autocomplete-input.js +0 -110
  131. package/es/components/react-hook-form/booleans/boolean-input.js +0 -56
  132. package/es/components/react-hook-form/booleans/checkbox-input.js +0 -28
  133. package/es/components/react-hook-form/booleans/switch-input.js +0 -28
  134. package/es/components/react-hook-form/error-management/error-input.js +0 -50
  135. package/es/components/react-hook-form/error-management/field-error-alert.js +0 -22
  136. package/es/components/react-hook-form/error-management/mid-form-error.js +0 -25
  137. package/es/components/react-hook-form/numbers/float-input.js +0 -105
  138. package/es/components/react-hook-form/numbers/integer-input.js +0 -35
  139. package/es/components/react-hook-form/numbers/utils.js +0 -6
  140. package/es/components/react-hook-form/radio-input.js +0 -55
  141. package/es/components/react-hook-form/select-input.js +0 -40
  142. package/es/components/react-hook-form/slider-input.js +0 -48
  143. package/es/components/react-hook-form/text-input.js +0 -100
  144. package/es/components/react-hook-form/utils/cancel-button.js +0 -28
  145. package/es/components/react-hook-form/utils/field-label.js +0 -15
  146. package/es/components/react-hook-form/utils/functions.js +0 -42
  147. package/es/components/react-hook-form/utils/submit-button.js +0 -29
  148. package/es/components/react-hook-form/utils/text-field-with-adornment.js +0 -92
  149. package/es/components/translations/card-error-boundary-en.js +0 -13
  150. package/es/components/translations/card-error-boundary-fr.js +0 -13
  151. package/es/components/translations/common-button-en.js +0 -12
  152. package/es/components/translations/common-button-fr.js +0 -12
  153. package/es/components/translations/element-search-en.js +0 -12
  154. package/es/components/translations/element-search-fr.js +0 -12
  155. package/es/components/translations/equipment-search-en.js +0 -26
  156. package/es/components/translations/equipment-search-fr.js +0 -26
  157. package/es/components/translations/flat-parameters-en.js +0 -13
  158. package/es/components/translations/flat-parameters-fr.js +0 -13
  159. package/es/components/translations/inputs-en.js +0 -25
  160. package/es/components/translations/inputs-fr.js +0 -25
  161. package/es/components/translations/login-en.js +0 -19
  162. package/es/components/translations/login-fr.js +0 -19
  163. package/es/components/translations/multiple-selection-dialog-en.js +0 -13
  164. package/es/components/translations/multiple-selection-dialog-fr.js +0 -13
  165. package/es/components/translations/report-viewer-en.js +0 -13
  166. package/es/components/translations/report-viewer-fr.js +0 -13
  167. package/es/components/translations/table-en.js +0 -11
  168. package/es/components/translations/table-fr.js +0 -11
  169. package/es/components/translations/top-bar-en.js +0 -32
  170. package/es/components/translations/top-bar-fr.js +0 -32
  171. package/es/components/translations/treeview-finder-en.js +0 -17
  172. package/es/components/translations/treeview-finder-fr.js +0 -17
  173. package/es/hooks/useDebounce.js +0 -26
  174. package/es/hooks/useIntlRef.js +0 -22
  175. package/es/hooks/useSnackMessage.js +0 -81
  176. package/es/index.js +0 -71
  177. package/es/utils/AuthService.js +0 -312
  178. package/es/utils/ElementType.js +0 -53
  179. package/es/utils/EquipmentType.js +0 -133
  180. package/es/utils/UserManagerMock.js +0 -81
  181. package/es/utils/actions.js +0 -65
  182. package/es/utils/algos.js +0 -29
  183. package/es/utils/styles.js +0 -35
@@ -0,0 +1,17 @@
1
+ import { useMemo, useEffect } from "react";
2
+ import { debounce } from "@mui/material";
3
+ const useDebounce = (func, delay = 700) => {
4
+ const debouncedChangeHandler = useMemo(
5
+ () => debounce(func, delay),
6
+ [func, delay]
7
+ );
8
+ useEffect(() => {
9
+ return () => {
10
+ debouncedChangeHandler.clear();
11
+ };
12
+ }, [debouncedChangeHandler]);
13
+ return debouncedChangeHandler;
14
+ };
15
+ export {
16
+ useDebounce
17
+ };
@@ -4,5 +4,5 @@
4
4
  * License, v. 2.0. If a copy of the MPL was not distributed with this
5
5
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
6
  */
7
- export { default } from './element-search-dialog';
8
- export { TagRenderer } from './tag-renderer';
7
+ /// <reference types="react" />
8
+ export declare function useIntlRef(): import("react").MutableRefObject<import("react-intl").IntlShape>;
@@ -0,0 +1,13 @@
1
+ import { useRef, useEffect } from "react";
2
+ import { useIntl } from "react-intl";
3
+ function useIntlRef() {
4
+ const intl = useIntl();
5
+ const intlRef = useRef(intl);
6
+ useEffect(() => {
7
+ intlRef.current = intl;
8
+ }, [intl]);
9
+ return intlRef;
10
+ }
11
+ export {
12
+ useIntlRef
13
+ };
@@ -0,0 +1,81 @@
1
+ import { useCallback } from "react";
2
+ import { useSnackbar } from "notistack";
3
+ import { useIntlRef } from "./useIntlRef.js";
4
+ function useSnackMessage() {
5
+ const intlRef = useIntlRef();
6
+ const { enqueueSnackbar } = useSnackbar();
7
+ const snackError = useCallback(
8
+ (snackInputs) => makeSnackbar(snackInputs, intlRef, enqueueSnackbar, "error", true),
9
+ [enqueueSnackbar, intlRef]
10
+ );
11
+ const snackWarning = useCallback(
12
+ (snackInputs) => makeSnackbar(
13
+ snackInputs,
14
+ intlRef,
15
+ enqueueSnackbar,
16
+ "warning",
17
+ true
18
+ ),
19
+ [enqueueSnackbar, intlRef]
20
+ );
21
+ const snackInfo = useCallback(
22
+ (snackInputs) => makeSnackbar(snackInputs, intlRef, enqueueSnackbar, "info", false),
23
+ [enqueueSnackbar, intlRef]
24
+ );
25
+ return { snackError, snackInfo, snackWarning };
26
+ }
27
+ function makeSnackbar(snackInputs, intlRef, enqueueSnackbar, level, persistent) {
28
+ const message = checkAndTranslateIfNecessary(
29
+ snackInputs.messageTxt,
30
+ snackInputs.messageId,
31
+ snackInputs.messageValues,
32
+ intlRef
33
+ );
34
+ const header = checkAndTranslateIfNecessary(
35
+ snackInputs.headerTxt,
36
+ snackInputs.headerId,
37
+ snackInputs.headerValues,
38
+ intlRef
39
+ );
40
+ displayMessageWithSnackbar(
41
+ message,
42
+ header,
43
+ enqueueSnackbar,
44
+ level,
45
+ persistent
46
+ );
47
+ }
48
+ function checkAndTranslateIfNecessary(txt, id, values, intlRef) {
49
+ checkInputs(txt, id, values);
50
+ return txt ?? (id ? intlRef.current.formatMessage(
51
+ {
52
+ id
53
+ },
54
+ values
55
+ ) : null);
56
+ }
57
+ function checkInputs(txt, id, values) {
58
+ if (txt && (id || values)) {
59
+ console.warn("Snack inputs should be [*Txt] OR [*Id, *Values]");
60
+ }
61
+ }
62
+ function displayMessageWithSnackbar(message, header, enqueueSnackbar, level, persistent) {
63
+ let fullMessage = "";
64
+ if (header) {
65
+ fullMessage += header;
66
+ }
67
+ if (message) {
68
+ if (header) {
69
+ fullMessage += "\n\n";
70
+ }
71
+ fullMessage += message;
72
+ }
73
+ enqueueSnackbar(fullMessage, {
74
+ variant: level,
75
+ persist: persistent,
76
+ style: { whiteSpace: "pre-line" }
77
+ });
78
+ }
79
+ export {
80
+ useSnackMessage
81
+ };
@@ -0,0 +1,225 @@
1
+ import type { FunctionComponent, ReactElement } from 'react';
2
+ import type { AutocompleteProps } from '@mui/material/Autocomplete/Autocomplete';
3
+ import type {
4
+ ButtonProps,
5
+ SwitchProps,
6
+ CheckboxProps,
7
+ RadioGroupProps,
8
+ SxProps,
9
+ TextFieldProps,
10
+ } from '@mui/material';
11
+
12
+ /**
13
+ * Section to export generated type declarations of .ts or .tsx files
14
+ */
15
+
16
+ export { useIntlRef } from './hooks/useIntlRef';
17
+
18
+ /**
19
+ * Section to export manual type declarations of .js and .jsx files
20
+ */
21
+
22
+ export const TopBar: FunctionComponent;
23
+
24
+ export function logout(
25
+ dispatch: any,
26
+ userManagerInstance: any
27
+ ): Promise<any | undefined>;
28
+
29
+ export const DARK_THEME: string, LIGHT_THEME: string;
30
+
31
+ interface SnackInputs {
32
+ messageTxt?: string;
33
+ messageId?: string;
34
+ messageValues?: Record<string, string>;
35
+ headerTxt?: string;
36
+ headerId?: string;
37
+ headerValues?: Record<string, string>;
38
+ }
39
+
40
+ interface UseSnackMessageReturn {
41
+ snackError: (snackInputs: SnackInputs) => void;
42
+ snackWarning: (snackInputs: SnackInputs) => void;
43
+ snackInfo: (snackInputs: SnackInputs) => void;
44
+ }
45
+
46
+ export function useSnackMessage(): UseSnackMessageReturn;
47
+
48
+ type Input = string | number;
49
+ type Option = string | { id: string; label: string };
50
+
51
+ interface AutocompleteInputProps
52
+ extends Omit<
53
+ AutocompleteProps<
54
+ Option,
55
+ boolean | undefined,
56
+ boolean | undefined,
57
+ boolean | undefined
58
+ >,
59
+ // we already defined them in our custom Autocomplete
60
+ 'value' | 'onChange' | 'renderInput'
61
+ > {
62
+ name: string;
63
+ options: Option[];
64
+ label?: string;
65
+ outputTransform?: (value: Option) => Option;
66
+ inputTransform?: (value: Option) => Option;
67
+ readOnly?: boolean;
68
+ previousValue?: string;
69
+ allowNewValue?: boolean;
70
+ onChangeCallback?: () => void;
71
+ formProps?: Omit<
72
+ TextFieldProps,
73
+ 'value' | 'onChange' | 'inputRef' | 'inputProps' | 'InputProps'
74
+ >;
75
+ }
76
+
77
+ export const AutocompleteInput: FunctionComponent<AutocompleteInputProps>;
78
+
79
+ interface ErrorInputProps {
80
+ name: string;
81
+ InputField?: FunctionComponent;
82
+ }
83
+
84
+ export const ErrorInput: FunctionComponent<ErrorInputProps>;
85
+
86
+ export const SelectInput: FunctionComponent<
87
+ Omit<
88
+ AutocompleteInputProps,
89
+ 'outputTransform' | 'inputTransform' | 'readOnly' | 'getOptionLabel' // already defined in SelectInput
90
+ >
91
+ >;
92
+
93
+ export const MidFormError: FunctionComponent;
94
+
95
+ export const FieldErrorAlert: FunctionComponent;
96
+
97
+ type TextFieldWithAdornmentProps = TextFieldProps & {
98
+ // variant already included in TextFieldProps
99
+ value: Input; // we override the default type of TextFieldProps which is unknown
100
+ adornmentPosition: string;
101
+ adornmentText: string;
102
+ handleClearValue?: () => void;
103
+ };
104
+
105
+ interface TextInputProps {
106
+ name: string;
107
+ label?: string;
108
+ labelValues?: any; // it's for values from https://formatjs.io/docs/react-intl/components/#formattedmessage
109
+ id?: string;
110
+ adornment?: {
111
+ position: string;
112
+ text: string;
113
+ };
114
+ customAdornment?: ReactElement | null;
115
+ outputTransform?: (value: string) => Input;
116
+ inputTransform?: (value: Input) => string;
117
+ acceptValue?: (value: string) => boolean;
118
+ previousValue?: Input;
119
+ clearable?: boolean;
120
+ formProps?: Omit<
121
+ TextFieldWithAdornmentProps | TextFieldProps,
122
+ 'value' | 'onChange' | 'inputRef' | 'inputProps' | 'InputProps'
123
+ >;
124
+ }
125
+
126
+ export const TextInput: FunctionComponent<TextInputProps>;
127
+
128
+ export const FloatInput: FunctionComponent<
129
+ Omit<
130
+ TextInputProps,
131
+ 'outputTransform' | 'inputTransform' | 'acceptValue' // already defined in FloatInput
132
+ >
133
+ >;
134
+
135
+ export const IntegerInput: FunctionComponent<
136
+ Omit<
137
+ TextInputProps,
138
+ 'outputTransform' | 'inputTransform' | 'acceptValue' // already defined in IntegerInput
139
+ >
140
+ >;
141
+
142
+ interface RadioInputProps {
143
+ name: string;
144
+ label?: string;
145
+ id?: string;
146
+ options: Array<{
147
+ id: string;
148
+ label: string;
149
+ }>;
150
+ formProps?: Omit<RadioGroupProps, 'value' | 'onChange'>;
151
+ }
152
+
153
+ export const RadioInput: FunctionComponent<RadioInputProps>;
154
+
155
+ interface SwitchInputProps {
156
+ name: string;
157
+ label?: string;
158
+ formProps?: Omit<SwitchProps, 'disabled'>;
159
+ }
160
+
161
+ export const SwitchInput: FunctionComponent<SwitchInputProps>;
162
+
163
+ interface CheckboxInputProps {
164
+ name: string;
165
+ label?: string;
166
+ formProps?: Omit<CheckboxProps, 'disabled'>;
167
+ }
168
+
169
+ export const CheckboxInput: FunctionComponent<CheckboxInputProps>;
170
+
171
+ export const SubmitButton: FunctionComponent<ButtonProps>;
172
+
173
+ type CancelButtonProps = ButtonProps & {
174
+ color?: string;
175
+ };
176
+
177
+ export const CancelButton: FunctionComponent<CancelButtonProps>;
178
+
179
+ export const FieldLabel: FunctionComponent<{
180
+ label: string;
181
+ optional?: boolean;
182
+ values?: any; // it's for values from https://formatjs.io/docs/react-intl/components/#formattedmessage
183
+ }>;
184
+
185
+ interface Parameters {
186
+ name: string;
187
+ description: string;
188
+ type: string;
189
+ defaultValue: any;
190
+ possibleValues?: string[] | null;
191
+ }
192
+
193
+ interface FlatParametersProps extends Pick<TextFieldProps, 'variant'> {
194
+ paramsAsArray: Parameters[];
195
+ initValues: Record<string, any>;
196
+ onChange: (paramName: string, value: any, isEdit: boolean) => void;
197
+ showSeparator?: boolean;
198
+ selectionWithDialog?: (parameters: Parameters) => boolean;
199
+ }
200
+
201
+ export const FlatParameters: FunctionComponent<FlatParametersProps>;
202
+
203
+ export function useDebounce(
204
+ debouncedFunction: (...args: any[]) => void,
205
+ debounceDelay: number
206
+ ): (...args: any[]) => void;
207
+
208
+ interface OverflowableTextProps {
209
+ sx?: SxProps;
210
+ text?: string | ReactElement;
211
+ }
212
+
213
+ export const OverflowableText: FunctionComponent<OverflowableTextProps>;
214
+
215
+ export enum elementType {
216
+ DIRECTORY = 'DIRECTORY',
217
+ STUDY = 'STUDY',
218
+ FILTER = 'FILTER',
219
+ MODIFICATION = 'MODIFICATION',
220
+ CONTINGENCY_LIST = 'CONTINGENCY_LIST',
221
+ VOLTAGE_INIT_PARAMETERS = 'VOLTAGE_INIT_PARAMETERS',
222
+ SECURITY_ANALYSIS_PARAMETERS = 'SECURITY_ANALYSIS_PARAMETERS',
223
+ LOADFLOW_PARAMETERS = 'LOADFLOW_PARAMETERS',
224
+ SENSITIVITY_PARAMETERS = 'SENSITIVITY_PARAMETERS',
225
+ }
package/dist/index.js ADDED
@@ -0,0 +1,154 @@
1
+ import { default as default2 } from "./components/TreeViewFinder/TreeViewFinder.js";
2
+ import { DARK_THEME, LANG_ENGLISH, LANG_FRENCH, LANG_SYSTEM, LIGHT_THEME, default as default3 } from "./components/TopBar/TopBar.js";
3
+ import "./components/TopBar/GridLogo.js";
4
+ import { default as default4 } from "./components/TopBar/AboutDialog.js";
5
+ import { default as default5 } from "./components/SnackbarProvider/SnackbarProvider.js";
6
+ import { default as default6 } from "./components/AuthenticationRouter/AuthenticationRouter.js";
7
+ import { DEFAULT_CELL_PADDING, DEFAULT_HEADER_HEIGHT, DEFAULT_ROW_HEIGHT, default as default7 } from "./components/MuiVirtualizedTable/MuiVirtualizedTable.js";
8
+ import { CHANGE_WAYS, KeyedColumnsRowIndexer } from "./components/MuiVirtualizedTable/KeyedColumnsRowIndexer.js";
9
+ import { default as default8 } from "./components/ReportViewer/report-viewer.js";
10
+ import { default as default9 } from "./components/ReportViewerDialog/report-viewer-dialog.js";
11
+ import { OverflowableText } from "./components/OverflowableText/overflowable-text.js";
12
+ import { default as default10 } from "./components/ElementSearchDialog/element-search-dialog.js";
13
+ import { TagRenderer } from "./components/ElementSearchDialog/tag-renderer.js";
14
+ import { FlatParameters } from "./components/FlatParameters/FlatParameters.js";
15
+ import { default as default11 } from "./components/MultipleSelectionDialog/MultipleSelectionDialog.js";
16
+ import { EQUIPMENT_TYPE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./utils/EquipmentType.js";
17
+ import { dispatchUser, getPreLoginPath, initializeAuthenticationDev, initializeAuthenticationProd, logout } from "./utils/AuthService.js";
18
+ import { elementType, getFileIcon } from "./utils/ElementType.js";
19
+ import { LOGOUT_ERROR, RESET_AUTHENTICATION_ROUTER_ERROR, SHOW_AUTH_INFO_LOGIN, SIGNIN_CALLBACK_ERROR, UNAUTHORIZED_USER_INFO, USER, USER_VALIDATION_ERROR, setLoggedUser, setSignInCallbackError } from "./utils/actions.js";
20
+ import { default as default12 } from "./components/translations/report-viewer-en.js";
21
+ import { default as default13 } from "./components/translations/report-viewer-fr.js";
22
+ import { default as default14 } from "./components/translations/login-en.js";
23
+ import { default as default15 } from "./components/translations/login-fr.js";
24
+ import { default as default16 } from "./components/translations/top-bar-en.js";
25
+ import { default as default17 } from "./components/translations/top-bar-fr.js";
26
+ import { default as default18 } from "./components/translations/table-en.js";
27
+ import { default as default19 } from "./components/translations/table-fr.js";
28
+ import { default as default20 } from "./components/translations/treeview-finder-en.js";
29
+ import { default as default21 } from "./components/translations/treeview-finder-fr.js";
30
+ import { default as default22 } from "./components/translations/element-search-en.js";
31
+ import { default as default23 } from "./components/translations/element-search-fr.js";
32
+ import { default as default24 } from "./components/translations/equipment-search-en.js";
33
+ import { default as default25 } from "./components/translations/equipment-search-fr.js";
34
+ import { default as default26 } from "./components/translations/card-error-boundary-en.js";
35
+ import { default as default27 } from "./components/translations/card-error-boundary-fr.js";
36
+ import { default as default28 } from "./components/translations/flat-parameters-en.js";
37
+ import { default as default29 } from "./components/translations/flat-parameters-fr.js";
38
+ import { default as default30 } from "./components/translations/multiple-selection-dialog-en.js";
39
+ import { default as default31 } from "./components/translations/multiple-selection-dialog-fr.js";
40
+ import { default as default32 } from "./components/translations/common-button-en.js";
41
+ import { default as default33 } from "./components/translations/common-button-fr.js";
42
+ import { EquipmentItem } from "./components/ElementSearchDialog/equipment-item.js";
43
+ import { default as default34 } from "./components/CardErrorBoundary/card-error-boundary.js";
44
+ import { useIntlRef } from "./hooks/useIntlRef.js";
45
+ import { useSnackMessage } from "./hooks/useSnackMessage.js";
46
+ import { useDebounce } from "./hooks/useDebounce.js";
47
+ import { default as default35 } from "./components/react-hook-form/autocomplete-input.js";
48
+ import { default as default36 } from "./components/react-hook-form/text-input.js";
49
+ import { default as default37 } from "./components/react-hook-form/radio-input.js";
50
+ import { default as default38 } from "./components/react-hook-form/slider-input.js";
51
+ import { default as default39 } from "./components/react-hook-form/numbers/float-input.js";
52
+ import { default as default40 } from "./components/react-hook-form/numbers/integer-input.js";
53
+ import { default as default41 } from "./components/react-hook-form/select-input.js";
54
+ import { default as default42 } from "./components/react-hook-form/booleans/checkbox-input.js";
55
+ import { default as default43 } from "./components/react-hook-form/booleans/switch-input.js";
56
+ import { default as default44 } from "./components/react-hook-form/error-management/error-input.js";
57
+ import { default as default45 } from "./components/react-hook-form/error-management/field-error-alert.js";
58
+ import { default as default46 } from "./components/react-hook-form/error-management/mid-form-error.js";
59
+ import { default as default47 } from "./components/react-hook-form/utils/text-field-with-adornment.js";
60
+ import { default as default48 } from "./components/react-hook-form/utils/field-label.js";
61
+ import { default as default49 } from "./components/react-hook-form/utils/submit-button.js";
62
+ import { default as default50 } from "./components/react-hook-form/utils/cancel-button.js";
63
+ import { genHelperError, genHelperPreviousValue, identity, isFieldRequired } from "./components/react-hook-form/utils/functions.js";
64
+ export {
65
+ default4 as AboutDialog,
66
+ default6 as AuthenticationRouter,
67
+ default35 as AutocompleteInput,
68
+ CHANGE_WAYS,
69
+ default50 as CancelButton,
70
+ default34 as CardErrorBoundary,
71
+ default42 as CheckboxInput,
72
+ DARK_THEME,
73
+ DEFAULT_CELL_PADDING,
74
+ DEFAULT_HEADER_HEIGHT,
75
+ DEFAULT_ROW_HEIGHT,
76
+ EQUIPMENT_TYPE,
77
+ default10 as ElementSearchDialog,
78
+ EquipmentItem,
79
+ default44 as ErrorInput,
80
+ default45 as FieldErrorAlert,
81
+ default48 as FieldLabel,
82
+ FlatParameters,
83
+ default39 as FloatInput,
84
+ default40 as IntegerInput,
85
+ KeyedColumnsRowIndexer,
86
+ LANG_ENGLISH,
87
+ LANG_FRENCH,
88
+ LANG_SYSTEM,
89
+ LIGHT_THEME,
90
+ LOGOUT_ERROR,
91
+ default46 as MidFormError,
92
+ default7 as MuiVirtualizedTable,
93
+ default11 as MultipleSelectionDialog,
94
+ OverflowableText,
95
+ RESET_AUTHENTICATION_ROUTER_ERROR,
96
+ default37 as RadioInput,
97
+ default8 as ReportViewer,
98
+ default9 as ReportViewerDialog,
99
+ SHOW_AUTH_INFO_LOGIN,
100
+ SIGNIN_CALLBACK_ERROR,
101
+ default41 as SelectInput,
102
+ default38 as SliderInput,
103
+ default5 as SnackbarProvider,
104
+ default49 as SubmitButton,
105
+ default43 as SwitchInput,
106
+ TagRenderer,
107
+ default47 as TextFieldWithAdornment,
108
+ default36 as TextInput,
109
+ default3 as TopBar,
110
+ default2 as TreeViewFinder,
111
+ UNAUTHORIZED_USER_INFO,
112
+ USER,
113
+ USER_VALIDATION_ERROR,
114
+ default26 as card_error_boundary_en,
115
+ default27 as card_error_boundary_fr,
116
+ default32 as common_button_en,
117
+ default33 as common_button_fr,
118
+ dispatchUser,
119
+ elementType,
120
+ default22 as element_search_en,
121
+ default23 as element_search_fr,
122
+ equipmentStyles,
123
+ default24 as equipment_search_en,
124
+ default25 as equipment_search_fr,
125
+ default28 as flat_parameters_en,
126
+ default29 as flat_parameters_fr,
127
+ genHelperError,
128
+ genHelperPreviousValue,
129
+ getEquipmentsInfosForSearchBar,
130
+ getFileIcon,
131
+ getPreLoginPath,
132
+ identity,
133
+ initializeAuthenticationDev,
134
+ initializeAuthenticationProd,
135
+ isFieldRequired,
136
+ default14 as login_en,
137
+ default15 as login_fr,
138
+ logout,
139
+ default30 as multiple_selection_dialog_en,
140
+ default31 as multiple_selection_dialog_fr,
141
+ default12 as report_viewer_en,
142
+ default13 as report_viewer_fr,
143
+ setLoggedUser,
144
+ setSignInCallbackError,
145
+ default18 as table_en,
146
+ default19 as table_fr,
147
+ default16 as top_bar_en,
148
+ default17 as top_bar_fr,
149
+ default20 as treeview_finder_en,
150
+ default21 as treeview_finder_fr,
151
+ useDebounce,
152
+ useIntlRef,
153
+ useSnackMessage
154
+ };