@gridsuite/commons-ui 0.224.0 → 0.226.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 (83) hide show
  1. package/dist/components/composite/dnd-table/dnd-table.d.ts +8 -4
  2. package/dist/components/composite/dnd-table/dnd-table.js +100 -160
  3. package/dist/components/composite/dnd-table/dnd-table.type.d.ts +17 -3
  4. package/dist/components/composite/dnd-table/dnd-table.type.js +2 -0
  5. package/dist/components/composite/dnd-table/index.d.ts +6 -1
  6. package/dist/components/composite/dnd-table/index.js +6 -6
  7. package/dist/components/composite/index.js +6 -6
  8. package/dist/components/index.js +6 -6
  9. package/dist/features/index.js +16 -0
  10. package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/reactiveCapability.utils.d.ts +4 -3
  11. package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/reactiveCapability.utils.js +7 -30
  12. package/dist/features/network-modifications/common/reactiveLimits/reactiveLimits.utils.d.ts +2 -0
  13. package/dist/features/network-modifications/generator/generatorDialog.type.d.ts +0 -60
  14. package/dist/features/network-modifications/generator/index.js +17 -1
  15. package/dist/features/network-modifications/generator/modification/GeneratorDialogHeader.d.ts +6 -0
  16. package/dist/features/network-modifications/generator/modification/GeneratorDialogHeader.js +109 -0
  17. package/dist/features/network-modifications/generator/modification/GeneratorDialogTabs.d.ts +13 -0
  18. package/dist/features/network-modifications/generator/modification/GeneratorDialogTabs.js +55 -0
  19. package/dist/features/network-modifications/generator/modification/GeneratorDialogTabsContent.d.ts +12 -0
  20. package/dist/features/network-modifications/generator/modification/GeneratorDialogTabsContent.js +277 -0
  21. package/dist/features/network-modifications/generator/modification/GeneratorModificationForm.d.ts +10 -0
  22. package/dist/features/network-modifications/generator/modification/GeneratorModificationForm.js +52 -0
  23. package/dist/features/network-modifications/generator/modification/generatorModification.types.d.ts +3 -5
  24. package/dist/features/network-modifications/generator/modification/generatorModification.utils.d.ts +140 -0
  25. package/dist/features/network-modifications/generator/modification/generatorModification.utils.js +211 -0
  26. package/dist/features/network-modifications/generator/modification/generatorTabs.utils.d.ts +8 -0
  27. package/dist/features/network-modifications/generator/modification/generatorTabs.utils.js +56 -0
  28. package/dist/features/network-modifications/generator/modification/index.d.ts +6 -0
  29. package/dist/features/network-modifications/generator/modification/index.js +18 -1
  30. package/dist/features/network-modifications/index.js +16 -0
  31. package/dist/features/parameters/common/contingency-table/columns-definitions.d.ts +1 -1
  32. package/dist/features/parameters/common/contingency-table/columns-definitions.js +1 -1
  33. package/dist/features/parameters/common/parameter-table-field/parameter-table-field.js +2 -2
  34. package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js +1 -1
  35. package/dist/features/parameters/dynamic-margin-calculation/loads-variations-parameters.js +1 -1
  36. package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-inline.js +1 -1
  37. package/dist/features/parameters/dynamic-simulation/dynamic-simulation-inline.js +1 -1
  38. package/dist/features/parameters/loadflow/load-flow-parameters-inline.js +1 -1
  39. package/dist/features/parameters/network-visualizations/network-visualizations-parameters-inline.js +1 -1
  40. package/dist/features/parameters/pcc-min/pcc-min-parameters-inline.js +1 -1
  41. package/dist/features/parameters/security-analysis/security-analysis-parameters-inline.js +1 -1
  42. package/dist/features/parameters/sensi/columns-definitions.js +1 -1
  43. package/dist/features/parameters/sensi/sensitivity-analysis-parameters-inline.js +1 -1
  44. package/dist/features/parameters/short-circuit/short-circuit-parameters-inline.js +1 -1
  45. package/dist/features/parameters/voltage-init/use-voltage-init-parameters-form.js +1 -1
  46. package/dist/features/parameters/voltage-init/voltage-init-form-utils.js +1 -1
  47. package/dist/features/parameters/voltage-init/voltage-init-parameters-inline.js +1 -1
  48. package/dist/features/parameters/voltage-init/voltage-limits-parameters.js +1 -1
  49. package/dist/index.js +22 -6
  50. package/dist/services/security-analysis.js +2 -3
  51. package/dist/translations/en/networkModificationsEn.d.ts +2 -0
  52. package/dist/translations/en/networkModificationsEn.js +2 -0
  53. package/dist/translations/fr/networkModificationsFr.d.ts +2 -0
  54. package/dist/translations/fr/networkModificationsFr.js +2 -0
  55. package/package.json +1 -1
  56. package/dist/components/composite/dnd-table-v2/dnd-table-add-rows-dialog.d.ts +0 -13
  57. package/dist/components/composite/dnd-table-v2/dnd-table-add-rows-dialog.js +0 -69
  58. package/dist/components/composite/dnd-table-v2/dnd-table-bottom-left-buttons.d.ts +0 -17
  59. package/dist/components/composite/dnd-table-v2/dnd-table-bottom-left-buttons.js +0 -47
  60. package/dist/components/composite/dnd-table-v2/dnd-table-bottom-right-buttons.d.ts +0 -17
  61. package/dist/components/composite/dnd-table-v2/dnd-table-bottom-right-buttons.js +0 -100
  62. package/dist/components/composite/dnd-table-v2/dnd-table.d.ts +0 -32
  63. package/dist/components/composite/dnd-table-v2/dnd-table.js +0 -375
  64. package/dist/components/composite/dnd-table-v2/dnd-table.type.d.ts +0 -70
  65. package/dist/components/composite/dnd-table-v2/dnd-table.type.js +0 -19
  66. package/dist/components/composite/dnd-table-v2/index.d.ts +0 -12
  67. package/dist/components/composite/dnd-table-v2/index.js +0 -16
  68. package/dist/features/parameters/common/parameter-table/constants.d.ts +0 -11
  69. package/dist/features/parameters/common/parameter-table/constants.js +0 -12
  70. package/dist/features/parameters/common/parameter-table/parameter-table.d.ts +0 -15
  71. package/dist/features/parameters/common/parameter-table/parameter-table.js +0 -98
  72. package/dist/features/parameters/common/parameter-table/table-cell.d.ts +0 -8
  73. package/dist/features/parameters/common/parameter-table/table-cell.js +0 -83
  74. package/dist/features/parameters/common/parameter-table/table-row.d.ts +0 -11
  75. package/dist/features/parameters/common/parameter-table/table-row.js +0 -41
  76. package/dist/features/parameters/common/parameter-table/types.d.ts +0 -26
  77. package/dist/features/parameters/common/parameter-table/types.js +0 -1
  78. /package/dist/components/composite/{dnd-table-v2 → dnd-table}/deletable-table-row.d.ts +0 -0
  79. /package/dist/components/composite/{dnd-table-v2 → dnd-table}/deletable-table-row.js +0 -0
  80. /package/dist/components/composite/{dnd-table-v2 → dnd-table}/dnd-table-row.d.ts +0 -0
  81. /package/dist/components/composite/{dnd-table-v2 → dnd-table}/dnd-table-row.js +0 -0
  82. /package/dist/components/composite/{dnd-table-v2 → dnd-table}/dnd-table-utils.d.ts +0 -0
  83. /package/dist/components/composite/{dnd-table-v2 → dnd-table}/dnd-table-utils.js +0 -0
@@ -1,83 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { TableCell } from "@mui/material";
3
- import "@mui/icons-material";
4
- import "react-intl";
5
- import "../../../../components/ui/overflowableText/OverflowableText.js";
6
- import "../../../../utils/conversionUtils.js";
7
- import "../../../../utils/types/equipmentType.js";
8
- import "react";
9
- import "react-hook-form";
10
- import "localized-countries";
11
- import "localized-countries/data/fr";
12
- import "localized-countries/data/en";
13
- import "notistack";
14
- import "../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
15
- import "yup";
16
- import { DirectoryItemsInput } from "../../../../components/ui/reactHookForm/DirectoryItemsInput.js";
17
- import { SwitchInput } from "../../../../components/ui/reactHookForm/booleans/SwitchInput.js";
18
- import { FloatInput } from "../../../../components/ui/reactHookForm/numbers/FloatInput.js";
19
- import { TextInput } from "../../../../components/ui/reactHookForm/text/TextInput.js";
20
- import "../../../../components/ui/reactHookForm/numbers/RangeInput.js";
21
- import { MuiSelectInput } from "../../../../components/ui/reactHookForm/selectInputs/MuiSelectInput.js";
22
- import { DescriptionInput } from "../../../../components/ui/reactHookForm/text/DescriptionInput.js";
23
- import "../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
24
- import "@hello-pangea/dnd";
25
- import "../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
26
- import "../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
27
- import "../../../../components/ui/treeViewFinder/TreeViewFinder.js";
28
- import "../../../../components/ui/snackbarProvider/SnackbarProvider.js";
29
- import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
30
- import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
31
- import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
32
- import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
33
- import "@material-symbols/svg-400/outlined/add_notes.svg?react";
34
- import "mui-nested-menu";
35
- import "react-resizable-panels";
36
- function EditableTableCell(arrayFormName, rowIndex, column, onRowChanged) {
37
- return /* @__PURE__ */ jsxs(
38
- TableCell,
39
- {
40
- sx: {
41
- width: column.width
42
- },
43
- children: [
44
- column.directoryItems && /* @__PURE__ */ jsx(
45
- DirectoryItemsInput,
46
- {
47
- name: `${arrayFormName}[${rowIndex}].${column.dataKey}`,
48
- equipmentTypes: column.equipmentTypes,
49
- elementType: column.elementType,
50
- titleId: column.titleId,
51
- hideErrorMessage: true,
52
- label: void 0,
53
- itemFilter: void 0,
54
- onChange: onRowChanged
55
- }
56
- ),
57
- column.menuItems && /* @__PURE__ */ jsx(
58
- MuiSelectInput,
59
- {
60
- name: `${arrayFormName}[${rowIndex}].${column.dataKey}`,
61
- options: column.equipmentTypes,
62
- size: "small",
63
- fullWidth: true
64
- }
65
- ),
66
- column.checkboxItems && /* @__PURE__ */ jsx("span", { onChange: onRowChanged, children: /* @__PURE__ */ jsx(SwitchInput, { name: `${arrayFormName}[${rowIndex}].${column.dataKey}` }) }),
67
- column.floatItems && /* @__PURE__ */ jsx(FloatInput, { name: `${arrayFormName}[${rowIndex}].${column.dataKey}` }),
68
- column.textItems && /* @__PURE__ */ jsx(
69
- TextInput,
70
- {
71
- name: `${arrayFormName}[${rowIndex}].${column.dataKey}`,
72
- formProps: { disabled: !column.editable }
73
- }
74
- ),
75
- column.descriptionItems && /* @__PURE__ */ jsx(DescriptionInput, { name: `${arrayFormName}[${rowIndex}].${column.dataKey}` })
76
- ]
77
- },
78
- column.dataKey
79
- );
80
- }
81
- export {
82
- EditableTableCell as default
83
- };
@@ -1,11 +0,0 @@
1
- import { ColumnsDef } from './types';
2
- interface TableRowComponentProps {
3
- arrayFormName: string;
4
- columnsDefinition: ColumnsDef[];
5
- index: number;
6
- handleDeleteButton: (index: number) => void;
7
- disableDelete: boolean;
8
- handleRowChanged: (a: number) => void;
9
- }
10
- export declare function TableRowComponent({ arrayFormName, columnsDefinition, index, handleDeleteButton, disableDelete, handleRowChanged, }: Readonly<TableRowComponentProps>): import("react/jsx-runtime").JSX.Element;
11
- export {};
@@ -1,41 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { TableRow, TableCell, IconButton } from "@mui/material";
3
- import { useState } from "react";
4
- import { useIntl } from "react-intl";
5
- import { Delete } from "@mui/icons-material";
6
- import { CustomTooltip } from "../../../../components/ui/tooltip/CustomTooltip.js";
7
- import EditableTableCell from "./table-cell.js";
8
- function TableRowComponent({
9
- arrayFormName,
10
- columnsDefinition,
11
- index,
12
- handleDeleteButton,
13
- disableDelete = false,
14
- handleRowChanged
15
- }) {
16
- const [isHover, setIsHover] = useState(false);
17
- const intl = useIntl();
18
- function handleHover(enter) {
19
- return setIsHover(enter);
20
- }
21
- const handleCellChanged = () => {
22
- handleRowChanged(index);
23
- };
24
- return /* @__PURE__ */ jsxs(TableRow, { onMouseEnter: () => handleHover(true), onMouseLeave: () => handleHover(false), children: [
25
- columnsDefinition.map(
26
- (column) => EditableTableCell(arrayFormName, index, column, handleCellChanged)
27
- ),
28
- !disableDelete && /* @__PURE__ */ jsx(TableCell, { sx: { width: "5rem", textAlign: "center" }, children: isHover && /* @__PURE__ */ jsx(
29
- CustomTooltip,
30
- {
31
- title: intl.formatMessage({
32
- id: "DeleteRows"
33
- }),
34
- children: /* @__PURE__ */ jsx(IconButton, { onClick: () => handleDeleteButton(index), children: /* @__PURE__ */ jsx(Delete, {}) })
35
- }
36
- ) })
37
- ] });
38
- }
39
- export {
40
- TableRowComponent
41
- };
@@ -1,26 +0,0 @@
1
- /**
2
- * Copyright (c) 2026, 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 interface Parameters {
8
- columnsDef: ColumnsDef[];
9
- name: string;
10
- }
11
- export interface ColumnsDef {
12
- label: string;
13
- dataKey: string;
14
- initialValue: boolean | string | string[] | number | null;
15
- editable?: boolean;
16
- directoryItems?: boolean;
17
- menuItems?: boolean;
18
- equipmentTypes?: any[];
19
- elementType?: string;
20
- titleId?: string;
21
- checkboxItems?: boolean;
22
- floatItems?: boolean;
23
- textItems?: boolean;
24
- descriptionItems?: boolean;
25
- width?: string;
26
- }