diff --git a/apps/meteor/CHANGELOG.md b/apps/meteor/CHANGELOG.md index 182d30ddabb9..51ff6d4d1826 100644 --- a/apps/meteor/CHANGELOG.md +++ b/apps/meteor/CHANGELOG.md @@ -1,5 +1,34 @@ # @rocket.chat/meteor +## 6.3.4 + +### Patch Changes + +- db919f9b23: Bump @rocket.chat/meteor version. +- Bump @rocket.chat/meteor version. +- ebeb088441: fix: Prevent `RoomProvider.useEffect` from subscribing to room-data stream multiple times +- 8a7d5d3898: fix: agent role being removed upon user deactivation +- 759fe2472a: chore: Increase cache time from 5s to 10s on `getUnits` helpers. This should reduce the number of DB calls made by this method to fetch the unit limitations for a user. +- Updated dependencies [8a7d5d3898] + - @rocket.chat/model-typings@0.0.10 + - @rocket.chat/omnichannel-services@0.0.10 + - @rocket.chat/models@0.0.10 + - @rocket.chat/presence@0.0.10 + - @rocket.chat/core-services@0.1.4 + - @rocket.chat/cron@0.0.6 + - @rocket.chat/instance-status@0.0.10 + - @rocket.chat/core-typings@6.3.4 + - @rocket.chat/rest-typings@6.3.4 + - @rocket.chat/api-client@0.1.4 + - @rocket.chat/pdf-worker@0.0.10 + - @rocket.chat/gazzodown@1.0.4 + - @rocket.chat/ui-contexts@1.0.4 + - @rocket.chat/fuselage-ui-kit@1.0.4 + - @rocket.chat/ui-theming@0.0.1 + - @rocket.chat/ui-client@1.0.4 + - @rocket.chat/ui-video-conf@1.0.4 + - @rocket.chat/web-ui-registration@1.0.4 + ## 6.3.3 ### Patch Changes diff --git a/apps/meteor/client/views/account/profile/AccountProfileForm.tsx b/apps/meteor/client/views/account/profile/AccountProfileForm.tsx index cb65ce80317e..1a326db4544d 100644 --- a/apps/meteor/client/views/account/profile/AccountProfileForm.tsx +++ b/apps/meteor/client/views/account/profile/AccountProfileForm.tsx @@ -22,7 +22,6 @@ import UserAvatarEditor from '../../../components/avatar/UserAvatarEditor'; import { useUpdateAvatar } from '../../../hooks/useUpdateAvatar'; import { USER_STATUS_TEXT_MAX_LENGTH, BIO_TEXT_MAX_LENGTH } from '../../../lib/constants'; import type { AccountProfileFormValues } from './getProfileInitialValues'; -import { getProfileInitialValues } from './getProfileInitialValues'; import { useAccountProfileSettings } from './useAccountProfileSettings'; const AccountProfileForm = (props: AllHTMLAttributes): ReactElement => { @@ -46,10 +45,8 @@ const AccountProfileForm = (props: AllHTMLAttributes): ReactEle } = useAccountProfileSettings(); const { - register, control, watch, - reset, handleSubmit, formState: { errors }, } = useFormContext(); @@ -97,10 +94,10 @@ const AccountProfileForm = (props: AllHTMLAttributes): ReactEle try { await updateOwnBasicInfo( { - ...(allowRealNameChange ? { realname: name } : {}), - ...(allowEmailChange && user ? getUserEmailAddress(user) !== email && { email } : {}), - ...(canChangeUsername ? { username } : {}), - ...(allowUserStatusMessageChange ? { statusText } : {}), + realname: name, + ...(user ? getUserEmailAddress(user) !== email && { email } : {}), + username, + statusText, statusType, nickname, bio, @@ -110,7 +107,6 @@ const AccountProfileForm = (props: AllHTMLAttributes): ReactEle await updateAvatar(); dispatchToastMessage({ type: 'success', message: t('Profile_saved_successfully') }); - reset(getProfileInitialValues(user)); } catch (error) { dispatchToastMessage({ type: 'error', message: error }); } @@ -147,16 +143,21 @@ const AccountProfileForm = (props: AllHTMLAttributes): ReactEle {t('Name')} - (requireName && name === '' ? t('error-the-field-is-required', { field: t('Name') }) : true), - })} - id={nameId} - error={errors.name?.message} - disabled={!allowRealNameChange} - aria-required='true' - aria-invalid={errors.username ? 'true' : 'false'} - aria-describedby={`${nameId}-error ${nameId}-hint`} + (requireName && name === '' ? t('error-the-field-is-required', { field: t('Name') }) : true) }} + render={({ field }) => ( + + )} /> {errors.name && ( @@ -171,17 +172,25 @@ const AccountProfileForm = (props: AllHTMLAttributes): ReactEle {t('Username')} - validateUsername(username), - })} - id={usernameId} - error={errors.username?.message} - addon={} - aria-required='true' - aria-invalid={errors.username ? 'true' : 'false'} - aria-describedby={`${usernameId}-error ${usernameId}-hint`} + }} + render={({ field }) => ( + } + aria-required='true' + aria-invalid={errors.username ? 'true' : 'false'} + aria-describedby={`${usernameId}-error ${usernameId}-hint`} + /> + )} /> {errors?.username && ( @@ -195,26 +204,31 @@ const AccountProfileForm = (props: AllHTMLAttributes): ReactEle {t('StatusMessage')} - ( - - )} + ( + ( + + )} + /> + } /> - } + )} /> {errors?.statusText && ( @@ -227,21 +241,34 @@ const AccountProfileForm = (props: AllHTMLAttributes): ReactEle {t('Nickname')} - } /> + ( + } /> + )} + /> {t('Bio')} - } - aria-invalid={errors.statusText ? 'true' : 'false'} - aria-describedby={`${bioId}-error`} + ( + } + aria-invalid={errors.statusText ? 'true' : 'false'} + aria-describedby={`${bioId}-error`} + /> + )} /> {errors?.bio && ( @@ -255,18 +282,23 @@ const AccountProfileForm = (props: AllHTMLAttributes): ReactEle {t('Email')} - (validateEmail(email) ? undefined : t('error-invalid-email-address')) }, - })} - flexGrow={1} - error={errors.email?.message} - addon={} - disabled={!allowEmailChange} - aria-required='true' - aria-invalid={errors.email ? 'true' : 'false'} - aria-describedby={`${emailId}-error ${emailId}-hint`} + (validateEmail(email) ? undefined : t('error-invalid-email-address')) } }} + render={({ field }) => ( + } + disabled={!allowEmailChange} + aria-required='true' + aria-invalid={errors.email ? 'true' : 'false'} + aria-describedby={`${emailId}-error ${emailId}-hint`} + /> + )} /> {!isUserVerified && ( - + )} ); diff --git a/apps/meteor/client/views/admin/info/LicenseCard.tsx b/apps/meteor/client/views/admin/info/LicenseCard.tsx index 8865ed990a4a..bccbddaa6db7 100644 --- a/apps/meteor/client/views/admin/info/LicenseCard.tsx +++ b/apps/meteor/client/views/admin/info/LicenseCard.tsx @@ -1,6 +1,6 @@ import { ButtonGroup, Button, Skeleton } from '@rocket.chat/fuselage'; import { useMutableCallback } from '@rocket.chat/fuselage-hooks'; -import { Card } from '@rocket.chat/ui-client'; +import { Card, CardBody, CardCol, CardTitle, CardColSection, CardColTitle, CardFooter } from '@rocket.chat/ui-client'; import { useSetModal, useSetting, useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React from 'react'; @@ -43,14 +43,14 @@ const LicenseCard = (): ReactElement => { return ( - {t('License')} - - - + {t('License')} + + + - - - {t('Features')} + + + {t('Features')} {isLoading ? ( <> @@ -67,10 +67,10 @@ const LicenseCard = (): ReactElement => { )} - - - - + + + + {isAirGapped ? ( )} - + ); }; diff --git a/apps/meteor/client/views/admin/info/UsageCard.tsx b/apps/meteor/client/views/admin/info/UsageCard.tsx index 793789c30a03..7a3b2123e5f2 100644 --- a/apps/meteor/client/views/admin/info/UsageCard.tsx +++ b/apps/meteor/client/views/admin/info/UsageCard.tsx @@ -1,7 +1,17 @@ import type { IStats } from '@rocket.chat/core-typings'; import { ButtonGroup, Button } from '@rocket.chat/fuselage'; import { useMutableCallback } from '@rocket.chat/fuselage-hooks'; -import { TextSeparator, Card } from '@rocket.chat/ui-client'; +import { + Card, + CardBody, + CardCol, + CardTitle, + CardColSection, + CardColTitle, + CardFooter, + TextSeparator, + CardIcon, +} from '@rocket.chat/ui-client'; import { useRoute, useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React, { memo } from 'react'; @@ -29,15 +39,15 @@ const UsageCard = ({ statistics, vertical }: UsageCardProps): ReactElement => { return ( - {t('Usage')} - - - - {t('Users')} + {t('Usage')} + + + + {t('Users')} - {t('Total')} + {t('Total')} } value={statistics.totalUsers} @@ -45,9 +55,9 @@ const UsageCard = ({ statistics, vertical }: UsageCardProps): ReactElement => { - + - {' '} + {' '} {t('Online')} } @@ -56,9 +66,9 @@ const UsageCard = ({ statistics, vertical }: UsageCardProps): ReactElement => { - + - {' '} + {' '} {t('Busy')} } @@ -67,9 +77,9 @@ const UsageCard = ({ statistics, vertical }: UsageCardProps): ReactElement => { - + - {' '} + {' '} {t('Away')} } @@ -78,34 +88,34 @@ const UsageCard = ({ statistics, vertical }: UsageCardProps): ReactElement => { - + - {' '} + {' '} {t('Offline')} } value={statistics.offlineUsers} /> - - - {t('Types_and_Distribution')} + + + {t('Types_and_Distribution')} - - - {t('Uploads')} + + + {t('Uploads')} - - - {t('Total_rooms')} + + + {t('Total_rooms')} - {t('Stats_Total_Rooms')} + {t('Stats_Total_Rooms')} } value={statistics.totalRooms} @@ -113,7 +123,7 @@ const UsageCard = ({ statistics, vertical }: UsageCardProps): ReactElement => { - {t('Stats_Total_Channels')} + {t('Stats_Total_Channels')} } value={statistics.totalChannels} @@ -121,7 +131,7 @@ const UsageCard = ({ statistics, vertical }: UsageCardProps): ReactElement => { - {t('Stats_Total_Private_Groups')} + {t('Stats_Total_Private_Groups')} } value={statistics.totalPrivateGroups} @@ -129,7 +139,7 @@ const UsageCard = ({ statistics, vertical }: UsageCardProps): ReactElement => { - {t('Stats_Total_Direct_Messages')} + {t('Stats_Total_Direct_Messages')} } value={statistics.totalDirect} @@ -137,7 +147,7 @@ const UsageCard = ({ statistics, vertical }: UsageCardProps): ReactElement => { - {t('Total_Discussions')} + {t('Total_Discussions')} } value={statistics.totalDiscussions} @@ -145,30 +155,30 @@ const UsageCard = ({ statistics, vertical }: UsageCardProps): ReactElement => { - {t('Stats_Total_Livechat_Rooms')} + {t('Stats_Total_Livechat_Rooms')} } value={statistics.totalLivechat} /> - - - {t('Total_messages')} + + + {t('Total_messages')} - - - - + + + + - + ); }; diff --git a/apps/meteor/client/views/admin/settings/SettingsGroupCard.tsx b/apps/meteor/client/views/admin/settings/SettingsGroupCard.tsx index 8bf75c3753d5..26331379a9fd 100644 --- a/apps/meteor/client/views/admin/settings/SettingsGroupCard.tsx +++ b/apps/meteor/client/views/admin/settings/SettingsGroupCard.tsx @@ -1,7 +1,7 @@ import type { ISetting } from '@rocket.chat/core-typings'; import { css } from '@rocket.chat/css-in-js'; import { Button, Box } from '@rocket.chat/fuselage'; -import { Card } from '@rocket.chat/ui-client'; +import { Card, CardBody, CardTitle, CardFooter } from '@rocket.chat/ui-client'; import type { TranslationKey } from '@rocket.chat/ui-contexts'; import { useRouter, useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; @@ -28,13 +28,13 @@ const SettingsGroupCard = ({ id, title, description }: SettingsGroupCardProps): return ( - {t(title)} - + {t(title)} + {description && t.has(description) && } - - + + - + ); }; diff --git a/apps/meteor/client/views/admin/users/AdminUserForm.tsx b/apps/meteor/client/views/admin/users/AdminUserForm.tsx index 4d8f2a48395c..334aca68b8f8 100644 --- a/apps/meteor/client/views/admin/users/AdminUserForm.tsx +++ b/apps/meteor/client/views/admin/users/AdminUserForm.tsx @@ -30,6 +30,7 @@ import { useQuery, useMutation } from '@tanstack/react-query'; import React, { useCallback } from 'react'; import { Controller, useForm } from 'react-hook-form'; +import { validateEmail } from '../../../../lib/emailValidator'; import { parseCSV } from '../../../../lib/utils/parseCSV'; import { ContextualbarScrollableContent } from '../../../components/Contextualbar'; import UserAvatarEditor from '../../../components/avatar/UserAvatarEditor'; @@ -43,11 +44,19 @@ type AdminUserFormProps = { onReload: () => void; }; -const getInitialValue = (data?: Serialized, defaultUserRoles?: IUser['roles']) => ({ +const getInitialValue = ({ + data, + defaultUserRoles, + isSmtpEnabled, +}: { + data?: Serialized; + defaultUserRoles?: IUser['roles']; + isSmtpEnabled?: boolean; +}) => ({ roles: data?.roles ?? defaultUserRoles, name: data?.name ?? '', password: '', - username: data?.username, + username: data?.username ?? '', bio: data?.bio ?? '', nickname: data?.nickname ?? '', email: (data?.emails?.length && data.emails[0].address) || '', @@ -57,12 +66,10 @@ const getInitialValue = (data?: Serialized, defaultUserRoles?: IUser['rol customFields: data?.customFields ?? {}, statusText: data?.statusText ?? '', joinDefaultChannels: true, - sendWelcomeEmail: true, + sendWelcomeEmail: isSmtpEnabled, avatar: '' as AvatarObject, }); -// TODO: check email is already in use in UI -// TODO: add validation to statusText const UserForm = ({ userData, onReload, ...props }: AdminUserFormProps) => { const t = useTranslation(); const router = useRouter(); @@ -90,12 +97,11 @@ const UserForm = ({ userData, onReload, ...props }: AdminUserFormProps) => { control, watch, handleSubmit, - register, reset, formState: { errors, isDirty }, } = useForm({ - defaultValues: getInitialValue(userData, defaultUserRoles), - mode: 'all', + defaultValues: getInitialValue({ data: userData, defaultUserRoles, isSmtpEnabled }), + mode: 'onBlur', }); const { avatar, username, setRandomPassword } = watch(); @@ -175,43 +181,82 @@ const UserForm = ({ userData, onReload, ...props }: AdminUserFormProps) => { {t('Name')} - ( + + )} /> - {errors?.name && {errors.name.message}} + {errors?.name && ( + + {errors.name.message} + + )} {t('Username')} - } - {...register('username', { required: t('The_field_is_required', t('Username')) })} + ( + } + /> + )} /> - {errors?.username && {errors.username.message}} + {errors?.username && ( + + {errors.username.message} + + )} {t('Email')} - } - {...register('email', { required: t('The_field_is_required', t('Email')) })} + (validateEmail(email) ? undefined : t('error-invalid-email-address')), + }} + render={({ field }) => ( + } + /> + )} /> - {errors?.email && {errors.email.message}} + {errors?.email && ( + + {errors.email.message} + + )} @@ -228,38 +273,65 @@ const UserForm = ({ userData, onReload, ...props }: AdminUserFormProps) => { {t('StatusMessage')} - } + ( + } + /> + )} /> - {errors?.statusText && {errors.statusText.message}} + {errors?.statusText && ( + + {errors.statusText.message} + + )} {t('Bio')} - } + ( + } + /> + )} /> - {errors?.bio && {errors.bio.message}} + {errors?.bio && ( + + {errors.bio.message} + + )} {t('Nickname')} - } + ( + } /> + )} /> @@ -269,16 +341,28 @@ const UserForm = ({ userData, onReload, ...props }: AdminUserFormProps) => { {t('Password')} - } + ( + } + /> + )} /> - {errors?.password && {errors.password.message}} + {errors?.password && ( + + {errors.password.message} + + )} )} @@ -309,13 +393,23 @@ const UserForm = ({ userData, onReload, ...props }: AdminUserFormProps) => { control={control} name='setRandomPassword' render={({ field: { ref, onChange, value } }) => ( - + )} /> {!isSmtpEnabled && ( - + )} @@ -364,16 +458,25 @@ const UserForm = ({ userData, onReload, ...props }: AdminUserFormProps) => { control={control} name='sendWelcomeEmail' render={({ field: { onChange, value } }) => ( - + )} /> {!isSmtpEnabled && ( - + )} - {customFieldsMetadata && ( + {Boolean(customFieldsMetadata.length) && ( <> {t('Custom_Fields')} @@ -384,7 +487,11 @@ const UserForm = ({ userData, onReload, ...props }: AdminUserFormProps) => { - - - + + ); }; diff --git a/apps/meteor/client/views/home/cards/CreateChannelsCard.tsx b/apps/meteor/client/views/home/cards/CreateChannelsCard.tsx index f5421bd821e4..9e84a8ff373d 100644 --- a/apps/meteor/client/views/home/cards/CreateChannelsCard.tsx +++ b/apps/meteor/client/views/home/cards/CreateChannelsCard.tsx @@ -1,5 +1,5 @@ import { Button } from '@rocket.chat/fuselage'; -import { Card } from '@rocket.chat/ui-client'; +import { Card, CardBody, CardFooter, CardFooterWrapper, CardTitle } from '@rocket.chat/ui-client'; import { useTranslation, useSetModal } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React from 'react'; @@ -14,13 +14,13 @@ const CreateChannelsCard = (): ReactElement => { return ( - {t('Create_channels')} - {t('Create_a_public_channel_that_new_workspace_members_can_join')} - - + {t('Create_channels')} + {t('Create_a_public_channel_that_new_workspace_members_can_join')} + + - - + + ); }; diff --git a/apps/meteor/client/views/home/cards/CustomContentCard.tsx b/apps/meteor/client/views/home/cards/CustomContentCard.tsx index 118fa659e640..0f5c40ad87f9 100644 --- a/apps/meteor/client/views/home/cards/CustomContentCard.tsx +++ b/apps/meteor/client/views/home/cards/CustomContentCard.tsx @@ -1,5 +1,5 @@ import { Box, Button, Icon, Tag } from '@rocket.chat/fuselage'; -import { Card } from '@rocket.chat/ui-client'; +import { Card, CardFooter, CardFooterWrapper } from '@rocket.chat/ui-client'; import { useRole, useSettingSetValue, useSetting, useToastMessageDispatch, useTranslation, useRoute } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React from 'react'; @@ -63,8 +63,8 @@ const CustomContentCard = (): ReactElement | null => { {isCustomContentBodyEmpty ? t('Homepage_Custom_Content_Default_Message') : } - - + + @@ -86,8 +86,8 @@ const CustomContentCard = (): ReactElement | null => { > {!isCustomContentOnly ? t('Show_Only_This_Content') : t('Show_default_content')} - - + + ); } diff --git a/apps/meteor/client/views/home/cards/DesktopAppsCard.tsx b/apps/meteor/client/views/home/cards/DesktopAppsCard.tsx index b53d6603ccac..5a3c7834b3b4 100644 --- a/apps/meteor/client/views/home/cards/DesktopAppsCard.tsx +++ b/apps/meteor/client/views/home/cards/DesktopAppsCard.tsx @@ -1,5 +1,5 @@ import { Button } from '@rocket.chat/fuselage'; -import { Card } from '@rocket.chat/ui-client'; +import { Card, CardBody, CardFooter, CardFooterWrapper, CardTitle } from '@rocket.chat/ui-client'; import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React from 'react'; @@ -16,15 +16,15 @@ const DesktopAppsCard = (): ReactElement => { return ( - {t('Desktop_apps')} - {t('Install_rocket_chat_on_your_preferred_desktop_platform')} - - + {t('Desktop_apps')} + {t('Install_rocket_chat_on_your_preferred_desktop_platform')} + + - - + + ); }; diff --git a/apps/meteor/client/views/home/cards/DocumentationCard.tsx b/apps/meteor/client/views/home/cards/DocumentationCard.tsx index c833f7425a7b..2ae8c0618093 100644 --- a/apps/meteor/client/views/home/cards/DocumentationCard.tsx +++ b/apps/meteor/client/views/home/cards/DocumentationCard.tsx @@ -1,5 +1,5 @@ import { Button } from '@rocket.chat/fuselage'; -import { Card } from '@rocket.chat/ui-client'; +import { Card, CardBody, CardFooter, CardFooterWrapper, CardTitle } from '@rocket.chat/ui-client'; import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React from 'react'; @@ -14,13 +14,13 @@ const DocumentationCard = (): ReactElement => { return ( - {t('Documentation')} - {t('Learn_how_to_unlock_the_myriad_possibilities_of_rocket_chat')} - - + {t('Documentation')} + {t('Learn_how_to_unlock_the_myriad_possibilities_of_rocket_chat')} + + - - + + ); }; diff --git a/apps/meteor/client/views/home/cards/JoinRoomsCard.tsx b/apps/meteor/client/views/home/cards/JoinRoomsCard.tsx index 1a105ea8d58f..c4bfcc36d7e7 100644 --- a/apps/meteor/client/views/home/cards/JoinRoomsCard.tsx +++ b/apps/meteor/client/views/home/cards/JoinRoomsCard.tsx @@ -1,5 +1,5 @@ import { Button } from '@rocket.chat/fuselage'; -import { Card } from '@rocket.chat/ui-client'; +import { Card, CardBody, CardFooter, CardFooterWrapper, CardTitle } from '@rocket.chat/ui-client'; import { useTranslation, useRouter } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React from 'react'; @@ -14,13 +14,13 @@ const JoinRoomsCard = (): ReactElement => { return ( - {t('Join_rooms')} - {t('Discover_public_channels_and_teams_in_the_workspace_directory')} - - + {t('Join_rooms')} + {t('Discover_public_channels_and_teams_in_the_workspace_directory')} + + - - + + ); }; diff --git a/apps/meteor/client/views/home/cards/MobileAppsCard.tsx b/apps/meteor/client/views/home/cards/MobileAppsCard.tsx index e04097185f42..5527e8d3e0f5 100644 --- a/apps/meteor/client/views/home/cards/MobileAppsCard.tsx +++ b/apps/meteor/client/views/home/cards/MobileAppsCard.tsx @@ -1,5 +1,5 @@ import { Button } from '@rocket.chat/fuselage'; -import { Card } from '@rocket.chat/ui-client'; +import { Card, CardTitle, CardBody, CardFooterWrapper, CardFooter } from '@rocket.chat/ui-client'; import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React from 'react'; @@ -15,14 +15,14 @@ const MobileAppsCard = (): ReactElement => { return ( - {t('Mobile_apps')} - {t('Take_rocket_chat_with_you_with_mobile_applications')} - - + {t('Mobile_apps')} + {t('Take_rocket_chat_with_you_with_mobile_applications')} + + - - + + ); }; diff --git a/apps/meteor/ee/client/omnichannel/reports/components/ReportCard.tsx b/apps/meteor/ee/client/omnichannel/reports/components/ReportCard.tsx index 92a4d8d44199..d885242f7722 100644 --- a/apps/meteor/ee/client/omnichannel/reports/components/ReportCard.tsx +++ b/apps/meteor/ee/client/omnichannel/reports/components/ReportCard.tsx @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/naming-convention */ import { Box, Skeleton, States, StatesIcon, StatesSubtitle, StatesTitle } from '@rocket.chat/fuselage'; -import { Card } from '@rocket.chat/ui-client'; +import { Card, CardBody, CardCol, CardTitle } from '@rocket.chat/ui-client'; import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactNode, ComponentProps, ReactElement } from 'react'; import React from 'react'; @@ -61,7 +61,7 @@ export const ReportCard = ({ data-qa={id} aria-busy={isLoading} > - + @@ -76,9 +76,9 @@ export const ReportCard = ({ - - - + + + {isLoading && LoadingSkeleton} @@ -94,8 +94,8 @@ export const ReportCard = ({ {!isLoading && isDataFound && children} - - + + ); }; diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/EngagementDashboardCard.tsx b/apps/meteor/ee/client/views/admin/engagementDashboard/EngagementDashboardCard.tsx index 7c4965bce5d0..0fe32a90d825 100644 --- a/apps/meteor/ee/client/views/admin/engagementDashboard/EngagementDashboardCard.tsx +++ b/apps/meteor/ee/client/views/admin/engagementDashboard/EngagementDashboardCard.tsx @@ -1,5 +1,5 @@ import { Box } from '@rocket.chat/fuselage'; -import { Card } from '@rocket.chat/ui-client'; +import { Card, CardBody, CardCol, CardTitle } from '@rocket.chat/ui-client'; import type { ReactElement, ReactNode } from 'react'; import React from 'react'; @@ -13,14 +13,14 @@ type EngagementDashboardCardProps = { const EngagementDashboardCard = ({ children, title = undefined }: EngagementDashboardCardProps): ReactElement => ( - {title && {title}} - - + {title && {title}} + + {children} - - + + ); diff --git a/apps/meteor/ee/client/views/admin/info/SeatsCard.tsx b/apps/meteor/ee/client/views/admin/info/SeatsCard.tsx index ddcfe312122f..b595dd9c1fae 100644 --- a/apps/meteor/ee/client/views/admin/info/SeatsCard.tsx +++ b/apps/meteor/ee/client/views/admin/info/SeatsCard.tsx @@ -1,6 +1,6 @@ import { Box, Button, ButtonGroup, Skeleton } from '@rocket.chat/fuselage'; import colors from '@rocket.chat/fuselage-tokens/colors'; -import { Card } from '@rocket.chat/ui-client'; +import { Card, CardBody, CardCol, CardFooter, CardTitle } from '@rocket.chat/ui-client'; import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React from 'react'; @@ -27,9 +27,9 @@ const SeatsCard = ({ seatsCap }: SeatsCardProps): ReactElement => { return ( - {t('Seats_usage')} - - + {t('Seats_usage')} + + {!seatsCap ? ( @@ -43,15 +43,15 @@ const SeatsCard = ({ seatsCap }: SeatsCardProps): ReactElement => { /> )} - - - + + + - + ); }; diff --git a/apps/meteor/ee/server/services/CHANGELOG.md b/apps/meteor/ee/server/services/CHANGELOG.md index c9759c95b0af..7966239693fd 100644 --- a/apps/meteor/ee/server/services/CHANGELOG.md +++ b/apps/meteor/ee/server/services/CHANGELOG.md @@ -1,5 +1,16 @@ # rocketchat-services +## 1.1.4 + +### Patch Changes + +- Updated dependencies [8a7d5d3898] + - @rocket.chat/model-typings@0.0.10 + - @rocket.chat/models@0.0.10 + - @rocket.chat/core-services@0.1.4 + - @rocket.chat/core-typings@6.3.4 + - @rocket.chat/rest-typings@6.3.4 + ## 1.1.3 ### Patch Changes diff --git a/apps/meteor/ee/server/services/package.json b/apps/meteor/ee/server/services/package.json index 5ef03a985d0f..a80d29269c88 100644 --- a/apps/meteor/ee/server/services/package.json +++ b/apps/meteor/ee/server/services/package.json @@ -1,7 +1,7 @@ { "name": "rocketchat-services", "private": true, - "version": "1.1.3", + "version": "1.1.4", "description": "Rocket.Chat Authorization service", "main": "index.js", "scripts": { diff --git a/apps/meteor/package.json b/apps/meteor/package.json index 78b875191b02..618591f585bb 100644 --- a/apps/meteor/package.json +++ b/apps/meteor/package.json @@ -470,4 +470,4 @@ "installConfig": { "hoistingLimits": "workspaces" } -} \ No newline at end of file +} diff --git a/apps/meteor/tests/e2e/login.spec.ts b/apps/meteor/tests/e2e/login.spec.ts index 2414e5579e3b..958f5120f142 100644 --- a/apps/meteor/tests/e2e/login.spec.ts +++ b/apps/meteor/tests/e2e/login.spec.ts @@ -12,6 +12,11 @@ test.describe.parallel('Login', () => { await page.goto('/home'); }); + test('should not have any accessibility violations', async ({ makeAxeBuilder }) => { + const results = await makeAxeBuilder().analyze(); + expect(results.violations).toEqual([]); + }) + test('Login with invalid credentials', async () => { await test.step('expect to have username and password marked as invalid', async () => { await poRegistration.username.type(faker.internet.email()); diff --git a/apps/meteor/tests/e2e/register.spec.ts b/apps/meteor/tests/e2e/register.spec.ts index f99f212ff718..6d62ace5e7d3 100644 --- a/apps/meteor/tests/e2e/register.spec.ts +++ b/apps/meteor/tests/e2e/register.spec.ts @@ -128,7 +128,7 @@ test.describe.serial('register', () => { await page.goto('/home'); await poRegistration.goToRegister.click(); - const results = await makeAxeBuilder().disableRules(['landmark-one-main', 'region']).analyze(); + const results = await makeAxeBuilder().analyze(); expect(results.violations).toEqual([]); }); diff --git a/ee/apps/account-service/CHANGELOG.md b/ee/apps/account-service/CHANGELOG.md index 67bb7a8164f5..89607251a0fd 100644 --- a/ee/apps/account-service/CHANGELOG.md +++ b/ee/apps/account-service/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/account-service +## 0.2.4 + +### Patch Changes + +- Updated dependencies [8a7d5d3898] + - @rocket.chat/model-typings@0.0.10 + - @rocket.chat/models@0.0.10 + - @rocket.chat/core-services@0.1.4 + - @rocket.chat/core-typings@6.3.4 + - @rocket.chat/rest-typings@6.3.4 + ## 0.2.3 ### Patch Changes diff --git a/ee/apps/account-service/package.json b/ee/apps/account-service/package.json index 8b6c0efc9796..39dce6f462f9 100644 --- a/ee/apps/account-service/package.json +++ b/ee/apps/account-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/account-service", "private": true, - "version": "0.2.3", + "version": "0.2.4", "description": "Rocket.Chat Account service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/authorization-service/CHANGELOG.md b/ee/apps/authorization-service/CHANGELOG.md index 882144f1602f..9873537590d3 100644 --- a/ee/apps/authorization-service/CHANGELOG.md +++ b/ee/apps/authorization-service/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/authorization-service +## 0.2.4 + +### Patch Changes + +- Updated dependencies [8a7d5d3898] + - @rocket.chat/model-typings@0.0.10 + - @rocket.chat/models@0.0.10 + - @rocket.chat/core-services@0.1.4 + - @rocket.chat/core-typings@6.3.4 + - @rocket.chat/rest-typings@6.3.4 + ## 0.2.3 ### Patch Changes diff --git a/ee/apps/authorization-service/package.json b/ee/apps/authorization-service/package.json index 02431b537db5..b2a595366474 100644 --- a/ee/apps/authorization-service/package.json +++ b/ee/apps/authorization-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/authorization-service", "private": true, - "version": "0.2.3", + "version": "0.2.4", "description": "Rocket.Chat Authorization service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/ddp-streamer/CHANGELOG.md b/ee/apps/ddp-streamer/CHANGELOG.md index 242f5b517039..b2a64786913b 100644 --- a/ee/apps/ddp-streamer/CHANGELOG.md +++ b/ee/apps/ddp-streamer/CHANGELOG.md @@ -1,5 +1,18 @@ # @rocket.chat/ddp-streamer +## 0.1.4 + +### Patch Changes + +- Updated dependencies [8a7d5d3898] + - @rocket.chat/model-typings@0.0.10 + - @rocket.chat/models@0.0.10 + - @rocket.chat/core-services@0.1.4 + - @rocket.chat/instance-status@0.0.10 + - @rocket.chat/core-typings@6.3.4 + - @rocket.chat/rest-typings@6.3.4 + - @rocket.chat/ui-contexts@1.0.4 + ## 0.1.3 ### Patch Changes diff --git a/ee/apps/ddp-streamer/package.json b/ee/apps/ddp-streamer/package.json index 32876be36fd8..f6eb59fedcfd 100644 --- a/ee/apps/ddp-streamer/package.json +++ b/ee/apps/ddp-streamer/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/ddp-streamer", "private": true, - "version": "0.1.3", + "version": "0.1.4", "description": "Rocket.Chat DDP-Streamer service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/omnichannel-transcript/CHANGELOG.md b/ee/apps/omnichannel-transcript/CHANGELOG.md index f7de2c547ab0..78829550a937 100644 --- a/ee/apps/omnichannel-transcript/CHANGELOG.md +++ b/ee/apps/omnichannel-transcript/CHANGELOG.md @@ -1,5 +1,17 @@ # @rocket.chat/omnichannel-transcript +## 0.2.4 + +### Patch Changes + +- Updated dependencies [8a7d5d3898] + - @rocket.chat/model-typings@0.0.10 + - @rocket.chat/omnichannel-services@0.0.10 + - @rocket.chat/models@0.0.10 + - @rocket.chat/core-services@0.1.4 + - @rocket.chat/core-typings@6.3.4 + - @rocket.chat/pdf-worker@0.0.10 + ## 0.2.3 ### Patch Changes diff --git a/ee/apps/omnichannel-transcript/package.json b/ee/apps/omnichannel-transcript/package.json index 4ba11422a2bd..94faf82d74e7 100644 --- a/ee/apps/omnichannel-transcript/package.json +++ b/ee/apps/omnichannel-transcript/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/omnichannel-transcript", "private": true, - "version": "0.2.3", + "version": "0.2.4", "description": "Rocket.Chat service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/presence-service/CHANGELOG.md b/ee/apps/presence-service/CHANGELOG.md index 5bb3ef39b101..08a27bb77ced 100644 --- a/ee/apps/presence-service/CHANGELOG.md +++ b/ee/apps/presence-service/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/presence-service +## 0.2.4 + +### Patch Changes + +- Updated dependencies [8a7d5d3898] + - @rocket.chat/model-typings@0.0.10 + - @rocket.chat/models@0.0.10 + - @rocket.chat/presence@0.0.10 + - @rocket.chat/core-services@0.1.4 + - @rocket.chat/core-typings@6.3.4 + ## 0.2.3 ### Patch Changes diff --git a/ee/apps/presence-service/package.json b/ee/apps/presence-service/package.json index dfd9a8902aac..a79ea33b6406 100644 --- a/ee/apps/presence-service/package.json +++ b/ee/apps/presence-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/presence-service", "private": true, - "version": "0.2.3", + "version": "0.2.4", "description": "Rocket.Chat Presence service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/queue-worker/CHANGELOG.md b/ee/apps/queue-worker/CHANGELOG.md index 1490afbb40ab..2bd7874719e4 100644 --- a/ee/apps/queue-worker/CHANGELOG.md +++ b/ee/apps/queue-worker/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/queue-worker +## 0.2.4 + +### Patch Changes + +- Updated dependencies [8a7d5d3898] + - @rocket.chat/model-typings@0.0.10 + - @rocket.chat/omnichannel-services@0.0.10 + - @rocket.chat/models@0.0.10 + - @rocket.chat/core-services@0.1.4 + - @rocket.chat/core-typings@6.3.4 + ## 0.2.3 ### Patch Changes diff --git a/ee/apps/queue-worker/package.json b/ee/apps/queue-worker/package.json index 6907bfa478a8..8eb8b299105b 100644 --- a/ee/apps/queue-worker/package.json +++ b/ee/apps/queue-worker/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/queue-worker", "private": true, - "version": "0.2.3", + "version": "0.2.4", "description": "Rocket.Chat service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/stream-hub-service/CHANGELOG.md b/ee/apps/stream-hub-service/CHANGELOG.md index 6af9dfb7b0e0..9f5da36d15f5 100644 --- a/ee/apps/stream-hub-service/CHANGELOG.md +++ b/ee/apps/stream-hub-service/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/stream-hub-service +## 0.2.4 + +### Patch Changes + +- Updated dependencies [8a7d5d3898] + - @rocket.chat/model-typings@0.0.10 + - @rocket.chat/models@0.0.10 + - @rocket.chat/core-services@0.1.4 + - @rocket.chat/core-typings@6.3.4 + ## 0.2.3 ### Patch Changes diff --git a/ee/apps/stream-hub-service/package.json b/ee/apps/stream-hub-service/package.json index 325a8a75f336..469b6bc8feda 100644 --- a/ee/apps/stream-hub-service/package.json +++ b/ee/apps/stream-hub-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/stream-hub-service", "private": true, - "version": "0.2.3", + "version": "0.2.4", "description": "Rocket.Chat Stream Hub service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/packages/api-client/CHANGELOG.md b/ee/packages/api-client/CHANGELOG.md index 030d8cae3b99..5ecdabd24205 100644 --- a/ee/packages/api-client/CHANGELOG.md +++ b/ee/packages/api-client/CHANGELOG.md @@ -1,5 +1,12 @@ # @rocket.chat/api-client +## 0.1.4 + +### Patch Changes + +- @rocket.chat/core-typings@6.3.4 +- @rocket.chat/rest-typings@6.3.4 + ## 0.1.3 ### Patch Changes diff --git a/ee/packages/api-client/package.json b/ee/packages/api-client/package.json index 488811d73155..987659f45ddf 100644 --- a/ee/packages/api-client/package.json +++ b/ee/packages/api-client/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/api-client", - "version": "0.1.3", + "version": "0.1.4", "devDependencies": { "@swc/core": "^1.3.66", "@swc/jest": "^0.2.26", diff --git a/ee/packages/ddp-client/CHANGELOG.md b/ee/packages/ddp-client/CHANGELOG.md index 6a656d38a488..a4af639fe331 100644 --- a/ee/packages/ddp-client/CHANGELOG.md +++ b/ee/packages/ddp-client/CHANGELOG.md @@ -1,5 +1,12 @@ # @rocket.chat/ddp-client +## 0.1.4 + +### Patch Changes + +- @rocket.chat/rest-typings@6.3.4 +- @rocket.chat/api-client@0.1.4 + ## 0.1.3 ### Patch Changes diff --git a/ee/packages/ddp-client/package.json b/ee/packages/ddp-client/package.json index 9aeb554005d9..350937874a54 100644 --- a/ee/packages/ddp-client/package.json +++ b/ee/packages/ddp-client/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ddp-client", - "version": "0.1.3", + "version": "0.1.4", "devDependencies": { "@swc/core": "^1.3.66", "@swc/jest": "^0.2.26", diff --git a/ee/packages/omnichannel-services/CHANGELOG.md b/ee/packages/omnichannel-services/CHANGELOG.md index c141b4205af5..1d7bc3c6daaa 100644 --- a/ee/packages/omnichannel-services/CHANGELOG.md +++ b/ee/packages/omnichannel-services/CHANGELOG.md @@ -1,5 +1,17 @@ # @rocket.chat/omnichannel-services +## 0.0.10 + +### Patch Changes + +- Updated dependencies [8a7d5d3898] + - @rocket.chat/model-typings@0.0.10 + - @rocket.chat/models@0.0.10 + - @rocket.chat/core-services@0.1.4 + - @rocket.chat/core-typings@6.3.4 + - @rocket.chat/rest-typings@6.3.4 + - @rocket.chat/pdf-worker@0.0.10 + ## 0.0.9 ### Patch Changes diff --git a/ee/packages/omnichannel-services/package.json b/ee/packages/omnichannel-services/package.json index 27c04e99e7ea..3b85bb71988b 100644 --- a/ee/packages/omnichannel-services/package.json +++ b/ee/packages/omnichannel-services/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/omnichannel-services", - "version": "0.0.9", + "version": "0.0.10", "private": true, "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", diff --git a/ee/packages/pdf-worker/CHANGELOG.md b/ee/packages/pdf-worker/CHANGELOG.md index bf50d15ae71b..7dee5be2c4df 100644 --- a/ee/packages/pdf-worker/CHANGELOG.md +++ b/ee/packages/pdf-worker/CHANGELOG.md @@ -1,5 +1,11 @@ # @rocket.chat/pdf-worker +## 0.0.10 + +### Patch Changes + +- @rocket.chat/core-typings@6.3.4 + ## 0.0.9 ### Patch Changes diff --git a/ee/packages/pdf-worker/package.json b/ee/packages/pdf-worker/package.json index 5e8324613ad1..a089448057a6 100644 --- a/ee/packages/pdf-worker/package.json +++ b/ee/packages/pdf-worker/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/pdf-worker", - "version": "0.0.9", + "version": "0.0.10", "private": true, "devDependencies": { "@storybook/addon-essentials": "~6.5.16", diff --git a/ee/packages/presence/CHANGELOG.md b/ee/packages/presence/CHANGELOG.md index 1ed57117b68e..c5c3dbaf9adc 100644 --- a/ee/packages/presence/CHANGELOG.md +++ b/ee/packages/presence/CHANGELOG.md @@ -1,5 +1,13 @@ # @rocket.chat/presence +## 0.0.10 + +### Patch Changes + +- @rocket.chat/models@0.0.10 +- @rocket.chat/core-services@0.1.4 +- @rocket.chat/core-typings@6.3.4 + ## 0.0.9 ### Patch Changes diff --git a/ee/packages/presence/package.json b/ee/packages/presence/package.json index 5f96bf0fde98..18bc8371997b 100644 --- a/ee/packages/presence/package.json +++ b/ee/packages/presence/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/presence", - "version": "0.0.9", + "version": "0.0.10", "private": true, "devDependencies": { "@babel/core": "~7.22.9", diff --git a/packages/core-services/CHANGELOG.md b/packages/core-services/CHANGELOG.md index 07a137608d92..f432cc857e7f 100644 --- a/packages/core-services/CHANGELOG.md +++ b/packages/core-services/CHANGELOG.md @@ -1,5 +1,13 @@ # @rocket.chat/core-services +## 0.1.4 + +### Patch Changes + +- @rocket.chat/models@0.0.10 +- @rocket.chat/core-typings@6.3.4 +- @rocket.chat/rest-typings@6.3.4 + ## 0.1.3 ### Patch Changes diff --git a/packages/core-services/package.json b/packages/core-services/package.json index d63c525a2782..f9468b62edb3 100644 --- a/packages/core-services/package.json +++ b/packages/core-services/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/core-services", - "version": "0.1.3", + "version": "0.1.4", "private": true, "devDependencies": { "@babel/core": "~7.22.9", diff --git a/packages/core-typings/CHANGELOG.md b/packages/core-typings/CHANGELOG.md index 5e6880b649a4..832aceb8ac06 100644 --- a/packages/core-typings/CHANGELOG.md +++ b/packages/core-typings/CHANGELOG.md @@ -1,5 +1,7 @@ # @rocket.chat/core-typings +## 6.3.4 + ## 6.3.3 ## 6.3.2 diff --git a/packages/core-typings/package.json b/packages/core-typings/package.json index 33c93c28d8a8..b727aa01dcdc 100644 --- a/packages/core-typings/package.json +++ b/packages/core-typings/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/core-typings", - "version": "6.3.3", + "version": "6.3.4", "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", "eslint": "~8.45.0", diff --git a/packages/cron/CHANGELOG.md b/packages/cron/CHANGELOG.md index 44b205dda1e7..9699a8f01631 100644 --- a/packages/cron/CHANGELOG.md +++ b/packages/cron/CHANGELOG.md @@ -1,5 +1,12 @@ # @rocket.chat/cron +## 0.0.6 + +### Patch Changes + +- @rocket.chat/models@0.0.10 +- @rocket.chat/core-typings@6.3.4 + ## 0.0.5 ### Patch Changes diff --git a/packages/cron/package.json b/packages/cron/package.json index 396047b3147c..2ef55db12b8a 100644 --- a/packages/cron/package.json +++ b/packages/cron/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/cron", - "version": "0.0.5", + "version": "0.0.6", "private": true, "devDependencies": { "@types/jest": "~29.5.3", diff --git a/packages/fuselage-ui-kit/CHANGELOG.md b/packages/fuselage-ui-kit/CHANGELOG.md index 6d52e9064b16..0ec8fb25ca1f 100644 --- a/packages/fuselage-ui-kit/CHANGELOG.md +++ b/packages/fuselage-ui-kit/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log +## 1.0.4 + +### Patch Changes + +- @rocket.chat/gazzodown@1.0.4 +- @rocket.chat/ui-contexts@1.0.4 +- @rocket.chat/ui-video-conf@1.0.4 + ## 1.0.3 ### Patch Changes diff --git a/packages/fuselage-ui-kit/package.json b/packages/fuselage-ui-kit/package.json index 0cc50b819e9e..70e9f21727d9 100644 --- a/packages/fuselage-ui-kit/package.json +++ b/packages/fuselage-ui-kit/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/fuselage-ui-kit", "private": true, - "version": "1.0.3", + "version": "1.0.4", "description": "UiKit elements for Rocket.Chat Apps built under Fuselage design system", "homepage": "https://rocketchat.github.io/Rocket.Chat.Fuselage/", "author": { @@ -46,9 +46,9 @@ "@rocket.chat/icons": "*", "@rocket.chat/prettier-config": "*", "@rocket.chat/styled": "*", - "@rocket.chat/ui-contexts": "1.0.3", + "@rocket.chat/ui-contexts": "1.0.4", "@rocket.chat/ui-kit": "*", - "@rocket.chat/ui-video-conf": "1.0.3", + "@rocket.chat/ui-video-conf": "1.0.4", "@tanstack/react-query": "*", "react": "*", "react-dom": "*" diff --git a/packages/gazzodown/CHANGELOG.md b/packages/gazzodown/CHANGELOG.md index 88c0f11d0cdb..3e208b86242d 100644 --- a/packages/gazzodown/CHANGELOG.md +++ b/packages/gazzodown/CHANGELOG.md @@ -1,5 +1,13 @@ # @rocket.chat/gazzodown +## 1.0.4 + +### Patch Changes + +- @rocket.chat/core-typings@6.3.4 +- @rocket.chat/ui-contexts@1.0.4 +- @rocket.chat/ui-client@1.0.4 + ## 1.0.3 ### Patch Changes diff --git a/packages/gazzodown/package.json b/packages/gazzodown/package.json index f71325b37a1c..3e8988200c13 100644 --- a/packages/gazzodown/package.json +++ b/packages/gazzodown/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/gazzodown", - "version": "1.0.3", + "version": "1.0.4", "private": true, "devDependencies": { "@babel/core": "~7.22.9", @@ -65,7 +65,7 @@ "/dist" ], "peerDependencies": { - "@rocket.chat/core-typings": "6.3.3", + "@rocket.chat/core-typings": "6.3.4", "@rocket.chat/css-in-js": "*", "@rocket.chat/fuselage": "*", "@rocket.chat/fuselage-tokens": "*", diff --git a/packages/instance-status/CHANGELOG.md b/packages/instance-status/CHANGELOG.md index 1b5dfc94f624..20b229fbc24c 100644 --- a/packages/instance-status/CHANGELOG.md +++ b/packages/instance-status/CHANGELOG.md @@ -1,5 +1,11 @@ # @rocket.chat/instance-status +## 0.0.10 + +### Patch Changes + +- @rocket.chat/models@0.0.10 + ## 0.0.9 ### Patch Changes diff --git a/packages/instance-status/package.json b/packages/instance-status/package.json index c36f4e9834e3..d7d8bbb50d46 100644 --- a/packages/instance-status/package.json +++ b/packages/instance-status/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/instance-status", - "version": "0.0.9", + "version": "0.0.10", "private": true, "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", diff --git a/packages/model-typings/CHANGELOG.md b/packages/model-typings/CHANGELOG.md index 1d89b9145bc4..836eb3a1dcc8 100644 --- a/packages/model-typings/CHANGELOG.md +++ b/packages/model-typings/CHANGELOG.md @@ -1,5 +1,12 @@ # @rocket.chat/model-typings +## 0.0.10 + +### Patch Changes + +- 8a7d5d3898: fix: agent role being removed upon user deactivation + - @rocket.chat/core-typings@6.3.4 + ## 0.0.9 ### Patch Changes diff --git a/packages/model-typings/package.json b/packages/model-typings/package.json index 89ee934005cd..bacc3023e5f4 100644 --- a/packages/model-typings/package.json +++ b/packages/model-typings/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/model-typings", - "version": "0.0.9", + "version": "0.0.10", "private": true, "devDependencies": { "@types/jest": "~29.5.3", diff --git a/packages/models/CHANGELOG.md b/packages/models/CHANGELOG.md index c8249a587d15..230aa3158fbd 100644 --- a/packages/models/CHANGELOG.md +++ b/packages/models/CHANGELOG.md @@ -1,5 +1,12 @@ # @rocket.chat/models +## 0.0.10 + +### Patch Changes + +- Updated dependencies [8a7d5d3898] + - @rocket.chat/model-typings@0.0.10 + ## 0.0.9 ### Patch Changes diff --git a/packages/models/package.json b/packages/models/package.json index 0a80a2975ffc..c075c8132582 100644 --- a/packages/models/package.json +++ b/packages/models/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/models", - "version": "0.0.9", + "version": "0.0.10", "private": true, "devDependencies": { "@types/jest": "~29.5.3", diff --git a/packages/rest-typings/CHANGELOG.md b/packages/rest-typings/CHANGELOG.md index 9c5aa19f1b07..62f05e378e4e 100644 --- a/packages/rest-typings/CHANGELOG.md +++ b/packages/rest-typings/CHANGELOG.md @@ -1,5 +1,11 @@ # @rocket.chat/rest-typings +## 6.3.4 + +### Patch Changes + +- @rocket.chat/core-typings@6.3.4 + ## 6.3.3 ### Patch Changes diff --git a/packages/rest-typings/package.json b/packages/rest-typings/package.json index acb2cb635414..45bb773b7dee 100644 --- a/packages/rest-typings/package.json +++ b/packages/rest-typings/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/rest-typings", - "version": "6.3.3", + "version": "6.3.4", "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", "@types/jest": "~29.5.3", diff --git a/packages/ui-client/CHANGELOG.md b/packages/ui-client/CHANGELOG.md index 497a40137ee5..fa6ebadcedfa 100644 --- a/packages/ui-client/CHANGELOG.md +++ b/packages/ui-client/CHANGELOG.md @@ -1,5 +1,11 @@ # @rocket.chat/ui-client +## 1.0.4 + +### Patch Changes + +- @rocket.chat/ui-contexts@1.0.4 + ## 1.0.3 ### Patch Changes diff --git a/packages/ui-client/package.json b/packages/ui-client/package.json index 4bc9a7d8c681..adf07e87c9a0 100644 --- a/packages/ui-client/package.json +++ b/packages/ui-client/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-client", - "version": "1.0.3", + "version": "1.0.4", "private": true, "devDependencies": { "@babel/core": "~7.22.9", @@ -61,7 +61,7 @@ "@rocket.chat/fuselage": "*", "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", - "@rocket.chat/ui-contexts": "1.0.3", + "@rocket.chat/ui-contexts": "1.0.4", "react": "~17.0.2" }, "volta": { diff --git a/packages/ui-client/src/components/Card/Card.stories.tsx b/packages/ui-client/src/components/Card/Card.stories.tsx index 4697443e9259..56a2220219ed 100644 --- a/packages/ui-client/src/components/Card/Card.stories.tsx +++ b/packages/ui-client/src/components/Card/Card.stories.tsx @@ -1,7 +1,7 @@ import { Box, Button, ButtonGroup } from '@rocket.chat/fuselage'; import type { ComponentMeta, ComponentStory } from '@storybook/react'; -import Card from '.'; +import { Card, CardBody, CardCol, CardColSection, CardColTitle, CardDivider, CardFooter, CardIcon, CardTitle } from '.'; import TextSeparator from '../TextSeparator'; import { UserStatus } from '../UserStatus'; @@ -9,13 +9,13 @@ export default { title: 'Components/Card', component: Card, subcomponents: { - 'Card.Title': Card.Title, - 'Card.Body': Card.Body, - 'Card.Col': Card.Col, - 'Card.Col.Section': Card.Col.Section, - 'Card.Col.Title': Card.Col.Title, - 'Card.Footer': Card.Footer, - 'Card.Divider': Card.Divider, + CardTitle, + CardBody, + CardCol, + CardColSection, + CardColTitle, + CardFooter, + CardDivider, }, parameters: { layout: 'centered', @@ -25,14 +25,14 @@ export default { export const Example: ComponentStory = () => ( - Usage - - - Users + Usage + + + Users - Total + Total } value={123} @@ -40,9 +40,9 @@ export const Example: ComponentStory = () => ( - + - {' '} + {' '} Online } @@ -51,9 +51,9 @@ export const Example: ComponentStory = () => ( - + - {' '} + {' '} Busy } @@ -62,9 +62,9 @@ export const Example: ComponentStory = () => ( - + - {' '} + {' '} Away } @@ -73,111 +73,111 @@ export const Example: ComponentStory = () => ( - + - {' '} + {' '} Offline } value={123} /> - - - Types and Distribution + + + Types and Distribution - - - Uploads + + + Uploads - - + + ); export const Single: ComponentStory = () => ( - A card - - + A card + + - A Section + A Section
A bunch of stuff
A bunch of stuff
A bunch of stuff
A bunch of stuff
- Another Section + Another Section
A bunch of stuff
A bunch of stuff
A bunch of stuff
A bunch of stuff
-
-
- + + + - +
); export const Double: ComponentStory = () => ( - A card - - + A card + + - A Section + A Section
A bunch of stuff
A bunch of stuff
A bunch of stuff
A bunch of stuff
- Another Section + Another Section
A bunch of stuff
A bunch of stuff
A bunch of stuff
A bunch of stuff
-
- - + + + - A Section + A Section - A bunch of stuff + A bunch of stuff - A bunch of stuff + A bunch of stuff - A bunch of stuff + A bunch of stuff - A bunch of stuff + A bunch of stuff - Another Section + Another Section
A bunch of stuff
A bunch of stuff
A bunch of stuff
A bunch of stuff
-
-
- + + + - +
); diff --git a/packages/ui-client/src/components/Card/index.ts b/packages/ui-client/src/components/Card/index.ts index ade5391e61d6..76df65e5a809 100644 --- a/packages/ui-client/src/components/Card/index.ts +++ b/packages/ui-client/src/components/Card/index.ts @@ -1,30 +1,10 @@ -import Card from './Card'; -import CardBody from './CardBody'; -import CardCol from './CardCol'; -import CardColSection from './CardColSection'; -import CardColTitle from './CardColTitle'; -import CardDivider from './CardDivider'; -import CardFooter from './CardFooter'; -import CardFooterWrapper from './CardFooterWrapper'; -import CardIcon from './CardIcon'; -import CardTitle from './CardTitle'; - -export const DOUBLE_COLUMN_CARD_WIDTH = 552; - -/** - * @deprecated Avoid default usage, use named imports instead - */ -export default Object.assign(Card, { - Title: CardTitle, - Body: CardBody, - Col: Object.assign(CardCol, { - Title: CardColTitle, - Section: CardColSection, - }), - Footer: CardFooter, - FooterWrapper: CardFooterWrapper, - Divider: CardDivider, - Icon: CardIcon, -}); - -export { Card, CardBody, CardCol, CardColSection, CardColTitle, CardDivider, CardFooter, CardFooterWrapper, CardIcon, CardTitle }; +export { default as Card } from './Card'; +export { default as CardBody } from './CardBody'; +export { default as CardCol } from './CardCol'; +export { default as CardColSection } from './CardColSection'; +export { default as CardColTitle } from './CardColTitle'; +export { default as CardDivider } from './CardDivider'; +export { default as CardFooter } from './CardFooter'; +export { default as CardFooterWrapper } from './CardFooterWrapper'; +export { default as CardIcon } from './CardIcon'; +export { default as CardTitle } from './CardTitle'; diff --git a/packages/ui-client/src/components/index.ts b/packages/ui-client/src/components/index.ts index 6448f37b3e68..3de4bf411a5e 100644 --- a/packages/ui-client/src/components/index.ts +++ b/packages/ui-client/src/components/index.ts @@ -7,7 +7,7 @@ export * from '../hooks/useValidatePassword'; export { default as TextSeparator } from './TextSeparator'; export * from './TooltipComponent'; export * as UserStatus from './UserStatus'; -export { default as Card } from './Card'; +export * from './Card'; export * from './Header'; export * from './MultiSelectCustom/MultiSelectCustom'; export * from './FeaturePreview/FeaturePreview'; diff --git a/packages/ui-contexts/CHANGELOG.md b/packages/ui-contexts/CHANGELOG.md index 0be8b831d56b..af1cef5bcba6 100644 --- a/packages/ui-contexts/CHANGELOG.md +++ b/packages/ui-contexts/CHANGELOG.md @@ -1,5 +1,13 @@ # @rocket.chat/ui-contexts +## 1.0.4 + +### Patch Changes + +- @rocket.chat/core-typings@6.3.4 +- @rocket.chat/rest-typings@6.3.4 +- @rocket.chat/ddp-client@0.1.4 + ## 1.0.3 ### Patch Changes diff --git a/packages/ui-contexts/package.json b/packages/ui-contexts/package.json index aff54e877f57..fd262b4a66fc 100644 --- a/packages/ui-contexts/package.json +++ b/packages/ui-contexts/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-contexts", - "version": "1.0.3", + "version": "1.0.4", "private": true, "devDependencies": { "@rocket.chat/core-typings": "workspace:^", diff --git a/packages/ui-video-conf/CHANGELOG.md b/packages/ui-video-conf/CHANGELOG.md index b5408f61908a..114a6fe5d3ca 100644 --- a/packages/ui-video-conf/CHANGELOG.md +++ b/packages/ui-video-conf/CHANGELOG.md @@ -1,5 +1,11 @@ # @rocket.chat/ui-video-conf +## 1.0.4 + +### Patch Changes + +- @rocket.chat/ui-contexts@1.0.4 + ## 1.0.3 ### Patch Changes diff --git a/packages/ui-video-conf/package.json b/packages/ui-video-conf/package.json index c2ce9e393647..00106886a26e 100644 --- a/packages/ui-video-conf/package.json +++ b/packages/ui-video-conf/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-video-conf", - "version": "1.0.3", + "version": "1.0.4", "private": true, "devDependencies": { "@babel/core": "~7.22.9", @@ -35,7 +35,7 @@ "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", "@rocket.chat/styled": "*", - "@rocket.chat/ui-contexts": "1.0.3", + "@rocket.chat/ui-contexts": "1.0.4", "react": "^17.0.2", "react-dom": "^17.0.2" }, diff --git a/packages/uikit-playground/CHANGELOG.md b/packages/uikit-playground/CHANGELOG.md index 852e0fe95baf..fd1c5f2f689b 100644 --- a/packages/uikit-playground/CHANGELOG.md +++ b/packages/uikit-playground/CHANGELOG.md @@ -1,5 +1,12 @@ # @rocket.chat/uikit-playground +## 0.1.4 + +### Patch Changes + +- @rocket.chat/ui-contexts@1.0.4 +- @rocket.chat/fuselage-ui-kit@1.0.4 + ## 0.1.3 ### Patch Changes diff --git a/packages/uikit-playground/package.json b/packages/uikit-playground/package.json index c32f476697cf..78bbf2fb6a3a 100644 --- a/packages/uikit-playground/package.json +++ b/packages/uikit-playground/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/uikit-playground", "private": true, - "version": "0.1.3", + "version": "0.1.4", "type": "module", "scripts": { "dev": "vite", diff --git a/packages/web-ui-registration/CHANGELOG.md b/packages/web-ui-registration/CHANGELOG.md index cf000c3483bc..e89a16f355fb 100644 --- a/packages/web-ui-registration/CHANGELOG.md +++ b/packages/web-ui-registration/CHANGELOG.md @@ -1,5 +1,11 @@ # @rocket.chat/web-ui-registration +## 1.0.4 + +### Patch Changes + +- @rocket.chat/ui-contexts@1.0.4 + ## 1.0.3 ### Patch Changes diff --git a/packages/web-ui-registration/package.json b/packages/web-ui-registration/package.json index a6e7332c948f..f6727baaac37 100644 --- a/packages/web-ui-registration/package.json +++ b/packages/web-ui-registration/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/web-ui-registration", - "version": "1.0.3", + "version": "1.0.4", "private": true, "homepage": "https://rocket.chat", "main": "./dist/index.js", @@ -49,7 +49,7 @@ }, "peerDependencies": { "@rocket.chat/layout": "*", - "@rocket.chat/ui-contexts": "1.0.3", + "@rocket.chat/ui-contexts": "1.0.4", "@tanstack/react-query": "*", "react": "*", "react-hook-form": "*", diff --git a/packages/web-ui-registration/src/LoginForm.tsx b/packages/web-ui-registration/src/LoginForm.tsx index 832959f9125e..112139a483e6 100644 --- a/packages/web-ui-registration/src/LoginForm.tsx +++ b/packages/web-ui-registration/src/LoginForm.tsx @@ -3,9 +3,8 @@ import { useUniqueId } from '@rocket.chat/fuselage-hooks'; import { Form, ActionLink } from '@rocket.chat/layout'; import { useLoginWithPassword, useSetting } from '@rocket.chat/ui-contexts'; import { useMutation } from '@tanstack/react-query'; -import type { UseMutationResult } from '@tanstack/react-query'; import type { ReactElement } from 'react'; -import { useState } from 'react'; +import { useEffect, useRef, useState } from 'react'; import { useForm } from 'react-hook-form'; import { Trans, useTranslation } from 'react-i18next'; @@ -13,14 +12,38 @@ import EmailConfirmationForm from './EmailConfirmationForm'; import LoginServices from './LoginServices'; import type { DispatchLoginRouter } from './hooks/useLoginRouter'; -export type LoginErrors = - | 'error-user-is-not-activated' - | 'error-invalid-email' - | 'error-login-blocked-for-ip' - | 'error-login-blocked-for-user' - | 'error-license-user-limit-reached' - | 'user-not-found' - | 'error-app-user-is-not-allowed-to-login'; +const LOGIN_SUBMIT_ERRORS = { + 'error-user-is-not-activated': { + type: 'warning', + i18n: 'registration.page.registration.waitActivationWarning', + }, + 'error-app-user-is-not-allowed-to-login': { + type: 'danger', + i18n: 'registration.page.login.errors.AppUserNotAllowedToLogin', + }, + 'user-not-found': { + type: 'danger', + i18n: 'registration.page.login.errors.wrongCredentials', + }, + 'error-login-blocked-for-ip': { + type: 'danger', + i18n: 'registration.page.login.errors.loginBlockedForIp', + }, + 'error-login-blocked-for-user': { + type: 'danger', + i18n: 'registration.page.login.errors.loginBlockedForUser', + }, + 'error-license-user-limit-reached': { + type: 'warning', + i18n: 'registration.page.login.errors.licenseUserLimitReached', + }, + 'error-invalid-email': { + type: 'danger', + i18n: 'registration.page.login.errors.invalidEmail', + }, +} as const; + +export type LoginErrors = keyof typeof LOGIN_SUBMIT_ERRORS; export const LoginForm = ({ setLoginRoute }: { setLoginRoute: DispatchLoginRouter }): ReactElement => { const { @@ -30,12 +53,8 @@ export const LoginForm = ({ setLoginRoute }: { setLoginRoute: DispatchLoginRoute clearErrors, getValues, formState: { errors }, - } = useForm<{ - email?: string; - username: string; - password: string; - }>({ - mode: 'onChange', + } = useForm<{ username: string; password: string }>({ + mode: 'onBlur', }); const { t } = useTranslation(); @@ -48,21 +67,13 @@ export const LoginForm = ({ setLoginRoute }: { setLoginRoute: DispatchLoginRoute const usernameOrEmailPlaceholder = String(useSetting('Accounts_EmailOrUsernamePlaceholder')); const passwordPlaceholder = String(useSetting('Accounts_PasswordPlaceholder')); - const loginMutation: UseMutationResult< - void, - Error, - { - username: string; - password: string; - email?: string; - } - > = useMutation({ - mutationFn: (formData) => { + const loginMutation = useMutation({ + mutationFn: (formData: { username: string; password: string }) => { return login(formData.username, formData.password); }, onError: (error: any) => { if ([error.error, error.errorType].includes('error-invalid-email')) { - setError('email', { type: 'invalid-email', message: t('registration.page.login.errors.invalidEmail') }); + setError('username', { type: 'invalid-email', message: t('registration.page.login.errors.invalidEmail') }); } if ('error' in error && error.error !== 403) { @@ -76,20 +87,32 @@ export const LoginForm = ({ setLoginRoute }: { setLoginRoute: DispatchLoginRoute }, }); - if (errors.email?.type === 'invalid-email') { - return clearErrors('email')} email={getValues('email')} />; + const usernameId = useUniqueId(); + const passwordId = useUniqueId(); + const loginFormRef = useRef(null); + + useEffect(() => { + if (loginFormRef.current) { + loginFormRef.current.focus(); + } + }, []); + + const renderErrorOnSubmit = (error: LoginErrors) => { + const { type, i18n } = LOGIN_SUBMIT_ERRORS[error]; + return {i18n}; + }; + + if (errors.username?.type === 'invalid-email') { + return clearErrors('username')} email={getValues('username')} />; } return (
{ - if (loginMutation.isLoading) { - return; - } - - loginMutation.mutate(data); - })} + aria-describedby='welcomeTitle' + onSubmit={handleSubmit(async (data) => loginMutation.mutate(data))} > {t('registration.component.login')} @@ -99,50 +122,47 @@ export const LoginForm = ({ setLoginRoute }: { setLoginRoute: DispatchLoginRoute - {t('registration.component.form.emailOrUsername')} + + {t('registration.component.form.emailOrUsername')} + { - clearErrors(['username', 'password']); - }, + required: t('registration.component.form.requiredField'), })} placeholder={usernameOrEmailPlaceholder || t('registration.component.form.emailPlaceholder')} - error={ - errors.username?.message || - (errors.username?.type === 'required' ? t('registration.component.form.requiredField') : undefined) - } + error={errors.username?.message} aria-invalid={errors.username ? 'true' : 'false'} - id='username' + aria-describedby={`${usernameId}-error`} + id={usernameId} /> - {errors.username && errors.username.type === 'required' && ( - {t('registration.component.form.requiredField')} + {errors.username && ( + + {errors.username.message} + )} - - {t('registration.component.form.password')} + + {t('registration.component.form.password')} + { - clearErrors(['username', 'password']); - }, + required: t('registration.component.form.requiredField'), })} placeholder={passwordPlaceholder} - error={ - errors.password?.message || - (errors.password?.type === 'required' ? t('registration.component.form.requiredField') : undefined) - } + error={errors.password?.message} aria-invalid={errors.password ? 'true' : 'false'} - id='password' + aria-describedby={`${passwordId}-error`} + id={passwordId} /> - {errors.password && errors.password.type === 'required' && ( - {t('registration.component.form.requiredField')} + {errors.password && ( + + {errors.password.message} + )} {isResetPasswordAllowed && ( @@ -159,31 +179,7 @@ export const LoginForm = ({ setLoginRoute }: { setLoginRoute: DispatchLoginRoute )} - - {errorOnSubmit === 'error-user-is-not-activated' && ( - {t('registration.page.registration.waitActivationWarning')} - )} - - {errorOnSubmit === 'error-app-user-is-not-allowed-to-login' && ( - {t('registration.page.login.errors.AppUserNotAllowedToLogin')} - )} - - {errorOnSubmit === 'user-not-found' && ( - {t('registration.page.login.errors.wrongCredentials')} - )} - - {errorOnSubmit === 'error-login-blocked-for-ip' && ( - {t('registration.page.login.errors.loginBlockedForIp')} - )} - - {errorOnSubmit === 'error-login-blocked-for-user' && ( - {t('registration.page.login.errors.loginBlockedForUser')} - )} - - {errorOnSubmit === 'error-license-user-limit-reached' && ( - {t('registration.page.login.errors.licenseUserLimitReached')} - )} - + {errorOnSubmit && {renderErrorOnSubmit(errorOnSubmit)}} diff --git a/packages/web-ui-registration/src/RegisterForm.tsx b/packages/web-ui-registration/src/RegisterForm.tsx index 32ba9238766d..eb0aa7229f6d 100644 --- a/packages/web-ui-registration/src/RegisterForm.tsx +++ b/packages/web-ui-registration/src/RegisterForm.tsx @@ -5,7 +5,7 @@ import { Form, ActionLink } from '@rocket.chat/layout'; import { CustomFieldsForm, PasswordVerifier, useValidatePassword } from '@rocket.chat/ui-client'; import { useAccountsCustomFields, useSetting, useToastMessageDispatch } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; -import { useState } from 'react'; +import { useEffect, useRef, useState } from 'react'; import { useForm } from 'react-hook-form'; import { Trans, useTranslation } from 'react-i18next'; @@ -63,6 +63,14 @@ export const RegisterForm = ({ setLoginRoute }: { setLoginRoute: DispatchLoginRo const { password } = watch(); const passwordIsValid = useValidatePassword(password); + const registerFormRef = useRef(null); + + useEffect(() => { + if (registerFormRef.current) { + registerFormRef.current.focus(); + } + }, []); + const handleRegister = async ({ password, passwordConfirmation: _, ...formData }: LoginRegisterPayload) => { registerUser.mutate( { pass: password, ...formData }, @@ -102,7 +110,13 @@ export const RegisterForm = ({ setLoginRoute }: { setLoginRoute: DispatchLoginRo } return ( - + {t('registration.component.form.createAnAccount')} diff --git a/packages/web-ui-registration/src/RegisterTemplate.tsx b/packages/web-ui-registration/src/RegisterTemplate.tsx index 9afaac8816d5..9b50c176cef2 100644 --- a/packages/web-ui-registration/src/RegisterTemplate.tsx +++ b/packages/web-ui-registration/src/RegisterTemplate.tsx @@ -1,16 +1,18 @@ import { useSetting } from '@rocket.chat/ui-contexts'; -import type { ReactElement } from 'react'; +import type { AllHTMLAttributes } from 'react'; import HorizontalTemplate from './template/HorizontalTemplate'; import VerticalTemplate from './template/VerticalTemplate'; -const RegisterTemplate = ({ children }: { children: ReactElement }): ReactElement => { +const RegisterTemplate = ({ children, ...props }: AllHTMLAttributes) => { const template = useSetting<'vertical-template' | 'horizontal-template'>('Layout_Login_Template'); - if (template === 'vertical-template') { - return {children}; - } - return {children}; + return ( +
+ {template === 'vertical-template' && } + {template === 'horizontal-template' && } +
+ ); }; export default RegisterTemplate; diff --git a/packages/web-ui-registration/src/components/RegisterTitle.tsx b/packages/web-ui-registration/src/components/RegisterTitle.tsx index e00e010fd674..2a8dea17206c 100644 --- a/packages/web-ui-registration/src/components/RegisterTitle.tsx +++ b/packages/web-ui-registration/src/components/RegisterTitle.tsx @@ -9,5 +9,10 @@ export const RegisterTitle = (): ReactElement | null => { if (hideTitle) { return null; } - return Welcome to {siteName} workspace; + + return ( + + Welcome to {siteName} workspace + + ); }; diff --git a/packages/web-ui-registration/src/template/HorizontalTemplate.tsx b/packages/web-ui-registration/src/template/HorizontalTemplate.tsx index 197091928086..6fd11618746f 100644 --- a/packages/web-ui-registration/src/template/HorizontalTemplate.tsx +++ b/packages/web-ui-registration/src/template/HorizontalTemplate.tsx @@ -5,7 +5,6 @@ import { HorizontalWizardLayoutContent, HorizontalWizardLayoutTitle, HorizontalWizardLayoutFooter, - HorizontalWizardLayoutDescription, } from '@rocket.chat/layout'; import { useSetting, useAssetWithDarkModePath } from '@rocket.chat/ui-contexts'; import type { ReactElement, ReactNode } from 'react'; @@ -29,9 +28,7 @@ const HorizontalTemplate = ({ children }: { children: ReactNode }): ReactElement - - - + {children}