@gridsuite/commons-ui 0.166.0 → 0.168.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/csvDownloader/csv-export.type.d.ts +1 -0
- package/dist/components/csvDownloader/index.js +2 -1
- package/dist/components/csvDownloader/use-csv-export.d.ts +2 -1
- package/dist/components/csvDownloader/use-csv-export.js +9 -2
- 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 +2 -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/index.js +20 -2
- package/dist/components/parameters/common/ProviderParam.js +2 -2
- 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} +7 -13
- 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 +18 -1
- package/dist/components/parameters/loadflow/load-flow-general-parameters.js +4 -4
- package/dist/components/parameters/short-circuit/columns-definition.d.ts +30 -0
- package/dist/components/parameters/short-circuit/columns-definition.js +127 -0
- package/dist/components/parameters/short-circuit/constants.d.ts +2 -0
- package/dist/components/parameters/short-circuit/constants.js +4 -0
- package/dist/components/parameters/short-circuit/index.js +3 -1
- package/dist/components/parameters/short-circuit/short-circuit-fields.js +25 -5
- package/dist/components/parameters/short-circuit/short-circuit-icc-cluster-table-cell.d.ts +7 -0
- package/dist/components/parameters/short-circuit/short-circuit-icc-cluster-table-cell.js +75 -0
- package/dist/components/parameters/short-circuit/short-circuit-icc-cluster-table-row.d.ts +9 -0
- package/dist/components/parameters/short-circuit/short-circuit-icc-cluster-table-row.js +35 -0
- package/dist/components/parameters/short-circuit/short-circuit-icc-cluster-table.d.ts +8 -0
- package/dist/components/parameters/short-circuit/short-circuit-icc-cluster-table.js +59 -0
- package/dist/components/parameters/short-circuit/short-circuit-icc-material-table-cell.d.ts +1 -1
- package/dist/components/parameters/short-circuit/short-circuit-icc-material-table-cell.js +3 -3
- package/dist/components/parameters/short-circuit/short-circuit-icc-material-table-row.d.ts +1 -1
- package/dist/components/parameters/short-circuit/short-circuit-icc-material-table-row.js +1 -1
- package/dist/components/parameters/short-circuit/short-circuit-icc-material-table.d.ts +2 -3
- package/dist/components/parameters/short-circuit/short-circuit-icc-material-table.js +26 -31
- package/dist/components/parameters/short-circuit/short-circuit-parameters-utils.d.ts +3 -2
- package/dist/components/parameters/short-circuit/short-circuit-parameters-utils.js +100 -13
- package/dist/components/parameters/short-circuit/short-circuit-parameters.type.d.ts +20 -1
- package/dist/components/parameters/short-circuit/use-short-circuit-parameters-form.js +5 -4
- package/dist/index.js +27 -2
- 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 +2 -0
- package/dist/translations/en/businessErrorsEn.js +3 -1
- package/dist/translations/en/parameters.d.ts +38 -10
- package/dist/translations/en/parameters.js +40 -11
- package/dist/translations/fr/businessErrorsFr.d.ts +2 -0
- package/dist/translations/fr/businessErrorsFr.js +3 -1
- package/dist/translations/fr/parameters.d.ts +38 -10
- package/dist/translations/fr/parameters.js +40 -11
- 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/metadata.d.ts +1 -0
- package/dist/utils/types/parameters.type.d.ts +2 -1
- package/package.json +1 -1
- package/dist/components/parameters/loadflow/load-flow-parameter-field.d.ts +0 -19
- package/dist/components/parameters/short-circuit/short-circuit-icc-material-table-columns-definition.d.ts +0 -18
- package/dist/components/parameters/short-circuit/short-circuit-icc-material-table-columns-definition.js +0 -47
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { CsvExport } from "./csv-export.js";
|
|
2
2
|
import { ExportCsvButton } from "./export-csv-button.js";
|
|
3
|
-
import { useCsvExport } from "./use-csv-export.js";
|
|
3
|
+
import { fetchCsvSeparator, useCsvExport } from "./use-csv-export.js";
|
|
4
4
|
export {
|
|
5
5
|
CsvExport,
|
|
6
6
|
ExportCsvButton,
|
|
7
|
+
fetchCsvSeparator,
|
|
7
8
|
useCsvExport
|
|
8
9
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CsvDownloadProps } from './csv-export.type';
|
|
2
|
+
export declare const fetchCsvSeparator: () => Promise<string | undefined>;
|
|
2
3
|
export declare const useCsvExport: () => {
|
|
3
|
-
getData: (props: CsvDownloadProps) => string | undefined | void
|
|
4
|
+
getData: (props: CsvDownloadProps) => Promise<string | undefined | void>;
|
|
4
5
|
};
|
|
@@ -6,11 +6,15 @@ import { LANG_FRENCH } from "../../utils/langs.js";
|
|
|
6
6
|
import "react/jsx-runtime";
|
|
7
7
|
import "@mui/icons-material";
|
|
8
8
|
import "../../utils/yupConfig.js";
|
|
9
|
+
import { fetchStudyMetadata } from "../../services/appsMetadata.js";
|
|
9
10
|
const NA_VALUE = "N/A";
|
|
11
|
+
const fetchCsvSeparator = async () => {
|
|
12
|
+
return fetchStudyMetadata().then((metadata) => metadata.copyCsvSeparator);
|
|
13
|
+
};
|
|
10
14
|
const useCsvExport = () => {
|
|
11
15
|
const intl = useIntl();
|
|
12
16
|
const getData = useCallback(
|
|
13
|
-
(props) => {
|
|
17
|
+
async (props) => {
|
|
14
18
|
const formatNAValue = (value) => {
|
|
15
19
|
return value === NA_VALUE ? intl.formatMessage({ id: "export/undefined" }) : value;
|
|
16
20
|
};
|
|
@@ -30,10 +34,12 @@ const useCsvExport = () => {
|
|
|
30
34
|
return tableName.trim().replace(/[\\/:"*?<>|\s]/g, "-").substring(0, 27);
|
|
31
35
|
};
|
|
32
36
|
const prefix = props.tableNamePrefix ?? "";
|
|
37
|
+
const defaultSeparator = props.language === LANG_FRENCH ? ";" : ",";
|
|
38
|
+
const columnSeparatorValue = props.isCopyCsv ? await fetchCsvSeparator() ?? defaultSeparator : defaultSeparator;
|
|
33
39
|
return props.getData({
|
|
34
40
|
suppressQuotes: false,
|
|
35
41
|
skipPinnedBottom: props.skipPinnedBottom,
|
|
36
|
-
columnSeparator:
|
|
42
|
+
columnSeparator: columnSeparatorValue,
|
|
37
43
|
columnKeys: props.columns.map((col) => col.colId).filter(hasColId),
|
|
38
44
|
skipColumnHeaders: props.skipColumnHeaders,
|
|
39
45
|
processHeaderCallback: (params) => params.column.getColDef().headerComponentParams?.displayName ?? params.column.getColDef().headerName ?? params.column.getColId(),
|
|
@@ -46,5 +52,6 @@ const useCsvExport = () => {
|
|
|
46
52
|
return { getData };
|
|
47
53
|
};
|
|
48
54
|
export {
|
|
55
|
+
fetchCsvSeparator,
|
|
49
56
|
useCsvExport
|
|
50
57
|
};
|
|
@@ -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";
|
|
@@ -145,6 +146,7 @@ function EditableTableCell({
|
|
|
145
146
|
}
|
|
146
147
|
),
|
|
147
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}` }),
|
|
148
150
|
column.type === DndColumnType.CUSTOM && column.component(rowIndex)
|
|
149
151
|
] }, column.dataKey);
|
|
150
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 || {});
|
package/dist/components/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import { CardErrorBoundary } from "./cardErrorBoundary/CardErrorBoundary.js";
|
|
|
16
16
|
import { CheckBoxList } from "./checkBoxList/CheckBoxList.js";
|
|
17
17
|
import { CsvExport } from "./csvDownloader/csv-export.js";
|
|
18
18
|
import { ExportCsvButton } from "./csvDownloader/export-csv-button.js";
|
|
19
|
-
import { useCsvExport } from "./csvDownloader/use-csv-export.js";
|
|
19
|
+
import { fetchCsvSeparator, useCsvExport } from "./csvDownloader/use-csv-export.js";
|
|
20
20
|
import { CUSTOM_AGGRID_THEME, styles } from "./customAGGrid/customAggrid.style.js";
|
|
21
21
|
import { CustomAGGrid } from "./customAGGrid/customAggrid.js";
|
|
22
22
|
import { SeparatorCellRenderer } from "./customAGGrid/separatorCellRenderer.js";
|
|
@@ -160,7 +160,7 @@ import { NetworkVisualizationsParametersEditionDialog } from "./parameters/netwo
|
|
|
160
160
|
import { BALANCE_TYPE, CONNECTED_MODE, COUNTRIES_TO_BALANCE, DC, DC_POWER_FACTOR, DC_USE_TRANSFORMER_RATIO, DEFAULT_LIMIT_REDUCTION_VALUE, DISTRIBUTED_SLACK, HVDC_AC_EMULATION, MAX_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, PARAM_LIMIT_REDUCTION, PARAM_PROVIDER_OPENLOADFLOW, PHASE_SHIFTER_REGULATION_ON, READ_SLACK_BUS, SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON, TWT_SPLIT_SHUNT_ADMITTANCE, USE_REACTIVE_LIMITS, VOLTAGE_INIT_MODE, WRITE_SLACK_BUS, alertThresholdMarks } from "./parameters/loadflow/constants.js";
|
|
161
161
|
import { LoadFlowParametersInline } from "./parameters/loadflow/load-flow-parameters-inline.js";
|
|
162
162
|
import { LoadFlowParametersEditionDialog } from "./parameters/loadflow/load-flow-parameters-dialog.js";
|
|
163
|
-
import { InitialVoltage, PredefinedParameters, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_IN_CALCULATION_CLUSTER, SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_VOLTAGE_RANGES, 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, onlyStartedGeneratorsOptions } from "./parameters/short-circuit/constants.js";
|
|
163
|
+
import { InitialVoltage, PredefinedParameters, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_IN_CALCULATION_CLUSTER, SHORT_CIRCUIT_POWER_ELECTRONICS_CLUSTER, SHORT_CIRCUIT_POWER_ELECTRONICS_CLUSTERS, SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_VOLTAGE_RANGES, 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, onlyStartedGeneratorsOptions } from "./parameters/short-circuit/constants.js";
|
|
164
164
|
import { ShortCircuitParametersInLine } from "./parameters/short-circuit/short-circuit-parameters-inline.js";
|
|
165
165
|
import { ShortCircuitParametersEditionDialog } from "./parameters/short-circuit/short-circuit-parameters-dialog.js";
|
|
166
166
|
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";
|
|
@@ -174,6 +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 { 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";
|
|
177
179
|
import { CustomMenuItem, CustomNestedMenuItem } from "./menus/custom-nested-menu.js";
|
|
178
180
|
import { OverflowableTableCell } from "./muiTable/OverflowableTableCell.js";
|
|
179
181
|
import { OverflowableTableCellWithCheckbox } from "./muiTable/OverflowableTableCellWithCheckbox.js";
|
|
@@ -185,6 +187,8 @@ import { filledTextField, italicFontTextField, standardTextField } from "./netwo
|
|
|
185
187
|
import { SubstationCreationForm } from "./network-modifications/substation/creation/SubstationCreationForm.js";
|
|
186
188
|
import { substationCreationDtoToForm, substationCreationEmptyFormData, substationCreationFormSchema, substationCreationFormToDto } from "./network-modifications/substation/creation/substationCreation.utils.js";
|
|
187
189
|
export {
|
|
190
|
+
ACCURACY,
|
|
191
|
+
ACTIVE,
|
|
188
192
|
AboutDialog,
|
|
189
193
|
ActivableChip,
|
|
190
194
|
AddButton,
|
|
@@ -200,6 +204,7 @@ export {
|
|
|
200
204
|
BooleanInput,
|
|
201
205
|
BooleanNullableCellRenderer,
|
|
202
206
|
BottomRightButtons,
|
|
207
|
+
CALCULATION_TYPE,
|
|
203
208
|
CENTER_LABEL,
|
|
204
209
|
COLUMNS_DEFINITIONS_HVDCS,
|
|
205
210
|
COLUMNS_DEFINITIONS_INJECTIONS,
|
|
@@ -270,6 +275,7 @@ export {
|
|
|
270
275
|
DndTableAddRowsDialog,
|
|
271
276
|
DndTableBottomLeftButtons,
|
|
272
277
|
DndTableBottomRightButtons,
|
|
278
|
+
DynamicMarginCalculationInline,
|
|
273
279
|
ENERGY_SOURCE_OPTIONS,
|
|
274
280
|
EQUIPMENTS_IN_VOLTAGE_REGULATION_TYPES,
|
|
275
281
|
EXPERT_FILTER_EQUIPMENTS,
|
|
@@ -324,6 +330,11 @@ export {
|
|
|
324
330
|
LIMIT_DURATION_FORM,
|
|
325
331
|
LIMIT_REDUCTIONS_FORM,
|
|
326
332
|
LINE_FLOW_MODE,
|
|
333
|
+
LOADS_VARIATIONS,
|
|
334
|
+
LOAD_FILTERS,
|
|
335
|
+
LOAD_INCREASE_START_TIME,
|
|
336
|
+
LOAD_INCREASE_STOP_TIME,
|
|
337
|
+
LOAD_MODELS_RULE,
|
|
327
338
|
LOAD_TYPE_OPTIONS,
|
|
328
339
|
LOW_VOLTAGE_LIMIT,
|
|
329
340
|
LabelledButton,
|
|
@@ -345,6 +356,7 @@ export {
|
|
|
345
356
|
MAP_BASEMAP_MAPBOX,
|
|
346
357
|
MAP_BASE_MAP,
|
|
347
358
|
MAP_MANUAL_REFRESH,
|
|
359
|
+
MARGIN_CALCULATION_START_TIME,
|
|
348
360
|
MAX_ROWS_NUMBER,
|
|
349
361
|
MAX_VALUE_ALLOWED_FOR_LIMIT_REDUCTION,
|
|
350
362
|
MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION,
|
|
@@ -432,6 +444,8 @@ export {
|
|
|
432
444
|
SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE,
|
|
433
445
|
SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS,
|
|
434
446
|
SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_IN_CALCULATION_CLUSTER,
|
|
447
|
+
SHORT_CIRCUIT_POWER_ELECTRONICS_CLUSTER,
|
|
448
|
+
SHORT_CIRCUIT_POWER_ELECTRONICS_CLUSTERS,
|
|
435
449
|
SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS,
|
|
436
450
|
SHORT_CIRCUIT_PREDEFINED_PARAMS,
|
|
437
451
|
SHORT_CIRCUIT_VOLTAGE_RANGES,
|
|
@@ -445,6 +459,8 @@ export {
|
|
|
445
459
|
SHUNT_COMPENSATOR_TYPE_OPTIONS,
|
|
446
460
|
SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON,
|
|
447
461
|
SPECIFIC_PARAMETERS,
|
|
462
|
+
START_TIME,
|
|
463
|
+
STOP_TIME,
|
|
448
464
|
SUBSTATION_LAYOUT,
|
|
449
465
|
SVAR_REGULATION_MODE_OPTIONS,
|
|
450
466
|
SecurityAnalysisParametersDialog,
|
|
@@ -494,6 +510,7 @@ export {
|
|
|
494
510
|
VARIABLE_Q_GENERATORS,
|
|
495
511
|
VARIABLE_SHUNT_COMPENSATORS,
|
|
496
512
|
VARIABLE_TRANSFORMERS,
|
|
513
|
+
VARIATION,
|
|
497
514
|
VERSION_PARAMETER,
|
|
498
515
|
VOLTAGE_INIT_MODE,
|
|
499
516
|
VOLTAGE_LEVEL,
|
|
@@ -518,6 +535,7 @@ export {
|
|
|
518
535
|
explicitNamingFilterSchema,
|
|
519
536
|
exportExpertRules,
|
|
520
537
|
extractDefault,
|
|
538
|
+
fetchCsvSeparator,
|
|
521
539
|
fetchPredefinedProperties,
|
|
522
540
|
filledTextField,
|
|
523
541
|
formatComputingTypeLabel,
|
|
@@ -44,11 +44,11 @@ const styles = {
|
|
|
44
44
|
};
|
|
45
45
|
function ProviderParam({ options }) {
|
|
46
46
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
47
|
-
/* @__PURE__ */ jsxs(Grid, {
|
|
47
|
+
/* @__PURE__ */ jsxs(Grid, { container: true, sx: styles.providerParam, paddingRight: 1, children: [
|
|
48
48
|
/* @__PURE__ */ jsx(Grid, { item: true, xs: true, sx: parametersStyles.parameterName, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "Provider" }) }),
|
|
49
49
|
/* @__PURE__ */ jsx(Grid, { item: true, container: true, xs: 2, sx: parametersStyles.controlItem, children: /* @__PURE__ */ jsx(MuiSelectInput, { name: PROVIDER, size: "small", fullWidth: true, options }) })
|
|
50
50
|
] }),
|
|
51
|
-
/* @__PURE__ */ jsx(Grid, { container: true, paddingTop: 1, paddingRight: 1,
|
|
51
|
+
/* @__PURE__ */ jsx(Grid, { container: true, paddingTop: 1, paddingRight: 1, children: /* @__PURE__ */ jsx(LineSeparator, {}) })
|
|
52
52
|
] });
|
|
53
53
|
}
|
|
54
54
|
export {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SxProps, TooltipProps } from '@mui/material';
|
|
2
|
+
import { DndTableProps } from '../../dnd-table';
|
|
3
|
+
export type ParameterDndTableFieldProps = {
|
|
4
|
+
name: string;
|
|
5
|
+
label: string;
|
|
6
|
+
tooltipProps?: Omit<TooltipProps, 'children'>;
|
|
7
|
+
sxContainerProps?: SxProps;
|
|
8
|
+
} & Omit<DndTableProps, 'arrayFormName' | 'useFieldArrayOutput'>;
|
|
9
|
+
export default function ParameterDndTableField({ name, label, columnsDefinition, tooltipProps, sxContainerProps, ...otherProps }: Readonly<ParameterDndTableFieldProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Grid, Typography, Tooltip } from "@mui/material";
|
|
3
|
+
import { FormattedMessage } from "react-intl";
|
|
4
|
+
import { useFieldArray } from "react-hook-form";
|
|
5
|
+
import { Info } from "@mui/icons-material";
|
|
6
|
+
import { useMemo, useCallback } from "react";
|
|
7
|
+
import { DndTable } from "../../dnd-table/dnd-table.js";
|
|
8
|
+
import "../../overflowableText/OverflowableText.js";
|
|
9
|
+
import "../../../utils/conversionUtils.js";
|
|
10
|
+
import "../../../utils/types/equipmentType.js";
|
|
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 "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
20
|
+
import "../../customAGGrid/customAggrid.js";
|
|
21
|
+
import "ag-grid-community";
|
|
22
|
+
import "react-papaparse";
|
|
23
|
+
import "react-csv-downloader";
|
|
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";
|
|
30
|
+
import "@react-querybuilder/material";
|
|
31
|
+
import "../../filter/expert/expertFilterConstants.js";
|
|
32
|
+
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
33
|
+
import "uuid";
|
|
34
|
+
import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
35
|
+
import "react-querybuilder";
|
|
36
|
+
function ParameterDndTableField({
|
|
37
|
+
name,
|
|
38
|
+
label,
|
|
39
|
+
columnsDefinition,
|
|
40
|
+
tooltipProps,
|
|
41
|
+
sxContainerProps,
|
|
42
|
+
...otherProps
|
|
43
|
+
}) {
|
|
44
|
+
const useFieldArrayOutput = useFieldArray({
|
|
45
|
+
name
|
|
46
|
+
});
|
|
47
|
+
const newDefaultRowData = useMemo(() => {
|
|
48
|
+
const newRowData = {};
|
|
49
|
+
columnsDefinition.forEach((columnDefinition) => {
|
|
50
|
+
newRowData[columnDefinition.dataKey] = columnDefinition.initialValue || null;
|
|
51
|
+
});
|
|
52
|
+
return newRowData;
|
|
53
|
+
}, [columnsDefinition]);
|
|
54
|
+
const createRows = useCallback(() => [newDefaultRowData], [newDefaultRowData]);
|
|
55
|
+
const { title, ...otherTooltipProps } = tooltipProps || {};
|
|
56
|
+
return /* @__PURE__ */ jsxs(Grid, { container: true, sx: sxContainerProps, children: [
|
|
57
|
+
/* @__PURE__ */ jsxs(Grid, { container: true, alignItems: "center", paddingBottom: 2, paddingTop: 2, children: [
|
|
58
|
+
/* @__PURE__ */ jsx(Typography, { component: "span", variant: "h6", children: /* @__PURE__ */ jsx(FormattedMessage, { id: label }) }),
|
|
59
|
+
tooltipProps && /* @__PURE__ */ jsx(
|
|
60
|
+
Tooltip,
|
|
61
|
+
{
|
|
62
|
+
title: typeof title === "string" ? /* @__PURE__ */ jsx(FormattedMessage, { id: title }) : title,
|
|
63
|
+
placement: "right-start",
|
|
64
|
+
sx: { marginLeft: 1 },
|
|
65
|
+
...otherTooltipProps,
|
|
66
|
+
children: /* @__PURE__ */ jsx(Info, {})
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
] }),
|
|
70
|
+
/* @__PURE__ */ jsx(
|
|
71
|
+
DndTable,
|
|
72
|
+
{
|
|
73
|
+
arrayFormName: name,
|
|
74
|
+
useFieldArrayOutput,
|
|
75
|
+
columnsDefinition,
|
|
76
|
+
createRows,
|
|
77
|
+
withAddRowsDialog: false,
|
|
78
|
+
...otherProps
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
] });
|
|
82
|
+
}
|
|
83
|
+
export {
|
|
84
|
+
ParameterDndTableField as default
|
|
85
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SxProps } from '@mui/material';
|
|
2
|
+
interface ParameterFieldProps {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
type: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
possibleValues?: {
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
}[] | string[];
|
|
12
|
+
sx?: SxProps;
|
|
13
|
+
}
|
|
14
|
+
declare function ParameterField({ id, name, type, label, description, possibleValues, sx }: Readonly<ParameterFieldProps>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default ParameterField;
|
|
@@ -42,18 +42,11 @@ import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
|
42
42
|
import "uuid";
|
|
43
43
|
import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
44
44
|
import "react-querybuilder";
|
|
45
|
-
import { LineSeparator } from "
|
|
45
|
+
import { LineSeparator } from "./line-separator.js";
|
|
46
46
|
import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
47
|
-
import "
|
|
48
|
-
import "
|
|
49
|
-
function
|
|
50
|
-
id,
|
|
51
|
-
name,
|
|
52
|
-
type,
|
|
53
|
-
label,
|
|
54
|
-
description,
|
|
55
|
-
possibleValues
|
|
56
|
-
}) {
|
|
47
|
+
import "./widget/parameter-line-slider.js";
|
|
48
|
+
import "./limitreductions/columns-definitions.js";
|
|
49
|
+
function ParameterField({ id, name, type, label, description, possibleValues, sx }) {
|
|
57
50
|
const renderField = () => {
|
|
58
51
|
switch (type) {
|
|
59
52
|
case ParameterType.STRING:
|
|
@@ -63,7 +56,8 @@ function LoadFlowParameterField({
|
|
|
63
56
|
name: `${id}.${name}`,
|
|
64
57
|
options: possibleValues,
|
|
65
58
|
size: "small",
|
|
66
|
-
"data-testid": `${id}.${name}
|
|
59
|
+
"data-testid": `${id}.${name}`,
|
|
60
|
+
sx
|
|
67
61
|
}
|
|
68
62
|
) : /* @__PURE__ */ jsx(TextInput, { name: `${id}.${name}`, dataTestId: `${id}.${name}` });
|
|
69
63
|
case ParameterType.BOOLEAN:
|
|
@@ -108,5 +102,5 @@ function LoadFlowParameterField({
|
|
|
108
102
|
] }, name);
|
|
109
103
|
}
|
|
110
104
|
export {
|
|
111
|
-
|
|
105
|
+
ParameterField as default
|
|
112
106
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export declare const START_TIME = "startTime";
|
|
8
|
+
export declare const STOP_TIME = "stopTime";
|
|
9
|
+
export declare const MARGIN_CALCULATION_START_TIME = "marginCalculationStartTime";
|
|
10
|
+
export declare const LOAD_INCREASE_START_TIME = "loadIncreaseStartTime";
|
|
11
|
+
export declare const LOAD_INCREASE_STOP_TIME = "loadIncreaseStopTime";
|
|
12
|
+
export declare const CALCULATION_TYPE = "calculationType";
|
|
13
|
+
export declare const ACCURACY = "accuracy";
|
|
14
|
+
export declare const LOAD_MODELS_RULE = "loadModelsRule";
|
|
15
|
+
export declare const LOADS_VARIATIONS = "loadsVariations";
|
|
16
|
+
export declare const LOAD_FILTERS = "loadFilters";
|
|
17
|
+
export declare const VARIATION = "variation";
|
|
18
|
+
export declare const ACTIVE = "active";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const START_TIME = "startTime";
|
|
2
|
+
const STOP_TIME = "stopTime";
|
|
3
|
+
const MARGIN_CALCULATION_START_TIME = "marginCalculationStartTime";
|
|
4
|
+
const LOAD_INCREASE_START_TIME = "loadIncreaseStartTime";
|
|
5
|
+
const LOAD_INCREASE_STOP_TIME = "loadIncreaseStopTime";
|
|
6
|
+
const CALCULATION_TYPE = "calculationType";
|
|
7
|
+
const ACCURACY = "accuracy";
|
|
8
|
+
const LOAD_MODELS_RULE = "loadModelsRule";
|
|
9
|
+
const LOADS_VARIATIONS = "loadsVariations";
|
|
10
|
+
const LOAD_FILTERS = "loadFilters";
|
|
11
|
+
const VARIATION = "variation";
|
|
12
|
+
const ACTIVE = "active";
|
|
13
|
+
export {
|
|
14
|
+
ACCURACY,
|
|
15
|
+
ACTIVE,
|
|
16
|
+
CALCULATION_TYPE,
|
|
17
|
+
LOADS_VARIATIONS,
|
|
18
|
+
LOAD_FILTERS,
|
|
19
|
+
LOAD_INCREASE_START_TIME,
|
|
20
|
+
LOAD_INCREASE_STOP_TIME,
|
|
21
|
+
LOAD_MODELS_RULE,
|
|
22
|
+
MARGIN_CALCULATION_START_TIME,
|
|
23
|
+
START_TIME,
|
|
24
|
+
STOP_TIME,
|
|
25
|
+
VARIATION
|
|
26
|
+
};
|
package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-dialog.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { UseDynamicMarginCalculationParametersFormReturn } from './use-dynamic-margin-calculation-parameters-form';
|
|
3
|
+
type DynamicMarginCalculationFormProps = {
|
|
4
|
+
dynamicMarginCalculationMethods: UseDynamicMarginCalculationParametersFormReturn;
|
|
5
|
+
renderTitleFields?: () => ReactNode;
|
|
6
|
+
renderActions?: () => ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export declare function DynamicMarginCalculationForm({ dynamicMarginCalculationMethods, renderTitleFields, renderActions, }: Readonly<DynamicMarginCalculationFormProps>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.js
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Grid, Tabs, Tab, LinearProgress } from "@mui/material";
|
|
3
|
+
import { FormattedMessage } from "react-intl";
|
|
4
|
+
import "../../../utils/conversionUtils.js";
|
|
5
|
+
import "../../../utils/types/equipmentType.js";
|
|
6
|
+
import "@mui/icons-material";
|
|
7
|
+
import { mergeSx } from "../../../utils/styles.js";
|
|
8
|
+
import "../../../utils/yupConfig.js";
|
|
9
|
+
import "../../overflowableText/OverflowableText.js";
|
|
10
|
+
import "react";
|
|
11
|
+
import "react-hook-form";
|
|
12
|
+
import "localized-countries";
|
|
13
|
+
import "localized-countries/data/fr";
|
|
14
|
+
import "localized-countries/data/en";
|
|
15
|
+
import "notistack";
|
|
16
|
+
import { CustomFormProvider } from "../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
17
|
+
import "yup";
|
|
18
|
+
import "../../treeViewFinder/TreeViewFinder.js";
|
|
19
|
+
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
20
|
+
import "../../customAGGrid/customAggrid.js";
|
|
21
|
+
import "ag-grid-community";
|
|
22
|
+
import "react-papaparse";
|
|
23
|
+
import "react-csv-downloader";
|
|
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";
|
|
30
|
+
import "@react-querybuilder/material";
|
|
31
|
+
import "../../filter/expert/expertFilterConstants.js";
|
|
32
|
+
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
33
|
+
import "uuid";
|
|
34
|
+
import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
35
|
+
import "react-querybuilder";
|
|
36
|
+
import { TabPanel } from "../common/parameters.js";
|
|
37
|
+
import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
38
|
+
import { ProviderParam } from "../common/ProviderParam.js";
|
|
39
|
+
import { getTabStyle, parametersStyles } from "../parameters-style.js";
|
|
40
|
+
import "../common/widget/parameter-line-slider.js";
|
|
41
|
+
import "../common/limitreductions/columns-definitions.js";
|
|
42
|
+
import TimeDelayParameters from "./time-delay-parameters.js";
|
|
43
|
+
import LoadsVariationsParameters from "./loads-variations-parameters.js";
|
|
44
|
+
import { TabValues } from "./dynamic-margin-calculation.type.js";
|
|
45
|
+
function DynamicMarginCalculationForm({
|
|
46
|
+
dynamicMarginCalculationMethods,
|
|
47
|
+
renderTitleFields,
|
|
48
|
+
renderActions
|
|
49
|
+
}) {
|
|
50
|
+
const { formMethods, formSchema, paramsLoaded, formattedProviders, selectedTab, onTabChange, tabsWithError } = dynamicMarginCalculationMethods;
|
|
51
|
+
return /* @__PURE__ */ jsxs(CustomFormProvider, { validationSchema: formSchema, ...formMethods, children: [
|
|
52
|
+
renderTitleFields?.(),
|
|
53
|
+
paramsLoaded ? /* @__PURE__ */ jsxs(Grid, { container: true, sx: { height: "100%" }, direction: "column", children: [
|
|
54
|
+
/* @__PURE__ */ jsx(Grid, { container: true, children: /* @__PURE__ */ jsx(ProviderParam, { options: formattedProviders }) }),
|
|
55
|
+
/* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsxs(Tabs, { value: selectedTab, variant: "scrollable", onChange: onTabChange, "aria-label": "parameters", children: [
|
|
56
|
+
/* @__PURE__ */ jsx(
|
|
57
|
+
Tab,
|
|
58
|
+
{
|
|
59
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicMarginCalculationTimeDelayTab" }),
|
|
60
|
+
value: TabValues.TAB_TIME_DELAY,
|
|
61
|
+
sx: getTabStyle(tabsWithError, TabValues.TAB_TIME_DELAY)
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
/* @__PURE__ */ jsx(
|
|
65
|
+
Tab,
|
|
66
|
+
{
|
|
67
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicMarginCalculationLoadsVariationsTab" }),
|
|
68
|
+
value: TabValues.TAB_LOADS_VARIATIONS,
|
|
69
|
+
sx: getTabStyle(tabsWithError, TabValues.TAB_LOADS_VARIATIONS)
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
] }) }),
|
|
73
|
+
/* @__PURE__ */ jsxs(
|
|
74
|
+
Grid,
|
|
75
|
+
{
|
|
76
|
+
container: true,
|
|
77
|
+
xs: true,
|
|
78
|
+
sx: mergeSx(parametersStyles.scrollableGrid, {
|
|
79
|
+
paddingTop: 0,
|
|
80
|
+
width: "100%"
|
|
81
|
+
}),
|
|
82
|
+
children: [
|
|
83
|
+
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: TabValues.TAB_TIME_DELAY, children: /* @__PURE__ */ jsx(TimeDelayParameters, { path: TabValues.TAB_TIME_DELAY }) }),
|
|
84
|
+
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: TabValues.TAB_LOADS_VARIATIONS, children: /* @__PURE__ */ jsx(LoadsVariationsParameters, { path: TabValues.TAB_LOADS_VARIATIONS }) })
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
"dmcParameters"
|
|
88
|
+
),
|
|
89
|
+
renderActions?.()
|
|
90
|
+
] }) : /* @__PURE__ */ jsx(LinearProgress, {})
|
|
91
|
+
] });
|
|
92
|
+
}
|
|
93
|
+
export {
|
|
94
|
+
DynamicMarginCalculationForm
|
|
95
|
+
};
|
package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
2
|
+
import { UseParametersBackendReturnProps } from '../../../utils/types/parameters.type';
|
|
3
|
+
import { ComputingType } from '../common/computing-type';
|
|
4
|
+
type DynamicMarginCalculationInlineProps = {
|
|
5
|
+
studyUuid: UUID | null;
|
|
6
|
+
parametersBackend: UseParametersBackendReturnProps<ComputingType.DYNAMIC_MARGIN_CALCULATION>;
|
|
7
|
+
setHaveDirtyFields: (isDirty: boolean) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare function DynamicMarginCalculationInline({ studyUuid, parametersBackend, setHaveDirtyFields, }: Readonly<DynamicMarginCalculationInlineProps>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|