chore: update twake-mui dependency and use radius.lg for create event button

This commit is contained in:
lenhanphung
2025-12-30 13:52:56 +07:00
parent 5f0479e34a
commit 462ad6d250
48 changed files with 493 additions and 303 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ import { Loading } from "./components/Loading/Loading";
import HandleLogin from "./features/User/HandleLogin";
import CalendarLayout from "./components/Calendar/CalendarLayout";
import { Error } from "./components/Error/Error";
import { TwakeMuiThemeProvider } from "twake-mui";
import { TwakeMuiThemeProvider } from "@linagora/twake-mui";
import { useAppDispatch, useAppSelector } from "./app/hooks";
import { push } from "redux-first-history";
import { ErrorSnackbar } from "./components/Error/ErrorSnackbar";
+3 -3
View File
@@ -7,7 +7,7 @@ import {
ListItemAvatar,
ListItemText,
TextField,
} from "twake-mui";
} from "@linagora/twake-mui";
import {
type ReactNode,
useCallback,
@@ -17,11 +17,11 @@ import {
} from "react";
import { searchUsers } from "../../features/User/userAPI";
import PeopleOutlineOutlinedIcon from "@mui/icons-material/PeopleOutlineOutlined";
import { Chip, useTheme } from "twake-mui";
import { Chip, useTheme } from "@linagora/twake-mui";
import { getAccessiblePair } from "../Calendar/utils/calendarColorsUtils";
import { useI18n } from "twake-i18n";
import { SnackbarAlert } from "../Loading/SnackBarAlert";
import { PopperProps, PaperProps } from "twake-mui";
import { PopperProps, PaperProps } from "@linagora/twake-mui";
export interface User {
email: string;
+1 -1
View File
@@ -9,7 +9,7 @@ import {
InputAdornment,
Backdrop,
CircularProgress,
} from "twake-mui";
} from "@linagora/twake-mui";
import { useState, useEffect } from "react";
import {
exportCalendar,
+5 -2
View File
@@ -20,7 +20,7 @@ import { push } from "redux-first-history";
import EventPreviewModal from "../../features/Events/EventDisplayPreview";
import AddIcon from "@mui/icons-material/Add";
import { TempCalendarsInput } from "./TempCalendarsInput";
import { Button, Box } from "twake-mui";
import { Button, Box, radius } from "@linagora/twake-mui";
import {
updateSlotLabelVisibility,
eventToFullCalendarFormat,
@@ -35,7 +35,7 @@ import momentTimezonePlugin from "@fullcalendar/moment-timezone";
import { TimezoneSelector } from "./TimezoneSelector";
import { MiniCalendar } from "./MiniCalendar";
import { User } from "../Attendees/PeopleSearch";
import { useTheme } from "twake-mui";
import { useTheme } from "@linagora/twake-mui";
import { updateDarkColor } from "./utils/calendarColorsUtils";
import { useI18n } from "twake-i18n";
import frLocale from "@fullcalendar/core/locales/fr";
@@ -618,6 +618,9 @@ export default function CalendarApp({
onClick={() =>
eventHandlers.handleDateSelect(null as unknown as DateSelectArg)
}
sx={{
borderRadius: radius.lg,
}}
>
<AddIcon /> <p>{t("event.createEvent")}</p>
</Button>
@@ -7,7 +7,7 @@ import {
TextField,
Typography,
useTheme,
} from "twake-mui";
} from "@linagora/twake-mui";
import { useState } from "react";
import { HexColorPicker } from "react-colorful";
import { useI18n } from "twake-i18n";
+1 -1
View File
@@ -1,4 +1,4 @@
import { Button, Tab, Tabs } from "twake-mui";
import { Button, Tab, Tabs } from "@linagora/twake-mui";
import { useEffect, useState } from "react";
import { useAppDispatch, useAppSelector } from "../../app/hooks";
import {
@@ -9,7 +9,7 @@ import {
ListItem,
Menu,
MenuItem,
} from "twake-mui";
} from "@linagora/twake-mui";
import { useAppDispatch, useAppSelector } from "../../app/hooks";
import AddIcon from "@mui/icons-material/Add";
import { useState, useMemo, useEffect } from "react";
+1 -1
View File
@@ -9,7 +9,7 @@ import {
ToggleButton,
ToggleButtonGroup,
Typography,
} from "twake-mui";
} from "@linagora/twake-mui";
import { useEffect, useState } from "react";
import { useAppSelector } from "../../app/hooks";
import { CalendarItemList } from "./CalendarItemList";
+1 -1
View File
@@ -8,7 +8,7 @@ import {
ToggleButton,
ToggleButtonGroup,
Typography,
} from "twake-mui";
} from "@linagora/twake-mui";
import { useI18n } from "twake-i18n";
import { useState, useEffect } from "react";
import { useAppSelector } from "../../app/hooks";
@@ -1,4 +1,4 @@
import { useTheme } from "twake-mui";
import { useTheme } from "@linagora/twake-mui";
import { useRef } from "react";
import { useI18n } from "twake-i18n";
import { useAppDispatch, useAppSelector } from "../../app/hooks";
@@ -8,7 +8,7 @@ import {
} from "../../features/Calendars/CalendarSlice";
import { Calendar } from "../../features/Calendars/CalendarTypes";
import { setView } from "../../features/Settings/SettingsSlice";
import { TextField } from "twake-mui";
import { TextField } from "@linagora/twake-mui";
import { User, PeopleSearch } from "../Attendees/PeopleSearch";
import { getAccessiblePair } from "./utils/calendarColorsUtils";
+1 -1
View File
@@ -1,4 +1,4 @@
import { Button, Popover } from "twake-mui";
import { Button, Popover } from "@linagora/twake-mui";
import { useI18n } from "twake-i18n";
import moment from "moment";
import { MouseEvent, useMemo, useState } from "react";
@@ -1,4 +1,4 @@
import { darken, getContrastRatio, lighten, Theme } from "twake-mui";
import { darken, getContrastRatio, lighten, Theme } from "@linagora/twake-mui";
import { ThunkDispatch } from "@reduxjs/toolkit";
import { updateCalColor } from "../../../features/Calendars/CalendarSlice";
import { Calendar } from "../../../features/Calendars/CalendarTypes";
+1 -1
View File
@@ -11,7 +11,7 @@ import {
SxProps,
Theme,
Box,
} from "twake-mui";
} from "@linagora/twake-mui";
import ArrowBackIcon from "@mui/icons-material/ArrowBack";
import CloseIcon from "@mui/icons-material/Close";
import OpenInFullIcon from "@mui/icons-material/OpenInFull";
+8 -1
View File
@@ -1,6 +1,13 @@
import ErrorOutlineIcon from "@mui/icons-material/ErrorOutline";
import ReplayIcon from "@mui/icons-material/Replay";
import { Box, Button, Fade, Paper, Stack, Typography } from "twake-mui";
import {
Box,
Button,
Fade,
Paper,
Stack,
Typography,
} from "@linagora/twake-mui";
import { useEffect, useRef } from "react";
import { push } from "redux-first-history";
import { useAppDispatch, useAppSelector } from "../../app/hooks";
+1 -1
View File
@@ -1,4 +1,4 @@
import { Snackbar, Alert, Button } from "twake-mui";
import { Snackbar, Alert, Button } from "@linagora/twake-mui";
import { useAppDispatch } from "../../app/hooks";
import { clearError as calendarClearError } from "../../features/Calendars/CalendarSlice";
import { clearError as userClearError } from "../../features/User/userSlice";
+1 -1
View File
@@ -1,4 +1,4 @@
import { Box, Button, TextField } from "twake-mui";
import { Box, Button, TextField } from "@linagora/twake-mui";
import { useI18n } from "twake-i18n";
import { FieldWithLabel } from "./components/FieldWithLabel";
import { Description as DescriptionIcon } from "@mui/icons-material";
+2 -1
View File
@@ -8,7 +8,7 @@ import {
FormControlLabel,
Radio,
RadioGroup,
} from "twake-mui";
} from "@linagora/twake-mui";
import { CalendarEvent } from "../../features/Events/EventsTypes";
import { useState } from "react";
import { useI18n } from "twake-i18n";
@@ -40,6 +40,7 @@ export function EditModeDialog({
<Dialog open={Boolean(type)} onClose={handleClose}>
<DialogTitle>
{type === "edit" && t("editModeDialog.updateRecurrentEvent")}
{type === "delete" && t("editModeDialog.deleteRecurrentEvent")}
{type === "attendance" && t("editModeDialog.updateParticipationStatus")}
</DialogTitle>
<DialogContent>
@@ -1,4 +1,4 @@
import { Card, Typography } from "twake-mui";
import { Card, Typography } from "@linagora/twake-mui";
import { useRef, useEffect } from "react";
import { EventErrorHandler } from "../../Error/EventErrorHandler";
+1 -1
View File
@@ -5,7 +5,7 @@ import {
CardContent,
CardHeader,
Typography,
} from "twake-mui";
} from "@linagora/twake-mui";
import React, { useEffect, useRef, useState } from "react";
import { stringAvatar } from "../utils/eventUtils";
import { ErrorEventChip } from "./ErrorEventChip";
@@ -1,7 +1,7 @@
import CancelIcon from "@mui/icons-material/Cancel";
import HelpOutlineIcon from "@mui/icons-material/HelpOutline";
import LockOutlineIcon from "@mui/icons-material/LockOutline";
import { Box, getContrastRatio } from "twake-mui";
import { Box, getContrastRatio } from "@linagora/twake-mui";
import moment from "moment";
import React, { useLayoutEffect, useState } from "react";
import { Calendar } from "../../../features/Calendars/CalendarTypes";
@@ -1,5 +1,5 @@
import React from "react";
import { Card, Typography } from "twake-mui";
import { Card, Typography } from "@linagora/twake-mui";
export function SimpleEventChip({ title }: { title: string }) {
return (
+1 -1
View File
@@ -1,4 +1,4 @@
import { MenuItem } from "twake-mui";
import { MenuItem } from "@linagora/twake-mui";
import { CalendarEvent } from "../../features/Events/EventsTypes";
import { useI18n } from "twake-i18n";
+1 -1
View File
@@ -13,7 +13,7 @@ import {
TextField,
ToggleButtonGroup,
ToggleButton,
} from "twake-mui";
} from "@linagora/twake-mui";
import {
Description as DescriptionIcon,
Public as PublicIcon,
+1 -1
View File
@@ -12,7 +12,7 @@ import {
FormGroup,
Radio,
RadioGroup,
} from "twake-mui";
} from "@linagora/twake-mui";
import { useEffect, useState } from "react";
import { RepetitionObject } from "../../features/Events/EventsTypes";
import { useI18n } from "twake-i18n";
+1 -1
View File
@@ -1,5 +1,5 @@
import React from "react";
import { Box, Typography, Link } from "twake-mui";
import { Box, Typography, Link } from "@linagora/twake-mui";
type InfoRowProps = {
icon: React.ReactNode;
@@ -1,6 +1,6 @@
import React, { useMemo } from "react";
import { Box, Typography } from "twake-mui";
import { TextFieldProps } from "twake-mui";
import { Box, Typography } from "@linagora/twake-mui";
import { TextFieldProps } from "@linagora/twake-mui";
import { DatePicker } from "@mui/x-date-pickers/DatePicker";
import { DatePickerFieldProps } from "@mui/x-date-pickers/DatePicker";
import { TimePicker } from "@mui/x-date-pickers/TimePicker";
@@ -1,5 +1,5 @@
import React, { useState, useRef, useEffect, useCallback } from "react";
import { TextField } from "twake-mui";
import { TextField } from "@linagora/twake-mui";
import {
PickerFieldAdapter,
PickerValidationScope,
@@ -1,5 +1,5 @@
import React from "react";
import { Box, Typography } from "twake-mui";
import { Box, Typography } from "@linagora/twake-mui";
/**
* Helper component for field with label
@@ -1,5 +1,5 @@
import React from "react";
import { TextField } from "twake-mui";
import { TextField } from "@linagora/twake-mui";
import {
PickerFieldAdapter,
PickerValidationScope,
+1 -1
View File
@@ -1,6 +1,6 @@
import CancelIcon from "@mui/icons-material/Cancel";
import CheckCircleIcon from "@mui/icons-material/CheckCircle";
import { Avatar, Badge, Box, Typography } from "twake-mui";
import { Avatar, Badge, Box, Typography } from "@linagora/twake-mui";
import { ThunkDispatch } from "@reduxjs/toolkit";
import {
emptyEventsCal,
+2 -2
View File
@@ -1,5 +1,5 @@
import { Alert, Snackbar } from "twake-mui";
import type { AlertColor } from "twake-mui";
import { Alert, Snackbar } from "@linagora/twake-mui";
import type { AlertColor } from "@linagora/twake-mui";
export function SnackbarAlert({
open,
+2 -2
View File
@@ -14,8 +14,8 @@ import {
Stack,
TextField,
Typography,
} from "twake-mui";
import { type AutocompleteRenderInputParams } from "twake-mui";
} from "@linagora/twake-mui";
import { type AutocompleteRenderInputParams } from "@linagora/twake-mui";
import { useRef, useState, useEffect } from "react";
import HighlightOffIcon from "@mui/icons-material/HighlightOff";
import SearchIcon from "@mui/icons-material/Search";
+1 -1
View File
@@ -22,7 +22,7 @@ import {
Typography,
Box,
Divider,
} from "twake-mui";
} from "@linagora/twake-mui";
import { push } from "redux-first-history";
import { CalendarApi } from "@fullcalendar/core";
import { useI18n } from "twake-i18n";
@@ -1,4 +1,4 @@
import { Autocomplete, TextField } from "twake-mui";
import { Autocomplete, TextField } from "@linagora/twake-mui";
import { PublicOutlined as TimezoneIcon } from "@mui/icons-material";
import { useMemo } from "react";
@@ -381,6 +381,7 @@ export default function EventPreviewModal({
onOpenDuplicate={() => {
setToggleActionMenu(null);
setHidePreview(true);
<<<<<<< HEAD
setOpenDuplicateModal(true);
}}
/>
@@ -625,6 +626,7 @@ export default function EventPreviewModal({
}
text={t("eventPreview.alarmText", {
trigger: t(`event.form.notifications.${event.alarm.trigger}`),
<<<<<<< HEAD
action: (() => {
if (!event.alarm.action) return "";
const translationKey = `event.form.notifications.${event.alarm.action}`;
@@ -634,6 +636,9 @@ export default function EventPreviewModal({
? event.alarm.action
: translated;
})(),
=======
action: event.alarm.action || "",
>>>>>>> 4ddc44d (chore: update twake-mui dependency and use radius.lg for create event button)
})}
style={{
fontSize: "16px",
+1 -1
View File
@@ -1,5 +1,5 @@
import { CalendarApi, DateSelectArg } from "@fullcalendar/core";
import { Box, Button } from "twake-mui";
import { Box, Button } from "@linagora/twake-mui";
import AddIcon from "@mui/icons-material/Add";
import React, {
useEffect,
+1 -1
View File
@@ -1,4 +1,4 @@
import { Box, Button } from "twake-mui";
import { Box, Button } from "@linagora/twake-mui";
import AddIcon from "@mui/icons-material/Add";
import { useEffect, useState, useMemo, useCallback, useRef } from "react";
import { useAppDispatch, useAppSelector } from "../../app/hooks";
+8 -1
View File
@@ -2,7 +2,14 @@ import ArrowBackIcon from "@mui/icons-material/ArrowBack";
import RepeatIcon from "@mui/icons-material/Repeat";
import SquareRoundedIcon from "@mui/icons-material/SquareRounded";
import VideocamIcon from "@mui/icons-material/Videocam";
import { Box, Button, IconButton, Stack, Typography, CircularProgress } from "twake-mui";
import {
Box,
Button,
IconButton,
Stack,
Typography,
CircularProgress,
} from "@linagora/twake-mui";
import { useI18n } from "twake-i18n";
import { useState } from "react";
import { useAppDispatch, useAppSelector } from "../../app/hooks";
+1 -1
View File
@@ -15,7 +15,7 @@ import {
Snackbar,
Switch,
FormControlLabel,
} from "twake-mui";
} from "@linagora/twake-mui";
import ArrowBackIcon from "@mui/icons-material/ArrowBack";
import SettingsIcon from "@mui/icons-material/Settings";
// import SyncIcon from "@mui/icons-material/Sync";
+1
View File
@@ -188,6 +188,7 @@
"editModeDialog": {
"updateRecurrentEvent": "Update the recurrent event",
"updateParticipationStatus": "Update the participation status",
"deleteRecurrentEvent": "Delete the recurrent event",
"thisEvent": "This event",
"allEvents": "All the events"
},