@gridsuite/commons-ui 0.266.0 → 0.268.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/dist/components/composite/grid/grid-section.d.ts +5 -2
  2. package/dist/components/composite/grid/grid-section.js +56 -4
  3. package/dist/components/ui/inputs/checkbox-autocomplete/checkbox-autocomplete.js +2 -1
  4. package/dist/components/ui/reactHookForm/CheckboxNullableInput.js +4 -2
  5. package/dist/components/ui/reactHookForm/autocompleteInputs/MultipleAutocompleteInput.js +3 -2
  6. package/dist/components/ui/reactHookForm/booleans/BooleanInput.d.ts +1 -1
  7. package/dist/components/ui/reactHookForm/booleans/BooleanInput.js +5 -7
  8. package/dist/components/ui/reactHookForm/tableInputs/table-numerical-input.js +4 -2
  9. package/dist/components/ui/reactHookForm/tableInputs/table-text-input.d.ts +1 -1
  10. package/dist/components/ui/reactHookForm/tableInputs/table-text-input.js +2 -3
  11. package/dist/components/ui/reactHookForm/text/ExpandingTextField.js +15 -13
  12. package/dist/components/ui/reactHookForm/text/TextInput.js +4 -2
  13. package/dist/components/ui/reactHookForm/text/UniqueNameInput.js +4 -2
  14. package/dist/components/ui/reactHookForm/utils/TextFieldWithAdornment.js +2 -1
  15. package/dist/features/common/index.d.ts +7 -0
  16. package/dist/features/common/index.js +4 -0
  17. package/dist/features/common/renderTable-ExportCsv.d.ts +18 -0
  18. package/dist/features/common/renderTable-ExportCsv.js +136 -0
  19. package/dist/features/index.d.ts +5 -0
  20. package/dist/features/index.js +50 -2
  21. package/dist/features/network-modifications/common/connectivity/connectivity.type.d.ts +1 -1
  22. package/dist/features/network-modifications/index.d.ts +1 -0
  23. package/dist/features/network-modifications/index.js +40 -1
  24. package/dist/features/network-modifications/static-var-compensator/common/constants.d.ts +20 -0
  25. package/dist/features/network-modifications/static-var-compensator/common/constants.js +9 -0
  26. package/dist/features/network-modifications/static-var-compensator/common/index.d.ts +13 -0
  27. package/dist/features/network-modifications/static-var-compensator/common/index.js +20 -0
  28. package/dist/features/network-modifications/static-var-compensator/common/set-points-limits-form-utils.d.ts +91 -0
  29. package/dist/features/network-modifications/static-var-compensator/common/set-points-limits-form-utils.js +166 -0
  30. package/dist/features/network-modifications/static-var-compensator/common/set-points-limits-form.d.ts +8 -0
  31. package/dist/features/network-modifications/static-var-compensator/common/set-points-limits-form.js +200 -0
  32. package/dist/features/network-modifications/static-var-compensator/common/standby-automaton-form-utils.d.ts +66 -0
  33. package/dist/features/network-modifications/static-var-compensator/common/standby-automaton-form-utils.js +149 -0
  34. package/dist/features/network-modifications/static-var-compensator/common/standby-automaton-form.d.ts +7 -0
  35. package/dist/features/network-modifications/static-var-compensator/common/standby-automaton-form.js +153 -0
  36. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-dialog-header.d.ts +7 -0
  37. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-dialog-header.js +72 -0
  38. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-dialog-tabs.d.ts +7 -0
  39. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-dialog-tabs.js +44 -0
  40. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-tab-utils.d.ts +8 -0
  41. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-tab-utils.js +34 -0
  42. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-tabs-content.d.ts +9 -0
  43. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-tabs-content.js +100 -0
  44. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator.types.d.ts +68 -0
  45. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator.types.js +1 -0
  46. package/dist/features/network-modifications/static-var-compensator/common/susceptance-area.d.ts +7 -0
  47. package/dist/features/network-modifications/static-var-compensator/common/susceptance-area.js +161 -0
  48. package/dist/features/network-modifications/static-var-compensator/creation/index.d.ts +9 -0
  49. package/dist/features/network-modifications/static-var-compensator/creation/index.js +9 -0
  50. package/dist/features/network-modifications/static-var-compensator/creation/static-var-compensator-creation-form.d.ts +8 -0
  51. package/dist/features/network-modifications/static-var-compensator/creation/static-var-compensator-creation-form.js +105 -0
  52. package/dist/features/network-modifications/static-var-compensator/creation/static-var-compensator-creation-utils.d.ts +114 -0
  53. package/dist/features/network-modifications/static-var-compensator/creation/static-var-compensator-creation-utils.js +189 -0
  54. package/dist/features/network-modifications/static-var-compensator/creation/static-var-compensator-creation.types.d.ts +34 -0
  55. package/dist/features/network-modifications/static-var-compensator/creation/static-var-compensator-creation.types.js +1 -0
  56. package/dist/features/network-modifications/static-var-compensator/index.d.ts +8 -0
  57. package/dist/features/network-modifications/static-var-compensator/index.js +27 -0
  58. package/dist/features/network-modifications/voltageLevel/coupling-device/coupling-device-creation-form.d.ts +8 -0
  59. package/dist/features/network-modifications/voltageLevel/coupling-device/coupling-device-creation-form.js +153 -0
  60. package/dist/features/network-modifications/voltageLevel/coupling-device/coupling-device-creation-utils.d.ts +20 -0
  61. package/dist/features/network-modifications/voltageLevel/coupling-device/coupling-device-creation-utils.js +40 -0
  62. package/dist/features/network-modifications/voltageLevel/coupling-device/coupling-device-creation.types.d.ts +11 -0
  63. package/dist/features/network-modifications/voltageLevel/coupling-device/coupling-device-creation.types.js +1 -0
  64. package/dist/features/network-modifications/voltageLevel/coupling-device/index.d.ts +3 -0
  65. package/dist/features/network-modifications/voltageLevel/coupling-device/index.js +9 -0
  66. package/dist/features/network-modifications/voltageLevel/creation/index.js +1 -1
  67. package/dist/features/network-modifications/voltageLevel/index.d.ts +2 -0
  68. package/dist/features/network-modifications/voltageLevel/index.js +15 -1
  69. package/dist/features/network-modifications/voltageLevel/topology/CreateVoltageLevelTopologyForm.d.ts +6 -0
  70. package/dist/features/network-modifications/voltageLevel/topology/CreateVoltageLevelTopologyForm.js +145 -0
  71. package/dist/features/network-modifications/voltageLevel/topology/index.d.ts +9 -0
  72. package/dist/features/network-modifications/voltageLevel/topology/index.js +9 -0
  73. package/dist/features/network-modifications/voltageLevel/topology/voltageLevelTopologyCreation.types.d.ts +8 -0
  74. package/dist/features/network-modifications/voltageLevel/topology/voltageLevelTopologyCreation.types.js +1 -0
  75. package/dist/features/network-modifications/voltageLevel/topology/voltageLevelTopologyCreation.utils.d.ts +25 -0
  76. package/dist/features/network-modifications/voltageLevel/topology/voltageLevelTopologyCreation.utils.js +48 -0
  77. package/dist/features/results/constants.d.ts +7 -0
  78. package/dist/features/results/constants.js +4 -0
  79. package/dist/features/results/hooks/index.d.ts +7 -0
  80. package/dist/features/results/hooks/index.js +4 -0
  81. package/dist/features/results/hooks/useIntlResultStatusMessages.d.ts +19 -0
  82. package/dist/features/results/hooks/useIntlResultStatusMessages.js +23 -0
  83. package/dist/features/results/loadflow/index.d.ts +8 -0
  84. package/dist/features/results/loadflow/index.js +4 -0
  85. package/dist/features/results/loadflow/limit-violation-result.d.ts +2 -0
  86. package/dist/features/results/loadflow/limit-violation-result.js +134 -0
  87. package/dist/features/results/loadflow/load-flow-result.type.d.ts +29 -0
  88. package/dist/features/results/loadflow/load-flow-result.type.js +1 -0
  89. package/dist/features/results/securityanalysis/index.js +1 -2
  90. package/dist/features/results/securityanalysis/security-analysis-result-nmk.js +2 -1
  91. package/dist/features/results/securityanalysis/utils.d.ts +0 -2
  92. package/dist/features/results/securityanalysis/utils.js +0 -22
  93. package/dist/features/results/utils/index.d.ts +7 -0
  94. package/dist/features/results/utils/index.js +4 -0
  95. package/dist/features/results/utils/no-rows-message.d.ts +2 -0
  96. package/dist/features/results/utils/no-rows-message.js +24 -0
  97. package/dist/hooks/index.d.ts +1 -0
  98. package/dist/hooks/index.js +2 -0
  99. package/dist/hooks/useOpenLoaderShortWait.d.ts +18 -0
  100. package/dist/hooks/useOpenLoaderShortWait.js +19 -0
  101. package/dist/index.js +53 -1
  102. package/dist/translations/en/networkModificationsEn.d.ts +35 -0
  103. package/dist/translations/en/networkModificationsEn.js +38 -1
  104. package/dist/translations/fr/networkModificationsFr.d.ts +35 -0
  105. package/dist/translations/fr/networkModificationsFr.js +38 -1
  106. package/dist/utils/constants/fieldConstants.d.ts +28 -1
  107. package/dist/utils/constants/fieldConstants.js +27 -0
  108. package/dist/utils/index.d.ts +1 -0
  109. package/dist/utils/index.js +2 -0
  110. package/package.json +1 -1
@@ -0,0 +1,4 @@
1
+ import { useIntlResultStatusMessages } from "./useIntlResultStatusMessages.js";
2
+ export {
3
+ useIntlResultStatusMessages
4
+ };
@@ -0,0 +1,19 @@
1
+ import { IntlShape } from 'react-intl';
2
+ export declare const useIntlResultStatusMessages: (intl: IntlShape, hasNoData?: boolean, hasFilters?: boolean) => {
3
+ running: string;
4
+ failed: string;
5
+ fetching: string;
6
+ noData: string;
7
+ noCalculation: string;
8
+ } | {
9
+ running: string;
10
+ failed: string;
11
+ fetching: string;
12
+ noLimitViolation: string;
13
+ noCalculation: string;
14
+ } | {
15
+ running: string;
16
+ failed: string;
17
+ fetching: string;
18
+ noCalculation: string;
19
+ };
@@ -0,0 +1,23 @@
1
+ import { useCallback, useMemo } from "react";
2
+ const useIntlResultStatusMessages = (intl, hasNoData = false, hasFilters = false) => {
3
+ const specificMessage = useCallback(() => {
4
+ if (hasNoData) {
5
+ return {
6
+ noData: intl.formatMessage({ id: !hasFilters ? "grid.noRowsToShow" : "grid.noMatchedFilters" })
7
+ };
8
+ }
9
+ return { noLimitViolation: intl.formatMessage({ id: "grid.noLimitViolation" }) };
10
+ }, [intl, hasNoData, hasFilters]);
11
+ return useMemo(() => {
12
+ return {
13
+ noCalculation: intl.formatMessage({ id: "grid.noCalculation" }),
14
+ ...specificMessage(),
15
+ running: intl.formatMessage({ id: "grid.running" }),
16
+ failed: intl.formatMessage({ id: "grid.failed" }),
17
+ fetching: intl.formatMessage({ id: "LoadingRemoteData" })
18
+ };
19
+ }, [intl, specificMessage]);
20
+ };
21
+ export {
22
+ useIntlResultStatusMessages
23
+ };
@@ -0,0 +1,8 @@
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 * from './limit-violation-result';
8
+ export * from './load-flow-result.type';
@@ -0,0 +1,4 @@
1
+ import { LimitViolationResult } from "./limit-violation-result.js";
2
+ export {
3
+ LimitViolationResult
4
+ };
@@ -0,0 +1,2 @@
1
+ import { LimitViolationResultProps } from './load-flow-result.type';
2
+ export declare function LimitViolationResult({ result, isLoadingResult, columnDefs, tableName, computationStatus, exportCsvResetKey, language, onGridReady, }: LimitViolationResultProps): import("react").JSX.Element;
@@ -0,0 +1,134 @@
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import { useRef, useMemo, useCallback } from "react";
3
+ import { useIntl } from "react-intl";
4
+ import { useTheme, Box, LinearProgress } from "@mui/material";
5
+ import { RunningStatus } from "../../../utils/running-status.js";
6
+ import "../../../utils/conversionUtils.js";
7
+ import "../../../utils/types/equipmentType.js";
8
+ import { getRows } from "../../../utils/functions.js";
9
+ import "@mui/icons-material";
10
+ import "localized-countries";
11
+ import "localized-countries/data/fr";
12
+ import "localized-countries/data/en";
13
+ import "notistack";
14
+ import { useOpenLoaderShortWait } from "../../../hooks/useOpenLoaderShortWait.js";
15
+ import { RESULTS_LOADING_DELAY } from "../constants.js";
16
+ import "../../../components/ui/overflowableText/OverflowableText.js";
17
+ import "react-hook-form";
18
+ import "../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
19
+ import "yup";
20
+ import "../../../components/ui/treeViewFinder/TreeViewFinder.js";
21
+ import "../../../components/ui/reactHookForm/numbers/RangeInput.js";
22
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
23
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
24
+ import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
25
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
26
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
27
+ import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
28
+ import "../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
29
+ import "../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
30
+ import "@hello-pangea/dnd";
31
+ import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
32
+ import "../../../components/ui/snackbarProvider/SnackbarProvider.js";
33
+ import "mui-nested-menu";
34
+ import "react-resizable-panels";
35
+ import "react-papaparse";
36
+ import "react-dom";
37
+ import "autosuggest-highlight/match";
38
+ import "autosuggest-highlight/parse";
39
+ import "clsx";
40
+ import "../../../components/composite/filter/FilterCreationDialog.js";
41
+ import "../../../components/composite/filter/HeaderFilterForm.js";
42
+ import "../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
43
+ import "../../../components/composite/filter/expert/ExpertFilterForm.js";
44
+ import "../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
45
+ import "../../../components/composite/filter/expert/expertFilterConstants.js";
46
+ import "react-querybuilder";
47
+ import "uuid";
48
+ import "../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
49
+ import "../../../components/composite/filter/utils/filterFormUtils.js";
50
+ import "@react-querybuilder/material";
51
+ import "../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
52
+ import "../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
53
+ import "../../../components/composite/agGridTable/BottomTableButtons.js";
54
+ import "../../../components/composite/agGridTable/CustomAgGridTable.js";
55
+ import "ag-grid-community";
56
+ import "../../../components/composite/customAGGrid/customAggrid.js";
57
+ import { DefaultCellRenderer } from "../../../components/composite/customAGGrid/cell-renderers.js";
58
+ import "../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
59
+ import "mathjs";
60
+ import "../../../components/composite/report/report-viewer/log-table/log-table.js";
61
+ import "react-window";
62
+ import "../../../components/composite/report/report-treeview/treeview-item.js";
63
+ import "../../../components/composite/report/report-viewer/context/report-viewer-context.js";
64
+ import { getNoRowsMessage } from "../utils/no-rows-message.js";
65
+ import { useIntlResultStatusMessages } from "../hooks/useIntlResultStatusMessages.js";
66
+ import { RenderTableAndExportCsv } from "../../common/renderTable-ExportCsv.js";
67
+ function LimitViolationResult({
68
+ result,
69
+ isLoadingResult,
70
+ columnDefs,
71
+ tableName,
72
+ computationStatus,
73
+ exportCsvResetKey,
74
+ language,
75
+ onGridReady
76
+ }) {
77
+ const theme = useTheme();
78
+ const intl = useIntl();
79
+ const gridRef = useRef(null);
80
+ const openLoaderTab = useOpenLoaderShortWait({
81
+ isLoading: computationStatus === RunningStatus.RUNNING || isLoadingResult,
82
+ delay: RESULTS_LOADING_DELAY
83
+ });
84
+ const defaultColDef = useMemo(
85
+ () => ({
86
+ filter: true,
87
+ sortable: true,
88
+ resizable: true,
89
+ lockPinned: true,
90
+ suppressMovable: true,
91
+ wrapHeaderText: true,
92
+ autoHeaderHeight: true,
93
+ flex: 1,
94
+ cellRenderer: DefaultCellRenderer
95
+ }),
96
+ []
97
+ );
98
+ const getRowStyle = useCallback(
99
+ (params) => {
100
+ if (params?.data?.elementId) {
101
+ return {
102
+ backgroundColor: theme.selectedRow.background
103
+ };
104
+ }
105
+ return void 0;
106
+ },
107
+ [theme.selectedRow.background]
108
+ );
109
+ const messages = useIntlResultStatusMessages(intl);
110
+ const overlayNoRowsTemplate = getNoRowsMessage(messages, result, computationStatus, !isLoadingResult);
111
+ const rowsToShow = getRows(result, computationStatus);
112
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
113
+ /* @__PURE__ */ jsx(Box, { sx: { height: "12px", marginTop: "12px" }, children: openLoaderTab && /* @__PURE__ */ jsx(LinearProgress, {}) }),
114
+ /* @__PURE__ */ jsx(
115
+ RenderTableAndExportCsv,
116
+ {
117
+ gridRef,
118
+ columns: columnDefs,
119
+ defaultColDef,
120
+ tableName,
121
+ rows: rowsToShow,
122
+ getRowStyle,
123
+ overlayNoRowsTemplate,
124
+ skipColumnHeaders: false,
125
+ exportCsvResetKey,
126
+ onGridReady,
127
+ language
128
+ }
129
+ )
130
+ ] });
131
+ }
132
+ export {
133
+ LimitViolationResult
134
+ };
@@ -0,0 +1,29 @@
1
+ import { Key } from 'react';
2
+ import { ColDef } from 'ag-grid-community';
3
+ import { GsLangUser } from '../../../utils';
4
+ export interface LimitViolationResultProps {
5
+ result: OverloadedEquipment[] | undefined;
6
+ columnDefs: ColDef<any>[];
7
+ isLoadingResult: boolean;
8
+ tableName: string;
9
+ computationStatus: string;
10
+ computationSubType: string;
11
+ exportCsvResetKey: Key;
12
+ language: GsLangUser;
13
+ onGridReady?: (params: any) => void;
14
+ }
15
+ export interface OverloadedEquipment {
16
+ overload: number;
17
+ patlOverload: number;
18
+ subjectId: string;
19
+ locationId: string;
20
+ value: number;
21
+ actualOverloadDuration: number | null;
22
+ upComingOverloadDuration: number | null;
23
+ limit: number;
24
+ patlLimit: number;
25
+ limitName: string | null | undefined;
26
+ nextLimitName: string | null | undefined;
27
+ side: string | undefined;
28
+ limitType: string;
29
+ }
@@ -1,7 +1,7 @@
1
1
  import { SecurityAnalysisResultNmk } from "./security-analysis-result-nmk.js";
2
2
  import { SecurityAnalysisTable } from "./security-analysis-table.js";
3
3
  import { NmkType } from "./security-analysis.type.js";
4
- import { PAGE_OPTIONS, flattenNmKResultsConstraints, flattenNmKResultsContingencies, getNoRowsMessage, handlePostSortRows, mapNmKResultsCutOffPower } from "./utils.js";
4
+ import { PAGE_OPTIONS, flattenNmKResultsConstraints, flattenNmKResultsContingencies, handlePostSortRows, mapNmKResultsCutOffPower } from "./utils.js";
5
5
  export {
6
6
  NmkType,
7
7
  PAGE_OPTIONS,
@@ -9,7 +9,6 @@ export {
9
9
  SecurityAnalysisTable,
10
10
  flattenNmKResultsConstraints,
11
11
  flattenNmKResultsContingencies,
12
- getNoRowsMessage,
13
12
  handlePostSortRows,
14
13
  mapNmKResultsCutOffPower
15
14
  };
@@ -60,7 +60,8 @@ import "../../../components/composite/report/report-viewer/log-table/log-table.j
60
60
  import "react-window";
61
61
  import "../../../components/composite/report/report-treeview/treeview-item.js";
62
62
  import "../../../components/composite/report/report-viewer/context/report-viewer-context.js";
63
- import { mapNmKResultsCutOffPower, flattenNmKResultsConstraints, flattenNmKResultsContingencies, handlePostSortRows, getNoRowsMessage, PAGE_OPTIONS } from "./utils.js";
63
+ import { mapNmKResultsCutOffPower, flattenNmKResultsConstraints, flattenNmKResultsContingencies, handlePostSortRows, PAGE_OPTIONS } from "./utils.js";
64
+ import { getNoRowsMessage } from "../utils/no-rows-message.js";
64
65
  const styles = {
65
66
  container: {
66
67
  display: "flex",
@@ -1,8 +1,6 @@
1
1
  import { IntlShape } from 'react-intl';
2
2
  import { PostSortRowsParams } from 'ag-grid-community';
3
3
  import { ConstraintsFromContingencyItem, ContingenciesFromConstraintItem, CutOffPowerFromConstraintsItem, SecurityAnalysisNmkTableRow } from './security-analysis.type';
4
- import { RunningStatusMessage } from '../../../utils/running-status';
5
- export declare function getNoRowsMessage(messages: RunningStatusMessage, rows: any[] | undefined, status: string, isDataReady?: boolean): string | undefined;
6
4
  export declare const PAGE_OPTIONS: number[];
7
5
  export declare const flattenNmKResultsContingencies: (intl: IntlShape, result: ConstraintsFromContingencyItem[] | null) => SecurityAnalysisNmkTableRow[] | undefined;
8
6
  export declare const flattenNmKResultsConstraints: (intl: IntlShape, result: ContingenciesFromConstraintItem[] | null) => SecurityAnalysisNmkTableRow[] | undefined;
@@ -1,24 +1,3 @@
1
- import { RunningStatus } from "../../../utils/running-status.js";
2
- function getNoRowsMessage(messages, rows, status, isDataReady) {
3
- switch (status) {
4
- case RunningStatus.IDLE:
5
- return messages.noCalculation;
6
- case RunningStatus.RUNNING:
7
- return messages.running;
8
- case RunningStatus.FAILED:
9
- return messages.failed;
10
- case RunningStatus.SUCCEED:
11
- if (!isDataReady || !rows) {
12
- return messages.fetching;
13
- }
14
- if (rows?.length === 0) {
15
- return messages.noData ? messages.noData : messages.noLimitViolation;
16
- }
17
- return void 0;
18
- default:
19
- return messages.noCalculation;
20
- }
21
- }
22
1
  const PAGE_OPTIONS = [25, 100, 500, 1e3];
23
2
  const MAX_INT32 = 2147483647;
24
3
  const PERMANENT_LIMIT_NAME = "permanent";
@@ -142,7 +121,6 @@ export {
142
121
  PAGE_OPTIONS,
143
122
  flattenNmKResultsConstraints,
144
123
  flattenNmKResultsContingencies,
145
- getNoRowsMessage,
146
124
  handlePostSortRows,
147
125
  mapNmKResultsCutOffPower
148
126
  };
@@ -0,0 +1,7 @@
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 * from './no-rows-message';
@@ -0,0 +1,4 @@
1
+ import { getNoRowsMessage } from "./no-rows-message.js";
2
+ export {
3
+ getNoRowsMessage
4
+ };
@@ -0,0 +1,2 @@
1
+ import { RunningStatusMessage } from '../../../utils/running-status';
2
+ export declare function getNoRowsMessage(messages: RunningStatusMessage, rows: any[] | undefined, status: string, isDataReady?: boolean): string | undefined;
@@ -0,0 +1,24 @@
1
+ import { RunningStatus } from "../../../utils/running-status.js";
2
+ function getNoRowsMessage(messages, rows, status, isDataReady) {
3
+ switch (status) {
4
+ case RunningStatus.IDLE:
5
+ return messages.noCalculation;
6
+ case RunningStatus.RUNNING:
7
+ return messages.running;
8
+ case RunningStatus.FAILED:
9
+ return messages.failed;
10
+ case RunningStatus.SUCCEED:
11
+ if (!isDataReady || !rows) {
12
+ return messages.fetching;
13
+ }
14
+ if (rows?.length === 0) {
15
+ return messages.noData ? messages.noData : messages.noLimitViolation;
16
+ }
17
+ return void 0;
18
+ default:
19
+ return messages.noCalculation;
20
+ }
21
+ }
22
+ export {
23
+ getNoRowsMessage
24
+ };
@@ -17,3 +17,4 @@ export * from './useFormatLabelWithUnit';
17
17
  export * from './useSelectAppearance';
18
18
  export * from './use-parameters-backend';
19
19
  export * from './useGetLabelEquipmentTypes';
20
+ export * from './useOpenLoaderShortWait';
@@ -12,6 +12,7 @@ import { useFormatLabelWithUnit } from "./useFormatLabelWithUnit.js";
12
12
  import { useSelectAppearance } from "./useSelectAppearance.js";
13
13
  import { OptionalServicesStatus, useParametersBackend } from "./use-parameters-backend.js";
14
14
  import { useGetLabelEquipmentTypes } from "./useGetLabelEquipmentTypes.js";
15
+ import { useOpenLoaderShortWait } from "./useOpenLoaderShortWait.js";
15
16
  export {
16
17
  OptionalServicesStatus,
17
18
  getComputedLanguage,
@@ -23,6 +24,7 @@ export {
23
24
  useIntlRef,
24
25
  useLocalizedCountries,
25
26
  useModificationLabelComputer,
27
+ useOpenLoaderShortWait,
26
28
  useParametersBackend,
27
29
  usePredefinedProperties,
28
30
  usePrevious,
@@ -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
+ /**
8
+ * A hook that returns a boolean indicating whether a loader should be displayed after a short delay.
9
+ *
10
+ * @param {boolean} isLoading - Whether the loading is active.
11
+ * @param {number} delay - The delay before displaying the loader, in milliseconds.
12
+ *
13
+ * @returns {boolean} A boolean indicating whether the loader should be displayed.
14
+ */
15
+ export declare const useOpenLoaderShortWait: ({ isLoading, delay }: {
16
+ isLoading: boolean;
17
+ delay: number;
18
+ }) => boolean;
@@ -0,0 +1,19 @@
1
+ import { useState, useEffect } from "react";
2
+ const useOpenLoaderShortWait = ({ isLoading, delay }) => {
3
+ const [shouldOpen, setShouldOpen] = useState(false);
4
+ useEffect(() => {
5
+ let timeout;
6
+ if (!isLoading) {
7
+ setShouldOpen(false);
8
+ } else {
9
+ timeout = setTimeout(() => {
10
+ setShouldOpen(true);
11
+ }, delay);
12
+ }
13
+ return () => clearTimeout(timeout);
14
+ }, [delay, isLoading]);
15
+ return shouldOpen;
16
+ };
17
+ export {
18
+ useOpenLoaderShortWait
19
+ };
package/dist/index.js CHANGED
@@ -285,6 +285,8 @@ import { SubstationCreationForm } from "./features/network-modifications/substat
285
285
  import { substationCreationDtoToForm, substationCreationEmptyFormData, substationCreationFormSchema, substationCreationFormToDto } from "./features/network-modifications/substation/creation/substationCreation.utils.js";
286
286
  import { SubstationModificationForm } from "./features/network-modifications/substation/modification/SubstationModificationForm.js";
287
287
  import { substationModificationDtoToForm, substationModificationEmptyFormData, substationModificationFormSchema, substationModificationFormToDto } from "./features/network-modifications/substation/modification/substationModification.utils.js";
288
+ import { CouplingDeviceCreationForm } from "./features/network-modifications/voltageLevel/coupling-device/coupling-device-creation-form.js";
289
+ import { couplingDeviceCreationDtoToForm, couplingDeviceCreationFormSchema, couplingDeviceCreationFormToDto, emptyCouplingDeviceCreationFormData } from "./features/network-modifications/voltageLevel/coupling-device/coupling-device-creation-utils.js";
288
290
  import { SwitchesBetweenSections } from "./features/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/SwitchesBetweenSections.js";
289
291
  import "react/jsx-runtime";
290
292
  import "@mui/material";
@@ -330,6 +332,7 @@ import { ComputingType } from "./utils/types/computing-type.js";
330
332
  import { areIdsEqual, getIdOrSelf, getIdOrValue, getLabelOrValue, getObjectId, isNonEmptyStringOrArray, notNull, notUndefined, parseIntData, removeNullFields, richTypeEquals, sanitizeString } from "./utils/ts-utils.js";
331
333
  import { toNumber, validateValueIsANumber } from "./utils/validation-functions.js";
332
334
  import { NO_ITEM_SELECTION_FOR_COPY } from "./utils/directory-utils.js";
335
+ import { RunningStatus } from "./utils/running-status.js";
333
336
  import { fetchAppsMetadata, fetchBaseVoltages, fetchDefaultCountry, fetchEnv, fetchFavoriteAndDefaultCountries, fetchStudyMetadata, isExploreMetadata, isStudyMetadata } from "./services/appsMetadata.js";
334
337
  import { fetchConfigParameter, fetchConfigParameters, getAppName, updateConfigParameter } from "./services/config.js";
335
338
  import { PermissionType, elementAlreadyExists, fetchDirectoryContent, fetchDirectoryElementPath, fetchElementNames, fetchRootFolders, hasElementPermission } from "./services/directory.js";
@@ -357,6 +360,8 @@ import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, ge
357
360
  import { SwitchKind } from "./features/network-modifications/voltageLevel/creation/voltageLevelCreation.types.js";
358
361
  import { VoltageLevelModificationForm } from "./features/network-modifications/voltageLevel/modification/VoltageLevelModificationForm.js";
359
362
  import { voltageLevelModificationDtoToForm, voltageLevelModificationEmptyFormData, voltageLevelModificationFormSchema, voltageLevelModificationFormToDto, voltageLevelModificationWithMeasurementsDtoToForm, voltageLevelModificationWithMeasurementsFormSchema, voltageLevelModificationWithMeasurementsFormToDto } from "./features/network-modifications/voltageLevel/modification/voltageLevelModification.utils.js";
363
+ import { createVoltageLevelTopologyDtoToForm, createVoltageLevelTopologyEmptyFormData, createVoltageLevelTopologyFormSchema, createVoltageLevelTopologyFormToDto } from "./features/network-modifications/voltageLevel/topology/voltageLevelTopologyCreation.utils.js";
364
+ import { CreateVoltageLevelTopologyForm } from "./features/network-modifications/voltageLevel/topology/CreateVoltageLevelTopologyForm.js";
360
365
  import { LOAD_TAB_FIELDS, LoadDialogTab } from "./features/network-modifications/load/common/load.utils.js";
361
366
  import { LoadDialogTabs } from "./features/network-modifications/load/common/LoadDialogTabs.js";
362
367
  import { LoadDialogTabsContent } from "./features/network-modifications/load/common/LoadDialogTabsContent.js";
@@ -407,6 +412,14 @@ import { LineDialogHeader } from "./features/network-modifications/line/common/L
407
412
  import { LineForm } from "./features/network-modifications/line/common/LineForm.js";
408
413
  import { lineCreationDtoToForm, lineCreationEmptyFormData, lineCreationFormSchema, lineCreationFormToDto } from "./features/network-modifications/line/creation/lineCreation.utils.js";
409
414
  import { lineModificationDtoToForm, lineModificationEmptyFormData, lineModificationFormSchema, lineModificationFormToDto } from "./features/network-modifications/line/modification/lineModification.utils.js";
415
+ import { StaticVarCompensatorDialogHeader } from "./features/network-modifications/static-var-compensator/common/static-var-compensator-dialog-header.js";
416
+ import { StaticVarCompensatorDialogTabs } from "./features/network-modifications/static-var-compensator/common/static-var-compensator-dialog-tabs.js";
417
+ import { STATIC_VAR_COMPENSATOR_TAB_FIELDS, StaticVarCompensatorDialogTab } from "./features/network-modifications/static-var-compensator/common/static-var-compensator-tab-utils.js";
418
+ import { VOLTAGE_REGULATION_MODES } from "./features/network-modifications/static-var-compensator/common/constants.js";
419
+ import { getReactiveFormData, getReactiveFormEmptyFormData, getReactiveFormValidationSchema } from "./features/network-modifications/static-var-compensator/common/set-points-limits-form-utils.js";
420
+ import { computeQ0, getStandbyAutomatonEmptyFormData, getStandbyAutomatonFormData, getStandbyAutomatonFormValidationSchema } from "./features/network-modifications/static-var-compensator/common/standby-automaton-form-utils.js";
421
+ import { StaticVarCompensatorCreationForm } from "./features/network-modifications/static-var-compensator/creation/static-var-compensator-creation-form.js";
422
+ import { staticVarCompensatorCreationEmptyFormData, staticVarCompensatorCreationFormSchema, staticVarCompensatorCreationFormToDto, staticVarCompensatorDtoToForm } from "./features/network-modifications/static-var-compensator/creation/static-var-compensator-creation-utils.js";
410
423
  import { BuildStatusChip } from "./features/node/build-status-chip.js";
411
424
  import { BuildStatus } from "./features/node/constant.js";
412
425
  import { COLUMNS_WITHOUT_BORDER, DEPTH_CELL_WIDTH, DROP_FORBIDDEN_INDICATOR_BOTTOM, DROP_FORBIDDEN_INDICATOR_TOP, DROP_INDICATOR_BOTTOM, DROP_INDICATOR_TOP, MODIFICATION_ROW_HEIGHT, createCellBorderColor, createCellContentWrapperSx, createCellStyle, createEditDescriptionStyle, createHeaderCellStyle, createModificationNameCellStyle, createNameCellLabelBoxSx, createNameCellRootStyle, createRootNetworkChipCellSx, createRowSx, networkModificationTableStyles } from "./features/network-modification-table/network-modification-table-styles.js";
@@ -432,7 +445,10 @@ import { useGlobalAnnouncement } from "./features/announcement/useGlobalAnnounce
432
445
  import { SecurityAnalysisResultNmk } from "./features/results/securityanalysis/security-analysis-result-nmk.js";
433
446
  import { SecurityAnalysisTable } from "./features/results/securityanalysis/security-analysis-table.js";
434
447
  import { NmkType } from "./features/results/securityanalysis/security-analysis.type.js";
435
- import { PAGE_OPTIONS, flattenNmKResultsConstraints, flattenNmKResultsContingencies, getNoRowsMessage, handlePostSortRows, mapNmKResultsCutOffPower } from "./features/results/securityanalysis/utils.js";
448
+ import { PAGE_OPTIONS, flattenNmKResultsConstraints, flattenNmKResultsContingencies, handlePostSortRows, mapNmKResultsCutOffPower } from "./features/results/securityanalysis/utils.js";
449
+ import { LimitViolationResult } from "./features/results/loadflow/limit-violation-result.js";
450
+ import { getNoRowsMessage } from "./features/results/utils/no-rows-message.js";
451
+ import { RESULTS_LOADING_DELAY } from "./features/results/constants.js";
436
452
  import { ProcessType } from "./features/process-configs/common/process-config.type.js";
437
453
  import { emptyProcessConfigModificationsFormData, getProcessConfigModificationsBackendFromFormData, getProcessConfigModificationsFormData, processConfigModificationsShape } from "./features/process-configs/common/process-config-modifications-edition.utils.js";
438
454
  import { ProcessConfigModificationsEdition } from "./features/process-configs/common/process-config-modifications-edition.js";
@@ -448,6 +464,8 @@ import { MAX_RECENT_GLOBAL_FILTERS, addSelectedGlobalFiltersToTableState, clearS
448
464
  import { syncGlobalFilters } from "./features/global-filter/utils/global-filter-sync.utils.js";
449
465
  import { RECENT_FILTER, addGlobalFilterId, getGlobalFilterId, getOptionLabel } from "./features/global-filter/utils/global-filter-utils.js";
450
466
  import { GlobalFilterContextProvider } from "./features/global-filter/context/global-filter-context-provider.js";
467
+ import { RenderTableAndExportCsv } from "./features/common/renderTable-ExportCsv.js";
468
+ import { useIntlResultStatusMessages } from "./features/results/hooks/useIntlResultStatusMessages.js";
451
469
  import { useStateBoolean } from "./hooks/customStates/useStateBoolean.js";
452
470
  import { useStateNumber } from "./hooks/customStates/useStateNumber.js";
453
471
  import { useModificationLabelComputer } from "./hooks/useModificationLabelComputer.js";
@@ -462,6 +480,7 @@ import { useFormatLabelWithUnit } from "./hooks/useFormatLabelWithUnit.js";
462
480
  import { useSelectAppearance } from "./hooks/useSelectAppearance.js";
463
481
  import { OptionalServicesStatus, useParametersBackend } from "./hooks/use-parameters-backend.js";
464
482
  import { useGetLabelEquipmentTypes } from "./hooks/useGetLabelEquipmentTypes.js";
483
+ import { useOpenLoaderShortWait } from "./hooks/useOpenLoaderShortWait.js";
465
484
  import { LOGOUT_ERROR, RESET_AUTHENTICATION_ROUTER_ERROR, SHOW_AUTH_INFO_LOGIN, SIGNIN_CALLBACK_ERROR, UNAUTHORIZED_USER_INFO, USER, USER_VALIDATION_ERROR, resetAuthenticationRouterError, setLoggedUser, setLogoutError, setShowAuthenticationRouterLogin, setSignInCallbackError, setUnauthorizedUserInfo, setUserValidationError } from "./redux/actions/authActions.js";
466
485
  import { getUser, getUserToken, setCommonStore, subscribeToUserState } from "./redux/commonStore.js";
467
486
  import { cardErrorBoundaryEn } from "./translations/en/cardErrorBoundaryEn.js";
@@ -628,7 +647,9 @@ export {
628
647
  CountriesInput,
629
648
  CountrySelectionInput,
630
649
  CountryValueEditor,
650
+ CouplingDeviceCreationForm,
631
651
  CreateParameterDialog,
652
+ CreateVoltageLevelTopologyForm,
632
653
  CsvDownloadButton,
633
654
  CsvExport,
634
655
  CsvPicker,
@@ -842,6 +863,7 @@ export {
842
863
  LimitReductionTableRow,
843
864
  LimitReductionsTableForm,
844
865
  LimitTypes,
866
+ LimitViolationResult,
845
867
  LimitsChart,
846
868
  LimitsEditor,
847
869
  LimitsGroupsContextualMenu,
@@ -1025,6 +1047,7 @@ export {
1025
1047
  REMOVE,
1026
1048
  REPORT_SEVERITY,
1027
1049
  RESET_AUTHENTICATION_ROUTER_ERROR,
1050
+ RESULTS_LOADING_DELAY,
1028
1051
  RULES,
1029
1052
  RadioInput,
1030
1053
  RangeInput,
@@ -1039,6 +1062,7 @@ export {
1039
1062
  ReferenceType,
1040
1063
  RegulatingTerminalForm,
1041
1064
  RemoveButton,
1065
+ RenderTableAndExportCsv,
1042
1066
  ReportFetcherContext,
1043
1067
  ReportFilterContext,
1044
1068
  ReportType,
@@ -1048,6 +1072,7 @@ export {
1048
1072
  RootNetworkChipCell,
1049
1073
  RootNetworkHeaderRenderer,
1050
1074
  RuleValueEditor,
1075
+ RunningStatus,
1051
1076
  SAProcessConfigEditionDialog,
1052
1077
  SCENARIO_DURATION,
1053
1078
  SEARCH_EQUIPMENTS,
@@ -1082,6 +1107,7 @@ export {
1082
1107
  STARTED_GENERATORS_IN_CALCULATION_CLUSTER_THRESHOLD,
1083
1108
  STARTED_GENERATORS_OUTSIDE_CALCULATION_CLUSTER_THRESHOLD,
1084
1109
  START_TIME,
1110
+ STATIC_VAR_COMPENSATOR_TAB_FIELDS,
1085
1111
  STOP_TIME,
1086
1112
  SUBSTATION_LAYOUT,
1087
1113
  SVAR_REGULATION_MODE_OPTIONS,
@@ -1122,6 +1148,10 @@ export {
1122
1148
  SnackbarProvider,
1123
1149
  SolverType,
1124
1150
  SortWay,
1151
+ StaticVarCompensatorCreationForm,
1152
+ StaticVarCompensatorDialogHeader,
1153
+ StaticVarCompensatorDialogTab,
1154
+ StaticVarCompensatorDialogTabs,
1125
1155
  SubmitButton,
1126
1156
  Substation,
1127
1157
  SubstationCreationForm,
@@ -1177,6 +1207,7 @@ export {
1177
1207
  VOLTAGE_LEVELS_FORM,
1178
1208
  VOLTAGE_LIMITS_DEFAULT,
1179
1209
  VOLTAGE_LIMITS_MODIFICATION,
1210
+ VOLTAGE_REGULATION_MODES,
1180
1211
  VSC,
1181
1212
  ValueEditor,
1182
1213
  ValueSelector,
@@ -1235,6 +1266,7 @@ export {
1235
1266
  commonButtonFr,
1236
1267
  componentsEn,
1237
1268
  componentsFr,
1269
+ computeQ0,
1238
1270
  computeSwitchedOnValue,
1239
1271
  computeTagMinSize,
1240
1272
  computeTolerance,
@@ -1247,6 +1279,9 @@ export {
1247
1279
  copyEquipmentPropertiesForCreation,
1248
1280
  copyToClipboard,
1249
1281
  countRules,
1282
+ couplingDeviceCreationDtoToForm,
1283
+ couplingDeviceCreationFormSchema,
1284
+ couplingDeviceCreationFormToDto,
1250
1285
  createCellBorderColor,
1251
1286
  createCellContentWrapperSx,
1252
1287
  createCellStyle,
@@ -1261,6 +1296,10 @@ export {
1261
1296
  createPropertyModification,
1262
1297
  createRootNetworkChipCellSx,
1263
1298
  createRowSx,
1299
+ createVoltageLevelTopologyDtoToForm,
1300
+ createVoltageLevelTopologyEmptyFormData,
1301
+ createVoltageLevelTopologyFormSchema,
1302
+ createVoltageLevelTopologyFormToDto,
1264
1303
  creationPropertiesSchema,
1265
1304
  csvEn,
1266
1305
  csvFr,
@@ -1277,6 +1316,7 @@ export {
1277
1316
  elementEditionStyles,
1278
1317
  elementSearchEn,
1279
1318
  elementSearchFr,
1319
+ emptyCouplingDeviceCreationFormData,
1280
1320
  emptyFormData,
1281
1321
  emptyLineSegment,
1282
1322
  emptyModificationByAssignmentFormData,
@@ -1482,6 +1522,9 @@ export {
1482
1522
  getRangeInputSchema,
1483
1523
  getReactiveCapabilityCurveValidationSchema,
1484
1524
  getReactiveCapabilityCurveValidationSchemaArray,
1525
+ getReactiveFormData,
1526
+ getReactiveFormEmptyFormData,
1527
+ getReactiveFormValidationSchema,
1485
1528
  getReactiveLimitsEmptyFormData,
1486
1529
  getReactiveLimitsEmptyFormDataProps,
1487
1530
  getReactiveLimitsFormData,
@@ -1507,6 +1550,9 @@ export {
1507
1550
  getShortCircuitFormData,
1508
1551
  getShortCircuitFormSchema,
1509
1552
  getShortCircuitSpecificParametersDescription,
1553
+ getStandbyAutomatonEmptyFormData,
1554
+ getStandbyAutomatonFormData,
1555
+ getStandbyAutomatonFormValidationSchema,
1510
1556
  getStudyNetworkVisualizationsParameters,
1511
1557
  getStudyShortCircuitParameters,
1512
1558
  getStudyUrl,
@@ -1668,6 +1714,10 @@ export {
1668
1714
  snackWithFallback,
1669
1715
  sortSeverityList,
1670
1716
  standardTextField,
1717
+ staticVarCompensatorCreationEmptyFormData,
1718
+ staticVarCompensatorCreationFormSchema,
1719
+ staticVarCompensatorCreationFormToDto,
1720
+ staticVarCompensatorDtoToForm,
1671
1721
  styles,
1672
1722
  subscribeToUserState,
1673
1723
  substationCreationDtoToForm,
@@ -1733,11 +1783,13 @@ export {
1733
1783
  useGlobalAnnouncement,
1734
1784
  useHvdcLccDeletion,
1735
1785
  useIntlRef,
1786
+ useIntlResultStatusMessages,
1736
1787
  useListenerManager,
1737
1788
  useLocalizedCountries,
1738
1789
  useModificationLabelComputer,
1739
1790
  useModificationsDragAndDrop,
1740
1791
  useNotificationsListener,
1792
+ useOpenLoaderShortWait,
1741
1793
  useParameterLayoutContext,
1742
1794
  useParametersBackend,
1743
1795
  useParametersForm,