@gridsuite/commons-ui 0.270.0 → 0.272.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.
Files changed (186) hide show
  1. package/dist/components/composite/customAGGrid/custom-aggrid-types.d.ts +7 -0
  2. package/dist/components/composite/dnd-table/deletable-table-row.d.ts +2 -1
  3. package/dist/components/composite/dnd-table/deletable-table-row.js +3 -1
  4. package/dist/components/composite/dnd-table/dnd-table-row.d.ts +2 -1
  5. package/dist/components/composite/dnd-table/dnd-table-row.js +29 -4
  6. package/dist/components/composite/dnd-table/dnd-table.d.ts +1 -0
  7. package/dist/components/composite/dnd-table/dnd-table.js +13 -3
  8. package/dist/components/composite/dnd-table/dnd-table.type.d.ts +1 -0
  9. package/dist/components/composite/report/report-viewer/context/report-viewer-context.d.ts +4 -4
  10. package/dist/components/composite/report/report-viewer/log-table/log-table.js +8 -7
  11. package/dist/components/composite/report/report.type.d.ts +0 -4
  12. package/dist/components/ui/addButton/AddButton.js +9 -1
  13. package/dist/components/ui/dialogs/customMuiDialog/CustomMuiDialog.d.ts +10 -3
  14. package/dist/components/ui/dialogs/customMuiDialog/CustomMuiDialog.js +33 -28
  15. package/dist/components/ui/reactHookForm/DirectoryItemsInput.d.ts +2 -1
  16. package/dist/components/ui/reactHookForm/DirectoryItemsInput.js +3 -1
  17. package/dist/components/ui/reactHookForm/autocompleteInputs/AutocompleteInput.d.ts +2 -1
  18. package/dist/components/ui/reactHookForm/autocompleteInputs/AutocompleteInput.js +2 -0
  19. package/dist/components/ui/reactHookForm/booleans/BooleanInput.d.ts +2 -1
  20. package/dist/components/ui/reactHookForm/booleans/BooleanInput.js +3 -1
  21. package/dist/components/ui/reactHookForm/booleans/SwitchInput.d.ts +2 -1
  22. package/dist/components/ui/reactHookForm/booleans/SwitchInput.js +12 -2
  23. package/dist/components/ui/reactHookForm/chip-items-input.d.ts +2 -1
  24. package/dist/components/ui/reactHookForm/chip-items-input.js +2 -1
  25. package/dist/components/ui/reactHookForm/expandableInput/DeletableRow.d.ts +2 -1
  26. package/dist/components/ui/reactHookForm/expandableInput/DeletableRow.js +3 -1
  27. package/dist/components/ui/reactHookForm/expandableInput/ExpandableInput.d.ts +2 -0
  28. package/dist/components/ui/reactHookForm/expandableInput/ExpandableInput.js +13 -2
  29. package/dist/components/ui/reactHookForm/tableInputs/table-text-input.d.ts +2 -1
  30. package/dist/components/ui/reactHookForm/tableInputs/table-text-input.js +2 -1
  31. package/dist/features/common/index.d.ts +1 -0
  32. package/dist/features/common/types.d.ts +32 -0
  33. package/dist/features/index.d.ts +2 -0
  34. package/dist/features/index.js +110 -4
  35. package/dist/features/network-modifications/common/branch/branchCreation.types.d.ts +26 -0
  36. package/dist/features/network-modifications/common/branch/branchCreation.types.js +1 -0
  37. package/dist/features/network-modifications/common/branch/branchModification.types.d.ts +36 -0
  38. package/dist/features/network-modifications/common/branch/branchModification.types.js +1 -0
  39. package/dist/features/network-modifications/{line/characteristics/lineCharacteristicsPane.types.d.ts → common/branch/index.d.ts} +2 -8
  40. package/dist/features/network-modifications/common/branch/index.js +1 -0
  41. package/dist/features/network-modifications/common/connectivity/VoltageLevelConnectivityForm.js +4 -2
  42. package/dist/features/network-modifications/common/connectivity/connectivityForm.utils.d.ts +2 -0
  43. package/dist/features/network-modifications/common/currentLimits/limits.types.d.ts +1 -0
  44. package/dist/features/network-modifications/common/currentLimits/limitsPane.utils.d.ts +2 -2
  45. package/dist/features/network-modifications/common/index.d.ts +1 -0
  46. package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/reactiveCapability.utils.js +1 -1
  47. package/dist/features/network-modifications/common/regulatingTerminal/regulatingTerminal.utils.d.ts +2 -2
  48. package/dist/features/network-modifications/common/regulatingTerminal/regulatingTerminal.utils.js +2 -2
  49. package/dist/features/network-modifications/index.d.ts +1 -0
  50. package/dist/features/network-modifications/index.js +87 -2
  51. package/dist/features/network-modifications/line/characteristics/index.d.ts +0 -1
  52. package/dist/features/network-modifications/line/characteristics/index.js +1 -2
  53. package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.d.ts +4 -19
  54. package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.js +0 -14
  55. package/dist/features/network-modifications/line/creation/lineCreation.types.d.ts +6 -26
  56. package/dist/features/network-modifications/line/index.js +1 -2
  57. package/dist/features/network-modifications/line/modification/lineModification.types.d.ts +3 -35
  58. package/dist/features/network-modifications/twoWindingsTransformer/characteristics/TwoWindingsTransformerCharacteristicsPane.d.ts +7 -0
  59. package/dist/features/network-modifications/twoWindingsTransformer/characteristics/TwoWindingsTransformerCharacteristicsPane.js +168 -0
  60. package/dist/features/network-modifications/twoWindingsTransformer/characteristics/index.d.ts +8 -0
  61. package/dist/features/network-modifications/twoWindingsTransformer/characteristics/index.js +8 -0
  62. package/dist/features/network-modifications/twoWindingsTransformer/characteristics/twoWindingsTransformerCharacteristicsPane.utils.d.ts +41 -0
  63. package/dist/features/network-modifications/twoWindingsTransformer/characteristics/twoWindingsTransformerCharacteristicsPane.utils.js +51 -0
  64. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogHeader.d.ts +6 -0
  65. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogHeader.js +123 -0
  66. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabs.d.ts +9 -0
  67. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabs.js +89 -0
  68. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabsContent.d.ts +14 -0
  69. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabsContent.js +118 -0
  70. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerForm.d.ts +6 -0
  71. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerForm.js +47 -0
  72. package/dist/features/network-modifications/twoWindingsTransformer/common/index.d.ts +12 -0
  73. package/dist/features/network-modifications/twoWindingsTransformer/common/index.js +13 -0
  74. package/dist/features/network-modifications/twoWindingsTransformer/common/twoWindingsTransformer.types.d.ts +87 -0
  75. package/dist/features/network-modifications/twoWindingsTransformer/common/twoWindingsTransformer.types.js +1 -0
  76. package/dist/features/network-modifications/twoWindingsTransformer/common/twoWindingsTransformer.utils.d.ts +10 -0
  77. package/dist/features/network-modifications/twoWindingsTransformer/common/twoWindingsTransformer.utils.js +50 -0
  78. package/dist/features/network-modifications/twoWindingsTransformer/creation/index.d.ts +8 -0
  79. package/dist/features/network-modifications/twoWindingsTransformer/creation/index.js +12 -0
  80. package/dist/features/network-modifications/twoWindingsTransformer/creation/twoWindingsTransformerCreation.types.d.ts +47 -0
  81. package/dist/features/network-modifications/twoWindingsTransformer/creation/twoWindingsTransformerCreation.types.js +8 -0
  82. package/dist/features/network-modifications/twoWindingsTransformer/creation/twoWindingsTransformerCreation.utils.d.ts +248 -0
  83. package/dist/features/network-modifications/twoWindingsTransformer/creation/twoWindingsTransformerCreation.utils.js +325 -0
  84. package/dist/features/network-modifications/twoWindingsTransformer/index.d.ts +11 -0
  85. package/dist/features/network-modifications/twoWindingsTransformer/index.js +88 -0
  86. package/dist/features/network-modifications/twoWindingsTransformer/modification/index.d.ts +9 -0
  87. package/dist/features/network-modifications/twoWindingsTransformer/modification/index.js +10 -0
  88. package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/ToBeEstimatedForm.d.ts +6 -0
  89. package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/ToBeEstimatedForm.js +104 -0
  90. package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/index.d.ts +9 -0
  91. package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/index.js +7 -0
  92. package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/toBeEstimated.type.d.ts +10 -0
  93. package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/toBeEstimated.type.js +1 -0
  94. package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/toBeEstimated.utils.d.ts +12 -0
  95. package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/toBeEstimated.utils.js +18 -0
  96. package/dist/features/network-modifications/twoWindingsTransformer/modification/twoWindingsTransformerModification.types.d.ts +39 -0
  97. package/dist/features/network-modifications/twoWindingsTransformer/modification/twoWindingsTransformerModification.types.js +1 -0
  98. package/dist/features/network-modifications/twoWindingsTransformer/modification/twoWindingsTransformerModification.utils.d.ts +265 -0
  99. package/dist/features/network-modifications/twoWindingsTransformer/modification/twoWindingsTransformerModification.utils.js +100 -0
  100. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/RegulatedTerminalSection.d.ts +13 -0
  101. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/RegulatedTerminalSection.js +130 -0
  102. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/TapChangerSteps.d.ts +20 -0
  103. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/TapChangerSteps.js +311 -0
  104. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/index.d.ts +12 -0
  105. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/index.js +53 -0
  106. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/PhaseTapChangerPane.d.ts +2 -0
  107. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/PhaseTapChangerPane.js +198 -0
  108. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/PhaseTapChangerPaneSteps.d.ts +9 -0
  109. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/PhaseTapChangerPaneSteps.js +201 -0
  110. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/index.d.ts +9 -0
  111. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/index.js +15 -0
  112. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/phaseTapChanger.utils.d.ts +114 -0
  113. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/phaseTapChanger.utils.js +242 -0
  114. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/RatioTapChangerPane.d.ts +2 -0
  115. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/RatioTapChangerPane.js +283 -0
  116. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/RatioTapChangerPaneSteps.d.ts +9 -0
  117. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/RatioTapChangerPaneSteps.js +181 -0
  118. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/index.d.ts +9 -0
  119. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/index.js +18 -0
  120. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/ratioTapChanger.utils.d.ts +132 -0
  121. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/ratioTapChanger.utils.js +211 -0
  122. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleDialog.d.ts +2 -0
  123. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleDialog.js +102 -0
  124. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleDialogSubmitButton.d.ts +7 -0
  125. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleDialogSubmitButton.js +22 -0
  126. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleForm.d.ts +6 -0
  127. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleForm.js +86 -0
  128. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/ImportRuleDialog.d.ts +10 -0
  129. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/ImportRuleDialog.js +140 -0
  130. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/index.d.ts +12 -0
  131. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/index.js +13 -0
  132. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/regulationRule.types.d.ts +12 -0
  133. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/regulationRule.types.js +1 -0
  134. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/regulationRule.utils.d.ts +9 -0
  135. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/regulationRule.utils.js +19 -0
  136. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/tapChanger.utils.d.ts +14 -0
  137. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/tapChanger.utils.js +79 -0
  138. package/dist/features/results/common/index.d.ts +7 -0
  139. package/dist/features/results/common/index.js +5 -0
  140. package/dist/features/results/common/utils.d.ts +5 -0
  141. package/dist/features/results/common/utils.js +18 -0
  142. package/dist/features/results/securityanalysis/index.js +1 -2
  143. package/dist/features/results/securityanalysis/security-analysis-result-nmk.js +3 -2
  144. package/dist/features/results/securityanalysis/utils.d.ts +0 -1
  145. package/dist/features/results/securityanalysis/utils.js +0 -2
  146. package/dist/features/results/shortcircuit/index.d.ts +11 -0
  147. package/dist/features/results/shortcircuit/index.js +21 -0
  148. package/dist/features/results/shortcircuit/shortcircuit-analysis-all-buses-result.d.ts +4 -0
  149. package/dist/features/results/shortcircuit/shortcircuit-analysis-all-buses-result.js +25 -0
  150. package/dist/features/results/shortcircuit/shortcircuit-analysis-result-content.d.ts +13 -0
  151. package/dist/features/results/shortcircuit/shortcircuit-analysis-result-content.js +62 -0
  152. package/dist/features/results/shortcircuit/shortcircuit-analysis-result-table.d.ts +41 -0
  153. package/dist/features/results/shortcircuit/shortcircuit-analysis-result-table.js +451 -0
  154. package/dist/features/results/shortcircuit/shortcircuit-analysis-result.d.ts +53 -0
  155. package/dist/features/results/shortcircuit/shortcircuit-analysis-result.js +252 -0
  156. package/dist/features/results/shortcircuit/shortcircuit-analysis-result.type.d.ts +41 -0
  157. package/dist/features/results/shortcircuit/shortcircuit-analysis-result.type.js +8 -0
  158. package/dist/index.js +121 -8
  159. package/dist/translations/en/filterExpertEn.d.ts +0 -3
  160. package/dist/translations/en/filterExpertEn.js +0 -3
  161. package/dist/translations/en/network-modification-validationEn.d.ts +1 -0
  162. package/dist/translations/en/network-modification-validationEn.js +2 -1
  163. package/dist/translations/en/networkModificationsEn.d.ts +70 -9
  164. package/dist/translations/en/networkModificationsEn.js +71 -10
  165. package/dist/translations/fr/filterExpertFr.d.ts +0 -3
  166. package/dist/translations/fr/filterExpertFr.js +0 -3
  167. package/dist/translations/fr/network-modification-validationFr.d.ts +1 -0
  168. package/dist/translations/fr/network-modification-validationFr.js +2 -1
  169. package/dist/translations/fr/networkModificationsFr.d.ts +70 -9
  170. package/dist/translations/fr/networkModificationsFr.js +71 -10
  171. package/dist/utils/constants/fieldConstants.d.ts +37 -0
  172. package/dist/utils/constants/fieldConstants.js +37 -0
  173. package/dist/utils/constants/index.js +2 -1
  174. package/dist/utils/constants/translationKeys.d.ts +1 -0
  175. package/dist/utils/constants/translationKeys.js +2 -0
  176. package/dist/utils/functions.d.ts +9 -0
  177. package/dist/utils/functions.js +40 -0
  178. package/dist/utils/index.js +11 -4
  179. package/dist/utils/langs.d.ts +1 -0
  180. package/dist/utils/langs.js +9 -1
  181. package/dist/utils/types/equipmentType.d.ts +34 -0
  182. package/dist/utils/types/equipmentType.js +28 -0
  183. package/dist/utils/types/index.d.ts +1 -1
  184. package/dist/utils/types/index.js +4 -1
  185. package/package.json +1 -1
  186. /package/dist/features/{network-modifications/line/characteristics/lineCharacteristicsPane.types.js → common/types.js} +0 -0
@@ -6,13 +6,13 @@ import { MAX_CHAR_DESCRIPTION } from "./constants/uiConstants.js";
6
6
  import { AMPERE, DEGREE, KILO_AMPERE, KILO_METER, KILO_VOLT, MEGA_VAR, MEGA_VOLT_AMPERE, MEGA_WATT, MICRO_SIEMENS, OHM, PERCENTAGE, SIEMENS } from "./constants/unitsConstants.js";
7
7
  import { COMMON_APP_NAME, COMMON_CONFIG_PARAMS_NAMES, LAST_SELECTED_DIRECTORY, PARAM_DEVELOPER_MODE, PARAM_LANGUAGE, PARAM_THEME } from "./constants/configConstants.js";
8
8
  import { FILTERS, FILTER_ID, FILTER_NAME, ID } from "./constants/filterConstant.js";
9
- import { ACTIVE_LIMITS_MIN_MAX_INVALID, CREATE_SUBSTATION_IN_VOLTAGE_LEVEL_IDENTICAL_ID, DESCRIPTION_LIMIT_ERROR, DUPLICATED_PROPS_ERROR, MAXIMUM_SECTION_COUNT_MUST_BE_GREATER_OR_EQUAL_TO_ONE, MIN_ACTIVE_POWER_MUST_BE_LESS_OR_EQUAL_TO_MAX_ACTIVE_POWER, MUST_BE_GREATER_OR_EQUAL_TO_ZERO, NAME_ALREADY_USED, NAME_EMPTY, NORMALIZED_PERCENTAGE, NUMERIC_VALUE_OR_EMPTY_FIELD, REACTIVE_LIMITS_MIN_MAX_INVALID, REAL_PERCENTAGE, SECTION_COUNT_MUST_BE_BETWEEN_ZERO_AND_MAXIMUM_SECTION_COUNT, SHORT_CIRCUIT_CURRENT_LIMIT_MUST_BE_GREATER_OR_EQUAL_TO_ZERO, SHUNT_COMPENSATOR_ERROR_Q_AT_NOMINAL_VOLTAGE_LESS_THAN_ZERO, VALUE_MUST_BE_NUMERIC_WHEN_PERCENTAGE_ERROR, VALUE_MUST_BE_REF_WHEN_PERCENTAGE_ERROR, WRONG_REF_OR_VALUE_ERROR, YUP_DEFAULT, YUP_NOT_NULL, YUP_NOT_TYPE_DEFAULT, YUP_NOT_TYPE_NUMBER, YUP_POSITIVE, YUP_REQUIRED } from "./constants/translationKeys.js";
9
+ import { ACTIVE_LIMITS_MIN_MAX_INVALID, CREATE_SUBSTATION_IN_VOLTAGE_LEVEL_IDENTICAL_ID, DESCRIPTION_LIMIT_ERROR, DUPLICATED_PROPS_ERROR, MAXIMUM_SECTION_COUNT_MUST_BE_GREATER_OR_EQUAL_TO_ONE, MIN_ACTIVE_POWER_MUST_BE_LESS_OR_EQUAL_TO_MAX_ACTIVE_POWER, MUST_BE_GREATER_OR_EQUAL_TO_ZERO, NAME_ALREADY_USED, NAME_EMPTY, NORMALIZED_PERCENTAGE, NUMERIC_VALUE_OR_EMPTY_FIELD, REACTIVE_LIMITS_MIN_MAX_INVALID, REAL_PERCENTAGE, SECTION_COUNT_MUST_BE_BETWEEN_ZERO_AND_MAXIMUM_SECTION_COUNT, SHORT_CIRCUIT_CURRENT_LIMIT_MUST_BE_GREATER_OR_EQUAL_TO_ZERO, SHUNT_COMPENSATOR_ERROR_Q_AT_NOMINAL_VOLTAGE_LESS_THAN_ZERO, TARGET_DEADBAND_MUST_BE_GREATER_OR_EQUAL_TO_ZERO, VALUE_MUST_BE_NUMERIC_WHEN_PERCENTAGE_ERROR, VALUE_MUST_BE_REF_WHEN_PERCENTAGE_ERROR, WRONG_REF_OR_VALUE_ERROR, YUP_DEFAULT, YUP_NOT_NULL, YUP_NOT_TYPE_DEFAULT, YUP_NOT_TYPE_NUMBER, YUP_POSITIVE, YUP_REQUIRED } from "./constants/translationKeys.js";
10
10
  import { GRIDSUITE_DEFAULT_PRECISION, convertInputValue, convertOutputValue, isBlankOrEmpty, kiloUnitToUnit, microUnitToUnit, roundToDefaultPrecision, roundToPrecision, toModificationOperation, unitToKiloUnit, unitToMicroUnit } from "./conversionUtils.js";
11
11
  import { catchErrorHandler, extractErrorMessageDescriptor, snackWithFallback } from "./error.js";
12
12
  import { isDisabledValidationButton } from "./form-utils.js";
13
- import { areArrayElementsUnique, arraysContainIdenticalStrings, getRows, hasNonEmptyRows, isEmpty, isObjectEmpty, keyGenerator } from "./functions.js";
13
+ import { addSelectedFieldToRows, areArrayElementsUnique, areNumbersOrdered, arraysContainIdenticalStrings, getRows, hasNonEmptyRows, isEmpty, isObjectEmpty, keyGenerator } from "./functions.js";
14
14
  import { getEquipmentTypeShortLabel } from "./labelUtils.js";
15
- import { LANG_ENGLISH, LANG_FRENCH, LANG_SYSTEM, getCsvDelimiter } from "./langs.js";
15
+ import { LANG_ENGLISH, LANG_FRENCH, LANG_SYSTEM, getCsvDelimiter, transformIfFrenchNumber } from "./langs.js";
16
16
  import { getFileIcon } from "./mapper/getFileIcon.js";
17
17
  import { equipmentTypesForPredefinedPropertiesMapper } from "./mapper/equipmentTypesForPredefinedPropertiesMapper.js";
18
18
  import { copyToClipboard } from "./navigator-clipboard.js";
@@ -22,7 +22,7 @@ import { CustomError } from "./types/CustomError.js";
22
22
  import { ProblemDetailError } from "./types/ProblemDetailError.js";
23
23
  import { NetworkTimeoutError } from "./types/NetworkTimeoutError.js";
24
24
  import { ElementType } from "./types/elementType.js";
25
- import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, CONNECTION_DIRECTIONS, ENERGY_SOURCES, EQUIPMENTS_WITH_ONE_NOMINAL_VOLTAGE, EQUIPMENTS_WITH_ONE_SUBSTATION, EQUIPMENTS_WITH_THREE_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_SUBSTATIONS, EquipmentType, ExtendedEquipmentType, HvdcType, LOAD_TYPES, OperatingStatus, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, UNDEFINED_CONNECTION_DIRECTION, UNDEFINED_LOAD_TYPE, VL_TAG_MAX_SIZE, equipmentStyles, getConnectionDirectionLabel, getEnergySourceLabel, getEquipmentsInfosForSearchBar, getLoadTypeLabel } from "./types/equipmentType.js";
25
+ import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, CONNECTION_DIRECTIONS, ENERGY_SOURCES, EQUIPMENTS_WITH_ONE_NOMINAL_VOLTAGE, EQUIPMENTS_WITH_ONE_SUBSTATION, EQUIPMENTS_WITH_THREE_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_SUBSTATIONS, EquipmentType, ExtendedEquipmentType, HvdcType, LOAD_TYPES, OperatingStatus, PHASE_REGULATION_MODES, RATIO_REGULATION_MODES, REGULATION_SIDES, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, UNDEFINED_CONNECTION_DIRECTION, UNDEFINED_LOAD_TYPE, VL_TAG_MAX_SIZE, equipmentStyles, getConnectionDirectionLabel, getEnergySourceLabel, getEquipmentsInfosForSearchBar, getLoadTypeLabel } from "./types/equipmentType.js";
26
26
  import { Battery, BoundaryLine, BusBar, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel, isInjection } from "./types/equipmentTypes.js";
27
27
  import { AnnouncementSeverity, ArrayAction, ElementStatus, ReferenceType } from "./types/types.js";
28
28
  import { MODIFICATION_TYPES, ModificationType } from "./types/modificationType.js";
@@ -126,6 +126,7 @@ export {
126
126
  PARAM_LANGUAGE,
127
127
  PARAM_THEME,
128
128
  PERCENTAGE,
129
+ PHASE_REGULATION_MODES,
129
130
  PREFIX_CONFIG_NOTIFICATION_WS,
130
131
  PREFIX_DIRECTORY_NOTIFICATION_WS,
131
132
  PREFIX_MONITOR_NOTIFICATION_WS,
@@ -133,8 +134,10 @@ export {
133
134
  ParameterType,
134
135
  PercentageAdornment,
135
136
  ProblemDetailError,
137
+ RATIO_REGULATION_MODES,
136
138
  REACTIVE_LIMITS_MIN_MAX_INVALID,
137
139
  REAL_PERCENTAGE,
140
+ REGULATION_SIDES,
138
141
  ReactivePowerAdornment,
139
142
  ReferenceType,
140
143
  RunningStatus,
@@ -149,6 +152,7 @@ export {
149
152
  SolverType,
150
153
  Substation,
151
154
  SusceptanceAdornment,
155
+ TARGET_DEADBAND_MUST_BE_GREATER_OR_EQUAL_TO_ZERO,
152
156
  TYPE_TAG_MAX_SIZE,
153
157
  ThreeWindingTransfo,
154
158
  TwoWindingTransfo,
@@ -167,8 +171,10 @@ export {
167
171
  YUP_NOT_TYPE_NUMBER,
168
172
  YUP_POSITIVE,
169
173
  YUP_REQUIRED,
174
+ addSelectedFieldToRows,
170
175
  areArrayElementsUnique,
171
176
  areIdsEqual,
177
+ areNumbersOrdered,
172
178
  arraysContainIdenticalStrings,
173
179
  catchErrorHandler,
174
180
  convertInputValue,
@@ -219,6 +225,7 @@ export {
219
225
  toModificationOperation,
220
226
  toNestedGlobalSelectors,
221
227
  toNumber,
228
+ transformIfFrenchNumber,
222
229
  unitToKiloUnit,
223
230
  unitToMicroUnit,
224
231
  validateValueIsANumber
@@ -4,3 +4,4 @@ export declare const LANG_FRENCH = "fr";
4
4
  export type GsLangUser = typeof LANG_ENGLISH | typeof LANG_FRENCH;
5
5
  export type GsLang = GsLangUser | typeof LANG_SYSTEM;
6
6
  export declare function getCsvDelimiter(language: string | undefined): ';' | ',';
7
+ export declare const transformIfFrenchNumber: (value: string, language: GsLang) => string;
@@ -4,9 +4,17 @@ const LANG_FRENCH = "fr";
4
4
  function getCsvDelimiter(language) {
5
5
  return language === LANG_FRENCH ? ";" : ",";
6
6
  }
7
+ const transformIfFrenchNumber = (value, language) => {
8
+ const trimmedValue = value.trim();
9
+ if (language === LANG_FRENCH && trimmedValue.includes(",") && !Number.isNaN(Number(trimmedValue.replace(",", ".")))) {
10
+ return trimmedValue.replace(",", ".");
11
+ }
12
+ return trimmedValue;
13
+ };
7
14
  export {
8
15
  LANG_ENGLISH,
9
16
  LANG_FRENCH,
10
17
  LANG_SYSTEM,
11
- getCsvDelimiter
18
+ getCsvDelimiter,
19
+ transformIfFrenchNumber
12
20
  };
@@ -98,6 +98,40 @@ export declare const LOAD_TYPES: {
98
98
  }[];
99
99
  export declare const UNDEFINED_LOAD_TYPE = "UNDEFINED";
100
100
  export declare function getLoadTypeLabel(loadTypeId: string): string | undefined;
101
+ export declare const REGULATION_SIDES: {
102
+ readonly SIDE1: {
103
+ readonly id: "SIDE1";
104
+ readonly label: "RegulatedSide1";
105
+ };
106
+ readonly SIDE2: {
107
+ readonly id: "SIDE2";
108
+ readonly label: "RegulatedSide2";
109
+ };
110
+ };
111
+ export declare const PHASE_REGULATION_MODES: {
112
+ readonly CURRENT_LIMITER: {
113
+ readonly id: "CURRENT_LIMITER";
114
+ readonly label: "CurrentLimiter";
115
+ };
116
+ readonly ACTIVE_POWER_CONTROL: {
117
+ readonly id: "ACTIVE_POWER_CONTROL";
118
+ readonly label: "PhaseActivePowerControl";
119
+ };
120
+ readonly OFF: {
121
+ readonly id: "OFF";
122
+ readonly label: "Off";
123
+ };
124
+ };
125
+ export declare const RATIO_REGULATION_MODES: {
126
+ readonly FIXED_RATIO: {
127
+ readonly id: "FIXED_RATIO";
128
+ readonly label: "FixedRatio";
129
+ };
130
+ readonly VOLTAGE_REGULATION: {
131
+ readonly id: "VOLTAGE_REGULATION";
132
+ readonly label: "VoltageRegulation";
133
+ };
134
+ };
101
135
  export declare const UNDEFINED_CONNECTION_DIRECTION = "UNDEFINED";
102
136
  export declare const CONNECTION_DIRECTIONS: readonly [{
103
137
  readonly id: "TOP";
@@ -129,6 +129,31 @@ const UNDEFINED_LOAD_TYPE = "UNDEFINED";
129
129
  function getLoadTypeLabel(loadTypeId) {
130
130
  return LOAD_TYPES.find(({ id }) => id === loadTypeId)?.label;
131
131
  }
132
+ const REGULATION_SIDES = {
133
+ SIDE1: { id: "SIDE1", label: "RegulatedSide1" },
134
+ SIDE2: { id: "SIDE2", label: "RegulatedSide2" }
135
+ };
136
+ const PHASE_REGULATION_MODES = {
137
+ CURRENT_LIMITER: { id: "CURRENT_LIMITER", label: "CurrentLimiter" },
138
+ ACTIVE_POWER_CONTROL: {
139
+ id: "ACTIVE_POWER_CONTROL",
140
+ label: "PhaseActivePowerControl"
141
+ },
142
+ OFF: { id: "OFF", label: "Off" }
143
+ // used for the ui but doesn't exist in powsybl => should not be sent to the back
144
+ };
145
+ const RATIO_REGULATION_MODES = {
146
+ FIXED_RATIO: {
147
+ // isRegulating false
148
+ id: "FIXED_RATIO",
149
+ label: "FixedRatio"
150
+ },
151
+ VOLTAGE_REGULATION: {
152
+ // isRegulating true
153
+ id: "VOLTAGE_REGULATION",
154
+ label: "VoltageRegulation"
155
+ }
156
+ };
132
157
  const UNDEFINED_CONNECTION_DIRECTION = "UNDEFINED";
133
158
  const CONNECTION_DIRECTIONS = [
134
159
  { id: "TOP", label: "Top" },
@@ -472,6 +497,9 @@ export {
472
497
  HvdcType,
473
498
  LOAD_TYPES,
474
499
  OperatingStatus,
500
+ PHASE_REGULATION_MODES,
501
+ RATIO_REGULATION_MODES,
502
+ REGULATION_SIDES,
475
503
  SEARCH_EQUIPMENTS,
476
504
  TYPE_TAG_MAX_SIZE,
477
505
  UNDEFINED_CONNECTION_DIRECTION,
@@ -24,4 +24,4 @@ export * from './dynamic-margin-calculation.type';
24
24
  export * from './network-modification-types';
25
25
  export * from './pcc-min.type';
26
26
  export * from './network-modification-metadata';
27
- export { ComputingType } from './computing-type';
27
+ export * from './computing-type';
@@ -2,7 +2,7 @@ import { CustomError } from "./CustomError.js";
2
2
  import { ProblemDetailError } from "./ProblemDetailError.js";
3
3
  import { NetworkTimeoutError } from "./NetworkTimeoutError.js";
4
4
  import { ElementType } from "./elementType.js";
5
- import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, CONNECTION_DIRECTIONS, ENERGY_SOURCES, EQUIPMENTS_WITH_ONE_NOMINAL_VOLTAGE, EQUIPMENTS_WITH_ONE_SUBSTATION, EQUIPMENTS_WITH_THREE_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_SUBSTATIONS, EquipmentType, ExtendedEquipmentType, HvdcType, LOAD_TYPES, OperatingStatus, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, UNDEFINED_CONNECTION_DIRECTION, UNDEFINED_LOAD_TYPE, VL_TAG_MAX_SIZE, equipmentStyles, getConnectionDirectionLabel, getEnergySourceLabel, getEquipmentsInfosForSearchBar, getLoadTypeLabel } from "./equipmentType.js";
5
+ import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, CONNECTION_DIRECTIONS, ENERGY_SOURCES, EQUIPMENTS_WITH_ONE_NOMINAL_VOLTAGE, EQUIPMENTS_WITH_ONE_SUBSTATION, EQUIPMENTS_WITH_THREE_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_SUBSTATIONS, EquipmentType, ExtendedEquipmentType, HvdcType, LOAD_TYPES, OperatingStatus, PHASE_REGULATION_MODES, RATIO_REGULATION_MODES, REGULATION_SIDES, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, UNDEFINED_CONNECTION_DIRECTION, UNDEFINED_LOAD_TYPE, VL_TAG_MAX_SIZE, equipmentStyles, getConnectionDirectionLabel, getEnergySourceLabel, getEquipmentsInfosForSearchBar, getLoadTypeLabel } from "./equipmentType.js";
6
6
  import { Battery, BoundaryLine, BusBar, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel, isInjection } from "./equipmentTypes.js";
7
7
  import { AnnouncementSeverity, ArrayAction, ElementStatus, ReferenceType } from "./types.js";
8
8
  import { MODIFICATION_TYPES, ModificationType } from "./modificationType.js";
@@ -52,8 +52,11 @@ export {
52
52
  NetworkTimeoutError,
53
53
  OperatingStatus,
54
54
  OperationType,
55
+ PHASE_REGULATION_MODES,
55
56
  ParameterType,
56
57
  ProblemDetailError,
58
+ RATIO_REGULATION_MODES,
59
+ REGULATION_SIDES,
57
60
  ReferenceType,
58
61
  SEARCH_EQUIPMENTS,
59
62
  SVC,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsuite/commons-ui",
3
- "version": "0.270.0",
3
+ "version": "0.272.0",
4
4
  "description": "common react components for gridsuite applications",
5
5
  "author": "gridsuite team",
6
6
  "homepage": "https://github.com/gridsuite",