@gridsuite/commons-ui 0.88.0 → 0.88.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.
@@ -1,6 +1,6 @@
1
1
  import { useStateBoolean } from "./customStates/useStateBoolean.js";
2
2
  import { useStateNumber } from "./customStates/useStateNumber.js";
3
- import { format, useModificationLabelComputer } from "./useModificationLabelComputer.js";
3
+ import { useModificationLabelComputer } from "./useModificationLabelComputer.js";
4
4
  import { useConfidentialityWarning } from "./useConfidentialityWarning.js";
5
5
  import { useDebounce } from "./useDebounce.js";
6
6
  import { useIntlRef } from "./useIntlRef.js";
@@ -11,7 +11,6 @@ import { useSnackMessage } from "./useSnackMessage.js";
11
11
  import { useFormatLabelWithUnit } from "./useFormatLabelWithUnit.js";
12
12
  import { useSelectAppearance } from "./useSelectAppearance.js";
13
13
  export {
14
- format,
15
14
  getComputedLanguage,
16
15
  getSystemLanguage,
17
16
  useConfidentialityWarning,
@@ -1,8 +1,5 @@
1
1
  import { UUID } from 'crypto';
2
2
 
3
- export declare const format: (text: string, bold: boolean) => import("react/jsx-runtime").JSX.Element | {
4
- text: string;
5
- };
6
3
  export interface NetworkModificationMetadata {
7
4
  uuid: UUID;
8
5
  type: string;
@@ -22,12 +19,8 @@ export declare const useModificationLabelComputer: () => {
22
19
  equipmentAttributeValue: string;
23
20
  computedLabel: string | import("react/jsx-runtime").JSX.Element;
24
21
  } | {
25
- voltageLevelEquipmentId: import("react/jsx-runtime").JSX.Element | {
26
- text: string;
27
- };
28
- substationEquipmentId: import("react/jsx-runtime").JSX.Element | {
29
- text: string;
30
- };
22
+ voltageLevelEquipmentId: string | import("react/jsx-runtime").JSX.Element;
23
+ substationEquipmentId: string | import("react/jsx-runtime").JSX.Element;
31
24
  } | {
32
25
  computedLabel: any;
33
26
  };
@@ -3,9 +3,6 @@ import { useIntl } from "react-intl";
3
3
  import { useCallback } from "react";
4
4
  import { MODIFICATION_TYPES } from "../utils/types/modificationType.js";
5
5
  import { EquipmentType } from "../utils/types/equipmentType.js";
6
- const format = (text, bold) => {
7
- return bold ? /* @__PURE__ */ jsx("strong", { children: text }) : { text };
8
- };
9
6
  const getOperatingStatusModificationValues = (modification, formatBold) => {
10
7
  return {
11
8
  action: modification.action,
@@ -22,8 +19,8 @@ const getEquipmentAttributeModificationValues = (modification, formatBold) => {
22
19
  };
23
20
  const getVoltageLevelWithSubstationModificationValues = (modification, formatBold) => {
24
21
  return {
25
- voltageLevelEquipmentId: format(modification.voltageLevelEquipmentId, formatBold),
26
- substationEquipmentId: format(modification.substationEquipmentId, formatBold)
22
+ voltageLevelEquipmentId: formatBold ? /* @__PURE__ */ jsx("strong", { children: modification.voltageLevelEquipmentId }) : modification.voltageLevelEquipmentId,
23
+ substationEquipmentId: formatBold ? /* @__PURE__ */ jsx("strong", { children: modification.substationEquipmentId }) : modification.substationEquipmentId
27
24
  };
28
25
  };
29
26
  const useModificationLabelComputer = () => {
@@ -79,6 +76,5 @@ const useModificationLabelComputer = () => {
79
76
  return { computeLabel };
80
77
  };
81
78
  export {
82
- format,
83
79
  useModificationLabelComputer
84
80
  };
package/dist/index.js CHANGED
@@ -106,7 +106,7 @@ import { useNotificationsListener } from "./components/notifications/hooks/useNo
106
106
  import { useListenerManager } from "./components/notifications/hooks/useListenerManager.js";
107
107
  import { useStateBoolean } from "./hooks/customStates/useStateBoolean.js";
108
108
  import { useStateNumber } from "./hooks/customStates/useStateNumber.js";
109
- import { format, useModificationLabelComputer } from "./hooks/useModificationLabelComputer.js";
109
+ import { useModificationLabelComputer } from "./hooks/useModificationLabelComputer.js";
110
110
  import { useConfidentialityWarning } from "./hooks/useConfidentialityWarning.js";
111
111
  import { useDebounce } from "./hooks/useDebounce.js";
112
112
  import { useIntlRef } from "./hooks/useIntlRef.js";
@@ -407,7 +407,6 @@ export {
407
407
  filterFr,
408
408
  flatParametersEn,
409
409
  flatParametersFr,
410
- format,
411
410
  genHelperError,
412
411
  genHelperPreviousValue,
413
412
  generateTreeViewFinderClass,
@@ -84,7 +84,7 @@ export interface Identifiable {
84
84
  name?: string;
85
85
  }
86
86
  export interface Equipment extends Identifiable {
87
- type: EquipmentType;
87
+ type: EquipmentType | ExtendedEquipmentType;
88
88
  voltageLevels?: Identifiable[];
89
89
  }
90
90
  export interface EquipmentInfos extends Identifiable {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsuite/commons-ui",
3
- "version": "0.88.0",
3
+ "version": "0.88.1",
4
4
  "description": "common react components for gridsuite applications",
5
5
  "engines": {
6
6
  "node": ">=22",