diff --git a/apps/meteor/app/api/server/v1/videoConference.ts b/apps/meteor/app/api/server/v1/videoConference.ts index f471fcaebe404..cefa7ffd85d86 100644 --- a/apps/meteor/app/api/server/v1/videoConference.ts +++ b/apps/meteor/app/api/server/v1/videoConference.ts @@ -114,7 +114,7 @@ API.v1.addRoute( API.v1.addRoute( 'video-conference.info', - { authRequired: true, validateParams: isVideoConfInfoProps, rateLimiterOptions: { numRequestsAllowed: 3, intervalTimeInMS: 1000 } }, + { authRequired: true, validateParams: isVideoConfInfoProps, rateLimiterOptions: { numRequestsAllowed: 15, intervalTimeInMS: 3000 } }, { async get() { const { callId } = this.queryParams; diff --git a/apps/meteor/client/views/blocks/MessageBlock.js b/apps/meteor/client/views/blocks/MessageBlock.js index 1b9c194350ca7..965a0d9b3957a 100644 --- a/apps/meteor/client/views/blocks/MessageBlock.js +++ b/apps/meteor/client/views/blocks/MessageBlock.js @@ -1,12 +1,21 @@ import { UIKitIncomingInteractionContainerType } from '@rocket.chat/apps-engine/definition/uikit/UIKitIncomingInteractionContainer'; +import { useMutableCallback } from '@rocket.chat/fuselage-hooks'; import { UiKitMessage, UiKitComponent, kitContext, messageParser } from '@rocket.chat/fuselage-ui-kit'; import React from 'react'; import * as ActionManager from '../../../app/ui-message/client/ActionManager'; import { useBlockRendered } from '../../components/message/hooks/useBlockRendered'; -import { useVideoConfJoinCall, useVideoConfSetPreferences } from '../../contexts/VideoConfContext'; +import { + useVideoConfJoinCall, + useVideoConfSetPreferences, + useVideoConfIsCalling, + useVideoConfIsRinging, + useVideoConfDispatchOutgoing, +} from '../../contexts/VideoConfContext'; +import { VideoConfManager } from '../../lib/VideoConfManager'; import { renderMessageBody } from '../../lib/utils/renderMessageBody'; import './textParsers'; +import { useVideoConfWarning } from '../room/contextualBar/VideoConference/useVideoConfWarning'; // TODO: move this to fuselage-ui-kit itself const mrkdwn = ({ text } = {}) => text && ; @@ -16,14 +25,36 @@ function MessageBlock({ mid: _mid, rid, blocks, appId }) { const { ref, className } = useBlockRendered(); const joinCall = useVideoConfJoinCall(); const setPreferences = useVideoConfSetPreferences(); + const isCalling = useVideoConfIsCalling(); + const isRinging = useVideoConfIsRinging(); + const dispatchWarning = useVideoConfWarning(); + const dispatchPopup = useVideoConfDispatchOutgoing(); + + const handleOpenVideoConf = useMutableCallback(async (rid) => { + if (isCalling || isRinging) { + return; + } + + try { + await VideoConfManager.loadCapabilities(); + dispatchPopup({ rid }); + } catch (error) { + dispatchWarning(error.error); + } + }); const context = { action: ({ actionId, value, blockId, mid = _mid, appId }, event) => { - if (appId === 'videoconf-core' && actionId === 'join') { + if (appId === 'videoconf-core') { event.preventDefault(); setPreferences({ mic: true, cam: false }); - joinCall(blockId); - return; + if (actionId === 'join') { + return joinCall(blockId); + } + + if (actionId === 'callBack') { + return handleOpenVideoConf(blockId); + } } ActionManager.triggerBlockAction({ diff --git a/apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfList/VideoConfListItem.tsx b/apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfList/VideoConfListItem.tsx index d96e1ef8452fe..692f46d9930a1 100644 --- a/apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfList/VideoConfListItem.tsx +++ b/apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfList/VideoConfListItem.tsx @@ -88,7 +88,7 @@ const VideoConfListItem = ({ {joinedUsers.length > VIDEOCONF_STACK_MAX_USERS - ? t('__usersCount__members_joined', { usersCount: joinedUsers.length - VIDEOCONF_STACK_MAX_USERS }) + ? t('__usersCount__member_joined', { usersCount: joinedUsers.length - VIDEOCONF_STACK_MAX_USERS }) : t('joined')} diff --git a/apps/meteor/package.json b/apps/meteor/package.json index 0a2cb03c5357d..9bddfae313235 100644 --- a/apps/meteor/package.json +++ b/apps/meteor/package.json @@ -61,11 +61,11 @@ "email": "support@rocket.chat" }, "devDependencies": { - "@babel/core": "^7.18.9", + "@babel/core": "^7.18.13", "@babel/eslint-parser": "^7.18.9", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", "@babel/plugin-proposal-optional-chaining": "^7.18.9", - "@babel/preset-env": "^7.18.9", + "@babel/preset-env": "^7.18.10", "@babel/preset-react": "^7.18.6", "@babel/register": "^7.18.9", "@faker-js/faker": "^6.3.1", @@ -127,7 +127,7 @@ "@types/prometheus-gc-stats": "^0.6.2", "@types/proxyquire": "^1.3.28", "@types/psl": "^1.1.0", - "@types/react": "~17.0.47", + "@types/react": "~17.0.48", "@types/react-dom": "~17.0.17", "@types/rewire": "^2.5.28", "@types/sanitize-html": "^2", @@ -156,7 +156,7 @@ "chai-spies": "^1.0.0", "cross-env": "^7.0.3", "emojione-assets": "^4.5.0", - "eslint": "^8.20.0", + "eslint": "^8.22.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-playwright": "^0.11.1", @@ -205,7 +205,7 @@ "@react-aria/color": "^3.0.0-beta.15", "@rocket.chat/agenda": "workspace:^", "@rocket.chat/api-client": "workspace:^", - "@rocket.chat/apps-engine": "latest", + "@rocket.chat/apps-engine": "1.36.0-videoconf", "@rocket.chat/cas-validate": "workspace:^", "@rocket.chat/core-typings": "workspace:^", "@rocket.chat/css-in-js": "0.31.21", @@ -214,11 +214,11 @@ "@rocket.chat/forked-matrix-appservice-bridge": "^4.0.1", "@rocket.chat/forked-matrix-bot-sdk": "^0.6.0-beta.2", "@rocket.chat/fuselage": "next", - "@rocket.chat/fuselage-hooks": "0.31.21", - "@rocket.chat/fuselage-polyfills": "0.31.21", - "@rocket.chat/fuselage-toastbar": "0.31.21", - "@rocket.chat/fuselage-tokens": "0.31.21", - "@rocket.chat/fuselage-ui-kit": "0.31.21", + "@rocket.chat/fuselage-hooks": "next", + "@rocket.chat/fuselage-polyfills": "next", + "@rocket.chat/fuselage-toastbar": "next", + "@rocket.chat/fuselage-tokens": "next", + "@rocket.chat/fuselage-ui-kit": "workspace:^", "@rocket.chat/gazzodown": "workspace:^", "@rocket.chat/icons": "0.31.21", "@rocket.chat/layout": "next", @@ -241,7 +241,7 @@ "@rocket.chat/ui-video-conf": "workspace:^", "@rocket.chat/web-ui-registration": "workspace:^", "@slack/rtm-api": "^6.0.0", - "@tanstack/react-query": "^4.0.10", + "@tanstack/react-query": "^4.16.1", "@types/cookie": "^0.5.1", "@types/katex": "^0.14.0", "@types/lodash": "^4.14.182", diff --git a/apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json b/apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json index dbc5f322e4fa5..53e0a6a8216fc 100644 --- a/apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json +++ b/apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json @@ -5,7 +5,8 @@ "__count__empty_rooms_will_be_removed_automatically__rooms__": "__count__ empty rooms will be removed automatically:
__rooms__.", "__count__message_pruned": "__count__ message pruned", "__count__message_pruned_plural": "__count__ messages pruned", - "__usersCount__members_joined": "+ __usersCount__ members joined", + "__usersCount__member_joined": "+ __usersCount__ member joined", + "__usersCount__member_joined_plural": "+ __usersCount__ members joined", "__usersCount__people_will_be_invited": "__usersCount__ people will be invited", "__username__is_no_longer__role__defined_by__user_by_": "__username__ is no longer __role__ by __user_by__", "__username__was_set__role__by__user_by_": "__username__ was set __role__ by __user_by__", @@ -774,6 +775,7 @@ "By_author": "By __author__", "cache_cleared": "Cache cleared", "Call": "Call", + "Call_back": "Call back", "Calling": "Calling", "Call_Center": "Voice Channel", "Call_Center_Description": "Configure Rocket.Chat's voice channels", @@ -791,7 +793,9 @@ "Call_number_enterprise_only": "Call number (Enterprise Edition only)", "call-management": "Call Management", "call-management_description": "Permission to start a meeting", + "Call_ongoing": "Call ongoing", "Call_unavailable_for_federation": "Call is unavailable for Federated rooms", + "Call_was_not_answered": "Call was not answered", "Caller": "Caller", "Caller_Id": "Caller ID", "Cam_on": "Cam On", @@ -5120,6 +5124,8 @@ "Video_Conference": "Conference Call", "Video_Call_unavailable_for_federation": "Video Call is unavailable for Federated rooms", "Video_Conferences": "Conference Calls", + "Video_Conference_Info": "Meeting Information", + "Video_Conference_Url": "Meeting URL", "video-conf-provider-not-configured": "**Conference call not enabled**: A workspace admin needs to enable the conference calls feature first.", "Video_message": "Video message", "Videocall_declined": "Video Call Declined.", @@ -5287,6 +5293,7 @@ "VoIP_Toggle": "Enable/Disable VoIP", "Chat_opened_by_visitor": "Chat opened by the visitor", "Wait_activation_warning": "Before you can login, your account must be manually activated by an administrator.", + "Waiting_for_answer": "Waiting for answer", "Waiting_queue": "Waiting queue", "Waiting_queue_message": "Waiting queue message", "Waiting_queue_message_description": "Message that will be displayed to the visitors when they get in the queue", diff --git a/apps/meteor/server/models/raw/Messages.ts b/apps/meteor/server/models/raw/Messages.ts index 74a29de0e706d..36d27fbb7d68d 100644 --- a/apps/meteor/server/models/raw/Messages.ts +++ b/apps/meteor/server/models/raw/Messages.ts @@ -247,20 +247,6 @@ export class MessagesRaw extends BaseRaw implements IMessagesModel { await this.updateOne({ _id }, { $addToSet: { blocks: { $each: blocks } } }); } - async removeVideoConfJoinButton(_id: IMessage['_id']): Promise { - await this.updateOne( - { _id }, - { - $pull: { - blocks: { - appId: 'videoconf-core', - type: 'actions', - } as Required['blocks'][number], - }, - }, - ); - } - async countRoomsWithStarredMessages(options: AggregateOptions): Promise { const queryResult = await this.col .aggregate<{ _id: null; total: number }>( diff --git a/apps/meteor/server/models/raw/VideoConference.ts b/apps/meteor/server/models/raw/VideoConference.ts index 96d6cc7f3111e..4185ed2da5074 100644 --- a/apps/meteor/server/models/raw/VideoConference.ts +++ b/apps/meteor/server/models/raw/VideoConference.ts @@ -189,7 +189,10 @@ export class VideoConferenceRaw extends BaseRaw implements IVid }); } - public async addUserById(callId: string, user: Pick & { ts?: Date }): Promise { + public async addUserById( + callId: string, + user: Required> & { ts?: Date }, + ): Promise { await this.updateOneById(callId, { $addToSet: { users: { diff --git a/apps/meteor/server/modules/core-apps/videoconf.module.ts b/apps/meteor/server/modules/core-apps/videoconf.module.ts index f9133625e4957..cf8954e079524 100644 --- a/apps/meteor/server/modules/core-apps/videoconf.module.ts +++ b/apps/meteor/server/modules/core-apps/videoconf.module.ts @@ -1,3 +1,5 @@ +import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; + import type { IUiKitCoreApp } from '../../sdk/types/IUiKitCoreApp'; import { VideoConf } from '../../sdk'; @@ -6,6 +8,7 @@ export class VideoConfModule implements IUiKitCoreApp { async blockAction(payload: any): Promise { const { + triggerId, actionId, payload: { blockId: callId }, user: { _id: userId }, @@ -14,5 +17,35 @@ export class VideoConfModule implements IUiKitCoreApp { if (actionId === 'join') { VideoConf.join(userId, callId, {}); } + + if (actionId === 'info') { + const blocks = await VideoConf.getInfo(callId, userId); + + return { + type: 'modal.open', + triggerId, + appId: this.appId, + view: { + appId: this.appId, + type: 'modal', + id: `${callId}-info`, + title: { + type: 'plain_text', + text: TAPi18n.__('Video_Conference_Info'), + emoji: false, + }, + close: { + type: 'button', + text: { + type: 'plain_text', + text: TAPi18n.__('Close'), + emoji: false, + }, + actionId: 'cancel', + }, + blocks, + }, + }; + } } } diff --git a/apps/meteor/server/modules/listeners/listeners.module.ts b/apps/meteor/server/modules/listeners/listeners.module.ts index 75ca7aa7a587d..0f546ac8d5062 100644 --- a/apps/meteor/server/modules/listeners/listeners.module.ts +++ b/apps/meteor/server/modules/listeners/listeners.module.ts @@ -130,6 +130,12 @@ export class ListenersModule { notifications.streamRoomMessage.emitWithoutBroadcast(message.rid, message); }); + service.onEvent('message.update', ({ message }) => { + if (message.rid) { + notifications.streamRoomMessage.emitWithoutBroadcast(message.rid, message); + } + }); + service.onEvent('watch.subscriptions', ({ clientAction, subscription }) => { if (!subscription.u?._id) { return; diff --git a/apps/meteor/server/sdk/lib/Events.ts b/apps/meteor/server/sdk/lib/Events.ts index 6d1b1b3fc3364..236dcea72befd 100644 --- a/apps/meteor/server/sdk/lib/Events.ts +++ b/apps/meteor/server/sdk/lib/Events.ts @@ -22,6 +22,7 @@ import type { IWebdavAccount, ICustomSound, VoipEventDataSignature, + AtLeast, UserStatus, } from '@rocket.chat/core-typings'; @@ -138,4 +139,5 @@ export type EventSignatures = { 'call.callerhangup'(userId: string, data: { roomId: string }): void; 'watch.pbxevents'(data: { clientAction: ClientAction; data: Partial; id: string }): void; 'connector.statuschanged'(enabled: boolean): void; + 'message.update'(data: { message: AtLeast }): void; }; diff --git a/apps/meteor/server/sdk/types/IVideoConfService.ts b/apps/meteor/server/sdk/types/IVideoConfService.ts index 5c6f9037f918c..f8186212e16fd 100644 --- a/apps/meteor/server/sdk/types/IVideoConfService.ts +++ b/apps/meteor/server/sdk/types/IVideoConfService.ts @@ -8,6 +8,7 @@ import type { VideoConferenceInstructions, } from '@rocket.chat/core-typings'; import type { PaginatedResult } from '@rocket.chat/rest-typings'; +import type { IBlock } from '@rocket.chat/apps-engine/definition/uikit'; export type VideoConferenceJoinOptions = { mic?: boolean; @@ -18,6 +19,7 @@ export interface IVideoConfService { create(data: VideoConferenceCreateData, useAppUser?: boolean): Promise; start(caller: IUser['_id'], rid: string, options: { title?: string; allowRinging?: boolean }): Promise; join(uid: IUser['_id'] | undefined, callId: VideoConference['_id'], options: VideoConferenceJoinOptions): Promise; + getInfo(callId: VideoConference['_id'], uid: IUser['_id'] | undefined): Promise; cancel(uid: IUser['_id'], callId: VideoConference['_id']): Promise; get(callId: VideoConference['_id']): Promise | null>; getUnfiltered(callId: VideoConference['_id']): Promise; diff --git a/apps/meteor/server/services/video-conference/service.ts b/apps/meteor/server/services/video-conference/service.ts index 0808e685ba516..f367940f24e2c 100644 --- a/apps/meteor/server/services/video-conference/service.ts +++ b/apps/meteor/server/services/video-conference/service.ts @@ -10,6 +10,7 @@ import type { LivechatInstructions, AtLeast, IGroupVideoConference, + IVideoConferenceUser, IMessage, IStats, VideoConference, @@ -23,8 +24,9 @@ import { isGroupVideoConference, isLivechatVideoConference, } from '@rocket.chat/core-typings'; -import type { MessageSurfaceLayout, ContextBlock } from '@rocket.chat/ui-kit'; +import type { MessageSurfaceLayout } from '@rocket.chat/ui-kit'; import type { AppVideoConfProviderManager } from '@rocket.chat/apps-engine/server/managers'; +import type { IBlock } from '@rocket.chat/apps-engine/definition/uikit'; import { TAPi18n } from 'meteor/rocketchat:tap-i18n'; import type { PaginatedResult } from '@rocket.chat/rest-typings'; import { Users, VideoConference as VideoConferenceModel, Rooms, Messages, Subscriptions } from '@rocket.chat/models'; @@ -34,7 +36,6 @@ import { ServiceClassInternal } from '../../sdk/types/ServiceClass'; import { Apps } from '../../../app/apps/server'; import { sendMessage } from '../../../app/lib/server/functions/sendMessage'; import { settings } from '../../../app/settings/server'; -import { getURL } from '../../../app/utils/server'; import { videoConfProviders } from '../../lib/videoConfProviders'; import { videoConfTypes } from '../../lib/videoConfTypes'; import { updateCounter } from '../../../app/statistics/server/functions/updateStatsCounter'; @@ -131,6 +132,50 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf return this.joinCall(call, user || undefined, options); } + public async getInfo(callId: VideoConference['_id'], uid: IUser['_id'] | undefined): Promise { + const call = await VideoConferenceModel.findOneById(callId); + if (!call) { + throw new Error('invalid-call'); + } + + if (!videoConfProviders.isProviderAvailable(call.providerName)) { + throw new Error('video-conf-provider-unavailable'); + } + + let user: Pick, '_id' | 'username' | 'name' | 'avatarETag'> | null = null; + + if (uid) { + user = await Users.findOneById, '_id' | 'username' | 'name' | 'avatarETag'>>(uid, { + projection: { name: 1, username: 1, avatarETag: 1 }, + }); + if (!user) { + throw new Error('failed-to-load-own-data'); + } + } + + const blocks = await (await this.getProviderManager()).getVideoConferenceInfo(call.providerName, call, user || undefined).catch((e) => { + throw new Error(e); + }); + + if (blocks?.length) { + return blocks; + } + + return [ + { + blockId: 'id', + type: 'context', + elements: [ + { + type: 'plain_text', + text: `${TAPi18n.__('Video_Conference_Url')}: ${call.url}`, + emoji: false, + }, + ], + } as IBlock, + ]; + } + public async cancel(uid: IUser['_id'], callId: VideoConference['_id']): Promise { const call = await VideoConferenceModel.findOneById(callId); if (!call || !isDirectVideoConference(call)) { @@ -146,23 +191,19 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf throw new Error('failed-to-load-own-data'); } - if (call.messages.started) { - const name = - (settings.get('UI_Use_Real_Name') ? call.createdBy.name : call.createdBy.username) || call.createdBy.username || ''; - const text = TAPi18n.__('video_direct_missed', { username: name }); - await Messages.setBlocksById(call.messages.started, [this.buildMessageBlock(text)]); - } - await VideoConferenceModel.setDataById(callId, { ringing: false, status: VideoConferenceStatus.DECLINED, endedAt: new Date(), endedBy: { _id: user._id, - name: user.name, - username: user.username, + name: user.name as string, + username: user.username as string, }, }); + + await this.runVideoConferenceChangedEvent(callId); + this.notifyVideoConfUpdate(call.rid, call._id); } public async get(callId: VideoConference['_id']): Promise | null> { @@ -237,8 +278,8 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf throw new Error('Invalid User'); } - const user = await Users.findOneById>>(userId, { - projection: { username: 1, name: 1 }, + const user = await Users.findOneById>>(userId, { + projection: { username: 1, name: 1, avatarETag: 1 }, }); if (!user) { throw new Error('Invalid User'); @@ -248,6 +289,7 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf _id: user._id, username: user.username, name: user.name, + avatarETag: user.avatarETag, ts: ts || new Date(), }); } @@ -372,6 +414,10 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf return true; } + private notifyVideoConfUpdate(rid: IRoom['_id'], callId: VideoConference['_id']): void { + Notifications.notifyRoom(rid, callId); + } + private async endCall(callId: VideoConference['_id']): Promise { const call = await this.getUnfiltered(callId); if (!call) { @@ -379,13 +425,11 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf } await VideoConferenceModel.setDataById(call._id, { endedAt: new Date(), status: VideoConferenceStatus.ENDED }); - if (call.messages?.started) { - await this.removeJoinButton(call.messages.started); - } + await this.runVideoConferenceChangedEvent(call._id); + this.notifyVideoConfUpdate(call.rid, call._id); - switch (call.type) { - case 'direct': - return this.endDirectCall(call); + if (call.type === 'direct') { + return this.endDirectCall(call); } } @@ -396,16 +440,6 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf } await VideoConferenceModel.setDataById(call._id, { endedAt: new Date(), status: VideoConferenceStatus.EXPIRED }); - if (call.messages?.started) { - return this.removeJoinButton(call.messages.started); - } - } - - private async removeJoinButton(messageId: IMessage['_id']): Promise { - await Messages.removeVideoConfJoinButton(messageId); - - const text = TAPi18n.__('Conference_call_has_ended'); - await Messages.addBlocksById(messageId, [this.buildMessageBlock(text)]); } private async endDirectCall(call: IDirectVideoConference): Promise { @@ -443,66 +477,21 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf return videoConfTypes.getTypeForRoom(room, allowRinging); } - private async createMessage( - rid: IRoom['_id'], - providerName: string, - extraData: Partial = {}, - createdBy?: IUser, - ): Promise { + private async createMessage(call: VideoConference, createdBy?: IUser, customBlocks?: IMessage['blocks']): Promise { const record = { msg: '', groupable: false, - ...extraData, + blocks: customBlocks || [this.buildVideoConfBlock(call._id)], }; - const room = await Rooms.findOneById(rid); - const appId = videoConfProviders.getProviderAppId(providerName); + const room = await Rooms.findOneById(call.rid); + const appId = videoConfProviders.getProviderAppId(call.providerName); const user = createdBy || (appId && (await Users.findOneByAppId(appId))) || (await Users.findOneById('rocket.cat')); const message = sendMessage(user, record, room, false); return message._id; } - private async createDirectCallMessage(call: IDirectVideoConference, user: IUser): Promise { - const username = (settings.get('UI_Use_Real_Name') ? user.name : user.username) || user.username || ''; - const text = TAPi18n.__('video_direct_calling', { - username, - }); - - return this.createMessage( - call.rid, - call.providerName, - { - blocks: [this.buildMessageBlock(text), this.buildJoinButtonBlock(call._id)], - }, - user, - ); - } - - private async createGroupCallMessage(call: IGroupVideoConference, user: IUser, useAppUser = true): Promise { - const username = (settings.get('UI_Use_Real_Name') ? user.name : user.username) || user.username || ''; - const text = TAPi18n.__(useAppUser ? 'video_conference_started_by' : 'video_conference_started', { - conference: call.title || '', - username, - }); - - return this.createMessage( - call.rid, - call.providerName, - { - blocks: [ - this.buildMessageBlock(text), - this.buildJoinButtonBlock(call._id, call.title), - { - type: 'context', - elements: [], - }, - ], - } as Partial, - useAppUser ? undefined : user, - ); - } - private async validateProvider(providerName: string): Promise { const manager = await this.getProviderManager(); const configured = await manager.isFullyConfigured(providerName).catch(() => false); @@ -545,35 +534,37 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf username, }); - return this.createMessage( - call.rid, - call.providerName, + return this.createMessage(call, user, [ + this.buildMessageBlock(text), { - blocks: [ - this.buildMessageBlock(text), + type: 'actions', + appId: 'videoconf-core', + blockId: call._id, + elements: [ { - type: 'actions', appId: 'videoconf-core', blockId: call._id, - elements: [ - { - appId: 'videoconf-core', - blockId: call._id, - actionId: 'joinLivechat', - type: 'button', - text: { - type: 'plain_text', - text: TAPi18n.__('Join_call'), - emoji: true, - }, - url, - }, - ], + actionId: 'joinLivechat', + type: 'button', + text: { + type: 'plain_text', + text: TAPi18n.__('Join_call'), + emoji: true, + }, + url, }, ], }, - user, - ); + ]); + } + + private buildVideoConfBlock(callId: string): MessageSurfaceLayout[number] { + return { + type: 'video_conf', + blockId: callId, + callId, + appId: 'videoconf-core', + }; } private buildMessageBlock(text: string): MessageSurfaceLayout[number] { @@ -587,27 +578,6 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf }; } - private buildJoinButtonBlock(callId: string, title = ''): MessageSurfaceLayout[number] { - return { - type: 'actions', - appId: 'videoconf-core', - elements: [ - { - appId: 'videoconf-core', - blockId: callId, - actionId: 'join', - value: title, - type: 'button', - text: { - type: 'plain_text', - text: TAPi18n.__('Join_call'), - emoji: true, - }, - }, - ], - }; - } - private async startDirect( providerName: string, user: IUser, @@ -625,8 +595,8 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf rid, createdBy: { _id: user._id, - name: user.name, - username: user.username, + name: user.name as string, + username: user.username as string, }, providerName, }); @@ -635,10 +605,13 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf throw new Error('failed-to-create-direct-call'); } + await this.runNewVideoConferenceEvent(callId); + const url = await this.generateNewUrl(call); VideoConferenceModel.setUrlById(callId, url); - const messageId = await this.createDirectCallMessage(call, user); + const messageId = await this.createMessage(call, user); + call.messages.started = messageId; VideoConferenceModel.setMessageById(callId, 'started', messageId); // After 40 seconds if the status is still "calling", we cancel the call automatically. @@ -685,8 +658,8 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf title, createdBy: { _id: user._id, - name: user.name, - username: user.username, + name: user.name as string, + username: user.username as string, }, providerName, }); @@ -695,12 +668,15 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf throw new Error('failed-to-create-group-call'); } + await this.runNewVideoConferenceEvent(callId); + const url = await this.generateNewUrl(call); VideoConferenceModel.setUrlById(callId, url); call.url = url; - const messageId = await this.createGroupCallMessage(call, user, useAppUser); + const messageId = await this.createMessage(call, useAppUser ? undefined : user); + call.messages.started = messageId; VideoConferenceModel.setMessageById(callId, 'started', messageId); if (call.ringing) { @@ -719,8 +695,8 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf rid, createdBy: { _id: user._id, - name: user.name, - username: user.username, + name: user.name as string, + username: user.username as string, }, providerName, }); @@ -730,8 +706,11 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf throw new Error('failed-to-create-livechat-call'); } + await this.runNewVideoConferenceEvent(callId); + const joinUrl = await this.getUrl(call); const messageId = await this.createLivechatMessage(call, user, joinUrl); + call.messages.started = messageId; await VideoConferenceModel.setMessageById(callId, 'started', messageId); return { @@ -747,6 +726,8 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf ): Promise { await callbacks.runAsync('onJoinVideoConference', call._id, user?._id); + await this.runOnUserJoinEvent(call._id, user as IVideoConferenceUser); + return this.getUrl(call, user, options); } @@ -867,74 +848,73 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf }); } - private async addUserToCall( - call: Optional, - { _id, username, name, avatarETag, ts }: AtLeast & { ts?: Date }, - ): Promise { - if (call.users.find((user) => user._id === _id)) { - return; - } + private async runNewVideoConferenceEvent(callId: VideoConference['_id']): Promise { + const call = await VideoConferenceModel.findOneById(callId); - await VideoConferenceModel.addUserById(call._id, { _id, username, name, avatarETag, ts }); + if (!call) { + throw new Error('video-conf-data-not-found'); + } - switch (call.type) { - case 'videoconference': - return this.updateGroupCallMessage(call as IGroupVideoConference, { _id, username, name }); - case 'direct': - return this.updateDirectCall(call as IDirectVideoConference, _id); + if (!videoConfProviders.isProviderAvailable(call.providerName)) { + throw new Error('video-conf-provider-unavailable'); } + + (await this.getProviderManager()).onNewVideoConference(call.providerName, call).catch((e) => { + throw new Error(e); + }); } - private async addAnonymousUser(call: Optional): Promise { - await VideoConferenceModel.increaseAnonymousCount(call._id); + private async runVideoConferenceChangedEvent(callId: VideoConference['_id']): Promise { + const call = await VideoConferenceModel.findOneById(callId); - if (!call.messages.started) { - return; + if (!call) { + throw new Error('video-conf-data-not-found'); } - const imageUrl = getURL(`/avatar/@a`, { cdn: false, full: true }); - return this.addAvatarToCallMessage(call.messages.started, imageUrl, TAPi18n.__('Anonymous')); - } - - private async addAvatarToCallMessage(messageId: IMessage['_id'], imageUrl: string, altText: string): Promise { - const message = await Messages.findOneById>(messageId, { projection: { blocks: 1 } }); - if (!message) { - return; + if (!videoConfProviders.isProviderAvailable(call.providerName)) { + throw new Error('video-conf-provider-unavailable'); } - const blocks = message.blocks || []; + (await this.getProviderManager()).onVideoConferenceChanged(call.providerName, call).catch((e) => { + throw new Error(e); + }); + } - const avatarsBlock = (blocks.find((block) => block.type === 'context') || { type: 'context', elements: [] }) as ContextBlock; - if (!blocks.includes(avatarsBlock)) { - blocks.push(avatarsBlock); - } + private async runOnUserJoinEvent(callId: VideoConference['_id'], user?: IVideoConferenceUser): Promise { + const call = await VideoConferenceModel.findOneById(callId); - if (avatarsBlock.elements.find((el) => el.type === 'image' && el.imageUrl === imageUrl)) { - return; + if (!call) { + throw new Error('video-conf-data-not-found'); } - avatarsBlock.elements = [ - ...avatarsBlock.elements, - { - type: 'image', - imageUrl, - altText, - }, - ]; + if (!videoConfProviders.isProviderAvailable(call.providerName)) { + throw new Error('video-conf-provider-unavailable'); + } - await Messages.setBlocksById(message._id, blocks); + (await this.getProviderManager()).onUserJoin(call.providerName, call, user).catch((e) => { + throw new Error(e); + }); } - private async updateGroupCallMessage( - call: Optional, - user: Pick, + private async addUserToCall( + call: Optional, + { _id, username, name, avatarETag, ts }: AtLeast, '_id' | 'username' | 'name' | 'avatarETag'> & { ts?: Date }, ): Promise { - if (!call.messages.started || !user.username) { + if (call.users.find((user) => user._id === _id)) { return; } - const imageUrl = getURL(`/avatar/${user.username}`, { cdn: false, full: true }); - return this.addAvatarToCallMessage(call.messages.started, imageUrl, user.name || user.username); + await VideoConferenceModel.addUserById(call._id, { _id, username, name, avatarETag, ts }); + + if (call.type === 'direct') { + return this.updateDirectCall(call as IDirectVideoConference, _id); + } + + this.notifyVideoConfUpdate(call.rid, call._id); + } + + private async addAnonymousUser(call: Optional): Promise { + await VideoConferenceModel.increaseAnonymousCount(call._id); } private async updateDirectCall(call: IDirectVideoConference, newUserId: IUser['_id']): Promise { @@ -953,12 +933,8 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf } await VideoConferenceModel.setStatusById(call._id, VideoConferenceStatus.STARTED); + this.notifyVideoConfUpdate(call.rid, call._id); - if (call.messages.started) { - const username = - (settings.get('UI_Use_Real_Name') ? call.createdBy.name : call.createdBy.username) || call.createdBy.username || ''; - const text = TAPi18n.__('video_direct_started', { username }); - await Messages.setBlocksById(call.messages.started, [this.buildMessageBlock(text), this.buildJoinButtonBlock(call._id)]); - } + await this.runVideoConferenceChangedEvent(call._id); } } diff --git a/ee/apps/ddp-streamer/package.json b/ee/apps/ddp-streamer/package.json index 5aa01fa2826a4..303c79e558f01 100644 --- a/ee/apps/ddp-streamer/package.json +++ b/ee/apps/ddp-streamer/package.json @@ -47,7 +47,7 @@ "@types/sharp": "^0.30.4", "@types/uuid": "^8.3.4", "@types/ws": "^8.5.3", - "eslint": "^8.21.0", + "eslint": "^8.22.0", "pino-pretty": "^7.6.1", "ts-node": "^10.9.1", "typescript": "~4.5.5" diff --git a/packages/agenda/package.json b/packages/agenda/package.json index 5ca16adef570f..e2a0613c80482 100644 --- a/packages/agenda/package.json +++ b/packages/agenda/package.json @@ -14,7 +14,7 @@ "devDependencies": { "@types/debug": "^4", "@types/jest": "^27.4.1", - "eslint": "^8.20.0", + "eslint": "^8.22.0", "jest": "^27.5.1", "ts-jest": "^27.1.4", "typescript": "~4.5.5" diff --git a/packages/api-client/package.json b/packages/api-client/package.json index 98f63afd69abc..f9c9b1466a5d9 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -5,7 +5,7 @@ "devDependencies": { "@types/jest": "^27.4.1", "@types/strict-uri-encode": "^2.0.0", - "eslint": "^8.20.0", + "eslint": "^8.22.0", "jest": "^27.5.1", "ts-jest": "^27.1.5", "typescript": "~4.5.5" diff --git a/packages/cas-validate/package.json b/packages/cas-validate/package.json index c8f23b455c7ac..22cc27646cd73 100644 --- a/packages/cas-validate/package.json +++ b/packages/cas-validate/package.json @@ -5,7 +5,7 @@ "private": true, "devDependencies": { "@types/jest": "^27.4.1", - "eslint": "^8.20.0", + "eslint": "^8.22.0", "jest": "^27.5.1", "ts-jest": "^27.1.4", "typescript": "~4.5.5" diff --git a/packages/core-typings/package.json b/packages/core-typings/package.json index f50ef575f79da..da84a1ce3c552 100644 --- a/packages/core-typings/package.json +++ b/packages/core-typings/package.json @@ -4,7 +4,7 @@ "private": true, "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", - "eslint": "^8.20.0", + "eslint": "^8.22.0", "mongodb": "^4.3.1", "prettier": "^2.7.1", "typescript": "~4.5.5" diff --git a/packages/core-typings/src/IVideoConference.ts b/packages/core-typings/src/IVideoConference.ts index a4c0b57134716..5d36287aa9b4a 100644 --- a/packages/core-typings/src/IVideoConference.ts +++ b/packages/core-typings/src/IVideoConference.ts @@ -31,7 +31,7 @@ export type LivechatInstructions = { export type VideoConferenceType = DirectCallInstructions['type'] | ConferenceInstructions['type'] | LivechatInstructions['type']; -export interface IVideoConferenceUser extends Pick { +export interface IVideoConferenceUser extends Pick, '_id' | 'username' | 'name' | 'avatarETag'> { ts: Date; } @@ -46,10 +46,10 @@ export interface IVideoConference extends IRocketChatRecord { }; url?: string; - createdBy: Pick; + createdBy: Pick, '_id' | 'username' | 'name'>; createdAt: Date; - endedBy?: Pick; + endedBy?: Pick, '_id' | 'username' | 'name'>; endedAt?: Date; providerName: string; diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index cc850fdaa0b51..2e028655e6a1e 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -7,7 +7,7 @@ "@types/prettier": "^2.6.3", "@typescript-eslint/eslint-plugin": "^5.30.7", "@typescript-eslint/parser": "^5.30.7", - "eslint": "^8.20.0", + "eslint": "^8.22.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-anti-trojan-source": "^1.1.0", "eslint-plugin-import": "^2.26.0", diff --git a/packages/favicon/package.json b/packages/favicon/package.json index 7dba2d92dad34..a50c9aca6d8bf 100644 --- a/packages/favicon/package.json +++ b/packages/favicon/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": true, "devDependencies": { - "eslint": "^8.20.0", + "eslint": "^8.22.0", "typescript": "~4.5.5" }, "scripts": { diff --git a/packages/fuselage-ui-kit/package.json b/packages/fuselage-ui-kit/package.json index b4bd0afcc1f02..7f6d5eeb8a17f 100644 --- a/packages/fuselage-ui-kit/package.json +++ b/packages/fuselage-ui-kit/package.json @@ -38,23 +38,33 @@ "bump-next": "bump-next" }, "peerDependencies": { + "@rocket.chat/apps-engine": "*", + "@rocket.chat/eslint-config": "*", "@rocket.chat/fuselage": "*", "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/fuselage-polyfills": "*", "@rocket.chat/icons": "*", + "@rocket.chat/prettier-config": "*", "@rocket.chat/styled": "*", - "react": "^17.0.2", - "react-dom": "^17.0.2" + "@rocket.chat/ui-contexts": "*", + "@rocket.chat/ui-kit": "*", + "@rocket.chat/ui-video-conf": "*", + "@tanstack/react-query": "*", + "react": "*", + "react-dom": "*" }, "devDependencies": { "@rocket.chat/apps-engine": "~1.30.0", "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/fuselage": "next", - "@rocket.chat/fuselage-hooks": "0.31.21", - "@rocket.chat/fuselage-polyfills": "0.31.21", - "@rocket.chat/icons": "0.31.21", + "@rocket.chat/fuselage-hooks": "next", + "@rocket.chat/fuselage-polyfills": "next", + "@rocket.chat/icons": "next", "@rocket.chat/prettier-config": "next", - "@rocket.chat/styled": "0.31.21", + "@rocket.chat/styled": "next", + "@rocket.chat/ui-contexts": "workspace:^", + "@rocket.chat/ui-kit": "next", + "@rocket.chat/ui-video-conf": "workspace:^", "@storybook/addon-essentials": "~6.5.10", "@storybook/addons": "~6.5.10", "@storybook/builder-webpack5": "~6.5.10", @@ -62,23 +72,24 @@ "@storybook/react": "~6.5.10", "@storybook/source-loader": "~6.5.10", "@storybook/theming": "~6.5.10", - "@types/react": "~17.0.39", - "@types/react-dom": "^17.0.11", + "@tanstack/react-query": "^4.16.1", + "@types/react": "~17.0.48", + "@types/react-dom": "~17.0.17", "babel-loader": "~8.2.3", "cross-env": "^7.0.3", - "eslint": "~8.8.0", + "eslint": "~8.22.0", "lint-staged": "~12.3.3", "normalize.css": "^8.0.1", "npm-run-all": "^4.1.5", "prettier": "~2.5.1", - "react": "^17.0.2", "react-dom": "^17.0.2", "rimraf": "^3.0.2", + "tslib": "^2.3.1", "typescript": "~4.3.5", "webpack": "~5.68.0" }, "dependencies": { - "@rocket.chat/ui-kit": "0.31.21", + "@rocket.chat/ui-kit": "0.31.20", "tslib": "^2.3.1" } } diff --git a/packages/fuselage-ui-kit/src/blocks/VideoConferenceBlock/VideoConferenceBlock.tsx b/packages/fuselage-ui-kit/src/blocks/VideoConferenceBlock/VideoConferenceBlock.tsx new file mode 100644 index 0000000000000..57fb37fe8a3b8 --- /dev/null +++ b/packages/fuselage-ui-kit/src/blocks/VideoConferenceBlock/VideoConferenceBlock.tsx @@ -0,0 +1,191 @@ +import type * as UiKit from '@rocket.chat/ui-kit'; +import { useTranslation } from '@rocket.chat/ui-contexts'; +import { + VideoConfMessageSkeleton, + VideoConfMessage, + VideoConfMessageRow, + VideoConfMessageIcon, + VideoConfMessageText, + VideoConfMessageFooter, + VideoConfMessageUserStack, + VideoConfMessageFooterText, + VideoConfMessageButton, + VideoConfMessageContent, + VideoConfMessageActions, + VideoConfMessageAction, +} from '@rocket.chat/ui-video-conf'; +import type { MouseEventHandler, ReactElement } from 'react'; +import React, { useContext, memo } from 'react'; + +import { useSurfaceType } from '../../contexts/SurfaceContext'; +import type { BlockProps } from '../../utils/BlockProps'; +import { useVideoConfDataStream } from './hooks/useVideoConfDataStream'; +import { kitContext } from '../..'; + +type VideoConferenceBlockProps = BlockProps; + +const MAX_USERS = 6; + +const VideoConferenceBlock = ({ + block, +}: VideoConferenceBlockProps): ReactElement => { + const t = useTranslation(); + const { callId, appId = 'videoconf-core' } = block; + const surfaceType = useSurfaceType(); + + const { action, viewId, rid } = useContext(kitContext); + + if (surfaceType !== 'message') { + return <>; + } + + if (!callId || !rid) { + return <>; + } + + const result = useVideoConfDataStream({ rid, callId }); + + const joinHandler: MouseEventHandler = (e): void => { + action( + { + blockId: block.blockId || '', + appId, + actionId: 'join', + value: block.blockId || '', + viewId, + }, + e + ); + }; + + const callAgainHandler: MouseEventHandler = (e): void => { + action( + { + blockId: rid || '', + appId, + actionId: 'callBack', + value: rid || '', + viewId, + }, + e + ); + }; + + const openCallInfo: MouseEventHandler = (e) => { + action( + { + blockId: callId, + appId, + actionId: 'info', + value: rid, + viewId, + }, + e + ); + }; + + if (result.isSuccess) { + const { data } = result; + + if ('endedAt' in data) { + return ( + + + + + {t('Call_ended')} + + + + + + + {data.type === 'direct' && ( + <> + + {t('Call_back')} + + + {t('Call_was_not_answered')} + + + )} + {data.type !== 'direct' && + (data.users.length ? ( + <> + + + {data.users.length > MAX_USERS + ? t('__usersCount__member_joined', { + usersCount: data.users.length - MAX_USERS, + }) + : t('joined')} + + + ) : ( + + {t('Call_was_not_answered')} + + ))} + + + ); + } + + if (data.type === 'direct' && data.status === 0) { + return ( + + + + + {t('Calling')} + + + + + + + + {t('Waiting_for_answer')} + + + + ); + } + + return ( + + + + + {t('Call_ongoing')} + + + + + + + + {t('Join')} + + {data.users.length && ( + <> + + + {data.users.length > MAX_USERS + ? t('__usersCount__member_joined', { + usersCount: data.users.length - MAX_USERS, + }) + : t('joined')} + + + )} + + + ); + } + + return ; +}; + +export default memo(VideoConferenceBlock); diff --git a/packages/fuselage-ui-kit/src/blocks/VideoConferenceBlock/hooks/useVideoConfData.ts b/packages/fuselage-ui-kit/src/blocks/VideoConferenceBlock/hooks/useVideoConfData.ts new file mode 100644 index 0000000000000..23b67327bba20 --- /dev/null +++ b/packages/fuselage-ui-kit/src/blocks/VideoConferenceBlock/hooks/useVideoConfData.ts @@ -0,0 +1,22 @@ +import { useQuery } from '@tanstack/react-query'; +import { useEndpoint } from '@rocket.chat/ui-contexts'; + +export const useVideoConfData = ({ callId }: { callId: string }) => { + const getVideoConfInfo = useEndpoint('GET', '/v1/video-conference.info'); + + return useQuery( + ['video-conference', callId], + () => getVideoConfInfo({ callId }), + { + staleTime: Infinity, + refetchOnWindowFocus: false, + refetchOnMount: (query) => { + if (query.state.data?.endedAt) { + return false; + } + + return 'always'; + }, + } + ); +}; diff --git a/packages/fuselage-ui-kit/src/blocks/VideoConferenceBlock/hooks/useVideoConfDataStream.ts b/packages/fuselage-ui-kit/src/blocks/VideoConferenceBlock/hooks/useVideoConfDataStream.ts new file mode 100644 index 0000000000000..dad9d5795eb38 --- /dev/null +++ b/packages/fuselage-ui-kit/src/blocks/VideoConferenceBlock/hooks/useVideoConfDataStream.ts @@ -0,0 +1,75 @@ +import { useStream } from '@rocket.chat/ui-contexts'; +import { Emitter } from '@rocket.chat/emitter'; +import { useCallback, useEffect } from 'react'; +import { useQueryClient } from '@tanstack/react-query'; + +import { useVideoConfData } from './useVideoConfData'; + +const ee = new Emitter>(); + +const events = new Map void>(); + +const useStreamBySubPath = ( + streamer: ReturnType, + subpath: string, + callback: () => void +) => { + const maybeSubscribe = useCallback(() => { + // If we're already subscribed, don't do it again + if (events.has(subpath)) { + return; + } + + events.set( + subpath, + streamer(subpath, () => { + ee.emit(subpath); + }) + ); + }, [streamer, subpath]); + + const maybeUnsubscribe = useCallback(() => { + // If someone is still listening, don't unsubscribe + if (ee.has(subpath)) { + return; + } + + const unsubscribe = events.get(subpath); + if (unsubscribe) { + unsubscribe(); + events.delete(subpath); + } + }, [subpath]); + + useEffect(() => { + maybeSubscribe(); + ee.on(subpath, callback); + + return () => { + ee.off(subpath, callback); + maybeUnsubscribe(); + }; + }, [callback, subpath]); +}; + +export const useVideoConfDataStream = ({ + rid, + callId, +}: { + rid: string; + callId: string; +}) => { + const queryClient = useQueryClient(); + const subpath = `${rid}/${callId}`; + + const subscribeNotifyRoom = useStream('notify-room'); + + useStreamBySubPath( + subscribeNotifyRoom, + subpath, + useCallback(() => { + queryClient.invalidateQueries(['video-conference', callId]); + }, [subpath]) + ); + return useVideoConfData({ callId }); +}; diff --git a/packages/fuselage-ui-kit/src/blocks/VideoConferenceBlock/index.tsx b/packages/fuselage-ui-kit/src/blocks/VideoConferenceBlock/index.tsx new file mode 100644 index 0000000000000..bbd942c7d3feb --- /dev/null +++ b/packages/fuselage-ui-kit/src/blocks/VideoConferenceBlock/index.tsx @@ -0,0 +1,3 @@ +import VideoConferenceBlock from './VideoConferenceBlock'; + +export default VideoConferenceBlock; diff --git a/packages/fuselage-ui-kit/src/contexts/kitContext.ts b/packages/fuselage-ui-kit/src/contexts/kitContext.ts index b0cb4141b1618..6eebb8cea7a68 100644 --- a/packages/fuselage-ui-kit/src/contexts/kitContext.ts +++ b/packages/fuselage-ui-kit/src/contexts/kitContext.ts @@ -23,6 +23,7 @@ type UiKitContext = { errors?: Record; values: Record; viewId?: string; + rid?: string; }; export const defaultContext = { diff --git a/packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx b/packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx index f548f63ac6755..fe2e61ee590fd 100644 --- a/packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx +++ b/packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx @@ -18,17 +18,23 @@ import OverflowElement from '../elements/OverflowElement'; import PlainTextInputElement from '../elements/PlainTextInputElement'; import StaticSelectElement from '../elements/StaticSelectElement'; +type FuselageSurfaceRendererProps = ConstructorParameters< + typeof UiKit.SurfaceRenderer +>[0]; + export class FuselageSurfaceRenderer extends UiKit.SurfaceRenderer { - public constructor() { - super([ - 'actions', - 'context', - 'divider', - 'image', - 'input', - 'section', - 'preview', - ]); + public constructor(allowedBlocks?: FuselageSurfaceRendererProps) { + super( + allowedBlocks || [ + 'actions', + 'context', + 'divider', + 'image', + 'input', + 'section', + 'preview', + ] + ); } public plain_text( diff --git a/packages/fuselage-ui-kit/src/surfaces/MessageSurfaceRenderer.tsx b/packages/fuselage-ui-kit/src/surfaces/MessageSurfaceRenderer.tsx new file mode 100644 index 0000000000000..6d83d774a9ed3 --- /dev/null +++ b/packages/fuselage-ui-kit/src/surfaces/MessageSurfaceRenderer.tsx @@ -0,0 +1,41 @@ +import * as UiKit from '@rocket.chat/ui-kit'; +import type { ReactElement } from 'react'; +import React from 'react'; + +import VideoConferenceBlock from '../blocks/VideoConferenceBlock/VideoConferenceBlock'; +import { FuselageSurfaceRenderer } from './FuselageSurfaceRenderer'; + +export class FuselageMessageSurfaceRenderer extends FuselageSurfaceRenderer { + public constructor() { + super([ + 'actions', + 'context', + 'divider', + 'image', + 'input', + 'section', + 'preview', + 'video_conf', + ]); + } + + video_conf( + block: UiKit.VideoConferenceBlock, + context: UiKit.BlockContext, + index: number + ): ReactElement | null { + if (context === UiKit.BlockContext.BLOCK) { + return ( + + ); + } + + return null; + } +} diff --git a/packages/fuselage-ui-kit/src/surfaces/index.ts b/packages/fuselage-ui-kit/src/surfaces/index.ts index dd29183435907..49eff1a923a5c 100644 --- a/packages/fuselage-ui-kit/src/surfaces/index.ts +++ b/packages/fuselage-ui-kit/src/surfaces/index.ts @@ -3,10 +3,11 @@ import { FuselageSurfaceRenderer } from './FuselageSurfaceRenderer'; import MessageSurface from './MessageSurface'; import ModalSurface from './ModalSurface'; import { createSurfaceRenderer } from './createSurfaceRenderer'; +import { FuselageMessageSurfaceRenderer } from './MessageSurfaceRenderer'; // export const attachmentParser = new FuselageSurfaceRenderer(); export const bannerParser = new FuselageSurfaceRenderer(); -export const messageParser = new FuselageSurfaceRenderer(); +export const messageParser = new FuselageMessageSurfaceRenderer(); export const modalParser = new FuselageSurfaceRenderer(); // export const UiKitAttachment = createSurfaceRenderer(AttachmentSurface, attachmentParser); diff --git a/packages/gazzodown/package.json b/packages/gazzodown/package.json index c64b45de97b29..9f094c8c7d605 100644 --- a/packages/gazzodown/package.json +++ b/packages/gazzodown/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": true, "devDependencies": { - "@babel/core": "^7.18.9", + "@babel/core": "~7.18.13", "@mdx-js/react": "^1.6.22", "@rocket.chat/core-typings": "workspace:^", "@rocket.chat/css-in-js": "0.31.21", @@ -27,13 +27,13 @@ "@types/babel__core": "^7", "@types/jest": "^27.4.1", "@types/katex": "~0", - "@types/react": "^17.0.47", - "@types/react-dom": "^18", + "@types/react": "~17.0.48", + "@types/react-dom": "~17.0.17", "@types/testing-library__jest-dom": "^5", "@typescript-eslint/eslint-plugin": "^5.30.7", "@typescript-eslint/parser": "^5.30.7", "babel-loader": "^8.2.5", - "eslint": "^8.20.0", + "eslint": "^8.22.0", "eslint-plugin-anti-trojan-source": "^1.1.0", "eslint-plugin-react": "^7.30.1", "eslint-plugin-react-hooks": "^4.6.0", @@ -61,16 +61,16 @@ "/dist" ], "peerDependencies": { - "@rocket.chat/core-typings": "workspace:^", + "@rocket.chat/core-typings": "*", "@rocket.chat/css-in-js": "*", "@rocket.chat/fuselage": "*", "@rocket.chat/fuselage-tokens": "*", "@rocket.chat/message-parser": "*", "@rocket.chat/styled": "*", - "@rocket.chat/ui-client": "workspace:^", - "@rocket.chat/ui-contexts": "workspace:^", + "@rocket.chat/ui-client": "*", + "@rocket.chat/ui-contexts": "*", "katex": "*", - "react": "~17.0.2" + "react": "*" }, "dependencies": { "highlight.js": "^11.5.1", diff --git a/packages/livechat/package.json b/packages/livechat/package.json index 8d63e6c51fd7a..4c9397b0b189b 100644 --- a/packages/livechat/package.json +++ b/packages/livechat/package.json @@ -25,7 +25,7 @@ }, "devDependencies": { "@babel/eslint-parser": "^7.18.9", - "@babel/preset-env": "^7.18.9", + "@babel/preset-env": "^7.18.10", "@rocket.chat/eslint-config": "^0.4.0", "@rocket.chat/fuselage-tokens": "0.31.21", "@rocket.chat/logo": "0.31.21", @@ -37,7 +37,6 @@ "@storybook/addon-viewport": "~6.5.10", "@storybook/react": "~6.5.10", "@storybook/theming": "~6.5.10", - "@types/react-dom": "^17.0.17", "autoprefixer": "^9.8.8", "babel-loader": "^8.1.0", "babel-plugin-jsx-pragmatic": "^1.0.2", @@ -45,7 +44,7 @@ "css-loader": "^4.3.0", "cssnano": "^4.1.11", "desvg-loader": "^0.1.0", - "eslint": "^8.20.0", + "eslint": "^8.22.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-react": "^7.30.1", "eslint-plugin-react-hooks": "^4.6.0", diff --git a/packages/livechat/src/components/Messages/MessageList/index.js b/packages/livechat/src/components/Messages/MessageList/index.js index 7ac2dbf60ab85..f7ab458c017fe 100644 --- a/packages/livechat/src/components/Messages/MessageList/index.js +++ b/packages/livechat/src/components/Messages/MessageList/index.js @@ -101,7 +101,9 @@ export class MessageList extends MemoizedComponent { isVideoConfMessage(message) { return Boolean( - message.blocks?.find(({ appId }) => appId === 'videoconf-core')?.elements?.find(({ actionId }) => actionId === 'joinLivechat'), + message.blocks + ?.find(({ appId, type }) => appId === 'videoconf-core' && type === 'actions') + ?.elements?.find(({ actionId }) => actionId === 'joinLivechat'), ); } @@ -137,7 +139,7 @@ export class MessageList extends MemoizedComponent { } const videoConfJoinBlock = message.blocks - ?.find(({ appId }) => appId === 'videoconf-core') + ?.find(({ appId, type }) => appId === 'videoconf-core' && type === 'actions') ?.elements?.find(({ actionId }) => actionId === 'joinLivechat'); if (videoConfJoinBlock) { // If the call is not accepted yet, don't render the message. diff --git a/packages/livechat/src/lib/room.js b/packages/livechat/src/lib/room.js index 858df335671f2..3cfd8918234aa 100644 --- a/packages/livechat/src/lib/room.js +++ b/packages/livechat/src/lib/room.js @@ -35,7 +35,9 @@ export const closeChat = async ({ transcriptRequested } = {}) => { }; const getVideoConfMessageData = (message) => - message.blocks?.find(({ appId }) => appId === 'videoconf-core')?.elements?.find(({ actionId }) => actionId === 'joinLivechat'); + message.blocks + ?.find(({ appId, type }) => appId === 'videoconf-core' && type === 'actions') + ?.elements?.find(({ actionId }) => actionId === 'joinLivechat'); const isVideoCallMessage = (message) => { if (message.t === constants.webRTCCallStartedMessageType) { diff --git a/packages/model-typings/package.json b/packages/model-typings/package.json index 55516d3bb65cf..024d295148f97 100644 --- a/packages/model-typings/package.json +++ b/packages/model-typings/package.json @@ -5,7 +5,7 @@ "devDependencies": { "@types/jest": "^27.4.1", "@types/node-rsa": "^1.1.1", - "eslint": "^8.20.0", + "eslint": "^8.22.0", "jest": "^27.5.1", "mongodb": "^4.3.1", "ts-jest": "^27.1.5", diff --git a/packages/model-typings/src/models/IMessagesModel.ts b/packages/model-typings/src/models/IMessagesModel.ts index c9d925165b6a3..fed76010e137e 100644 --- a/packages/model-typings/src/models/IMessagesModel.ts +++ b/packages/model-typings/src/models/IMessagesModel.ts @@ -48,8 +48,6 @@ export interface IMessagesModel extends IBaseModel { addBlocksById(_id: string, blocks: Required['blocks']): Promise; - removeVideoConfJoinButton(_id: IMessage['_id']): Promise; - countRoomsWithMessageType(type: IMessage['t'], options: AggregateOptions): Promise; countByType(type: IMessage['t'], options: CountDocumentsOptions): Promise; diff --git a/packages/model-typings/src/models/IVideoConferenceModel.ts b/packages/model-typings/src/models/IVideoConferenceModel.ts index d1cfbcd919bed..e0a1090eb5ca3 100644 --- a/packages/model-typings/src/models/IVideoConferenceModel.ts +++ b/packages/model-typings/src/models/IVideoConferenceModel.ts @@ -54,7 +54,7 @@ export interface IVideoConferenceModel extends IBaseModel { setProviderDataById(callId: string, providerData: Record | undefined): Promise; - addUserById(callId: string, user: Pick & { ts?: Date }): Promise; + addUserById(callId: string, user: Required> & { ts?: Date }): Promise; setMessageById(callId: string, messageType: keyof VideoConference['messages'], messageId: string): Promise; diff --git a/packages/models/package.json b/packages/models/package.json index 77846eb64251f..6c6773d02ce01 100644 --- a/packages/models/package.json +++ b/packages/models/package.json @@ -4,7 +4,7 @@ "private": true, "devDependencies": { "@types/jest": "^27.4.1", - "eslint": "^8.20.0", + "eslint": "^8.22.0", "jest": "^27.5.1", "ts-jest": "^27.1.5", "typescript": "~4.5.5" diff --git a/packages/node-poplib/package.json b/packages/node-poplib/package.json index eac15f26ef199..792fc9f6f30d1 100644 --- a/packages/node-poplib/package.json +++ b/packages/node-poplib/package.json @@ -4,7 +4,7 @@ "private": true, "devDependencies": { "@types/jest": "^27.4.1", - "eslint": "^8.20.0", + "eslint": "^8.22.0", "jest": "^27.5.1", "ts-jest": "^27.1.4", "typescript": "~4.5.5" diff --git a/packages/rest-typings/package.json b/packages/rest-typings/package.json index f1484f8243203..4a5b6b4a8e8c2 100644 --- a/packages/rest-typings/package.json +++ b/packages/rest-typings/package.json @@ -5,7 +5,7 @@ "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", "@types/jest": "^27.4.1", - "eslint": "^8.20.0", + "eslint": "^8.22.0", "jest": "^27.5.1", "mongodb": "^4.3.1", "ts-jest": "^27.1.5", diff --git a/packages/ui-client/package.json b/packages/ui-client/package.json index ab4bfc9a98b08..39aaa9d9cb665 100644 --- a/packages/ui-client/package.json +++ b/packages/ui-client/package.json @@ -3,10 +3,11 @@ "version": "0.0.1", "private": true, "devDependencies": { - "@rocket.chat/css-in-js": "0.31.21", + "@babel/core": "~7.18.13", + "@rocket.chat/css-in-js": "next", "@rocket.chat/fuselage": "next", - "@rocket.chat/fuselage-hooks": "0.31.21", - "@rocket.chat/icons": "0.31.21", + "@rocket.chat/fuselage-hooks": "next", + "@rocket.chat/icons": "next", "@rocket.chat/ui-contexts": "workspace:~", "@storybook/addon-actions": "~6.5.10", "@storybook/addon-docs": "~6.5.10", @@ -18,10 +19,12 @@ "@storybook/manager-webpack4": "~6.5.10", "@storybook/react": "~6.5.10", "@storybook/testing-library": "~0.0.13", + "@types/babel__core": "^7", "@types/jest": "^27.4.1", "@types/postcss-url": "^10", - "@types/react": "~17.0.47", - "eslint": "^8.20.0", + "@types/react": "~17.0.48", + "@types/react-dom": "~17.0.17", + "eslint": "^8.22.0", "eslint-plugin-anti-trojan-source": "^1.1.0", "eslint-plugin-react": "^7.30.1", "eslint-plugin-react-hooks": "^4.6.0", @@ -56,6 +59,7 @@ "@rocket.chat/fuselage": "*", "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", + "@rocket.chat/ui-contexts": "*", "react": "~17.0.2" } } diff --git a/packages/ui-contexts/package.json b/packages/ui-contexts/package.json index 7836fc75cca38..bfec0ce967c84 100644 --- a/packages/ui-contexts/package.json +++ b/packages/ui-contexts/package.json @@ -8,9 +8,10 @@ "@rocket.chat/fuselage-hooks": "0.31.21", "@rocket.chat/rest-typings": "workspace:^", "@types/jest": "^27.4.1", - "@types/react": "^17.0.47", + "@types/react": "~17.0.48", + "@types/react-dom": "~17.0.17", "@types/use-sync-external-store": "^0.0.3", - "eslint": "^8.20.0", + "eslint": "^8.22.0", "jest": "^27.5.1", "mongodb": "^4.3.1", "react": "~17.0.2", diff --git a/packages/ui-video-conf/.eslintrc.json b/packages/ui-video-conf/.eslintrc.json index 1859ff825f630..07037ccf0bc8e 100644 --- a/packages/ui-video-conf/.eslintrc.json +++ b/packages/ui-video-conf/.eslintrc.json @@ -5,7 +5,8 @@ "@rocket.chat/eslint-config/original", "prettier", "plugin:anti-trojan-source/recommended", - "plugin:react/jsx-runtime" + "plugin:react/jsx-runtime", + "plugin:storybook/recommended" ], "parser": "@typescript-eslint/parser", "plugins": ["@typescript-eslint", "react", "react-hooks", "prettier"], @@ -63,5 +64,13 @@ "version": "detect" } }, - "ignorePatterns": ["**/dist"] + "ignorePatterns": ["**/dist"], + "overrides": [ + { + "files": ["*.stories.tsx"], + "rules": { + "react/no-multi-comp": "off" + } + } + ] } diff --git a/packages/ui-video-conf/.storybook/main.js b/packages/ui-video-conf/.storybook/main.js new file mode 100644 index 0000000000000..4b6ae93751aaa --- /dev/null +++ b/packages/ui-video-conf/.storybook/main.js @@ -0,0 +1,12 @@ +module.exports = { + "stories": [ + "../src/**/*.stories.mdx", + "../src/**/*.stories.@(js|jsx|ts|tsx)" + ], + "addons": [ + "@storybook/addon-links", + "@storybook/addon-essentials", + "@storybook/addon-interactions" + ], + "framework": "@storybook/react" +} diff --git a/packages/ui-video-conf/.storybook/preview.js b/packages/ui-video-conf/.storybook/preview.js new file mode 100644 index 0000000000000..abd704f795106 --- /dev/null +++ b/packages/ui-video-conf/.storybook/preview.js @@ -0,0 +1,25 @@ +import '../../../apps/meteor/app/theme/client/main.css'; +import 'highlight.js/styles/github.css'; + +export const parameters = { + actions: { argTypesRegex: "^on[A-Z].*" }, + controls: { + matchers: { + color: /(background|color)$/i, + date: /Date$/, + }, + }, +} + +export const decorators = [ + (Story) => ( +
+ + +
+ ) +]; diff --git a/packages/ui-video-conf/package.json b/packages/ui-video-conf/package.json index f9671464e13c1..b09a72beb1363 100644 --- a/packages/ui-video-conf/package.json +++ b/packages/ui-video-conf/package.json @@ -3,15 +3,27 @@ "version": "0.0.1", "private": true, "devDependencies": { - "@rocket.chat/css-in-js": "0.31.21", + "@babel/core": "~7.18.13", + "@rocket.chat/css-in-js": "next", "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/fuselage": "next", - "@rocket.chat/fuselage-hooks": "0.31.21", - "@rocket.chat/styled": "0.31.21", + "@rocket.chat/fuselage-hooks": "next", + "@rocket.chat/icons": "next", + "@rocket.chat/styled": "next", + "@rocket.chat/ui-contexts": "workspace:^", + "@storybook/addon-actions": "~6.5.10", + "@storybook/addon-docs": "~6.5.10", + "@storybook/addon-essentials": "~6.5.10", + "@storybook/builder-webpack4": "~6.5.10", + "@storybook/manager-webpack4": "~6.5.10", + "@storybook/react": "~6.5.10", + "@storybook/testing-library": "~0.0.13", + "@types/babel__core": "^7", "@types/jest": "^27.4.1", - "eslint": "^8.20.0", + "eslint": "^8.22.0", "eslint-plugin-react": "^7.30.1", "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-storybook": "^0.6.4", "jest": "^27.5.1", "ts-jest": "^27.1.4", "typescript": "~4.5.5" @@ -20,7 +32,9 @@ "@rocket.chat/css-in-js": "*", "@rocket.chat/fuselage": "*", "@rocket.chat/fuselage-hooks": "*", + "@rocket.chat/icons": "*", "@rocket.chat/styled": "*", + "@rocket.chat/ui-contexts": "*", "react": "^17.0.2", "react-dom": "^17.0.2" }, @@ -29,11 +43,15 @@ "eslint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", "jest": "jest", "build": "tsc -p tsconfig.json", + "storybook": "start-storybook -p 6006", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput" }, "main": "./dist/index.js", "typings": "./dist/index.d.ts", "files": [ "/dist" - ] + ], + "dependencies": { + "@rocket.chat/emitter": "next" + } } diff --git a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessage.stories.tsx b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessage.stories.tsx new file mode 100644 index 0000000000000..cdf6232d8363c --- /dev/null +++ b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessage.stories.tsx @@ -0,0 +1,122 @@ +import { MessageDivider, Message, Avatar, Box } from '@rocket.chat/fuselage'; +import type { ComponentMeta, ComponentStory } from '@storybook/react'; +import type { ReactElement } from 'react'; + +import '@rocket.chat/icons/dist/rocketchat.css'; +import { VideoConfMessage, VideoConfMessageIcon, VideoConfMessageRow, VideoConfMessageText } from '.'; +import VideoConfMessageAction from './VideoConfMessageAction'; +import VideoConfMessageActions from './VideoConfMessageActions'; +import VideoConfMessageButton from './VideoConfMessageButton'; +import VideoConfMessageContent from './VideoConfMessageContent'; +import VideoConfMessageFooter from './VideoConfMessageFooter'; +import VideoConfMessageFooterText from './VideoConfMessageFooterText'; +import VideoConfMessageSkeleton from './VideoConfMessageSkeleton'; +import VideoConfMessageUserStack from './VideoConfMessageUserStack'; + +export default { + title: 'Components/VideoConfMessage', + component: VideoConfMessage, + decorators: [ + (Story): ReactElement => ( + + May, 24, 2020 + + + + + + + Haylie George + @haylie.george + Admin + User + Owner + 12:00 PM + + + + + + + + ), + ], +} as ComponentMeta; + +const avatarUrl = + 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAoACgDASIAAhEBAxEB/8QAGwAAAgIDAQAAAAAAAAAAAAAAAAcEBgIDBQj/xAAuEAACAQQAAwcEAQUAAAAAAAABAgMABAUREiExBhMUIkFRYQcWcYGhFTJSgpH/xAAYAQADAQEAAAAAAAAAAAAAAAACAwQBAP/EAB4RAAIBBQEBAQAAAAAAAAAAAAABAgMREiExE0HR/9oADAMBAAIRAxEAPwBuXuIkhBuMe5ib/AHQP49q4L3mLitryTLTSpOiHQI5k/HzXa/qbFOEudVTu1dumWvcTaNCZYZ7vU6g6LxqjOU/24dfs1Ouh9FnkMpd3Reeyx83hAxZZEhkdV9/MBrX71WGPvJcqrJBGveKATtuXXqNU0pu02bTHXD/AGvJAluyxxRd6F4x00o+NdKoVrjbzJdvVe1t5cVLc2ck8qjnohgpPtz2v7G6JtPQ2VJwjlcw+37mchpnK6GtIuv5NFWeTsLNPvxWTvpfjvOEfwKKzEVkSct2vscS/BIzSN0YRkeX81UpPqO8masJETu7OOccY4dswYFQeftv096XV5knuJGdm2T1+agvMXj8jEaHX905QihabvcbuS7X566mLWLwSY8PuRnk/u4eZ0deTl71Ef6hY+0yM88TzeNZY4luYwpVYyduOfrvhPTnr0pXSX9y5mCsyJMdyxxvwq599em+taItqCSNc90ChvZRUruUcT0JiO18Elpk7t8v41LWzacxkBSuvjQ/FFJayjDWrCTepAQ2vUH0oo/Jk3ovpwJJeVCP5CN+lFFaaMqy+nAyuChvrTI2kN9JAsi2ZOy4IBHMnkSCP+iqBexSWdxLazoUljJVlPUH2oorkV10pRc7b1zXb/hZOzuJvM86QWEXeELxOzHSIPcmiiiunVlF2RNTpRkrs//Z'; + +export const CallingDM: ComponentStory = () => ( + + + + + Calling... + + + + + + + Join + Waiting for answer + + +); + +export const CallEndedDM: ComponentStory = () => ( + + + + + Call ended + + + + + + + Call Back + Call was not answered + + +); + +export const CallOngoing: ComponentStory = () => ( + + + + + Call ongoing + + + + + + + Join + + Joined + + +); + +export const CallEnded: ComponentStory = () => ( + + + + + Call ended + + + + + + + + Joined + + +); + +export const Loading: ComponentStory = () => ; diff --git a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessage.tsx b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessage.tsx new file mode 100644 index 0000000000000..95300936aae0f --- /dev/null +++ b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessage.tsx @@ -0,0 +1,16 @@ +import { Box, Palette } from '@rocket.chat/fuselage'; +import type { ReactElement } from 'react'; + +const VideoConfMessage = ({ ...props }): ReactElement => ( + +); + +export default VideoConfMessage; diff --git a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageAction.tsx b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageAction.tsx new file mode 100644 index 0000000000000..9b705001c03fa --- /dev/null +++ b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageAction.tsx @@ -0,0 +1,7 @@ +import { IconButton } from '@rocket.chat/fuselage'; +import type { ComponentProps, ReactElement } from 'react'; + +const VideoConfMessageAction = ({ icon = 'info', ...props }: ComponentProps): ReactElement => ( + +); +export default VideoConfMessageAction; diff --git a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageActions.tsx b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageActions.tsx new file mode 100644 index 0000000000000..cc6112dfbd35f --- /dev/null +++ b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageActions.tsx @@ -0,0 +1,10 @@ +import { ButtonGroup } from '@rocket.chat/fuselage'; +import type { ComponentProps, ReactElement } from 'react'; + +const VideoConfMessageActions = ({ children, ...props }: ComponentProps): ReactElement => ( + + {children} + +); + +export default VideoConfMessageActions; diff --git a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageButton.tsx b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageButton.tsx new file mode 100644 index 0000000000000..f67a87a00b3f6 --- /dev/null +++ b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageButton.tsx @@ -0,0 +1,15 @@ +import { Box, Button } from '@rocket.chat/fuselage'; +import type { AllHTMLAttributes, ReactElement, ReactNode } from 'react'; + +const VideoConfMessageButton = ({ + children, + primary, + ...props +}: { children: ReactNode; primary?: boolean } & Omit, 'is'>): ReactElement => ( + + + +); +export default VideoConfMessageButton; diff --git a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageContent.tsx b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageContent.tsx new file mode 100644 index 0000000000000..65bc643b6ae91 --- /dev/null +++ b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageContent.tsx @@ -0,0 +1,6 @@ +import { Box } from '@rocket.chat/fuselage'; +import type { ReactElement } from 'react'; + +const VideoConfMessageContent = ({ ...props }): ReactElement => ; + +export default VideoConfMessageContent; diff --git a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageFooter.tsx b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageFooter.tsx new file mode 100644 index 0000000000000..1adfc10820b01 --- /dev/null +++ b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageFooter.tsx @@ -0,0 +1,14 @@ +import { Box } from '@rocket.chat/fuselage'; +import type { ReactElement, ReactNode } from 'react'; + +import VideoConfMessageRow from './VideoConfMessageRow'; + +const VideoConfMessageFooter = ({ children, ...props }: { children: ReactNode }): ReactElement => ( + + + {children} + + +); + +export default VideoConfMessageFooter; diff --git a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageFooterText.tsx b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageFooterText.tsx new file mode 100644 index 0000000000000..975df374ff01d --- /dev/null +++ b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageFooterText.tsx @@ -0,0 +1,9 @@ +import { Box } from '@rocket.chat/fuselage'; +import type { ReactElement, ReactNode } from 'react'; + +const VideoConfMessageFooterText = ({ children }: { children: ReactNode }): ReactElement => ( + + {children} + +); +export default VideoConfMessageFooterText; diff --git a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageIcon.tsx b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageIcon.tsx new file mode 100644 index 0000000000000..ab14f69f3610d --- /dev/null +++ b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageIcon.tsx @@ -0,0 +1,39 @@ +import { Box, Icon, Palette } from '@rocket.chat/fuselage'; +import type { ReactElement } from 'react'; + +type VideoConfMessageIconProps = { + variant?: keyof typeof styles; +}; + +const styles = { + ended: { + icon: 'phone-off', + color: Palette.text['font-hint'].toString(), + backgroundColor: Palette.surface['surface-neutral'].toString(), + }, + incoming: { + icon: 'phone-in', + color: Palette.statusColor['status-font-on-info'].toString(), + backgroundColor: Palette.status['status-background-info'].toString(), + }, + outgoing: { + icon: 'phone', + color: Palette.statusColor['status-font-on-success'].toString(), + backgroundColor: Palette.status['status-background-success'].toString(), + }, +} as const; + +const VideoConfMessageIcon = ({ variant = 'ended' }: VideoConfMessageIconProps): ReactElement => ( + + + +); + +export default VideoConfMessageIcon; diff --git a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageRow.tsx b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageRow.tsx new file mode 100644 index 0000000000000..f13320dd9fdf3 --- /dev/null +++ b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageRow.tsx @@ -0,0 +1,6 @@ +import { Box } from '@rocket.chat/fuselage'; +import type { ReactElement } from 'react'; + +const VideoConfMessageRow = ({ ...props }): ReactElement => ; + +export default VideoConfMessageRow; diff --git a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageSkeleton.tsx b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageSkeleton.tsx new file mode 100644 index 0000000000000..1b90ca49cc65b --- /dev/null +++ b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageSkeleton.tsx @@ -0,0 +1,18 @@ +import { Skeleton } from '@rocket.chat/fuselage'; +import type { ReactElement } from 'react'; + +import VideoConfMessage from './VideoConfMessage'; +import VideoConfMessageRow from './VideoConfMessageRow'; + +const VideoConfMessageSkeleton = (): ReactElement => ( + + + + + + + + +); + +export default VideoConfMessageSkeleton; diff --git a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageText.tsx b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageText.tsx new file mode 100644 index 0000000000000..d0cfc3eafced9 --- /dev/null +++ b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageText.tsx @@ -0,0 +1,6 @@ +import { Box } from '@rocket.chat/fuselage'; +import type { ReactElement, ComponentProps } from 'react'; + +const VideoConfMessageText = ({ ...props }: ComponentProps): ReactElement => ; + +export default VideoConfMessageText; diff --git a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageUserStack.tsx b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageUserStack.tsx new file mode 100644 index 0000000000000..2ca03a8140405 --- /dev/null +++ b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageUserStack.tsx @@ -0,0 +1,24 @@ +import type { IVideoConferenceUser, Serialized } from '@rocket.chat/core-typings'; +import { Avatar, Box } from '@rocket.chat/fuselage'; +import { useUserAvatarPath } from '@rocket.chat/ui-contexts'; +import { ReactElement, memo } from 'react'; + +const MAX_USERS = 6; + +const VideoConfMessageUserStack = ({ users }: { users: Serialized[] }): ReactElement => { + const getUserAvatarPath = useUserAvatarPath(); + + return ( + + + {users.slice(0, MAX_USERS).map(({ username }, index) => ( + + + + ))} + + + ); +}; + +export default memo(VideoConfMessageUserStack); diff --git a/packages/ui-video-conf/src/VideoConfMessage/index.ts b/packages/ui-video-conf/src/VideoConfMessage/index.ts new file mode 100644 index 0000000000000..1e34514df1709 --- /dev/null +++ b/packages/ui-video-conf/src/VideoConfMessage/index.ts @@ -0,0 +1,27 @@ +import VideoConfMessage from './VideoConfMessage'; +import VideoConfMessageAction from './VideoConfMessageAction'; +import VideoConfMessageActions from './VideoConfMessageActions'; +import VideoConfMessageButton from './VideoConfMessageButton'; +import VideoConfMessageContent from './VideoConfMessageContent'; +import VideoConfMessageFooter from './VideoConfMessageFooter'; +import VideoConfMessageFooterText from './VideoConfMessageFooterText'; +import VideoConfMessageIcon from './VideoConfMessageIcon'; +import VideoConfMessageRow from './VideoConfMessageRow'; +import VideoConfMessageSkeleton from './VideoConfMessageSkeleton'; +import VideoConfMessageText from './VideoConfMessageText'; +import VideoConfMessageUserStack from './VideoConfMessageUserStack'; + +export { + VideoConfMessage, + VideoConfMessageIcon, + VideoConfMessageRow, + VideoConfMessageContent, + VideoConfMessageButton, + VideoConfMessageText, + VideoConfMessageSkeleton, + VideoConfMessageFooter, + VideoConfMessageAction, + VideoConfMessageActions, + VideoConfMessageUserStack, + VideoConfMessageFooterText, +}; diff --git a/packages/ui-video-conf/src/VideoConfPopup/VideoConfPopup.stories.tsx b/packages/ui-video-conf/src/VideoConfPopup/VideoConfPopup.stories.tsx new file mode 100644 index 0000000000000..4f73e3cf47758 --- /dev/null +++ b/packages/ui-video-conf/src/VideoConfPopup/VideoConfPopup.stories.tsx @@ -0,0 +1,57 @@ +import { Avatar, Icon } from '@rocket.chat/fuselage'; +import { action } from '@storybook/addon-actions'; +import type { ComponentMeta, ComponentStory } from '@storybook/react'; +import type { ReactElement } from 'react'; + +import '@rocket.chat/icons/dist/rocketchat.css'; +import { + VideoConfPopup, + VideoConfPopupHeader, + VideoConfPopupTitle, + VideoConfPopupControllers, + VideoConfPopupContent, + VideoConfPopupFooter, + VideoConfPopupFooterButtons, + VideoConfPopupInfo, + VideoConfPopupBackdrop, +} from '.'; +import { VideoConfController, VideoConfButton } from '..'; + +export default { + title: 'Components/VideoConfPopup', + component: VideoConfPopup, + decorators: [ + (Story): ReactElement => ( + + + + ), + ], +} as ComponentMeta; + +const avatarUrl = + 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAoACgDASIAAhEBAxEB/8QAGwAAAgIDAQAAAAAAAAAAAAAAAAcEBgIDBQj/xAAuEAACAQQAAwcEAQUAAAAAAAABAgMABAUREiExBhMUIkFRYQcWcYGhFTJSgpH/xAAYAQADAQEAAAAAAAAAAAAAAAACAwQBAP/EAB4RAAIBBQEBAQAAAAAAAAAAAAABAgMREiExE0HR/9oADAMBAAIRAxEAPwBuXuIkhBuMe5ib/AHQP49q4L3mLitryTLTSpOiHQI5k/HzXa/qbFOEudVTu1dumWvcTaNCZYZ7vU6g6LxqjOU/24dfs1Ouh9FnkMpd3Reeyx83hAxZZEhkdV9/MBrX71WGPvJcqrJBGveKATtuXXqNU0pu02bTHXD/AGvJAluyxxRd6F4x00o+NdKoVrjbzJdvVe1t5cVLc2ck8qjnohgpPtz2v7G6JtPQ2VJwjlcw+37mchpnK6GtIuv5NFWeTsLNPvxWTvpfjvOEfwKKzEVkSct2vscS/BIzSN0YRkeX81UpPqO8masJETu7OOccY4dswYFQeftv096XV5knuJGdm2T1+agvMXj8jEaHX905QihabvcbuS7X566mLWLwSY8PuRnk/u4eZ0deTl71Ef6hY+0yM88TzeNZY4luYwpVYyduOfrvhPTnr0pXSX9y5mCsyJMdyxxvwq599em+taItqCSNc90ChvZRUruUcT0JiO18Elpk7t8v41LWzacxkBSuvjQ/FFJayjDWrCTepAQ2vUH0oo/Jk3ovpwJJeVCP5CN+lFFaaMqy+nAyuChvrTI2kN9JAsi2ZOy4IBHMnkSCP+iqBexSWdxLazoUljJVlPUH2oorkV10pRc7b1zXb/hZOzuJvM86QWEXeELxOzHSIPcmiiiunVlF2RNTpRkrs//Z'; + +export const StartCall: ComponentStory = () => ( + + + + + + + + + + } icon={}> + Room Name + + + + + + Start Call + + + + +); diff --git a/packages/ui-video-conf/src/index.ts b/packages/ui-video-conf/src/index.ts index e7244b55b214a..d331731d0f44c 100644 --- a/packages/ui-video-conf/src/index.ts +++ b/packages/ui-video-conf/src/index.ts @@ -1,6 +1,7 @@ import VideoConfButton from './VideoConfButton'; import VideoConfController from './VideoConfController'; +export * from './VideoConfMessage'; export * from './VideoConfPopup'; export * from './hooks'; export { VideoConfButton, VideoConfController }; diff --git a/packages/web-ui-registration/package.json b/packages/web-ui-registration/package.json index 6d8a378ee655b..e331825f18189 100644 --- a/packages/web-ui-registration/package.json +++ b/packages/web-ui-registration/package.json @@ -5,7 +5,7 @@ "devDependencies": { "@rocket.chat/layout": "next", "@rocket.chat/ui-contexts": "workspace:^", - "@tanstack/react-query": "^4.2.3", + "@tanstack/react-query": "^4.16.1", "@testing-library/react": "^13.3.0", "@types/jest": "^27.4.1", "eslint": "^8.12.0", diff --git a/yarn.lock b/yarn.lock index df92857d2820f..74109b25d8e6f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -60,6 +60,13 @@ __metadata: languageName: node linkType: hard +"@babel/compat-data@npm:^7.20.0, @babel/compat-data@npm:^7.20.1": + version: 7.20.1 + resolution: "@babel/compat-data@npm:7.20.1" + checksum: 989b9b7a6fe43c547bb8329241bd0ba6983488b83d29cc59de35536272ee6bb4cc7487ba6c8a4bceebb3a57f8c5fea1434f80bbbe75202bc79bc1110f955ff25 + languageName: node + linkType: hard + "@babel/core@npm:7.12.9": version: 7.12.9 resolution: "@babel/core@npm:7.12.9" @@ -84,7 +91,7 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.1.0, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.10, @babel/core@npm:^7.12.3, @babel/core@npm:^7.18.9, @babel/core@npm:^7.19.1, @babel/core@npm:^7.7.2, @babel/core@npm:^7.7.5, @babel/core@npm:^7.8.0": +"@babel/core@npm:^7.1.0, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.10, @babel/core@npm:^7.12.3, @babel/core@npm:^7.19.1, @babel/core@npm:^7.7.2, @babel/core@npm:^7.7.5, @babel/core@npm:^7.8.0": version: 7.19.1 resolution: "@babel/core@npm:7.19.1" dependencies: @@ -107,6 +114,29 @@ __metadata: languageName: node linkType: hard +"@babel/core@npm:^7.18.13": + version: 7.20.2 + resolution: "@babel/core@npm:7.20.2" + dependencies: + "@ampproject/remapping": ^2.1.0 + "@babel/code-frame": ^7.18.6 + "@babel/generator": ^7.20.2 + "@babel/helper-compilation-targets": ^7.20.0 + "@babel/helper-module-transforms": ^7.20.2 + "@babel/helpers": ^7.20.1 + "@babel/parser": ^7.20.2 + "@babel/template": ^7.18.10 + "@babel/traverse": ^7.20.1 + "@babel/types": ^7.20.2 + convert-source-map: ^1.7.0 + debug: ^4.1.0 + gensync: ^1.0.0-beta.2 + json5: ^2.2.1 + semver: ^6.3.0 + checksum: 98faaaef26103a276a30a141b951a93bc8418d100d1f668bf7a69d12f3e25df57958e8b6b9100d95663f720db62da85ade736f6629a5ebb1e640251a1b43c0e4 + languageName: node + linkType: hard + "@babel/core@npm:~7.18.13": version: 7.18.13 resolution: "@babel/core@npm:7.18.13" @@ -155,6 +185,17 @@ __metadata: languageName: node linkType: hard +"@babel/generator@npm:^7.20.1, @babel/generator@npm:^7.20.2": + version: 7.20.4 + resolution: "@babel/generator@npm:7.20.4" + dependencies: + "@babel/types": ^7.20.2 + "@jridgewell/gen-mapping": ^0.3.2 + jsesc: ^2.5.1 + checksum: 967b59f18e5ce999e5a741825bcecb2be4bbfc1824a92c21b47d0b5694e0eb09314a70f8b9142e9591c149c7fb83d51f73ae8fbd96d30a42666425889e51ceb1 + languageName: node + linkType: hard + "@babel/helper-annotate-as-pure@npm:^7.18.6": version: 7.18.6 resolution: "@babel/helper-annotate-as-pure@npm:7.18.6" @@ -188,6 +229,20 @@ __metadata: languageName: node linkType: hard +"@babel/helper-compilation-targets@npm:^7.20.0": + version: 7.20.0 + resolution: "@babel/helper-compilation-targets@npm:7.20.0" + dependencies: + "@babel/compat-data": ^7.20.0 + "@babel/helper-validator-option": ^7.18.6 + browserslist: ^4.21.3 + semver: ^6.3.0 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: bc183f2109648849c8fde0b3c5cf08adf2f7ad6dc617b546fd20f34c8ef574ee5ee293c8d1bd0ed0221212e8f5907cdc2c42097870f1dcc769a654107d82c95b + languageName: node + linkType: hard + "@babel/helper-create-class-features-plugin@npm:^7.17.6, @babel/helper-create-class-features-plugin@npm:^7.18.6, @babel/helper-create-class-features-plugin@npm:^7.19.0": version: 7.19.0 resolution: "@babel/helper-create-class-features-plugin@npm:7.19.0" @@ -320,6 +375,22 @@ __metadata: languageName: node linkType: hard +"@babel/helper-module-transforms@npm:^7.19.6, @babel/helper-module-transforms@npm:^7.20.2": + version: 7.20.2 + resolution: "@babel/helper-module-transforms@npm:7.20.2" + dependencies: + "@babel/helper-environment-visitor": ^7.18.9 + "@babel/helper-module-imports": ^7.18.6 + "@babel/helper-simple-access": ^7.20.2 + "@babel/helper-split-export-declaration": ^7.18.6 + "@babel/helper-validator-identifier": ^7.19.1 + "@babel/template": ^7.18.10 + "@babel/traverse": ^7.20.1 + "@babel/types": ^7.20.2 + checksum: 33a60ca115f6fce2c9d98e2a2e5649498aa7b23e2ae3c18745d7a021487708fc311458c33542f299387a0da168afccba94116e077f2cce49ae9e5ab83399e8a2 + languageName: node + linkType: hard + "@babel/helper-optimise-call-expression@npm:^7.18.6": version: 7.18.6 resolution: "@babel/helper-optimise-call-expression@npm:7.18.6" @@ -343,6 +414,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-plugin-utils@npm:^7.20.2": + version: 7.20.2 + resolution: "@babel/helper-plugin-utils@npm:7.20.2" + checksum: f6cae53b7fdb1bf3abd50fa61b10b4470985b400cc794d92635da1e7077bb19729f626adc0741b69403d9b6e411cddddb9c0157a709cc7c4eeb41e663be5d74b + languageName: node + linkType: hard + "@babel/helper-remap-async-to-generator@npm:^7.18.6, @babel/helper-remap-async-to-generator@npm:^7.18.9": version: 7.18.9 resolution: "@babel/helper-remap-async-to-generator@npm:7.18.9" @@ -370,6 +448,19 @@ __metadata: languageName: node linkType: hard +"@babel/helper-replace-supers@npm:^7.19.1": + version: 7.19.1 + resolution: "@babel/helper-replace-supers@npm:7.19.1" + dependencies: + "@babel/helper-environment-visitor": ^7.18.9 + "@babel/helper-member-expression-to-functions": ^7.18.9 + "@babel/helper-optimise-call-expression": ^7.18.6 + "@babel/traverse": ^7.19.1 + "@babel/types": ^7.19.0 + checksum: a0e4bf79ebe7d2bb5947169e47a0b4439c73fb0ec57d446cf3ea81b736721129ec373c3f94d2ebd2716b26dd65f8e6c083dac898170d42905e7ba815a2f52c25 + languageName: node + linkType: hard + "@babel/helper-simple-access@npm:^7.18.6": version: 7.18.6 resolution: "@babel/helper-simple-access@npm:7.18.6" @@ -379,6 +470,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-simple-access@npm:^7.19.4, @babel/helper-simple-access@npm:^7.20.2": + version: 7.20.2 + resolution: "@babel/helper-simple-access@npm:7.20.2" + dependencies: + "@babel/types": ^7.20.2 + checksum: ad1e96ee2e5f654ffee2369a586e5e8d2722bf2d8b028a121b4c33ebae47253f64d420157b9f0a8927aea3a9e0f18c0103e74fdd531815cf3650a0a4adca11a1 + languageName: node + linkType: hard + "@babel/helper-skip-transparent-expression-wrappers@npm:^7.18.9": version: 7.18.9 resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.18.9" @@ -404,6 +504,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-string-parser@npm:^7.19.4": + version: 7.19.4 + resolution: "@babel/helper-string-parser@npm:7.19.4" + checksum: b2f8a3920b30dfac81ec282ac4ad9598ea170648f8254b10f475abe6d944808fb006aab325d3eb5a8ad3bea8dfa888cfa6ef471050dae5748497c110ec060943 + languageName: node + linkType: hard + "@babel/helper-validator-identifier@npm:^7.18.6": version: 7.18.6 resolution: "@babel/helper-validator-identifier@npm:7.18.6" @@ -411,6 +518,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-identifier@npm:^7.19.1": + version: 7.19.1 + resolution: "@babel/helper-validator-identifier@npm:7.19.1" + checksum: 0eca5e86a729162af569b46c6c41a63e18b43dbe09fda1d2a3c8924f7d617116af39cac5e4cd5d431bb760b4dca3c0970e0c444789b1db42bcf1fa41fbad0a3a + languageName: node + linkType: hard + "@babel/helper-validator-option@npm:^7.16.7, @babel/helper-validator-option@npm:^7.18.6": version: 7.18.6 resolution: "@babel/helper-validator-option@npm:7.18.6" @@ -441,6 +555,17 @@ __metadata: languageName: node linkType: hard +"@babel/helpers@npm:^7.20.1": + version: 7.20.1 + resolution: "@babel/helpers@npm:7.20.1" + dependencies: + "@babel/template": ^7.18.10 + "@babel/traverse": ^7.20.1 + "@babel/types": ^7.20.0 + checksum: be35f78666bdab895775ed94dbeb098f7b4fa08ce4cfb0c3a9e69b7220cce56960dcdc2b14f5df9d3b80388d4bf7df155c97f6cf6768c0138f4e6931d0f44955 + languageName: node + linkType: hard + "@babel/highlight@npm:^7.10.4, @babel/highlight@npm:^7.18.6": version: 7.18.6 resolution: "@babel/highlight@npm:7.18.6" @@ -461,6 +586,15 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.20.1, @babel/parser@npm:^7.20.2": + version: 7.20.3 + resolution: "@babel/parser@npm:7.20.3" + bin: + parser: ./bin/babel-parser.js + checksum: 33bcdb45de65a3cf27ed376cb34f32be3c3485a10e3252f8d0126f6a034efc3145c0d219e57fcd5a8956361552008bc30b9bae4a723823fb3633027071be8a45 + languageName: node + linkType: hard + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.18.6": version: 7.18.6 resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.18.6" @@ -499,6 +633,20 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-proposal-async-generator-functions@npm:^7.20.1": + version: 7.20.1 + resolution: "@babel/plugin-proposal-async-generator-functions@npm:7.20.1" + dependencies: + "@babel/helper-environment-visitor": ^7.18.9 + "@babel/helper-plugin-utils": ^7.19.0 + "@babel/helper-remap-async-to-generator": ^7.18.9 + "@babel/plugin-syntax-async-generators": ^7.8.4 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 518483a68c5618932109913eb7316ed5e656c575cbd9d22667bc0451e35a1be45f8eaeb8e2065834b36c8a93c4840f78cebf8f1d067b07c422f7be16d58eca60 + languageName: node + linkType: hard + "@babel/plugin-proposal-class-properties@npm:^7.12.1, @babel/plugin-proposal-class-properties@npm:^7.18.6": version: 7.18.6 resolution: "@babel/plugin-proposal-class-properties@npm:7.18.6" @@ -651,6 +799,21 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-proposal-object-rest-spread@npm:^7.20.2": + version: 7.20.2 + resolution: "@babel/plugin-proposal-object-rest-spread@npm:7.20.2" + dependencies: + "@babel/compat-data": ^7.20.1 + "@babel/helper-compilation-targets": ^7.20.0 + "@babel/helper-plugin-utils": ^7.20.2 + "@babel/plugin-syntax-object-rest-spread": ^7.8.3 + "@babel/plugin-transform-parameters": ^7.20.1 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 9764d1a4735fcd384fdb9b6c6ccb20d1bea2f88f648640d26ce5d9cd5880ce1e389d2f852d7bea7e86ff343726225dc16e1deb92c7b3dc5c5721ed905a602318 + languageName: node + linkType: hard + "@babel/plugin-proposal-optional-catch-binding@npm:^7.18.6": version: 7.18.6 resolution: "@babel/plugin-proposal-optional-catch-binding@npm:7.18.6" @@ -824,6 +987,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-syntax-import-assertions@npm:^7.20.0": + version: 7.20.0 + resolution: "@babel/plugin-syntax-import-assertions@npm:7.20.0" + dependencies: + "@babel/helper-plugin-utils": ^7.19.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 6a86220e0aae40164cd3ffaf80e7c076a1be02a8f3480455dddbae05fda8140f429290027604df7a11b3f3f124866e8a6d69dbfa1dda61ee7377b920ad144d5b + languageName: node + linkType: hard + "@babel/plugin-syntax-import-meta@npm:^7.8.3": version: 7.10.4 resolution: "@babel/plugin-syntax-import-meta@npm:7.10.4" @@ -1013,6 +1187,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-block-scoping@npm:^7.20.2": + version: 7.20.2 + resolution: "@babel/plugin-transform-block-scoping@npm:7.20.2" + dependencies: + "@babel/helper-plugin-utils": ^7.20.2 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 550b983277557ecfa3ef1e7a2367eaa9e0616a56f0d4106812cbc8aeca057b0f0b8bbc5c548b9b3b57399868f916e89e17303c802c8c46d18fba5bc174d4e794 + languageName: node + linkType: hard + "@babel/plugin-transform-classes@npm:^7.12.1, @babel/plugin-transform-classes@npm:^7.19.0": version: 7.19.0 resolution: "@babel/plugin-transform-classes@npm:7.19.0" @@ -1032,6 +1217,25 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-classes@npm:^7.20.2": + version: 7.20.2 + resolution: "@babel/plugin-transform-classes@npm:7.20.2" + dependencies: + "@babel/helper-annotate-as-pure": ^7.18.6 + "@babel/helper-compilation-targets": ^7.20.0 + "@babel/helper-environment-visitor": ^7.18.9 + "@babel/helper-function-name": ^7.19.0 + "@babel/helper-optimise-call-expression": ^7.18.6 + "@babel/helper-plugin-utils": ^7.20.2 + "@babel/helper-replace-supers": ^7.19.1 + "@babel/helper-split-export-declaration": ^7.18.6 + globals: ^11.1.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 57f3467a8eb7853cdb61cda963cfb6c6568ad276d77c9de2ff5a2194650010217aa318ef3733975537c6fb906b73a019afb6ea650b01852e7d2e1fab4034361b + languageName: node + linkType: hard + "@babel/plugin-transform-computed-properties@npm:^7.18.9": version: 7.18.9 resolution: "@babel/plugin-transform-computed-properties@npm:7.18.9" @@ -1054,6 +1258,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-destructuring@npm:^7.20.2": + version: 7.20.2 + resolution: "@babel/plugin-transform-destructuring@npm:7.20.2" + dependencies: + "@babel/helper-plugin-utils": ^7.20.2 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 09033e09b28ca1b0d46a8d82f5a677b1d718a739b3c199886908c3ef1af23369317d0c429b21507d480ee82721c15892a9893be18e50ad6fc219e69312f4b097 + languageName: node + linkType: hard + "@babel/plugin-transform-dotall-regex@npm:^7.18.6, @babel/plugin-transform-dotall-regex@npm:^7.4.4": version: 7.18.6 resolution: "@babel/plugin-transform-dotall-regex@npm:7.18.6" @@ -1160,6 +1375,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-modules-amd@npm:^7.19.6": + version: 7.19.6 + resolution: "@babel/plugin-transform-modules-amd@npm:7.19.6" + dependencies: + "@babel/helper-module-transforms": ^7.19.6 + "@babel/helper-plugin-utils": ^7.19.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 4236aad970025bc10c772c1589b1e2eab8b7681933bb5ffa6e395d4c1a52532b28c47c553e3011b4272ea81e5ab39fe969eb5349584e8390e59771055c467d42 + languageName: node + linkType: hard + "@babel/plugin-transform-modules-commonjs@npm:^7.18.6": version: 7.18.6 resolution: "@babel/plugin-transform-modules-commonjs@npm:7.18.6" @@ -1174,6 +1401,19 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-modules-commonjs@npm:^7.19.6": + version: 7.19.6 + resolution: "@babel/plugin-transform-modules-commonjs@npm:7.19.6" + dependencies: + "@babel/helper-module-transforms": ^7.19.6 + "@babel/helper-plugin-utils": ^7.19.0 + "@babel/helper-simple-access": ^7.19.4 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 85d46945ab5ba3fff89e962d560a5d40253f228b9659a697683db3de07c0236e8cd60e5eb41958007359951a42bc268bf32350fcdb5b4a86f58dff1e032c096e + languageName: node + linkType: hard + "@babel/plugin-transform-modules-systemjs@npm:^7.19.0": version: 7.19.0 resolution: "@babel/plugin-transform-modules-systemjs@npm:7.19.0" @@ -1189,6 +1429,20 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-modules-systemjs@npm:^7.19.6": + version: 7.19.6 + resolution: "@babel/plugin-transform-modules-systemjs@npm:7.19.6" + dependencies: + "@babel/helper-hoist-variables": ^7.18.6 + "@babel/helper-module-transforms": ^7.19.6 + "@babel/helper-plugin-utils": ^7.19.0 + "@babel/helper-validator-identifier": ^7.19.1 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 8526431cc81ea3eb232ad50862d0ed1cbb422b5251d14a8d6610d0ca0617f6e75f35179e98eb1235d0cccb980120350b9f112594e5646dd45378d41eaaf87342 + languageName: node + linkType: hard + "@babel/plugin-transform-modules-umd@npm:^7.18.6": version: 7.18.6 resolution: "@babel/plugin-transform-modules-umd@npm:7.18.6" @@ -1247,6 +1501,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-parameters@npm:^7.20.1": + version: 7.20.3 + resolution: "@babel/plugin-transform-parameters@npm:7.20.3" + dependencies: + "@babel/helper-plugin-utils": ^7.20.2 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 69054c93d744574e06b0244623140718ecba87e1cc34bd5c7bd5824fd4dbef764ac4832046ea1ba5d2c6a2f12e03289555c9f65f0aafae4871f3d740ff61b9ec + languageName: node + linkType: hard + "@babel/plugin-transform-property-literals@npm:^7.18.6": version: 7.18.6 resolution: "@babel/plugin-transform-property-literals@npm:7.18.6" @@ -1422,7 +1687,7 @@ __metadata: languageName: node linkType: hard -"@babel/preset-env@npm:^7.12.11, @babel/preset-env@npm:^7.18.9, @babel/preset-env@npm:^7.19.1": +"@babel/preset-env@npm:^7.12.11, @babel/preset-env@npm:^7.19.1": version: 7.19.1 resolution: "@babel/preset-env@npm:7.19.1" dependencies: @@ -1507,6 +1772,91 @@ __metadata: languageName: node linkType: hard +"@babel/preset-env@npm:^7.18.10": + version: 7.20.2 + resolution: "@babel/preset-env@npm:7.20.2" + dependencies: + "@babel/compat-data": ^7.20.1 + "@babel/helper-compilation-targets": ^7.20.0 + "@babel/helper-plugin-utils": ^7.20.2 + "@babel/helper-validator-option": ^7.18.6 + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": ^7.18.6 + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": ^7.18.9 + "@babel/plugin-proposal-async-generator-functions": ^7.20.1 + "@babel/plugin-proposal-class-properties": ^7.18.6 + "@babel/plugin-proposal-class-static-block": ^7.18.6 + "@babel/plugin-proposal-dynamic-import": ^7.18.6 + "@babel/plugin-proposal-export-namespace-from": ^7.18.9 + "@babel/plugin-proposal-json-strings": ^7.18.6 + "@babel/plugin-proposal-logical-assignment-operators": ^7.18.9 + "@babel/plugin-proposal-nullish-coalescing-operator": ^7.18.6 + "@babel/plugin-proposal-numeric-separator": ^7.18.6 + "@babel/plugin-proposal-object-rest-spread": ^7.20.2 + "@babel/plugin-proposal-optional-catch-binding": ^7.18.6 + "@babel/plugin-proposal-optional-chaining": ^7.18.9 + "@babel/plugin-proposal-private-methods": ^7.18.6 + "@babel/plugin-proposal-private-property-in-object": ^7.18.6 + "@babel/plugin-proposal-unicode-property-regex": ^7.18.6 + "@babel/plugin-syntax-async-generators": ^7.8.4 + "@babel/plugin-syntax-class-properties": ^7.12.13 + "@babel/plugin-syntax-class-static-block": ^7.14.5 + "@babel/plugin-syntax-dynamic-import": ^7.8.3 + "@babel/plugin-syntax-export-namespace-from": ^7.8.3 + "@babel/plugin-syntax-import-assertions": ^7.20.0 + "@babel/plugin-syntax-json-strings": ^7.8.3 + "@babel/plugin-syntax-logical-assignment-operators": ^7.10.4 + "@babel/plugin-syntax-nullish-coalescing-operator": ^7.8.3 + "@babel/plugin-syntax-numeric-separator": ^7.10.4 + "@babel/plugin-syntax-object-rest-spread": ^7.8.3 + "@babel/plugin-syntax-optional-catch-binding": ^7.8.3 + "@babel/plugin-syntax-optional-chaining": ^7.8.3 + "@babel/plugin-syntax-private-property-in-object": ^7.14.5 + "@babel/plugin-syntax-top-level-await": ^7.14.5 + "@babel/plugin-transform-arrow-functions": ^7.18.6 + "@babel/plugin-transform-async-to-generator": ^7.18.6 + "@babel/plugin-transform-block-scoped-functions": ^7.18.6 + "@babel/plugin-transform-block-scoping": ^7.20.2 + "@babel/plugin-transform-classes": ^7.20.2 + "@babel/plugin-transform-computed-properties": ^7.18.9 + "@babel/plugin-transform-destructuring": ^7.20.2 + "@babel/plugin-transform-dotall-regex": ^7.18.6 + "@babel/plugin-transform-duplicate-keys": ^7.18.9 + "@babel/plugin-transform-exponentiation-operator": ^7.18.6 + "@babel/plugin-transform-for-of": ^7.18.8 + "@babel/plugin-transform-function-name": ^7.18.9 + "@babel/plugin-transform-literals": ^7.18.9 + "@babel/plugin-transform-member-expression-literals": ^7.18.6 + "@babel/plugin-transform-modules-amd": ^7.19.6 + "@babel/plugin-transform-modules-commonjs": ^7.19.6 + "@babel/plugin-transform-modules-systemjs": ^7.19.6 + "@babel/plugin-transform-modules-umd": ^7.18.6 + "@babel/plugin-transform-named-capturing-groups-regex": ^7.19.1 + "@babel/plugin-transform-new-target": ^7.18.6 + "@babel/plugin-transform-object-super": ^7.18.6 + "@babel/plugin-transform-parameters": ^7.20.1 + "@babel/plugin-transform-property-literals": ^7.18.6 + "@babel/plugin-transform-regenerator": ^7.18.6 + "@babel/plugin-transform-reserved-words": ^7.18.6 + "@babel/plugin-transform-shorthand-properties": ^7.18.6 + "@babel/plugin-transform-spread": ^7.19.0 + "@babel/plugin-transform-sticky-regex": ^7.18.6 + "@babel/plugin-transform-template-literals": ^7.18.9 + "@babel/plugin-transform-typeof-symbol": ^7.18.9 + "@babel/plugin-transform-unicode-escapes": ^7.18.10 + "@babel/plugin-transform-unicode-regex": ^7.18.6 + "@babel/preset-modules": ^0.1.5 + "@babel/types": ^7.20.2 + babel-plugin-polyfill-corejs2: ^0.3.3 + babel-plugin-polyfill-corejs3: ^0.6.0 + babel-plugin-polyfill-regenerator: ^0.4.1 + core-js-compat: ^3.25.1 + semver: ^6.3.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: ece2d7e9c7789db6116e962b8e1a55eb55c110c44c217f0c8f6ffea4ca234954e66557f7bd019b7affadf7fbb3a53ccc807e93fc935aacd48146234b73b6947e + languageName: node + linkType: hard + "@babel/preset-flow@npm:^7.12.1": version: 7.16.7 resolution: "@babel/preset-flow@npm:7.16.7" @@ -1635,6 +1985,24 @@ __metadata: languageName: node linkType: hard +"@babel/traverse@npm:^7.20.1": + version: 7.20.1 + resolution: "@babel/traverse@npm:7.20.1" + dependencies: + "@babel/code-frame": ^7.18.6 + "@babel/generator": ^7.20.1 + "@babel/helper-environment-visitor": ^7.18.9 + "@babel/helper-function-name": ^7.19.0 + "@babel/helper-hoist-variables": ^7.18.6 + "@babel/helper-split-export-declaration": ^7.18.6 + "@babel/parser": ^7.20.1 + "@babel/types": ^7.20.0 + debug: ^4.1.0 + globals: ^11.1.0 + checksum: 6696176d574b7ff93466848010bc7e94b250169379ec2a84f1b10da46a7cc2018ea5e3a520c3078487db51e3a4afab9ecff48f25d1dbad8c1319362f4148fb4b + languageName: node + linkType: hard + "@babel/types@npm:^7.0.0, @babel/types@npm:^7.12.11, @babel/types@npm:^7.12.7, @babel/types@npm:^7.18.10, @babel/types@npm:^7.18.13, @babel/types@npm:^7.18.6, @babel/types@npm:^7.18.9, @babel/types@npm:^7.19.0, @babel/types@npm:^7.2.0, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": version: 7.19.0 resolution: "@babel/types@npm:7.19.0" @@ -1646,6 +2014,17 @@ __metadata: languageName: node linkType: hard +"@babel/types@npm:^7.20.0, @babel/types@npm:^7.20.2": + version: 7.20.2 + resolution: "@babel/types@npm:7.20.2" + dependencies: + "@babel/helper-string-parser": ^7.19.4 + "@babel/helper-validator-identifier": ^7.19.1 + to-fast-properties: ^2.0.0 + checksum: 57e76e5f21876135f481bfd4010c87f2d38196bb0a2bc60a28d6e55e3afa90cdd9accf164e4cb71bdfb620517fa0a0cb5600cdce36c21d59fdaccfbb899c024c + languageName: node + linkType: hard + "@base2/pretty-print-object@npm:1.0.1": version: 1.0.1 resolution: "@base2/pretty-print-object@npm:1.0.1" @@ -1996,9 +2375,9 @@ __metadata: languageName: node linkType: hard -"@eslint/eslintrc@npm:^1.0.5, @eslint/eslintrc@npm:^1.3.2": - version: 1.3.2 - resolution: "@eslint/eslintrc@npm:1.3.2" +"@eslint/eslintrc@npm:^1.3.0": + version: 1.3.3 + resolution: "@eslint/eslintrc@npm:1.3.3" dependencies: ajv: ^6.12.4 debug: ^4.3.2 @@ -2009,7 +2388,7 @@ __metadata: js-yaml: ^4.1.0 minimatch: ^3.1.2 strip-json-comments: ^3.1.1 - checksum: 2074dca47d7e1c5c6323ff353f690f4b25d3ab53fe7d27337e2592d37a894cf60ca0e85ca66b50ff2db0bc7e630cc1e9c7347d65bb185b61416565584c38999c + checksum: f03e9d6727efd3e0719da2051ea80c0c73d20e28c171121527dbb868cd34232ca9c1d0525a66e517a404afea26624b1e47895b6a92474678418c2f50c9566694 languageName: node linkType: hard @@ -2030,6 +2409,23 @@ __metadata: languageName: node linkType: hard +"@eslint/eslintrc@npm:^1.3.2": + version: 1.3.2 + resolution: "@eslint/eslintrc@npm:1.3.2" + dependencies: + ajv: ^6.12.4 + debug: ^4.3.2 + espree: ^9.4.0 + globals: ^13.15.0 + ignore: ^5.2.0 + import-fresh: ^3.2.1 + js-yaml: ^4.1.0 + minimatch: ^3.1.2 + strip-json-comments: ^3.1.1 + checksum: 2074dca47d7e1c5c6323ff353f690f4b25d3ab53fe7d27337e2592d37a894cf60ca0e85ca66b50ff2db0bc7e630cc1e9c7347d65bb185b61416565584c38999c + languageName: node + linkType: hard + "@faker-js/faker@npm:^6.3.1": version: 6.3.1 resolution: "@faker-js/faker@npm:6.3.1" @@ -2181,17 +2577,6 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.9.2": - version: 0.9.5 - resolution: "@humanwhocodes/config-array@npm:0.9.5" - dependencies: - "@humanwhocodes/object-schema": ^1.2.1 - debug: ^4.1.1 - minimatch: ^3.0.4 - checksum: 8ba6281bc0590f6c6eadeefc14244b5a3e3f5903445aadd1a32099ed80e753037674026ce1b3c945ab93561bea5eb29e3c5bff67060e230c295595ba517a3492 - languageName: node - linkType: hard - "@humanwhocodes/gitignore-to-minimatch@npm:^1.0.2": version: 1.0.2 resolution: "@humanwhocodes/gitignore-to-minimatch@npm:1.0.2" @@ -5398,7 +5783,7 @@ __metadata: cron: ~1.8.0 date.js: ~0.3.3 debug: ~4.1.1 - eslint: ^8.20.0 + eslint: ^8.22.0 human-interval: ^2.0.0 jest: ^27.5.1 moment-timezone: ~0.5.27 @@ -5416,7 +5801,7 @@ __metadata: "@rocket.chat/rest-typings": "workspace:^" "@types/jest": ^27.4.1 "@types/strict-uri-encode": ^2.0.0 - eslint: ^8.20.0 + eslint: ^8.22.0 filter-obj: ^3.0.0 jest: ^27.5.1 query-string: ^7.1.1 @@ -5427,7 +5812,22 @@ __metadata: languageName: unknown linkType: soft -"@rocket.chat/apps-engine@npm:^1.32.0, @rocket.chat/apps-engine@npm:latest": +"@rocket.chat/apps-engine@npm:1.36.0-videoconf": + version: 1.36.0-videoconf + resolution: "@rocket.chat/apps-engine@npm:1.36.0-videoconf" + dependencies: + adm-zip: ^0.5.9 + cryptiles: ^4.1.3 + lodash.clonedeep: ^4.5.0 + semver: ^5.7.1 + stack-trace: 0.0.10 + uuid: ^3.4.0 + vm2: ^3.9.11 + checksum: 0d22a3e114f14823d8e372119de86bb88924a36392dee611ae880ba44d546c17e2e091527fc24c9c59d5a6199203480dff1f76cda73bbd9ffe69eccce4955276 + languageName: node + linkType: hard + +"@rocket.chat/apps-engine@npm:^1.32.0": version: 1.35.0 resolution: "@rocket.chat/apps-engine@npm:1.35.0" dependencies: @@ -5491,7 +5891,7 @@ __metadata: dependencies: "@types/jest": ^27.4.1 cheerio: 1.0.0-rc.10 - eslint: ^8.20.0 + eslint: ^8.22.0 jest: ^27.5.1 ts-jest: ^27.1.4 typescript: ~4.5.5 @@ -5507,7 +5907,7 @@ __metadata: "@rocket.chat/icons": 0.31.21 "@rocket.chat/message-parser": next "@rocket.chat/ui-kit": 0.31.21 - eslint: ^8.20.0 + eslint: ^8.22.0 mongodb: ^4.3.1 prettier: ^2.7.1 typescript: ~4.5.5 @@ -5527,7 +5927,7 @@ __metadata: languageName: node linkType: hard -"@rocket.chat/css-in-js@npm:~0.31.22-dev.19": +"@rocket.chat/css-in-js@npm:next, @rocket.chat/css-in-js@npm:~0.31.22-dev.19": version: 0.31.22-dev.19 resolution: "@rocket.chat/css-in-js@npm:0.31.22-dev.19" dependencies: @@ -5580,7 +5980,7 @@ __metadata: "@types/ws": ^8.5.3 colorette: ^1.4.0 ejson: ^2.2.2 - eslint: ^8.21.0 + eslint: ^8.22.0 eventemitter3: ^4.0.7 fibers: ^5.0.3 jaeger-client: ^3.19.0 @@ -5606,6 +6006,13 @@ __metadata: languageName: node linkType: hard +"@rocket.chat/emitter@npm:next": + version: 0.31.22-dev.19 + resolution: "@rocket.chat/emitter@npm:0.31.22-dev.19" + checksum: 14f8143d158545b8a6807566d89ab03edc74c077f0dec5e273e8dd6ed4ad9b865439174f2ea243f217e97e911357298096ac71d41957bd5db995e2fbafd1f849 + languageName: node + linkType: hard + "@rocket.chat/eslint-config@npm:^0.4.0": version: 0.4.0 resolution: "@rocket.chat/eslint-config@npm:0.4.0" @@ -5626,7 +6033,7 @@ __metadata: "@types/prettier": ^2.6.3 "@typescript-eslint/eslint-plugin": ^5.30.7 "@typescript-eslint/parser": ^5.30.7 - eslint: ^8.20.0 + eslint: ^8.22.0 eslint-config-prettier: ^8.5.0 eslint-plugin-anti-trojan-source: ^1.1.0 eslint-plugin-import: ^2.26.0 @@ -5640,7 +6047,7 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/favicon@workspace:packages/favicon" dependencies: - eslint: ^8.20.0 + eslint: ^8.22.0 typescript: ~4.5.5 languageName: unknown linkType: soft @@ -5717,9 +6124,21 @@ __metadata: languageName: node linkType: hard -"@rocket.chat/fuselage-polyfills@npm:0.31.21": - version: 0.31.21 - resolution: "@rocket.chat/fuselage-polyfills@npm:0.31.21" +"@rocket.chat/fuselage-hooks@npm:next": + version: 0.32.0-dev.121 + resolution: "@rocket.chat/fuselage-hooks@npm:0.32.0-dev.121" + dependencies: + use-sync-external-store: ~1.2.0 + peerDependencies: + "@rocket.chat/fuselage-tokens": "*" + react: ^17.0.2 + checksum: 204ef2918876b12cd5a607c10d5ec5f8345fe28e2c9ad23fe79af681b0c79ac4fed86e49d18a1c0cb6f90b6e0b9d773f11a16ddc1801aa5479cdf8fb9de06185 + languageName: node + linkType: hard + +"@rocket.chat/fuselage-polyfills@npm:next": + version: 0.31.22-dev.19 + resolution: "@rocket.chat/fuselage-polyfills@npm:0.31.22-dev.19" dependencies: "@juggle/resize-observer": ^3.4.0 clipboard-polyfill: ^3.0.3 @@ -5727,13 +6146,13 @@ __metadata: focus-visible: ^5.2.0 focus-within-polyfill: ^5.2.1 new-event-polyfill: ^1.0.1 - checksum: 7bcb8b0e62a6755b3e35335dee47b432cebdc15480880c8cd36cf5159571fed9235b5dbc42c41492787586a5356313e2ca3a0a3866849e5a30e5acabe7d9fbbe + checksum: 8349980b707e0d243f0ebe813cfa6b33d7b87c4076b81d29efbed38a9d81526cd5104bfdedf4f1f81fc7d35943f6354a0c6e5c4b14146e87d68545c486cc6c14 languageName: node linkType: hard -"@rocket.chat/fuselage-toastbar@npm:0.31.21": - version: 0.31.21 - resolution: "@rocket.chat/fuselage-toastbar@npm:0.31.21" +"@rocket.chat/fuselage-toastbar@npm:next": + version: 0.32.0-dev.182 + resolution: "@rocket.chat/fuselage-toastbar@npm:0.32.0-dev.182" peerDependencies: "@rocket.chat/fuselage": "*" "@rocket.chat/fuselage-hooks": "*" @@ -5741,7 +6160,7 @@ __metadata: "@rocket.chat/styled": "*" react: ^17.0.2 react-dom: ^17.0.2 - checksum: 1547f822fd2acf1431cd7282d0f447e55907523a6a31f354e83ba4edb2372a27b394565eedcd35e1ba17612bebaba665f86bd08004f8bdfe95942a0b41622c6c + checksum: cede45a12788c9637f034a5fbcc3b33455e66a39f0c9f041fe51b0c157223eb18debc5435531083d7b2ec86a7f5d63ba32b3d95f44cc889d12a4a04c9358e206 languageName: node linkType: hard @@ -5752,44 +6171,28 @@ __metadata: languageName: node linkType: hard -"@rocket.chat/fuselage-tokens@npm:~0.32.0-dev.158": +"@rocket.chat/fuselage-tokens@npm:next, @rocket.chat/fuselage-tokens@npm:~0.32.0-dev.158": version: 0.32.0-dev.158 resolution: "@rocket.chat/fuselage-tokens@npm:0.32.0-dev.158" checksum: 18db2ad59b2e118161ea9835c8d1c1bfea6e8c654024c67140c4dd5a3eb6b51a6c7ee29203f22df368e1955e32fc67604f9a22193b31eb808c1c71bb9e1624f6 languageName: node linkType: hard -"@rocket.chat/fuselage-ui-kit@npm:0.31.21": - version: 0.31.21 - resolution: "@rocket.chat/fuselage-ui-kit@npm:0.31.21" - dependencies: - "@rocket.chat/ui-kit": ^0.31.21 - tslib: ^2.3.1 - peerDependencies: - "@rocket.chat/fuselage": "*" - "@rocket.chat/fuselage-hooks": "*" - "@rocket.chat/fuselage-polyfills": "*" - "@rocket.chat/icons": "*" - "@rocket.chat/styled": "*" - react: ^17.0.2 - react-dom: ^17.0.2 - checksum: 67a67b6b441b23c19e3ba935ce1ea962f98e7b16d9fd7ae4012168738994eb516702051f9937fa7129a02ca7ff630f0e6ee27c4e4d5db250e377677380b51071 - languageName: node - linkType: hard - -"@rocket.chat/fuselage-ui-kit@workspace:packages/fuselage-ui-kit": +"@rocket.chat/fuselage-ui-kit@workspace:^, @rocket.chat/fuselage-ui-kit@workspace:packages/fuselage-ui-kit": version: 0.0.0-use.local resolution: "@rocket.chat/fuselage-ui-kit@workspace:packages/fuselage-ui-kit" dependencies: "@rocket.chat/apps-engine": ~1.30.0 "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/fuselage": next - "@rocket.chat/fuselage-hooks": 0.31.21 - "@rocket.chat/fuselage-polyfills": 0.31.21 - "@rocket.chat/icons": 0.31.21 + "@rocket.chat/fuselage-hooks": next + "@rocket.chat/fuselage-polyfills": next + "@rocket.chat/icons": next "@rocket.chat/prettier-config": next - "@rocket.chat/styled": 0.31.21 - "@rocket.chat/ui-kit": 0.31.21 + "@rocket.chat/styled": next + "@rocket.chat/ui-contexts": "workspace:^" + "@rocket.chat/ui-kit": next + "@rocket.chat/ui-video-conf": "workspace:^" "@storybook/addon-essentials": ~6.5.10 "@storybook/addons": ~6.5.10 "@storybook/builder-webpack5": ~6.5.10 @@ -5797,29 +6200,36 @@ __metadata: "@storybook/react": ~6.5.10 "@storybook/source-loader": ~6.5.10 "@storybook/theming": ~6.5.10 - "@types/react": ~17.0.39 - "@types/react-dom": ^17.0.11 + "@tanstack/react-query": ^4.16.1 + "@types/react": ~17.0.48 + "@types/react-dom": ~17.0.17 babel-loader: ~8.2.3 cross-env: ^7.0.3 - eslint: ~8.8.0 + eslint: ~8.22.0 lint-staged: ~12.3.3 normalize.css: ^8.0.1 npm-run-all: ^4.1.5 prettier: ~2.5.1 - react: ^17.0.2 react-dom: ^17.0.2 rimraf: ^3.0.2 tslib: ^2.3.1 typescript: ~4.3.5 webpack: ~5.68.0 peerDependencies: + "@rocket.chat/apps-engine": "*" + "@rocket.chat/eslint-config": "*" "@rocket.chat/fuselage": "*" "@rocket.chat/fuselage-hooks": "*" "@rocket.chat/fuselage-polyfills": "*" "@rocket.chat/icons": "*" + "@rocket.chat/prettier-config": "*" "@rocket.chat/styled": "*" - react: ^17.0.2 - react-dom: ^17.0.2 + "@rocket.chat/ui-contexts": "*" + "@rocket.chat/ui-kit": "*" + "@rocket.chat/ui-video-conf": "*" + "@tanstack/react-query": "*" + react: "*" + react-dom: "*" languageName: unknown linkType: soft @@ -5851,7 +6261,7 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/gazzodown@workspace:packages/gazzodown" dependencies: - "@babel/core": ^7.18.9 + "@babel/core": ~7.18.13 "@mdx-js/react": ^1.6.22 "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/css-in-js": 0.31.21 @@ -5875,13 +6285,13 @@ __metadata: "@types/babel__core": ^7 "@types/jest": ^27.4.1 "@types/katex": ~0 - "@types/react": ^17.0.47 - "@types/react-dom": ^18 + "@types/react": ~17.0.48 + "@types/react-dom": ~17.0.17 "@types/testing-library__jest-dom": ^5 "@typescript-eslint/eslint-plugin": ^5.30.7 "@typescript-eslint/parser": ^5.30.7 babel-loader: ^8.2.5 - eslint: ^8.20.0 + eslint: ^8.22.0 eslint-plugin-anti-trojan-source: ^1.1.0 eslint-plugin-react: ^7.30.1 eslint-plugin-react-hooks: ^4.6.0 @@ -5895,16 +6305,16 @@ __metadata: ts-jest: ^27.1.4 typescript: ~4.5.5 peerDependencies: - "@rocket.chat/core-typings": "workspace:^" + "@rocket.chat/core-typings": "*" "@rocket.chat/css-in-js": "*" "@rocket.chat/fuselage": "*" "@rocket.chat/fuselage-tokens": "*" "@rocket.chat/message-parser": "*" "@rocket.chat/styled": "*" - "@rocket.chat/ui-client": "workspace:^" - "@rocket.chat/ui-contexts": "workspace:^" + "@rocket.chat/ui-client": "*" + "@rocket.chat/ui-contexts": "*" katex: "*" - react: ~17.0.2 + react: "*" languageName: unknown linkType: soft @@ -5915,6 +6325,13 @@ __metadata: languageName: node linkType: hard +"@rocket.chat/icons@npm:next": + version: 0.32.0-dev.190 + resolution: "@rocket.chat/icons@npm:0.32.0-dev.190" + checksum: cd4003711336f4934821a20308a1c038c4f6eba0c701c8a7439430b53dab6bb829ec4d6e44943a43ed903ba13cdde0f2f35f9f92d3d8c0adaba8a6abb8968462 + languageName: node + linkType: hard + "@rocket.chat/layout@npm:next": version: 0.32.0-dev.57 resolution: "@rocket.chat/layout@npm:0.32.0-dev.57" @@ -5932,7 +6349,7 @@ __metadata: resolution: "@rocket.chat/livechat@workspace:packages/livechat" dependencies: "@babel/eslint-parser": ^7.18.9 - "@babel/preset-env": ^7.18.9 + "@babel/preset-env": ^7.18.10 "@rocket.chat/eslint-config": ^0.4.0 "@rocket.chat/fuselage-tokens": 0.31.21 "@rocket.chat/logo": 0.31.21 @@ -5946,7 +6363,6 @@ __metadata: "@storybook/addon-viewport": ~6.5.10 "@storybook/react": ~6.5.10 "@storybook/theming": ~6.5.10 - "@types/react-dom": ^17.0.17 autoprefixer: ^9.8.8 babel-loader: ^8.1.0 babel-plugin-jsx-pragmatic: ^1.0.2 @@ -5958,7 +6374,7 @@ __metadata: date-fns: ^2.15.0 desvg-loader: ^0.1.0 emoji-mart: ^3.0.1 - eslint: ^8.20.0 + eslint: ^8.22.0 eslint-plugin-import: ^2.26.0 eslint-plugin-react: ^7.30.1 eslint-plugin-react-hooks: ^4.6.0 @@ -6048,11 +6464,11 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/meteor@workspace:apps/meteor" dependencies: - "@babel/core": ^7.18.9 + "@babel/core": ^7.18.13 "@babel/eslint-parser": ^7.18.9 "@babel/plugin-proposal-nullish-coalescing-operator": ^7.18.6 "@babel/plugin-proposal-optional-chaining": ^7.18.9 - "@babel/preset-env": ^7.18.9 + "@babel/preset-env": ^7.18.10 "@babel/preset-react": ^7.18.6 "@babel/register": ^7.18.9 "@babel/runtime": ^7.18.9 @@ -6069,7 +6485,7 @@ __metadata: "@react-aria/color": ^3.0.0-beta.15 "@rocket.chat/agenda": "workspace:^" "@rocket.chat/api-client": "workspace:^" - "@rocket.chat/apps-engine": latest + "@rocket.chat/apps-engine": 1.36.0-videoconf "@rocket.chat/cas-validate": "workspace:^" "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/css-in-js": 0.31.21 @@ -6079,11 +6495,11 @@ __metadata: "@rocket.chat/forked-matrix-appservice-bridge": ^4.0.1 "@rocket.chat/forked-matrix-bot-sdk": ^0.6.0-beta.2 "@rocket.chat/fuselage": next - "@rocket.chat/fuselage-hooks": 0.31.21 - "@rocket.chat/fuselage-polyfills": 0.31.21 - "@rocket.chat/fuselage-toastbar": 0.31.21 - "@rocket.chat/fuselage-tokens": 0.31.21 - "@rocket.chat/fuselage-ui-kit": 0.31.21 + "@rocket.chat/fuselage-hooks": next + "@rocket.chat/fuselage-polyfills": next + "@rocket.chat/fuselage-toastbar": next + "@rocket.chat/fuselage-tokens": next + "@rocket.chat/fuselage-ui-kit": "workspace:^" "@rocket.chat/gazzodown": "workspace:^" "@rocket.chat/icons": 0.31.21 "@rocket.chat/layout": next @@ -6114,7 +6530,7 @@ __metadata: "@storybook/addons": ~6.5.10 "@storybook/react": ~6.5.10 "@storybook/testing-library": 0.0.13 - "@tanstack/react-query": ^4.0.10 + "@tanstack/react-query": ^4.16.1 "@testing-library/react": ~12.1.5 "@testing-library/react-hooks": ^8.0.1 "@testing-library/user-event": ~13.5.0 @@ -6169,7 +6585,7 @@ __metadata: "@types/proxy-from-env": ^1.0.1 "@types/proxyquire": ^1.3.28 "@types/psl": ^1.1.0 - "@types/react": ~17.0.47 + "@types/react": ~17.0.48 "@types/react-dom": ~17.0.17 "@types/rewire": ^2.5.28 "@types/sanitize-html": ^2 @@ -6233,7 +6649,7 @@ __metadata: emailreplyparser: ^0.0.5 emojione: ^4.5.0 emojione-assets: ^4.5.0 - eslint: ^8.20.0 + eslint: ^8.22.0 eslint-config-prettier: ^8.5.0 eslint-plugin-anti-trojan-source: ^1.1.0 eslint-plugin-import: ^2.26.0 @@ -6387,7 +6803,7 @@ __metadata: "@rocket.chat/core-typings": "workspace:^" "@types/jest": ^27.4.1 "@types/node-rsa": ^1.1.1 - eslint: ^8.20.0 + eslint: ^8.22.0 jest: ^27.5.1 mongodb: ^4.3.1 ts-jest: ^27.1.5 @@ -6401,7 +6817,7 @@ __metadata: dependencies: "@rocket.chat/model-typings": "workspace:^" "@types/jest": ^27.4.1 - eslint: ^8.20.0 + eslint: ^8.22.0 jest: ^27.5.1 ts-jest: ^27.1.5 typescript: ~4.5.5 @@ -6444,7 +6860,7 @@ __metadata: resolution: "@rocket.chat/poplib@workspace:packages/node-poplib" dependencies: "@types/jest": ^27.4.1 - eslint: ^8.20.0 + eslint: ^8.22.0 jest: ^27.5.1 ts-jest: ^27.1.4 typescript: ~4.5.5 @@ -6520,7 +6936,7 @@ __metadata: "@rocket.chat/ui-kit": 0.31.21 "@types/jest": ^27.4.1 ajv: ^8.11.0 - eslint: ^8.20.0 + eslint: ^8.22.0 jest: ^27.5.1 mongodb: ^4.3.1 ts-jest: ^27.1.5 @@ -6590,7 +7006,7 @@ __metadata: languageName: node linkType: hard -"@rocket.chat/styled@npm:~0.31.22-dev.19": +"@rocket.chat/styled@npm:next, @rocket.chat/styled@npm:~0.31.22-dev.19": version: 0.31.22-dev.19 resolution: "@rocket.chat/styled@npm:0.31.22-dev.19" dependencies: @@ -6628,10 +7044,11 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/ui-client@workspace:packages/ui-client" dependencies: - "@rocket.chat/css-in-js": 0.31.21 + "@babel/core": ~7.18.13 + "@rocket.chat/css-in-js": next "@rocket.chat/fuselage": next - "@rocket.chat/fuselage-hooks": 0.31.21 - "@rocket.chat/icons": 0.31.21 + "@rocket.chat/fuselage-hooks": next + "@rocket.chat/icons": next "@rocket.chat/ui-contexts": "workspace:~" "@storybook/addon-actions": ~6.5.10 "@storybook/addon-docs": ~6.5.10 @@ -6643,10 +7060,12 @@ __metadata: "@storybook/manager-webpack4": ~6.5.10 "@storybook/react": ~6.5.10 "@storybook/testing-library": ~0.0.13 + "@types/babel__core": ^7 "@types/jest": ^27.4.1 "@types/postcss-url": ^10 - "@types/react": ~17.0.47 - eslint: ^8.20.0 + "@types/react": ~17.0.48 + "@types/react-dom": ~17.0.17 + eslint: ^8.22.0 eslint-plugin-anti-trojan-source: ^1.1.0 eslint-plugin-react: ^7.30.1 eslint-plugin-react-hooks: ^4.6.0 @@ -6667,6 +7086,7 @@ __metadata: "@rocket.chat/fuselage": "*" "@rocket.chat/fuselage-hooks": "*" "@rocket.chat/icons": "*" + "@rocket.chat/ui-contexts": "*" react: ~17.0.2 languageName: unknown linkType: soft @@ -6712,9 +7132,10 @@ __metadata: "@rocket.chat/fuselage-hooks": 0.31.21 "@rocket.chat/rest-typings": "workspace:^" "@types/jest": ^27.4.1 - "@types/react": ^17.0.47 + "@types/react": ~17.0.48 + "@types/react-dom": ~17.0.17 "@types/use-sync-external-store": ^0.0.3 - eslint: ^8.20.0 + eslint: ^8.22.0 jest: ^27.5.1 mongodb: ^4.3.1 react: ~17.0.2 @@ -6731,13 +7152,20 @@ __metadata: languageName: unknown linkType: soft -"@rocket.chat/ui-kit@npm:0.31.21, @rocket.chat/ui-kit@npm:^0.31.21": +"@rocket.chat/ui-kit@npm:0.31.21": version: 0.31.21 resolution: "@rocket.chat/ui-kit@npm:0.31.21" checksum: 05dadff647d75ae586217b36838b6b5dbc93b4d5dfa2c967306a4ccb238b9815d58d365ac9d4cc9d2ae5a6a46007285e8fd7781d118c59152319eb2a37b2f8eb languageName: node linkType: hard +"@rocket.chat/ui-kit@npm:next": + version: 0.32.0-dev.143 + resolution: "@rocket.chat/ui-kit@npm:0.32.0-dev.143" + checksum: 65077dd083e5abc2c115becc5823686f2f49c6810f3b874aa55b680d5e8f591aace502073ceaf89051c1da2f5b8122552a782acec92b8d233900737581fbbd33 + languageName: node + linkType: hard + "@rocket.chat/ui-theming@workspace:^, @rocket.chat/ui-theming@workspace:ee/packages/ui-theming": version: 0.0.0-use.local resolution: "@rocket.chat/ui-theming@workspace:ee/packages/ui-theming" @@ -6789,15 +7217,28 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/ui-video-conf@workspace:packages/ui-video-conf" dependencies: - "@rocket.chat/css-in-js": 0.31.21 + "@babel/core": ~7.18.13 + "@rocket.chat/css-in-js": next + "@rocket.chat/emitter": next "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/fuselage": next - "@rocket.chat/fuselage-hooks": 0.31.21 - "@rocket.chat/styled": 0.31.21 + "@rocket.chat/fuselage-hooks": next + "@rocket.chat/icons": next + "@rocket.chat/styled": next + "@rocket.chat/ui-contexts": "workspace:^" + "@storybook/addon-actions": ~6.5.10 + "@storybook/addon-docs": ~6.5.10 + "@storybook/addon-essentials": ~6.5.10 + "@storybook/builder-webpack4": ~6.5.10 + "@storybook/manager-webpack4": ~6.5.10 + "@storybook/react": ~6.5.10 + "@storybook/testing-library": ~0.0.13 + "@types/babel__core": ^7 "@types/jest": ^27.4.1 - eslint: ^8.20.0 + eslint: ^8.22.0 eslint-plugin-react: ^7.30.1 eslint-plugin-react-hooks: ^4.6.0 + eslint-plugin-storybook: ^0.6.4 jest: ^27.5.1 ts-jest: ^27.1.4 typescript: ~4.5.5 @@ -6805,7 +7246,9 @@ __metadata: "@rocket.chat/css-in-js": "*" "@rocket.chat/fuselage": "*" "@rocket.chat/fuselage-hooks": "*" + "@rocket.chat/icons": "*" "@rocket.chat/styled": "*" + "@rocket.chat/ui-contexts": "*" react: ^17.0.2 react-dom: ^17.0.2 languageName: unknown @@ -6817,7 +7260,7 @@ __metadata: dependencies: "@rocket.chat/layout": next "@rocket.chat/ui-contexts": "workspace:^" - "@tanstack/react-query": ^4.2.3 + "@tanstack/react-query": ^4.16.1 "@testing-library/react": ^13.3.0 "@types/jest": ^27.4.1 eslint: ^8.12.0 @@ -8681,19 +9124,18 @@ __metadata: languageName: node linkType: hard -"@tanstack/query-core@npm:4.2.3": - version: 4.2.3 - resolution: "@tanstack/query-core@npm:4.2.3" - checksum: b37efdc32b1731575eba398eda3b7a4cd3ed25ee1032d5200124c37ab4e58711d310e2e29e9e51284553a7c03c85e55cf8da6833bc3b1e215e0e43e7399ab3ca +"@tanstack/query-core@npm:4.15.1": + version: 4.15.1 + resolution: "@tanstack/query-core@npm:4.15.1" + checksum: ee98e75a3770fd35a6a10b9e7b3c417ea9da2b072481b5191d759182b29fd7bc4e8e340f83e2961b46fe4e1adac356087df04d4661c9459d09ff4d0574f683eb languageName: node linkType: hard -"@tanstack/react-query@npm:^4.0.10, @tanstack/react-query@npm:^4.2.3": - version: 4.2.3 - resolution: "@tanstack/react-query@npm:4.2.3" +"@tanstack/react-query@npm:^4.16.1": + version: 4.16.1 + resolution: "@tanstack/react-query@npm:4.16.1" dependencies: - "@tanstack/query-core": 4.2.3 - "@types/use-sync-external-store": ^0.0.3 + "@tanstack/query-core": 4.15.1 use-sync-external-store: ^1.2.0 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -8704,7 +9146,7 @@ __metadata: optional: true react-native: optional: true - checksum: 0a38ae05271e1669c6efd5cc77608103b6dfde577ecdc88c3f0e72953aea11c102c9b5a49fa2ca822f260a68f9f9646c5e847e7d87c99117b2c2e3b1356cbc8b + checksum: 2c2d4c5c8bab2cd978ddd42153d33f844bd24a17ebe42f269cc64ee2a031f60f980b441640172885d9fd156fe9abc74ffc800fb68c6b6f6ef4fe48ffadafff79 languageName: node linkType: hard @@ -9730,7 +10172,7 @@ __metadata: languageName: node linkType: hard -"@types/react-dom@npm:<18.0.0, @types/react-dom@npm:^17.0.11, @types/react-dom@npm:^17.0.17, @types/react-dom@npm:~17.0.17": +"@types/react-dom@npm:<18.0.0, @types/react-dom@npm:~17.0.17": version: 17.0.17 resolution: "@types/react-dom@npm:17.0.17" dependencies: @@ -9739,7 +10181,7 @@ __metadata: languageName: node linkType: hard -"@types/react-dom@npm:^18, @types/react-dom@npm:^18.0.0": +"@types/react-dom@npm:^18.0.0": version: 18.0.6 resolution: "@types/react-dom@npm:18.0.6" dependencies: @@ -9759,7 +10201,7 @@ __metadata: languageName: node linkType: hard -"@types/react@npm:^17.0.47, @types/react@npm:~17.0.39, @types/react@npm:~17.0.47": +"@types/react@npm:~17.0.47": version: 17.0.50 resolution: "@types/react@npm:17.0.50" dependencies: @@ -9770,6 +10212,17 @@ __metadata: languageName: node linkType: hard +"@types/react@npm:~17.0.48": + version: 17.0.52 + resolution: "@types/react@npm:17.0.52" + dependencies: + "@types/prop-types": "*" + "@types/scheduler": "*" + csstype: ^3.0.2 + checksum: a51b98dd87838d161278fdf9dd78e6a4ff8c018f406d6647f77963e144fb52a8beee40c89fd0e7e840eaeaa8bd9fe2f34519410540b1a52d43a6f8b4d2fbce33 + languageName: node + linkType: hard + "@types/responselike@npm:^1.0.0": version: 1.0.0 resolution: "@types/responselike@npm:1.0.0" @@ -16938,7 +17391,7 @@ __metadata: languageName: node linkType: hard -"eslint-scope@npm:^7.1.0, eslint-scope@npm:^7.1.1": +"eslint-scope@npm:^7.1.1": version: 7.1.1 resolution: "eslint-scope@npm:7.1.1" dependencies: @@ -16982,7 +17435,7 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^3.2.0, eslint-visitor-keys@npm:^3.3.0": +"eslint-visitor-keys@npm:^3.3.0": version: 3.3.0 resolution: "eslint-visitor-keys@npm:3.3.0" checksum: d59e68a7c5a6d0146526b0eec16ce87fbf97fe46b8281e0d41384224375c4e52f5ffb9e16d48f4ea50785cde93f766b0c898e31ab89978d88b0e1720fbfb7808 @@ -17186,29 +17639,33 @@ __metadata: languageName: node linkType: hard -"eslint@npm:~8.8.0": - version: 8.8.0 - resolution: "eslint@npm:8.8.0" +"eslint@npm:~8.22.0": + version: 8.22.0 + resolution: "eslint@npm:8.22.0" dependencies: - "@eslint/eslintrc": ^1.0.5 - "@humanwhocodes/config-array": ^0.9.2 + "@eslint/eslintrc": ^1.3.0 + "@humanwhocodes/config-array": ^0.10.4 + "@humanwhocodes/gitignore-to-minimatch": ^1.0.2 ajv: ^6.10.0 chalk: ^4.0.0 cross-spawn: ^7.0.2 debug: ^4.3.2 doctrine: ^3.0.0 escape-string-regexp: ^4.0.0 - eslint-scope: ^7.1.0 + eslint-scope: ^7.1.1 eslint-utils: ^3.0.0 - eslint-visitor-keys: ^3.2.0 - espree: ^9.3.0 + eslint-visitor-keys: ^3.3.0 + espree: ^9.3.3 esquery: ^1.4.0 esutils: ^2.0.2 fast-deep-equal: ^3.1.3 file-entry-cache: ^6.0.1 + find-up: ^5.0.0 functional-red-black-tree: ^1.0.1 glob-parent: ^6.0.1 - globals: ^13.6.0 + globals: ^13.15.0 + globby: ^11.1.0 + grapheme-splitter: ^1.0.4 ignore: ^5.2.0 import-fresh: ^3.0.0 imurmurhash: ^0.1.4 @@ -17217,7 +17674,7 @@ __metadata: json-stable-stringify-without-jsonify: ^1.0.1 levn: ^0.4.1 lodash.merge: ^4.6.2 - minimatch: ^3.0.4 + minimatch: ^3.1.2 natural-compare: ^1.4.0 optionator: ^0.9.1 regexpp: ^3.2.0 @@ -17227,7 +17684,7 @@ __metadata: v8-compile-cache: ^2.0.3 bin: eslint: bin/eslint.js - checksum: 41a7e85bf84cf9f2d758ef3e8d08020a39a2836703728b59535684681349bd021c2c6e24174462b844a914870d707d2151e0371198899d957b444de91adaa435 + checksum: 2d84a7a2207138cdb250759b047fdb05a57fede7f87b7a039d9370edba7f26e23a873a208becfd4b2c9e4b5499029f3fc3b9318da3290e693d25c39084119c80 languageName: node linkType: hard @@ -17242,7 +17699,18 @@ __metadata: languageName: node linkType: hard -"espree@npm:^9.3.0, espree@npm:^9.4.0": +"espree@npm:^9.3.3": + version: 9.4.1 + resolution: "espree@npm:9.4.1" + dependencies: + acorn: ^8.8.0 + acorn-jsx: ^5.3.2 + eslint-visitor-keys: ^3.3.0 + checksum: 4d266b0cf81c7dfe69e542c7df0f246e78d29f5b04dda36e514eb4c7af117ee6cfbd3280e560571ed82ff6c9c3f0003c05b82583fc7a94006db7497c4fe4270e + languageName: node + linkType: hard + +"espree@npm:^9.4.0": version: 9.4.0 resolution: "espree@npm:9.4.0" dependencies: @@ -30120,7 +30588,7 @@ __metadata: languageName: node linkType: hard -"react@npm:^17.0.2, react@npm:~17.0.2": +"react@npm:~17.0.2": version: 17.0.2 resolution: "react@npm:17.0.2" dependencies: