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 001/121] 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 0000000000000..6d51414c9fc4f --- /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 a857547050903..69aeb4e312050 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 48657efea73ae..c778e165a7693 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 5f61d2ef43e12..7917687782953 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 23e855b1aa21c..d57d6be612c65 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 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 002/121] 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 356ac10c97593..bc9d1f042d58a 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 003/121] 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 48b0af912d15f..a834776aeff5c 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 0e0b6db7c0e98..d70d3c5d7cc38 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 dd335c13030ea..7dc1a3466f49a 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 0000000000000..5aa5e426c2bda --- /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 6d5834d91cc00..5959452832619 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 f0340c8d0ae57..efe1f68bc5e83 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 1fc3ef7041392..7be8700392765 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 9c15c277a1b27..90d390fe6be7b 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 3c3ec1c02139c..0535f8926a7d4 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 a57344da73dc1..698462dcaed2a 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 c89931208451c..6d9d9f31e24c7 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 bcd1a254a4bd3..4377f7c66abaa 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 75f4882ce7476..3261d1e1c51e3 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 1f37e5d6358a2..f589dd21ed502 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 e7afa0d9e6897..d0dcc6fad4fee 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 f45ba934ba3bb..58a4f05f5362c 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 d16be3d0c8c75..f33807d25be4d 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 0fd882f2c5cc2..401448ceb3966 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 fb379021f7805..2edaf80237e30 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 40e550e1f4ba6..9bc4f11fd3cdc 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 1fbf7399d6482..2be8e74c2d672 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 ce9af784fb0df..316f5690cf69e 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 bbec5c19e0ad5..1e49f887e62b4 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 7a3f5bbd51f2f..92c7ddf4c1c3d 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 7c21ac9a47ff2..31be4b2300ee4 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 432a991697394..e5f44c67fbef9 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 66a59d7fe81c2..f08e0fe03d0b9 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 0cc0df4630ac2..c9c089aa2ce0c 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 ead4c9c070c7e..ef513e5212834 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 f2d75ab237464..ea40807308846 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 fc7ae8a8522e7..2ffdc9b149694 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 41062d1b9dceb..3aa80b4e07b3a 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 93048c50016a8..ab74daa03cb9f 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 ffc81c35a9532..ddc173e631168 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 617fc9623e1a2..c481e8cf2f76d 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 3f47b35bdbe2d..0147706869b60 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 6afa5b2a68354..5f3496ed317c5 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 0a35c44a10be9..32765c7c114fa 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 282ecc2b423c9..d7272b901e26a 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 f5fc4838ba7ec..bba1fd135782a 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 2b688378753d6..52ab527ef8411 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 4e99fee43acdb..47ee87f7ee2a8 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 286b1a344d3b9..91980f119316f 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 0ab3a518075cb..fa6c9a40f1593 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 2da634cff9d50..6fddd95859d82 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 f30cb75b2977d..626c541069461 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 3c903d5715182..28116cb26a13c 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 dd06afbcfa8dc..64cbe556db9cc 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 30f6639c054f6..90dd6bd4ed325 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 fb379886318fc..4746e7df6bea3 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 9156cd7d678fc..f476868be27b9 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 a0f49c14124bc..9e90ac015a46d 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 dccef4dfdf092..8bf1d52e5ca97 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 087b2f3192ba6..0abc8d3bd203c 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 840793db7e3cc..63dde93ac8d66 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 e07c8e2898450..51c993d2542f3 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 90d6a4523cb7f..557d9672c027a 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 a27dc589fd78a..544502bda87fa 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 b9d3e57e31de1..cc1be1da33c8c 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 25108d0954186..6fd0ee420dbf7 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 15b65e6b42e39..9776564264cc5 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 2d0f5f36ab28a..aa23533b3e72e 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 5db68f559fdb4..749f40d28a604 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 4f4e60e0f30a7..6e02f302e3e19 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 0000000000000..9552a750e55b5 --- /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 ebfa9bf08a0be..2a99f6f1fada9 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 4574f74bb2b71..dffbde494e7a2 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 ce27ae47ae8c7..b86f8a1ced2cb 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 6a99ae93340d9..a67057b9add16 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 8b87d0f811e34..fe694c1de8515 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 0fdbd34f66aa3..a85dd72c868d6 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 7a7f6cafdb17e..fd3b73a3f4a5e 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 84c3051b6aea1..7e5368d7a0a55 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 c39916369f5dc..38157e435b8c2 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 b5238cab640a1..fec79d762bcd8 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 7d83fbc6fc656..e31fc3a44a5aa 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 9ffd4d8367dd8..6356aa693d1e1 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 cc1254184830f..90b8387582344 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 a6da966b36065..4ca7066bbc084 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 4078daf8bf2ab..ffb225c76ac8a 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 fd9ffd1eb6080..0797fbffb984c 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 83f2c4a36e72d..0b4ab02791da9 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 8a86255fa86b4..079e663f19c4b 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 cda40b7418680..7cbca605b712b 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 792fae8946d93..081c33fe3260f 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 0a07f7468f014..d550118a5017d 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 f0baca991e2e6..9f0a210868686 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 cd423c60b4bff..767b56e916751 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 95a902055ed60..ae9a3259af4ad 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 4a65c31263c2f..ce4707417d1e9 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 63934c95e945b..add1c64531d9e 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 4860b0aeab542..11f3e4348a0bb 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 ce89fe2d764b6..3b9757134bedd 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 d1a5c60968907..31c3a910c7ea8 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 b618d2eac89e3..e4bc1c0efb505 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 6f30453f62dc3..127c81c30032f 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 b3d900830e2f4..190c22991fb53 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 9afa82c171be1..9490fd2d2048e 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 c88fb4ce4c677..fe95bc90d8a20 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 61910dc37bc41..48eca28eb833f 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 e521a05cafdcb..905302b7ce4db 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 0ede8072d8bc6..38b7c12791cd2 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 47ccb3d39c880..881275e2fc2bb 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 2f31d282a63b7..0c0ef00b5ac08 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 4c51b8a3615b8..f9ec077e9e430 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 da9908b3ed5f7..8df55bd5d3594 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 32fff81d7bb38..9f2580b74b773 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 7ecc7b8ab96d9..fbf987fa78af2 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 88b872ed46a31..bf7736b5899a4 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 0b5ef3418e01a..119476ecd89a1 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 9ae7d91c7c2b8..9f353628c982a 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 5738798f194e7..818bb689d7786 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 f506255806bfd..8e26407113478 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 0f1e8b59ec255..99dfff9db3c1a 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 3c22aa14384bf..f34a9796c304b 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 bf6814617e4af..e2264d7954153 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 eb23aa5fd8835..7caa9bf02b662 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 5dd438129c9aa..98d3233134a5e 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 13722be69c694..30979e2a81d82 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 616b941de2a8a..e2532d0c6623c 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 c6e32b0268188..5039521fa6226 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 8cf34b6a56d40..11bf6634a0e9d 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 4360803188925..317a9f5190306 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 c250728988ec0..e7624ffd956ec 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 e3ac5680ed2e8..5420be9536015 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 e9ac8be7da9fa..026f1cb0de30b 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 7820ee8349605..240e61e5878d4 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 d5e59ea027560..5f78269fca573 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 de40e04dcfcac..78f1585f0f4bc 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 fd42d428824dd..17f6713220f99 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 f901f11d3954d..a92b2c6d32952 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 aa12bf2a3d1ce..7cf46ebc476ac 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 80af96d8f6691..80359837b6276 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 1941b4fea718e..36f9c3de2cc27 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 32687a8385931..d08eab83a934e 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 ca9fefd54163e..3b8bea6097e4b 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 db09a6d436d6d..f70df1625871e 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 06b41b9f2566a..1ec27c28a3bbb 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 d87799a9ff989..5a3f1bdd299aa 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 6fddef20a9568..c4642d8baefb6 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 3298f38b0f114..90b6be2dbc5cf 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 deb8b301497b7..10b9d439ff09c 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 73b3ddaedbd95..bfe7a067f6729 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 2006fa68e47db..dadb59b047779 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 3a68f239d647a..0ec56c1e5652f 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 d51926fb574cb..faf650e903dee 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 0009205d3e7a7..49faa7bdeecc4 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 99b2b3212674a..79b904d38f979 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 58facbb3bd421..1eb5e1aaf99db 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 772880fd6c218..5381376eb57f8 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 039bc5d059668..d95d82d0e8ce7 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 75e769baa71d0..c1ed01e1c4d3d 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 28eb55245a4cd..f594dcfa1f212 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 e54613dc5cd86..444e1bf3123a8 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 edfae67251fe0..00dc564ed05d0 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 1898538d784f2..87d1d7e10d23a 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 ed909b571a21d..1021ab16ffd91 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 fbcc3a2d5fa3d..076478717ad4b 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 44ab240ce7b32..f544e2f25b832 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 bf7a022f2ae32..2a6b612470b56 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 78a0283ef8a9c..f10d3e989e0a3 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 9978aba5586dc..824b5eb696948 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 ba8b54aeaccf8..9bca1e6589c41 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 91c8d20f49f7f..4253ff023ee99 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 1d6c40d58255b..64703e487a904 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 f6ef54c1fbb6e..7700487ad3be7 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 f209fa638d867..95fb9a54c3ce6 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 74763121e0008..c1aed1dbe7aed 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 3ad7a04bb87c9..62857967167d8 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 f16f70c764466..184006a745c49 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 ae948bbf70d11..e30d352bcba23 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 ba93c05402b4f..f1655fb16309c 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 50a7c00d1c43a..bbf222f763100 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 11de2598e6a31..f71ab5c76ea0a 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 ea7aa739cac7c..b09ea937b1cdf 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 e71e811399505..24ebe2aa55000 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 0b6453f92ab70..7446d0630b09f 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 c71238e6bb5ee..497e4e9ff2c43 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 39c2923cc5ea4..cb8e74fbe142a 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 8ef14c4eb2f48..18c3bf34d0ac3 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 8c21cf258208b..4291b9425d61f 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 49ea36f734ad5..8c94ad238ddc1 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 70202a42348bc..08d481bc1052b 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 2c4878c041e05..0000000000000 --- 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 c36c03342307e..7577d6258a5e6 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 24b0f816a454a..d7d67fdeba968 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 0ffe5bda17355..0000000000000 --- 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 243d439801de5..0000000000000 --- 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 9aba7d3318d76..0000000000000 --- 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 89c85969aeef8..0000000000000 --- 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 aec1f27dd43ab..0000000000000 --- 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 a20afa9f48454..0000000000000 --- 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 004/121] 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 0000000000000..3964ecc8481b8 --- /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 77190992612a8..545e1e73342d4 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 18ff309970dfc..c174f9125f49f 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 62ed7070737d7..27c540928e860 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 0000000000000..f995f6b87b1b3 --- /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 a565999ae093f9ca23fc83180625592bc3f26c80 Mon Sep 17 00:00:00 2001 From: Tiago Evangelista Pinto Date: Fri, 24 May 2024 15:14:57 -0300 Subject: [PATCH 005/121] 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 0000000000000..ee49600ee865e --- /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 0000000000000..1a6afad6c6143 --- /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 0000000000000..bdf7bfef4a31a --- /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 0000000000000..02f11d50951bd --- /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 0000000000000..39e71bd4fce8f --- /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 }) => ( +