From 6ac36075332ef2cffda6f1ad29960917e6dd9788 Mon Sep 17 00:00:00 2001 From: Matheus Barbosa Silva <36537004+matheusbsilva137@users.noreply.github.com> Date: Mon, 20 May 2024 16:19:27 -0300 Subject: [PATCH 01/35] fix: "Allow Password Change for OAuth Users" setting is not honored in the "Forgot Password" flow (#32398) --- .changeset/wise-pianos-explode.md | 5 ++++ .../server/methods/sendForgotPasswordEmail.ts | 2 +- apps/meteor/tests/e2e/saml.spec.ts | 25 +++++++++++++++++++ .../tests/e2e/utils/omnichannel/monitors.ts | 2 +- .../tests/e2e/utils/omnichannel/tags.ts | 2 +- .../tests/e2e/utils/omnichannel/units.ts | 2 +- .../utils.ts => parseMeteorResponse.ts} | 0 7 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 .changeset/wise-pianos-explode.md rename apps/meteor/tests/e2e/utils/{omnichannel/utils.ts => parseMeteorResponse.ts} (100%) diff --git a/.changeset/wise-pianos-explode.md b/.changeset/wise-pianos-explode.md new file mode 100644 index 000000000000..3473275e20ab --- /dev/null +++ b/.changeset/wise-pianos-explode.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +Fixed issue with external users being able to reset their passwords even when the "Allow Password Change for OAuth Users" setting is disabled diff --git a/apps/meteor/server/methods/sendForgotPasswordEmail.ts b/apps/meteor/server/methods/sendForgotPasswordEmail.ts index 474d9bf06e46..b77f6318a324 100644 --- a/apps/meteor/server/methods/sendForgotPasswordEmail.ts +++ b/apps/meteor/server/methods/sendForgotPasswordEmail.ts @@ -20,7 +20,7 @@ Meteor.methods({ const email = to.trim().toLowerCase(); - const user = await Users.findOneByEmailAddress(email, { projection: { _id: 1 } }); + const user = await Users.findOneByEmailAddress(email, { projection: { _id: 1, services: 1 } }); if (!user) { return true; diff --git a/apps/meteor/tests/e2e/saml.spec.ts b/apps/meteor/tests/e2e/saml.spec.ts index dc18aeae37c3..8859e46e71c5 100644 --- a/apps/meteor/tests/e2e/saml.spec.ts +++ b/apps/meteor/tests/e2e/saml.spec.ts @@ -12,6 +12,7 @@ import { Users } from './fixtures/userStates'; import { Registration } from './page-objects'; import { createCustomRole, deleteCustomRole } from './utils/custom-role'; import { getUserInfo } from './utils/getUserInfo'; +import { parseMeteorResponse } from './utils/parseMeteorResponse'; import { setSettingValueById } from './utils/setSettingValueById'; import { test, expect, BaseTest } from './utils/test'; @@ -195,6 +196,30 @@ test.describe('SAML', () => { }); }); + test('Allow password change for OAuth users', async ({ api }) => { + await test.step("should not send password reset mail if 'Allow Password Change for OAuth Users' setting is disabled", async () => { + expect((await setSettingValueById(api, 'Accounts_AllowPasswordChangeForOAuthUsers', false)).status()).toBe(200); + + const response = await api.post('/method.call/sendForgotPasswordEmail', { + message: JSON.stringify({ msg: 'method', id: 'id', method: 'sendForgotPasswordEmail', params: ['samluser1@example.com'] }), + }); + const mailSent = await parseMeteorResponse(response); + expect(response.status()).toBe(200); + expect(mailSent).toBe(false); + }); + + await test.step("should send password reset mail if 'Allow Password Change for OAuth Users' setting is enabled", async () => { + expect((await setSettingValueById(api, 'Accounts_AllowPasswordChangeForOAuthUsers', true)).status()).toBe(200); + + const response = await api.post('/method.call/sendForgotPasswordEmail', { + message: JSON.stringify({ msg: 'method', id: 'id', method: 'sendForgotPasswordEmail', params: ['samluser1@example.com'] }), + }); + const mailSent = await parseMeteorResponse(response); + expect(response.status()).toBe(200); + expect(mailSent).toBe(true); + }); + }); + const doLoginStep = async (page: Page, username: string, redirectUrl: string | null = '/home') => { await test.step('expect successful login', async () => { await poRegistration.btnLoginWithSaml.click(); diff --git a/apps/meteor/tests/e2e/utils/omnichannel/monitors.ts b/apps/meteor/tests/e2e/utils/omnichannel/monitors.ts index 308e6f4460a4..f92ff9244ec5 100644 --- a/apps/meteor/tests/e2e/utils/omnichannel/monitors.ts +++ b/apps/meteor/tests/e2e/utils/omnichannel/monitors.ts @@ -1,5 +1,5 @@ +import { parseMeteorResponse } from '../parseMeteorResponse'; import { BaseTest } from '../test'; -import { parseMeteorResponse } from './utils'; const removeMonitor = async (api: BaseTest['api'], id: string) => api.post('/method.call/livechat:removeMonitor', { diff --git a/apps/meteor/tests/e2e/utils/omnichannel/tags.ts b/apps/meteor/tests/e2e/utils/omnichannel/tags.ts index 078ca8dd02f7..169f4825bd75 100644 --- a/apps/meteor/tests/e2e/utils/omnichannel/tags.ts +++ b/apps/meteor/tests/e2e/utils/omnichannel/tags.ts @@ -1,7 +1,7 @@ import { ILivechatTag } from '@rocket.chat/core-typings'; +import { parseMeteorResponse } from '../parseMeteorResponse'; import { BaseTest } from '../test'; -import { parseMeteorResponse } from './utils'; type CreateTagParams = { id?: string | null; diff --git a/apps/meteor/tests/e2e/utils/omnichannel/units.ts b/apps/meteor/tests/e2e/utils/omnichannel/units.ts index fa872a37eae6..bbc37ed12df8 100644 --- a/apps/meteor/tests/e2e/utils/omnichannel/units.ts +++ b/apps/meteor/tests/e2e/utils/omnichannel/units.ts @@ -1,8 +1,8 @@ import { faker } from '@faker-js/faker'; import { IOmnichannelBusinessUnit } from '@rocket.chat/core-typings'; +import { parseMeteorResponse } from '../parseMeteorResponse'; import { BaseTest } from '../test'; -import { parseMeteorResponse } from './utils'; type CreateUnitParams = { id?: string | null; diff --git a/apps/meteor/tests/e2e/utils/omnichannel/utils.ts b/apps/meteor/tests/e2e/utils/parseMeteorResponse.ts similarity index 100% rename from apps/meteor/tests/e2e/utils/omnichannel/utils.ts rename to apps/meteor/tests/e2e/utils/parseMeteorResponse.ts From f83bd56cc5501e75cef282ea3069337deac8abdc Mon Sep 17 00:00:00 2001 From: Matheus Barbosa Silva <36537004+matheusbsilva137@users.noreply.github.com> Date: Mon, 20 May 2024 18:39:51 -0300 Subject: [PATCH 02/35] fix: `rooms.export` endpoint generates an empty export when given an invalid date (#32364) --- .changeset/ninety-rivers-mix.md | 6 + apps/meteor/app/api/server/v1/rooms.ts | 20 +- .../ExportMessages/FileExport.tsx | 8 +- .../ExportMessages/MailExportForm.tsx | 4 +- .../dataExport/exportRoomMessagesToFile.ts | 8 +- apps/meteor/tests/end-to-end/api/09-rooms.js | 298 ++++++++++++++++++ apps/meteor/tests/mocks/data.ts | 27 ++ .../apps/server/mocks/data/messages.data.js | 21 ++ .../exportRoomMessagesToFile.spec.ts | 158 ++++++++++ packages/rest-typings/src/v1/rooms.ts | 143 +++++---- 10 files changed, 607 insertions(+), 86 deletions(-) create mode 100644 .changeset/ninety-rivers-mix.md create mode 100644 apps/meteor/tests/unit/server/lib/dataExport/exportRoomMessagesToFile.spec.ts diff --git a/.changeset/ninety-rivers-mix.md b/.changeset/ninety-rivers-mix.md new file mode 100644 index 000000000000..fbd10b2a04d1 --- /dev/null +++ b/.changeset/ninety-rivers-mix.md @@ -0,0 +1,6 @@ +--- +"@rocket.chat/meteor": patch +"@rocket.chat/rest-typings": minor +--- + +Fixed issue with "Export room as file" feature (`rooms.export` endpoint) generating an empty export when given an invalid date diff --git a/apps/meteor/app/api/server/v1/rooms.ts b/apps/meteor/app/api/server/v1/rooms.ts index 9576a79f6678..40998201b03b 100644 --- a/apps/meteor/app/api/server/v1/rooms.ts +++ b/apps/meteor/app/api/server/v1/rooms.ts @@ -2,7 +2,7 @@ import { Media } from '@rocket.chat/core-services'; import type { IRoom, IUpload } from '@rocket.chat/core-typings'; import { Messages, Rooms, Users, Uploads } from '@rocket.chat/models'; import type { Notifications } from '@rocket.chat/rest-typings'; -import { isGETRoomsNameExists, isRoomsImagesProps, isRoomsMuteUnmuteUserProps } from '@rocket.chat/rest-typings'; +import { isGETRoomsNameExists, isRoomsImagesProps, isRoomsMuteUnmuteUserProps, isRoomsExportProps } from '@rocket.chat/rest-typings'; import { Meteor } from 'meteor/meteor'; import { isTruthy } from '../../../../lib/isTruthy'; @@ -599,15 +599,11 @@ API.v1.addRoute( API.v1.addRoute( 'rooms.export', - { authRequired: true }, + { authRequired: true, validateParams: isRoomsExportProps }, { async post() { const { rid, type } = this.bodyParams; - if (!rid || !type || !['email', 'file'].includes(type)) { - throw new Meteor.Error('error-invalid-params'); - } - if (!(await hasPermissionAsync(this.userId, 'mail-messages', rid))) { throw new Meteor.Error('error-action-not-allowed', 'Mailing is not allowed'); } @@ -627,12 +623,8 @@ API.v1.addRoute( const { dateFrom, dateTo } = this.bodyParams; const { format } = this.bodyParams; - if (!['html', 'json'].includes(format || '')) { - throw new Meteor.Error('error-invalid-format'); - } - - const convertedDateFrom = new Date(dateFrom || ''); - const convertedDateTo = new Date(dateTo || ''); + const convertedDateFrom = dateFrom ? new Date(dateFrom) : new Date(0); + const convertedDateTo = dateTo ? new Date(dateTo) : new Date(); convertedDateTo.setDate(convertedDateTo.getDate() + 1); if (convertedDateFrom > convertedDateTo) { @@ -658,10 +650,6 @@ API.v1.addRoute( throw new Meteor.Error('error-invalid-recipient'); } - if (messages?.length === 0) { - throw new Meteor.Error('error-invalid-messages'); - } - const result = await dataExport.sendViaEmail( { rid, diff --git a/apps/meteor/client/views/room/contextualBar/ExportMessages/FileExport.tsx b/apps/meteor/client/views/room/contextualBar/ExportMessages/FileExport.tsx index 3d5bc5966cab..9f52085e7bd2 100644 --- a/apps/meteor/client/views/room/contextualBar/ExportMessages/FileExport.tsx +++ b/apps/meteor/client/views/room/contextualBar/ExportMessages/FileExport.tsx @@ -31,12 +31,12 @@ const FileExport = ({ formId, rid, exportOptions, onCancel }: FileExportProps) = [t], ); - const handleExport = ({ type, dateFrom, dateTo, format }: MailExportFormValues) => { + const handleExport = ({ dateFrom, dateTo, format }: MailExportFormValues) => { roomExportMutation.mutateAsync({ rid, - type, - dateFrom, - dateTo, + type: 'file', + ...(dateFrom && { dateFrom }), + ...(dateTo && { dateTo }), format, }); }; diff --git a/apps/meteor/client/views/room/contextualBar/ExportMessages/MailExportForm.tsx b/apps/meteor/client/views/room/contextualBar/ExportMessages/MailExportForm.tsx index 6a48e4b679bc..39e043bb9c0b 100644 --- a/apps/meteor/client/views/room/contextualBar/ExportMessages/MailExportForm.tsx +++ b/apps/meteor/client/views/room/contextualBar/ExportMessages/MailExportForm.tsx @@ -72,10 +72,10 @@ const MailExportForm = ({ formId, rid, onCancel, exportOptions }: MailExportForm setValue('messagesCount', messages.length); }, [setValue, messages.length]); - const handleExport = async ({ type, toUsers, subject, additionalEmails }: MailExportFormValues) => { + const handleExport = async ({ toUsers, subject, additionalEmails }: MailExportFormValues) => { roomExportMutation.mutateAsync({ rid, - type, + type: 'email', toUsers, toEmails: additionalEmails?.split(','), subject, diff --git a/apps/meteor/server/lib/dataExport/exportRoomMessagesToFile.ts b/apps/meteor/server/lib/dataExport/exportRoomMessagesToFile.ts index 8104d0ed83fb..1faa7538d146 100644 --- a/apps/meteor/server/lib/dataExport/exportRoomMessagesToFile.ts +++ b/apps/meteor/server/lib/dataExport/exportRoomMessagesToFile.ts @@ -56,13 +56,13 @@ const getAttachmentData = (attachment: MessageAttachment, message: IMessage) => }; }; -type MessageData = Pick & { +export type MessageData = Pick & { username?: IUser['username'] | IUser['name']; attachments?: ReturnType[]; type?: IMessage['t']; }; -const getMessageData = ( +export const getMessageData = ( msg: IMessage, hideUsers: boolean, userData: Pick | undefined, @@ -160,7 +160,7 @@ const getMessageData = ( return messageObject; }; -const exportMessageObject = (type: 'json' | 'html', messageObject: MessageData, messageFile?: FileProp): string => { +export const exportMessageObject = (type: 'json' | 'html', messageObject: MessageData, messageFile?: FileProp): string => { if (type === 'json') { return JSON.stringify(messageObject); } @@ -192,7 +192,7 @@ const exportMessageObject = (type: 'json' | 'html', messageObject: MessageData, return file.join('\n'); }; -const exportRoomMessages = async ( +export const exportRoomMessages = async ( rid: IRoom['_id'], exportType: 'json' | 'html', skip: number, diff --git a/apps/meteor/tests/end-to-end/api/09-rooms.js b/apps/meteor/tests/end-to-end/api/09-rooms.js index b9b8f71036af..dc8a6a209300 100644 --- a/apps/meteor/tests/end-to-end/api/09-rooms.js +++ b/apps/meteor/tests/end-to-end/api/09-rooms.js @@ -2140,4 +2140,302 @@ describe('[Rooms]', function () { }); }); }); + + describe('/rooms.export', () => { + let testChannel; + let testMessageId; + + before(async () => { + const result = await createRoom({ type: 'c', name: `channel.export.test.${Date.now()}-${Math.random()}` }); + testChannel = result.body.channel; + const { body: { message } = {} } = await sendSimpleMessage({ + roomId: testChannel._id, + text: 'Message to create thread', + }); + testMessageId = message._id; + }); + + after(() => deleteRoom({ type: 'c', roomId: testChannel._id })); + + it('should fail exporting room as file if dates are incorrectly provided', async () => { + return request + .post(api('rooms.export')) + .set(credentials) + .send({ + rid: testChannel._id, + type: 'file', + dateFrom: 'test-date', + dateTo: 'test-date', + format: 'html', + }) + .expect('Content-Type', 'application/json') + .expect(400) + .expect((res) => { + expect(res.body).to.have.property('success', false); + expect(res.body).to.have.property('errorType', 'invalid-params'); + }); + }); + + it('should fail exporting room as file if no roomId is provided', async () => { + return request + .post(api('rooms.export')) + .set(credentials) + .send({ + type: 'file', + dateFrom: '2024-03-15', + dateTo: '2024-03-22', + format: 'html', + }) + .expect('Content-Type', 'application/json') + .expect(400) + .expect((res) => { + expect(res.body).to.have.property('success', false); + expect(res.body).to.have.property('errorType', 'invalid-params'); + expect(res.body).to.have.property('error').include("must have required property 'rid'"); + }); + }); + + it('should fail exporting room as file if no type is provided', async () => { + return request + .post(api('rooms.export')) + .set(credentials) + .send({ + rid: testChannel._id, + dateFrom: '2024-03-15', + dateTo: '2024-03-22', + format: 'html', + }) + .expect('Content-Type', 'application/json') + .expect(400) + .expect((res) => { + expect(res.body).to.have.property('success', false); + expect(res.body).to.have.property('errorType', 'invalid-params'); + expect(res.body).to.have.property('error').include("must have required property 'type'"); + }); + }); + + it('should fail exporting room as file if fromDate is after toDate (incorrect date interval)', async () => { + return request + .post(api('rooms.export')) + .set(credentials) + .send({ + rid: testChannel._id, + type: 'file', + dateFrom: '2024-03-22', + dateTo: '2024-03-15', + format: 'html', + }) + .expect('Content-Type', 'application/json') + .expect(400) + .expect((res) => { + expect(res.body).to.have.property('success', false); + expect(res.body).to.have.property('errorType', 'error-invalid-dates'); + expect(res.body).to.have.property('error', 'From date cannot be after To date [error-invalid-dates]'); + }); + }); + + it('should fail exporting room as file if invalid roomId is provided', async () => { + return request + .post(api('rooms.export')) + .set(credentials) + .send({ + rid: 'invalid-rid', + type: 'file', + dateFrom: '2024-03-22', + dateTo: '2024-03-15', + format: 'html', + }) + .expect('Content-Type', 'application/json') + .expect(400) + .expect((res) => { + expect(res.body).to.have.property('success', false); + expect(res.body).to.have.property('errorType', 'error-invalid-room'); + }); + }); + + it('should fail exporting room as file if no format is provided', async () => { + return request + .post(api('rooms.export')) + .set(credentials) + .send({ + rid: testChannel._id, + type: 'file', + dateFrom: '2024-03-15', + dateTo: '2024-03-22', + }) + .expect('Content-Type', 'application/json') + .expect(400) + .expect((res) => { + expect(res.body).to.have.property('success', false); + expect(res.body).to.have.property('errorType', 'invalid-params'); + }); + }); + + it('should fail exporting room as file if an invalid format is provided', async () => { + return request + .post(api('rooms.export')) + .set(credentials) + .send({ + rid: testChannel._id, + type: 'file', + dateFrom: '2024-03-15', + dateTo: '2024-03-22', + format: 'invalid-format', + }) + .expect('Content-Type', 'application/json') + .expect(400) + .expect((res) => { + expect(res.body).to.have.property('success', false); + expect(res.body).to.have.property('errorType', 'invalid-params'); + }); + }); + + it('should fail exporting room as file if an invalid type is provided', async () => { + return request + .post(api('rooms.export')) + .set(credentials) + .send({ + rid: testChannel._id, + type: 'invalid-type', + dateFrom: '2024-03-15', + dateTo: '2024-03-22', + format: 'html', + }) + .expect('Content-Type', 'application/json') + .expect(400) + .expect((res) => { + expect(res.body).to.have.property('success', false); + expect(res.body).to.have.property('errorType', 'invalid-params'); + }); + }); + + it('should succesfully export room as file', async () => { + return request + .post(api('rooms.export')) + .set(credentials) + .send({ + rid: testChannel._id, + type: 'file', + dateFrom: '2024-03-15', + dateTo: '2024-03-22', + format: 'html', + }) + .expect('Content-Type', 'application/json') + .expect(200) + .expect((res) => { + expect(res.body).to.have.property('success', true); + }); + }); + + it('should succesfully export room as file even if no dates are provided', async () => { + return request + .post(api('rooms.export')) + .set(credentials) + .send({ + rid: testChannel._id, + type: 'file', + format: 'html', + }) + .expect('Content-Type', 'application/json') + .expect(200) + .expect((res) => { + expect(res.body).to.have.property('success', true); + }); + }); + + it('should fail exporting room via email if target users AND target emails are NOT provided', async () => { + return request + .post(api('rooms.export')) + .set(credentials) + .send({ + rid: testChannel._id, + type: 'email', + toUsers: [], + subject: 'Test Subject', + messages: [testMessageId], + }) + .expect('Content-Type', 'application/json') + .expect(400) + .expect((res) => { + expect(res.body).to.have.property('success', false); + expect(res.body).to.have.property('errorType', 'error-invalid-recipient'); + }); + }); + + it('should fail exporting room via email if no target e-mails are provided', async () => { + return request + .post(api('rooms.export')) + .set(credentials) + .send({ + rid: testChannel._id, + type: 'email', + toEmails: [], + subject: 'Test Subject', + messages: [testMessageId], + }) + .expect('Content-Type', 'application/json') + .expect(400) + .expect((res) => { + expect(res.body).to.have.property('success', false); + expect(res.body).to.have.property('errorType', 'error-invalid-recipient'); + }); + }); + + it('should fail exporting room via email if no target users or e-mails params are provided', async () => { + return request + .post(api('rooms.export')) + .set(credentials) + .send({ + rid: testChannel._id, + type: 'email', + subject: 'Test Subject', + messages: [testMessageId], + }) + .expect('Content-Type', 'application/json') + .expect(400) + .expect((res) => { + expect(res.body).to.have.property('success', false); + expect(res.body).to.have.property('errorType', 'error-invalid-recipient'); + }); + }); + + it('should fail exporting room via email if no messages are provided', async () => { + return request + .post(api('rooms.export')) + .set(credentials) + .send({ + rid: testChannel._id, + type: 'email', + toUsers: [credentials['X-User-Id']], + subject: 'Test Subject', + messages: [], + }) + .expect('Content-Type', 'application/json') + .expect(400) + .expect((res) => { + expect(res.body).to.have.property('success', false); + expect(res.body).to.have.property('errorType', 'invalid-params'); + }); + }); + + it('should succesfully export room via email', async () => { + return request + .post(api('rooms.export')) + .set(credentials) + .send({ + rid: testChannel._id, + type: 'email', + toUsers: [credentials['X-User-Id']], + subject: 'Test Subject', + messages: [testMessageId], + }) + .expect('Content-Type', 'application/json') + .expect(200) + .expect((res) => { + expect(res.body).to.have.property('success', true); + expect(res.body).to.have.property('missing'); + expect(res.body.missing).to.be.an('array').that.is.empty; + }); + }); + }); }); diff --git a/apps/meteor/tests/mocks/data.ts b/apps/meteor/tests/mocks/data.ts index 812de9579b4e..5e48d89f7199 100644 --- a/apps/meteor/tests/mocks/data.ts +++ b/apps/meteor/tests/mocks/data.ts @@ -228,3 +228,30 @@ export const createFakeLicenseInfo = (partial: Partial(overrides?: Partial): TMessage; +export function createFakeMessageWithAttachment(overrides?: Partial): IMessage { + const fakeMessage = createFakeMessage(overrides); + const fileId = faker.database.mongodbObjectId(); + const fileName = faker.system.commonFileName('txt'); + + return { + ...fakeMessage, + msg: '', + file: { + _id: fileId, + name: fileName, + type: 'text/plain', + size: faker.number.int(), + format: faker.string.alpha(), + }, + attachments: [ + { + type: 'file', + title: fileName, + title_link: `/file-upload/${fileId}/${fileName}`, + }, + ], + ...overrides, + }; +} diff --git a/apps/meteor/tests/unit/app/apps/server/mocks/data/messages.data.js b/apps/meteor/tests/unit/app/apps/server/mocks/data/messages.data.js index cc108b8374ed..70d1505d97fe 100644 --- a/apps/meteor/tests/unit/app/apps/server/mocks/data/messages.data.js +++ b/apps/meteor/tests/unit/app/apps/server/mocks/data/messages.data.js @@ -1,3 +1,7 @@ +import { faker } from '@faker-js/faker'; + +import { createFakeMessage, createFakeMessageWithAttachment } from '../../../../../../mocks/data'; + export const appMessageMock = { id: 'appMessageMock', text: 'rocket.cat', @@ -105,3 +109,20 @@ export const appMessageInvalidRoomMock = { t: 'uj', }, }; + +const testUsername = faker.internet.userName(); +const testUserId = faker.database.mongodbObjectId(); +export const exportMessagesMock = [ + createFakeMessage({ t: 'uj', u: { _id: testUserId, username: testUsername }, msg: testUsername }), + createFakeMessageWithAttachment(), + createFakeMessageWithAttachment({ + attachments: [ + { + type: 'file', + title_link: '/file-upload/txt-file-id/test.txt', + }, + ], + }), + createFakeMessage(), + createFakeMessage({ t: 'ujt', u: { _id: testUserId, username: testUsername }, msg: testUsername }), +]; diff --git a/apps/meteor/tests/unit/server/lib/dataExport/exportRoomMessagesToFile.spec.ts b/apps/meteor/tests/unit/server/lib/dataExport/exportRoomMessagesToFile.spec.ts new file mode 100644 index 000000000000..6fb15a680282 --- /dev/null +++ b/apps/meteor/tests/unit/server/lib/dataExport/exportRoomMessagesToFile.spec.ts @@ -0,0 +1,158 @@ +import { faker } from '@faker-js/faker'; +import { expect } from 'chai'; +import { before, describe, it } from 'mocha'; +import proxyquire from 'proxyquire'; +import sinon from 'sinon'; + +import type { MessageData } from '../../../../../server/lib/dataExport/exportRoomMessagesToFile'; +import { exportMessagesMock } from '../../../app/apps/server/mocks/data/messages.data'; + +// Create stubs for dependencies +const stubs = { + findPaginatedMessages: sinon.stub(), + mkdir: sinon.stub(), + writeFile: sinon.stub(), + findPaginatedMessagesCursor: sinon.stub(), + findPaginatedMessagesTotal: sinon.stub(), + translateKey: sinon.stub(), + settings: sinon.stub(), +}; + +const { getMessageData, exportRoomMessages, exportMessageObject } = proxyquire + .noCallThru() + .load('../../../../../server/lib/dataExport/exportRoomMessagesToFile.ts', { + '@rocket.chat/models': { + Messages: { + findPaginated: stubs.findPaginatedMessages, + }, + }, + 'fs/promises': { + mkdir: stubs.mkdir, + writeFile: stubs.writeFile, + }, + '../i18n': { + i18n: { + t: stubs.translateKey, + }, + }, + '../../../app/settings/server': { + settings: stubs.settings, + }, + }); + +describe('Export - exportMessageObject', () => { + let messagesData: MessageData[]; + const translationPlaceholder = 'translation-placeholder'; + before(() => { + stubs.translateKey.returns(translationPlaceholder); + messagesData = exportMessagesMock.map((message) => getMessageData(message, false)); + }); + + it('should only stringify message object when exporting message as json', async () => { + const result = await exportMessageObject('json', messagesData[3]); + + expect(result).to.be.a.string; + expect(result).to.equal(JSON.stringify(messagesData[3])); + }); + + it('should correctly add tags when exporting plain text message object as html', async () => { + const result = await exportMessageObject('html', messagesData[3]); + + expect(result).to.be.a.string; + expect(result).to.equal( + `

${messagesData[3].username} (${new Date(messagesData[3].ts).toUTCString()}):
\n${messagesData[3].msg}\n

`, + ); + }); + + it('should correctly format system messages when exporting message object as html', async () => { + const result = await exportMessageObject('html', messagesData[0]); + + expect(messagesData[0].msg).to.equal(translationPlaceholder); + expect(result).to.be.a.string; + expect(result).to.equal( + `

${messagesData[0].username} (${new Date(messagesData[0].ts).toUTCString()}):
\n${ + messagesData[0].msg + }\n

`, + ); + }); + + it('should correctly format non italic system messages when exporting message object as html', async () => { + const result = await exportMessageObject('html', messagesData[4]); + + expect(messagesData[4].msg).to.equal(translationPlaceholder); + expect(result).to.be.a.string; + expect(result).to.equal( + `

${messagesData[4].username} (${new Date(messagesData[4].ts).toUTCString()}):
\n${messagesData[4].msg}\n

`, + ); + }); + + it('should correctly reference file when exporting a message object with an attachment as html', async () => { + const result = await exportMessageObject('html', messagesData[1], exportMessagesMock[1].file); + + expect(result).to.be.a.string; + expect(result).to.equal( + `

${messagesData[1].username} (${new Date(messagesData[1].ts).toUTCString()}):
\n${ + messagesData[1].msg + }\n
${ + messagesData[1].attachments?.[0].title + }\n

`, + ); + }); + + it('should use fallback attachment description when no title is provided on message object export as html', async () => { + const result = await exportMessageObject('html', messagesData[2], exportMessagesMock[2].file); + + expect(stubs.translateKey.calledWith('Message_Attachments')).to.be.true; + expect(result).to.be.a.string; + expect(result).to.equal( + `

${messagesData[2].username} (${new Date(messagesData[2].ts).toUTCString()}):
\n${ + exportMessagesMock[1].msg + }\n
${translationPlaceholder}\n

`, + ); + }); +}); + +describe('Export - exportRoomMessages', () => { + const totalMessages = 10; + const userData = { + _id: faker.database.mongodbObjectId(), + name: faker.person.fullName(), + username: faker.internet.userName(), + }; + + before(() => { + stubs.findPaginatedMessagesCursor.resolves(exportMessagesMock); + stubs.findPaginatedMessagesTotal.resolves(totalMessages); + stubs.findPaginatedMessages.returns({ + cursor: { toArray: stubs.findPaginatedMessagesCursor }, + totalCount: stubs.findPaginatedMessagesTotal(), + }); + stubs.translateKey.returns('translated-placeholder-uj'); + }); + + it('should correctly export multiple messages to result when exporting room as json', async () => { + const result = await exportRoomMessages('test-rid', 'json', 0, 100, userData); + + expect(stubs.translateKey.calledWith('User_joined_the_channel')).to.be.true; + expect(result).to.be.an('object'); + expect(result).to.have.property('total', totalMessages); + expect(result).to.have.property('exported', exportMessagesMock.length); + expect(result).to.have.property('messages').that.is.an('array').of.length(exportMessagesMock.length); + const messagesWithFiles = exportMessagesMock.filter((message) => message.file); + expect(result).to.have.property('uploads').that.is.an('array').of.length(messagesWithFiles.length); + }); + + it('should correctly export multiple messages to result when exporting room as html', async () => { + const result = await exportRoomMessages('test-rid', 'html', 0, 100, userData); + + expect(stubs.translateKey.calledWith('User_joined_the_channel')).to.be.true; + expect(result).to.be.an('object'); + expect(result).to.have.property('total', totalMessages); + expect(result).to.have.property('exported', exportMessagesMock.length); + expect(result).to.have.property('messages').that.is.an('array').of.length(exportMessagesMock.length); + const messagesWithFiles = exportMessagesMock.filter((message) => message.file); + expect(result).to.have.property('uploads').that.is.an('array').of.length(messagesWithFiles.length); + }); +}); diff --git a/packages/rest-typings/src/v1/rooms.ts b/packages/rest-typings/src/v1/rooms.ts index bb97d37b90d4..da68daf25050 100644 --- a/packages/rest-typings/src/v1/rooms.ts +++ b/packages/rest-typings/src/v1/rooms.ts @@ -1,12 +1,8 @@ import type { IMessage, IRoom, IUser, RoomAdminFieldsType, IUpload } from '@rocket.chat/core-typings'; -import Ajv from 'ajv'; import type { PaginatedRequest } from '../helpers/PaginatedRequest'; import type { PaginatedResult } from '../helpers/PaginatedResult'; - -const ajv = new Ajv({ - coerceTypes: true, -}); +import { ajv } from './Ajv'; type RoomsAutoCompleteChannelAndPrivateProps = { selector: string }; @@ -169,73 +165,100 @@ const RoomsCreateDiscussionSchema = { export const isRoomsCreateDiscussionProps = ajv.compile(RoomsCreateDiscussionSchema); -type RoomsExportProps = { +type RoomsExportProps = RoomsExportFileProps | RoomsExportEmailProps; + +type RoomsExportFileProps = { rid: IRoom['_id']; - type: 'email' | 'file'; + type: 'file'; + format: 'html' | 'json'; + dateFrom?: string; + dateTo?: string; +}; + +type RoomsExportEmailProps = { + rid: IRoom['_id']; + type: 'email'; toUsers?: IUser['username'][]; toEmails?: string[]; additionalEmails?: string; subject?: string; - messages?: IMessage['_id'][]; - dateFrom?: string; - dateTo?: string; - format?: 'html' | 'json'; + messages: IMessage['_id'][]; }; const RoomsExportSchema = { - type: 'object', - properties: { - rid: { - type: 'string', - }, - type: { - type: 'string', - nullable: true, - }, - toUsers: { - type: 'array', - items: { - type: 'string', - }, - nullable: true, - }, - toEmails: { - type: 'array', - items: { - type: 'string', + oneOf: [ + { + type: 'object', + properties: { + rid: { + type: 'string', + }, + type: { + type: 'string', + enum: ['file'], + }, + format: { + type: 'string', + enum: ['html', 'json'], + }, + dateFrom: { + type: 'string', + nullable: true, + format: 'date', + }, + dateTo: { + type: 'string', + nullable: true, + format: 'date', + }, }, - nullable: true, - }, - additionalEmails: { - type: 'string', - nullable: true, - }, - subject: { - type: 'string', - nullable: true, + required: ['rid', 'type', 'format'], + additionalProperties: false, }, - messages: { - type: 'array', - items: { - type: 'string', + { + type: 'object', + properties: { + rid: { + type: 'string', + }, + type: { + type: 'string', + enum: ['email'], + }, + toUsers: { + type: 'array', + items: { + type: 'string', + }, + nullable: true, + }, + toEmails: { + type: 'array', + items: { + type: 'string', + }, + nullable: true, + }, + additionalEmails: { + type: 'string', + nullable: true, + }, + subject: { + type: 'string', + nullable: true, + }, + messages: { + type: 'array', + items: { + type: 'string', + }, + minItems: 1, + }, }, - nullable: true, - }, - dateFrom: { - type: 'string', - nullable: true, - }, - dateTo: { - type: 'string', - nullable: true, - }, - format: { - type: 'string', - nullable: true, + required: ['rid', 'type', 'messages'], + additionalProperties: false, }, - }, - required: ['rid'], - additionalProperties: false, + ], }; export const isRoomsExportProps = ajv.compile(RoomsExportSchema); From fa55c49a498c1ce990601d2256fe00dac6a4fbca Mon Sep 17 00:00:00 2001 From: Douglas Fabris Date: Mon, 20 May 2024 22:47:54 -0300 Subject: [PATCH 03/35] fix: Overriding Retention Policy not working (#32454) Co-authored-by: Guilherme Gazzo <5263975+ggazzo@users.noreply.github.com> --- .changeset/cold-beds-hope.md | 5 + .../server/methods/saveRoomSettings.ts | 62 +++----- .../InfoPanel/InfoPanel.stories.tsx | 2 +- .../InfoPanel/RetentionPolicyCallout.tsx | 23 +-- .../client/hooks/useFormatRelativeTime.ts | 14 -- .../room/body/RetentionPolicyWarning.tsx | 23 ++- .../client/views/room/body/RoomBody.tsx | 4 +- .../Info/EditRoomInfo/EditRoomInfo.tsx | 82 ++++++++--- .../EditRoomInfo/useEditRoomInitialValues.ts | 36 +---- .../contextualBar/Info/RoomInfo/RoomInfo.tsx | 10 +- .../{body => }/hooks/useRetentionPolicy.ts | 10 +- .../teams/contextualBar/info/TeamsInfo.tsx | 6 +- .../page-objects/fragments/home-content.ts | 4 + .../fragments/home-flextab-room.ts | 24 +++ .../meteor/tests/e2e/retention-policy.spec.ts | 138 ++++++++++++++++++ packages/i18n/src/locales/en.i18n.json | 2 + 16 files changed, 307 insertions(+), 138 deletions(-) create mode 100644 .changeset/cold-beds-hope.md delete mode 100644 apps/meteor/client/hooks/useFormatRelativeTime.ts rename apps/meteor/client/views/room/{body => }/hooks/useRetentionPolicy.ts (92%) create mode 100644 apps/meteor/tests/e2e/retention-policy.spec.ts diff --git a/.changeset/cold-beds-hope.md b/.changeset/cold-beds-hope.md new file mode 100644 index 000000000000..33fc910e424f --- /dev/null +++ b/.changeset/cold-beds-hope.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Fixes an issue not allowing override retention policy in channels diff --git a/apps/meteor/app/channel-settings/server/methods/saveRoomSettings.ts b/apps/meteor/app/channel-settings/server/methods/saveRoomSettings.ts index 4f6c06780942..e17faebea384 100644 --- a/apps/meteor/app/channel-settings/server/methods/saveRoomSettings.ts +++ b/apps/meteor/app/channel-settings/server/methods/saveRoomSettings.ts @@ -117,14 +117,10 @@ const validators: RoomSettingsValidators = { } }, async retentionEnabled({ userId, value, room, rid }) { - if (!hasRetentionPolicy(room)) { - throw new Meteor.Error('error-action-not-allowed', 'Room does not have retention policy', { - method: 'saveRoomSettings', - action: 'Editing_room', - }); - } - - if (!(await hasPermissionAsync(userId, 'edit-room-retention-policy', rid)) && value !== room.retention.enabled) { + if ( + !(await hasPermissionAsync(userId, 'edit-room-retention-policy', rid)) && + (!hasRetentionPolicy(room) || value !== room.retention.enabled) + ) { throw new Meteor.Error('error-action-not-allowed', 'Editing room retention policy is not allowed', { method: 'saveRoomSettings', action: 'Editing_room', @@ -132,14 +128,10 @@ const validators: RoomSettingsValidators = { } }, async retentionMaxAge({ userId, value, room, rid }) { - if (!hasRetentionPolicy(room)) { - throw new Meteor.Error('error-action-not-allowed', 'Room does not have retention policy', { - method: 'saveRoomSettings', - action: 'Editing_room', - }); - } - - if (!(await hasPermissionAsync(userId, 'edit-room-retention-policy', rid)) && value !== room.retention.maxAge) { + if ( + !(await hasPermissionAsync(userId, 'edit-room-retention-policy', rid)) && + (!hasRetentionPolicy(room) || value !== room.retention.maxAge) + ) { throw new Meteor.Error('error-action-not-allowed', 'Editing room retention policy is not allowed', { method: 'saveRoomSettings', action: 'Editing_room', @@ -147,14 +139,10 @@ const validators: RoomSettingsValidators = { } }, async retentionExcludePinned({ userId, value, room, rid }) { - if (!hasRetentionPolicy(room)) { - throw new Meteor.Error('error-action-not-allowed', 'Room does not have retention policy', { - method: 'saveRoomSettings', - action: 'Editing_room', - }); - } - - if (!(await hasPermissionAsync(userId, 'edit-room-retention-policy', rid)) && value !== room.retention.excludePinned) { + if ( + !(await hasPermissionAsync(userId, 'edit-room-retention-policy', rid)) && + (!hasRetentionPolicy(room) || value !== room.retention.excludePinned) + ) { throw new Meteor.Error('error-action-not-allowed', 'Editing room retention policy is not allowed', { method: 'saveRoomSettings', action: 'Editing_room', @@ -162,14 +150,10 @@ const validators: RoomSettingsValidators = { } }, async retentionFilesOnly({ userId, value, room, rid }) { - if (!hasRetentionPolicy(room)) { - throw new Meteor.Error('error-action-not-allowed', 'Room does not have retention policy', { - method: 'saveRoomSettings', - action: 'Editing_room', - }); - } - - if (!(await hasPermissionAsync(userId, 'edit-room-retention-policy', rid)) && value !== room.retention.filesOnly) { + if ( + !(await hasPermissionAsync(userId, 'edit-room-retention-policy', rid)) && + (!hasRetentionPolicy(room) || value !== room.retention.filesOnly) + ) { throw new Meteor.Error('error-action-not-allowed', 'Editing room retention policy is not allowed', { method: 'saveRoomSettings', action: 'Editing_room', @@ -177,14 +161,10 @@ const validators: RoomSettingsValidators = { } }, async retentionIgnoreThreads({ userId, value, room, rid }) { - if (!hasRetentionPolicy(room)) { - throw new Meteor.Error('error-action-not-allowed', 'Room does not have retention policy', { - method: 'saveRoomSettings', - action: 'Editing_room', - }); - } - - if (!(await hasPermissionAsync(userId, 'edit-room-retention-policy', rid)) && value !== room.retention.ignoreThreads) { + if ( + !(await hasPermissionAsync(userId, 'edit-room-retention-policy', rid)) && + (!hasRetentionPolicy(room) || value !== room.retention.ignoreThreads) + ) { throw new Meteor.Error('error-action-not-allowed', 'Editing room retention policy is not allowed', { method: 'saveRoomSettings', action: 'Editing_room', @@ -469,7 +449,7 @@ export async function saveRoomSettings( rid, }); - if (setting === 'retentionOverrideGlobal') { + if (setting === 'retentionOverrideGlobal' && settings.retentionOverrideGlobal === false) { delete settings.retentionMaxAge; delete settings.retentionExcludePinned; delete settings.retentionFilesOnly; diff --git a/apps/meteor/client/components/InfoPanel/InfoPanel.stories.tsx b/apps/meteor/client/components/InfoPanel/InfoPanel.stories.tsx index 4e8e44b1f932..39242161ed46 100644 --- a/apps/meteor/client/components/InfoPanel/InfoPanel.stories.tsx +++ b/apps/meteor/client/components/InfoPanel/InfoPanel.stories.tsx @@ -52,7 +52,7 @@ export const Default: ComponentStory = () => ( - + ); diff --git a/apps/meteor/client/components/InfoPanel/RetentionPolicyCallout.tsx b/apps/meteor/client/components/InfoPanel/RetentionPolicyCallout.tsx index 27202afa496c..06f6ed133dc3 100644 --- a/apps/meteor/client/components/InfoPanel/RetentionPolicyCallout.tsx +++ b/apps/meteor/client/components/InfoPanel/RetentionPolicyCallout.tsx @@ -4,23 +4,26 @@ import type { FC } from 'react'; import React from 'react'; import { useFormattedRelativeTime } from '../../hooks/useFormattedRelativeTime'; +import { getMaxAgeInMS } from '../../views/room/hooks/useRetentionPolicy'; type RetentionPolicyCalloutProps = { - filesOnlyDefault: boolean; - excludePinnedDefault: boolean; - maxAgeDefault: number; + filesOnly: boolean; + excludePinned: boolean; + maxAge: number; }; -const RetentionPolicyCallout: FC = ({ filesOnlyDefault, excludePinnedDefault, maxAgeDefault }) => { +const RetentionPolicyCallout: FC = ({ filesOnly, excludePinned, maxAge }) => { const t = useTranslation(); - const time = useFormattedRelativeTime(maxAgeDefault); + const time = useFormattedRelativeTime(getMaxAgeInMS(maxAge)); return ( - - {filesOnlyDefault && excludePinnedDefault &&

{t('RetentionPolicy_RoomWarning_FilesOnly', { time })}

} - {filesOnlyDefault && !excludePinnedDefault &&

{t('RetentionPolicy_RoomWarning_UnpinnedFilesOnly', { time })}

} - {!filesOnlyDefault && excludePinnedDefault &&

{t('RetentionPolicy_RoomWarning', { time })}

} - {!filesOnlyDefault && !excludePinnedDefault &&

{t('RetentionPolicy_RoomWarning_Unpinned', { time })}

} + +
+ {filesOnly && excludePinned &&

{t('RetentionPolicy_RoomWarning_FilesOnly', { time })}

} + {filesOnly && !excludePinned &&

{t('RetentionPolicy_RoomWarning_UnpinnedFilesOnly', { time })}

} + {!filesOnly && excludePinned &&

{t('RetentionPolicy_RoomWarning', { time })}

} + {!filesOnly && !excludePinned &&

{t('RetentionPolicy_RoomWarning_Unpinned', { time })}

} +
); }; diff --git a/apps/meteor/client/hooks/useFormatRelativeTime.ts b/apps/meteor/client/hooks/useFormatRelativeTime.ts deleted file mode 100644 index 5f0a0675cf6c..000000000000 --- a/apps/meteor/client/hooks/useFormatRelativeTime.ts +++ /dev/null @@ -1,14 +0,0 @@ -import moment from 'moment'; -import { useCallback } from 'react'; - -export const useFormatRelativeTime = (): ((timeMs: number) => string) => - useCallback((timeMs: number) => { - moment.relativeTimeThreshold('s', 60); - moment.relativeTimeThreshold('ss', 0); - moment.relativeTimeThreshold('m', 60); - moment.relativeTimeThreshold('h', 24); - moment.relativeTimeThreshold('d', 31); - moment.relativeTimeThreshold('M', 12); - - return moment.duration(timeMs).humanize(); - }, []); diff --git a/apps/meteor/client/views/room/body/RetentionPolicyWarning.tsx b/apps/meteor/client/views/room/body/RetentionPolicyWarning.tsx index 6455d3914254..87a061c682eb 100644 --- a/apps/meteor/client/views/room/body/RetentionPolicyWarning.tsx +++ b/apps/meteor/client/views/room/body/RetentionPolicyWarning.tsx @@ -1,9 +1,10 @@ import { Icon } from '@rocket.chat/fuselage'; import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; -import React, { useMemo } from 'react'; +import React from 'react'; -import { useFormatRelativeTime } from '../../../hooks/useFormatRelativeTime'; +import { useFormattedRelativeTime } from '../../../hooks/useFormattedRelativeTime'; +import { getMaxAgeInMS } from '../hooks/useRetentionPolicy'; type RetentionPolicyWarningProps = { filesOnly: boolean; @@ -13,13 +14,16 @@ type RetentionPolicyWarningProps = { const RetentionPolicyWarning = ({ filesOnly, excludePinned, maxAge }: RetentionPolicyWarningProps): ReactElement => { const t = useTranslation(); - - const formatRelativeTime = useFormatRelativeTime(); - const time = useMemo(() => formatRelativeTime(maxAge), [formatRelativeTime, maxAge]); + const time = useFormattedRelativeTime(getMaxAgeInMS(maxAge)); if (filesOnly) { return ( -
+
{' '} {excludePinned ? t('RetentionPolicy_RoomWarning_UnpinnedFilesOnly', { time }) @@ -29,7 +33,12 @@ const RetentionPolicyWarning = ({ filesOnly, excludePinned, maxAge }: RetentionP } return ( -
+
{' '} {excludePinned ? t('RetentionPolicy_RoomWarning_Unpinned', { time }) : t('RetentionPolicy_RoomWarning', { time })}
diff --git a/apps/meteor/client/views/room/body/RoomBody.tsx b/apps/meteor/client/views/room/body/RoomBody.tsx index 5f63f9f571ca..0535b65c6cf1 100644 --- a/apps/meteor/client/views/room/body/RoomBody.tsx +++ b/apps/meteor/client/views/room/body/RoomBody.tsx @@ -22,6 +22,7 @@ import { useRoomToolbox } from '../contexts/RoomToolboxContext'; import { useUserCard } from '../contexts/UserCardContext'; import { useDateScroll } from '../hooks/useDateScroll'; import { useMessageListNavigation } from '../hooks/useMessageListNavigation'; +import { useRetentionPolicy } from '../hooks/useRetentionPolicy'; import DropTargetOverlay from './DropTargetOverlay'; import JumpToRecentMessageButton from './JumpToRecentMessageButton'; import LeaderBar from './LeaderBar'; @@ -39,7 +40,6 @@ import { useListIsAtBottom } from './hooks/useListIsAtBottom'; import { useQuoteMessageByUrl } from './hooks/useQuoteMessageByUrl'; import { useReadMessageWindowEvents } from './hooks/useReadMessageWindowEvents'; import { useRestoreScrollPosition } from './hooks/useRestoreScrollPosition'; -import { useRetentionPolicy } from './hooks/useRetentionPolicy'; import { useHandleUnread } from './hooks/useUnreadMessages'; const RoomBody = (): ReactElement => { @@ -291,7 +291,7 @@ const RoomBody = (): ReactElement => {
  • {isLoadingMoreMessages ? : null}
  • ) : (
  • - {retentionPolicy ? : null} + {retentionPolicy?.isActive ? : null}
  • )} diff --git a/apps/meteor/client/views/room/contextualBar/Info/EditRoomInfo/EditRoomInfo.tsx b/apps/meteor/client/views/room/contextualBar/Info/EditRoomInfo/EditRoomInfo.tsx index bc7714da06ae..6b8d07779107 100644 --- a/apps/meteor/client/views/room/contextualBar/Info/EditRoomInfo/EditRoomInfo.tsx +++ b/apps/meteor/client/views/room/contextualBar/Info/EditRoomInfo/EditRoomInfo.tsx @@ -23,6 +23,7 @@ import { import { useEffectEvent, useUniqueId } from '@rocket.chat/fuselage-hooks'; import type { TranslationKey } from '@rocket.chat/ui-contexts'; import { useSetting, useTranslation, useToastMessageDispatch, useEndpoint } from '@rocket.chat/ui-contexts'; +import type { ChangeEvent } from 'react'; import React, { useMemo } from 'react'; import { useForm, Controller } from 'react-hook-form'; @@ -39,6 +40,7 @@ import RawText from '../../../../../components/RawText'; import RoomAvatarEditor from '../../../../../components/avatar/RoomAvatarEditor'; import { getDirtyFields } from '../../../../../lib/getDirtyFields'; import { useArchiveRoom } from '../../../../hooks/roomActions/useArchiveRoom'; +import { useRetentionPolicy } from '../../../hooks/useRetentionPolicy'; import { useEditRoomInitialValues } from './useEditRoomInitialValues'; import { useEditRoomPermissions } from './useEditRoomPermissions'; @@ -54,6 +56,18 @@ const title = { discussion: 'Edit_discussion' as TranslationKey, }; +const getRetentionSetting = (roomType: IRoomWithRetentionPolicy['t']): string => { + switch (roomType) { + case 'd': + return 'RetentionPolicy_MaxAge_DMs'; + case 'p': + return 'RetentionPolicy_MaxAge_Groups'; + case 'c': + default: + return 'RetentionPolicy_MaxAge_Channels'; + } +}; + const EditRoomInfo = ({ room, onClickClose, onClickBack }: EditRoomInfoProps) => { const t = useTranslation(); const dispatchToastMessage = useToastMessageDispatch(); @@ -61,7 +75,8 @@ const EditRoomInfo = ({ room, onClickClose, onClickBack }: EditRoomInfoProps) => // eslint-disable-next-line no-nested-ternary const roomType = 'prid' in room ? 'discussion' : room.teamId ? 'team' : 'channel'; - const retentionPolicy = useSetting('RetentionPolicy_Enabled'); + const retentionPolicy = useRetentionPolicy(room); + const retentionMaxAgeDefault = useSetting(getRetentionSetting(room.t)) ?? 30; const defaultValues = useEditRoomInitialValues(room); const namesValidation = useSetting('UTF8_Channel_Names_Validation'); const allowSpecialNames = useSetting('UI_Allow_room_names_with_special_chars'); @@ -97,7 +112,6 @@ const EditRoomInfo = ({ room, onClickClose, onClickBack }: EditRoomInfoProps) => joinCodeRequired, hideSysMes, retentionEnabled, - retentionMaxAge, retentionOverrideGlobal, roomType: roomTypeP, reactWhenReadOnly, @@ -128,26 +142,46 @@ const EditRoomInfo = ({ room, onClickClose, onClickBack }: EditRoomInfoProps) => const handleArchive = useArchiveRoom(room); - const handleUpdateRoomData = useEffectEvent(async ({ hideSysMes, joinCodeRequired, ...formData }) => { - const data = getDirtyFields(formData, dirtyFields); - delete data.archived; + // TODO: add payload validation + const handleUpdateRoomData = useEffectEvent( + async ({ + hideSysMes, + joinCodeRequired, + retentionEnabled, + retentionOverrideGlobal, + retentionMaxAge, + retentionExcludePinned, + retentionFilesOnly, + ...formData + }) => { + const data = getDirtyFields(formData, dirtyFields); + delete data.archived; - try { - await saveAction({ - rid: room._id, - ...data, - ...((data.joinCode || 'joinCodeRequired' in data) && { joinCode: joinCodeRequired ? data.joinCode : '' }), - ...((data.systemMessages || !hideSysMes) && { - systemMessages: hideSysMes && data.systemMessages, - }), - }); + try { + await saveAction({ + rid: room._id, + ...data, + ...((data.joinCode || 'joinCodeRequired' in data) && { joinCode: joinCodeRequired ? data.joinCode : '' }), + ...((data.systemMessages || !hideSysMes) && { + systemMessages: hideSysMes && data.systemMessages, + }), + retentionEnabled, + retentionOverrideGlobal, + ...(retentionEnabled && + retentionOverrideGlobal && { + retentionMaxAge, + retentionExcludePinned, + retentionFilesOnly, + }), + }); - dispatchToastMessage({ type: 'success', message: t('Room_updated_successfully') }); - onClickClose(); - } catch (error) { - dispatchToastMessage({ type: 'error', message: error }); - } - }); + dispatchToastMessage({ type: 'success', message: t('Room_updated_successfully') }); + onClickClose(); + } catch (error) { + dispatchToastMessage({ type: 'error', message: error }); + } + }, + ); const handleSave = useEffectEvent((data) => Promise.all([isDirty && handleUpdateRoomData(data), changeArchiving && handleArchive()].filter(Boolean)), @@ -431,7 +465,7 @@ const EditRoomInfo = ({ room, onClickClose, onClickBack }: EditRoomInfoProps) => )} - {retentionPolicy && ( + {retentionPolicy?.enabled && ( @@ -468,7 +502,9 @@ const EditRoomInfo = ({ room, onClickClose, onClickBack }: EditRoomInfoProps) => {t('RetentionPolicyRoom_ReadTheDocs')} - {t('RetentionPolicyRoom_MaxAge', { max: retentionMaxAge })} + + {t('RetentionPolicyRoom_MaxAge', { max: retentionMaxAgeDefault })} + onChange(Math.max(1, Number(currentValue)))} + onChange={(e: ChangeEvent) => onChange(Number(e.currentTarget.value))} /> )} /> diff --git a/apps/meteor/client/views/room/contextualBar/Info/EditRoomInfo/useEditRoomInitialValues.ts b/apps/meteor/client/views/room/contextualBar/Info/EditRoomInfo/useEditRoomInitialValues.ts index f36802bb9f56..128f6c3c66f8 100644 --- a/apps/meteor/client/views/room/contextualBar/Info/EditRoomInfo/useEditRoomInitialValues.ts +++ b/apps/meteor/client/views/room/contextualBar/Info/EditRoomInfo/useEditRoomInitialValues.ts @@ -1,29 +1,13 @@ import type { IRoomWithRetentionPolicy } from '@rocket.chat/core-typings'; -import { useSetting } from '@rocket.chat/ui-contexts'; import { useMemo } from 'react'; import { roomCoordinator } from '../../../../../lib/rooms/roomCoordinator'; - -const getPolicyRoomType = (roomType: IRoomWithRetentionPolicy['t']) => { - switch (roomType) { - case 'c': - return 'Channels'; - case 'p': - return 'Groups'; - case 'd': - return 'DMs'; - } -}; +import { useRetentionPolicy } from '../../../hooks/useRetentionPolicy'; export const useEditRoomInitialValues = (room: IRoomWithRetentionPolicy) => { + const retentionPolicy = useRetentionPolicy(room); const { t, ro, archived, topic, description, announcement, joinCodeRequired, sysMes, encrypted, retention, reactWhenReadOnly } = room; - const retentionPolicyEnabled = useSetting('RetentionPolicy_Enabled'); - const maxAgeDefault = useSetting(`RetentionPolicy_MaxAge_${getPolicyRoomType(room.t)}`) || 30; - const retentionEnabledDefault = useSetting(`RetentionPolicy_AppliesTo${getPolicyRoomType(room.t)}`); - const excludePinnedDefault = useSetting('RetentionPolicy_DoNotPrunePinned'); - const filesOnlyDefault = useSetting('RetentionPolicy_FilesOnly'); - return useMemo( () => ({ roomName: t === 'd' && room.usernames ? room.usernames.join(' x ') : roomCoordinator.getRoomName(t, room), @@ -40,25 +24,21 @@ export const useEditRoomInitialValues = (room: IRoomWithRetentionPolicy) => { systemMessages: Array.isArray(sysMes) ? sysMes : [], hideSysMes: Array.isArray(sysMes) ? !!sysMes?.length : !!sysMes, encrypted, - ...(retentionPolicyEnabled && { - retentionEnabled: retention?.enabled ?? retentionEnabledDefault, + ...(retentionPolicy?.enabled && { + retentionEnabled: retention?.enabled ?? retentionPolicy.isActive, retentionOverrideGlobal: !!retention?.overrideGlobal, - retentionMaxAge: Math.min(retention?.maxAge, maxAgeDefault) || maxAgeDefault, - retentionExcludePinned: retention?.excludePinned ?? excludePinnedDefault, - retentionFilesOnly: retention?.filesOnly ?? filesOnlyDefault, + retentionMaxAge: retention?.maxAge ?? retentionPolicy.maxAge, + retentionExcludePinned: retention?.excludePinned ?? retentionPolicy.excludePinned, + retentionFilesOnly: retention?.filesOnly ?? retentionPolicy.filesOnly, }), }), [ announcement, archived, description, - excludePinnedDefault, - filesOnlyDefault, joinCodeRequired, - maxAgeDefault, retention, - retentionEnabledDefault, - retentionPolicyEnabled, + retentionPolicy, ro, room, sysMes, diff --git a/apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.tsx b/apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.tsx index 80abe104c88e..5c45e8d095f9 100644 --- a/apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.tsx +++ b/apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.tsx @@ -17,7 +17,7 @@ import RetentionPolicyCallout from '../../../../../components/InfoPanel/Retentio import MarkdownText from '../../../../../components/MarkdownText'; import type { Action } from '../../../../hooks/useActionSpread'; import { useActionSpread } from '../../../../hooks/useActionSpread'; -import { useRetentionPolicy } from '../../../body/hooks/useRetentionPolicy'; +import { useRetentionPolicy } from '../../../hooks/useRetentionPolicy'; import { useRoomActions } from '../hooks/useRoomActions'; type RoomInfoProps = { @@ -135,11 +135,11 @@ const RoomInfo = ({ room, icon, onClickBack, onClickClose, onClickEnterRoom, onC )} - {retentionPolicy && ( + {retentionPolicy?.isActive && ( )} diff --git a/apps/meteor/client/views/room/body/hooks/useRetentionPolicy.ts b/apps/meteor/client/views/room/hooks/useRetentionPolicy.ts similarity index 92% rename from apps/meteor/client/views/room/body/hooks/useRetentionPolicy.ts rename to apps/meteor/client/views/room/hooks/useRetentionPolicy.ts index f77bc5bf9948..ce16df8bc329 100644 --- a/apps/meteor/client/views/room/body/hooks/useRetentionPolicy.ts +++ b/apps/meteor/client/views/room/hooks/useRetentionPolicy.ts @@ -16,6 +16,8 @@ type RetentionPolicySettings = { maxAgeDMs: number; }; +export const getMaxAgeInMS = (maxAge: number) => maxAge * 24 * 60 * 60 * 1000; + const isActive = (room: IRoom, { enabled, appliesToChannels, appliesToGroups, appliesToDMs }: RetentionPolicySettings): boolean => { if (!enabled) { return false; @@ -75,6 +77,8 @@ export const useRetentionPolicy = ( room: IRoom | undefined, ): | { + enabled: boolean; + isActive: boolean; filesOnly: boolean; excludePinned: boolean; maxAge: number; @@ -92,13 +96,15 @@ export const useRetentionPolicy = ( maxAgeDMs: useSetting('RetentionPolicy_MaxAge_DMs') as number, } as const; - if (!room || !isActive(room, settings)) { + if (!room) { return undefined; } return { + enabled: settings.enabled, + isActive: isActive(room, settings), filesOnly: extractFilesOnly(room, settings), excludePinned: extractExcludePinned(room, settings), - maxAge: getMaxAge(room, settings) * 24 * 60 * 60 * 1000, + maxAge: getMaxAge(room, settings), }; }; diff --git a/apps/meteor/client/views/teams/contextualBar/info/TeamsInfo.tsx b/apps/meteor/client/views/teams/contextualBar/info/TeamsInfo.tsx index 809e20100c9b..12e092b48763 100644 --- a/apps/meteor/client/views/teams/contextualBar/info/TeamsInfo.tsx +++ b/apps/meteor/client/views/teams/contextualBar/info/TeamsInfo.tsx @@ -200,11 +200,7 @@ const TeamsInfo = ({ )} {retentionPolicyEnabled && ( - + )} diff --git a/apps/meteor/tests/e2e/page-objects/fragments/home-content.ts b/apps/meteor/tests/e2e/page-objects/fragments/home-content.ts index 01237e68cfbc..4f55c4f088e7 100644 --- a/apps/meteor/tests/e2e/page-objects/fragments/home-content.ts +++ b/apps/meteor/tests/e2e/page-objects/fragments/home-content.ts @@ -13,6 +13,10 @@ export class HomeContent { return this.page.locator('main header'); } + get channelRetentionPolicyWarning(): Locator { + return this.page.locator('main').getByRole('alert', { name: 'Retention policy warning banner' }); + } + get inputMessage(): Locator { return this.page.locator('[name="msg"]'); } diff --git a/apps/meteor/tests/e2e/page-objects/fragments/home-flextab-room.ts b/apps/meteor/tests/e2e/page-objects/fragments/home-flextab-room.ts index ece3d27fd25d..fac98e630caa 100644 --- a/apps/meteor/tests/e2e/page-objects/fragments/home-flextab-room.ts +++ b/apps/meteor/tests/e2e/page-objects/fragments/home-flextab-room.ts @@ -38,4 +38,28 @@ export class HomeFlextabRoom { get btnSave(): Locator { return this.page.locator('role=button[name="Save"]'); } + + get calloutRetentionPolicy(): Locator { + return this.page.getByRole('dialog').getByRole('alert', { name: 'Retention policy warning callout' }); + } + + get pruneAccordion(): Locator { + return this.page.getByRole('dialog').getByRole('button', { name: 'Prune' }); + } + + getMaxAgeLabel(maxAge = '30') { + return this.page.getByRole('dialog').getByText(`Maximum message age in days (default: ${maxAge})`) + } + + get inputRetentionMaxAge(): Locator { + return this.page.getByRole('dialog').locator('input[name="retentionMaxAge"]'); + } + + get checkboxPruneMessages(): Locator { + return this.page.locator('label', { has: this.page.getByRole('checkbox', { name: 'Automatically prune old messages' }) }); + } + + get checkboxOverrideGlobalRetention(): Locator { + return this.page.locator('label', { has: this.page.getByRole('checkbox', { name: 'Override global retention policy' }) }); + } } diff --git a/apps/meteor/tests/e2e/retention-policy.spec.ts b/apps/meteor/tests/e2e/retention-policy.spec.ts new file mode 100644 index 000000000000..94acdc6d65f9 --- /dev/null +++ b/apps/meteor/tests/e2e/retention-policy.spec.ts @@ -0,0 +1,138 @@ +import { Users } from './fixtures/userStates'; +import { HomeChannel } from './page-objects'; +import { createTargetChannel, createTargetPrivateChannel, setSettingValueById } from './utils'; +import { test, expect } from './utils/test'; + +test.use({ storageState: Users.admin.state }); + +test.describe.serial('retention-policy', () => { + let poHomeChannel: HomeChannel; + let targetChannel: string; + let targetGroup: string; + + test.beforeAll(async ({ api }) => { + targetChannel = await createTargetChannel(api); + targetGroup = await createTargetPrivateChannel(api); + }) + + test.beforeEach(async ({ page }) => { + poHomeChannel = new HomeChannel(page); + + await page.goto('/home'); + }); + + test.describe('retention policy disabled', () => { + test('should not show prune banner in channel', async () => { + await poHomeChannel.sidenav.openChat(targetChannel); + + await expect(poHomeChannel.content.channelRetentionPolicyWarning).not.toBeVisible(); + }); + + test('should not show prune section on edit channel', async () => { + await poHomeChannel.sidenav.openChat(targetChannel); + await poHomeChannel.tabs.btnRoomInfo.click(); + await poHomeChannel.tabs.room.btnEdit.click(); + + await expect(poHomeChannel.tabs.room.pruneAccordion).not.toBeVisible(); + }); + }); + + test.describe('retention policy enabled', () => { + test.beforeAll(async ({ api }) => { + await setSettingValueById(api, 'RetentionPolicy_Enabled', true); + }) + test.afterAll(async ({ api }) => { + await setSettingValueById(api, 'RetentionPolicy_Enabled', false); + await setSettingValueById(api, 'RetentionPolicy_AppliesToChannels', false); + await setSettingValueById(api, 'RetentionPolicy_AppliesToGroups', false); + await setSettingValueById(api, 'RetentionPolicy_AppliesToDMs', false); + await setSettingValueById(api, 'RetentionPolicy_MaxAge_Channels', 30); + }); + + test('should not show prune banner even with retention policy setting enabled in any type of room', async () => { + await poHomeChannel.sidenav.openChat(targetChannel); + await expect(poHomeChannel.content.channelRetentionPolicyWarning).not.toBeVisible(); + + await poHomeChannel.sidenav.openChat(targetGroup); + await expect(poHomeChannel.content.channelRetentionPolicyWarning).not.toBeVisible(); + + await poHomeChannel.sidenav.openChat('user1'); + await expect(poHomeChannel.content.channelRetentionPolicyWarning).not.toBeVisible(); + }); + + test('should show prune section in edit channel', async () => { + await poHomeChannel.sidenav.openChat(targetChannel); + await poHomeChannel.tabs.btnRoomInfo.click(); + await poHomeChannel.tabs.room.btnEdit.click(); + + await expect(poHomeChannel.tabs.room.pruneAccordion).toBeVisible(); + }); + + test.describe('retention policy applies enabled by default', () => { + test.beforeAll(async ({ api }) => { + await setSettingValueById(api, 'RetentionPolicy_AppliesToChannels', true); + await setSettingValueById(api, 'RetentionPolicy_AppliesToGroups', true); + await setSettingValueById(api, 'RetentionPolicy_AppliesToDMs', true); + }); + + test('should prune old messages checkbox enabled by default in channel and show retention policy banner', async () => { + await poHomeChannel.sidenav.openChat(targetChannel); + await expect(poHomeChannel.content.channelRetentionPolicyWarning).toBeVisible(); + + await poHomeChannel.tabs.btnRoomInfo.click(); + await poHomeChannel.tabs.room.btnEdit.click(); + await poHomeChannel.tabs.room.pruneAccordion.click(); + await expect(poHomeChannel.tabs.room.checkboxPruneMessages).toBeChecked(); + }); + + test('should prune old messages checkbox enabled by default in group and show retention policy banner', async () => { + await poHomeChannel.sidenav.openChat(targetGroup); + await expect(poHomeChannel.content.channelRetentionPolicyWarning).toBeVisible(); + + await poHomeChannel.tabs.btnRoomInfo.click(); + await poHomeChannel.tabs.room.btnEdit.click(); + await poHomeChannel.tabs.room.pruneAccordion.click(); + await expect(poHomeChannel.tabs.room.checkboxPruneMessages).toBeChecked(); + }); + + test('should show retention policy banner in DMs', async () => { + await poHomeChannel.sidenav.openChat('user1'); + await expect(poHomeChannel.content.channelRetentionPolicyWarning).toBeVisible(); + }); + }); + + test.describe('retention policy override', () => { + test.beforeAll(async ({ api }) => { + expect((await setSettingValueById(api, 'RetentionPolicy_MaxAge_Channels', 15)).status()).toBe(200); + }); + + test('should display the default max age in edit channel', async () => { + await poHomeChannel.sidenav.openChat(targetChannel); + await poHomeChannel.tabs.btnRoomInfo.click(); + await poHomeChannel.tabs.room.btnEdit.click(); + await poHomeChannel.tabs.room.pruneAccordion.click(); + await poHomeChannel.tabs.room.checkboxOverrideGlobalRetention.click(); + + await expect(poHomeChannel.tabs.room.getMaxAgeLabel('15')).toBeVisible(); + }); + + test('should display overridden retention max age value', async () => { + await poHomeChannel.sidenav.openChat(targetChannel); + await poHomeChannel.tabs.btnRoomInfo.click(); + await poHomeChannel.tabs.room.btnEdit.click(); + await poHomeChannel.tabs.room.pruneAccordion.click(); + await poHomeChannel.tabs.room.checkboxOverrideGlobalRetention.click(); + await poHomeChannel.tabs.room.inputRetentionMaxAge.fill('365'); + await poHomeChannel.tabs.room.btnSave.click(); + await poHomeChannel.dismissToast(); + + await poHomeChannel.tabs.btnRoomInfo.click(); + await poHomeChannel.tabs.room.btnEdit.click(); + await poHomeChannel.tabs.room.pruneAccordion.click(); + + await expect(poHomeChannel.tabs.room.getMaxAgeLabel('15')).toBeVisible(); + await expect(poHomeChannel.tabs.room.inputRetentionMaxAge).toHaveValue('365'); + }); + }); + }); +}); diff --git a/packages/i18n/src/locales/en.i18n.json b/packages/i18n/src/locales/en.i18n.json index 1dc586fb0c4a..c59f3887106c 100644 --- a/packages/i18n/src/locales/en.i18n.json +++ b/packages/i18n/src/locales/en.i18n.json @@ -4500,6 +4500,8 @@ "RetentionPolicyRoom_MaxAge": "Maximum message age in days (default: {{max}})", "RetentionPolicyRoom_OverrideGlobal": "Override global retention policy", "RetentionPolicyRoom_ReadTheDocs": "Watch out! Tweaking these settings without utmost care can destroy all message history. Please read the documentation before turning the feature on here.", + "Retention_policy_warning_banner": "Retention policy warning banner", + "Retention_policy_warning_callout": "Retention policy warning callout", "Retry": "Retry", "Return_to_home": "Return to home", "Return_to_previous_page": "Return to previous page", From 760ab4be210f75faadecb9419c8dd1d2e45de57a Mon Sep 17 00:00:00 2001 From: Pierre Lehnen <55164754+pierre-lehnen-rc@users.noreply.github.com> Date: Tue, 21 May 2024 08:33:38 -0300 Subject: [PATCH 04/35] fix: CAS user merge not working (#32444) --- .changeset/cuddly-owls-join.md | 5 +++++ apps/meteor/server/lib/cas/findExistingCASUser.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/cuddly-owls-join.md diff --git a/.changeset/cuddly-owls-join.md b/.changeset/cuddly-owls-join.md new file mode 100644 index 000000000000..0ace3d145d37 --- /dev/null +++ b/.changeset/cuddly-owls-join.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Fixed an issue that prevented CAS users from being merged with existing user data on login diff --git a/apps/meteor/server/lib/cas/findExistingCASUser.ts b/apps/meteor/server/lib/cas/findExistingCASUser.ts index 60b52965ee68..2c65ab77546d 100644 --- a/apps/meteor/server/lib/cas/findExistingCASUser.ts +++ b/apps/meteor/server/lib/cas/findExistingCASUser.ts @@ -18,7 +18,7 @@ export const findExistingCASUser = async (username: string): Promise Date: Tue, 21 May 2024 12:58:47 +0000 Subject: [PATCH 05/35] Release 6.9.0-rc.0 --- .changeset/pre.json | 94 +++++++++++++++++++ apps/meteor/CHANGELOG.md | 94 +++++++++++++++++++ apps/meteor/app/utils/rocketchat.info | 2 +- apps/meteor/ee/server/services/CHANGELOG.md | 14 +++ apps/meteor/ee/server/services/package.json | 2 +- apps/meteor/package.json | 2 +- ee/apps/account-service/CHANGELOG.md | 13 +++ ee/apps/account-service/package.json | 2 +- ee/apps/authorization-service/CHANGELOG.md | 13 +++ ee/apps/authorization-service/package.json | 2 +- ee/apps/ddp-streamer/CHANGELOG.md | 15 +++ ee/apps/ddp-streamer/package.json | 2 +- ee/apps/omnichannel-transcript/CHANGELOG.md | 14 +++ ee/apps/omnichannel-transcript/package.json | 2 +- ee/apps/presence-service/CHANGELOG.md | 13 +++ ee/apps/presence-service/package.json | 2 +- ee/apps/queue-worker/CHANGELOG.md | 13 +++ ee/apps/queue-worker/package.json | 2 +- ee/apps/stream-hub-service/CHANGELOG.md | 12 +++ ee/apps/stream-hub-service/package.json | 2 +- ee/packages/api-client/CHANGELOG.md | 10 ++ ee/packages/api-client/package.json | 2 +- ee/packages/ddp-client/CHANGELOG.md | 10 ++ ee/packages/ddp-client/package.json | 2 +- ee/packages/license/CHANGELOG.md | 9 ++ ee/packages/license/package.json | 2 +- ee/packages/omnichannel-services/CHANGELOG.md | 18 ++++ ee/packages/omnichannel-services/package.json | 2 +- ee/packages/pdf-worker/CHANGELOG.md | 11 +++ ee/packages/pdf-worker/package.json | 2 +- ee/packages/presence/CHANGELOG.md | 11 +++ ee/packages/presence/package.json | 2 +- package.json | 2 +- packages/apps/CHANGELOG.md | 10 ++ packages/apps/package.json | 2 +- packages/core-services/CHANGELOG.md | 16 ++++ packages/core-services/package.json | 2 +- packages/core-typings/CHANGELOG.md | 15 +++ packages/core-typings/package.json | 2 +- packages/cron/CHANGELOG.md | 10 ++ packages/cron/package.json | 2 +- packages/fuselage-ui-kit/CHANGELOG.md | 20 ++++ packages/fuselage-ui-kit/package.json | 12 +-- packages/gazzodown/CHANGELOG.md | 11 +++ packages/gazzodown/package.json | 6 +- packages/i18n/CHANGELOG.md | 12 +++ packages/i18n/package.json | 2 +- packages/instance-status/CHANGELOG.md | 9 ++ packages/instance-status/package.json | 2 +- packages/livechat/CHANGELOG.md | 14 +++ packages/livechat/package.json | 2 +- packages/mock-providers/CHANGELOG.md | 9 ++ packages/mock-providers/package.json | 2 +- packages/model-typings/CHANGELOG.md | 9 ++ packages/model-typings/package.json | 2 +- packages/models/CHANGELOG.md | 9 ++ packages/models/package.json | 2 +- packages/rest-typings/CHANGELOG.md | 14 +++ packages/rest-typings/package.json | 2 +- packages/ui-avatar/CHANGELOG.md | 9 ++ packages/ui-avatar/package.json | 4 +- packages/ui-client/CHANGELOG.md | 9 ++ packages/ui-client/package.json | 4 +- packages/ui-contexts/CHANGELOG.md | 12 +++ packages/ui-contexts/package.json | 2 +- packages/ui-kit/CHANGELOG.md | 6 ++ packages/ui-kit/package.json | 2 +- packages/ui-video-conf/CHANGELOG.md | 10 ++ packages/ui-video-conf/package.json | 6 +- packages/uikit-playground/CHANGELOG.md | 11 +++ packages/uikit-playground/package.json | 2 +- packages/web-ui-registration/CHANGELOG.md | 9 ++ packages/web-ui-registration/package.json | 4 +- 73 files changed, 637 insertions(+), 49 deletions(-) create mode 100644 .changeset/pre.json diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 000000000000..7faf2d0be107 --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,94 @@ +{ + "mode": "pre", + "tag": "rc", + "initialVersions": { + "@rocket.chat/meteor": "6.9.0-develop", + "rocketchat-services": "1.1.32", + "@rocket.chat/account-service": "0.3.13", + "@rocket.chat/authorization-service": "0.3.14", + "@rocket.chat/ddp-streamer": "0.2.13", + "@rocket.chat/omnichannel-transcript": "0.3.14", + "@rocket.chat/presence-service": "0.3.14", + "@rocket.chat/queue-worker": "0.3.14", + "@rocket.chat/stream-hub-service": "0.3.14", + "@rocket.chat/api-client": "0.1.32", + "@rocket.chat/ddp-client": "0.2.23", + "@rocket.chat/license": "0.1.14", + "@rocket.chat/omnichannel-services": "0.1.14", + "@rocket.chat/pdf-worker": "0.0.38", + "@rocket.chat/presence": "0.1.14", + "@rocket.chat/ui-theming": "0.1.2", + "@rocket.chat/account-utils": "0.0.2", + "@rocket.chat/agenda": "0.1.0", + "@rocket.chat/apps": "0.0.5", + "@rocket.chat/base64": "1.0.13", + "@rocket.chat/cas-validate": "0.0.2", + "@rocket.chat/core-services": "0.3.14", + "@rocket.chat/core-typings": "6.9.0-develop", + "@rocket.chat/cron": "0.0.34", + "@rocket.chat/eslint-config": "0.7.0", + "@rocket.chat/favicon": "0.0.2", + "@rocket.chat/fuselage-ui-kit": "6.0.0", + "@rocket.chat/gazzodown": "6.0.0", + "@rocket.chat/i18n": "0.3.0", + "@rocket.chat/instance-status": "0.0.38", + "@rocket.chat/jwt": "0.1.1", + "@rocket.chat/livechat": "1.16.0", + "@rocket.chat/log-format": "0.0.2", + "@rocket.chat/logger": "0.0.2", + "@rocket.chat/message-parser": "0.31.29", + "@rocket.chat/mock-providers": "0.0.6", + "@rocket.chat/model-typings": "0.4.0", + "@rocket.chat/models": "0.0.38", + "@rocket.chat/poplib": "0.0.2", + "@rocket.chat/password-policies": "0.0.2", + "@rocket.chat/patch-injection": "0.0.1", + "@rocket.chat/peggy-loader": "0.31.25", + "@rocket.chat/random": "1.2.2", + "@rocket.chat/release-action": "2.2.3", + "@rocket.chat/release-changelog": "0.1.0", + "@rocket.chat/rest-typings": "6.9.0-develop", + "@rocket.chat/server-cloud-communication": "0.0.2", + "@rocket.chat/server-fetch": "0.0.3", + "@rocket.chat/sha256": "1.0.10", + "@rocket.chat/tools": "0.2.1", + "@rocket.chat/ui-avatar": "2.0.0", + "@rocket.chat/ui-client": "6.0.0", + "@rocket.chat/ui-composer": "0.1.0", + "@rocket.chat/ui-contexts": "6.0.0", + "@rocket.chat/ui-kit": "0.33.0", + "@rocket.chat/ui-video-conf": "6.0.0", + "@rocket.chat/uikit-playground": "0.2.22", + "@rocket.chat/web-ui-registration": "6.0.0" + }, + "changesets": [ + "angry-rocks-try", + "breezy-geckos-sparkle", + "chilly-poems-explode", + "cold-beds-hope", + "cuddly-owls-join", + "fair-grapes-thank", + "flat-starfishes-crash", + "fresh-students-remember", + "gorgeous-lizards-shave", + "lazy-gorilas-shop", + "nasty-swans-compete", + "ninety-rivers-mix", + "rich-bananas-complain", + "shiny-crabs-peel", + "shy-oranges-provide", + "silly-clocks-return", + "strange-bears-dance", + "strong-humans-bow", + "tall-wombats-love", + "unlucky-berries-guess", + "warm-squids-deliver", + "weak-starfishes-fail", + "weak-turkeys-sit", + "wicked-points-deliver", + "wild-teachers-design", + "wise-pianos-explode", + "yellow-lies-judge", + "young-yaks-suffer" + ] +} diff --git a/apps/meteor/CHANGELOG.md b/apps/meteor/CHANGELOG.md index 5039151d35bc..c1b1d541ccf4 100644 --- a/apps/meteor/CHANGELOG.md +++ b/apps/meteor/CHANGELOG.md @@ -1,5 +1,99 @@ # @rocket.chat/meteor +## 6.9.0-rc.0 + +### Minor Changes + +- ([#31917](https://github.com/RocketChat/Rocket.Chat/pull/31917)) Introduced a tab layout to the users page and implemented a tab called "All" that lists all users. + +- ([#32439](https://github.com/RocketChat/Rocket.Chat/pull/32439)) Allow visitors & integrations to access downloaded files after a room has closed. This was a known limitation in our codebase, where visitors were only able to access uploaded files in a livechat conversation while the conversation was open. + +- ([#32233](https://github.com/RocketChat/Rocket.Chat/pull/32233)) Makes the triggers fired by the condition `after-guest-registration` persist on the livechat client, it will persist through reloads and pagination, only reseting when a conversation is closed (no changes were done on the agent side of the conversation) + +- ([#32193](https://github.com/RocketChat/Rocket.Chat/pull/32193)) Adds CheckOption to departments multi selects improving options visibility state + +- ([#32317](https://github.com/RocketChat/Rocket.Chat/pull/32317)) Replace the read receipt receipt indicator in order to improve the accessibility complience + +- ([#32341](https://github.com/RocketChat/Rocket.Chat/pull/32341)) Changes the scrollbar color in order to improve the contrast and accessibility compliance + +- ([#32298](https://github.com/RocketChat/Rocket.Chat/pull/32298)) Added "Rocket.Chat Cloud Workspace ID" to workspace statistics page + +### Patch Changes + +- ([#32393](https://github.com/RocketChat/Rocket.Chat/pull/32393)) Fixed an issue causing monitors to dissapear from a saved unit every time a user saved the item. This was caused by the UI not sending the correct \_id of the monitors that were already saved, and this caused the Backend to ignore them and remove from the list. + +- ([#31695](https://github.com/RocketChat/Rocket.Chat/pull/31695)) Fix an issue where read receipts menu item wasn't considering the enabled setting to be displayed + +- ([#32454](https://github.com/RocketChat/Rocket.Chat/pull/32454)) Fixes an issue not allowing override retention policy in channels + +- ([#32444](https://github.com/RocketChat/Rocket.Chat/pull/32444)) Fixed an issue that prevented CAS users from being merged with existing user data on login + +- ([#32289](https://github.com/RocketChat/Rocket.Chat/pull/32289)) Fixed a problem in how server was processing errors that was sending 2 ephemeral error messages when @all or @here were used while they were disabled via permissions + +- ([#32348](https://github.com/RocketChat/Rocket.Chat/pull/32348)) Fixed an issue where translations would fallback to english some of the times. + +- ([#32182](https://github.com/RocketChat/Rocket.Chat/pull/32182)) Fixed an issue with object storage settings that was not allowing admins to decide if files generated via "Export conversation" feature were being proxied through server or not. + +- ([#32311](https://github.com/RocketChat/Rocket.Chat/pull/32311)) Fixed multiple issues with PDF generation logic when a quoted message was too big to fit in one single page. This was causing an internal infinite loop within the library (as it tried to make it fit, failing and then trying to fit on next page where the same happened thus causing a loop). + The library was not able to break down some nested views and thus was trying to fit the whole quote on one single page. Logic was updated to allow wrapping of the contents when messages are quoted (so they can span multiple lines) and removed a bunch of unnecesary views from the code. +- ([#32364](https://github.com/RocketChat/Rocket.Chat/pull/32364)) Fixed issue with "Export room as file" feature (`rooms.export` endpoint) generating an empty export when given an invalid date + +- ([#32314](https://github.com/RocketChat/Rocket.Chat/pull/32314)) Fixed an issue on Users converter that was not returning the `statusText` property from users even when the typing indicated property existed. + +- ([#32391](https://github.com/RocketChat/Rocket.Chat/pull/32391)) Fixes link image preview not opening in gallery mode + +- ([#32318](https://github.com/RocketChat/Rocket.Chat/pull/32318)) Fixed error handling for files bigger than NATS max allowed payload. This should prevent PDFs from erroring out when generating from rooms that contain heavy images. + +- ([#32345](https://github.com/RocketChat/Rocket.Chat/pull/32345)) Replaces the burger menu with an appropriate button fixing the semantics and mismatching color + +- ([#32414](https://github.com/RocketChat/Rocket.Chat/pull/32414)) Fixes the missing spacing on don`t ask again checkbox inside modals + +- ([#32269](https://github.com/RocketChat/Rocket.Chat/pull/32269)) Fixed a bad behavior with the interaction between OTR system messages & trash collection. We use trash collection as a temporary storage that holds recently deleted items from some collections. Messages is one of those. This was causing "User joined OTR" messages to be viewable when querying the trash collection. + Since OTR messages are by definition private, code was updated to bypass trash collection when removing these special messages. + + Note: this only applies to these system messages. OTR user's messages are not stored on the database. + +- ([#32415](https://github.com/RocketChat/Rocket.Chat/pull/32415)) This fuselage`s bump fixes: + + - The message toolbar visibility on hover (Firefox ESR) + - `Bubble` missing font-family + + [more details](https://github.com/RocketChat/fuselage/releases/tag/%40rocket.chat%2Ffuselage%400.53.7) + +- ([#32398](https://github.com/RocketChat/Rocket.Chat/pull/32398)) Fixed issue with external users being able to reset their passwords even when the "Allow Password Change for OAuth Users" setting is disabled + +- ([#32284](https://github.com/RocketChat/Rocket.Chat/pull/32284)) fixed Engagement Dashboard and Device Management admin pages loading indefinitely + +- ([#32342](https://github.com/RocketChat/Rocket.Chat/pull/32342)) bump fuselage adding `AttachmentAuthorName` missing color token + +-
    Updated dependencies [ff4e396416, bc50dd54a2, ad86761209, f83bd56cc5, 6205ef14f0, 724ba3a729, ee5cdfc367, 70ab2a7b7b]: + + - @rocket.chat/core-typings@6.9.0-rc.0 + - @rocket.chat/i18n@0.4.0-rc.0 + - @rocket.chat/core-services@0.3.15-rc.0 + - @rocket.chat/omnichannel-services@0.1.15-rc.0 + - @rocket.chat/pdf-worker@0.0.39-rc.0 + - @rocket.chat/rest-typings@6.9.0-rc.0 + - @rocket.chat/fuselage-ui-kit@7.0.0-rc.0 + - @rocket.chat/ui-kit@0.34.0-rc.0 + - @rocket.chat/api-client@0.1.33-rc.0 + - @rocket.chat/license@0.1.15-rc.0 + - @rocket.chat/presence@0.1.15-rc.0 + - @rocket.chat/apps@0.0.6-rc.0 + - @rocket.chat/cron@0.0.35-rc.0 + - @rocket.chat/gazzodown@7.0.0-rc.0 + - @rocket.chat/model-typings@0.4.1-rc.0 + - @rocket.chat/ui-contexts@7.0.0-rc.0 + - @rocket.chat/web-ui-registration@7.0.0-rc.0 + - @rocket.chat/server-cloud-communication@0.0.2 + - @rocket.chat/models@0.0.39-rc.0 + - @rocket.chat/ui-theming@0.1.2 + - @rocket.chat/ui-avatar@3.0.0-rc.0 + - @rocket.chat/ui-client@7.0.0-rc.0 + - @rocket.chat/ui-video-conf@7.0.0-rc.0 + - @rocket.chat/instance-status@0.0.39-rc.0 +
    + ## 6.8.0 ### Minor Changes diff --git a/apps/meteor/app/utils/rocketchat.info b/apps/meteor/app/utils/rocketchat.info index 5878bf0b3190..18d1687ea9bd 100644 --- a/apps/meteor/app/utils/rocketchat.info +++ b/apps/meteor/app/utils/rocketchat.info @@ -1,3 +1,3 @@ { - "version": "6.9.0-develop" + "version": "6.9.0-rc.0" } diff --git a/apps/meteor/ee/server/services/CHANGELOG.md b/apps/meteor/ee/server/services/CHANGELOG.md index de9a11ca7a32..c16384a9e56d 100644 --- a/apps/meteor/ee/server/services/CHANGELOG.md +++ b/apps/meteor/ee/server/services/CHANGELOG.md @@ -1,5 +1,19 @@ # rocketchat-services +## 1.1.33-rc.0 + +### Patch Changes + +-
    Updated dependencies [ff4e396416, ad86761209, f83bd56cc5, 724ba3a729, ee5cdfc367, 70ab2a7b7b]: + + - @rocket.chat/core-typings@6.9.0-rc.0 + - @rocket.chat/core-services@0.3.15-rc.0 + - @rocket.chat/rest-typings@6.9.0-rc.0 + - @rocket.chat/ui-kit@0.34.0-rc.0 + - @rocket.chat/model-typings@0.4.1-rc.0 + - @rocket.chat/models@0.0.39-rc.0 +
    + ## 1.1.32 ### Patch Changes diff --git a/apps/meteor/ee/server/services/package.json b/apps/meteor/ee/server/services/package.json index 3a22d3965385..3d1dc89ee1b6 100644 --- a/apps/meteor/ee/server/services/package.json +++ b/apps/meteor/ee/server/services/package.json @@ -1,7 +1,7 @@ { "name": "rocketchat-services", "private": true, - "version": "1.1.32", + "version": "1.1.33-rc.0", "description": "Rocket.Chat Authorization service", "main": "index.js", "scripts": { diff --git a/apps/meteor/package.json b/apps/meteor/package.json index 127439f74c09..f67bbf4defbd 100644 --- a/apps/meteor/package.json +++ b/apps/meteor/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/meteor", "description": "The Ultimate Open Source WebChat Platform", - "version": "6.9.0-develop", + "version": "6.9.0-rc.0", "private": true, "author": { "name": "Rocket.Chat", diff --git a/ee/apps/account-service/CHANGELOG.md b/ee/apps/account-service/CHANGELOG.md index 666eda95454d..875b61da3e5f 100644 --- a/ee/apps/account-service/CHANGELOG.md +++ b/ee/apps/account-service/CHANGELOG.md @@ -1,5 +1,18 @@ # @rocket.chat/account-service +## 0.3.14-rc.0 + +### Patch Changes + +-
    Updated dependencies [ff4e396416, ad86761209, f83bd56cc5, 724ba3a729, 70ab2a7b7b]: + + - @rocket.chat/core-typings@6.9.0-rc.0 + - @rocket.chat/core-services@0.3.15-rc.0 + - @rocket.chat/rest-typings@6.9.0-rc.0 + - @rocket.chat/model-typings@0.4.1-rc.0 + - @rocket.chat/models@0.0.39-rc.0 +
    + ## 0.3.13 ### Patch Changes diff --git a/ee/apps/account-service/package.json b/ee/apps/account-service/package.json index 0ccbbce820f2..508814bc2b34 100644 --- a/ee/apps/account-service/package.json +++ b/ee/apps/account-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/account-service", "private": true, - "version": "0.3.13", + "version": "0.3.14-rc.0", "description": "Rocket.Chat Account service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/authorization-service/CHANGELOG.md b/ee/apps/authorization-service/CHANGELOG.md index 80940bcb4ff4..7a15bf205301 100644 --- a/ee/apps/authorization-service/CHANGELOG.md +++ b/ee/apps/authorization-service/CHANGELOG.md @@ -1,5 +1,18 @@ # @rocket.chat/authorization-service +## 0.3.15-rc.0 + +### Patch Changes + +-
    Updated dependencies [ff4e396416, ad86761209, f83bd56cc5, 724ba3a729, 70ab2a7b7b]: + + - @rocket.chat/core-typings@6.9.0-rc.0 + - @rocket.chat/core-services@0.3.15-rc.0 + - @rocket.chat/rest-typings@6.9.0-rc.0 + - @rocket.chat/model-typings@0.4.1-rc.0 + - @rocket.chat/models@0.0.39-rc.0 +
    + ## 0.3.14 ### Patch Changes diff --git a/ee/apps/authorization-service/package.json b/ee/apps/authorization-service/package.json index 13546b16d3b3..d9cc9e7e8ce1 100644 --- a/ee/apps/authorization-service/package.json +++ b/ee/apps/authorization-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/authorization-service", "private": true, - "version": "0.3.14", + "version": "0.3.15-rc.0", "description": "Rocket.Chat Authorization service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/ddp-streamer/CHANGELOG.md b/ee/apps/ddp-streamer/CHANGELOG.md index 5376a1baad58..e7ba31816b5b 100644 --- a/ee/apps/ddp-streamer/CHANGELOG.md +++ b/ee/apps/ddp-streamer/CHANGELOG.md @@ -1,5 +1,20 @@ # @rocket.chat/ddp-streamer +## 0.2.14-rc.0 + +### Patch Changes + +-
    Updated dependencies [ff4e396416, ad86761209, f83bd56cc5, 724ba3a729, 70ab2a7b7b]: + + - @rocket.chat/core-typings@6.9.0-rc.0 + - @rocket.chat/core-services@0.3.15-rc.0 + - @rocket.chat/rest-typings@6.9.0-rc.0 + - @rocket.chat/model-typings@0.4.1-rc.0 + - @rocket.chat/ui-contexts@7.0.0-rc.0 + - @rocket.chat/models@0.0.39-rc.0 + - @rocket.chat/instance-status@0.0.39-rc.0 +
    + ## 0.2.13 ### Patch Changes diff --git a/ee/apps/ddp-streamer/package.json b/ee/apps/ddp-streamer/package.json index 8cc41e5b8e3c..ce7064e834fb 100644 --- a/ee/apps/ddp-streamer/package.json +++ b/ee/apps/ddp-streamer/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/ddp-streamer", "private": true, - "version": "0.2.13", + "version": "0.2.14-rc.0", "description": "Rocket.Chat DDP-Streamer service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/omnichannel-transcript/CHANGELOG.md b/ee/apps/omnichannel-transcript/CHANGELOG.md index a2530269d793..ac726a7e5ffb 100644 --- a/ee/apps/omnichannel-transcript/CHANGELOG.md +++ b/ee/apps/omnichannel-transcript/CHANGELOG.md @@ -1,5 +1,19 @@ # @rocket.chat/omnichannel-transcript +## 0.3.15-rc.0 + +### Patch Changes + +-
    Updated dependencies [ff4e396416, ad86761209, 724ba3a729, 70ab2a7b7b]: + + - @rocket.chat/core-typings@6.9.0-rc.0 + - @rocket.chat/core-services@0.3.15-rc.0 + - @rocket.chat/omnichannel-services@0.1.15-rc.0 + - @rocket.chat/pdf-worker@0.0.39-rc.0 + - @rocket.chat/model-typings@0.4.1-rc.0 + - @rocket.chat/models@0.0.39-rc.0 +
    + ## 0.3.14 ### Patch Changes diff --git a/ee/apps/omnichannel-transcript/package.json b/ee/apps/omnichannel-transcript/package.json index 5a8da65d51a4..fc27979f1b30 100644 --- a/ee/apps/omnichannel-transcript/package.json +++ b/ee/apps/omnichannel-transcript/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/omnichannel-transcript", "private": true, - "version": "0.3.14", + "version": "0.3.15-rc.0", "description": "Rocket.Chat service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/presence-service/CHANGELOG.md b/ee/apps/presence-service/CHANGELOG.md index 3bd7b9952832..68e8cfcff8d7 100644 --- a/ee/apps/presence-service/CHANGELOG.md +++ b/ee/apps/presence-service/CHANGELOG.md @@ -1,5 +1,18 @@ # @rocket.chat/presence-service +## 0.3.15-rc.0 + +### Patch Changes + +-
    Updated dependencies [ff4e396416, ad86761209, 724ba3a729, 70ab2a7b7b]: + + - @rocket.chat/core-typings@6.9.0-rc.0 + - @rocket.chat/core-services@0.3.15-rc.0 + - @rocket.chat/presence@0.1.15-rc.0 + - @rocket.chat/model-typings@0.4.1-rc.0 + - @rocket.chat/models@0.0.39-rc.0 +
    + ## 0.3.14 ### Patch Changes diff --git a/ee/apps/presence-service/package.json b/ee/apps/presence-service/package.json index 10b47541cb82..e353668a1f36 100644 --- a/ee/apps/presence-service/package.json +++ b/ee/apps/presence-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/presence-service", "private": true, - "version": "0.3.14", + "version": "0.3.15-rc.0", "description": "Rocket.Chat Presence service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/queue-worker/CHANGELOG.md b/ee/apps/queue-worker/CHANGELOG.md index 2834b6301181..911923e492ba 100644 --- a/ee/apps/queue-worker/CHANGELOG.md +++ b/ee/apps/queue-worker/CHANGELOG.md @@ -1,5 +1,18 @@ # @rocket.chat/queue-worker +## 0.3.15-rc.0 + +### Patch Changes + +-
    Updated dependencies [ff4e396416, ad86761209, 724ba3a729, 70ab2a7b7b]: + + - @rocket.chat/core-typings@6.9.0-rc.0 + - @rocket.chat/core-services@0.3.15-rc.0 + - @rocket.chat/omnichannel-services@0.1.15-rc.0 + - @rocket.chat/model-typings@0.4.1-rc.0 + - @rocket.chat/models@0.0.39-rc.0 +
    + ## 0.3.14 ### Patch Changes diff --git a/ee/apps/queue-worker/package.json b/ee/apps/queue-worker/package.json index 4864e4a34c9b..dcbb47e7b0e4 100644 --- a/ee/apps/queue-worker/package.json +++ b/ee/apps/queue-worker/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/queue-worker", "private": true, - "version": "0.3.14", + "version": "0.3.15-rc.0", "description": "Rocket.Chat service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/stream-hub-service/CHANGELOG.md b/ee/apps/stream-hub-service/CHANGELOG.md index e6a8f79aedd8..997188f03260 100644 --- a/ee/apps/stream-hub-service/CHANGELOG.md +++ b/ee/apps/stream-hub-service/CHANGELOG.md @@ -1,5 +1,17 @@ # @rocket.chat/stream-hub-service +## 0.3.15-rc.0 + +### Patch Changes + +-
    Updated dependencies [ff4e396416, ad86761209, 724ba3a729, 70ab2a7b7b]: + + - @rocket.chat/core-typings@6.9.0-rc.0 + - @rocket.chat/core-services@0.3.15-rc.0 + - @rocket.chat/model-typings@0.4.1-rc.0 + - @rocket.chat/models@0.0.39-rc.0 +
    + ## 0.3.14 ### Patch Changes diff --git a/ee/apps/stream-hub-service/package.json b/ee/apps/stream-hub-service/package.json index 76076b4d3030..827753a270b1 100644 --- a/ee/apps/stream-hub-service/package.json +++ b/ee/apps/stream-hub-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/stream-hub-service", "private": true, - "version": "0.3.14", + "version": "0.3.15-rc.0", "description": "Rocket.Chat Stream Hub service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/packages/api-client/CHANGELOG.md b/ee/packages/api-client/CHANGELOG.md index 28df5106b12f..0a89cb4a8e59 100644 --- a/ee/packages/api-client/CHANGELOG.md +++ b/ee/packages/api-client/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/api-client +## 0.1.33-rc.0 + +### Patch Changes + +-
    Updated dependencies [ff4e396416, f83bd56cc5, 70ab2a7b7b]: + + - @rocket.chat/core-typings@6.9.0-rc.0 + - @rocket.chat/rest-typings@6.9.0-rc.0 +
    + ## 0.1.32 ### Patch Changes diff --git a/ee/packages/api-client/package.json b/ee/packages/api-client/package.json index 096eec4ee113..609cd9888dd6 100644 --- a/ee/packages/api-client/package.json +++ b/ee/packages/api-client/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/api-client", "private": true, - "version": "0.1.32", + "version": "0.1.33-rc.0", "devDependencies": { "@swc/core": "^1.3.95", "@swc/jest": "^0.2.29", diff --git a/ee/packages/ddp-client/CHANGELOG.md b/ee/packages/ddp-client/CHANGELOG.md index 80aada44fcab..66344812c276 100644 --- a/ee/packages/ddp-client/CHANGELOG.md +++ b/ee/packages/ddp-client/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/ddp-client +## 0.2.24-rc.0 + +### Patch Changes + +-
    Updated dependencies [f83bd56cc5]: + + - @rocket.chat/rest-typings@6.9.0-rc.0 + - @rocket.chat/api-client@0.1.33-rc.0 +
    + ## 0.2.23 ### Patch Changes diff --git a/ee/packages/ddp-client/package.json b/ee/packages/ddp-client/package.json index daf3a22c5da6..26c85939670f 100644 --- a/ee/packages/ddp-client/package.json +++ b/ee/packages/ddp-client/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/ddp-client", "private": true, - "version": "0.2.23", + "version": "0.2.24-rc.0", "devDependencies": { "@swc/core": "^1.3.95", "@swc/jest": "^0.2.29", diff --git a/ee/packages/license/CHANGELOG.md b/ee/packages/license/CHANGELOG.md index 603f131dc407..b2bbb88bdb2e 100644 --- a/ee/packages/license/CHANGELOG.md +++ b/ee/packages/license/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/license +## 0.1.15-rc.0 + +### Patch Changes + +-
    Updated dependencies [ff4e396416, 70ab2a7b7b]: + + - @rocket.chat/core-typings@6.9.0-rc.0 +
    + ## 0.1.14 ### Patch Changes diff --git a/ee/packages/license/package.json b/ee/packages/license/package.json index a07a8db51af0..6418eb224553 100644 --- a/ee/packages/license/package.json +++ b/ee/packages/license/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/license", - "version": "0.1.14", + "version": "0.1.15-rc.0", "private": true, "devDependencies": { "@swc/core": "^1.3.95", diff --git a/ee/packages/omnichannel-services/CHANGELOG.md b/ee/packages/omnichannel-services/CHANGELOG.md index e9364326e949..fbed2ecb619e 100644 --- a/ee/packages/omnichannel-services/CHANGELOG.md +++ b/ee/packages/omnichannel-services/CHANGELOG.md @@ -1,5 +1,23 @@ # @rocket.chat/omnichannel-services +## 0.1.15-rc.0 + +### Patch Changes + +- ([#32311](https://github.com/RocketChat/Rocket.Chat/pull/32311)) Fixed multiple issues with PDF generation logic when a quoted message was too big to fit in one single page. This was causing an internal infinite loop within the library (as it tried to make it fit, failing and then trying to fit on next page where the same happened thus causing a loop). + The library was not able to break down some nested views and thus was trying to fit the whole quote on one single page. Logic was updated to allow wrapping of the contents when messages are quoted (so they can span multiple lines) and removed a bunch of unnecesary views from the code. +- ([#32318](https://github.com/RocketChat/Rocket.Chat/pull/32318)) Fixed error handling for files bigger than NATS max allowed payload. This should prevent PDFs from erroring out when generating from rooms that contain heavy images. + +-
    Updated dependencies [ff4e396416, ad86761209, f83bd56cc5, 724ba3a729, 70ab2a7b7b]: + + - @rocket.chat/core-typings@6.9.0-rc.0 + - @rocket.chat/core-services@0.3.15-rc.0 + - @rocket.chat/pdf-worker@0.0.39-rc.0 + - @rocket.chat/rest-typings@6.9.0-rc.0 + - @rocket.chat/model-typings@0.4.1-rc.0 + - @rocket.chat/models@0.0.39-rc.0 +
    + ## 0.1.14 ### Patch Changes diff --git a/ee/packages/omnichannel-services/package.json b/ee/packages/omnichannel-services/package.json index a9a99ff25fd7..bc07fdc99639 100644 --- a/ee/packages/omnichannel-services/package.json +++ b/ee/packages/omnichannel-services/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/omnichannel-services", - "version": "0.1.14", + "version": "0.1.15-rc.0", "private": true, "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", diff --git a/ee/packages/pdf-worker/CHANGELOG.md b/ee/packages/pdf-worker/CHANGELOG.md index 5cd81d9558ac..05dab4b4b414 100644 --- a/ee/packages/pdf-worker/CHANGELOG.md +++ b/ee/packages/pdf-worker/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/pdf-worker +## 0.0.39-rc.0 + +### Patch Changes + +- ([#32311](https://github.com/RocketChat/Rocket.Chat/pull/32311)) Fixed multiple issues with PDF generation logic when a quoted message was too big to fit in one single page. This was causing an internal infinite loop within the library (as it tried to make it fit, failing and then trying to fit on next page where the same happened thus causing a loop). + The library was not able to break down some nested views and thus was trying to fit the whole quote on one single page. Logic was updated to allow wrapping of the contents when messages are quoted (so they can span multiple lines) and removed a bunch of unnecesary views from the code. +-
    Updated dependencies [ff4e396416, 70ab2a7b7b]: + + - @rocket.chat/core-typings@6.9.0-rc.0 +
    + ## 0.0.38 ### Patch Changes diff --git a/ee/packages/pdf-worker/package.json b/ee/packages/pdf-worker/package.json index c2e3513b6aec..2e68fd2f3ca4 100644 --- a/ee/packages/pdf-worker/package.json +++ b/ee/packages/pdf-worker/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/pdf-worker", - "version": "0.0.38", + "version": "0.0.39-rc.0", "private": true, "devDependencies": { "@storybook/addon-essentials": "~6.5.16", diff --git a/ee/packages/presence/CHANGELOG.md b/ee/packages/presence/CHANGELOG.md index faae6ee61368..8e11707e6c1e 100644 --- a/ee/packages/presence/CHANGELOG.md +++ b/ee/packages/presence/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/presence +## 0.1.15-rc.0 + +### Patch Changes + +-
    Updated dependencies [ff4e396416, ad86761209, 724ba3a729, 70ab2a7b7b]: + + - @rocket.chat/core-typings@6.9.0-rc.0 + - @rocket.chat/core-services@0.3.15-rc.0 + - @rocket.chat/models@0.0.39-rc.0 +
    + ## 0.1.14 ### Patch Changes diff --git a/ee/packages/presence/package.json b/ee/packages/presence/package.json index d4b102247d9a..9b2472dd91f6 100644 --- a/ee/packages/presence/package.json +++ b/ee/packages/presence/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/presence", - "version": "0.1.14", + "version": "0.1.15-rc.0", "private": true, "devDependencies": { "@babel/core": "~7.22.20", diff --git a/package.json b/package.json index fa35a133961e..0edd977b7508 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rocket.chat", - "version": "6.9.0-develop", + "version": "6.9.0-rc.0", "description": "Rocket.Chat Monorepo", "main": "index.js", "private": true, diff --git a/packages/apps/CHANGELOG.md b/packages/apps/CHANGELOG.md index 2eda0bcd9fb0..dd7986b1ed88 100644 --- a/packages/apps/CHANGELOG.md +++ b/packages/apps/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/apps +## 0.0.6-rc.0 + +### Patch Changes + +-
    Updated dependencies [ff4e396416, 70ab2a7b7b]: + + - @rocket.chat/core-typings@6.9.0-rc.0 + - @rocket.chat/model-typings@0.4.1-rc.0 +
    + ## 0.0.5 ### Patch Changes diff --git a/packages/apps/package.json b/packages/apps/package.json index fd657d4382f8..b27fec0a2d74 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/apps", - "version": "0.0.5", + "version": "0.0.6-rc.0", "private": true, "devDependencies": { "@types/jest": "~29.5.7", diff --git a/packages/core-services/CHANGELOG.md b/packages/core-services/CHANGELOG.md index 38f0c44cb8ac..212f0af2114f 100644 --- a/packages/core-services/CHANGELOG.md +++ b/packages/core-services/CHANGELOG.md @@ -1,5 +1,21 @@ # @rocket.chat/core-services +## 0.3.15-rc.0 + +### Patch Changes + +- ([#32311](https://github.com/RocketChat/Rocket.Chat/pull/32311)) Fixed multiple issues with PDF generation logic when a quoted message was too big to fit in one single page. This was causing an internal infinite loop within the library (as it tried to make it fit, failing and then trying to fit on next page where the same happened thus causing a loop). + The library was not able to break down some nested views and thus was trying to fit the whole quote on one single page. Logic was updated to allow wrapping of the contents when messages are quoted (so they can span multiple lines) and removed a bunch of unnecesary views from the code. +- ([#32318](https://github.com/RocketChat/Rocket.Chat/pull/32318)) Fixed error handling for files bigger than NATS max allowed payload. This should prevent PDFs from erroring out when generating from rooms that contain heavy images. + +-
    Updated dependencies [ff4e396416, f83bd56cc5, ee5cdfc367, 70ab2a7b7b]: + + - @rocket.chat/core-typings@6.9.0-rc.0 + - @rocket.chat/rest-typings@6.9.0-rc.0 + - @rocket.chat/ui-kit@0.34.0-rc.0 + - @rocket.chat/models@0.0.39-rc.0 +
    + ## 0.3.14 ### Patch Changes diff --git a/packages/core-services/package.json b/packages/core-services/package.json index d7a8fe6b78f1..4f3aa194cf91 100644 --- a/packages/core-services/package.json +++ b/packages/core-services/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/core-services", - "version": "0.3.14", + "version": "0.3.15-rc.0", "private": true, "devDependencies": { "@babel/core": "~7.22.20", diff --git a/packages/core-typings/CHANGELOG.md b/packages/core-typings/CHANGELOG.md index 311b3bbefa88..179038594e83 100644 --- a/packages/core-typings/CHANGELOG.md +++ b/packages/core-typings/CHANGELOG.md @@ -1,5 +1,20 @@ # @rocket.chat/core-typings +## 6.9.0-rc.0 + +### Minor Changes + +- ([#31917](https://github.com/RocketChat/Rocket.Chat/pull/31917)) Introduced a tab layout to the users page and implemented a tab called "All" that lists all users. + +- ([#32298](https://github.com/RocketChat/Rocket.Chat/pull/32298)) Added "Rocket.Chat Cloud Workspace ID" to workspace statistics page + +### Patch Changes + +-
    Updated dependencies [ee5cdfc367]: + + - @rocket.chat/ui-kit@0.34.0-rc.0 +
    + ## 6.8.0 ### Minor Changes diff --git a/packages/core-typings/package.json b/packages/core-typings/package.json index 8da547209212..0778f37d98ca 100644 --- a/packages/core-typings/package.json +++ b/packages/core-typings/package.json @@ -2,7 +2,7 @@ "$schema": "https://json.schemastore.org/package", "name": "@rocket.chat/core-typings", "private": true, - "version": "6.9.0-develop", + "version": "6.9.0-rc.0", "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", "eslint": "~8.45.0", diff --git a/packages/cron/CHANGELOG.md b/packages/cron/CHANGELOG.md index 797d15348f5d..a7cca89842a7 100644 --- a/packages/cron/CHANGELOG.md +++ b/packages/cron/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/cron +## 0.0.35-rc.0 + +### Patch Changes + +-
    Updated dependencies [ff4e396416, 70ab2a7b7b]: + + - @rocket.chat/core-typings@6.9.0-rc.0 + - @rocket.chat/models@0.0.39-rc.0 +
    + ## 0.0.34 ### Patch Changes diff --git a/packages/cron/package.json b/packages/cron/package.json index a9a4424dafe9..490d75ceb041 100644 --- a/packages/cron/package.json +++ b/packages/cron/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/cron", - "version": "0.0.34", + "version": "0.0.35-rc.0", "private": true, "devDependencies": { "@types/jest": "~29.5.7", diff --git a/packages/fuselage-ui-kit/CHANGELOG.md b/packages/fuselage-ui-kit/CHANGELOG.md index 7733e8063e61..8c6909e30be2 100644 --- a/packages/fuselage-ui-kit/CHANGELOG.md +++ b/packages/fuselage-ui-kit/CHANGELOG.md @@ -1,5 +1,25 @@ # Change Log +## 7.0.0-rc.0 + +### Minor Changes + +- ([#31918](https://github.com/RocketChat/Rocket.Chat/pull/31918)) Introduced new elements for apps to select channels + +### Patch Changes + +- ([#32327](https://github.com/RocketChat/Rocket.Chat/pull/32327)) Fix translation param on video conf joined message + +-
    Updated dependencies [ff4e396416, ee5cdfc367, 70ab2a7b7b]: + + - @rocket.chat/core-typings@6.9.0-rc.0 + - @rocket.chat/ui-kit@0.34.0-rc.0 + - @rocket.chat/gazzodown@7.0.0-rc.0 + - @rocket.chat/ui-contexts@7.0.0-rc.0 + - @rocket.chat/ui-avatar@3.0.0-rc.0 + - @rocket.chat/ui-video-conf@7.0.0-rc.0 +
    + ## 6.0.0 ### Patch Changes diff --git a/packages/fuselage-ui-kit/package.json b/packages/fuselage-ui-kit/package.json index 5fe8960b2589..1ab7de040149 100644 --- a/packages/fuselage-ui-kit/package.json +++ b/packages/fuselage-ui-kit/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/fuselage-ui-kit", "private": true, - "version": "6.0.0", + "version": "7.0.0-rc.0", "description": "UiKit elements for Rocket.Chat Apps built under Fuselage design system", "homepage": "https://rocketchat.github.io/Rocket.Chat.Fuselage/", "author": { @@ -50,10 +50,10 @@ "@rocket.chat/icons": "*", "@rocket.chat/prettier-config": "*", "@rocket.chat/styled": "*", - "@rocket.chat/ui-avatar": "2.0.0", - "@rocket.chat/ui-contexts": "6.0.0", - "@rocket.chat/ui-kit": "0.33.0", - "@rocket.chat/ui-video-conf": "6.0.0", + "@rocket.chat/ui-avatar": "3.0.0-rc.0", + "@rocket.chat/ui-contexts": "7.0.0-rc.0", + "@rocket.chat/ui-kit": "0.34.0-rc.0", + "@rocket.chat/ui-video-conf": "7.0.0-rc.0", "@tanstack/react-query": "*", "react": "*", "react-dom": "*" @@ -110,7 +110,7 @@ "typescript": "~5.3.3" }, "dependencies": { - "@rocket.chat/core-typings": "*", + "@rocket.chat/core-typings": "6.9.0-rc.0", "@rocket.chat/gazzodown": "workspace:^", "@rocket.chat/ui-kit": "workspace:~", "tslib": "^2.5.3" diff --git a/packages/gazzodown/CHANGELOG.md b/packages/gazzodown/CHANGELOG.md index 828981eb3809..69e83db1e9aa 100644 --- a/packages/gazzodown/CHANGELOG.md +++ b/packages/gazzodown/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/gazzodown +## 7.0.0-rc.0 + +### Patch Changes + +-
    Updated dependencies [ff4e396416, 70ab2a7b7b]: + + - @rocket.chat/core-typings@6.9.0-rc.0 + - @rocket.chat/ui-contexts@7.0.0-rc.0 + - @rocket.chat/ui-client@7.0.0-rc.0 +
    + ## 6.0.0 ### Patch Changes diff --git a/packages/gazzodown/package.json b/packages/gazzodown/package.json index 435c984008a5..8168d202f0d1 100644 --- a/packages/gazzodown/package.json +++ b/packages/gazzodown/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/gazzodown", - "version": "6.0.0", + "version": "7.0.0-rc.0", "private": true, "devDependencies": { "@babel/core": "~7.22.20", @@ -71,8 +71,8 @@ "@rocket.chat/fuselage-tokens": "*", "@rocket.chat/message-parser": "0.31.29", "@rocket.chat/styled": "*", - "@rocket.chat/ui-client": "6.0.0", - "@rocket.chat/ui-contexts": "6.0.0", + "@rocket.chat/ui-client": "7.0.0-rc.0", + "@rocket.chat/ui-contexts": "7.0.0-rc.0", "katex": "*", "react": "*" }, diff --git a/packages/i18n/CHANGELOG.md b/packages/i18n/CHANGELOG.md index c1488a9ce8ca..17f2e90aaeed 100644 --- a/packages/i18n/CHANGELOG.md +++ b/packages/i18n/CHANGELOG.md @@ -1,5 +1,17 @@ # @rocket.chat/i18n +## 0.4.0-rc.0 + +### Minor Changes + +- ([#32298](https://github.com/RocketChat/Rocket.Chat/pull/32298)) Added "Rocket.Chat Cloud Workspace ID" to workspace statistics page + +### Patch Changes + +- ([#31917](https://github.com/RocketChat/Rocket.Chat/pull/31917)) Introduced a tab layout to the users page and implemented a tab called "All" that lists all users. + +- ([#32182](https://github.com/RocketChat/Rocket.Chat/pull/32182)) Fixed an issue with object storage settings that was not allowing admins to decide if files generated via "Export conversation" feature were being proxied through server or not. + ## 0.3.0 ### Minor Changes diff --git a/packages/i18n/package.json b/packages/i18n/package.json index 38a4c434b12c..a63db12d18e9 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/i18n", - "version": "0.3.0", + "version": "0.4.0-rc.0", "private": true, "devDependencies": { "@babel/core": "~7.22.20", diff --git a/packages/instance-status/CHANGELOG.md b/packages/instance-status/CHANGELOG.md index 968ac7af7959..e6d3269dbda9 100644 --- a/packages/instance-status/CHANGELOG.md +++ b/packages/instance-status/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/instance-status +## 0.0.39-rc.0 + +### Patch Changes + +-
    Updated dependencies []: + + - @rocket.chat/models@0.0.39-rc.0 +
    + ## 0.0.38 ### Patch Changes diff --git a/packages/instance-status/package.json b/packages/instance-status/package.json index a6998bbd4c32..43a333587fba 100644 --- a/packages/instance-status/package.json +++ b/packages/instance-status/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/instance-status", - "version": "0.0.38", + "version": "0.0.39-rc.0", "private": true, "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", diff --git a/packages/livechat/CHANGELOG.md b/packages/livechat/CHANGELOG.md index 8541e820f1bb..7ffe2b0da4e3 100644 --- a/packages/livechat/CHANGELOG.md +++ b/packages/livechat/CHANGELOG.md @@ -1,5 +1,19 @@ # @rocket.chat/livechat Change Log +## 1.17.0-rc.0 + +### Minor Changes + +- ([#32233](https://github.com/RocketChat/Rocket.Chat/pull/32233)) Makes the triggers fired by the condition `after-guest-registration` persist on the livechat client, it will persist through reloads and pagination, only reseting when a conversation is closed (no changes were done on the agent side of the conversation) + +### Patch Changes + +-
    Updated dependencies [ee5cdfc367]: + + - @rocket.chat/ui-kit@0.34.0-rc.0 + - @rocket.chat/gazzodown@7.0.0-rc.0 +
    + ## 1.16.0 ### Patch Changes diff --git a/packages/livechat/package.json b/packages/livechat/package.json index 6d1b805b59ab..f7d3e8b9e80c 100644 --- a/packages/livechat/package.json +++ b/packages/livechat/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/livechat", - "version": "1.16.0", + "version": "1.17.0-rc.0", "files": [ "/build" ], diff --git a/packages/mock-providers/CHANGELOG.md b/packages/mock-providers/CHANGELOG.md index 13e9fd464c72..fe564b88c0ce 100644 --- a/packages/mock-providers/CHANGELOG.md +++ b/packages/mock-providers/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/mock-providers +## 0.0.7-rc.0 + +### Patch Changes + +-
    Updated dependencies [ff4e396416, bc50dd54a2, 70ab2a7b7b]: + + - @rocket.chat/i18n@0.4.0-rc.0 +
    + ## 0.0.6 ### Patch Changes diff --git a/packages/mock-providers/package.json b/packages/mock-providers/package.json index 89208cafaf41..551447f9f1fc 100644 --- a/packages/mock-providers/package.json +++ b/packages/mock-providers/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/mock-providers", - "version": "0.0.6", + "version": "0.0.7-rc.0", "private": true, "dependencies": { "@rocket.chat/i18n": "workspace:~", diff --git a/packages/model-typings/CHANGELOG.md b/packages/model-typings/CHANGELOG.md index a4ff3abbd66d..0c237e46f300 100644 --- a/packages/model-typings/CHANGELOG.md +++ b/packages/model-typings/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/model-typings +## 0.4.1-rc.0 + +### Patch Changes + +-
    Updated dependencies [ff4e396416, 70ab2a7b7b]: + + - @rocket.chat/core-typings@6.9.0-rc.0 +
    + ## 0.4.0 ### Minor Changes diff --git a/packages/model-typings/package.json b/packages/model-typings/package.json index 5c14dc6b7bb4..3a3d7268c00c 100644 --- a/packages/model-typings/package.json +++ b/packages/model-typings/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/model-typings", - "version": "0.4.0", + "version": "0.4.1-rc.0", "private": true, "devDependencies": { "@types/jest": "~29.5.7", diff --git a/packages/models/CHANGELOG.md b/packages/models/CHANGELOG.md index 5479e14a00bd..e23e0107e9f5 100644 --- a/packages/models/CHANGELOG.md +++ b/packages/models/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/models +## 0.0.39-rc.0 + +### Patch Changes + +-
    Updated dependencies []: + + - @rocket.chat/model-typings@0.4.1-rc.0 +
    + ## 0.0.38 ### Patch Changes diff --git a/packages/models/package.json b/packages/models/package.json index e8d4c77158fc..97ff2dcca4aa 100644 --- a/packages/models/package.json +++ b/packages/models/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/models", - "version": "0.0.38", + "version": "0.0.39-rc.0", "private": true, "devDependencies": { "@swc/core": "^1.3.95", diff --git a/packages/rest-typings/CHANGELOG.md b/packages/rest-typings/CHANGELOG.md index 4f2819a3d71c..d54f717f3863 100644 --- a/packages/rest-typings/CHANGELOG.md +++ b/packages/rest-typings/CHANGELOG.md @@ -1,5 +1,19 @@ # @rocket.chat/rest-typings +## 6.9.0-rc.0 + +### Minor Changes + +- ([#32364](https://github.com/RocketChat/Rocket.Chat/pull/32364)) Fixed issue with "Export room as file" feature (`rooms.export` endpoint) generating an empty export when given an invalid date + +### Patch Changes + +-
    Updated dependencies [ff4e396416, ee5cdfc367, 70ab2a7b7b]: + + - @rocket.chat/core-typings@6.9.0-rc.0 + - @rocket.chat/ui-kit@0.34.0-rc.0 +
    + ## 6.8.0 ### Minor Changes diff --git a/packages/rest-typings/package.json b/packages/rest-typings/package.json index cd3c10d6ebb4..8cb1a260d201 100644 --- a/packages/rest-typings/package.json +++ b/packages/rest-typings/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/rest-typings", "private": true, - "version": "6.9.0-develop", + "version": "6.9.0-rc.0", "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", "@types/jest": "~29.5.7", diff --git a/packages/ui-avatar/CHANGELOG.md b/packages/ui-avatar/CHANGELOG.md index 5a6023b53c47..acce08f9687b 100644 --- a/packages/ui-avatar/CHANGELOG.md +++ b/packages/ui-avatar/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/ui-avatar +## 3.0.0-rc.0 + +### Patch Changes + +-
    Updated dependencies []: + + - @rocket.chat/ui-contexts@7.0.0-rc.0 +
    + ## 2.0.0 ### Patch Changes diff --git a/packages/ui-avatar/package.json b/packages/ui-avatar/package.json index 949dbda74fb5..45e9e4577858 100644 --- a/packages/ui-avatar/package.json +++ b/packages/ui-avatar/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-avatar", - "version": "2.0.0", + "version": "3.0.0-rc.0", "private": true, "devDependencies": { "@babel/core": "~7.22.20", @@ -31,7 +31,7 @@ ], "peerDependencies": { "@rocket.chat/fuselage": "*", - "@rocket.chat/ui-contexts": "6.0.0", + "@rocket.chat/ui-contexts": "7.0.0-rc.0", "react": "~17.0.2" }, "volta": { diff --git a/packages/ui-client/CHANGELOG.md b/packages/ui-client/CHANGELOG.md index 4ef42e89b343..01c70590c800 100644 --- a/packages/ui-client/CHANGELOG.md +++ b/packages/ui-client/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/ui-client +## 7.0.0-rc.0 + +### Patch Changes + +-
    Updated dependencies []: + + - @rocket.chat/ui-contexts@7.0.0-rc.0 +
    + ## 6.0.0 ### Patch Changes diff --git a/packages/ui-client/package.json b/packages/ui-client/package.json index 1695860ee949..d82021bb8344 100644 --- a/packages/ui-client/package.json +++ b/packages/ui-client/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-client", - "version": "6.0.0", + "version": "7.0.0-rc.0", "private": true, "devDependencies": { "@babel/core": "~7.22.20", @@ -63,7 +63,7 @@ "@rocket.chat/fuselage": "*", "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", - "@rocket.chat/ui-contexts": "6.0.0", + "@rocket.chat/ui-contexts": "7.0.0-rc.0", "react": "~17.0.2" }, "volta": { diff --git a/packages/ui-contexts/CHANGELOG.md b/packages/ui-contexts/CHANGELOG.md index b8c3a1ca3fbc..d955d823c92e 100644 --- a/packages/ui-contexts/CHANGELOG.md +++ b/packages/ui-contexts/CHANGELOG.md @@ -1,5 +1,17 @@ # @rocket.chat/ui-contexts +## 7.0.0-rc.0 + +### Patch Changes + +-
    Updated dependencies [ff4e396416, bc50dd54a2, f83bd56cc5, 70ab2a7b7b]: + + - @rocket.chat/core-typings@6.9.0-rc.0 + - @rocket.chat/i18n@0.4.0-rc.0 + - @rocket.chat/rest-typings@6.9.0-rc.0 + - @rocket.chat/ddp-client@0.2.24-rc.0 +
    + ## 6.0.0 ### Minor Changes diff --git a/packages/ui-contexts/package.json b/packages/ui-contexts/package.json index 9152d21782c2..94a7f4ea4168 100644 --- a/packages/ui-contexts/package.json +++ b/packages/ui-contexts/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-contexts", - "version": "6.0.0", + "version": "7.0.0-rc.0", "private": true, "devDependencies": { "@rocket.chat/core-typings": "workspace:^", diff --git a/packages/ui-kit/CHANGELOG.md b/packages/ui-kit/CHANGELOG.md index 59de835f34ad..283d203f0271 100644 --- a/packages/ui-kit/CHANGELOG.md +++ b/packages/ui-kit/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 0.34.0-rc.0 + +### Minor Changes + +- ([#31918](https://github.com/RocketChat/Rocket.Chat/pull/31918)) Introduced new elements for apps to select channels + ## 0.33.0 ### Minor Changes diff --git a/packages/ui-kit/package.json b/packages/ui-kit/package.json index 23cd40877dfe..cfd3d8f95407 100644 --- a/packages/ui-kit/package.json +++ b/packages/ui-kit/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-kit", - "version": "0.33.0", + "version": "0.34.0-rc.0", "description": "Interactive UI elements for Rocket.Chat Apps", "homepage": "https://rocket.chat", "author": { diff --git a/packages/ui-video-conf/CHANGELOG.md b/packages/ui-video-conf/CHANGELOG.md index 5244989bae58..a103f9410c09 100644 --- a/packages/ui-video-conf/CHANGELOG.md +++ b/packages/ui-video-conf/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/ui-video-conf +## 7.0.0-rc.0 + +### Patch Changes + +-
    Updated dependencies []: + + - @rocket.chat/ui-contexts@7.0.0-rc.0 + - @rocket.chat/ui-avatar@3.0.0-rc.0 +
    + ## 6.0.0 ### Patch Changes diff --git a/packages/ui-video-conf/package.json b/packages/ui-video-conf/package.json index be30d82d7d9d..e5cfb3e580c2 100644 --- a/packages/ui-video-conf/package.json +++ b/packages/ui-video-conf/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-video-conf", - "version": "6.0.0", + "version": "7.0.0-rc.0", "private": true, "devDependencies": { "@babel/core": "~7.22.20", @@ -36,8 +36,8 @@ "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", "@rocket.chat/styled": "*", - "@rocket.chat/ui-avatar": "2.0.0", - "@rocket.chat/ui-contexts": "6.0.0", + "@rocket.chat/ui-avatar": "3.0.0-rc.0", + "@rocket.chat/ui-contexts": "7.0.0-rc.0", "react": "^17.0.2", "react-dom": "^17.0.2" }, diff --git a/packages/uikit-playground/CHANGELOG.md b/packages/uikit-playground/CHANGELOG.md index bc81f0f24d9f..26177ed97720 100644 --- a/packages/uikit-playground/CHANGELOG.md +++ b/packages/uikit-playground/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/uikit-playground +## 0.2.23-rc.0 + +### Patch Changes + +-
    Updated dependencies [6205ef14f0, ee5cdfc367]: + + - @rocket.chat/fuselage-ui-kit@7.0.0-rc.0 + - @rocket.chat/ui-contexts@7.0.0-rc.0 + - @rocket.chat/ui-avatar@3.0.0-rc.0 +
    + ## 0.2.22 ### Patch Changes diff --git a/packages/uikit-playground/package.json b/packages/uikit-playground/package.json index 381dd9786545..e8db2846b429 100644 --- a/packages/uikit-playground/package.json +++ b/packages/uikit-playground/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/uikit-playground", "private": true, - "version": "0.2.22", + "version": "0.2.23-rc.0", "type": "module", "scripts": { "dev": "vite", diff --git a/packages/web-ui-registration/CHANGELOG.md b/packages/web-ui-registration/CHANGELOG.md index 310ba1e4abca..f5aa9b7f8385 100644 --- a/packages/web-ui-registration/CHANGELOG.md +++ b/packages/web-ui-registration/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/web-ui-registration +## 7.0.0-rc.0 + +### Patch Changes + +-
    Updated dependencies []: + + - @rocket.chat/ui-contexts@7.0.0-rc.0 +
    + ## 6.0.0 ### Patch Changes diff --git a/packages/web-ui-registration/package.json b/packages/web-ui-registration/package.json index ab7bd0beb3f2..0427c51f28c4 100644 --- a/packages/web-ui-registration/package.json +++ b/packages/web-ui-registration/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/web-ui-registration", - "version": "6.0.0", + "version": "7.0.0-rc.0", "private": true, "homepage": "https://rocket.chat", "main": "./dist/index.js", @@ -51,7 +51,7 @@ "peerDependencies": { "@rocket.chat/layout": "*", "@rocket.chat/tools": "0.2.1", - "@rocket.chat/ui-contexts": "6.0.0", + "@rocket.chat/ui-contexts": "7.0.0-rc.0", "@tanstack/react-query": "*", "react": "*", "react-hook-form": "*", From 07c4ca062183857e2586e252851f7c084239e575 Mon Sep 17 00:00:00 2001 From: Yash Rajpal <58601732+yash-rajpal@users.noreply.github.com> Date: Wed, 22 May 2024 01:53:12 +0530 Subject: [PATCH 06/35] fix: Don't show join default channels option for edit user form (#31750) --- .changeset/real-bobcats-train.md | 6 +++ .../views/admin/users/AdminUserForm.tsx | 38 +++++++++++-------- apps/meteor/tests/e2e/administration.spec.ts | 20 ++++++++++ apps/meteor/tests/e2e/page-objects/admin.ts | 8 ++++ .../fragments/admin-flextab-users.ts | 4 ++ 5 files changed, 60 insertions(+), 16 deletions(-) create mode 100644 .changeset/real-bobcats-train.md diff --git a/.changeset/real-bobcats-train.md b/.changeset/real-bobcats-train.md new file mode 100644 index 000000000000..6d51414c9fc4 --- /dev/null +++ b/.changeset/real-bobcats-train.md @@ -0,0 +1,6 @@ +--- +'@rocket.chat/rest-typings': patch +'@rocket.chat/meteor': patch +--- + +Don't show Join default channels option on edit user form. diff --git a/apps/meteor/client/views/admin/users/AdminUserForm.tsx b/apps/meteor/client/views/admin/users/AdminUserForm.tsx index a85754705090..69aeb4e31205 100644 --- a/apps/meteor/client/views/admin/users/AdminUserForm.tsx +++ b/apps/meteor/client/views/admin/users/AdminUserForm.tsx @@ -52,10 +52,12 @@ const getInitialValue = ({ data, defaultUserRoles, isSmtpEnabled, + isEditingExistingUser, }: { data?: Serialized; defaultUserRoles?: IUser['roles']; isSmtpEnabled?: boolean; + isEditingExistingUser?: boolean; }) => ({ roles: data?.roles ?? defaultUserRoles, name: data?.name ?? '', @@ -69,7 +71,7 @@ const getInitialValue = ({ requirePasswordChange: data?.requirePasswordChange || false, customFields: data?.customFields ?? {}, statusText: data?.statusText ?? '', - joinDefaultChannels: true, + ...(!isEditingExistingUser && { joinDefaultChannels: true }), sendWelcomeEmail: isSmtpEnabled, avatar: '' as AvatarObject, }); @@ -97,6 +99,8 @@ const UserForm = ({ userData, onReload, ...props }: AdminUserFormProps) => { const goToUser = useCallback((id) => router.navigate(`/admin/users/info/${id}`), [router]); + const isEditingExistingUser = Boolean(userData?._id); + const { control, watch, @@ -104,7 +108,7 @@ const UserForm = ({ userData, onReload, ...props }: AdminUserFormProps) => { reset, formState: { errors, isDirty }, } = useForm({ - defaultValues: getInitialValue({ data: userData, defaultUserRoles, isSmtpEnabled }), + defaultValues: getInitialValue({ data: userData, defaultUserRoles, isSmtpEnabled, isEditingExistingUser }), mode: 'onBlur', }); @@ -166,7 +170,7 @@ const UserForm = ({ userData, onReload, ...props }: AdminUserFormProps) => { <> - {userData?._id && ( + {isEditingExistingUser && ( { ( {
    {errors?.roles && {errors.roles.message}}
    - - - {t('Join_default_channels')} - ( - - )} - /> - - + {!isEditingExistingUser && ( + + + {t('Join_default_channels')} + ( + + )} + /> + + + )} {t('Send_welcome_email')} diff --git a/apps/meteor/tests/e2e/administration.spec.ts b/apps/meteor/tests/e2e/administration.spec.ts index 48657efea73a..c778e165a769 100644 --- a/apps/meteor/tests/e2e/administration.spec.ts +++ b/apps/meteor/tests/e2e/administration.spec.ts @@ -88,6 +88,26 @@ test.describe.parallel('administration', () => { await poAdmin.tabs.users.setupSmtpLink.click(); await expect(page).toHaveURL('/admin/settings/Email'); }); + + test('expect to show join default channels option only when creating new users, not when editing users', async () => { + const username = faker.internet.userName(); + + await poAdmin.tabs.users.btnNewUser.click(); + await poAdmin.tabs.users.inputName.type(faker.person.firstName()); + await poAdmin.tabs.users.inputUserName.type(username); + await poAdmin.tabs.users.inputEmail.type(faker.internet.email()); + await poAdmin.tabs.users.checkboxVerified.click(); + await poAdmin.tabs.users.inputPassword.type('any_password'); + await expect(poAdmin.tabs.users.userRole).toBeVisible(); + await expect(poAdmin.tabs.users.joinDefaultChannels).toBeVisible(); + await poAdmin.tabs.users.btnSave.click(); + + await poAdmin.inputSearchUsers.fill(username); + await poAdmin.getUserRow(username).click(); + await poAdmin.btnEdit.click(); + await expect(poAdmin.tabs.users.inputUserName).toHaveValue(username); + await expect(poAdmin.tabs.users.joinDefaultChannels).not.toBeVisible(); + }); }); test.describe('Rooms', () => { diff --git a/apps/meteor/tests/e2e/page-objects/admin.ts b/apps/meteor/tests/e2e/page-objects/admin.ts index 5f61d2ef43e1..791768778295 100644 --- a/apps/meteor/tests/e2e/page-objects/admin.ts +++ b/apps/meteor/tests/e2e/page-objects/admin.ts @@ -20,10 +20,18 @@ export class Admin { return this.page.locator('[role="link"]', { hasText: name }); } + getUserRow(username?: string): Locator { + return this.page.locator('[role="link"]', { hasText: username }); + } + get btnSave(): Locator { return this.page.locator('button >> text="Save"'); } + get btnEdit(): Locator { + return this.page.locator('button >> text="Edit"'); + } + get privateLabel(): Locator { return this.page.locator(`label >> text=Private`); } diff --git a/apps/meteor/tests/e2e/page-objects/fragments/admin-flextab-users.ts b/apps/meteor/tests/e2e/page-objects/fragments/admin-flextab-users.ts index 23e855b1aa21..d57d6be612c6 100644 --- a/apps/meteor/tests/e2e/page-objects/fragments/admin-flextab-users.ts +++ b/apps/meteor/tests/e2e/page-objects/fragments/admin-flextab-users.ts @@ -39,6 +39,10 @@ export class AdminFlextabUsers { return this.page.locator('//label[text()="Verified"]'); } + get joinDefaultChannels(): Locator { + return this.page.locator('//label[text()="Join default channels"]'); + } + get userRole(): Locator { return this.page.locator('button[role="option"]:has-text("user")'); } From 13aa4f54b74a265312318a1f14a30931768f59eb Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Tue, 21 May 2024 17:40:09 -0300 Subject: [PATCH 07/35] ci: publish missing Omnichannel services to DockerHub (#32462) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8393b0d9ec8f..b16ab459d6bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -629,7 +629,7 @@ jobs: strategy: matrix: - service: ['account', 'authorization', 'ddp-streamer', 'presence', 'stream-hub'] + service: ['account', 'authorization', 'ddp-streamer', 'omnichannel-transcript', 'presence', 'queue-worker', 'stream-hub'] steps: - name: Login to DockerHub From e3c2fb6db3babe3845687c9cf3b6c02b267eb292 Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Tue, 21 May 2024 18:27:12 -0300 Subject: [PATCH 08/35] chore: Publish npm packages again (#32463) --- ee/packages/api-client/package.json | 1 - ee/packages/ddp-client/package.json | 1 - packages/core-typings/package.json | 1 - packages/rest-typings/package.json | 1 - 4 files changed, 4 deletions(-) diff --git a/ee/packages/api-client/package.json b/ee/packages/api-client/package.json index 609cd9888dd6..4f80d73ca732 100644 --- a/ee/packages/api-client/package.json +++ b/ee/packages/api-client/package.json @@ -1,6 +1,5 @@ { "name": "@rocket.chat/api-client", - "private": true, "version": "0.1.33-rc.0", "devDependencies": { "@swc/core": "^1.3.95", diff --git a/ee/packages/ddp-client/package.json b/ee/packages/ddp-client/package.json index 26c85939670f..e26357fea0e0 100644 --- a/ee/packages/ddp-client/package.json +++ b/ee/packages/ddp-client/package.json @@ -1,6 +1,5 @@ { "name": "@rocket.chat/ddp-client", - "private": true, "version": "0.2.24-rc.0", "devDependencies": { "@swc/core": "^1.3.95", diff --git a/packages/core-typings/package.json b/packages/core-typings/package.json index 0778f37d98ca..01c5c30adfd1 100644 --- a/packages/core-typings/package.json +++ b/packages/core-typings/package.json @@ -1,7 +1,6 @@ { "$schema": "https://json.schemastore.org/package", "name": "@rocket.chat/core-typings", - "private": true, "version": "6.9.0-rc.0", "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", diff --git a/packages/rest-typings/package.json b/packages/rest-typings/package.json index 8cb1a260d201..66c729f2e531 100644 --- a/packages/rest-typings/package.json +++ b/packages/rest-typings/package.json @@ -1,6 +1,5 @@ { "name": "@rocket.chat/rest-typings", - "private": true, "version": "6.9.0-rc.0", "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", From 612c78a6e8ad0e75cbfd2add76bc40f13562823d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 23:39:33 -0400 Subject: [PATCH 09/35] chore(deps): bump thehanimo/pr-title-checker from 1.3.7 to 1.4.1 (#30619) Bumps [thehanimo/pr-title-checker](https://github.com/thehanimo/pr-title-checker) from 1.3.7 to 1.4.1. - [Release notes](https://github.com/thehanimo/pr-title-checker/releases) - [Commits](https://github.com/thehanimo/pr-title-checker/compare/v1.3.7...v1.4.1) --- updated-dependencies: - dependency-name: thehanimo/pr-title-checker dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/pr-title-checker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-title-checker.yml b/.github/workflows/pr-title-checker.yml index 356ac10c9759..bc9d1f042d58 100644 --- a/.github/workflows/pr-title-checker.yml +++ b/.github/workflows/pr-title-checker.yml @@ -12,6 +12,6 @@ jobs: check: runs-on: ubuntu-latest steps: - - uses: thehanimo/pr-title-checker@v1.3.7 + - uses: thehanimo/pr-title-checker@v1.4.1 with: GITHUB_TOKEN: ${{ secrets.RC_TITLE_CHECKER }} From c6450b12fb45c6fe6f39407bdc5a2c41f39e63d9 Mon Sep 17 00:00:00 2001 From: Pierre Lehnen <55164754+pierre-lehnen-rc@users.noreply.github.com> Date: Wed, 22 May 2024 13:54:57 -0300 Subject: [PATCH 10/35] chore: move all webclient code out of the COSS folders (#32273) --- .github/CODEOWNERS | 2 +- apps/meteor/.storybook/main.js | 1 - apps/meteor/app/authorization/client/index.ts | 1 + .../authorization/client/restrictedRoles.ts | 12 +++++++++ .../client/collections/CannedResponse.ts | 0 .../app/canned-responses/client/index.ts | 0 .../client/startup/responses.js | 6 ++--- apps/meteor/{ee => }/app/ecdh/Session.ts | 0 .../{ee => }/app/ecdh/client/ClientSession.ts | 0 .../{ee => }/app/license/client/index.ts | 2 +- .../modals/PlaceChatOnHoldModal.tsx | 0 .../app/livechat-enterprise/client/index.ts | 1 - .../client}/messageTypes.ts | 23 ++++++++++++++-- .../app/livechat-enterprise/client/startup.ts | 8 +++--- .../client/views/business-hours/Multiple.ts | 2 +- .../client/views/livechatSideNavItems.ts | 4 +-- .../client/apps/@types/IOrchestrator.ts | 0 .../client/apps/RealAppsEngineUIHost.js | 10 +++---- .../client/apps/gameCenter/GameCenter.tsx | 4 +-- .../apps/gameCenter/GameCenterContainer.tsx | 2 +- .../GameCenterInvitePlayersModal.tsx | 10 +++---- .../client/apps/gameCenter/GameCenterList.tsx | 9 ++----- .../hooks/useExternalComponentsQuery.ts | 0 .../{ee => }/client/apps/orchestrator.ts | 8 +++--- .../Omnichannel/modals/CloseChatModal.tsx | 2 +- .../dashboards/DownloadDataButton.tsx | 2 +- .../components/dashboards/PeriodSelector.tsx | 0 .../client/components/dashboards/periods.ts | 0 .../components/dashboards/usePeriodLabel.ts | 0 .../dashboards/usePeriodSelectorState.ts | 0 .../dashboards/usePeriodSelectorStorage.ts | 0 .../deviceManagement/DeviceIcon.tsx | 0 .../DeviceManagementTable.tsx | 11 +++----- .../DeviceManagementTable/index.ts | 0 .../deviceManagement/LoggedOutBanner.tsx | 0 apps/meteor/client/contexts/AppsContext.tsx | 2 +- apps/meteor/client/contexts/CallContext.ts | 2 +- apps/meteor/{ee => }/client/ecdh.ts | 2 +- .../quickActions/useOnHoldChatQuickAction.ts | 2 +- .../hooks/roomActions/useCallsRoomAction.ts | 6 ++--- .../useCannedResponsesRoomAction.ts | 2 +- .../roomActions/useGameCenterRoomAction.ts | 2 +- .../{ee => }/client/hooks/useDeviceLogout.tsx | 4 +-- .../client/hooks/useDevicesMenuOption.tsx | 0 apps/meteor/client/hooks/useDialModal.tsx | 2 +- .../client/hooks/useHasLicenseModule.ts | 2 +- .../client/hooks/useOutboundDialer.ts | 2 +- .../{ee => }/client/hooks/useTagsList.ts | 6 ++--- .../{ee => }/client/hooks/useVoipClient.ts | 4 +-- .../client/hooks/useVoipFooterMenu.tsx | 0 apps/meteor/client/importPackages.ts | 3 +++ .../{ee => }/client/lib/fetchFeatures.ts | 4 +-- .../{ee => }/client/lib/onToggledFeature.ts | 2 +- .../{ee => }/client/lib/voip/EEVoipClient.ts | 2 +- apps/meteor/client/main.ts | 4 +-- .../client/omnichannel/ContactManagerInfo.js | 10 +++---- .../BusinessHoursMultiple.stories.tsx | 0 .../additionalForms/BusinessHoursMultiple.tsx | 2 +- .../additionalForms/ContactManager.js | 2 +- .../additionalForms/CurrentChatTags.tsx | 0 .../CustomFieldsAdditionalForm.tsx | 0 .../DepartmentBusinessHours.tsx | 0 .../additionalForms/DepartmentForwarding.tsx | 6 ++--- .../additionalForms/EeNumberInput.tsx | 0 .../additionalForms/EeTextAreaInput.tsx | 0 .../additionalForms/EeTextInput.tsx | 0 .../additionalForms/MaxChatsPerAgent.tsx | 0 .../MaxChatsPerAgentDisplay.tsx | 2 +- .../additionalForms/PrioritiesSelect.tsx | 0 .../additionalForms/SlaPoliciesSelect.tsx | 0 .../businessHours/BusinessHoursRow.tsx | 2 +- .../BusinessHoursTable.stories.tsx | 0 .../businessHours/BusinessHoursTable.tsx | 8 +++--- .../businessHours/useRemoveBusinessHour.tsx | 2 +- .../cannedResponses/CannedResponseEdit.tsx | 2 +- .../CannedResponseEditWithData.tsx | 2 +- .../CannedResponseEditWithDepartmentData.tsx | 6 ++--- .../cannedResponses/CannedResponseFilter.tsx | 2 +- .../cannedResponses/CannedResponsesPage.tsx | 2 +- .../cannedResponses/CannedResponsesRoute.tsx | 2 +- .../cannedResponses/CannedResponsesTable.tsx | 10 +++---- .../CannedResponsesComposer.stories.tsx | 0 .../CannedResponsesComposer.tsx | 4 +-- .../CannedResponsesComposerPreview.tsx | 2 +- .../InsertPlaceholderDropdown.tsx | 0 .../components/cannedResponseForm.tsx | 4 +-- .../CannedResponse/CannedResponse.stories.tsx | 0 .../CannedResponse/CannedResponse.tsx | 2 +- .../CannedResponseList.stories.tsx | 2 +- .../CannedResponse/CannedResponseList.tsx | 6 ++--- .../CannedResponse/Item.stories.tsx | 0 .../contextualBar/CannedResponse/Item.tsx | 0 .../CannedResponse/WrapCannedResponse.tsx | 0 .../CannedResponse/WrapCannedResponseList.tsx | 12 ++++----- .../CreateCannedResponseModal.stories.tsx | 0 .../CreateCannedResponseModal.tsx | 2 +- .../modals/CreateCannedResponse/index.tsx | 0 .../useRemoveCannedResponse.tsx | 2 +- .../components/RoomActivityIcon/index.tsx | 2 +- .../hooks/useCannedResponseFilterOptions.ts | 0 .../hooks/useCannedResponseList.ts | 6 ++--- .../hooks/useOmnichannelPriorities.ts | 3 +++ .../hooks/useOmnichannelPrioritiesMenu.tsx | 2 +- .../client/omnichannel/hooks/useScopeDict.ts | 0 .../{ee => }/client/omnichannel/index.ts | 0 .../omnichannel/monitors/MonitorsPage.tsx | 2 +- .../monitors/MonitorsPageContainer.tsx | 4 +-- .../omnichannel/monitors/MonitorsTable.tsx | 16 ++++++------ .../omnichannel/priorities/PrioritiesPage.tsx | 2 +- .../priorities/PrioritiesResetModal.tsx | 2 +- .../priorities/PrioritiesRoute.tsx | 2 +- .../priorities/PrioritiesTable.tsx | 4 +-- .../priorities/PriorityEditForm.tsx | 2 +- .../priorities/PriorityEditFormWithData.tsx | 4 +-- .../omnichannel/priorities/PriorityIcon.tsx | 0 .../omnichannel/priorities/PriorityList.tsx | 2 +- .../omnichannel/reports/ReportsPage.tsx | 4 +-- .../reports/components/AgentsTable.tsx | 2 +- .../reports/components/BarChart.tsx | 0 .../reports/components/PieChart.tsx | 0 .../reports/components/ReportCard.tsx | 0 .../reports/components/ReportCardContent.tsx | 0 .../components/ReportCardEmptyState.tsx | 0 .../components/ReportCardErrorState.tsx | 0 .../components/ReportCardLoadingState.tsx | 0 .../reports/components/constants.ts | 0 .../omnichannel/reports/components/index.ts | 0 .../client/omnichannel/reports/hooks/index.ts | 0 .../reports/hooks/useAgentsSection.tsx | 2 +- .../reports/hooks/useChannelsSection.tsx | 0 .../reports/hooks/useDefaultDownload.tsx | 0 .../reports/hooks/useDepartmentsSection.tsx | 0 .../reports/hooks/useStatusSection.tsx | 0 .../reports/hooks/useTagsSection.tsx | 0 .../reports/sections/AgentsSection.tsx | 0 .../reports/sections/ChannelsSection.tsx | 0 .../reports/sections/DepartmentsSection.tsx | 0 .../reports/sections/StatusSection.tsx | 0 .../reports/sections/TagsSection.tsx | 0 .../omnichannel/reports/sections/index.ts | 0 .../omnichannel/reports/utils/ellipsis.ts | 0 .../reports/utils/formatAttachmentName.ts | 0 .../reports/utils/formatPeriodDescription.tsx | 0 .../reports/utils/formatPeriodRange.ts | 0 .../omnichannel/reports/utils/getTop.ts | 0 .../client/omnichannel/reports/utils/round.ts | 0 .../{ee => }/client/omnichannel/routes.ts | 2 +- .../slaPolicies/RemoveSlaButton.tsx | 4 +-- .../omnichannel/slaPolicies/SlaEdit.tsx | 2 +- .../slaPolicies/SlaEditWithData.tsx | 2 +- .../client/omnichannel/slaPolicies/SlaNew.tsx | 0 .../omnichannel/slaPolicies/SlaPage.tsx | 4 +-- .../omnichannel/slaPolicies/SlaRoute.tsx | 2 +- .../omnichannel/slaPolicies/SlaTable.tsx | 10 +++---- .../tags/AutoCompleteTagsMultiple.tsx | 4 +-- .../client/omnichannel/tags/TagEdit.tsx | 4 +-- .../omnichannel/tags/TagEditWithData.tsx | 2 +- .../tags/TagEditWithDepartmentData.tsx | 2 +- .../client/omnichannel/tags/TagsPage.tsx | 4 +-- .../client/omnichannel/tags/TagsRoute.tsx | 2 +- .../client/omnichannel/tags/TagsTable.tsx | 10 +++---- .../client/omnichannel/tags/useRemoveTag.tsx | 2 +- .../client/omnichannel/units/UnitEdit.tsx | 10 +++---- .../omnichannel/units/UnitEditWithData.tsx | 2 +- .../client/omnichannel/units/UnitsPage.tsx | 4 +-- .../client/omnichannel/units/UnitsRoute.tsx | 2 +- .../client/omnichannel/units/UnitsTable.tsx | 10 +++---- .../omnichannel/units/useRemoveUnit.tsx | 2 +- apps/meteor/client/providers/AppsProvider.tsx | 2 +- .../providers/CallProvider/CallProvider.tsx | 4 +-- .../client/providers/OmnichannelProvider.tsx | 2 +- .../client/providers/TranslationProvider.tsx | 2 +- .../RoomList/SideBarItemTemplateWithData.tsx | 2 +- apps/meteor/client/sidebar/RoomMenu.tsx | 2 +- .../sidebar/badges/OmnichannelBadges.tsx | 6 ++--- .../sidebar/footer/SidebarFooterDefault.tsx | 2 +- .../sidebar/footer/SidebarFooterWatermark.tsx | 2 +- .../client/sidebar/footer/voip/VoipFooter.tsx | 2 +- .../client/sidebar/footer/voip/index.tsx | 2 +- .../CreateChannel/CreateChannelModal.tsx | 2 +- .../header/actions/hooks/useAuditItems.tsx | 2 +- apps/meteor/{ee => }/client/startup/audit.tsx | 10 +++---- .../client/startup/deviceManagement.ts | 2 +- apps/meteor/client/startup/index.ts | 3 +++ .../{ee => }/client/startup/readReceipt.ts | 10 +++---- apps/meteor/client/ui.ts | 8 +++--- .../DeviceManagementAccountPage.tsx | 2 +- .../DeviceManagementAccountRow.tsx | 4 +-- .../DeviceManagementAccountTable.tsx | 8 +++--- .../DeviceManagementAccountTable/index.ts | 0 .../PreferencesConversationTranscript.tsx | 2 +- .../DeviceManagementAdminPage.tsx | 4 +-- .../DeviceManagementAdminRoute.tsx | 10 +++---- .../DeviceManagementAdminRow.tsx | 4 +-- .../DeviceManagementAdminTable.tsx | 10 +++---- .../DeviceManagementAdminTable/index.ts | 0 .../DeviceManagementInfo.tsx | 8 +++--- .../DeviceManagementInfoWithData.tsx | 6 ++--- .../DeviceManagementInfo/index.ts | 0 .../EngagementDashboardCard.tsx | 0 .../EngagementDashboardCardErrorBoundary.tsx | 0 .../EngagementDashboardCardFilter.tsx | 0 .../EngagementDashboardPage.stories.tsx | 0 .../EngagementDashboardPage.tsx | 2 +- .../EngagementDashboardRoute.tsx | 10 +++---- .../channels/ChannelsOverview.tsx | 2 +- .../channels/ChannelsTab.stories.tsx | 0 .../channels/ChannelsTab.tsx | 0 .../channels/useChannelsList.ts | 0 .../dataView/LegendSymbol.stories.tsx | 0 .../dataView/LegendSymbol.tsx | 0 .../engagementDashboard/dataView/colors.ts | 0 .../messages/MessagesPerChannelSection.tsx | 0 .../messages/MessagesSentSection.tsx | 2 +- .../messages/MessagesTab.stories.tsx | 0 .../messages/MessagesTab.tsx | 0 .../messages/useMessageOrigins.ts | 0 .../messages/useMessagesSent.ts | 0 .../messages/useTopFivePopularChannels.ts | 0 .../users/ActiveUsersSection.tsx | 4 +-- .../users/BusiestChatTimesSection.tsx | 0 .../users/ContentForDays.tsx | 0 .../users/ContentForHours.tsx | 0 .../users/NewUsersSection.tsx | 4 +-- .../users/UsersByTimeOfTheDaySection.tsx | 0 .../users/UsersTab.stories.tsx | 0 .../engagementDashboard/users/UsersTab.tsx | 0 .../users/useActiveUsers.ts | 0 .../users/useHourlyChatActivity.ts | 0 .../engagementDashboard/users/useNewUsers.ts | 0 .../users/useUsersByTimeOfTheDay.ts | 0 .../users/useWeeklyChatActivity.ts | 0 .../permissions/EditRolePageWithData.tsx | 2 +- .../permissions/PermissionsContextBar.tsx | 2 +- apps/meteor/client/views/admin/routes.tsx | 4 +-- .../views/admin/users/AdminUsersPage.tsx | 4 +-- .../SeatsCapUsage/SeatsCapUsage.stories.tsx | 0 .../users/SeatsCapUsage/SeatsCapUsage.tsx | 2 +- .../views/admin/users/SeatsCapUsage/index.ts | 0 .../UserPageHeaderContentWithSeatsCap.tsx | 6 ++--- .../client/views/admin/users/useSeatsCap.ts | 0 .../UsersUploadsCard/UsersUploadsCard.tsx | 2 +- .../client/views/audit/AuditLogPage.tsx | 2 +- .../{ee => }/client/views/audit/AuditPage.tsx | 6 ++--- .../audit/components/AuditFiltersDisplay.tsx | 2 +- .../views/audit/components/AuditForm.tsx | 0 .../views/audit/components/AuditLogEntry.tsx | 4 +-- .../views/audit/components/AuditLogTable.tsx | 4 +-- .../audit/components/AuditMessageList.tsx | 10 +++---- .../views/audit/components/AuditResult.tsx | 2 +- .../components/forms/DateRangePicker.tsx | 0 .../components/forms/VisitorAutoComplete.tsx | 0 .../views/audit/components/tabs/DirectTab.tsx | 2 +- .../audit/components/tabs/OmnichannelTab.tsx | 2 +- .../views/audit/components/tabs/RoomsTab.tsx | 2 +- .../views/audit/components/tabs/UsersTab.tsx | 2 +- .../client/views/audit/hooks/useAuditForm.ts | 0 .../views/audit/hooks/useAuditMutation.ts | 0 .../client/views/audit/hooks/useAuditTab.ts | 0 .../audit/hooks/useSendTelemetryMutation.ts | 0 .../client/views/audit/utils/dateRange.ts | 0 .../AppDetailsPage/AppDetailsPage.tsx | 2 +- .../AppDetailsPage/AppDetailsPageTabs.tsx | 2 +- .../tabs/AppSettings/AppSettings.tsx | 2 +- .../views/marketplace/definitions/AppInfo.ts | 2 +- .../views/marketplace/helpers/installApp.ts | 2 +- .../views/marketplace/helpers/updateApp.ts | 2 +- .../views/marketplace/hooks/useAppInfo.ts | 4 +-- .../views/marketplace/hooks/useCategories.ts | 2 +- .../views/marketplace/hooks/useInstallApp.tsx | 2 +- .../views/omnichannel/additionalForms.tsx | 26 +++++++++---------- .../appearance/AppearanceFieldLabel.tsx | 2 +- .../omnichannel/appearance/AppearanceForm.tsx | 2 +- .../BusinessHoursMultiplePage.tsx | 2 +- .../businessHours/EditBusinessHours.tsx | 2 +- .../currentChats/CurrentChatsPage.tsx | 6 ++--- .../departments/EditDepartment.tsx | 2 +- .../chats/contextualBar/RoomEdit/RoomEdit.tsx | 2 +- .../contacts/contextualBar/ContactInfo.tsx | 2 +- .../directory/hooks/usePriorityInfo.tsx | 2 +- .../directory/hooks/useSlaInfo.tsx | 2 +- .../directory/hooks/useSlaPolicies.tsx | 2 +- .../meteor/client/views/omnichannel/routes.ts | 4 +-- .../triggers/actions/ActionForm.tsx | 2 +- .../actions/ExternalServiceActionForm.tsx | 2 +- .../QuickActions/hooks/useQuickActions.tsx | 4 +-- .../ComposerFederation/ComposerFederation.tsx | 2 +- .../room/providers/ComposerPopupProvider.tsx | 2 +- .../views/root/MainLayout/LoginPage.tsx | 2 +- .../components/modals/WrapUpCallModal.tsx | 2 +- .../client/voip/modal/DialPad/DialInput.tsx | 0 .../modal/DialPad/DialPadModal.stories.tsx | 0 .../voip/modal/DialPad/DialPadModal.tsx | 0 .../client/voip/modal/DialPad/Pad.tsx | 0 .../client/voip/modal/DialPad/PadButton.tsx | 0 .../voip/modal/DialPad/hooks/useDialPad.tsx | 2 +- .../voip/modal/DialPad/hooks/useEnterKey.tsx | 0 .../voip/modal/DialPad/hooks/useLongPress.tsx | 0 .../voip/modals/DeviceSettingsModal.tsx | 4 +-- .../ee/app/authorization/client/index.ts | 11 -------- .../app/authorization/lib/guestPermissions.ts | 1 + .../ee/app/ecdh/server/ServerSession.ts | 2 +- .../client/messageTypes.ts | 21 --------------- apps/meteor/ee/client/index.ts | 6 ----- .../hooks/useOmnichannelPriorities.ts | 3 --- apps/meteor/ee/client/startup/index.ts | 4 --- .../startup/slashCommands/federation.ts | 20 -------------- .../ee/client/startup/slashCommands/index.ts | 1 - 308 files changed, 377 insertions(+), 413 deletions(-) create mode 100644 apps/meteor/app/authorization/client/restrictedRoles.ts rename apps/meteor/{ee => }/app/canned-responses/client/collections/CannedResponse.ts (100%) rename apps/meteor/{ee => }/app/canned-responses/client/index.ts (100%) rename apps/meteor/{ee => }/app/canned-responses/client/startup/responses.js (84%) rename apps/meteor/{ee => }/app/ecdh/Session.ts (100%) rename apps/meteor/{ee => }/app/ecdh/client/ClientSession.ts (100%) rename apps/meteor/{ee => }/app/license/client/index.ts (85%) rename apps/meteor/{ee => }/app/livechat-enterprise/client/components/modals/PlaceChatOnHoldModal.tsx (100%) rename apps/meteor/{ee => }/app/livechat-enterprise/client/index.ts (90%) rename apps/meteor/{ee/app/livechat-enterprise/lib => app/livechat-enterprise/client}/messageTypes.ts (67%) rename apps/meteor/{ee => }/app/livechat-enterprise/client/startup.ts (60%) rename apps/meteor/{ee => }/app/livechat-enterprise/client/views/business-hours/Multiple.ts (79%) rename apps/meteor/{ee => }/app/livechat-enterprise/client/views/livechatSideNavItems.ts (91%) rename apps/meteor/{ee => }/client/apps/@types/IOrchestrator.ts (100%) rename apps/meteor/{ee => }/client/apps/RealAppsEngineUIHost.js (78%) rename apps/meteor/{ee => }/client/apps/gameCenter/GameCenter.tsx (87%) rename apps/meteor/{ee => }/client/apps/gameCenter/GameCenterContainer.tsx (95%) rename apps/meteor/{ee => }/client/apps/gameCenter/GameCenterInvitePlayersModal.tsx (79%) rename apps/meteor/{ee => }/client/apps/gameCenter/GameCenterList.tsx (91%) rename apps/meteor/{ee => }/client/apps/gameCenter/hooks/useExternalComponentsQuery.ts (100%) rename apps/meteor/{ee => }/client/apps/orchestrator.ts (94%) rename apps/meteor/{ee => }/client/components/dashboards/DownloadDataButton.tsx (95%) rename apps/meteor/{ee => }/client/components/dashboards/PeriodSelector.tsx (100%) rename apps/meteor/{ee => }/client/components/dashboards/periods.ts (100%) rename apps/meteor/{ee => }/client/components/dashboards/usePeriodLabel.ts (100%) rename apps/meteor/{ee => }/client/components/dashboards/usePeriodSelectorState.ts (100%) rename apps/meteor/{ee => }/client/components/dashboards/usePeriodSelectorStorage.ts (100%) rename apps/meteor/{ee => }/client/components/deviceManagement/DeviceIcon.tsx (100%) rename apps/meteor/{ee => }/client/components/deviceManagement/DeviceManagementTable/DeviceManagementTable.tsx (89%) rename apps/meteor/{ee => }/client/components/deviceManagement/DeviceManagementTable/index.ts (100%) rename apps/meteor/{ee => }/client/components/deviceManagement/LoggedOutBanner.tsx (100%) rename apps/meteor/{ee => }/client/ecdh.ts (97%) rename apps/meteor/{ee => }/client/hooks/quickActions/useOnHoldChatQuickAction.ts (91%) rename apps/meteor/{ee => }/client/hooks/roomActions/useCallsRoomAction.ts (74%) rename apps/meteor/{ee => }/client/hooks/roomActions/useCannedResponsesRoomAction.ts (88%) rename apps/meteor/{ee => }/client/hooks/roomActions/useGameCenterRoomAction.ts (86%) rename apps/meteor/{ee => }/client/hooks/useDeviceLogout.tsx (92%) rename apps/meteor/{ee => }/client/hooks/useDevicesMenuOption.tsx (100%) rename apps/meteor/{ee => }/client/hooks/useHasLicenseModule.ts (81%) rename apps/meteor/{ee => }/client/hooks/useOutboundDialer.ts (78%) rename apps/meteor/{ee => }/client/hooks/useTagsList.ts (86%) rename apps/meteor/{ee => }/client/hooks/useVoipClient.ts (96%) rename apps/meteor/{ee => }/client/hooks/useVoipFooterMenu.tsx (100%) rename apps/meteor/{ee => }/client/lib/fetchFeatures.ts (57%) rename apps/meteor/{ee => }/client/lib/onToggledFeature.ts (92%) rename apps/meteor/{ee => }/client/lib/voip/EEVoipClient.ts (97%) rename apps/meteor/{ee => }/client/omnichannel/ContactManagerInfo.js (67%) rename apps/meteor/{ee => }/client/omnichannel/additionalForms/BusinessHoursMultiple.stories.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/additionalForms/BusinessHoursMultiple.tsx (95%) rename apps/meteor/{ee => }/client/omnichannel/additionalForms/ContactManager.js (88%) rename apps/meteor/{ee => }/client/omnichannel/additionalForms/CurrentChatTags.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/additionalForms/CustomFieldsAdditionalForm.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/additionalForms/DepartmentBusinessHours.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/additionalForms/DepartmentForwarding.tsx (91%) rename apps/meteor/{ee => }/client/omnichannel/additionalForms/EeNumberInput.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/additionalForms/EeTextAreaInput.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/additionalForms/EeTextInput.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/additionalForms/MaxChatsPerAgent.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/additionalForms/MaxChatsPerAgentDisplay.tsx (90%) rename apps/meteor/{ee => }/client/omnichannel/additionalForms/PrioritiesSelect.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/additionalForms/SlaPoliciesSelect.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/businessHours/BusinessHoursRow.tsx (94%) rename apps/meteor/{ee => }/client/omnichannel/businessHours/BusinessHoursTable.stories.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/businessHours/BusinessHoursTable.tsx (90%) rename apps/meteor/{ee => }/client/omnichannel/businessHours/useRemoveBusinessHour.tsx (94%) rename apps/meteor/{ee => }/client/omnichannel/cannedResponses/CannedResponseEdit.tsx (98%) rename apps/meteor/{ee => }/client/omnichannel/cannedResponses/CannedResponseEditWithData.tsx (94%) rename apps/meteor/{ee => }/client/omnichannel/cannedResponses/CannedResponseEditWithDepartmentData.tsx (82%) rename apps/meteor/{ee => }/client/omnichannel/cannedResponses/CannedResponseFilter.tsx (95%) rename apps/meteor/{ee => }/client/omnichannel/cannedResponses/CannedResponsesPage.tsx (92%) rename apps/meteor/{ee => }/client/omnichannel/cannedResponses/CannedResponsesRoute.tsx (83%) rename apps/meteor/{ee => }/client/omnichannel/cannedResponses/CannedResponsesTable.tsx (94%) rename apps/meteor/{ee => }/client/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposer.stories.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposer.tsx (96%) rename apps/meteor/{ee => }/client/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposerPreview.tsx (87%) rename apps/meteor/{ee => }/client/omnichannel/cannedResponses/components/CannedResponsesComposer/InsertPlaceholderDropdown.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/cannedResponses/components/cannedResponseForm.tsx (97%) rename apps/meteor/{ee => }/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponse.stories.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponse.tsx (98%) rename apps/meteor/{ee => }/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponseList.stories.tsx (96%) rename apps/meteor/{ee => }/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponseList.tsx (94%) rename apps/meteor/{ee => }/client/omnichannel/cannedResponses/contextualBar/CannedResponse/Item.stories.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/cannedResponses/contextualBar/CannedResponse/Item.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/cannedResponses/contextualBar/CannedResponse/WrapCannedResponse.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/cannedResponses/contextualBar/CannedResponse/WrapCannedResponseList.tsx (82%) rename apps/meteor/{ee => }/client/omnichannel/cannedResponses/modals/CreateCannedResponse/CreateCannedResponseModal.stories.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/cannedResponses/modals/CreateCannedResponse/CreateCannedResponseModal.tsx (97%) rename apps/meteor/{ee => }/client/omnichannel/cannedResponses/modals/CreateCannedResponse/index.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/cannedResponses/useRemoveCannedResponse.tsx (94%) rename apps/meteor/{ee => }/client/omnichannel/components/RoomActivityIcon/index.tsx (86%) rename apps/meteor/{ee => }/client/omnichannel/hooks/useCannedResponseFilterOptions.ts (100%) rename apps/meteor/{ee => }/client/omnichannel/hooks/useCannedResponseList.ts (88%) create mode 100644 apps/meteor/client/omnichannel/hooks/useOmnichannelPriorities.ts rename apps/meteor/{ee => }/client/omnichannel/hooks/useOmnichannelPrioritiesMenu.tsx (97%) rename apps/meteor/{ee => }/client/omnichannel/hooks/useScopeDict.ts (100%) rename apps/meteor/{ee => }/client/omnichannel/index.ts (100%) rename apps/meteor/{ee => }/client/omnichannel/monitors/MonitorsPage.tsx (82%) rename apps/meteor/{ee => }/client/omnichannel/monitors/MonitorsPageContainer.tsx (72%) rename apps/meteor/{ee => }/client/omnichannel/monitors/MonitorsTable.tsx (91%) rename apps/meteor/{ee => }/client/omnichannel/priorities/PrioritiesPage.tsx (97%) rename apps/meteor/{ee => }/client/omnichannel/priorities/PrioritiesResetModal.tsx (89%) rename apps/meteor/{ee => }/client/omnichannel/priorities/PrioritiesRoute.tsx (86%) rename apps/meteor/{ee => }/client/omnichannel/priorities/PrioritiesTable.tsx (93%) rename apps/meteor/{ee => }/client/omnichannel/priorities/PriorityEditForm.tsx (96%) rename apps/meteor/{ee => }/client/omnichannel/priorities/PriorityEditFormWithData.tsx (83%) rename apps/meteor/{ee => }/client/omnichannel/priorities/PriorityIcon.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/priorities/PriorityList.tsx (95%) rename apps/meteor/{ee => }/client/omnichannel/reports/ReportsPage.tsx (92%) rename apps/meteor/{ee => }/client/omnichannel/reports/components/AgentsTable.tsx (96%) rename apps/meteor/{ee => }/client/omnichannel/reports/components/BarChart.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/components/PieChart.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/components/ReportCard.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/components/ReportCardContent.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/components/ReportCardEmptyState.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/components/ReportCardErrorState.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/components/ReportCardLoadingState.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/components/constants.ts (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/components/index.ts (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/hooks/index.ts (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/hooks/useAgentsSection.tsx (96%) rename apps/meteor/{ee => }/client/omnichannel/reports/hooks/useChannelsSection.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/hooks/useDefaultDownload.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/hooks/useDepartmentsSection.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/hooks/useStatusSection.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/hooks/useTagsSection.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/sections/AgentsSection.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/sections/ChannelsSection.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/sections/DepartmentsSection.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/sections/StatusSection.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/sections/TagsSection.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/sections/index.ts (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/utils/ellipsis.ts (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/utils/formatAttachmentName.ts (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/utils/formatPeriodDescription.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/utils/formatPeriodRange.ts (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/utils/getTop.ts (100%) rename apps/meteor/{ee => }/client/omnichannel/reports/utils/round.ts (100%) rename apps/meteor/{ee => }/client/omnichannel/routes.ts (95%) rename apps/meteor/{ee => }/client/omnichannel/slaPolicies/RemoveSlaButton.tsx (90%) rename apps/meteor/{ee => }/client/omnichannel/slaPolicies/SlaEdit.tsx (97%) rename apps/meteor/{ee => }/client/omnichannel/slaPolicies/SlaEditWithData.tsx (92%) rename apps/meteor/{ee => }/client/omnichannel/slaPolicies/SlaNew.tsx (100%) rename apps/meteor/{ee => }/client/omnichannel/slaPolicies/SlaPage.tsx (93%) rename apps/meteor/{ee => }/client/omnichannel/slaPolicies/SlaRoute.tsx (77%) rename apps/meteor/{ee => }/client/omnichannel/slaPolicies/SlaTable.tsx (91%) rename apps/meteor/{ee => }/client/omnichannel/tags/AutoCompleteTagsMultiple.tsx (92%) rename apps/meteor/{ee => }/client/omnichannel/tags/TagEdit.tsx (96%) rename apps/meteor/{ee => }/client/omnichannel/tags/TagEditWithData.tsx (92%) rename apps/meteor/{ee => }/client/omnichannel/tags/TagEditWithDepartmentData.tsx (92%) rename apps/meteor/{ee => }/client/omnichannel/tags/TagsPage.tsx (85%) rename apps/meteor/{ee => }/client/omnichannel/tags/TagsRoute.tsx (77%) rename apps/meteor/{ee => }/client/omnichannel/tags/TagsTable.tsx (91%) rename apps/meteor/{ee => }/client/omnichannel/tags/useRemoveTag.tsx (94%) rename apps/meteor/{ee => }/client/omnichannel/units/UnitEdit.tsx (96%) rename apps/meteor/{ee => }/client/omnichannel/units/UnitEditWithData.tsx (95%) rename apps/meteor/{ee => }/client/omnichannel/units/UnitsPage.tsx (86%) rename apps/meteor/{ee => }/client/omnichannel/units/UnitsRoute.tsx (84%) rename apps/meteor/{ee => }/client/omnichannel/units/UnitsTable.tsx (91%) rename apps/meteor/{ee => }/client/omnichannel/units/useRemoveUnit.tsx (94%) rename apps/meteor/{ee => }/client/sidebar/footer/SidebarFooterWatermark.tsx (91%) rename apps/meteor/{ee => }/client/startup/audit.tsx (79%) rename apps/meteor/{ee => }/client/startup/deviceManagement.ts (93%) rename apps/meteor/{ee => }/client/startup/readReceipt.ts (70%) rename apps/meteor/{ee => }/client/views/account/deviceManagement/DeviceManagementAccountPage.tsx (85%) rename apps/meteor/{ee => }/client/views/account/deviceManagement/DeviceManagementAccountTable/DeviceManagementAccountRow.tsx (89%) rename apps/meteor/{ee => }/client/views/account/deviceManagement/DeviceManagementAccountTable/DeviceManagementAccountTable.tsx (87%) rename apps/meteor/{ee => }/client/views/account/deviceManagement/DeviceManagementAccountTable/index.ts (100%) rename apps/meteor/{ee => }/client/views/admin/deviceManagement/DeviceManagementAdminPage.tsx (84%) rename apps/meteor/{ee => }/client/views/admin/deviceManagement/DeviceManagementAdminRoute.tsx (78%) rename apps/meteor/{ee => }/client/views/admin/deviceManagement/DeviceManagementAdminTable/DeviceManagementAdminRow.tsx (93%) rename apps/meteor/{ee => }/client/views/admin/deviceManagement/DeviceManagementAdminTable/DeviceManagementAdminTable.tsx (89%) rename apps/meteor/{ee => }/client/views/admin/deviceManagement/DeviceManagementAdminTable/index.ts (100%) rename apps/meteor/{ee => }/client/views/admin/deviceManagement/DeviceManagementInfo/DeviceManagementInfo.tsx (91%) rename apps/meteor/{ee => }/client/views/admin/deviceManagement/DeviceManagementInfo/DeviceManagementInfoWithData.tsx (89%) rename apps/meteor/{ee => }/client/views/admin/deviceManagement/DeviceManagementInfo/index.ts (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/EngagementDashboardCard.tsx (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/EngagementDashboardCardErrorBoundary.tsx (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/EngagementDashboardCardFilter.tsx (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/EngagementDashboardPage.stories.tsx (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/EngagementDashboardPage.tsx (98%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/EngagementDashboardRoute.tsx (85%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/channels/ChannelsOverview.tsx (98%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/channels/ChannelsTab.stories.tsx (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/channels/ChannelsTab.tsx (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/channels/useChannelsList.ts (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/dataView/LegendSymbol.stories.tsx (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/dataView/LegendSymbol.tsx (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/dataView/colors.ts (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/messages/MessagesPerChannelSection.tsx (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/messages/MessagesSentSection.tsx (98%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/messages/MessagesTab.stories.tsx (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/messages/MessagesTab.tsx (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/messages/useMessageOrigins.ts (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/messages/useMessagesSent.ts (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/messages/useTopFivePopularChannels.ts (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/users/ActiveUsersSection.tsx (98%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/users/BusiestChatTimesSection.tsx (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/users/ContentForDays.tsx (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/users/ContentForHours.tsx (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/users/NewUsersSection.tsx (97%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/users/UsersByTimeOfTheDaySection.tsx (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/users/UsersTab.stories.tsx (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/users/UsersTab.tsx (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/users/useActiveUsers.ts (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/users/useHourlyChatActivity.ts (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/users/useNewUsers.ts (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/users/useUsersByTimeOfTheDay.ts (100%) rename apps/meteor/{ee => }/client/views/admin/engagementDashboard/users/useWeeklyChatActivity.ts (100%) rename apps/meteor/{ee => }/client/views/admin/users/SeatsCapUsage/SeatsCapUsage.stories.tsx (100%) rename apps/meteor/{ee => }/client/views/admin/users/SeatsCapUsage/SeatsCapUsage.tsx (85%) rename apps/meteor/{ee => }/client/views/admin/users/SeatsCapUsage/index.ts (100%) rename apps/meteor/{ee => }/client/views/admin/users/UserPageHeaderContentWithSeatsCap.tsx (84%) rename apps/meteor/{ee => }/client/views/admin/users/useSeatsCap.ts (100%) rename apps/meteor/{ee => }/client/views/audit/AuditLogPage.tsx (83%) rename apps/meteor/{ee => }/client/views/audit/AuditPage.tsx (89%) rename apps/meteor/{ee => }/client/views/audit/components/AuditFiltersDisplay.tsx (92%) rename apps/meteor/{ee => }/client/views/audit/components/AuditForm.tsx (100%) rename apps/meteor/{ee => }/client/views/audit/components/AuditLogEntry.tsx (91%) rename apps/meteor/{ee => }/client/views/audit/components/AuditLogTable.tsx (94%) rename apps/meteor/{ee => }/client/views/audit/components/AuditMessageList.tsx (74%) rename apps/meteor/{ee => }/client/views/audit/components/AuditResult.tsx (87%) rename apps/meteor/{ee => }/client/views/audit/components/forms/DateRangePicker.tsx (100%) rename apps/meteor/{ee => }/client/views/audit/components/forms/VisitorAutoComplete.tsx (100%) rename apps/meteor/{ee => }/client/views/audit/components/tabs/DirectTab.tsx (93%) rename apps/meteor/{ee => }/client/views/audit/components/tabs/OmnichannelTab.tsx (96%) rename apps/meteor/{ee => }/client/views/audit/components/tabs/RoomsTab.tsx (93%) rename apps/meteor/{ee => }/client/views/audit/components/tabs/UsersTab.tsx (93%) rename apps/meteor/{ee => }/client/views/audit/hooks/useAuditForm.ts (100%) rename apps/meteor/{ee => }/client/views/audit/hooks/useAuditMutation.ts (100%) rename apps/meteor/{ee => }/client/views/audit/hooks/useAuditTab.ts (100%) rename apps/meteor/{ee => }/client/views/audit/hooks/useSendTelemetryMutation.ts (100%) rename apps/meteor/{ee => }/client/views/audit/utils/dateRange.ts (100%) rename apps/meteor/{ee => }/client/voip/components/modals/WrapUpCallModal.tsx (96%) rename apps/meteor/{ee => }/client/voip/modal/DialPad/DialInput.tsx (100%) rename apps/meteor/{ee => }/client/voip/modal/DialPad/DialPadModal.stories.tsx (100%) rename apps/meteor/{ee => }/client/voip/modal/DialPad/DialPadModal.tsx (100%) rename apps/meteor/{ee => }/client/voip/modal/DialPad/Pad.tsx (100%) rename apps/meteor/{ee => }/client/voip/modal/DialPad/PadButton.tsx (100%) rename apps/meteor/{ee => }/client/voip/modal/DialPad/hooks/useDialPad.tsx (97%) rename apps/meteor/{ee => }/client/voip/modal/DialPad/hooks/useEnterKey.tsx (100%) rename apps/meteor/{ee => }/client/voip/modal/DialPad/hooks/useLongPress.tsx (100%) rename apps/meteor/{ee => }/client/voip/modals/DeviceSettingsModal.tsx (96%) delete mode 100644 apps/meteor/ee/app/authorization/client/index.ts delete mode 100644 apps/meteor/ee/app/livechat-enterprise/client/messageTypes.ts delete mode 100644 apps/meteor/ee/client/index.ts delete mode 100644 apps/meteor/ee/client/omnichannel/hooks/useOmnichannelPriorities.ts delete mode 100644 apps/meteor/ee/client/startup/index.ts delete mode 100644 apps/meteor/ee/client/startup/slashCommands/federation.ts delete mode 100644 apps/meteor/ee/client/startup/slashCommands/index.ts diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 48b0af912d15..a834776aeff5 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -28,6 +28,6 @@ apps/meteor/server/startup/migrations @RocketChat/Architecture /apps/meteor/ee/app/canned-responses @RocketChat/omnichannel /apps/meteor/ee/app/livechat @RocketChat/omnichannel /apps/meteor/ee/app/livechat-enterprise @RocketChat/omnichannel -/apps/meteor/ee/client/omnichannel @RocketChat/omnichannel +/apps/meteor/client/omnichannel @RocketChat/omnichannel /apps/meteor/client/components/omnichannel @RocketChat/omnichannel /apps/meteor/client/components/voip @RocketChat/omnichannel diff --git a/apps/meteor/.storybook/main.js b/apps/meteor/.storybook/main.js index 0e0b6db7c0e9..d70d3c5d7cc3 100644 --- a/apps/meteor/.storybook/main.js +++ b/apps/meteor/.storybook/main.js @@ -7,7 +7,6 @@ module.exports = { '../client/**/*.stories.{js,tsx}', '../app/**/*.stories.{js,tsx}', '../ee/app/**/*.stories.{js,tsx}', - '../ee/client/**/*.stories.{js,tsx}', ], addons: [ '@storybook/addon-essentials', diff --git a/apps/meteor/app/authorization/client/index.ts b/apps/meteor/app/authorization/client/index.ts index dd335c13030e..7dc1a3466f49 100644 --- a/apps/meteor/app/authorization/client/index.ts +++ b/apps/meteor/app/authorization/client/index.ts @@ -1,4 +1,5 @@ import { hasAllPermission, hasAtLeastOnePermission, hasPermission, userHasAllPermission } from './hasPermission'; import { hasRole, hasAnyRole } from './hasRole'; +import './restrictedRoles'; export { hasAllPermission, hasAtLeastOnePermission, hasRole, hasAnyRole, hasPermission, userHasAllPermission }; diff --git a/apps/meteor/app/authorization/client/restrictedRoles.ts b/apps/meteor/app/authorization/client/restrictedRoles.ts new file mode 100644 index 000000000000..5aa5e426c2bd --- /dev/null +++ b/apps/meteor/app/authorization/client/restrictedRoles.ts @@ -0,0 +1,12 @@ +import { Meteor } from 'meteor/meteor'; + +import { sdk } from '../../utils/client/lib/SDKClient'; +import { AuthorizationUtils } from '../lib'; + +Meteor.startup(async () => { + const result = await sdk.call('license:isEnterprise'); + if (result) { + // #ToDo: Load this from the server with an API call instead of having a duplicate list + AuthorizationUtils.addRolePermissionWhiteList('guest', ['view-d-room', 'view-joined-room', 'view-p-room', 'start-discussion']); + } +}); diff --git a/apps/meteor/ee/app/canned-responses/client/collections/CannedResponse.ts b/apps/meteor/app/canned-responses/client/collections/CannedResponse.ts similarity index 100% rename from apps/meteor/ee/app/canned-responses/client/collections/CannedResponse.ts rename to apps/meteor/app/canned-responses/client/collections/CannedResponse.ts diff --git a/apps/meteor/ee/app/canned-responses/client/index.ts b/apps/meteor/app/canned-responses/client/index.ts similarity index 100% rename from apps/meteor/ee/app/canned-responses/client/index.ts rename to apps/meteor/app/canned-responses/client/index.ts diff --git a/apps/meteor/ee/app/canned-responses/client/startup/responses.js b/apps/meteor/app/canned-responses/client/startup/responses.js similarity index 84% rename from apps/meteor/ee/app/canned-responses/client/startup/responses.js rename to apps/meteor/app/canned-responses/client/startup/responses.js index 6d5834d91cc0..595945283261 100644 --- a/apps/meteor/ee/app/canned-responses/client/startup/responses.js +++ b/apps/meteor/app/canned-responses/client/startup/responses.js @@ -1,9 +1,9 @@ import { Meteor } from 'meteor/meteor'; import { Tracker } from 'meteor/tracker'; -import { hasPermission } from '../../../../../app/authorization/client'; -import { settings } from '../../../../../app/settings/client'; -import { sdk } from '../../../../../app/utils/client/lib/SDKClient'; +import { hasPermission } from '../../../authorization/client'; +import { settings } from '../../../settings/client'; +import { sdk } from '../../../utils/client/lib/SDKClient'; import { CannedResponse } from '../collections/CannedResponse'; const events = { diff --git a/apps/meteor/ee/app/ecdh/Session.ts b/apps/meteor/app/ecdh/Session.ts similarity index 100% rename from apps/meteor/ee/app/ecdh/Session.ts rename to apps/meteor/app/ecdh/Session.ts diff --git a/apps/meteor/ee/app/ecdh/client/ClientSession.ts b/apps/meteor/app/ecdh/client/ClientSession.ts similarity index 100% rename from apps/meteor/ee/app/ecdh/client/ClientSession.ts rename to apps/meteor/app/ecdh/client/ClientSession.ts diff --git a/apps/meteor/ee/app/license/client/index.ts b/apps/meteor/app/license/client/index.ts similarity index 85% rename from apps/meteor/ee/app/license/client/index.ts rename to apps/meteor/app/license/client/index.ts index f0340c8d0ae5..efe1f68bc5e8 100644 --- a/apps/meteor/ee/app/license/client/index.ts +++ b/apps/meteor/app/license/client/index.ts @@ -1,5 +1,5 @@ -import { queryClient } from '../../../../client/lib/queryClient'; import { fetchFeatures } from '../../../client/lib/fetchFeatures'; +import { queryClient } from '../../../client/lib/queryClient'; export async function hasLicense(feature: string): Promise { try { diff --git a/apps/meteor/ee/app/livechat-enterprise/client/components/modals/PlaceChatOnHoldModal.tsx b/apps/meteor/app/livechat-enterprise/client/components/modals/PlaceChatOnHoldModal.tsx similarity index 100% rename from apps/meteor/ee/app/livechat-enterprise/client/components/modals/PlaceChatOnHoldModal.tsx rename to apps/meteor/app/livechat-enterprise/client/components/modals/PlaceChatOnHoldModal.tsx diff --git a/apps/meteor/ee/app/livechat-enterprise/client/index.ts b/apps/meteor/app/livechat-enterprise/client/index.ts similarity index 90% rename from apps/meteor/ee/app/livechat-enterprise/client/index.ts rename to apps/meteor/app/livechat-enterprise/client/index.ts index 1fc3ef704139..7be870039276 100644 --- a/apps/meteor/ee/app/livechat-enterprise/client/index.ts +++ b/apps/meteor/app/livechat-enterprise/client/index.ts @@ -1,5 +1,4 @@ import { hasLicense } from '../../license/client'; -import '../lib/messageTypes'; import './startup'; void hasLicense('livechat-enterprise').then((enabled) => { diff --git a/apps/meteor/ee/app/livechat-enterprise/lib/messageTypes.ts b/apps/meteor/app/livechat-enterprise/client/messageTypes.ts similarity index 67% rename from apps/meteor/ee/app/livechat-enterprise/lib/messageTypes.ts rename to apps/meteor/app/livechat-enterprise/client/messageTypes.ts index 9c15c277a1b2..90d390fe6be7 100644 --- a/apps/meteor/ee/app/livechat-enterprise/lib/messageTypes.ts +++ b/apps/meteor/app/livechat-enterprise/client/messageTypes.ts @@ -1,7 +1,26 @@ import type { IMessage } from '@rocket.chat/core-typings'; -import { MessageTypes } from '../../../../app/ui-utils/client'; -import { t } from '../../../../app/utils/lib/i18n'; +import { MessageTypes } from '../../ui-utils/client'; +import { t } from '../../utils/lib/i18n'; + +MessageTypes.registerType({ + id: 'livechat_transfer_history_fallback', + system: true, + message: 'New_chat_transfer_fallback', + data(message: any) { + if (!message.transferData) { + return { + fallback: 'SHOULD_NEVER_HAPPEN', + }; + } + const from = message.transferData.prevDepartment; + const to = message.transferData.department.name; + + return { + fallback: t('Livechat_transfer_failed_fallback', { from, to }), + }; + }, +}); MessageTypes.registerType({ id: 'omnichannel_priority_change_history', diff --git a/apps/meteor/ee/app/livechat-enterprise/client/startup.ts b/apps/meteor/app/livechat-enterprise/client/startup.ts similarity index 60% rename from apps/meteor/ee/app/livechat-enterprise/client/startup.ts rename to apps/meteor/app/livechat-enterprise/client/startup.ts index 3c3ec1c02139..0535f8926a7d 100644 --- a/apps/meteor/ee/app/livechat-enterprise/client/startup.ts +++ b/apps/meteor/app/livechat-enterprise/client/startup.ts @@ -1,10 +1,10 @@ import { Meteor } from 'meteor/meteor'; -import { businessHourManager } from '../../../../app/livechat/client/views/app/business-hours/BusinessHours'; -import type { IBusinessHourBehavior } from '../../../../app/livechat/client/views/app/business-hours/IBusinessHourBehavior'; -import { SingleBusinessHourBehavior } from '../../../../app/livechat/client/views/app/business-hours/Single'; -import { settings } from '../../../../app/settings/client'; import { hasLicense } from '../../license/client'; +import { businessHourManager } from '../../livechat/client/views/app/business-hours/BusinessHours'; +import type { IBusinessHourBehavior } from '../../livechat/client/views/app/business-hours/IBusinessHourBehavior'; +import { SingleBusinessHourBehavior } from '../../livechat/client/views/app/business-hours/Single'; +import { settings } from '../../settings/client'; import { MultipleBusinessHoursBehavior } from './views/business-hours/Multiple'; const businessHours: Record = { diff --git a/apps/meteor/ee/app/livechat-enterprise/client/views/business-hours/Multiple.ts b/apps/meteor/app/livechat-enterprise/client/views/business-hours/Multiple.ts similarity index 79% rename from apps/meteor/ee/app/livechat-enterprise/client/views/business-hours/Multiple.ts rename to apps/meteor/app/livechat-enterprise/client/views/business-hours/Multiple.ts index a57344da73dc..698462dcaed2 100644 --- a/apps/meteor/ee/app/livechat-enterprise/client/views/business-hours/Multiple.ts +++ b/apps/meteor/app/livechat-enterprise/client/views/business-hours/Multiple.ts @@ -1,7 +1,7 @@ import type { ILivechatBusinessHour } from '@rocket.chat/core-typings'; import { LivechatBusinessHourTypes } from '@rocket.chat/core-typings'; -import type { IBusinessHourBehavior } from '../../../../../../app/livechat/client/views/app/business-hours/IBusinessHourBehavior'; +import type { IBusinessHourBehavior } from '../../../../livechat/client/views/app/business-hours/IBusinessHourBehavior'; export class MultipleBusinessHoursBehavior implements IBusinessHourBehavior { getView(): string { diff --git a/apps/meteor/ee/app/livechat-enterprise/client/views/livechatSideNavItems.ts b/apps/meteor/app/livechat-enterprise/client/views/livechatSideNavItems.ts similarity index 91% rename from apps/meteor/ee/app/livechat-enterprise/client/views/livechatSideNavItems.ts rename to apps/meteor/app/livechat-enterprise/client/views/livechatSideNavItems.ts index c89931208451..6d9d9f31e24c 100644 --- a/apps/meteor/ee/app/livechat-enterprise/client/views/livechatSideNavItems.ts +++ b/apps/meteor/app/livechat-enterprise/client/views/livechatSideNavItems.ts @@ -1,5 +1,5 @@ -import { hasPermission, hasAtLeastOnePermission } from '../../../../../app/authorization/client'; -import { registerOmnichannelSidebarItem } from '../../../../../client/views/omnichannel/sidebarItems'; +import { registerOmnichannelSidebarItem } from '../../../../client/views/omnichannel/sidebarItems'; +import { hasPermission, hasAtLeastOnePermission } from '../../../authorization/client'; registerOmnichannelSidebarItem({ href: '/omnichannel/reports', diff --git a/apps/meteor/ee/client/apps/@types/IOrchestrator.ts b/apps/meteor/client/apps/@types/IOrchestrator.ts similarity index 100% rename from apps/meteor/ee/client/apps/@types/IOrchestrator.ts rename to apps/meteor/client/apps/@types/IOrchestrator.ts diff --git a/apps/meteor/ee/client/apps/RealAppsEngineUIHost.js b/apps/meteor/client/apps/RealAppsEngineUIHost.js similarity index 78% rename from apps/meteor/ee/client/apps/RealAppsEngineUIHost.js rename to apps/meteor/client/apps/RealAppsEngineUIHost.js index bcd1a254a4bd..4377f7c66aba 100644 --- a/apps/meteor/ee/client/apps/RealAppsEngineUIHost.js +++ b/apps/meteor/client/apps/RealAppsEngineUIHost.js @@ -1,11 +1,11 @@ import { AppsEngineUIHost } from '@rocket.chat/apps-engine/client/AppsEngineUIHost'; import { Meteor } from 'meteor/meteor'; -import { ChatRoom } from '../../../app/models/client'; -import { getUserAvatarURL } from '../../../app/utils/client/getUserAvatarURL'; -import { sdk } from '../../../app/utils/client/lib/SDKClient'; -import { RoomManager } from '../../../client/lib/RoomManager'; -import { baseURI } from '../../../client/lib/baseURI'; +import { ChatRoom } from '../../app/models/client'; +import { getUserAvatarURL } from '../../app/utils/client/getUserAvatarURL'; +import { sdk } from '../../app/utils/client/lib/SDKClient'; +import { RoomManager } from '../lib/RoomManager'; +import { baseURI } from '../lib/baseURI'; export class RealAppsEngineUIHost extends AppsEngineUIHost { constructor() { diff --git a/apps/meteor/ee/client/apps/gameCenter/GameCenter.tsx b/apps/meteor/client/apps/gameCenter/GameCenter.tsx similarity index 87% rename from apps/meteor/ee/client/apps/gameCenter/GameCenter.tsx rename to apps/meteor/client/apps/gameCenter/GameCenter.tsx index 75f4882ce747..3261d1e1c51e 100644 --- a/apps/meteor/ee/client/apps/gameCenter/GameCenter.tsx +++ b/apps/meteor/client/apps/gameCenter/GameCenter.tsx @@ -3,8 +3,8 @@ import { useMutableCallback } from '@rocket.chat/fuselage-hooks'; import React, { useState } from 'react'; import type { ReactElement } from 'react'; -import { preventSyntheticEvent } from '../../../../client/lib/utils/preventSyntheticEvent'; -import { useRoomToolbox } from '../../../../client/views/room/contexts/RoomToolboxContext'; +import { preventSyntheticEvent } from '../../lib/utils/preventSyntheticEvent'; +import { useRoomToolbox } from '../../views/room/contexts/RoomToolboxContext'; import GameCenterContainer from './GameCenterContainer'; import GameCenterList from './GameCenterList'; import { useExternalComponentsQuery } from './hooks/useExternalComponentsQuery'; diff --git a/apps/meteor/ee/client/apps/gameCenter/GameCenterContainer.tsx b/apps/meteor/client/apps/gameCenter/GameCenterContainer.tsx similarity index 95% rename from apps/meteor/ee/client/apps/gameCenter/GameCenterContainer.tsx rename to apps/meteor/client/apps/gameCenter/GameCenterContainer.tsx index 1f37e5d6358a..f589dd21ed50 100644 --- a/apps/meteor/ee/client/apps/gameCenter/GameCenterContainer.tsx +++ b/apps/meteor/client/apps/gameCenter/GameCenterContainer.tsx @@ -9,7 +9,7 @@ import { ContextualbarBack, ContextualbarContent, ContextualbarClose, -} from '../../../../client/components/Contextualbar'; +} from '../../components/Contextualbar'; import type { IGame } from './GameCenter'; interface IGameCenterContainerProps { diff --git a/apps/meteor/ee/client/apps/gameCenter/GameCenterInvitePlayersModal.tsx b/apps/meteor/client/apps/gameCenter/GameCenterInvitePlayersModal.tsx similarity index 79% rename from apps/meteor/ee/client/apps/gameCenter/GameCenterInvitePlayersModal.tsx rename to apps/meteor/client/apps/gameCenter/GameCenterInvitePlayersModal.tsx index e7afa0d9e689..d0dcc6fad4fe 100644 --- a/apps/meteor/ee/client/apps/gameCenter/GameCenterInvitePlayersModal.tsx +++ b/apps/meteor/client/apps/gameCenter/GameCenterInvitePlayersModal.tsx @@ -4,11 +4,11 @@ import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React, { useState } from 'react'; -import GenericModal from '../../../../client/components/GenericModal'; -import UserAutoCompleteMultipleFederated from '../../../../client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleFederated'; -import { useOpenedRoom } from '../../../../client/lib/RoomManager'; -import { roomCoordinator } from '../../../../client/lib/rooms/roomCoordinator'; -import { callWithErrorHandling } from '../../../../client/lib/utils/callWithErrorHandling'; +import GenericModal from '../../components/GenericModal'; +import UserAutoCompleteMultipleFederated from '../../components/UserAutoCompleteMultiple/UserAutoCompleteMultipleFederated'; +import { useOpenedRoom } from '../../lib/RoomManager'; +import { roomCoordinator } from '../../lib/rooms/roomCoordinator'; +import { callWithErrorHandling } from '../../lib/utils/callWithErrorHandling'; import type { IGame } from './GameCenter'; type Username = Exclude; diff --git a/apps/meteor/ee/client/apps/gameCenter/GameCenterList.tsx b/apps/meteor/client/apps/gameCenter/GameCenterList.tsx similarity index 91% rename from apps/meteor/ee/client/apps/gameCenter/GameCenterList.tsx rename to apps/meteor/client/apps/gameCenter/GameCenterList.tsx index f45ba934ba3b..58a4f05f5362 100644 --- a/apps/meteor/ee/client/apps/gameCenter/GameCenterList.tsx +++ b/apps/meteor/client/apps/gameCenter/GameCenterList.tsx @@ -3,13 +3,8 @@ import { useSetModal, useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React, { useCallback } from 'react'; -import { - ContextualbarHeader, - ContextualbarTitle, - ContextualbarClose, - ContextualbarContent, -} from '../../../../client/components/Contextualbar'; -import { FormSkeleton } from '../../../../client/components/Skeleton'; +import { ContextualbarHeader, ContextualbarTitle, ContextualbarClose, ContextualbarContent } from '../../components/Contextualbar'; +import { FormSkeleton } from '../../components/Skeleton'; import type { IGame } from './GameCenter'; import GameCenterInvitePlayersModal from './GameCenterInvitePlayersModal'; diff --git a/apps/meteor/ee/client/apps/gameCenter/hooks/useExternalComponentsQuery.ts b/apps/meteor/client/apps/gameCenter/hooks/useExternalComponentsQuery.ts similarity index 100% rename from apps/meteor/ee/client/apps/gameCenter/hooks/useExternalComponentsQuery.ts rename to apps/meteor/client/apps/gameCenter/hooks/useExternalComponentsQuery.ts diff --git a/apps/meteor/ee/client/apps/orchestrator.ts b/apps/meteor/client/apps/orchestrator.ts similarity index 94% rename from apps/meteor/ee/client/apps/orchestrator.ts rename to apps/meteor/client/apps/orchestrator.ts index d16be3d0c8c7..f33807d25be4 100644 --- a/apps/meteor/ee/client/apps/orchestrator.ts +++ b/apps/meteor/client/apps/orchestrator.ts @@ -4,10 +4,10 @@ import type { IPermission } from '@rocket.chat/apps-engine/definition/permission import type { ISetting } from '@rocket.chat/apps-engine/definition/settings'; import type { Serialized } from '@rocket.chat/core-typings'; -import { hasAtLeastOnePermission } from '../../../app/authorization/client'; -import { sdk } from '../../../app/utils/client/lib/SDKClient'; -import { dispatchToastMessage } from '../../../client/lib/toast'; -import type { App } from '../../../client/views/marketplace/types'; +import { hasAtLeastOnePermission } from '../../app/authorization/client'; +import { sdk } from '../../app/utils/client/lib/SDKClient'; +import { dispatchToastMessage } from '../lib/toast'; +import type { App } from '../views/marketplace/types'; import type { IAppExternalURL, ICategory } from './@types/IOrchestrator'; import { RealAppsEngineUIHost } from './RealAppsEngineUIHost'; diff --git a/apps/meteor/client/components/Omnichannel/modals/CloseChatModal.tsx b/apps/meteor/client/components/Omnichannel/modals/CloseChatModal.tsx index 0fd882f2c5cc..401448ceb396 100644 --- a/apps/meteor/client/components/Omnichannel/modals/CloseChatModal.tsx +++ b/apps/meteor/client/components/Omnichannel/modals/CloseChatModal.tsx @@ -18,7 +18,7 @@ import type { ReactElement } from 'react'; import React, { useCallback, useState, useEffect, useMemo } from 'react'; import { useForm } from 'react-hook-form'; -import { useHasLicenseModule } from '../../../../ee/client/hooks/useHasLicenseModule'; +import { useHasLicenseModule } from '../../../hooks/useHasLicenseModule'; import { dispatchToastMessage } from '../../../lib/toast'; import GenericModal from '../../GenericModal'; import Tags from '../Tags'; diff --git a/apps/meteor/ee/client/components/dashboards/DownloadDataButton.tsx b/apps/meteor/client/components/dashboards/DownloadDataButton.tsx similarity index 95% rename from apps/meteor/ee/client/components/dashboards/DownloadDataButton.tsx rename to apps/meteor/client/components/dashboards/DownloadDataButton.tsx index fb379021f780..2edaf80237e3 100644 --- a/apps/meteor/ee/client/components/dashboards/DownloadDataButton.tsx +++ b/apps/meteor/client/components/dashboards/DownloadDataButton.tsx @@ -4,7 +4,7 @@ import { useToastMessageDispatch, useTranslation } from '@rocket.chat/ui-context import type { ComponentProps, ReactElement } from 'react'; import React from 'react'; -import { downloadCsvAs } from '../../../../client/lib/download'; +import { downloadCsvAs } from '../../lib/download'; type RowFor = readonly unknown[] & { length: THeaders['length']; diff --git a/apps/meteor/ee/client/components/dashboards/PeriodSelector.tsx b/apps/meteor/client/components/dashboards/PeriodSelector.tsx similarity index 100% rename from apps/meteor/ee/client/components/dashboards/PeriodSelector.tsx rename to apps/meteor/client/components/dashboards/PeriodSelector.tsx diff --git a/apps/meteor/ee/client/components/dashboards/periods.ts b/apps/meteor/client/components/dashboards/periods.ts similarity index 100% rename from apps/meteor/ee/client/components/dashboards/periods.ts rename to apps/meteor/client/components/dashboards/periods.ts diff --git a/apps/meteor/ee/client/components/dashboards/usePeriodLabel.ts b/apps/meteor/client/components/dashboards/usePeriodLabel.ts similarity index 100% rename from apps/meteor/ee/client/components/dashboards/usePeriodLabel.ts rename to apps/meteor/client/components/dashboards/usePeriodLabel.ts diff --git a/apps/meteor/ee/client/components/dashboards/usePeriodSelectorState.ts b/apps/meteor/client/components/dashboards/usePeriodSelectorState.ts similarity index 100% rename from apps/meteor/ee/client/components/dashboards/usePeriodSelectorState.ts rename to apps/meteor/client/components/dashboards/usePeriodSelectorState.ts diff --git a/apps/meteor/ee/client/components/dashboards/usePeriodSelectorStorage.ts b/apps/meteor/client/components/dashboards/usePeriodSelectorStorage.ts similarity index 100% rename from apps/meteor/ee/client/components/dashboards/usePeriodSelectorStorage.ts rename to apps/meteor/client/components/dashboards/usePeriodSelectorStorage.ts diff --git a/apps/meteor/ee/client/components/deviceManagement/DeviceIcon.tsx b/apps/meteor/client/components/deviceManagement/DeviceIcon.tsx similarity index 100% rename from apps/meteor/ee/client/components/deviceManagement/DeviceIcon.tsx rename to apps/meteor/client/components/deviceManagement/DeviceIcon.tsx diff --git a/apps/meteor/ee/client/components/deviceManagement/DeviceManagementTable/DeviceManagementTable.tsx b/apps/meteor/client/components/deviceManagement/DeviceManagementTable/DeviceManagementTable.tsx similarity index 89% rename from apps/meteor/ee/client/components/deviceManagement/DeviceManagementTable/DeviceManagementTable.tsx rename to apps/meteor/client/components/deviceManagement/DeviceManagementTable/DeviceManagementTable.tsx index 40e550e1f4ba..9bc4f11fd3cd 100644 --- a/apps/meteor/ee/client/components/deviceManagement/DeviceManagementTable/DeviceManagementTable.tsx +++ b/apps/meteor/client/components/deviceManagement/DeviceManagementTable/DeviceManagementTable.tsx @@ -5,14 +5,9 @@ import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ComponentProps, ReactElement } from 'react'; import React from 'react'; -import GenericNoResults from '../../../../../client/components/GenericNoResults/GenericNoResults'; -import { - GenericTable, - GenericTableHeader, - GenericTableBody, - GenericTableLoadingTable, -} from '../../../../../client/components/GenericTable'; -import { AsyncStatePhase } from '../../../../../client/lib/asyncState'; +import { AsyncStatePhase } from '../../../lib/asyncState'; +import GenericNoResults from '../../GenericNoResults/GenericNoResults'; +import { GenericTable, GenericTableHeader, GenericTableBody, GenericTableLoadingTable } from '../../GenericTable'; type DeviceManagementTableProps = { data?: Serialized>; diff --git a/apps/meteor/ee/client/components/deviceManagement/DeviceManagementTable/index.ts b/apps/meteor/client/components/deviceManagement/DeviceManagementTable/index.ts similarity index 100% rename from apps/meteor/ee/client/components/deviceManagement/DeviceManagementTable/index.ts rename to apps/meteor/client/components/deviceManagement/DeviceManagementTable/index.ts diff --git a/apps/meteor/ee/client/components/deviceManagement/LoggedOutBanner.tsx b/apps/meteor/client/components/deviceManagement/LoggedOutBanner.tsx similarity index 100% rename from apps/meteor/ee/client/components/deviceManagement/LoggedOutBanner.tsx rename to apps/meteor/client/components/deviceManagement/LoggedOutBanner.tsx diff --git a/apps/meteor/client/contexts/AppsContext.tsx b/apps/meteor/client/contexts/AppsContext.tsx index 1fbf7399d648..2be8e74c2d67 100644 --- a/apps/meteor/client/contexts/AppsContext.tsx +++ b/apps/meteor/client/contexts/AppsContext.tsx @@ -4,7 +4,7 @@ import type { ISetting } from '@rocket.chat/apps-engine/definition/settings'; import type { Serialized } from '@rocket.chat/core-typings'; import { createContext } from 'react'; -import type { IAppExternalURL, ICategory } from '../../ee/client/apps/@types/IOrchestrator'; +import type { IAppExternalURL, ICategory } from '../apps/@types/IOrchestrator'; import type { AsyncState } from '../lib/asyncState'; import { AsyncStatePhase } from '../lib/asyncState'; import type { App } from '../views/marketplace/types'; diff --git a/apps/meteor/client/contexts/CallContext.ts b/apps/meteor/client/contexts/CallContext.ts index ce9af784fb0d..316f5690cf69 100644 --- a/apps/meteor/client/contexts/CallContext.ts +++ b/apps/meteor/client/contexts/CallContext.ts @@ -3,7 +3,7 @@ import type { Device } from '@rocket.chat/ui-contexts'; import { createContext, useContext, useMemo } from 'react'; import { useSyncExternalStore } from 'use-sync-external-store/shim'; -import { useHasLicenseModule } from '../../ee/client/hooks/useHasLicenseModule'; +import { useHasLicenseModule } from '../hooks/useHasLicenseModule'; import type { VoIPUser } from '../lib/voip/VoIPUser'; export type CallContextValue = CallContextDisabled | CallContextReady | CallContextError | CallContextEnabled; diff --git a/apps/meteor/ee/client/ecdh.ts b/apps/meteor/client/ecdh.ts similarity index 97% rename from apps/meteor/ee/client/ecdh.ts rename to apps/meteor/client/ecdh.ts index bbec5c19e0ad..1e49f887e62b 100644 --- a/apps/meteor/ee/client/ecdh.ts +++ b/apps/meteor/client/ecdh.ts @@ -1,7 +1,7 @@ import { Meteor } from 'meteor/meteor'; -import { sdk } from '../../app/utils/client/lib/SDKClient'; import type { ClientSession } from '../app/ecdh/client/ClientSession'; +import { sdk } from '../app/utils/client/lib/SDKClient'; let resolveSession: (value: ClientSession | void) => void; const sessionPromise = new Promise((resolve) => { diff --git a/apps/meteor/ee/client/hooks/quickActions/useOnHoldChatQuickAction.ts b/apps/meteor/client/hooks/quickActions/useOnHoldChatQuickAction.ts similarity index 91% rename from apps/meteor/ee/client/hooks/quickActions/useOnHoldChatQuickAction.ts rename to apps/meteor/client/hooks/quickActions/useOnHoldChatQuickAction.ts index 7a3f5bbd51f2..92c7ddf4c1c3 100644 --- a/apps/meteor/ee/client/hooks/quickActions/useOnHoldChatQuickAction.ts +++ b/apps/meteor/client/hooks/quickActions/useOnHoldChatQuickAction.ts @@ -1,6 +1,6 @@ import { useMemo } from 'react'; -import { QuickActionsEnum, type QuickActionsActionConfig } from '../../../../client/views/room/lib/quickActions'; +import { QuickActionsEnum, type QuickActionsActionConfig } from '../../views/room/lib/quickActions'; import { useHasLicenseModule } from '../useHasLicenseModule'; export const useOnHoldChatQuickAction = (): QuickActionsActionConfig | undefined => { diff --git a/apps/meteor/ee/client/hooks/roomActions/useCallsRoomAction.ts b/apps/meteor/client/hooks/roomActions/useCallsRoomAction.ts similarity index 74% rename from apps/meteor/ee/client/hooks/roomActions/useCallsRoomAction.ts rename to apps/meteor/client/hooks/roomActions/useCallsRoomAction.ts index 7c21ac9a47ff..31be4b2300ee 100644 --- a/apps/meteor/ee/client/hooks/roomActions/useCallsRoomAction.ts +++ b/apps/meteor/client/hooks/roomActions/useCallsRoomAction.ts @@ -2,11 +2,11 @@ import { isRoomFederated } from '@rocket.chat/core-typings'; import { lazy, useContext, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; -import { RoomContext } from '../../../../client/views/room/contexts/RoomContext'; -import type { RoomToolboxActionConfig } from '../../../../client/views/room/contexts/RoomToolboxContext'; +import { RoomContext } from '../../views/room/contexts/RoomContext'; +import type { RoomToolboxActionConfig } from '../../views/room/contexts/RoomToolboxContext'; import { useHasLicenseModule } from '../useHasLicenseModule'; -const VideoConfList = lazy(() => import('../../../../client/views/room/contextualBar/VideoConference/VideoConfList')); +const VideoConfList = lazy(() => import('../../views/room/contextualBar/VideoConference/VideoConfList')); export const useCallsRoomAction = () => { const licensed = useHasLicenseModule('videoconference-enterprise') === true; diff --git a/apps/meteor/ee/client/hooks/roomActions/useCannedResponsesRoomAction.ts b/apps/meteor/client/hooks/roomActions/useCannedResponsesRoomAction.ts similarity index 88% rename from apps/meteor/ee/client/hooks/roomActions/useCannedResponsesRoomAction.ts rename to apps/meteor/client/hooks/roomActions/useCannedResponsesRoomAction.ts index 432a99169739..e5f44c67fbef 100644 --- a/apps/meteor/ee/client/hooks/roomActions/useCannedResponsesRoomAction.ts +++ b/apps/meteor/client/hooks/roomActions/useCannedResponsesRoomAction.ts @@ -1,7 +1,7 @@ import { useSetting } from '@rocket.chat/ui-contexts'; import { lazy, useMemo } from 'react'; -import type { RoomToolboxActionConfig } from '../../../../client/views/room/contexts/RoomToolboxContext'; +import type { RoomToolboxActionConfig } from '../../views/room/contexts/RoomToolboxContext'; import { useHasLicenseModule } from '../useHasLicenseModule'; const CannedResponse = lazy(() => import('../../omnichannel/cannedResponses/contextualBar/CannedResponse/WrapCannedResponseList')); diff --git a/apps/meteor/ee/client/hooks/roomActions/useGameCenterRoomAction.ts b/apps/meteor/client/hooks/roomActions/useGameCenterRoomAction.ts similarity index 86% rename from apps/meteor/ee/client/hooks/roomActions/useGameCenterRoomAction.ts rename to apps/meteor/client/hooks/roomActions/useGameCenterRoomAction.ts index 66a59d7fe81c..f08e0fe03d0b 100644 --- a/apps/meteor/ee/client/hooks/roomActions/useGameCenterRoomAction.ts +++ b/apps/meteor/client/hooks/roomActions/useGameCenterRoomAction.ts @@ -1,7 +1,7 @@ import { lazy, useMemo } from 'react'; -import type { RoomToolboxActionConfig } from '../../../../client/views/room/contexts/RoomToolboxContext'; import { useExternalComponentsQuery } from '../../apps/gameCenter/hooks/useExternalComponentsQuery'; +import type { RoomToolboxActionConfig } from '../../views/room/contexts/RoomToolboxContext'; const GameCenter = lazy(() => import('../../apps/gameCenter/GameCenter')); diff --git a/apps/meteor/ee/client/hooks/useDeviceLogout.tsx b/apps/meteor/client/hooks/useDeviceLogout.tsx similarity index 92% rename from apps/meteor/ee/client/hooks/useDeviceLogout.tsx rename to apps/meteor/client/hooks/useDeviceLogout.tsx index 0cc0df4630ac..c9c089aa2ce0 100644 --- a/apps/meteor/ee/client/hooks/useDeviceLogout.tsx +++ b/apps/meteor/client/hooks/useDeviceLogout.tsx @@ -1,8 +1,8 @@ import { useSetModal, useTranslation, useToastMessageDispatch, useRoute, useRouteParameter } from '@rocket.chat/ui-contexts'; import React, { useCallback } from 'react'; -import GenericModal from '../../../client/components/GenericModal'; -import { useEndpointAction } from '../../../client/hooks/useEndpointAction'; +import GenericModal from '../components/GenericModal'; +import { useEndpointAction } from './useEndpointAction'; export const useDeviceLogout = ( sessionId: string, diff --git a/apps/meteor/ee/client/hooks/useDevicesMenuOption.tsx b/apps/meteor/client/hooks/useDevicesMenuOption.tsx similarity index 100% rename from apps/meteor/ee/client/hooks/useDevicesMenuOption.tsx rename to apps/meteor/client/hooks/useDevicesMenuOption.tsx diff --git a/apps/meteor/client/hooks/useDialModal.tsx b/apps/meteor/client/hooks/useDialModal.tsx index ead4c9c070c7..ef513e521283 100644 --- a/apps/meteor/client/hooks/useDialModal.tsx +++ b/apps/meteor/client/hooks/useDialModal.tsx @@ -4,7 +4,7 @@ import React, { Suspense, lazy, useCallback, useMemo } from 'react'; import { useIsVoipEnterprise } from '../contexts/CallContext'; import { dispatchToastMessage } from '../lib/toast'; -const DialPadModal = lazy(() => import('../../ee/client/voip/modal/DialPad/DialPadModal')); +const DialPadModal = lazy(() => import('../voip/modal/DialPad/DialPadModal')); type DialModalProps = { initialValue?: string; diff --git a/apps/meteor/ee/client/hooks/useHasLicenseModule.ts b/apps/meteor/client/hooks/useHasLicenseModule.ts similarity index 81% rename from apps/meteor/ee/client/hooks/useHasLicenseModule.ts rename to apps/meteor/client/hooks/useHasLicenseModule.ts index f2d75ab23746..ea4080730884 100644 --- a/apps/meteor/ee/client/hooks/useHasLicenseModule.ts +++ b/apps/meteor/client/hooks/useHasLicenseModule.ts @@ -1,6 +1,6 @@ import type { LicenseModule } from '@rocket.chat/core-typings'; -import { useLicenseBase } from '../../../client/hooks/useLicense'; +import { useLicenseBase } from './useLicense'; export const useHasLicenseModule = (licenseName: LicenseModule): 'loading' | boolean => { return ( diff --git a/apps/meteor/ee/client/hooks/useOutboundDialer.ts b/apps/meteor/client/hooks/useOutboundDialer.ts similarity index 78% rename from apps/meteor/ee/client/hooks/useOutboundDialer.ts rename to apps/meteor/client/hooks/useOutboundDialer.ts index fc7ae8a8522e..2ffdc9b14969 100644 --- a/apps/meteor/ee/client/hooks/useOutboundDialer.ts +++ b/apps/meteor/client/hooks/useOutboundDialer.ts @@ -1,4 +1,4 @@ -import { useCallClient, useIsVoipEnterprise } from '../../../client/contexts/CallContext'; +import { useCallClient, useIsVoipEnterprise } from '../contexts/CallContext'; import { EEVoipClient } from '../lib/voip/EEVoipClient'; export const useOutboundDialer = (): EEVoipClient | null => { diff --git a/apps/meteor/ee/client/hooks/useTagsList.ts b/apps/meteor/client/hooks/useTagsList.ts similarity index 86% rename from apps/meteor/ee/client/hooks/useTagsList.ts rename to apps/meteor/client/hooks/useTagsList.ts index 41062d1b9dce..3aa80b4e07b3 100644 --- a/apps/meteor/ee/client/hooks/useTagsList.ts +++ b/apps/meteor/client/hooks/useTagsList.ts @@ -1,9 +1,9 @@ import { useEndpoint } from '@rocket.chat/ui-contexts'; import { useCallback, useState } from 'react'; -import { useScrollableRecordList } from '../../../client/hooks/lists/useScrollableRecordList'; -import { useComponentDidUpdate } from '../../../client/hooks/useComponentDidUpdate'; -import { RecordList } from '../../../client/lib/lists/RecordList'; +import { RecordList } from '../lib/lists/RecordList'; +import { useScrollableRecordList } from './lists/useScrollableRecordList'; +import { useComponentDidUpdate } from './useComponentDidUpdate'; type TagsListOptions = { filter: string; diff --git a/apps/meteor/ee/client/hooks/useVoipClient.ts b/apps/meteor/client/hooks/useVoipClient.ts similarity index 96% rename from apps/meteor/ee/client/hooks/useVoipClient.ts rename to apps/meteor/client/hooks/useVoipClient.ts index 93048c50016a..ab74daa03cb9 100644 --- a/apps/meteor/ee/client/hooks/useVoipClient.ts +++ b/apps/meteor/client/hooks/useVoipClient.ts @@ -5,9 +5,9 @@ import { useUser, useSetting, useEndpoint, useStream } from '@rocket.chat/ui-con import { KJUR } from 'jsrsasign'; import { useEffect, useState } from 'react'; -import { VoIPUser } from '../../../client/lib/voip/VoIPUser'; -import { useWebRtcServers } from '../../../client/providers/CallProvider/hooks/useWebRtcServers'; import { EEVoipClient } from '../lib/voip/EEVoipClient'; +import { VoIPUser } from '../lib/voip/VoIPUser'; +import { useWebRtcServers } from '../providers/CallProvider/hooks/useWebRtcServers'; import { useHasLicenseModule } from './useHasLicenseModule'; type UseVoipClientResult = { diff --git a/apps/meteor/ee/client/hooks/useVoipFooterMenu.tsx b/apps/meteor/client/hooks/useVoipFooterMenu.tsx similarity index 100% rename from apps/meteor/ee/client/hooks/useVoipFooterMenu.tsx rename to apps/meteor/client/hooks/useVoipFooterMenu.tsx diff --git a/apps/meteor/client/importPackages.ts b/apps/meteor/client/importPackages.ts index ffc81c35a953..ddc173e63116 100644 --- a/apps/meteor/client/importPackages.ts +++ b/apps/meteor/client/importPackages.ts @@ -2,6 +2,7 @@ import '../app/cors/client'; import '../app/apple/client'; import '../app/authorization/client'; import '../app/autotranslate/client'; +import '../app/canned-responses/client'; import '../app/custom-sounds/client'; import '../app/dolphin/client'; import '../app/drupal/client'; @@ -12,7 +13,9 @@ import '../app/file-upload/client'; import '../app/github-enterprise/client'; import '../app/gitlab/client'; import '../app/iframe-login/client'; +import '../app/license/client'; import '../app/lib/client'; +import '../app/livechat-enterprise/client'; import '../app/message-mark-as-unread/client'; import '../app/nextcloud/client'; import '../app/notifications/client'; diff --git a/apps/meteor/ee/client/lib/fetchFeatures.ts b/apps/meteor/client/lib/fetchFeatures.ts similarity index 57% rename from apps/meteor/ee/client/lib/fetchFeatures.ts rename to apps/meteor/client/lib/fetchFeatures.ts index 617fc9623e1a..c481e8cf2f76 100644 --- a/apps/meteor/ee/client/lib/fetchFeatures.ts +++ b/apps/meteor/client/lib/fetchFeatures.ts @@ -1,5 +1,5 @@ -import { CachedCollectionManager } from '../../../app/ui-cached-collection/client'; -import { sdk } from '../../../app/utils/client/lib/SDKClient'; +import { CachedCollectionManager } from '../../app/ui-cached-collection/client'; +import { sdk } from '../../app/utils/client/lib/SDKClient'; export const fetchFeatures = (): Promise => new Promise((resolve, reject) => { diff --git a/apps/meteor/ee/client/lib/onToggledFeature.ts b/apps/meteor/client/lib/onToggledFeature.ts similarity index 92% rename from apps/meteor/ee/client/lib/onToggledFeature.ts rename to apps/meteor/client/lib/onToggledFeature.ts index 3f47b35bdbe2..0147706869b6 100644 --- a/apps/meteor/ee/client/lib/onToggledFeature.ts +++ b/apps/meteor/client/lib/onToggledFeature.ts @@ -1,8 +1,8 @@ import type { LicenseModule } from '@rocket.chat/core-typings'; import { QueryObserver } from '@tanstack/react-query'; -import { queryClient } from '../../../client/lib/queryClient'; import { fetchFeatures } from './fetchFeatures'; +import { queryClient } from './queryClient'; export const onToggledFeature = ( feature: LicenseModule, diff --git a/apps/meteor/ee/client/lib/voip/EEVoipClient.ts b/apps/meteor/client/lib/voip/EEVoipClient.ts similarity index 97% rename from apps/meteor/ee/client/lib/voip/EEVoipClient.ts rename to apps/meteor/client/lib/voip/EEVoipClient.ts index 6afa5b2a6835..5f3496ed317c 100644 --- a/apps/meteor/ee/client/lib/voip/EEVoipClient.ts +++ b/apps/meteor/client/lib/voip/EEVoipClient.ts @@ -3,7 +3,7 @@ import { Operation, UserState } from '@rocket.chat/core-typings'; import { Inviter, UserAgent } from 'sip.js'; import type { IncomingResponse } from 'sip.js/lib/core'; -import { VoIPUser } from '../../../../client/lib/voip/VoIPUser'; +import { VoIPUser } from './VoIPUser'; export class EEVoipClient extends VoIPUser { constructor(config: VoIPUserConfiguration, mediaRenderer?: IMediaStreamRenderer) { diff --git a/apps/meteor/client/main.ts b/apps/meteor/client/main.ts index 0a35c44a10be..32765c7c114f 100644 --- a/apps/meteor/client/main.ts +++ b/apps/meteor/client/main.ts @@ -10,8 +10,8 @@ FlowRouter.notFound = { import('./polyfills') .then(() => import('./meteorOverrides')) - .then(() => import('../ee/client/ecdh')) + .then(() => import('./ecdh')) .then(() => import('./importPackages')) .then(() => Promise.all([import('./methods'), import('./startup')])) - .then(() => import('../ee/client')) + .then(() => import('./omnichannel')) .then(() => Promise.all([import('./views/admin'), import('./views/marketplace'), import('./views/account')])); diff --git a/apps/meteor/ee/client/omnichannel/ContactManagerInfo.js b/apps/meteor/client/omnichannel/ContactManagerInfo.js similarity index 67% rename from apps/meteor/ee/client/omnichannel/ContactManagerInfo.js rename to apps/meteor/client/omnichannel/ContactManagerInfo.js index 282ecc2b423c..d7272b901e26 100644 --- a/apps/meteor/ee/client/omnichannel/ContactManagerInfo.js +++ b/apps/meteor/client/omnichannel/ContactManagerInfo.js @@ -2,11 +2,11 @@ import { css } from '@rocket.chat/css-in-js'; import { UserAvatar } from '@rocket.chat/ui-avatar'; import React, { useMemo } from 'react'; -import { UserStatus } from '../../../client/components/UserStatus'; -import { AsyncStatePhase } from '../../../client/hooks/useAsyncState'; -import { useEndpointData } from '../../../client/hooks/useEndpointData'; -import AgentInfoDetails from '../../../client/views/omnichannel/components/AgentInfoDetails'; -import Info from '../../../client/views/omnichannel/components/Info'; +import { UserStatus } from '../components/UserStatus'; +import { AsyncStatePhase } from '../hooks/useAsyncState'; +import { useEndpointData } from '../hooks/useEndpointData'; +import AgentInfoDetails from '../views/omnichannel/components/AgentInfoDetails'; +import Info from '../views/omnichannel/components/Info'; const wordBreak = css` word-break: break-word; diff --git a/apps/meteor/ee/client/omnichannel/additionalForms/BusinessHoursMultiple.stories.tsx b/apps/meteor/client/omnichannel/additionalForms/BusinessHoursMultiple.stories.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/additionalForms/BusinessHoursMultiple.stories.tsx rename to apps/meteor/client/omnichannel/additionalForms/BusinessHoursMultiple.stories.tsx diff --git a/apps/meteor/ee/client/omnichannel/additionalForms/BusinessHoursMultiple.tsx b/apps/meteor/client/omnichannel/additionalForms/BusinessHoursMultiple.tsx similarity index 95% rename from apps/meteor/ee/client/omnichannel/additionalForms/BusinessHoursMultiple.tsx rename to apps/meteor/client/omnichannel/additionalForms/BusinessHoursMultiple.tsx index f5fc4838ba7e..bba1fd135782 100644 --- a/apps/meteor/ee/client/omnichannel/additionalForms/BusinessHoursMultiple.tsx +++ b/apps/meteor/client/omnichannel/additionalForms/BusinessHoursMultiple.tsx @@ -5,7 +5,7 @@ import type { ComponentProps } from 'react'; import React from 'react'; import { Controller, useFormContext } from 'react-hook-form'; -import AutoCompleteDepartmentMultiple from '../../../../client/components/AutoCompleteDepartmentMultiple'; +import AutoCompleteDepartmentMultiple from '../../components/AutoCompleteDepartmentMultiple'; import { useHasLicenseModule } from '../../hooks/useHasLicenseModule'; const BusinessHoursMultiple = ({ className }: { className?: ComponentProps['className'] }) => { diff --git a/apps/meteor/ee/client/omnichannel/additionalForms/ContactManager.js b/apps/meteor/client/omnichannel/additionalForms/ContactManager.js similarity index 88% rename from apps/meteor/ee/client/omnichannel/additionalForms/ContactManager.js rename to apps/meteor/client/omnichannel/additionalForms/ContactManager.js index 2b688378753d..52ab527ef841 100644 --- a/apps/meteor/ee/client/omnichannel/additionalForms/ContactManager.js +++ b/apps/meteor/client/omnichannel/additionalForms/ContactManager.js @@ -2,7 +2,7 @@ import { Field } from '@rocket.chat/fuselage'; import { useTranslation } from '@rocket.chat/ui-contexts'; import React from 'react'; -import AutoCompleteAgent from '../../../../client/components/AutoCompleteAgent'; +import AutoCompleteAgent from '../../components/AutoCompleteAgent'; import { useHasLicenseModule } from '../../hooks/useHasLicenseModule'; export const ContactManager = ({ value: userId, handler }) => { diff --git a/apps/meteor/ee/client/omnichannel/additionalForms/CurrentChatTags.tsx b/apps/meteor/client/omnichannel/additionalForms/CurrentChatTags.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/additionalForms/CurrentChatTags.tsx rename to apps/meteor/client/omnichannel/additionalForms/CurrentChatTags.tsx diff --git a/apps/meteor/ee/client/omnichannel/additionalForms/CustomFieldsAdditionalForm.tsx b/apps/meteor/client/omnichannel/additionalForms/CustomFieldsAdditionalForm.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/additionalForms/CustomFieldsAdditionalForm.tsx rename to apps/meteor/client/omnichannel/additionalForms/CustomFieldsAdditionalForm.tsx diff --git a/apps/meteor/ee/client/omnichannel/additionalForms/DepartmentBusinessHours.tsx b/apps/meteor/client/omnichannel/additionalForms/DepartmentBusinessHours.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/additionalForms/DepartmentBusinessHours.tsx rename to apps/meteor/client/omnichannel/additionalForms/DepartmentBusinessHours.tsx diff --git a/apps/meteor/ee/client/omnichannel/additionalForms/DepartmentForwarding.tsx b/apps/meteor/client/omnichannel/additionalForms/DepartmentForwarding.tsx similarity index 91% rename from apps/meteor/ee/client/omnichannel/additionalForms/DepartmentForwarding.tsx rename to apps/meteor/client/omnichannel/additionalForms/DepartmentForwarding.tsx index 4e99fee43acd..47ee87f7ee2a 100644 --- a/apps/meteor/ee/client/omnichannel/additionalForms/DepartmentForwarding.tsx +++ b/apps/meteor/client/omnichannel/additionalForms/DepartmentForwarding.tsx @@ -5,9 +5,9 @@ import type { TranslationKey } from '@rocket.chat/ui-contexts'; import { useTranslation } from '@rocket.chat/ui-contexts'; import React, { useMemo, useState } from 'react'; -import { useDepartmentsList } from '../../../../client/components/Omnichannel/hooks/useDepartmentsList'; -import { useRecordList } from '../../../../client/hooks/lists/useRecordList'; -import { AsyncStatePhase } from '../../../../client/hooks/useAsyncState'; +import { useDepartmentsList } from '../../components/Omnichannel/hooks/useDepartmentsList'; +import { useRecordList } from '../../hooks/lists/useRecordList'; +import { AsyncStatePhase } from '../../hooks/useAsyncState'; import { useHasLicenseModule } from '../../hooks/useHasLicenseModule'; type DepartmentForwardingProps = { diff --git a/apps/meteor/ee/client/omnichannel/additionalForms/EeNumberInput.tsx b/apps/meteor/client/omnichannel/additionalForms/EeNumberInput.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/additionalForms/EeNumberInput.tsx rename to apps/meteor/client/omnichannel/additionalForms/EeNumberInput.tsx diff --git a/apps/meteor/ee/client/omnichannel/additionalForms/EeTextAreaInput.tsx b/apps/meteor/client/omnichannel/additionalForms/EeTextAreaInput.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/additionalForms/EeTextAreaInput.tsx rename to apps/meteor/client/omnichannel/additionalForms/EeTextAreaInput.tsx diff --git a/apps/meteor/ee/client/omnichannel/additionalForms/EeTextInput.tsx b/apps/meteor/client/omnichannel/additionalForms/EeTextInput.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/additionalForms/EeTextInput.tsx rename to apps/meteor/client/omnichannel/additionalForms/EeTextInput.tsx diff --git a/apps/meteor/ee/client/omnichannel/additionalForms/MaxChatsPerAgent.tsx b/apps/meteor/client/omnichannel/additionalForms/MaxChatsPerAgent.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/additionalForms/MaxChatsPerAgent.tsx rename to apps/meteor/client/omnichannel/additionalForms/MaxChatsPerAgent.tsx diff --git a/apps/meteor/ee/client/omnichannel/additionalForms/MaxChatsPerAgentDisplay.tsx b/apps/meteor/client/omnichannel/additionalForms/MaxChatsPerAgentDisplay.tsx similarity index 90% rename from apps/meteor/ee/client/omnichannel/additionalForms/MaxChatsPerAgentDisplay.tsx rename to apps/meteor/client/omnichannel/additionalForms/MaxChatsPerAgentDisplay.tsx index 286b1a344d3b..91980f119316 100644 --- a/apps/meteor/ee/client/omnichannel/additionalForms/MaxChatsPerAgentDisplay.tsx +++ b/apps/meteor/client/omnichannel/additionalForms/MaxChatsPerAgentDisplay.tsx @@ -1,7 +1,7 @@ import { useTranslation } from '@rocket.chat/ui-contexts'; import React from 'react'; -import UserInfo from '../../../../client/components/UserInfo'; +import UserInfo from '../../components/UserInfo'; import { useHasLicenseModule } from '../../hooks/useHasLicenseModule'; const MaxChatsPerAgentDisplay = ({ maxNumberSimultaneousChat = 0 }) => { diff --git a/apps/meteor/ee/client/omnichannel/additionalForms/PrioritiesSelect.tsx b/apps/meteor/client/omnichannel/additionalForms/PrioritiesSelect.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/additionalForms/PrioritiesSelect.tsx rename to apps/meteor/client/omnichannel/additionalForms/PrioritiesSelect.tsx diff --git a/apps/meteor/ee/client/omnichannel/additionalForms/SlaPoliciesSelect.tsx b/apps/meteor/client/omnichannel/additionalForms/SlaPoliciesSelect.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/additionalForms/SlaPoliciesSelect.tsx rename to apps/meteor/client/omnichannel/additionalForms/SlaPoliciesSelect.tsx diff --git a/apps/meteor/ee/client/omnichannel/businessHours/BusinessHoursRow.tsx b/apps/meteor/client/omnichannel/businessHours/BusinessHoursRow.tsx similarity index 94% rename from apps/meteor/ee/client/omnichannel/businessHours/BusinessHoursRow.tsx rename to apps/meteor/client/omnichannel/businessHours/BusinessHoursRow.tsx index 0ab3a518075c..fa6c9a40f159 100644 --- a/apps/meteor/ee/client/omnichannel/businessHours/BusinessHoursRow.tsx +++ b/apps/meteor/client/omnichannel/businessHours/BusinessHoursRow.tsx @@ -5,7 +5,7 @@ import { useRouter, useTranslation } from '@rocket.chat/ui-contexts'; import type { KeyboardEvent } from 'react'; import React, { memo, useMemo } from 'react'; -import { GenericTableRow, GenericTableCell } from '../../../../client/components/GenericTable'; +import { GenericTableRow, GenericTableCell } from '../../components/GenericTable'; import { useRemoveBusinessHour } from './useRemoveBusinessHour'; const BusinessHoursRow = ({ _id, name, timezone, workHours, active, type }: Serialized) => { diff --git a/apps/meteor/ee/client/omnichannel/businessHours/BusinessHoursTable.stories.tsx b/apps/meteor/client/omnichannel/businessHours/BusinessHoursTable.stories.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/businessHours/BusinessHoursTable.stories.tsx rename to apps/meteor/client/omnichannel/businessHours/BusinessHoursTable.stories.tsx diff --git a/apps/meteor/ee/client/omnichannel/businessHours/BusinessHoursTable.tsx b/apps/meteor/client/omnichannel/businessHours/BusinessHoursTable.tsx similarity index 90% rename from apps/meteor/ee/client/omnichannel/businessHours/BusinessHoursTable.tsx rename to apps/meteor/client/omnichannel/businessHours/BusinessHoursTable.tsx index 2da634cff9d5..6fddd95859d8 100644 --- a/apps/meteor/ee/client/omnichannel/businessHours/BusinessHoursTable.tsx +++ b/apps/meteor/client/omnichannel/businessHours/BusinessHoursTable.tsx @@ -3,16 +3,16 @@ import { useTranslation, useEndpoint } from '@rocket.chat/ui-contexts'; import { useQuery } from '@tanstack/react-query'; import React, { useMemo, useState } from 'react'; -import FilterByText from '../../../../client/components/FilterByText'; -import GenericNoResults from '../../../../client/components/GenericNoResults'; +import FilterByText from '../../components/FilterByText'; +import GenericNoResults from '../../components/GenericNoResults'; import { GenericTable, GenericTableBody, GenericTableHeaderCell, GenericTableHeader, GenericTableLoadingRow, -} from '../../../../client/components/GenericTable'; -import { usePagination } from '../../../../client/components/GenericTable/hooks/usePagination'; +} from '../../components/GenericTable'; +import { usePagination } from '../../components/GenericTable/hooks/usePagination'; import BusinessHoursRow from './BusinessHoursRow'; const BusinessHoursTable = () => { diff --git a/apps/meteor/ee/client/omnichannel/businessHours/useRemoveBusinessHour.tsx b/apps/meteor/client/omnichannel/businessHours/useRemoveBusinessHour.tsx similarity index 94% rename from apps/meteor/ee/client/omnichannel/businessHours/useRemoveBusinessHour.tsx rename to apps/meteor/client/omnichannel/businessHours/useRemoveBusinessHour.tsx index f30cb75b2977..626c54106946 100644 --- a/apps/meteor/ee/client/omnichannel/businessHours/useRemoveBusinessHour.tsx +++ b/apps/meteor/client/omnichannel/businessHours/useRemoveBusinessHour.tsx @@ -3,7 +3,7 @@ import { useSetModal, useToastMessageDispatch, useMethod, useTranslation } from import { useQueryClient } from '@tanstack/react-query'; import React from 'react'; -import GenericModal from '../../../../client/components/GenericModal'; +import GenericModal from '../../components/GenericModal'; export const useRemoveBusinessHour = () => { const t = useTranslation(); diff --git a/apps/meteor/ee/client/omnichannel/cannedResponses/CannedResponseEdit.tsx b/apps/meteor/client/omnichannel/cannedResponses/CannedResponseEdit.tsx similarity index 98% rename from apps/meteor/ee/client/omnichannel/cannedResponses/CannedResponseEdit.tsx rename to apps/meteor/client/omnichannel/cannedResponses/CannedResponseEdit.tsx index 3c903d571518..28116cb26a13 100644 --- a/apps/meteor/ee/client/omnichannel/cannedResponses/CannedResponseEdit.tsx +++ b/apps/meteor/client/omnichannel/cannedResponses/CannedResponseEdit.tsx @@ -6,7 +6,7 @@ import { useQueryClient } from '@tanstack/react-query'; import React, { memo, useCallback } from 'react'; import { FormProvider, useForm } from 'react-hook-form'; -import { Page, PageHeader, PageScrollableContentWithShadow, PageFooter } from '../../../../client/components/Page'; +import { Page, PageHeader, PageScrollableContentWithShadow, PageFooter } from '../../components/Page'; import CannedResponseForm from './components/cannedResponseForm'; import { useRemoveCannedResponse } from './useRemoveCannedResponse'; diff --git a/apps/meteor/ee/client/omnichannel/cannedResponses/CannedResponseEditWithData.tsx b/apps/meteor/client/omnichannel/cannedResponses/CannedResponseEditWithData.tsx similarity index 94% rename from apps/meteor/ee/client/omnichannel/cannedResponses/CannedResponseEditWithData.tsx rename to apps/meteor/client/omnichannel/cannedResponses/CannedResponseEditWithData.tsx index dd06afbcfa8d..64cbe556db9c 100644 --- a/apps/meteor/ee/client/omnichannel/cannedResponses/CannedResponseEditWithData.tsx +++ b/apps/meteor/client/omnichannel/cannedResponses/CannedResponseEditWithData.tsx @@ -4,7 +4,7 @@ import { useEndpoint, useTranslation } from '@rocket.chat/ui-contexts'; import { useQuery } from '@tanstack/react-query'; import React from 'react'; -import { FormSkeleton } from '../../../../client/components/Skeleton'; +import { FormSkeleton } from '../../components/Skeleton'; import CannedResponseEdit from './CannedResponseEdit'; import CannedResponseEditWithDepartmentData from './CannedResponseEditWithDepartmentData'; diff --git a/apps/meteor/ee/client/omnichannel/cannedResponses/CannedResponseEditWithDepartmentData.tsx b/apps/meteor/client/omnichannel/cannedResponses/CannedResponseEditWithDepartmentData.tsx similarity index 82% rename from apps/meteor/ee/client/omnichannel/cannedResponses/CannedResponseEditWithDepartmentData.tsx rename to apps/meteor/client/omnichannel/cannedResponses/CannedResponseEditWithDepartmentData.tsx index 30f6639c054f..90dd6bd4ed32 100644 --- a/apps/meteor/ee/client/omnichannel/cannedResponses/CannedResponseEditWithDepartmentData.tsx +++ b/apps/meteor/client/omnichannel/cannedResponses/CannedResponseEditWithDepartmentData.tsx @@ -3,9 +3,9 @@ import { Callout } from '@rocket.chat/fuselage'; import { useTranslation } from '@rocket.chat/ui-contexts'; import React, { useMemo } from 'react'; -import { FormSkeleton } from '../../../../client/components/Skeleton'; -import { AsyncStatePhase } from '../../../../client/hooks/useAsyncState'; -import { useEndpointData } from '../../../../client/hooks/useEndpointData'; +import { FormSkeleton } from '../../components/Skeleton'; +import { AsyncStatePhase } from '../../hooks/useAsyncState'; +import { useEndpointData } from '../../hooks/useEndpointData'; import CannedResponseEdit from './CannedResponseEdit'; const CannedResponseEditWithDepartmentData = ({ cannedResponseData }: { cannedResponseData: Serialized }) => { diff --git a/apps/meteor/ee/client/omnichannel/cannedResponses/CannedResponseFilter.tsx b/apps/meteor/client/omnichannel/cannedResponses/CannedResponseFilter.tsx similarity index 95% rename from apps/meteor/ee/client/omnichannel/cannedResponses/CannedResponseFilter.tsx rename to apps/meteor/client/omnichannel/cannedResponses/CannedResponseFilter.tsx index fb379886318f..4746e7df6bea 100644 --- a/apps/meteor/ee/client/omnichannel/cannedResponses/CannedResponseFilter.tsx +++ b/apps/meteor/client/omnichannel/cannedResponses/CannedResponseFilter.tsx @@ -4,7 +4,7 @@ import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ChangeEvent } from 'react'; import React, { memo } from 'react'; -import AutoCompleteAgent from '../../../../client/components/AutoCompleteAgent'; +import AutoCompleteAgent from '../../components/AutoCompleteAgent'; type SharingValues = '' | 'user' | 'global' | 'department'; diff --git a/apps/meteor/ee/client/omnichannel/cannedResponses/CannedResponsesPage.tsx b/apps/meteor/client/omnichannel/cannedResponses/CannedResponsesPage.tsx similarity index 92% rename from apps/meteor/ee/client/omnichannel/cannedResponses/CannedResponsesPage.tsx rename to apps/meteor/client/omnichannel/cannedResponses/CannedResponsesPage.tsx index 9156cd7d678f..f476868be27b 100644 --- a/apps/meteor/ee/client/omnichannel/cannedResponses/CannedResponsesPage.tsx +++ b/apps/meteor/client/omnichannel/cannedResponses/CannedResponsesPage.tsx @@ -2,7 +2,7 @@ import { Button, ButtonGroup } from '@rocket.chat/fuselage'; import { useRouteParameter, useRouter, useTranslation } from '@rocket.chat/ui-contexts'; import React from 'react'; -import { Page, PageHeader, PageContent } from '../../../../client/components/Page'; +import { Page, PageHeader, PageContent } from '../../components/Page'; import CannedResponseEdit from './CannedResponseEdit'; import CannedResponseEditWithData from './CannedResponseEditWithData'; import CannedResponsesTable from './CannedResponsesTable'; diff --git a/apps/meteor/ee/client/omnichannel/cannedResponses/CannedResponsesRoute.tsx b/apps/meteor/client/omnichannel/cannedResponses/CannedResponsesRoute.tsx similarity index 83% rename from apps/meteor/ee/client/omnichannel/cannedResponses/CannedResponsesRoute.tsx rename to apps/meteor/client/omnichannel/cannedResponses/CannedResponsesRoute.tsx index a0f49c14124b..9e90ac015a46 100644 --- a/apps/meteor/ee/client/omnichannel/cannedResponses/CannedResponsesRoute.tsx +++ b/apps/meteor/client/omnichannel/cannedResponses/CannedResponsesRoute.tsx @@ -2,7 +2,7 @@ import { usePermission } from '@rocket.chat/ui-contexts'; import type { FC } from 'react'; import React from 'react'; -import NotAuthorizedPage from '../../../../client/views/notAuthorized/NotAuthorizedPage'; +import NotAuthorizedPage from '../../views/notAuthorized/NotAuthorizedPage'; import CannedResponsesPage from './CannedResponsesPage'; const CannedResponsesRoute: FC = () => { diff --git a/apps/meteor/ee/client/omnichannel/cannedResponses/CannedResponsesTable.tsx b/apps/meteor/client/omnichannel/cannedResponses/CannedResponsesTable.tsx similarity index 94% rename from apps/meteor/ee/client/omnichannel/cannedResponses/CannedResponsesTable.tsx rename to apps/meteor/client/omnichannel/cannedResponses/CannedResponsesTable.tsx index dccef4dfdf09..8bf1d52e5ca9 100644 --- a/apps/meteor/ee/client/omnichannel/cannedResponses/CannedResponsesTable.tsx +++ b/apps/meteor/client/omnichannel/cannedResponses/CannedResponsesTable.tsx @@ -5,7 +5,7 @@ import { useTranslation, usePermission, useToastMessageDispatch, useEndpoint, us import { useQuery, hashQueryKey } from '@tanstack/react-query'; import React, { useMemo, useState } from 'react'; -import GenericNoResults from '../../../../client/components/GenericNoResults'; +import GenericNoResults from '../../components/GenericNoResults'; import { GenericTable, GenericTableBody, @@ -14,10 +14,10 @@ import { GenericTableLoadingRow, GenericTableRow, GenericTableCell, -} from '../../../../client/components/GenericTable'; -import { usePagination } from '../../../../client/components/GenericTable/hooks/usePagination'; -import { useSort } from '../../../../client/components/GenericTable/hooks/useSort'; -import { useFormatDateAndTime } from '../../../../client/hooks/useFormatDateAndTime'; +} from '../../components/GenericTable'; +import { usePagination } from '../../components/GenericTable/hooks/usePagination'; +import { useSort } from '../../components/GenericTable/hooks/useSort'; +import { useFormatDateAndTime } from '../../hooks/useFormatDateAndTime'; import CannedResponseFilter from './CannedResponseFilter'; import { useRemoveCannedResponse } from './useRemoveCannedResponse'; diff --git a/apps/meteor/ee/client/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposer.stories.tsx b/apps/meteor/client/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposer.stories.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposer.stories.tsx rename to apps/meteor/client/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposer.stories.tsx diff --git a/apps/meteor/ee/client/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposer.tsx b/apps/meteor/client/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposer.tsx similarity index 96% rename from apps/meteor/ee/client/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposer.tsx rename to apps/meteor/client/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposer.tsx index 087b2f3192ba..0abc8d3bd203 100644 --- a/apps/meteor/ee/client/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposer.tsx +++ b/apps/meteor/client/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposer.tsx @@ -11,8 +11,8 @@ import { useUserPreference, useTranslation } from '@rocket.chat/ui-contexts'; import type { ComponentProps } from 'react'; import React, { memo, useCallback, useRef, useState } from 'react'; -import { Backdrop } from '../../../../../../client/components/Backdrop'; -import { useEmojiPicker } from '../../../../../../client/contexts/EmojiPickerContext'; +import { Backdrop } from '../../../../components/Backdrop'; +import { useEmojiPicker } from '../../../../contexts/EmojiPickerContext'; import InsertPlaceholderDropdown from './InsertPlaceholderDropdown'; const CannedResponsesComposer = ({ onChange, ...props }: ComponentProps) => { diff --git a/apps/meteor/ee/client/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposerPreview.tsx b/apps/meteor/client/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposerPreview.tsx similarity index 87% rename from apps/meteor/ee/client/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposerPreview.tsx rename to apps/meteor/client/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposerPreview.tsx index 840793db7e3c..63dde93ac8d6 100644 --- a/apps/meteor/ee/client/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposerPreview.tsx +++ b/apps/meteor/client/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposerPreview.tsx @@ -2,7 +2,7 @@ import { Box } from '@rocket.chat/fuselage'; import type { FC } from 'react'; import React, { memo } from 'react'; -import MarkdownText from '../../../../../../client/components/MarkdownText'; +import MarkdownText from '../../../../components/MarkdownText'; const CannedResponsesComposerPreview: FC<{ text: string }> = ({ text }) => { const textM = text.split(/\n/).join(' \n'); diff --git a/apps/meteor/ee/client/omnichannel/cannedResponses/components/CannedResponsesComposer/InsertPlaceholderDropdown.tsx b/apps/meteor/client/omnichannel/cannedResponses/components/CannedResponsesComposer/InsertPlaceholderDropdown.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/cannedResponses/components/CannedResponsesComposer/InsertPlaceholderDropdown.tsx rename to apps/meteor/client/omnichannel/cannedResponses/components/CannedResponsesComposer/InsertPlaceholderDropdown.tsx diff --git a/apps/meteor/ee/client/omnichannel/cannedResponses/components/cannedResponseForm.tsx b/apps/meteor/client/omnichannel/cannedResponses/components/cannedResponseForm.tsx similarity index 97% rename from apps/meteor/ee/client/omnichannel/cannedResponses/components/cannedResponseForm.tsx rename to apps/meteor/client/omnichannel/cannedResponses/components/cannedResponseForm.tsx index e07c8e289845..51c993d2542f 100644 --- a/apps/meteor/ee/client/omnichannel/cannedResponses/components/cannedResponseForm.tsx +++ b/apps/meteor/client/omnichannel/cannedResponses/components/cannedResponseForm.tsx @@ -5,8 +5,8 @@ import { usePermission, useTranslation } from '@rocket.chat/ui-contexts'; import React, { useState } from 'react'; import { useFormContext, Controller } from 'react-hook-form'; -import AutoCompleteDepartment from '../../../../../client/components/AutoCompleteDepartment'; -import Tags from '../../../../../client/components/Omnichannel/Tags'; +import AutoCompleteDepartment from '../../../components/AutoCompleteDepartment'; +import Tags from '../../../components/Omnichannel/Tags'; import CannedResponsesComposer from './CannedResponsesComposer/CannedResponsesComposer'; import CannedResponsesComposerPreview from './CannedResponsesComposer/CannedResponsesComposerPreview'; diff --git a/apps/meteor/ee/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponse.stories.tsx b/apps/meteor/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponse.stories.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponse.stories.tsx rename to apps/meteor/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponse.stories.tsx diff --git a/apps/meteor/ee/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponse.tsx b/apps/meteor/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponse.tsx similarity index 98% rename from apps/meteor/ee/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponse.tsx rename to apps/meteor/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponse.tsx index 90d6a4523cb7..557d9672c027 100644 --- a/apps/meteor/ee/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponse.tsx +++ b/apps/meteor/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponse.tsx @@ -11,7 +11,7 @@ import { ContextualbarAction, ContextualbarContent, ContextualbarFooter, -} from '../../../../../../client/components/Contextualbar'; +} from '../../../../components/Contextualbar'; import { useScopeDict } from '../../../hooks/useScopeDict'; const CannedResponse: FC<{ diff --git a/apps/meteor/ee/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponseList.stories.tsx b/apps/meteor/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponseList.stories.tsx similarity index 96% rename from apps/meteor/ee/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponseList.stories.tsx rename to apps/meteor/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponseList.stories.tsx index a27dc589fd78..544502bda87f 100644 --- a/apps/meteor/ee/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponseList.stories.tsx +++ b/apps/meteor/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponseList.stories.tsx @@ -3,7 +3,7 @@ import { action } from '@storybook/addon-actions'; import type { ComponentMeta, ComponentStory } from '@storybook/react'; import React from 'react'; -import { Contextualbar } from '../../../../../../client/components/Contextualbar'; +import { Contextualbar } from '../../../../components/Contextualbar'; import CannedResponseList from './CannedResponseList'; export default { diff --git a/apps/meteor/ee/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponseList.tsx b/apps/meteor/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponseList.tsx similarity index 94% rename from apps/meteor/ee/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponseList.tsx rename to apps/meteor/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponseList.tsx index b9d3e57e31de..cc1be1da33c8 100644 --- a/apps/meteor/ee/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponseList.tsx +++ b/apps/meteor/client/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponseList.tsx @@ -13,9 +13,9 @@ import { ContextualbarContent, ContextualbarInnerContent, ContextualbarFooter, -} from '../../../../../../client/components/Contextualbar'; -import { VirtuosoScrollbars } from '../../../../../../client/components/CustomScrollbars'; -import { useRoomToolbox } from '../../../../../../client/views/room/contexts/RoomToolboxContext'; +} from '../../../../components/Contextualbar'; +import { VirtuosoScrollbars } from '../../../../components/CustomScrollbars'; +import { useRoomToolbox } from '../../../../views/room/contexts/RoomToolboxContext'; import Item from './Item'; import WrapCannedResponse from './WrapCannedResponse'; diff --git a/apps/meteor/ee/client/omnichannel/cannedResponses/contextualBar/CannedResponse/Item.stories.tsx b/apps/meteor/client/omnichannel/cannedResponses/contextualBar/CannedResponse/Item.stories.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/cannedResponses/contextualBar/CannedResponse/Item.stories.tsx rename to apps/meteor/client/omnichannel/cannedResponses/contextualBar/CannedResponse/Item.stories.tsx diff --git a/apps/meteor/ee/client/omnichannel/cannedResponses/contextualBar/CannedResponse/Item.tsx b/apps/meteor/client/omnichannel/cannedResponses/contextualBar/CannedResponse/Item.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/cannedResponses/contextualBar/CannedResponse/Item.tsx rename to apps/meteor/client/omnichannel/cannedResponses/contextualBar/CannedResponse/Item.tsx diff --git a/apps/meteor/ee/client/omnichannel/cannedResponses/contextualBar/CannedResponse/WrapCannedResponse.tsx b/apps/meteor/client/omnichannel/cannedResponses/contextualBar/CannedResponse/WrapCannedResponse.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/cannedResponses/contextualBar/CannedResponse/WrapCannedResponse.tsx rename to apps/meteor/client/omnichannel/cannedResponses/contextualBar/CannedResponse/WrapCannedResponse.tsx diff --git a/apps/meteor/ee/client/omnichannel/cannedResponses/contextualBar/CannedResponse/WrapCannedResponseList.tsx b/apps/meteor/client/omnichannel/cannedResponses/contextualBar/CannedResponse/WrapCannedResponseList.tsx similarity index 82% rename from apps/meteor/ee/client/omnichannel/cannedResponses/contextualBar/CannedResponse/WrapCannedResponseList.tsx rename to apps/meteor/client/omnichannel/cannedResponses/contextualBar/CannedResponse/WrapCannedResponseList.tsx index 25108d095418..6fd0ee420dbf 100644 --- a/apps/meteor/ee/client/omnichannel/cannedResponses/contextualBar/CannedResponse/WrapCannedResponseList.tsx +++ b/apps/meteor/client/omnichannel/cannedResponses/contextualBar/CannedResponse/WrapCannedResponseList.tsx @@ -3,12 +3,12 @@ import { useSetModal, useRouter } from '@rocket.chat/ui-contexts'; import type { MouseEvent } from 'react'; import React, { memo, useCallback, useMemo, useState } from 'react'; -import { useRecordList } from '../../../../../../client/hooks/lists/useRecordList'; -import { useIsRoomOverMacLimit } from '../../../../../../client/hooks/omnichannel/useIsRoomOverMacLimit'; -import { AsyncStatePhase } from '../../../../../../client/lib/asyncState'; -import { useChat } from '../../../../../../client/views/room/contexts/ChatContext'; -import { useRoom } from '../../../../../../client/views/room/contexts/RoomContext'; -import { useRoomToolbox } from '../../../../../../client/views/room/contexts/RoomToolboxContext'; +import { useRecordList } from '../../../../hooks/lists/useRecordList'; +import { useIsRoomOverMacLimit } from '../../../../hooks/omnichannel/useIsRoomOverMacLimit'; +import { AsyncStatePhase } from '../../../../lib/asyncState'; +import { useChat } from '../../../../views/room/contexts/ChatContext'; +import { useRoom } from '../../../../views/room/contexts/RoomContext'; +import { useRoomToolbox } from '../../../../views/room/contexts/RoomToolboxContext'; import { useCannedResponseFilterOptions } from '../../../hooks/useCannedResponseFilterOptions'; import { useCannedResponseList } from '../../../hooks/useCannedResponseList'; import CreateCannedResponse from '../../modals/CreateCannedResponse'; diff --git a/apps/meteor/ee/client/omnichannel/cannedResponses/modals/CreateCannedResponse/CreateCannedResponseModal.stories.tsx b/apps/meteor/client/omnichannel/cannedResponses/modals/CreateCannedResponse/CreateCannedResponseModal.stories.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/cannedResponses/modals/CreateCannedResponse/CreateCannedResponseModal.stories.tsx rename to apps/meteor/client/omnichannel/cannedResponses/modals/CreateCannedResponse/CreateCannedResponseModal.stories.tsx diff --git a/apps/meteor/ee/client/omnichannel/cannedResponses/modals/CreateCannedResponse/CreateCannedResponseModal.tsx b/apps/meteor/client/omnichannel/cannedResponses/modals/CreateCannedResponse/CreateCannedResponseModal.tsx similarity index 97% rename from apps/meteor/ee/client/omnichannel/cannedResponses/modals/CreateCannedResponse/CreateCannedResponseModal.tsx rename to apps/meteor/client/omnichannel/cannedResponses/modals/CreateCannedResponse/CreateCannedResponseModal.tsx index 15b65e6b42e3..9776564264cc 100644 --- a/apps/meteor/ee/client/omnichannel/cannedResponses/modals/CreateCannedResponse/CreateCannedResponseModal.tsx +++ b/apps/meteor/client/omnichannel/cannedResponses/modals/CreateCannedResponse/CreateCannedResponseModal.tsx @@ -4,7 +4,7 @@ import { useEndpoint, useToastMessageDispatch, useTranslation } from '@rocket.ch import React, { memo, useCallback } from 'react'; import { FormProvider, useForm } from 'react-hook-form'; -import GenericModal from '../../../../../../client/components/GenericModal'; +import GenericModal from '../../../../components/GenericModal'; import CannedResponseForm from '../../components/cannedResponseForm'; const getInitialData = ( diff --git a/apps/meteor/ee/client/omnichannel/cannedResponses/modals/CreateCannedResponse/index.tsx b/apps/meteor/client/omnichannel/cannedResponses/modals/CreateCannedResponse/index.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/cannedResponses/modals/CreateCannedResponse/index.tsx rename to apps/meteor/client/omnichannel/cannedResponses/modals/CreateCannedResponse/index.tsx diff --git a/apps/meteor/ee/client/omnichannel/cannedResponses/useRemoveCannedResponse.tsx b/apps/meteor/client/omnichannel/cannedResponses/useRemoveCannedResponse.tsx similarity index 94% rename from apps/meteor/ee/client/omnichannel/cannedResponses/useRemoveCannedResponse.tsx rename to apps/meteor/client/omnichannel/cannedResponses/useRemoveCannedResponse.tsx index 2d0f5f36ab28..aa23533b3e72 100644 --- a/apps/meteor/ee/client/omnichannel/cannedResponses/useRemoveCannedResponse.tsx +++ b/apps/meteor/client/omnichannel/cannedResponses/useRemoveCannedResponse.tsx @@ -3,7 +3,7 @@ import { useSetModal, useToastMessageDispatch, useRouter, useMethod, useTranslat import { useQueryClient } from '@tanstack/react-query'; import React from 'react'; -import GenericModal from '../../../../client/components/GenericModal'; +import GenericModal from '../../components/GenericModal'; export const useRemoveCannedResponse = () => { const t = useTranslation(); diff --git a/apps/meteor/ee/client/omnichannel/components/RoomActivityIcon/index.tsx b/apps/meteor/client/omnichannel/components/RoomActivityIcon/index.tsx similarity index 86% rename from apps/meteor/ee/client/omnichannel/components/RoomActivityIcon/index.tsx rename to apps/meteor/client/omnichannel/components/RoomActivityIcon/index.tsx index 5db68f559fdb..749f40d28a60 100644 --- a/apps/meteor/ee/client/omnichannel/components/RoomActivityIcon/index.tsx +++ b/apps/meteor/client/omnichannel/components/RoomActivityIcon/index.tsx @@ -4,7 +4,7 @@ import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React from 'react'; -import { useIsRoomOverMacLimit } from '../../../../../client/hooks/omnichannel/useIsRoomOverMacLimit'; +import { useIsRoomOverMacLimit } from '../../../hooks/omnichannel/useIsRoomOverMacLimit'; type RoomActivityIconProps = { room: IOmnichannelRoom; diff --git a/apps/meteor/ee/client/omnichannel/hooks/useCannedResponseFilterOptions.ts b/apps/meteor/client/omnichannel/hooks/useCannedResponseFilterOptions.ts similarity index 100% rename from apps/meteor/ee/client/omnichannel/hooks/useCannedResponseFilterOptions.ts rename to apps/meteor/client/omnichannel/hooks/useCannedResponseFilterOptions.ts diff --git a/apps/meteor/ee/client/omnichannel/hooks/useCannedResponseList.ts b/apps/meteor/client/omnichannel/hooks/useCannedResponseList.ts similarity index 88% rename from apps/meteor/ee/client/omnichannel/hooks/useCannedResponseList.ts rename to apps/meteor/client/omnichannel/hooks/useCannedResponseList.ts index 4f4e60e0f30a..6e02f302e3e1 100644 --- a/apps/meteor/ee/client/omnichannel/hooks/useCannedResponseList.ts +++ b/apps/meteor/client/omnichannel/hooks/useCannedResponseList.ts @@ -1,9 +1,9 @@ import { useEndpoint } from '@rocket.chat/ui-contexts'; import { useCallback, useEffect, useState } from 'react'; -import { useScrollableRecordList } from '../../../../client/hooks/lists/useScrollableRecordList'; -import { useComponentDidUpdate } from '../../../../client/hooks/useComponentDidUpdate'; -import { CannedResponseList } from '../../../../client/lib/lists/CannedResponseList'; +import { useScrollableRecordList } from '../../hooks/lists/useScrollableRecordList'; +import { useComponentDidUpdate } from '../../hooks/useComponentDidUpdate'; +import { CannedResponseList } from '../../lib/lists/CannedResponseList'; export const useCannedResponseList = ( options: any, diff --git a/apps/meteor/client/omnichannel/hooks/useOmnichannelPriorities.ts b/apps/meteor/client/omnichannel/hooks/useOmnichannelPriorities.ts new file mode 100644 index 000000000000..9552a750e55b --- /dev/null +++ b/apps/meteor/client/omnichannel/hooks/useOmnichannelPriorities.ts @@ -0,0 +1,3 @@ +import { useOmnichannel } from '../../hooks/omnichannel/useOmnichannel'; + +export const useOmnichannelPriorities = () => useOmnichannel().livechatPriorities; diff --git a/apps/meteor/ee/client/omnichannel/hooks/useOmnichannelPrioritiesMenu.tsx b/apps/meteor/client/omnichannel/hooks/useOmnichannelPrioritiesMenu.tsx similarity index 97% rename from apps/meteor/ee/client/omnichannel/hooks/useOmnichannelPrioritiesMenu.tsx rename to apps/meteor/client/omnichannel/hooks/useOmnichannelPrioritiesMenu.tsx index ebfa9bf08a0b..2a99f6f1fada 100644 --- a/apps/meteor/ee/client/omnichannel/hooks/useOmnichannelPrioritiesMenu.tsx +++ b/apps/meteor/client/omnichannel/hooks/useOmnichannelPrioritiesMenu.tsx @@ -6,7 +6,7 @@ import { useQueryClient } from '@tanstack/react-query'; import type { ComponentProps } from 'react'; import React, { useCallback, useMemo } from 'react'; -import { dispatchToastMessage } from '../../../../client/lib/toast'; +import { dispatchToastMessage } from '../../lib/toast'; import { PriorityIcon } from '../priorities/PriorityIcon'; import { useOmnichannelPriorities } from './useOmnichannelPriorities'; diff --git a/apps/meteor/ee/client/omnichannel/hooks/useScopeDict.ts b/apps/meteor/client/omnichannel/hooks/useScopeDict.ts similarity index 100% rename from apps/meteor/ee/client/omnichannel/hooks/useScopeDict.ts rename to apps/meteor/client/omnichannel/hooks/useScopeDict.ts diff --git a/apps/meteor/ee/client/omnichannel/index.ts b/apps/meteor/client/omnichannel/index.ts similarity index 100% rename from apps/meteor/ee/client/omnichannel/index.ts rename to apps/meteor/client/omnichannel/index.ts diff --git a/apps/meteor/ee/client/omnichannel/monitors/MonitorsPage.tsx b/apps/meteor/client/omnichannel/monitors/MonitorsPage.tsx similarity index 82% rename from apps/meteor/ee/client/omnichannel/monitors/MonitorsPage.tsx rename to apps/meteor/client/omnichannel/monitors/MonitorsPage.tsx index 4574f74bb2b7..dffbde494e7a 100644 --- a/apps/meteor/ee/client/omnichannel/monitors/MonitorsPage.tsx +++ b/apps/meteor/client/omnichannel/monitors/MonitorsPage.tsx @@ -1,7 +1,7 @@ import { useTranslation } from '@rocket.chat/ui-contexts'; import React from 'react'; -import { Page, PageHeader, PageContent } from '../../../../client/components/Page'; +import { Page, PageHeader, PageContent } from '../../components/Page'; import MonitorsTable from './MonitorsTable'; const MonitorsPage = () => { diff --git a/apps/meteor/ee/client/omnichannel/monitors/MonitorsPageContainer.tsx b/apps/meteor/client/omnichannel/monitors/MonitorsPageContainer.tsx similarity index 72% rename from apps/meteor/ee/client/omnichannel/monitors/MonitorsPageContainer.tsx rename to apps/meteor/client/omnichannel/monitors/MonitorsPageContainer.tsx index ce27ae47ae8c..b86f8a1ced2c 100644 --- a/apps/meteor/ee/client/omnichannel/monitors/MonitorsPageContainer.tsx +++ b/apps/meteor/client/omnichannel/monitors/MonitorsPageContainer.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import PageSkeleton from '../../../../client/components/PageSkeleton'; -import NotAuthorizedPage from '../../../../client/views/notAuthorized/NotAuthorizedPage'; +import PageSkeleton from '../../components/PageSkeleton'; import { useHasLicenseModule } from '../../hooks/useHasLicenseModule'; +import NotAuthorizedPage from '../../views/notAuthorized/NotAuthorizedPage'; import MonitorsPage from './MonitorsPage'; const MonitorsPageContainer = () => { diff --git a/apps/meteor/ee/client/omnichannel/monitors/MonitorsTable.tsx b/apps/meteor/client/omnichannel/monitors/MonitorsTable.tsx similarity index 91% rename from apps/meteor/ee/client/omnichannel/monitors/MonitorsTable.tsx rename to apps/meteor/client/omnichannel/monitors/MonitorsTable.tsx index 6a99ae93340d..a67057b9add1 100644 --- a/apps/meteor/ee/client/omnichannel/monitors/MonitorsTable.tsx +++ b/apps/meteor/client/omnichannel/monitors/MonitorsTable.tsx @@ -17,9 +17,9 @@ import { useTranslation, useToastMessageDispatch, useMethod, useEndpoint, useSet import { useMutation, useQuery, hashQueryKey } from '@tanstack/react-query'; import React, { useMemo, useState } from 'react'; -import FilterByText from '../../../../client/components/FilterByText'; -import GenericModal from '../../../../client/components/GenericModal'; -import GenericNoResults from '../../../../client/components/GenericNoResults'; +import FilterByText from '../../components/FilterByText'; +import GenericModal from '../../components/GenericModal'; +import GenericNoResults from '../../components/GenericNoResults'; import { GenericTable, GenericTableBody, @@ -28,11 +28,11 @@ import { GenericTableHeaderCell, GenericTableLoadingTable, GenericTableRow, -} from '../../../../client/components/GenericTable'; -import { usePagination } from '../../../../client/components/GenericTable/hooks/usePagination'; -import { useSort } from '../../../../client/components/GenericTable/hooks/useSort'; -import UserAutoComplete from '../../../../client/components/UserAutoComplete'; -import { queryClient } from '../../../../client/lib/queryClient'; +} from '../../components/GenericTable'; +import { usePagination } from '../../components/GenericTable/hooks/usePagination'; +import { useSort } from '../../components/GenericTable/hooks/useSort'; +import UserAutoComplete from '../../components/UserAutoComplete'; +import { queryClient } from '../../lib/queryClient'; const MonitorsTable = () => { const t = useTranslation(); diff --git a/apps/meteor/ee/client/omnichannel/priorities/PrioritiesPage.tsx b/apps/meteor/client/omnichannel/priorities/PrioritiesPage.tsx similarity index 97% rename from apps/meteor/ee/client/omnichannel/priorities/PrioritiesPage.tsx rename to apps/meteor/client/omnichannel/priorities/PrioritiesPage.tsx index 8b87d0f811e3..fe694c1de851 100644 --- a/apps/meteor/ee/client/omnichannel/priorities/PrioritiesPage.tsx +++ b/apps/meteor/client/omnichannel/priorities/PrioritiesPage.tsx @@ -5,7 +5,7 @@ import { useQueryClient } from '@tanstack/react-query'; import type { ReactElement } from 'react'; import React, { useMemo, useState } from 'react'; -import { Page, PageHeader, PageContent } from '../../../../client/components/Page'; +import { Page, PageHeader, PageContent } from '../../components/Page'; import { useOmnichannelPriorities } from '../hooks/useOmnichannelPriorities'; import { PrioritiesResetModal } from './PrioritiesResetModal'; import { PrioritiesTable } from './PrioritiesTable'; diff --git a/apps/meteor/ee/client/omnichannel/priorities/PrioritiesResetModal.tsx b/apps/meteor/client/omnichannel/priorities/PrioritiesResetModal.tsx similarity index 89% rename from apps/meteor/ee/client/omnichannel/priorities/PrioritiesResetModal.tsx rename to apps/meteor/client/omnichannel/priorities/PrioritiesResetModal.tsx index 0fdbd34f66aa..a85dd72c868d 100644 --- a/apps/meteor/ee/client/omnichannel/priorities/PrioritiesResetModal.tsx +++ b/apps/meteor/client/omnichannel/priorities/PrioritiesResetModal.tsx @@ -2,7 +2,7 @@ import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React from 'react'; -import GenericModal from '../../../../client/components/GenericModal'; +import GenericModal from '../../components/GenericModal'; type PrioritiesResetModalProps = { onReset: () => Promise; diff --git a/apps/meteor/ee/client/omnichannel/priorities/PrioritiesRoute.tsx b/apps/meteor/client/omnichannel/priorities/PrioritiesRoute.tsx similarity index 86% rename from apps/meteor/ee/client/omnichannel/priorities/PrioritiesRoute.tsx rename to apps/meteor/client/omnichannel/priorities/PrioritiesRoute.tsx index 7a7f6cafdb17..fd3b73a3f4a5 100644 --- a/apps/meteor/ee/client/omnichannel/priorities/PrioritiesRoute.tsx +++ b/apps/meteor/client/omnichannel/priorities/PrioritiesRoute.tsx @@ -2,7 +2,7 @@ import { usePermission, useRouteParameter } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React from 'react'; -import NotAuthorizedPage from '../../../../client/views/notAuthorized/NotAuthorizedPage'; +import NotAuthorizedPage from '../../views/notAuthorized/NotAuthorizedPage'; import { PrioritiesPage } from './PrioritiesPage'; const PrioritiesRoute = (): ReactElement => { diff --git a/apps/meteor/ee/client/omnichannel/priorities/PrioritiesTable.tsx b/apps/meteor/client/omnichannel/priorities/PrioritiesTable.tsx similarity index 93% rename from apps/meteor/ee/client/omnichannel/priorities/PrioritiesTable.tsx rename to apps/meteor/client/omnichannel/priorities/PrioritiesTable.tsx index 84c3051b6aea..7e5368d7a0a5 100644 --- a/apps/meteor/ee/client/omnichannel/priorities/PrioritiesTable.tsx +++ b/apps/meteor/client/omnichannel/priorities/PrioritiesTable.tsx @@ -3,7 +3,7 @@ import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React from 'react'; -import GenericNoResults from '../../../../client/components/GenericNoResults'; +import GenericNoResults from '../../components/GenericNoResults'; import { GenericTable, GenericTableHeaderCell, @@ -12,7 +12,7 @@ import { GenericTableHeader, GenericTableBody, GenericTableLoadingTable, -} from '../../../../client/components/GenericTable'; +} from '../../components/GenericTable'; import { PriorityIcon } from './PriorityIcon'; type PrioritiesTableProps = { diff --git a/apps/meteor/ee/client/omnichannel/priorities/PriorityEditForm.tsx b/apps/meteor/client/omnichannel/priorities/PriorityEditForm.tsx similarity index 96% rename from apps/meteor/ee/client/omnichannel/priorities/PriorityEditForm.tsx rename to apps/meteor/client/omnichannel/priorities/PriorityEditForm.tsx index c39916369f5d..38157e435b8c 100644 --- a/apps/meteor/ee/client/omnichannel/priorities/PriorityEditForm.tsx +++ b/apps/meteor/client/omnichannel/priorities/PriorityEditForm.tsx @@ -7,7 +7,7 @@ import type { ReactElement } from 'react'; import React, { useState } from 'react'; import { Controller, useForm } from 'react-hook-form'; -import StringSettingInput from '../../../../client/views/admin/settings/inputs/StringSettingInput'; +import StringSettingInput from '../../views/admin/settings/inputs/StringSettingInput'; export type PriorityFormData = { name: string; reset: boolean }; diff --git a/apps/meteor/ee/client/omnichannel/priorities/PriorityEditFormWithData.tsx b/apps/meteor/client/omnichannel/priorities/PriorityEditFormWithData.tsx similarity index 83% rename from apps/meteor/ee/client/omnichannel/priorities/PriorityEditFormWithData.tsx rename to apps/meteor/client/omnichannel/priorities/PriorityEditFormWithData.tsx index b5238cab640a..fec79d762bcd 100644 --- a/apps/meteor/ee/client/omnichannel/priorities/PriorityEditFormWithData.tsx +++ b/apps/meteor/client/omnichannel/priorities/PriorityEditFormWithData.tsx @@ -3,8 +3,8 @@ import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React from 'react'; -import { FormSkeleton } from '../../../../client/components/Skeleton'; -import { usePriorityInfo } from '../../../../client/views/omnichannel/directory/hooks/usePriorityInfo'; +import { FormSkeleton } from '../../components/Skeleton'; +import { usePriorityInfo } from '../../views/omnichannel/directory/hooks/usePriorityInfo'; import type { PriorityEditFormProps } from './PriorityEditForm'; import PriorityEditForm from './PriorityEditForm'; diff --git a/apps/meteor/ee/client/omnichannel/priorities/PriorityIcon.tsx b/apps/meteor/client/omnichannel/priorities/PriorityIcon.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/priorities/PriorityIcon.tsx rename to apps/meteor/client/omnichannel/priorities/PriorityIcon.tsx diff --git a/apps/meteor/ee/client/omnichannel/priorities/PriorityList.tsx b/apps/meteor/client/omnichannel/priorities/PriorityList.tsx similarity index 95% rename from apps/meteor/ee/client/omnichannel/priorities/PriorityList.tsx rename to apps/meteor/client/omnichannel/priorities/PriorityList.tsx index 7d83fbc6fc65..e31fc3a44a5a 100644 --- a/apps/meteor/ee/client/omnichannel/priorities/PriorityList.tsx +++ b/apps/meteor/client/omnichannel/priorities/PriorityList.tsx @@ -9,7 +9,7 @@ import { ContextualbarClose, ContextualbarScrollableContent, ContextualbarDialog, -} from '../../../../client/components/Contextualbar'; +} from '../../components/Contextualbar'; import type { PriorityFormData } from './PriorityEditForm'; import PriorityEditFormWithData from './PriorityEditFormWithData'; diff --git a/apps/meteor/ee/client/omnichannel/reports/ReportsPage.tsx b/apps/meteor/client/omnichannel/reports/ReportsPage.tsx similarity index 92% rename from apps/meteor/ee/client/omnichannel/reports/ReportsPage.tsx rename to apps/meteor/client/omnichannel/reports/ReportsPage.tsx index 9ffd4d8367dd..6356aa693d1e 100644 --- a/apps/meteor/ee/client/omnichannel/reports/ReportsPage.tsx +++ b/apps/meteor/client/omnichannel/reports/ReportsPage.tsx @@ -2,9 +2,9 @@ import { Box, Grid, GridItem } from '@rocket.chat/fuselage'; import { usePermission, useTranslation } from '@rocket.chat/ui-contexts'; import React from 'react'; -import { Page, PageHeader, PageScrollableContentWithShadow } from '../../../../client/components/Page'; -import NotAuthorizedPage from '../../../../client/views/notAuthorized/NotAuthorizedPage'; +import { Page, PageHeader, PageScrollableContentWithShadow } from '../../components/Page'; import { useHasLicenseModule } from '../../hooks/useHasLicenseModule'; +import NotAuthorizedPage from '../../views/notAuthorized/NotAuthorizedPage'; import { AgentsSection, ChannelsSection, DepartmentsSection, StatusSection, TagsSection } from './sections'; const BREAKPOINTS = { xs: 4, sm: 8, md: 8, lg: 12, xl: 6 } as const; diff --git a/apps/meteor/ee/client/omnichannel/reports/components/AgentsTable.tsx b/apps/meteor/client/omnichannel/reports/components/AgentsTable.tsx similarity index 96% rename from apps/meteor/ee/client/omnichannel/reports/components/AgentsTable.tsx rename to apps/meteor/client/omnichannel/reports/components/AgentsTable.tsx index cc1254184830..90b838758234 100644 --- a/apps/meteor/ee/client/omnichannel/reports/components/AgentsTable.tsx +++ b/apps/meteor/client/omnichannel/reports/components/AgentsTable.tsx @@ -9,7 +9,7 @@ import { GenericTableHeader, GenericTableHeaderCell, GenericTableRow, -} from '../../../../../client/components/GenericTable'; +} from '../../../components/GenericTable'; type AgentsTableProps = { data: { diff --git a/apps/meteor/ee/client/omnichannel/reports/components/BarChart.tsx b/apps/meteor/client/omnichannel/reports/components/BarChart.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/components/BarChart.tsx rename to apps/meteor/client/omnichannel/reports/components/BarChart.tsx diff --git a/apps/meteor/ee/client/omnichannel/reports/components/PieChart.tsx b/apps/meteor/client/omnichannel/reports/components/PieChart.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/components/PieChart.tsx rename to apps/meteor/client/omnichannel/reports/components/PieChart.tsx diff --git a/apps/meteor/ee/client/omnichannel/reports/components/ReportCard.tsx b/apps/meteor/client/omnichannel/reports/components/ReportCard.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/components/ReportCard.tsx rename to apps/meteor/client/omnichannel/reports/components/ReportCard.tsx diff --git a/apps/meteor/ee/client/omnichannel/reports/components/ReportCardContent.tsx b/apps/meteor/client/omnichannel/reports/components/ReportCardContent.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/components/ReportCardContent.tsx rename to apps/meteor/client/omnichannel/reports/components/ReportCardContent.tsx diff --git a/apps/meteor/ee/client/omnichannel/reports/components/ReportCardEmptyState.tsx b/apps/meteor/client/omnichannel/reports/components/ReportCardEmptyState.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/components/ReportCardEmptyState.tsx rename to apps/meteor/client/omnichannel/reports/components/ReportCardEmptyState.tsx diff --git a/apps/meteor/ee/client/omnichannel/reports/components/ReportCardErrorState.tsx b/apps/meteor/client/omnichannel/reports/components/ReportCardErrorState.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/components/ReportCardErrorState.tsx rename to apps/meteor/client/omnichannel/reports/components/ReportCardErrorState.tsx diff --git a/apps/meteor/ee/client/omnichannel/reports/components/ReportCardLoadingState.tsx b/apps/meteor/client/omnichannel/reports/components/ReportCardLoadingState.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/components/ReportCardLoadingState.tsx rename to apps/meteor/client/omnichannel/reports/components/ReportCardLoadingState.tsx diff --git a/apps/meteor/ee/client/omnichannel/reports/components/constants.ts b/apps/meteor/client/omnichannel/reports/components/constants.ts similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/components/constants.ts rename to apps/meteor/client/omnichannel/reports/components/constants.ts diff --git a/apps/meteor/ee/client/omnichannel/reports/components/index.ts b/apps/meteor/client/omnichannel/reports/components/index.ts similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/components/index.ts rename to apps/meteor/client/omnichannel/reports/components/index.ts diff --git a/apps/meteor/ee/client/omnichannel/reports/hooks/index.ts b/apps/meteor/client/omnichannel/reports/hooks/index.ts similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/hooks/index.ts rename to apps/meteor/client/omnichannel/reports/hooks/index.ts diff --git a/apps/meteor/ee/client/omnichannel/reports/hooks/useAgentsSection.tsx b/apps/meteor/client/omnichannel/reports/hooks/useAgentsSection.tsx similarity index 96% rename from apps/meteor/ee/client/omnichannel/reports/hooks/useAgentsSection.tsx rename to apps/meteor/client/omnichannel/reports/hooks/useAgentsSection.tsx index a6da966b3606..4ca7066bbc08 100644 --- a/apps/meteor/ee/client/omnichannel/reports/hooks/useAgentsSection.tsx +++ b/apps/meteor/client/omnichannel/reports/hooks/useAgentsSection.tsx @@ -2,7 +2,7 @@ import { useEndpoint, useTranslation } from '@rocket.chat/ui-contexts'; import { useQuery } from '@tanstack/react-query'; import { useMemo } from 'react'; -import { useSort } from '../../../../../client/components/GenericTable/hooks/useSort'; +import { useSort } from '../../../components/GenericTable/hooks/useSort'; import { getPeriodRange } from '../../../components/dashboards/periods'; import { usePeriodSelectorStorage } from '../../../components/dashboards/usePeriodSelectorStorage'; import { COLORS, PERIOD_OPTIONS } from '../components/constants'; diff --git a/apps/meteor/ee/client/omnichannel/reports/hooks/useChannelsSection.tsx b/apps/meteor/client/omnichannel/reports/hooks/useChannelsSection.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/hooks/useChannelsSection.tsx rename to apps/meteor/client/omnichannel/reports/hooks/useChannelsSection.tsx diff --git a/apps/meteor/ee/client/omnichannel/reports/hooks/useDefaultDownload.tsx b/apps/meteor/client/omnichannel/reports/hooks/useDefaultDownload.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/hooks/useDefaultDownload.tsx rename to apps/meteor/client/omnichannel/reports/hooks/useDefaultDownload.tsx diff --git a/apps/meteor/ee/client/omnichannel/reports/hooks/useDepartmentsSection.tsx b/apps/meteor/client/omnichannel/reports/hooks/useDepartmentsSection.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/hooks/useDepartmentsSection.tsx rename to apps/meteor/client/omnichannel/reports/hooks/useDepartmentsSection.tsx diff --git a/apps/meteor/ee/client/omnichannel/reports/hooks/useStatusSection.tsx b/apps/meteor/client/omnichannel/reports/hooks/useStatusSection.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/hooks/useStatusSection.tsx rename to apps/meteor/client/omnichannel/reports/hooks/useStatusSection.tsx diff --git a/apps/meteor/ee/client/omnichannel/reports/hooks/useTagsSection.tsx b/apps/meteor/client/omnichannel/reports/hooks/useTagsSection.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/hooks/useTagsSection.tsx rename to apps/meteor/client/omnichannel/reports/hooks/useTagsSection.tsx diff --git a/apps/meteor/ee/client/omnichannel/reports/sections/AgentsSection.tsx b/apps/meteor/client/omnichannel/reports/sections/AgentsSection.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/sections/AgentsSection.tsx rename to apps/meteor/client/omnichannel/reports/sections/AgentsSection.tsx diff --git a/apps/meteor/ee/client/omnichannel/reports/sections/ChannelsSection.tsx b/apps/meteor/client/omnichannel/reports/sections/ChannelsSection.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/sections/ChannelsSection.tsx rename to apps/meteor/client/omnichannel/reports/sections/ChannelsSection.tsx diff --git a/apps/meteor/ee/client/omnichannel/reports/sections/DepartmentsSection.tsx b/apps/meteor/client/omnichannel/reports/sections/DepartmentsSection.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/sections/DepartmentsSection.tsx rename to apps/meteor/client/omnichannel/reports/sections/DepartmentsSection.tsx diff --git a/apps/meteor/ee/client/omnichannel/reports/sections/StatusSection.tsx b/apps/meteor/client/omnichannel/reports/sections/StatusSection.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/sections/StatusSection.tsx rename to apps/meteor/client/omnichannel/reports/sections/StatusSection.tsx diff --git a/apps/meteor/ee/client/omnichannel/reports/sections/TagsSection.tsx b/apps/meteor/client/omnichannel/reports/sections/TagsSection.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/sections/TagsSection.tsx rename to apps/meteor/client/omnichannel/reports/sections/TagsSection.tsx diff --git a/apps/meteor/ee/client/omnichannel/reports/sections/index.ts b/apps/meteor/client/omnichannel/reports/sections/index.ts similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/sections/index.ts rename to apps/meteor/client/omnichannel/reports/sections/index.ts diff --git a/apps/meteor/ee/client/omnichannel/reports/utils/ellipsis.ts b/apps/meteor/client/omnichannel/reports/utils/ellipsis.ts similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/utils/ellipsis.ts rename to apps/meteor/client/omnichannel/reports/utils/ellipsis.ts diff --git a/apps/meteor/ee/client/omnichannel/reports/utils/formatAttachmentName.ts b/apps/meteor/client/omnichannel/reports/utils/formatAttachmentName.ts similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/utils/formatAttachmentName.ts rename to apps/meteor/client/omnichannel/reports/utils/formatAttachmentName.ts diff --git a/apps/meteor/ee/client/omnichannel/reports/utils/formatPeriodDescription.tsx b/apps/meteor/client/omnichannel/reports/utils/formatPeriodDescription.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/utils/formatPeriodDescription.tsx rename to apps/meteor/client/omnichannel/reports/utils/formatPeriodDescription.tsx diff --git a/apps/meteor/ee/client/omnichannel/reports/utils/formatPeriodRange.ts b/apps/meteor/client/omnichannel/reports/utils/formatPeriodRange.ts similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/utils/formatPeriodRange.ts rename to apps/meteor/client/omnichannel/reports/utils/formatPeriodRange.ts diff --git a/apps/meteor/ee/client/omnichannel/reports/utils/getTop.ts b/apps/meteor/client/omnichannel/reports/utils/getTop.ts similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/utils/getTop.ts rename to apps/meteor/client/omnichannel/reports/utils/getTop.ts diff --git a/apps/meteor/ee/client/omnichannel/reports/utils/round.ts b/apps/meteor/client/omnichannel/reports/utils/round.ts similarity index 100% rename from apps/meteor/ee/client/omnichannel/reports/utils/round.ts rename to apps/meteor/client/omnichannel/reports/utils/round.ts diff --git a/apps/meteor/ee/client/omnichannel/routes.ts b/apps/meteor/client/omnichannel/routes.ts similarity index 95% rename from apps/meteor/ee/client/omnichannel/routes.ts rename to apps/meteor/client/omnichannel/routes.ts index 4078daf8bf2a..ffb225c76ac8 100644 --- a/apps/meteor/ee/client/omnichannel/routes.ts +++ b/apps/meteor/client/omnichannel/routes.ts @@ -1,6 +1,6 @@ import { lazy } from 'react'; -import { registerOmnichannelRoute } from '../../../client/views/omnichannel/routes'; +import { registerOmnichannelRoute } from '../views/omnichannel/routes'; declare module '@rocket.chat/ui-contexts' { interface IRouterPaths { diff --git a/apps/meteor/ee/client/omnichannel/slaPolicies/RemoveSlaButton.tsx b/apps/meteor/client/omnichannel/slaPolicies/RemoveSlaButton.tsx similarity index 90% rename from apps/meteor/ee/client/omnichannel/slaPolicies/RemoveSlaButton.tsx rename to apps/meteor/client/omnichannel/slaPolicies/RemoveSlaButton.tsx index fd9ffd1eb608..0797fbffb984 100644 --- a/apps/meteor/ee/client/omnichannel/slaPolicies/RemoveSlaButton.tsx +++ b/apps/meteor/client/omnichannel/slaPolicies/RemoveSlaButton.tsx @@ -3,8 +3,8 @@ import { useMutableCallback } from '@rocket.chat/fuselage-hooks'; import { useRoute, useEndpoint, useSetModal, useToastMessageDispatch, useTranslation } from '@rocket.chat/ui-contexts'; import React from 'react'; -import GenericModal from '../../../../client/components/GenericModal'; -import { GenericTableCell } from '../../../../client/components/GenericTable'; +import GenericModal from '../../components/GenericModal'; +import { GenericTableCell } from '../../components/GenericTable'; const RemoveSlaButton = ({ _id, reload }: { _id: string; reload: () => void }) => { const t = useTranslation(); diff --git a/apps/meteor/ee/client/omnichannel/slaPolicies/SlaEdit.tsx b/apps/meteor/client/omnichannel/slaPolicies/SlaEdit.tsx similarity index 97% rename from apps/meteor/ee/client/omnichannel/slaPolicies/SlaEdit.tsx rename to apps/meteor/client/omnichannel/slaPolicies/SlaEdit.tsx index 83f2c4a36e72..0b4ab02791da 100644 --- a/apps/meteor/ee/client/omnichannel/slaPolicies/SlaEdit.tsx +++ b/apps/meteor/client/omnichannel/slaPolicies/SlaEdit.tsx @@ -6,7 +6,7 @@ import type { ReactElement } from 'react'; import React from 'react'; import { useController, useForm } from 'react-hook-form'; -import { ContextualbarScrollableContent } from '../../../../client/components/Contextualbar'; +import { ContextualbarScrollableContent } from '../../components/Contextualbar'; type SlaEditProps = { isNew?: boolean; diff --git a/apps/meteor/ee/client/omnichannel/slaPolicies/SlaEditWithData.tsx b/apps/meteor/client/omnichannel/slaPolicies/SlaEditWithData.tsx similarity index 92% rename from apps/meteor/ee/client/omnichannel/slaPolicies/SlaEditWithData.tsx rename to apps/meteor/client/omnichannel/slaPolicies/SlaEditWithData.tsx index 8a86255fa86b..079e663f19c4 100644 --- a/apps/meteor/ee/client/omnichannel/slaPolicies/SlaEditWithData.tsx +++ b/apps/meteor/client/omnichannel/slaPolicies/SlaEditWithData.tsx @@ -4,7 +4,7 @@ import { useQuery } from '@tanstack/react-query'; import type { ReactElement } from 'react'; import React from 'react'; -import { FormSkeleton } from '../../../../client/components/Skeleton'; +import { FormSkeleton } from '../../components/Skeleton'; import SlaEdit from './SlaEdit'; type SlaEditProps = { diff --git a/apps/meteor/ee/client/omnichannel/slaPolicies/SlaNew.tsx b/apps/meteor/client/omnichannel/slaPolicies/SlaNew.tsx similarity index 100% rename from apps/meteor/ee/client/omnichannel/slaPolicies/SlaNew.tsx rename to apps/meteor/client/omnichannel/slaPolicies/SlaNew.tsx diff --git a/apps/meteor/ee/client/omnichannel/slaPolicies/SlaPage.tsx b/apps/meteor/client/omnichannel/slaPolicies/SlaPage.tsx similarity index 93% rename from apps/meteor/ee/client/omnichannel/slaPolicies/SlaPage.tsx rename to apps/meteor/client/omnichannel/slaPolicies/SlaPage.tsx index cda40b741868..7cbca605b712 100644 --- a/apps/meteor/ee/client/omnichannel/slaPolicies/SlaPage.tsx +++ b/apps/meteor/client/omnichannel/slaPolicies/SlaPage.tsx @@ -9,8 +9,8 @@ import { ContextualbarHeader, ContextualbarClose, ContextualbarDialog, -} from '../../../../client/components/Contextualbar'; -import { Page, PageHeader, PageContent } from '../../../../client/components/Page'; +} from '../../components/Contextualbar'; +import { Page, PageHeader, PageContent } from '../../components/Page'; import SlaEditWithData from './SlaEditWithData'; import SlaNew from './SlaNew'; import SlaTable from './SlaTable'; diff --git a/apps/meteor/ee/client/omnichannel/slaPolicies/SlaRoute.tsx b/apps/meteor/client/omnichannel/slaPolicies/SlaRoute.tsx similarity index 77% rename from apps/meteor/ee/client/omnichannel/slaPolicies/SlaRoute.tsx rename to apps/meteor/client/omnichannel/slaPolicies/SlaRoute.tsx index 792fae8946d9..081c33fe3260 100644 --- a/apps/meteor/ee/client/omnichannel/slaPolicies/SlaRoute.tsx +++ b/apps/meteor/client/omnichannel/slaPolicies/SlaRoute.tsx @@ -1,7 +1,7 @@ import { usePermission } from '@rocket.chat/ui-contexts'; import React from 'react'; -import NotAuthorizedPage from '../../../../client/views/notAuthorized/NotAuthorizedPage'; +import NotAuthorizedPage from '../../views/notAuthorized/NotAuthorizedPage'; import SlaPage from './SlaPage'; const SlaRoute = () => { diff --git a/apps/meteor/ee/client/omnichannel/slaPolicies/SlaTable.tsx b/apps/meteor/client/omnichannel/slaPolicies/SlaTable.tsx similarity index 91% rename from apps/meteor/ee/client/omnichannel/slaPolicies/SlaTable.tsx rename to apps/meteor/client/omnichannel/slaPolicies/SlaTable.tsx index 0a07f7468f01..d550118a5017 100644 --- a/apps/meteor/ee/client/omnichannel/slaPolicies/SlaTable.tsx +++ b/apps/meteor/client/omnichannel/slaPolicies/SlaTable.tsx @@ -5,8 +5,8 @@ import { useQuery, hashQueryKey } from '@tanstack/react-query'; import type { MutableRefObject } from 'react'; import React, { useMemo, useState, useEffect } from 'react'; -import FilterByText from '../../../../client/components/FilterByText'; -import GenericNoResults from '../../../../client/components/GenericNoResults/GenericNoResults'; +import FilterByText from '../../components/FilterByText'; +import GenericNoResults from '../../components/GenericNoResults/GenericNoResults'; import { GenericTable, GenericTableHeaderCell, @@ -15,9 +15,9 @@ import { GenericTableBody, GenericTableRow, GenericTableCell, -} from '../../../../client/components/GenericTable'; -import { usePagination } from '../../../../client/components/GenericTable/hooks/usePagination'; -import { useSort } from '../../../../client/components/GenericTable/hooks/useSort'; +} from '../../components/GenericTable'; +import { usePagination } from '../../components/GenericTable/hooks/usePagination'; +import { useSort } from '../../components/GenericTable/hooks/useSort'; import RemoveSlaButton from './RemoveSlaButton'; const SlaTable = ({ reload }: { reload: MutableRefObject<() => void> }) => { diff --git a/apps/meteor/ee/client/omnichannel/tags/AutoCompleteTagsMultiple.tsx b/apps/meteor/client/omnichannel/tags/AutoCompleteTagsMultiple.tsx similarity index 92% rename from apps/meteor/ee/client/omnichannel/tags/AutoCompleteTagsMultiple.tsx rename to apps/meteor/client/omnichannel/tags/AutoCompleteTagsMultiple.tsx index f0baca991e2e..9f0a21086868 100644 --- a/apps/meteor/ee/client/omnichannel/tags/AutoCompleteTagsMultiple.tsx +++ b/apps/meteor/client/omnichannel/tags/AutoCompleteTagsMultiple.tsx @@ -4,8 +4,8 @@ import { useDebouncedValue } from '@rocket.chat/fuselage-hooks'; import { useTranslation } from '@rocket.chat/ui-contexts'; import React, { memo, useMemo, useState } from 'react'; -import { useRecordList } from '../../../../client/hooks/lists/useRecordList'; -import { AsyncStatePhase } from '../../../../client/hooks/useAsyncState'; +import { useRecordList } from '../../hooks/lists/useRecordList'; +import { AsyncStatePhase } from '../../hooks/useAsyncState'; import { useTagsList } from '../../hooks/useTagsList'; type AutoCompleteTagsMultipleProps = { diff --git a/apps/meteor/ee/client/omnichannel/tags/TagEdit.tsx b/apps/meteor/client/omnichannel/tags/TagEdit.tsx similarity index 96% rename from apps/meteor/ee/client/omnichannel/tags/TagEdit.tsx rename to apps/meteor/client/omnichannel/tags/TagEdit.tsx index cd423c60b4bf..767b56e91675 100644 --- a/apps/meteor/ee/client/omnichannel/tags/TagEdit.tsx +++ b/apps/meteor/client/omnichannel/tags/TagEdit.tsx @@ -6,7 +6,7 @@ import { useQueryClient } from '@tanstack/react-query'; import React from 'react'; import { useForm, Controller } from 'react-hook-form'; -import AutoCompleteDepartmentMultiple from '../../../../client/components/AutoCompleteDepartmentMultiple'; +import AutoCompleteDepartmentMultiple from '../../components/AutoCompleteDepartmentMultiple'; import { ContextualbarScrollableContent, ContextualbarFooter, @@ -14,7 +14,7 @@ import { Contextualbar, ContextualbarHeader, ContextualbarClose, -} from '../../../../client/components/Contextualbar'; +} from '../../components/Contextualbar'; import { useRemoveTag } from './useRemoveTag'; type TagEditPayload = { diff --git a/apps/meteor/ee/client/omnichannel/tags/TagEditWithData.tsx b/apps/meteor/client/omnichannel/tags/TagEditWithData.tsx similarity index 92% rename from apps/meteor/ee/client/omnichannel/tags/TagEditWithData.tsx rename to apps/meteor/client/omnichannel/tags/TagEditWithData.tsx index 95a902055ed6..ae9a3259af4a 100644 --- a/apps/meteor/ee/client/omnichannel/tags/TagEditWithData.tsx +++ b/apps/meteor/client/omnichannel/tags/TagEditWithData.tsx @@ -4,7 +4,7 @@ import { useEndpoint, useTranslation } from '@rocket.chat/ui-contexts'; import { useQuery } from '@tanstack/react-query'; import React from 'react'; -import { ContextualbarSkeleton } from '../../../../client/components/Contextualbar'; +import { ContextualbarSkeleton } from '../../components/Contextualbar'; import TagEdit from './TagEdit'; import TagEditWithDepartmentData from './TagEditWithDepartmentData'; diff --git a/apps/meteor/ee/client/omnichannel/tags/TagEditWithDepartmentData.tsx b/apps/meteor/client/omnichannel/tags/TagEditWithDepartmentData.tsx similarity index 92% rename from apps/meteor/ee/client/omnichannel/tags/TagEditWithDepartmentData.tsx rename to apps/meteor/client/omnichannel/tags/TagEditWithDepartmentData.tsx index 4a65c31263c2..ce4707417d1e 100644 --- a/apps/meteor/ee/client/omnichannel/tags/TagEditWithDepartmentData.tsx +++ b/apps/meteor/client/omnichannel/tags/TagEditWithDepartmentData.tsx @@ -4,7 +4,7 @@ import { useTranslation, useEndpoint } from '@rocket.chat/ui-contexts'; import { useQuery } from '@tanstack/react-query'; import React from 'react'; -import { ContextualbarSkeleton } from '../../../../client/components/Contextualbar'; +import { ContextualbarSkeleton } from '../../components/Contextualbar'; import TagEdit from './TagEdit'; const TagEditWithDepartmentData = ({ tagData }: { tagData: ILivechatTag }) => { diff --git a/apps/meteor/ee/client/omnichannel/tags/TagsPage.tsx b/apps/meteor/client/omnichannel/tags/TagsPage.tsx similarity index 85% rename from apps/meteor/ee/client/omnichannel/tags/TagsPage.tsx rename to apps/meteor/client/omnichannel/tags/TagsPage.tsx index 63934c95e945..add1c64531d9 100644 --- a/apps/meteor/ee/client/omnichannel/tags/TagsPage.tsx +++ b/apps/meteor/client/omnichannel/tags/TagsPage.tsx @@ -2,8 +2,8 @@ import { Button, ButtonGroup } from '@rocket.chat/fuselage'; import { useRouter, useTranslation, useRouteParameter } from '@rocket.chat/ui-contexts'; import React from 'react'; -import { ContextualbarDialog } from '../../../../client/components/Contextualbar'; -import { Page, PageHeader, PageContent } from '../../../../client/components/Page'; +import { ContextualbarDialog } from '../../components/Contextualbar'; +import { Page, PageHeader, PageContent } from '../../components/Page'; import TagEdit from './TagEdit'; import TagEditWithData from './TagEditWithData'; import TagsTable from './TagsTable'; diff --git a/apps/meteor/ee/client/omnichannel/tags/TagsRoute.tsx b/apps/meteor/client/omnichannel/tags/TagsRoute.tsx similarity index 77% rename from apps/meteor/ee/client/omnichannel/tags/TagsRoute.tsx rename to apps/meteor/client/omnichannel/tags/TagsRoute.tsx index 4860b0aeab54..11f3e4348a0b 100644 --- a/apps/meteor/ee/client/omnichannel/tags/TagsRoute.tsx +++ b/apps/meteor/client/omnichannel/tags/TagsRoute.tsx @@ -1,7 +1,7 @@ import { usePermission } from '@rocket.chat/ui-contexts'; import React from 'react'; -import NotAuthorizedPage from '../../../../client/views/notAuthorized/NotAuthorizedPage'; +import NotAuthorizedPage from '../../views/notAuthorized/NotAuthorizedPage'; import TagsPage from './TagsPage'; const TagsRoute = () => { diff --git a/apps/meteor/ee/client/omnichannel/tags/TagsTable.tsx b/apps/meteor/client/omnichannel/tags/TagsTable.tsx similarity index 91% rename from apps/meteor/ee/client/omnichannel/tags/TagsTable.tsx rename to apps/meteor/client/omnichannel/tags/TagsTable.tsx index ce89fe2d764b..3b9757134bed 100644 --- a/apps/meteor/ee/client/omnichannel/tags/TagsTable.tsx +++ b/apps/meteor/client/omnichannel/tags/TagsTable.tsx @@ -4,8 +4,8 @@ import { useTranslation, useEndpoint, useRouter } from '@rocket.chat/ui-contexts import { useQuery, hashQueryKey } from '@tanstack/react-query'; import React, { useMemo, useState } from 'react'; -import FilterByText from '../../../../client/components/FilterByText'; -import GenericNoResults from '../../../../client/components/GenericNoResults'; +import FilterByText from '../../components/FilterByText'; +import GenericNoResults from '../../components/GenericNoResults'; import { GenericTable, GenericTableRow, @@ -14,9 +14,9 @@ import { GenericTableHeaderCell, GenericTableBody, GenericTableLoadingRow, -} from '../../../../client/components/GenericTable'; -import { usePagination } from '../../../../client/components/GenericTable/hooks/usePagination'; -import { useSort } from '../../../../client/components/GenericTable/hooks/useSort'; +} from '../../components/GenericTable'; +import { usePagination } from '../../components/GenericTable/hooks/usePagination'; +import { useSort } from '../../components/GenericTable/hooks/useSort'; import { useRemoveTag } from './useRemoveTag'; const TagsTable = () => { diff --git a/apps/meteor/ee/client/omnichannel/tags/useRemoveTag.tsx b/apps/meteor/client/omnichannel/tags/useRemoveTag.tsx similarity index 94% rename from apps/meteor/ee/client/omnichannel/tags/useRemoveTag.tsx rename to apps/meteor/client/omnichannel/tags/useRemoveTag.tsx index d1a5c6096890..31c3a910c7ea 100644 --- a/apps/meteor/ee/client/omnichannel/tags/useRemoveTag.tsx +++ b/apps/meteor/client/omnichannel/tags/useRemoveTag.tsx @@ -3,7 +3,7 @@ import { useSetModal, useToastMessageDispatch, useRouter, useMethod, useTranslat import { useQueryClient } from '@tanstack/react-query'; import React from 'react'; -import GenericModal from '../../../../client/components/GenericModal'; +import GenericModal from '../../components/GenericModal'; export const useRemoveTag = () => { const t = useTranslation(); diff --git a/apps/meteor/ee/client/omnichannel/units/UnitEdit.tsx b/apps/meteor/client/omnichannel/units/UnitEdit.tsx similarity index 96% rename from apps/meteor/ee/client/omnichannel/units/UnitEdit.tsx rename to apps/meteor/client/omnichannel/units/UnitEdit.tsx index b618d2eac89e..e4bc1c0efb50 100644 --- a/apps/meteor/ee/client/omnichannel/units/UnitEdit.tsx +++ b/apps/meteor/client/omnichannel/units/UnitEdit.tsx @@ -27,11 +27,11 @@ import { Contextualbar, ContextualbarHeader, ContextualbarClose, -} from '../../../../client/components/Contextualbar'; -import { useRecordList } from '../../../../client/hooks/lists/useRecordList'; -import { AsyncStatePhase } from '../../../../client/hooks/useAsyncState'; -import { useDepartmentsByUnitsList } from '../../../../client/views/hooks/useDepartmentsByUnitsList'; -import { useMonitorsList } from '../../../../client/views/hooks/useMonitorsList'; +} from '../../components/Contextualbar'; +import { useRecordList } from '../../hooks/lists/useRecordList'; +import { AsyncStatePhase } from '../../hooks/useAsyncState'; +import { useDepartmentsByUnitsList } from '../../views/hooks/useDepartmentsByUnitsList'; +import { useMonitorsList } from '../../views/hooks/useMonitorsList'; import { useRemoveUnit } from './useRemoveUnit'; type UnitEditProps = { diff --git a/apps/meteor/ee/client/omnichannel/units/UnitEditWithData.tsx b/apps/meteor/client/omnichannel/units/UnitEditWithData.tsx similarity index 95% rename from apps/meteor/ee/client/omnichannel/units/UnitEditWithData.tsx rename to apps/meteor/client/omnichannel/units/UnitEditWithData.tsx index 6f30453f62dc..127c81c30032 100644 --- a/apps/meteor/ee/client/omnichannel/units/UnitEditWithData.tsx +++ b/apps/meteor/client/omnichannel/units/UnitEditWithData.tsx @@ -4,7 +4,7 @@ import { useEndpoint, useTranslation } from '@rocket.chat/ui-contexts'; import { useQuery } from '@tanstack/react-query'; import React from 'react'; -import { ContextualbarSkeleton } from '../../../../client/components/Contextualbar'; +import { ContextualbarSkeleton } from '../../components/Contextualbar'; import UnitEdit from './UnitEdit'; const UnitEditWithData = ({ unitId }: { unitId: IOmnichannelBusinessUnit['_id'] }) => { diff --git a/apps/meteor/ee/client/omnichannel/units/UnitsPage.tsx b/apps/meteor/client/omnichannel/units/UnitsPage.tsx similarity index 86% rename from apps/meteor/ee/client/omnichannel/units/UnitsPage.tsx rename to apps/meteor/client/omnichannel/units/UnitsPage.tsx index b3d900830e2f..190c22991fb5 100644 --- a/apps/meteor/ee/client/omnichannel/units/UnitsPage.tsx +++ b/apps/meteor/client/omnichannel/units/UnitsPage.tsx @@ -2,8 +2,8 @@ import { Button, ButtonGroup } from '@rocket.chat/fuselage'; import { useTranslation, useRouteParameter, useRouter } from '@rocket.chat/ui-contexts'; import React from 'react'; -import { ContextualbarDialog } from '../../../../client/components/Contextualbar'; -import { Page, PageHeader, PageContent } from '../../../../client/components/Page'; +import { ContextualbarDialog } from '../../components/Contextualbar'; +import { Page, PageHeader, PageContent } from '../../components/Page'; import UnitEdit from './UnitEdit'; import UnitEditWithData from './UnitEditWithData'; import UnitsTable from './UnitsTable'; diff --git a/apps/meteor/ee/client/omnichannel/units/UnitsRoute.tsx b/apps/meteor/client/omnichannel/units/UnitsRoute.tsx similarity index 84% rename from apps/meteor/ee/client/omnichannel/units/UnitsRoute.tsx rename to apps/meteor/client/omnichannel/units/UnitsRoute.tsx index 9afa82c171be..9490fd2d2048 100644 --- a/apps/meteor/ee/client/omnichannel/units/UnitsRoute.tsx +++ b/apps/meteor/client/omnichannel/units/UnitsRoute.tsx @@ -1,8 +1,8 @@ import { usePermission } from '@rocket.chat/ui-contexts'; import React from 'react'; -import NotAuthorizedPage from '../../../../client/views/notAuthorized/NotAuthorizedPage'; import { useHasLicenseModule } from '../../hooks/useHasLicenseModule'; +import NotAuthorizedPage from '../../views/notAuthorized/NotAuthorizedPage'; import UnitsPage from './UnitsPage'; const UnitsRoute = () => { diff --git a/apps/meteor/ee/client/omnichannel/units/UnitsTable.tsx b/apps/meteor/client/omnichannel/units/UnitsTable.tsx similarity index 91% rename from apps/meteor/ee/client/omnichannel/units/UnitsTable.tsx rename to apps/meteor/client/omnichannel/units/UnitsTable.tsx index c88fb4ce4c67..fe95bc90d8a2 100644 --- a/apps/meteor/ee/client/omnichannel/units/UnitsTable.tsx +++ b/apps/meteor/client/omnichannel/units/UnitsTable.tsx @@ -4,8 +4,8 @@ import { useEndpoint, useRouter, useTranslation } from '@rocket.chat/ui-contexts import { useQuery, hashQueryKey } from '@tanstack/react-query'; import React, { useMemo, useState } from 'react'; -import FilterByText from '../../../../client/components/FilterByText'; -import GenericNoResults from '../../../../client/components/GenericNoResults/GenericNoResults'; +import FilterByText from '../../components/FilterByText'; +import GenericNoResults from '../../components/GenericNoResults/GenericNoResults'; import { GenericTable, GenericTableHeader, @@ -14,9 +14,9 @@ import { GenericTableCell, GenericTableLoadingRow, GenericTableRow, -} from '../../../../client/components/GenericTable'; -import { usePagination } from '../../../../client/components/GenericTable/hooks/usePagination'; -import { useSort } from '../../../../client/components/GenericTable/hooks/useSort'; +} from '../../components/GenericTable'; +import { usePagination } from '../../components/GenericTable/hooks/usePagination'; +import { useSort } from '../../components/GenericTable/hooks/useSort'; import { useRemoveUnit } from './useRemoveUnit'; const UnitsTable = () => { diff --git a/apps/meteor/ee/client/omnichannel/units/useRemoveUnit.tsx b/apps/meteor/client/omnichannel/units/useRemoveUnit.tsx similarity index 94% rename from apps/meteor/ee/client/omnichannel/units/useRemoveUnit.tsx rename to apps/meteor/client/omnichannel/units/useRemoveUnit.tsx index 61910dc37bc4..48eca28eb833 100644 --- a/apps/meteor/ee/client/omnichannel/units/useRemoveUnit.tsx +++ b/apps/meteor/client/omnichannel/units/useRemoveUnit.tsx @@ -3,7 +3,7 @@ import { useSetModal, useToastMessageDispatch, useMethod, useTranslation, useRou import { useQueryClient } from '@tanstack/react-query'; import React from 'react'; -import GenericModal from '../../../../client/components/GenericModal'; +import GenericModal from '../../components/GenericModal'; export const useRemoveUnit = () => { const t = useTranslation(); diff --git a/apps/meteor/client/providers/AppsProvider.tsx b/apps/meteor/client/providers/AppsProvider.tsx index e521a05cafdc..905302b7ce4d 100644 --- a/apps/meteor/client/providers/AppsProvider.tsx +++ b/apps/meteor/client/providers/AppsProvider.tsx @@ -4,7 +4,7 @@ import { useQuery, useQueryClient } from '@tanstack/react-query'; import type { ReactNode } from 'react'; import React, { useEffect } from 'react'; -import { AppClientOrchestratorInstance } from '../../ee/client/apps/orchestrator'; +import { AppClientOrchestratorInstance } from '../apps/orchestrator'; import { AppsContext } from '../contexts/AppsContext'; import { useIsEnterprise } from '../hooks/useIsEnterprise'; import { useInvalidateLicense } from '../hooks/useLicense'; diff --git a/apps/meteor/client/providers/CallProvider/CallProvider.tsx b/apps/meteor/client/providers/CallProvider/CallProvider.tsx index 0ede8072d8bc..38b7c12791cd 100644 --- a/apps/meteor/client/providers/CallProvider/CallProvider.tsx +++ b/apps/meteor/client/providers/CallProvider/CallProvider.tsx @@ -28,14 +28,14 @@ import React, { useMemo, useRef, useCallback, useEffect, useState } from 'react' import { createPortal } from 'react-dom'; import type { OutgoingByeRequest } from 'sip.js/lib/core'; -import { isOutboundClient, useVoipClient } from '../../../ee/client/hooks/useVoipClient'; -import { WrapUpCallModal } from '../../../ee/client/voip/components/modals/WrapUpCallModal'; import type { CallContextValue } from '../../contexts/CallContext'; import { CallContext, useIsVoipEnterprise } from '../../contexts/CallContext'; import { useDialModal } from '../../hooks/useDialModal'; +import { isOutboundClient, useVoipClient } from '../../hooks/useVoipClient'; import { roomCoordinator } from '../../lib/rooms/roomCoordinator'; import type { QueueAggregator } from '../../lib/voip/QueueAggregator'; import { parseOutboundPhoneNumber } from '../../lib/voip/parseOutboundPhoneNumber'; +import { WrapUpCallModal } from '../../voip/components/modals/WrapUpCallModal'; import { useVoipSounds } from './hooks/useVoipSounds'; type NetworkState = 'online' | 'offline'; diff --git a/apps/meteor/client/providers/OmnichannelProvider.tsx b/apps/meteor/client/providers/OmnichannelProvider.tsx index 47ccb3d39c88..881275e2fc2b 100644 --- a/apps/meteor/client/providers/OmnichannelProvider.tsx +++ b/apps/meteor/client/providers/OmnichannelProvider.tsx @@ -14,10 +14,10 @@ import { LivechatInquiry } from '../../app/livechat/client/collections/LivechatI import { initializeLivechatInquiryStream } from '../../app/livechat/client/lib/stream/queueManager'; import { getOmniChatSortQuery } from '../../app/livechat/lib/inquiries'; import { KonchatNotification } from '../../app/ui/client/lib/KonchatNotification'; -import { useHasLicenseModule } from '../../ee/client/hooks/useHasLicenseModule'; import { ClientLogger } from '../../lib/ClientLogger'; import type { OmnichannelContextValue } from '../contexts/OmnichannelContext'; import { OmnichannelContext } from '../contexts/OmnichannelContext'; +import { useHasLicenseModule } from '../hooks/useHasLicenseModule'; import { useReactiveValue } from '../hooks/useReactiveValue'; import { useShouldPreventAction } from '../hooks/useShouldPreventAction'; diff --git a/apps/meteor/client/providers/TranslationProvider.tsx b/apps/meteor/client/providers/TranslationProvider.tsx index 2f31d282a63b..0c0ef00b5ac0 100644 --- a/apps/meteor/client/providers/TranslationProvider.tsx +++ b/apps/meteor/client/providers/TranslationProvider.tsx @@ -22,7 +22,7 @@ import { defaultTranslationNamespace, extractTranslationNamespaces, } from '../../app/utils/lib/i18n'; -import { AppClientOrchestratorInstance } from '../../ee/client/apps/orchestrator'; +import { AppClientOrchestratorInstance } from '../apps/orchestrator'; import { isRTLScriptLanguage } from '../lib/utils/isRTLScriptLanguage'; i18n.use(I18NextHttpBackend).use(initReactI18next); diff --git a/apps/meteor/client/sidebar/RoomList/SideBarItemTemplateWithData.tsx b/apps/meteor/client/sidebar/RoomList/SideBarItemTemplateWithData.tsx index 4c51b8a3615b..f9ec077e9e43 100644 --- a/apps/meteor/client/sidebar/RoomList/SideBarItemTemplateWithData.tsx +++ b/apps/meteor/client/sidebar/RoomList/SideBarItemTemplateWithData.tsx @@ -6,9 +6,9 @@ import { useLayout } from '@rocket.chat/ui-contexts'; import type { AllHTMLAttributes, ComponentType, ReactElement, ReactNode } from 'react'; import React, { memo, useMemo } from 'react'; -import { useOmnichannelPriorities } from '../../../ee/client/omnichannel/hooks/useOmnichannelPriorities'; import { RoomIcon } from '../../components/RoomIcon'; import { roomCoordinator } from '../../lib/rooms/roomCoordinator'; +import { useOmnichannelPriorities } from '../../omnichannel/hooks/useOmnichannelPriorities'; import RoomMenu from '../RoomMenu'; import { OmnichannelBadges } from '../badges/OmnichannelBadges'; import type { useAvatarTemplate } from '../hooks/useAvatarTemplate'; diff --git a/apps/meteor/client/sidebar/RoomMenu.tsx b/apps/meteor/client/sidebar/RoomMenu.tsx index da9908b3ed5f..8df55bd5d359 100644 --- a/apps/meteor/client/sidebar/RoomMenu.tsx +++ b/apps/meteor/client/sidebar/RoomMenu.tsx @@ -18,11 +18,11 @@ import React, { memo, useMemo } from 'react'; import { LegacyRoomManager } from '../../app/ui-utils/client'; import { UiTextContext } from '../../definition/IRoomTypeConfig'; -import { useOmnichannelPrioritiesMenu } from '../../ee/client/omnichannel/hooks/useOmnichannelPrioritiesMenu'; import { GenericModalDoNotAskAgain } from '../components/GenericModal'; import WarningModal from '../components/WarningModal'; import { useDontAskAgain } from '../hooks/useDontAskAgain'; import { roomCoordinator } from '../lib/rooms/roomCoordinator'; +import { useOmnichannelPrioritiesMenu } from '../omnichannel/hooks/useOmnichannelPrioritiesMenu'; const fields: Fields = { f: true, diff --git a/apps/meteor/client/sidebar/badges/OmnichannelBadges.tsx b/apps/meteor/client/sidebar/badges/OmnichannelBadges.tsx index 32fff81d7bb3..9f2580b74b77 100644 --- a/apps/meteor/client/sidebar/badges/OmnichannelBadges.tsx +++ b/apps/meteor/client/sidebar/badges/OmnichannelBadges.tsx @@ -2,9 +2,9 @@ import type { IRoom, ISubscription } from '@rocket.chat/core-typings'; import { isOmnichannelRoom } from '@rocket.chat/core-typings'; import React from 'react'; -import { RoomActivityIcon } from '../../../ee/client/omnichannel/components/RoomActivityIcon'; -import { useOmnichannelPriorities } from '../../../ee/client/omnichannel/hooks/useOmnichannelPriorities'; -import { PriorityIcon } from '../../../ee/client/omnichannel/priorities/PriorityIcon'; +import { RoomActivityIcon } from '../../omnichannel/components/RoomActivityIcon'; +import { useOmnichannelPriorities } from '../../omnichannel/hooks/useOmnichannelPriorities'; +import { PriorityIcon } from '../../omnichannel/priorities/PriorityIcon'; export const OmnichannelBadges = ({ room }: { room: ISubscription & IRoom }) => { const { enabled: isPriorityEnabled } = useOmnichannelPriorities(); diff --git a/apps/meteor/client/sidebar/footer/SidebarFooterDefault.tsx b/apps/meteor/client/sidebar/footer/SidebarFooterDefault.tsx index 7ecc7b8ab96d..fbf987fa78af 100644 --- a/apps/meteor/client/sidebar/footer/SidebarFooterDefault.tsx +++ b/apps/meteor/client/sidebar/footer/SidebarFooterDefault.tsx @@ -5,7 +5,7 @@ import { useThemeMode } from '@rocket.chat/ui-theming/src/hooks/useThemeMode'; import type { ReactElement } from 'react'; import React from 'react'; -import { SidebarFooterWatermark } from '../../../ee/client/sidebar/footer/SidebarFooterWatermark'; +import { SidebarFooterWatermark } from './SidebarFooterWatermark'; const SidebarFooterDefault = (): ReactElement => { const [, , theme] = useThemeMode(); diff --git a/apps/meteor/ee/client/sidebar/footer/SidebarFooterWatermark.tsx b/apps/meteor/client/sidebar/footer/SidebarFooterWatermark.tsx similarity index 91% rename from apps/meteor/ee/client/sidebar/footer/SidebarFooterWatermark.tsx rename to apps/meteor/client/sidebar/footer/SidebarFooterWatermark.tsx index 88b872ed46a3..bf7736b5899a 100644 --- a/apps/meteor/ee/client/sidebar/footer/SidebarFooterWatermark.tsx +++ b/apps/meteor/client/sidebar/footer/SidebarFooterWatermark.tsx @@ -3,7 +3,7 @@ import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React from 'react'; -import { useLicense, useLicenseName } from '../../../../client/hooks/useLicense'; +import { useLicense, useLicenseName } from '../../hooks/useLicense'; export const SidebarFooterWatermark = (): ReactElement | null => { const t = useTranslation(); diff --git a/apps/meteor/client/sidebar/footer/voip/VoipFooter.tsx b/apps/meteor/client/sidebar/footer/voip/VoipFooter.tsx index 0b5ef3418e01..119476ecd89a 100644 --- a/apps/meteor/client/sidebar/footer/voip/VoipFooter.tsx +++ b/apps/meteor/client/sidebar/footer/voip/VoipFooter.tsx @@ -6,8 +6,8 @@ import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement, MouseEvent, ReactNode } from 'react'; import React from 'react'; -import type { VoipFooterMenuOptions } from '../../../../ee/client/hooks/useVoipFooterMenu'; import type { CallActionsType } from '../../../contexts/CallContext'; +import type { VoipFooterMenuOptions } from '../../../hooks/useVoipFooterMenu'; import { useOmnichannelContactLabel } from './hooks/useOmnichannelContactLabel'; type VoipFooterPropsType = { diff --git a/apps/meteor/client/sidebar/footer/voip/index.tsx b/apps/meteor/client/sidebar/footer/voip/index.tsx index 9ae7d91c7c2b..9f353628c982 100644 --- a/apps/meteor/client/sidebar/footer/voip/index.tsx +++ b/apps/meteor/client/sidebar/footer/voip/index.tsx @@ -3,7 +3,6 @@ import { useEndpoint, useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React, { useCallback, useState } from 'react'; -import { useVoipFooterMenu } from '../../../../ee/client/hooks/useVoipFooterMenu'; import { useCallActions, useCallCreateRoom, @@ -14,6 +13,7 @@ import { useQueueCounter, useQueueName, } from '../../../contexts/CallContext'; +import { useVoipFooterMenu } from '../../../hooks/useVoipFooterMenu'; import SidebarFooterDefault from '../SidebarFooterDefault'; import { VoipFooter as VoipFooterComponent } from './VoipFooter'; diff --git a/apps/meteor/client/sidebar/header/CreateChannel/CreateChannelModal.tsx b/apps/meteor/client/sidebar/header/CreateChannel/CreateChannelModal.tsx index 5738798f194e..818bb689d778 100644 --- a/apps/meteor/client/sidebar/header/CreateChannel/CreateChannelModal.tsx +++ b/apps/meteor/client/sidebar/header/CreateChannel/CreateChannelModal.tsx @@ -27,8 +27,8 @@ import type { ComponentProps, ReactElement } from 'react'; import React, { useEffect, useMemo } from 'react'; import { useForm, Controller } from 'react-hook-form'; -import { useHasLicenseModule } from '../../../../ee/client/hooks/useHasLicenseModule'; import UserAutoCompleteMultipleFederated from '../../../components/UserAutoCompleteMultiple/UserAutoCompleteMultipleFederated'; +import { useHasLicenseModule } from '../../../hooks/useHasLicenseModule'; import { goToRoomById } from '../../../lib/utils/goToRoomById'; import { useEncryptedRoomDescription } from '../hooks/useEncryptedRoomDescription'; diff --git a/apps/meteor/client/sidebar/header/actions/hooks/useAuditItems.tsx b/apps/meteor/client/sidebar/header/actions/hooks/useAuditItems.tsx index f506255806bf..8e2640711347 100644 --- a/apps/meteor/client/sidebar/header/actions/hooks/useAuditItems.tsx +++ b/apps/meteor/client/sidebar/header/actions/hooks/useAuditItems.tsx @@ -1,7 +1,7 @@ import { useTranslation, useRoute, usePermission } from '@rocket.chat/ui-contexts'; -import { useHasLicenseModule } from '../../../../../ee/client/hooks/useHasLicenseModule'; import type { GenericMenuItemProps } from '../../../../components/GenericMenu/GenericMenuItem'; +import { useHasLicenseModule } from '../../../../hooks/useHasLicenseModule'; /** * @deprecated Feature preview diff --git a/apps/meteor/ee/client/startup/audit.tsx b/apps/meteor/client/startup/audit.tsx similarity index 79% rename from apps/meteor/ee/client/startup/audit.tsx rename to apps/meteor/client/startup/audit.tsx index 0f1e8b59ec25..99dfff9db3c1 100644 --- a/apps/meteor/ee/client/startup/audit.tsx +++ b/apps/meteor/client/startup/audit.tsx @@ -1,11 +1,11 @@ import React, { lazy } from 'react'; -import { hasAllPermission } from '../../../app/authorization/client'; -import { appLayout } from '../../../client/lib/appLayout'; -import { router } from '../../../client/providers/RouterProvider'; -import NotAuthorizedPage from '../../../client/views/notAuthorized/NotAuthorizedPage'; -import MainLayout from '../../../client/views/root/MainLayout'; +import { hasAllPermission } from '../../app/authorization/client'; +import { appLayout } from '../lib/appLayout'; import { onToggledFeature } from '../lib/onToggledFeature'; +import { router } from '../providers/RouterProvider'; +import NotAuthorizedPage from '../views/notAuthorized/NotAuthorizedPage'; +import MainLayout from '../views/root/MainLayout'; const AuditPage = lazy(() => import('../views/audit/AuditPage')); const AuditLogPage = lazy(() => import('../views/audit/AuditLogPage')); diff --git a/apps/meteor/ee/client/startup/deviceManagement.ts b/apps/meteor/client/startup/deviceManagement.ts similarity index 93% rename from apps/meteor/ee/client/startup/deviceManagement.ts rename to apps/meteor/client/startup/deviceManagement.ts index 3c22aa14384b..f34a9796c304 100644 --- a/apps/meteor/ee/client/startup/deviceManagement.ts +++ b/apps/meteor/client/startup/deviceManagement.ts @@ -1,7 +1,7 @@ import { lazy } from 'react'; -import { registerAccountRoute, registerAccountSidebarItem, unregisterSidebarItem } from '../../../client/views/account'; import { onToggledFeature } from '../lib/onToggledFeature'; +import { registerAccountRoute, registerAccountSidebarItem, unregisterSidebarItem } from '../views/account'; declare module '@rocket.chat/ui-contexts' { interface IRouterPaths { diff --git a/apps/meteor/client/startup/index.ts b/apps/meteor/client/startup/index.ts index bf6814617e4a..e2264d795415 100644 --- a/apps/meteor/client/startup/index.ts +++ b/apps/meteor/client/startup/index.ts @@ -3,9 +3,11 @@ import './absoluteUrl'; import './actionButtons'; import './afterLogoutCleanUp'; import './appRoot'; +import './audit'; import './callbacks'; import './collections'; import './customOAuth'; +import './deviceManagement'; import './e2e'; import './forceLogout'; import './iframeCommands'; @@ -16,6 +18,7 @@ import './messageObserve'; import './messageTypes'; import './notifications'; import './otr'; +import './readReceipt'; import './reloadRoomAfterLogin'; import './roles'; import './rootUrlChange'; diff --git a/apps/meteor/ee/client/startup/readReceipt.ts b/apps/meteor/client/startup/readReceipt.ts similarity index 70% rename from apps/meteor/ee/client/startup/readReceipt.ts rename to apps/meteor/client/startup/readReceipt.ts index eb23aa5fd883..7caa9bf02b66 100644 --- a/apps/meteor/ee/client/startup/readReceipt.ts +++ b/apps/meteor/client/startup/readReceipt.ts @@ -1,11 +1,11 @@ import { Meteor } from 'meteor/meteor'; import { Tracker } from 'meteor/tracker'; -import { settings } from '../../../app/settings/client'; -import { MessageAction } from '../../../app/ui-utils/client'; -import { imperativeModal } from '../../../client/lib/imperativeModal'; -import { messageArgs } from '../../../client/lib/utils/messageArgs'; -import ReadReceiptsModal from '../../../client/views/room/modals/ReadReceiptsModal'; +import { settings } from '../../app/settings/client'; +import { MessageAction } from '../../app/ui-utils/client'; +import { imperativeModal } from '../lib/imperativeModal'; +import { messageArgs } from '../lib/utils/messageArgs'; +import ReadReceiptsModal from '../views/room/modals/ReadReceiptsModal'; Meteor.startup(() => { Tracker.autorun(() => { diff --git a/apps/meteor/client/ui.ts b/apps/meteor/client/ui.ts index 5dd438129c9a..98d3233134a5 100644 --- a/apps/meteor/client/ui.ts +++ b/apps/meteor/client/ui.ts @@ -1,12 +1,11 @@ -import { useOnHoldChatQuickAction } from '../ee/client/hooks/quickActions/useOnHoldChatQuickAction'; -import { useCallsRoomAction } from '../ee/client/hooks/roomActions/useCallsRoomAction'; -import { useCannedResponsesRoomAction } from '../ee/client/hooks/roomActions/useCannedResponsesRoomAction'; -import { useGameCenterRoomAction } from '../ee/client/hooks/roomActions/useGameCenterRoomAction'; import { useChatForwardQuickAction } from './hooks/quickActions/useChatForwardQuickAction'; import { useCloseChatQuickAction } from './hooks/quickActions/useCloseChatQuickAction'; import { useMoveQueueQuickAction } from './hooks/quickActions/useMoveQueueQuickAction'; +import { useOnHoldChatQuickAction } from './hooks/quickActions/useOnHoldChatQuickAction'; import { useTranscriptQuickAction } from './hooks/quickActions/useTranscriptQuickAction'; import { useAutotranslateRoomAction } from './hooks/roomActions/useAutotranslateRoomAction'; +import { useCallsRoomAction } from './hooks/roomActions/useCallsRoomAction'; +import { useCannedResponsesRoomAction } from './hooks/roomActions/useCannedResponsesRoomAction'; import { useChannelSettingsRoomAction } from './hooks/roomActions/useChannelSettingsRoomAction'; import { useCleanHistoryRoomAction } from './hooks/roomActions/useCleanHistoryRoomAction'; import { useContactChatHistoryRoomAction } from './hooks/roomActions/useContactChatHistoryRoomAction'; @@ -14,6 +13,7 @@ import { useContactProfileRoomAction } from './hooks/roomActions/useContactProfi import { useDiscussionsRoomAction } from './hooks/roomActions/useDiscussionsRoomAction'; import { useE2EERoomAction } from './hooks/roomActions/useE2EERoomAction'; import { useExportMessagesRoomAction } from './hooks/roomActions/useExportMessagesRoomAction'; +import { useGameCenterRoomAction } from './hooks/roomActions/useGameCenterRoomAction'; import { useKeyboardShortcutListRoomAction } from './hooks/roomActions/useKeyboardShortcutListRoomAction'; import { useMembersListRoomAction } from './hooks/roomActions/useMembersListRoomAction'; import { useMentionsRoomAction } from './hooks/roomActions/useMentionsRoomAction'; diff --git a/apps/meteor/ee/client/views/account/deviceManagement/DeviceManagementAccountPage.tsx b/apps/meteor/client/views/account/deviceManagement/DeviceManagementAccountPage.tsx similarity index 85% rename from apps/meteor/ee/client/views/account/deviceManagement/DeviceManagementAccountPage.tsx rename to apps/meteor/client/views/account/deviceManagement/DeviceManagementAccountPage.tsx index 13722be69c69..30979e2a81d8 100644 --- a/apps/meteor/ee/client/views/account/deviceManagement/DeviceManagementAccountPage.tsx +++ b/apps/meteor/client/views/account/deviceManagement/DeviceManagementAccountPage.tsx @@ -2,7 +2,7 @@ import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React from 'react'; -import { Page, PageHeader, PageContent } from '../../../../../client/components/Page'; +import { Page, PageHeader, PageContent } from '../../../components/Page'; import DeviceManagementAccountTable from './DeviceManagementAccountTable'; const DeviceManagementAccountPage = (): ReactElement => { diff --git a/apps/meteor/ee/client/views/account/deviceManagement/DeviceManagementAccountTable/DeviceManagementAccountRow.tsx b/apps/meteor/client/views/account/deviceManagement/DeviceManagementAccountTable/DeviceManagementAccountRow.tsx similarity index 89% rename from apps/meteor/ee/client/views/account/deviceManagement/DeviceManagementAccountTable/DeviceManagementAccountRow.tsx rename to apps/meteor/client/views/account/deviceManagement/DeviceManagementAccountTable/DeviceManagementAccountRow.tsx index 616b941de2a8..e2532d0c6623 100644 --- a/apps/meteor/ee/client/views/account/deviceManagement/DeviceManagementAccountTable/DeviceManagementAccountRow.tsx +++ b/apps/meteor/client/views/account/deviceManagement/DeviceManagementAccountTable/DeviceManagementAccountRow.tsx @@ -4,10 +4,10 @@ import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React from 'react'; -import { GenericTableCell, GenericTableRow } from '../../../../../../client/components/GenericTable'; -import { useFormatDateAndTime } from '../../../../../../client/hooks/useFormatDateAndTime'; +import { GenericTableCell, GenericTableRow } from '../../../../components/GenericTable'; import DeviceIcon from '../../../../components/deviceManagement/DeviceIcon'; import { useDeviceLogout } from '../../../../hooks/useDeviceLogout'; +import { useFormatDateAndTime } from '../../../../hooks/useFormatDateAndTime'; type DevicesRowProps = { _id: string; diff --git a/apps/meteor/ee/client/views/account/deviceManagement/DeviceManagementAccountTable/DeviceManagementAccountTable.tsx b/apps/meteor/client/views/account/deviceManagement/DeviceManagementAccountTable/DeviceManagementAccountTable.tsx similarity index 87% rename from apps/meteor/ee/client/views/account/deviceManagement/DeviceManagementAccountTable/DeviceManagementAccountTable.tsx rename to apps/meteor/client/views/account/deviceManagement/DeviceManagementAccountTable/DeviceManagementAccountTable.tsx index c6e32b026818..5039521fa622 100644 --- a/apps/meteor/ee/client/views/account/deviceManagement/DeviceManagementAccountTable/DeviceManagementAccountTable.tsx +++ b/apps/meteor/client/views/account/deviceManagement/DeviceManagementAccountTable/DeviceManagementAccountTable.tsx @@ -3,11 +3,11 @@ import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React, { useMemo } from 'react'; -import { GenericTableHeaderCell } from '../../../../../../client/components/GenericTable'; -import { usePagination } from '../../../../../../client/components/GenericTable/hooks/usePagination'; -import { useSort } from '../../../../../../client/components/GenericTable/hooks/useSort'; -import { useEndpointData } from '../../../../../../client/hooks/useEndpointData'; +import { GenericTableHeaderCell } from '../../../../components/GenericTable'; +import { usePagination } from '../../../../components/GenericTable/hooks/usePagination'; +import { useSort } from '../../../../components/GenericTable/hooks/useSort'; import DeviceManagementTable from '../../../../components/deviceManagement/DeviceManagementTable'; +import { useEndpointData } from '../../../../hooks/useEndpointData'; import DeviceManagementAccountRow from './DeviceManagementAccountRow'; const sortMapping = { diff --git a/apps/meteor/ee/client/views/account/deviceManagement/DeviceManagementAccountTable/index.ts b/apps/meteor/client/views/account/deviceManagement/DeviceManagementAccountTable/index.ts similarity index 100% rename from apps/meteor/ee/client/views/account/deviceManagement/DeviceManagementAccountTable/index.ts rename to apps/meteor/client/views/account/deviceManagement/DeviceManagementAccountTable/index.ts diff --git a/apps/meteor/client/views/account/omnichannel/PreferencesConversationTranscript.tsx b/apps/meteor/client/views/account/omnichannel/PreferencesConversationTranscript.tsx index 8cf34b6a56d4..11bf6634a0e9 100644 --- a/apps/meteor/client/views/account/omnichannel/PreferencesConversationTranscript.tsx +++ b/apps/meteor/client/views/account/omnichannel/PreferencesConversationTranscript.tsx @@ -4,7 +4,7 @@ import { useTranslation, usePermission } from '@rocket.chat/ui-contexts'; import React from 'react'; import { useFormContext } from 'react-hook-form'; -import { useHasLicenseModule } from '../../../../ee/client/hooks/useHasLicenseModule'; +import { useHasLicenseModule } from '../../../hooks/useHasLicenseModule'; const PreferencesConversationTranscript = () => { const t = useTranslation(); diff --git a/apps/meteor/ee/client/views/admin/deviceManagement/DeviceManagementAdminPage.tsx b/apps/meteor/client/views/admin/deviceManagement/DeviceManagementAdminPage.tsx similarity index 84% rename from apps/meteor/ee/client/views/admin/deviceManagement/DeviceManagementAdminPage.tsx rename to apps/meteor/client/views/admin/deviceManagement/DeviceManagementAdminPage.tsx index 436080318892..317a9f519030 100644 --- a/apps/meteor/ee/client/views/admin/deviceManagement/DeviceManagementAdminPage.tsx +++ b/apps/meteor/client/views/admin/deviceManagement/DeviceManagementAdminPage.tsx @@ -2,8 +2,8 @@ import { useRouteParameter, useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React, { useRef } from 'react'; -import { ContextualbarDialog } from '../../../../../client/components/Contextualbar'; -import { Page, PageHeader, PageContent } from '../../../../../client/components/Page'; +import { ContextualbarDialog } from '../../../components/Contextualbar'; +import { Page, PageHeader, PageContent } from '../../../components/Page'; import DeviceManagementAdminTable from './DeviceManagementAdminTable'; import DeviceManagementInfo from './DeviceManagementInfo'; diff --git a/apps/meteor/ee/client/views/admin/deviceManagement/DeviceManagementAdminRoute.tsx b/apps/meteor/client/views/admin/deviceManagement/DeviceManagementAdminRoute.tsx similarity index 78% rename from apps/meteor/ee/client/views/admin/deviceManagement/DeviceManagementAdminRoute.tsx rename to apps/meteor/client/views/admin/deviceManagement/DeviceManagementAdminRoute.tsx index c250728988ec..e7624ffd956e 100644 --- a/apps/meteor/ee/client/views/admin/deviceManagement/DeviceManagementAdminRoute.tsx +++ b/apps/meteor/client/views/admin/deviceManagement/DeviceManagementAdminRoute.tsx @@ -2,12 +2,12 @@ import { usePermission, useRouter, useSetModal, useCurrentModal, useTranslation import type { ReactElement } from 'react'; import React, { useEffect } from 'react'; -import { getURL } from '../../../../../app/utils/client/getURL'; -import GenericUpsellModal from '../../../../../client/components/GenericUpsellModal'; -import { useUpsellActions } from '../../../../../client/components/GenericUpsellModal/hooks'; -import PageSkeleton from '../../../../../client/components/PageSkeleton'; -import NotAuthorizedPage from '../../../../../client/views/notAuthorized/NotAuthorizedPage'; +import { getURL } from '../../../../app/utils/client/getURL'; +import GenericUpsellModal from '../../../components/GenericUpsellModal'; +import { useUpsellActions } from '../../../components/GenericUpsellModal/hooks'; +import PageSkeleton from '../../../components/PageSkeleton'; import { useHasLicenseModule } from '../../../hooks/useHasLicenseModule'; +import NotAuthorizedPage from '../../notAuthorized/NotAuthorizedPage'; import DeviceManagementAdminPage from './DeviceManagementAdminPage'; const DeviceManagementAdminRoute = (): ReactElement => { diff --git a/apps/meteor/ee/client/views/admin/deviceManagement/DeviceManagementAdminTable/DeviceManagementAdminRow.tsx b/apps/meteor/client/views/admin/deviceManagement/DeviceManagementAdminTable/DeviceManagementAdminRow.tsx similarity index 93% rename from apps/meteor/ee/client/views/admin/deviceManagement/DeviceManagementAdminTable/DeviceManagementAdminRow.tsx rename to apps/meteor/client/views/admin/deviceManagement/DeviceManagementAdminTable/DeviceManagementAdminRow.tsx index e3ac5680ed2e..5420be953601 100644 --- a/apps/meteor/ee/client/views/admin/deviceManagement/DeviceManagementAdminTable/DeviceManagementAdminRow.tsx +++ b/apps/meteor/client/views/admin/deviceManagement/DeviceManagementAdminTable/DeviceManagementAdminRow.tsx @@ -4,10 +4,10 @@ import { useRoute, useTranslation } from '@rocket.chat/ui-contexts'; import type { KeyboardEvent, ReactElement } from 'react'; import React, { useCallback } from 'react'; -import { GenericTableRow, GenericTableCell } from '../../../../../../client/components/GenericTable'; -import { useFormatDateAndTime } from '../../../../../../client/hooks/useFormatDateAndTime'; +import { GenericTableRow, GenericTableCell } from '../../../../components/GenericTable'; import DeviceIcon from '../../../../components/deviceManagement/DeviceIcon'; import { useDeviceLogout } from '../../../../hooks/useDeviceLogout'; +import { useFormatDateAndTime } from '../../../../hooks/useFormatDateAndTime'; type DeviceRowProps = { _id: string; diff --git a/apps/meteor/ee/client/views/admin/deviceManagement/DeviceManagementAdminTable/DeviceManagementAdminTable.tsx b/apps/meteor/client/views/admin/deviceManagement/DeviceManagementAdminTable/DeviceManagementAdminTable.tsx similarity index 89% rename from apps/meteor/ee/client/views/admin/deviceManagement/DeviceManagementAdminTable/DeviceManagementAdminTable.tsx rename to apps/meteor/client/views/admin/deviceManagement/DeviceManagementAdminTable/DeviceManagementAdminTable.tsx index e9ac8be7da9f..026f1cb0de30 100644 --- a/apps/meteor/ee/client/views/admin/deviceManagement/DeviceManagementAdminTable/DeviceManagementAdminTable.tsx +++ b/apps/meteor/client/views/admin/deviceManagement/DeviceManagementAdminTable/DeviceManagementAdminTable.tsx @@ -4,12 +4,12 @@ import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement, MutableRefObject } from 'react'; import React, { useState, useMemo, useEffect } from 'react'; -import FilterByText from '../../../../../../client/components/FilterByText'; -import { GenericTableHeaderCell } from '../../../../../../client/components/GenericTable'; -import { usePagination } from '../../../../../../client/components/GenericTable/hooks/usePagination'; -import { useSort } from '../../../../../../client/components/GenericTable/hooks/useSort'; -import { useEndpointData } from '../../../../../../client/hooks/useEndpointData'; +import FilterByText from '../../../../components/FilterByText'; +import { GenericTableHeaderCell } from '../../../../components/GenericTable'; +import { usePagination } from '../../../../components/GenericTable/hooks/usePagination'; +import { useSort } from '../../../../components/GenericTable/hooks/useSort'; import DeviceManagementTable from '../../../../components/deviceManagement/DeviceManagementTable'; +import { useEndpointData } from '../../../../hooks/useEndpointData'; import DeviceManagementAdminRow from './DeviceManagementAdminRow'; const sortMapping = { diff --git a/apps/meteor/ee/client/views/admin/deviceManagement/DeviceManagementAdminTable/index.ts b/apps/meteor/client/views/admin/deviceManagement/DeviceManagementAdminTable/index.ts similarity index 100% rename from apps/meteor/ee/client/views/admin/deviceManagement/DeviceManagementAdminTable/index.ts rename to apps/meteor/client/views/admin/deviceManagement/DeviceManagementAdminTable/index.ts diff --git a/apps/meteor/ee/client/views/admin/deviceManagement/DeviceManagementInfo/DeviceManagementInfo.tsx b/apps/meteor/client/views/admin/deviceManagement/DeviceManagementInfo/DeviceManagementInfo.tsx similarity index 91% rename from apps/meteor/ee/client/views/admin/deviceManagement/DeviceManagementInfo/DeviceManagementInfo.tsx rename to apps/meteor/client/views/admin/deviceManagement/DeviceManagementInfo/DeviceManagementInfo.tsx index 7820ee834960..240e61e5878d 100644 --- a/apps/meteor/ee/client/views/admin/deviceManagement/DeviceManagementInfo/DeviceManagementInfo.tsx +++ b/apps/meteor/client/views/admin/deviceManagement/DeviceManagementInfo/DeviceManagementInfo.tsx @@ -12,11 +12,11 @@ import { ContextualbarScrollableContent, ContextualbarFooter, ContextualbarTitle, -} from '../../../../../../client/components/Contextualbar'; -import InfoPanel from '../../../../../../client/components/InfoPanel'; -import { useFormatDateAndTime } from '../../../../../../client/hooks/useFormatDateAndTime'; -import { usePresence } from '../../../../../../client/hooks/usePresence'; +} from '../../../../components/Contextualbar'; +import InfoPanel from '../../../../components/InfoPanel'; import { useDeviceLogout } from '../../../../hooks/useDeviceLogout'; +import { useFormatDateAndTime } from '../../../../hooks/useFormatDateAndTime'; +import { usePresence } from '../../../../hooks/usePresence'; type DeviceManagementInfoProps = DeviceManagementPopulatedSession & { onReload: () => void; diff --git a/apps/meteor/ee/client/views/admin/deviceManagement/DeviceManagementInfo/DeviceManagementInfoWithData.tsx b/apps/meteor/client/views/admin/deviceManagement/DeviceManagementInfo/DeviceManagementInfoWithData.tsx similarity index 89% rename from apps/meteor/ee/client/views/admin/deviceManagement/DeviceManagementInfo/DeviceManagementInfoWithData.tsx rename to apps/meteor/client/views/admin/deviceManagement/DeviceManagementInfo/DeviceManagementInfoWithData.tsx index d5e59ea02756..5f78269fca57 100644 --- a/apps/meteor/ee/client/views/admin/deviceManagement/DeviceManagementInfo/DeviceManagementInfoWithData.tsx +++ b/apps/meteor/client/views/admin/deviceManagement/DeviceManagementInfo/DeviceManagementInfoWithData.tsx @@ -11,9 +11,9 @@ import { ContextualbarClose, ContextualbarContent, ContextualbarTitle, -} from '../../../../../../client/components/Contextualbar'; -import { useEndpointData } from '../../../../../../client/hooks/useEndpointData'; -import { AsyncStatePhase } from '../../../../../../client/lib/asyncState'; +} from '../../../../components/Contextualbar'; +import { useEndpointData } from '../../../../hooks/useEndpointData'; +import { AsyncStatePhase } from '../../../../lib/asyncState'; import DeviceManagementInfo from './DeviceManagementInfo'; const convertSessionFromAPI = ({ diff --git a/apps/meteor/ee/client/views/admin/deviceManagement/DeviceManagementInfo/index.ts b/apps/meteor/client/views/admin/deviceManagement/DeviceManagementInfo/index.ts similarity index 100% rename from apps/meteor/ee/client/views/admin/deviceManagement/DeviceManagementInfo/index.ts rename to apps/meteor/client/views/admin/deviceManagement/DeviceManagementInfo/index.ts diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/EngagementDashboardCard.tsx b/apps/meteor/client/views/admin/engagementDashboard/EngagementDashboardCard.tsx similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/EngagementDashboardCard.tsx rename to apps/meteor/client/views/admin/engagementDashboard/EngagementDashboardCard.tsx diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/EngagementDashboardCardErrorBoundary.tsx b/apps/meteor/client/views/admin/engagementDashboard/EngagementDashboardCardErrorBoundary.tsx similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/EngagementDashboardCardErrorBoundary.tsx rename to apps/meteor/client/views/admin/engagementDashboard/EngagementDashboardCardErrorBoundary.tsx diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/EngagementDashboardCardFilter.tsx b/apps/meteor/client/views/admin/engagementDashboard/EngagementDashboardCardFilter.tsx similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/EngagementDashboardCardFilter.tsx rename to apps/meteor/client/views/admin/engagementDashboard/EngagementDashboardCardFilter.tsx diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/EngagementDashboardPage.stories.tsx b/apps/meteor/client/views/admin/engagementDashboard/EngagementDashboardPage.stories.tsx similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/EngagementDashboardPage.stories.tsx rename to apps/meteor/client/views/admin/engagementDashboard/EngagementDashboardPage.stories.tsx diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/EngagementDashboardPage.tsx b/apps/meteor/client/views/admin/engagementDashboard/EngagementDashboardPage.tsx similarity index 98% rename from apps/meteor/ee/client/views/admin/engagementDashboard/EngagementDashboardPage.tsx rename to apps/meteor/client/views/admin/engagementDashboard/EngagementDashboardPage.tsx index de40e04dcfca..78f1585f0f4b 100644 --- a/apps/meteor/ee/client/views/admin/engagementDashboard/EngagementDashboardPage.tsx +++ b/apps/meteor/client/views/admin/engagementDashboard/EngagementDashboardPage.tsx @@ -3,7 +3,7 @@ import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React, { useCallback, useMemo, useState } from 'react'; -import { Page, PageHeader, PageScrollableContent } from '../../../../../client/components/Page'; +import { Page, PageHeader, PageScrollableContent } from '../../../components/Page'; import ChannelsTab from './channels/ChannelsTab'; import MessagesTab from './messages/MessagesTab'; import UsersTab from './users/UsersTab'; diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/EngagementDashboardRoute.tsx b/apps/meteor/client/views/admin/engagementDashboard/EngagementDashboardRoute.tsx similarity index 85% rename from apps/meteor/ee/client/views/admin/engagementDashboard/EngagementDashboardRoute.tsx rename to apps/meteor/client/views/admin/engagementDashboard/EngagementDashboardRoute.tsx index fd42d428824d..17f6713220f9 100644 --- a/apps/meteor/ee/client/views/admin/engagementDashboard/EngagementDashboardRoute.tsx +++ b/apps/meteor/client/views/admin/engagementDashboard/EngagementDashboardRoute.tsx @@ -10,12 +10,12 @@ import { import type { ReactElement } from 'react'; import React, { useEffect } from 'react'; -import { getURL } from '../../../../../app/utils/client/getURL'; -import GenericUpsellModal from '../../../../../client/components/GenericUpsellModal'; -import { useUpsellActions } from '../../../../../client/components/GenericUpsellModal/hooks'; -import PageSkeleton from '../../../../../client/components/PageSkeleton'; -import NotAuthorizedPage from '../../../../../client/views/notAuthorized/NotAuthorizedPage'; +import { getURL } from '../../../../app/utils/client/getURL'; +import GenericUpsellModal from '../../../components/GenericUpsellModal'; +import { useUpsellActions } from '../../../components/GenericUpsellModal/hooks'; +import PageSkeleton from '../../../components/PageSkeleton'; import { useHasLicenseModule } from '../../../hooks/useHasLicenseModule'; +import NotAuthorizedPage from '../../notAuthorized/NotAuthorizedPage'; import EngagementDashboardPage from './EngagementDashboardPage'; const isValidTab = (tab: string | undefined): tab is 'users' | 'messages' | 'channels' => diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/channels/ChannelsOverview.tsx b/apps/meteor/client/views/admin/engagementDashboard/channels/ChannelsOverview.tsx similarity index 98% rename from apps/meteor/ee/client/views/admin/engagementDashboard/channels/ChannelsOverview.tsx rename to apps/meteor/client/views/admin/engagementDashboard/channels/ChannelsOverview.tsx index f901f11d3954..a92b2c6d3295 100644 --- a/apps/meteor/ee/client/views/admin/engagementDashboard/channels/ChannelsOverview.tsx +++ b/apps/meteor/client/views/admin/engagementDashboard/channels/ChannelsOverview.tsx @@ -4,10 +4,10 @@ import moment from 'moment'; import type { ReactElement } from 'react'; import React, { useMemo, useState } from 'react'; -import Growth from '../../../../../../client/components/dataView/Growth'; import DownloadDataButton from '../../../../components/dashboards/DownloadDataButton'; import PeriodSelector from '../../../../components/dashboards/PeriodSelector'; import { usePeriodSelectorState } from '../../../../components/dashboards/usePeriodSelectorState'; +import Growth from '../../../../components/dataView/Growth'; import EngagementDashboardCardFilter from '../EngagementDashboardCardFilter'; import { useChannelsList } from './useChannelsList'; diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/channels/ChannelsTab.stories.tsx b/apps/meteor/client/views/admin/engagementDashboard/channels/ChannelsTab.stories.tsx similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/channels/ChannelsTab.stories.tsx rename to apps/meteor/client/views/admin/engagementDashboard/channels/ChannelsTab.stories.tsx diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/channels/ChannelsTab.tsx b/apps/meteor/client/views/admin/engagementDashboard/channels/ChannelsTab.tsx similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/channels/ChannelsTab.tsx rename to apps/meteor/client/views/admin/engagementDashboard/channels/ChannelsTab.tsx diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/channels/useChannelsList.ts b/apps/meteor/client/views/admin/engagementDashboard/channels/useChannelsList.ts similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/channels/useChannelsList.ts rename to apps/meteor/client/views/admin/engagementDashboard/channels/useChannelsList.ts diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/dataView/LegendSymbol.stories.tsx b/apps/meteor/client/views/admin/engagementDashboard/dataView/LegendSymbol.stories.tsx similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/dataView/LegendSymbol.stories.tsx rename to apps/meteor/client/views/admin/engagementDashboard/dataView/LegendSymbol.stories.tsx diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/dataView/LegendSymbol.tsx b/apps/meteor/client/views/admin/engagementDashboard/dataView/LegendSymbol.tsx similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/dataView/LegendSymbol.tsx rename to apps/meteor/client/views/admin/engagementDashboard/dataView/LegendSymbol.tsx diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/dataView/colors.ts b/apps/meteor/client/views/admin/engagementDashboard/dataView/colors.ts similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/dataView/colors.ts rename to apps/meteor/client/views/admin/engagementDashboard/dataView/colors.ts diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/messages/MessagesPerChannelSection.tsx b/apps/meteor/client/views/admin/engagementDashboard/messages/MessagesPerChannelSection.tsx similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/messages/MessagesPerChannelSection.tsx rename to apps/meteor/client/views/admin/engagementDashboard/messages/MessagesPerChannelSection.tsx diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/messages/MessagesSentSection.tsx b/apps/meteor/client/views/admin/engagementDashboard/messages/MessagesSentSection.tsx similarity index 98% rename from apps/meteor/ee/client/views/admin/engagementDashboard/messages/MessagesSentSection.tsx rename to apps/meteor/client/views/admin/engagementDashboard/messages/MessagesSentSection.tsx index aa12bf2a3d1c..7cf46ebc476a 100644 --- a/apps/meteor/ee/client/views/admin/engagementDashboard/messages/MessagesSentSection.tsx +++ b/apps/meteor/client/views/admin/engagementDashboard/messages/MessagesSentSection.tsx @@ -6,11 +6,11 @@ import moment from 'moment'; import type { ReactElement } from 'react'; import React, { useMemo } from 'react'; -import CounterSet from '../../../../../../client/components/dataView/CounterSet'; import DownloadDataButton from '../../../../components/dashboards/DownloadDataButton'; import PeriodSelector from '../../../../components/dashboards/PeriodSelector'; import { usePeriodLabel } from '../../../../components/dashboards/usePeriodLabel'; import { usePeriodSelectorState } from '../../../../components/dashboards/usePeriodSelectorState'; +import CounterSet from '../../../../components/dataView/CounterSet'; import EngagementDashboardCardFilter from '../EngagementDashboardCardFilter'; import { useMessagesSent } from './useMessagesSent'; diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/messages/MessagesTab.stories.tsx b/apps/meteor/client/views/admin/engagementDashboard/messages/MessagesTab.stories.tsx similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/messages/MessagesTab.stories.tsx rename to apps/meteor/client/views/admin/engagementDashboard/messages/MessagesTab.stories.tsx diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/messages/MessagesTab.tsx b/apps/meteor/client/views/admin/engagementDashboard/messages/MessagesTab.tsx similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/messages/MessagesTab.tsx rename to apps/meteor/client/views/admin/engagementDashboard/messages/MessagesTab.tsx diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/messages/useMessageOrigins.ts b/apps/meteor/client/views/admin/engagementDashboard/messages/useMessageOrigins.ts similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/messages/useMessageOrigins.ts rename to apps/meteor/client/views/admin/engagementDashboard/messages/useMessageOrigins.ts diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/messages/useMessagesSent.ts b/apps/meteor/client/views/admin/engagementDashboard/messages/useMessagesSent.ts similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/messages/useMessagesSent.ts rename to apps/meteor/client/views/admin/engagementDashboard/messages/useMessagesSent.ts diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/messages/useTopFivePopularChannels.ts b/apps/meteor/client/views/admin/engagementDashboard/messages/useTopFivePopularChannels.ts similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/messages/useTopFivePopularChannels.ts rename to apps/meteor/client/views/admin/engagementDashboard/messages/useTopFivePopularChannels.ts diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/users/ActiveUsersSection.tsx b/apps/meteor/client/views/admin/engagementDashboard/users/ActiveUsersSection.tsx similarity index 98% rename from apps/meteor/ee/client/views/admin/engagementDashboard/users/ActiveUsersSection.tsx rename to apps/meteor/client/views/admin/engagementDashboard/users/ActiveUsersSection.tsx index 80af96d8f669..80359837b627 100644 --- a/apps/meteor/ee/client/views/admin/engagementDashboard/users/ActiveUsersSection.tsx +++ b/apps/meteor/client/views/admin/engagementDashboard/users/ActiveUsersSection.tsx @@ -6,9 +6,9 @@ import moment from 'moment'; import type { ReactElement } from 'react'; import React, { useMemo } from 'react'; -import CounterSet from '../../../../../../client/components/dataView/CounterSet'; -import { useFormatDate } from '../../../../../../client/hooks/useFormatDate'; import DownloadDataButton from '../../../../components/dashboards/DownloadDataButton'; +import CounterSet from '../../../../components/dataView/CounterSet'; +import { useFormatDate } from '../../../../hooks/useFormatDate'; import EngagementDashboardCardFilter from '../EngagementDashboardCardFilter'; import LegendSymbol from '../dataView/LegendSymbol'; import { useActiveUsers } from './useActiveUsers'; diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/users/BusiestChatTimesSection.tsx b/apps/meteor/client/views/admin/engagementDashboard/users/BusiestChatTimesSection.tsx similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/users/BusiestChatTimesSection.tsx rename to apps/meteor/client/views/admin/engagementDashboard/users/BusiestChatTimesSection.tsx diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/users/ContentForDays.tsx b/apps/meteor/client/views/admin/engagementDashboard/users/ContentForDays.tsx similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/users/ContentForDays.tsx rename to apps/meteor/client/views/admin/engagementDashboard/users/ContentForDays.tsx diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/users/ContentForHours.tsx b/apps/meteor/client/views/admin/engagementDashboard/users/ContentForHours.tsx similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/users/ContentForHours.tsx rename to apps/meteor/client/views/admin/engagementDashboard/users/ContentForHours.tsx diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/users/NewUsersSection.tsx b/apps/meteor/client/views/admin/engagementDashboard/users/NewUsersSection.tsx similarity index 97% rename from apps/meteor/ee/client/views/admin/engagementDashboard/users/NewUsersSection.tsx rename to apps/meteor/client/views/admin/engagementDashboard/users/NewUsersSection.tsx index 1941b4fea718..36f9c3de2cc2 100644 --- a/apps/meteor/ee/client/views/admin/engagementDashboard/users/NewUsersSection.tsx +++ b/apps/meteor/client/views/admin/engagementDashboard/users/NewUsersSection.tsx @@ -7,12 +7,12 @@ import moment from 'moment'; import type { ReactElement } from 'react'; import React, { useMemo } from 'react'; -import CounterSet from '../../../../../../client/components/dataView/CounterSet'; -import { useFormatDate } from '../../../../../../client/hooks/useFormatDate'; import DownloadDataButton from '../../../../components/dashboards/DownloadDataButton'; import PeriodSelector from '../../../../components/dashboards/PeriodSelector'; import { usePeriodLabel } from '../../../../components/dashboards/usePeriodLabel'; import { usePeriodSelectorState } from '../../../../components/dashboards/usePeriodSelectorState'; +import CounterSet from '../../../../components/dataView/CounterSet'; +import { useFormatDate } from '../../../../hooks/useFormatDate'; import EngagementDashboardCardFilter from '../EngagementDashboardCardFilter'; import { useNewUsers } from './useNewUsers'; diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/users/UsersByTimeOfTheDaySection.tsx b/apps/meteor/client/views/admin/engagementDashboard/users/UsersByTimeOfTheDaySection.tsx similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/users/UsersByTimeOfTheDaySection.tsx rename to apps/meteor/client/views/admin/engagementDashboard/users/UsersByTimeOfTheDaySection.tsx diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/users/UsersTab.stories.tsx b/apps/meteor/client/views/admin/engagementDashboard/users/UsersTab.stories.tsx similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/users/UsersTab.stories.tsx rename to apps/meteor/client/views/admin/engagementDashboard/users/UsersTab.stories.tsx diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/users/UsersTab.tsx b/apps/meteor/client/views/admin/engagementDashboard/users/UsersTab.tsx similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/users/UsersTab.tsx rename to apps/meteor/client/views/admin/engagementDashboard/users/UsersTab.tsx diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/users/useActiveUsers.ts b/apps/meteor/client/views/admin/engagementDashboard/users/useActiveUsers.ts similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/users/useActiveUsers.ts rename to apps/meteor/client/views/admin/engagementDashboard/users/useActiveUsers.ts diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/users/useHourlyChatActivity.ts b/apps/meteor/client/views/admin/engagementDashboard/users/useHourlyChatActivity.ts similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/users/useHourlyChatActivity.ts rename to apps/meteor/client/views/admin/engagementDashboard/users/useHourlyChatActivity.ts diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/users/useNewUsers.ts b/apps/meteor/client/views/admin/engagementDashboard/users/useNewUsers.ts similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/users/useNewUsers.ts rename to apps/meteor/client/views/admin/engagementDashboard/users/useNewUsers.ts diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/users/useUsersByTimeOfTheDay.ts b/apps/meteor/client/views/admin/engagementDashboard/users/useUsersByTimeOfTheDay.ts similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/users/useUsersByTimeOfTheDay.ts rename to apps/meteor/client/views/admin/engagementDashboard/users/useUsersByTimeOfTheDay.ts diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/users/useWeeklyChatActivity.ts b/apps/meteor/client/views/admin/engagementDashboard/users/useWeeklyChatActivity.ts similarity index 100% rename from apps/meteor/ee/client/views/admin/engagementDashboard/users/useWeeklyChatActivity.ts rename to apps/meteor/client/views/admin/engagementDashboard/users/useWeeklyChatActivity.ts diff --git a/apps/meteor/client/views/admin/permissions/EditRolePageWithData.tsx b/apps/meteor/client/views/admin/permissions/EditRolePageWithData.tsx index 32687a838593..d08eab83a934 100644 --- a/apps/meteor/client/views/admin/permissions/EditRolePageWithData.tsx +++ b/apps/meteor/client/views/admin/permissions/EditRolePageWithData.tsx @@ -4,8 +4,8 @@ import { useRouteParameter, useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React from 'react'; -import { useHasLicenseModule } from '../../../../ee/client/hooks/useHasLicenseModule'; import PageSkeleton from '../../../components/PageSkeleton'; +import { useHasLicenseModule } from '../../../hooks/useHasLicenseModule'; import EditRolePage from './EditRolePage'; import { useRole } from './hooks/useRole'; diff --git a/apps/meteor/client/views/admin/permissions/PermissionsContextBar.tsx b/apps/meteor/client/views/admin/permissions/PermissionsContextBar.tsx index ca9fefd54163..3b8bea6097e4 100644 --- a/apps/meteor/client/views/admin/permissions/PermissionsContextBar.tsx +++ b/apps/meteor/client/views/admin/permissions/PermissionsContextBar.tsx @@ -3,7 +3,6 @@ import { useRouteParameter, useRoute, useTranslation, useSetModal } from '@rocke import type { ReactElement } from 'react'; import React, { useEffect } from 'react'; -import { useHasLicenseModule } from '../../../../ee/client/hooks/useHasLicenseModule'; import { Contextualbar, ContextualbarHeader, @@ -11,6 +10,7 @@ import { ContextualbarClose, ContextualbarDialog, } from '../../../components/Contextualbar'; +import { useHasLicenseModule } from '../../../hooks/useHasLicenseModule'; import CustomRoleUpsellModal from './CustomRoleUpsellModal'; import EditRolePageWithData from './EditRolePageWithData'; diff --git a/apps/meteor/client/views/admin/routes.tsx b/apps/meteor/client/views/admin/routes.tsx index db09a6d436d6..f70df1625871 100644 --- a/apps/meteor/client/views/admin/routes.tsx +++ b/apps/meteor/client/views/admin/routes.tsx @@ -225,12 +225,12 @@ registerAdminRoute('/moderation/:tab?/:context?/:id?', { registerAdminRoute('/engagement/:tab?', { name: 'engagement-dashboard', - component: lazy(() => import('../../../ee/client/views/admin/engagementDashboard/EngagementDashboardRoute')), + component: lazy(() => import('./engagementDashboard/EngagementDashboardRoute')), }); registerAdminRoute('/device-management/:context?/:id?', { name: 'device-management', - component: lazy(() => import('../../../ee/client/views/admin/deviceManagement/DeviceManagementAdminRoute')), + component: lazy(() => import('./deviceManagement/DeviceManagementAdminRoute')), }); registerAdminRoute('/subscription', { diff --git a/apps/meteor/client/views/admin/users/AdminUsersPage.tsx b/apps/meteor/client/views/admin/users/AdminUsersPage.tsx index 06b41b9f2566..1ec27c28a3bb 100644 --- a/apps/meteor/client/views/admin/users/AdminUsersPage.tsx +++ b/apps/meteor/client/views/admin/users/AdminUsersPage.tsx @@ -5,8 +5,6 @@ import { usePermission, useRouteParameter, useTranslation, useRouter } from '@ro import type { ReactElement } from 'react'; import React, { useEffect, useMemo, useRef, useState } from 'react'; -import UserPageHeaderContentWithSeatsCap from '../../../../ee/client/views/admin/users/UserPageHeaderContentWithSeatsCap'; -import { useSeatsCap } from '../../../../ee/client/views/admin/users/useSeatsCap'; import { Contextualbar, ContextualbarHeader, @@ -23,8 +21,10 @@ import AdminUserForm from './AdminUserForm'; import AdminUserFormWithData from './AdminUserFormWithData'; import AdminUserInfoWithData from './AdminUserInfoWithData'; import AdminUserUpgrade from './AdminUserUpgrade'; +import UserPageHeaderContentWithSeatsCap from './UserPageHeaderContentWithSeatsCap'; import UsersTable from './UsersTable'; import useFilteredUsers from './hooks/useFilteredUsers'; +import { useSeatsCap } from './useSeatsCap'; export type UsersFilters = { text: string; diff --git a/apps/meteor/ee/client/views/admin/users/SeatsCapUsage/SeatsCapUsage.stories.tsx b/apps/meteor/client/views/admin/users/SeatsCapUsage/SeatsCapUsage.stories.tsx similarity index 100% rename from apps/meteor/ee/client/views/admin/users/SeatsCapUsage/SeatsCapUsage.stories.tsx rename to apps/meteor/client/views/admin/users/SeatsCapUsage/SeatsCapUsage.stories.tsx diff --git a/apps/meteor/ee/client/views/admin/users/SeatsCapUsage/SeatsCapUsage.tsx b/apps/meteor/client/views/admin/users/SeatsCapUsage/SeatsCapUsage.tsx similarity index 85% rename from apps/meteor/ee/client/views/admin/users/SeatsCapUsage/SeatsCapUsage.tsx rename to apps/meteor/client/views/admin/users/SeatsCapUsage/SeatsCapUsage.tsx index d87799a9ff98..5a3f1bdd299a 100644 --- a/apps/meteor/ee/client/views/admin/users/SeatsCapUsage/SeatsCapUsage.tsx +++ b/apps/meteor/client/views/admin/users/SeatsCapUsage/SeatsCapUsage.tsx @@ -2,7 +2,7 @@ import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React from 'react'; -import { GenericResourceUsage } from '../../../../../../client/components/GenericResourceUsage'; +import { GenericResourceUsage } from '../../../../components/GenericResourceUsage'; type SeatsCapUsageProps = { limit: number; diff --git a/apps/meteor/ee/client/views/admin/users/SeatsCapUsage/index.ts b/apps/meteor/client/views/admin/users/SeatsCapUsage/index.ts similarity index 100% rename from apps/meteor/ee/client/views/admin/users/SeatsCapUsage/index.ts rename to apps/meteor/client/views/admin/users/SeatsCapUsage/index.ts diff --git a/apps/meteor/ee/client/views/admin/users/UserPageHeaderContentWithSeatsCap.tsx b/apps/meteor/client/views/admin/users/UserPageHeaderContentWithSeatsCap.tsx similarity index 84% rename from apps/meteor/ee/client/views/admin/users/UserPageHeaderContentWithSeatsCap.tsx rename to apps/meteor/client/views/admin/users/UserPageHeaderContentWithSeatsCap.tsx index 6fddef20a956..c4642d8baefb 100644 --- a/apps/meteor/ee/client/views/admin/users/UserPageHeaderContentWithSeatsCap.tsx +++ b/apps/meteor/client/views/admin/users/UserPageHeaderContentWithSeatsCap.tsx @@ -3,9 +3,9 @@ import { useTranslation, useRouter } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React from 'react'; -import { useExternalLink } from '../../../../../client/hooks/useExternalLink'; -import { useShouldPreventAction } from '../../../../../client/hooks/useShouldPreventAction'; -import { useCheckoutUrl } from '../../../../../client/views/admin/subscription/hooks/useCheckoutUrl'; +import { useExternalLink } from '../../../hooks/useExternalLink'; +import { useShouldPreventAction } from '../../../hooks/useShouldPreventAction'; +import { useCheckoutUrl } from '../subscription/hooks/useCheckoutUrl'; import SeatsCapUsage from './SeatsCapUsage'; type UserPageHeaderContentWithSeatsCapProps = { diff --git a/apps/meteor/ee/client/views/admin/users/useSeatsCap.ts b/apps/meteor/client/views/admin/users/useSeatsCap.ts similarity index 100% rename from apps/meteor/ee/client/views/admin/users/useSeatsCap.ts rename to apps/meteor/client/views/admin/users/useSeatsCap.ts diff --git a/apps/meteor/client/views/admin/workspace/UsersUploadsCard/UsersUploadsCard.tsx b/apps/meteor/client/views/admin/workspace/UsersUploadsCard/UsersUploadsCard.tsx index 3298f38b0f11..90b6be2dbc5c 100644 --- a/apps/meteor/client/views/admin/workspace/UsersUploadsCard/UsersUploadsCard.tsx +++ b/apps/meteor/client/views/admin/workspace/UsersUploadsCard/UsersUploadsCard.tsx @@ -5,8 +5,8 @@ import { useRouter, useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React, { memo } from 'react'; -import { useHasLicenseModule } from '../../../../../ee/client/hooks/useHasLicenseModule'; import { useFormatMemorySize } from '../../../../hooks/useFormatMemorySize'; +import { useHasLicenseModule } from '../../../../hooks/useHasLicenseModule'; import WorkspaceCardSection from '../components/WorkspaceCardSection'; import WorkspaceCardTextSeparator from '../components/WorkspaceCardTextSeparator'; diff --git a/apps/meteor/ee/client/views/audit/AuditLogPage.tsx b/apps/meteor/client/views/audit/AuditLogPage.tsx similarity index 83% rename from apps/meteor/ee/client/views/audit/AuditLogPage.tsx rename to apps/meteor/client/views/audit/AuditLogPage.tsx index deb8b301497b..10b9d439ff09 100644 --- a/apps/meteor/ee/client/views/audit/AuditLogPage.tsx +++ b/apps/meteor/client/views/audit/AuditLogPage.tsx @@ -2,7 +2,7 @@ import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React from 'react'; -import { Page, PageHeader, PageContent } from '../../../../client/components/Page'; +import { Page, PageHeader, PageContent } from '../../components/Page'; import AuditLogTable from './components/AuditLogTable'; const AuditLogPage = (): ReactElement => { diff --git a/apps/meteor/ee/client/views/audit/AuditPage.tsx b/apps/meteor/client/views/audit/AuditPage.tsx similarity index 89% rename from apps/meteor/ee/client/views/audit/AuditPage.tsx rename to apps/meteor/client/views/audit/AuditPage.tsx index 73b3ddaedbd9..bfe7a067f672 100644 --- a/apps/meteor/ee/client/views/audit/AuditPage.tsx +++ b/apps/meteor/client/views/audit/AuditPage.tsx @@ -2,9 +2,9 @@ import { Margins, States, StatesIcon, StatesSubtitle, StatesTitle, Tabs } from ' import { useTranslation } from '@rocket.chat/ui-contexts'; import React from 'react'; -import { Page, PageHeader, PageScrollableContentWithShadow } from '../../../../client/components/Page'; -import MessageListSkeleton from '../../../../client/components/message/list/MessageListSkeleton'; -import { getErrorMessage } from '../../../../client/lib/errorHandling'; +import { Page, PageHeader, PageScrollableContentWithShadow } from '../../components/Page'; +import MessageListSkeleton from '../../components/message/list/MessageListSkeleton'; +import { getErrorMessage } from '../../lib/errorHandling'; import AuditForm from './components/AuditForm'; import AuditResult from './components/AuditResult'; import { useAuditMutation } from './hooks/useAuditMutation'; diff --git a/apps/meteor/ee/client/views/audit/components/AuditFiltersDisplay.tsx b/apps/meteor/client/views/audit/components/AuditFiltersDisplay.tsx similarity index 92% rename from apps/meteor/ee/client/views/audit/components/AuditFiltersDisplay.tsx rename to apps/meteor/client/views/audit/components/AuditFiltersDisplay.tsx index 2006fa68e47d..dadb59b04777 100644 --- a/apps/meteor/ee/client/views/audit/components/AuditFiltersDisplay.tsx +++ b/apps/meteor/client/views/audit/components/AuditFiltersDisplay.tsx @@ -4,7 +4,7 @@ import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React from 'react'; -import { useFormatDate } from '../../../../../client/hooks/useFormatDate'; +import { useFormatDate } from '../../../hooks/useFormatDate'; type AuditFiltersDisplayProps = { users?: IUser['username'][]; diff --git a/apps/meteor/ee/client/views/audit/components/AuditForm.tsx b/apps/meteor/client/views/audit/components/AuditForm.tsx similarity index 100% rename from apps/meteor/ee/client/views/audit/components/AuditForm.tsx rename to apps/meteor/client/views/audit/components/AuditForm.tsx diff --git a/apps/meteor/ee/client/views/audit/components/AuditLogEntry.tsx b/apps/meteor/client/views/audit/components/AuditLogEntry.tsx similarity index 91% rename from apps/meteor/ee/client/views/audit/components/AuditLogEntry.tsx rename to apps/meteor/client/views/audit/components/AuditLogEntry.tsx index 3a68f239d647..0ec56c1e5652 100644 --- a/apps/meteor/ee/client/views/audit/components/AuditLogEntry.tsx +++ b/apps/meteor/client/views/audit/components/AuditLogEntry.tsx @@ -5,8 +5,8 @@ import { UserAvatar } from '@rocket.chat/ui-avatar'; import type { ReactElement } from 'react'; import React, { memo, useMemo } from 'react'; -import { GenericTableRow, GenericTableCell } from '../../../../../client/components/GenericTable'; -import { useFormatDateAndTime } from '../../../../../client/hooks/useFormatDateAndTime'; +import { GenericTableRow, GenericTableCell } from '../../../components/GenericTable'; +import { useFormatDateAndTime } from '../../../hooks/useFormatDateAndTime'; import AuditFiltersDisplay from './AuditFiltersDisplay'; type AuditLogEntryProps = { value: IAuditLog }; diff --git a/apps/meteor/ee/client/views/audit/components/AuditLogTable.tsx b/apps/meteor/client/views/audit/components/AuditLogTable.tsx similarity index 94% rename from apps/meteor/ee/client/views/audit/components/AuditLogTable.tsx rename to apps/meteor/client/views/audit/components/AuditLogTable.tsx index d51926fb574c..faf650e903de 100644 --- a/apps/meteor/ee/client/views/audit/components/AuditLogTable.tsx +++ b/apps/meteor/client/views/audit/components/AuditLogTable.tsx @@ -4,14 +4,14 @@ import { useQuery } from '@tanstack/react-query'; import type { ReactElement } from 'react'; import React, { useState } from 'react'; -import GenericNoResults from '../../../../../client/components/GenericNoResults'; +import GenericNoResults from '../../../components/GenericNoResults'; import { GenericTable, GenericTableHeaderCell, GenericTableBody, GenericTableLoadingRow, GenericTableHeader, -} from '../../../../../client/components/GenericTable'; +} from '../../../components/GenericTable'; import { createEndOfToday, createStartOfToday } from '../utils/dateRange'; import type { DateRange } from '../utils/dateRange'; import AuditLogEntry from './AuditLogEntry'; diff --git a/apps/meteor/ee/client/views/audit/components/AuditMessageList.tsx b/apps/meteor/client/views/audit/components/AuditMessageList.tsx similarity index 74% rename from apps/meteor/ee/client/views/audit/components/AuditMessageList.tsx rename to apps/meteor/client/views/audit/components/AuditMessageList.tsx index 0009205d3e7a..49faa7bdeecc 100644 --- a/apps/meteor/ee/client/views/audit/components/AuditMessageList.tsx +++ b/apps/meteor/client/views/audit/components/AuditMessageList.tsx @@ -4,11 +4,11 @@ import { useUserPreference } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React, { Fragment, memo } from 'react'; -import { MessageTypes } from '../../../../../app/ui-utils/client'; -import RoomMessage from '../../../../../client/components/message/variants/RoomMessage'; -import SystemMessage from '../../../../../client/components/message/variants/SystemMessage'; -import { useFormatDate } from '../../../../../client/hooks/useFormatDate'; -import { isMessageNewDay } from '../../../../../client/views/room/MessageList/lib/isMessageNewDay'; +import { MessageTypes } from '../../../../app/ui-utils/client'; +import RoomMessage from '../../../components/message/variants/RoomMessage'; +import SystemMessage from '../../../components/message/variants/SystemMessage'; +import { useFormatDate } from '../../../hooks/useFormatDate'; +import { isMessageNewDay } from '../../room/MessageList/lib/isMessageNewDay'; type AuditMessageListProps = { messages: IMessage[]; diff --git a/apps/meteor/ee/client/views/audit/components/AuditResult.tsx b/apps/meteor/client/views/audit/components/AuditResult.tsx similarity index 87% rename from apps/meteor/ee/client/views/audit/components/AuditResult.tsx rename to apps/meteor/client/views/audit/components/AuditResult.tsx index 99b2b3212674..79b904d38f97 100644 --- a/apps/meteor/ee/client/views/audit/components/AuditResult.tsx +++ b/apps/meteor/client/views/audit/components/AuditResult.tsx @@ -2,7 +2,7 @@ import type { IMessage } from '@rocket.chat/core-typings'; import type { ReactElement } from 'react'; import React, { memo } from 'react'; -import GenericNoResults from '../../../../../client/components/GenericNoResults'; +import GenericNoResults from '../../../components/GenericNoResults'; import AuditMessageList from './AuditMessageList'; type AuditResultProps = { diff --git a/apps/meteor/ee/client/views/audit/components/forms/DateRangePicker.tsx b/apps/meteor/client/views/audit/components/forms/DateRangePicker.tsx similarity index 100% rename from apps/meteor/ee/client/views/audit/components/forms/DateRangePicker.tsx rename to apps/meteor/client/views/audit/components/forms/DateRangePicker.tsx diff --git a/apps/meteor/ee/client/views/audit/components/forms/VisitorAutoComplete.tsx b/apps/meteor/client/views/audit/components/forms/VisitorAutoComplete.tsx similarity index 100% rename from apps/meteor/ee/client/views/audit/components/forms/VisitorAutoComplete.tsx rename to apps/meteor/client/views/audit/components/forms/VisitorAutoComplete.tsx diff --git a/apps/meteor/ee/client/views/audit/components/tabs/DirectTab.tsx b/apps/meteor/client/views/audit/components/tabs/DirectTab.tsx similarity index 93% rename from apps/meteor/ee/client/views/audit/components/tabs/DirectTab.tsx rename to apps/meteor/client/views/audit/components/tabs/DirectTab.tsx index 58facbb3bd42..1eb5e1aaf99d 100644 --- a/apps/meteor/ee/client/views/audit/components/tabs/DirectTab.tsx +++ b/apps/meteor/client/views/audit/components/tabs/DirectTab.tsx @@ -5,7 +5,7 @@ import React from 'react'; import type { UseFormReturn } from 'react-hook-form'; import { useController } from 'react-hook-form'; -import UserAutoCompleteMultiple from '../../../../../../client/components/UserAutoCompleteMultiple'; +import UserAutoCompleteMultiple from '../../../../components/UserAutoCompleteMultiple'; import type { AuditFields } from '../../hooks/useAuditForm'; type DirectTabProps = { diff --git a/apps/meteor/ee/client/views/audit/components/tabs/OmnichannelTab.tsx b/apps/meteor/client/views/audit/components/tabs/OmnichannelTab.tsx similarity index 96% rename from apps/meteor/ee/client/views/audit/components/tabs/OmnichannelTab.tsx rename to apps/meteor/client/views/audit/components/tabs/OmnichannelTab.tsx index 772880fd6c21..5381376eb57f 100644 --- a/apps/meteor/ee/client/views/audit/components/tabs/OmnichannelTab.tsx +++ b/apps/meteor/client/views/audit/components/tabs/OmnichannelTab.tsx @@ -5,7 +5,7 @@ import React from 'react'; import type { UseFormReturn } from 'react-hook-form'; import { useController } from 'react-hook-form'; -import AutoCompleteAgent from '../../../../../../client/components/AutoCompleteAgent'; +import AutoCompleteAgent from '../../../../components/AutoCompleteAgent'; import type { AuditFields } from '../../hooks/useAuditForm'; import VisitorAutoComplete from '../forms/VisitorAutoComplete'; diff --git a/apps/meteor/ee/client/views/audit/components/tabs/RoomsTab.tsx b/apps/meteor/client/views/audit/components/tabs/RoomsTab.tsx similarity index 93% rename from apps/meteor/ee/client/views/audit/components/tabs/RoomsTab.tsx rename to apps/meteor/client/views/audit/components/tabs/RoomsTab.tsx index 039bc5d05966..d95d82d0e8ce 100644 --- a/apps/meteor/ee/client/views/audit/components/tabs/RoomsTab.tsx +++ b/apps/meteor/client/views/audit/components/tabs/RoomsTab.tsx @@ -4,7 +4,7 @@ import React from 'react'; import type { UseFormReturn } from 'react-hook-form'; import { useController } from 'react-hook-form'; -import RoomAutoComplete from '../../../../../../client/components/RoomAutoComplete'; +import RoomAutoComplete from '../../../../components/RoomAutoComplete'; import type { AuditFields } from '../../hooks/useAuditForm'; type RoomsTabProps = { diff --git a/apps/meteor/ee/client/views/audit/components/tabs/UsersTab.tsx b/apps/meteor/client/views/audit/components/tabs/UsersTab.tsx similarity index 93% rename from apps/meteor/ee/client/views/audit/components/tabs/UsersTab.tsx rename to apps/meteor/client/views/audit/components/tabs/UsersTab.tsx index 75e769baa71d..c1ed01e1c4d3 100644 --- a/apps/meteor/ee/client/views/audit/components/tabs/UsersTab.tsx +++ b/apps/meteor/client/views/audit/components/tabs/UsersTab.tsx @@ -5,7 +5,7 @@ import React from 'react'; import type { UseFormReturn } from 'react-hook-form'; import { useController } from 'react-hook-form'; -import UserAutoCompleteMultiple from '../../../../../../client/components/UserAutoCompleteMultiple'; +import UserAutoCompleteMultiple from '../../../../components/UserAutoCompleteMultiple'; import type { AuditFields } from '../../hooks/useAuditForm'; type UsersTabProps = { diff --git a/apps/meteor/ee/client/views/audit/hooks/useAuditForm.ts b/apps/meteor/client/views/audit/hooks/useAuditForm.ts similarity index 100% rename from apps/meteor/ee/client/views/audit/hooks/useAuditForm.ts rename to apps/meteor/client/views/audit/hooks/useAuditForm.ts diff --git a/apps/meteor/ee/client/views/audit/hooks/useAuditMutation.ts b/apps/meteor/client/views/audit/hooks/useAuditMutation.ts similarity index 100% rename from apps/meteor/ee/client/views/audit/hooks/useAuditMutation.ts rename to apps/meteor/client/views/audit/hooks/useAuditMutation.ts diff --git a/apps/meteor/ee/client/views/audit/hooks/useAuditTab.ts b/apps/meteor/client/views/audit/hooks/useAuditTab.ts similarity index 100% rename from apps/meteor/ee/client/views/audit/hooks/useAuditTab.ts rename to apps/meteor/client/views/audit/hooks/useAuditTab.ts diff --git a/apps/meteor/ee/client/views/audit/hooks/useSendTelemetryMutation.ts b/apps/meteor/client/views/audit/hooks/useSendTelemetryMutation.ts similarity index 100% rename from apps/meteor/ee/client/views/audit/hooks/useSendTelemetryMutation.ts rename to apps/meteor/client/views/audit/hooks/useSendTelemetryMutation.ts diff --git a/apps/meteor/ee/client/views/audit/utils/dateRange.ts b/apps/meteor/client/views/audit/utils/dateRange.ts similarity index 100% rename from apps/meteor/ee/client/views/audit/utils/dateRange.ts rename to apps/meteor/client/views/audit/utils/dateRange.ts diff --git a/apps/meteor/client/views/marketplace/AppDetailsPage/AppDetailsPage.tsx b/apps/meteor/client/views/marketplace/AppDetailsPage/AppDetailsPage.tsx index 28eb55245a4c..f594dcfa1f21 100644 --- a/apps/meteor/client/views/marketplace/AppDetailsPage/AppDetailsPage.tsx +++ b/apps/meteor/client/views/marketplace/AppDetailsPage/AppDetailsPage.tsx @@ -7,7 +7,7 @@ import type { ReactElement } from 'react'; import React, { useMemo, useCallback } from 'react'; import { FormProvider, useForm } from 'react-hook-form'; -import { AppClientOrchestratorInstance } from '../../../../ee/client/apps/orchestrator'; +import { AppClientOrchestratorInstance } from '../../../apps/orchestrator'; import { Page, PageFooter, PageHeader, PageScrollableContentWithShadow } from '../../../components/Page'; import { handleAPIError } from '../helpers/handleAPIError'; import { useAppInfo } from '../hooks/useAppInfo'; diff --git a/apps/meteor/client/views/marketplace/AppDetailsPage/AppDetailsPageTabs.tsx b/apps/meteor/client/views/marketplace/AppDetailsPage/AppDetailsPageTabs.tsx index e54613dc5cd8..444e1bf3123a 100644 --- a/apps/meteor/client/views/marketplace/AppDetailsPage/AppDetailsPageTabs.tsx +++ b/apps/meteor/client/views/marketplace/AppDetailsPage/AppDetailsPageTabs.tsx @@ -3,7 +3,7 @@ import { usePermission, useRouter, useTranslation } from '@rocket.chat/ui-contex import type { ReactElement } from 'react'; import React from 'react'; -import type { ISettings } from '../../../../ee/client/apps/@types/IOrchestrator'; +import type { ISettings } from '../../../apps/@types/IOrchestrator'; type AppDetailsPageTabsProps = { context: string; diff --git a/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppSettings/AppSettings.tsx b/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppSettings/AppSettings.tsx index edfae67251fe..00dc564ed05d 100644 --- a/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppSettings/AppSettings.tsx +++ b/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppSettings/AppSettings.tsx @@ -2,7 +2,7 @@ import { Box, FieldGroup } from '@rocket.chat/fuselage'; import { useTranslation } from '@rocket.chat/ui-contexts'; import React from 'react'; -import type { ISettings } from '../../../../../../ee/client/apps/@types/IOrchestrator'; +import type { ISettings } from '../../../../../apps/@types/IOrchestrator'; import AppSetting from './AppSetting'; const AppSettings = ({ settings }: { settings: ISettings }) => { diff --git a/apps/meteor/client/views/marketplace/definitions/AppInfo.ts b/apps/meteor/client/views/marketplace/definitions/AppInfo.ts index 1898538d784f..87d1d7e10d23 100644 --- a/apps/meteor/client/views/marketplace/definitions/AppInfo.ts +++ b/apps/meteor/client/views/marketplace/definitions/AppInfo.ts @@ -1,7 +1,7 @@ import type { IApiEndpointMetadata } from '@rocket.chat/apps-engine/definition/api'; import type { AppScreenshot } from '@rocket.chat/core-typings'; -import type { ISettings } from '../../../../ee/client/apps/@types/IOrchestrator'; +import type { ISettings } from '../../../apps/@types/IOrchestrator'; import type { App } from '../types'; export type AppInfo = App & { diff --git a/apps/meteor/client/views/marketplace/helpers/installApp.ts b/apps/meteor/client/views/marketplace/helpers/installApp.ts index ed909b571a21..1021ab16ffd9 100644 --- a/apps/meteor/client/views/marketplace/helpers/installApp.ts +++ b/apps/meteor/client/views/marketplace/helpers/installApp.ts @@ -1,6 +1,6 @@ import type { App, AppPermission } from '@rocket.chat/core-typings'; -import { AppClientOrchestratorInstance } from '../../../../ee/client/apps/orchestrator'; +import { AppClientOrchestratorInstance } from '../../../apps/orchestrator'; import { handleAPIError } from './handleAPIError'; import { warnAppInstall } from './warnAppInstall'; diff --git a/apps/meteor/client/views/marketplace/helpers/updateApp.ts b/apps/meteor/client/views/marketplace/helpers/updateApp.ts index fbcc3a2d5fa3..076478717ad4 100644 --- a/apps/meteor/client/views/marketplace/helpers/updateApp.ts +++ b/apps/meteor/client/views/marketplace/helpers/updateApp.ts @@ -1,6 +1,6 @@ import type { App, AppPermission } from '@rocket.chat/core-typings'; -import { AppClientOrchestratorInstance } from '../../../../ee/client/apps/orchestrator'; +import { AppClientOrchestratorInstance } from '../../../apps/orchestrator'; import { handleAPIError } from './handleAPIError'; import { warnStatusChange } from './warnStatusChange'; diff --git a/apps/meteor/client/views/marketplace/hooks/useAppInfo.ts b/apps/meteor/client/views/marketplace/hooks/useAppInfo.ts index 44ab240ce7b3..f544e2f25b83 100644 --- a/apps/meteor/client/views/marketplace/hooks/useAppInfo.ts +++ b/apps/meteor/client/views/marketplace/hooks/useAppInfo.ts @@ -2,8 +2,8 @@ import type { App } from '@rocket.chat/core-typings'; import { useEndpoint } from '@rocket.chat/ui-contexts'; import { useState, useEffect, useContext } from 'react'; -import type { ISettings } from '../../../../ee/client/apps/@types/IOrchestrator'; -import { AppClientOrchestratorInstance } from '../../../../ee/client/apps/orchestrator'; +import type { ISettings } from '../../../apps/@types/IOrchestrator'; +import { AppClientOrchestratorInstance } from '../../../apps/orchestrator'; import { AppsContext } from '../../../contexts/AppsContext'; import type { AppInfo } from '../definitions/AppInfo'; diff --git a/apps/meteor/client/views/marketplace/hooks/useCategories.ts b/apps/meteor/client/views/marketplace/hooks/useCategories.ts index bf7a022f2ae3..2a6b612470b5 100644 --- a/apps/meteor/client/views/marketplace/hooks/useCategories.ts +++ b/apps/meteor/client/views/marketplace/hooks/useCategories.ts @@ -1,7 +1,7 @@ import { useTranslation } from '@rocket.chat/ui-contexts'; import { useCallback, useEffect, useMemo, useState } from 'react'; -import { AppClientOrchestratorInstance } from '../../../../ee/client/apps/orchestrator'; +import { AppClientOrchestratorInstance } from '../../../apps/orchestrator'; import type { CategoryDropDownGroups, CategoryDropdownItem, diff --git a/apps/meteor/client/views/marketplace/hooks/useInstallApp.tsx b/apps/meteor/client/views/marketplace/hooks/useInstallApp.tsx index 78a0283ef8a9..f10d3e989e0a 100644 --- a/apps/meteor/client/views/marketplace/hooks/useInstallApp.tsx +++ b/apps/meteor/client/views/marketplace/hooks/useInstallApp.tsx @@ -3,7 +3,7 @@ import { useRouter, useSetModal, useUpload, useEndpoint } from '@rocket.chat/ui- import { useMutation } from '@tanstack/react-query'; import React, { useCallback, useState } from 'react'; -import { AppClientOrchestratorInstance } from '../../../../ee/client/apps/orchestrator'; +import { AppClientOrchestratorInstance } from '../../../apps/orchestrator'; import { useAppsReload } from '../../../contexts/hooks/useAppsReload'; import { useExternalLink } from '../../../hooks/useExternalLink'; import { useCheckoutUrl } from '../../admin/subscription/hooks/useCheckoutUrl'; diff --git a/apps/meteor/client/views/omnichannel/additionalForms.tsx b/apps/meteor/client/views/omnichannel/additionalForms.tsx index 9978aba5586d..824b5eb69694 100644 --- a/apps/meteor/client/views/omnichannel/additionalForms.tsx +++ b/apps/meteor/client/views/omnichannel/additionalForms.tsx @@ -1,16 +1,16 @@ -import BusinessHoursMultiple from '../../../ee/client/omnichannel/additionalForms/BusinessHoursMultiple'; -import ContactManager from '../../../ee/client/omnichannel/additionalForms/ContactManager'; -import CurrentChatTags from '../../../ee/client/omnichannel/additionalForms/CurrentChatTags'; -import CustomFieldsAdditionalForm from '../../../ee/client/omnichannel/additionalForms/CustomFieldsAdditionalForm'; -import DepartmentBusinessHours from '../../../ee/client/omnichannel/additionalForms/DepartmentBusinessHours'; -import DepartmentForwarding from '../../../ee/client/omnichannel/additionalForms/DepartmentForwarding'; -import EeNumberInput from '../../../ee/client/omnichannel/additionalForms/EeNumberInput'; -import EeTextAreaInput from '../../../ee/client/omnichannel/additionalForms/EeTextAreaInput'; -import EeTextInput from '../../../ee/client/omnichannel/additionalForms/EeTextInput'; -import MaxChatsPerAgent from '../../../ee/client/omnichannel/additionalForms/MaxChatsPerAgent'; -import MaxChatsPerAgentDisplay from '../../../ee/client/omnichannel/additionalForms/MaxChatsPerAgentDisplay'; -import PrioritiesSelect from '../../../ee/client/omnichannel/additionalForms/PrioritiesSelect'; -import SlaPoliciesSelect from '../../../ee/client/omnichannel/additionalForms/SlaPoliciesSelect'; +import BusinessHoursMultiple from '../../omnichannel/additionalForms/BusinessHoursMultiple'; +import ContactManager from '../../omnichannel/additionalForms/ContactManager'; +import CurrentChatTags from '../../omnichannel/additionalForms/CurrentChatTags'; +import CustomFieldsAdditionalForm from '../../omnichannel/additionalForms/CustomFieldsAdditionalForm'; +import DepartmentBusinessHours from '../../omnichannel/additionalForms/DepartmentBusinessHours'; +import DepartmentForwarding from '../../omnichannel/additionalForms/DepartmentForwarding'; +import EeNumberInput from '../../omnichannel/additionalForms/EeNumberInput'; +import EeTextAreaInput from '../../omnichannel/additionalForms/EeTextAreaInput'; +import EeTextInput from '../../omnichannel/additionalForms/EeTextInput'; +import MaxChatsPerAgent from '../../omnichannel/additionalForms/MaxChatsPerAgent'; +import MaxChatsPerAgentDisplay from '../../omnichannel/additionalForms/MaxChatsPerAgentDisplay'; +import PrioritiesSelect from '../../omnichannel/additionalForms/PrioritiesSelect'; +import SlaPoliciesSelect from '../../omnichannel/additionalForms/SlaPoliciesSelect'; export { CustomFieldsAdditionalForm, diff --git a/apps/meteor/client/views/omnichannel/appearance/AppearanceFieldLabel.tsx b/apps/meteor/client/views/omnichannel/appearance/AppearanceFieldLabel.tsx index ba8b54aeaccf..9bca1e6589c4 100644 --- a/apps/meteor/client/views/omnichannel/appearance/AppearanceFieldLabel.tsx +++ b/apps/meteor/client/views/omnichannel/appearance/AppearanceFieldLabel.tsx @@ -3,7 +3,7 @@ import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ComponentProps } from 'react'; import React from 'react'; -import { useHasLicenseModule } from '../../../../ee/client/hooks/useHasLicenseModule'; +import { useHasLicenseModule } from '../../../hooks/useHasLicenseModule'; type FieldLabelProps = ComponentProps & { premium?: boolean; diff --git a/apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx b/apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx index 91c8d20f49f7..4253ff023ee9 100644 --- a/apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx +++ b/apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx @@ -18,8 +18,8 @@ import type { ChangeEvent } from 'react'; import React from 'react'; import { Controller, useFormContext } from 'react-hook-form'; -import { useHasLicenseModule } from '../../../../ee/client/hooks/useHasLicenseModule'; import MarkdownText from '../../../components/MarkdownText'; +import { useHasLicenseModule } from '../../../hooks/useHasLicenseModule'; import FieldLabel from './AppearanceFieldLabel'; const AppearanceForm = () => { diff --git a/apps/meteor/client/views/omnichannel/businessHours/BusinessHoursMultiplePage.tsx b/apps/meteor/client/views/omnichannel/businessHours/BusinessHoursMultiplePage.tsx index 1d6c40d58255..64703e487a90 100644 --- a/apps/meteor/client/views/omnichannel/businessHours/BusinessHoursMultiplePage.tsx +++ b/apps/meteor/client/views/omnichannel/businessHours/BusinessHoursMultiplePage.tsx @@ -8,7 +8,7 @@ const BusinessHoursMultiplePage = () => { const t = useTranslation(); const router = useRouter(); - const BusinessHoursTable = useMemo(() => lazy(() => import('../../../../ee/client/omnichannel/businessHours/BusinessHoursTable')), []); + const BusinessHoursTable = useMemo(() => lazy(() => import('../../../omnichannel/businessHours/BusinessHoursTable')), []); return ( diff --git a/apps/meteor/client/views/omnichannel/businessHours/EditBusinessHours.tsx b/apps/meteor/client/views/omnichannel/businessHours/EditBusinessHours.tsx index f6ef54c1fbb6..7700487ad3be 100644 --- a/apps/meteor/client/views/omnichannel/businessHours/EditBusinessHours.tsx +++ b/apps/meteor/client/views/omnichannel/businessHours/EditBusinessHours.tsx @@ -5,8 +5,8 @@ import { useToastMessageDispatch, useMethod, useTranslation, useRouter } from '@ import React from 'react'; import { FormProvider, useForm } from 'react-hook-form'; -import { useRemoveBusinessHour } from '../../../../ee/client/omnichannel/businessHours/useRemoveBusinessHour'; import { Page, PageFooter, PageHeader, PageScrollableContentWithShadow } from '../../../components/Page'; +import { useRemoveBusinessHour } from '../../../omnichannel/businessHours/useRemoveBusinessHour'; import type { BusinessHoursFormData } from './BusinessHoursForm'; import BusinessHoursForm from './BusinessHoursForm'; import { defaultWorkHours } from './mapBusinessHoursForm'; diff --git a/apps/meteor/client/views/omnichannel/currentChats/CurrentChatsPage.tsx b/apps/meteor/client/views/omnichannel/currentChats/CurrentChatsPage.tsx index f209fa638d86..95fb9a54c3ce 100644 --- a/apps/meteor/client/views/omnichannel/currentChats/CurrentChatsPage.tsx +++ b/apps/meteor/client/views/omnichannel/currentChats/CurrentChatsPage.tsx @@ -7,9 +7,6 @@ import moment from 'moment'; import type { ComponentProps, ReactElement } from 'react'; import React, { memo, useCallback, useMemo, useState } from 'react'; -import { RoomActivityIcon } from '../../../../ee/client/omnichannel/components/RoomActivityIcon'; -import { useOmnichannelPriorities } from '../../../../ee/client/omnichannel/hooks/useOmnichannelPriorities'; -import { PriorityIcon } from '../../../../ee/client/omnichannel/priorities/PriorityIcon'; import GenericNoResults from '../../../components/GenericNoResults'; import { GenericTable, @@ -24,6 +21,9 @@ import { usePagination } from '../../../components/GenericTable/hooks/usePaginat import { useSort } from '../../../components/GenericTable/hooks/useSort'; import { Page, PageHeader, PageContent } from '../../../components/Page'; import { useIsOverMacLimit } from '../../../hooks/omnichannel/useIsOverMacLimit'; +import { RoomActivityIcon } from '../../../omnichannel/components/RoomActivityIcon'; +import { useOmnichannelPriorities } from '../../../omnichannel/hooks/useOmnichannelPriorities'; +import { PriorityIcon } from '../../../omnichannel/priorities/PriorityIcon'; import CustomFieldsList from './CustomFieldsList'; import FilterByText from './FilterByText'; import RemoveChatButton from './RemoveChatButton'; diff --git a/apps/meteor/client/views/omnichannel/departments/EditDepartment.tsx b/apps/meteor/client/views/omnichannel/departments/EditDepartment.tsx index 74763121e000..c1aed1dbe7ae 100644 --- a/apps/meteor/client/views/omnichannel/departments/EditDepartment.tsx +++ b/apps/meteor/client/views/omnichannel/departments/EditDepartment.tsx @@ -23,11 +23,11 @@ import { useQueryClient } from '@tanstack/react-query'; import React, { useMemo, useState } from 'react'; import { Controller, useForm } from 'react-hook-form'; -import { useHasLicenseModule } from '../../../../ee/client/hooks/useHasLicenseModule'; import { validateEmail } from '../../../../lib/emailValidator'; import AutoCompleteDepartment from '../../../components/AutoCompleteDepartment'; import { Page, PageHeader, PageScrollableContentWithShadow } from '../../../components/Page'; import { useRecordList } from '../../../hooks/lists/useRecordList'; +import { useHasLicenseModule } from '../../../hooks/useHasLicenseModule'; import { useRoomsList } from '../../../hooks/useRoomsList'; import { AsyncStatePhase } from '../../../lib/asyncState'; import { EeTextInput, EeTextAreaInput, EeNumberInput, DepartmentForwarding, DepartmentBusinessHours } from '../additionalForms'; diff --git a/apps/meteor/client/views/omnichannel/directory/chats/contextualBar/RoomEdit/RoomEdit.tsx b/apps/meteor/client/views/omnichannel/directory/chats/contextualBar/RoomEdit/RoomEdit.tsx index 3ad7a04bb87c..62857967167d 100644 --- a/apps/meteor/client/views/omnichannel/directory/chats/contextualBar/RoomEdit/RoomEdit.tsx +++ b/apps/meteor/client/views/omnichannel/directory/chats/contextualBar/RoomEdit/RoomEdit.tsx @@ -7,9 +7,9 @@ import React, { useCallback } from 'react'; import { useController, useForm } from 'react-hook-form'; import { hasAtLeastOnePermission } from '../../../../../../../app/authorization/client'; -import { useOmnichannelPriorities } from '../../../../../../../ee/client/omnichannel/hooks/useOmnichannelPriorities'; import { ContextualbarFooter, ContextualbarScrollableContent } from '../../../../../../components/Contextualbar'; import Tags from '../../../../../../components/Omnichannel/Tags'; +import { useOmnichannelPriorities } from '../../../../../../omnichannel/hooks/useOmnichannelPriorities'; import { SlaPoliciesSelect, PrioritiesSelect } from '../../../../additionalForms'; import { FormSkeleton } from '../../../components/FormSkeleton'; import { useCustomFieldsMetadata } from '../../../hooks/useCustomFieldsMetadata'; diff --git a/apps/meteor/client/views/omnichannel/directory/contacts/contextualBar/ContactInfo.tsx b/apps/meteor/client/views/omnichannel/directory/contacts/contextualBar/ContactInfo.tsx index f16f70c76446..184006a745c4 100644 --- a/apps/meteor/client/views/omnichannel/directory/contacts/contextualBar/ContactInfo.tsx +++ b/apps/meteor/client/views/omnichannel/directory/contacts/contextualBar/ContactInfo.tsx @@ -7,12 +7,12 @@ import { useQuery } from '@tanstack/react-query'; import React, { useCallback } from 'react'; import { useSyncExternalStore } from 'use-sync-external-store/shim'; -import ContactManagerInfo from '../../../../../../ee/client/omnichannel/ContactManagerInfo'; import { ContextualbarScrollableContent, ContextualbarFooter } from '../../../../../components/Contextualbar'; import { UserStatus } from '../../../../../components/UserStatus'; import { useIsCallReady } from '../../../../../contexts/CallContext'; import { useFormatDate } from '../../../../../hooks/useFormatDate'; import { parseOutboundPhoneNumber } from '../../../../../lib/voip/parseOutboundPhoneNumber'; +import ContactManagerInfo from '../../../../../omnichannel/ContactManagerInfo'; import AgentInfoDetails from '../../../components/AgentInfoDetails'; import CustomField from '../../../components/CustomField'; import Field from '../../../components/Field'; diff --git a/apps/meteor/client/views/omnichannel/directory/hooks/usePriorityInfo.tsx b/apps/meteor/client/views/omnichannel/directory/hooks/usePriorityInfo.tsx index ae948bbf70d1..e30d352bcba2 100644 --- a/apps/meteor/client/views/omnichannel/directory/hooks/usePriorityInfo.tsx +++ b/apps/meteor/client/views/omnichannel/directory/hooks/usePriorityInfo.tsx @@ -3,7 +3,7 @@ import type { TranslationKey } from '@rocket.chat/ui-contexts'; import { useEndpoint } from '@rocket.chat/ui-contexts'; import { useQuery } from '@tanstack/react-query'; -import { useOmnichannelPriorities } from '../../../../../ee/client/omnichannel/hooks/useOmnichannelPriorities'; +import { useOmnichannelPriorities } from '../../../../omnichannel/hooks/useOmnichannelPriorities'; type ILivechatClientPriority = Serialized & { i18n: TranslationKey; diff --git a/apps/meteor/client/views/omnichannel/directory/hooks/useSlaInfo.tsx b/apps/meteor/client/views/omnichannel/directory/hooks/useSlaInfo.tsx index ba93c05402b4..f1655fb16309 100644 --- a/apps/meteor/client/views/omnichannel/directory/hooks/useSlaInfo.tsx +++ b/apps/meteor/client/views/omnichannel/directory/hooks/useSlaInfo.tsx @@ -1,7 +1,7 @@ import { useEndpoint } from '@rocket.chat/ui-contexts'; import { useQuery } from '@tanstack/react-query'; -import { useHasLicenseModule } from '../../../../../ee/client/hooks/useHasLicenseModule'; +import { useHasLicenseModule } from '../../../../hooks/useHasLicenseModule'; export const useSlaInfo = (slaId: string) => { const isEnterprise = useHasLicenseModule('livechat-enterprise') === true; diff --git a/apps/meteor/client/views/omnichannel/directory/hooks/useSlaPolicies.tsx b/apps/meteor/client/views/omnichannel/directory/hooks/useSlaPolicies.tsx index 50a7c00d1c43..bbf222f76310 100644 --- a/apps/meteor/client/views/omnichannel/directory/hooks/useSlaPolicies.tsx +++ b/apps/meteor/client/views/omnichannel/directory/hooks/useSlaPolicies.tsx @@ -2,7 +2,7 @@ import { useEndpoint } from '@rocket.chat/ui-contexts'; import { useQuery } from '@tanstack/react-query'; import { millisecondsToMinutes } from 'date-fns'; -import { useHasLicenseModule } from '../../../../../ee/client/hooks/useHasLicenseModule'; +import { useHasLicenseModule } from '../../../../hooks/useHasLicenseModule'; export const useSlaPolicies = () => { const isEnterprise = useHasLicenseModule('livechat-enterprise') === true; diff --git a/apps/meteor/client/views/omnichannel/routes.ts b/apps/meteor/client/views/omnichannel/routes.ts index 11de2598e6a3..f71ab5c76ea0 100644 --- a/apps/meteor/client/views/omnichannel/routes.ts +++ b/apps/meteor/client/views/omnichannel/routes.ts @@ -118,12 +118,12 @@ registerOmnichannelRoute('/businessHours/:context?/:type?/:id?', { registerOmnichannelRoute('/units/:context?/:id?', { name: 'omnichannel-units', - component: lazy(() => import('../../../ee/client/omnichannel/units/UnitsRoute')), + component: lazy(() => import('../../omnichannel/units/UnitsRoute')), }); registerOmnichannelRoute('/tags/:context?/:id?', { name: 'omnichannel-tags', - component: lazy(() => import('../../../ee/client/omnichannel/tags/TagsRoute')), + component: lazy(() => import('../../omnichannel/tags/TagsRoute')), }); registerOmnichannelRoute('/triggers/:context?/:id?', { diff --git a/apps/meteor/client/views/omnichannel/triggers/actions/ActionForm.tsx b/apps/meteor/client/views/omnichannel/triggers/actions/ActionForm.tsx index ea7aa739cac7..b09ea937b1cd 100644 --- a/apps/meteor/client/views/omnichannel/triggers/actions/ActionForm.tsx +++ b/apps/meteor/client/views/omnichannel/triggers/actions/ActionForm.tsx @@ -18,7 +18,7 @@ import React, { useCallback, useMemo } from 'react'; import type { Control, UseFormTrigger } from 'react-hook-form'; import { Controller, useWatch } from 'react-hook-form'; -import { useHasLicenseModule } from '../../../../../ee/client/hooks/useHasLicenseModule'; +import { useHasLicenseModule } from '../../../../hooks/useHasLicenseModule'; import { type TriggersPayload } from '../EditTrigger'; import { getActionFormFields } from '../utils'; diff --git a/apps/meteor/client/views/omnichannel/triggers/actions/ExternalServiceActionForm.tsx b/apps/meteor/client/views/omnichannel/triggers/actions/ExternalServiceActionForm.tsx index e71e81139950..24ebe2aa5500 100644 --- a/apps/meteor/client/views/omnichannel/triggers/actions/ExternalServiceActionForm.tsx +++ b/apps/meteor/client/views/omnichannel/triggers/actions/ExternalServiceActionForm.tsx @@ -6,7 +6,7 @@ import React from 'react'; import type { Control, UseFormTrigger } from 'react-hook-form'; import { Controller } from 'react-hook-form'; -import { useHasLicenseModule } from '../../../../../ee/client/hooks/useHasLicenseModule'; +import { useHasLicenseModule } from '../../../../hooks/useHasLicenseModule'; import type { TriggersPayload } from '../EditTrigger'; import { useFieldError } from '../hooks'; import { ActionExternalServiceUrl } from './ActionExternalServiceUrl'; diff --git a/apps/meteor/client/views/room/Header/Omnichannel/QuickActions/hooks/useQuickActions.tsx b/apps/meteor/client/views/room/Header/Omnichannel/QuickActions/hooks/useQuickActions.tsx index 0b6453f92ab7..7446d0630b09 100644 --- a/apps/meteor/client/views/room/Header/Omnichannel/QuickActions/hooks/useQuickActions.tsx +++ b/apps/meteor/client/views/room/Header/Omnichannel/QuickActions/hooks/useQuickActions.tsx @@ -13,10 +13,9 @@ import { } from '@rocket.chat/ui-contexts'; import React, { useCallback, useState, useEffect } from 'react'; +import PlaceChatOnHoldModal from '../../../../../../../app/livechat-enterprise/client/components/modals/PlaceChatOnHoldModal'; import { LivechatInquiry } from '../../../../../../../app/livechat/client/collections/LivechatInquiry'; import { LegacyRoomManager } from '../../../../../../../app/ui-utils/client'; -import PlaceChatOnHoldModal from '../../../../../../../ee/app/livechat-enterprise/client/components/modals/PlaceChatOnHoldModal'; -import { useHasLicenseModule } from '../../../../../../../ee/client/hooks/useHasLicenseModule'; import CloseChatModal from '../../../../../../components/Omnichannel/modals/CloseChatModal'; import CloseChatModalData from '../../../../../../components/Omnichannel/modals/CloseChatModalData'; import ForwardChatModal from '../../../../../../components/Omnichannel/modals/ForwardChatModal'; @@ -24,6 +23,7 @@ import ReturnChatQueueModal from '../../../../../../components/Omnichannel/modal import TranscriptModal from '../../../../../../components/Omnichannel/modals/TranscriptModal'; import { useIsRoomOverMacLimit } from '../../../../../../hooks/omnichannel/useIsRoomOverMacLimit'; import { useOmnichannelRouteConfig } from '../../../../../../hooks/omnichannel/useOmnichannelRouteConfig'; +import { useHasLicenseModule } from '../../../../../../hooks/useHasLicenseModule'; import { quickActionHooks } from '../../../../../../ui'; import { useOmnichannelRoom } from '../../../../contexts/RoomContext'; import type { QuickActionsActionConfig } from '../../../../lib/quickActions'; diff --git a/apps/meteor/client/views/room/composer/ComposerFederation/ComposerFederation.tsx b/apps/meteor/client/views/room/composer/ComposerFederation/ComposerFederation.tsx index c71238e6bb5e..497e4e9ff2c4 100644 --- a/apps/meteor/client/views/room/composer/ComposerFederation/ComposerFederation.tsx +++ b/apps/meteor/client/views/room/composer/ComposerFederation/ComposerFederation.tsx @@ -3,7 +3,7 @@ import { useSetting } from '@rocket.chat/ui-contexts'; import React from 'react'; import type { ReactElement } from 'react'; -import { useHasLicenseModule } from '../../../../../ee/client/hooks/useHasLicenseModule'; +import { useHasLicenseModule } from '../../../../hooks/useHasLicenseModule'; import type { ComposerMessageProps } from '../ComposerMessage'; import ComposerMessage from '../ComposerMessage'; import ComposerFederationDisabled from './ComposerFederationDisabled'; diff --git a/apps/meteor/client/views/room/providers/ComposerPopupProvider.tsx b/apps/meteor/client/views/room/providers/ComposerPopupProvider.tsx index 39c2923cc5ea..cb8e74fbe142 100644 --- a/apps/meteor/client/views/room/providers/ComposerPopupProvider.tsx +++ b/apps/meteor/client/views/room/providers/ComposerPopupProvider.tsx @@ -7,11 +7,11 @@ import React, { useMemo } from 'react'; import type { ReactNode } from 'react'; import { hasAtLeastOnePermission } from '../../../../app/authorization/client'; +import { CannedResponse } from '../../../../app/canned-responses/client/collections/CannedResponse'; import { emoji } from '../../../../app/emoji/client'; import { Subscriptions } from '../../../../app/models/client'; import { usersFromRoomMessages } from '../../../../app/ui-message/client/popup/messagePopupConfig'; import { slashCommands } from '../../../../app/utils/client'; -import { CannedResponse } from '../../../../ee/app/canned-responses/client/collections/CannedResponse'; import ComposerBoxPopupCannedResponse from '../composer/ComposerBoxPopupCannedResponse'; import type { ComposerBoxPopupEmojiProps } from '../composer/ComposerBoxPopupEmoji'; import ComposerBoxPopupEmoji from '../composer/ComposerBoxPopupEmoji'; diff --git a/apps/meteor/client/views/root/MainLayout/LoginPage.tsx b/apps/meteor/client/views/root/MainLayout/LoginPage.tsx index 8ef14c4eb2f4..18c3bf34d0ac 100644 --- a/apps/meteor/client/views/root/MainLayout/LoginPage.tsx +++ b/apps/meteor/client/views/root/MainLayout/LoginPage.tsx @@ -4,7 +4,7 @@ import RegistrationRoute from '@rocket.chat/web-ui-registration'; import type { ReactElement, ReactNode } from 'react'; import React from 'react'; -import LoggedOutBanner from '../../../../ee/client/components/deviceManagement/LoggedOutBanner'; +import LoggedOutBanner from '../../../components/deviceManagement/LoggedOutBanner'; import { useIframeLogin } from './useIframeLogin'; const LoginPage = ({ defaultRoute, children }: { defaultRoute?: LoginRoutes; children?: ReactNode }): ReactElement => { diff --git a/apps/meteor/ee/client/voip/components/modals/WrapUpCallModal.tsx b/apps/meteor/client/voip/components/modals/WrapUpCallModal.tsx similarity index 96% rename from apps/meteor/ee/client/voip/components/modals/WrapUpCallModal.tsx rename to apps/meteor/client/voip/components/modals/WrapUpCallModal.tsx index 8c21cf258208..4291b9425d61 100644 --- a/apps/meteor/ee/client/voip/components/modals/WrapUpCallModal.tsx +++ b/apps/meteor/client/voip/components/modals/WrapUpCallModal.tsx @@ -5,7 +5,7 @@ import React, { useEffect } from 'react'; import type { SubmitHandler } from 'react-hook-form'; import { useForm } from 'react-hook-form'; -import Tags from '../../../../../client/components/Omnichannel/Tags'; +import Tags from '../../../components/Omnichannel/Tags'; type WrapUpCallPayload = { comment: string; diff --git a/apps/meteor/ee/client/voip/modal/DialPad/DialInput.tsx b/apps/meteor/client/voip/modal/DialPad/DialInput.tsx similarity index 100% rename from apps/meteor/ee/client/voip/modal/DialPad/DialInput.tsx rename to apps/meteor/client/voip/modal/DialPad/DialInput.tsx diff --git a/apps/meteor/ee/client/voip/modal/DialPad/DialPadModal.stories.tsx b/apps/meteor/client/voip/modal/DialPad/DialPadModal.stories.tsx similarity index 100% rename from apps/meteor/ee/client/voip/modal/DialPad/DialPadModal.stories.tsx rename to apps/meteor/client/voip/modal/DialPad/DialPadModal.stories.tsx diff --git a/apps/meteor/ee/client/voip/modal/DialPad/DialPadModal.tsx b/apps/meteor/client/voip/modal/DialPad/DialPadModal.tsx similarity index 100% rename from apps/meteor/ee/client/voip/modal/DialPad/DialPadModal.tsx rename to apps/meteor/client/voip/modal/DialPad/DialPadModal.tsx diff --git a/apps/meteor/ee/client/voip/modal/DialPad/Pad.tsx b/apps/meteor/client/voip/modal/DialPad/Pad.tsx similarity index 100% rename from apps/meteor/ee/client/voip/modal/DialPad/Pad.tsx rename to apps/meteor/client/voip/modal/DialPad/Pad.tsx diff --git a/apps/meteor/ee/client/voip/modal/DialPad/PadButton.tsx b/apps/meteor/client/voip/modal/DialPad/PadButton.tsx similarity index 100% rename from apps/meteor/ee/client/voip/modal/DialPad/PadButton.tsx rename to apps/meteor/client/voip/modal/DialPad/PadButton.tsx diff --git a/apps/meteor/ee/client/voip/modal/DialPad/hooks/useDialPad.tsx b/apps/meteor/client/voip/modal/DialPad/hooks/useDialPad.tsx similarity index 97% rename from apps/meteor/ee/client/voip/modal/DialPad/hooks/useDialPad.tsx rename to apps/meteor/client/voip/modal/DialPad/hooks/useDialPad.tsx index 49ea36f734ad..8c94ad238ddc 100644 --- a/apps/meteor/ee/client/voip/modal/DialPad/hooks/useDialPad.tsx +++ b/apps/meteor/client/voip/modal/DialPad/hooks/useDialPad.tsx @@ -3,7 +3,7 @@ import type { ChangeEvent, RefCallback } from 'react'; import { useCallback, useEffect, useState } from 'react'; import { useForm } from 'react-hook-form'; -import { useDialModal } from '../../../../../../client/hooks/useDialModal'; +import { useDialModal } from '../../../../hooks/useDialModal'; import { useOutboundDialer } from '../../../../hooks/useOutboundDialer'; import type { PadDigit } from '../Pad'; diff --git a/apps/meteor/ee/client/voip/modal/DialPad/hooks/useEnterKey.tsx b/apps/meteor/client/voip/modal/DialPad/hooks/useEnterKey.tsx similarity index 100% rename from apps/meteor/ee/client/voip/modal/DialPad/hooks/useEnterKey.tsx rename to apps/meteor/client/voip/modal/DialPad/hooks/useEnterKey.tsx diff --git a/apps/meteor/ee/client/voip/modal/DialPad/hooks/useLongPress.tsx b/apps/meteor/client/voip/modal/DialPad/hooks/useLongPress.tsx similarity index 100% rename from apps/meteor/ee/client/voip/modal/DialPad/hooks/useLongPress.tsx rename to apps/meteor/client/voip/modal/DialPad/hooks/useLongPress.tsx diff --git a/apps/meteor/ee/client/voip/modals/DeviceSettingsModal.tsx b/apps/meteor/client/voip/modals/DeviceSettingsModal.tsx similarity index 96% rename from apps/meteor/ee/client/voip/modals/DeviceSettingsModal.tsx rename to apps/meteor/client/voip/modals/DeviceSettingsModal.tsx index 70202a42348b..08d481bc1052 100644 --- a/apps/meteor/ee/client/voip/modals/DeviceSettingsModal.tsx +++ b/apps/meteor/client/voip/modals/DeviceSettingsModal.tsx @@ -13,8 +13,8 @@ import React, { useState } from 'react'; import type { SubmitHandler } from 'react-hook-form'; import { useForm, Controller } from 'react-hook-form'; -import { useChangeAudioInputDevice, useChangeAudioOutputDevice } from '../../../../client/contexts/CallContext'; -import { isSetSinkIdAvailable } from '../../../../client/providers/DeviceProvider/lib/isSetSinkIdAvailable'; +import { useChangeAudioInputDevice, useChangeAudioOutputDevice } from '../../contexts/CallContext'; +import { isSetSinkIdAvailable } from '../../providers/DeviceProvider/lib/isSetSinkIdAvailable'; type FieldValues = { inputDevice: string; diff --git a/apps/meteor/ee/app/authorization/client/index.ts b/apps/meteor/ee/app/authorization/client/index.ts deleted file mode 100644 index 2c4878c041e0..000000000000 --- a/apps/meteor/ee/app/authorization/client/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Meteor } from 'meteor/meteor'; - -import { sdk } from '../../../../app/utils/client/lib/SDKClient'; -import { addRoleRestrictions } from '../lib/addRoleRestrictions'; - -Meteor.startup(async () => { - const result = await sdk.call('license:isEnterprise'); - if (result) { - addRoleRestrictions(); - } -}); diff --git a/apps/meteor/ee/app/authorization/lib/guestPermissions.ts b/apps/meteor/ee/app/authorization/lib/guestPermissions.ts index c36c03342307..7577d6258a5e 100644 --- a/apps/meteor/ee/app/authorization/lib/guestPermissions.ts +++ b/apps/meteor/ee/app/authorization/lib/guestPermissions.ts @@ -1 +1,2 @@ +// This list is currently duplicated on the client code as there's no available API to load it from the server export const guestPermissions = ['view-d-room', 'view-joined-room', 'view-p-room', 'start-discussion']; diff --git a/apps/meteor/ee/app/ecdh/server/ServerSession.ts b/apps/meteor/ee/app/ecdh/server/ServerSession.ts index 24b0f816a454..d7d67fdeba96 100644 --- a/apps/meteor/ee/app/ecdh/server/ServerSession.ts +++ b/apps/meteor/ee/app/ecdh/server/ServerSession.ts @@ -1,4 +1,4 @@ -import { Session } from '../Session'; +import { Session } from '../../../../app/ecdh/Session'; export class ServerSession extends Session { async init(clientPublic: string): Promise { diff --git a/apps/meteor/ee/app/livechat-enterprise/client/messageTypes.ts b/apps/meteor/ee/app/livechat-enterprise/client/messageTypes.ts deleted file mode 100644 index 0ffe5bda1735..000000000000 --- a/apps/meteor/ee/app/livechat-enterprise/client/messageTypes.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { MessageTypes } from '../../../../app/ui-utils/client'; -import { t } from '../../../../app/utils/lib/i18n'; - -MessageTypes.registerType({ - id: 'livechat_transfer_history_fallback', - system: true, - message: 'New_chat_transfer_fallback', - data(message: any) { - if (!message.transferData) { - return { - fallback: 'SHOULD_NEVER_HAPPEN', - }; - } - const from = message.transferData.prevDepartment; - const to = message.transferData.department.name; - - return { - fallback: t('Livechat_transfer_failed_fallback', { from, to }), - }; - }, -}); diff --git a/apps/meteor/ee/client/index.ts b/apps/meteor/ee/client/index.ts deleted file mode 100644 index 243d439801de..000000000000 --- a/apps/meteor/ee/client/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -import '../app/authorization/client'; -import '../app/canned-responses/client'; -import '../app/license/client'; -import '../app/livechat-enterprise/client'; -import './omnichannel'; -import './startup'; diff --git a/apps/meteor/ee/client/omnichannel/hooks/useOmnichannelPriorities.ts b/apps/meteor/ee/client/omnichannel/hooks/useOmnichannelPriorities.ts deleted file mode 100644 index 9aba7d3318d7..000000000000 --- a/apps/meteor/ee/client/omnichannel/hooks/useOmnichannelPriorities.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { useOmnichannel } from '../../../../client/hooks/omnichannel/useOmnichannel'; - -export const useOmnichannelPriorities = () => useOmnichannel().livechatPriorities; diff --git a/apps/meteor/ee/client/startup/index.ts b/apps/meteor/ee/client/startup/index.ts deleted file mode 100644 index 89c85969aeef..000000000000 --- a/apps/meteor/ee/client/startup/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import './audit'; -import './deviceManagement'; -import './slashCommands'; -import './readReceipt'; diff --git a/apps/meteor/ee/client/startup/slashCommands/federation.ts b/apps/meteor/ee/client/startup/slashCommands/federation.ts deleted file mode 100644 index aec1f27dd43a..000000000000 --- a/apps/meteor/ee/client/startup/slashCommands/federation.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { slashCommands } from '../../../../app/utils/lib/slashCommand'; - -const callback = undefined; -const result = undefined; -const providesPreview = false; -const previewer = undefined; -const previewCallback = undefined; - -slashCommands.add({ - command: 'federation', - callback, - options: { - description: 'Federation_slash_commands', - params: '#command (dm) #user', - }, - result, - providesPreview, - previewer, - previewCallback, -}); diff --git a/apps/meteor/ee/client/startup/slashCommands/index.ts b/apps/meteor/ee/client/startup/slashCommands/index.ts deleted file mode 100644 index a20afa9f4845..000000000000 --- a/apps/meteor/ee/client/startup/slashCommands/index.ts +++ /dev/null @@ -1 +0,0 @@ -import './federation'; From 526cbf15fdea94e989bf4ad288a3c616a3ce7d9f Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Fri, 24 May 2024 10:07:27 -0300 Subject: [PATCH 11/35] fix: Re-login same browser tab issues (#32479) --- .changeset/smooth-knives-turn.md | 7 ++ .../client/models/CachedCollection.ts | 8 +- apps/meteor/app/utils/client/lib/SDKClient.ts | 10 ++- .../providers/UserProvider/UserProvider.tsx | 7 ++ ...mnichannel-manual-selection-logout.spec.ts | 74 +++++++++++++++++++ 5 files changed, 98 insertions(+), 8 deletions(-) create mode 100644 .changeset/smooth-knives-turn.md create mode 100644 apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts diff --git a/.changeset/smooth-knives-turn.md b/.changeset/smooth-knives-turn.md new file mode 100644 index 000000000000..3964ecc8481b --- /dev/null +++ b/.changeset/smooth-knives-turn.md @@ -0,0 +1,7 @@ +--- +"@rocket.chat/meteor": patch +--- + +Executing a logout and login action in the same "tab/instance", some streams were not being recreated, causing countless types of bugs. + +PS: as a workaround reloading after logout or login in also solves the problem. diff --git a/apps/meteor/app/ui-cached-collection/client/models/CachedCollection.ts b/apps/meteor/app/ui-cached-collection/client/models/CachedCollection.ts index 77190992612a..545e1e73342d 100644 --- a/apps/meteor/app/ui-cached-collection/client/models/CachedCollection.ts +++ b/apps/meteor/app/ui-cached-collection/client/models/CachedCollection.ts @@ -356,12 +356,6 @@ export class CachedCollection extends Emitter< this.trySync(); }); - if (!this.userRelated) { - return this.setupListener(); - } - - CachedCollectionManager.onLogin(async () => { - await this.setupListener(); - }); + return this.setupListener(); } } diff --git a/apps/meteor/app/utils/client/lib/SDKClient.ts b/apps/meteor/app/utils/client/lib/SDKClient.ts index 18ff309970df..c174f9125f49 100644 --- a/apps/meteor/app/utils/client/lib/SDKClient.ts +++ b/apps/meteor/app/utils/client/lib/SDKClient.ts @@ -51,6 +51,7 @@ type EventMap = Str type StreamMapValue = { stop: () => void; + error: (cb: (...args: any[]) => void) => void; onChange: ReturnType['onChange']; ready: () => Promise; isReady: boolean; @@ -62,6 +63,7 @@ const createNewMeteorStream = (streamName: StreamNames, key: StreamKeys { - console.error(err); ee.emit('ready', [err]); + ee.emit('error', err); }, }, ); @@ -115,6 +117,11 @@ const createNewMeteorStream = (streamName: StreamNames, key: StreamKeys void) => + ee.once('error', (error) => { + cb(error); + }), + get isReady() { return meta.ready; }, @@ -179,6 +186,7 @@ const createStreamManager = () => { if (!streams.has(eventLiteral)) { streams.set(eventLiteral, stream); } + stream.error(() => stop()); return { id: '', diff --git a/apps/meteor/client/providers/UserProvider/UserProvider.tsx b/apps/meteor/client/providers/UserProvider/UserProvider.tsx index 62ed7070737d..27c540928e86 100644 --- a/apps/meteor/client/providers/UserProvider/UserProvider.tsx +++ b/apps/meteor/client/providers/UserProvider/UserProvider.tsx @@ -12,6 +12,7 @@ import { sdk } from '../../../app/utils/client/lib/SDKClient'; import { afterLogoutCleanUpCallback } from '../../../lib/callbacks/afterLogoutCleanUpCallback'; import { useReactiveValue } from '../../hooks/useReactiveValue'; import { createReactiveSubscriptionFactory } from '../../lib/createReactiveSubscriptionFactory'; +import { queryClient } from '../../lib/queryClient'; import { useCreateFontStyleElement } from '../../views/account/accessibility/hooks/useCreateFontStyleElement'; import { useClearRemovedRoomsHistory } from './hooks/useClearRemovedRoomsHistory'; import { useDeleteUser } from './hooks/useDeleteUser'; @@ -92,6 +93,12 @@ const UserProvider = ({ children }: UserProviderProps): ReactElement => { } }, [preferedLanguage, setPreferedLanguage, setUserLanguage, user?.language, userLanguage, userId, setUserPreferences]); + useEffect(() => { + if (!userId) { + queryClient.clear(); + } + }, [userId]); + return ; }; diff --git a/apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts b/apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts new file mode 100644 index 000000000000..f995f6b87b1b --- /dev/null +++ b/apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts @@ -0,0 +1,74 @@ +import { Page } from '@playwright/test'; + +import { DEFAULT_USER_CREDENTIALS } from '../config/constants'; +import injectInitialData from '../fixtures/inject-initial-data'; +import { Users } from '../fixtures/userStates'; +import { HomeOmnichannel } from '../page-objects'; +import { createAgent, makeAgentAvailable } from '../utils/omnichannel/agents'; +import { createConversation } from '../utils/omnichannel/rooms'; +import { test, expect } from '../utils/test'; + +test.use({ storageState: Users.user1.state }); + +test.describe('OC - Manual Selection', () => { + let poOmnichannel: HomeOmnichannel; + let agent: Awaited>; + + // Change routing method to manual selection + test.beforeAll(async ({ api }) => { + const res = await api.post('/settings/Livechat_Routing_Method', { value: 'Manual_Selection' }); + expect(res.status()).toBe(200); + }); + + // Create agent and make it available + test.beforeAll(async ({ api }) => { + agent = await createAgent(api, 'user1'); + await makeAgentAvailable(api, agent.data._id); + }); + + // Create page object and redirect to home + test.beforeEach(async ({ page }: { page: Page }) => { + poOmnichannel = new HomeOmnichannel(page); + await page.goto('/home'); + + await poOmnichannel.sidenav.logout(); + await poOmnichannel.page.locator('role=textbox[name=/username/i]').waitFor({ state: 'visible' }); + await poOmnichannel.page.locator('role=textbox[name=/username/i]').fill('user1'); + await poOmnichannel.page.locator('[name=password]').fill(DEFAULT_USER_CREDENTIALS.password); + await poOmnichannel.page.locator('role=button[name="Login"]').click(); + + await poOmnichannel.page.locator('.main-content').waitFor(); + }); + + // Delete all data + test.afterAll(async ({ api }) => { + await agent.delete() + await api.post('/settings/Livechat_Routing_Method', { value: 'Auto_Selection' }); + await injectInitialData(); + }); + + test('OC - Manual Selection - Logout & Login', async ({ api }) => { + expect(await poOmnichannel.page.locator('#omnichannel-status-toggle').getAttribute('title')).toEqual('Turn off answer chats'); + + const { data: { room } } = await createConversation(api); + + await test.step('expect login and see the chat in queue after login', async () => { + await poOmnichannel.sidenav.getSidebarItemByName(room.fname).click(); + await expect(poOmnichannel.content.inputMessage).not.toBeVisible(); + }); + + await test.step('expect take chat to be visible and return to queue not visible', async () => { + await expect(poOmnichannel.content.btnTakeChat).toBeVisible(); + await expect(poOmnichannel.content.btnReturnToQueue).not.toBeVisible(); + }); + + await test.step('expect to be able take chat', async () => { + await poOmnichannel.content.btnTakeChat.click(); + await expect(poOmnichannel.content.lastSystemMessageBody).toHaveText('joined the channel'); + await expect(poOmnichannel.content.inputMessage).toBeVisible(); + await expect(poOmnichannel.content.btnTakeChat).not.toBeVisible(); + await expect(poOmnichannel.content.btnReturnToQueue).toBeVisible(); + await expect(poOmnichannel.sidenav.getSidebarItemByName(room.fname)).toBeVisible(); + }); + }); +}); From 61bf555d84e3f320a57297054c4fa4a1ac03db15 Mon Sep 17 00:00:00 2001 From: Douglas Fabris Date: Fri, 24 May 2024 15:01:20 -0300 Subject: [PATCH 12/35] regression: Incorrect retention policy banner's display rule for teams (#32483) --- .../teams/contextualBar/info/TeamsInfo.tsx | 21 +++++++---------- .../contextualBar/info/TeamsInfoWithData.js | 23 ------------------- .../meteor/tests/e2e/retention-policy.spec.ts | 23 ++++++++++++++++++- 3 files changed, 30 insertions(+), 37 deletions(-) diff --git a/apps/meteor/client/views/teams/contextualBar/info/TeamsInfo.tsx b/apps/meteor/client/views/teams/contextualBar/info/TeamsInfo.tsx index 12e092b48763..5a38722cfc42 100644 --- a/apps/meteor/client/views/teams/contextualBar/info/TeamsInfo.tsx +++ b/apps/meteor/client/views/teams/contextualBar/info/TeamsInfo.tsx @@ -17,18 +17,10 @@ import RetentionPolicyCallout from '../../../../components/InfoPanel/RetentionPo import MarkdownText from '../../../../components/MarkdownText'; import type { Action } from '../../../hooks/useActionSpread'; import { useActionSpread } from '../../../hooks/useActionSpread'; - -type RetentionPolicy = { - retentionPolicyEnabled: boolean; - maxAgeDefault: number; - retentionEnabledDefault: boolean; - excludePinnedDefault: boolean; - filesOnlyDefault: boolean; -}; +import { useRetentionPolicy } from '../../../room/hooks/useRetentionPolicy'; type TeamsInfoProps = { room: IRoom; - retentionPolicy: RetentionPolicy; onClickHide: () => void; onClickClose: () => void; onClickLeave: () => void; @@ -40,7 +32,6 @@ type TeamsInfoProps = { const TeamsInfo = ({ room, - retentionPolicy, onClickHide, onClickClose, onClickLeave, @@ -51,7 +42,7 @@ const TeamsInfo = ({ }: TeamsInfoProps): ReactElement => { const t = useTranslation(); - const { retentionPolicyEnabled, filesOnlyDefault, excludePinnedDefault, maxAgeDefault } = retentionPolicy; + const retentionPolicy = useRetentionPolicy(room); const memoizedActions = useMemo( () => ({ @@ -199,8 +190,12 @@ const TeamsInfo = ({ )} - {retentionPolicyEnabled && ( - + {retentionPolicy?.isActive && ( + )} diff --git a/apps/meteor/client/views/teams/contextualBar/info/TeamsInfoWithData.js b/apps/meteor/client/views/teams/contextualBar/info/TeamsInfoWithData.js index f5cb4a44c5d2..0b2f84a339ed 100644 --- a/apps/meteor/client/views/teams/contextualBar/info/TeamsInfoWithData.js +++ b/apps/meteor/client/views/teams/contextualBar/info/TeamsInfoWithData.js @@ -3,7 +3,6 @@ import { useSetModal, useToastMessageDispatch, useUserId, - useSetting, usePermission, useMethod, useTranslation, @@ -23,33 +22,12 @@ import ConvertToChannelModal from '../../ConvertToChannelModal'; import LeaveTeam from './LeaveTeam'; import TeamsInfo from './TeamsInfo'; -const retentionPolicyMaxAge = { - c: 'RetentionPolicy_MaxAge_Channels', - p: 'RetentionPolicy_MaxAge_Groups', - d: 'RetentionPolicy_MaxAge_DMs', -}; - -const retentionPolicyAppliesTo = { - c: 'RetentionPolicy_AppliesToChannels', - p: 'RetentionPolicy_AppliesToGroups', - d: 'RetentionPolicy_AppliesToDMs', -}; - const TeamsInfoWithLogic = ({ openEditing }) => { const room = useRoom(); const { openTab, closeTab } = useRoomToolbox(); const t = useTranslation(); const userId = useUserId(); - const retentionPolicyEnabled = useSetting('RetentionPolicy_Enabled'); - const retentionPolicy = { - retentionPolicyEnabled, - maxAgeDefault: useSetting(retentionPolicyMaxAge[room.t]) || 30, - retentionEnabledDefault: useSetting(retentionPolicyAppliesTo[room.t]), - excludePinnedDefault: useSetting('RetentionPolicy_DoNotPrunePinned'), - filesOnlyDefault: useSetting('RetentionPolicy_FilesOnly'), - }; - const dontAskHideRoom = useDontAskAgain('hideRoom'); const dispatchToastMessage = useToastMessageDispatch(); @@ -153,7 +131,6 @@ const TeamsInfoWithLogic = ({ openEditing }) => { return ( { let poHomeChannel: HomeChannel; let targetChannel: string; + let targetTeam: string; let targetGroup: string; test.beforeAll(async ({ api }) => { targetChannel = await createTargetChannel(api); targetGroup = await createTargetPrivateChannel(api); + targetTeam = await createTargetTeam(api); }) test.beforeEach(async ({ page }) => { @@ -28,6 +30,12 @@ test.describe.serial('retention-policy', () => { await expect(poHomeChannel.content.channelRetentionPolicyWarning).not.toBeVisible(); }); + test('should not show prune banner in team', async () => { + await poHomeChannel.sidenav.openChat(targetTeam); + + await expect(poHomeChannel.content.channelRetentionPolicyWarning).not.toBeVisible(); + }); + test('should not show prune section on edit channel', async () => { await poHomeChannel.sidenav.openChat(targetChannel); await poHomeChannel.tabs.btnRoomInfo.click(); @@ -53,6 +61,9 @@ test.describe.serial('retention-policy', () => { await poHomeChannel.sidenav.openChat(targetChannel); await expect(poHomeChannel.content.channelRetentionPolicyWarning).not.toBeVisible(); + await poHomeChannel.sidenav.openChat(targetTeam); + await expect(poHomeChannel.content.channelRetentionPolicyWarning).not.toBeVisible(); + await poHomeChannel.sidenav.openChat(targetGroup); await expect(poHomeChannel.content.channelRetentionPolicyWarning).not.toBeVisible(); @@ -85,6 +96,16 @@ test.describe.serial('retention-policy', () => { await expect(poHomeChannel.tabs.room.checkboxPruneMessages).toBeChecked(); }); + test('should prune old messages checkbox enabled by default in team and show retention policy banner', async () => { + await poHomeChannel.sidenav.openChat(targetTeam); + await expect(poHomeChannel.content.channelRetentionPolicyWarning).toBeVisible(); + + await poHomeChannel.tabs.btnRoomInfo.click(); + await poHomeChannel.tabs.room.btnEdit.click(); + await poHomeChannel.tabs.room.pruneAccordion.click(); + await expect(poHomeChannel.tabs.room.checkboxPruneMessages).toBeChecked(); + }); + test('should prune old messages checkbox enabled by default in group and show retention policy banner', async () => { await poHomeChannel.sidenav.openChat(targetGroup); await expect(poHomeChannel.content.channelRetentionPolicyWarning).toBeVisible(); From a565999ae093f9ca23fc83180625592bc3f26c80 Mon Sep 17 00:00:00 2001 From: Tiago Evangelista Pinto Date: Fri, 24 May 2024 15:14:57 -0300 Subject: [PATCH 13/35] feat(UiKit): Users select (#31455) --- .changeset/cuddly-cycles-nail.md | 6 + .../MultiUsersSelectElement.spec.tsx | 105 ++++++++++++++++++ .../MultiUsersSelectElement.tsx | 76 +++++++++++++ .../UserSelectElement.spec.tsx | 82 ++++++++++++++ .../UsersSelectElement/UsersSelectElement.tsx | 62 +++++++++++ .../UsersSelectElement/hooks/useUsersData.ts | 32 ++++++ .../src/stories/payloads/actions.ts | 20 ++-- .../src/surfaces/FuselageSurfaceRenderer.tsx | 40 +++++++ .../elements/MultiUsersSelectElement.ts | 3 +- .../src/blocks/elements/UsersSelectElement.ts | 3 +- packages/ui-kit/src/rendering/ActionOf.ts | 4 +- 11 files changed, 419 insertions(+), 14 deletions(-) create mode 100644 .changeset/cuddly-cycles-nail.md create mode 100644 packages/fuselage-ui-kit/src/elements/UsersSelectElement/MultiUsersSelectElement.spec.tsx create mode 100644 packages/fuselage-ui-kit/src/elements/UsersSelectElement/MultiUsersSelectElement.tsx create mode 100644 packages/fuselage-ui-kit/src/elements/UsersSelectElement/UserSelectElement.spec.tsx create mode 100644 packages/fuselage-ui-kit/src/elements/UsersSelectElement/UsersSelectElement.tsx create mode 100644 packages/fuselage-ui-kit/src/elements/UsersSelectElement/hooks/useUsersData.ts diff --git a/.changeset/cuddly-cycles-nail.md b/.changeset/cuddly-cycles-nail.md new file mode 100644 index 000000000000..ee49600ee865 --- /dev/null +++ b/.changeset/cuddly-cycles-nail.md @@ -0,0 +1,6 @@ +--- +"@rocket.chat/fuselage-ui-kit": minor +"@rocket.chat/ui-kit": minor +--- + +Introduced new elements for apps to select users diff --git a/packages/fuselage-ui-kit/src/elements/UsersSelectElement/MultiUsersSelectElement.spec.tsx b/packages/fuselage-ui-kit/src/elements/UsersSelectElement/MultiUsersSelectElement.spec.tsx new file mode 100644 index 000000000000..1a6afad6c614 --- /dev/null +++ b/packages/fuselage-ui-kit/src/elements/UsersSelectElement/MultiUsersSelectElement.spec.tsx @@ -0,0 +1,105 @@ +import { MockedServerContext } from '@rocket.chat/mock-providers'; +import type { MultiUsersSelectElement as MultiUsersSelectElementType } from '@rocket.chat/ui-kit'; +import { BlockContext } from '@rocket.chat/ui-kit'; +import { render, screen } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; + +import { contextualBarParser } from '../../surfaces'; +import MultiUsersSelectElement from './MultiUsersSelectElement'; +import { useUsersData } from './hooks/useUsersData'; + +const usersBlock: MultiUsersSelectElementType = { + type: 'multi_users_select', + appId: 'test', + blockId: 'test', + actionId: 'test', +}; + +jest.mock('./hooks/useUsersData'); + +const mockedOptions = [ + { + value: 'user1_id', + label: 'User 1', + }, + { + value: 'user2_id', + label: 'User 2', + }, + { + value: 'user3_id', + label: 'User 3', + }, +]; + +const mockUseUsersData = jest.mocked(useUsersData); +mockUseUsersData.mockReturnValue(mockedOptions); + +describe('UiKit MultiUsersSelect Element', () => { + beforeAll(() => { + jest.useFakeTimers(); + }); + + afterAll(() => { + jest.useRealTimers(); + }); + + beforeEach(() => { + render( + + + + ); + }); + + it('should render a UiKit multiple users selector', async () => { + expect(await screen.findByRole('textbox')).toBeInTheDocument(); + }); + + it('should open the users selector', async () => { + const input = await screen.findByRole('textbox'); + input.focus(); + + expect(await screen.findByRole('listbox')).toBeInTheDocument(); + }); + + it('should select users', async () => { + const input = await screen.findByRole('textbox'); + + input.focus(); + + const option1 = (await screen.findAllByRole('option'))[0]; + await userEvent.click(option1, { delay: null }); + + const option2 = (await screen.findAllByRole('option'))[2]; + await userEvent.click(option2, { delay: null }); + + const selected = await screen.findAllByRole('button'); + expect(selected[0]).toHaveValue('user1_id'); + expect(selected[1]).toHaveValue('user3_id'); + }); + + it('should remove a user', async () => { + const input = await screen.findByRole('textbox'); + + input.focus(); + + const option1 = (await screen.findAllByRole('option'))[0]; + await userEvent.click(option1, { delay: null }); + + const option2 = (await screen.findAllByRole('option'))[2]; + await userEvent.click(option2, { delay: null }); + + const selected1 = (await screen.findAllByRole('button'))[0]; + expect(selected1).toHaveValue('user1_id'); + await userEvent.click(selected1, { delay: null }); + + const remainingSelected = (await screen.findAllByRole('button'))[0]; + expect(remainingSelected).toHaveValue('user3_id'); + }); +}); diff --git a/packages/fuselage-ui-kit/src/elements/UsersSelectElement/MultiUsersSelectElement.tsx b/packages/fuselage-ui-kit/src/elements/UsersSelectElement/MultiUsersSelectElement.tsx new file mode 100644 index 000000000000..bdf7bfef4a31 --- /dev/null +++ b/packages/fuselage-ui-kit/src/elements/UsersSelectElement/MultiUsersSelectElement.tsx @@ -0,0 +1,76 @@ +import { + Box, + Chip, + AutoComplete, + Option, + OptionAvatar, + OptionContent, + OptionDescription, +} from '@rocket.chat/fuselage'; +import { useDebouncedValue } from '@rocket.chat/fuselage-hooks'; +import { UserAvatar } from '@rocket.chat/ui-avatar'; +import type * as UiKit from '@rocket.chat/ui-kit'; +import type { ReactElement } from 'react'; +import { memo, useCallback, useState } from 'react'; + +import { useUiKitState } from '../../hooks/useUiKitState'; +import type { BlockProps } from '../../utils/BlockProps'; +import { useUsersData } from './hooks/useUsersData'; + +type MultiUsersSelectElementProps = BlockProps; + +const MultiUsersSelectElement = ({ + block, + context, +}: MultiUsersSelectElementProps): ReactElement => { + const [{ loading, value }, action] = useUiKitState(block, context); + const [filter, setFilter] = useState(''); + + const debouncedFilter = useDebouncedValue(filter, 500); + + const data = useUsersData({ filter: debouncedFilter }); + + const handleChange = useCallback( + (value) => { + action({ target: { value } }); + }, + [action] + ); + + return ( + ( + + + + {label} + + + )} + renderItem={({ value, label, ...props }): ReactElement => ( + + )} + /> + ); +}; + +export default memo(MultiUsersSelectElement); diff --git a/packages/fuselage-ui-kit/src/elements/UsersSelectElement/UserSelectElement.spec.tsx b/packages/fuselage-ui-kit/src/elements/UsersSelectElement/UserSelectElement.spec.tsx new file mode 100644 index 000000000000..02f11d50951b --- /dev/null +++ b/packages/fuselage-ui-kit/src/elements/UsersSelectElement/UserSelectElement.spec.tsx @@ -0,0 +1,82 @@ +import { MockedServerContext } from '@rocket.chat/mock-providers'; +import type { UsersSelectElement as UsersSelectElementType } from '@rocket.chat/ui-kit'; +import { BlockContext } from '@rocket.chat/ui-kit'; +import { render, screen } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; + +import { contextualBarParser } from '../../surfaces'; +import UsersSelectElement from './UsersSelectElement'; +import { useUsersData } from './hooks/useUsersData'; + +const userBlock: UsersSelectElementType = { + type: 'users_select', + appId: 'test', + blockId: 'test', + actionId: 'test', +}; + +jest.mock('./hooks/useUsersData'); + +const mockedOptions = [ + { + value: 'user1_id', + label: 'User 1', + }, + { + value: 'user2_id', + label: 'User 2', + }, + { + value: 'user3_id', + label: 'User 3', + }, +]; + +const mockUseUsersData = jest.mocked(useUsersData); +mockUseUsersData.mockReturnValue(mockedOptions); + +describe('UiKit UserSelect Element', () => { + beforeAll(() => { + jest.useFakeTimers(); + }); + + afterAll(() => { + jest.useRealTimers(); + }); + + beforeEach(() => { + render( + + + + ); + }); + + it('should render a UiKit user selector', async () => { + expect(await screen.findByRole('textbox')).toBeInTheDocument(); + }); + + it('should open the user selector', async () => { + const input = await screen.findByRole('textbox'); + input.focus(); + + expect(await screen.findByRole('listbox')).toBeInTheDocument(); + }); + + it('should select a user', async () => { + const input = await screen.findByRole('textbox'); + + input.focus(); + + const option = (await screen.findAllByRole('option'))[0]; + await userEvent.click(option, { delay: null }); + + const selected = await screen.findByRole('button'); + expect(selected).toHaveValue('user1_id'); + }); +}); diff --git a/packages/fuselage-ui-kit/src/elements/UsersSelectElement/UsersSelectElement.tsx b/packages/fuselage-ui-kit/src/elements/UsersSelectElement/UsersSelectElement.tsx new file mode 100644 index 000000000000..39e71bd4fce8 --- /dev/null +++ b/packages/fuselage-ui-kit/src/elements/UsersSelectElement/UsersSelectElement.tsx @@ -0,0 +1,62 @@ +import { AutoComplete, Box, Chip, Option } from '@rocket.chat/fuselage'; +import { useDebouncedValue } from '@rocket.chat/fuselage-hooks'; +import { UserAvatar } from '@rocket.chat/ui-avatar'; +import type * as UiKit from '@rocket.chat/ui-kit'; +import { useCallback, useState } from 'react'; + +import { useUiKitState } from '../../hooks/useUiKitState'; +import type { BlockProps } from '../../utils/BlockProps'; +import { useUsersData } from './hooks/useUsersData'; + +type UsersSelectElementProps = BlockProps; + +export type UserAutoCompleteOptionType = { + value: string; + label: string; +}; + +const UsersSelectElement = ({ block, context }: UsersSelectElementProps) => { + const [{ value, loading }, action] = useUiKitState(block, context); + + const [filter, setFilter] = useState(''); + const debouncedFilter = useDebouncedValue(filter, 300); + + const data = useUsersData({ filter: debouncedFilter }); + + const handleChange = useCallback( + (value) => { + action({ target: { value } }); + }, + [action] + ); + + return ( + ( + + + + {label} + + + )} + renderItem={({ value, label, ...props }) => ( +