@gridsuite/commons-ui 0.286.0 → 0.287.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/customAGGrid/cell-renderers.js +1 -4
- package/dist/components/ui/dialogs/elementSaveDialog/ElementSaveDialog.d.ts +4 -1
- package/dist/components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js +6 -3
- package/dist/translations/en/networkModificationsEn.d.ts +1 -0
- package/dist/translations/en/networkModificationsEn.js +2 -1
- package/dist/translations/fr/networkModificationsFr.d.ts +1 -0
- package/dist/translations/fr/networkModificationsFr.js +2 -1
- package/package.json +1 -1
|
@@ -29,7 +29,7 @@ const styles = {
|
|
|
29
29
|
const FORMULA_ERROR_KEY = "spreadsheet/formula/error";
|
|
30
30
|
function BooleanCellRenderer({ value }) {
|
|
31
31
|
const isChecked = value;
|
|
32
|
-
return /* @__PURE__ */ jsx("div", { children: value
|
|
32
|
+
return /* @__PURE__ */ jsx("div", { children: value != null && /* @__PURE__ */ jsx(Checkbox, { style: { padding: 0 }, color: "default", checked: isChecked, disableRipple: true }) });
|
|
33
33
|
}
|
|
34
34
|
function BooleanNullableCellRenderer({ value }) {
|
|
35
35
|
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
@@ -52,9 +52,6 @@ const formatNumericCell = (value, fractionDigits) => {
|
|
|
52
52
|
const formatCell = (props) => {
|
|
53
53
|
let value = props?.valueFormatted || props.value;
|
|
54
54
|
let tooltipValue;
|
|
55
|
-
if (!value && props.colDef.valueGetter) {
|
|
56
|
-
props.colDef.valueGetter(props);
|
|
57
|
-
}
|
|
58
55
|
if (value != null && props.colDef.context?.numeric && props.colDef.context?.fractionDigits) {
|
|
59
56
|
tooltipValue = value;
|
|
60
57
|
value = Number.parseFloat(value).toFixed(props.colDef.context.fractionDigits);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { UUID } from 'node:crypto';
|
|
2
|
+
import { AlertColor } from '@mui/material';
|
|
2
3
|
import { ElementAttributes, ElementType, FieldConstants } from '../../../../utils';
|
|
3
4
|
declare enum OperationType {
|
|
4
5
|
CREATE = "CREATE",
|
|
@@ -36,6 +37,8 @@ export type ElementSaveDialogProps = {
|
|
|
36
37
|
createLabelId?: string;
|
|
37
38
|
updateLabelId?: string;
|
|
38
39
|
createOnlyMode?: boolean;
|
|
40
|
+
alertMessageId?: string;
|
|
41
|
+
alertSeverity?: AlertColor;
|
|
39
42
|
} & ({
|
|
40
43
|
/** createOnlyMode uses only CREATE operation */
|
|
41
44
|
createOnlyMode: true;
|
|
@@ -58,5 +61,5 @@ export type ElementSaveDialogProps = {
|
|
|
58
61
|
/** or directly a given directory */
|
|
59
62
|
initDirectory?: ElementAttributes;
|
|
60
63
|
});
|
|
61
|
-
export declare function ElementSaveDialog({ open, onSave, OnUpdate, onSaveShared, createSharedLabelId, createSharedDisabled, onClose, type, titleId, prefixIdForGeneratedName, defaultName, studyUuid, initDirectory, initialOperation, selectorTitleId, createLabelId, updateLabelId, createOnlyMode, }: Readonly<ElementSaveDialogProps>): import("react").JSX.Element;
|
|
64
|
+
export declare function ElementSaveDialog({ open, onSave, OnUpdate, onSaveShared, createSharedLabelId, createSharedDisabled, onClose, type, titleId, prefixIdForGeneratedName, defaultName, studyUuid, initDirectory, initialOperation, selectorTitleId, createLabelId, updateLabelId, createOnlyMode, alertMessageId, alertSeverity, }: Readonly<ElementSaveDialogProps>): import("react").JSX.Element;
|
|
62
65
|
export {};
|
|
@@ -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 { Stack, Grid, Button, Typography, Box, CircularProgress } from "@mui/material";
|
|
4
|
+
import { Stack, Grid, Alert, 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";
|
|
@@ -68,7 +68,9 @@ function ElementSaveDialog({
|
|
|
68
68
|
selectorTitleId,
|
|
69
69
|
createLabelId,
|
|
70
70
|
updateLabelId,
|
|
71
|
-
createOnlyMode = false
|
|
71
|
+
createOnlyMode = false,
|
|
72
|
+
alertMessageId,
|
|
73
|
+
alertSeverity = "warning"
|
|
72
74
|
}) {
|
|
73
75
|
const intl = useIntl();
|
|
74
76
|
const { snackError } = useSnackMessage();
|
|
@@ -280,7 +282,8 @@ function ElementSaveDialog({
|
|
|
280
282
|
})
|
|
281
283
|
},
|
|
282
284
|
isCreateMode ? destinationFolder?.id : selectedItem?.id
|
|
283
|
-
)
|
|
285
|
+
),
|
|
286
|
+
alertMessageId && /* @__PURE__ */ jsx(Alert, { severity: alertSeverity, children: /* @__PURE__ */ jsx(FormattedMessage, { id: alertMessageId }) })
|
|
284
287
|
]
|
|
285
288
|
}
|
|
286
289
|
);
|
|
@@ -538,7 +538,8 @@ const networkModificationsEn = {
|
|
|
538
538
|
currentStatus: "Modified status",
|
|
539
539
|
copyPreviousTopologyStatus: "Fill with previous status",
|
|
540
540
|
modifiedSwitchesSeparatorTitle: "Modification",
|
|
541
|
-
unModifiedSwitchesSeparatorTitle: "No-modification"
|
|
541
|
+
unModifiedSwitchesSeparatorTitle: "No-modification",
|
|
542
|
+
SharedModificationsSavedAsCopy: "Shared modifications will be saved as copy only"
|
|
542
543
|
};
|
|
543
544
|
export {
|
|
544
545
|
networkModificationsEn
|
|
@@ -538,7 +538,8 @@ const networkModificationsFr = {
|
|
|
538
538
|
currentStatus: "État modifié",
|
|
539
539
|
copyPreviousTopologyStatus: "Compléter avec la topologie précédente",
|
|
540
540
|
modifiedSwitchesSeparatorTitle: "OC modifiés",
|
|
541
|
-
unModifiedSwitchesSeparatorTitle: "OC non-modifiés"
|
|
541
|
+
unModifiedSwitchesSeparatorTitle: "OC non-modifiés",
|
|
542
|
+
SharedModificationsSavedAsCopy: "Les modifications partagées seront enregistrées sous forme de copie uniquement"
|
|
542
543
|
};
|
|
543
544
|
export {
|
|
544
545
|
networkModificationsFr
|