@gridsuite/commons-ui 0.201.0 → 0.202.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.
@@ -6,9 +6,10 @@
6
6
  */
7
7
  export interface PopupConfirmationDialogProps {
8
8
  message: string;
9
+ isTranslationNeeded?: boolean;
9
10
  validateButtonLabel?: string;
10
11
  openConfirmationPopup: boolean;
11
12
  setOpenConfirmationPopup: (value: boolean) => void;
12
13
  handlePopupConfirmation: () => void;
13
14
  }
14
- export declare function PopupConfirmationDialog({ message, validateButtonLabel, openConfirmationPopup, setOpenConfirmationPopup, handlePopupConfirmation, }: PopupConfirmationDialogProps): import("react/jsx-runtime").JSX.Element;
15
+ export declare function PopupConfirmationDialog({ message, isTranslationNeeded, validateButtonLabel, openConfirmationPopup, setOpenConfirmationPopup, handlePopupConfirmation, }: PopupConfirmationDialogProps): import("react/jsx-runtime").JSX.Element;
@@ -4,6 +4,7 @@ import { FormattedMessage } from "react-intl";
4
4
  import { CancelButton } from "../../inputs/reactHookForm/utils/CancelButton.js";
5
5
  function PopupConfirmationDialog({
6
6
  message,
7
+ isTranslationNeeded = true,
7
8
  validateButtonLabel,
8
9
  openConfirmationPopup,
9
10
  setOpenConfirmationPopup,
@@ -11,7 +12,7 @@ function PopupConfirmationDialog({
11
12
  }) {
12
13
  return /* @__PURE__ */ jsxs(Dialog, { open: openConfirmationPopup, "aria-labelledby": "dialog-title-change-equipment-type", children: [
13
14
  /* @__PURE__ */ jsx(DialogTitle, { id: "dialog-title-change-equipment-type", children: "Confirmation" }),
14
- /* @__PURE__ */ jsx(DialogContent, { children: /* @__PURE__ */ jsx(DialogContentText, { children: message && /* @__PURE__ */ jsx(FormattedMessage, { id: message }) }) }),
15
+ /* @__PURE__ */ jsx(DialogContent, { children: /* @__PURE__ */ jsx(DialogContentText, { children: message && (isTranslationNeeded ? /* @__PURE__ */ jsx(FormattedMessage, { id: message }) : message) }) }),
15
16
  /* @__PURE__ */ jsxs(DialogActions, { children: [
16
17
  /* @__PURE__ */ jsx(CancelButton, { onClick: () => setOpenConfirmationPopup(false) }),
17
18
  /* @__PURE__ */ jsx(Button, { onClick: handlePopupConfirmation, variant: "outlined", children: /* @__PURE__ */ jsx(FormattedMessage, { id: validateButtonLabel ?? "validate" }) })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsuite/commons-ui",
3
- "version": "0.201.0",
3
+ "version": "0.202.0",
4
4
  "description": "common react components for gridsuite applications",
5
5
  "author": "gridsuite team",
6
6
  "homepage": "https://github.com/gridsuite",