@gridsuite/commons-ui 0.165.2 → 0.167.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/dist/components/dialogs/descriptionModificationDialog/DescriptionModificationDialog.d.ts +9 -4
- package/dist/components/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js +7 -4
- package/dist/components/dialogs/elementSaveDialog/ElementSaveDialog.js +5 -0
- package/dist/components/dnd-table/dnd-table-add-rows-dialog.js +5 -0
- package/dist/components/dnd-table/dnd-table-bottom-right-buttons.js +2 -2
- package/dist/components/dnd-table/dnd-table.d.ts +1 -2
- package/dist/components/dnd-table/dnd-table.js +7 -0
- package/dist/components/dnd-table/dnd-table.type.d.ts +6 -1
- package/dist/components/dnd-table/dnd-table.type.js +1 -0
- package/dist/components/filter/HeaderFilterForm.js +5 -0
- package/dist/components/filter/expert/ExpertFilterForm.js +4 -0
- package/dist/components/filter/explicitNaming/ExplicitNamingFilterForm.js +4 -0
- package/dist/components/index.js +22 -7
- package/dist/components/inputs/index.js +2 -0
- package/dist/components/inputs/reactHookForm/index.js +2 -0
- package/dist/components/inputs/reactHookForm/text/DescriptionInput.d.ts +4 -0
- package/dist/components/inputs/reactHookForm/text/DescriptionInput.js +85 -0
- package/dist/components/inputs/reactHookForm/text/index.d.ts +1 -0
- package/dist/components/inputs/reactHookForm/text/index.js +2 -0
- package/dist/components/network-modifications/common/properties/PropertiesForm.js +5 -0
- package/dist/components/network-modifications/common/properties/PropertyForm.js +5 -0
- package/dist/components/network-modifications/substation/creation/SubstationCreationForm.js +5 -0
- package/dist/components/parameters/common/ProviderParam.js +8 -3
- package/dist/components/parameters/common/{constant.d.ts → constants.d.ts} +3 -0
- package/dist/components/parameters/common/{constant.js → constants.js} +6 -0
- package/dist/components/parameters/common/contingency-table/columns-definitions.d.ts +27 -0
- package/dist/components/parameters/common/contingency-table/columns-definitions.js +102 -0
- package/dist/components/parameters/common/contingency-table/contingency-table.d.ts +5 -0
- package/dist/components/parameters/common/contingency-table/contingency-table.js +81 -0
- package/dist/components/parameters/common/contingency-table/index.d.ts +8 -0
- package/dist/components/parameters/common/contingency-table/index.js +9 -0
- package/dist/components/parameters/common/contingency-table/types.d.ts +12 -0
- package/dist/components/parameters/common/contingency-table/types.js +1 -0
- package/dist/components/parameters/common/index.d.ts +1 -1
- package/dist/components/parameters/common/index.js +5 -5
- package/dist/components/parameters/common/limitreductions/columns-definitions.d.ts +8 -34
- package/dist/components/parameters/common/limitreductions/columns-definitions.js +11 -32
- package/dist/components/parameters/common/limitreductions/index.d.ts +0 -1
- package/dist/components/parameters/common/limitreductions/index.js +1 -4
- package/dist/components/parameters/common/limitreductions/limit-reduction-table-cell.js +5 -0
- package/dist/components/parameters/common/limitreductions/limit-reductions-table-form.js +5 -0
- package/dist/components/parameters/common/name-element-editor/name-element-editor-utils.js +5 -0
- package/dist/components/parameters/common/parameter-dnd-table-field.d.ts +9 -0
- package/dist/components/parameters/common/parameter-dnd-table-field.js +85 -0
- package/dist/components/parameters/common/parameter-field.d.ts +15 -0
- package/dist/components/parameters/{loadflow/load-flow-parameter-field.js → common/parameter-field.js} +12 -14
- package/dist/components/parameters/common/parameter-table/constants.d.ts +11 -0
- package/dist/components/parameters/common/parameter-table/constants.js +12 -0
- package/dist/components/parameters/common/parameter-table/index.d.ts +9 -0
- package/dist/components/parameters/common/parameter-table/index.js +10 -0
- package/dist/components/parameters/common/parameter-table/parameter-table.d.ts +15 -0
- package/dist/components/parameters/{sensi/sensitivity-table.js → common/parameter-table/parameter-table.js} +11 -37
- package/dist/components/parameters/{sensi → common/parameter-table}/table-cell.js +19 -17
- package/dist/components/parameters/{sensi → common/parameter-table}/table-row.d.ts +2 -2
- package/dist/components/parameters/common/parameter-table/types.d.ts +26 -0
- package/dist/components/parameters/common/parameter-table/types.js +1 -0
- package/dist/components/parameters/common/utils.js +1 -1
- package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table-cell.js +6 -1
- package/dist/components/parameters/common/widget/parameter-float.js +5 -0
- package/dist/components/parameters/common/widget/parameter-line-directory-items-input.js +5 -0
- package/dist/components/parameters/common/widget/parameter-line-slider.js +5 -0
- package/dist/components/parameters/dynamic-margin-calculation/constants.d.ts +18 -0
- package/dist/components/parameters/dynamic-margin-calculation/constants.js +26 -0
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-dialog.d.ts +6 -0
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-dialog.js +1 -0
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.d.ts +9 -0
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.js +95 -0
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.d.ts +10 -0
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js +176 -0
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation.type.d.ts +10 -0
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation.type.js +8 -0
- package/dist/components/parameters/dynamic-margin-calculation/index.d.ts +8 -0
- package/dist/components/parameters/dynamic-margin-calculation/index.js +17 -0
- package/dist/components/parameters/dynamic-margin-calculation/loads-variations-parameters.d.ts +29 -0
- package/dist/components/parameters/dynamic-margin-calculation/loads-variations-parameters.js +154 -0
- package/dist/components/parameters/dynamic-margin-calculation/time-delay-parameters.d.ts +24 -0
- package/dist/components/parameters/dynamic-margin-calculation/time-delay-parameters.js +62 -0
- package/dist/components/parameters/dynamic-margin-calculation/use-dynamic-margin-calculation-parameters-form.d.ts +30 -0
- package/dist/components/parameters/dynamic-margin-calculation/use-dynamic-margin-calculation-parameters-form.js +179 -0
- package/dist/components/parameters/index.d.ts +1 -0
- package/dist/components/parameters/index.js +20 -7
- package/dist/components/parameters/loadflow/load-flow-general-parameters.js +10 -6
- package/dist/components/parameters/loadflow/load-flow-parameters-content.js +4 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-dialog.js +4 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-form.js +5 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-header.js +6 -2
- package/dist/components/parameters/loadflow/load-flow-parameters-inline.js +5 -1
- package/dist/components/parameters/loadflow/load-flow-parameters-utils.js +6 -3
- package/dist/components/parameters/loadflow/use-load-flow-parameters-form.js +6 -3
- package/dist/components/parameters/network-visualizations/map-parameters.js +4 -0
- package/dist/components/parameters/network-visualizations/network-area-diagram-parameters.js +5 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-form.js +5 -1
- package/dist/components/parameters/network-visualizations/network-visualizations-parameters-dialog.js +4 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-parameters-inline.js +5 -0
- package/dist/components/parameters/network-visualizations/single-line-diagram-parameters.js +4 -0
- package/dist/components/parameters/network-visualizations/use-network-visualizations-parameters-form.js +5 -0
- package/dist/components/parameters/pcc-min/pcc-min-form-utils.js +5 -0
- package/dist/components/parameters/pcc-min/pcc-min-parameters-dialog.js +4 -0
- package/dist/components/parameters/pcc-min/pcc-min-parameters-form.js +5 -1
- package/dist/components/parameters/pcc-min/pcc-min-parameters-inline.js +5 -1
- package/dist/components/parameters/pcc-min/use-pcc-min-parameters-form.js +5 -0
- package/dist/components/parameters/security-analysis/columns-definitions.d.ts +63 -0
- package/dist/components/parameters/security-analysis/columns-definitions.js +78 -0
- package/dist/components/parameters/security-analysis/security-analysis-parameters-dialog.js +5 -0
- package/dist/components/parameters/security-analysis/security-analysis-parameters-form.d.ts +4 -1
- package/dist/components/parameters/security-analysis/security-analysis-parameters-form.js +32 -13
- package/dist/components/parameters/security-analysis/security-analysis-parameters-inline.d.ts +2 -1
- package/dist/components/parameters/security-analysis/security-analysis-parameters-inline.js +9 -2
- package/dist/components/parameters/security-analysis/security-analysis-parameters-selector.d.ts +3 -2
- package/dist/components/parameters/security-analysis/security-analysis-parameters-selector.js +4 -0
- package/dist/components/parameters/security-analysis/security-analysis-violations-hiding.js +6 -2
- package/dist/components/parameters/security-analysis/types.d.ts +15 -0
- package/dist/components/parameters/security-analysis/types.js +1 -0
- package/dist/components/parameters/security-analysis/use-security-analysis-parameters-form.d.ts +5 -4
- package/dist/components/parameters/security-analysis/use-security-analysis-parameters-form.js +26 -7
- package/dist/components/parameters/sensi/columns-definitions.d.ts +7 -25
- package/dist/components/parameters/sensi/columns-definitions.js +35 -1
- package/dist/components/parameters/sensi/constants.d.ts +0 -2
- package/dist/components/parameters/sensi/constants.js +0 -4
- package/dist/components/parameters/sensi/index.d.ts +0 -1
- package/dist/components/parameters/sensi/index.js +1 -3
- package/dist/components/parameters/sensi/sensitivity-Flow-parameters.js +5 -0
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-dialog.js +4 -0
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.js +6 -2
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-inline.js +5 -1
- package/dist/components/parameters/sensi/sensitivity-parameters-selector.js +27 -19
- package/dist/components/parameters/sensi/use-sensitivity-analysis-parameters.js +7 -2
- package/dist/components/parameters/sensi/utils.d.ts +2 -1
- package/dist/components/parameters/sensi/utils.js +7 -2
- package/dist/components/parameters/short-circuit/short-circuit-fields.js +6 -2
- package/dist/components/parameters/short-circuit/short-circuit-icc-material-table-cell.js +5 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-dialog.js +4 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-form.js +5 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-inline.js +5 -1
- package/dist/components/parameters/short-circuit/short-circuit-parameters-utils.js +5 -1
- package/dist/components/parameters/short-circuit/use-short-circuit-parameters-form.js +6 -2
- package/dist/components/parameters/voltage-init/equipment-selection-parameters.js +5 -1
- package/dist/components/parameters/voltage-init/general-parameters.js +4 -0
- package/dist/components/parameters/voltage-init/use-voltage-init-parameters-form.js +5 -0
- package/dist/components/parameters/voltage-init/voltage-init-form-utils.js +5 -0
- package/dist/components/parameters/voltage-init/voltage-init-parameters-dialog.js +4 -0
- package/dist/components/parameters/voltage-init/voltage-init-parameters-form.js +5 -1
- package/dist/components/parameters/voltage-init/voltage-init-parameters-inline.js +5 -1
- package/dist/components/parameters/voltage-init/voltage-limits-parameters.js +5 -0
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +2 -2
- package/dist/hooks/use-create-row-data.d.ts +4 -0
- package/dist/hooks/{use-create-row-data-sensi.js → use-create-row-data.js} +5 -5
- package/dist/index.js +31 -9
- package/dist/services/dynamic-margin-calculation.d.ts +5 -0
- package/dist/services/dynamic-margin-calculation.js +35 -0
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.js +4 -0
- package/dist/translations/en/businessErrorsEn.d.ts +3 -0
- package/dist/translations/en/businessErrorsEn.js +4 -1
- package/dist/translations/en/parameters.d.ts +21 -0
- package/dist/translations/en/parameters.js +25 -3
- package/dist/translations/fr/businessErrorsFr.d.ts +3 -0
- package/dist/translations/fr/businessErrorsFr.js +4 -1
- package/dist/translations/fr/parameters.d.ts +21 -0
- package/dist/translations/fr/parameters.js +25 -3
- package/dist/utils/index.js +3 -0
- package/dist/utils/types/dynamic-margin-calculation.type.d.ts +32 -0
- package/dist/utils/types/dynamic-margin-calculation.type.js +14 -0
- package/dist/utils/types/elementType.d.ts +1 -0
- package/dist/utils/types/elementType.js +1 -0
- package/dist/utils/types/index.d.ts +1 -0
- package/dist/utils/types/index.js +3 -0
- package/dist/utils/types/parameters.type.d.ts +4 -2
- package/package.json +1 -1
- package/dist/components/parameters/common/limitreductions/limit-reductions-form-util.d.ts +0 -29
- package/dist/components/parameters/common/limitreductions/limit-reductions-form-util.js +0 -27
- package/dist/components/parameters/loadflow/load-flow-parameter-field.d.ts +0 -19
- package/dist/components/parameters/sensi/sensitivity-table.d.ts +0 -14
- package/dist/hooks/use-create-row-data-sensi.d.ts +0 -4
- /package/dist/components/parameters/{sensi → common/parameter-table}/table-cell.d.ts +0 -0
- /package/dist/components/parameters/{sensi → common/parameter-table}/table-row.js +0 -0
package/dist/components/dialogs/descriptionModificationDialog/DescriptionModificationDialog.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
|
|
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
|
+
*/
|
|
2
7
|
export interface DescriptionModificationDialogProps {
|
|
3
|
-
elementUuid: UUID;
|
|
4
8
|
description: string;
|
|
5
9
|
open: boolean;
|
|
6
10
|
onClose: () => void;
|
|
7
|
-
updateElement
|
|
11
|
+
updateElement?: (data: Record<string, string>) => Promise<Response>;
|
|
12
|
+
updateForm?: (data: Record<string, string>) => void;
|
|
8
13
|
}
|
|
9
|
-
export declare function DescriptionModificationDialog({
|
|
14
|
+
export declare function DescriptionModificationDialog({ description, open, onClose, updateElement, updateForm, }: Readonly<DescriptionModificationDialogProps>): import("react/jsx-runtime").JSX.Element;
|
package/dist/components/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js
CHANGED
|
@@ -15,11 +15,11 @@ const schema = yup.object().shape({
|
|
|
15
15
|
[FieldConstants.DESCRIPTION]: yup.string().max(MAX_CHAR_DESCRIPTION, "descriptionLimitError")
|
|
16
16
|
});
|
|
17
17
|
function DescriptionModificationDialog({
|
|
18
|
-
elementUuid,
|
|
19
18
|
description,
|
|
20
19
|
open,
|
|
21
20
|
onClose,
|
|
22
|
-
updateElement
|
|
21
|
+
updateElement,
|
|
22
|
+
updateForm
|
|
23
23
|
}) {
|
|
24
24
|
const { snackError } = useSnackMessage();
|
|
25
25
|
const emptyFormData = {
|
|
@@ -38,13 +38,16 @@ function DescriptionModificationDialog({
|
|
|
38
38
|
};
|
|
39
39
|
const onSubmit = useCallback(
|
|
40
40
|
(data) => {
|
|
41
|
-
updateElement(
|
|
41
|
+
updateElement?.({
|
|
42
42
|
[FieldConstants.DESCRIPTION]: data[FieldConstants.DESCRIPTION]?.trim() ?? ""
|
|
43
43
|
}).catch((error) => {
|
|
44
44
|
snackWithFallback(snackError, error, { headerId: "descriptionModificationError" });
|
|
45
45
|
});
|
|
46
|
+
updateForm?.({
|
|
47
|
+
[FieldConstants.DESCRIPTION]: data[FieldConstants.DESCRIPTION]?.trim() ?? ""
|
|
48
|
+
});
|
|
46
49
|
},
|
|
47
|
-
[
|
|
50
|
+
[updateElement, updateForm, snackError]
|
|
48
51
|
);
|
|
49
52
|
return /* @__PURE__ */ jsx(
|
|
50
53
|
CustomMuiDialog,
|
|
@@ -28,6 +28,11 @@ import { RadioInput } from "../../inputs/reactHookForm/booleans/RadioInput.js";
|
|
|
28
28
|
import "../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
29
29
|
import { DescriptionField } from "../../inputs/reactHookForm/text/DescriptionField.js";
|
|
30
30
|
import { UniqueNameInput } from "../../inputs/reactHookForm/text/UniqueNameInput.js";
|
|
31
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
32
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
33
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
34
|
+
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
35
|
+
import "../descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
31
36
|
import "@react-querybuilder/material";
|
|
32
37
|
import "../../filter/expert/expertFilterConstants.js";
|
|
33
38
|
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -22,6 +22,11 @@ import "ag-grid-community";
|
|
|
22
22
|
import "react-papaparse";
|
|
23
23
|
import "react-csv-downloader";
|
|
24
24
|
import "../inputs/reactHookForm/numbers/RangeInput.js";
|
|
25
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
26
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
27
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
28
|
+
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
29
|
+
import "../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
25
30
|
import "@react-querybuilder/material";
|
|
26
31
|
import "../filter/expert/expertFilterConstants.js";
|
|
27
32
|
import "../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -19,8 +19,8 @@ function DndTableBottomRightButtons({
|
|
|
19
19
|
name: arrayFormName
|
|
20
20
|
});
|
|
21
21
|
const noRowsSelected = currentRows ? !currentRows.some((row) => row[SELECTED]) : true;
|
|
22
|
-
const firstRowSelected = currentRows[0]?.[SELECTED];
|
|
23
|
-
const lastRowSelected = currentRows[currentRows.length - 1]?.[SELECTED];
|
|
22
|
+
const firstRowSelected = noRowsSelected ? void 0 : currentRows[0]?.[SELECTED];
|
|
23
|
+
const lastRowSelected = noRowsSelected ? void 0 : currentRows[currentRows.length - 1]?.[SELECTED];
|
|
24
24
|
return /* @__PURE__ */ jsxs(Grid, { container: true, item: true, xs: true, spacing: 1, sx: { justifyContent: "flex-end" }, children: [
|
|
25
25
|
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
|
|
26
26
|
Tooltip,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UseFieldArrayReturn } from 'react-hook-form';
|
|
2
2
|
import { DndColumn } from './dnd-table.type';
|
|
3
|
-
interface DndTableProps {
|
|
3
|
+
export interface DndTableProps {
|
|
4
4
|
arrayFormName: string;
|
|
5
5
|
useFieldArrayOutput: UseFieldArrayReturn;
|
|
6
6
|
columnsDefinition: DndColumn[];
|
|
@@ -26,4 +26,3 @@ interface DndTableProps {
|
|
|
26
26
|
maxRows?: number;
|
|
27
27
|
}
|
|
28
28
|
export declare function DndTable(props: Readonly<DndTableProps>): import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
export {};
|
|
@@ -24,6 +24,7 @@ import "react-csv-downloader";
|
|
|
24
24
|
import "yup";
|
|
25
25
|
import { AutocompleteInput } from "../inputs/reactHookForm/autocompleteInputs/AutocompleteInput.js";
|
|
26
26
|
import { CheckboxInput } from "../inputs/reactHookForm/booleans/CheckboxInput.js";
|
|
27
|
+
import { SwitchInput } from "../inputs/reactHookForm/booleans/SwitchInput.js";
|
|
27
28
|
import { ErrorInput } from "../inputs/reactHookForm/errorManagement/ErrorInput.js";
|
|
28
29
|
import { FieldErrorAlert } from "../inputs/reactHookForm/errorManagement/FieldErrorAlert.js";
|
|
29
30
|
import "../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
@@ -33,6 +34,11 @@ import "localized-countries/data/fr";
|
|
|
33
34
|
import "localized-countries/data/en";
|
|
34
35
|
import { TableNumericalInput } from "../inputs/reactHookForm/tableInputs/table-numerical-input.js";
|
|
35
36
|
import { TableTextInput } from "../inputs/reactHookForm/tableInputs/table-text-input.js";
|
|
37
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
38
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
39
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
40
|
+
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
41
|
+
import "../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
36
42
|
import "notistack";
|
|
37
43
|
import "@react-querybuilder/material";
|
|
38
44
|
import "../filter/expert/expertFilterConstants.js";
|
|
@@ -140,6 +146,7 @@ function EditableTableCell({
|
|
|
140
146
|
}
|
|
141
147
|
),
|
|
142
148
|
column.type === DndColumnType.CHIP_ITEMS && /* @__PURE__ */ jsx(ChipItemsInput, { name: `${arrayFormName}[${rowIndex}].${column.dataKey}`, hideErrorMessage: true }),
|
|
149
|
+
column.type === DndColumnType.SWITCH && /* @__PURE__ */ jsx(SwitchInput, { name: `${arrayFormName}[${rowIndex}].${column.dataKey}` }),
|
|
143
150
|
column.type === DndColumnType.CUSTOM && column.component(rowIndex)
|
|
144
151
|
] }, column.dataKey);
|
|
145
152
|
}
|
|
@@ -8,6 +8,7 @@ export declare enum DndColumnType {
|
|
|
8
8
|
AUTOCOMPLETE = "AUTOCOMPLETE",
|
|
9
9
|
CHIP_ITEMS = "CHIP_ITEMS",
|
|
10
10
|
DIRECTORY_ITEMS = "DIRECTORY_ITEMS",
|
|
11
|
+
SWITCH = "SWITCH",
|
|
11
12
|
CUSTOM = "CUSTOM"
|
|
12
13
|
}
|
|
13
14
|
export interface ColumnBase {
|
|
@@ -18,6 +19,7 @@ export interface ColumnBase {
|
|
|
18
19
|
extra?: JSX.Element;
|
|
19
20
|
editable?: boolean;
|
|
20
21
|
type: DndColumnType;
|
|
22
|
+
initialValue?: any;
|
|
21
23
|
}
|
|
22
24
|
export interface ColumnText extends ColumnBase {
|
|
23
25
|
type: DndColumnType.TEXT;
|
|
@@ -44,8 +46,11 @@ export interface ColumnDirectoryItem extends ColumnBase {
|
|
|
44
46
|
export interface ColumnChipsItem extends ColumnBase {
|
|
45
47
|
type: DndColumnType.CHIP_ITEMS;
|
|
46
48
|
}
|
|
49
|
+
export interface ColumnSwitchItem extends ColumnBase {
|
|
50
|
+
type: DndColumnType.SWITCH;
|
|
51
|
+
}
|
|
47
52
|
export interface ColumnCustom extends ColumnBase {
|
|
48
53
|
type: DndColumnType.CUSTOM;
|
|
49
54
|
component: (rowIndex: number) => ReactNode;
|
|
50
55
|
}
|
|
51
|
-
export type DndColumn = ColumnNumeric | ColumnAutocomplete | ColumnText | ColumnDirectoryItem | ColumnChipsItem | ColumnCustom;
|
|
56
|
+
export type DndColumn = ColumnNumeric | ColumnAutocomplete | ColumnText | ColumnDirectoryItem | ColumnChipsItem | ColumnSwitchItem | ColumnCustom;
|
|
@@ -6,6 +6,7 @@ var DndColumnType = /* @__PURE__ */ ((DndColumnType2) => {
|
|
|
6
6
|
DndColumnType2["AUTOCOMPLETE"] = "AUTOCOMPLETE";
|
|
7
7
|
DndColumnType2["CHIP_ITEMS"] = "CHIP_ITEMS";
|
|
8
8
|
DndColumnType2["DIRECTORY_ITEMS"] = "DIRECTORY_ITEMS";
|
|
9
|
+
DndColumnType2["SWITCH"] = "SWITCH";
|
|
9
10
|
DndColumnType2["CUSTOM"] = "CUSTOM";
|
|
10
11
|
return DndColumnType2;
|
|
11
12
|
})(DndColumnType || {});
|
|
@@ -26,6 +26,11 @@ import "react-csv-downloader";
|
|
|
26
26
|
import "../inputs/reactHookForm/numbers/RangeInput.js";
|
|
27
27
|
import { DescriptionField } from "../inputs/reactHookForm/text/DescriptionField.js";
|
|
28
28
|
import { UniqueNameInput } from "../inputs/reactHookForm/text/UniqueNameInput.js";
|
|
29
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
30
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
31
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
32
|
+
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
33
|
+
import "../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
29
34
|
import "@react-querybuilder/material";
|
|
30
35
|
import "./expert/expertFilterConstants.js";
|
|
31
36
|
import "../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -36,6 +36,10 @@ import "ag-grid-community";
|
|
|
36
36
|
import "react-papaparse";
|
|
37
37
|
import "react-csv-downloader";
|
|
38
38
|
import "../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
39
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
40
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
41
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
42
|
+
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
39
43
|
import "@react-querybuilder/material";
|
|
40
44
|
import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
41
45
|
yup.setLocale({
|
|
@@ -38,6 +38,10 @@ import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
|
38
38
|
import "react-papaparse";
|
|
39
39
|
import "react-csv-downloader";
|
|
40
40
|
import "../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
41
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
42
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
43
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
44
|
+
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
41
45
|
import "@react-querybuilder/material";
|
|
42
46
|
import "../expert/expertFilterConstants.js";
|
|
43
47
|
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
package/dist/components/index.js
CHANGED
|
@@ -91,6 +91,7 @@ import { DescriptionField } from "./inputs/reactHookForm/text/DescriptionField.j
|
|
|
91
91
|
import { ExpandingTextField } from "./inputs/reactHookForm/text/ExpandingTextField.js";
|
|
92
92
|
import { TextInput } from "./inputs/reactHookForm/text/TextInput.js";
|
|
93
93
|
import { UniqueNameInput } from "./inputs/reactHookForm/text/UniqueNameInput.js";
|
|
94
|
+
import { DescriptionInput } from "./inputs/reactHookForm/text/DescriptionInput.js";
|
|
94
95
|
import { CancelButton } from "./inputs/reactHookForm/utils/CancelButton.js";
|
|
95
96
|
import { FieldLabel } from "./inputs/reactHookForm/utils/FieldLabel.js";
|
|
96
97
|
import { SubmitButton } from "./inputs/reactHookForm/utils/SubmitButton.js";
|
|
@@ -135,7 +136,7 @@ import { ArrowsOutputIcon } from "./icons/ArrowsOutputIcon.js";
|
|
|
135
136
|
import { LeftPanelCloseIcon } from "./icons/LeftPanelCloseIcon.js";
|
|
136
137
|
import { EditNoteIcon } from "./icons/EditNoteIcon.js";
|
|
137
138
|
import { ComputingType, formatComputingTypeLabel, isValidComputingType } from "./parameters/common/computing-type.js";
|
|
138
|
-
import { COMMON_PARAMETERS, PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_PROVIDER, PROVIDER, SPECIFIC_PARAMETERS, VERSION_PARAMETER, VOLTAGE_LEVEL } from "./parameters/common/
|
|
139
|
+
import { COMMON_PARAMETERS, CONTINGENCIES, CONTINGENCY_LISTS, CONTINGENCY_LISTS_INFOS, PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_PROVIDER, PROVIDER, SPECIFIC_PARAMETERS, VERSION_PARAMETER, VOLTAGE_LEVEL } from "./parameters/common/constants.js";
|
|
139
140
|
import { LineSeparator } from "./parameters/common/line-separator.js";
|
|
140
141
|
import { LabelledButton, SwitchWithLabel, TabPanel } from "./parameters/common/parameters.js";
|
|
141
142
|
import { CreateParameterDialog } from "./parameters/common/parameters-creation-dialog.js";
|
|
@@ -148,8 +149,7 @@ import { ParameterSwitch } from "./parameters/common/widget/parameter-switch.js"
|
|
|
148
149
|
import { CustomVoltageLevelTable } from "./parameters/common/voltage-level-table/custom-voltage-level-table.js";
|
|
149
150
|
import { CustomVoltageLevelTableCell } from "./parameters/common/voltage-level-table/custom-voltage-level-table-cell.js";
|
|
150
151
|
import { CustomVoltageLevelTableRow } from "./parameters/common/voltage-level-table/custom-voltage-level-table-row.js";
|
|
151
|
-
import { COLUMNS_DEFINITIONS_LIMIT_REDUCTIONS, IST_FORM, LIMIT_DURATION_FORM, LIMIT_REDUCTIONS_FORM, TAB_INFO, TabValues, VOLTAGE_LEVELS_FORM, getLimitReductionsFormSchema,
|
|
152
|
-
import { toFormValueSaParameters, toFormValuesLimitReductions } from "./parameters/common/limitreductions/limit-reductions-form-util.js";
|
|
152
|
+
import { COLUMNS_DEFINITIONS_LIMIT_REDUCTIONS, IST_FORM, LIMIT_DURATION_FORM, LIMIT_REDUCTIONS_FORM, TAB_INFO, TabValues, VOLTAGE_LEVELS_FORM, getLimitReductionsFormSchema, toFormValuesLimitReductions } from "./parameters/common/limitreductions/columns-definitions.js";
|
|
153
153
|
import { LimitReductionsTableForm } from "./parameters/common/limitreductions/limit-reductions-table-form.js";
|
|
154
154
|
import { LimitReductionTableRow } from "./parameters/common/limitreductions/limit-reduction-table-row.js";
|
|
155
155
|
import { LimitReductionTableCell } from "./parameters/common/limitreductions/limit-reduction-table-cell.js";
|
|
@@ -174,7 +174,8 @@ import { SecurityAnalysisParametersDialog } from "./parameters/security-analysis
|
|
|
174
174
|
import { SensitivityAnalysisParametersInline } from "./parameters/sensi/sensitivity-analysis-parameters-inline.js";
|
|
175
175
|
import { SensitivityAnalysisParametersDialog } from "./parameters/sensi/sensitivity-analysis-parameters-dialog.js";
|
|
176
176
|
import { COLUMNS_DEFINITIONS_HVDCS, COLUMNS_DEFINITIONS_INJECTIONS, COLUMNS_DEFINITIONS_INJECTIONS_SET, COLUMNS_DEFINITIONS_NODES, COLUMNS_DEFINITIONS_PSTS, EQUIPMENTS_IN_VOLTAGE_REGULATION_TYPES, HVDC_EQUIPMENT_TYPES, INJECTIONS_EQUIPMENT_TYPES, INJECTION_DISTRIBUTION_TYPES, MONITORED_BRANCHES_EQUIPMENT_TYPES, MONITORED_VOLTAGE_LEVELS_EQUIPMENT_TYPES, PSTS_EQUIPMENT_TYPES, SENSITIVITY_TYPES, SensiBranchesTabValues, SensiHvdcs, SensiInjection, SensiInjectionsSet, SensiNodes, SensiPsts, SensiTabValues } from "./parameters/sensi/columns-definitions.js";
|
|
177
|
-
import {
|
|
177
|
+
import { ACCURACY, ACTIVE, CALCULATION_TYPE, LOADS_VARIATIONS, LOAD_FILTERS, LOAD_INCREASE_START_TIME, LOAD_INCREASE_STOP_TIME, LOAD_MODELS_RULE, MARGIN_CALCULATION_START_TIME, START_TIME, STOP_TIME, VARIATION } from "./parameters/dynamic-margin-calculation/constants.js";
|
|
178
|
+
import { DynamicMarginCalculationInline } from "./parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js";
|
|
178
179
|
import { CustomMenuItem, CustomNestedMenuItem } from "./menus/custom-nested-menu.js";
|
|
179
180
|
import { OverflowableTableCell } from "./muiTable/OverflowableTableCell.js";
|
|
180
181
|
import { OverflowableTableCellWithCheckbox } from "./muiTable/OverflowableTableCellWithCheckbox.js";
|
|
@@ -186,6 +187,8 @@ import { filledTextField, italicFontTextField, standardTextField } from "./netwo
|
|
|
186
187
|
import { SubstationCreationForm } from "./network-modifications/substation/creation/SubstationCreationForm.js";
|
|
187
188
|
import { substationCreationDtoToForm, substationCreationEmptyFormData, substationCreationFormSchema, substationCreationFormToDto } from "./network-modifications/substation/creation/substationCreation.utils.js";
|
|
188
189
|
export {
|
|
190
|
+
ACCURACY,
|
|
191
|
+
ACTIVE,
|
|
189
192
|
AboutDialog,
|
|
190
193
|
ActivableChip,
|
|
191
194
|
AddButton,
|
|
@@ -201,6 +204,7 @@ export {
|
|
|
201
204
|
BooleanInput,
|
|
202
205
|
BooleanNullableCellRenderer,
|
|
203
206
|
BottomRightButtons,
|
|
207
|
+
CALCULATION_TYPE,
|
|
204
208
|
CENTER_LABEL,
|
|
205
209
|
COLUMNS_DEFINITIONS_HVDCS,
|
|
206
210
|
COLUMNS_DEFINITIONS_INJECTIONS,
|
|
@@ -212,6 +216,9 @@ export {
|
|
|
212
216
|
COMMON_PARAMETERS,
|
|
213
217
|
COMPONENT_LIBRARY,
|
|
214
218
|
CONNECTED_MODE,
|
|
219
|
+
CONTINGENCIES,
|
|
220
|
+
CONTINGENCY_LISTS,
|
|
221
|
+
CONTINGENCY_LISTS_INFOS,
|
|
215
222
|
CONTINGENCY_LIST_EQUIPMENTS,
|
|
216
223
|
CONVERTERS_MODE_OPTIONS,
|
|
217
224
|
COUNTRIES_TO_BALANCE,
|
|
@@ -258,6 +265,7 @@ export {
|
|
|
258
265
|
DataType,
|
|
259
266
|
DefaultCellRenderer,
|
|
260
267
|
DescriptionField,
|
|
268
|
+
DescriptionInput,
|
|
261
269
|
DescriptionModificationDialog,
|
|
262
270
|
DevModeBanner,
|
|
263
271
|
DirectoryItemSelector,
|
|
@@ -267,6 +275,7 @@ export {
|
|
|
267
275
|
DndTableAddRowsDialog,
|
|
268
276
|
DndTableBottomLeftButtons,
|
|
269
277
|
DndTableBottomRightButtons,
|
|
278
|
+
DynamicMarginCalculationInline,
|
|
270
279
|
ENERGY_SOURCE_OPTIONS,
|
|
271
280
|
EQUIPMENTS_IN_VOLTAGE_REGULATION_TYPES,
|
|
272
281
|
EXPERT_FILTER_EQUIPMENTS,
|
|
@@ -321,6 +330,11 @@ export {
|
|
|
321
330
|
LIMIT_DURATION_FORM,
|
|
322
331
|
LIMIT_REDUCTIONS_FORM,
|
|
323
332
|
LINE_FLOW_MODE,
|
|
333
|
+
LOADS_VARIATIONS,
|
|
334
|
+
LOAD_FILTERS,
|
|
335
|
+
LOAD_INCREASE_START_TIME,
|
|
336
|
+
LOAD_INCREASE_STOP_TIME,
|
|
337
|
+
LOAD_MODELS_RULE,
|
|
324
338
|
LOAD_TYPE_OPTIONS,
|
|
325
339
|
LOW_VOLTAGE_LIMIT,
|
|
326
340
|
LabelledButton,
|
|
@@ -342,6 +356,7 @@ export {
|
|
|
342
356
|
MAP_BASEMAP_MAPBOX,
|
|
343
357
|
MAP_BASE_MAP,
|
|
344
358
|
MAP_MANUAL_REFRESH,
|
|
359
|
+
MARGIN_CALCULATION_START_TIME,
|
|
345
360
|
MAX_ROWS_NUMBER,
|
|
346
361
|
MAX_VALUE_ALLOWED_FOR_LIMIT_REDUCTION,
|
|
347
362
|
MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION,
|
|
@@ -442,6 +457,8 @@ export {
|
|
|
442
457
|
SHUNT_COMPENSATOR_TYPE_OPTIONS,
|
|
443
458
|
SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON,
|
|
444
459
|
SPECIFIC_PARAMETERS,
|
|
460
|
+
START_TIME,
|
|
461
|
+
STOP_TIME,
|
|
445
462
|
SUBSTATION_LAYOUT,
|
|
446
463
|
SVAR_REGULATION_MODE_OPTIONS,
|
|
447
464
|
SecurityAnalysisParametersDialog,
|
|
@@ -457,7 +474,6 @@ export {
|
|
|
457
474
|
SensiTabValues,
|
|
458
475
|
SensitivityAnalysisParametersDialog,
|
|
459
476
|
SensitivityAnalysisParametersInline,
|
|
460
|
-
SensitivityTable,
|
|
461
477
|
SeparatorCellRenderer,
|
|
462
478
|
ShortCircuitParametersEditionDialog,
|
|
463
479
|
ShortCircuitParametersInLine,
|
|
@@ -492,6 +508,7 @@ export {
|
|
|
492
508
|
VARIABLE_Q_GENERATORS,
|
|
493
509
|
VARIABLE_SHUNT_COMPENSATORS,
|
|
494
510
|
VARIABLE_TRANSFORMERS,
|
|
511
|
+
VARIATION,
|
|
495
512
|
VERSION_PARAMETER,
|
|
496
513
|
VOLTAGE_INIT_MODE,
|
|
497
514
|
VOLTAGE_LEVEL,
|
|
@@ -532,7 +549,6 @@ export {
|
|
|
532
549
|
getPropertiesFromModification,
|
|
533
550
|
getPropertyValue,
|
|
534
551
|
getRangeInputSchema,
|
|
535
|
-
getSAParametersFromSchema,
|
|
536
552
|
gridItem,
|
|
537
553
|
handleSigninCallback,
|
|
538
554
|
handleSilentRenewCallback,
|
|
@@ -567,7 +583,6 @@ export {
|
|
|
567
583
|
substationCreationFormToDto,
|
|
568
584
|
testQuery,
|
|
569
585
|
toFloatOrNullValue,
|
|
570
|
-
toFormValueSaParameters,
|
|
571
586
|
toFormValuesLimitReductions,
|
|
572
587
|
toModificationProperties,
|
|
573
588
|
unscrollableDialogStyles,
|
|
@@ -34,6 +34,7 @@ import { DescriptionField } from "./reactHookForm/text/DescriptionField.js";
|
|
|
34
34
|
import { ExpandingTextField } from "./reactHookForm/text/ExpandingTextField.js";
|
|
35
35
|
import { TextInput } from "./reactHookForm/text/TextInput.js";
|
|
36
36
|
import { UniqueNameInput } from "./reactHookForm/text/UniqueNameInput.js";
|
|
37
|
+
import { DescriptionInput } from "./reactHookForm/text/DescriptionInput.js";
|
|
37
38
|
import { CancelButton } from "./reactHookForm/utils/CancelButton.js";
|
|
38
39
|
import { FieldLabel } from "./reactHookForm/utils/FieldLabel.js";
|
|
39
40
|
import { SubmitButton } from "./reactHookForm/utils/SubmitButton.js";
|
|
@@ -82,6 +83,7 @@ export {
|
|
|
82
83
|
DEFAULT_RANGE_VALUE,
|
|
83
84
|
DESCRIPTION,
|
|
84
85
|
DescriptionField,
|
|
86
|
+
DescriptionInput,
|
|
85
87
|
DirectoryItemsInput,
|
|
86
88
|
ElementValueEditor,
|
|
87
89
|
ErrorInput,
|
|
@@ -33,6 +33,7 @@ import { DescriptionField } from "./text/DescriptionField.js";
|
|
|
33
33
|
import { ExpandingTextField } from "./text/ExpandingTextField.js";
|
|
34
34
|
import { TextInput } from "./text/TextInput.js";
|
|
35
35
|
import { UniqueNameInput } from "./text/UniqueNameInput.js";
|
|
36
|
+
import { DescriptionInput } from "./text/DescriptionInput.js";
|
|
36
37
|
import { CancelButton } from "./utils/CancelButton.js";
|
|
37
38
|
import { FieldLabel } from "./utils/FieldLabel.js";
|
|
38
39
|
import { SubmitButton } from "./utils/SubmitButton.js";
|
|
@@ -58,6 +59,7 @@ export {
|
|
|
58
59
|
DEFAULT_RANGE_VALUE,
|
|
59
60
|
DESCRIPTION,
|
|
60
61
|
DescriptionField,
|
|
62
|
+
DescriptionInput,
|
|
61
63
|
DirectoryItemsInput,
|
|
62
64
|
ErrorInput,
|
|
63
65
|
ExpandableInput,
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Tooltip, IconButton } from "@mui/material";
|
|
3
|
+
import { useController } from "react-hook-form";
|
|
4
|
+
import { useState, useCallback } from "react";
|
|
5
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
6
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
7
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
8
|
+
import { EditNoteIcon } from "../../../icons/EditNoteIcon.js";
|
|
9
|
+
import "../provider/CustomFormProvider.js";
|
|
10
|
+
import { useCustomFormContext } from "../provider/useCustomFormContext.js";
|
|
11
|
+
import { DescriptionModificationDialog } from "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
12
|
+
const styles = {
|
|
13
|
+
descriptionTooltip: {
|
|
14
|
+
display: "inline-block",
|
|
15
|
+
whiteSpace: "pre",
|
|
16
|
+
textOverflow: "ellipsis",
|
|
17
|
+
overflow: "hidden",
|
|
18
|
+
maxWidth: "250px",
|
|
19
|
+
maxHeight: "50px",
|
|
20
|
+
cursor: "pointer"
|
|
21
|
+
},
|
|
22
|
+
coloredButton: (theme) => ({
|
|
23
|
+
color: theme.palette.text.primary
|
|
24
|
+
})
|
|
25
|
+
};
|
|
26
|
+
function DescriptionInput({ name }) {
|
|
27
|
+
const {
|
|
28
|
+
field: { value }
|
|
29
|
+
} = useController({ name });
|
|
30
|
+
const formContext = useCustomFormContext();
|
|
31
|
+
const [openDescModificationDialog, setOpenDescModificationDialog] = useState(false);
|
|
32
|
+
const updateModification = useCallback(
|
|
33
|
+
(descriptionRecord) => {
|
|
34
|
+
const newDescription = descriptionRecord?.description ?? "";
|
|
35
|
+
formContext.setValue(name, newDescription, {
|
|
36
|
+
shouldValidate: true,
|
|
37
|
+
shouldDirty: true
|
|
38
|
+
});
|
|
39
|
+
},
|
|
40
|
+
[formContext, name]
|
|
41
|
+
);
|
|
42
|
+
const handleDescDialogClose = useCallback(() => {
|
|
43
|
+
setOpenDescModificationDialog(false);
|
|
44
|
+
}, [setOpenDescModificationDialog]);
|
|
45
|
+
const handleModifyDescription = useCallback(() => {
|
|
46
|
+
setOpenDescModificationDialog(true);
|
|
47
|
+
}, [setOpenDescModificationDialog]);
|
|
48
|
+
const descriptionLines = value?.split("\n");
|
|
49
|
+
if (descriptionLines?.length > 3) {
|
|
50
|
+
descriptionLines[2] = "...";
|
|
51
|
+
}
|
|
52
|
+
const tooltipBox = value ? /* @__PURE__ */ jsxs(Box, { sx: styles.descriptionTooltip, children: [
|
|
53
|
+
" ",
|
|
54
|
+
descriptionLines?.join("\n"),
|
|
55
|
+
" "
|
|
56
|
+
] }) : void 0;
|
|
57
|
+
const icon = /* @__PURE__ */ jsx(Tooltip, { title: tooltipBox, arrow: true, placement: "right", children: /* @__PURE__ */ jsx(IconButton, { onClick: handleModifyDescription, sx: styles.coloredButton, children: /* @__PURE__ */ jsx(EditNoteIcon, { empty: !value }) }) });
|
|
58
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
59
|
+
openDescModificationDialog && /* @__PURE__ */ jsx(
|
|
60
|
+
DescriptionModificationDialog,
|
|
61
|
+
{
|
|
62
|
+
open: true,
|
|
63
|
+
description: value ?? "",
|
|
64
|
+
onClose: handleDescDialogClose,
|
|
65
|
+
updateForm: updateModification
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ jsx(
|
|
69
|
+
Box,
|
|
70
|
+
{
|
|
71
|
+
sx: {
|
|
72
|
+
display: "flex",
|
|
73
|
+
justifyContent: "center",
|
|
74
|
+
alignItems: "center",
|
|
75
|
+
verticalAlign: "middle",
|
|
76
|
+
cursor: void 0
|
|
77
|
+
},
|
|
78
|
+
children: icon
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
] });
|
|
82
|
+
}
|
|
83
|
+
export {
|
|
84
|
+
DescriptionInput
|
|
85
|
+
};
|
|
@@ -2,8 +2,10 @@ import { DescriptionField } from "./DescriptionField.js";
|
|
|
2
2
|
import { ExpandingTextField } from "./ExpandingTextField.js";
|
|
3
3
|
import { TextInput } from "./TextInput.js";
|
|
4
4
|
import { UniqueNameInput } from "./UniqueNameInput.js";
|
|
5
|
+
import { DescriptionInput } from "./DescriptionInput.js";
|
|
5
6
|
export {
|
|
6
7
|
DescriptionField,
|
|
8
|
+
DescriptionInput,
|
|
7
9
|
ExpandingTextField,
|
|
8
10
|
TextInput,
|
|
9
11
|
UniqueNameInput
|
|
@@ -25,6 +25,11 @@ import "ag-grid-community";
|
|
|
25
25
|
import "react-papaparse";
|
|
26
26
|
import "react-csv-downloader";
|
|
27
27
|
import "../../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
28
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
29
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
30
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
31
|
+
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
32
|
+
import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
28
33
|
import { ExpandableInput } from "../../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
|
|
29
34
|
import "@react-querybuilder/material";
|
|
30
35
|
import "../../../filter/expert/expertFilterConstants.js";
|
|
@@ -25,6 +25,11 @@ import "react-csv-downloader";
|
|
|
25
25
|
import { AutocompleteInput } from "../../../inputs/reactHookForm/autocompleteInputs/AutocompleteInput.js";
|
|
26
26
|
import { TextInput } from "../../../inputs/reactHookForm/text/TextInput.js";
|
|
27
27
|
import "../../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
28
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
29
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
30
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
31
|
+
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
32
|
+
import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
28
33
|
import "@react-querybuilder/material";
|
|
29
34
|
import "../../../filter/expert/expertFilterConstants.js";
|
|
30
35
|
import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -24,6 +24,11 @@ import "react-papaparse";
|
|
|
24
24
|
import "react-csv-downloader";
|
|
25
25
|
import { TextInput } from "../../../inputs/reactHookForm/text/TextInput.js";
|
|
26
26
|
import "../../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
27
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
28
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
29
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
30
|
+
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
31
|
+
import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
27
32
|
import { CountrySelectionInput } from "../../../inputs/reactHookForm/CountrySelectionInput.js";
|
|
28
33
|
import "@react-querybuilder/material";
|
|
29
34
|
import "../../../filter/expert/expertFilterConstants.js";
|
|
@@ -24,13 +24,18 @@ import "react-papaparse";
|
|
|
24
24
|
import "react-csv-downloader";
|
|
25
25
|
import "../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
26
26
|
import { MuiSelectInput } from "../../inputs/reactHookForm/selectInputs/MuiSelectInput.js";
|
|
27
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
28
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
29
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
30
|
+
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
31
|
+
import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
27
32
|
import "@react-querybuilder/material";
|
|
28
33
|
import "../../filter/expert/expertFilterConstants.js";
|
|
29
34
|
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
30
35
|
import "uuid";
|
|
31
36
|
import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
32
37
|
import "react-querybuilder";
|
|
33
|
-
import { PROVIDER } from "./
|
|
38
|
+
import { PROVIDER } from "./constants.js";
|
|
34
39
|
const styles = {
|
|
35
40
|
providerParam: {
|
|
36
41
|
height: "fit-content",
|
|
@@ -39,11 +44,11 @@ const styles = {
|
|
|
39
44
|
};
|
|
40
45
|
function ProviderParam({ options }) {
|
|
41
46
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42
|
-
/* @__PURE__ */ jsxs(Grid, {
|
|
47
|
+
/* @__PURE__ */ jsxs(Grid, { container: true, sx: styles.providerParam, paddingRight: 1, children: [
|
|
43
48
|
/* @__PURE__ */ jsx(Grid, { item: true, xs: true, sx: parametersStyles.parameterName, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "Provider" }) }),
|
|
44
49
|
/* @__PURE__ */ jsx(Grid, { item: true, container: true, xs: 2, sx: parametersStyles.controlItem, children: /* @__PURE__ */ jsx(MuiSelectInput, { name: PROVIDER, size: "small", fullWidth: true, options }) })
|
|
45
50
|
] }),
|
|
46
|
-
/* @__PURE__ */ jsx(Grid, { container: true, paddingTop: 1, paddingRight: 1,
|
|
51
|
+
/* @__PURE__ */ jsx(Grid, { container: true, paddingTop: 1, paddingRight: 1, children: /* @__PURE__ */ jsx(LineSeparator, {}) })
|
|
47
52
|
] });
|
|
48
53
|
}
|
|
49
54
|
export {
|
|
@@ -9,3 +9,6 @@ export declare const PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD = "highVoltageAbso
|
|
|
9
9
|
export declare const VERSION_PARAMETER = "version";
|
|
10
10
|
export declare const COMMON_PARAMETERS = "commonParameters";
|
|
11
11
|
export declare const SPECIFIC_PARAMETERS = "specificParametersPerProvider";
|
|
12
|
+
export declare const CONTINGENCY_LISTS_INFOS = "contingencyListsInfos";
|
|
13
|
+
export declare const CONTINGENCY_LISTS = "contingencyLists";
|
|
14
|
+
export declare const CONTINGENCIES = "contingencies";
|
|
@@ -9,8 +9,14 @@ const PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD = "highVoltageAbsoluteThreshold";
|
|
|
9
9
|
const VERSION_PARAMETER = "version";
|
|
10
10
|
const COMMON_PARAMETERS = "commonParameters";
|
|
11
11
|
const SPECIFIC_PARAMETERS = "specificParametersPerProvider";
|
|
12
|
+
const CONTINGENCY_LISTS_INFOS = "contingencyListsInfos";
|
|
13
|
+
const CONTINGENCY_LISTS = "contingencyLists";
|
|
14
|
+
const CONTINGENCIES = "contingencies";
|
|
12
15
|
export {
|
|
13
16
|
COMMON_PARAMETERS,
|
|
17
|
+
CONTINGENCIES,
|
|
18
|
+
CONTINGENCY_LISTS,
|
|
19
|
+
CONTINGENCY_LISTS_INFOS,
|
|
14
20
|
PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD,
|
|
15
21
|
PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD,
|
|
16
22
|
PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Parameters, ColumnsDef } from '../parameter-table';
|
|
2
|
+
import { default as yup } from '../../../../utils/yupConfig';
|
|
3
|
+
import { ContingencyListsInfos } from './types';
|
|
4
|
+
export declare const COLUMNS_DEFINITIONS_CONTINGENCY_LISTS_INFOS: ColumnsDef[];
|
|
5
|
+
export declare const ParamContingencyLists: Parameters;
|
|
6
|
+
export declare const getContingencyListsInfosFormSchema: () => yup.ObjectSchema<{
|
|
7
|
+
contingencyListsInfos: {
|
|
8
|
+
description?: string | undefined;
|
|
9
|
+
contingencyLists: {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
}[];
|
|
13
|
+
activated: NonNullable<boolean | undefined>;
|
|
14
|
+
}[] | undefined;
|
|
15
|
+
}, yup.AnyObject, {
|
|
16
|
+
contingencyListsInfos: "";
|
|
17
|
+
}, "">;
|
|
18
|
+
export declare const toFormValuesContingencyListsInfos: (contingencyListsInfos: ContingencyListsInfos[]) => {
|
|
19
|
+
contingencyListsInfos: {
|
|
20
|
+
contingencyLists: {
|
|
21
|
+
name: string;
|
|
22
|
+
id: `${string}-${string}-${string}-${string}-${string}`;
|
|
23
|
+
}[];
|
|
24
|
+
description: string;
|
|
25
|
+
activated: boolean;
|
|
26
|
+
}[];
|
|
27
|
+
};
|