@gridsuite/commons-ui 0.271.0 → 0.272.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/composite/customAGGrid/custom-aggrid-types.d.ts +7 -0
- package/dist/components/composite/dnd-table/deletable-table-row.d.ts +2 -1
- package/dist/components/composite/dnd-table/deletable-table-row.js +3 -1
- package/dist/components/composite/dnd-table/dnd-table-row.d.ts +2 -1
- package/dist/components/composite/dnd-table/dnd-table-row.js +29 -4
- package/dist/components/composite/dnd-table/dnd-table.d.ts +1 -0
- package/dist/components/composite/dnd-table/dnd-table.js +13 -3
- package/dist/components/composite/dnd-table/dnd-table.type.d.ts +1 -0
- package/dist/components/composite/report/report-viewer/context/report-viewer-context.d.ts +4 -4
- package/dist/components/composite/report/report-viewer/log-table/log-table.js +8 -7
- package/dist/components/composite/report/report.type.d.ts +0 -4
- package/dist/components/ui/addButton/AddButton.js +9 -1
- package/dist/components/ui/reactHookForm/DirectoryItemsInput.d.ts +2 -1
- package/dist/components/ui/reactHookForm/DirectoryItemsInput.js +3 -1
- package/dist/components/ui/reactHookForm/autocompleteInputs/AutocompleteInput.d.ts +2 -1
- package/dist/components/ui/reactHookForm/autocompleteInputs/AutocompleteInput.js +2 -0
- package/dist/components/ui/reactHookForm/booleans/BooleanInput.d.ts +2 -1
- package/dist/components/ui/reactHookForm/booleans/BooleanInput.js +3 -1
- package/dist/components/ui/reactHookForm/booleans/SwitchInput.d.ts +2 -1
- package/dist/components/ui/reactHookForm/booleans/SwitchInput.js +12 -2
- package/dist/components/ui/reactHookForm/chip-items-input.d.ts +2 -1
- package/dist/components/ui/reactHookForm/chip-items-input.js +2 -1
- package/dist/components/ui/reactHookForm/expandableInput/DeletableRow.d.ts +2 -1
- package/dist/components/ui/reactHookForm/expandableInput/DeletableRow.js +3 -1
- package/dist/components/ui/reactHookForm/expandableInput/ExpandableInput.d.ts +2 -0
- package/dist/components/ui/reactHookForm/expandableInput/ExpandableInput.js +13 -2
- package/dist/components/ui/reactHookForm/tableInputs/table-text-input.d.ts +2 -1
- package/dist/components/ui/reactHookForm/tableInputs/table-text-input.js +2 -1
- package/dist/features/common/index.d.ts +1 -0
- package/dist/features/common/types.d.ts +32 -0
- package/dist/features/common/types.js +1 -0
- package/dist/features/index.d.ts +2 -0
- package/dist/features/index.js +23 -2
- package/dist/features/network-modifications/common/connectivity/VoltageLevelConnectivityForm.js +4 -2
- package/dist/features/network-modifications/twoWindingsTransformer/creation/twoWindingsTransformerCreation.utils.js +2 -2
- package/dist/features/results/common/index.d.ts +7 -0
- package/dist/features/results/common/index.js +5 -0
- package/dist/features/results/common/utils.d.ts +5 -0
- package/dist/features/results/common/utils.js +18 -0
- package/dist/features/results/securityanalysis/index.js +1 -2
- package/dist/features/results/securityanalysis/security-analysis-result-nmk.js +3 -2
- package/dist/features/results/securityanalysis/utils.d.ts +0 -1
- package/dist/features/results/securityanalysis/utils.js +0 -2
- package/dist/features/results/shortcircuit/index.d.ts +11 -0
- package/dist/features/results/shortcircuit/index.js +21 -0
- package/dist/features/results/shortcircuit/shortcircuit-analysis-all-buses-result.d.ts +4 -0
- package/dist/features/results/shortcircuit/shortcircuit-analysis-all-buses-result.js +25 -0
- package/dist/features/results/shortcircuit/shortcircuit-analysis-result-content.d.ts +13 -0
- package/dist/features/results/shortcircuit/shortcircuit-analysis-result-content.js +62 -0
- package/dist/features/results/shortcircuit/shortcircuit-analysis-result-table.d.ts +41 -0
- package/dist/features/results/shortcircuit/shortcircuit-analysis-result-table.js +451 -0
- package/dist/features/results/shortcircuit/shortcircuit-analysis-result.d.ts +53 -0
- package/dist/features/results/shortcircuit/shortcircuit-analysis-result.js +252 -0
- package/dist/features/results/shortcircuit/shortcircuit-analysis-result.type.d.ts +41 -0
- package/dist/features/results/shortcircuit/shortcircuit-analysis-result.type.js +8 -0
- package/dist/index.js +23 -2
- package/dist/utils/types/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/features/index.js
CHANGED
|
@@ -277,9 +277,15 @@ import { useGlobalAnnouncement } from "./announcement/useGlobalAnnouncement.js";
|
|
|
277
277
|
import { SecurityAnalysisResultNmk } from "./results/securityanalysis/security-analysis-result-nmk.js";
|
|
278
278
|
import { SecurityAnalysisTable } from "./results/securityanalysis/security-analysis-table.js";
|
|
279
279
|
import { NmkType } from "./results/securityanalysis/security-analysis.type.js";
|
|
280
|
-
import {
|
|
280
|
+
import { flattenNmKResultsConstraints, flattenNmKResultsContingencies, handlePostSortRows, mapNmKResultsCutOffPower } from "./results/securityanalysis/utils.js";
|
|
281
281
|
import { LimitViolationResult } from "./results/loadflow/limit-violation-result.js";
|
|
282
282
|
import { getNoRowsMessage } from "./results/utils/no-rows-message.js";
|
|
283
|
+
import { RESULT_PAGE_OPTIONS, createMultiEnumFilterParams } from "./results/common/utils.js";
|
|
284
|
+
import { ShortCircuitAnalysisType } from "./results/shortcircuit/shortcircuit-analysis-result.type.js";
|
|
285
|
+
import { ALL_BUSES, FROM_COLUMN_TO_FIELD, FROM_COLUMN_TO_FIELD_ONE_BUS, ONE_BUS, convertFilterValues, mappingTabs } from "./results/shortcircuit/shortcircuit-analysis-result-content.js";
|
|
286
|
+
import { SHORTCIRCUIT_ANALYSIS_RESULT_SORT_STORE, ShortCircuitAnalysisResultTable, numericFilterParams, resultsStyles, textFilterParams } from "./results/shortcircuit/shortcircuit-analysis-result-table.js";
|
|
287
|
+
import { ShortCircuitAnalysisResult } from "./results/shortcircuit/shortcircuit-analysis-result.js";
|
|
288
|
+
import { ShortCircuitAnalysisAllBusesResult } from "./results/shortcircuit/shortcircuit-analysis-all-buses-result.js";
|
|
283
289
|
import { RESULTS_LOADING_DELAY } from "./results/constants.js";
|
|
284
290
|
import { ProcessType } from "./process-configs/common/process-config.type.js";
|
|
285
291
|
import { emptyProcessConfigModificationsFormData, getProcessConfigModificationsBackendFromFormData, getProcessConfigModificationsFormData, processConfigModificationsShape } from "./process-configs/common/process-config-modifications-edition.utils.js";
|
|
@@ -301,6 +307,7 @@ import { useIntlResultStatusMessages } from "./results/hooks/useIntlResultStatus
|
|
|
301
307
|
export {
|
|
302
308
|
ACCURACY,
|
|
303
309
|
ADVANCED_PARAMETERS,
|
|
310
|
+
ALL_BUSES,
|
|
304
311
|
APPLICABILITY,
|
|
305
312
|
AUTO_EXTENSIBLE_COLUMNS,
|
|
306
313
|
AboutDialog,
|
|
@@ -394,6 +401,8 @@ export {
|
|
|
394
401
|
ErrorInUserValidationAlert,
|
|
395
402
|
FLOW_PROPORTIONAL_THRESHOLD,
|
|
396
403
|
FORMULAS,
|
|
404
|
+
FROM_COLUMN_TO_FIELD,
|
|
405
|
+
FROM_COLUMN_TO_FIELD_ONE_BUS,
|
|
397
406
|
GENERAL,
|
|
398
407
|
GENERAL_APPLY_MODIFICATIONS,
|
|
399
408
|
GENERATORS_SELECTION_TYPE,
|
|
@@ -503,11 +512,11 @@ export {
|
|
|
503
512
|
NmkType,
|
|
504
513
|
NotificationsContext,
|
|
505
514
|
NotificationsProvider,
|
|
515
|
+
ONE_BUS,
|
|
506
516
|
OPERATIONAL_LIMITS_GROUPS_MODIFICATION_TYPE,
|
|
507
517
|
OPERATOR,
|
|
508
518
|
OperationalLimitsGroupTabLabel,
|
|
509
519
|
OperationalLimitsGroups,
|
|
510
|
-
PAGE_OPTIONS,
|
|
511
520
|
PARAM_CENTER_LABEL,
|
|
512
521
|
PARAM_COMPONENT_LIBRARY,
|
|
513
522
|
PARAM_DIAGONAL_LABEL,
|
|
@@ -557,6 +566,7 @@ export {
|
|
|
557
566
|
REGULATION_TYPES,
|
|
558
567
|
REMOVE,
|
|
559
568
|
RESULTS_LOADING_DELAY,
|
|
569
|
+
RESULT_PAGE_OPTIONS,
|
|
560
570
|
RatioTapChangerPane,
|
|
561
571
|
RatioTapChangerPaneSteps,
|
|
562
572
|
ReactiveCapabilityCurveRowForm,
|
|
@@ -573,6 +583,7 @@ export {
|
|
|
573
583
|
SCENARIO_DURATION,
|
|
574
584
|
SELECTION_TYPE,
|
|
575
585
|
SENSITIVITY_TYPES,
|
|
586
|
+
SHORTCIRCUIT_ANALYSIS_RESULT_SORT_STORE,
|
|
576
587
|
SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE,
|
|
577
588
|
SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS,
|
|
578
589
|
SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_IN_CALCULATION_CLUSTER,
|
|
@@ -615,6 +626,10 @@ export {
|
|
|
615
626
|
SensitivityAnalysisParametersDialog,
|
|
616
627
|
SensitivityAnalysisParametersInline,
|
|
617
628
|
SetPointsForm,
|
|
629
|
+
ShortCircuitAnalysisAllBusesResult,
|
|
630
|
+
ShortCircuitAnalysisResult,
|
|
631
|
+
ShortCircuitAnalysisResultTable,
|
|
632
|
+
ShortCircuitAnalysisType,
|
|
618
633
|
ShortCircuitForm,
|
|
619
634
|
ShortCircuitParametersEditionDialog,
|
|
620
635
|
ShortCircuitParametersInLine,
|
|
@@ -701,6 +716,7 @@ export {
|
|
|
701
716
|
computeRatioTapChangerRegulationMode,
|
|
702
717
|
computeSwitchedOnValue,
|
|
703
718
|
computeTagMinSize,
|
|
719
|
+
convertFilterValues,
|
|
704
720
|
convertLimitsToOperationalLimitsGroupFormSchema,
|
|
705
721
|
convertToLineSegmentInfos,
|
|
706
722
|
convertToLineSegmentsFormData,
|
|
@@ -716,6 +732,7 @@ export {
|
|
|
716
732
|
createEditDescriptionStyle,
|
|
717
733
|
createHeaderCellStyle,
|
|
718
734
|
createModificationNameCellStyle,
|
|
735
|
+
createMultiEnumFilterParams,
|
|
719
736
|
createNameCellLabelBoxSx,
|
|
720
737
|
createNameCellRootStyle,
|
|
721
738
|
createPropertyModification,
|
|
@@ -926,6 +943,7 @@ export {
|
|
|
926
943
|
logout,
|
|
927
944
|
mapNmKResultsCutOffPower,
|
|
928
945
|
mapServerLimitsGroupsToFormInfos,
|
|
946
|
+
mappingTabs,
|
|
929
947
|
markEditingGlobalFilter,
|
|
930
948
|
markNotFoundGlobalFiltersAsDeletedInState,
|
|
931
949
|
mergeModificationAndEquipmentProperties,
|
|
@@ -940,11 +958,13 @@ export {
|
|
|
940
958
|
moveSubModificationInTree,
|
|
941
959
|
networkModificationTableStyles,
|
|
942
960
|
newEquipmentDeletionDto,
|
|
961
|
+
numericFilterParams,
|
|
943
962
|
onlyStartedGeneratorsOptions,
|
|
944
963
|
parametersStyles,
|
|
945
964
|
processConfigModificationsShape,
|
|
946
965
|
removeSelectedGlobalFiltersFromTableState,
|
|
947
966
|
removeUuidsFromTree,
|
|
967
|
+
resultsStyles,
|
|
948
968
|
sanitizeLimitNames,
|
|
949
969
|
sanitizeLimitsGroups,
|
|
950
970
|
sanitizePercentageValue,
|
|
@@ -973,6 +993,7 @@ export {
|
|
|
973
993
|
substationModificationFormToDto,
|
|
974
994
|
syncGlobalFilters,
|
|
975
995
|
testValueWithinPowerInterval,
|
|
996
|
+
textFilterParams,
|
|
976
997
|
toBeEstimatedEmptyFormData,
|
|
977
998
|
toFormValuesContingencyListsInfos,
|
|
978
999
|
toFormValuesLimitReductions,
|
package/dist/features/network-modifications/common/connectivity/VoltageLevelConnectivityForm.js
CHANGED
|
@@ -128,7 +128,8 @@ function VoltageLevelConnectivityForm({
|
|
|
128
128
|
label: voltageLevelSelectLabel,
|
|
129
129
|
options: vlOptions,
|
|
130
130
|
getOptionLabel: getObjectId,
|
|
131
|
-
size: "small"
|
|
131
|
+
size: "small",
|
|
132
|
+
dataTestId: "VoltageLevelInput"
|
|
132
133
|
}
|
|
133
134
|
) }),
|
|
134
135
|
/* @__PURE__ */ jsx(Grid, { size: "grow", children: /* @__PURE__ */ jsx(
|
|
@@ -150,7 +151,8 @@ function VoltageLevelConnectivityForm({
|
|
|
150
151
|
}
|
|
151
152
|
return value;
|
|
152
153
|
},
|
|
153
|
-
size: "small"
|
|
154
|
+
size: "small",
|
|
155
|
+
dataTestId: "BusBarSectionInput"
|
|
154
156
|
}
|
|
155
157
|
) })
|
|
156
158
|
] });
|
|
@@ -150,8 +150,8 @@ const transformOperationalLimitsGroupsForForm = (operationalLimitsGroups) => {
|
|
|
150
150
|
permanentLimit: currentLimits?.permanentLimit ?? "",
|
|
151
151
|
temporaryLimits: currentLimits?.temporaryLimits?.map((tl) => ({
|
|
152
152
|
name: tl.name ?? "",
|
|
153
|
-
value: tl.value
|
|
154
|
-
acceptableDuration: tl.acceptableDuration
|
|
153
|
+
value: tl.value,
|
|
154
|
+
acceptableDuration: tl.acceptableDuration
|
|
155
155
|
})) ?? []
|
|
156
156
|
}
|
|
157
157
|
}));
|
|
@@ -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 './utils';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const RESULT_PAGE_OPTIONS = [25, 100, 500, 1e3];
|
|
2
|
+
const createMultiEnumFilterParams = () => ({
|
|
3
|
+
filterOptions: [
|
|
4
|
+
{
|
|
5
|
+
displayKey: "customInRange",
|
|
6
|
+
displayName: "customInRange",
|
|
7
|
+
predicate: (filterValues, cellValue) => {
|
|
8
|
+
if (!filterValues[0]) return false;
|
|
9
|
+
const allowedValues = filterValues[0].split(",");
|
|
10
|
+
return allowedValues.includes(String(cellValue));
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
});
|
|
15
|
+
export {
|
|
16
|
+
RESULT_PAGE_OPTIONS,
|
|
17
|
+
createMultiEnumFilterParams
|
|
18
|
+
};
|
|
@@ -1,10 +1,9 @@
|
|
|
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 {
|
|
4
|
+
import { flattenNmKResultsConstraints, flattenNmKResultsContingencies, handlePostSortRows, mapNmKResultsCutOffPower } from "./utils.js";
|
|
5
5
|
export {
|
|
6
6
|
NmkType,
|
|
7
|
-
PAGE_OPTIONS,
|
|
8
7
|
SecurityAnalysisResultNmk,
|
|
9
8
|
SecurityAnalysisTable,
|
|
10
9
|
flattenNmKResultsConstraints,
|
|
@@ -60,8 +60,9 @@ 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
|
|
63
|
+
import { mapNmKResultsCutOffPower, flattenNmKResultsConstraints, flattenNmKResultsContingencies, handlePostSortRows } from "./utils.js";
|
|
64
64
|
import { getNoRowsMessage } from "../utils/no-rows-message.js";
|
|
65
|
+
import { RESULT_PAGE_OPTIONS } from "../common/utils.js";
|
|
65
66
|
const styles = {
|
|
66
67
|
container: {
|
|
67
68
|
display: "flex",
|
|
@@ -131,7 +132,7 @@ function SecurityAnalysisResultNmk({
|
|
|
131
132
|
onGridReady
|
|
132
133
|
}
|
|
133
134
|
) }),
|
|
134
|
-
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(CustomTablePagination, { rowsPerPageOptions:
|
|
135
|
+
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(CustomTablePagination, { rowsPerPageOptions: RESULT_PAGE_OPTIONS, ...paginationProps }) })
|
|
135
136
|
] });
|
|
136
137
|
}
|
|
137
138
|
export {
|
|
@@ -1,7 +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
|
-
export declare const PAGE_OPTIONS: number[];
|
|
5
4
|
export declare const flattenNmKResultsContingencies: (intl: IntlShape, result: ConstraintsFromContingencyItem[] | null) => SecurityAnalysisNmkTableRow[] | undefined;
|
|
6
5
|
export declare const flattenNmKResultsConstraints: (intl: IntlShape, result: ContingenciesFromConstraintItem[] | null) => SecurityAnalysisNmkTableRow[] | undefined;
|
|
7
6
|
export declare const mapNmKResultsCutOffPower: (result: CutOffPowerFromConstraintsItem[] | null) => SecurityAnalysisNmkTableRow[] | undefined;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
const PAGE_OPTIONS = [25, 100, 500, 1e3];
|
|
2
1
|
const MAX_INT32 = 2147483647;
|
|
3
2
|
const PERMANENT_LIMIT_NAME = "permanent";
|
|
4
3
|
const translateLimitNameBackToFront = (limitName, intl) => {
|
|
@@ -118,7 +117,6 @@ const handlePostSortRows = (isFromContingency) => (params) => {
|
|
|
118
117
|
Object.assign(agGridRows, [...mappedRows.values()].flat());
|
|
119
118
|
};
|
|
120
119
|
export {
|
|
121
|
-
PAGE_OPTIONS,
|
|
122
120
|
flattenNmKResultsConstraints,
|
|
123
121
|
flattenNmKResultsContingencies,
|
|
124
122
|
handlePostSortRows,
|
|
@@ -0,0 +1,11 @@
|
|
|
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 './shortcircuit-analysis-result.type';
|
|
8
|
+
export * from './shortcircuit-analysis-result-content';
|
|
9
|
+
export * from './shortcircuit-analysis-result-table';
|
|
10
|
+
export * from './shortcircuit-analysis-result';
|
|
11
|
+
export * from './shortcircuit-analysis-all-buses-result';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ShortCircuitAnalysisType } from "./shortcircuit-analysis-result.type.js";
|
|
2
|
+
import { ALL_BUSES, FROM_COLUMN_TO_FIELD, FROM_COLUMN_TO_FIELD_ONE_BUS, ONE_BUS, convertFilterValues, mappingTabs } from "./shortcircuit-analysis-result-content.js";
|
|
3
|
+
import { SHORTCIRCUIT_ANALYSIS_RESULT_SORT_STORE, ShortCircuitAnalysisResultTable, numericFilterParams, resultsStyles, textFilterParams } from "./shortcircuit-analysis-result-table.js";
|
|
4
|
+
import { ShortCircuitAnalysisResult } from "./shortcircuit-analysis-result.js";
|
|
5
|
+
import { ShortCircuitAnalysisAllBusesResult } from "./shortcircuit-analysis-all-buses-result.js";
|
|
6
|
+
export {
|
|
7
|
+
ALL_BUSES,
|
|
8
|
+
FROM_COLUMN_TO_FIELD,
|
|
9
|
+
FROM_COLUMN_TO_FIELD_ONE_BUS,
|
|
10
|
+
ONE_BUS,
|
|
11
|
+
SHORTCIRCUIT_ANALYSIS_RESULT_SORT_STORE,
|
|
12
|
+
ShortCircuitAnalysisAllBusesResult,
|
|
13
|
+
ShortCircuitAnalysisResult,
|
|
14
|
+
ShortCircuitAnalysisResultTable,
|
|
15
|
+
ShortCircuitAnalysisType,
|
|
16
|
+
convertFilterValues,
|
|
17
|
+
mappingTabs,
|
|
18
|
+
numericFilterParams,
|
|
19
|
+
resultsStyles,
|
|
20
|
+
textFilterParams
|
|
21
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IShortCircuitAnalysisGlobalResultProps } from './shortcircuit-analysis-result';
|
|
2
|
+
export interface ShortCircuitAnalysisAllBusesResultProps extends Omit<IShortCircuitAnalysisGlobalResultProps, 'analysisType' | 'result' | 'updateResult' | 'customTablePaginationProps'> {
|
|
3
|
+
}
|
|
4
|
+
export declare function ShortCircuitAnalysisAllBusesResult(props: ShortCircuitAnalysisAllBusesResultProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useCallback } from "react";
|
|
3
|
+
import { ShortCircuitAnalysisType } from "./shortcircuit-analysis-result.type.js";
|
|
4
|
+
import { ShortCircuitAnalysisResult } from "./shortcircuit-analysis-result.js";
|
|
5
|
+
function ShortCircuitAnalysisAllBusesResult(props) {
|
|
6
|
+
const [result, setResult] = useState(void 0);
|
|
7
|
+
const updateResult = useCallback((results) => {
|
|
8
|
+
setResult(results ?? void 0);
|
|
9
|
+
}, []);
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
ShortCircuitAnalysisResult,
|
|
12
|
+
{
|
|
13
|
+
analysisType: ShortCircuitAnalysisType.ALL_BUSES,
|
|
14
|
+
result,
|
|
15
|
+
updateResult,
|
|
16
|
+
customTablePaginationProps: {
|
|
17
|
+
labelRowsPerPageId: "muiTablePaginationLabelRowsPerPageAllBusesSCA"
|
|
18
|
+
},
|
|
19
|
+
...props
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
ShortCircuitAnalysisAllBusesResult
|
|
25
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ShortCircuitAnalysisType } from './shortcircuit-analysis-result.type';
|
|
2
|
+
export declare const ALL_BUSES = "allBuses";
|
|
3
|
+
export declare const ONE_BUS = "oneBus";
|
|
4
|
+
export declare const FROM_COLUMN_TO_FIELD: Record<string, string>;
|
|
5
|
+
export declare const FROM_COLUMN_TO_FIELD_ONE_BUS: Record<string, string>;
|
|
6
|
+
export declare const mappingTabs: (analysisType: ShortCircuitAnalysisType) => string;
|
|
7
|
+
export type ShortcircuitFilterConfig = {
|
|
8
|
+
column: string;
|
|
9
|
+
value: unknown;
|
|
10
|
+
tolerance?: number;
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
};
|
|
13
|
+
export declare const convertFilterValues: (filterSelector: ShortcircuitFilterConfig[]) => ShortcircuitFilterConfig[];
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ShortCircuitAnalysisType } from "./shortcircuit-analysis-result.type.js";
|
|
2
|
+
import { kiloUnitToUnit } from "../../../utils/conversionUtils.js";
|
|
3
|
+
import "../../../utils/types/equipmentType.js";
|
|
4
|
+
import "react/jsx-runtime";
|
|
5
|
+
import "@mui/icons-material";
|
|
6
|
+
const ALL_BUSES = "allBuses";
|
|
7
|
+
const ONE_BUS = "oneBus";
|
|
8
|
+
const FROM_COLUMN_TO_FIELD = {
|
|
9
|
+
elementId: "fault.id",
|
|
10
|
+
voltageLevel: "fault.voltageLevelId",
|
|
11
|
+
faultType: "fault.faultType",
|
|
12
|
+
connectableId: "feederResults.connectableId",
|
|
13
|
+
current: "current",
|
|
14
|
+
limitType: "firstLimitViolation.limitType",
|
|
15
|
+
limitMin: "ipMin",
|
|
16
|
+
limitMax: "ipMax",
|
|
17
|
+
deltaCurrentIpMin: "deltaCurrentIpMin",
|
|
18
|
+
deltaCurrentIpMax: "deltaCurrentIpMax",
|
|
19
|
+
shortCircuitPower: "shortCircuitPower"
|
|
20
|
+
};
|
|
21
|
+
const FROM_COLUMN_TO_FIELD_ONE_BUS = {
|
|
22
|
+
...FROM_COLUMN_TO_FIELD,
|
|
23
|
+
connectableId: "connectableId",
|
|
24
|
+
current: "fortescueCurrent.positiveMagnitude",
|
|
25
|
+
side: "side"
|
|
26
|
+
};
|
|
27
|
+
const mappingTabs = (analysisType) => {
|
|
28
|
+
switch (analysisType) {
|
|
29
|
+
case ShortCircuitAnalysisType.ONE_BUS:
|
|
30
|
+
return ONE_BUS;
|
|
31
|
+
case ShortCircuitAnalysisType.ALL_BUSES:
|
|
32
|
+
return ALL_BUSES;
|
|
33
|
+
default:
|
|
34
|
+
return "";
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
const convertFilterValues = (filterSelector) => {
|
|
38
|
+
return filterSelector.map((filter) => {
|
|
39
|
+
switch (filter.column) {
|
|
40
|
+
case "current":
|
|
41
|
+
case "deltaCurrentIpMax":
|
|
42
|
+
case "deltaCurrentIpMin":
|
|
43
|
+
case "limitMin":
|
|
44
|
+
case "limitMax":
|
|
45
|
+
return {
|
|
46
|
+
...filter,
|
|
47
|
+
value: kiloUnitToUnit(Number(filter.value)),
|
|
48
|
+
tolerance: kiloUnitToUnit(Number(filter.tolerance))
|
|
49
|
+
};
|
|
50
|
+
default:
|
|
51
|
+
return filter;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
ALL_BUSES,
|
|
57
|
+
FROM_COLUMN_TO_FIELD,
|
|
58
|
+
FROM_COLUMN_TO_FIELD_ONE_BUS,
|
|
59
|
+
ONE_BUS,
|
|
60
|
+
convertFilterValues,
|
|
61
|
+
mappingTabs
|
|
62
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { DisplayedColumnsChangedEvent, GridReadyEvent, RowDataUpdatedEvent } from 'ag-grid-community';
|
|
2
|
+
import { SCAFaultResult, ShortCircuitAnalysisType } from './shortcircuit-analysis-result.type';
|
|
3
|
+
import { FilterDataTypes, TableType, FilterTextComparators, FilterNumberComparators } from '../../../components';
|
|
4
|
+
import { RunningStatus } from '../../../utils';
|
|
5
|
+
export declare const SHORTCIRCUIT_ANALYSIS_RESULT_SORT_STORE = "shortcircuitAnalysisResult";
|
|
6
|
+
export type FilterEnumsType = Record<string, string[] | null>;
|
|
7
|
+
export declare const textFilterParams: {
|
|
8
|
+
dataType: FilterDataTypes;
|
|
9
|
+
comparators: FilterTextComparators[];
|
|
10
|
+
};
|
|
11
|
+
export declare const numericFilterParams: {
|
|
12
|
+
dataType: FilterDataTypes;
|
|
13
|
+
comparators: FilterNumberComparators[];
|
|
14
|
+
};
|
|
15
|
+
export type TableFilterParams = {
|
|
16
|
+
type: TableType;
|
|
17
|
+
tab: string;
|
|
18
|
+
};
|
|
19
|
+
export type ShortcircuitColumnFilter = {
|
|
20
|
+
column: string;
|
|
21
|
+
[key: string]: unknown;
|
|
22
|
+
};
|
|
23
|
+
export declare const resultsStyles: {
|
|
24
|
+
readonly sldLink: {
|
|
25
|
+
readonly color: "node.background";
|
|
26
|
+
readonly maxWidth: "100%";
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export interface ShortCircuitAnalysisResultTableProps {
|
|
30
|
+
result: SCAFaultResult[] | undefined;
|
|
31
|
+
analysisType: ShortCircuitAnalysisType;
|
|
32
|
+
isFetching: boolean;
|
|
33
|
+
filterEnums: FilterEnumsType;
|
|
34
|
+
onRowDataUpdated: (event: RowDataUpdatedEvent) => void;
|
|
35
|
+
onDisplayedColumnsChanged: (event: DisplayedColumnsChangedEvent) => void;
|
|
36
|
+
shortCircuitAnalysisStatus: RunningStatus;
|
|
37
|
+
columnFilters?: ShortcircuitColumnFilter[];
|
|
38
|
+
onGridReady: (params: GridReadyEvent) => void;
|
|
39
|
+
onVoltageLevelClick?: (voltageLevelId: string) => void;
|
|
40
|
+
}
|
|
41
|
+
export declare function ShortCircuitAnalysisResultTable({ result, analysisType, isFetching, filterEnums, onRowDataUpdated, onDisplayedColumnsChanged, shortCircuitAnalysisStatus, columnFilters, onGridReady, onVoltageLevelClick, }: ShortCircuitAnalysisResultTableProps): import("react").JSX.Element;
|