@gridsuite/commons-ui 0.47.0 → 0.49.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 (111) 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 +31 -0
  6. package/dist/components/DirectoryItemSelector/directory-item-selector.js +270 -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 +59 -0
  46. package/dist/components/TreeViewFinder/TreeViewFinder.js +2 -1
  47. package/dist/components/TreeViewFinder/index.d.ts +1 -0
  48. package/dist/components/react-hook-form/autocomplete-input.d.ts +30 -0
  49. package/dist/components/react-hook-form/booleans/boolean-input.d.ts +16 -0
  50. package/dist/components/react-hook-form/booleans/checkbox-input.d.ts +14 -0
  51. package/dist/components/react-hook-form/booleans/switch-input.d.ts +14 -0
  52. package/dist/components/react-hook-form/directory-items-input.d.ts +28 -0
  53. package/dist/components/react-hook-form/directory-items-input.js +185 -0
  54. package/dist/components/react-hook-form/error-management/error-input.d.ts +5 -0
  55. package/dist/components/react-hook-form/error-management/field-error-alert.d.ts +4 -0
  56. package/dist/components/react-hook-form/error-management/mid-form-error.d.ts +4 -0
  57. package/dist/components/react-hook-form/numbers/float-input.d.ts +18 -0
  58. package/dist/components/react-hook-form/numbers/integer-input.d.ts +18 -0
  59. package/dist/components/react-hook-form/numbers/utils.d.ts +2 -0
  60. package/dist/components/react-hook-form/radio-input.d.ts +18 -0
  61. package/dist/components/react-hook-form/raw-read-only-input.d.ts +9 -0
  62. package/dist/components/react-hook-form/raw-read-only-input.js +10 -0
  63. package/dist/components/react-hook-form/select-input.d.ts +17 -0
  64. package/dist/components/react-hook-form/slider-input.d.ts +21 -0
  65. package/dist/components/react-hook-form/text-input.d.ts +33 -0
  66. package/dist/components/react-hook-form/utils/cancel-button.d.ts +10 -0
  67. package/dist/components/react-hook-form/utils/field-label.d.ts +6 -0
  68. package/dist/components/react-hook-form/utils/functions.d.ts +11 -0
  69. package/dist/components/react-hook-form/utils/functions.js +5 -0
  70. package/dist/components/react-hook-form/utils/submit-button.d.ts +10 -0
  71. package/dist/components/react-hook-form/utils/text-field-with-adornment.d.ts +12 -0
  72. package/dist/components/translations/card-error-boundary-en.d.ts +12 -0
  73. package/dist/components/translations/card-error-boundary-fr.d.ts +12 -0
  74. package/dist/components/translations/common-button-en.d.ts +5 -0
  75. package/dist/components/translations/common-button-fr.d.ts +5 -0
  76. package/dist/components/translations/directory-items-input-en.d.ts +10 -0
  77. package/dist/components/translations/directory-items-input-en.js +6 -0
  78. package/dist/components/translations/directory-items-input-fr.d.ts +10 -0
  79. package/dist/components/translations/directory-items-input-fr.js +6 -0
  80. package/dist/components/translations/element-search-en.d.ts +11 -0
  81. package/dist/components/translations/element-search-fr.d.ts +11 -0
  82. package/dist/components/translations/equipment-search-en.d.ts +25 -0
  83. package/dist/components/translations/equipment-search-fr.d.ts +25 -0
  84. package/dist/components/translations/flat-parameters-en.d.ts +12 -0
  85. package/dist/components/translations/flat-parameters-fr.d.ts +12 -0
  86. package/dist/components/translations/login-en.d.ts +18 -0
  87. package/dist/components/translations/login-en.js +1 -1
  88. package/dist/components/translations/login-fr.d.ts +18 -0
  89. package/dist/components/translations/multiple-selection-dialog-en.d.ts +12 -0
  90. package/dist/components/translations/multiple-selection-dialog-fr.d.ts +12 -0
  91. package/dist/components/translations/report-viewer-en.d.ts +12 -0
  92. package/dist/components/translations/report-viewer-fr.d.ts +12 -0
  93. package/dist/components/translations/table-en.d.ts +10 -0
  94. package/dist/components/translations/table-fr.d.ts +10 -0
  95. package/dist/components/translations/top-bar-en.d.ts +31 -0
  96. package/dist/components/translations/top-bar-fr.d.ts +31 -0
  97. package/dist/components/translations/treeview-finder-en.d.ts +16 -0
  98. package/dist/components/translations/treeview-finder-fr.d.ts +16 -0
  99. package/dist/hooks/useDebounce.d.ts +1 -0
  100. package/dist/hooks/useSnackMessage.d.ts +5 -0
  101. package/dist/index.d.ts +10 -1
  102. package/dist/index.js +44 -34
  103. package/dist/utils/AuthService.d.ts +9 -0
  104. package/dist/utils/ElementType.d.ts +13 -0
  105. package/dist/utils/ElementType.js +6 -2
  106. package/dist/utils/EquipmentType.d.ts +136 -0
  107. package/dist/utils/UserManagerMock.d.ts +34 -0
  108. package/dist/utils/actions.d.ts +50 -0
  109. package/dist/utils/algos.d.ts +7 -0
  110. package/dist/utils/styles.d.ts +5 -0
  111. package/package.json +4 -3
@@ -0,0 +1,185 @@
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import { FormControl, Chip, Grid, Tooltip, IconButton } from "@mui/material";
3
+ import { OverflowableText } from "../OverflowableText/overflowable-text.js";
4
+ import { useSnackMessage } from "../../hooks/useSnackMessage.js";
5
+ import FieldLabel from "./utils/field-label.js";
6
+ import FolderIcon from "@mui/icons-material/Folder";
7
+ import { useMemo, useState, useCallback } from "react";
8
+ import { useFieldArray, useFormContext, useController } from "react-hook-form";
9
+ import { useIntl } from "react-intl";
10
+ import ErrorInput from "./error-management/error-input.js";
11
+ import MidFormError from "./error-management/mid-form-error.js";
12
+ import { RawReadOnlyInput } from "./raw-read-only-input.js";
13
+ import { mergeSx } from "../../utils/styles.js";
14
+ import DirectoryItemSelector from "../DirectoryItemSelector/directory-item-selector.js";
15
+ import { isFieldFromContextRequired } from "./utils/functions.js";
16
+ const NAME = "name";
17
+ const styles = {
18
+ formDirectoryElements1: {
19
+ display: "flex",
20
+ gap: "8px",
21
+ flexWrap: "wrap",
22
+ flexDirection: "row",
23
+ border: "2px solid lightgray",
24
+ padding: "4px",
25
+ borderRadius: "4px",
26
+ overflow: "hidden"
27
+ },
28
+ formDirectoryElementsError: (theme) => ({
29
+ borderColor: theme.palette.error.main
30
+ }),
31
+ formDirectoryElements2: {
32
+ display: "flex",
33
+ gap: "8px",
34
+ flexWrap: "wrap",
35
+ flexDirection: "row",
36
+ marginTop: 0,
37
+ padding: "4px",
38
+ overflow: "hidden"
39
+ },
40
+ addDirectoryElements: {
41
+ marginTop: "-5px"
42
+ }
43
+ };
44
+ const DirectoryItemsInput = ({
45
+ label,
46
+ name,
47
+ elementType,
48
+ // Used to specify type of element (Filter, Contingency list, ...)
49
+ equipmentTypes,
50
+ // Mostly used for filters, it allows the user to get elements of specific equipment only
51
+ itemFilter,
52
+ // Used to further filter the results displayed according to specific requirement
53
+ titleId,
54
+ // title of directory item selector dialogue
55
+ hideErrorMessage,
56
+ onRowChanged,
57
+ onChange,
58
+ disable = false,
59
+ fetchDirectoryContent,
60
+ fetchRootFolders,
61
+ fetchElementsInfos,
62
+ labelRequiredFromContext = true
63
+ }) => {
64
+ const { snackError } = useSnackMessage();
65
+ const intl = useIntl();
66
+ const types = useMemo(() => [elementType], [elementType]);
67
+ const [directoryItemSelectorOpen, setDirectoryItemSelectorOpen] = useState(false);
68
+ const {
69
+ fields: elements,
70
+ append,
71
+ remove
72
+ } = useFieldArray({
73
+ name
74
+ });
75
+ const formContext = useFormContext();
76
+ const { getValues } = formContext;
77
+ const {
78
+ fieldState: { error }
79
+ } = useController({
80
+ name
81
+ });
82
+ const addElements = useCallback(
83
+ (values) => {
84
+ values.forEach((value) => {
85
+ const { icon, children, ...otherElementAttributes } = value;
86
+ if (getValues(name).find(
87
+ (v) => (v == null ? void 0 : v.id) === otherElementAttributes.id
88
+ ) !== void 0) {
89
+ snackError({
90
+ messageTxt: "",
91
+ headerId: "directory_items_input/ElementAlreadyUsed"
92
+ });
93
+ } else {
94
+ append(otherElementAttributes);
95
+ onRowChanged && onRowChanged(true);
96
+ onChange && onChange(getValues(name));
97
+ }
98
+ });
99
+ setDirectoryItemSelectorOpen(false);
100
+ },
101
+ [append, getValues, snackError, name, onRowChanged, onChange]
102
+ );
103
+ const removeElements = useCallback(
104
+ (index) => {
105
+ remove(index);
106
+ onRowChanged && onRowChanged(true);
107
+ onChange && onChange(getValues(name));
108
+ },
109
+ [onRowChanged, remove, getValues, name, onChange]
110
+ );
111
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
112
+ /* @__PURE__ */ jsxs(
113
+ FormControl,
114
+ {
115
+ sx: mergeSx(
116
+ styles.formDirectoryElements1,
117
+ (error == null ? void 0 : error.message) && styles.formDirectoryElementsError
118
+ ),
119
+ error: !!(error == null ? void 0 : error.message),
120
+ children: [
121
+ (elements == null ? void 0 : elements.length) === 0 && label && /* @__PURE__ */ jsx(
122
+ FieldLabel,
123
+ {
124
+ label,
125
+ optional: labelRequiredFromContext && !isFieldFromContextRequired(
126
+ name,
127
+ formContext,
128
+ getValues()
129
+ )
130
+ }
131
+ ),
132
+ (elements == null ? void 0 : elements.length) > 0 && /* @__PURE__ */ jsx(FormControl, { sx: styles.formDirectoryElements2, children: elements.map((item, index) => /* @__PURE__ */ jsx(
133
+ Chip,
134
+ {
135
+ size: "small",
136
+ onDelete: () => removeElements(index),
137
+ label: /* @__PURE__ */ jsx(
138
+ OverflowableText,
139
+ {
140
+ text: /* @__PURE__ */ jsx(
141
+ RawReadOnlyInput,
142
+ {
143
+ name: `${name}.${index}.${NAME}`
144
+ }
145
+ ),
146
+ sx: { width: "100%" }
147
+ }
148
+ )
149
+ },
150
+ item.id
151
+ )) }),
152
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsx(Grid, { container: true, direction: "row-reverse", children: /* @__PURE__ */ jsx(Tooltip, { title: intl.formatMessage({ id: titleId }), children: /* @__PURE__ */ jsx(
153
+ IconButton,
154
+ {
155
+ sx: styles.addDirectoryElements,
156
+ size: "small",
157
+ disabled: disable,
158
+ onClick: () => setDirectoryItemSelectorOpen(true),
159
+ children: /* @__PURE__ */ jsx(FolderIcon, {})
160
+ }
161
+ ) }) }) })
162
+ ]
163
+ }
164
+ ),
165
+ !hideErrorMessage && /* @__PURE__ */ jsx(ErrorInput, { name, InputField: MidFormError }),
166
+ /* @__PURE__ */ jsx(
167
+ DirectoryItemSelector,
168
+ {
169
+ open: directoryItemSelectorOpen,
170
+ onClose: addElements,
171
+ types,
172
+ equipmentTypes,
173
+ title: intl.formatMessage({ id: titleId }),
174
+ itemFilter,
175
+ fetchDirectoryContent,
176
+ fetchRootFolders,
177
+ fetchElementsInfos
178
+ }
179
+ )
180
+ ] });
181
+ };
182
+ export {
183
+ NAME,
184
+ DirectoryItemsInput as default
185
+ };
@@ -0,0 +1,5 @@
1
+ export default ErrorInput;
2
+ declare function ErrorInput({ name, InputField }: {
3
+ name: any;
4
+ InputField: any;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export default FieldErrorAlert;
2
+ declare function FieldErrorAlert({ message }: {
3
+ message: any;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export default MidFormError;
2
+ declare function MidFormError({ message }: {
3
+ message: any;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ export default FloatInput;
2
+ declare function FloatInput(props: any): import("react/jsx-runtime").JSX.Element;
3
+ declare namespace FloatInput {
4
+ const propTypes: {
5
+ name: import("prop-types").Requireable<string>;
6
+ label: import("prop-types").Requireable<string>;
7
+ labelValues: import("prop-types").Requireable<object>;
8
+ id: import("prop-types").Requireable<string>;
9
+ adornment: import("prop-types").Requireable<object>;
10
+ customAdornment: import("prop-types").Requireable<object>;
11
+ outputTransform: import("prop-types").Requireable<(...args: any[]) => any>;
12
+ inputTransform: import("prop-types").Requireable<(...args: any[]) => any>;
13
+ acceptValue: import("prop-types").Requireable<(...args: any[]) => any>;
14
+ previousValue: import("prop-types").Requireable<any>;
15
+ clearable: import("prop-types").Requireable<boolean>;
16
+ formProps: import("prop-types").Requireable<object>;
17
+ };
18
+ }
@@ -0,0 +1,18 @@
1
+ export default IntegerInput;
2
+ declare function IntegerInput(props: any): import("react/jsx-runtime").JSX.Element;
3
+ declare namespace IntegerInput {
4
+ const propTypes: {
5
+ name: import("prop-types").Requireable<string>;
6
+ label: import("prop-types").Requireable<string>;
7
+ labelValues: import("prop-types").Requireable<object>;
8
+ id: import("prop-types").Requireable<string>;
9
+ adornment: import("prop-types").Requireable<object>;
10
+ customAdornment: import("prop-types").Requireable<object>;
11
+ outputTransform: import("prop-types").Requireable<(...args: any[]) => any>;
12
+ inputTransform: import("prop-types").Requireable<(...args: any[]) => any>;
13
+ acceptValue: import("prop-types").Requireable<(...args: any[]) => any>;
14
+ previousValue: import("prop-types").Requireable<any>;
15
+ clearable: import("prop-types").Requireable<boolean>;
16
+ formProps: import("prop-types").Requireable<object>;
17
+ };
18
+ }
@@ -0,0 +1,2 @@
1
+ export function isIntegerNumber(val: any): boolean;
2
+ export function isFloatNumber(val: any): boolean;
@@ -0,0 +1,18 @@
1
+ export default RadioInput;
2
+ declare function RadioInput({ name, label, id, options, formProps }: {
3
+ name: any;
4
+ label: any;
5
+ id: any;
6
+ options: any;
7
+ formProps: any;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ declare namespace RadioInput {
10
+ namespace propTypes {
11
+ const name: PropTypes.Validator<string>;
12
+ const label: PropTypes.Requireable<string>;
13
+ const id: PropTypes.Requireable<string>;
14
+ const options: PropTypes.Validator<any[]>;
15
+ const formProps: PropTypes.Requireable<object>;
16
+ }
17
+ }
18
+ import PropTypes from 'prop-types';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) 2023, 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
+ export declare function RawReadOnlyInput({ name }: {
8
+ name: string;
9
+ }): any;
@@ -0,0 +1,10 @@
1
+ import { useController } from "react-hook-form";
2
+ function RawReadOnlyInput({ name }) {
3
+ const {
4
+ field: { value }
5
+ } = useController({ name });
6
+ return value;
7
+ }
8
+ export {
9
+ RawReadOnlyInput
10
+ };
@@ -0,0 +1,17 @@
1
+ export default SelectInput;
2
+ declare function SelectInput(props: any): import("react/jsx-runtime").JSX.Element;
3
+ declare namespace SelectInput {
4
+ const propTypes: {
5
+ name: PropTypes.Validator<string>;
6
+ label: PropTypes.Requireable<string>;
7
+ options: PropTypes.Validator<any[]>;
8
+ outputTransform: PropTypes.Requireable<(...args: any[]) => any>;
9
+ inputTransform: PropTypes.Requireable<(...args: any[]) => any>;
10
+ readOnly: PropTypes.Requireable<boolean>;
11
+ previousValue: PropTypes.Requireable<any>;
12
+ allowNewValue: PropTypes.Requireable<boolean>;
13
+ onChangeCallback: PropTypes.Requireable<(...args: any[]) => any>;
14
+ formProps: PropTypes.Requireable<object>;
15
+ };
16
+ }
17
+ import PropTypes from 'prop-types';
@@ -0,0 +1,21 @@
1
+ export default SliderInput;
2
+ declare function SliderInput({ name, min, max, step, size, onValueChange, }: {
3
+ name: any;
4
+ min: any;
5
+ max: any;
6
+ step: any;
7
+ size?: string | undefined;
8
+ onValueChange?: typeof identity | undefined;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ declare namespace SliderInput {
11
+ namespace propTypes {
12
+ const name: PropTypes.Validator<string>;
13
+ const min: PropTypes.Validator<number>;
14
+ const max: PropTypes.Validator<number>;
15
+ const step: PropTypes.Validator<number>;
16
+ const size: PropTypes.Requireable<string>;
17
+ const onValueChange: PropTypes.Requireable<(...args: any[]) => any>;
18
+ }
19
+ }
20
+ import { identity } from './utils/functions';
21
+ import PropTypes from 'prop-types';
@@ -0,0 +1,33 @@
1
+ export default TextInput;
2
+ declare function TextInput({ name, label, labelValues, id, adornment, customAdornment, outputTransform, inputTransform, acceptValue, previousValue, clearable, formProps, }: {
3
+ name: any;
4
+ label: any;
5
+ labelValues: any;
6
+ id: any;
7
+ adornment: any;
8
+ customAdornment: any;
9
+ outputTransform?: typeof identity | undefined;
10
+ inputTransform?: typeof identity | undefined;
11
+ acceptValue?: (() => boolean) | undefined;
12
+ previousValue: any;
13
+ clearable: any;
14
+ formProps: any;
15
+ }): import("react/jsx-runtime").JSX.Element;
16
+ declare namespace TextInput {
17
+ namespace propTypes {
18
+ const name: PropTypes.Requireable<string>;
19
+ const label: PropTypes.Requireable<string>;
20
+ const labelValues: PropTypes.Requireable<object>;
21
+ const id: PropTypes.Requireable<string>;
22
+ const adornment: PropTypes.Requireable<object>;
23
+ const customAdornment: PropTypes.Requireable<object>;
24
+ const outputTransform: PropTypes.Requireable<(...args: any[]) => any>;
25
+ const inputTransform: PropTypes.Requireable<(...args: any[]) => any>;
26
+ const acceptValue: PropTypes.Requireable<(...args: any[]) => any>;
27
+ const previousValue: PropTypes.Requireable<any>;
28
+ const clearable: PropTypes.Requireable<boolean>;
29
+ const formProps: PropTypes.Requireable<object>;
30
+ }
31
+ }
32
+ import { identity } from './utils/functions';
33
+ import PropTypes from 'prop-types';
@@ -0,0 +1,10 @@
1
+ export default CancelButton;
2
+ declare function CancelButton({ ...inProps }: {
3
+ [x: string]: any;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ declare namespace CancelButton {
6
+ namespace propTypes {
7
+ const buttonProps: PropTypes.Requireable<object>;
8
+ }
9
+ }
10
+ import PropTypes from 'prop-types';
@@ -0,0 +1,6 @@
1
+ export default FieldLabel;
2
+ declare function FieldLabel({ label, optional, values }: {
3
+ label: any;
4
+ optional: any;
5
+ values?: undefined;
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ export function genHelperPreviousValue(previousValue: any, adornment: any): any;
2
+ export function genHelperError(...errors: any[]): {
3
+ error: boolean;
4
+ helperText: import("react/jsx-runtime").JSX.Element;
5
+ } | {
6
+ error?: undefined;
7
+ helperText?: undefined;
8
+ };
9
+ export function identity(x: any): any;
10
+ export function isFieldFromContextRequired(fieldName: any, formContext: any, values: any): boolean;
11
+ export function isFieldRequired(fieldName: any, schema: any, values: any): boolean;
@@ -23,6 +23,10 @@ function genHelperError(...errors) {
23
23
  function identity(x) {
24
24
  return x;
25
25
  }
26
+ const isFieldFromContextRequired = (fieldName, formContext, values) => {
27
+ const { validationSchema } = formContext;
28
+ return isFieldRequired(fieldName, validationSchema, values);
29
+ };
26
30
  const isFieldRequired = (fieldName, schema, values) => {
27
31
  var _a;
28
32
  const { schema: fieldSchema, parent: parentValues } = getIn(schema, fieldName, values) || {};
@@ -32,5 +36,6 @@ export {
32
36
  genHelperError,
33
37
  genHelperPreviousValue,
34
38
  identity,
39
+ isFieldFromContextRequired,
35
40
  isFieldRequired
36
41
  };
@@ -0,0 +1,10 @@
1
+ export default SubmitButton;
2
+ declare function SubmitButton({ ...buttonProps }: {
3
+ [x: string]: any;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ declare namespace SubmitButton {
6
+ namespace propTypes {
7
+ const buttonProps: PropTypes.Requireable<object>;
8
+ }
9
+ }
10
+ import PropTypes from 'prop-types';
@@ -0,0 +1,12 @@
1
+ export default TextFieldWithAdornment;
2
+ declare function TextFieldWithAdornment(props: any): import("react/jsx-runtime").JSX.Element;
3
+ declare namespace TextFieldWithAdornment {
4
+ namespace propTypes {
5
+ const adornmentPosition: PropTypes.Validator<string>;
6
+ const adornmentText: PropTypes.Validator<string>;
7
+ const value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
8
+ const variant: PropTypes.Requireable<string>;
9
+ const handleClearValue: PropTypes.Requireable<(...args: any[]) => any>;
10
+ }
11
+ }
12
+ import PropTypes from 'prop-types';
@@ -0,0 +1,12 @@
1
+ export default card_error_boundary_en;
2
+ /**
3
+ * Copyright (c) 2022, RTE (http://www.rte-france.com)
4
+ * This Source Code Form is subject to the terms of the Mozilla Public
5
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+ */
8
+ declare const card_error_boundary_en: {
9
+ 'card_error_boundary/title': string;
10
+ 'card_error_boundary/content': string;
11
+ 'card_error_boundary/expandederrorheader': string;
12
+ };
@@ -0,0 +1,12 @@
1
+ export default card_error_boundary_fr;
2
+ /**
3
+ * Copyright (c) 2022, RTE (http://www.rte-france.com)
4
+ * This Source Code Form is subject to the terms of the Mozilla Public
5
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+ */
8
+ declare const card_error_boundary_fr: {
9
+ 'card_error_boundary/title': string;
10
+ 'card_error_boundary/content': string;
11
+ 'card_error_boundary/expandederrorheader': string;
12
+ };
@@ -0,0 +1,5 @@
1
+ export default common_button_en;
2
+ declare namespace common_button_en {
3
+ const cancel: string;
4
+ const validate: string;
5
+ }
@@ -0,0 +1,5 @@
1
+ export default common_button_fr;
2
+ declare namespace common_button_fr {
3
+ const cancel: string;
4
+ const validate: string;
5
+ }
@@ -0,0 +1,10 @@
1
+ export default directory_items_input_en;
2
+ /**
3
+ * Copyright (c) 2024, RTE (http://www.rte-france.com)
4
+ * This Source Code Form is subject to the terms of the Mozilla Public
5
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+ */
8
+ declare const directory_items_input_en: {
9
+ 'directory_items_input/ElementAlreadyUsed': string;
10
+ };
@@ -0,0 +1,6 @@
1
+ const directory_items_input_en = {
2
+ "directory_items_input/ElementAlreadyUsed": "This element is already used"
3
+ };
4
+ export {
5
+ directory_items_input_en as default
6
+ };
@@ -0,0 +1,10 @@
1
+ export default directory_items_input_fr;
2
+ /**
3
+ * Copyright (c) 2024, RTE (http://www.rte-france.com)
4
+ * This Source Code Form is subject to the terms of the Mozilla Public
5
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+ */
8
+ declare const directory_items_input_fr: {
9
+ 'directory_items_input/ElementAlreadyUsed': string;
10
+ };
@@ -0,0 +1,6 @@
1
+ const directory_items_input_fr = {
2
+ "directory_items_input/ElementAlreadyUsed": "Cet élément est déjà utilisé"
3
+ };
4
+ export {
5
+ directory_items_input_fr as default
6
+ };
@@ -0,0 +1,11 @@
1
+ export default element_search_en;
2
+ /**
3
+ * Copyright (c) 2022, RTE (http://www.rte-france.com)
4
+ * This Source Code Form is subject to the terms of the Mozilla Public
5
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+ */
8
+ declare const element_search_en: {
9
+ 'element_search/label': string;
10
+ 'element_search/noResult': string;
11
+ };
@@ -0,0 +1,11 @@
1
+ export default element_search_fr;
2
+ /**
3
+ * Copyright (c) 2022, RTE (http://www.rte-france.com)
4
+ * This Source Code Form is subject to the terms of the Mozilla Public
5
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+ */
8
+ declare const element_search_fr: {
9
+ 'element_search/label': string;
10
+ 'element_search/noResult': string;
11
+ };
@@ -0,0 +1,25 @@
1
+ export default equipment_search_en;
2
+ /**
3
+ * Copyright (c) 2022, RTE (http://www.rte-france.com)
4
+ * This Source Code Form is subject to the terms of the Mozilla Public
5
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+ */
8
+ declare const equipment_search_en: {
9
+ 'equipment_search/label': string;
10
+ 'equipment_search/switchTag': string;
11
+ 'equipment_search/busbarSectionTag': string;
12
+ 'equipment_search/lineTag': string;
13
+ 'equipment_search/2wtTag': string;
14
+ 'equipment_search/3wtTag': string;
15
+ 'equipment_search/generatorTag': string;
16
+ 'equipment_search/batteryTag': string;
17
+ 'equipment_search/loadTag': string;
18
+ 'equipment_search/shuntTag': string;
19
+ 'equipment_search/svcTag': string;
20
+ 'equipment_search/hvdcLineTag': string;
21
+ 'equipment_search/hvdcStationTag': string;
22
+ 'equipment_search/voltageLevelTag': string;
23
+ 'equipment_search/substationTag': string;
24
+ 'equipment_search/busTag': string;
25
+ };
@@ -0,0 +1,25 @@
1
+ export default equipment_search_fr;
2
+ /**
3
+ * Copyright (c) 2022, RTE (http://www.rte-france.com)
4
+ * This Source Code Form is subject to the terms of the Mozilla Public
5
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+ */
8
+ declare const equipment_search_fr: {
9
+ 'equipment_search/label': string;
10
+ 'equipment_search/switchTag': string;
11
+ 'equipment_search/busbarSectionTag': string;
12
+ 'equipment_search/lineTag': string;
13
+ 'equipment_search/2wtTag': string;
14
+ 'equipment_search/3wtTag': string;
15
+ 'equipment_search/generatorTag': string;
16
+ 'equipment_search/batteryTag': string;
17
+ 'equipment_search/loadTag': string;
18
+ 'equipment_search/shuntTag': string;
19
+ 'equipment_search/svcTag': string;
20
+ 'equipment_search/hvdcLineTag': string;
21
+ 'equipment_search/hvdcStationTag': string;
22
+ 'equipment_search/voltageLevelTag': string;
23
+ 'equipment_search/substationTag': string;
24
+ 'equipment_search/busTag': string;
25
+ };
@@ -0,0 +1,12 @@
1
+ export default flat_parameters_en;
2
+ /**
3
+ * Copyright (c) 2023, RTE (http://www.rte-france.com)
4
+ * This Source Code Form is subject to the terms of the Mozilla Public
5
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+ */
8
+ declare const flat_parameters_en: {
9
+ 'flat_parameters/none': string;
10
+ 'flat_parameters/some': string;
11
+ 'flat_parameters/all': string;
12
+ };
@@ -0,0 +1,12 @@
1
+ export default flat_parameters_fr;
2
+ /**
3
+ * Copyright (c) 2023, RTE (http://www.rte-france.com)
4
+ * This Source Code Form is subject to the terms of the Mozilla Public
5
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+ */
8
+ declare const flat_parameters_fr: {
9
+ 'flat_parameters/none': string;
10
+ 'flat_parameters/some': string;
11
+ 'flat_parameters/all': string;
12
+ };
@@ -0,0 +1,18 @@
1
+ export default login_en;
2
+ /**
3
+ * Copyright (c) 2022, RTE (http://www.rte-france.com)
4
+ * This Source Code Form is subject to the terms of the Mozilla Public
5
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+ */
8
+ declare const login_en: {
9
+ 'login/login': string;
10
+ 'login/connection': string;
11
+ 'login/unauthorizedAccess': string;
12
+ 'login/unauthorizedAccessMessage': string;
13
+ 'login/errorInUserValidation': string;
14
+ 'login/errorInUserValidationMessage': string;
15
+ 'login/errorInLogout': string;
16
+ 'login/errorInLogoutMessage': string;
17
+ 'login/logout': string;
18
+ };
@@ -2,7 +2,7 @@ const login_en = {
2
2
  "login/login": "Login",
3
3
  "login/connection": "Connection",
4
4
  "login/unauthorizedAccess": "Unauthorized access",
5
- "login/unauthorizedAccessMessage": "The user {userName} isn't granted yet",
5
+ "login/unauthorizedAccessMessage": "The user {userName} does not have permission to access GridSuite yet.",
6
6
  "login/errorInUserValidation": "Error during user validation",
7
7
  "login/errorInUserValidationMessage": "An unexpected error occured during user validation for {userName}.",
8
8
  "login/errorInLogout": "Error during user logout",