@gridsuite/commons-ui 0.239.0 → 0.241.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 (207) hide show
  1. package/README.md +6 -2
  2. package/dist/components/composite/agGridTable/cellEditors/numericEditor.d.ts +9 -3
  3. package/dist/components/composite/agGridTable/cellEditors/numericEditor.js +24 -5
  4. package/dist/components/composite/customAGGrid/custom-aggrid-filters/custom-aggrid-comparator-filter.js +2 -2
  5. package/dist/components/composite/customAGGrid/custom-aggrid-filters/custom-aggrid-text-filter.js +4 -4
  6. package/dist/components/composite/customAGGrid/custom-aggrid-filters/custom-filter-icon.js +2 -2
  7. package/dist/components/composite/customAGGrid/custom-aggrid-header.js +26 -13
  8. package/dist/components/composite/customAGGrid/custom-aggrid-menu.js +2 -2
  9. package/dist/components/composite/dnd-table/dnd-table-bottom-left-buttons.js +4 -4
  10. package/dist/components/composite/dnd-table/dnd-table-bottom-right-buttons.js +6 -6
  11. package/dist/components/composite/dnd-table/dnd-table.js +4 -4
  12. package/dist/components/composite/filter/HeaderFilterForm.js +4 -4
  13. package/dist/components/composite/filter/explicitNaming/ExplicitNamingFilterForm.d.ts +1 -1
  14. package/dist/components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js +2 -4
  15. package/dist/components/composite/grid/grid-item.d.ts +4 -3
  16. package/dist/components/composite/grid/grid-item.js +8 -4
  17. package/dist/components/composite/grid/grid-section.d.ts +1 -1
  18. package/dist/components/composite/grid/grid-section.js +3 -3
  19. package/dist/components/composite/grid/index.js +6 -3
  20. package/dist/components/composite/index.js +4 -3
  21. package/dist/components/composite/reactQueryBuilder/PropertyValueEditor.js +5 -5
  22. package/dist/components/composite/reactQueryBuilder/compositeRuleEditor/GroupValueEditor.js +2 -2
  23. package/dist/components/composite/reactQueryBuilder/compositeRuleEditor/RuleValueEditor.js +5 -5
  24. package/dist/components/index.js +4 -3
  25. package/dist/components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js +9 -9
  26. package/dist/components/ui/dialogs/modifyElementSelection/ModifyElementSelection.js +3 -3
  27. package/dist/components/ui/reactHookForm/errorManagement/FieldErrorAlert.js +2 -2
  28. package/dist/components/ui/reactHookForm/expandableInput/DeletableRow.js +4 -4
  29. package/dist/components/ui/reactHookForm/expandableInput/ExpandableInput.js +4 -4
  30. package/dist/components/ui/reactHookForm/numbers/RangeInput.js +5 -5
  31. package/dist/components/ui/reactHookForm/utils/functions.js +2 -2
  32. package/dist/features/authentication/AuthenticationRouter.js +2 -2
  33. package/dist/features/authentication/AuthenticationRouterErrorDisplay.js +3 -3
  34. package/dist/features/index.js +6 -1
  35. package/dist/features/network-modifications/battery/creation/BatteryCreationForm.js +7 -7
  36. package/dist/features/network-modifications/battery/modification/BatteryDialogHeader.js +4 -4
  37. package/dist/features/network-modifications/battery/modification/BatteryDialogTabsContent.js +8 -8
  38. package/dist/features/network-modifications/battery/modification/BatteryModificationForm.js +5 -5
  39. package/dist/features/network-modifications/by-filter/assignment/assignment/assignment-form.js +1 -1
  40. package/dist/features/network-modifications/by-filter/assignment/modification-by-assignment-form.js +4 -4
  41. package/dist/features/network-modifications/by-filter/deletion/ByFilterDeletionForm.js +4 -4
  42. package/dist/features/network-modifications/common/activePowerControl/ActivePowerControlForm.js +1 -1
  43. package/dist/features/network-modifications/common/connectivity/BranchConnectivityForm.js +1 -1
  44. package/dist/features/network-modifications/common/connectivity/ConnectivityForm.js +7 -7
  45. package/dist/features/network-modifications/common/connectivity/PositionForm.js +4 -4
  46. package/dist/features/network-modifications/common/connectivity/VoltageLevelConnectivityForm.js +4 -4
  47. package/dist/features/network-modifications/common/measurements/BranchActiveReactivePowerMeasurementsForm.js +4 -3
  48. package/dist/features/network-modifications/common/measurements/BusbarSectionVoltageMeasurementsForm.js +2 -2
  49. package/dist/features/network-modifications/common/measurements/PowerMeasurementsForm.js +4 -4
  50. package/dist/features/network-modifications/common/measurements/PowerWithValidityForm.js +4 -4
  51. package/dist/features/network-modifications/common/properties/PropertiesForm.js +1 -1
  52. package/dist/features/network-modifications/common/properties/PropertyForm.js +5 -5
  53. package/dist/features/network-modifications/common/reactiveLimits/ReactiveLimitsForm.js +3 -3
  54. package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/ReactiveCapabilityCurveRowForm.js +1 -1
  55. package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/ReactiveCapabilityCurveTableForm.js +7 -7
  56. package/dist/features/network-modifications/common/regulatingTerminal/RegulatingTerminalForm.js +2 -2
  57. package/dist/features/network-modifications/common/setpoints/SetPointsForm.js +5 -5
  58. package/dist/features/network-modifications/common/shortCircuit/ShortCircuitForm.js +3 -3
  59. package/dist/features/network-modifications/common/voltageRegulation/VoltageRegulationForm.js +5 -5
  60. package/dist/features/network-modifications/equipmentDeletion/EquipmentDeletionForm.js +6 -6
  61. package/dist/features/network-modifications/equipmentDeletion/hvdcLccDeletion/HvdcLccDeletionSpecificForm.js +5 -5
  62. package/dist/features/network-modifications/equipmentDeletion/hvdcLccDeletion/ShuntCompensatorSelectionForm.js +5 -5
  63. package/dist/features/network-modifications/generator/creation/GeneratorCreationForm.js +9 -9
  64. package/dist/features/network-modifications/generator/modification/GeneratorDialogHeader.js +5 -5
  65. package/dist/features/network-modifications/generator/modification/GeneratorDialogTabsContent.js +9 -9
  66. package/dist/features/network-modifications/generator/modification/GeneratorModificationForm.js +5 -5
  67. package/dist/features/network-modifications/load/common/LoadDialogHeader.js +5 -5
  68. package/dist/features/network-modifications/load/common/LoadDialogTabsContent.js +1 -1
  69. package/dist/features/network-modifications/load/common/LoadForm.js +5 -5
  70. package/dist/features/network-modifications/shunt-compensator/common/CharacteristicsForm.js +12 -12
  71. package/dist/features/network-modifications/shunt-compensator/common/characteristicsForm.utils.d.ts +8 -8
  72. package/dist/features/network-modifications/shunt-compensator/creation/ShuntCompensatorCreationForm.js +11 -11
  73. package/dist/features/network-modifications/shunt-compensator/creation/shuntCompensatorCreation.utils.d.ts +12 -12
  74. package/dist/features/network-modifications/shunt-compensator/modification/ShuntCompensatorModificationForm.js +3 -3
  75. package/dist/features/network-modifications/shunt-compensator/modification/shuntCompensatorModification.utils.d.ts +12 -12
  76. package/dist/features/network-modifications/substation/creation/SubstationCreationForm.js +7 -7
  77. package/dist/features/network-modifications/substation/modification/SubstationModificationForm.js +7 -7
  78. package/dist/features/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js +7 -7
  79. package/dist/features/network-modifications/voltageLevel/creation/tabs/characteristicsTab/CharacteristicsTab.js +9 -9
  80. package/dist/features/network-modifications/voltageLevel/creation/tabs/structureTab/StructureTab.js +5 -5
  81. package/dist/features/network-modifications/voltageLevel/creation/tabs/structureTab/couplingOmnibus/CouplingOmnibusCreation.js +3 -3
  82. package/dist/features/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/SwitchesBetweenSections.js +1 -1
  83. package/dist/features/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationCreationSection.js +7 -7
  84. package/dist/features/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationTab.js +5 -5
  85. package/dist/features/network-modifications/voltageLevel/modification/VoltageLevelModificationForm.js +3 -3
  86. package/dist/features/network-modifications/voltageLevel/modification/voltageLevelModification.utils.d.ts +1 -1
  87. package/dist/features/parameters/common/contingency-table/contingency-table.js +4 -4
  88. package/dist/features/parameters/common/hook/use-tabs.d.ts +3 -2
  89. package/dist/features/parameters/common/hook/use-tabs.js +2 -3
  90. package/dist/features/parameters/common/index.d.ts +2 -1
  91. package/dist/features/parameters/common/index.js +6 -1
  92. package/dist/features/parameters/common/line-separator.js +2 -2
  93. package/dist/features/parameters/common/name-element-editor/name-element-editor-form.js +4 -4
  94. package/dist/features/parameters/common/parameter-field.js +5 -4
  95. package/dist/features/parameters/common/parameter-layout/index.d.ts +8 -0
  96. package/dist/features/parameters/common/parameter-layout/index.js +7 -0
  97. package/dist/features/parameters/common/parameter-layout/parameter-layout-provider.d.ts +10 -0
  98. package/dist/features/parameters/common/parameter-layout/parameter-layout-provider.js +15 -0
  99. package/dist/features/parameters/common/parameter-layout/parameter-layout.d.ts +23 -0
  100. package/dist/features/parameters/common/parameter-layout/parameter-layout.js +167 -0
  101. package/dist/features/parameters/common/parameter-table-field/parameter-table-field.js +3 -3
  102. package/dist/features/parameters/common/parameters.js +3 -3
  103. package/dist/features/parameters/common/provider-param.d.ts +10 -0
  104. package/dist/features/parameters/common/{ProviderParam.js → provider-param.js} +9 -11
  105. package/dist/features/parameters/common/widget/parameter-float.js +4 -4
  106. package/dist/features/parameters/common/widget/parameter-group.js +2 -2
  107. package/dist/features/parameters/common/widget/parameter-line-directory-items-input.js +4 -4
  108. package/dist/features/parameters/common/widget/parameter-line-slider.js +4 -4
  109. package/dist/features/parameters/common/widget/parameter-switch.js +2 -2
  110. package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.d.ts +4 -5
  111. package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.js +39 -60
  112. package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js +39 -101
  113. package/dist/features/parameters/dynamic-margin-calculation/loads-variations-parameters.js +2 -2
  114. package/dist/features/parameters/dynamic-margin-calculation/time-delay-parameters.js +2 -2
  115. package/dist/features/parameters/dynamic-margin-calculation/use-dynamic-margin-calculation-parameters-form.js +8 -7
  116. package/dist/features/parameters/dynamic-security-analysis/contingency-parameters.js +12 -11
  117. package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-inline.js +38 -71
  118. package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-parameters-form.d.ts +4 -5
  119. package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-parameters-form.js +39 -61
  120. package/dist/features/parameters/dynamic-security-analysis/scenario-parameters.js +2 -2
  121. package/dist/features/parameters/dynamic-security-analysis/use-dynamic-security-analysis-parameters-form.js +8 -7
  122. package/dist/features/parameters/dynamic-simulation/curve/common/grid-buttons.js +4 -4
  123. package/dist/features/parameters/dynamic-simulation/curve/curve-parameters.js +7 -8
  124. package/dist/features/parameters/dynamic-simulation/curve/dialog/curve-preview.js +7 -7
  125. package/dist/features/parameters/dynamic-simulation/curve/dialog/curve-selector-dialog.js +10 -10
  126. package/dist/features/parameters/dynamic-simulation/curve/dialog/curve-selector.js +26 -50
  127. package/dist/features/parameters/dynamic-simulation/curve/dialog/equipment-filter.js +20 -20
  128. package/dist/features/parameters/dynamic-simulation/curve/dialog/model-filter.js +11 -10
  129. package/dist/features/parameters/dynamic-simulation/dynamic-simulation-inline.js +42 -104
  130. package/dist/features/parameters/dynamic-simulation/dynamic-simulation-parameters-form.d.ts +4 -5
  131. package/dist/features/parameters/dynamic-simulation/dynamic-simulation-parameters-form.js +75 -97
  132. package/dist/features/parameters/dynamic-simulation/mapping/mapping-parameters.js +10 -9
  133. package/dist/features/parameters/dynamic-simulation/network/network-parameters.js +2 -2
  134. package/dist/features/parameters/dynamic-simulation/solver/solver-parameters.js +2 -2
  135. package/dist/features/parameters/dynamic-simulation/time-delay/time-delay-parameters.js +2 -2
  136. package/dist/features/parameters/dynamic-simulation/use-dynamic-simulation-parameters-form.js +7 -6
  137. package/dist/features/parameters/index.js +6 -1
  138. package/dist/features/parameters/loadflow/load-flow-general-parameters.js +1 -0
  139. package/dist/features/parameters/loadflow/load-flow-parameters-content.js +14 -13
  140. package/dist/features/parameters/loadflow/load-flow-parameters-dialog.js +12 -18
  141. package/dist/features/parameters/loadflow/load-flow-parameters-form.d.ts +1 -6
  142. package/dist/features/parameters/loadflow/load-flow-parameters-form.js +26 -91
  143. package/dist/features/parameters/loadflow/load-flow-parameters-header.js +29 -53
  144. package/dist/features/parameters/loadflow/load-flow-parameters-inline.js +35 -128
  145. package/dist/features/parameters/loadflow/load-flow-parameters-utils.js +11 -10
  146. package/dist/features/parameters/loadflow/use-load-flow-parameters-form.js +10 -9
  147. package/dist/features/parameters/network-visualizations/map-parameters.js +18 -17
  148. package/dist/features/parameters/network-visualizations/network-area-diagram-parameters.js +4 -4
  149. package/dist/features/parameters/network-visualizations/network-visualizations-form.d.ts +1 -4
  150. package/dist/features/parameters/network-visualizations/network-visualizations-form.js +19 -48
  151. package/dist/features/parameters/network-visualizations/network-visualizations-parameters-dialog.js +13 -19
  152. package/dist/features/parameters/network-visualizations/network-visualizations-parameters-inline.js +34 -65
  153. package/dist/features/parameters/network-visualizations/single-line-diagram-parameters.js +18 -17
  154. package/dist/features/parameters/parameters-style.d.ts +0 -1
  155. package/dist/features/parameters/parameters-style.js +0 -2
  156. package/dist/features/parameters/pcc-min/pcc-min-parameters-dialog.js +13 -18
  157. package/dist/features/parameters/pcc-min/pcc-min-parameters-form.d.ts +7 -29
  158. package/dist/features/parameters/pcc-min/pcc-min-parameters-form.js +16 -109
  159. package/dist/features/parameters/pcc-min/pcc-min-parameters-inline.js +27 -84
  160. package/dist/features/parameters/security-analysis/columns-definitions.js +11 -10
  161. package/dist/features/parameters/security-analysis/security-analysis-parameters-dialog.js +20 -20
  162. package/dist/features/parameters/security-analysis/security-analysis-parameters-form.d.ts +2 -4
  163. package/dist/features/parameters/security-analysis/security-analysis-parameters-form.js +44 -115
  164. package/dist/features/parameters/security-analysis/security-analysis-parameters-inline.js +40 -109
  165. package/dist/features/parameters/security-analysis/security-analysis-parameters-selector.js +12 -11
  166. package/dist/features/parameters/security-analysis/security-analysis-violations-hiding.js +9 -11
  167. package/dist/features/parameters/security-analysis/use-security-analysis-parameters-form.js +7 -6
  168. package/dist/features/parameters/sensi/columns-definitions.js +9 -8
  169. package/dist/features/parameters/sensi/sensitivity-analysis-parameters-dialog.js +21 -21
  170. package/dist/features/parameters/sensi/sensitivity-analysis-parameters-form.d.ts +3 -5
  171. package/dist/features/parameters/sensi/sensitivity-analysis-parameters-form.js +33 -90
  172. package/dist/features/parameters/sensi/sensitivity-analysis-parameters-inline.js +40 -99
  173. package/dist/features/parameters/sensi/sensitivity-parameters-fields.js +8 -17
  174. package/dist/features/parameters/sensi/sensitivity-parameters-selector.js +10 -9
  175. package/dist/features/parameters/sensi/utils.js +8 -7
  176. package/dist/features/parameters/short-circuit/short-circuit-general-tab-panel.js +15 -14
  177. package/dist/features/parameters/short-circuit/short-circuit-parameters-content.js +11 -10
  178. package/dist/features/parameters/short-circuit/short-circuit-parameters-dialog.js +13 -18
  179. package/dist/features/parameters/short-circuit/short-circuit-parameters-form.d.ts +1 -4
  180. package/dist/features/parameters/short-circuit/short-circuit-parameters-form.js +5 -63
  181. package/dist/features/parameters/short-circuit/short-circuit-parameters-inline.js +33 -101
  182. package/dist/features/parameters/short-circuit/short-circuit-parameters-utils.js +12 -11
  183. package/dist/features/parameters/short-circuit/short-circuit-power-electronics-tab-panel.js +17 -16
  184. package/dist/features/parameters/short-circuit/short-circuit-study-area-tab-panel.js +15 -14
  185. package/dist/features/parameters/short-circuit/use-short-circuit-parameters-form.js +1 -0
  186. package/dist/features/parameters/voltage-init/equipment-selection-parameters.js +6 -5
  187. package/dist/features/parameters/voltage-init/general-parameters.js +11 -10
  188. package/dist/features/parameters/voltage-init/voltage-init-parameters-dialog.js +13 -18
  189. package/dist/features/parameters/voltage-init/voltage-init-parameters-form.d.ts +2 -24
  190. package/dist/features/parameters/voltage-init/voltage-init-parameters-form.js +51 -108
  191. package/dist/features/parameters/voltage-init/voltage-init-parameters-inline.js +34 -90
  192. package/dist/features/parameters/voltage-init/voltage-limits-parameters.js +2 -2
  193. package/dist/features/process-configs/security-analysis/update-sa-process-config.js +7 -6
  194. package/dist/features/topBar/AboutDialog.js +4 -7
  195. package/dist/index.js +13 -4
  196. package/dist/translations/en/commonButtonEn.d.ts +2 -0
  197. package/dist/translations/en/commonButtonEn.js +2 -0
  198. package/dist/translations/en/parameters.d.ts +1 -0
  199. package/dist/translations/en/parameters.js +3 -1
  200. package/dist/translations/fr/commonButtonFr.d.ts +2 -0
  201. package/dist/translations/fr/commonButtonFr.js +2 -0
  202. package/dist/translations/fr/parameters.d.ts +1 -0
  203. package/dist/translations/fr/parameters.js +3 -1
  204. package/dist/utils/types/elementType.d.ts +1 -0
  205. package/dist/utils/types/elementType.js +1 -0
  206. package/package.json +3 -2
  207. package/dist/features/parameters/common/ProviderParam.d.ts +0 -7
package/README.md CHANGED
@@ -25,11 +25,15 @@ The `npm start` command install the library's dependencies then launches the dem
25
25
 
26
26
  ##### Development Scripts
27
27
 
28
- - **`npm run type-check`** - Runs TypeScript type checking without emitting files. This ensures all developers use the project's local TypeScript version from `node_modules` rather than a potentially different globally-installed version. Run this to verify your code has no type errors before committing.
28
+ Developers can use these scripts to perform check actions instead of executing local tsc, eslint, etc...
29
+ This ensures all developers use the project's local tools version from `node_modules` rather than a potentially different globally-installed version.
29
30
 
31
+ - **`npm run type-check`** - Runs TypeScript type checking without emitting files on the whole sources. Run this to check that your current dev is mainly correct.
32
+
33
+ - **`npm run type-check:build`** - Runs TypeScript type checking with emitting files and only on the exported sources. This is what is executed by the CI, so you can use it before committing.
30
34
  - **`npm run build`** - Builds the library. Note: This automatically runs `npm run prebuild` first.
31
35
 
32
- - **`npm run prebuild`** - Runs linting and type checking before the build. This script is executed automatically by npm before `npm run build` and ensures that the build is not executed if linting or type checking fails. You don't need to call this manually unless you want to verify code quality without building.
36
+ - **`npm run prebuild`** - Runs linting and type checking before the build (`npm run lint && npm run type-check:build`). This script is executed automatically by npm before `npm run build` and ensures that the build is not executed if linting or type checking fails. You don't need to call this manually unless you want to verify code quality without building.
33
37
 
34
38
  ##### Local Testing
35
39
 
@@ -1,16 +1,21 @@
1
1
  import { CustomCellEditorProps } from 'ag-grid-react';
2
2
  import { SuppressKeyboardEventParams } from 'ag-grid-community';
3
+ type NumericEditorProps = {
4
+ allowNegativeValues?: boolean;
5
+ };
3
6
  /**
4
7
  * `suppressKeyboardEvent` callback to put on any column using {@link NumericEditor}.
5
8
  * Prevents ag-grid from starting an edit when a non-numeric printable key is pressed on a focused cell.
6
- * Numeric keys still start editing; keys pressed while already editing are left to the input's own onKeyDown handling.
9
+ * Numeric keys and decimal separators still start editing; if `allowNegativeValues` is true, the minus sign does too.
10
+ * Keys pressed while already editing are left to the input's own onKeyDown handling.
7
11
  */
8
12
  export declare const suppressNonNumericKeyboardEvent: (params: SuppressKeyboardEventParams) => boolean;
9
13
  /**
10
14
  * Custom numeric cell editor (see ag-grid custom cell editor docs:
11
15
  * https://www.ag-grid.com/react-data-grid/cell-editors/#custom-components).
12
16
  * Restricts typing to digits and decimal separators while keeping the raw text in the input,
13
- * and commits the value as a number (or null) via onValueChange.
17
+ * and commits the value as a number (or null) via onValueChange. The minus sign is accepted when
18
+ * `allowNegativeValues` is true.
14
19
  *
15
20
  * NB: the `eventKey`-driven logic below (seeding the initial value from the triggering key in the
16
21
  * useState/useEffect) only matters when editing is started by typing a character on a focused cell,
@@ -20,4 +25,5 @@ export declare const suppressNonNumericKeyboardEvent: (params: SuppressKeyboardE
20
25
  * Columns using this editor should also set `suppressKeyboardEvent: suppressNonNumericKeyboardEvent`
21
26
  * so that a non-numeric key on a focused cell doesn't start an edit.
22
27
  */
23
- export declare function NumericEditor({ value, onValueChange, eventKey }: CustomCellEditorProps): import("react").JSX.Element;
28
+ export declare function NumericEditor({ value, onValueChange, eventKey, allowNegativeValues, }: CustomCellEditorProps & NumericEditorProps): import("react").JSX.Element;
29
+ export {};
@@ -1,19 +1,27 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useRef, useState, useEffect } from "react";
3
3
  import { KeyCode } from "ag-grid-community";
4
- const isCharNumeric = (charStr) => !!charStr && /\d|,|\./.test(charStr);
5
- const suppressNonNumericKeyboardEvent = (params) => !params.editing && params.event.key.length === 1 && !isCharNumeric(params.event.key);
4
+ const isCharNumeric = (charStr, allowNegativeValues = false) => !!charStr && (allowNegativeValues ? /^[\d,.-]$/.test(charStr) : /^[\d,.]$/.test(charStr));
5
+ const suppressNonNumericKeyboardEvent = (params) => {
6
+ const allowNegativeValues = params.colDef.cellEditorParams?.allowNegativeValues === true;
7
+ return !params.editing && params.event.key.length === 1 && !isCharNumeric(params.event.key, allowNegativeValues);
8
+ };
6
9
  const toNumber = (text) => {
7
10
  const result = Number.parseFloat(text.replace(",", "."));
8
11
  return Number.isNaN(result) ? null : result;
9
12
  };
10
- function NumericEditor({ value, onValueChange, eventKey }) {
13
+ function NumericEditor({
14
+ value,
15
+ onValueChange,
16
+ eventKey,
17
+ allowNegativeValues = false
18
+ }) {
11
19
  const refInput = useRef(null);
12
20
  const [text, setText] = useState(() => {
13
21
  if (eventKey === KeyCode.BACKSPACE) {
14
22
  return "";
15
23
  }
16
- if (eventKey?.length === 1 && isCharNumeric(eventKey)) {
24
+ if (eventKey?.length === 1 && isCharNumeric(eventKey, allowNegativeValues)) {
17
25
  return eventKey;
18
26
  }
19
27
  return value == null ? "" : String(value);
@@ -27,7 +35,18 @@ function NumericEditor({ value, onValueChange, eventKey }) {
27
35
  onValueChange(toNumber(event.target.value));
28
36
  };
29
37
  const handleKeyDown = (event) => {
30
- if (event.key.length === 1 && !isCharNumeric(event.key)) {
38
+ if (event.key === "-" && allowNegativeValues) {
39
+ const input = event.currentTarget;
40
+ const selectionStart = input.selectionStart ?? 0;
41
+ const selectionEnd = input.selectionEnd ?? 0;
42
+ const atStart = selectionStart === 0;
43
+ const keepsExistingMinus = input.value.includes("-") && !input.value.slice(selectionStart, selectionEnd).includes("-");
44
+ if (!atStart || keepsExistingMinus) {
45
+ event.preventDefault();
46
+ }
47
+ return;
48
+ }
49
+ if (event.key.length === 1 && !isCharNumeric(event.key, allowNegativeValues)) {
31
50
  event.preventDefault();
32
51
  }
33
52
  };
@@ -1,5 +1,5 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { Grid, IconButton } from "@mui/material";
2
+ import { Stack, IconButton } from "@mui/material";
3
3
  import { Close } from "@mui/icons-material";
4
4
  import { CustomAggridComparatorSelector } from "./custom-aggrid-comparator-selector.js";
5
5
  import { CustomAggridTextFilter } from "./custom-aggrid-text-filter.js";
@@ -23,7 +23,7 @@ function CustomAggridComparatorFilter({ colId, filterParams }) {
23
23
  // used for text filter as a UI type (examples: contains, startsWith..)
24
24
  } = filterParams;
25
25
  const isComparatorWithoutValue = selectedFilterComparator === FilterTextComparators.IS_EMPTY || selectedFilterComparator === FilterTextComparators.IS_NOT_EMPTY;
26
- return /* @__PURE__ */ jsxs(Grid, { container: true, direction: "column", gap: 0.8, sx: { padding: "8px" }, children: [
26
+ return /* @__PURE__ */ jsxs(Stack, { gap: 0.8, sx: { padding: "8px" }, children: [
27
27
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
28
28
  /* @__PURE__ */ jsx("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsx(
29
29
  CustomAggridComparatorSelector,
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useMemo } from "react";
3
- import { Grid, TextField, InputAdornment, IconButton } from "@mui/material";
3
+ import { Stack, Grid2, TextField, InputAdornment, IconButton } from "@mui/material";
4
4
  import { Clear } from "@mui/icons-material";
5
5
  import { useIntl } from "react-intl";
6
6
  import "../../../../utils/conversionUtils.js";
@@ -31,8 +31,8 @@ function CustomAggridTextFilter({
31
31
  }) {
32
32
  const intl = useIntl();
33
33
  const isRoundingDisplayed = useMemo(() => !!(isNumberInput && value), [isNumberInput, value]);
34
- return /* @__PURE__ */ jsxs(Grid, { container: true, direction: "column", gap: 0.2, children: [
35
- /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
34
+ return /* @__PURE__ */ jsxs(Stack, { gap: 0.2, children: [
35
+ /* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(
36
36
  TextField,
37
37
  {
38
38
  size: "small",
@@ -51,7 +51,7 @@ function CustomAggridTextFilter({
51
51
  }
52
52
  }
53
53
  ) }),
54
- isRoundingDisplayed && /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(DisplayRounding, { decimalAfterDot }) })
54
+ isRoundingDisplayed && /* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(DisplayRounding, { decimalAfterDot }) })
55
55
  ] });
56
56
  }
57
57
  export {
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { Grid, IconButton, Badge } from "@mui/material";
2
+ import { Grid2, IconButton, Badge } from "@mui/material";
3
3
  import { FilterAlt } from "@mui/icons-material";
4
4
  import "../../../../utils/conversionUtils.js";
5
5
  import "../../../../utils/types/equipmentType.js";
@@ -15,7 +15,7 @@ function CustomFilterIcon({
15
15
  selectedFilterComparator
16
16
  }) {
17
17
  const isFilterActive = selectedFilterData !== void 0 && selectedFilterData !== null && (isNonEmptyStringOrArray(selectedFilterData) || selectedFilterComparator === FilterTextComparators.IS_EMPTY || selectedFilterComparator === FilterTextComparators.IS_NOT_EMPTY);
18
- return /* @__PURE__ */ jsx(Grid, { item: true, sx: styles.gridRoot, children: /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(IconButton, { size: "small", onClick: handleShowFilter, children: /* @__PURE__ */ jsx(Badge, { color: "secondary", variant: isFilterActive ? "dot" : void 0, invisible: !isFilterActive, children: /* @__PURE__ */ jsx(FilterAlt, { sx: styles.iconSize }) }) }) }) });
18
+ return /* @__PURE__ */ jsx(Grid2, { sx: styles.gridRoot, children: /* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(IconButton, { size: "small", onClick: handleShowFilter, children: /* @__PURE__ */ jsx(Badge, { color: "secondary", variant: isFilterActive ? "dot" : void 0, invisible: !isFilterActive, children: /* @__PURE__ */ jsx(FilterAlt, { sx: styles.iconSize }) }) }) }) });
19
19
  }
20
20
  export {
21
21
  CustomFilterIcon
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useState, useCallback } from "react";
3
3
  import { FormattedMessage } from "react-intl";
4
- import { Grid, Tooltip } from "@mui/material";
4
+ import { Grid2, Tooltip } from "@mui/material";
5
5
  import { WarningAmber } from "@mui/icons-material";
6
6
  import { CustomAggridSort } from "./custom-aggrid-sort.js";
7
7
  import { CustomMenu } from "./custom-aggrid-menu.js";
@@ -9,13 +9,23 @@ import { useCustomAggridSort } from "./hooks/use-custom-aggrid-sort.js";
9
9
  import { CustomAggridFilter } from "./custom-aggrid-filters/custom-aggrid-filter.js";
10
10
  const styles = {
11
11
  displayName: {
12
+ minWidth: 0,
12
13
  overflow: "hidden",
13
- textOverflow: "ellipsis"
14
+ textOverflow: "ellipsis",
15
+ whiteSpace: "nowrap"
14
16
  },
15
17
  invalidIcon: {
16
18
  display: "flex",
17
19
  alignItems: "center",
18
20
  ml: 0.5
21
+ },
22
+ titleContainer: {
23
+ minWidth: 0
24
+ },
25
+ actions: {
26
+ flex: "0 0 auto",
27
+ flexWrap: "nowrap",
28
+ alignItems: "center"
19
29
  }
20
30
  };
21
31
  function CustomHeaderComponent({
@@ -44,39 +54,42 @@ function CustomHeaderComponent({
44
54
  const handleMouseLeave = useCallback(() => {
45
55
  setIsHoveringColumnHeader(false);
46
56
  }, []);
47
- return /* @__PURE__ */ jsx(Grid, { container: true, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: /* @__PURE__ */ jsxs(Grid, { container: true, alignItems: "center", wrap: "nowrap", children: [
57
+ return /* @__PURE__ */ jsx(Grid2, { container: true, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, sx: { width: "100%" }, children: /* @__PURE__ */ jsxs(Grid2, { container: true, alignItems: "center", wrap: "nowrap", sx: { width: "100%" }, children: [
48
58
  /* @__PURE__ */ jsx(
49
- Grid,
59
+ Grid2,
50
60
  {
51
61
  container: true,
52
62
  sx: {
53
- cursor: isSortable ? "pointer" : "default"
63
+ cursor: isSortable ? "pointer" : "default",
64
+ ...styles.titleContainer,
65
+ flex: forceDisplayFilterIcon ? "0 1 auto" : void 0
54
66
  },
55
- flexBasis: forceDisplayFilterIcon ? "0%" : "100%",
67
+ flexBasis: forceDisplayFilterIcon ? "auto" : "100%",
56
68
  children: /* @__PURE__ */ jsx(
57
- Grid,
69
+ Grid2,
58
70
  {
59
71
  container: true,
60
72
  sx: {
61
- overflow: "hidden"
73
+ overflow: "hidden",
74
+ minWidth: 0
62
75
  },
63
76
  onClick: handleClickHeader,
64
- children: /* @__PURE__ */ jsxs(Grid, { container: true, sx: styles.displayName, alignItems: "center", wrap: "nowrap", children: [
65
- /* @__PURE__ */ jsx(Grid, { item: true, children: displayName }),
66
- isInvalid && /* @__PURE__ */ jsx(Grid, { item: true, sx: styles.invalidIcon, children: /* @__PURE__ */ jsx(
77
+ children: /* @__PURE__ */ jsxs(Grid2, { container: true, sx: styles.displayName, alignItems: "center", wrap: "nowrap", children: [
78
+ /* @__PURE__ */ jsx(Grid2, { children: displayName }),
79
+ isInvalid && /* @__PURE__ */ jsx(Grid2, { sx: styles.invalidIcon, children: /* @__PURE__ */ jsx(
67
80
  Tooltip,
68
81
  {
69
82
  title: /* @__PURE__ */ jsx(FormattedMessage, { id: "spreadsheet/column/invalid-without-loadflow" }),
70
83
  children: /* @__PURE__ */ jsx(WarningAmber, { fontSize: "small", color: "warning" })
71
84
  }
72
85
  ) }),
73
- sortParams && /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(CustomAggridSort, { colId: column.getId(), sortParams }) })
86
+ sortParams && /* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(CustomAggridSort, { colId: column.getId(), sortParams }) })
74
87
  ] })
75
88
  }
76
89
  )
77
90
  }
78
91
  ),
79
- /* @__PURE__ */ jsxs(Grid, { container: true, flex: "1", wrap: "nowrap", children: [
92
+ /* @__PURE__ */ jsxs(Grid2, { container: true, sx: styles.actions, children: [
80
93
  filterComponent && /* @__PURE__ */ jsx(
81
94
  CustomAggridFilter,
82
95
  {
@@ -1,6 +1,6 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { useState, useRef } from "react";
3
- import { Grid, IconButton, Badge } from "@mui/material";
3
+ import { Grid2, IconButton, Badge } from "@mui/material";
4
4
  import { MoreVert } from "@mui/icons-material";
5
5
  const styles = {
6
6
  iconSize: {
@@ -11,7 +11,7 @@ function CustomMenu({ Menu, menuParams }) {
11
11
  const [menuOpen, setMenuOpen] = useState(false);
12
12
  const menuButtonRef = useRef(null);
13
13
  return /* @__PURE__ */ jsxs(Fragment, { children: [
14
- /* @__PURE__ */ jsx(Grid, { container: true, direction: "row", children: /* @__PURE__ */ jsx(IconButton, { ref: menuButtonRef, size: "small", onClick: () => setMenuOpen(true), children: /* @__PURE__ */ jsx(Badge, { color: "secondary", children: /* @__PURE__ */ jsx(MoreVert, { sx: styles.iconSize }) }) }) }),
14
+ /* @__PURE__ */ jsx(Grid2, { container: true, direction: "row", children: /* @__PURE__ */ jsx(IconButton, { ref: menuButtonRef, size: "small", onClick: () => setMenuOpen(true), children: /* @__PURE__ */ jsx(Badge, { color: "secondary", children: /* @__PURE__ */ jsx(MoreVert, { sx: styles.iconSize }) }) }) }),
15
15
  /* @__PURE__ */ jsx(Menu, { open: menuOpen, onClose: () => setMenuOpen(false), anchorEl: menuButtonRef.current, ...menuParams })
16
16
  ] });
17
17
  }
@@ -1,5 +1,5 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { Grid, IconButton } from "@mui/material";
2
+ import { Grid2, IconButton } from "@mui/material";
3
3
  import { Upload, Replay } from "@mui/icons-material";
4
4
  import { useIntl } from "react-intl";
5
5
  import { CustomTooltip } from "../../ui/tooltip/CustomTooltip.js";
@@ -13,8 +13,8 @@ function DndTableBottomLeftButtons({
13
13
  disabled
14
14
  }) {
15
15
  const intl = useIntl();
16
- return /* @__PURE__ */ jsxs(Grid, { container: true, item: true, xs: true, spacing: 1, children: [
17
- /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
16
+ return /* @__PURE__ */ jsxs(Grid2, { container: true, size: "grow", spacing: 1, children: [
17
+ /* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(
18
18
  CustomTooltip,
19
19
  {
20
20
  title: intl.formatMessage({
@@ -31,7 +31,7 @@ function DndTableBottomLeftButtons({
31
31
  ) })
32
32
  }
33
33
  ) }),
34
- withResetButton && /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
34
+ withResetButton && /* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(
35
35
  CustomTooltip,
36
36
  {
37
37
  title: intl.formatMessage({
@@ -1,5 +1,5 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
- import { Grid, IconButton } from "@mui/material";
2
+ import { Grid2, IconButton } from "@mui/material";
3
3
  import { AddCircle, Delete, ArrowUpward, ArrowDownward } from "@mui/icons-material";
4
4
  import { useWatch } from "react-hook-form";
5
5
  import { useIntl } from "react-intl";
@@ -22,8 +22,8 @@ function DndTableBottomRightButtons({
22
22
  const noRowsSelected = currentRows ? !currentRows.some((row) => row[SELECTED]) : true;
23
23
  const firstRowSelected = noRowsSelected ? void 0 : currentRows[0]?.[SELECTED];
24
24
  const lastRowSelected = noRowsSelected ? void 0 : currentRows[currentRows.length - 1]?.[SELECTED];
25
- return /* @__PURE__ */ jsxs(Grid, { container: true, item: true, xs: true, spacing: 1, sx: { justifyContent: "flex-end" }, children: [
26
- /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
25
+ return /* @__PURE__ */ jsxs(Grid2, { container: true, size: "grow", spacing: 1, sx: { justifyContent: "flex-end" }, children: [
26
+ /* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(
27
27
  CustomTooltip,
28
28
  {
29
29
  title: intl.formatMessage({
@@ -40,7 +40,7 @@ function DndTableBottomRightButtons({
40
40
  ) })
41
41
  }
42
42
  ) }),
43
- /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
43
+ /* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(
44
44
  CustomTooltip,
45
45
  {
46
46
  title: intl.formatMessage({
@@ -58,7 +58,7 @@ function DndTableBottomRightButtons({
58
58
  }
59
59
  ) }),
60
60
  showMoveArrow && /* @__PURE__ */ jsxs(Fragment, { children: [
61
- /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
61
+ /* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(
62
62
  CustomTooltip,
63
63
  {
64
64
  title: intl.formatMessage({
@@ -75,7 +75,7 @@ function DndTableBottomRightButtons({
75
75
  ) })
76
76
  }
77
77
  ) }),
78
- /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
78
+ /* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(
79
79
  CustomTooltip,
80
80
  {
81
81
  title: intl.formatMessage({
@@ -2,7 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { createPortal } from "react-dom";
3
3
  import { useState, useCallback, useRef, useMemo } from "react";
4
4
  import { useFormContext, useWatch } from "react-hook-form";
5
- import { Grid, TableContainer, Table, TableHead, TableRow, TableCell, Box, IconButton, TableBody, Checkbox } from "@mui/material";
5
+ import { Grid2, TableContainer, Table, TableHead, TableRow, TableCell, Box, IconButton, TableBody, Checkbox } from "@mui/material";
6
6
  import { DragDropContext, Droppable, Draggable } from "@hello-pangea/dnd";
7
7
  import { useIntl } from "react-intl";
8
8
  import { AddCircle } from "@mui/icons-material";
@@ -316,8 +316,8 @@ function DndTable(props) {
316
316
  providedDroppable.placeholder
317
317
  ] });
318
318
  }
319
- return /* @__PURE__ */ jsxs(Grid, { item: true, container: true, spacing: 1, children: [
320
- /* @__PURE__ */ jsxs(Grid, { item: true, container: true, children: [
319
+ return /* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 1, size: 12, children: [
320
+ /* @__PURE__ */ jsxs(Grid2, { container: true, size: 12, children: [
321
321
  /* @__PURE__ */ jsx(DragDropContext, { onBeforeDragStart, onDragEnd, children: /* @__PURE__ */ jsx(Droppable, { droppableId: "tapTable", isDropDisabled: disabled, children: (provided) => /* @__PURE__ */ jsx(
322
322
  TableContainer,
323
323
  {
@@ -335,7 +335,7 @@ function DndTable(props) {
335
335
  ) }) }),
336
336
  /* @__PURE__ */ jsx(ErrorInput, { name, InputField: FieldErrorAlert })
337
337
  ] }),
338
- /* @__PURE__ */ jsxs(Grid, { container: true, item: true, children: [
338
+ /* @__PURE__ */ jsxs(Grid2, { container: true, size: 12, children: [
339
339
  handleResetButton && handleUploadButton && resetButtonMessageId && uploadButtonMessageId ? /* @__PURE__ */ jsx(
340
340
  DndTableBottomLeftButtons,
341
341
  {
@@ -1,5 +1,5 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { Grid } from "@mui/material";
2
+ import { Grid2 } from "@mui/material";
3
3
  import * as yup from "yup";
4
4
  import { FieldConstants } from "../../../utils/constants/fieldConstants.js";
5
5
  import { MAX_CHAR_DESCRIPTION } from "../../../utils/constants/uiConstants.js";
@@ -50,8 +50,8 @@ const HeaderFilterSchema = {
50
50
  [FieldConstants.DESCRIPTION]: yup.string().max(MAX_CHAR_DESCRIPTION, "descriptionLimitError")
51
51
  };
52
52
  function HeaderFilterForm({ creation, activeDirectory }) {
53
- return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
54
- /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(
53
+ return /* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 2, children: [
54
+ /* @__PURE__ */ jsx(Grid2, { size: 12, children: /* @__PURE__ */ jsx(
55
55
  UniqueNameInput,
56
56
  {
57
57
  name: FieldConstants.NAME,
@@ -63,7 +63,7 @@ function HeaderFilterForm({ creation, activeDirectory }) {
63
63
  fullWidth: false
64
64
  }
65
65
  ) }),
66
- /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(DescriptionField, { expandingTextSx: filterStyles.description }) })
66
+ /* @__PURE__ */ jsx(Grid2, { size: 12, children: /* @__PURE__ */ jsx(DescriptionField, { expandingTextSx: filterStyles.description }) })
67
67
  ] });
68
68
  }
69
69
  export {
@@ -4,8 +4,8 @@ import { DISTRIBUTION_KEY } from '../constants/FilterConstants';
4
4
  import * as yup from 'yup';
5
5
  export declare const explicitNamingFilterSchema: {
6
6
  filterEquipmentsAttributes: yup.ArraySchema<{
7
- distributionKey?: number | null | undefined;
8
7
  equipmentID?: string | null | undefined;
8
+ distributionKey?: number | null | undefined;
9
9
  }[] | undefined, yup.AnyObject, "", "">;
10
10
  };
11
11
  interface FilterTableRow {
@@ -2,7 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useEffect, useMemo, useCallback, useState, useRef } from "react";
3
3
  import { useIntl } from "react-intl";
4
4
  import { useWatch } from "react-hook-form";
5
- import { Grid2, Alert } from "@mui/material";
5
+ import { Stack, Grid2, Alert } from "@mui/material";
6
6
  import { v4 } from "uuid";
7
7
  import * as yup from "yup";
8
8
  import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
@@ -187,10 +187,8 @@ function ExplicitNamingFilterForm({
187
187
  );
188
188
  };
189
189
  return /* @__PURE__ */ jsxs(
190
- Grid2,
190
+ Stack,
191
191
  {
192
- container: true,
193
- direction: "column",
194
192
  spacing: 2,
195
193
  padding: 1,
196
194
  sx: { flexGrow: 1, flexWrap: "nowrap", minHeight: 0 },
@@ -1,8 +1,9 @@
1
1
  import { PropsWithChildren, ReactNode } from 'react';
2
- import { GridProps } from '@mui/material';
2
+ import { Grid2Props } from '@mui/material';
3
3
  export interface GridItemProps extends PropsWithChildren {
4
- size?: GridProps['xs'];
4
+ size?: Grid2Props['size'];
5
5
  alignItem?: string;
6
6
  tooltip?: ReactNode;
7
+ sx?: Grid2Props['sx'];
7
8
  }
8
- export default function GridItem({ children, size, alignItem, tooltip }: Readonly<GridItemProps>): import("react").JSX.Element;
9
+ export declare function GridItem({ children, size, alignItem, tooltip, sx }: Readonly<GridItemProps>): import("react").JSX.Element;
@@ -1,9 +1,13 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { Grid } from "@mui/material";
2
+ import { Grid2 } from "@mui/material";
3
3
  import { CustomTooltip } from "../../ui/tooltip/CustomTooltip.js";
4
- function GridItem({ children, size = 6, alignItem = "flex-start", tooltip }) {
5
- return /* @__PURE__ */ jsx(Grid, { item: true, xs: size, alignItems: alignItem, children: children && (tooltip ? /* @__PURE__ */ jsx(CustomTooltip, { title: tooltip, children: /* @__PURE__ */ jsx("div", { children }) }) : children) });
4
+ import "../../../utils/conversionUtils.js";
5
+ import "../../../utils/types/equipmentType.js";
6
+ import "@mui/icons-material";
7
+ import { mergeSx } from "../../../utils/styles.js";
8
+ function GridItem({ children, size = 6, alignItem = "flex-start", tooltip, sx }) {
9
+ return /* @__PURE__ */ jsx(Grid2, { size, sx: mergeSx({ alignItems: alignItem }, sx), children: children && (tooltip ? /* @__PURE__ */ jsx(CustomTooltip, { title: tooltip, children: /* @__PURE__ */ jsx("div", { children }) }) : children) });
6
10
  }
7
11
  export {
8
- GridItem as default
12
+ GridItem
9
13
  };
@@ -5,4 +5,4 @@ export interface GridSectionProps {
5
5
  size?: number;
6
6
  customStyle?: SxStyle;
7
7
  }
8
- export default function GridSection({ title, heading, size, customStyle }: Readonly<GridSectionProps>): import("react").JSX.Element;
8
+ export declare function GridSection({ title, heading, size, customStyle }: Readonly<GridSectionProps>): import("react").JSX.Element;
@@ -1,9 +1,9 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { Grid, Box } from "@mui/material";
2
+ import { Grid2, Box } from "@mui/material";
3
3
  import { FormattedMessage } from "react-intl";
4
4
  function GridSection({ title, heading = 3, size = 12, customStyle }) {
5
- return /* @__PURE__ */ jsx(Grid, { container: true, spacing: 2, children: /* @__PURE__ */ jsx(Grid, { item: true, xs: size, children: /* @__PURE__ */ jsx(Box, { sx: customStyle, component: `h${heading}`, children: /* @__PURE__ */ jsx(FormattedMessage, { id: title }) }) }) });
5
+ return /* @__PURE__ */ jsx(Grid2, { container: true, spacing: 2, sx: { width: "100%" }, children: /* @__PURE__ */ jsx(Grid2, { size, children: /* @__PURE__ */ jsx(Box, { sx: customStyle, component: `h${heading}`, children: /* @__PURE__ */ jsx(FormattedMessage, { id: title }) }) }) });
6
6
  }
7
7
  export {
8
- GridSection as default
8
+ GridSection
9
9
  };
@@ -1,3 +1,6 @@
1
- import "react/jsx-runtime";
2
- import "@mui/material";
3
- import "react-intl";
1
+ import { GridItem } from "./grid-item.js";
2
+ import { GridSection } from "./grid-section.js";
3
+ export {
4
+ GridItem,
5
+ GridSection
6
+ };
@@ -23,9 +23,8 @@ import { ExplicitNamingFilterForm, explicitNamingFilterSchema, getExplicitNaming
23
23
  import { FILTER_EQUIPMENTS_ATTRIBUTES } from "./filter/explicitNaming/ExplicitNamingFilterConstants.js";
24
24
  import { saveExpertFilter, saveExplicitNamingFilter } from "./filter/utils/filterApi.js";
25
25
  import { CONTINGENCY_LIST_EQUIPMENTS, FILTER_EQUIPMENTS } from "./filter/utils/filterFormUtils.js";
26
- import "react/jsx-runtime";
27
- import "@mui/material";
28
- import "react-intl";
26
+ import { GridItem } from "./grid/grid-item.js";
27
+ import { GridSection } from "./grid/grid-section.js";
29
28
  import { OverflowableTableCell } from "./muiTable/OverflowableTableCell.js";
30
29
  import { OverflowableTableCellWithCheckbox } from "./muiTable/OverflowableTableCellWithCheckbox.js";
31
30
  import { AutocompleteWithFavorites } from "./reactQueryBuilder/AutocompleteWithFavorites.js";
@@ -136,6 +135,8 @@ export {
136
135
  FilterType,
137
136
  FlatParameters,
138
137
  GLOBAL_REPORT_NODE_LABEL,
138
+ GridItem,
139
+ GridSection,
139
140
  GroupValueEditor,
140
141
  LOAD_TYPE_OPTIONS,
141
142
  default2 as LogTable,
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useMemo, useCallback } from "react";
3
- import { Grid, Autocomplete, TextField, FormControl, Select, MenuItem } from "@mui/material";
3
+ import { Grid2, Autocomplete, TextField, FormControl, Select, MenuItem } from "@mui/material";
4
4
  import { useIntl } from "react-intl";
5
5
  import { useValid } from "./hooks/useValid.js";
6
6
  import { OPERATOR_OPTIONS } from "../filter/expert/expertFilterConstants.js";
@@ -46,8 +46,8 @@ function PropertyValueEditor(props) {
46
46
  },
47
47
  [valueEditorProps]
48
48
  );
49
- return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 1, item: true, children: [
50
- /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(
49
+ return /* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 1, children: [
50
+ /* @__PURE__ */ jsx(Grid2, { size: 4, children: /* @__PURE__ */ jsx(
51
51
  Autocomplete,
52
52
  {
53
53
  value: propertyName ?? "",
@@ -63,7 +63,7 @@ function PropertyValueEditor(props) {
63
63
  filterOptions: createCustomFilterOptions
64
64
  }
65
65
  ) }),
66
- /* @__PURE__ */ jsx(Grid, { item: true, xs: "auto", children: /* @__PURE__ */ jsx(FormControl, { variant: "standard", sx: { mt: 1, minWidth: 160 }, children: /* @__PURE__ */ jsx(
66
+ /* @__PURE__ */ jsx(Grid2, { size: "auto", children: /* @__PURE__ */ jsx(FormControl, { variant: "standard", sx: { mt: 1, minWidth: 160 }, children: /* @__PURE__ */ jsx(
67
67
  Select,
68
68
  {
69
69
  value: propertyOperator ?? PROPERTY_VALUE_OPERATORS[0].customName,
@@ -76,7 +76,7 @@ function PropertyValueEditor(props) {
76
76
  children: PROPERTY_VALUE_OPERATORS.map((operator) => /* @__PURE__ */ jsx(MenuItem, { value: operator.customName, children: intl.formatMessage({ id: operator.label }) }, operator.customName))
77
77
  }
78
78
  ) }) }),
79
- valueEditorProps?.value?.propertyOperator !== OPERATOR_OPTIONS.EXISTS.customName && valueEditorProps?.value?.propertyOperator !== OPERATOR_OPTIONS.NOT_EXISTS.customName && /* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsx(
79
+ valueEditorProps?.value?.propertyOperator !== OPERATOR_OPTIONS.EXISTS.customName && valueEditorProps?.value?.propertyOperator !== OPERATOR_OPTIONS.NOT_EXISTS.customName && /* @__PURE__ */ jsx(Grid2, { size: "grow", children: /* @__PURE__ */ jsx(
80
80
  Autocomplete,
81
81
  {
82
82
  value: propertyValues ?? [],
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useCallback, createElement } from "react";
3
- import { Grid } from "@mui/material";
3
+ import { Stack } from "@mui/material";
4
4
  import { RuleValueEditor } from "./RuleValueEditor.js";
5
5
  const styles = {
6
6
  group: (theme) => ({
@@ -29,7 +29,7 @@ function GroupValueEditor(props) {
29
29
  },
30
30
  [handleOnChange, combinator, value]
31
31
  );
32
- return /* @__PURE__ */ jsx(Grid, { container: true, direction: "column", sx: styles.group, paddingLeft: 1, paddingRight: 1, paddingBottom: 1, children: children && Object.values(children).map((fieldData) => /* @__PURE__ */ createElement(
32
+ return /* @__PURE__ */ jsx(Stack, { sx: styles.group, paddingLeft: 1, paddingRight: 1, paddingBottom: 1, children: children && Object.values(children).map((fieldData) => /* @__PURE__ */ createElement(
33
33
  RuleValueEditor,
34
34
  {
35
35
  ...props,
@@ -1,5 +1,5 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { Grid, Typography, Select, MenuItem } from "@mui/material";
2
+ import { Grid2, Typography, Select, MenuItem } from "@mui/material";
3
3
  import { useIntl } from "react-intl";
4
4
  const styles = {
5
5
  gridItem: {
@@ -32,9 +32,9 @@ function RuleValueEditor(props) {
32
32
  operator
33
33
  });
34
34
  };
35
- return /* @__PURE__ */ jsxs(Grid, { container: true, paddingTop: 1, children: [
36
- /* @__PURE__ */ jsx(Grid, { container: true, item: true, xs: 4, sx: styles.gridItem, children: /* @__PURE__ */ jsx(Typography, { children: intl.formatMessage({ id: fieldData.label }) }) }),
37
- /* @__PURE__ */ jsx(Grid, { container: true, item: true, xs: 2.5, sx: styles.gridItem, paddingLeft: 1, children: /* @__PURE__ */ jsx(
35
+ return /* @__PURE__ */ jsxs(Grid2, { container: true, paddingTop: 1, children: [
36
+ /* @__PURE__ */ jsx(Grid2, { container: true, size: 4, sx: styles.gridItem, children: /* @__PURE__ */ jsx(Typography, { children: intl.formatMessage({ id: fieldData.label }) }) }),
37
+ /* @__PURE__ */ jsx(Grid2, { container: true, size: 2.5, sx: styles.gridItem, paddingLeft: 1, children: /* @__PURE__ */ jsx(
38
38
  Select,
39
39
  {
40
40
  value: operator,
@@ -46,7 +46,7 @@ function RuleValueEditor(props) {
46
46
  children: fieldData.operators?.map((option) => /* @__PURE__ */ jsx(MenuItem, { value: option.name, children: intl.formatMessage({ id: option.label }) }, option.name))
47
47
  }
48
48
  ) }),
49
- /* @__PURE__ */ jsx(Grid, { container: true, item: true, xs: 5.5, sx: styles.gridItem, paddingLeft: 1, children: /* @__PURE__ */ jsx(
49
+ /* @__PURE__ */ jsx(Grid2, { container: true, size: 5.5, sx: styles.gridItem, paddingLeft: 1, children: /* @__PURE__ */ jsx(
50
50
  ValueEditorControlElement,
51
51
  {
52
52
  ...props,