@gridsuite/commons-ui 0.97.0 → 0.99.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 (122) hide show
  1. package/dist/components/dialogs/customMuiDialog/CustomMuiDialog.js +1 -1
  2. package/dist/components/index.d.ts +1 -0
  3. package/dist/components/index.js +94 -1
  4. package/dist/components/inputs/index.js +2 -1
  5. package/dist/components/inputs/reactHookForm/DirectoryItemsInput.d.ts +3 -1
  6. package/dist/components/inputs/reactHookForm/DirectoryItemsInput.js +15 -3
  7. package/dist/components/inputs/reactHookForm/index.js +2 -1
  8. package/dist/components/inputs/reactHookForm/utils/HelperPreviousValue.js +1 -1
  9. package/dist/components/parameters/common/ProviderParam.d.ts +7 -0
  10. package/dist/components/parameters/common/ProviderParam.js +51 -0
  11. package/dist/components/parameters/common/computing-type.d.ts +20 -0
  12. package/dist/components/parameters/common/computing-type.js +46 -0
  13. package/dist/components/parameters/common/constant.d.ts +8 -0
  14. package/dist/components/parameters/common/constant.js +18 -0
  15. package/dist/components/parameters/common/index.d.ts +15 -0
  16. package/dist/components/parameters/common/index.js +61 -0
  17. package/dist/components/parameters/common/limitreductions/columns-definitions.d.ts +77 -0
  18. package/dist/components/parameters/common/limitreductions/columns-definitions.js +83 -0
  19. package/dist/components/parameters/common/limitreductions/index.d.ts +11 -0
  20. package/dist/components/parameters/common/limitreductions/index.js +21 -0
  21. package/dist/components/parameters/common/limitreductions/limit-reduction-table-cell.d.ts +5 -0
  22. package/dist/components/parameters/common/limitreductions/limit-reduction-table-cell.js +38 -0
  23. package/dist/components/parameters/common/limitreductions/limit-reduction-table-row.d.ts +7 -0
  24. package/dist/components/parameters/common/limitreductions/limit-reduction-table-row.js +9 -0
  25. package/dist/components/parameters/common/limitreductions/limit-reductions-form-util.d.ts +29 -0
  26. package/dist/components/parameters/common/limitreductions/limit-reductions-form-util.js +27 -0
  27. package/dist/components/parameters/common/limitreductions/limit-reductions-table-form.d.ts +4 -0
  28. package/dist/components/parameters/common/limitreductions/limit-reductions-table-form.js +87 -0
  29. package/dist/components/parameters/common/line-separator.d.ts +1 -0
  30. package/dist/components/parameters/common/line-separator.js +8 -0
  31. package/dist/components/parameters/common/parameters-creation-dialog.d.ts +13 -0
  32. package/dist/components/parameters/common/parameters-creation-dialog.js +88 -0
  33. package/dist/components/parameters/common/parameters.d.ts +20 -0
  34. package/dist/components/parameters/common/parameters.js +42 -0
  35. package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table-cell.d.ts +6 -0
  36. package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table-cell.js +42 -0
  37. package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table-row.d.ts +8 -0
  38. package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table-row.js +17 -0
  39. package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table.d.ts +8 -0
  40. package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table.js +55 -0
  41. package/dist/components/parameters/common/voltage-level-table/index.d.ts +9 -0
  42. package/dist/components/parameters/common/voltage-level-table/index.js +8 -0
  43. package/dist/components/parameters/common/widget/index.d.ts +11 -0
  44. package/dist/components/parameters/common/widget/index.js +13 -0
  45. package/dist/components/parameters/common/widget/parameter-float.d.ts +10 -0
  46. package/dist/components/parameters/common/widget/parameter-float.js +51 -0
  47. package/dist/components/parameters/common/widget/parameter-group.d.ts +11 -0
  48. package/dist/components/parameters/common/widget/parameter-group.js +54 -0
  49. package/dist/components/parameters/common/widget/parameter-line-directory-items-input.d.ts +15 -0
  50. package/dist/components/parameters/common/widget/parameter-line-directory-items-input.js +55 -0
  51. package/dist/components/parameters/common/widget/parameter-line-slider.d.ts +12 -0
  52. package/dist/components/parameters/common/widget/parameter-line-slider.js +70 -0
  53. package/dist/components/parameters/common/widget/parameter-switch.d.ts +7 -0
  54. package/dist/components/parameters/common/widget/parameter-switch.js +9 -0
  55. package/dist/components/parameters/index.d.ts +9 -0
  56. package/dist/components/parameters/index.js +94 -0
  57. package/dist/components/parameters/loadflow/constants.d.ts +33 -0
  58. package/dist/components/parameters/loadflow/constants.js +59 -0
  59. package/dist/components/parameters/loadflow/index.d.ts +9 -0
  60. package/dist/components/parameters/loadflow/index.js +31 -0
  61. package/dist/components/parameters/loadflow/load-flow-general-parameters.d.ts +8 -0
  62. package/dist/components/parameters/loadflow/load-flow-general-parameters.js +179 -0
  63. package/dist/components/parameters/loadflow/load-flow-parameter-field.d.ts +19 -0
  64. package/dist/components/parameters/loadflow/load-flow-parameter-field.js +90 -0
  65. package/dist/components/parameters/loadflow/load-flow-parameters-content.d.ts +13 -0
  66. package/dist/components/parameters/loadflow/load-flow-parameters-content.js +82 -0
  67. package/dist/components/parameters/loadflow/load-flow-parameters-context.d.ts +13 -0
  68. package/dist/components/parameters/loadflow/load-flow-parameters-context.js +5 -0
  69. package/dist/components/parameters/loadflow/load-flow-parameters-dialog.d.ts +15 -0
  70. package/dist/components/parameters/loadflow/load-flow-parameters-dialog.js +112 -0
  71. package/dist/components/parameters/loadflow/load-flow-parameters-form.d.ts +9 -0
  72. package/dist/components/parameters/loadflow/load-flow-parameters-form.js +102 -0
  73. package/dist/components/parameters/loadflow/load-flow-parameters-header.d.ts +12 -0
  74. package/dist/components/parameters/loadflow/load-flow-parameters-header.js +84 -0
  75. package/dist/components/parameters/loadflow/load-flow-parameters-inline.d.ts +10 -0
  76. package/dist/components/parameters/loadflow/load-flow-parameters-inline.js +162 -0
  77. package/dist/components/parameters/loadflow/load-flow-parameters-provider.d.ts +4 -0
  78. package/dist/components/parameters/loadflow/load-flow-parameters-provider.js +20 -0
  79. package/dist/components/parameters/loadflow/load-flow-parameters-utils.d.ts +100 -0
  80. package/dist/components/parameters/loadflow/load-flow-parameters-utils.js +158 -0
  81. package/dist/components/parameters/loadflow/use-load-flow-context.d.ts +7 -0
  82. package/dist/components/parameters/loadflow/use-load-flow-context.js +12 -0
  83. package/dist/components/parameters/loadflow/use-load-flow-parameters-form.d.ts +32 -0
  84. package/dist/components/parameters/loadflow/use-load-flow-parameters-form.js +263 -0
  85. package/dist/components/parameters/parameters-style.d.ts +150 -0
  86. package/dist/components/parameters/parameters-style.js +146 -0
  87. package/dist/hooks/index.d.ts +1 -0
  88. package/dist/hooks/index.js +3 -0
  89. package/dist/hooks/use-parameters-backend.d.ts +11 -0
  90. package/dist/hooks/use-parameters-backend.js +217 -0
  91. package/dist/index.js +115 -3
  92. package/dist/services/explore.d.ts +3 -0
  93. package/dist/services/explore.js +26 -1
  94. package/dist/services/index.js +6 -3
  95. package/dist/services/loadflow.d.ts +9 -0
  96. package/dist/services/loadflow.js +59 -0
  97. package/dist/services/utils.d.ts +3 -8
  98. package/dist/services/utils.js +5 -0
  99. package/dist/translations/en/index.d.ts +1 -0
  100. package/dist/translations/en/index.js +2 -0
  101. package/dist/translations/en/parameters.d.ts +67 -0
  102. package/dist/translations/en/parameters.js +64 -0
  103. package/dist/translations/fr/index.d.ts +1 -0
  104. package/dist/translations/fr/index.js +2 -0
  105. package/dist/translations/fr/parameters.d.ts +67 -0
  106. package/dist/translations/fr/parameters.js +64 -0
  107. package/dist/utils/index.js +9 -0
  108. package/dist/utils/types/dynamic-security-analysis.type.d.ts +13 -0
  109. package/dist/utils/types/dynamic-security-analysis.type.js +1 -0
  110. package/dist/utils/types/dynamic-simulation.type.d.ts +111 -0
  111. package/dist/utils/types/dynamic-simulation.type.js +8 -0
  112. package/dist/utils/types/index.d.ts +6 -0
  113. package/dist/utils/types/index.js +9 -0
  114. package/dist/utils/types/loadflow.type.d.ts +11 -0
  115. package/dist/utils/types/loadflow.type.js +1 -0
  116. package/dist/utils/types/non-evacuated-energy.type.d.ts +60 -0
  117. package/dist/utils/types/non-evacuated-energy.type.js +12 -0
  118. package/dist/utils/types/parameters.type.d.ts +41 -0
  119. package/dist/utils/types/parameters.type.js +12 -0
  120. package/dist/utils/types/sensitivity-analysis.type.d.ts +101 -0
  121. package/dist/utils/types/sensitivity-analysis.type.js +16 -0
  122. package/package.json +2 -1
@@ -10,7 +10,7 @@ const styles = {
10
10
  dialogPaper: {
11
11
  ".MuiDialog-paper": {
12
12
  width: "auto",
13
- minWidth: "1100px",
13
+ minWidth: "60vw",
14
14
  margin: "auto"
15
15
  }
16
16
  }
@@ -21,4 +21,5 @@ export * from './topBar';
21
21
  export * from './treeViewFinder';
22
22
  export * from './notifications';
23
23
  export * from './icons';
24
+ export * from './parameters';
24
25
  export * from './menus';
@@ -41,7 +41,7 @@ import { saveExpertFilter, saveExplicitNamingFilter } from "./filter/utils/filte
41
41
  import { CONTINGENCY_LIST_EQUIPMENTS, FILTER_EQUIPMENTS } from "./filter/utils/filterFormUtils.js";
42
42
  import { FlatParameters, extractDefault } from "./flatParameters/FlatParameters.js";
43
43
  import { SelectClearable } from "./inputs/SelectClearable.js";
44
- import { DirectoryItemsInput, NAME } from "./inputs/reactHookForm/DirectoryItemsInput.js";
44
+ import { DESCRIPTION_INPUT, DirectoryItemsInput, NAME } from "./inputs/reactHookForm/DirectoryItemsInput.js";
45
45
  import { RawReadOnlyInput } from "./inputs/reactHookForm/RawReadOnlyInput.js";
46
46
  import { BottomRightButtons } from "./inputs/reactHookForm/agGridTable/BottomRightButtons.js";
47
47
  import { CustomAgGridTable } from "./inputs/reactHookForm/agGridTable/CustomAgGridTable.js";
@@ -107,6 +107,29 @@ import { useNotificationsListener } from "./notifications/hooks/useNotifications
107
107
  import { useListenerManager } from "./notifications/hooks/useListenerManager.js";
108
108
  import { LeftPanelOpenIcon } from "./icons/LeftPanelOpenIcon.js";
109
109
  import { LeftPanelCloseIcon } from "./icons/LeftPanelCloseIcon.js";
110
+ import { ComputingType, formatComputingTypeLabel, isValidComputingType } from "./parameters/common/computing-type.js";
111
+ 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";
112
+ import { LineSeparator } from "./parameters/common/line-separator.js";
113
+ import { LabelledButton, SwitchWithLabel, TabPanel } from "./parameters/common/parameters.js";
114
+ import { CreateParameterDialog } from "./parameters/common/parameters-creation-dialog.js";
115
+ import { ProviderParam } from "./parameters/common/ProviderParam.js";
116
+ import { ParameterFloat } from "./parameters/common/widget/parameter-float.js";
117
+ import { ParameterGroup } from "./parameters/common/widget/parameter-group.js";
118
+ import { ParameterLineDirectoryItemsInput } from "./parameters/common/widget/parameter-line-directory-items-input.js";
119
+ import { ParameterLineSlider, sanitizePercentageValue } from "./parameters/common/widget/parameter-line-slider.js";
120
+ import { ParameterSwitch } from "./parameters/common/widget/parameter-switch.js";
121
+ import { CustomVoltageLevelTable } from "./parameters/common/voltage-level-table/custom-voltage-level-table.js";
122
+ import { CustomVoltageLevelTableCell } from "./parameters/common/voltage-level-table/custom-voltage-level-table-cell.js";
123
+ import { CustomVoltageLevelTableRow } from "./parameters/common/voltage-level-table/custom-voltage-level-table-row.js";
124
+ import { COLUMNS_DEFINITIONS_LIMIT_REDUCTIONS, IST_FORM, LIMIT_DURATION_FORM, LIMIT_REDUCTIONS_FORM, TAB_INFO, TabValues, VOLTAGE_LEVELS_FORM, getLimitReductionsFormSchema, getSAParametersFromSchema } from "./parameters/common/limitreductions/columns-definitions.js";
125
+ import { toFormValueSaParameters, toFormValuesLimitReductions } from "./parameters/common/limitreductions/limit-reductions-form-util.js";
126
+ import { LimitReductionsTableForm } from "./parameters/common/limitreductions/limit-reductions-table-form.js";
127
+ import { LimitReductionTableRow } from "./parameters/common/limitreductions/limit-reduction-table-row.js";
128
+ import { LimitReductionTableCell } from "./parameters/common/limitreductions/limit-reduction-table-cell.js";
129
+ import { getTabIndicatorStyle, getTabStyle, parametersStyles } from "./parameters/parameters-style.js";
130
+ import { BALANCE_TYPE, COMMON_PARAMETERS, CONNECTED_COMPONENT_MODE, COUNTRIES_TO_BALANCE, DC, DC_POWER_FACTOR, DC_USE_TRANSFORMER_RATIO, DEFAULT_LIMIT_REDUCTION_VALUE, DISTRIBUTED_SLACK, HVDC_AC_EMULATION, MAX_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, PARAM_LIMIT_REDUCTION, PARAM_PROVIDER_OPENLOADFLOW, PHASE_SHIFTER_REGULATION_ON, READ_SLACK_BUS, SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON, SPECIFIC_PARAMETERS, TRANSFORMER_VOLTAGE_CONTROL_ON, TWT_SPLIT_SHUNT_ADMITTANCE, USE_REACTIVE_LIMITS, VOLTAGE_INIT_MODE, WRITE_SLACK_BUS, alertThresholdMarks } from "./parameters/loadflow/constants.js";
131
+ import { LoadFlowParametersInline } from "./parameters/loadflow/load-flow-parameters-inline.js";
132
+ import { LoadFlowParametersEditionDialog } from "./parameters/loadflow/load-flow-parameters-dialog.js";
110
133
  import { CustomMenuItem, CustomNestedMenuItem } from "./menus/custom-nested-menu.js";
111
134
  export {
112
135
  AboutDialog,
@@ -116,11 +139,16 @@ export {
116
139
  default2 as AuthenticationRouterErrorDisplay,
117
140
  AutocompleteInput,
118
141
  AutocompleteWithFavorites,
142
+ BALANCE_TYPE,
119
143
  BooleanInput,
120
144
  BottomRightButtons,
145
+ COLUMNS_DEFINITIONS_LIMIT_REDUCTIONS,
121
146
  COMBINATOR_OPTIONS,
147
+ COMMON_PARAMETERS,
148
+ CONNECTED_COMPONENT_MODE,
122
149
  CONTINGENCY_LIST_EQUIPMENTS,
123
150
  CONVERTERS_MODE_OPTIONS,
151
+ COUNTRIES_TO_BALANCE,
124
152
  CUSTOM_AGGRID_THEME,
125
153
  CancelButton,
126
154
  CardErrorBoundary,
@@ -128,8 +156,10 @@ export {
128
156
  CheckboxInput,
129
157
  CombinatorSelector,
130
158
  CombinatorType,
159
+ ComputingType,
131
160
  CountriesInput,
132
161
  CountryValueEditor,
162
+ CreateParameterDialog,
133
163
  CriteriaBasedForm,
134
164
  CsvUploader,
135
165
  CustomAGGrid,
@@ -140,7 +170,16 @@ export {
140
170
  CustomMuiDialog,
141
171
  CustomNestedMenuItem,
142
172
  CustomReactQueryBuilder,
173
+ CustomVoltageLevelTable,
174
+ CustomVoltageLevelTableCell,
175
+ CustomVoltageLevelTableRow,
176
+ DC,
177
+ DC_POWER_FACTOR,
178
+ DC_USE_TRANSFORMER_RATIO,
179
+ DEFAULT_LIMIT_REDUCTION_VALUE,
143
180
  DEFAULT_RANGE_VALUE,
181
+ DESCRIPTION_INPUT,
182
+ DISTRIBUTED_SLACK,
144
183
  DISTRIBUTION_KEY,
145
184
  DataType,
146
185
  DescriptionField,
@@ -176,15 +215,28 @@ export {
176
215
  FloatInput,
177
216
  GridLogo,
178
217
  GroupValueEditor,
218
+ HVDC_AC_EMULATION,
179
219
  HelperPreviousValue,
220
+ IST_FORM,
180
221
  InputWithPopupConfirmation,
181
222
  IntegerInput,
223
+ LIMIT_DURATION_FORM,
224
+ LIMIT_REDUCTIONS_FORM,
182
225
  LOAD_TYPE_OPTIONS,
226
+ LabelledButton,
183
227
  LeftPanelCloseIcon,
184
228
  LeftPanelOpenIcon,
229
+ LimitReductionTableCell,
230
+ LimitReductionTableRow,
231
+ LimitReductionsTableForm,
232
+ LineSeparator,
233
+ LoadFlowParametersEditionDialog,
234
+ LoadFlowParametersInline,
185
235
  Login,
186
236
  LogoText,
187
237
  Logout,
238
+ MAX_VALUE_ALLOWED_FOR_LIMIT_REDUCTION,
239
+ MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION,
188
240
  MidFormError,
189
241
  ModifyElementSelection,
190
242
  MuiSelectInput,
@@ -198,10 +250,27 @@ export {
198
250
  OPERATOR_OPTIONS,
199
251
  OperatorType,
200
252
  OverflowableText,
253
+ PARAM_LIMIT_REDUCTION,
254
+ PARAM_PROVIDER_OPENLOADFLOW,
255
+ PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD,
256
+ PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD,
257
+ PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD,
258
+ PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD,
259
+ PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD,
260
+ PARAM_SA_PROVIDER,
201
261
  PHASE_REGULATION_MODE_OPTIONS,
262
+ PHASE_SHIFTER_REGULATION_ON,
263
+ PROVIDER,
264
+ ParameterFloat,
265
+ ParameterGroup,
266
+ ParameterLineDirectoryItemsInput,
267
+ ParameterLineSlider,
268
+ ParameterSwitch,
202
269
  PopupConfirmationDialog,
203
270
  PropertyValueEditor,
271
+ ProviderParam,
204
272
  RATIO_REGULATION_MODE_OPTIONS,
273
+ READ_SLACK_BUS,
205
274
  REGULATION_TYPE_OPTIONS,
206
275
  RULES,
207
276
  RadioInput,
@@ -211,6 +280,8 @@ export {
211
280
  RemoveButton,
212
281
  RuleValueEditor,
213
282
  SHUNT_COMPENSATOR_TYPE_OPTIONS,
283
+ SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON,
284
+ SPECIFIC_PARAMETERS,
214
285
  SVAR_REGULATION_MODE_OPTIONS,
215
286
  SelectClearable,
216
287
  SelectInput,
@@ -220,6 +291,12 @@ export {
220
291
  SnackbarProvider,
221
292
  SubmitButton,
222
293
  SwitchInput,
294
+ SwitchWithLabel,
295
+ TAB_INFO,
296
+ TRANSFORMER_VOLTAGE_CONTROL_ON,
297
+ TWT_SPLIT_SHUNT_ADMITTANCE,
298
+ TabPanel,
299
+ TabValues,
223
300
  TagRenderer,
224
301
  TextFieldWithAdornment,
225
302
  TextInput,
@@ -227,27 +304,38 @@ export {
227
304
  TopBar,
228
305
  TranslatedValueEditor,
229
306
  TreeViewFinder,
307
+ USE_REACTIVE_LIMITS,
230
308
  UnauthorizedAccessAlert,
231
309
  UniqueNameInput,
232
310
  UserManagerMock,
311
+ VOLTAGE_INIT_MODE,
312
+ VOLTAGE_LEVEL,
313
+ VOLTAGE_LEVELS_FORM,
233
314
  ValueEditor,
234
315
  ValueSelector,
316
+ WRITE_SLACK_BUS,
317
+ alertThresholdMarks,
235
318
  countRules,
236
319
  dispatchUser,
237
320
  expertFilterSchema,
238
321
  explicitNamingFilterSchema,
239
322
  exportExpertRules,
240
323
  extractDefault,
324
+ formatComputingTypeLabel,
241
325
  genHelperError,
242
326
  generateTreeViewFinderClass,
243
327
  getCriteriaBasedFormData,
244
328
  getCriteriaBasedSchema,
245
329
  getExpertFilterEmptyFormData,
246
330
  getExplicitNamingFilterEmptyFormData,
331
+ getLimitReductionsFormSchema,
247
332
  getNumberOfSiblings,
248
333
  getOperators,
249
334
  getPreLoginPath,
250
335
  getRangeInputSchema,
336
+ getSAParametersFromSchema,
337
+ getTabIndicatorStyle,
338
+ getTabStyle,
251
339
  gridItem,
252
340
  handleSigninCallback,
253
341
  handleSilentRenewCallback,
@@ -258,16 +346,21 @@ export {
258
346
  isFieldRequired,
259
347
  isFloatNumber,
260
348
  isIntegerNumber,
349
+ isValidComputingType,
261
350
  login,
262
351
  logout,
352
+ parametersStyles,
263
353
  queryValidator,
264
354
  recursiveRemove,
265
355
  rqbQuerySchemaValidator,
356
+ sanitizePercentageValue,
266
357
  saveExpertFilter,
267
358
  saveExplicitNamingFilter,
268
359
  styles,
269
360
  testQuery,
270
361
  toFloatOrNullValue,
362
+ toFormValueSaParameters,
363
+ toFormValuesLimitReductions,
271
364
  unscrollableDialogStyles,
272
365
  useConvertValue,
273
366
  useCustomFormContext,
@@ -1,5 +1,5 @@
1
1
  import { SelectClearable } from "./SelectClearable.js";
2
- import { DirectoryItemsInput, NAME } from "./reactHookForm/DirectoryItemsInput.js";
2
+ import { DESCRIPTION_INPUT, DirectoryItemsInput, NAME } from "./reactHookForm/DirectoryItemsInput.js";
3
3
  import { RawReadOnlyInput } from "./reactHookForm/RawReadOnlyInput.js";
4
4
  import { BottomRightButtons } from "./reactHookForm/agGridTable/BottomRightButtons.js";
5
5
  import { CustomAgGridTable } from "./reactHookForm/agGridTable/CustomAgGridTable.js";
@@ -70,6 +70,7 @@ export {
70
70
  CustomFormProvider,
71
71
  CustomReactQueryBuilder,
72
72
  DEFAULT_RANGE_VALUE,
73
+ DESCRIPTION_INPUT,
73
74
  DescriptionField,
74
75
  DirectoryItemsInput,
75
76
  ElementValueEditor,
@@ -1,5 +1,6 @@
1
1
  import { ElementAttributes } from '../../../utils';
2
2
  export declare const NAME = "name";
3
+ export declare const DESCRIPTION_INPUT = "description";
3
4
  export interface DirectoryItemsInputProps {
4
5
  label: string | undefined;
5
6
  name: string;
@@ -11,10 +12,11 @@ export interface DirectoryItemsInputProps {
11
12
  onRowChanged?: (a: boolean) => void;
12
13
  onChange?: (e: any) => void;
13
14
  disable?: boolean;
15
+ allowMultiSelect?: boolean;
14
16
  labelRequiredFromContext?: boolean;
15
17
  }
16
18
  export declare function DirectoryItemsInput({ label, name, elementType, // Used to specify type of element (Filter, Contingency list, ...)
17
19
  equipmentTypes, // Mostly used for filters, it allows the user to get elements of specific equipment only
18
20
  itemFilter, // Used to further filter the results displayed according to specific requirement
19
21
  titleId, // title of directory item selector dialogue
20
- hideErrorMessage, onRowChanged, onChange, disable, labelRequiredFromContext, }: DirectoryItemsInputProps): import("react/jsx-runtime").JSX.Element;
22
+ hideErrorMessage, onRowChanged, onChange, disable, allowMultiSelect, labelRequiredFromContext, }: Readonly<DirectoryItemsInputProps>): import("react/jsx-runtime").JSX.Element;
@@ -16,6 +16,7 @@ import { MidFormError } from "./errorManagement/MidFormError.js";
16
16
  import { DirectoryItemSelector } from "../../directoryItemSelector/DirectoryItemSelector.js";
17
17
  import { fetchDirectoryElementPath } from "../../../services/directory.js";
18
18
  const NAME = "name";
19
+ const DESCRIPTION_INPUT = "description";
19
20
  const styles = {
20
21
  formDirectoryElements1: {
21
22
  display: "flex",
@@ -58,13 +59,14 @@ function DirectoryItemsInput({
58
59
  onRowChanged,
59
60
  onChange,
60
61
  disable = false,
62
+ allowMultiSelect = true,
61
63
  labelRequiredFromContext = true
62
64
  }) {
63
65
  const { snackError } = useSnackMessage();
64
66
  const intl = useIntl();
65
67
  const [selected, setSelected] = useState([]);
66
68
  const [expanded, setExpanded] = useState([]);
67
- const [multiSelect, setMultiSelect] = useState(true);
69
+ const [multiSelect, setMultiSelect] = useState(allowMultiSelect);
68
70
  const types = useMemo(() => [elementType], [elementType]);
69
71
  const [directoryItemSelectorOpen, setDirectoryItemSelectorOpen] = useState(false);
70
72
  const {
@@ -134,6 +136,9 @@ function DirectoryItemsInput({
134
136
  },
135
137
  [getValues, name]
136
138
  );
139
+ const shouldReplaceElement = useMemo(() => {
140
+ return allowMultiSelect === false && (elements == null ? void 0 : elements.length) === 1;
141
+ }, [allowMultiSelect, elements]);
137
142
  return /* @__PURE__ */ jsxs(Fragment, { children: [
138
143
  /* @__PURE__ */ jsxs(
139
144
  FormControl,
@@ -175,8 +180,14 @@ function DirectoryItemsInput({
175
180
  size: "small",
176
181
  disabled: disable,
177
182
  onClick: () => {
178
- setDirectoryItemSelectorOpen(true);
179
- setMultiSelect(true);
183
+ if (shouldReplaceElement) {
184
+ handleChipClick(0);
185
+ } else {
186
+ setDirectoryItemSelectorOpen(true);
187
+ if (allowMultiSelect) {
188
+ setMultiSelect(true);
189
+ }
190
+ }
180
191
  },
181
192
  children: /* @__PURE__ */ jsx(Folder, {})
182
193
  }
@@ -202,6 +213,7 @@ function DirectoryItemsInput({
202
213
  ] });
203
214
  }
204
215
  export {
216
+ DESCRIPTION_INPUT,
205
217
  DirectoryItemsInput,
206
218
  NAME
207
219
  };
@@ -1,4 +1,4 @@
1
- import { DirectoryItemsInput, NAME } from "./DirectoryItemsInput.js";
1
+ import { DESCRIPTION_INPUT, DirectoryItemsInput, NAME } from "./DirectoryItemsInput.js";
2
2
  import { RawReadOnlyInput } from "./RawReadOnlyInput.js";
3
3
  import { BottomRightButtons } from "./agGridTable/BottomRightButtons.js";
4
4
  import { CustomAgGridTable } from "./agGridTable/CustomAgGridTable.js";
@@ -46,6 +46,7 @@ export {
46
46
  CustomFormContext,
47
47
  CustomFormProvider,
48
48
  DEFAULT_RANGE_VALUE,
49
+ DESCRIPTION_INPUT,
49
50
  DescriptionField,
50
51
  DirectoryItemsInput,
51
52
  ErrorInput,
@@ -9,7 +9,7 @@ function HelperPreviousValue({
9
9
  adornmentText
10
10
  }) {
11
11
  const intl = useIntl();
12
- if (!previousValue && previousValue !== 0 || Number.isNaN(previousValue)) {
12
+ if (!previousValue && previousValue !== 0 || Number.isNaN(previousValue) || previousValue === "NaN") {
13
13
  return void 0;
14
14
  }
15
15
  return /* @__PURE__ */ jsx(FormHelperText, { error: false, sx: { marginLeft: 0 }, children: !disabledTooltip ? /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, sx: { alignItems: "center" }, children: [
@@ -0,0 +1,7 @@
1
+ export interface ProviderParamProps {
2
+ options: {
3
+ id: string;
4
+ label: string;
5
+ }[];
6
+ }
7
+ export declare function ProviderParam({ options }: Readonly<ProviderParamProps>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,51 @@
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import { Grid } from "@mui/material";
3
+ import { FormattedMessage } from "react-intl";
4
+ import { LineSeparator } from "./line-separator.js";
5
+ import { parametersStyles } from "../parameters-style.js";
6
+ import "@mui/icons-material";
7
+ import "react";
8
+ import "react-hook-form";
9
+ import "../../inputs/reactHookForm/provider/CustomFormProvider.js";
10
+ import "yup";
11
+ import "notistack";
12
+ import "../../overflowableText/OverflowableText.js";
13
+ import "../../treeViewFinder/TreeViewFinder.js";
14
+ import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
15
+ import "../../customAGGrid/customAggrid.js";
16
+ import "ag-grid-community";
17
+ import "react-papaparse";
18
+ import "react-csv-downloader";
19
+ import "../../inputs/reactHookForm/numbers/RangeInput.js";
20
+ import "localized-countries";
21
+ import "localized-countries/data/fr";
22
+ import "localized-countries/data/en";
23
+ import { MuiSelectInput } from "../../inputs/reactHookForm/selectInputs/MuiSelectInput.js";
24
+ import "../../../utils/conversionUtils.js";
25
+ import "../../../utils/types/equipmentType.js";
26
+ import "../../../utils/yupConfig.js";
27
+ import "@react-querybuilder/material";
28
+ import "../../filter/expert/expertFilterConstants.js";
29
+ import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
30
+ import "uuid";
31
+ import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
32
+ import "react-querybuilder";
33
+ import { PROVIDER } from "./constant.js";
34
+ const styles = {
35
+ providerParam: {
36
+ height: "fit-content",
37
+ justifyContent: "space-between"
38
+ }
39
+ };
40
+ function ProviderParam({ options }) {
41
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
42
+ /* @__PURE__ */ jsxs(Grid, { xl: 8, container: true, sx: styles.providerParam, paddingRight: 1, children: [
43
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: true, sx: parametersStyles.parameterName, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "Provider" }) }),
44
+ /* @__PURE__ */ jsx(Grid, { item: true, container: true, xs: 2, sx: parametersStyles.controlItem, children: /* @__PURE__ */ jsx(MuiSelectInput, { name: PROVIDER, size: "small", fullWidth: true, options }) })
45
+ ] }),
46
+ /* @__PURE__ */ jsx(Grid, { container: true, paddingTop: 1, paddingRight: 1, xl: 8, children: /* @__PURE__ */ jsx(LineSeparator, {}) })
47
+ ] });
48
+ }
49
+ export {
50
+ ProviderParam
51
+ };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Copyright (c) 2023, 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
+ export declare enum ComputingType {
8
+ LOAD_FLOW = "LOAD_FLOW",
9
+ SECURITY_ANALYSIS = "SECURITY_ANALYSIS",
10
+ SENSITIVITY_ANALYSIS = "SENSITIVITY_ANALYSIS",
11
+ NON_EVACUATED_ENERGY_ANALYSIS = "NON_EVACUATED_ENERGY_ANALYSIS",
12
+ SHORT_CIRCUIT = "SHORT_CIRCUIT",
13
+ SHORT_CIRCUIT_ONE_BUS = "SHORT_CIRCUIT_ONE_BUS",
14
+ DYNAMIC_SIMULATION = "DYNAMIC_SIMULATION",
15
+ DYNAMIC_SECURITY_ANALYSIS = "DYNAMIC_SECURITY_ANALYSIS",
16
+ VOLTAGE_INITIALIZATION = "VOLTAGE_INITIALIZATION",
17
+ STATE_ESTIMATION = "STATE_ESTIMATION"
18
+ }
19
+ export declare const isValidComputingType: (value: string | undefined) => boolean;
20
+ export declare const formatComputingTypeLabel: (type: ComputingType) => string | undefined;
@@ -0,0 +1,46 @@
1
+ var ComputingType = /* @__PURE__ */ ((ComputingType2) => {
2
+ ComputingType2["LOAD_FLOW"] = "LOAD_FLOW";
3
+ ComputingType2["SECURITY_ANALYSIS"] = "SECURITY_ANALYSIS";
4
+ ComputingType2["SENSITIVITY_ANALYSIS"] = "SENSITIVITY_ANALYSIS";
5
+ ComputingType2["NON_EVACUATED_ENERGY_ANALYSIS"] = "NON_EVACUATED_ENERGY_ANALYSIS";
6
+ ComputingType2["SHORT_CIRCUIT"] = "SHORT_CIRCUIT";
7
+ ComputingType2["SHORT_CIRCUIT_ONE_BUS"] = "SHORT_CIRCUIT_ONE_BUS";
8
+ ComputingType2["DYNAMIC_SIMULATION"] = "DYNAMIC_SIMULATION";
9
+ ComputingType2["DYNAMIC_SECURITY_ANALYSIS"] = "DYNAMIC_SECURITY_ANALYSIS";
10
+ ComputingType2["VOLTAGE_INITIALIZATION"] = "VOLTAGE_INITIALIZATION";
11
+ ComputingType2["STATE_ESTIMATION"] = "STATE_ESTIMATION";
12
+ return ComputingType2;
13
+ })(ComputingType || {});
14
+ const isValidComputingType = (value) => {
15
+ return Object.values(ComputingType).includes(value);
16
+ };
17
+ const formatComputingTypeLabel = (type) => {
18
+ switch (type) {
19
+ case "LOAD_FLOW":
20
+ return "LoadFlow";
21
+ case "SECURITY_ANALYSIS":
22
+ return "SecurityAnalysis";
23
+ case "SENSITIVITY_ANALYSIS":
24
+ return "SensitivityAnalysis";
25
+ case "NON_EVACUATED_ENERGY_ANALYSIS":
26
+ return "NonEvacuatedEnergy";
27
+ case "SHORT_CIRCUIT":
28
+ return "ShortCircuit";
29
+ case "VOLTAGE_INITIALIZATION":
30
+ return "VoltageInit";
31
+ case "DYNAMIC_SIMULATION":
32
+ return "DynamicSimulation";
33
+ case "DYNAMIC_SECURITY_ANALYSIS":
34
+ return "DynamicSecurityAnalysis";
35
+ case "STATE_ESTIMATION":
36
+ return "StateEstimation";
37
+ default:
38
+ console.warn(`Unrecognized computing type while formatting its label : ${type}`);
39
+ return void 0;
40
+ }
41
+ };
42
+ export {
43
+ ComputingType,
44
+ formatComputingTypeLabel,
45
+ isValidComputingType
46
+ };
@@ -0,0 +1,8 @@
1
+ export declare const PROVIDER = "provider";
2
+ export declare const VOLTAGE_LEVEL = "voltageLevel";
3
+ export declare const PARAM_SA_PROVIDER = "provider";
4
+ export declare const PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD = "flowProportionalThreshold";
5
+ export declare const PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD = "lowVoltageProportionalThreshold";
6
+ export declare const PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD = "lowVoltageAbsoluteThreshold";
7
+ export declare const PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD = "highVoltageProportionalThreshold";
8
+ export declare const PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD = "highVoltageAbsoluteThreshold";
@@ -0,0 +1,18 @@
1
+ const PROVIDER = "provider";
2
+ const VOLTAGE_LEVEL = "voltageLevel";
3
+ const PARAM_SA_PROVIDER = "provider";
4
+ const PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD = "flowProportionalThreshold";
5
+ const PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD = "lowVoltageProportionalThreshold";
6
+ const PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD = "lowVoltageAbsoluteThreshold";
7
+ const PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD = "highVoltageProportionalThreshold";
8
+ const PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD = "highVoltageAbsoluteThreshold";
9
+ export {
10
+ PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD,
11
+ PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD,
12
+ PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD,
13
+ PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD,
14
+ PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD,
15
+ PARAM_SA_PROVIDER,
16
+ PROVIDER,
17
+ VOLTAGE_LEVEL
18
+ };
@@ -0,0 +1,15 @@
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
+ export * from './computing-type';
8
+ export * from './constant';
9
+ export * from './line-separator';
10
+ export * from './parameters';
11
+ export * from './parameters-creation-dialog';
12
+ export * from './ProviderParam';
13
+ export * from './widget';
14
+ export * from './voltage-level-table';
15
+ export * from './limitreductions';
@@ -0,0 +1,61 @@
1
+ import { ComputingType, formatComputingTypeLabel, isValidComputingType } from "./computing-type.js";
2
+ 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 "./constant.js";
3
+ import { LineSeparator } from "./line-separator.js";
4
+ import { LabelledButton, SwitchWithLabel, TabPanel } from "./parameters.js";
5
+ import { CreateParameterDialog } from "./parameters-creation-dialog.js";
6
+ import { ProviderParam } from "./ProviderParam.js";
7
+ import { ParameterFloat } from "./widget/parameter-float.js";
8
+ import { ParameterGroup } from "./widget/parameter-group.js";
9
+ import { ParameterLineDirectoryItemsInput } from "./widget/parameter-line-directory-items-input.js";
10
+ import { ParameterLineSlider, sanitizePercentageValue } from "./widget/parameter-line-slider.js";
11
+ import { ParameterSwitch } from "./widget/parameter-switch.js";
12
+ import { CustomVoltageLevelTable } from "./voltage-level-table/custom-voltage-level-table.js";
13
+ import { CustomVoltageLevelTableCell } from "./voltage-level-table/custom-voltage-level-table-cell.js";
14
+ import { CustomVoltageLevelTableRow } from "./voltage-level-table/custom-voltage-level-table-row.js";
15
+ import { COLUMNS_DEFINITIONS_LIMIT_REDUCTIONS, IST_FORM, LIMIT_DURATION_FORM, LIMIT_REDUCTIONS_FORM, TAB_INFO, TabValues, VOLTAGE_LEVELS_FORM, getLimitReductionsFormSchema, getSAParametersFromSchema } from "./limitreductions/columns-definitions.js";
16
+ import { toFormValueSaParameters, toFormValuesLimitReductions } from "./limitreductions/limit-reductions-form-util.js";
17
+ import { LimitReductionsTableForm } from "./limitreductions/limit-reductions-table-form.js";
18
+ import { LimitReductionTableRow } from "./limitreductions/limit-reduction-table-row.js";
19
+ import { LimitReductionTableCell } from "./limitreductions/limit-reduction-table-cell.js";
20
+ export {
21
+ COLUMNS_DEFINITIONS_LIMIT_REDUCTIONS,
22
+ ComputingType,
23
+ CreateParameterDialog,
24
+ CustomVoltageLevelTable,
25
+ CustomVoltageLevelTableCell,
26
+ CustomVoltageLevelTableRow,
27
+ IST_FORM,
28
+ LIMIT_DURATION_FORM,
29
+ LIMIT_REDUCTIONS_FORM,
30
+ LabelledButton,
31
+ LimitReductionTableCell,
32
+ LimitReductionTableRow,
33
+ LimitReductionsTableForm,
34
+ LineSeparator,
35
+ PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD,
36
+ PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD,
37
+ PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD,
38
+ PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD,
39
+ PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD,
40
+ PARAM_SA_PROVIDER,
41
+ PROVIDER,
42
+ ParameterFloat,
43
+ ParameterGroup,
44
+ ParameterLineDirectoryItemsInput,
45
+ ParameterLineSlider,
46
+ ParameterSwitch,
47
+ ProviderParam,
48
+ SwitchWithLabel,
49
+ TAB_INFO,
50
+ TabPanel,
51
+ TabValues,
52
+ VOLTAGE_LEVEL,
53
+ VOLTAGE_LEVELS_FORM,
54
+ formatComputingTypeLabel,
55
+ getLimitReductionsFormSchema,
56
+ getSAParametersFromSchema,
57
+ isValidComputingType,
58
+ sanitizePercentageValue,
59
+ toFormValueSaParameters,
60
+ toFormValuesLimitReductions
61
+ };