@gridsuite/commons-ui 0.109.0 → 0.109.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,2 +1,2 @@
1
1
  import { ParametersEditionDialogProps } from '../common';
2
- export declare function LoadFlowParametersEditionDialog({ id, open, onClose, titleId, name, description, activeDirectory, language, user, enableDeveloperMode, }: Readonly<ParametersEditionDialogProps>): import("react/jsx-runtime").JSX.Element;
2
+ export declare function LoadFlowParametersEditionDialog({ id, open, onClose, titleId, name, description, activeDirectory, user, language, enableDeveloperMode, }: Readonly<ParametersEditionDialogProps>): import("react/jsx-runtime").JSX.Element;
@@ -16,6 +16,7 @@ import "../../../utils/types/equipmentType.js";
16
16
  import "localized-countries";
17
17
  import "localized-countries/data/fr";
18
18
  import "localized-countries/data/en";
19
+ import { LANG_ENGLISH } from "../../../utils/langs.js";
19
20
  import { useParametersBackend, OptionalServicesStatus } from "../../../hooks/use-parameters-backend.js";
20
21
  import "../../inputs/reactHookForm/provider/CustomFormProvider.js";
21
22
  import "yup";
@@ -48,8 +49,8 @@ function LoadFlowParametersEditionDialog({
48
49
  name,
49
50
  description,
50
51
  activeDirectory,
51
- language,
52
52
  user,
53
+ language = LANG_ENGLISH,
53
54
  enableDeveloperMode = false
54
55
  }) {
55
56
  const parametersBackend = useParametersBackend(
@@ -88,6 +89,7 @@ function LoadFlowParametersEditionDialog({
88
89
  LoadFlowParametersForm,
89
90
  {
90
91
  loadflowMethods,
92
+ language,
91
93
  renderTitleFields: () => {
92
94
  return /* @__PURE__ */ jsx(
93
95
  NameElementEditorForm,
@@ -2,8 +2,9 @@ import { ReactNode } from 'react';
2
2
  import { UseLoadFlowParametersFormReturn } from './use-load-flow-parameters-form';
3
3
  interface LoadFlowParametersFormProps {
4
4
  loadflowMethods: UseLoadFlowParametersFormReturn;
5
+ language: string;
5
6
  renderTitleFields?: () => ReactNode;
6
7
  renderActions?: () => ReactNode;
7
8
  }
8
- export declare function LoadFlowParametersForm({ loadflowMethods, renderTitleFields, renderActions, }: Readonly<LoadFlowParametersFormProps>): import("react/jsx-runtime").JSX.Element;
9
+ export declare function LoadFlowParametersForm({ loadflowMethods, language, renderTitleFields, renderActions, }: Readonly<LoadFlowParametersFormProps>): import("react/jsx-runtime").JSX.Element;
9
10
  export {};
@@ -56,6 +56,7 @@ const styles = {
56
56
  };
57
57
  function LoadFlowParametersForm({
58
58
  loadflowMethods,
59
+ language,
59
60
  renderTitleFields,
60
61
  renderActions
61
62
  }) {
@@ -72,7 +73,7 @@ function LoadFlowParametersForm({
72
73
  defaultLimitReductions,
73
74
  paramsLoaded
74
75
  } = loadflowMethods;
75
- return /* @__PURE__ */ jsx(CustomFormProvider, { validationSchema: formSchema, ...formMethods, removeOptional: true, children: /* @__PURE__ */ jsxs(Box, { sx: styles.form, children: [
76
+ return /* @__PURE__ */ jsx(CustomFormProvider, { validationSchema: formSchema, ...formMethods, removeOptional: true, language, children: /* @__PURE__ */ jsxs(Box, { sx: styles.form, children: [
76
77
  renderTitleFields == null ? void 0 : renderTitleFields(),
77
78
  paramsLoaded ? /* @__PURE__ */ jsxs(Box, { sx: styles.loadflowParameters, children: [
78
79
  /* @__PURE__ */ jsx(
@@ -2,8 +2,9 @@ import { Dispatch, SetStateAction } from 'react';
2
2
  import { UUID } from 'crypto';
3
3
  import { UseParametersBackendReturnProps } from '../../../utils/types/parameters.type';
4
4
  import { ComputingType } from '../common/computing-type';
5
- export declare function LoadFlowParametersInline({ studyUuid, parametersBackend, setHaveDirtyFields, enableDeveloperMode, }: Readonly<{
5
+ export declare function LoadFlowParametersInline({ studyUuid, language, parametersBackend, setHaveDirtyFields, enableDeveloperMode, }: Readonly<{
6
6
  studyUuid: UUID | null;
7
+ language: string;
7
8
  parametersBackend: UseParametersBackendReturnProps<ComputingType.LOAD_FLOW>;
8
9
  setHaveDirtyFields: Dispatch<SetStateAction<boolean>>;
9
10
  enableDeveloperMode: boolean;
@@ -45,6 +45,7 @@ import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialo
45
45
  import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
46
46
  function LoadFlowParametersInline({
47
47
  studyUuid,
48
+ language,
48
49
  parametersBackend,
49
50
  setHaveDirtyFields,
50
51
  enableDeveloperMode
@@ -109,6 +110,7 @@ function LoadFlowParametersInline({
109
110
  LoadFlowParametersForm,
110
111
  {
111
112
  loadflowMethods,
113
+ language,
112
114
  renderActions: () => {
113
115
  return /* @__PURE__ */ jsxs(Box, { children: [
114
116
  /* @__PURE__ */ jsx(LineSeparator, {}),
@@ -38,22 +38,22 @@ const networkModificationsEn = {
38
38
  "network_modifications.modifications": "Updating modification list ...",
39
39
  "network_modifications.GENERATION_DISPATCH": "Generation dispatch {computedLabel}",
40
40
  "network_modifications.VOLTAGE_INIT_MODIFICATION": "Voltage profile initialization {computedLabel}",
41
- "network_modifications.TABULAR_MODIFICATION": "Tabular modification - {computedLabel}",
42
- "network_modifications.tabular.GENERATOR_MODIFICATION": "Tabular modification (generators)",
43
- "network_modifications.tabular.LOAD_MODIFICATION": "Tabular modification (loads)",
41
+ "network_modifications.TABULAR_MODIFICATION": "Tabular modification ({computedLabel})",
42
+ "network_modifications.tabular.GENERATOR_MODIFICATION": "generators",
43
+ "network_modifications.tabular.LOAD_MODIFICATION": "loads",
44
44
  "network_modifications.BY_FORMULA_MODIFICATION": "Modification by formula {computedLabel}",
45
45
  "network_modifications.MODIFICATION_BY_ASSIGNMENT": "Modification by filter {computedLabel}",
46
- "network_modifications.tabular.LINE_MODIFICATION": "Tabular modification (lines)",
47
- "network_modifications.tabular.BATTERY_MODIFICATION": "Tabular modification (batteries)",
48
- "network_modifications.tabular.VOLTAGE_LEVEL_MODIFICATION": "Tabular modification (voltage levels)",
49
- "network_modifications.tabular.TWO_WINDINGS_TRANSFORMER_MODIFICATION": "Tabular modification (two windings transformers)",
50
- "network_modifications.tabular.SHUNT_COMPENSATOR_MODIFICATION": "Tabular modification (linear shunt compensators)",
51
- "network_modifications.tabular.SUBSTATION_MODIFICATION": "Tabular modification (substations)",
52
- "network_modifications.TABULAR_CREATION": "Tabular creation - {computedLabel}",
53
- "network_modifications.tabular.GENERATOR_CREATION": "Tabular creation (generators)",
54
- "network_modifications.tabular.BATTERY_CREATION": "Tabular creation (batteries)",
55
- "network_modifications.tabular.LOAD_CREATION": "Tabular creation (loads)",
56
- "network_modifications.tabular.SHUNT_COMPENSATOR_CREATION": "Tabular creation (linear shunt compensators)",
46
+ "network_modifications.tabular.LINE_MODIFICATION": "lines",
47
+ "network_modifications.tabular.BATTERY_MODIFICATION": "batteries",
48
+ "network_modifications.tabular.VOLTAGE_LEVEL_MODIFICATION": "voltage levels",
49
+ "network_modifications.tabular.TWO_WINDINGS_TRANSFORMER_MODIFICATION": "two windings transformers",
50
+ "network_modifications.tabular.SHUNT_COMPENSATOR_MODIFICATION": "linear shunt compensators",
51
+ "network_modifications.tabular.SUBSTATION_MODIFICATION": "substations",
52
+ "network_modifications.TABULAR_CREATION": "Tabular creation ({computedLabel})",
53
+ "network_modifications.tabular.GENERATOR_CREATION": "generators",
54
+ "network_modifications.tabular.BATTERY_CREATION": "batteries",
55
+ "network_modifications.tabular.LOAD_CREATION": "loads",
56
+ "network_modifications.tabular.SHUNT_COMPENSATOR_CREATION": "linear shunt compensators",
57
57
  "network_modifications.LCC_CREATION": "Creating HVDC (LCC) {computedLabel}",
58
58
  "network_modifications.LCC_MODIFICATION": "Modifying HVDC (LCC) {computedLabel}",
59
59
  "network_modifications.STATIC_VAR_COMPENSATOR_CREATION": "Creating static var compensator {computedLabel}",
@@ -38,22 +38,22 @@ const networkModificationsFr = {
38
38
  "network_modifications.modifications": "Mise à jour de la liste des modifications en cours ...",
39
39
  "network_modifications.GENERATION_DISPATCH": "Démarrage de groupes {computedLabel}",
40
40
  "network_modifications.VOLTAGE_INIT_MODIFICATION": "Initialisation du plan de tension {computedLabel}",
41
- "network_modifications.TABULAR_MODIFICATION": "Modification tabulaire - {computedLabel}",
42
- "network_modifications.tabular.GENERATOR_MODIFICATION": "Modification tabulaire (générateurs)",
43
- "network_modifications.tabular.LOAD_MODIFICATION": "Modification tabulaire (consommations)",
41
+ "network_modifications.TABULAR_MODIFICATION": "Modification tabulaire ({computedLabel})",
42
+ "network_modifications.tabular.GENERATOR_MODIFICATION": "générateurs",
43
+ "network_modifications.tabular.LOAD_MODIFICATION": "consommations",
44
44
  "network_modifications.BY_FORMULA_MODIFICATION": "Modification par formule {computedLabel}",
45
45
  "network_modifications.MODIFICATION_BY_ASSIGNMENT": "Modification par filtre {computedLabel}",
46
- "network_modifications.tabular.LINE_MODIFICATION": "Modification tabulaire (lignes)",
47
- "network_modifications.tabular.BATTERY_MODIFICATION": "Modification tabulaire (batteries)",
48
- "network_modifications.tabular.VOLTAGE_LEVEL_MODIFICATION": "Modification tabulaire (postes)",
49
- "network_modifications.tabular.TWO_WINDINGS_TRANSFORMER_MODIFICATION": "Modification tabulaire (transformateurs à 2 enroulements)",
50
- "network_modifications.tabular.SHUNT_COMPENSATOR_MODIFICATION": "Modification tabulaire (MCS linéaires)",
51
- "network_modifications.tabular.SUBSTATION_MODIFICATION": "Modification tabulaire (sites)",
52
- "network_modifications.TABULAR_CREATION": "Création tabulaire - {computedLabel}",
53
- "network_modifications.tabular.GENERATOR_CREATION": "Création tabulaire (générateurs)",
54
- "network_modifications.tabular.BATTERY_CREATION": "Création tabulaire (batteries)",
55
- "network_modifications.tabular.LOAD_CREATION": "Création tabulaire (consommations)",
56
- "network_modifications.tabular.SHUNT_COMPENSATOR_CREATION": "Création tabulaire (MCS linéaires)",
46
+ "network_modifications.tabular.LINE_MODIFICATION": "lignes",
47
+ "network_modifications.tabular.BATTERY_MODIFICATION": "batteries",
48
+ "network_modifications.tabular.VOLTAGE_LEVEL_MODIFICATION": "postes",
49
+ "network_modifications.tabular.TWO_WINDINGS_TRANSFORMER_MODIFICATION": "transformateurs à 2 enroulements",
50
+ "network_modifications.tabular.SHUNT_COMPENSATOR_MODIFICATION": "MCS linéaires",
51
+ "network_modifications.tabular.SUBSTATION_MODIFICATION": "sites",
52
+ "network_modifications.TABULAR_CREATION": "Création tabulaire ({computedLabel})",
53
+ "network_modifications.tabular.GENERATOR_CREATION": "générateurs",
54
+ "network_modifications.tabular.BATTERY_CREATION": "batteries",
55
+ "network_modifications.tabular.LOAD_CREATION": "consommations",
56
+ "network_modifications.tabular.SHUNT_COMPENSATOR_CREATION": "MCS linéaires",
57
57
  "network_modifications.LCC_CREATION": "Création de la HVDC (LCC) {computedLabel}",
58
58
  "network_modifications.LCC_MODIFICATION": "Modification de la HVDC (LCC) {computedLabel}",
59
59
  "network_modifications.STATIC_VAR_COMPENSATOR_CREATION": "Création de CSPR {computedLabel}",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsuite/commons-ui",
3
- "version": "0.109.0",
3
+ "version": "0.109.1",
4
4
  "description": "common react components for gridsuite applications",
5
5
  "author": "gridsuite team",
6
6
  "homepage": "https://github.com/gridsuite",