@gridsuite/commons-ui 0.137.0 → 0.138.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/index.js +3 -5
- package/dist/components/parameters/common/widget/parameter-line-directory-items-input.d.ts +2 -1
- package/dist/components/parameters/common/widget/parameter-line-directory-items-input.js +4 -2
- package/dist/components/parameters/index.d.ts +1 -0
- package/dist/components/parameters/index.js +3 -5
- package/dist/components/parameters/pcc-min/index.d.ts +7 -0
- package/dist/components/parameters/pcc-min/index.js +4 -0
- package/dist/components/parameters/pcc-min/pcc-min-form-utils.d.ts +4 -0
- package/dist/components/parameters/pcc-min/pcc-min-form-utils.js +54 -0
- package/dist/components/parameters/pcc-min/pcc-min-parameters-form.d.ts +29 -0
- package/dist/components/parameters/pcc-min/pcc-min-parameters-form.js +114 -0
- package/dist/components/parameters/pcc-min/pcc-min-parameters-inline.d.ts +7 -0
- package/dist/components/parameters/pcc-min/pcc-min-parameters-inline.js +98 -0
- package/dist/components/parameters/pcc-min/use-pcc-min-parameters-form.d.ts +19 -0
- package/dist/components/parameters/pcc-min/use-pcc-min-parameters-form.js +104 -0
- package/dist/components/parameters/sensi/utils.d.ts +1 -1
- package/dist/components/parameters/sensi/utils.js +1 -3
- package/dist/components/parameters/voltage-init/constants.d.ts +0 -4
- package/dist/components/parameters/voltage-init/constants.js +0 -8
- package/dist/components/parameters/voltage-init/index.js +1 -5
- package/dist/components/parameters/voltage-init/use-voltage-init-parameters-form.js +2 -1
- package/dist/components/parameters/voltage-init/voltage-init-form-utils.js +2 -1
- package/dist/components/parameters/voltage-init/voltage-init.type.d.ts +2 -6
- package/dist/components/parameters/voltage-init/voltage-limits-parameters.js +2 -1
- package/dist/index.js +7 -1
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.js +3 -0
- package/dist/services/pcc-min.d.ts +7 -0
- package/dist/services/pcc-min.js +25 -0
- package/dist/translations/en/parameters.d.ts +3 -0
- package/dist/translations/en/parameters.js +4 -1
- package/dist/translations/fr/parameters.d.ts +3 -0
- package/dist/translations/fr/parameters.js +4 -1
- package/dist/utils/constants/filterConstant.d.ts +9 -0
- package/dist/utils/constants/filterConstant.js +10 -0
- package/dist/utils/constants/index.d.ts +1 -0
- package/dist/utils/constants/index.js +5 -0
- package/dist/utils/index.js +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ Only in this case, you need to follow the steps below:
|
|
|
46
46
|
- [Make a release action](https://github.com/gridsuite/commons-ui/actions/workflows/release.yml)
|
|
47
47
|
- In the 'run workflow' combobox select, let the branch on main
|
|
48
48
|
- Enter the type of evolution (major | minor | patch)
|
|
49
|
-
- Enter your NPM access token (
|
|
49
|
+
- Enter your NPM access token (check the **Bypass two-factor authentication** checkbox to bypass 2FA, see the [access token documentation](https://docs.npmjs.com/creating-and-viewing-access-tokens) for details)
|
|
50
50
|
- Click 'run workflow'
|
|
51
51
|
|
|
52
52
|
Otherwise ask someone who has the permission.
|
package/dist/components/index.js
CHANGED
|
@@ -160,10 +160,11 @@ import { LoadFlowParametersEditionDialog } from "./parameters/loadflow/load-flow
|
|
|
160
160
|
import { InitialVoltage, PredefinedParameters, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_WITH_FEEDER_RESULT, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, intlInitialVoltageProfileMode, intlPredefinedParametersOptions } from "./parameters/short-circuit/constants.js";
|
|
161
161
|
import { ShortCircuitParametersInLine } from "./parameters/short-circuit/short-circuit-parameters-inline.js";
|
|
162
162
|
import { ShortCircuitParametersEditionDialog } from "./parameters/short-circuit/short-circuit-parameters-dialog.js";
|
|
163
|
-
import { DEFAULT_GENERAL_APPLY_MODIFICATIONS, DEFAULT_REACTIVE_SLACKS_THRESHOLD, DEFAULT_SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, DEFAULT_UPDATE_BUS_VOLTAGE,
|
|
163
|
+
import { DEFAULT_GENERAL_APPLY_MODIFICATIONS, DEFAULT_REACTIVE_SLACKS_THRESHOLD, DEFAULT_SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, DEFAULT_UPDATE_BUS_VOLTAGE, GENERAL, GENERAL_APPLY_MODIFICATIONS, GENERATORS_SELECTION_TYPE, HIGH_VOLTAGE_LIMIT, LEG_SIDE, LOW_VOLTAGE_LIMIT, PRIORITY, RATIO_TAP_CHANGER_POSITION, RATIO_TAP_CHANGER_TARGET_V, REACTIVE_SLACKS_THRESHOLD, SELECTION_TYPE, SHUNT_COMPENSATORS_SELECTION_TYPE, SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, TRANSFORMERS_SELECTION_TYPE, UPDATE_BUS_VOLTAGE, VARIABLE_Q_GENERATORS, VARIABLE_SHUNT_COMPENSATORS, VARIABLE_TRANSFORMERS, VOLTAGE_LIMITS_DEFAULT, VOLTAGE_LIMITS_MODIFICATION, VoltageInitTabValues } from "./parameters/voltage-init/constants.js";
|
|
164
164
|
import { EquipmentsSelectionType } from "./parameters/voltage-init/voltage-init.type.js";
|
|
165
165
|
import { VoltageInitParametersEditionDialog } from "./parameters/voltage-init/voltage-init-parameters-dialog.js";
|
|
166
166
|
import { VoltageInitParametersInLine } from "./parameters/voltage-init/voltage-init-parameters-inline.js";
|
|
167
|
+
import { PccMinParametersInLine } from "./parameters/pcc-min/pcc-min-parameters-inline.js";
|
|
167
168
|
import { SecurityAnalysisParametersInline } from "./parameters/security-analysis/security-analysis-parameters-inline.js";
|
|
168
169
|
import { SecurityAnalysisParametersDialog } from "./parameters/security-analysis/security-analysis-parameters-dialog.js";
|
|
169
170
|
import { SensitivityAnalysisParametersInline } from "./parameters/sensi/sensitivity-analysis-parameters-inline.js";
|
|
@@ -270,11 +271,8 @@ export {
|
|
|
270
271
|
ExplicitNamingFilterForm,
|
|
271
272
|
ExportCsvButton,
|
|
272
273
|
FIELDS_OPTIONS,
|
|
273
|
-
FILTERS,
|
|
274
274
|
FILTER_EQUIPMENTS,
|
|
275
275
|
FILTER_EQUIPMENTS_ATTRIBUTES,
|
|
276
|
-
FILTER_ID,
|
|
277
|
-
FILTER_NAME,
|
|
278
276
|
FieldErrorAlert,
|
|
279
277
|
FieldLabel,
|
|
280
278
|
FilterCreationDialog,
|
|
@@ -291,7 +289,6 @@ export {
|
|
|
291
289
|
HVDC_AC_EMULATION,
|
|
292
290
|
HVDC_EQUIPMENT_TYPES,
|
|
293
291
|
HelperPreviousValue,
|
|
294
|
-
ID,
|
|
295
292
|
INJECTIONS_EQUIPMENT_TYPES,
|
|
296
293
|
INJECTION_DISTRIBUTION_TYPES,
|
|
297
294
|
INTL_LINE_FLOW_MODE_OPTIONS,
|
|
@@ -380,6 +377,7 @@ export {
|
|
|
380
377
|
ParameterLineDirectoryItemsInput,
|
|
381
378
|
ParameterLineSlider,
|
|
382
379
|
ParameterSwitch,
|
|
380
|
+
PccMinParametersInLine,
|
|
383
381
|
PhotoLibraryIcon,
|
|
384
382
|
PopupConfirmationDialog,
|
|
385
383
|
PredefinedParameters,
|
|
@@ -10,6 +10,7 @@ type DirectoryItemsInputLineProps = {
|
|
|
10
10
|
equipmentTypes?: string[];
|
|
11
11
|
elementType: string;
|
|
12
12
|
hideErrorMessage: boolean;
|
|
13
|
+
allowMultiSelect?: boolean;
|
|
13
14
|
};
|
|
14
|
-
export declare function ParameterLineDirectoryItemsInput({ label, name, equipmentTypes, elementType, hideErrorMessage, }: Readonly<DirectoryItemsInputLineProps>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function ParameterLineDirectoryItemsInput({ label, name, equipmentTypes, elementType, hideErrorMessage, allowMultiSelect, }: Readonly<DirectoryItemsInputLineProps>): import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
export {};
|
|
@@ -33,7 +33,8 @@ function ParameterLineDirectoryItemsInput({
|
|
|
33
33
|
name,
|
|
34
34
|
equipmentTypes,
|
|
35
35
|
elementType,
|
|
36
|
-
hideErrorMessage
|
|
36
|
+
hideErrorMessage,
|
|
37
|
+
allowMultiSelect = true
|
|
37
38
|
}) {
|
|
38
39
|
return /* @__PURE__ */ jsxs(Grid, { item: true, container: true, spacing: 1, paddingTop: 1, paddingBottom: 1, children: [
|
|
39
40
|
/* @__PURE__ */ jsx(Grid, { item: true, xs: 7, sx: parametersStyles.parameterName, children: /* @__PURE__ */ jsx(FormattedMessage, { id: label }) }),
|
|
@@ -46,7 +47,8 @@ function ParameterLineDirectoryItemsInput({
|
|
|
46
47
|
titleId: label,
|
|
47
48
|
hideErrorMessage,
|
|
48
49
|
label: void 0,
|
|
49
|
-
itemFilter: void 0
|
|
50
|
+
itemFilter: void 0,
|
|
51
|
+
allowMultiSelect
|
|
50
52
|
}
|
|
51
53
|
) })
|
|
52
54
|
] });
|
|
@@ -27,10 +27,11 @@ import { LoadFlowParametersEditionDialog } from "./loadflow/load-flow-parameters
|
|
|
27
27
|
import { InitialVoltage, PredefinedParameters, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_WITH_FEEDER_RESULT, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, intlInitialVoltageProfileMode, intlPredefinedParametersOptions } from "./short-circuit/constants.js";
|
|
28
28
|
import { ShortCircuitParametersInLine } from "./short-circuit/short-circuit-parameters-inline.js";
|
|
29
29
|
import { ShortCircuitParametersEditionDialog } from "./short-circuit/short-circuit-parameters-dialog.js";
|
|
30
|
-
import { DEFAULT_GENERAL_APPLY_MODIFICATIONS, DEFAULT_REACTIVE_SLACKS_THRESHOLD, DEFAULT_SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, DEFAULT_UPDATE_BUS_VOLTAGE,
|
|
30
|
+
import { DEFAULT_GENERAL_APPLY_MODIFICATIONS, DEFAULT_REACTIVE_SLACKS_THRESHOLD, DEFAULT_SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, DEFAULT_UPDATE_BUS_VOLTAGE, GENERAL, GENERAL_APPLY_MODIFICATIONS, GENERATORS_SELECTION_TYPE, HIGH_VOLTAGE_LIMIT, LEG_SIDE, LOW_VOLTAGE_LIMIT, PRIORITY, RATIO_TAP_CHANGER_POSITION, RATIO_TAP_CHANGER_TARGET_V, REACTIVE_SLACKS_THRESHOLD, SELECTION_TYPE, SHUNT_COMPENSATORS_SELECTION_TYPE, SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, TRANSFORMERS_SELECTION_TYPE, UPDATE_BUS_VOLTAGE, VARIABLE_Q_GENERATORS, VARIABLE_SHUNT_COMPENSATORS, VARIABLE_TRANSFORMERS, VOLTAGE_LIMITS_DEFAULT, VOLTAGE_LIMITS_MODIFICATION, VoltageInitTabValues } from "./voltage-init/constants.js";
|
|
31
31
|
import { EquipmentsSelectionType } from "./voltage-init/voltage-init.type.js";
|
|
32
32
|
import { VoltageInitParametersEditionDialog } from "./voltage-init/voltage-init-parameters-dialog.js";
|
|
33
33
|
import { VoltageInitParametersInLine } from "./voltage-init/voltage-init-parameters-inline.js";
|
|
34
|
+
import { PccMinParametersInLine } from "./pcc-min/pcc-min-parameters-inline.js";
|
|
34
35
|
import { SecurityAnalysisParametersInline } from "./security-analysis/security-analysis-parameters-inline.js";
|
|
35
36
|
import { SecurityAnalysisParametersDialog } from "./security-analysis/security-analysis-parameters-dialog.js";
|
|
36
37
|
import { SensitivityAnalysisParametersInline } from "./sensi/sensitivity-analysis-parameters-inline.js";
|
|
@@ -67,16 +68,12 @@ export {
|
|
|
67
68
|
DISTRIBUTED_SLACK,
|
|
68
69
|
EQUIPMENTS_IN_VOLTAGE_REGULATION_TYPES,
|
|
69
70
|
EquipmentsSelectionType,
|
|
70
|
-
FILTERS,
|
|
71
|
-
FILTER_ID,
|
|
72
|
-
FILTER_NAME,
|
|
73
71
|
GENERAL,
|
|
74
72
|
GENERAL_APPLY_MODIFICATIONS,
|
|
75
73
|
GENERATORS_SELECTION_TYPE,
|
|
76
74
|
HIGH_VOLTAGE_LIMIT,
|
|
77
75
|
HVDC_AC_EMULATION,
|
|
78
76
|
HVDC_EQUIPMENT_TYPES,
|
|
79
|
-
ID,
|
|
80
77
|
INJECTIONS_EQUIPMENT_TYPES,
|
|
81
78
|
INJECTION_DISTRIBUTION_TYPES,
|
|
82
79
|
INTL_LINE_FLOW_MODE_OPTIONS,
|
|
@@ -140,6 +137,7 @@ export {
|
|
|
140
137
|
ParameterLineDirectoryItemsInput,
|
|
141
138
|
ParameterLineSlider,
|
|
142
139
|
ParameterSwitch,
|
|
140
|
+
PccMinParametersInLine,
|
|
143
141
|
PredefinedParameters,
|
|
144
142
|
ProviderParam,
|
|
145
143
|
RATIO_TAP_CHANGER_POSITION,
|
|
@@ -0,0 +1,7 @@
|
|
|
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 './pcc-min-parameters-inline';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PccMinParameters } from '../../../services';
|
|
2
|
+
export declare const fromPccMinParametersFormToParamValues: (newParams: Record<string, any>) => PccMinParameters | null;
|
|
3
|
+
export declare const fromPccMinParamsDataToFormValues: (parameters: PccMinParameters | null) => Record<string, any>;
|
|
4
|
+
export declare const fromStudyPccMinParamsDataToFormValues: (parameters: PccMinParameters | null) => Record<string, any>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { FILTERS, ID, FILTER_NAME, FILTER_ID } from "../../../utils/constants/filterConstant.js";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
import "react-intl";
|
|
4
|
+
import "@mui/material";
|
|
5
|
+
import "../../overflowableText/OverflowableText.js";
|
|
6
|
+
import "react";
|
|
7
|
+
import "react-hook-form";
|
|
8
|
+
import "../../../utils/types/equipmentType.js";
|
|
9
|
+
import "../../../utils/conversionUtils.js";
|
|
10
|
+
import "@mui/icons-material";
|
|
11
|
+
import "../../../utils/yupConfig.js";
|
|
12
|
+
import "localized-countries";
|
|
13
|
+
import "localized-countries/data/fr";
|
|
14
|
+
import "localized-countries/data/en";
|
|
15
|
+
import "notistack";
|
|
16
|
+
import "../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
17
|
+
import "yup";
|
|
18
|
+
import "../../treeViewFinder/TreeViewFinder.js";
|
|
19
|
+
import { NAME } from "../../inputs/reactHookForm/constants.js";
|
|
20
|
+
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
21
|
+
import "../../customAGGrid/customAggrid.js";
|
|
22
|
+
import "ag-grid-community";
|
|
23
|
+
import "react-papaparse";
|
|
24
|
+
import "react-csv-downloader";
|
|
25
|
+
import "../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
26
|
+
import "@react-querybuilder/material";
|
|
27
|
+
import "../../filter/expert/expertFilterConstants.js";
|
|
28
|
+
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
29
|
+
import "uuid";
|
|
30
|
+
import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
31
|
+
import "react-querybuilder";
|
|
32
|
+
const fromPccMinParametersFormToParamValues = (newParams) => ({
|
|
33
|
+
filters: newParams[FILTERS]?.map((filter) => ({
|
|
34
|
+
filterId: filter[ID],
|
|
35
|
+
filterName: filter[NAME]
|
|
36
|
+
})) ?? []
|
|
37
|
+
});
|
|
38
|
+
const fromPccMinParamsDataToFormValues = (parameters) => ({
|
|
39
|
+
[FILTERS]: parameters?.[FILTERS]?.map((filter) => ({
|
|
40
|
+
[ID]: filter[FILTER_ID],
|
|
41
|
+
[NAME]: filter[FILTER_NAME]
|
|
42
|
+
})) ?? []
|
|
43
|
+
});
|
|
44
|
+
const fromStudyPccMinParamsDataToFormValues = (parameters) => ({
|
|
45
|
+
[FILTERS]: parameters?.[FILTERS]?.map((filter) => ({
|
|
46
|
+
[ID]: filter[FILTER_ID],
|
|
47
|
+
[NAME]: filter[FILTER_NAME]
|
|
48
|
+
})) ?? []
|
|
49
|
+
});
|
|
50
|
+
export {
|
|
51
|
+
fromPccMinParametersFormToParamValues,
|
|
52
|
+
fromPccMinParamsDataToFormValues,
|
|
53
|
+
fromStudyPccMinParamsDataToFormValues
|
|
54
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { UsePccMinParametersFormReturn } from './use-pcc-min-parameters-form';
|
|
3
|
+
export declare const styles: {
|
|
4
|
+
readonly gridWithActions: (theme: import('@mui/material').Theme) => {
|
|
5
|
+
overflowY: "auto";
|
|
6
|
+
overflowX: "hidden";
|
|
7
|
+
paddingRight: string;
|
|
8
|
+
paddingTop: string;
|
|
9
|
+
paddingBottom: string;
|
|
10
|
+
flexGrow: number;
|
|
11
|
+
maxHeight: string;
|
|
12
|
+
};
|
|
13
|
+
readonly gridWithoutActions: (theme: import('@mui/material').Theme) => {
|
|
14
|
+
overflowY: "auto";
|
|
15
|
+
overflowX: "hidden";
|
|
16
|
+
paddingRight: string;
|
|
17
|
+
paddingTop: string;
|
|
18
|
+
paddingBottom: string;
|
|
19
|
+
flexGrow: number;
|
|
20
|
+
maxHeight: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
interface PccMinParametersFormProps {
|
|
24
|
+
pccMinMethods: UsePccMinParametersFormReturn;
|
|
25
|
+
renderTitleFields?: () => ReactNode;
|
|
26
|
+
renderActions?: () => ReactNode;
|
|
27
|
+
}
|
|
28
|
+
export declare function PccMinParametersForm({ pccMinMethods, renderTitleFields, renderActions, }: Readonly<PccMinParametersFormProps>): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Grid, LinearProgress } from "@mui/material";
|
|
3
|
+
import "react-intl";
|
|
4
|
+
import "../../overflowableText/OverflowableText.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import "react-hook-form";
|
|
7
|
+
import { EquipmentType } from "../../../utils/types/equipmentType.js";
|
|
8
|
+
import { FILTERS } from "../../../utils/constants/filterConstant.js";
|
|
9
|
+
import "../../../utils/conversionUtils.js";
|
|
10
|
+
import "@mui/icons-material";
|
|
11
|
+
import { ElementType } from "../../../utils/types/elementType.js";
|
|
12
|
+
import "../../../utils/yupConfig.js";
|
|
13
|
+
import "localized-countries";
|
|
14
|
+
import "localized-countries/data/fr";
|
|
15
|
+
import "localized-countries/data/en";
|
|
16
|
+
import "notistack";
|
|
17
|
+
import { CustomFormProvider } from "../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
18
|
+
import "yup";
|
|
19
|
+
import "../../treeViewFinder/TreeViewFinder.js";
|
|
20
|
+
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
21
|
+
import "../../customAGGrid/customAggrid.js";
|
|
22
|
+
import "ag-grid-community";
|
|
23
|
+
import "react-papaparse";
|
|
24
|
+
import "react-csv-downloader";
|
|
25
|
+
import "../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
26
|
+
import "@react-querybuilder/material";
|
|
27
|
+
import "../../filter/expert/expertFilterConstants.js";
|
|
28
|
+
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
29
|
+
import "uuid";
|
|
30
|
+
import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
31
|
+
import "react-querybuilder";
|
|
32
|
+
import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
33
|
+
import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
34
|
+
import { ParameterLineDirectoryItemsInput } from "../common/widget/parameter-line-directory-items-input.js";
|
|
35
|
+
import "../common/widget/parameter-line-slider.js";
|
|
36
|
+
import "../common/limitreductions/columns-definitions.js";
|
|
37
|
+
const styles = {
|
|
38
|
+
gridWithActions: (theme) => ({
|
|
39
|
+
overflowY: "auto",
|
|
40
|
+
overflowX: "hidden",
|
|
41
|
+
paddingRight: theme.spacing(2),
|
|
42
|
+
paddingTop: theme.spacing(2),
|
|
43
|
+
paddingBottom: theme.spacing(1),
|
|
44
|
+
flexGrow: 1,
|
|
45
|
+
maxHeight: "85%"
|
|
46
|
+
}),
|
|
47
|
+
gridWithoutActions: (theme) => ({
|
|
48
|
+
overflowY: "auto",
|
|
49
|
+
overflowX: "hidden",
|
|
50
|
+
paddingRight: theme.spacing(2),
|
|
51
|
+
paddingTop: theme.spacing(2),
|
|
52
|
+
paddingBottom: theme.spacing(1),
|
|
53
|
+
flexGrow: 1,
|
|
54
|
+
maxHeight: "100%"
|
|
55
|
+
})
|
|
56
|
+
};
|
|
57
|
+
function PccMinParametersForm({
|
|
58
|
+
pccMinMethods,
|
|
59
|
+
renderTitleFields,
|
|
60
|
+
renderActions
|
|
61
|
+
}) {
|
|
62
|
+
const { formMethods, formSchema, paramsLoading } = pccMinMethods;
|
|
63
|
+
return /* @__PURE__ */ jsx(CustomFormProvider, { validationSchema: formSchema, ...formMethods, removeOptional: true, children: /* @__PURE__ */ jsxs(
|
|
64
|
+
Box,
|
|
65
|
+
{
|
|
66
|
+
sx: {
|
|
67
|
+
height: "100%",
|
|
68
|
+
position: "relative"
|
|
69
|
+
},
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ jsxs(Grid, { item: true, container: true, sx: renderActions ? styles.gridWithActions : styles.gridWithoutActions, children: [
|
|
72
|
+
/* @__PURE__ */ jsx(Grid, { item: true, container: true, direction: "column", children: renderTitleFields?.() }),
|
|
73
|
+
paramsLoading ? /* @__PURE__ */ jsx(LinearProgress, {}) : /* @__PURE__ */ jsx(
|
|
74
|
+
Box,
|
|
75
|
+
{
|
|
76
|
+
sx: {
|
|
77
|
+
height: "100%",
|
|
78
|
+
width: "100%"
|
|
79
|
+
},
|
|
80
|
+
children: /* @__PURE__ */ jsx(Grid, { item: true, container: true, direction: "column", children: /* @__PURE__ */ jsx(
|
|
81
|
+
ParameterLineDirectoryItemsInput,
|
|
82
|
+
{
|
|
83
|
+
name: FILTERS,
|
|
84
|
+
equipmentTypes: [EquipmentType.VOLTAGE_LEVEL],
|
|
85
|
+
elementType: ElementType.FILTER,
|
|
86
|
+
label: "pccMinParamFilter",
|
|
87
|
+
hideErrorMessage: true,
|
|
88
|
+
allowMultiSelect: false
|
|
89
|
+
}
|
|
90
|
+
) })
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
] }),
|
|
94
|
+
renderActions && /* @__PURE__ */ jsx(
|
|
95
|
+
Grid,
|
|
96
|
+
{
|
|
97
|
+
item: true,
|
|
98
|
+
container: true,
|
|
99
|
+
direction: "column",
|
|
100
|
+
sx: {
|
|
101
|
+
position: "fixed",
|
|
102
|
+
bottom: "15px"
|
|
103
|
+
},
|
|
104
|
+
children: renderActions()
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
) });
|
|
110
|
+
}
|
|
111
|
+
export {
|
|
112
|
+
PccMinParametersForm,
|
|
113
|
+
styles
|
|
114
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
2
|
+
import { PccMinParameters } from '../../../services/pcc-min';
|
|
3
|
+
export declare function PccMinParametersInLine({ studyUuid, setHaveDirtyFields, pccMinParameters, }: Readonly<{
|
|
4
|
+
studyUuid: UUID | null;
|
|
5
|
+
setHaveDirtyFields: (isDirty: boolean) => void;
|
|
6
|
+
pccMinParameters: PccMinParameters | null;
|
|
7
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useCallback, useEffect } from "react";
|
|
3
|
+
import { Box, Grid } from "@mui/material";
|
|
4
|
+
import { FormattedMessage } from "react-intl";
|
|
5
|
+
import "../../../utils/types/equipmentType.js";
|
|
6
|
+
import "../../../utils/conversionUtils.js";
|
|
7
|
+
import "@mui/icons-material";
|
|
8
|
+
import "../../../utils/yupConfig.js";
|
|
9
|
+
import { updatePccMinParameters } from "../../../services/pcc-min.js";
|
|
10
|
+
import "localized-countries";
|
|
11
|
+
import "localized-countries/data/fr";
|
|
12
|
+
import "localized-countries/data/en";
|
|
13
|
+
import { useSnackMessage } from "../../../hooks/useSnackMessage.js";
|
|
14
|
+
import "react-hook-form";
|
|
15
|
+
import "../../overflowableText/OverflowableText.js";
|
|
16
|
+
import "../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
17
|
+
import { SubmitButton } from "../../inputs/reactHookForm/utils/SubmitButton.js";
|
|
18
|
+
import "yup";
|
|
19
|
+
import "../../treeViewFinder/TreeViewFinder.js";
|
|
20
|
+
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
21
|
+
import "../../customAGGrid/customAggrid.js";
|
|
22
|
+
import "ag-grid-community";
|
|
23
|
+
import "react-papaparse";
|
|
24
|
+
import "react-csv-downloader";
|
|
25
|
+
import "../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
26
|
+
import { PopupConfirmationDialog } from "../../dialogs/popupConfirmationDialog/PopupConfirmationDialog.js";
|
|
27
|
+
import "@react-querybuilder/material";
|
|
28
|
+
import "../../filter/expert/expertFilterConstants.js";
|
|
29
|
+
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
30
|
+
import "uuid";
|
|
31
|
+
import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
32
|
+
import "react-querybuilder";
|
|
33
|
+
import { LabelledButton } from "../common/parameters.js";
|
|
34
|
+
import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
35
|
+
import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
36
|
+
import "../common/widget/parameter-line-slider.js";
|
|
37
|
+
import "../common/limitreductions/columns-definitions.js";
|
|
38
|
+
import { UsePccMinParametersForm } from "./use-pcc-min-parameters-form.js";
|
|
39
|
+
import { PccMinParametersForm } from "./pcc-min-parameters-form.js";
|
|
40
|
+
function PccMinParametersInLine({
|
|
41
|
+
studyUuid,
|
|
42
|
+
setHaveDirtyFields,
|
|
43
|
+
pccMinParameters
|
|
44
|
+
}) {
|
|
45
|
+
const pccMinMethods = UsePccMinParametersForm({
|
|
46
|
+
parametersUuid: null,
|
|
47
|
+
studyUuid,
|
|
48
|
+
parameters: pccMinParameters
|
|
49
|
+
});
|
|
50
|
+
const [openResetConfirmation, setOpenResetConfirmation] = useState(false);
|
|
51
|
+
const { snackError } = useSnackMessage();
|
|
52
|
+
const { formState, handleSubmit } = pccMinMethods.formMethods;
|
|
53
|
+
const resetPccMinParameters = useCallback(() => {
|
|
54
|
+
updatePccMinParameters(studyUuid, null).catch((error) => {
|
|
55
|
+
snackError({
|
|
56
|
+
messageTxt: error.message,
|
|
57
|
+
headerId: "updatePccMinParametersError"
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
setOpenResetConfirmation(false);
|
|
61
|
+
}, [studyUuid, snackError]);
|
|
62
|
+
const handleResetClick = useCallback(() => {
|
|
63
|
+
setOpenResetConfirmation(true);
|
|
64
|
+
}, []);
|
|
65
|
+
const handleCancelReset = useCallback(() => {
|
|
66
|
+
setOpenResetConfirmation(false);
|
|
67
|
+
}, []);
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
setHaveDirtyFields(!!Object.keys(formState.dirtyFields).length);
|
|
70
|
+
}, [formState, setHaveDirtyFields]);
|
|
71
|
+
return /* @__PURE__ */ jsx(
|
|
72
|
+
PccMinParametersForm,
|
|
73
|
+
{
|
|
74
|
+
pccMinMethods,
|
|
75
|
+
renderActions: () => {
|
|
76
|
+
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
77
|
+
/* @__PURE__ */ jsxs(Grid, { container: true, item: true, children: [
|
|
78
|
+
/* @__PURE__ */ jsx(LabelledButton, { callback: handleResetClick, label: "resetToDefault" }),
|
|
79
|
+
/* @__PURE__ */ jsx(SubmitButton, { onClick: handleSubmit(pccMinMethods.onSaveInline), variant: "outlined", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "validate" }) })
|
|
80
|
+
] }),
|
|
81
|
+
openResetConfirmation && /* @__PURE__ */ jsx(
|
|
82
|
+
PopupConfirmationDialog,
|
|
83
|
+
{
|
|
84
|
+
message: "resetParamsConfirmation",
|
|
85
|
+
validateButtonLabel: "validate",
|
|
86
|
+
openConfirmationPopup: openResetConfirmation,
|
|
87
|
+
setOpenConfirmationPopup: handleCancelReset,
|
|
88
|
+
handlePopupConfirmation: resetPccMinParameters
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
] });
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
export {
|
|
97
|
+
PccMinParametersInLine
|
|
98
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
2
|
+
import { ObjectSchema } from 'yup';
|
|
3
|
+
import { UUID } from 'node:crypto';
|
|
4
|
+
import { PccMinParameters } from '../../../services/pcc-min';
|
|
5
|
+
export interface UsePccMinParametersFormReturn {
|
|
6
|
+
formMethods: UseFormReturn;
|
|
7
|
+
formSchema: ObjectSchema<any>;
|
|
8
|
+
paramsLoading: boolean;
|
|
9
|
+
onSaveInline: (formData: Record<string, any>) => void;
|
|
10
|
+
}
|
|
11
|
+
type UsePccMinParametersFormProps = {
|
|
12
|
+
parametersUuid: UUID | null;
|
|
13
|
+
name: string | null;
|
|
14
|
+
description: string | null;
|
|
15
|
+
studyUuid: UUID | null;
|
|
16
|
+
parameters: PccMinParameters | null;
|
|
17
|
+
};
|
|
18
|
+
export declare const UsePccMinParametersForm: ({ parametersUuid, studyUuid, parameters, }: UsePccMinParametersFormProps) => UsePccMinParametersFormReturn;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { useForm } from "react-hook-form";
|
|
2
|
+
import { yupResolver } from "@hookform/resolvers/yup";
|
|
3
|
+
import { useState, useMemo, useCallback, useEffect } from "react";
|
|
4
|
+
import "../../../utils/yupConfig.js";
|
|
5
|
+
import { fromPccMinParametersFormToParamValues, fromPccMinParamsDataToFormValues, fromStudyPccMinParamsDataToFormValues } from "./pcc-min-form-utils.js";
|
|
6
|
+
import "react/jsx-runtime";
|
|
7
|
+
import "react-intl";
|
|
8
|
+
import "../../../utils/types/equipmentType.js";
|
|
9
|
+
import { FILTERS, ID } from "../../../utils/constants/filterConstant.js";
|
|
10
|
+
import "../../../utils/conversionUtils.js";
|
|
11
|
+
import "@mui/icons-material";
|
|
12
|
+
import { updatePccMinParameters, getPccMinStudyParameters } from "../../../services/pcc-min.js";
|
|
13
|
+
import "@mui/material";
|
|
14
|
+
import "localized-countries";
|
|
15
|
+
import "localized-countries/data/fr";
|
|
16
|
+
import "localized-countries/data/en";
|
|
17
|
+
import { useSnackMessage } from "../../../hooks/useSnackMessage.js";
|
|
18
|
+
import "../../overflowableText/OverflowableText.js";
|
|
19
|
+
import "../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
20
|
+
import * as yup from "yup";
|
|
21
|
+
import "../../treeViewFinder/TreeViewFinder.js";
|
|
22
|
+
import { NAME } from "../../inputs/reactHookForm/constants.js";
|
|
23
|
+
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
24
|
+
import "../../customAGGrid/customAggrid.js";
|
|
25
|
+
import "ag-grid-community";
|
|
26
|
+
import "react-papaparse";
|
|
27
|
+
import "react-csv-downloader";
|
|
28
|
+
import "../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
29
|
+
import "@react-querybuilder/material";
|
|
30
|
+
import "../../filter/expert/expertFilterConstants.js";
|
|
31
|
+
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
32
|
+
import "uuid";
|
|
33
|
+
import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
34
|
+
import "react-querybuilder";
|
|
35
|
+
const UsePccMinParametersForm = ({
|
|
36
|
+
parametersUuid,
|
|
37
|
+
studyUuid,
|
|
38
|
+
parameters
|
|
39
|
+
}) => {
|
|
40
|
+
const [paramsLoading, setParamsLoading] = useState(false);
|
|
41
|
+
const { snackError } = useSnackMessage();
|
|
42
|
+
const formSchema = useMemo(() => {
|
|
43
|
+
return yup.object({
|
|
44
|
+
[FILTERS]: yup.array().of(
|
|
45
|
+
yup.object().shape({
|
|
46
|
+
[ID]: yup.string().required(),
|
|
47
|
+
[NAME]: yup.string().required()
|
|
48
|
+
})
|
|
49
|
+
)
|
|
50
|
+
});
|
|
51
|
+
}, []);
|
|
52
|
+
const formMethods = useForm({
|
|
53
|
+
defaultValues: {
|
|
54
|
+
[FILTERS]: []
|
|
55
|
+
},
|
|
56
|
+
resolver: yupResolver(formSchema)
|
|
57
|
+
});
|
|
58
|
+
const { reset } = formMethods;
|
|
59
|
+
const onSaveInline = useCallback(
|
|
60
|
+
(formData) => {
|
|
61
|
+
if (studyUuid) {
|
|
62
|
+
updatePccMinParameters(studyUuid, fromPccMinParametersFormToParamValues(formData)).catch((error) => {
|
|
63
|
+
snackError({
|
|
64
|
+
messageTxt: error.message,
|
|
65
|
+
headerId: "updatePccMinParametersError"
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
[snackError, studyUuid]
|
|
71
|
+
);
|
|
72
|
+
useEffect(() => {
|
|
73
|
+
if (parametersUuid) {
|
|
74
|
+
const timer = setTimeout(() => {
|
|
75
|
+
setParamsLoading(true);
|
|
76
|
+
}, 700);
|
|
77
|
+
getPccMinStudyParameters(parametersUuid).then((params) => {
|
|
78
|
+
reset(fromPccMinParamsDataToFormValues(params));
|
|
79
|
+
}).catch((error) => {
|
|
80
|
+
snackError({
|
|
81
|
+
messageTxt: error.message,
|
|
82
|
+
headerId: "paramsRetrievingError"
|
|
83
|
+
});
|
|
84
|
+
}).finally(() => {
|
|
85
|
+
clearTimeout(timer);
|
|
86
|
+
setParamsLoading(false);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}, [parametersUuid, reset, snackError]);
|
|
90
|
+
useEffect(() => {
|
|
91
|
+
if (parameters) {
|
|
92
|
+
reset(fromStudyPccMinParamsDataToFormValues(parameters));
|
|
93
|
+
}
|
|
94
|
+
}, [parameters, reset]);
|
|
95
|
+
return {
|
|
96
|
+
formMethods,
|
|
97
|
+
formSchema,
|
|
98
|
+
paramsLoading,
|
|
99
|
+
onSaveInline
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
export {
|
|
103
|
+
UsePccMinParametersForm
|
|
104
|
+
};
|
|
@@ -2,7 +2,7 @@ import { default as yup } from '../../../utils/yupConfig';
|
|
|
2
2
|
import { CONTINGENCIES, HVDC_LINES, INJECTIONS, MONITORED_BRANCHES, PSTS } from './constants';
|
|
3
3
|
import { DistributionType, SensitivityType } from '../../../utils';
|
|
4
4
|
import { NAME } from '../../inputs';
|
|
5
|
-
import { ID } from '
|
|
5
|
+
import { ID } from '../../../utils/constants/filterConstant';
|
|
6
6
|
export declare const getSensiHVDCsFormSchema: () => {
|
|
7
7
|
sensitivityHVDC: yup.ArraySchema<{
|
|
8
8
|
contingencies?: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "../../../utils/yupConfig.js";
|
|
2
2
|
import { FLOW_VOLTAGE_SENSITIVITY_VALUE_THRESHOLD, ANGLE_FLOW_SENSITIVITY_VALUE_THRESHOLD, FLOW_FLOW_SENSITIVITY_VALUE_THRESHOLD, PARAMETER_SENSI_NODES, EQUIPMENTS_IN_VOLTAGE_REGULATION, SUPERVISED_VOLTAGE_LEVELS, PARAMETER_SENSI_PST, PSTS, ACTIVATED, PARAMETER_SENSI_HVDC, HVDC_LINES, PARAMETER_SENSI_INJECTION, INJECTIONS, PARAMETER_SENSI_INJECTIONS_SET, DISTRIBUTION_TYPE, COUNT, CONTINGENCIES, SENSITIVITY_TYPE, MONITORED_BRANCHES, CONTAINER_NAME, CONTAINER_ID } from "./constants.js";
|
|
3
|
+
import { ID } from "../../../utils/constants/filterConstant.js";
|
|
3
4
|
import "../../../utils/conversionUtils.js";
|
|
4
5
|
import "react/jsx-runtime";
|
|
5
6
|
import "@mui/icons-material";
|
|
@@ -37,9 +38,6 @@ import "../common/widget/parameter-line-slider.js";
|
|
|
37
38
|
import "../common/limitreductions/columns-definitions.js";
|
|
38
39
|
import "../../filter/HeaderFilterForm.js";
|
|
39
40
|
import { getNameElementEditorSchema } from "../common/name-element-editor/name-element-editor-utils.js";
|
|
40
|
-
import { ID } from "../voltage-init/constants.js";
|
|
41
|
-
import "@hookform/resolvers/yup";
|
|
42
|
-
import "@hello-pangea/dnd";
|
|
43
41
|
const getMonitoredBranchesSchema = () => {
|
|
44
42
|
return {
|
|
45
43
|
[MONITORED_BRANCHES]: yup.array().of(
|
|
@@ -17,10 +17,7 @@ export declare const DEFAULT_REACTIVE_SLACKS_THRESHOLD = 500;
|
|
|
17
17
|
export declare const DEFAULT_SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD = 0;
|
|
18
18
|
export declare const REACTIVE_SLACKS_THRESHOLD = "reactiveSlacksThreshold";
|
|
19
19
|
export declare const SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD = "shuntCompensatorActivationThreshold";
|
|
20
|
-
export declare const ID = "id";
|
|
21
20
|
export declare const PRIORITY = "priority";
|
|
22
|
-
export declare const FILTER_ID = "filterId";
|
|
23
|
-
export declare const FILTER_NAME = "filterName";
|
|
24
21
|
export declare const SELECTION_TYPE = "selectionType";
|
|
25
22
|
export declare const UPDATE_BUS_VOLTAGE = "updateBusVoltage";
|
|
26
23
|
export declare const VOLTAGE_LIMITS_MODIFICATION = "voltageLimitsModification";
|
|
@@ -36,4 +33,3 @@ export declare const RATIO_TAP_CHANGER_TARGET_V = "ratioTapChangerTargetV";
|
|
|
36
33
|
export declare const LEG_SIDE = "legSide";
|
|
37
34
|
export declare const HIGH_VOLTAGE_LIMIT = "highVoltageLimit";
|
|
38
35
|
export declare const LOW_VOLTAGE_LIMIT = "lowVoltageLimit";
|
|
39
|
-
export declare const FILTERS = "filters";
|
|
@@ -12,10 +12,7 @@ const DEFAULT_REACTIVE_SLACKS_THRESHOLD = 500;
|
|
|
12
12
|
const DEFAULT_SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD = 0;
|
|
13
13
|
const REACTIVE_SLACKS_THRESHOLD = "reactiveSlacksThreshold";
|
|
14
14
|
const SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD = "shuntCompensatorActivationThreshold";
|
|
15
|
-
const ID = "id";
|
|
16
15
|
const PRIORITY = "priority";
|
|
17
|
-
const FILTER_ID = "filterId";
|
|
18
|
-
const FILTER_NAME = "filterName";
|
|
19
16
|
const SELECTION_TYPE = "selectionType";
|
|
20
17
|
const UPDATE_BUS_VOLTAGE = "updateBusVoltage";
|
|
21
18
|
const VOLTAGE_LIMITS_MODIFICATION = "voltageLimitsModification";
|
|
@@ -31,20 +28,15 @@ const RATIO_TAP_CHANGER_TARGET_V = "ratioTapChangerTargetV";
|
|
|
31
28
|
const LEG_SIDE = "legSide";
|
|
32
29
|
const HIGH_VOLTAGE_LIMIT = "highVoltageLimit";
|
|
33
30
|
const LOW_VOLTAGE_LIMIT = "lowVoltageLimit";
|
|
34
|
-
const FILTERS = "filters";
|
|
35
31
|
export {
|
|
36
32
|
DEFAULT_GENERAL_APPLY_MODIFICATIONS,
|
|
37
33
|
DEFAULT_REACTIVE_SLACKS_THRESHOLD,
|
|
38
34
|
DEFAULT_SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD,
|
|
39
35
|
DEFAULT_UPDATE_BUS_VOLTAGE,
|
|
40
|
-
FILTERS,
|
|
41
|
-
FILTER_ID,
|
|
42
|
-
FILTER_NAME,
|
|
43
36
|
GENERAL,
|
|
44
37
|
GENERAL_APPLY_MODIFICATIONS,
|
|
45
38
|
GENERATORS_SELECTION_TYPE,
|
|
46
39
|
HIGH_VOLTAGE_LIMIT,
|
|
47
|
-
ID,
|
|
48
40
|
LEG_SIDE,
|
|
49
41
|
LOW_VOLTAGE_LIMIT,
|
|
50
42
|
PRIORITY,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_GENERAL_APPLY_MODIFICATIONS, DEFAULT_REACTIVE_SLACKS_THRESHOLD, DEFAULT_SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, DEFAULT_UPDATE_BUS_VOLTAGE,
|
|
1
|
+
import { DEFAULT_GENERAL_APPLY_MODIFICATIONS, DEFAULT_REACTIVE_SLACKS_THRESHOLD, DEFAULT_SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, DEFAULT_UPDATE_BUS_VOLTAGE, GENERAL, GENERAL_APPLY_MODIFICATIONS, GENERATORS_SELECTION_TYPE, HIGH_VOLTAGE_LIMIT, LEG_SIDE, LOW_VOLTAGE_LIMIT, PRIORITY, RATIO_TAP_CHANGER_POSITION, RATIO_TAP_CHANGER_TARGET_V, REACTIVE_SLACKS_THRESHOLD, SELECTION_TYPE, SHUNT_COMPENSATORS_SELECTION_TYPE, SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, TRANSFORMERS_SELECTION_TYPE, UPDATE_BUS_VOLTAGE, VARIABLE_Q_GENERATORS, VARIABLE_SHUNT_COMPENSATORS, VARIABLE_TRANSFORMERS, VOLTAGE_LIMITS_DEFAULT, VOLTAGE_LIMITS_MODIFICATION, VoltageInitTabValues } from "./constants.js";
|
|
2
2
|
import { EquipmentsSelectionType } from "./voltage-init.type.js";
|
|
3
3
|
import { VoltageInitParametersEditionDialog } from "./voltage-init-parameters-dialog.js";
|
|
4
4
|
import { VoltageInitParametersInLine } from "./voltage-init-parameters-inline.js";
|
|
@@ -8,14 +8,10 @@ export {
|
|
|
8
8
|
DEFAULT_SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD,
|
|
9
9
|
DEFAULT_UPDATE_BUS_VOLTAGE,
|
|
10
10
|
EquipmentsSelectionType,
|
|
11
|
-
FILTERS,
|
|
12
|
-
FILTER_ID,
|
|
13
|
-
FILTER_NAME,
|
|
14
11
|
GENERAL,
|
|
15
12
|
GENERAL_APPLY_MODIFICATIONS,
|
|
16
13
|
GENERATORS_SELECTION_TYPE,
|
|
17
14
|
HIGH_VOLTAGE_LIMIT,
|
|
18
|
-
ID,
|
|
19
15
|
LEG_SIDE,
|
|
20
16
|
LOW_VOLTAGE_LIMIT,
|
|
21
17
|
PRIORITY,
|
|
@@ -8,6 +8,7 @@ import "@mui/material";
|
|
|
8
8
|
import "../../overflowableText/OverflowableText.js";
|
|
9
9
|
import "../../../utils/types/equipmentType.js";
|
|
10
10
|
import { updateParameter } from "../../../services/explore.js";
|
|
11
|
+
import { ID, FILTERS } from "../../../utils/constants/filterConstant.js";
|
|
11
12
|
import { isBlankOrEmpty } from "../../../utils/conversionUtils.js";
|
|
12
13
|
import "@mui/icons-material";
|
|
13
14
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
@@ -33,7 +34,7 @@ import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
|
33
34
|
import "uuid";
|
|
34
35
|
import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
35
36
|
import "react-querybuilder";
|
|
36
|
-
import { VoltageInitTabValues, VARIABLE_SHUNT_COMPENSATORS,
|
|
37
|
+
import { VoltageInitTabValues, VARIABLE_SHUNT_COMPENSATORS, SHUNT_COMPENSATORS_SELECTION_TYPE, VARIABLE_TRANSFORMERS, TRANSFORMERS_SELECTION_TYPE, VARIABLE_Q_GENERATORS, GENERATORS_SELECTION_TYPE, VOLTAGE_LIMITS_DEFAULT, HIGH_VOLTAGE_LIMIT, LOW_VOLTAGE_LIMIT, VOLTAGE_LIMITS_MODIFICATION, SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, REACTIVE_SLACKS_THRESHOLD, UPDATE_BUS_VOLTAGE, GENERAL_APPLY_MODIFICATIONS, DEFAULT_SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, DEFAULT_REACTIVE_SLACKS_THRESHOLD, DEFAULT_UPDATE_BUS_VOLTAGE, DEFAULT_GENERAL_APPLY_MODIFICATIONS, GENERAL } from "./constants.js";
|
|
37
38
|
import "../../filter/HeaderFilterForm.js";
|
|
38
39
|
import { getNameElementEditorSchema, getNameElementEditorEmptyFormData } from "../common/name-element-editor/name-element-editor-utils.js";
|
|
39
40
|
import { fromVoltageInitParametersFormToParamValues, fromVoltageInitParamsDataToFormValues, fromStudyVoltageInitParamsDataToFormValues } from "./voltage-init-form-utils.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EquipmentsSelectionType } from "./voltage-init.type.js";
|
|
2
|
-
import { DEFAULT_SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, DEFAULT_REACTIVE_SLACKS_THRESHOLD, DEFAULT_UPDATE_BUS_VOLTAGE, DEFAULT_GENERAL_APPLY_MODIFICATIONS, VARIABLE_SHUNT_COMPENSATORS,
|
|
2
|
+
import { DEFAULT_SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, DEFAULT_REACTIVE_SLACKS_THRESHOLD, DEFAULT_UPDATE_BUS_VOLTAGE, DEFAULT_GENERAL_APPLY_MODIFICATIONS, VARIABLE_SHUNT_COMPENSATORS, SHUNT_COMPENSATORS_SELECTION_TYPE, VARIABLE_TRANSFORMERS, TRANSFORMERS_SELECTION_TYPE, VARIABLE_Q_GENERATORS, GENERATORS_SELECTION_TYPE, VOLTAGE_LIMITS_DEFAULT, HIGH_VOLTAGE_LIMIT, LOW_VOLTAGE_LIMIT, PRIORITY, VOLTAGE_LIMITS_MODIFICATION, SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, VoltageInitTabValues, REACTIVE_SLACKS_THRESHOLD, UPDATE_BUS_VOLTAGE, GENERAL_APPLY_MODIFICATIONS } from "./constants.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react-intl";
|
|
5
5
|
import "@mui/material";
|
|
@@ -7,6 +7,7 @@ import "../../overflowableText/OverflowableText.js";
|
|
|
7
7
|
import "react";
|
|
8
8
|
import "react-hook-form";
|
|
9
9
|
import "../../../utils/types/equipmentType.js";
|
|
10
|
+
import { FILTER_NAME, FILTER_ID, ID, FILTERS } from "../../../utils/constants/filterConstant.js";
|
|
10
11
|
import "../../../utils/conversionUtils.js";
|
|
11
12
|
import "@mui/icons-material";
|
|
12
13
|
import "../../../utils/yupConfig.js";
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { FilterIdentifier, FILTERS } from '../../../utils/constants/filterConstant';
|
|
2
|
+
import { GENERATORS_SELECTION_TYPE, HIGH_VOLTAGE_LIMIT, LOW_VOLTAGE_LIMIT, REACTIVE_SLACKS_THRESHOLD, SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, SHUNT_COMPENSATORS_SELECTION_TYPE, TRANSFORMERS_SELECTION_TYPE, UPDATE_BUS_VOLTAGE, VARIABLE_Q_GENERATORS, VARIABLE_SHUNT_COMPENSATORS, VARIABLE_TRANSFORMERS, VOLTAGE_LIMITS_DEFAULT, VOLTAGE_LIMITS_MODIFICATION } from './constants';
|
|
3
3
|
export declare enum EquipmentsSelectionType {
|
|
4
4
|
ALL_EXCEPT = "ALL_EXCEPT",
|
|
5
5
|
NONE_EXCEPT = "NONE_EXCEPT"
|
|
6
6
|
}
|
|
7
|
-
type FilterIdentifier = {
|
|
8
|
-
[FILTER_ID]: UUID;
|
|
9
|
-
[FILTER_NAME]: string;
|
|
10
|
-
};
|
|
11
7
|
type VoltageLimitParam = {
|
|
12
8
|
[FILTERS]: FilterIdentifier[];
|
|
13
9
|
[LOW_VOLTAGE_LIMIT]: number;
|
|
@@ -4,7 +4,8 @@ import { useFieldArray } from "react-hook-form";
|
|
|
4
4
|
import { Info } from "@mui/icons-material";
|
|
5
5
|
import { Tooltip, IconButton, Grid, Typography } from "@mui/material";
|
|
6
6
|
import { useIntl, FormattedMessage } from "react-intl";
|
|
7
|
-
import {
|
|
7
|
+
import { LOW_VOLTAGE_LIMIT, HIGH_VOLTAGE_LIMIT, VOLTAGE_LIMITS_MODIFICATION, VOLTAGE_LIMITS_DEFAULT } from "./constants.js";
|
|
8
|
+
import { FILTERS } from "../../../utils/constants/filterConstant.js";
|
|
8
9
|
import "../../../utils/conversionUtils.js";
|
|
9
10
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
10
11
|
import { EquipmentType } from "../../../utils/types/equipmentType.js";
|
package/dist/index.js
CHANGED
|
@@ -161,10 +161,11 @@ import { LoadFlowParametersEditionDialog } from "./components/parameters/loadflo
|
|
|
161
161
|
import { InitialVoltage, PredefinedParameters, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_WITH_FEEDER_RESULT, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, intlInitialVoltageProfileMode, intlPredefinedParametersOptions } from "./components/parameters/short-circuit/constants.js";
|
|
162
162
|
import { ShortCircuitParametersInLine } from "./components/parameters/short-circuit/short-circuit-parameters-inline.js";
|
|
163
163
|
import { ShortCircuitParametersEditionDialog } from "./components/parameters/short-circuit/short-circuit-parameters-dialog.js";
|
|
164
|
-
import { DEFAULT_GENERAL_APPLY_MODIFICATIONS, DEFAULT_REACTIVE_SLACKS_THRESHOLD, DEFAULT_SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, DEFAULT_UPDATE_BUS_VOLTAGE,
|
|
164
|
+
import { DEFAULT_GENERAL_APPLY_MODIFICATIONS, DEFAULT_REACTIVE_SLACKS_THRESHOLD, DEFAULT_SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, DEFAULT_UPDATE_BUS_VOLTAGE, GENERAL, GENERAL_APPLY_MODIFICATIONS, GENERATORS_SELECTION_TYPE, HIGH_VOLTAGE_LIMIT, LEG_SIDE, LOW_VOLTAGE_LIMIT, PRIORITY, RATIO_TAP_CHANGER_POSITION, RATIO_TAP_CHANGER_TARGET_V, REACTIVE_SLACKS_THRESHOLD, SELECTION_TYPE, SHUNT_COMPENSATORS_SELECTION_TYPE, SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, TRANSFORMERS_SELECTION_TYPE, UPDATE_BUS_VOLTAGE, VARIABLE_Q_GENERATORS, VARIABLE_SHUNT_COMPENSATORS, VARIABLE_TRANSFORMERS, VOLTAGE_LIMITS_DEFAULT, VOLTAGE_LIMITS_MODIFICATION, VoltageInitTabValues } from "./components/parameters/voltage-init/constants.js";
|
|
165
165
|
import { EquipmentsSelectionType } from "./components/parameters/voltage-init/voltage-init.type.js";
|
|
166
166
|
import { VoltageInitParametersEditionDialog } from "./components/parameters/voltage-init/voltage-init-parameters-dialog.js";
|
|
167
167
|
import { VoltageInitParametersInLine } from "./components/parameters/voltage-init/voltage-init-parameters-inline.js";
|
|
168
|
+
import { PccMinParametersInLine } from "./components/parameters/pcc-min/pcc-min-parameters-inline.js";
|
|
168
169
|
import { SecurityAnalysisParametersInline } from "./components/parameters/security-analysis/security-analysis-parameters-inline.js";
|
|
169
170
|
import { SecurityAnalysisParametersDialog } from "./components/parameters/security-analysis/security-analysis-parameters-dialog.js";
|
|
170
171
|
import { SensitivityAnalysisParametersInline } from "./components/parameters/sensi/sensitivity-analysis-parameters-inline.js";
|
|
@@ -197,6 +198,7 @@ import { exportFilter, getAvailableComponentLibraries, getStudyNetworkVisualizat
|
|
|
197
198
|
import { getNetworkVisualizationsParameters } from "./services/study-config.js";
|
|
198
199
|
import { fetchCurrentAnnouncement, fetchUserDetails } from "./services/userAdmin.js";
|
|
199
200
|
import { getVoltageInitParameters, getVoltageInitUrl } from "./services/voltage-init.js";
|
|
201
|
+
import { getPccMinStudyParameters, updatePccMinParameters } from "./services/pcc-min.js";
|
|
200
202
|
import { fetchDefaultSecurityAnalysisProvider, fetchSecurityAnalysisParameters, fetchSecurityAnalysisProviders, getSecurityAnalysisDefaultLimitReductions, getSecurityAnalysisParameters, getStudyUrl, safeEncodeURIComponent, setSecurityAnalysisParameters, updateSecurityAnalysisParameters, updateSecurityAnalysisProvider } from "./services/security-analysis.js";
|
|
201
203
|
import { CustomError } from "./services/businessErrorCode.js";
|
|
202
204
|
import { equalsArray } from "./utils/algos.js";
|
|
@@ -205,6 +207,7 @@ import { FieldConstants } from "./utils/constants/fieldConstants.js";
|
|
|
205
207
|
import { MAX_CHAR_DESCRIPTION } from "./utils/constants/uiConstants.js";
|
|
206
208
|
import { AMPERE, DEGREE, KILO_AMPERE, KILO_METER, KILO_VOLT, MEGA_VAR, MEGA_VOLT_AMPERE, MEGA_WATT, MICRO_SIEMENS, OHM, PERCENTAGE, SIEMENS } from "./utils/constants/unitsConstants.js";
|
|
207
209
|
import { COMMON_APP_NAME, COMMON_CONFIG_PARAMS_NAMES, LAST_SELECTED_DIRECTORY, PARAM_DEVELOPER_MODE, PARAM_LANGUAGE, PARAM_THEME } from "./utils/constants/configConstants.js";
|
|
210
|
+
import { FILTERS, FILTER_ID, FILTER_NAME, ID } from "./utils/constants/filterConstant.js";
|
|
208
211
|
import { GRIDSUITE_DEFAULT_PRECISION, convertInputValue, convertOutputValue, isBlankOrEmpty, kiloUnitToUnit, microUnitToUnit, roundToDefaultPrecision, roundToPrecision, unitToKiloUnit, unitToMicroUnit } from "./utils/conversionUtils.js";
|
|
209
212
|
import { areArrayElementsUnique, isObjectEmpty, keyGenerator } from "./utils/functions.js";
|
|
210
213
|
import { LANG_ENGLISH, LANG_FRENCH, LANG_SYSTEM } from "./utils/langs.js";
|
|
@@ -548,6 +551,7 @@ export {
|
|
|
548
551
|
ParameterLineSlider,
|
|
549
552
|
ParameterSwitch,
|
|
550
553
|
ParameterType,
|
|
554
|
+
PccMinParametersInLine,
|
|
551
555
|
PhotoLibraryIcon,
|
|
552
556
|
PopupConfirmationDialog,
|
|
553
557
|
PredefinedParameters,
|
|
@@ -759,6 +763,7 @@ export {
|
|
|
759
763
|
getNetworkVisualizationsParameters,
|
|
760
764
|
getNumberOfSiblings,
|
|
761
765
|
getOperators,
|
|
766
|
+
getPccMinStudyParameters,
|
|
762
767
|
getPreLoginPath,
|
|
763
768
|
getRangeInputSchema,
|
|
764
769
|
getRequestParamFromList,
|
|
@@ -850,6 +855,7 @@ export {
|
|
|
850
855
|
unscrollableDialogStyles,
|
|
851
856
|
updateConfigParameter,
|
|
852
857
|
updateParameter,
|
|
858
|
+
updatePccMinParameters,
|
|
853
859
|
updateSecurityAnalysisParameters,
|
|
854
860
|
updateSecurityAnalysisProvider,
|
|
855
861
|
updateVoltageInitParameters,
|
package/dist/services/index.d.ts
CHANGED
package/dist/services/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import { exportFilter, getAvailableComponentLibraries, getStudyNetworkVisualizat
|
|
|
7
7
|
import { getNetworkVisualizationsParameters } from "./study-config.js";
|
|
8
8
|
import { fetchCurrentAnnouncement, fetchUserDetails } from "./userAdmin.js";
|
|
9
9
|
import { getVoltageInitParameters, getVoltageInitUrl } from "./voltage-init.js";
|
|
10
|
+
import { getPccMinStudyParameters, updatePccMinParameters } from "./pcc-min.js";
|
|
10
11
|
import { fetchDefaultSecurityAnalysisProvider, fetchSecurityAnalysisParameters, fetchSecurityAnalysisProviders, getSecurityAnalysisDefaultLimitReductions, getSecurityAnalysisParameters, getStudyUrl, safeEncodeURIComponent, setSecurityAnalysisParameters, updateSecurityAnalysisParameters, updateSecurityAnalysisProvider } from "./security-analysis.js";
|
|
11
12
|
import { CustomError } from "./businessErrorCode.js";
|
|
12
13
|
export {
|
|
@@ -47,6 +48,7 @@ export {
|
|
|
47
48
|
getLoadFlowSpecificParametersDescription,
|
|
48
49
|
getLoadFlowUrl,
|
|
49
50
|
getNetworkVisualizationsParameters,
|
|
51
|
+
getPccMinStudyParameters,
|
|
50
52
|
getRequestParamFromList,
|
|
51
53
|
getSecurityAnalysisDefaultLimitReductions,
|
|
52
54
|
getSecurityAnalysisParameters,
|
|
@@ -65,6 +67,7 @@ export {
|
|
|
65
67
|
setStudyShortCircuitParameters,
|
|
66
68
|
updateConfigParameter,
|
|
67
69
|
updateParameter,
|
|
70
|
+
updatePccMinParameters,
|
|
68
71
|
updateSecurityAnalysisParameters,
|
|
69
72
|
updateSecurityAnalysisProvider,
|
|
70
73
|
updateVoltageInitParameters
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
2
|
+
import { FilterIdentifier, FILTERS } from '../utils/constants/filterConstant';
|
|
3
|
+
export type PccMinParameters = {
|
|
4
|
+
[FILTERS]: FilterIdentifier[];
|
|
5
|
+
};
|
|
6
|
+
export declare function getPccMinStudyParameters(studyUuid: UUID): Promise<PccMinParameters | null>;
|
|
7
|
+
export declare function updatePccMinParameters(studyUuid: UUID | null, newParams: PccMinParameters | null): Promise<Response>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { backendFetchJson, backendFetch } from "./utils.js";
|
|
2
|
+
import { getStudyUrl } from "./security-analysis.js";
|
|
3
|
+
function getPccMinStudyParameters(studyUuid) {
|
|
4
|
+
console.info("get pcc min study parameters");
|
|
5
|
+
const getPccMintParams = `${getStudyUrl(studyUuid)}/pcc-min/parameters`;
|
|
6
|
+
console.debug(getPccMintParams);
|
|
7
|
+
return backendFetchJson(getPccMintParams);
|
|
8
|
+
}
|
|
9
|
+
function updatePccMinParameters(studyUuid, newParams) {
|
|
10
|
+
console.info("set study pcc min parameters");
|
|
11
|
+
const url = `${getStudyUrl(studyUuid)}/pcc-min/parameters`;
|
|
12
|
+
console.debug(url);
|
|
13
|
+
return backendFetch(url, {
|
|
14
|
+
method: "POST",
|
|
15
|
+
headers: {
|
|
16
|
+
Accept: "application/json",
|
|
17
|
+
"Content-Type": "application/json"
|
|
18
|
+
},
|
|
19
|
+
body: JSON.stringify(newParams)
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
getPccMinStudyParameters,
|
|
24
|
+
updatePccMinParameters
|
|
25
|
+
};
|
|
@@ -226,4 +226,7 @@ export declare const parametersEn: {
|
|
|
226
226
|
updateSensitivityAnalysisProviderError: string;
|
|
227
227
|
getSensitivityAnalysisFactorsCountError: string;
|
|
228
228
|
resetLoadFlowParametersWarning: string;
|
|
229
|
+
PccMinParametersError: string;
|
|
230
|
+
updatePccMinParametersError: string;
|
|
231
|
+
pccMinParamFilter: string;
|
|
229
232
|
};
|
|
@@ -224,7 +224,10 @@ const parametersEn = {
|
|
|
224
224
|
updateSensitivityAnalysisProviderError: "An error occured when updating sensitivity analysis provider",
|
|
225
225
|
getSensitivityAnalysisFactorsCountError: "An error occured while estimating sensitivity analysis computations",
|
|
226
226
|
// Other
|
|
227
|
-
resetLoadFlowParametersWarning: "Impossible to retrieve the load flow parameters defined in the user profile (default values are used)"
|
|
227
|
+
resetLoadFlowParametersWarning: "Impossible to retrieve the load flow parameters defined in the user profile (default values are used)",
|
|
228
|
+
PccMinParametersError: "An error occurred while updating the pcc min parameters",
|
|
229
|
+
updatePccMinParametersError: "An error occurred while updating the pcc min parameters",
|
|
230
|
+
pccMinParamFilter: "Definition of contingencies on voltage levels"
|
|
228
231
|
};
|
|
229
232
|
export {
|
|
230
233
|
parametersEn
|
|
@@ -227,4 +227,7 @@ export declare const parametersFr: {
|
|
|
227
227
|
updateSensitivityAnalysisProviderError: string;
|
|
228
228
|
getSensitivityAnalysisFactorsCountError: string;
|
|
229
229
|
resetLoadFlowParametersWarning: string;
|
|
230
|
+
PccMinParametersError: string;
|
|
231
|
+
updatePccMinParametersError: string;
|
|
232
|
+
pccMinParamFilter: string;
|
|
230
233
|
};
|
|
@@ -225,7 +225,10 @@ const parametersFr = {
|
|
|
225
225
|
updateSensitivityAnalysisProviderError: "Une erreur est survenue lors de la mise a jour du fournisseur courant d'analyse de sensibilité",
|
|
226
226
|
getSensitivityAnalysisFactorsCountError: "Une erreur est survenue lors de l'estimation du nombre de calculs",
|
|
227
227
|
// Other
|
|
228
|
-
resetLoadFlowParametersWarning: "Impossible de récupérer les paramètres de calcul de répartition définis dans le profil utilisateur (les valeurs par défaut sont appliquées)"
|
|
228
|
+
resetLoadFlowParametersWarning: "Impossible de récupérer les paramètres de calcul de répartition définis dans le profil utilisateur (les valeurs par défaut sont appliquées)",
|
|
229
|
+
PccMinParametersError: "Erreur lors de la mise à jour des paramètres de pcc du min",
|
|
230
|
+
updatePccMinParametersError: "Une erreur est survenue lors de la mise a jour des paramètres de pcc min",
|
|
231
|
+
pccMinParamFilter: "Définition des postes en défaut"
|
|
229
232
|
};
|
|
230
233
|
export {
|
|
231
234
|
parametersFr
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
2
|
+
export declare const FILTER_ID = "filterId";
|
|
3
|
+
export declare const FILTER_NAME = "filterName";
|
|
4
|
+
export declare const FILTERS = "filters";
|
|
5
|
+
export declare const ID = "id";
|
|
6
|
+
export type FilterIdentifier = {
|
|
7
|
+
[FILTER_ID]: UUID;
|
|
8
|
+
[FILTER_NAME]: string;
|
|
9
|
+
};
|
|
@@ -3,13 +3,18 @@ import { FieldConstants } from "./fieldConstants.js";
|
|
|
3
3
|
import { MAX_CHAR_DESCRIPTION } from "./uiConstants.js";
|
|
4
4
|
import { AMPERE, DEGREE, KILO_AMPERE, KILO_METER, KILO_VOLT, MEGA_VAR, MEGA_VOLT_AMPERE, MEGA_WATT, MICRO_SIEMENS, OHM, PERCENTAGE, SIEMENS } from "./unitsConstants.js";
|
|
5
5
|
import { COMMON_APP_NAME, COMMON_CONFIG_PARAMS_NAMES, LAST_SELECTED_DIRECTORY, PARAM_DEVELOPER_MODE, PARAM_LANGUAGE, PARAM_THEME } from "./configConstants.js";
|
|
6
|
+
import { FILTERS, FILTER_ID, FILTER_NAME, ID } from "./filterConstant.js";
|
|
6
7
|
export {
|
|
7
8
|
AMPERE,
|
|
8
9
|
COMMON_APP_NAME,
|
|
9
10
|
COMMON_CONFIG_PARAMS_NAMES,
|
|
10
11
|
DEGREE,
|
|
12
|
+
FILTERS,
|
|
13
|
+
FILTER_ID,
|
|
14
|
+
FILTER_NAME,
|
|
11
15
|
FetchStatus,
|
|
12
16
|
FieldConstants,
|
|
17
|
+
ID,
|
|
13
18
|
KILO_AMPERE,
|
|
14
19
|
KILO_METER,
|
|
15
20
|
KILO_VOLT,
|
package/dist/utils/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { FieldConstants } from "./constants/fieldConstants.js";
|
|
|
4
4
|
import { MAX_CHAR_DESCRIPTION } from "./constants/uiConstants.js";
|
|
5
5
|
import { AMPERE, DEGREE, KILO_AMPERE, KILO_METER, KILO_VOLT, MEGA_VAR, MEGA_VOLT_AMPERE, MEGA_WATT, MICRO_SIEMENS, OHM, PERCENTAGE, SIEMENS } from "./constants/unitsConstants.js";
|
|
6
6
|
import { COMMON_APP_NAME, COMMON_CONFIG_PARAMS_NAMES, LAST_SELECTED_DIRECTORY, PARAM_DEVELOPER_MODE, PARAM_LANGUAGE, PARAM_THEME } from "./constants/configConstants.js";
|
|
7
|
+
import { FILTERS, FILTER_ID, FILTER_NAME, ID } from "./constants/filterConstant.js";
|
|
7
8
|
import { GRIDSUITE_DEFAULT_PRECISION, convertInputValue, convertOutputValue, isBlankOrEmpty, kiloUnitToUnit, microUnitToUnit, roundToDefaultPrecision, roundToPrecision, unitToKiloUnit, unitToMicroUnit } from "./conversionUtils.js";
|
|
8
9
|
import { areArrayElementsUnique, isObjectEmpty, keyGenerator } from "./functions.js";
|
|
9
10
|
import { LANG_ENGLISH, LANG_FRENCH, LANG_SYSTEM } from "./langs.js";
|
|
@@ -40,6 +41,9 @@ export {
|
|
|
40
41
|
ElementType,
|
|
41
42
|
EquipmentType,
|
|
42
43
|
ExtendedEquipmentType,
|
|
44
|
+
FILTERS,
|
|
45
|
+
FILTER_ID,
|
|
46
|
+
FILTER_NAME,
|
|
43
47
|
FetchStatus,
|
|
44
48
|
FieldConstants,
|
|
45
49
|
FieldType,
|
|
@@ -47,6 +51,7 @@ export {
|
|
|
47
51
|
Generator,
|
|
48
52
|
Hvdc,
|
|
49
53
|
HvdcType,
|
|
54
|
+
ID,
|
|
50
55
|
KILO_AMPERE,
|
|
51
56
|
KILO_METER,
|
|
52
57
|
KILO_VOLT,
|