@gridsuite/commons-ui 0.264.0 → 0.266.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 (202) hide show
  1. package/dist/components/composite/dnd-table/dnd-table-add-rows-dialog.js +1 -1
  2. package/dist/components/composite/dnd-table/dnd-table-row.js +1 -1
  3. package/dist/components/composite/dnd-table/dnd-table.js +1 -1
  4. package/dist/components/composite/filter/FilterForm.js +1 -1
  5. package/dist/components/composite/filter/HeaderFilterForm.js +1 -1
  6. package/dist/components/composite/filter/expert/ExpertFilterForm.js +1 -1
  7. package/dist/components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js +1 -1
  8. package/dist/components/composite/report/report-viewer/log-table/log-table.js +1 -1
  9. package/dist/components/ui/csvPicker/csv-picker-confirmation-dialog.js +1 -1
  10. package/dist/components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js +1 -1
  11. package/dist/components/ui/dialogs/name-element-editor/name-element-editor-utils.js +1 -1
  12. package/dist/components/ui/icons/DatasetLinkedIcon.d.ts +2 -0
  13. package/dist/components/ui/icons/DatasetLinkedIcon.js +9 -0
  14. package/dist/components/ui/icons/EditNoteIcon.js +1 -1
  15. package/dist/features/global-filter/ui/global-filter-dropdown-panel.js +1 -1
  16. package/dist/features/global-filter/ui/global-filter-panel.js +1 -1
  17. package/dist/features/global-filter/ui/selected-global-filters.js +1 -1
  18. package/dist/features/index.js +6 -4
  19. package/dist/features/network-modification-table/columns-definition.d.ts +4 -0
  20. package/dist/features/network-modification-table/columns-definition.js +4 -0
  21. package/dist/features/network-modification-table/index.js +5 -3
  22. package/dist/features/network-modification-table/network-modification-table-styles.js +2 -2
  23. package/dist/features/network-modification-table/network-modifications-table.d.ts +1 -1
  24. package/dist/features/network-modification-table/network-modifications-table.js +15 -12
  25. package/dist/features/network-modification-table/renderers/cell-renderers.d.ts +1 -0
  26. package/dist/features/network-modification-table/renderers/cell-renderers.js +10 -0
  27. package/dist/features/network-modification-table/renderers/index.js +2 -1
  28. package/dist/features/network-modification-table/renderers/name-cell.js +3 -3
  29. package/dist/features/network-modification-table/renderers/reference-link-cell.d.ts +7 -0
  30. package/dist/features/network-modification-table/renderers/reference-link-cell.js +128 -0
  31. package/dist/features/network-modification-table/renderers/root-network-chip-cell.js +3 -1
  32. package/dist/features/network-modification-table/row/modification-row.js +76 -68
  33. package/dist/features/network-modification-table/use-modifications-drag-and-drop.js +40 -22
  34. package/dist/features/network-modification-table/use-modifications-selection.js +14 -14
  35. package/dist/features/network-modification-table/utils.d.ts +20 -12
  36. package/dist/features/network-modification-table/utils.js +102 -48
  37. package/dist/features/network-modifications/battery/creation/BatteryCreationForm.js +1 -1
  38. package/dist/features/network-modifications/battery/creation/batteryCreation.utils.js +1 -1
  39. package/dist/features/network-modifications/battery/modification/BatteryDialogHeader.js +1 -1
  40. package/dist/features/network-modifications/battery/modification/BatteryDialogTabsContent.js +1 -1
  41. package/dist/features/network-modifications/battery/modification/batteryModification.utils.js +1 -1
  42. package/dist/features/network-modifications/by-filter/assignment/assignment/assignment-form.js +1 -1
  43. package/dist/features/network-modifications/by-filter/assignment/modification-by-assignment-form.js +1 -1
  44. package/dist/features/network-modifications/by-filter/deletion/ByFilterDeletionForm.js +1 -1
  45. package/dist/features/network-modifications/by-filter/formula/formula/formula-form.js +1 -1
  46. package/dist/features/network-modifications/by-filter/formula/formula/reference-autocomplete-input.js +1 -1
  47. package/dist/features/network-modifications/by-filter/formula/modification-by-formula-form.js +1 -1
  48. package/dist/features/network-modifications/common/activePowerControl/ActivePowerControlForm.js +1 -1
  49. package/dist/features/network-modifications/common/connectivity/ConnectivityForm.js +1 -1
  50. package/dist/features/network-modifications/common/connectivity/PositionForm.js +1 -1
  51. package/dist/features/network-modifications/common/connectivity/VoltageLevelConnectivityForm.js +1 -1
  52. package/dist/features/network-modifications/common/currentLimits/LimitsPane.js +1 -1
  53. package/dist/features/network-modifications/common/currentLimits/SelectedOperationalLimitGroup.js +1 -1
  54. package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsEditor.js +1 -1
  55. package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsPropertiesSideStack.js +1 -1
  56. package/dist/features/network-modifications/common/currentLimits/limitsEditor/TemporaryLimitsTable.js +1 -1
  57. package/dist/features/network-modifications/common/currentLimits/limitsPane.utils.js +1 -1
  58. package/dist/features/network-modifications/common/measurements/BusbarSectionVoltageMeasurementsForm.js +1 -1
  59. package/dist/features/network-modifications/common/measurements/PowerWithValidityForm.js +1 -1
  60. package/dist/features/network-modifications/common/properties/PropertiesForm.js +1 -1
  61. package/dist/features/network-modifications/common/properties/PropertyForm.js +1 -1
  62. package/dist/features/network-modifications/common/reactiveLimits/ReactiveLimitsForm.js +1 -1
  63. package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/ReactiveCapabilityCurveRowForm.js +1 -1
  64. package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/ReactiveCapabilityCurveTableForm.js +1 -1
  65. package/dist/features/network-modifications/common/regulatingTerminal/RegulatingTerminalForm.js +1 -1
  66. package/dist/features/network-modifications/common/setpoints/SetPointsForm.js +1 -1
  67. package/dist/features/network-modifications/common/shortCircuit/ShortCircuitForm.js +1 -1
  68. package/dist/features/network-modifications/common/voltageRegulation/VoltageRegulationForm.js +1 -1
  69. package/dist/features/network-modifications/equipmentDeletion/EquipmentDeletionForm.js +1 -1
  70. package/dist/features/network-modifications/equipmentDeletion/equipmentDeletion.utils.js +1 -1
  71. package/dist/features/network-modifications/equipmentDeletion/hvdcLccDeletion/ShuntCompensatorSelectionForm.js +1 -1
  72. package/dist/features/network-modifications/generator/creation/GeneratorCreationForm.js +1 -1
  73. package/dist/features/network-modifications/generator/creation/generatorCreation.utils.js +1 -1
  74. package/dist/features/network-modifications/generator/modification/GeneratorDialogHeader.js +1 -1
  75. package/dist/features/network-modifications/generator/modification/GeneratorDialogTabsContent.js +1 -1
  76. package/dist/features/network-modifications/generator/modification/generatorModification.utils.js +1 -1
  77. package/dist/features/network-modifications/index.js +1 -1
  78. package/dist/features/network-modifications/line/characteristics/LineCharacteristicsPane.js +1 -1
  79. package/dist/features/network-modifications/line/common/LineDialogHeader.js +1 -1
  80. package/dist/features/network-modifications/line/common/LineDialogTabsContent.js +1 -1
  81. package/dist/features/network-modifications/line/creation/lineCreation.utils.js +1 -1
  82. package/dist/features/network-modifications/line/modification/lineModification.utils.js +1 -1
  83. package/dist/features/network-modifications/load/common/LoadDialogHeader.js +1 -1
  84. package/dist/features/network-modifications/load/creation/loadCreation.utils.js +1 -1
  85. package/dist/features/network-modifications/load/modification/loadModification.utils.js +1 -1
  86. package/dist/features/network-modifications/shunt-compensator/common/CharacteristicsForm.js +1 -1
  87. package/dist/features/network-modifications/shunt-compensator/creation/ShuntCompensatorCreationForm.js +1 -1
  88. package/dist/features/network-modifications/shunt-compensator/creation/shuntCompensatorCreation.utils.js +1 -1
  89. package/dist/features/network-modifications/shunt-compensator/modification/ShuntCompensatorModificationForm.js +1 -1
  90. package/dist/features/network-modifications/shunt-compensator/modification/shuntCompensatorModification.utils.js +1 -1
  91. package/dist/features/network-modifications/substation/creation/SubstationCreationForm.js +1 -1
  92. package/dist/features/network-modifications/substation/modification/SubstationModificationForm.js +1 -1
  93. package/dist/features/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js +1 -1
  94. package/dist/features/network-modifications/voltageLevel/creation/index.js +1 -1
  95. package/dist/features/network-modifications/voltageLevel/creation/tabs/characteristicsTab/CharacteristicsTab.js +1 -1
  96. package/dist/features/network-modifications/voltageLevel/creation/tabs/structureTab/StructureTab.js +1 -1
  97. package/dist/features/network-modifications/voltageLevel/creation/tabs/structureTab/couplingOmnibus/CouplingOmnibusForm.js +1 -1
  98. package/dist/features/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/SwitchesBetweenSections.js +1 -1
  99. package/dist/features/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationCreationSection.js +1 -1
  100. package/dist/features/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationTab.js +1 -1
  101. package/dist/features/network-modifications/voltageLevel/creation/voltageLevelCreation.utils.js +1 -1
  102. package/dist/features/network-modifications/voltageLevel/index.js +1 -1
  103. package/dist/features/network-modifications/voltageLevel/modification/VoltageLevelModificationForm.js +1 -1
  104. package/dist/features/parameters/common/contingency-table/columns-definitions.js +1 -1
  105. package/dist/features/parameters/common/limitreductions/limit-reduction-table-cell.js +1 -1
  106. package/dist/features/parameters/common/limitreductions/limit-reductions-table-form.js +1 -1
  107. package/dist/features/parameters/common/parameter-field.js +1 -1
  108. package/dist/features/parameters/common/parameter-layout/parameter-layout.js +1 -1
  109. package/dist/features/parameters/common/parameter-table-field/parameter-table-field.js +1 -1
  110. package/dist/features/parameters/common/parameters-creation-dialog.js +1 -1
  111. package/dist/features/parameters/common/provider-param.js +1 -1
  112. package/dist/features/parameters/common/voltage-level-table/custom-voltage-level-table-cell.js +1 -1
  113. package/dist/features/parameters/common/widget/parameter-float.js +1 -1
  114. package/dist/features/parameters/common/widget/parameter-line-directory-items-input.js +1 -1
  115. package/dist/features/parameters/common/widget/parameter-line-slider.js +1 -1
  116. package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.js +1 -1
  117. package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js +1 -1
  118. package/dist/features/parameters/dynamic-margin-calculation/loads-variations-parameters.js +1 -1
  119. package/dist/features/parameters/dynamic-margin-calculation/use-dynamic-margin-calculation-parameters-form.js +1 -1
  120. package/dist/features/parameters/dynamic-security-analysis/contingency-parameters.js +1 -1
  121. package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-inline.js +1 -1
  122. package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-parameters-form.js +1 -1
  123. package/dist/features/parameters/dynamic-security-analysis/use-dynamic-security-analysis-parameters-form.js +1 -1
  124. package/dist/features/parameters/dynamic-simulation/dynamic-simulation-inline.js +1 -1
  125. package/dist/features/parameters/dynamic-simulation/dynamic-simulation-parameters-form.js +1 -1
  126. package/dist/features/parameters/dynamic-simulation/mapping/mapping-parameters-utils.js +1 -1
  127. package/dist/features/parameters/dynamic-simulation/mapping/mapping-parameters.js +1 -1
  128. package/dist/features/parameters/dynamic-simulation/use-dynamic-simulation-parameters-form.js +1 -1
  129. package/dist/features/parameters/loadflow/load-flow-advanced-parameters.js +1 -1
  130. package/dist/features/parameters/loadflow/load-flow-general-parameters.js +1 -1
  131. package/dist/features/parameters/loadflow/load-flow-parameters-content.js +1 -1
  132. package/dist/features/parameters/loadflow/load-flow-parameters-dialog.js +1 -1
  133. package/dist/features/parameters/loadflow/load-flow-parameters-header.js +1 -1
  134. package/dist/features/parameters/loadflow/load-flow-parameters-inline.js +1 -1
  135. package/dist/features/parameters/loadflow/load-flow-parameters-utils.js +1 -1
  136. package/dist/features/parameters/loadflow/load-flow-provider-specific-parameters.js +1 -1
  137. package/dist/features/parameters/loadflow/use-load-flow-parameters-form.js +1 -1
  138. package/dist/features/parameters/network-visualizations/map-parameters.js +1 -1
  139. package/dist/features/parameters/network-visualizations/network-area-diagram-parameters.js +1 -1
  140. package/dist/features/parameters/network-visualizations/network-visualizations-form.js +1 -1
  141. package/dist/features/parameters/network-visualizations/network-visualizations-parameters-dialog.js +1 -1
  142. package/dist/features/parameters/network-visualizations/network-visualizations-parameters-inline.js +1 -1
  143. package/dist/features/parameters/network-visualizations/single-line-diagram-parameters.js +1 -1
  144. package/dist/features/parameters/network-visualizations/use-network-visualizations-parameters-form.js +1 -1
  145. package/dist/features/parameters/pcc-min/pcc-min-form-utils.js +1 -1
  146. package/dist/features/parameters/pcc-min/pcc-min-parameters-dialog.js +1 -1
  147. package/dist/features/parameters/pcc-min/pcc-min-parameters-inline.js +1 -1
  148. package/dist/features/parameters/pcc-min/use-pcc-min-parameters-form.js +1 -1
  149. package/dist/features/parameters/security-analysis/columns-definitions.js +1 -1
  150. package/dist/features/parameters/security-analysis/security-analysis-parameters-content.js +1 -1
  151. package/dist/features/parameters/security-analysis/security-analysis-parameters-dialog.js +1 -1
  152. package/dist/features/parameters/security-analysis/security-analysis-parameters-form.js +1 -1
  153. package/dist/features/parameters/security-analysis/security-analysis-parameters-inline.js +1 -1
  154. package/dist/features/parameters/security-analysis/security-analysis-parameters-utils.js +1 -1
  155. package/dist/features/parameters/security-analysis/security-analysis-violations-hiding.js +1 -1
  156. package/dist/features/parameters/security-analysis/use-security-analysis-parameters-form.js +1 -1
  157. package/dist/features/parameters/sensi/columns-definitions.js +1 -1
  158. package/dist/features/parameters/sensi/sensitivity-analysis-parameters-dialog.js +1 -1
  159. package/dist/features/parameters/sensi/sensitivity-analysis-parameters-form.js +1 -1
  160. package/dist/features/parameters/sensi/sensitivity-analysis-parameters-inline.js +1 -1
  161. package/dist/features/parameters/sensi/sensitivity-parameters-fields.js +1 -1
  162. package/dist/features/parameters/sensi/sensitivity-parameters-selector.js +1 -1
  163. package/dist/features/parameters/sensi/use-sensitivity-analysis-parameters.js +1 -1
  164. package/dist/features/parameters/sensi/utils.js +1 -1
  165. package/dist/features/parameters/short-circuit/short-circuit-general-tab-panel.js +1 -1
  166. package/dist/features/parameters/short-circuit/short-circuit-icc-cluster-table-cell.js +1 -1
  167. package/dist/features/parameters/short-circuit/short-circuit-icc-material-table-cell.js +1 -1
  168. package/dist/features/parameters/short-circuit/short-circuit-parameters-content.js +1 -1
  169. package/dist/features/parameters/short-circuit/short-circuit-parameters-dialog.js +1 -1
  170. package/dist/features/parameters/short-circuit/short-circuit-parameters-inline.js +1 -1
  171. package/dist/features/parameters/short-circuit/short-circuit-parameters-utils.js +1 -1
  172. package/dist/features/parameters/short-circuit/short-circuit-power-electronics-tab-panel.js +1 -1
  173. package/dist/features/parameters/short-circuit/short-circuit-study-area-tab-panel.js +1 -1
  174. package/dist/features/parameters/short-circuit/use-short-circuit-parameters-form.js +1 -1
  175. package/dist/features/parameters/voltage-init/equipment-selection-parameters.js +1 -1
  176. package/dist/features/parameters/voltage-init/general-parameters.js +1 -1
  177. package/dist/features/parameters/voltage-init/use-voltage-init-parameters-form.js +1 -1
  178. package/dist/features/parameters/voltage-init/voltage-init-form-utils.js +1 -1
  179. package/dist/features/parameters/voltage-init/voltage-init-parameters-dialog.js +1 -1
  180. package/dist/features/parameters/voltage-init/voltage-init-parameters-form.js +1 -1
  181. package/dist/features/parameters/voltage-init/voltage-init-parameters-inline.js +1 -1
  182. package/dist/features/parameters/voltage-init/voltage-limits-parameters.js +1 -1
  183. package/dist/features/process-configs/common/process-config-modifications-edition.js +1 -1
  184. package/dist/features/process-configs/lf-process-config-edition-dialog.js +1 -1
  185. package/dist/features/process-configs/loadflow/lf-process-config-edition.js +1 -1
  186. package/dist/features/process-configs/loadflow/lf-process-config-edition.utils.js +1 -1
  187. package/dist/features/process-configs/process-config.utils.js +1 -1
  188. package/dist/features/process-configs/sa-process-config-edition-dialog.js +1 -1
  189. package/dist/features/process-configs/security-analysis/sa-process-config-edition.js +1 -1
  190. package/dist/features/process-configs/security-analysis/sa-process-config-edition.utils.js +1 -1
  191. package/dist/features/results/securityanalysis/security-analysis-result-nmk.js +1 -1
  192. package/dist/features/results/securityanalysis/security-analysis-table.js +1 -1
  193. package/dist/index.js +6 -5
  194. package/dist/services/index.js +1 -2
  195. package/dist/services/networkModification.d.ts +0 -1
  196. package/dist/services/networkModification.js +5 -10
  197. package/dist/translations/en/networkModificationsEn.d.ts +3 -0
  198. package/dist/translations/en/networkModificationsEn.js +4 -1
  199. package/dist/translations/fr/networkModificationsFr.d.ts +3 -0
  200. package/dist/translations/fr/networkModificationsFr.js +4 -1
  201. package/dist/utils/types/network-modification-metadata.d.ts +13 -1
  202. package/package.json +1 -1
@@ -20,7 +20,7 @@ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
20
20
  import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
21
21
  import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
22
22
  import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
23
- import "@material-symbols/svg-400/outlined/add_notes.svg?react";
23
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
24
24
  import "../../ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
25
25
  import "../../ui/reactHookForm/expandableInput/ExpandableInput.js";
26
26
  import "../../ui/reactHookForm/directory-item-input/directory-item-utils.js";
@@ -38,7 +38,7 @@ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
38
38
  import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
39
39
  import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
40
40
  import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
41
- import "@material-symbols/svg-400/outlined/add_notes.svg?react";
41
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
42
42
  import "mui-nested-menu";
43
43
  import "react-resizable-panels";
44
44
  import "react-papaparse";
@@ -29,7 +29,7 @@ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
29
29
  import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
30
30
  import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
31
31
  import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
32
- import "@material-symbols/svg-400/outlined/add_notes.svg?react";
32
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
33
33
  import "../../ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
34
34
  import "../../ui/reactHookForm/expandableInput/ExpandableInput.js";
35
35
  import "../../ui/reactHookForm/directory-item-input/directory-item-utils.js";
@@ -27,7 +27,7 @@ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
27
27
  import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
28
28
  import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
29
29
  import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
30
- import "@material-symbols/svg-400/outlined/add_notes.svg?react";
30
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
31
31
  import "../../ui/reactHookForm/expandableInput/ExpandableInput.js";
32
32
  import "../../ui/reactHookForm/directory-item-input/directory-item-utils.js";
33
33
  function FilterForm({
@@ -25,7 +25,7 @@ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
25
25
  import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
26
26
  import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
27
27
  import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
28
- import "@material-symbols/svg-400/outlined/add_notes.svg?react";
28
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
29
29
  import "../../ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
30
30
  import "../../ui/reactHookForm/expandableInput/ExpandableInput.js";
31
31
  import "../../ui/reactHookForm/directory-item-input/directory-item-utils.js";
@@ -35,7 +35,7 @@ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
35
35
  import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
36
36
  import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
37
37
  import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
38
- import "@material-symbols/svg-400/outlined/add_notes.svg?react";
38
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
39
39
  import "../../../ui/reactHookForm/expandableInput/ExpandableInput.js";
40
40
  import "../../../ui/reactHookForm/directory-item-input/directory-item-utils.js";
41
41
  import "../../../ui/snackbarProvider/SnackbarProvider.js";
@@ -36,7 +36,7 @@ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
36
36
  import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
37
37
  import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
38
38
  import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
39
- import "@material-symbols/svg-400/outlined/add_notes.svg?react";
39
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
40
40
  import "../../../ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
41
41
  import "../../../ui/reactHookForm/expandableInput/ExpandableInput.js";
42
42
  import "../../../ui/reactHookForm/directory-item-input/directory-item-utils.js";
@@ -32,7 +32,7 @@ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
32
32
  import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
33
33
  import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
34
34
  import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
35
- import "@material-symbols/svg-400/outlined/add_notes.svg?react";
35
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
36
36
  import "../../../../ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
37
37
  import "../../../../ui/reactHookForm/expandableInput/ExpandableInput.js";
38
38
  import "../../../../ui/reactHookForm/directory-item-input/directory-item-utils.js";
@@ -20,7 +20,7 @@ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
20
20
  import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
21
21
  import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
22
22
  import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
23
- import "@material-symbols/svg-400/outlined/add_notes.svg?react";
23
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
24
24
  import "../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
25
25
  import "../reactHookForm/expandableInput/ExpandableInput.js";
26
26
  import "../reactHookForm/directory-item-input/directory-item-utils.js";
@@ -27,7 +27,7 @@ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
27
27
  import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
28
28
  import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
29
29
  import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
30
- import "@material-symbols/svg-400/outlined/add_notes.svg?react";
30
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
31
31
  import "../descriptionModificationDialog/DescriptionModificationDialog.js";
32
32
  import "../../reactHookForm/expandableInput/ExpandableInput.js";
33
33
  import "../../reactHookForm/directory-item-input/directory-item-utils.js";
@@ -20,7 +20,7 @@ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
20
20
  import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
21
21
  import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
22
22
  import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
23
- import "@material-symbols/svg-400/outlined/add_notes.svg?react";
23
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
24
24
  import "../descriptionModificationDialog/DescriptionModificationDialog.js";
25
25
  import "../../reactHookForm/expandableInput/ExpandableInput.js";
26
26
  import "../../reactHookForm/directory-item-input/directory-item-utils.js";
@@ -0,0 +1,2 @@
1
+ import { SvgIconProps } from '@mui/material';
2
+ export declare function DatasetLinkedIcon(props: SvgIconProps): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import DatasetLinked from "@material-symbols/svg-400/outlined/dataset_linked-fill.svg?react";
3
+ import { SvgIcon } from "@mui/material";
4
+ function DatasetLinkedIcon(props) {
5
+ return /* @__PURE__ */ jsx(SvgIcon, { component: DatasetLinked, inheritViewBox: true, ...props });
6
+ }
7
+ export {
8
+ DatasetLinkedIcon
9
+ };
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import AddNotes from "@material-symbols/svg-400/outlined/add_notes.svg?react";
2
+ import AddNotes from "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
3
3
  import { SvgIcon } from "@mui/material";
4
4
  import { StickyNote2Outlined } from "@mui/icons-material";
5
5
  function EditNoteIcon({ empty = false, ...props }) {
@@ -27,7 +27,7 @@ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
27
27
  import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
28
28
  import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
29
29
  import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
30
- import "@material-symbols/svg-400/outlined/add_notes.svg?react";
30
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
31
31
  import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
32
32
  import "../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
33
33
  import "../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
@@ -25,7 +25,7 @@ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
25
25
  import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
26
26
  import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
27
27
  import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
28
- import "@material-symbols/svg-400/outlined/add_notes.svg?react";
28
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
29
29
  import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
30
30
  import "../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
31
31
  import "../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
@@ -24,7 +24,7 @@ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
24
24
  import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
25
25
  import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
26
26
  import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
27
- import "@material-symbols/svg-400/outlined/add_notes.svg?react";
27
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
28
28
  import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
29
29
  import "../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
30
30
  import "../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
@@ -146,7 +146,7 @@ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
146
146
  import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
147
147
  import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
148
148
  import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
149
- import "@material-symbols/svg-400/outlined/add_notes.svg?react";
149
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
150
150
  import "../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
151
151
  import "../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
152
152
  import "../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
@@ -218,7 +218,7 @@ import { COLUMNS_WITHOUT_BORDER, DEPTH_CELL_WIDTH, DROP_FORBIDDEN_INDICATOR_BOTT
218
218
  import { AUTO_EXTENSIBLE_COLUMNS, BASE_MODIFICATION_TABLE_COLUMNS, computeTagMinSize } from "./network-modification-table/columns-definition.js";
219
219
  import { NetworkModificationsTable } from "./network-modification-table/network-modifications-table.js";
220
220
  import { useModificationsDragAndDrop } from "./network-modification-table/use-modifications-drag-and-drop.js";
221
- import { DescriptionCellRenderer, DragHandleRenderer, NameCellRenderer, NameHeaderRenderer, RootNetworkCellRenderer, RootNetworkHeaderRenderer, SelectCellRenderer, SelectHeaderRenderer, SwitchCellRenderer } from "./network-modification-table/renderers/cell-renderers.js";
221
+ import { DescriptionCellRenderer, DragHandleRenderer, NameCellRenderer, NameHeaderRenderer, ReferenceCellRenderer, RootNetworkCellRenderer, RootNetworkHeaderRenderer, SelectCellRenderer, SelectHeaderRenderer, SwitchCellRenderer } from "./network-modification-table/renderers/cell-renderers.js";
222
222
  import { DepthBox } from "./network-modification-table/renderers/depth-box.js";
223
223
  import { DescriptionCell } from "./network-modification-table/renderers/description-cell.js";
224
224
  import { DragHandleCell } from "./network-modification-table/renderers/drag-handle-cell.js";
@@ -230,7 +230,7 @@ import { SelectHeaderCell } from "./network-modification-table/renderers/select-
230
230
  import { SwitchCell } from "./network-modification-table/renderers/switch-cell.js";
231
231
  import { DragCloneRow } from "./network-modification-table/row/drag-row-clone.js";
232
232
  import { ModificationRow } from "./network-modification-table/row/modification-row.js";
233
- import { MAX_COMPOSITE_NESTING_DEPTH, fetchSubModificationsForExpandedRows, findAllLoadedCompositeModifications, findDepth, findModificationInTree, formatToComposedModification, isCompositeModification, isSharedModification, mergeSubModificationsIntoTree, moveSubModificationInTree, removeUuidsFromTree, updateModificationFieldInTree, updateSubModificationsOfACompositeInTree } from "./network-modification-table/utils.js";
233
+ import { MAX_COMPOSITE_NESTING_DEPTH, fetchSubModificationsForExpandedRows, findAllLoadedCompositeModifications, findDepth, findModificationInTree, formatToComposedModification, isCompositeModification, isReferenceModification, isTargetChildOfReference, mergeSubModificationsIntoTree, moveSubModificationInTree, removeUuidsFromTree, updateModificationFieldInTree, updateSubModificationsOfACompositeInTree } from "./network-modification-table/utils.js";
234
234
  import { AnnouncementBanner } from "./announcement/AnnouncementBanner.js";
235
235
  import { AnnouncementNotification } from "./announcement/AnnouncementNotification.js";
236
236
  import { useGlobalAnnouncement } from "./announcement/useGlobalAnnouncement.js";
@@ -503,6 +503,7 @@ export {
503
503
  ReactiveCapabilityCurveRowForm,
504
504
  ReactiveCapabilityCurveTableForm,
505
505
  ReactiveLimitsForm,
506
+ ReferenceCellRenderer,
506
507
  RegulatingTerminalForm,
507
508
  RootNetworkCellRenderer,
508
509
  RootNetworkChipCell,
@@ -776,7 +777,8 @@ export {
776
777
  isCriteriaFilterType,
777
778
  isEditingGlobalFilter,
778
779
  isProcessType,
779
- isSharedModification,
780
+ isReferenceModification,
781
+ isTargetChildOfReference,
780
782
  isValidComputingType,
781
783
  isValidContingencyRow,
782
784
  italicFontTextField,
@@ -20,5 +20,9 @@ export declare const BASE_MODIFICATION_TABLE_COLUMNS: {
20
20
  id: string;
21
21
  autoExtensible: boolean;
22
22
  };
23
+ SHARED: {
24
+ id: string;
25
+ autoExtensible: boolean;
26
+ };
23
27
  };
24
28
  export declare const AUTO_EXTENSIBLE_COLUMNS: string[];
@@ -26,6 +26,10 @@ const BASE_MODIFICATION_TABLE_COLUMNS = {
26
26
  SWITCH: {
27
27
  id: "switch",
28
28
  autoExtensible: false
29
+ },
30
+ SHARED: {
31
+ id: "shared",
32
+ autoExtensible: false
29
33
  }
30
34
  };
31
35
  const AUTO_EXTENSIBLE_COLUMNS = Object.values(BASE_MODIFICATION_TABLE_COLUMNS).filter((column) => column.autoExtensible).map((column) => column.id);
@@ -2,7 +2,7 @@ import { COLUMNS_WITHOUT_BORDER, DEPTH_CELL_WIDTH, DROP_FORBIDDEN_INDICATOR_BOTT
2
2
  import { AUTO_EXTENSIBLE_COLUMNS, BASE_MODIFICATION_TABLE_COLUMNS, computeTagMinSize } from "./columns-definition.js";
3
3
  import { NetworkModificationsTable } from "./network-modifications-table.js";
4
4
  import { useModificationsDragAndDrop } from "./use-modifications-drag-and-drop.js";
5
- import { DescriptionCellRenderer, DragHandleRenderer, NameCellRenderer, NameHeaderRenderer, RootNetworkCellRenderer, RootNetworkHeaderRenderer, SelectCellRenderer, SelectHeaderRenderer, SwitchCellRenderer } from "./renderers/cell-renderers.js";
5
+ import { DescriptionCellRenderer, DragHandleRenderer, NameCellRenderer, NameHeaderRenderer, ReferenceCellRenderer, RootNetworkCellRenderer, RootNetworkHeaderRenderer, SelectCellRenderer, SelectHeaderRenderer, SwitchCellRenderer } from "./renderers/cell-renderers.js";
6
6
  import { DepthBox } from "./renderers/depth-box.js";
7
7
  import { DescriptionCell } from "./renderers/description-cell.js";
8
8
  import { DragHandleCell } from "./renderers/drag-handle-cell.js";
@@ -14,7 +14,7 @@ import { SelectHeaderCell } from "./renderers/select-header-cell.js";
14
14
  import { SwitchCell } from "./renderers/switch-cell.js";
15
15
  import { DragCloneRow } from "./row/drag-row-clone.js";
16
16
  import { ModificationRow } from "./row/modification-row.js";
17
- import { MAX_COMPOSITE_NESTING_DEPTH, fetchSubModificationsForExpandedRows, findAllLoadedCompositeModifications, findDepth, findModificationInTree, formatToComposedModification, isCompositeModification, isSharedModification, mergeSubModificationsIntoTree, moveSubModificationInTree, removeUuidsFromTree, updateModificationFieldInTree, updateSubModificationsOfACompositeInTree } from "./utils.js";
17
+ import { MAX_COMPOSITE_NESTING_DEPTH, fetchSubModificationsForExpandedRows, findAllLoadedCompositeModifications, findDepth, findModificationInTree, formatToComposedModification, isCompositeModification, isReferenceModification, isTargetChildOfReference, mergeSubModificationsIntoTree, moveSubModificationInTree, removeUuidsFromTree, updateModificationFieldInTree, updateSubModificationsOfACompositeInTree } from "./utils.js";
18
18
  export {
19
19
  AUTO_EXTENSIBLE_COLUMNS,
20
20
  BASE_MODIFICATION_TABLE_COLUMNS,
@@ -38,6 +38,7 @@ export {
38
38
  NameHeaderRenderer,
39
39
  NetworkModificationEditorNameHeader,
40
40
  NetworkModificationsTable,
41
+ ReferenceCellRenderer,
41
42
  RootNetworkCellRenderer,
42
43
  RootNetworkChipCell,
43
44
  RootNetworkHeaderRenderer,
@@ -64,7 +65,8 @@ export {
64
65
  findModificationInTree,
65
66
  formatToComposedModification,
66
67
  isCompositeModification,
67
- isSharedModification,
68
+ isReferenceModification,
69
+ isTargetChildOfReference,
68
70
  mergeSubModificationsIntoTree,
69
71
  moveSubModificationInTree,
70
72
  networkModificationTableStyles,
@@ -182,11 +182,11 @@ const DROP_INDICATOR_TOP = "inset 0 2px 0 #90caf9";
182
182
  const DROP_INDICATOR_BOTTOM = "inset 0 -2px 0 #90caf9";
183
183
  const DROP_FORBIDDEN_INDICATOR_TOP = "inset 0 2px 0 #FF3636";
184
184
  const DROP_FORBIDDEN_INDICATOR_BOTTOM = "inset 0 -2px 0 #FF3636";
185
- function getRowBackgroundColor(isHighlighted, isComposite, theme) {
185
+ function getRowBackgroundColor(isHighlighted, isCompositeOrIsReference, theme) {
186
186
  if (isHighlighted) {
187
187
  return HIGHLIGHT_COLOR_BASE;
188
188
  }
189
- if (!isComposite) {
189
+ if (!isCompositeOrIsReference) {
190
190
  return "transparent";
191
191
  }
192
192
  return theme.palette.mode === "light" ? theme.darken(theme.palette.background.paper, 0.04) : theme.lighten(theme.palette.background.paper, 0.08);
@@ -5,7 +5,7 @@ import { NetworkModificationEditorNameHeaderProps } from './renderers';
5
5
  import { ExcludedNetworkModifications, RootNetworkRowInfo, ComposedModificationMetadata, NetworkModificationMetadata } from '../../utils';
6
6
  interface NetworkModificationsTableProps extends Omit<NetworkModificationEditorNameHeaderProps, 'modificationCount'> {
7
7
  modifications: NetworkModificationMetadata[];
8
- handleCellClick: (modification: NetworkModificationMetadata) => void;
8
+ handleCellClick: (modification: ComposedModificationMetadata) => void;
9
9
  isRowDragDisabled?: boolean;
10
10
  onRowDragStart: () => void;
11
11
  onRowDragEnd: () => void;
@@ -8,7 +8,7 @@ import { MODIFICATION_ROW_HEIGHT, networkModificationTableStyles, createHeaderCe
8
8
  import { AUTO_EXTENSIBLE_COLUMNS } from "./columns-definition.js";
9
9
  import { useModificationsDragAndDrop } from "./use-modifications-drag-and-drop.js";
10
10
  import { useModificationsSelection } from "./use-modifications-selection.js";
11
- import { formatToComposedModification, findDepth, MAX_COMPOSITE_NESTING_DEPTH, mergeSubModificationsIntoTree, removeUuidsFromTree, findAllLoadedCompositeModifications, fetchSubModificationsForExpandedRows, isCompositeModification } from "./utils.js";
11
+ import { formatToComposedModification, findDepth, MAX_COMPOSITE_NESTING_DEPTH, mergeSubModificationsIntoTree, removeUuidsFromTree, findAllLoadedCompositeModifications, fetchSubModificationsForExpandedRows, isCompositeModification, isReferenceModification } from "./utils.js";
12
12
  import "@mui/icons-material";
13
13
  import "react-intl";
14
14
  import "../../utils/conversionUtils.js";
@@ -85,7 +85,7 @@ function NetworkModificationsTable({
85
85
  findAllLoadedCompositeModifications(prevMods, loadedComposites);
86
86
  if (loadedComposites.length > 0) {
87
87
  fetchSubModificationsForExpandedRows(
88
- loadedComposites.map((m) => m.uuid),
88
+ loadedComposites.map((m) => m.rowKey),
89
89
  nextMods,
90
90
  setComposedModifications,
91
91
  true
@@ -97,9 +97,11 @@ function NetworkModificationsTable({
97
97
  const nextExpanded = typeof updater === "function" ? updater(prevExpanded) : updater;
98
98
  const prevRecord = prevExpanded === true ? {} : prevExpanded;
99
99
  const nextRecord = nextExpanded === true ? {} : nextExpanded;
100
- const newlyExpandedIds = Object.keys(nextRecord).filter((id) => nextRecord[id] && !prevRecord[id]);
100
+ const newlyExpandedRowKeys = Object.keys(nextRecord).filter(
101
+ (id) => nextRecord[id] && !prevRecord[id]
102
+ );
101
103
  setComposedModifications((prevMods) => {
102
- fetchSubModificationsForExpandedRows(newlyExpandedIds, prevMods, setComposedModifications);
104
+ fetchSubModificationsForExpandedRows(newlyExpandedRowKeys, prevMods, setComposedModifications);
103
105
  return [...prevMods];
104
106
  });
105
107
  return nextExpanded;
@@ -157,9 +159,9 @@ function NetworkModificationsTable({
157
159
  state: { expanded, rowSelection },
158
160
  getCoreRowModel: getCoreRowModel(),
159
161
  getExpandedRowModel: getExpandedRowModel(),
160
- getSubRows: (row) => row.subModifications,
161
- getRowId: (row) => row.uuid,
162
- getRowCanExpand: (row) => isCompositeModification(row.original),
162
+ getSubRows: (originalRow) => originalRow.subModifications,
163
+ getRowId: (originalRow) => originalRow.rowKey,
164
+ getRowCanExpand: (row) => isCompositeModification(row.original) || isReferenceModification(row.original),
163
165
  enableRowSelection: true,
164
166
  enableSubRowSelection: true,
165
167
  enableExpanding: true,
@@ -192,15 +194,16 @@ function NetworkModificationsTable({
192
194
  return;
193
195
  }
194
196
  table.resetRowSelection();
195
- const uuidsToReset = new Set(modificationUuidsToReset);
197
+ const targetUuids = new Set(modificationUuidsToReset);
198
+ const rowKeysToUnexpanded = /* @__PURE__ */ new Set();
196
199
  const collectAll = (mod) => {
197
- uuidsToReset.add(mod.uuid);
200
+ rowKeysToUnexpanded.add(mod.rowKey);
198
201
  mod.subModifications?.forEach(collectAll);
199
202
  };
200
203
  const collectDescendants = (mods) => {
201
204
  mods.forEach((mod) => {
202
- if (uuidsToReset.has(mod.uuid)) {
203
- mod.subModifications?.forEach(collectAll);
205
+ if (targetUuids.has(mod.uuid)) {
206
+ collectAll(mod);
204
207
  } else {
205
208
  collectDescendants(mod.subModifications ?? []);
206
209
  }
@@ -212,7 +215,7 @@ function NetworkModificationsTable({
212
215
  return prev;
213
216
  }
214
217
  const next = { ...prev };
215
- uuidsToReset.forEach((uuid) => delete next[uuid]);
218
+ rowKeysToUnexpanded.forEach((rowKey) => delete next[rowKey]);
216
219
  return next;
217
220
  });
218
221
  }, [modificationUuidsToReset, table]);
@@ -17,6 +17,7 @@ export declare function SelectCellRenderer({ row, table }: CCtx): import("react"
17
17
  export declare function NameHeaderRenderer({ table }: HCtx): import("react").JSX.Element;
18
18
  export declare function NameCellRenderer({ row, table, column }: CCtx): import("react").JSX.Element;
19
19
  export declare function DescriptionCellRenderer({ row, table }: CCtx): import("react").JSX.Element;
20
+ export declare function ReferenceCellRenderer({ row, table }: CCtx): import("react").JSX.Element | null;
20
21
  export declare function SwitchCellRenderer({ row, table }: CCtx): import("react").JSX.Element;
21
22
  export declare function RootNetworkHeaderRenderer({ column, table }: HCtx): import("react").JSX.Element | null;
22
23
  export declare function RootNetworkCellRenderer({ row, column, table }: CCtx): import("react").JSX.Element | null;
@@ -11,6 +11,8 @@ import { DescriptionCell } from "./description-cell.js";
11
11
  import { SwitchCell } from "./switch-cell.js";
12
12
  import { RootNetworkChipCell } from "./root-network-chip-cell.js";
13
13
  import { createRootNetworkChipCellSx, networkModificationTableStyles } from "../network-modification-table-styles.js";
14
+ import { isReferenceModification } from "../utils.js";
15
+ import { ReferenceLinkCell } from "./reference-link-cell.js";
14
16
  function DragHandleRenderer({ table }) {
15
17
  return /* @__PURE__ */ jsx(DragHandleCell, { isRowDragDisabled: table.options.meta?.interaction.isRowDragDisabled ?? false });
16
18
  }
@@ -48,6 +50,13 @@ function DescriptionCellRenderer({ row, table }) {
48
50
  }
49
51
  );
50
52
  }
53
+ function ReferenceCellRenderer({ row, table }) {
54
+ const { meta } = table.options;
55
+ if (isReferenceModification(row.original)) {
56
+ return /* @__PURE__ */ jsx(ReferenceLinkCell, { data: row.original, disabled: meta?.status.isDisabled });
57
+ }
58
+ return null;
59
+ }
51
60
  function SwitchCellRenderer({ row, table }) {
52
61
  const { meta } = table.options;
53
62
  return /* @__PURE__ */ jsx(
@@ -95,6 +104,7 @@ export {
95
104
  DragHandleRenderer,
96
105
  NameCellRenderer,
97
106
  NameHeaderRenderer,
107
+ ReferenceCellRenderer,
98
108
  RootNetworkCellRenderer,
99
109
  RootNetworkHeaderRenderer,
100
110
  SelectCellRenderer,
@@ -1,4 +1,4 @@
1
- import { DescriptionCellRenderer, DragHandleRenderer, NameCellRenderer, NameHeaderRenderer, RootNetworkCellRenderer, RootNetworkHeaderRenderer, SelectCellRenderer, SelectHeaderRenderer, SwitchCellRenderer } from "./cell-renderers.js";
1
+ import { DescriptionCellRenderer, DragHandleRenderer, NameCellRenderer, NameHeaderRenderer, ReferenceCellRenderer, RootNetworkCellRenderer, RootNetworkHeaderRenderer, SelectCellRenderer, SelectHeaderRenderer, SwitchCellRenderer } from "./cell-renderers.js";
2
2
  import { DepthBox } from "./depth-box.js";
3
3
  import { DescriptionCell } from "./description-cell.js";
4
4
  import { DragHandleCell } from "./drag-handle-cell.js";
@@ -18,6 +18,7 @@ export {
18
18
  NameCellRenderer,
19
19
  NameHeaderRenderer,
20
20
  NetworkModificationEditorNameHeader,
21
+ ReferenceCellRenderer,
21
22
  RootNetworkCellRenderer,
22
23
  RootNetworkChipCell,
23
24
  RootNetworkHeaderRenderer,
@@ -23,7 +23,7 @@ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
23
23
  import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
24
24
  import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
25
25
  import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
26
- import "@material-symbols/svg-400/outlined/add_notes.svg?react";
26
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
27
27
  import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
28
28
  import "../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
29
29
  import "../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
@@ -211,7 +211,7 @@ function NameCell({ row, table, onChange }) {
211
211
  children: [
212
212
  renderDepthBox(),
213
213
  /* @__PURE__ */ jsxs(Box, { sx: networkModificationTableStyles.nameCellInnerRow, children: [
214
- isComposite && /* @__PURE__ */ jsx(Box, { sx: networkModificationTableStyles.nameCellTogglerBox, children: /* @__PURE__ */ jsx(
214
+ row.getCanExpand() && /* @__PURE__ */ jsx(Box, { sx: networkModificationTableStyles.nameCellTogglerBox, children: /* @__PURE__ */ jsx(
215
215
  IconButton,
216
216
  {
217
217
  size: "small",
@@ -224,7 +224,7 @@ function NameCell({ row, table, onChange }) {
224
224
  children: row.getIsExpanded() ? /* @__PURE__ */ jsx(KeyboardArrowDown, { fontSize: "small" }) : /* @__PURE__ */ jsx(KeyboardArrowRight, { fontSize: "small" })
225
225
  }
226
226
  ) }),
227
- /* @__PURE__ */ jsx(Box, { sx: createNameCellLabelBoxSx(row.getIsExpanded(), depth), children: isComposite && isEditing ? /* @__PURE__ */ jsx(
227
+ /* @__PURE__ */ jsx(Box, { sx: createNameCellLabelBoxSx(row.getIsExpanded(), depth), children: isEditing ? /* @__PURE__ */ jsx(
228
228
  Box,
229
229
  {
230
230
  sx: mergeSx(networkModificationTableStyles.modificationLabel, {
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { ComposedModificationMetadata } from '../../../utils';
3
+ export interface ReferenceLinkCellProps {
4
+ data: ComposedModificationMetadata;
5
+ disabled?: boolean;
6
+ }
7
+ export declare function ReferenceLinkCell({ data, disabled }: Readonly<ReferenceLinkCellProps>): React.JSX.Element;
@@ -0,0 +1,128 @@
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import { useState, useCallback } from "react";
3
+ import { IconButton, Menu, ListItemIcon, ListItemText } from "@mui/material";
4
+ import { useIntl, FormattedMessage } from "react-intl";
5
+ import { LinkRounded } from "@mui/icons-material";
6
+ import "../../../utils/conversionUtils.js";
7
+ import { snackWithFallback } from "../../../utils/error.js";
8
+ import "../../../utils/types/equipmentType.js";
9
+ import { fetchAppsMetadata, isExploreMetadata } from "../../../services/appsMetadata.js";
10
+ import { fetchNetworkModification } from "../../../services/networkModification.js";
11
+ import "localized-countries";
12
+ import "localized-countries/data/fr";
13
+ import "localized-countries/data/en";
14
+ import { useSnackMessage } from "../../../hooks/useSnackMessage.js";
15
+ import "../../../components/ui/overflowableText/OverflowableText.js";
16
+ import "react-hook-form";
17
+ import "../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
18
+ import "yup";
19
+ import { CustomTooltip } from "../../../components/ui/tooltip/CustomTooltip.js";
20
+ import "../../../components/ui/treeViewFinder/TreeViewFinder.js";
21
+ import "../../../components/ui/reactHookForm/numbers/RangeInput.js";
22
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
23
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
24
+ import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
25
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
26
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
27
+ import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
28
+ import "../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
29
+ import "../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
30
+ import "@hello-pangea/dnd";
31
+ import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
32
+ import "../../../components/ui/snackbarProvider/SnackbarProvider.js";
33
+ import { CustomMenuItem } from "../../../components/ui/menus/custom-nested-menu.js";
34
+ import "react-resizable-panels";
35
+ import "react-papaparse";
36
+ import "react-dom";
37
+ import "autosuggest-highlight/match";
38
+ import "autosuggest-highlight/parse";
39
+ import "clsx";
40
+ import "../../../components/composite/filter/FilterCreationDialog.js";
41
+ import "../../../components/composite/filter/HeaderFilterForm.js";
42
+ import "../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
43
+ import "../../../components/composite/filter/expert/ExpertFilterForm.js";
44
+ import "../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
45
+ import "../../../components/composite/filter/expert/expertFilterConstants.js";
46
+ import "react-querybuilder";
47
+ import "uuid";
48
+ import "../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
49
+ import "../../../components/composite/filter/utils/filterFormUtils.js";
50
+ import "@react-querybuilder/material";
51
+ import "../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
52
+ import "../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
53
+ import "../../../components/composite/agGridTable/BottomTableButtons.js";
54
+ import "../../../components/composite/agGridTable/CustomAgGridTable.js";
55
+ import "ag-grid-community";
56
+ import "../../../components/composite/customAGGrid/customAggrid.js";
57
+ import "../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
58
+ import "mathjs";
59
+ import "../../../components/composite/report/report-viewer/log-table/log-table.js";
60
+ import "react-window";
61
+ import "../../../components/composite/report/report-treeview/treeview-item.js";
62
+ import "../../../components/composite/report/report-viewer/context/report-viewer-context.js";
63
+ import { DatasetLinkedIcon } from "../../../components/ui/icons/DatasetLinkedIcon.js";
64
+ function ReferenceLinkCell({ data, disabled = false }) {
65
+ const intl = useIntl();
66
+ const { snackInfo, snackError } = useSnackMessage();
67
+ const [anchorEl, setAnchorEl] = useState(null);
68
+ const [isLoading, setIsLoading] = useState(false);
69
+ const open = Boolean(anchorEl);
70
+ const handleOpen = useCallback((event) => {
71
+ event.stopPropagation();
72
+ setAnchorEl(event.currentTarget);
73
+ }, []);
74
+ const handleMenuClose = useCallback(() => {
75
+ setAnchorEl(null);
76
+ }, []);
77
+ const handleCopyLink = useCallback(
78
+ (event) => {
79
+ event.stopPropagation();
80
+ setAnchorEl(null);
81
+ setIsLoading(true);
82
+ Promise.all([
83
+ fetchNetworkModification(data.uuid).then((res) => res.json()),
84
+ fetchAppsMetadata()
85
+ ]).then(([referenceInfos, metadata]) => {
86
+ const referenceId = referenceInfos?.referenceId;
87
+ const exploreUrl = metadata?.find(isExploreMetadata)?.url;
88
+ if (!referenceId || !exploreUrl) {
89
+ throw new Error(
90
+ `Cannot build reference link: ${!referenceId ? "referenceId" : "exploreUrl"} is missing`
91
+ );
92
+ }
93
+ const link = `${exploreUrl}/elements/${referenceId}`;
94
+ return navigator.clipboard.writeText(link).then(() => snackInfo({ headerId: "linkCopied" }));
95
+ }).catch((error) => snackWithFallback(snackError, error, { headerId: "linkCopyError" })).finally(() => setIsLoading(false));
96
+ },
97
+ [data.uuid, snackInfo, snackError]
98
+ );
99
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
100
+ /* @__PURE__ */ jsx(CustomTooltip, { title: /* @__PURE__ */ jsx(FormattedMessage, { id: "importComposites.shared" }), children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(IconButton, { disabled: disabled || isLoading, onClick: handleOpen, children: /* @__PURE__ */ jsx(DatasetLinkedIcon, {}) }) }) }),
101
+ /* @__PURE__ */ jsx(
102
+ Menu,
103
+ {
104
+ anchorEl,
105
+ open,
106
+ onClose: handleMenuClose,
107
+ slotProps: {
108
+ paper: {
109
+ sx: {
110
+ maxWidth: 220
111
+ }
112
+ },
113
+ list: {
114
+ dense: true,
115
+ sx: { py: 0.25 }
116
+ }
117
+ },
118
+ children: /* @__PURE__ */ jsxs(CustomMenuItem, { onClick: handleCopyLink, sx: { minHeight: 0, py: 0.25, px: 1 }, children: [
119
+ /* @__PURE__ */ jsx(ListItemIcon, { sx: { minWidth: 24 }, children: /* @__PURE__ */ jsx(LinkRounded, { sx: { fontSize: 18, transform: "rotate(-50deg)" } }) }),
120
+ /* @__PURE__ */ jsx(ListItemText, { primary: intl.formatMessage({ id: "copyLink" }) })
121
+ ] })
122
+ }
123
+ )
124
+ ] });
125
+ }
126
+ export {
127
+ ReferenceLinkCell
128
+ };