@gridsuite/commons-ui 0.105.1 → 0.106.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/dialogs/customMuiDialog/CustomMuiDialog.d.ts +4 -3
- package/dist/components/dialogs/customMuiDialog/CustomMuiDialog.js +3 -1
- package/dist/components/dialogs/descriptionModificationDialog/DescriptionModificationDialog.d.ts +3 -8
- package/dist/components/index.js +33 -0
- package/dist/components/parameters/common/name-element-editor/index.d.ts +8 -0
- package/dist/components/parameters/common/name-element-editor/index.js +7 -0
- package/dist/components/parameters/common/name-element-editor/name-element-editor-form.d.ts +8 -0
- package/dist/components/parameters/common/name-element-editor/name-element-editor-form.js +57 -0
- package/dist/components/parameters/common/name-element-editor/name-element-editor-utils.d.ts +12 -0
- package/dist/components/parameters/common/name-element-editor/name-element-editor-utils.js +48 -0
- package/dist/components/parameters/index.d.ts +1 -0
- package/dist/components/parameters/index.js +33 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-dialog.js +14 -24
- package/dist/components/parameters/loadflow/load-flow-parameters-form.js +1 -1
- package/dist/components/parameters/loadflow/load-flow-parameters-inline.js +1 -1
- package/dist/components/parameters/loadflow/use-load-flow-parameters-form.js +4 -3
- package/dist/components/parameters/network-visualizations/constants.d.ts +41 -0
- package/dist/components/parameters/network-visualizations/constants.js +94 -0
- package/dist/components/parameters/network-visualizations/index.d.ts +10 -0
- package/dist/components/parameters/network-visualizations/index.js +35 -0
- package/dist/components/parameters/network-visualizations/map-parameters.d.ts +1 -0
- package/dist/components/parameters/network-visualizations/map-parameters.js +97 -0
- package/dist/components/parameters/network-visualizations/network-area-diagram-parameters.d.ts +1 -0
- package/dist/components/parameters/network-visualizations/network-area-diagram-parameters.js +52 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-form.d.ts +11 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-form.js +102 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-parameters-dialog.d.ts +14 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-parameters-dialog.js +93 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-parameters-inline.d.ts +10 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-parameters-inline.js +125 -0
- package/dist/components/parameters/network-visualizations/network-visualizations.types.d.ts +34 -0
- package/dist/components/parameters/network-visualizations/network-visualizations.types.js +17 -0
- package/dist/components/parameters/network-visualizations/single-line-diagram-parameters.d.ts +10 -0
- package/dist/components/parameters/network-visualizations/single-line-diagram-parameters.js +101 -0
- package/dist/components/parameters/network-visualizations/use-network-visualizations-parameters-form.d.ts +16 -0
- package/dist/components/parameters/network-visualizations/use-network-visualizations-parameters-form.js +151 -0
- package/dist/index.js +48 -1
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.js +15 -1
- package/dist/services/study-config.d.ts +3 -0
- package/dist/services/study-config.js +18 -0
- package/dist/services/study.d.ts +4 -0
- package/dist/services/study.js +24 -2
- package/dist/translations/en/networkModificationsEn.d.ts +3 -0
- package/dist/translations/en/networkModificationsEn.js +3 -0
- package/dist/translations/en/parameters.d.ts +24 -0
- package/dist/translations/en/parameters.js +25 -1
- package/dist/translations/fr/networkModificationsFr.d.ts +3 -0
- package/dist/translations/fr/networkModificationsFr.js +3 -0
- package/dist/translations/fr/parameters.d.ts +24 -0
- package/dist/translations/fr/parameters.js +25 -1
- package/package.json +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { MouseEvent, ReactNode } from 'react';
|
|
2
2
|
import { FieldErrors, FieldValues, SubmitHandler, UseFormReturn } from 'react-hook-form';
|
|
3
|
+
import { DialogProps } from '@mui/material';
|
|
3
4
|
import { ObjectSchema } from 'yup';
|
|
4
|
-
export
|
|
5
|
+
export type CustomMuiDialogProps<T extends FieldValues = FieldValues> = DialogProps & {
|
|
5
6
|
open: boolean;
|
|
6
7
|
formSchema: ObjectSchema<T>;
|
|
7
8
|
formMethods: UseFormReturn<T>;
|
|
@@ -17,7 +18,7 @@ export interface CustomMuiDialogProps<T extends FieldValues = FieldValues> {
|
|
|
17
18
|
language?: string;
|
|
18
19
|
confirmationMessageKey?: string;
|
|
19
20
|
unscrollableFullHeight?: boolean;
|
|
20
|
-
}
|
|
21
|
+
};
|
|
21
22
|
/**
|
|
22
23
|
* all those styles are made to work with each other in order to control the scroll behavior:
|
|
23
24
|
* <fullHeightDialog>
|
|
@@ -50,4 +51,4 @@ export declare const unscrollableDialogStyles: {
|
|
|
50
51
|
padding: number;
|
|
51
52
|
};
|
|
52
53
|
};
|
|
53
|
-
export declare function CustomMuiDialog<T extends FieldValues = FieldValues>({ open, formSchema, formMethods, onClose, onSave, isDataFetching, onValidationError, titleId, disabledSave, removeOptional, onCancel, children, language, confirmationMessageKey, unscrollableFullHeight, }: Readonly<CustomMuiDialogProps<T>>): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
export declare function CustomMuiDialog<T extends FieldValues = FieldValues>({ open, formSchema, formMethods, onClose, onSave, isDataFetching, onValidationError, titleId, disabledSave, removeOptional, onCancel, children, language, confirmationMessageKey, unscrollableFullHeight, ...dialogProps }: Readonly<CustomMuiDialogProps<T>>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -53,7 +53,8 @@ function CustomMuiDialog({
|
|
|
53
53
|
children,
|
|
54
54
|
language,
|
|
55
55
|
confirmationMessageKey,
|
|
56
|
-
unscrollableFullHeight = false
|
|
56
|
+
unscrollableFullHeight = false,
|
|
57
|
+
...dialogProps
|
|
57
58
|
}) {
|
|
58
59
|
const [openConfirmationPopup, setOpenConfirmationPopup] = useState(false);
|
|
59
60
|
const [validatedData, setValidatedData] = useState();
|
|
@@ -116,6 +117,7 @@ function CustomMuiDialog({
|
|
|
116
117
|
open,
|
|
117
118
|
onClose: handleClose,
|
|
118
119
|
fullWidth: true,
|
|
120
|
+
...dialogProps,
|
|
119
121
|
children: [
|
|
120
122
|
isDataFetching && /* @__PURE__ */ jsx(LinearProgress, {}),
|
|
121
123
|
/* @__PURE__ */ jsx(DialogTitle, { children: /* @__PURE__ */ jsx(Grid, { item: true, xs: 11, children: /* @__PURE__ */ jsx(FormattedMessage, { id: titleId }) }) }),
|
package/dist/components/dialogs/descriptionModificationDialog/DescriptionModificationDialog.d.ts
CHANGED
|
@@ -1,14 +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
|
-
*/
|
|
1
|
+
import { UUID } from 'crypto';
|
|
7
2
|
export interface DescriptionModificationDialogProps {
|
|
8
|
-
elementUuid:
|
|
3
|
+
elementUuid: UUID;
|
|
9
4
|
description: string;
|
|
10
5
|
open: boolean;
|
|
11
6
|
onClose: () => void;
|
|
12
|
-
updateElement: (uuid:
|
|
7
|
+
updateElement: (uuid: UUID, data: Record<string, string>) => Promise<void>;
|
|
13
8
|
}
|
|
14
9
|
export declare function DescriptionModificationDialog({ elementUuid, description, open, onClose, updateElement, }: Readonly<DescriptionModificationDialogProps>): import("react/jsx-runtime").JSX.Element;
|
package/dist/components/index.js
CHANGED
|
@@ -131,6 +131,10 @@ import { toFormValueSaParameters, toFormValuesLimitReductions } from "./paramete
|
|
|
131
131
|
import { LimitReductionsTableForm } from "./parameters/common/limitreductions/limit-reductions-table-form.js";
|
|
132
132
|
import { LimitReductionTableRow } from "./parameters/common/limitreductions/limit-reduction-table-row.js";
|
|
133
133
|
import { LimitReductionTableCell } from "./parameters/common/limitreductions/limit-reduction-table-cell.js";
|
|
134
|
+
import { CENTER_LABEL, COMPONENT_LIBRARY, DIAGONAL_LABEL, INIT_NAD_WITH_GEO_DATA, INTL_LINE_FLOW_MODE_OPTIONS, INTL_MAP_BASE_MAP_OPTIONS, INTL_SUBSTATION_LAYOUT_OPTIONS, LINE_FLOW_MODE, LineFlowMode, MAP_BASE_MAP, MAP_MANUAL_REFRESH, NetworkVisualizationTabValues, PARAM_CENTER_LABEL, PARAM_COMPONENT_LIBRARY, PARAM_DIAGONAL_LABEL, PARAM_INIT_NAD_WITH_GEO_DATA, PARAM_LINE_FLOW_MODE, PARAM_LINE_FULL_PATH, PARAM_LINE_PARALLEL_PATH, PARAM_MAP_BASEMAP, PARAM_MAP_MANUAL_REFRESH, PARAM_SUBSTATION_LAYOUT, SUBSTATION_LAYOUT } from "./parameters/network-visualizations/constants.js";
|
|
135
|
+
import { MAP_BASEMAP_CARTO, MAP_BASEMAP_CARTO_NOLABEL, MAP_BASEMAP_MAPBOX, SubstationLayout } from "./parameters/network-visualizations/network-visualizations.types.js";
|
|
136
|
+
import { NetworkVisualizationParametersInline } from "./parameters/network-visualizations/network-visualizations-parameters-inline.js";
|
|
137
|
+
import { NetworkVisualizationsParametersEditionDialog } from "./parameters/network-visualizations/network-visualizations-parameters-dialog.js";
|
|
134
138
|
import { getTabIndicatorStyle, getTabStyle, parametersStyles } from "./parameters/parameters-style.js";
|
|
135
139
|
import { BALANCE_TYPE, COMMON_PARAMETERS, CONNECTED_COMPONENT_MODE, COUNTRIES_TO_BALANCE, DC, DC_POWER_FACTOR, DC_USE_TRANSFORMER_RATIO, DEFAULT_LIMIT_REDUCTION_VALUE, DISTRIBUTED_SLACK, HVDC_AC_EMULATION, MAX_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, PARAM_LIMIT_REDUCTION, PARAM_PROVIDER_OPENLOADFLOW, PHASE_SHIFTER_REGULATION_ON, READ_SLACK_BUS, SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON, SPECIFIC_PARAMETERS, TRANSFORMER_VOLTAGE_CONTROL_ON, TWT_SPLIT_SHUNT_ADMITTANCE, USE_REACTIVE_LIMITS, VOLTAGE_INIT_MODE, WRITE_SLACK_BUS, alertThresholdMarks } from "./parameters/loadflow/constants.js";
|
|
136
140
|
import { LoadFlowParametersInline } from "./parameters/loadflow/load-flow-parameters-inline.js";
|
|
@@ -149,9 +153,11 @@ export {
|
|
|
149
153
|
BALANCE_TYPE,
|
|
150
154
|
BooleanInput,
|
|
151
155
|
BottomRightButtons,
|
|
156
|
+
CENTER_LABEL,
|
|
152
157
|
COLUMNS_DEFINITIONS_LIMIT_REDUCTIONS,
|
|
153
158
|
COMBINATOR_OPTIONS,
|
|
154
159
|
COMMON_PARAMETERS,
|
|
160
|
+
COMPONENT_LIBRARY,
|
|
155
161
|
CONNECTED_COMPONENT_MODE,
|
|
156
162
|
CONTINGENCY_LIST_EQUIPMENTS,
|
|
157
163
|
CONVERTERS_MODE_OPTIONS,
|
|
@@ -186,6 +192,7 @@ export {
|
|
|
186
192
|
DEFAULT_LIMIT_REDUCTION_VALUE,
|
|
187
193
|
DEFAULT_RANGE_VALUE,
|
|
188
194
|
DESCRIPTION_INPUT,
|
|
195
|
+
DIAGONAL_LABEL,
|
|
189
196
|
DISTRIBUTED_SLACK,
|
|
190
197
|
DISTRIBUTION_KEY,
|
|
191
198
|
DataType,
|
|
@@ -226,11 +233,16 @@ export {
|
|
|
226
233
|
GroupValueEditor,
|
|
227
234
|
HVDC_AC_EMULATION,
|
|
228
235
|
HelperPreviousValue,
|
|
236
|
+
INIT_NAD_WITH_GEO_DATA,
|
|
237
|
+
INTL_LINE_FLOW_MODE_OPTIONS,
|
|
238
|
+
INTL_MAP_BASE_MAP_OPTIONS,
|
|
239
|
+
INTL_SUBSTATION_LAYOUT_OPTIONS,
|
|
229
240
|
IST_FORM,
|
|
230
241
|
InputWithPopupConfirmation,
|
|
231
242
|
IntegerInput,
|
|
232
243
|
LIMIT_DURATION_FORM,
|
|
233
244
|
LIMIT_REDUCTIONS_FORM,
|
|
245
|
+
LINE_FLOW_MODE,
|
|
234
246
|
LOAD_TYPE_OPTIONS,
|
|
235
247
|
LabelledButton,
|
|
236
248
|
LeftPanelCloseIcon,
|
|
@@ -238,12 +250,18 @@ export {
|
|
|
238
250
|
LimitReductionTableCell,
|
|
239
251
|
LimitReductionTableRow,
|
|
240
252
|
LimitReductionsTableForm,
|
|
253
|
+
LineFlowMode,
|
|
241
254
|
LineSeparator,
|
|
242
255
|
LoadFlowParametersEditionDialog,
|
|
243
256
|
LoadFlowParametersInline,
|
|
244
257
|
Login,
|
|
245
258
|
LogoText,
|
|
246
259
|
Logout,
|
|
260
|
+
MAP_BASEMAP_CARTO,
|
|
261
|
+
MAP_BASEMAP_CARTO_NOLABEL,
|
|
262
|
+
MAP_BASEMAP_MAPBOX,
|
|
263
|
+
MAP_BASE_MAP,
|
|
264
|
+
MAP_MANUAL_REFRESH,
|
|
247
265
|
MAX_VALUE_ALLOWED_FOR_LIMIT_REDUCTION,
|
|
248
266
|
MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION,
|
|
249
267
|
MidFormError,
|
|
@@ -253,13 +271,25 @@ export {
|
|
|
253
271
|
MultipleSelectionDialog,
|
|
254
272
|
NAME,
|
|
255
273
|
NO_ITEM_SELECTION_FOR_COPY,
|
|
274
|
+
NetworkVisualizationParametersInline,
|
|
275
|
+
NetworkVisualizationTabValues,
|
|
276
|
+
NetworkVisualizationsParametersEditionDialog,
|
|
256
277
|
NotificationsContext,
|
|
257
278
|
NotificationsProvider,
|
|
258
279
|
NumericEditor,
|
|
259
280
|
OPERATOR_OPTIONS,
|
|
260
281
|
OperatorType,
|
|
261
282
|
OverflowableText,
|
|
283
|
+
PARAM_CENTER_LABEL,
|
|
284
|
+
PARAM_COMPONENT_LIBRARY,
|
|
285
|
+
PARAM_DIAGONAL_LABEL,
|
|
286
|
+
PARAM_INIT_NAD_WITH_GEO_DATA,
|
|
262
287
|
PARAM_LIMIT_REDUCTION,
|
|
288
|
+
PARAM_LINE_FLOW_MODE,
|
|
289
|
+
PARAM_LINE_FULL_PATH,
|
|
290
|
+
PARAM_LINE_PARALLEL_PATH,
|
|
291
|
+
PARAM_MAP_BASEMAP,
|
|
292
|
+
PARAM_MAP_MANUAL_REFRESH,
|
|
263
293
|
PARAM_PROVIDER_OPENLOADFLOW,
|
|
264
294
|
PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD,
|
|
265
295
|
PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD,
|
|
@@ -267,6 +297,7 @@ export {
|
|
|
267
297
|
PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD,
|
|
268
298
|
PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD,
|
|
269
299
|
PARAM_SA_PROVIDER,
|
|
300
|
+
PARAM_SUBSTATION_LAYOUT,
|
|
270
301
|
PHASE_REGULATION_MODE_OPTIONS,
|
|
271
302
|
PHASE_SHIFTER_REGULATION_ON,
|
|
272
303
|
PROVIDER,
|
|
@@ -291,6 +322,7 @@ export {
|
|
|
291
322
|
SHUNT_COMPENSATOR_TYPE_OPTIONS,
|
|
292
323
|
SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON,
|
|
293
324
|
SPECIFIC_PARAMETERS,
|
|
325
|
+
SUBSTATION_LAYOUT,
|
|
294
326
|
SVAR_REGULATION_MODE_OPTIONS,
|
|
295
327
|
SelectClearable,
|
|
296
328
|
SelectInput,
|
|
@@ -299,6 +331,7 @@ export {
|
|
|
299
331
|
SliderInput,
|
|
300
332
|
SnackbarProvider,
|
|
301
333
|
SubmitButton,
|
|
334
|
+
SubstationLayout,
|
|
302
335
|
SwitchInput,
|
|
303
336
|
SwitchWithLabel,
|
|
304
337
|
TAB_INFO,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, 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 https://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export * from './name-element-editor-form';
|
|
8
|
+
export * from './name-element-editor-utils';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NameElementEditorForm } from "./name-element-editor-form.js";
|
|
2
|
+
import { getNameElementEditorEmptyFormData, getNameElementEditorSchema } from "./name-element-editor-utils.js";
|
|
3
|
+
export {
|
|
4
|
+
NameElementEditorForm,
|
|
5
|
+
getNameElementEditorEmptyFormData,
|
|
6
|
+
getNameElementEditorSchema
|
|
7
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UUID } from 'crypto';
|
|
2
|
+
import { ElementType } from '../../../../utils';
|
|
3
|
+
export interface NameElementEditorFormProps {
|
|
4
|
+
initialElementName: string;
|
|
5
|
+
activeDirectory: UUID;
|
|
6
|
+
elementType: ElementType;
|
|
7
|
+
}
|
|
8
|
+
export declare function NameElementEditorForm({ initialElementName, activeDirectory, elementType, }: Readonly<NameElementEditorFormProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Grid } from "@mui/material";
|
|
3
|
+
import "react-intl";
|
|
4
|
+
import "@mui/icons-material";
|
|
5
|
+
import "react";
|
|
6
|
+
import "react-hook-form";
|
|
7
|
+
import "../../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
8
|
+
import "yup";
|
|
9
|
+
import "notistack";
|
|
10
|
+
import "../../../overflowableText/OverflowableText.js";
|
|
11
|
+
import "../../../treeViewFinder/TreeViewFinder.js";
|
|
12
|
+
import "../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
13
|
+
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
14
|
+
import "../../../customAGGrid/customAggrid.js";
|
|
15
|
+
import "ag-grid-community";
|
|
16
|
+
import "react-papaparse";
|
|
17
|
+
import "react-csv-downloader";
|
|
18
|
+
import "../../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
19
|
+
import "localized-countries";
|
|
20
|
+
import "localized-countries/data/fr";
|
|
21
|
+
import "localized-countries/data/en";
|
|
22
|
+
import { DescriptionField } from "../../../inputs/reactHookForm/text/DescriptionField.js";
|
|
23
|
+
import { UniqueNameInput } from "../../../inputs/reactHookForm/text/UniqueNameInput.js";
|
|
24
|
+
import "@react-querybuilder/material";
|
|
25
|
+
import "../../../filter/expert/expertFilterConstants.js";
|
|
26
|
+
import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
27
|
+
import "uuid";
|
|
28
|
+
import "../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
29
|
+
import "react-querybuilder";
|
|
30
|
+
import "../../../../utils/conversionUtils.js";
|
|
31
|
+
import "../../../../utils/types/equipmentType.js";
|
|
32
|
+
import "../../../../utils/yupConfig.js";
|
|
33
|
+
import { filterStyles } from "../../../filter/HeaderFilterForm.js";
|
|
34
|
+
function NameElementEditorForm({
|
|
35
|
+
initialElementName,
|
|
36
|
+
activeDirectory,
|
|
37
|
+
elementType
|
|
38
|
+
}) {
|
|
39
|
+
return /* @__PURE__ */ jsx(Grid, { item: true, sx: { height: "100%" }, children: /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, direction: "column", marginBottom: "8px", children: [
|
|
40
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
|
|
41
|
+
UniqueNameInput,
|
|
42
|
+
{
|
|
43
|
+
name: FieldConstants.NAME,
|
|
44
|
+
currentName: initialElementName,
|
|
45
|
+
label: "nameProperty",
|
|
46
|
+
elementType,
|
|
47
|
+
activeDirectory,
|
|
48
|
+
sx: filterStyles.textField,
|
|
49
|
+
fullWidth: false
|
|
50
|
+
}
|
|
51
|
+
) }),
|
|
52
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(DescriptionField, { expandingTextSx: filterStyles.description }) })
|
|
53
|
+
] }) });
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
NameElementEditorForm
|
|
57
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as yup } from '../../../../utils/yupConfig';
|
|
2
|
+
export declare function getNameElementEditorEmptyFormData(initialElementName: string | null, initialElementdescripton: string | null): {
|
|
3
|
+
name: string | null;
|
|
4
|
+
description: string | null;
|
|
5
|
+
};
|
|
6
|
+
export declare function getNameElementEditorSchema(initialElementName: string | null): yup.ObjectSchema<{
|
|
7
|
+
name: string | undefined;
|
|
8
|
+
description: string | undefined;
|
|
9
|
+
}, yup.AnyObject, {
|
|
10
|
+
name: undefined;
|
|
11
|
+
description: undefined;
|
|
12
|
+
}, "">;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import "../../../../utils/yupConfig.js";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
import "react-intl";
|
|
4
|
+
import "@mui/material";
|
|
5
|
+
import { DESCRIPTION_INPUT, NAME } from "../../../inputs/reactHookForm/DirectoryItemsInput.js";
|
|
6
|
+
import "react-hook-form";
|
|
7
|
+
import "../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
8
|
+
import "react";
|
|
9
|
+
import "../../../customAGGrid/customAggrid.js";
|
|
10
|
+
import "ag-grid-community";
|
|
11
|
+
import "react-papaparse";
|
|
12
|
+
import "react-csv-downloader";
|
|
13
|
+
import * as yup from "yup";
|
|
14
|
+
import "../../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
15
|
+
import "@mui/icons-material";
|
|
16
|
+
import "../../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
17
|
+
import "localized-countries";
|
|
18
|
+
import "localized-countries/data/fr";
|
|
19
|
+
import "localized-countries/data/en";
|
|
20
|
+
import "../../../../utils/conversionUtils.js";
|
|
21
|
+
import "../../../../utils/types/equipmentType.js";
|
|
22
|
+
import "notistack";
|
|
23
|
+
import "@react-querybuilder/material";
|
|
24
|
+
import "../../../filter/expert/expertFilterConstants.js";
|
|
25
|
+
import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
26
|
+
import "uuid";
|
|
27
|
+
import "../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
28
|
+
import "react-querybuilder";
|
|
29
|
+
function getNameElementEditorEmptyFormData(initialElementName, initialElementdescripton) {
|
|
30
|
+
return {
|
|
31
|
+
[NAME]: initialElementName,
|
|
32
|
+
[DESCRIPTION_INPUT]: initialElementdescripton
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function getNameElementEditorSchema(initialElementName) {
|
|
36
|
+
return yup.object().shape({
|
|
37
|
+
[NAME]: yup.string().when("nameRequiredWhenInitialNameIsSet", {
|
|
38
|
+
is: () => initialElementName !== null,
|
|
39
|
+
then: () => yup.string().required(),
|
|
40
|
+
otherwise: () => yup.string()
|
|
41
|
+
}),
|
|
42
|
+
[DESCRIPTION_INPUT]: yup.string()
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
getNameElementEditorEmptyFormData,
|
|
47
|
+
getNameElementEditorSchema
|
|
48
|
+
};
|
|
@@ -17,14 +17,20 @@ import { toFormValueSaParameters, toFormValuesLimitReductions } from "./common/l
|
|
|
17
17
|
import { LimitReductionsTableForm } from "./common/limitreductions/limit-reductions-table-form.js";
|
|
18
18
|
import { LimitReductionTableRow } from "./common/limitreductions/limit-reduction-table-row.js";
|
|
19
19
|
import { LimitReductionTableCell } from "./common/limitreductions/limit-reduction-table-cell.js";
|
|
20
|
+
import { CENTER_LABEL, COMPONENT_LIBRARY, DIAGONAL_LABEL, INIT_NAD_WITH_GEO_DATA, INTL_LINE_FLOW_MODE_OPTIONS, INTL_MAP_BASE_MAP_OPTIONS, INTL_SUBSTATION_LAYOUT_OPTIONS, LINE_FLOW_MODE, LineFlowMode, MAP_BASE_MAP, MAP_MANUAL_REFRESH, NetworkVisualizationTabValues, PARAM_CENTER_LABEL, PARAM_COMPONENT_LIBRARY, PARAM_DIAGONAL_LABEL, PARAM_INIT_NAD_WITH_GEO_DATA, PARAM_LINE_FLOW_MODE, PARAM_LINE_FULL_PATH, PARAM_LINE_PARALLEL_PATH, PARAM_MAP_BASEMAP, PARAM_MAP_MANUAL_REFRESH, PARAM_SUBSTATION_LAYOUT, SUBSTATION_LAYOUT } from "./network-visualizations/constants.js";
|
|
21
|
+
import { MAP_BASEMAP_CARTO, MAP_BASEMAP_CARTO_NOLABEL, MAP_BASEMAP_MAPBOX, SubstationLayout } from "./network-visualizations/network-visualizations.types.js";
|
|
22
|
+
import { NetworkVisualizationParametersInline } from "./network-visualizations/network-visualizations-parameters-inline.js";
|
|
23
|
+
import { NetworkVisualizationsParametersEditionDialog } from "./network-visualizations/network-visualizations-parameters-dialog.js";
|
|
20
24
|
import { getTabIndicatorStyle, getTabStyle, parametersStyles } from "./parameters-style.js";
|
|
21
25
|
import { BALANCE_TYPE, COMMON_PARAMETERS, CONNECTED_COMPONENT_MODE, COUNTRIES_TO_BALANCE, DC, DC_POWER_FACTOR, DC_USE_TRANSFORMER_RATIO, DEFAULT_LIMIT_REDUCTION_VALUE, DISTRIBUTED_SLACK, HVDC_AC_EMULATION, MAX_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, PARAM_LIMIT_REDUCTION, PARAM_PROVIDER_OPENLOADFLOW, PHASE_SHIFTER_REGULATION_ON, READ_SLACK_BUS, SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON, SPECIFIC_PARAMETERS, TRANSFORMER_VOLTAGE_CONTROL_ON, TWT_SPLIT_SHUNT_ADMITTANCE, USE_REACTIVE_LIMITS, VOLTAGE_INIT_MODE, WRITE_SLACK_BUS, alertThresholdMarks } from "./loadflow/constants.js";
|
|
22
26
|
import { LoadFlowParametersInline } from "./loadflow/load-flow-parameters-inline.js";
|
|
23
27
|
import { LoadFlowParametersEditionDialog } from "./loadflow/load-flow-parameters-dialog.js";
|
|
24
28
|
export {
|
|
25
29
|
BALANCE_TYPE,
|
|
30
|
+
CENTER_LABEL,
|
|
26
31
|
COLUMNS_DEFINITIONS_LIMIT_REDUCTIONS,
|
|
27
32
|
COMMON_PARAMETERS,
|
|
33
|
+
COMPONENT_LIBRARY,
|
|
28
34
|
CONNECTED_COMPONENT_MODE,
|
|
29
35
|
COUNTRIES_TO_BALANCE,
|
|
30
36
|
ComputingType,
|
|
@@ -36,21 +42,45 @@ export {
|
|
|
36
42
|
DC_POWER_FACTOR,
|
|
37
43
|
DC_USE_TRANSFORMER_RATIO,
|
|
38
44
|
DEFAULT_LIMIT_REDUCTION_VALUE,
|
|
45
|
+
DIAGONAL_LABEL,
|
|
39
46
|
DISTRIBUTED_SLACK,
|
|
40
47
|
HVDC_AC_EMULATION,
|
|
48
|
+
INIT_NAD_WITH_GEO_DATA,
|
|
49
|
+
INTL_LINE_FLOW_MODE_OPTIONS,
|
|
50
|
+
INTL_MAP_BASE_MAP_OPTIONS,
|
|
51
|
+
INTL_SUBSTATION_LAYOUT_OPTIONS,
|
|
41
52
|
IST_FORM,
|
|
42
53
|
LIMIT_DURATION_FORM,
|
|
43
54
|
LIMIT_REDUCTIONS_FORM,
|
|
55
|
+
LINE_FLOW_MODE,
|
|
44
56
|
LabelledButton,
|
|
45
57
|
LimitReductionTableCell,
|
|
46
58
|
LimitReductionTableRow,
|
|
47
59
|
LimitReductionsTableForm,
|
|
60
|
+
LineFlowMode,
|
|
48
61
|
LineSeparator,
|
|
49
62
|
LoadFlowParametersEditionDialog,
|
|
50
63
|
LoadFlowParametersInline,
|
|
64
|
+
MAP_BASEMAP_CARTO,
|
|
65
|
+
MAP_BASEMAP_CARTO_NOLABEL,
|
|
66
|
+
MAP_BASEMAP_MAPBOX,
|
|
67
|
+
MAP_BASE_MAP,
|
|
68
|
+
MAP_MANUAL_REFRESH,
|
|
51
69
|
MAX_VALUE_ALLOWED_FOR_LIMIT_REDUCTION,
|
|
52
70
|
MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION,
|
|
71
|
+
NetworkVisualizationParametersInline,
|
|
72
|
+
NetworkVisualizationTabValues,
|
|
73
|
+
NetworkVisualizationsParametersEditionDialog,
|
|
74
|
+
PARAM_CENTER_LABEL,
|
|
75
|
+
PARAM_COMPONENT_LIBRARY,
|
|
76
|
+
PARAM_DIAGONAL_LABEL,
|
|
77
|
+
PARAM_INIT_NAD_WITH_GEO_DATA,
|
|
53
78
|
PARAM_LIMIT_REDUCTION,
|
|
79
|
+
PARAM_LINE_FLOW_MODE,
|
|
80
|
+
PARAM_LINE_FULL_PATH,
|
|
81
|
+
PARAM_LINE_PARALLEL_PATH,
|
|
82
|
+
PARAM_MAP_BASEMAP,
|
|
83
|
+
PARAM_MAP_MANUAL_REFRESH,
|
|
54
84
|
PARAM_PROVIDER_OPENLOADFLOW,
|
|
55
85
|
PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD,
|
|
56
86
|
PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD,
|
|
@@ -58,6 +88,7 @@ export {
|
|
|
58
88
|
PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD,
|
|
59
89
|
PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD,
|
|
60
90
|
PARAM_SA_PROVIDER,
|
|
91
|
+
PARAM_SUBSTATION_LAYOUT,
|
|
61
92
|
PHASE_SHIFTER_REGULATION_ON,
|
|
62
93
|
PROVIDER,
|
|
63
94
|
ParameterFloat,
|
|
@@ -69,6 +100,8 @@ export {
|
|
|
69
100
|
READ_SLACK_BUS,
|
|
70
101
|
SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON,
|
|
71
102
|
SPECIFIC_PARAMETERS,
|
|
103
|
+
SUBSTATION_LAYOUT,
|
|
104
|
+
SubstationLayout,
|
|
72
105
|
SwitchWithLabel,
|
|
73
106
|
TAB_INFO,
|
|
74
107
|
TRANSFORMER_VOLTAGE_CONTROL_ON,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { Grid } from "@mui/material";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { CustomMuiDialog } from "../../dialogs/customMuiDialog/CustomMuiDialog.js";
|
|
4
3
|
import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
5
4
|
import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
6
5
|
import "react";
|
|
6
|
+
import "@mui/material";
|
|
7
7
|
import "react-intl";
|
|
8
8
|
import "react-hook-form";
|
|
9
9
|
import "@mui/icons-material";
|
|
10
|
-
import { FieldConstants } from "../../../utils/constants/fieldConstants.js";
|
|
11
10
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
12
11
|
import "../../treeViewFinder/TreeViewFinder.js";
|
|
13
12
|
import "notistack";
|
|
13
|
+
import { getLoadFlowDefaultLimitReductions, getLoadFlowSpecificParametersDescription, setLoadFlowParameters, fetchLoadFlowParameters, getDefaultLoadFlowProvider, getLoadFlowProviders } from "../../../services/loadflow.js";
|
|
14
14
|
import { ComputingType } from "../common/computing-type.js";
|
|
15
15
|
import "../../../utils/types/equipmentType.js";
|
|
16
16
|
import "localized-countries";
|
|
@@ -26,23 +26,20 @@ import "ag-grid-community";
|
|
|
26
26
|
import "react-papaparse";
|
|
27
27
|
import "react-csv-downloader";
|
|
28
28
|
import "../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
29
|
-
import
|
|
30
|
-
import
|
|
29
|
+
import "../../../utils/conversionUtils.js";
|
|
30
|
+
import "../../../utils/yupConfig.js";
|
|
31
31
|
import "@react-querybuilder/material";
|
|
32
32
|
import "../../filter/expert/expertFilterConstants.js";
|
|
33
33
|
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
34
34
|
import "uuid";
|
|
35
35
|
import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
36
36
|
import "react-querybuilder";
|
|
37
|
-
import "../../../utils/conversionUtils.js";
|
|
38
37
|
import "../common/widget/parameter-line-slider.js";
|
|
39
38
|
import "../common/limitreductions/columns-definitions.js";
|
|
40
|
-
import { getLoadFlowDefaultLimitReductions, getLoadFlowSpecificParametersDescription, setLoadFlowParameters, fetchLoadFlowParameters, getDefaultLoadFlowProvider, getLoadFlowProviders } from "../../../services/loadflow.js";
|
|
41
|
-
import "../../../utils/yupConfig.js";
|
|
42
|
-
import { filterStyles } from "../../filter/HeaderFilterForm.js";
|
|
43
39
|
import { LoadFlowProvider } from "./load-flow-parameters-provider.js";
|
|
44
40
|
import { useLoadFlowParametersForm } from "./use-load-flow-parameters-form.js";
|
|
45
41
|
import { LoadFlowParametersForm } from "./load-flow-parameters-form.js";
|
|
42
|
+
import { NameElementEditorForm } from "../common/name-element-editor/name-element-editor-form.js";
|
|
46
43
|
function LoadFlowParametersEditionDialog({
|
|
47
44
|
id,
|
|
48
45
|
open,
|
|
@@ -92,21 +89,14 @@ function LoadFlowParametersEditionDialog({
|
|
|
92
89
|
{
|
|
93
90
|
loadflowMethods,
|
|
94
91
|
renderTitleFields: () => {
|
|
95
|
-
return /* @__PURE__ */ jsx(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
activeDirectory,
|
|
104
|
-
sx: filterStyles.textField,
|
|
105
|
-
fullWidth: false
|
|
106
|
-
}
|
|
107
|
-
) }),
|
|
108
|
-
/* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(DescriptionField, { expandingTextSx: filterStyles.description }) })
|
|
109
|
-
] }) });
|
|
92
|
+
return /* @__PURE__ */ jsx(
|
|
93
|
+
NameElementEditorForm,
|
|
94
|
+
{
|
|
95
|
+
initialElementName: name,
|
|
96
|
+
activeDirectory,
|
|
97
|
+
elementType: ElementType.LOADFLOW_PARAMETERS
|
|
98
|
+
}
|
|
99
|
+
);
|
|
110
100
|
}
|
|
111
101
|
}
|
|
112
102
|
) })
|
|
@@ -95,7 +95,7 @@ function LoadFlowParametersForm({
|
|
|
95
95
|
}
|
|
96
96
|
) })
|
|
97
97
|
] }) : /* @__PURE__ */ jsx(LinearProgress, {}),
|
|
98
|
-
renderActions && /* @__PURE__ */ jsx(Box, { sx: styles.actions, children: renderActions
|
|
98
|
+
renderActions && /* @__PURE__ */ jsx(Box, { sx: styles.actions, children: renderActions() })
|
|
99
99
|
] }) });
|
|
100
100
|
}
|
|
101
101
|
export {
|
|
@@ -5,6 +5,7 @@ import { useIntl, FormattedMessage } from "react-intl";
|
|
|
5
5
|
import { LoadFlowProvider } from "./load-flow-parameters-provider.js";
|
|
6
6
|
import { parametersStyles } from "../parameters-style.js";
|
|
7
7
|
import "../../../utils/types/equipmentType.js";
|
|
8
|
+
import { fetchLoadFlowParameters } from "../../../services/loadflow.js";
|
|
8
9
|
import "localized-countries";
|
|
9
10
|
import "localized-countries/data/fr";
|
|
10
11
|
import "localized-countries/data/en";
|
|
@@ -37,7 +38,6 @@ import { LineSeparator } from "../common/line-separator.js";
|
|
|
37
38
|
import { CreateParameterDialog } from "../common/parameters-creation-dialog.js";
|
|
38
39
|
import "../common/widget/parameter-line-slider.js";
|
|
39
40
|
import "../common/limitreductions/columns-definitions.js";
|
|
40
|
-
import { fetchLoadFlowParameters } from "../../../services/loadflow.js";
|
|
41
41
|
import { useLoadFlowParametersForm } from "./use-load-flow-parameters-form.js";
|
|
42
42
|
import { LoadFlowParametersForm } from "./load-flow-parameters-form.js";
|
|
43
43
|
function LoadFlowParametersInline({
|
|
@@ -39,6 +39,8 @@ import "../common/widget/parameter-line-slider.js";
|
|
|
39
39
|
import { getLimitReductionsFormSchema, LIMIT_REDUCTIONS_FORM } from "../common/limitreductions/columns-definitions.js";
|
|
40
40
|
import { toFormValuesLimitReductions } from "../common/limitreductions/limit-reductions-form-util.js";
|
|
41
41
|
import { PARAM_LIMIT_REDUCTION, SPECIFIC_PARAMETERS, COMMON_PARAMETERS, PARAM_PROVIDER_OPENLOADFLOW } from "./constants.js";
|
|
42
|
+
import "../../filter/HeaderFilterForm.js";
|
|
43
|
+
import { getNameElementEditorSchema, getNameElementEditorEmptyFormData } from "../common/name-element-editor/name-element-editor-utils.js";
|
|
42
44
|
const useLoadFlowParametersForm = (parametersBackend, enableDeveloperMode, parametersUuid, name, description) => {
|
|
43
45
|
const [
|
|
44
46
|
providers,
|
|
@@ -85,12 +87,11 @@ const useLoadFlowParametersForm = (parametersBackend, enableDeveloperMode, param
|
|
|
85
87
|
(params == null ? void 0 : params.limitReductions) ? (_a = params.limitReductions[0]) == null ? void 0 : _a.temporaryLimitReductions.length : 0
|
|
86
88
|
).fields,
|
|
87
89
|
...getSpecificLoadFlowParametersFormSchema(specificParameters).fields
|
|
88
|
-
});
|
|
90
|
+
}).concat(getNameElementEditorSchema(name));
|
|
89
91
|
}, [name, params == null ? void 0 : params.limitReductions, specificParameters]);
|
|
90
92
|
const formMethods = useForm({
|
|
91
93
|
defaultValues: {
|
|
92
|
-
|
|
93
|
-
[DESCRIPTION_INPUT]: description,
|
|
94
|
+
...getNameElementEditorEmptyFormData(name, description),
|
|
94
95
|
[PROVIDER]: provider,
|
|
95
96
|
[PARAM_LIMIT_REDUCTION]: null,
|
|
96
97
|
[COMMON_PARAMETERS]: {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { SubstationLayout } from './network-visualizations.types';
|
|
2
|
+
export declare enum LineFlowMode {
|
|
3
|
+
STATIC_ARROWS = "staticArrows",
|
|
4
|
+
ANIMATED_ARROWS = "animatedArrows",
|
|
5
|
+
FEEDERS = "feeders"
|
|
6
|
+
}
|
|
7
|
+
export declare const PARAM_LINE_FULL_PATH = "lineFullPath";
|
|
8
|
+
export declare const PARAM_LINE_PARALLEL_PATH = "lineParallelPath";
|
|
9
|
+
export declare const PARAM_LINE_FLOW_MODE = "lineFlowMode";
|
|
10
|
+
export declare const PARAM_MAP_MANUAL_REFRESH = "mapManualRefresh";
|
|
11
|
+
export declare const PARAM_MAP_BASEMAP = "mapBaseMap";
|
|
12
|
+
export declare const PARAM_CENTER_LABEL = "centerLabel";
|
|
13
|
+
export declare const PARAM_COMPONENT_LIBRARY = "componentLibrary";
|
|
14
|
+
export declare const PARAM_DIAGONAL_LABEL = "diagonalLabel";
|
|
15
|
+
export declare const PARAM_SUBSTATION_LAYOUT = "substationLayout";
|
|
16
|
+
export declare const PARAM_INIT_NAD_WITH_GEO_DATA = "initNadWithGeoData";
|
|
17
|
+
export declare enum NetworkVisualizationTabValues {
|
|
18
|
+
MAP = "mapParameters",
|
|
19
|
+
SINGLE_LINE_DIAGRAM = "singleLineDiagramParameters",
|
|
20
|
+
NETWORK_AREA_DIAGRAM = "networkAreaDiagramParameters"
|
|
21
|
+
}
|
|
22
|
+
export declare const MAP_MANUAL_REFRESH = "MapManualRefresh";
|
|
23
|
+
export declare const LINE_FLOW_MODE = "LineFlowMode";
|
|
24
|
+
export declare const MAP_BASE_MAP = "MapBaseMap";
|
|
25
|
+
export declare const DIAGONAL_LABEL = "diagonalLabel";
|
|
26
|
+
export declare const CENTER_LABEL = "centerLabel";
|
|
27
|
+
export declare const SUBSTATION_LAYOUT = "SubstationLayout";
|
|
28
|
+
export declare const COMPONENT_LIBRARY = "ComponentLibrary";
|
|
29
|
+
export declare const INIT_NAD_WITH_GEO_DATA = "initNadWithGeoData";
|
|
30
|
+
export declare const INTL_LINE_FLOW_MODE_OPTIONS: {
|
|
31
|
+
id: LineFlowMode;
|
|
32
|
+
label: string;
|
|
33
|
+
}[];
|
|
34
|
+
export declare const INTL_MAP_BASE_MAP_OPTIONS: {
|
|
35
|
+
id: string;
|
|
36
|
+
label: string;
|
|
37
|
+
}[];
|
|
38
|
+
export declare const INTL_SUBSTATION_LAYOUT_OPTIONS: {
|
|
39
|
+
id: SubstationLayout;
|
|
40
|
+
label: string;
|
|
41
|
+
}[];
|