@gridsuite/commons-ui 0.103.0 → 0.104.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.
@@ -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
+ };
@@ -6,3 +6,4 @@
6
6
  */
7
7
  export { LeftPanelOpenIcon } from './LeftPanelOpenIcon';
8
8
  export { LeftPanelCloseIcon } from './LeftPanelCloseIcon';
9
+ export { DeviceHubIcon } from './DeviceHubIcon';
@@ -1,6 +1,8 @@
1
1
  import { LeftPanelOpenIcon } from "./LeftPanelOpenIcon.js";
2
2
  import { LeftPanelCloseIcon } from "./LeftPanelCloseIcon.js";
3
+ import { DeviceHubIcon } from "./DeviceHubIcon.js";
3
4
  export {
5
+ DeviceHubIcon,
4
6
  LeftPanelCloseIcon,
5
7
  LeftPanelOpenIcon
6
8
  };
@@ -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,
@@ -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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsuite/commons-ui",
3
- "version": "0.103.0",
3
+ "version": "0.104.0",
4
4
  "description": "common react components for gridsuite applications",
5
5
  "author": "gridsuite team",
6
6
  "homepage": "https://github.com/gridsuite",