diff --git a/packages/twenty-front/project.json b/packages/twenty-front/project.json index 15ccfd01a0543..06f26ee0e1117 100644 --- a/packages/twenty-front/project.json +++ b/packages/twenty-front/project.json @@ -29,10 +29,10 @@ "options": { "cwd": "{projectRoot}", "command": "tsc -b tsconfig.json", - "incremental": true + "args": ["--incremental"] }, "configurations": { - "ci": { "incremental": false }, + "ci": { "args": [] }, "watch": { "watch": true } } }, diff --git a/packages/twenty-front/src/App.tsx b/packages/twenty-front/src/App.tsx index 6c86ccafe4800..40abf3d13006e 100644 --- a/packages/twenty-front/src/App.tsx +++ b/packages/twenty-front/src/App.tsx @@ -11,11 +11,11 @@ import { PageTitle } from '@/ui/utilities/page-title/PageTitle'; import { CommandMenuEffect } from '~/effect-components/CommandMenuEffect'; import { GotoHotkeysEffect } from '~/effect-components/GotoHotkeysEffect'; import Authorize from '~/pages/auth/Authorize'; -import { ChooseYourPlan } from '~/pages/auth/ChooseYourPlan.tsx'; +import { ChooseYourPlan } from '~/pages/auth/ChooseYourPlan'; import { CreateProfile } from '~/pages/auth/CreateProfile'; import { CreateWorkspace } from '~/pages/auth/CreateWorkspace'; import { PasswordReset } from '~/pages/auth/PasswordReset'; -import { PaymentSuccess } from '~/pages/auth/PaymentSuccess.tsx'; +import { PaymentSuccess } from '~/pages/auth/PaymentSuccess'; import { SignInUp } from '~/pages/auth/SignInUp'; import { DefaultHomePage } from '~/pages/DefaultHomePage'; import { ImpersonateEffect } from '~/pages/impersonate/ImpersonateEffect'; @@ -45,7 +45,7 @@ import { SettingsIntegrationDatabaseConnection } from '~/pages/settings/integrat import { SettingsIntegrationNewDatabaseConnection } from '~/pages/settings/integrations/SettingsIntegrationNewDatabaseConnection'; import { SettingsIntegrations } from '~/pages/settings/integrations/SettingsIntegrations'; import { SettingsAppearance } from '~/pages/settings/SettingsAppearance'; -import { SettingsBilling } from '~/pages/settings/SettingsBilling.tsx'; +import { SettingsBilling } from '~/pages/settings/SettingsBilling'; import { SettingsProfile } from '~/pages/settings/SettingsProfile'; import { SettingsWorkspace } from '~/pages/settings/SettingsWorkspace'; import { SettingsWorkspaceMembers } from '~/pages/settings/SettingsWorkspaceMembers'; diff --git a/packages/twenty-front/src/emotion.d.ts b/packages/twenty-front/src/emotion.d.ts new file mode 100644 index 0000000000000..90e71e26b6337 --- /dev/null +++ b/packages/twenty-front/src/emotion.d.ts @@ -0,0 +1,5 @@ +import { ThemeType } from 'twenty-ui'; + +declare module '@emotion/react' { + export interface Theme extends ThemeType {} +} diff --git a/packages/twenty-front/src/index.tsx b/packages/twenty-front/src/index.tsx index 1f17ce21fe740..83e4c55e56298 100644 --- a/packages/twenty-front/src/index.tsx +++ b/packages/twenty-front/src/index.tsx @@ -21,7 +21,6 @@ import { DialogManagerScope } from '@/ui/feedback/dialog-manager/scopes/DialogMa import { SnackBarProvider } from '@/ui/feedback/snack-bar-manager/components/SnackBarProvider'; import { SnackBarProviderScope } from '@/ui/feedback/snack-bar-manager/scopes/SnackBarProviderScope'; import { AppThemeProvider } from '@/ui/theme/components/AppThemeProvider'; -import { ThemeType } from '@/ui/theme/constants/ThemeLight'; import { UserProvider } from '@/users/components/UserProvider'; import { UserProviderEffect } from '@/users/components/UserProviderEffect'; import { PageChangeEffect } from '~/effect-components/PageChangeEffect'; @@ -82,7 +81,3 @@ root.render( , ); - -declare module '@emotion/react' { - export interface Theme extends ThemeType {} -} diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx index ae5a08e58d74d..967bdae9462c0 100644 --- a/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx +++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx @@ -14,7 +14,7 @@ import { authProvidersState } from '@/client-config/states/authProvidersState'; import { Loader } from '@/ui/feedback/loader/components/Loader'; import { MainButton } from '@/ui/input/button/components/MainButton'; import { TextInput } from '@/ui/input/components/TextInput'; -import { ActionLink } from '@/ui/navigation/link/components/ActionLink.tsx'; +import { ActionLink } from '@/ui/navigation/link/components/ActionLink'; import { AnimatedEaseIn } from '@/ui/utilities/animation/components/AnimatedEaseIn'; import { Logo } from '../../components/Logo'; diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/hooks/useHandleResetPassword.ts b/packages/twenty-front/src/modules/auth/sign-in-up/hooks/useHandleResetPassword.ts index 0a0feb5f63235..45cc945b3a3c5 100644 --- a/packages/twenty-front/src/modules/auth/sign-in-up/hooks/useHandleResetPassword.ts +++ b/packages/twenty-front/src/modules/auth/sign-in-up/hooks/useHandleResetPassword.ts @@ -1,7 +1,7 @@ import { useCallback } from 'react'; import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar'; -import { useEmailPasswordResetLinkMutation } from '~/generated/graphql.tsx'; +import { useEmailPasswordResetLinkMutation } from '~/generated/graphql'; export const useHandleResetPassword = () => { const { enqueueSnackBar } = useSnackBar(); diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/hooks/useNavigateAfterSignInUp.ts b/packages/twenty-front/src/modules/auth/sign-in-up/hooks/useNavigateAfterSignInUp.ts index 7d4336071b18f..195a4e44daee1 100644 --- a/packages/twenty-front/src/modules/auth/sign-in-up/hooks/useNavigateAfterSignInUp.ts +++ b/packages/twenty-front/src/modules/auth/sign-in-up/hooks/useNavigateAfterSignInUp.ts @@ -6,7 +6,7 @@ import { CurrentWorkspace } from '@/auth/states/currentWorkspaceState'; import { previousUrlState } from '@/auth/states/previousUrlState'; import { billingState } from '@/client-config/states/billingState'; import { AppPath } from '@/types/AppPath'; -import { WorkspaceMember } from '~/generated/graphql.tsx'; +import { WorkspaceMember } from '~/generated/graphql'; export const useNavigateAfterSignInUp = () => { const navigate = useNavigate(); diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/hooks/useWorkspaceFromInviteHash.ts b/packages/twenty-front/src/modules/auth/sign-in-up/hooks/useWorkspaceFromInviteHash.ts index a821ecee4590c..f5403e9b4a1dd 100644 --- a/packages/twenty-front/src/modules/auth/sign-in-up/hooks/useWorkspaceFromInviteHash.ts +++ b/packages/twenty-front/src/modules/auth/sign-in-up/hooks/useWorkspaceFromInviteHash.ts @@ -1,6 +1,6 @@ import { useParams } from 'react-router-dom'; -import { useGetWorkspaceFromInviteHashQuery } from '~/generated/graphql.tsx'; +import { useGetWorkspaceFromInviteHashQuery } from '~/generated/graphql'; export const useWorkspaceFromInviteHash = () => { const workspaceInviteHash = useParams().workspaceInviteHash; diff --git a/packages/twenty-front/src/modules/billing/components/SubscriptionCard.tsx b/packages/twenty-front/src/modules/billing/components/SubscriptionCard.tsx index 7af7e093bc907..d92da1d823ab1 100644 --- a/packages/twenty-front/src/modules/billing/components/SubscriptionCard.tsx +++ b/packages/twenty-front/src/modules/billing/components/SubscriptionCard.tsx @@ -1,6 +1,6 @@ import styled from '@emotion/styled'; -import { SubscriptionCardPrice } from '@/billing/components/SubscriptionCardPrice.tsx'; +import { SubscriptionCardPrice } from '@/billing/components/SubscriptionCardPrice'; import { capitalize } from '~/utils/string/capitalize'; type SubscriptionCardProps = { diff --git a/packages/twenty-front/src/modules/object-record/record-field/components/FieldDisplay.tsx b/packages/twenty-front/src/modules/object-record/record-field/components/FieldDisplay.tsx index a63a5810a7991..de9fc229c5614 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/components/FieldDisplay.tsx +++ b/packages/twenty-front/src/modules/object-record/record-field/components/FieldDisplay.tsx @@ -10,7 +10,7 @@ import { EmailFieldDisplay } from '../meta-types/display/components/EmailFieldDi import { FullNameFieldDisplay } from '../meta-types/display/components/FullNameFieldDisplay'; import { JsonFieldDisplay } from '../meta-types/display/components/JsonFieldDisplay'; import { LinkFieldDisplay } from '../meta-types/display/components/LinkFieldDisplay'; -import { MultiSelectFieldDisplay } from '../meta-types/display/components/MultiSelectFieldDisplay.tsx'; +import { MultiSelectFieldDisplay } from '../meta-types/display/components/MultiSelectFieldDisplay'; import { NumberFieldDisplay } from '../meta-types/display/components/NumberFieldDisplay'; import { PhoneFieldDisplay } from '../meta-types/display/components/PhoneFieldDisplay'; import { RelationFieldDisplay } from '../meta-types/display/components/RelationFieldDisplay'; diff --git a/packages/twenty-front/src/modules/object-record/record-field/components/FieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/components/FieldInput.tsx index 7a751a3307b1e..a8fb824dd4899 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/components/FieldInput.tsx +++ b/packages/twenty-front/src/modules/object-record/record-field/components/FieldInput.tsx @@ -3,7 +3,7 @@ import { useContext } from 'react'; import { AddressFieldInput } from '@/object-record/record-field/meta-types/input/components/AddressFieldInput'; import { DateFieldInput } from '@/object-record/record-field/meta-types/input/components/DateFieldInput'; import { FullNameFieldInput } from '@/object-record/record-field/meta-types/input/components/FullNameFieldInput'; -import { MultiSelectFieldInput } from '@/object-record/record-field/meta-types/input/components/MultiSelectFieldInput.tsx'; +import { MultiSelectFieldInput } from '@/object-record/record-field/meta-types/input/components/MultiSelectFieldInput'; import { RawJsonFieldInput } from '@/object-record/record-field/meta-types/input/components/RawJsonFieldInput'; import { SelectFieldInput } from '@/object-record/record-field/meta-types/input/components/SelectFieldInput'; import { RecordFieldInputScope } from '@/object-record/record-field/scopes/RecordFieldInputScope'; diff --git a/packages/twenty-front/src/modules/object-record/record-field/meta-types/hooks/useMultiSelectField.ts b/packages/twenty-front/src/modules/object-record/record-field/meta-types/hooks/useMultiSelectField.ts index 9cd2bed9663fb..39816a277e326 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/meta-types/hooks/useMultiSelectField.ts +++ b/packages/twenty-front/src/modules/object-record/record-field/meta-types/hooks/useMultiSelectField.ts @@ -9,7 +9,7 @@ import { assertFieldMetadata } from '@/object-record/record-field/types/guards/a import { isFieldMultiSelect } from '@/object-record/record-field/types/guards/isFieldMultiSelect'; import { isFieldMultiSelectValue } from '@/object-record/record-field/types/guards/isFieldMultiSelectValue'; import { recordStoreFamilySelector } from '@/object-record/record-store/states/selectors/recordStoreFamilySelector'; -import { FieldMetadataType } from '~/generated/graphql.tsx'; +import { FieldMetadataType } from '~/generated/graphql'; export const useMultiSelectField = () => { const { entityId, fieldDefinition, hotkeyScope } = useContext(FieldContext); diff --git a/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiSelectFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiSelectFieldInput.tsx index 0614ba33b8663..38c3cca0c5880 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiSelectFieldInput.tsx +++ b/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiSelectFieldInput.tsx @@ -7,7 +7,7 @@ import { DropdownMenu } from '@/ui/layout/dropdown/components/DropdownMenu'; import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer'; import { DropdownMenuSearchInput } from '@/ui/layout/dropdown/components/DropdownMenuSearchInput'; import { DropdownMenuSeparator } from '@/ui/layout/dropdown/components/DropdownMenuSeparator'; -import { MenuItemMultiSelectTag } from '@/ui/navigation/menu-item/components/MenuItemMultiSelectTag.tsx'; +import { MenuItemMultiSelectTag } from '@/ui/navigation/menu-item/components/MenuItemMultiSelectTag'; import { useListenClickOutside } from '@/ui/utilities/pointer-event/hooks/useListenClickOutside'; import { isDefined } from '~/utils/isDefined'; diff --git a/packages/twenty-front/src/modules/ui/display/info/components/Info.tsx b/packages/twenty-front/src/modules/ui/display/info/components/Info.tsx index e65a17312fc5d..bfdb866a534d7 100644 --- a/packages/twenty-front/src/modules/ui/display/info/components/Info.tsx +++ b/packages/twenty-front/src/modules/ui/display/info/components/Info.tsx @@ -3,7 +3,7 @@ import { css, useTheme } from '@emotion/react'; import styled from '@emotion/styled'; import { IconInfoCircle } from 'twenty-ui'; -import { Button } from '@/ui/input/button/components/Button.tsx'; +import { Button } from '@/ui/input/button/components/Button'; export type InfoAccent = 'blue' | 'danger'; export type InfoProps = { diff --git a/packages/twenty-front/src/modules/ui/input/components/CardPicker.tsx b/packages/twenty-front/src/modules/ui/input/components/CardPicker.tsx index b0d42ad010d3b..a6142873916b1 100644 --- a/packages/twenty-front/src/modules/ui/input/components/CardPicker.tsx +++ b/packages/twenty-front/src/modules/ui/input/components/CardPicker.tsx @@ -1,7 +1,7 @@ import React from 'react'; import styled from '@emotion/styled'; -import { Radio } from '@/ui/input/components/Radio.tsx'; +import { Radio } from '@/ui/input/components/Radio'; const StyledSubscriptionCardContainer = styled.button` background-color: ${({ theme }) => theme.background.secondary}; border: 1px solid ${({ theme }) => theme.border.color.medium}; diff --git a/packages/twenty-front/src/modules/ui/navigation/link/components/GithubVersionLink.tsx b/packages/twenty-front/src/modules/ui/navigation/link/components/GithubVersionLink.tsx index 57e86a6e67d4f..0d2ed27331cc4 100644 --- a/packages/twenty-front/src/modules/ui/navigation/link/components/GithubVersionLink.tsx +++ b/packages/twenty-front/src/modules/ui/navigation/link/components/GithubVersionLink.tsx @@ -1,7 +1,7 @@ import { useTheme } from '@emotion/react'; import { IconBrandGithub } from 'twenty-ui'; -import { ActionLink } from '@/ui/navigation/link/components/ActionLink.tsx'; +import { ActionLink } from '@/ui/navigation/link/components/ActionLink'; import packageJson from '../../../../../../package.json'; import { GITHUB_LINK } from '../constants/GithubLink'; diff --git a/packages/twenty-front/src/modules/ui/navigation/link/components/__stories__/ActionLink.stories.tsx b/packages/twenty-front/src/modules/ui/navigation/link/components/__stories__/ActionLink.stories.tsx index 522c24c112bfd..bb7dc0de6ad76 100644 --- a/packages/twenty-front/src/modules/ui/navigation/link/components/__stories__/ActionLink.stories.tsx +++ b/packages/twenty-front/src/modules/ui/navigation/link/components/__stories__/ActionLink.stories.tsx @@ -1,7 +1,7 @@ import { Meta, StoryObj } from '@storybook/react'; import { ComponentDecorator } from 'twenty-ui'; -import { ActionLink } from '@/ui/navigation/link/components/ActionLink.tsx'; +import { ActionLink } from '@/ui/navigation/link/components/ActionLink'; const meta: Meta = { title: 'UI/navigation/link/ActionLink', diff --git a/packages/twenty-front/src/pages/auth/ChooseYourPlan.tsx b/packages/twenty-front/src/pages/auth/ChooseYourPlan.tsx index 9736eabb660ca..882e39df9596a 100644 --- a/packages/twenty-front/src/pages/auth/ChooseYourPlan.tsx +++ b/packages/twenty-front/src/pages/auth/ChooseYourPlan.tsx @@ -3,21 +3,21 @@ import styled from '@emotion/styled'; import { isNonEmptyString, isNumber } from '@sniptt/guards'; import { useRecoilValue } from 'recoil'; -import { SubTitle } from '@/auth/components/SubTitle.tsx'; -import { Title } from '@/auth/components/Title.tsx'; -import { SubscriptionBenefit } from '@/billing/components/SubscriptionBenefit.tsx'; -import { SubscriptionCard } from '@/billing/components/SubscriptionCard.tsx'; +import { SubTitle } from '@/auth/components/SubTitle'; +import { Title } from '@/auth/components/Title'; +import { SubscriptionBenefit } from '@/billing/components/SubscriptionBenefit'; +import { SubscriptionCard } from '@/billing/components/SubscriptionCard'; import { billingState } from '@/client-config/states/billingState'; import { AppPath } from '@/types/AppPath'; -import { Loader } from '@/ui/feedback/loader/components/Loader.tsx'; +import { Loader } from '@/ui/feedback/loader/components/Loader'; import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar'; -import { MainButton } from '@/ui/input/button/components/MainButton.tsx'; -import { CardPicker } from '@/ui/input/components/CardPicker.tsx'; +import { MainButton } from '@/ui/input/button/components/MainButton'; +import { CardPicker } from '@/ui/input/components/CardPicker'; import { ProductPriceEntity, useCheckoutSessionMutation, useGetProductPricesQuery, -} from '~/generated/graphql.tsx'; +} from '~/generated/graphql'; import { isDefined } from '~/utils/isDefined'; const StyledChoosePlanContainer = styled.div` diff --git a/packages/twenty-front/src/pages/auth/CreateWorkspace.tsx b/packages/twenty-front/src/pages/auth/CreateWorkspace.tsx index 3313ace6b79f5..72216d7c99e84 100644 --- a/packages/twenty-front/src/pages/auth/CreateWorkspace.tsx +++ b/packages/twenty-front/src/pages/auth/CreateWorkspace.tsx @@ -17,7 +17,7 @@ import { useApolloMetadataClient } from '@/object-metadata/hooks/useApolloMetada import { WorkspaceLogoUploader } from '@/settings/workspace/components/WorkspaceLogoUploader'; import { AppPath } from '@/types/AppPath'; import { H2Title } from '@/ui/display/typography/components/H2Title'; -import { Loader } from '@/ui/feedback/loader/components/Loader.tsx'; +import { Loader } from '@/ui/feedback/loader/components/Loader'; import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar'; import { MainButton } from '@/ui/input/button/components/MainButton'; import { TextInput } from '@/ui/input/components/TextInput'; diff --git a/packages/twenty-front/src/pages/auth/PaymentSuccess.tsx b/packages/twenty-front/src/pages/auth/PaymentSuccess.tsx index 200a589b52d61..6be845d67338d 100644 --- a/packages/twenty-front/src/pages/auth/PaymentSuccess.tsx +++ b/packages/twenty-front/src/pages/auth/PaymentSuccess.tsx @@ -4,12 +4,12 @@ import { useTheme } from '@emotion/react'; import styled from '@emotion/styled'; import { IconCheck } from 'twenty-ui'; -import { SubTitle } from '@/auth/components/SubTitle.tsx'; -import { Title } from '@/auth/components/Title.tsx'; +import { SubTitle } from '@/auth/components/SubTitle'; +import { Title } from '@/auth/components/Title'; import { AppPath } from '@/types/AppPath'; -import { MainButton } from '@/ui/input/button/components/MainButton.tsx'; +import { MainButton } from '@/ui/input/button/components/MainButton'; import { RGBA } from '@/ui/theme/constants/Rgba'; -import { AnimatedEaseIn } from '@/ui/utilities/animation/components/AnimatedEaseIn.tsx'; +import { AnimatedEaseIn } from '@/ui/utilities/animation/components/AnimatedEaseIn'; const StyledCheckContainer = styled.div` align-items: center; diff --git a/packages/twenty-front/tsconfig.app.json b/packages/twenty-front/tsconfig.app.json index b3fe1c1eea5ee..7a17e21fdea85 100644 --- a/packages/twenty-front/tsconfig.app.json +++ b/packages/twenty-front/tsconfig.app.json @@ -12,5 +12,11 @@ "**/*.test.ts", "**/*.test.tsx" ], - "include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"] + "include": [ + "src/**/*.js", + "src/**/*.jsx", + "src/**/*.d.ts", + "src/**/*.ts", + "src/**/*.tsx" + ] } diff --git a/packages/twenty-front/tsconfig.json b/packages/twenty-front/tsconfig.json index 05a1f4108558a..2d35602a79265 100644 --- a/packages/twenty-front/tsconfig.json +++ b/packages/twenty-front/tsconfig.json @@ -9,7 +9,6 @@ "esModuleInterop": true, "moduleResolution": "bundler", "allowSyntheticDefaultImports": true, - "allowImportingTsExtensions": true, "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, diff --git a/packages/twenty-front/tsconfig.spec.json b/packages/twenty-front/tsconfig.spec.json index a966b82bf500d..7b115f8bbc828 100644 --- a/packages/twenty-front/tsconfig.spec.json +++ b/packages/twenty-front/tsconfig.spec.json @@ -1,7 +1,6 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "module": "commonjs", "types": ["jest", "node"] }, "include": [ diff --git a/packages/twenty-front/tsup.ui.index.tsx b/packages/twenty-front/tsup.ui.index.tsx index e16dafe3b1f0f..2c7c21debe8ef 100644 --- a/packages/twenty-front/tsup.ui.index.tsx +++ b/packages/twenty-front/tsup.ui.index.tsx @@ -21,7 +21,7 @@ export * from './src/modules/ui/input/button/components/FloatingButtonGroup' export * from './src/modules/ui/input/button/components/FloatingIconButton' export * from './src/modules/ui/input/button/components/FloatingIconButtonGroup' export * from './src/modules/ui/input/button/components/LightButton' -export * from './src/modules/ui/navigation/link/components/ActionLink.tsx' +export * from './src/modules/ui/navigation/link/components/ActionLink' export * from './src/modules/ui/input/button/components/LightIconButton' export * from './src/modules/ui/input/button/components/MainButton' export * from './src/modules/ui/input/button/components/RoundedIconButton'