@gridsuite/commons-ui 0.259.0 → 0.261.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/dist/components/composite/agGridTable/BottomTableButtons.js +5 -5
- package/dist/components/composite/customAGGrid/cell-renderers.js +1 -1
- package/dist/components/composite/customAGGrid/custom-aggrid-filters/custom-aggrid-text-filter.js +10 -8
- package/dist/components/composite/customAGGrid/custom-aggrid-filters/custom-filter-icon.js +2 -2
- package/dist/components/composite/customAGGrid/custom-aggrid-header.js +9 -9
- package/dist/components/composite/customAGGrid/custom-aggrid-menu.js +2 -2
- 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/elementSearch/elementSearchInput/ElementSearchInput.js +4 -2
- package/dist/components/composite/filter/HeaderFilterForm.js +4 -4
- package/dist/components/composite/filter/expert/expertFilterConstants.js +3 -1
- package/dist/components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js +7 -7
- package/dist/components/composite/flatParameters/FlatParameters.js +17 -11
- package/dist/components/composite/grid/grid-item.d.ts +4 -4
- package/dist/components/composite/grid/grid-item.js +2 -2
- package/dist/components/composite/grid/grid-section.js +2 -2
- package/dist/components/composite/reactQueryBuilder/PropertyValueEditor.js +5 -5
- package/dist/components/composite/reactQueryBuilder/compositeRuleEditor/RuleValueEditor.js +5 -5
- package/dist/components/composite/report/QuickSearch.js +31 -29
- package/dist/components/composite/report/report-viewer/log-table/log-table.js +2 -2
- package/dist/components/ui/csvPicker/csv-picker.js +4 -4
- package/dist/components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js +8 -8
- package/dist/components/ui/dialogs/modifyElementSelection/ModifyElementSelection.js +3 -3
- package/dist/components/ui/dialogs/name-element-editor/name-element-editor-form.js +4 -4
- package/dist/components/ui/inputs/SelectClearable.js +3 -1
- package/dist/components/ui/inputs/checkbox-autocomplete/checkbox-autocomplete.js +7 -5
- package/dist/components/ui/reactHookForm/CheckboxNullableInput.js +4 -2
- package/dist/components/ui/reactHookForm/autocompleteInputs/AutocompleteInput.js +3 -1
- package/dist/components/ui/reactHookForm/autocompleteInputs/MultipleAutocompleteInput.js +1 -1
- package/dist/components/ui/reactHookForm/booleans/BooleanInput.js +1 -1
- package/dist/components/ui/reactHookForm/chip-items-input.js +11 -9
- package/dist/components/ui/reactHookForm/directory-item-input/directory-item-input.js +5 -5
- package/dist/components/ui/reactHookForm/errorManagement/FieldErrorAlert.js +2 -2
- package/dist/components/ui/reactHookForm/expandableInput/DeletableRow.js +3 -3
- 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/readOnly/ButtonReadOnlyInput.js +26 -24
- package/dist/components/ui/reactHookForm/readOnly/ReadOnlyInput.js +11 -9
- package/dist/components/ui/reactHookForm/selectInputs/CountriesInput.js +2 -2
- package/dist/components/ui/reactHookForm/tableInputs/table-numerical-input.js +30 -28
- package/dist/components/ui/reactHookForm/tableInputs/table-text-input.js +10 -8
- package/dist/components/ui/reactHookForm/text/ExpandingTextField.js +6 -4
- package/dist/components/ui/reactHookForm/text/TextInput.js +7 -5
- package/dist/components/ui/reactHookForm/text/UniqueNameInput.js +6 -4
- package/dist/components/ui/reactHookForm/utils/HelperPreviousValue.js +10 -8
- package/dist/components/ui/reactHookForm/utils/TextFieldWithAdornment.js +4 -2
- package/dist/components/ui/reactHookForm/utils/functions.js +2 -2
- package/dist/features/authentication/AuthenticationRouterErrorDisplay.js +3 -3
- package/dist/features/global-filter/ui/global-filter-dropdown-panel.js +8 -8
- package/dist/features/global-filter/ui/global-filter-panel.js +35 -29
- package/dist/features/network-modification-table/network-modification-table-styles.js +2 -3
- package/dist/features/network-modifications/battery/creation/BatteryCreationForm.js +18 -8
- package/dist/features/network-modifications/battery/modification/BatteryDialogHeader.js +8 -6
- package/dist/features/network-modifications/battery/modification/BatteryDialogTabs.js +4 -2
- package/dist/features/network-modifications/battery/modification/BatteryDialogTabsContent.js +6 -6
- package/dist/features/network-modifications/battery/modification/BatteryModificationForm.js +4 -4
- package/dist/features/network-modifications/by-filter/assignment/assignment/assignment-constants.d.ts +1 -1
- package/dist/features/network-modifications/by-filter/assignment/assignment/assignment-constants.js +4 -2
- package/dist/features/network-modifications/by-filter/assignment/modification-by-assignment-form.js +3 -3
- package/dist/features/network-modifications/by-filter/deletion/ByFilterDeletionForm.js +4 -4
- package/dist/features/network-modifications/by-filter/formula/formula/formula-form.js +2 -2
- package/dist/features/network-modifications/by-filter/formula/formula/formula-utils.js +2 -1
- package/dist/features/network-modifications/by-filter/formula/modification-by-formula-form.js +3 -3
- 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/currentLimits/LimitsPane.js +10 -10
- package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsEditor.js +5 -5
- package/dist/features/network-modifications/common/currentLimits/limitsEditor/TemporaryLimitsTable.js +2 -2
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/OperationalLimitsGroups.js +2 -2
- package/dist/features/network-modifications/common/measurements/BusbarSectionVoltageMeasurementsForm.js +6 -6
- package/dist/features/network-modifications/common/measurements/PowerMeasurementsForm.js +3 -3
- package/dist/features/network-modifications/common/measurements/PowerWithValidityForm.js +4 -4
- package/dist/features/network-modifications/common/properties/PropertyForm.js +5 -5
- package/dist/features/network-modifications/common/reactiveLimits/ReactiveLimitsForm.js +2 -2
- package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/ReactiveCapabilityCurveTableForm.js +7 -7
- package/dist/features/network-modifications/common/regulatingTerminal/RegulatingTerminalForm.js +4 -4
- package/dist/features/network-modifications/common/setpoints/SetPointsForm.js +4 -4
- package/dist/features/network-modifications/common/shortCircuit/ShortCircuitForm.js +2 -2
- package/dist/features/network-modifications/common/voltageRegulation/VoltageRegulationForm.js +2 -2
- package/dist/features/network-modifications/equipmentDeletion/EquipmentDeletionForm.js +5 -5
- package/dist/features/network-modifications/equipmentDeletion/hvdcLccDeletion/HvdcLccDeletionSpecificForm.js +4 -4
- package/dist/features/network-modifications/equipmentDeletion/hvdcLccDeletion/ShuntCompensatorSelectionForm.js +4 -4
- package/dist/features/network-modifications/generator/creation/GeneratorCreationForm.js +7 -7
- package/dist/features/network-modifications/generator/modification/GeneratorDialogHeader.js +9 -7
- package/dist/features/network-modifications/generator/modification/GeneratorDialogTabs.js +4 -2
- package/dist/features/network-modifications/generator/modification/GeneratorDialogTabsContent.js +7 -7
- package/dist/features/network-modifications/generator/modification/GeneratorModificationForm.js +4 -4
- package/dist/features/network-modifications/line/characteristics/LineCharacteristicsPane.js +4 -4
- package/dist/features/network-modifications/line/common/LineDialogHeader.js +2 -2
- package/dist/features/network-modifications/load/common/LoadDialogHeader.js +9 -7
- package/dist/features/network-modifications/load/common/LoadDialogTabs.js +4 -2
- package/dist/features/network-modifications/load/common/LoadForm.js +4 -4
- package/dist/features/network-modifications/shunt-compensator/common/CharacteristicsForm.js +13 -13
- package/dist/features/network-modifications/shunt-compensator/creation/ShuntCompensatorCreationForm.js +9 -9
- package/dist/features/network-modifications/shunt-compensator/modification/ShuntCompensatorModificationForm.js +11 -11
- package/dist/features/network-modifications/substation/creation/SubstationCreationForm.js +6 -6
- package/dist/features/network-modifications/substation/modification/SubstationModificationForm.js +10 -8
- package/dist/features/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js +10 -8
- package/dist/features/network-modifications/voltageLevel/creation/tabs/characteristicsTab/CharacteristicsTab.js +8 -8
- package/dist/features/network-modifications/voltageLevel/creation/tabs/structureTab/StructureTab.js +4 -4
- 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 +2 -2
- package/dist/features/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationCreationSection.js +6 -6
- package/dist/features/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationTab.js +5 -5
- package/dist/features/network-modifications/voltageLevel/modification/VoltageLevelModificationForm.js +23 -19
- package/dist/features/parameters/common/line-separator.js +2 -2
- package/dist/features/parameters/common/parameter-field.js +6 -6
- package/dist/features/parameters/common/parameter-layout/parameter-layout.js +7 -7
- package/dist/features/parameters/common/parameter-table-field/parameter-table-field.js +3 -3
- package/dist/features/parameters/common/parameters.js +6 -4
- package/dist/features/parameters/common/provider-param.js +4 -4
- 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.d.ts +4 -3
- 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 +4 -4
- 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-parameters-form.js +4 -4
- package/dist/features/parameters/dynamic-security-analysis/scenario-parameters.js +2 -2
- package/dist/features/parameters/dynamic-simulation/curve/common/checkbox-treeview.js +2 -2
- package/dist/features/parameters/dynamic-simulation/curve/common/grid-buttons.js +4 -4
- package/dist/features/parameters/dynamic-simulation/curve/common/grid-search.js +7 -5
- package/dist/features/parameters/dynamic-simulation/curve/curve-parameters.js +5 -5
- package/dist/features/parameters/dynamic-simulation/curve/dialog/curve-selector-dialog.js +5 -5
- package/dist/features/parameters/dynamic-simulation/curve/dialog/curve-selector.js +3 -3
- package/dist/features/parameters/dynamic-simulation/curve/dialog/equipment-filter.js +13 -13
- package/dist/features/parameters/dynamic-simulation/curve/dialog/model-filter.js +4 -4
- package/dist/features/parameters/dynamic-simulation/dynamic-simulation-parameters-form.js +4 -4
- 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-dialog.js +2 -2
- package/dist/features/parameters/loadflow/load-flow-parameters-form.js +4 -4
- 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-parameters-dialog.js +8 -6
- package/dist/features/parameters/network-visualizations/single-line-diagram-parameters.js +8 -8
- package/dist/features/parameters/pcc-min/pcc-min-parameters-dialog.js +8 -6
- package/dist/features/parameters/pcc-min/pcc-min-parameters-form.js +2 -2
- package/dist/features/parameters/security-analysis/security-analysis-parameters-dialog.js +8 -6
- package/dist/features/parameters/security-analysis/security-analysis-violations-hiding.js +6 -6
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-dialog.js +2 -2
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-form.js +2 -2
- package/dist/features/parameters/sensi/sensitivity-parameters-fields.js +7 -7
- package/dist/features/parameters/sensi/sensitivity-parameters-selector.js +2 -2
- package/dist/features/parameters/short-circuit/short-circuit-general-tab-panel.js +11 -11
- package/dist/features/parameters/short-circuit/short-circuit-parameters-content.js +3 -3
- package/dist/features/parameters/short-circuit/short-circuit-parameters-dialog.js +2 -2
- package/dist/features/parameters/short-circuit/short-circuit-parameters-form.js +2 -2
- package/dist/features/parameters/short-circuit/short-circuit-power-electronics-tab-panel.js +5 -5
- package/dist/features/parameters/short-circuit/short-circuit-study-area-tab-panel.js +2 -2
- package/dist/features/parameters/voltage-init/equipment-selection-parameters.js +4 -4
- package/dist/features/parameters/voltage-init/general-parameters.js +2 -2
- package/dist/features/parameters/voltage-init/voltage-init-parameters-dialog.js +8 -6
- package/dist/features/parameters/voltage-init/voltage-init-parameters-form.js +2 -2
- package/dist/features/parameters/voltage-init/voltage-limits-parameters.js +2 -2
- package/dist/features/topBar/AboutDialog.js +40 -28
- package/dist/features/topBar/TopBar.js +2 -2
- package/dist/features/topBar/UserInformationDialog.js +34 -34
- package/dist/features/topBar/UserSettingsDialog.js +3 -1
- package/dist/translations/en/networkModificationsEn.d.ts +1 -1
- package/dist/translations/en/networkModificationsEn.js +1 -1
- package/dist/translations/fr/networkModificationsFr.d.ts +1 -1
- package/dist/translations/fr/networkModificationsFr.js +1 -1
- package/dist/utils/types/types.d.ts +1 -0
- package/dist/utils/types/types.js +1 -0
- package/package.json +7 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { styled, IconButton,
|
|
2
|
+
import { styled, IconButton, Grid, Box } from "@mui/material";
|
|
3
3
|
import { ControlPoint, Delete, ArrowCircleUp, ArrowCircleDown } from "@mui/icons-material";
|
|
4
4
|
import { ErrorInput } from "../../ui/reactHookForm/errorManagement/ErrorInput.js";
|
|
5
5
|
import { FieldErrorAlert } from "../../ui/reactHookForm/errorManagement/FieldErrorAlert.js";
|
|
@@ -25,8 +25,8 @@ function BottomTableButtons({
|
|
|
25
25
|
csvProps
|
|
26
26
|
}) {
|
|
27
27
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
28
|
-
/* @__PURE__ */ jsxs(
|
|
29
|
-
csvProps?.getTableData && /* @__PURE__ */ jsx(
|
|
28
|
+
/* @__PURE__ */ jsxs(Grid, { container: true, paddingTop: 1, paddingLeft: 1, alignItems: "center", spacing: 1, children: [
|
|
29
|
+
csvProps?.getTableData && /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(
|
|
30
30
|
CsvDownloadButton,
|
|
31
31
|
{
|
|
32
32
|
data: csvProps.getTableData,
|
|
@@ -37,8 +37,8 @@ function BottomTableButtons({
|
|
|
37
37
|
withExportButton: true
|
|
38
38
|
}
|
|
39
39
|
) }),
|
|
40
|
-
csvProps?.extraButtons && /* @__PURE__ */ jsx(
|
|
41
|
-
/* @__PURE__ */ jsxs(
|
|
40
|
+
csvProps?.extraButtons && /* @__PURE__ */ jsx(Grid, { children: csvProps.extraButtons }),
|
|
41
|
+
/* @__PURE__ */ jsxs(Grid, { sx: { marginLeft: "auto" }, children: [
|
|
42
42
|
/* @__PURE__ */ jsx(InnerColoredButton, { onClick: handleAddRow, "aria-label": "Add row", children: /* @__PURE__ */ jsx(ControlPoint, {}) }),
|
|
43
43
|
/* @__PURE__ */ jsx(
|
|
44
44
|
InnerColoredButton,
|
package/dist/components/composite/customAGGrid/custom-aggrid-filters/custom-aggrid-text-filter.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
|
-
import { Stack,
|
|
3
|
+
import { Stack, Grid, 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";
|
|
@@ -32,7 +32,7 @@ function CustomAggridTextFilter({
|
|
|
32
32
|
const intl = useIntl();
|
|
33
33
|
const isRoundingDisplayed = useMemo(() => !!(isNumberInput && value), [isNumberInput, value]);
|
|
34
34
|
return /* @__PURE__ */ jsxs(Stack, { gap: 0.2, children: [
|
|
35
|
-
/* @__PURE__ */ jsx(
|
|
35
|
+
/* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(
|
|
36
36
|
TextField,
|
|
37
37
|
{
|
|
38
38
|
size: "small",
|
|
@@ -42,16 +42,18 @@ function CustomAggridTextFilter({
|
|
|
42
42
|
placeholder: intl.formatMessage({
|
|
43
43
|
id: "filter.filterOoo"
|
|
44
44
|
}),
|
|
45
|
-
inputProps: {
|
|
46
|
-
type: isNumberInput ? FilterDataTypes.NUMBER : FilterDataTypes.TEXT
|
|
47
|
-
},
|
|
48
45
|
sx: mergeSx(styles.input, isNumberInput ? styles.noArrows : void 0),
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
slotProps: {
|
|
47
|
+
input: {
|
|
48
|
+
endAdornment: value ? /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx(IconButton, { "aria-label": "clear filter", onClick: onClear, edge: "end", size: "small", children: /* @__PURE__ */ jsx(Clear, {}) }) }) : null
|
|
49
|
+
},
|
|
50
|
+
htmlInput: {
|
|
51
|
+
type: isNumberInput ? FilterDataTypes.NUMBER : FilterDataTypes.TEXT
|
|
52
|
+
}
|
|
51
53
|
}
|
|
52
54
|
}
|
|
53
55
|
) }),
|
|
54
|
-
isRoundingDisplayed && /* @__PURE__ */ jsx(
|
|
56
|
+
isRoundingDisplayed && /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(DisplayRounding, { decimalAfterDot }) })
|
|
55
57
|
] });
|
|
56
58
|
}
|
|
57
59
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Grid, 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(
|
|
18
|
+
return /* @__PURE__ */ jsx(Grid, { sx: styles.gridRoot, children: /* @__PURE__ */ jsx(Grid, { 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 {
|
|
4
|
+
import { Grid, 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";
|
|
@@ -54,9 +54,9 @@ function CustomHeaderComponent({
|
|
|
54
54
|
const handleMouseLeave = useCallback(() => {
|
|
55
55
|
setIsHoveringColumnHeader(false);
|
|
56
56
|
}, []);
|
|
57
|
-
return /* @__PURE__ */ jsx(
|
|
57
|
+
return /* @__PURE__ */ jsx(Grid, { container: true, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, sx: { width: "100%" }, children: /* @__PURE__ */ jsxs(Grid, { container: true, alignItems: "center", wrap: "nowrap", sx: { width: "100%" }, children: [
|
|
58
58
|
/* @__PURE__ */ jsx(
|
|
59
|
-
|
|
59
|
+
Grid,
|
|
60
60
|
{
|
|
61
61
|
container: true,
|
|
62
62
|
sx: {
|
|
@@ -66,7 +66,7 @@ function CustomHeaderComponent({
|
|
|
66
66
|
},
|
|
67
67
|
flexBasis: forceDisplayFilterIcon ? "auto" : "100%",
|
|
68
68
|
children: /* @__PURE__ */ jsx(
|
|
69
|
-
|
|
69
|
+
Grid,
|
|
70
70
|
{
|
|
71
71
|
container: true,
|
|
72
72
|
sx: {
|
|
@@ -74,22 +74,22 @@ function CustomHeaderComponent({
|
|
|
74
74
|
minWidth: 0
|
|
75
75
|
},
|
|
76
76
|
onClick: handleClickHeader,
|
|
77
|
-
children: /* @__PURE__ */ jsxs(
|
|
78
|
-
/* @__PURE__ */ jsx(
|
|
79
|
-
isInvalid && /* @__PURE__ */ jsx(
|
|
77
|
+
children: /* @__PURE__ */ jsxs(Grid, { container: true, sx: styles.displayName, alignItems: "center", wrap: "nowrap", children: [
|
|
78
|
+
/* @__PURE__ */ jsx(Grid, { children: displayName }),
|
|
79
|
+
isInvalid && /* @__PURE__ */ jsx(Grid, { sx: styles.invalidIcon, children: /* @__PURE__ */ jsx(
|
|
80
80
|
Tooltip,
|
|
81
81
|
{
|
|
82
82
|
title: /* @__PURE__ */ jsx(FormattedMessage, { id: "spreadsheet/column/invalid-without-loadflow" }),
|
|
83
83
|
children: /* @__PURE__ */ jsx(WarningAmber, { fontSize: "small", color: "warning" })
|
|
84
84
|
}
|
|
85
85
|
) }),
|
|
86
|
-
sortParams && /* @__PURE__ */ jsx(
|
|
86
|
+
sortParams && /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(CustomAggridSort, { colId: column.getId(), sortParams }) })
|
|
87
87
|
] })
|
|
88
88
|
}
|
|
89
89
|
)
|
|
90
90
|
}
|
|
91
91
|
),
|
|
92
|
-
/* @__PURE__ */ jsxs(
|
|
92
|
+
/* @__PURE__ */ jsxs(Grid, { container: true, sx: styles.actions, children: [
|
|
93
93
|
filterComponent && /* @__PURE__ */ jsx(
|
|
94
94
|
CustomAggridFilter,
|
|
95
95
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useRef } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { Grid, 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(
|
|
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 }) }) }) }),
|
|
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 {
|
|
2
|
+
import { Grid, 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(Grid, { container: true, size: "grow", spacing: 1, children: [
|
|
17
|
+
/* @__PURE__ */ jsx(Grid, { 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(Grid, { 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 { Grid, 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(Grid, { container: true, size: "grow", spacing: 1, sx: { justifyContent: "flex-end" }, children: [
|
|
26
|
+
/* @__PURE__ */ jsx(Grid, { 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(Grid, { 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(Grid, { 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(Grid, { 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 { Grid, 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(Grid, { container: true, spacing: 1, size: 12, children: [
|
|
320
|
+
/* @__PURE__ */ jsxs(Grid, { 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(Grid, { 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 { Grid } 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";
|
|
@@ -42,8 +42,8 @@ const HeaderFilterSchema = {
|
|
|
42
42
|
[FieldConstants.DESCRIPTION]: yup.string().max(MAX_CHAR_DESCRIPTION, DESCRIPTION_LIMIT_ERROR)
|
|
43
43
|
};
|
|
44
44
|
function HeaderFilterForm({ creation, activeDirectory }) {
|
|
45
|
-
return /* @__PURE__ */ jsxs(
|
|
46
|
-
/* @__PURE__ */ jsx(
|
|
45
|
+
return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
|
|
46
|
+
/* @__PURE__ */ jsx(Grid, { size: 12, children: /* @__PURE__ */ jsx(
|
|
47
47
|
UniqueNameInput,
|
|
48
48
|
{
|
|
49
49
|
name: FieldConstants.NAME,
|
|
@@ -55,7 +55,7 @@ function HeaderFilterForm({ creation, activeDirectory }) {
|
|
|
55
55
|
fullWidth: false
|
|
56
56
|
}
|
|
57
57
|
) }),
|
|
58
|
-
/* @__PURE__ */ jsx(
|
|
58
|
+
/* @__PURE__ */ jsx(Grid, { size: 12, children: /* @__PURE__ */ jsx(DescriptionField, { expandingTextSx: elementEditionStyles.description }) })
|
|
59
59
|
] });
|
|
60
60
|
}
|
|
61
61
|
export {
|
|
@@ -1293,7 +1293,7 @@ const EXPERT_FILTER_FIELDS = {
|
|
|
1293
1293
|
FIELDS_OPTIONS.TARGET_P,
|
|
1294
1294
|
FIELDS_OPTIONS.TARGET_Q,
|
|
1295
1295
|
FIELDS_OPTIONS.VOLTAGE_REGULATOR_ON,
|
|
1296
|
-
FIELDS_OPTIONS.
|
|
1296
|
+
FIELDS_OPTIONS.VOLTAGE_SET_POINT,
|
|
1297
1297
|
FIELDS_OPTIONS.PLANNED_ACTIVE_POWER_SET_POINT,
|
|
1298
1298
|
FIELDS_OPTIONS.MARGINAL_COST,
|
|
1299
1299
|
FIELDS_OPTIONS.PLANNED_OUTAGE_RATE,
|
|
@@ -1314,6 +1314,8 @@ const EXPERT_FILTER_FIELDS = {
|
|
|
1314
1314
|
FIELDS_OPTIONS.MAX_P,
|
|
1315
1315
|
FIELDS_OPTIONS.TARGET_P,
|
|
1316
1316
|
FIELDS_OPTIONS.TARGET_Q,
|
|
1317
|
+
FIELDS_OPTIONS.VOLTAGE_REGULATOR_ON,
|
|
1318
|
+
FIELDS_OPTIONS.VOLTAGE_SET_POINT,
|
|
1317
1319
|
FIELDS_OPTIONS.PROPERTY,
|
|
1318
1320
|
FIELDS_OPTIONS.SUBSTATION_ID,
|
|
1319
1321
|
FIELDS_OPTIONS.SUBSTATION_PROPERTY,
|
|
@@ -2,7 +2,7 @@ import { jsxs, jsx, Fragment } 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 { Stack,
|
|
5
|
+
import { Stack, Grid, 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";
|
|
@@ -192,7 +192,7 @@ function ExplicitNamingFilterForm({
|
|
|
192
192
|
padding: 1,
|
|
193
193
|
sx: { flexGrow: 1, flexWrap: "nowrap", minHeight: 0 },
|
|
194
194
|
children: [
|
|
195
|
-
/* @__PURE__ */ jsxs(
|
|
195
|
+
/* @__PURE__ */ jsxs(Grid, { children: [
|
|
196
196
|
/* @__PURE__ */ jsx(
|
|
197
197
|
InputWithPopupConfirmation,
|
|
198
198
|
{
|
|
@@ -222,8 +222,8 @@ function ExplicitNamingFilterForm({
|
|
|
222
222
|
)
|
|
223
223
|
] }),
|
|
224
224
|
watchEquipmentType && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
225
|
-
/* @__PURE__ */ jsxs(
|
|
226
|
-
/* @__PURE__ */ jsx(
|
|
225
|
+
/* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, justifyContent: "space-between", alignItems: "center", children: [
|
|
226
|
+
/* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(
|
|
227
227
|
CsvDownloadButton,
|
|
228
228
|
{
|
|
229
229
|
data: getTemplateData,
|
|
@@ -233,7 +233,7 @@ function ExplicitNamingFilterForm({
|
|
|
233
233
|
variant: "contained"
|
|
234
234
|
}
|
|
235
235
|
) }),
|
|
236
|
-
/* @__PURE__ */ jsx(
|
|
236
|
+
/* @__PURE__ */ jsx(Grid, { sx: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ jsx(
|
|
237
237
|
CsvPicker,
|
|
238
238
|
{
|
|
239
239
|
label: "UploadCSV",
|
|
@@ -248,8 +248,8 @@ function ExplicitNamingFilterForm({
|
|
|
248
248
|
}
|
|
249
249
|
) })
|
|
250
250
|
] }),
|
|
251
|
-
fileErrorMessage && /* @__PURE__ */ jsx(
|
|
252
|
-
/* @__PURE__ */ jsx(
|
|
251
|
+
fileErrorMessage && /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(Alert, { severity: "error", children: fileErrorMessage }) }),
|
|
252
|
+
/* @__PURE__ */ jsx(Grid, { sx: { flexGrow: 1, minHeight: 0, display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ jsx(
|
|
253
253
|
CustomAgGridTable,
|
|
254
254
|
{
|
|
255
255
|
ref: tableRef,
|
|
@@ -193,7 +193,6 @@ function FlatParameters({
|
|
|
193
193
|
{
|
|
194
194
|
size: "small",
|
|
195
195
|
sx: { width: "50%" },
|
|
196
|
-
inputProps: { style: { textAlign: "right" } },
|
|
197
196
|
value: fieldValue,
|
|
198
197
|
onFocus: () => onUncommitted(param, true),
|
|
199
198
|
onBlur: () => onUncommitted(param, false),
|
|
@@ -204,7 +203,10 @@ function FlatParameters({
|
|
|
204
203
|
}
|
|
205
204
|
},
|
|
206
205
|
error: err,
|
|
207
|
-
variant
|
|
206
|
+
variant,
|
|
207
|
+
slotProps: {
|
|
208
|
+
htmlInput: { style: { textAlign: "right" } }
|
|
209
|
+
}
|
|
208
210
|
}
|
|
209
211
|
);
|
|
210
212
|
}
|
|
@@ -214,7 +216,6 @@ function FlatParameters({
|
|
|
214
216
|
{
|
|
215
217
|
size: "small",
|
|
216
218
|
sx: { width: "50%" },
|
|
217
|
-
inputProps: { style: { textAlign: "right" } },
|
|
218
219
|
value: fieldValue,
|
|
219
220
|
onFocus: () => onUncommitted(param, true),
|
|
220
221
|
onBlur: () => onUncommitted(param, false),
|
|
@@ -224,7 +225,10 @@ function FlatParameters({
|
|
|
224
225
|
onFieldChange(e.target.value, param);
|
|
225
226
|
}
|
|
226
227
|
},
|
|
227
|
-
variant
|
|
228
|
+
variant,
|
|
229
|
+
slotProps: {
|
|
230
|
+
htmlInput: { style: { textAlign: "right" } }
|
|
231
|
+
}
|
|
228
232
|
}
|
|
229
233
|
);
|
|
230
234
|
case "STRING_LIST":
|
|
@@ -239,9 +243,11 @@ function FlatParameters({
|
|
|
239
243
|
value: getStringListValue(allOptions, fieldValue),
|
|
240
244
|
size: "small",
|
|
241
245
|
variant,
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
246
|
+
slotProps: {
|
|
247
|
+
input: {
|
|
248
|
+
readOnly: true,
|
|
249
|
+
endAdornment: /* @__PURE__ */ jsx(IconButton, { onClick: () => setOpenSelector(true), children: /* @__PURE__ */ jsx(Tune, {}) })
|
|
250
|
+
}
|
|
245
251
|
}
|
|
246
252
|
}
|
|
247
253
|
),
|
|
@@ -274,12 +280,12 @@ function FlatParameters({
|
|
|
274
280
|
getOptionLabel: (option) => getTranslatedValue(param.name, option),
|
|
275
281
|
onChange: (e, value) => onFieldChange(value, param),
|
|
276
282
|
value: fieldValue,
|
|
277
|
-
|
|
283
|
+
renderValue: (values, getItemProps) => {
|
|
278
284
|
return values.map((value, index) => /* @__PURE__ */ createElement(
|
|
279
285
|
Chip,
|
|
280
286
|
{
|
|
281
287
|
label: getTranslatedValue(param.name, value),
|
|
282
|
-
...
|
|
288
|
+
...getItemProps({ index }),
|
|
283
289
|
key: `chip_${value}`
|
|
284
290
|
}
|
|
285
291
|
));
|
|
@@ -299,14 +305,14 @@ function FlatParameters({
|
|
|
299
305
|
size: "small",
|
|
300
306
|
onChange: (e, value) => onFieldChange(value, param),
|
|
301
307
|
value: fieldValue,
|
|
302
|
-
|
|
308
|
+
renderValue: (values, getItemProps) => {
|
|
303
309
|
return values.map((value, index) => /* @__PURE__ */ createElement(
|
|
304
310
|
Chip,
|
|
305
311
|
{
|
|
306
312
|
id: `chip_${value}`,
|
|
307
313
|
size: "small",
|
|
308
314
|
label: value,
|
|
309
|
-
...
|
|
315
|
+
...getItemProps({ index }),
|
|
310
316
|
key: `chip_${value}`
|
|
311
317
|
}
|
|
312
318
|
));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { GridProps } from '@mui/material';
|
|
3
3
|
export interface GridItemProps extends PropsWithChildren {
|
|
4
|
-
size?:
|
|
5
|
-
offset?:
|
|
4
|
+
size?: GridProps['size'];
|
|
5
|
+
offset?: GridProps['offset'];
|
|
6
6
|
alignItem?: string;
|
|
7
7
|
tooltip?: ReactNode;
|
|
8
|
-
sx?:
|
|
8
|
+
sx?: GridProps['sx'];
|
|
9
9
|
}
|
|
10
10
|
export declare function GridItem({ children, size, offset, alignItem, tooltip, sx, }: Readonly<GridItemProps>): import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Grid } from "@mui/material";
|
|
3
3
|
import { CustomTooltip } from "../../ui/tooltip/CustomTooltip.js";
|
|
4
4
|
import "../../../utils/conversionUtils.js";
|
|
5
5
|
import "../../../utils/types/equipmentType.js";
|
|
@@ -13,7 +13,7 @@ function GridItem({
|
|
|
13
13
|
tooltip,
|
|
14
14
|
sx
|
|
15
15
|
}) {
|
|
16
|
-
return /* @__PURE__ */ jsx(
|
|
16
|
+
return /* @__PURE__ */ jsx(Grid, { size, offset, sx: mergeSx({ alignItems: alignItem }, sx), children: children && (tooltip ? /* @__PURE__ */ jsx(CustomTooltip, { title: tooltip, children: /* @__PURE__ */ jsx("div", { children }) }) : children) });
|
|
17
17
|
}
|
|
18
18
|
export {
|
|
19
19
|
GridItem
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Grid, 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(Grid, { container: true, spacing: 2, sx: { width: "100%" }, children: /* @__PURE__ */ jsx(Grid, { size, children: /* @__PURE__ */ jsx(Box, { sx: customStyle, component: `h${heading}`, children: /* @__PURE__ */ jsx(FormattedMessage, { id: title }) }) }) });
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
8
8
|
GridSection
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo, useCallback } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { Grid, 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(Grid, { container: true, spacing: 1, width: "100%", alignItems: "center", children: [
|
|
50
|
+
/* @__PURE__ */ jsx(Grid, { 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(Grid, { 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(Grid, { size: "grow", children: /* @__PURE__ */ jsx(
|
|
80
80
|
Autocomplete,
|
|
81
81
|
{
|
|
82
82
|
value: propertyValues ?? [],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Grid, 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(Grid, { container: true, paddingTop: 1, children: [
|
|
36
|
+
/* @__PURE__ */ jsx(Grid, { container: true, size: 4, sx: styles.gridItem, children: /* @__PURE__ */ jsx(Typography, { children: intl.formatMessage({ id: fieldData.label }) }) }),
|
|
37
|
+
/* @__PURE__ */ jsx(Grid, { 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(Grid, { container: true, size: 5.5, sx: styles.gridItem, paddingLeft: 1, children: /* @__PURE__ */ jsx(
|
|
50
50
|
ValueEditorControlElement,
|
|
51
51
|
{
|
|
52
52
|
...props,
|