@gridsuite/commons-ui 0.133.0 → 0.135.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 (103) hide show
  1. package/README.md +10 -0
  2. package/dist/components/authentication/utils/authService.js +6 -9
  3. package/dist/components/checkBoxList/CheckBoxList.js +1 -1
  4. package/dist/components/checkBoxList/CheckBoxListItem.js +3 -3
  5. package/dist/components/checkBoxList/CheckBoxListItemContent.js +3 -3
  6. package/dist/components/checkBoxList/CheckBoxListItems.js +4 -4
  7. package/dist/components/checkBoxList/DraggableCheckBoxListItem.js +5 -5
  8. package/dist/components/checkBoxList/DraggableCheckBoxListItemContent.js +1 -1
  9. package/dist/components/contingencyList/criteriaBased/criteriaBasedUtils.js +7 -7
  10. package/dist/components/csvDownloader/use-csv-export.js +1 -4
  11. package/dist/components/customAGGrid/customAggrid.js +2 -2
  12. package/dist/components/dialogs/customMuiDialog/CustomMuiDialog.js +2 -2
  13. package/dist/components/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js +1 -2
  14. package/dist/components/dialogs/elementSaveDialog/ElementSaveDialog.js +6 -6
  15. package/dist/components/dialogs/elementSaveDialog/utils.js +1 -1
  16. package/dist/components/dialogs/modifyElementSelection/ModifyElementSelection.js +1 -1
  17. package/dist/components/directoryItemSelector/DirectoryItemSelector.js +3 -4
  18. package/dist/components/dnd-table/dnd-table-bottom-right-buttons.js +2 -3
  19. package/dist/components/dnd-table/dnd-table.js +7 -7
  20. package/dist/components/elementSearch/elementItem/EquipmentItem.js +6 -7
  21. package/dist/components/elementSearch/elementSearchDialog/ElementSearchDialog.js +1 -1
  22. package/dist/components/elementSearch/tagRenderer/TagRenderer.js +3 -4
  23. package/dist/components/filter/FilterCreationDialog.js +10 -10
  24. package/dist/components/filter/FilterForm.js +2 -2
  25. package/dist/components/filter/expert/ExpertFilterEditionDialog.js +1 -2
  26. package/dist/components/filter/expert/ExpertFilterForm.d.ts +0 -1
  27. package/dist/components/filter/expert/ExpertFilterForm.js +11 -21
  28. package/dist/components/filter/expert/expertFilterUtils.js +16 -24
  29. package/dist/components/filter/expert/index.js +1 -2
  30. package/dist/components/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js +2 -4
  31. package/dist/components/filter/explicitNaming/ExplicitNamingFilterForm.js +11 -18
  32. package/dist/components/filter/index.js +1 -2
  33. package/dist/components/flatParameters/FlatParameters.js +2 -2
  34. package/dist/components/index.js +1 -2
  35. package/dist/components/inputs/SelectClearable.js +1 -1
  36. package/dist/components/inputs/reactHookForm/DirectoryItemsInput.js +44 -48
  37. package/dist/components/inputs/reactHookForm/agGridTable/CustomAgGridTable.js +3 -4
  38. package/dist/components/inputs/reactHookForm/agGridTable/csvUploader/CsvUploader.js +1 -1
  39. package/dist/components/inputs/reactHookForm/autocompleteInputs/AutocompleteInput.js +4 -4
  40. package/dist/components/inputs/reactHookForm/chip-items-input.js +3 -3
  41. package/dist/components/inputs/reactHookForm/errorManagement/ErrorInput.js +1 -2
  42. package/dist/components/inputs/reactHookForm/numbers/FloatInput.js +1 -1
  43. package/dist/components/inputs/reactHookForm/numbers/SliderInput.js +1 -1
  44. package/dist/components/inputs/reactHookForm/selectInputs/InputWithPopupConfirmation.js +2 -2
  45. package/dist/components/inputs/reactHookForm/selectInputs/SelectInput.js +3 -3
  46. package/dist/components/inputs/reactHookForm/tableInputs/table-numerical-input.js +4 -4
  47. package/dist/components/inputs/reactHookForm/tableInputs/table-text-input.js +3 -3
  48. package/dist/components/inputs/reactHookForm/text/ExpandingTextField.js +2 -2
  49. package/dist/components/inputs/reactHookForm/text/TextInput.js +5 -5
  50. package/dist/components/inputs/reactHookForm/text/UniqueNameInput.js +2 -2
  51. package/dist/components/inputs/reactHookForm/utils/SubmitButton.js +1 -1
  52. package/dist/components/inputs/reactHookForm/utils/functions.js +2 -3
  53. package/dist/components/inputs/reactQueryBuilder/OperatorSelector.js +2 -2
  54. package/dist/components/inputs/reactQueryBuilder/PropertyValueEditor.js +8 -9
  55. package/dist/components/inputs/reactQueryBuilder/TextValueEditor.js +1 -1
  56. package/dist/components/inputs/reactQueryBuilder/TranslatedValueEditor.js +1 -1
  57. package/dist/components/inputs/reactQueryBuilder/ValueEditor.js +2 -3
  58. package/dist/components/inputs/reactQueryBuilder/compositeRuleEditor/GroupValueEditor.js +12 -15
  59. package/dist/components/inputs/reactQueryBuilder/compositeRuleEditor/RuleValueEditor.js +3 -4
  60. package/dist/components/notifications/hooks/useListenerManager.js +2 -4
  61. package/dist/components/overflowableText/OverflowableText.js +4 -5
  62. package/dist/components/parameters/common/computing-type.d.ts +2 -1
  63. package/dist/components/parameters/common/computing-type.js +3 -0
  64. package/dist/components/parameters/common/limitreductions/columns-definitions.js +1 -1
  65. package/dist/components/parameters/common/limitreductions/limit-reductions-form-util.js +1 -1
  66. package/dist/components/parameters/common/widget/parameter-line-slider.js +5 -4
  67. package/dist/components/parameters/loadflow/load-flow-general-parameters.js +1 -1
  68. package/dist/components/parameters/loadflow/load-flow-parameters-content.js +1 -1
  69. package/dist/components/parameters/loadflow/load-flow-parameters-form.js +1 -1
  70. package/dist/components/parameters/loadflow/load-flow-parameters-utils.js +4 -3
  71. package/dist/components/parameters/loadflow/use-load-flow-parameters-form.js +34 -20
  72. package/dist/components/parameters/network-visualizations/map-parameters.js +13 -17
  73. package/dist/components/parameters/network-visualizations/network-area-diagram-parameters.js +1 -2
  74. package/dist/components/parameters/network-visualizations/network-visualizations-form.js +2 -2
  75. package/dist/components/parameters/network-visualizations/single-line-diagram-parameters.js +2 -3
  76. package/dist/components/parameters/security-analysis/security-analysis-parameters-form.js +2 -3
  77. package/dist/components/parameters/security-analysis/security-analysis-parameters-selector.js +3 -3
  78. package/dist/components/parameters/security-analysis/security-analysis-violations-hiding.js +1 -1
  79. package/dist/components/parameters/security-analysis/use-security-analysis-parameters-form.js +5 -5
  80. package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.js +1 -1
  81. package/dist/components/parameters/sensi/sensitivity-table.js +2 -3
  82. package/dist/components/parameters/sensi/use-sensitivity-analysis-parameters.js +42 -54
  83. package/dist/components/parameters/sensi/utils.js +16 -27
  84. package/dist/components/parameters/short-circuit/short-circuit-parameters-form.js +2 -2
  85. package/dist/components/parameters/short-circuit/short-circuit-parameters-inline.js +1 -1
  86. package/dist/components/parameters/voltage-init/use-voltage-init-parameters-form.js +1 -1
  87. package/dist/components/parameters/voltage-init/voltage-init-form-utils.js +47 -56
  88. package/dist/components/parameters/voltage-init/voltage-init-parameters-form.js +1 -1
  89. package/dist/components/parameters/voltage-init/voltage-init-parameters-inline.js +1 -1
  90. package/dist/components/snackbarProvider/SnackbarProvider.js +1 -4
  91. package/dist/components/topBar/TopBar.js +33 -36
  92. package/dist/components/topBar/UserInformationDialog.js +7 -8
  93. package/dist/components/topBar/UserSettingsDialog.js +1 -1
  94. package/dist/components/treeViewFinder/TreeViewFinder.js +13 -13
  95. package/dist/hooks/use-parameters-backend.js +5 -5
  96. package/dist/hooks/use-unique-name-validation.js +2 -3
  97. package/dist/hooks/useConfidentialityWarning.js +1 -1
  98. package/dist/hooks/usePredefinedProperties.js +1 -2
  99. package/dist/index.js +1 -2
  100. package/dist/redux/commonStore.js +1 -2
  101. package/dist/services/utils.js +3 -3
  102. package/dist/utils/types/equipmentType.js +9 -13
  103. package/package.json +19 -17
@@ -56,20 +56,21 @@ const useLoadFlowParametersForm = (parametersBackend, enableDeveloperMode, param
56
56
  specificParamsDescriptions,
57
57
  defaultLimitReductions
58
58
  ] = parametersBackend;
59
- const [currentProvider, setCurrentProvider] = useState(params == null ? void 0 : params.provider);
59
+ const [currentProvider, setCurrentProvider] = useState(params?.provider);
60
60
  const [selectedTab, setSelectedTab] = useState(TabValues.GENERAL);
61
+ const [limitReductionNumber, setLimitReductionNumber] = useState(0);
61
62
  const [tabIndexesWithError, setTabIndexesWithError] = useState([]);
62
63
  const { snackError } = useSnackMessage();
63
64
  const handleTabChange = useCallback((event, newValue) => {
64
65
  setSelectedTab(newValue);
65
66
  }, []);
66
67
  const specificParametersValues = useMemo(() => {
67
- const specificParams = currentProvider ? specificParamsDescriptions == null ? void 0 : specificParamsDescriptions[currentProvider] : void 0;
68
+ const specificParams = currentProvider ? specificParamsDescriptions?.[currentProvider] : void 0;
68
69
  return getDefaultSpecificParamsValues(specificParams);
69
70
  }, [currentProvider, specificParamsDescriptions]);
70
71
  const specificParameters = useMemo(() => {
71
- const specificParams = currentProvider ? specificParamsDescriptions == null ? void 0 : specificParamsDescriptions[currentProvider] : void 0;
72
- return specificParams == null ? void 0 : specificParams.map((param) => ({
72
+ const specificParams = currentProvider ? specificParamsDescriptions?.[currentProvider] : void 0;
73
+ return specificParams?.map((param) => ({
73
74
  name: param.name,
74
75
  type: param.type,
75
76
  label: param.label,
@@ -79,24 +80,21 @@ const useLoadFlowParametersForm = (parametersBackend, enableDeveloperMode, param
79
80
  }));
80
81
  }, [currentProvider, specificParamsDescriptions]);
81
82
  const formSchema = useMemo(() => {
82
- var _a;
83
83
  return yup.object({
84
84
  [PROVIDER]: yup.string().required(),
85
85
  [PARAM_LIMIT_REDUCTION]: yup.number().nullable(),
86
86
  ...getCommonLoadFlowParametersFormSchema().fields,
87
- ...getLimitReductionsFormSchema(
88
- (params == null ? void 0 : params.limitReductions) ? (_a = params.limitReductions[0]) == null ? void 0 : _a.temporaryLimitReductions.length : 0
89
- ).fields,
87
+ ...getLimitReductionsFormSchema(limitReductionNumber).fields,
90
88
  ...getSpecificLoadFlowParametersFormSchema(specificParameters).fields
91
89
  }).concat(getNameElementEditorSchema(name));
92
- }, [name, params == null ? void 0 : params.limitReductions, specificParameters]);
90
+ }, [name, limitReductionNumber, specificParameters]);
93
91
  const formMethods = useForm({
94
92
  defaultValues: {
95
93
  ...getNameElementEditorEmptyFormData(name, description),
96
94
  [PROVIDER]: provider,
97
95
  [PARAM_LIMIT_REDUCTION]: null,
98
96
  [COMMON_PARAMETERS]: {
99
- ...params == null ? void 0 : params.commonParameters
97
+ ...params?.commonParameters
100
98
  },
101
99
  [SPECIFIC_PARAMETERS]: {
102
100
  ...specificParametersValues
@@ -109,22 +107,22 @@ const useLoadFlowParametersForm = (parametersBackend, enableDeveloperMode, param
109
107
  const watchProvider = watch("provider");
110
108
  const toLimitReductions = useCallback(
111
109
  (formLimits) => {
112
- if ((formLimits == null ? void 0 : formLimits.length) === 0) {
110
+ if (formLimits?.length === 0) {
113
111
  return [];
114
112
  }
115
113
  if (watchProvider === PARAM_PROVIDER_OPENLOADFLOW) {
116
- if (!(params == null ? void 0 : params.limitReductions)) {
114
+ if (!params?.limitReductions) {
117
115
  return defaultLimitReductions.map(
118
116
  (vlLimits, indexVl) => mapLimitReductions(vlLimits, formLimits, indexVl)
119
117
  );
120
118
  }
121
- return params == null ? void 0 : params.limitReductions.map(
119
+ return params?.limitReductions.map(
122
120
  (vlLimits, indexVl) => mapLimitReductions(vlLimits, formLimits, indexVl)
123
121
  );
124
122
  }
125
123
  return [];
126
124
  },
127
- [defaultLimitReductions, params == null ? void 0 : params.limitReductions, watchProvider]
125
+ [defaultLimitReductions, params?.limitReductions, watchProvider]
128
126
  );
129
127
  const getSpecificParametersPerProvider = (formData, _specificParametersValues) => {
130
128
  return Object.keys(formData[SPECIFIC_PARAMETERS]).reduce(
@@ -157,9 +155,9 @@ const useLoadFlowParametersForm = (parametersBackend, enableDeveloperMode, param
157
155
  );
158
156
  const toLoadFlowFormValues = useCallback(
159
157
  (_params) => {
160
- const specificParams = _params.provider ? specificParamsDescriptions == null ? void 0 : specificParamsDescriptions[_params.provider] : void 0;
158
+ const specificParams = _params.provider ? specificParamsDescriptions?.[_params.provider] : void 0;
161
159
  const specificParamsPerProvider = _params.specificParametersPerProvider[_params.provider];
162
- const formatted = specificParams == null ? void 0 : specificParams.reduce((acc, param) => {
160
+ const formatted = specificParams?.reduce((acc, param) => {
163
161
  if (specificParamsPerProvider && Object.prototype.hasOwnProperty.call(specificParamsPerProvider, param.name)) {
164
162
  if (param.type === ParameterType.BOOLEAN) {
165
163
  acc[param.name] = specificParamsPerProvider[param.name] === "true";
@@ -197,10 +195,10 @@ const useLoadFlowParametersForm = (parametersBackend, enableDeveloperMode, param
197
195
  const onValidationError = useCallback(
198
196
  (errors) => {
199
197
  const tabsInError = [];
200
- if ((errors == null ? void 0 : errors[LIMIT_REDUCTIONS_FORM]) && TabValues.LIMIT_REDUCTIONS !== selectedTab) {
198
+ if (errors?.[LIMIT_REDUCTIONS_FORM] && TabValues.LIMIT_REDUCTIONS !== selectedTab) {
201
199
  tabsInError.push(TabValues.LIMIT_REDUCTIONS);
202
200
  }
203
- if (((errors == null ? void 0 : errors[SPECIFIC_PARAMETERS]) || (errors == null ? void 0 : errors[COMMON_PARAMETERS]) || (errors == null ? void 0 : errors[PROVIDER])) && TabValues.GENERAL !== selectedTab) {
201
+ if ((errors?.[SPECIFIC_PARAMETERS] || errors?.[COMMON_PARAMETERS] || errors?.[PROVIDER]) && TabValues.GENERAL !== selectedTab) {
204
202
  tabsInError.push(TabValues.GENERAL);
205
203
  }
206
204
  setTabIndexesWithError(tabsInError);
@@ -241,12 +239,28 @@ const useLoadFlowParametersForm = (parametersBackend, enableDeveloperMode, param
241
239
  reset(toLoadFlowFormValues(params));
242
240
  }, [paramsLoaded, params, reset, specificParamsDescriptions, toLoadFlowFormValues]);
243
241
  useEffect(() => {
244
- if (watchProvider !== currentProvider) {
242
+ if (watchProvider && watchProvider !== currentProvider) {
245
243
  setCurrentProvider(watchProvider);
246
244
  setSpecificParameters(watchProvider, specificParamsDescriptions, formMethods);
247
245
  setLimitReductions(watchProvider, defaultLimitReductions, formMethods);
246
+ if (watchProvider === PARAM_PROVIDER_OPENLOADFLOW) {
247
+ if (currentProvider) {
248
+ setLimitReductionNumber(defaultLimitReductions?.at(0)?.temporaryLimitReductions?.length ?? 0);
249
+ } else {
250
+ setLimitReductionNumber(params?.limitReductions?.at(0)?.temporaryLimitReductions?.length ?? 0);
251
+ }
252
+ } else {
253
+ setLimitReductionNumber(0);
254
+ }
248
255
  }
249
- }, [currentProvider, defaultLimitReductions, formMethods, specificParamsDescriptions, watchProvider]);
256
+ }, [
257
+ currentProvider,
258
+ defaultLimitReductions,
259
+ formMethods,
260
+ params?.limitReductions,
261
+ specificParamsDescriptions,
262
+ watchProvider
263
+ ]);
250
264
  return {
251
265
  formMethods,
252
266
  formSchema,
@@ -37,26 +37,22 @@ import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
37
37
  import "../common/widget/parameter-line-slider.js";
38
38
  import "../common/limitreductions/columns-definitions.js";
39
39
  function MapParameters() {
40
- var _a;
41
40
  const lineSwitch = (name, label) => /* @__PURE__ */ jsxs(Fragment, { children: [
42
41
  /* @__PURE__ */ jsx(Grid, { item: true, xs: 8, sx: parametersStyles.parameterName, children: /* @__PURE__ */ jsx(FormattedMessage, { id: label }) }),
43
42
  /* @__PURE__ */ jsx(Grid, { item: true, container: true, xs: 4, sx: parametersStyles.controlItem, children: /* @__PURE__ */ jsx(SwitchInput, { name: `${NetworkVisualizationTabValues.MAP}.${name}` }) })
44
43
  ] });
45
- const lineFlow = (name, label, options) => {
46
- var _a2;
47
- return /* @__PURE__ */ jsxs(Fragment, { children: [
48
- /* @__PURE__ */ jsx(Grid, { item: true, xs: 8, sx: parametersStyles.parameterName, children: /* @__PURE__ */ jsx(FormattedMessage, { id: label }) }),
49
- /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, sx: parametersStyles.controlItem, children: /* @__PURE__ */ jsx(
50
- MuiSelectInput,
51
- {
52
- fullWidth: true,
53
- name: `${NetworkVisualizationTabValues.MAP}.${name}`,
54
- size: "small",
55
- options: (_a2 = Object.values(options)) == null ? void 0 : _a2.map((option) => option)
56
- }
57
- ) })
58
- ] });
59
- };
44
+ const lineFlow = (name, label, options) => /* @__PURE__ */ jsxs(Fragment, { children: [
45
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 8, sx: parametersStyles.parameterName, children: /* @__PURE__ */ jsx(FormattedMessage, { id: label }) }),
46
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, sx: parametersStyles.controlItem, children: /* @__PURE__ */ jsx(
47
+ MuiSelectInput,
48
+ {
49
+ fullWidth: true,
50
+ name: `${NetworkVisualizationTabValues.MAP}.${name}`,
51
+ size: "small",
52
+ options: Object.values(options)?.map((option) => option)
53
+ }
54
+ ) })
55
+ ] });
60
56
  const mapBaseMap = /* @__PURE__ */ jsxs(Fragment, { children: [
61
57
  /* @__PURE__ */ jsx(Grid, { item: true, xs: 8, sx: parametersStyles.parameterName, children: /* @__PURE__ */ jsx(FormattedMessage, { id: MAP_BASE_MAP }) }),
62
58
  /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, sx: parametersStyles.controlItem, children: /* @__PURE__ */ jsx(
@@ -65,7 +61,7 @@ function MapParameters() {
65
61
  fullWidth: true,
66
62
  name: `${NetworkVisualizationTabValues.MAP}.${PARAM_MAP_BASEMAP}`,
67
63
  size: "small",
68
- options: (_a = Object.values(INTL_MAP_BASE_MAP_OPTIONS)) == null ? void 0 : _a.map((option) => option)
64
+ options: Object.values(INTL_MAP_BASE_MAP_OPTIONS)?.map((option) => option)
69
65
  }
70
66
  ) })
71
67
  ] });
@@ -31,7 +31,6 @@ import "@react-querybuilder/material";
31
31
  import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
32
32
  import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
33
33
  function NetworkAreaDiagramParameters() {
34
- var _a;
35
34
  return /* @__PURE__ */ jsxs(
36
35
  Grid,
37
36
  {
@@ -48,7 +47,7 @@ function NetworkAreaDiagramParameters() {
48
47
  fullWidth: true,
49
48
  name: `${NetworkVisualizationTabValues.NETWORK_AREA_DIAGRAM}.${PARAM_NAD_POSITIONS_GENERATION_MODE}`,
50
49
  size: "small",
51
- options: (_a = Object.values(NAD_POSITIONS_GENERATION_MODE)) == null ? void 0 : _a.map((option) => option)
50
+ options: Object.values(NAD_POSITIONS_GENERATION_MODE)?.map((option) => option)
52
51
  }
53
52
  ) })
54
53
  ]
@@ -59,7 +59,7 @@ function NetworkVisualizationParametersForm({
59
59
  const componentLibraries = useGetAvailableComponentLibraries(user);
60
60
  const { formMethods, formSchema, selectedTab, handleTabChange, paramsLoading } = networkVisuMethods;
61
61
  return /* @__PURE__ */ jsx(CustomFormProvider, { validationSchema: formSchema, ...formMethods, removeOptional: true, children: /* @__PURE__ */ jsxs(Grid, { container: true, direction: "column", children: [
62
- /* @__PURE__ */ jsx(Grid, { item: true, container: true, direction: "column", children: renderTitleFields == null ? void 0 : renderTitleFields() }),
62
+ /* @__PURE__ */ jsx(Grid, { item: true, container: true, direction: "column", children: renderTitleFields?.() }),
63
63
  paramsLoading ? /* @__PURE__ */ jsx(LinearProgress, {}) : /* @__PURE__ */ jsxs(Grid, { item: true, container: true, direction: "column", children: [
64
64
  /* @__PURE__ */ jsxs(Tabs, { value: selectedTab, variant: "scrollable", onChange: handleTabChange, children: [
65
65
  /* @__PURE__ */ jsx(Tab, { label: /* @__PURE__ */ jsx(FormattedMessage, { id: "Map" }), value: NetworkVisualizationTabValues.MAP }),
@@ -92,7 +92,7 @@ function NetworkVisualizationParametersForm({
92
92
  position: "absolute",
93
93
  bottom: "30px"
94
94
  },
95
- children: renderActions == null ? void 0 : renderActions()
95
+ children: renderActions?.()
96
96
  }
97
97
  )
98
98
  ] }) });
@@ -37,7 +37,6 @@ import "../common/widget/parameter-line-slider.js";
37
37
  import "../common/limitreductions/columns-definitions.js";
38
38
  import { INTL_SUBSTATION_LAYOUT_OPTIONS, SUBSTATION_LAYOUT, NetworkVisualizationTabValues, PARAM_SUBSTATION_LAYOUT, COMPONENT_LIBRARY, PARAM_COMPONENT_LIBRARY, DIAGONAL_LABEL, PARAM_DIAGONAL_LABEL, CENTER_LABEL, PARAM_CENTER_LABEL } from "./constants.js";
39
39
  function SingleLineDiagramParameters({ componentLibraries }) {
40
- var _a, _b;
41
40
  const componentLibsRenderCache = useMemo(
42
41
  () => Object.fromEntries(componentLibraries.filter(Boolean).map((libLabel) => [libLabel, libLabel])),
43
42
  [componentLibraries]
@@ -57,7 +56,7 @@ function SingleLineDiagramParameters({ componentLibraries }) {
57
56
  fullWidth: true,
58
57
  name: `${NetworkVisualizationTabValues.SINGLE_LINE_DIAGRAM}.${PARAM_SUBSTATION_LAYOUT}`,
59
58
  size: "small",
60
- options: (_a = Object.values(substationLayoutOptions)) == null ? void 0 : _a.map((option) => option)
59
+ options: Object.values(substationLayoutOptions)?.map((option) => option)
61
60
  }
62
61
  ) })
63
62
  ] });
@@ -69,7 +68,7 @@ function SingleLineDiagramParameters({ componentLibraries }) {
69
68
  fullWidth: true,
70
69
  name: `${NetworkVisualizationTabValues.SINGLE_LINE_DIAGRAM}.${PARAM_COMPONENT_LIBRARY}`,
71
70
  size: "small",
72
- options: (_b = Object.values(componentLibsRenderCache)) == null ? void 0 : _b.map((option) => {
71
+ options: Object.values(componentLibsRenderCache)?.map((option) => {
73
72
  return { id: option, label: option };
74
73
  })
75
74
  }
@@ -55,7 +55,6 @@ function SecurityAnalysisParametersForm({
55
55
  renderActions,
56
56
  enableDeveloperMode
57
57
  }) {
58
- var _a;
59
58
  return /* @__PURE__ */ jsx(
60
59
  CustomFormProvider,
61
60
  {
@@ -72,7 +71,7 @@ function SecurityAnalysisParametersForm({
72
71
  width: "100%"
73
72
  },
74
73
  children: /* @__PURE__ */ jsxs(Box, { sx: styles.securityAnalysisParameters, children: [
75
- renderTitleFields == null ? void 0 : renderTitleFields(),
74
+ renderTitleFields?.(),
76
75
  securityAnalysisMethods.paramsLoaded ? /* @__PURE__ */ jsxs(Fragment, { children: [
77
76
  /* @__PURE__ */ jsxs(
78
77
  Grid,
@@ -118,7 +117,7 @@ function SecurityAnalysisParametersForm({
118
117
  SecurityAnalysisParametersSelector,
119
118
  {
120
119
  params: securityAnalysisMethods.params,
121
- currentProvider: (_a = securityAnalysisMethods.currentProvider) == null ? void 0 : _a.trim(),
120
+ currentProvider: securityAnalysisMethods.currentProvider?.trim(),
122
121
  enableDeveloperMode,
123
122
  defaultLimitReductions: securityAnalysisMethods.defaultLimitReductions
124
123
  }
@@ -50,7 +50,7 @@ function SecurityAnalysisParametersSelector({
50
50
  setTabSelected(newValue);
51
51
  }, []);
52
52
  const tabValue = useMemo(() => {
53
- return tabSelected === TabValues.LimitReductions && !(params == null ? void 0 : params.limitReductions) ? TabValues.General : tabSelected;
53
+ return tabSelected === TabValues.LimitReductions && !params?.limitReductions ? TabValues.General : tabSelected;
54
54
  }, [params, tabSelected]);
55
55
  useEffect(() => {
56
56
  if (currentProvider !== PARAM_PROVIDER_OPENLOADFLOW) {
@@ -59,7 +59,7 @@ function SecurityAnalysisParametersSelector({
59
59
  }, [currentProvider]);
60
60
  return /* @__PURE__ */ jsxs(Grid, { sx: { width: "100%" }, children: [
61
61
  /* @__PURE__ */ jsx(Tabs, { value: tabValue, onChange: handleTabChange, children: TAB_INFO.filter((t) => enableDeveloperMode || !t.developerModeOnly).map(
62
- (tab, index) => (tab.label !== TabValues[TabValues.LimitReductions] || currentProvider === PARAM_PROVIDER_OPENLOADFLOW && (params == null ? void 0 : params.limitReductions)) && /* @__PURE__ */ jsx(
62
+ (tab, index) => (tab.label !== TabValues[TabValues.LimitReductions] || currentProvider === PARAM_PROVIDER_OPENLOADFLOW && params?.limitReductions) && /* @__PURE__ */ jsx(
63
63
  Tab,
64
64
  {
65
65
  label: /* @__PURE__ */ jsx(FormattedMessage, { id: tab.label }),
@@ -74,7 +74,7 @@ function SecurityAnalysisParametersSelector({
74
74
  ) }),
75
75
  TAB_INFO.filter((t) => enableDeveloperMode || !t.developerModeOnly).map((tab, index) => /* @__PURE__ */ jsxs(TabPanel, { value: tabValue, index, children: [
76
76
  tabValue === TabValues.General && /* @__PURE__ */ jsx(ViolationsHidingParameters, {}),
77
- tabValue === TabValues.LimitReductions && currentProvider === PARAM_PROVIDER_OPENLOADFLOW && (params == null ? void 0 : params.limitReductions) && /* @__PURE__ */ jsx(Grid, { sx: { width: "100%" }, children: /* @__PURE__ */ jsx(LimitReductionsTableForm, { limits: (params == null ? void 0 : params.limitReductions) ?? defaultLimitReductions }) })
77
+ tabValue === TabValues.LimitReductions && currentProvider === PARAM_PROVIDER_OPENLOADFLOW && params?.limitReductions && /* @__PURE__ */ jsx(Grid, { sx: { width: "100%" }, children: /* @__PURE__ */ jsx(LimitReductionsTableForm, { limits: params?.limitReductions ?? defaultLimitReductions }) })
78
78
  ] }, tab.label))
79
79
  ] });
80
80
  }
@@ -128,7 +128,7 @@ function ViolationsHidingParameters() {
128
128
  }
129
129
  )
130
130
  ] }) }),
131
- fieldsToShow == null ? void 0 : fieldsToShow.map((item) => {
131
+ fieldsToShow?.map((item) => {
132
132
  return /* @__PURE__ */ jsx(Grid, { item: true, xs: 16, xl: 6.25, children: /* @__PURE__ */ jsx(SecurityAnalysisFields, { ...item }) }, item.label);
133
133
  })
134
134
  ] });
@@ -41,7 +41,7 @@ import "../../filter/HeaderFilterForm.js";
41
41
  import { getNameElementEditorEmptyFormData } from "../common/name-element-editor/name-element-editor-utils.js";
42
42
  const useSecurityAnalysisParametersForm = (parametersBackend, parametersUuid, name, description) => {
43
43
  const [providers, provider, , , , params, , updateParameters, , , defaultLimitReductions] = parametersBackend;
44
- const [currentProvider, setCurrentProvider] = useState(params == null ? void 0 : params.provider);
44
+ const [currentProvider, setCurrentProvider] = useState(params?.provider);
45
45
  const { snackError } = useSnackMessage();
46
46
  const formattedProviders = useMemo(() => {
47
47
  return Object.entries(providers).filter(([key]) => !key.includes("DynaFlow")).map(([key, value]) => ({
@@ -51,8 +51,8 @@ const useSecurityAnalysisParametersForm = (parametersBackend, parametersUuid, na
51
51
  }, [providers]);
52
52
  const paramsLoaded = useMemo(() => !!params && !!currentProvider, [currentProvider, params]);
53
53
  const formSchema = useMemo(() => {
54
- return getSAParametersFromSchema(name, params == null ? void 0 : params.limitReductions);
55
- }, [name, params == null ? void 0 : params.limitReductions]);
54
+ return getSAParametersFromSchema(name, params?.limitReductions);
55
+ }, [name, params?.limitReductions]);
56
56
  const formMethods = useForm({
57
57
  defaultValues: {
58
58
  ...getNameElementEditorEmptyFormData(name, description),
@@ -70,7 +70,7 @@ const useSecurityAnalysisParametersForm = (parametersBackend, parametersUuid, na
70
70
  const watchProvider = watch("provider");
71
71
  const toLimitReductions = useCallback(
72
72
  (formLimits) => {
73
- if (!(params == null ? void 0 : params.limitReductions)) {
73
+ if (!params?.limitReductions) {
74
74
  return [];
75
75
  }
76
76
  return params.limitReductions.map((vlLimits, indexVl) => {
@@ -87,7 +87,7 @@ const useSecurityAnalysisParametersForm = (parametersBackend, parametersUuid, na
87
87
  return vlLNewLimits;
88
88
  });
89
89
  },
90
- [params == null ? void 0 : params.limitReductions]
90
+ [params?.limitReductions]
91
91
  );
92
92
  const formatNewParams = useCallback(
93
93
  (formData) => {
@@ -64,7 +64,7 @@ function SensitivityAnalysisParametersForm({
64
64
  validationSchema: sensitivityAnalysisMethods.formSchema,
65
65
  ...sensitivityAnalysisMethods.formMethods,
66
66
  children: /* @__PURE__ */ jsxs(Box, { sx: styles.sensibilityAnalysisParameters, children: [
67
- renderTitleFields == null ? void 0 : renderTitleFields(),
67
+ renderTitleFields?.(),
68
68
  sensitivityAnalysisMethods.paramsLoaded ? /* @__PURE__ */ jsxs(Box, { sx: mergeSx(parametersStyles.scrollableGrid, { paddingTop: 0, maxHeight: "100%" }), children: [
69
69
  /* @__PURE__ */ jsxs(
70
70
  Grid,
@@ -53,11 +53,10 @@ function SensitivityTable({
53
53
  }, [append, createRows, currentRows.length]);
54
54
  const fetchCount = useCallback(
55
55
  (providedArrayFormName, index, source) => {
56
- var _a, _b, _c, _d;
57
56
  const row = getValues(providedArrayFormName)[index];
58
57
  const isActivated = row[ACTIVATED];
59
- const hasMonitoredBranches = ((_a = row[MONITORED_BRANCHES]) == null ? void 0 : _a.length) > 0;
60
- const hasInjections = ((_b = row[INJECTIONS]) == null ? void 0 : _b.length) > 0 || ((_c = row[HVDC_LINES]) == null ? void 0 : _c.length) > 0 || ((_d = row[PSTS]) == null ? void 0 : _d.length) > 0;
58
+ const hasMonitoredBranches = row[MONITORED_BRANCHES]?.length > 0;
59
+ const hasInjections = row[INJECTIONS]?.length > 0 || row[HVDC_LINES]?.length > 0 || row[PSTS]?.length > 0;
61
60
  if (source === "switch" && hasMonitoredBranches && hasInjections) {
62
61
  if (isActivated) {
63
62
  onChangeParams(row, providedArrayFormName, index);
@@ -115,10 +115,7 @@ const useSensitivityAnalysisParametersForm = ({
115
115
  const tabToCheck = values[tab];
116
116
  if (tabToCheck) {
117
117
  const count = tabToCheck.filter((entry) => entry[ACTIVATED]).filter((entry) => entry[MONITORED_BRANCHES].length > 0).filter(
118
- (entry) => {
119
- var _a, _b, _c;
120
- return ((_a = entry[INJECTIONS]) == null ? void 0 : _a.length) > 0 || ((_b = entry[PSTS]) == null ? void 0 : _b.length) > 0 || ((_c = entry[HVDC_LINES]) == null ? void 0 : _c.length) > 0;
121
- }
118
+ (entry) => entry[INJECTIONS]?.length > 0 || entry[PSTS]?.length > 0 || entry[HVDC_LINES]?.length > 0
122
119
  ).map((entry) => entry[COUNT]).reduce((a, b) => a + b, 0);
123
120
  totalResultCount += count;
124
121
  }
@@ -170,140 +167,134 @@ const useSensitivityAnalysisParametersForm = ({
170
167
  );
171
168
  const fromSensitivityAnalysisParamsDataToFormValues = useCallback(
172
169
  (parameters) => {
173
- var _a, _b, _c, _d, _e;
174
170
  const values = {
175
171
  [PROVIDER]: parameters[PROVIDER],
176
172
  [FLOW_FLOW_SENSITIVITY_VALUE_THRESHOLD]: parameters.flowFlowSensitivityValueThreshold,
177
173
  [ANGLE_FLOW_SENSITIVITY_VALUE_THRESHOLD]: parameters.angleFlowSensitivityValueThreshold,
178
174
  [FLOW_VOLTAGE_SENSITIVITY_VALUE_THRESHOLD]: parameters.flowVoltageSensitivityValueThreshold,
179
- [PARAMETER_SENSI_INJECTIONS_SET]: ((_a = parameters.sensitivityInjectionsSet) == null ? void 0 : _a.map((sensiInjectionsSet) => {
180
- var _a2, _b2, _c2;
175
+ [PARAMETER_SENSI_INJECTIONS_SET]: parameters.sensitivityInjectionsSet?.map((sensiInjectionsSet) => {
181
176
  return {
182
- [MONITORED_BRANCHES]: ((_a2 = sensiInjectionsSet[MONITORED_BRANCHES]) == null ? void 0 : _a2.map((sensiInjection) => {
177
+ [MONITORED_BRANCHES]: sensiInjectionsSet[MONITORED_BRANCHES]?.map((sensiInjection) => {
183
178
  return {
184
179
  [FieldConstants.ID]: sensiInjection[CONTAINER_ID],
185
180
  [FieldConstants.NAME]: sensiInjection[CONTAINER_NAME]
186
181
  };
187
- })) ?? [],
188
- [INJECTIONS]: ((_b2 = sensiInjectionsSet[INJECTIONS]) == null ? void 0 : _b2.map((sensiInjection) => {
182
+ }) ?? [],
183
+ [INJECTIONS]: sensiInjectionsSet[INJECTIONS]?.map((sensiInjection) => {
189
184
  return {
190
185
  [FieldConstants.ID]: sensiInjection[CONTAINER_ID],
191
186
  [FieldConstants.NAME]: sensiInjection[CONTAINER_NAME]
192
187
  };
193
- })) ?? [],
188
+ }) ?? [],
194
189
  [DISTRIBUTION_TYPE]: sensiInjectionsSet[DISTRIBUTION_TYPE],
195
- [CONTINGENCIES]: ((_c2 = sensiInjectionsSet[CONTINGENCIES]) == null ? void 0 : _c2.map((sensiInjection) => {
190
+ [CONTINGENCIES]: sensiInjectionsSet[CONTINGENCIES]?.map((sensiInjection) => {
196
191
  return {
197
192
  [FieldConstants.ID]: sensiInjection[CONTAINER_ID],
198
193
  [FieldConstants.NAME]: sensiInjection[CONTAINER_NAME]
199
194
  };
200
- })) ?? [],
195
+ }) ?? [],
201
196
  [ACTIVATED]: sensiInjectionsSet[ACTIVATED] ?? false,
202
197
  [COUNT]: 0
203
198
  };
204
- })) ?? [],
205
- [PARAMETER_SENSI_INJECTION]: ((_b = parameters.sensitivityInjection) == null ? void 0 : _b.map((sensiInjections) => {
206
- var _a2, _b2, _c2;
199
+ }) ?? [],
200
+ [PARAMETER_SENSI_INJECTION]: parameters.sensitivityInjection?.map((sensiInjections) => {
207
201
  return {
208
- [MONITORED_BRANCHES]: ((_a2 = sensiInjections[MONITORED_BRANCHES]) == null ? void 0 : _a2.map((sensiInjection) => {
202
+ [MONITORED_BRANCHES]: sensiInjections[MONITORED_BRANCHES]?.map((sensiInjection) => {
209
203
  return {
210
204
  [FieldConstants.ID]: sensiInjection[CONTAINER_ID],
211
205
  [FieldConstants.NAME]: sensiInjection[CONTAINER_NAME]
212
206
  };
213
- })) ?? [],
214
- [INJECTIONS]: ((_b2 = sensiInjections[INJECTIONS]) == null ? void 0 : _b2.map((sensiInjection) => {
207
+ }) ?? [],
208
+ [INJECTIONS]: sensiInjections[INJECTIONS]?.map((sensiInjection) => {
215
209
  return {
216
210
  [FieldConstants.ID]: sensiInjection[CONTAINER_ID],
217
211
  [FieldConstants.NAME]: sensiInjection[CONTAINER_NAME]
218
212
  };
219
- })) ?? [],
220
- [CONTINGENCIES]: ((_c2 = sensiInjections[CONTINGENCIES]) == null ? void 0 : _c2.map((sensiInjection) => {
213
+ }) ?? [],
214
+ [CONTINGENCIES]: sensiInjections[CONTINGENCIES]?.map((sensiInjection) => {
221
215
  return {
222
216
  [FieldConstants.ID]: sensiInjection[CONTAINER_ID],
223
217
  [FieldConstants.NAME]: sensiInjection[CONTAINER_NAME]
224
218
  };
225
- })) ?? [],
219
+ }) ?? [],
226
220
  [ACTIVATED]: sensiInjections[ACTIVATED] ?? false,
227
221
  [COUNT]: 0
228
222
  };
229
- })) ?? [],
230
- [PARAMETER_SENSI_HVDC]: ((_c = parameters.sensitivityHVDC) == null ? void 0 : _c.map((sensiInjectionsSet) => {
231
- var _a2, _b2, _c2;
223
+ }) ?? [],
224
+ [PARAMETER_SENSI_HVDC]: parameters.sensitivityHVDC?.map((sensiInjectionsSet) => {
232
225
  return {
233
- [MONITORED_BRANCHES]: ((_a2 = sensiInjectionsSet[MONITORED_BRANCHES]) == null ? void 0 : _a2.map((sensiInjection) => {
226
+ [MONITORED_BRANCHES]: sensiInjectionsSet[MONITORED_BRANCHES]?.map((sensiInjection) => {
234
227
  return {
235
228
  [FieldConstants.ID]: sensiInjection[CONTAINER_ID],
236
229
  [FieldConstants.NAME]: sensiInjection[CONTAINER_NAME]
237
230
  };
238
- })) ?? [],
239
- [HVDC_LINES]: ((_b2 = sensiInjectionsSet[HVDC_LINES]) == null ? void 0 : _b2.map((sensiInjection) => {
231
+ }) ?? [],
232
+ [HVDC_LINES]: sensiInjectionsSet[HVDC_LINES]?.map((sensiInjection) => {
240
233
  return {
241
234
  [FieldConstants.ID]: sensiInjection[CONTAINER_ID],
242
235
  [FieldConstants.NAME]: sensiInjection[CONTAINER_NAME]
243
236
  };
244
- })) ?? [],
237
+ }) ?? [],
245
238
  [SENSITIVITY_TYPE]: sensiInjectionsSet[SENSITIVITY_TYPE],
246
- [CONTINGENCIES]: ((_c2 = sensiInjectionsSet[CONTINGENCIES]) == null ? void 0 : _c2.map((sensiInjection) => {
239
+ [CONTINGENCIES]: sensiInjectionsSet[CONTINGENCIES]?.map((sensiInjection) => {
247
240
  return {
248
241
  [FieldConstants.ID]: sensiInjection[CONTAINER_ID],
249
242
  [FieldConstants.NAME]: sensiInjection[CONTAINER_NAME]
250
243
  };
251
- })) ?? [],
244
+ }) ?? [],
252
245
  [ACTIVATED]: sensiInjectionsSet[ACTIVATED] ?? false,
253
246
  [COUNT]: 0
254
247
  };
255
- })) ?? [],
256
- [PARAMETER_SENSI_PST]: ((_d = parameters.sensitivityPST) == null ? void 0 : _d.map((sensiInjectionsSet) => {
257
- var _a2, _b2, _c2;
248
+ }) ?? [],
249
+ [PARAMETER_SENSI_PST]: parameters.sensitivityPST?.map((sensiInjectionsSet) => {
258
250
  return {
259
- [MONITORED_BRANCHES]: ((_a2 = sensiInjectionsSet[MONITORED_BRANCHES]) == null ? void 0 : _a2.map((sensiInjection) => {
251
+ [MONITORED_BRANCHES]: sensiInjectionsSet[MONITORED_BRANCHES]?.map((sensiInjection) => {
260
252
  return {
261
253
  [FieldConstants.ID]: sensiInjection[CONTAINER_ID],
262
254
  [FieldConstants.NAME]: sensiInjection[CONTAINER_NAME]
263
255
  };
264
- })) ?? [],
265
- [PSTS]: ((_b2 = sensiInjectionsSet[PSTS]) == null ? void 0 : _b2.map((sensiInjection) => {
256
+ }) ?? [],
257
+ [PSTS]: sensiInjectionsSet[PSTS]?.map((sensiInjection) => {
266
258
  return {
267
259
  [FieldConstants.ID]: sensiInjection[CONTAINER_ID],
268
260
  [FieldConstants.NAME]: sensiInjection[CONTAINER_NAME]
269
261
  };
270
- })) ?? [],
262
+ }) ?? [],
271
263
  [SENSITIVITY_TYPE]: sensiInjectionsSet[SENSITIVITY_TYPE],
272
- [CONTINGENCIES]: ((_c2 = sensiInjectionsSet[CONTINGENCIES]) == null ? void 0 : _c2.map((sensiInjection) => {
264
+ [CONTINGENCIES]: sensiInjectionsSet[CONTINGENCIES]?.map((sensiInjection) => {
273
265
  return {
274
266
  [FieldConstants.ID]: sensiInjection[CONTAINER_ID],
275
267
  [FieldConstants.NAME]: sensiInjection[CONTAINER_NAME]
276
268
  };
277
- })) ?? [],
269
+ }) ?? [],
278
270
  [ACTIVATED]: sensiInjectionsSet[ACTIVATED] ?? false,
279
271
  [COUNT]: 0
280
272
  };
281
- })) ?? [],
282
- [PARAMETER_SENSI_NODES]: ((_e = parameters.sensitivityNodes) == null ? void 0 : _e.map((sensiInjectionsSet) => {
283
- var _a2, _b2, _c2;
273
+ }) ?? [],
274
+ [PARAMETER_SENSI_NODES]: parameters.sensitivityNodes?.map((sensiInjectionsSet) => {
284
275
  return {
285
- [SUPERVISED_VOLTAGE_LEVELS]: ((_a2 = sensiInjectionsSet[SUPERVISED_VOLTAGE_LEVELS]) == null ? void 0 : _a2.map((sensiInjection) => {
276
+ [SUPERVISED_VOLTAGE_LEVELS]: sensiInjectionsSet[SUPERVISED_VOLTAGE_LEVELS]?.map((sensiInjection) => {
286
277
  return {
287
278
  [FieldConstants.ID]: sensiInjection[CONTAINER_ID],
288
279
  [FieldConstants.NAME]: sensiInjection[CONTAINER_NAME]
289
280
  };
290
- })) ?? [],
291
- [EQUIPMENTS_IN_VOLTAGE_REGULATION]: ((_b2 = sensiInjectionsSet[EQUIPMENTS_IN_VOLTAGE_REGULATION]) == null ? void 0 : _b2.map((sensiInjection) => {
281
+ }) ?? [],
282
+ [EQUIPMENTS_IN_VOLTAGE_REGULATION]: sensiInjectionsSet[EQUIPMENTS_IN_VOLTAGE_REGULATION]?.map((sensiInjection) => {
292
283
  return {
293
284
  [FieldConstants.ID]: sensiInjection[CONTAINER_ID],
294
285
  [FieldConstants.NAME]: sensiInjection[CONTAINER_NAME]
295
286
  };
296
- })) ?? [],
297
- [CONTINGENCIES]: ((_c2 = sensiInjectionsSet[CONTINGENCIES]) == null ? void 0 : _c2.map((sensiInjection) => {
287
+ }) ?? [],
288
+ [CONTINGENCIES]: sensiInjectionsSet[CONTINGENCIES]?.map((sensiInjection) => {
298
289
  return {
299
290
  [FieldConstants.ID]: sensiInjection[CONTAINER_ID],
300
291
  [FieldConstants.NAME]: sensiInjection[CONTAINER_NAME]
301
292
  };
302
- })) ?? [],
293
+ }) ?? [],
303
294
  [ACTIVATED]: sensiInjectionsSet[ACTIVATED] ?? false,
304
295
  [COUNT]: 0
305
296
  };
306
- })) ?? []
297
+ }) ?? []
307
298
  };
308
299
  return values;
309
300
  },
@@ -319,10 +310,7 @@ const useSensitivityAnalysisParametersForm = ({
319
310
  index
320
311
  }));
321
312
  const filteredInitEntries = entries.filter(
322
- (entry) => {
323
- var _a, _b, _c;
324
- return entry[ACTIVATED] && entry[MONITORED_BRANCHES].length > 0 && (((_a = entry[INJECTIONS]) == null ? void 0 : _a.length) > 0 || ((_b = entry[PSTS]) == null ? void 0 : _b.length) > 0 || ((_c = entry[HVDC_LINES]) == null ? void 0 : _c.length) > 0);
325
- }
313
+ (entry) => entry[ACTIVATED] && entry[MONITORED_BRANCHES].length > 0 && (entry[INJECTIONS]?.length > 0 || entry[PSTS]?.length > 0 || entry[HVDC_LINES]?.length > 0)
326
314
  );
327
315
  filteredInitEntries.forEach((entry) => {
328
316
  const originalIndex = entriesWithIndices.findIndex((obj) => obj.entry === entry);