Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/meteor/app/emoji/client/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from './helpers';
export * from './types';
export type * from './types';
export { emoji, emojiEmitter } from './lib';
2 changes: 1 addition & 1 deletion apps/meteor/app/lib/server/methods/joinRoom.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Room } from '@rocket.chat/core-services';
import { type IRoom } from '@rocket.chat/core-typings';
import type { IRoom } from '@rocket.chat/core-typings';
import type { ServerMethods } from '@rocket.chat/ddp-client';
import { Rooms } from '@rocket.chat/models';
import { check } from 'meteor/check';
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/app/livechat/server/hooks/afterUserActions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type IUser } from '@rocket.chat/core-typings';
import type { IUser } from '@rocket.chat/core-typings';
import { Users } from '@rocket.chat/models';

import { callbacks } from '../../../../server/lib/callbacks';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type IOmnichannelSourceFromApp } from '@rocket.chat/core-typings';
import type { IOmnichannelSourceFromApp } from '@rocket.chat/core-typings';
import { Icon, Box } from '@rocket.chat/fuselage';
import type { ComponentProps } from 'react';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type IMessage } from '@rocket.chat/core-typings';
import type { IMessage } from '@rocket.chat/core-typings';
import { Message, MessageLeftContainer, MessageContainer, CheckBox } from '@rocket.chat/fuselage';
import { useToggle } from '@rocket.chat/fuselage-hooks';
import { MessageAvatar } from '@rocket.chat/ui-avatar';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type IThreadMessage } from '@rocket.chat/core-typings';
import type { IThreadMessage } from '@rocket.chat/core-typings';
import {
Skeleton,
ThreadMessage,
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/client/hooks/useAppActionButtons.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type IUIActionButton, type UIActionButtonContext } from '@rocket.chat/apps-engine/definition/ui';
import type { IUIActionButton, UIActionButtonContext } from '@rocket.chat/apps-engine/definition/ui';
import { useDebouncedCallback } from '@rocket.chat/fuselage-hooks';
import { useConnectionStatus, useEndpoint, useStream, useUserId } from '@rocket.chat/ui-contexts';
import { useQuery, useQueryClient } from '@tanstack/react-query';
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/client/lib/createRouteGroup.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { IRouterPaths, RouteName, RouterPathPattern } from '@rocket.chat/ui-contexts';
import { type ElementType, type ReactNode } from 'react';
import type { ElementType, ReactNode } from 'react';

import { appLayout } from './appLayout';
import { router } from '../providers/RouterProvider';
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/client/uikit/hooks/useBannerContextValue.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { UiKitContext } from '@rocket.chat/fuselage-ui-kit';
import type * as UiKit from '@rocket.chat/ui-kit';
import { type ContextType } from 'react';
import type { ContextType } from 'react';

import { useUiKitActionManager } from './useUiKitActionManager';

Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/client/views/audit/SecurityLogsPage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Page, PageHeader, PageContent } from '@rocket.chat/ui-client';
import { type ReactElement } from 'react';
import type { ReactElement } from 'react';
import { useTranslation } from 'react-i18next';

import SecurityLogsTable from './components/SecurityLogsTable';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type SubscriptionWithRoom } from '@rocket.chat/ui-contexts';
import type { SubscriptionWithRoom } from '@rocket.chat/ui-contexts';
import { memo } from 'react';

import SidePanelParentRoom from './SidePanelParentRoom';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import userEvent from '@testing-library/user-event';
import type { ComponentProps } from 'react';

import TemplatePlaceholderInput from './TemplatePlaceholderInput';
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
import TemplatePlaceholderSelector from './TemplatePlaceholderSelector';
import type TemplatePlaceholderSelector from './TemplatePlaceholderSelector';

const appRoot = mockAppRoot().build();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffectEvent } from '@rocket.chat/fuselage-hooks';
import type * as chartjs from 'chart.js';
import type { TFunction } from 'i18next';
import { type MutableRefObject } from 'react';
import type { MutableRefObject } from 'react';

import { updateChart } from '../../../../../app/livechat/client/lib/chartHandler';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type ILivechatTrigger, type ILivechatTriggerAction, type Serialized } from '@rocket.chat/core-typings';
import type { ILivechatTrigger, ILivechatTriggerAction, Serialized } from '@rocket.chat/core-typings';
import { FieldGroup, Button, ButtonGroup, Field, FieldLabel, FieldRow, FieldError, TextInput, ToggleSwitch } from '@rocket.chat/fuselage';
import {
ContextualbarScrollableContent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { Controller, useWatch } from 'react-hook-form';
import { useTranslation } from 'react-i18next';

import { useHasLicenseModule } from '../../../../hooks/useHasLicenseModule';
import { type TriggersPayload } from '../EditTrigger';
import type { TriggersPayload } from '../EditTrigger';
import { getActionFormFields } from '../utils';

type SendMessageFormType = ComponentProps<typeof Field> & {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { mockAppRoot } from '@rocket.chat/mock-providers';
import { useCurrentRoutePath, useRouter } from '@rocket.chat/ui-contexts';
import { render } from '@testing-library/react';
import React from 'react';
import type { ReactNode } from 'react';

import LayoutWithSidebar from './LayoutWithSidebar';

Expand All @@ -17,13 +17,13 @@ jest.mock('../../navigation', () => () => <div>NavigationRegion</div>);
jest.mock('./AccessibilityShortcut', () => () => <div>AccessibilityShortcut</div>);
jest.mock('../../navigation/providers/RoomsNavigationProvider', () => ({
__esModule: true,
default: ({ children }: { children: React.ReactNode }) => <>{children}</>,
default: ({ children }: { children: ReactNode }) => <>{children}</>,
}));

jest.mock('@rocket.chat/ui-client', () => ({
FeaturePreview: ({ children }: { children: React.ReactNode }) => <>{children}</>,
FeaturePreviewOn: ({ children }: { children: React.ReactNode }) => <>{children}</>,
FeaturePreviewOff: ({ children }: { children: React.ReactNode }) => <>{children}</>,
FeaturePreview: ({ children }: { children: ReactNode }) => <>{children}</>,
FeaturePreviewOn: ({ children }: { children: ReactNode }) => <>{children}</>,
FeaturePreviewOff: ({ children }: { children: ReactNode }) => <>{children}</>,
}));

const mockedUseCurrentRoutePath = useCurrentRoutePath as jest.MockedFunction<typeof useCurrentRoutePath>;
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/client/views/root/MainLayout/LoggedInArea.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useUser } from '@rocket.chat/ui-contexts';
import { type ReactNode } from 'react';
import type { ReactNode } from 'react';

import { useCustomEmoji } from '../hooks/loggedIn/useCustomEmoji';
import { useE2EEncryption } from '../hooks/loggedIn/useE2EEncryption';
Expand Down
3 changes: 1 addition & 2 deletions apps/meteor/definition/externals/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
import { Server } from 'net';
import type { Server } from 'net';

declare global {
interface Navigator {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ILicense } from '@rocket.chat/core-services';
import { api, ServiceClassInternal } from '@rocket.chat/core-services';
import { type LicenseModule } from '@rocket.chat/core-typings';
import type { LicenseModule } from '@rocket.chat/core-typings';
import { License } from '@rocket.chat/license';

import { guestPermissions } from '../../authorization/lib/guestPermissions';
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/ee/app/license/server/methods.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type ILicenseTag, type LicenseModule } from '@rocket.chat/core-typings';
import type { ILicenseTag, LicenseModule } from '@rocket.chat/core-typings';
import type { ServerMethods } from '@rocket.chat/ddp-client';
import { License } from '@rocket.chat/license';
import { check } from 'meteor/check';
Expand Down
4 changes: 2 additions & 2 deletions apps/meteor/ee/server/sdk/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './ILDAPEEService';
export * from './IMessageReadsService';
export type * from './ILDAPEEService';
export type * from './IMessageReadsService';
2 changes: 1 addition & 1 deletion apps/meteor/server/lib/ldap/UserConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Users } from '@rocket.chat/models';

import { logger } from './Logger';
import type { ConverterCache } from '../../../app/importer/server/classes/converters/ConverterCache';
import { type RecordConverterOptions } from '../../../app/importer/server/classes/converters/RecordConverter';
import type { RecordConverterOptions } from '../../../app/importer/server/classes/converters/RecordConverter';
import { UserConverter, type UserConverterOptions } from '../../../app/importer/server/classes/converters/UserConverter';
import { settings } from '../../../app/settings/server';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type IMessage } from '@rocket.chat/core-typings';
import type { IMessage } from '@rocket.chat/core-typings';
import { Logger } from '@rocket.chat/logger';
import type BadWordsFilter from 'bad-words';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Authorization, MeteorError } from '@rocket.chat/core-services';
import { type IMessage, type IUser } from '@rocket.chat/core-typings';
import type { IMessage, IUser } from '@rocket.chat/core-typings';

import { i18n } from '../../../lib/i18n';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ test.describe('E2EE Legacy Format', () => {

await page.evaluate(
async ({ rid, kid, encryptedKey }) => {
// eslint-disable-next-line import/no-unresolved, @typescript-eslint/no-var-requires, import/no-absolute-path, @typescript-eslint/consistent-type-imports
// eslint-disable-next-line import/no-unresolved, import/no-absolute-path
const { e2e } = require('/client/lib/e2ee/rocketchat.e2e.ts') as typeof import('../../../client/lib/e2ee/rocketchat.e2e');
const room = await e2e.getInstanceByRoomId(rid);
await room?.importGroupKey(kid + encryptedKey);
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/tests/e2e/fixtures/collections/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { faker } from '@faker-js/faker';
import type { IUser } from '@rocket.chat/core-typings';

import { DEFAULT_USER_CREDENTIALS } from '../../config/constants';
import { type IUserState } from '../userStates';
import type { IUserState } from '../userStates';

type UserFixture = IUser & {
username: string;
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/tests/end-to-end/api/livechat/09-visitors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { faker } from '@faker-js/faker';
import type { ILivechatVisitor, IOmnichannelRoom } from '@rocket.chat/core-typings';
import { expect } from 'chai';
import { before, describe, it, after } from 'mocha';
import { type Response } from 'supertest';
import type { Response } from 'supertest';

import { getCredentials, api, request, credentials } from '../../../data/api-data';
import { createCustomField, deleteCustomField } from '../../../data/livechat/custom-fields';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useDebouncedValue } from '@rocket.chat/fuselage-hooks';
import { useEffect, useContext } from 'react';

import { updatePayloadAction, context } from '../../Context';
import { type IPayload } from '../../Context/initialState';
import type { IPayload } from '../../Context/initialState';
import useCodeMirror from '../../hooks/useCodeMirror';
import useFormatCodeMirrorValue from '../../hooks/useFormatCodeMirrorValue';
import intendCode from '../../utils/intendCode';
Expand Down
2 changes: 1 addition & 1 deletion apps/uikit-playground/src/Components/CodeEditor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import json5 from 'json5';
import { useEffect, useContext } from 'react';

import { updatePayloadAction, context } from '../../Context';
import { type ILayoutBlock } from '../../Context/initialState';
import type { ILayoutBlock } from '../../Context/initialState';
import useCodeMirror from '../../hooks/useCodeMirror';
import codePrettier from '../../utils/codePrettier';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { context, renameScreenAction } from '../../Context';
import { activeScreenAction } from '../../Context/action/activeScreenAction';
import { deleteScreenAction } from '../../Context/action/deleteScreenAction';
import { duplicateScreenAction } from '../../Context/action/duplicateScreenAction';
import { type ScreenType } from '../../Context/initialState';
import type { ScreenType } from '../../Context/initialState';
import renderPayload from '../RenderPayload/RenderPayload';
import EditMenu from '../ScreenThumbnail/EditMenu/EditMenu';
import ScreenThumbnailWrapper from '../ScreenThumbnail/ScreenThumbnailWrapper';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { DragDropContext, Droppable } from '@hello-pangea/dnd';
import { memo } from 'react';

import DraggableListItem from './DraggableListItem';
import { type ILayoutBlock } from '../../Context/initialState';
import type { ILayoutBlock } from '../../Context/initialState';
import { SurfaceOptions } from '../Preview/Display/Surface/constant';

export type Block = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Handle, Position } from 'reactflow';
import './UIKitWrapper.scss';

import { context } from '../../../Context';
import { type idType } from '../../../Context/initialState';
import type { idType } from '../../../Context/initialState';
import SurfaceRender from '../../Preview/Display/Surface/SurfaceRender';
import RenderPayload from '../../RenderPayload/RenderPayload';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useNavigate } from 'react-router-dom';

import { activeProjectAction, context, renameProjectAction } from '../../../Context';
import { deleteProjectAction } from '../../../Context/action/deleteProjectAction';
import { type ILayoutBlock } from '../../../Context/initialState';
import type { ILayoutBlock } from '../../../Context/initialState';
import routes from '../../../Routes/Routes';
import { formatDate } from '../../../utils/formatDate';
import RenderPayload from '../../RenderPayload/RenderPayload';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
ContextualbarTitle,
} from '@rocket.chat/fuselage';
import { Scrollbars } from 'rc-scrollbars';
import { type ReactNode } from 'react';
import type { ReactNode } from 'react';

const ContextualBarSurface = ({ children }: { children: ReactNode }) => (
<Contextualbar>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import './PrototypeRender.scss';
import { css } from '@rocket.chat/css-in-js';
import { Box } from '@rocket.chat/fuselage';
import { useRef, useState } from 'react';
import { type Edge } from 'reactflow';
import type { Edge } from 'reactflow';

import { type ILayoutBlock, type idType } from '../../Context/initialState';
import type { ILayoutBlock, idType } from '../../Context/initialState';
import SurfaceRender from '../Preview/Display/Surface/SurfaceRender';
import { type SurfaceOptions } from '../Preview/Display/Surface/constant';
import type { SurfaceOptions } from '../Preview/Display/Surface/constant';
import RenderPayload from '../RenderPayload/RenderPayload';

const PrototypeRender = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
UiKitContextualBar as uiKitContextualBar,
} from '@rocket.chat/fuselage-ui-kit';

import { type ILayoutBlock } from '../../Context/initialState';
import type { ILayoutBlock } from '../../Context/initialState';
import { SurfaceOptions } from '../Preview/Display/Surface/constant';

const RenderPayload = ({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { css } from '@rocket.chat/css-in-js';
import { Icon, Box } from '@rocket.chat/fuselage';
import { type ComponentProps } from 'react';
import type { ComponentProps } from 'react';

const CreateNewScreenButton = ({
size = '60px',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import type { LayoutBlock } from '@rocket.chat/ui-kit';
import { useContext, useMemo } from 'react';

import { context, templatesToggleAction, updatePayloadAction } from '../../../Context';
import { type ILayoutBlock } from '../../../Context/initialState';
import type { ILayoutBlock } from '../../../Context/initialState';
import getUniqueId from '../../../utils/getUniqueId';
import SurfaceRender from '../../Preview/Display/Surface/SurfaceRender';
import { type SurfaceOptions } from '../../Preview/Display/Surface/constant';
import type { SurfaceOptions } from '../../Preview/Display/Surface/constant';
import RenderPayload from '../../RenderPayload/RenderPayload';

const Payload = ({ blocks, surface }: { surface: SurfaceOptions; blocks: LayoutBlock[] }) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type Edge } from 'reactflow';
import type { Edge } from 'reactflow';

import { ActionTypes } from '../reducer';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type Node, type Viewport } from 'reactflow';
import type { Node, Viewport } from 'reactflow';

import { ActionTypes } from '../reducer';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type SurfaceOptions } from '../../Components/Preview/Display/Surface/constant';
import { type ILayoutBlock } from '../initialState';
import type { SurfaceOptions } from '../../Components/Preview/Display/Surface/constant';
import type { ILayoutBlock } from '../initialState';
import { ActionTypes } from '../reducer';

type PayloadType = {
Expand Down
2 changes: 1 addition & 1 deletion apps/uikit-playground/src/Context/initialState.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { LayoutBlock } from '@rocket.chat/ui-kit';
import { type Edge, type Node, type Viewport } from 'reactflow';
import type { Edge, Node, Viewport } from 'reactflow';

import { SurfaceOptions } from '../Components/Preview/Display/Surface/constant';
import getDate from '../utils/getDate';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type LayoutBlock } from '@rocket.chat/ui-kit';
import type { LayoutBlock } from '@rocket.chat/ui-kit';

export const disabled: readonly LayoutBlock[] = [
{
Expand Down
2 changes: 1 addition & 1 deletion apps/uikit-playground/src/Payload/tabNavigation/plain.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type LayoutBlock } from '@rocket.chat/ui-kit';
import type { LayoutBlock } from '@rocket.chat/ui-kit';

export const plain: readonly LayoutBlock[] = [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type LayoutBlock } from '@rocket.chat/ui-kit';
import type { LayoutBlock } from '@rocket.chat/ui-kit';

export const selected: readonly LayoutBlock[] = [
{
Expand Down
2 changes: 1 addition & 1 deletion apps/uikit-playground/src/hooks/useAuth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { ReactNode } from 'react';
import { createContext, useContext, useMemo } from 'react';
import { useNavigate } from 'react-router-dom';

import { type userType } from '../Context/initialState';
import type { userType } from '../Context/initialState';

const AuthContext = createContext<{
user?: userType;
Expand Down
4 changes: 2 additions & 2 deletions apps/uikit-playground/src/hooks/useFormatCodeMirrorValue.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import json5 from 'json5';
import { useEffect } from 'react';

import { type ICodeMirrorChanges } from './useCodeMirror';
import { type IPayload } from '../Context/initialState';
import type { ICodeMirrorChanges } from './useCodeMirror';
import type { IPayload } from '../Context/initialState';
import codePrettier from '../utils/codePrettier';

// Todo: needs to make it more strict
Expand Down
2 changes: 1 addition & 1 deletion apps/uikit-playground/src/utils/filterEdges.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type Edge } from 'reactflow';
import type { Edge } from 'reactflow';

export const filterEdges = (edges: Edge[], activeActionIds: string[], sourceId: string) => {
return edges.filter((edge) => sourceId !== edge.source || activeActionIds.includes(edge.sourceHandle || ''));
Expand Down
2 changes: 1 addition & 1 deletion apps/uikit-playground/src/utils/persistStore.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type initialStateType } from '../Context/initialState';
import type { initialStateType } from '../Context/initialState';

const persistStore = (state: initialStateType) => {
localStorage.setItem('pesrist', JSON.stringify(state));
Expand Down
Loading
Loading