@gridsuite/commons-ui 0.239.0 → 0.240.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.
- package/README.md +6 -2
- package/dist/components/composite/agGridTable/cellEditors/numericEditor.d.ts +9 -3
- package/dist/components/composite/agGridTable/cellEditors/numericEditor.js +24 -5
- package/dist/components/composite/dnd-table/dnd-table-bottom-left-buttons.js +4 -4
- package/dist/components/composite/dnd-table/dnd-table-bottom-right-buttons.js +6 -6
- package/dist/components/composite/dnd-table/dnd-table.js +4 -4
- package/dist/components/composite/filter/HeaderFilterForm.js +4 -4
- package/dist/components/composite/filter/explicitNaming/ExplicitNamingFilterForm.d.ts +1 -1
- package/dist/components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js +2 -4
- package/dist/components/composite/grid/grid-item.d.ts +4 -3
- package/dist/components/composite/grid/grid-item.js +8 -4
- package/dist/components/composite/grid/grid-section.d.ts +1 -1
- package/dist/components/composite/grid/grid-section.js +3 -3
- package/dist/components/composite/grid/index.js +6 -3
- package/dist/components/composite/index.js +4 -3
- package/dist/components/composite/reactQueryBuilder/PropertyValueEditor.js +5 -5
- package/dist/components/composite/reactQueryBuilder/compositeRuleEditor/GroupValueEditor.js +2 -2
- package/dist/components/composite/reactQueryBuilder/compositeRuleEditor/RuleValueEditor.js +5 -5
- package/dist/components/index.js +4 -3
- package/dist/components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js +9 -9
- package/dist/components/ui/dialogs/modifyElementSelection/ModifyElementSelection.js +3 -3
- package/dist/components/ui/reactHookForm/errorManagement/FieldErrorAlert.js +2 -2
- package/dist/components/ui/reactHookForm/expandableInput/DeletableRow.js +4 -4
- package/dist/components/ui/reactHookForm/expandableInput/ExpandableInput.js +4 -4
- package/dist/components/ui/reactHookForm/numbers/RangeInput.js +5 -5
- package/dist/components/ui/reactHookForm/utils/functions.js +2 -2
- package/dist/features/authentication/AuthenticationRouter.js +2 -2
- package/dist/features/authentication/AuthenticationRouterErrorDisplay.js +3 -3
- package/dist/features/network-modifications/battery/creation/BatteryCreationForm.js +7 -7
- package/dist/features/network-modifications/battery/modification/BatteryDialogHeader.js +4 -4
- package/dist/features/network-modifications/battery/modification/BatteryDialogTabsContent.js +8 -8
- package/dist/features/network-modifications/battery/modification/BatteryModificationForm.js +5 -5
- package/dist/features/network-modifications/by-filter/assignment/assignment/assignment-form.js +1 -1
- package/dist/features/network-modifications/by-filter/assignment/modification-by-assignment-form.js +4 -4
- package/dist/features/network-modifications/by-filter/deletion/ByFilterDeletionForm.js +4 -4
- package/dist/features/network-modifications/common/activePowerControl/ActivePowerControlForm.js +1 -1
- package/dist/features/network-modifications/common/connectivity/BranchConnectivityForm.js +1 -1
- package/dist/features/network-modifications/common/connectivity/ConnectivityForm.js +7 -7
- package/dist/features/network-modifications/common/connectivity/PositionForm.js +4 -4
- package/dist/features/network-modifications/common/connectivity/VoltageLevelConnectivityForm.js +4 -4
- package/dist/features/network-modifications/common/measurements/BranchActiveReactivePowerMeasurementsForm.js +1 -1
- package/dist/features/network-modifications/common/measurements/BusbarSectionVoltageMeasurementsForm.js +2 -2
- package/dist/features/network-modifications/common/measurements/PowerMeasurementsForm.js +4 -4
- package/dist/features/network-modifications/common/measurements/PowerWithValidityForm.js +4 -4
- package/dist/features/network-modifications/common/properties/PropertiesForm.js +1 -1
- package/dist/features/network-modifications/common/properties/PropertyForm.js +5 -5
- package/dist/features/network-modifications/common/reactiveLimits/ReactiveLimitsForm.js +3 -3
- package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/ReactiveCapabilityCurveRowForm.js +1 -1
- package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/ReactiveCapabilityCurveTableForm.js +7 -7
- package/dist/features/network-modifications/common/regulatingTerminal/RegulatingTerminalForm.js +2 -2
- package/dist/features/network-modifications/common/setpoints/SetPointsForm.js +5 -5
- package/dist/features/network-modifications/common/shortCircuit/ShortCircuitForm.js +3 -3
- package/dist/features/network-modifications/common/voltageRegulation/VoltageRegulationForm.js +5 -5
- package/dist/features/network-modifications/equipmentDeletion/EquipmentDeletionForm.js +6 -6
- package/dist/features/network-modifications/equipmentDeletion/hvdcLccDeletion/HvdcLccDeletionSpecificForm.js +5 -5
- package/dist/features/network-modifications/equipmentDeletion/hvdcLccDeletion/ShuntCompensatorSelectionForm.js +5 -5
- package/dist/features/network-modifications/generator/creation/GeneratorCreationForm.js +9 -9
- package/dist/features/network-modifications/generator/modification/GeneratorDialogHeader.js +5 -5
- package/dist/features/network-modifications/generator/modification/GeneratorDialogTabsContent.js +9 -9
- package/dist/features/network-modifications/generator/modification/GeneratorModificationForm.js +5 -5
- package/dist/features/network-modifications/load/common/LoadDialogHeader.js +5 -5
- package/dist/features/network-modifications/load/common/LoadDialogTabsContent.js +1 -1
- package/dist/features/network-modifications/load/common/LoadForm.js +5 -5
- package/dist/features/network-modifications/shunt-compensator/common/CharacteristicsForm.js +12 -12
- package/dist/features/network-modifications/shunt-compensator/common/characteristicsForm.utils.d.ts +8 -8
- package/dist/features/network-modifications/shunt-compensator/creation/ShuntCompensatorCreationForm.js +11 -11
- package/dist/features/network-modifications/shunt-compensator/creation/shuntCompensatorCreation.utils.d.ts +12 -12
- package/dist/features/network-modifications/shunt-compensator/modification/ShuntCompensatorModificationForm.js +3 -3
- package/dist/features/network-modifications/shunt-compensator/modification/shuntCompensatorModification.utils.d.ts +12 -12
- package/dist/features/network-modifications/substation/creation/SubstationCreationForm.js +7 -7
- package/dist/features/network-modifications/substation/modification/SubstationModificationForm.js +7 -7
- package/dist/features/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js +7 -7
- package/dist/features/network-modifications/voltageLevel/creation/tabs/characteristicsTab/CharacteristicsTab.js +9 -9
- package/dist/features/network-modifications/voltageLevel/creation/tabs/structureTab/StructureTab.js +5 -5
- package/dist/features/network-modifications/voltageLevel/creation/tabs/structureTab/couplingOmnibus/CouplingOmnibusCreation.js +3 -3
- package/dist/features/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/SwitchesBetweenSections.js +1 -1
- package/dist/features/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationCreationSection.js +7 -7
- package/dist/features/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationTab.js +5 -5
- package/dist/features/network-modifications/voltageLevel/modification/VoltageLevelModificationForm.js +3 -3
- package/dist/features/network-modifications/voltageLevel/modification/voltageLevelModification.utils.d.ts +1 -1
- package/dist/features/parameters/common/ProviderParam.js +5 -5
- package/dist/features/parameters/common/contingency-table/contingency-table.js +4 -4
- package/dist/features/parameters/common/line-separator.js +2 -2
- package/dist/features/parameters/common/name-element-editor/name-element-editor-form.js +4 -4
- package/dist/features/parameters/common/parameter-field.js +4 -4
- package/dist/features/parameters/common/parameter-table-field/parameter-table-field.js +3 -3
- package/dist/features/parameters/common/parameters.js +3 -3
- package/dist/features/parameters/common/widget/parameter-float.js +4 -4
- package/dist/features/parameters/common/widget/parameter-group.js +2 -2
- package/dist/features/parameters/common/widget/parameter-line-directory-items-input.js +4 -4
- package/dist/features/parameters/common/widget/parameter-line-slider.js +4 -4
- package/dist/features/parameters/common/widget/parameter-switch.js +2 -2
- package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.js +6 -6
- package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js +3 -3
- package/dist/features/parameters/dynamic-margin-calculation/loads-variations-parameters.js +2 -2
- package/dist/features/parameters/dynamic-margin-calculation/time-delay-parameters.js +2 -2
- package/dist/features/parameters/dynamic-security-analysis/contingency-parameters.js +2 -2
- package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-inline.js +3 -3
- package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-parameters-form.js +6 -7
- package/dist/features/parameters/dynamic-security-analysis/scenario-parameters.js +2 -2
- package/dist/features/parameters/dynamic-simulation/curve/common/grid-buttons.js +4 -4
- package/dist/features/parameters/dynamic-simulation/curve/curve-parameters.js +7 -8
- package/dist/features/parameters/dynamic-simulation/curve/dialog/curve-preview.js +7 -7
- package/dist/features/parameters/dynamic-simulation/curve/dialog/curve-selector-dialog.js +10 -10
- package/dist/features/parameters/dynamic-simulation/curve/dialog/curve-selector.js +26 -50
- package/dist/features/parameters/dynamic-simulation/curve/dialog/equipment-filter.js +20 -20
- package/dist/features/parameters/dynamic-simulation/curve/dialog/model-filter.js +11 -10
- package/dist/features/parameters/dynamic-simulation/dynamic-simulation-inline.js +3 -3
- package/dist/features/parameters/dynamic-simulation/dynamic-simulation-parameters-form.js +6 -7
- package/dist/features/parameters/dynamic-simulation/mapping/mapping-parameters.js +2 -2
- package/dist/features/parameters/dynamic-simulation/network/network-parameters.js +2 -2
- package/dist/features/parameters/dynamic-simulation/solver/solver-parameters.js +2 -2
- package/dist/features/parameters/dynamic-simulation/time-delay/time-delay-parameters.js +2 -2
- package/dist/features/parameters/loadflow/load-flow-parameters-content.js +3 -3
- package/dist/features/parameters/loadflow/load-flow-parameters-form.js +2 -2
- package/dist/features/parameters/loadflow/load-flow-parameters-header.js +5 -5
- package/dist/features/parameters/loadflow/load-flow-parameters-inline.js +2 -3
- package/dist/features/parameters/network-visualizations/map-parameters.js +8 -8
- package/dist/features/parameters/network-visualizations/network-area-diagram-parameters.js +4 -4
- package/dist/features/parameters/network-visualizations/network-visualizations-form.js +5 -8
- package/dist/features/parameters/network-visualizations/network-visualizations-parameters-inline.js +2 -2
- package/dist/features/parameters/network-visualizations/single-line-diagram-parameters.js +8 -8
- package/dist/features/parameters/pcc-min/pcc-min-parameters-form.js +5 -8
- package/dist/features/parameters/pcc-min/pcc-min-parameters-inline.js +2 -2
- package/dist/features/parameters/security-analysis/security-analysis-parameters-form.js +7 -7
- package/dist/features/parameters/security-analysis/security-analysis-parameters-inline.js +2 -3
- package/dist/features/parameters/security-analysis/security-analysis-parameters-selector.js +3 -3
- package/dist/features/parameters/security-analysis/security-analysis-violations-hiding.js +8 -11
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-form.js +8 -8
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-inline.js +2 -2
- package/dist/features/parameters/sensi/sensitivity-parameters-fields.js +7 -8
- package/dist/features/parameters/sensi/sensitivity-parameters-selector.js +2 -2
- package/dist/features/parameters/short-circuit/short-circuit-general-tab-panel.js +13 -13
- package/dist/features/parameters/short-circuit/short-circuit-parameters-content.js +3 -3
- package/dist/features/parameters/short-circuit/short-circuit-parameters-form.js +4 -7
- package/dist/features/parameters/short-circuit/short-circuit-parameters-inline.js +2 -2
- package/dist/features/parameters/short-circuit/short-circuit-power-electronics-tab-panel.js +7 -7
- package/dist/features/parameters/short-circuit/short-circuit-study-area-tab-panel.js +4 -4
- package/dist/features/parameters/voltage-init/equipment-selection-parameters.js +5 -5
- package/dist/features/parameters/voltage-init/general-parameters.js +2 -2
- package/dist/features/parameters/voltage-init/voltage-init-parameters-form.js +5 -8
- package/dist/features/parameters/voltage-init/voltage-init-parameters-inline.js +2 -2
- package/dist/features/parameters/voltage-init/voltage-limits-parameters.js +2 -2
- package/dist/features/topBar/AboutDialog.js +4 -7
- package/dist/index.js +7 -3
- package/package.json +3 -2
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
|
-
|
|
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;
|
|
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 &&
|
|
5
|
-
const suppressNonNumericKeyboardEvent = (params) =>
|
|
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({
|
|
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
|
|
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 {
|
|
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(
|
|
17
|
-
/* @__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(
|
|
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 {
|
|
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(
|
|
26
|
-
/* @__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(
|
|
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(
|
|
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(
|
|
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 {
|
|
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(
|
|
320
|
-
/* @__PURE__ */ jsxs(
|
|
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(
|
|
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 {
|
|
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(
|
|
54
|
-
/* @__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(
|
|
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
|
-
|
|
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 {
|
|
2
|
+
import { Grid2Props } from '@mui/material';
|
|
3
3
|
export interface GridItemProps extends PropsWithChildren {
|
|
4
|
-
size?:
|
|
4
|
+
size?: Grid2Props['size'];
|
|
5
5
|
alignItem?: string;
|
|
6
6
|
tooltip?: ReactNode;
|
|
7
|
+
sx?: Grid2Props['sx'];
|
|
7
8
|
}
|
|
8
|
-
export
|
|
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 {
|
|
2
|
+
import { Grid2 } from "@mui/material";
|
|
3
3
|
import { CustomTooltip } from "../../ui/tooltip/CustomTooltip.js";
|
|
4
|
-
|
|
5
|
-
|
|
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
|
|
12
|
+
GridItem
|
|
9
13
|
};
|
|
@@ -5,4 +5,4 @@ export interface GridSectionProps {
|
|
|
5
5
|
size?: number;
|
|
6
6
|
customStyle?: SxStyle;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
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 {
|
|
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(
|
|
5
|
+
return /* @__PURE__ */ jsx(Grid2, { container: true, spacing: 2, size: 12, 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
|
|
8
|
+
GridSection
|
|
9
9
|
};
|
|
@@ -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 "
|
|
27
|
-
import "
|
|
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 {
|
|
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(
|
|
50
|
-
/* @__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(
|
|
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(
|
|
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 {
|
|
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(
|
|
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 {
|
|
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(
|
|
36
|
-
/* @__PURE__ */ jsx(
|
|
37
|
-
/* @__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(
|
|
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,
|
package/dist/components/index.js
CHANGED
|
@@ -100,9 +100,8 @@ import { ExplicitNamingFilterForm, explicitNamingFilterSchema, getExplicitNaming
|
|
|
100
100
|
import { FILTER_EQUIPMENTS_ATTRIBUTES } from "./composite/filter/explicitNaming/ExplicitNamingFilterConstants.js";
|
|
101
101
|
import { saveExpertFilter, saveExplicitNamingFilter } from "./composite/filter/utils/filterApi.js";
|
|
102
102
|
import { CONTINGENCY_LIST_EQUIPMENTS, FILTER_EQUIPMENTS } from "./composite/filter/utils/filterFormUtils.js";
|
|
103
|
-
import "
|
|
104
|
-
import "
|
|
105
|
-
import "react-intl";
|
|
103
|
+
import { GridItem } from "./composite/grid/grid-item.js";
|
|
104
|
+
import { GridSection } from "./composite/grid/grid-section.js";
|
|
106
105
|
import { OverflowableTableCell } from "./composite/muiTable/OverflowableTableCell.js";
|
|
107
106
|
import { OverflowableTableCellWithCheckbox } from "./composite/muiTable/OverflowableTableCellWithCheckbox.js";
|
|
108
107
|
import { AutocompleteWithFavorites } from "./composite/reactQueryBuilder/AutocompleteWithFavorites.js";
|
|
@@ -258,6 +257,8 @@ export {
|
|
|
258
257
|
FlatParameters,
|
|
259
258
|
FloatInput,
|
|
260
259
|
GLOBAL_REPORT_NODE_LABEL,
|
|
260
|
+
GridItem,
|
|
261
|
+
GridSection,
|
|
261
262
|
GroupValueEditor,
|
|
262
263
|
HelperPreviousValue,
|
|
263
264
|
InputWithPopupConfirmation,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useIntl, FormattedMessage } from "react-intl";
|
|
3
3
|
import { useState, useCallback, useEffect } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { Stack, Grid2, Button, Typography, Box, CircularProgress } from "@mui/material";
|
|
5
5
|
import { useForm } from "react-hook-form";
|
|
6
6
|
import { yupResolver } from "@hookform/resolvers/yup";
|
|
7
7
|
import * as yup from "yup";
|
|
@@ -186,13 +186,13 @@ function ElementSaveDialog({
|
|
|
186
186
|
);
|
|
187
187
|
const renderChooser = () => {
|
|
188
188
|
if (isCreateMode) {
|
|
189
|
-
return /* @__PURE__ */ jsxs(
|
|
190
|
-
/* @__PURE__ */ jsx(
|
|
189
|
+
return /* @__PURE__ */ jsxs(Grid2, { container: true, children: [
|
|
190
|
+
/* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(Button, { onClick: handleChangeFolder, variant: "contained", size: "small", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "showSelectDirectoryDialog" }) }) }),
|
|
191
191
|
/* @__PURE__ */ jsx(Typography, { m: 1, component: "span", children: /* @__PURE__ */ jsx(Box, { fontWeight: "fontWeightBold", children: destinationFolder ? destinationFolder.name : /* @__PURE__ */ jsx(CircularProgress, {}) }) })
|
|
192
192
|
] });
|
|
193
193
|
}
|
|
194
|
-
return /* @__PURE__ */ jsxs(
|
|
195
|
-
/* @__PURE__ */ jsx(
|
|
194
|
+
return /* @__PURE__ */ jsxs(Grid2, { container: true, children: [
|
|
195
|
+
/* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(Button, { onClick: handleChangeFolder, variant: "contained", size: "small", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "showSelectDirectoryItemDialog" }) }) }),
|
|
196
196
|
/* @__PURE__ */ jsx(Typography, { m: 1, component: "span", children: /* @__PURE__ */ jsx(Box, { fontWeight: "fontWeightBold", children: selectedItem ? selectedItem.fullPath : null }) })
|
|
197
197
|
] });
|
|
198
198
|
};
|
|
@@ -206,8 +206,8 @@ function ElementSaveDialog({
|
|
|
206
206
|
disabledSave: disableSave,
|
|
207
207
|
formContext: { ...formMethods, validationSchema: schema },
|
|
208
208
|
children: [
|
|
209
|
-
/* @__PURE__ */ jsxs(
|
|
210
|
-
!createOnlyMode && /* @__PURE__ */ jsx(
|
|
209
|
+
/* @__PURE__ */ jsxs(Stack, { spacing: 2, marginTop: "auto", children: [
|
|
210
|
+
!createOnlyMode && /* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(
|
|
211
211
|
RadioInput,
|
|
212
212
|
{
|
|
213
213
|
name: FieldConstants.OPERATION_TYPE,
|
|
@@ -224,7 +224,7 @@ function ElementSaveDialog({
|
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
) }),
|
|
227
|
-
/* @__PURE__ */ jsx(
|
|
227
|
+
/* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(
|
|
228
228
|
UniqueNameInput,
|
|
229
229
|
{
|
|
230
230
|
name: FieldConstants.NAME,
|
|
@@ -235,7 +235,7 @@ function ElementSaveDialog({
|
|
|
235
235
|
autoFocus: true
|
|
236
236
|
}
|
|
237
237
|
) }),
|
|
238
|
-
/* @__PURE__ */ jsx(
|
|
238
|
+
/* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(DescriptionField, {}) }),
|
|
239
239
|
renderChooser()
|
|
240
240
|
] }),
|
|
241
241
|
/* @__PURE__ */ jsx(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { Grid2, Typography, Box, Button } from "@mui/material";
|
|
4
4
|
import { useIntl, FormattedMessage } from "react-intl";
|
|
5
5
|
import { useController } from "react-hook-form";
|
|
6
6
|
import { FolderOutlined } from "@mui/icons-material";
|
|
@@ -47,14 +47,14 @@ function ModifyElementSelection(props) {
|
|
|
47
47
|
setOpen(false);
|
|
48
48
|
};
|
|
49
49
|
return /* @__PURE__ */ jsxs(
|
|
50
|
-
|
|
50
|
+
Grid2,
|
|
51
51
|
{
|
|
52
52
|
sx: {
|
|
53
53
|
marginTop: "10px",
|
|
54
54
|
alignItems: "center"
|
|
55
55
|
},
|
|
56
56
|
children: [
|
|
57
|
-
/* @__PURE__ */ jsxs(
|
|
57
|
+
/* @__PURE__ */ jsxs(Grid2, { container: true, children: [
|
|
58
58
|
/* @__PURE__ */ jsx(Typography, { m: 1, component: "span", children: /* @__PURE__ */ jsxs(Box, { fontWeight: "fontWeightBold", display: "flex", justifyContent: "center", alignItems: "center", children: [
|
|
59
59
|
/* @__PURE__ */ jsx(FolderOutlined, {}),
|
|
60
60
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Grid2, Alert } from "@mui/material";
|
|
3
3
|
function FieldErrorAlert({ message }) {
|
|
4
|
-
return /* @__PURE__ */ jsx(
|
|
4
|
+
return /* @__PURE__ */ jsx(Grid2, { size: 12, children: /* @__PURE__ */ jsx(Alert, { severity: "error", children: message }) });
|
|
5
5
|
}
|
|
6
6
|
export {
|
|
7
7
|
FieldErrorAlert
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { useIntl } from "react-intl";
|
|
4
|
-
import {
|
|
4
|
+
import { Grid2, IconButton } from "@mui/material";
|
|
5
5
|
import { RestoreFromTrash, Delete } from "@mui/icons-material";
|
|
6
6
|
import { CustomTooltip } from "../../tooltip/CustomTooltip.js";
|
|
7
7
|
function DeletableRow({
|
|
@@ -14,17 +14,17 @@ function DeletableRow({
|
|
|
14
14
|
const intl = useIntl();
|
|
15
15
|
const [isMouseHover, setIsMouseHover] = useState(false);
|
|
16
16
|
return /* @__PURE__ */ jsxs(
|
|
17
|
-
|
|
17
|
+
Grid2,
|
|
18
18
|
{
|
|
19
19
|
container: true,
|
|
20
20
|
spacing: 2,
|
|
21
|
-
|
|
21
|
+
size: 12,
|
|
22
22
|
alignItems,
|
|
23
23
|
onMouseEnter: () => setIsMouseHover(true),
|
|
24
24
|
onMouseLeave: () => setIsMouseHover(false),
|
|
25
25
|
children: [
|
|
26
26
|
children,
|
|
27
|
-
/* @__PURE__ */ jsx(
|
|
27
|
+
/* @__PURE__ */ jsx(Grid2, { size: 1, children: isMouseHover && !disabledDeletion && /* @__PURE__ */ jsx(
|
|
28
28
|
CustomTooltip,
|
|
29
29
|
{
|
|
30
30
|
title: intl.formatMessage({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useFieldArray } from "react-hook-form";
|
|
3
|
-
import {
|
|
3
|
+
import { Grid2 } from "@mui/material";
|
|
4
4
|
import { forwardRef, useImperativeHandle } from "react";
|
|
5
5
|
import { DeletableRow } from "./DeletableRow.js";
|
|
6
6
|
import { ErrorInput } from "../errorManagement/ErrorInput.js";
|
|
@@ -40,8 +40,8 @@ const ExpandableInput = forwardRef(
|
|
|
40
40
|
}),
|
|
41
41
|
[append, replace]
|
|
42
42
|
);
|
|
43
|
-
return /* @__PURE__ */ jsxs(
|
|
44
|
-
/* @__PURE__ */ jsx(
|
|
43
|
+
return /* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 2, children: [
|
|
44
|
+
/* @__PURE__ */ jsx(Grid2, { size: 12, children: /* @__PURE__ */ jsx(ErrorInput, { name, InputField: MidFormError }) }),
|
|
45
45
|
watchProps && values.map((value, idx) => /* @__PURE__ */ jsx(
|
|
46
46
|
DeletableRow,
|
|
47
47
|
{
|
|
@@ -58,7 +58,7 @@ const ExpandableInput = forwardRef(
|
|
|
58
58
|
},
|
|
59
59
|
value.id
|
|
60
60
|
)),
|
|
61
|
-
addButtonLabel && /* @__PURE__ */ jsx(
|
|
61
|
+
addButtonLabel && /* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(AddButton, { disabled, onClick: () => append(initialValue), label: addButtonLabel }) })
|
|
62
62
|
] });
|
|
63
63
|
}
|
|
64
64
|
);
|