@gridsuite/commons-ui 0.103.0 → 0.104.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/icons/DeviceHubIcon.d.ts +11 -0
- package/dist/components/icons/DeviceHubIcon.js +15 -0
- package/dist/components/icons/index.d.ts +1 -0
- package/dist/components/icons/index.js +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/inputs/reactHookForm/text/TextInput.d.ts +1 -3
- package/dist/components/inputs/reactHookForm/text/TextInput.js +2 -4
- package/dist/hooks/useModificationLabelComputer.js +2 -0
- package/dist/index.js +2 -0
- package/dist/translations/en/networkModificationsEn.d.ts +1 -0
- package/dist/translations/en/networkModificationsEn.js +2 -1
- package/dist/translations/fr/networkModificationsFr.d.ts +1 -0
- package/dist/translations/fr/networkModificationsFr.js +2 -1
- package/dist/utils/types/modificationType.d.ts +5 -1
- package/dist/utils/types/modificationType.js +5 -0
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
interface DeviceHubProps {
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
export declare function DeviceHubIcon({ style }: DeviceHubProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import DeviceHub from "@material-symbols/svg-400/outlined/device_hub.svg?react";
|
|
3
|
+
import { useTheme } from "@mui/material";
|
|
4
|
+
function DeviceHubIcon({ style }) {
|
|
5
|
+
const theme = useTheme();
|
|
6
|
+
const defaultStyle = {
|
|
7
|
+
width: 15,
|
|
8
|
+
height: 15,
|
|
9
|
+
fill: theme.palette.text.primary
|
|
10
|
+
};
|
|
11
|
+
return /* @__PURE__ */ jsx(DeviceHub, { style: { ...defaultStyle, ...style } });
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
DeviceHubIcon
|
|
15
|
+
};
|
package/dist/components/index.js
CHANGED
|
@@ -111,6 +111,7 @@ import { useNotificationsListener } from "./notifications/hooks/useNotifications
|
|
|
111
111
|
import { useListenerManager } from "./notifications/hooks/useListenerManager.js";
|
|
112
112
|
import { LeftPanelOpenIcon } from "./icons/LeftPanelOpenIcon.js";
|
|
113
113
|
import { LeftPanelCloseIcon } from "./icons/LeftPanelCloseIcon.js";
|
|
114
|
+
import { DeviceHubIcon } from "./icons/DeviceHubIcon.js";
|
|
114
115
|
import { ComputingType, formatComputingTypeLabel, isValidComputingType } from "./parameters/common/computing-type.js";
|
|
115
116
|
import { PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_PROVIDER, PROVIDER, VOLTAGE_LEVEL } from "./parameters/common/constant.js";
|
|
116
117
|
import { LineSeparator } from "./parameters/common/line-separator.js";
|
|
@@ -191,6 +192,7 @@ export {
|
|
|
191
192
|
DescriptionField,
|
|
192
193
|
DescriptionModificationDialog,
|
|
193
194
|
DevModeBanner,
|
|
195
|
+
DeviceHubIcon,
|
|
194
196
|
DirectoryItemSelector,
|
|
195
197
|
DirectoryItemsInput,
|
|
196
198
|
ENERGY_SOURCE_OPTIONS,
|
|
@@ -19,11 +19,9 @@ export interface TextInputProps {
|
|
|
19
19
|
clearable?: boolean;
|
|
20
20
|
formProps?: Omit<TextFieldWithAdornmentProps | TextFieldProps, 'value' | 'onChange' | 'inputRef' | 'inputProps' | 'InputProps'>;
|
|
21
21
|
disabledTooltip?: boolean;
|
|
22
|
-
disabled?: boolean;
|
|
23
22
|
}
|
|
24
23
|
export declare function TextInput({ name, label, labelValues, // this prop is used to add a value to label. this value is displayed without being translated
|
|
25
24
|
id, adornment, customAdornment, outputTransform, // transform materialUi input value before sending it to react hook form, mostly used to deal with number fields
|
|
26
25
|
inputTransform, // transform react hook form value before sending it to materialUi input, mostly used to deal with number fields
|
|
27
26
|
acceptValue, // used to check user entry before committing the input change, used mostly to prevent user from typing a character in number field
|
|
28
|
-
previousValue, clearable, formProps, disabledTooltip,
|
|
29
|
-
disabled, }: TextInputProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
previousValue, clearable, formProps, disabledTooltip, }: TextInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -24,9 +24,8 @@ function TextInput({
|
|
|
24
24
|
previousValue,
|
|
25
25
|
clearable,
|
|
26
26
|
formProps,
|
|
27
|
-
disabledTooltip
|
|
27
|
+
disabledTooltip
|
|
28
28
|
// In case we don't want to show tooltip on the value and warning/info icons
|
|
29
|
-
disabled
|
|
30
29
|
}) {
|
|
31
30
|
const { validationSchema, getValues, removeOptional, isNodeBuilt, isUpdate } = useCustomFormContext();
|
|
32
31
|
const {
|
|
@@ -82,8 +81,7 @@ function TextInput({
|
|
|
82
81
|
),
|
|
83
82
|
...genHelperError(error == null ? void 0 : error.message),
|
|
84
83
|
...formProps,
|
|
85
|
-
...adornment && { ...finalAdornment }
|
|
86
|
-
disabled
|
|
84
|
+
...adornment && { ...finalAdornment }
|
|
87
85
|
},
|
|
88
86
|
id ?? label
|
|
89
87
|
);
|
|
@@ -51,6 +51,8 @@ const useModificationLabelComputer = () => {
|
|
|
51
51
|
return intl.formatMessage({
|
|
52
52
|
id: `network_modifications.tabular.${modificationMetadata.tabularCreationType}`
|
|
53
53
|
});
|
|
54
|
+
case MODIFICATION_TYPES.COUPLING_DEVICE_CREATION.type:
|
|
55
|
+
return modificationMetadata.voltageLevelId;
|
|
54
56
|
default:
|
|
55
57
|
return modificationMetadata.equipmentId || "";
|
|
56
58
|
}
|
package/dist/index.js
CHANGED
|
@@ -112,6 +112,7 @@ import { useNotificationsListener } from "./components/notifications/hooks/useNo
|
|
|
112
112
|
import { useListenerManager } from "./components/notifications/hooks/useListenerManager.js";
|
|
113
113
|
import { LeftPanelOpenIcon } from "./components/icons/LeftPanelOpenIcon.js";
|
|
114
114
|
import { LeftPanelCloseIcon } from "./components/icons/LeftPanelCloseIcon.js";
|
|
115
|
+
import { DeviceHubIcon } from "./components/icons/DeviceHubIcon.js";
|
|
115
116
|
import { ComputingType, formatComputingTypeLabel, isValidComputingType } from "./components/parameters/common/computing-type.js";
|
|
116
117
|
import { PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_PROVIDER, PROVIDER, VOLTAGE_LEVEL } from "./components/parameters/common/constant.js";
|
|
117
118
|
import { LineSeparator } from "./components/parameters/common/line-separator.js";
|
|
@@ -291,6 +292,7 @@ export {
|
|
|
291
292
|
DescriptionField,
|
|
292
293
|
DescriptionModificationDialog,
|
|
293
294
|
DevModeBanner,
|
|
295
|
+
DeviceHubIcon,
|
|
294
296
|
DirectoryItemSelector,
|
|
295
297
|
DirectoryItemsInput,
|
|
296
298
|
DistributionType,
|
|
@@ -62,4 +62,5 @@ export declare const networkModificationsEn: {
|
|
|
62
62
|
'network_modifications.STATIC_VAR_COMPENSATOR_CREATION': string;
|
|
63
63
|
'network_modifications.VOLTAGE_LEVEL_CREATION_SUBSTATION_CREATION': string;
|
|
64
64
|
'network_modifications.VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION': string;
|
|
65
|
+
'network_modifications.COUPLING_DEVICE_CREATION': string;
|
|
65
66
|
};
|
|
@@ -55,7 +55,8 @@ const networkModificationsEn = {
|
|
|
55
55
|
"network_modifications.LCC_MODIFICATION": "Modifying HVDC (LCC) {computedLabel}",
|
|
56
56
|
"network_modifications.STATIC_VAR_COMPENSATOR_CREATION": "Creating static var compensator {computedLabel}",
|
|
57
57
|
"network_modifications.VOLTAGE_LEVEL_CREATION_SUBSTATION_CREATION": "Creating voltage level {voltageLevelEquipmentId} and substation {substationEquipmentId}",
|
|
58
|
-
"network_modifications.VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION": "Modifying voltage level topology {computedLabel}"
|
|
58
|
+
"network_modifications.VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION": "Modifying voltage level topology {computedLabel}",
|
|
59
|
+
"network_modifications.COUPLING_DEVICE_CREATION": "Creating a coupling device in voltage level {computedLabel}"
|
|
59
60
|
};
|
|
60
61
|
export {
|
|
61
62
|
networkModificationsEn
|
|
@@ -62,4 +62,5 @@ export declare const networkModificationsFr: {
|
|
|
62
62
|
'network_modifications.STATIC_VAR_COMPENSATOR_CREATION': string;
|
|
63
63
|
'network_modifications.VOLTAGE_LEVEL_CREATION_SUBSTATION_CREATION': string;
|
|
64
64
|
'network_modifications.VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION': string;
|
|
65
|
+
'network_modifications.COUPLING_DEVICE_CREATION': string;
|
|
65
66
|
};
|
|
@@ -55,7 +55,8 @@ const networkModificationsFr = {
|
|
|
55
55
|
"network_modifications.LCC_MODIFICATION": "Modification de la HVDC (LCC) {computedLabel}",
|
|
56
56
|
"network_modifications.STATIC_VAR_COMPENSATOR_CREATION": "Création de CSPR {computedLabel}",
|
|
57
57
|
"network_modifications.VOLTAGE_LEVEL_CREATION_SUBSTATION_CREATION": "Création du poste {voltageLevelEquipmentId} et du site {substationEquipmentId}",
|
|
58
|
-
"network_modifications.VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION": "Modification de la topologie du poste {computedLabel}"
|
|
58
|
+
"network_modifications.VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION": "Modification de la topologie du poste {computedLabel}",
|
|
59
|
+
"network_modifications.COUPLING_DEVICE_CREATION": "Création de couplage / omnibus dans le poste {computedLabel}"
|
|
59
60
|
};
|
|
60
61
|
export {
|
|
61
62
|
networkModificationsFr
|
|
@@ -49,7 +49,8 @@ export declare enum ModificationType {
|
|
|
49
49
|
LCC_CONVERTER_STATION_MODIFICATION = "LCC_CONVERTER_STATION_MODIFICATION",
|
|
50
50
|
LCC_CREATION = "LCC_CREATION",
|
|
51
51
|
LCC_MODIFICATION = "LCC_MODIFICATION",
|
|
52
|
-
VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION = "VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION"
|
|
52
|
+
VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION = "VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION",
|
|
53
|
+
COUPLING_DEVICE_CREATION = "COUPLING_DEVICE_CREATION"
|
|
53
54
|
}
|
|
54
55
|
export declare const MODIFICATION_TYPES: {
|
|
55
56
|
GROOVY_SCRIPT: {
|
|
@@ -190,4 +191,7 @@ export declare const MODIFICATION_TYPES: {
|
|
|
190
191
|
VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION: {
|
|
191
192
|
type: ModificationType;
|
|
192
193
|
};
|
|
194
|
+
COUPLING_DEVICE_CREATION: {
|
|
195
|
+
type: ModificationType;
|
|
196
|
+
};
|
|
193
197
|
};
|
|
@@ -44,6 +44,7 @@ var ModificationType = /* @__PURE__ */ ((ModificationType2) => {
|
|
|
44
44
|
ModificationType2["LCC_CREATION"] = "LCC_CREATION";
|
|
45
45
|
ModificationType2["LCC_MODIFICATION"] = "LCC_MODIFICATION";
|
|
46
46
|
ModificationType2["VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION"] = "VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION";
|
|
47
|
+
ModificationType2["COUPLING_DEVICE_CREATION"] = "COUPLING_DEVICE_CREATION";
|
|
47
48
|
return ModificationType2;
|
|
48
49
|
})(ModificationType || {});
|
|
49
50
|
const MODIFICATION_TYPES = {
|
|
@@ -228,6 +229,10 @@ const MODIFICATION_TYPES = {
|
|
|
228
229
|
VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION: {
|
|
229
230
|
type: "VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION"
|
|
230
231
|
/* VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION */
|
|
232
|
+
},
|
|
233
|
+
COUPLING_DEVICE_CREATION: {
|
|
234
|
+
type: "COUPLING_DEVICE_CREATION"
|
|
235
|
+
/* COUPLING_DEVICE_CREATION */
|
|
231
236
|
}
|
|
232
237
|
};
|
|
233
238
|
export {
|