diff --git a/apps/api b/apps/api index aba7b1ec1c..60c2f73607 160000 --- a/apps/api +++ b/apps/api @@ -1 +1 @@ -Subproject commit aba7b1ec1c9b5122609dea916c7b114e9a3ba66f +Subproject commit 60c2f736075122ec3b91a24ef612ad004d257cdb diff --git a/apps/console b/apps/console index ac2567263d..0f33218c84 160000 --- a/apps/console +++ b/apps/console @@ -1 +1 @@ -Subproject commit ac2567263de74449c6e4b98b468415ce1c1815d4 +Subproject commit 0f33218c84aac810efc3b8f2de483cbcb7c5836c diff --git a/apps/web/components/App.tsx b/apps/web/components/App.tsx index 3908a0efc4..d47a9136dc 100644 --- a/apps/web/components/App.tsx +++ b/apps/web/components/App.tsx @@ -3,16 +3,15 @@ import React, { useEffect, useState } from "react"; import useAddAppMutation from "@calcom/app-store/_utils/useAddAppMutation"; import { InstallAppButton } from "@calcom/app-store/components"; +import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import showToast from "@calcom/lib/notification"; import { trpc } from "@calcom/trpc/react"; import { App as AppType } from "@calcom/types/App"; import { Button, SkeletonButton } from "@calcom/ui"; +import Badge from "@calcom/ui/Badge"; import { Icon } from "@calcom/ui/Icon"; -import LicenseRequired from "@ee/components/LicenseRequired"; - -import Shell from "@components/Shell"; -import Badge from "@components/ui/Badge"; +import Shell from "@calcom/ui/Shell"; const Component = ({ name, diff --git a/apps/web/components/SettingsShell.tsx b/apps/web/components/SettingsShell.tsx index e3cb3c6d8b..fa777d088d 100644 --- a/apps/web/components/SettingsShell.tsx +++ b/apps/web/components/SettingsShell.tsx @@ -1,11 +1,10 @@ import React, { ComponentProps } from "react"; +import ErrorBoundary from "@calcom/ui/ErrorBoundary"; import { Icon } from "@calcom/ui/Icon"; - -import ErrorBoundary from "@lib/ErrorBoundary"; +import Shell from "@calcom/ui/Shell"; import NavTabs from "./NavTabs"; -import Shell from "./Shell"; const tabs = [ { diff --git a/apps/web/components/apps/AppCard.tsx b/apps/web/components/apps/AppCard.tsx index 6397b9e46b..dc1fdc0c49 100644 --- a/apps/web/components/apps/AppCard.tsx +++ b/apps/web/components/apps/AppCard.tsx @@ -1,10 +1,9 @@ import Link from "next/link"; import { trpc } from "@calcom/trpc/react"; +import Badge from "@calcom/ui/Badge"; import Button from "@calcom/ui/Button"; -import Badge from "@components/ui/Badge"; - interface AppCardProps { logo: string; name: string; diff --git a/apps/web/components/auth/SAMLLogin.tsx b/apps/web/components/auth/SAMLLogin.tsx index 62ec48ef0f..a675b90a5e 100644 --- a/apps/web/components/auth/SAMLLogin.tsx +++ b/apps/web/components/auth/SAMLLogin.tsx @@ -2,11 +2,11 @@ import { signIn } from "next-auth/react"; import { Dispatch, SetStateAction } from "react"; import { useFormContext } from "react-hook-form"; +import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@calcom/lib/telemetry"; import { trpc } from "@calcom/trpc/react"; import Button from "@calcom/ui/Button"; import { useLocale } from "@lib/hooks/useLocale"; -import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@lib/telemetry"; interface Props { email: string; diff --git a/apps/web/components/booking/CancelBooking.tsx b/apps/web/components/booking/CancelBooking.tsx index 9e88d49021..c3aa355c48 100644 --- a/apps/web/components/booking/CancelBooking.tsx +++ b/apps/web/components/booking/CancelBooking.tsx @@ -2,13 +2,12 @@ import { useRouter } from "next/router"; import { useState } from "react"; import { useLocale } from "@calcom/lib/hooks/useLocale"; -import { RecurringEvent } from "@calcom/types/Calendar"; +import useTheme from "@calcom/lib/hooks/useTheme"; +import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@calcom/lib/telemetry"; +import type { RecurringEvent } from "@calcom/types/Calendar"; import { Button } from "@calcom/ui/Button"; import { Icon } from "@calcom/ui/Icon"; -import useTheme from "@lib/hooks/useTheme"; -import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@lib/telemetry"; - type Props = { booking: { title?: string; diff --git a/apps/web/components/booking/TimeOptions.tsx b/apps/web/components/booking/TimeOptions.tsx index 2db42d4836..f1916b0d14 100644 --- a/apps/web/components/booking/TimeOptions.tsx +++ b/apps/web/components/booking/TimeOptions.tsx @@ -2,8 +2,7 @@ import { FC, useEffect, useState } from "react"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import Switch from "@calcom/ui/Switch"; - -import TimezoneSelect, { ITimezoneOption } from "@components/ui/form/TimezoneSelect"; +import TimezoneSelect, { ITimezoneOption } from "@calcom/ui/form/TimezoneSelect"; import { is24h, timeZone } from "../../lib/clock"; diff --git a/apps/web/components/booking/pages/AvailabilityPage.tsx b/apps/web/components/booking/pages/AvailabilityPage.tsx index 26b7deaaa5..8ab45db6c0 100644 --- a/apps/web/components/booking/pages/AvailabilityPage.tsx +++ b/apps/web/components/booking/pages/AvailabilityPage.tsx @@ -1,7 +1,6 @@ // Get router variables import { EventType } from "@prisma/client"; import * as Collapsible from "@radix-ui/react-collapsible"; -import { useContracts } from "contexts/contractsContext"; import { TFunction } from "next-i18next"; import { useRouter } from "next/router"; import { useEffect, useMemo, useState } from "react"; @@ -16,11 +15,15 @@ import { useEmbedNonStylesConfig, useIsBackgroundTransparent, } from "@calcom/embed-core/embed-iframe"; +import { useContracts } from "@calcom/features/ee/web3/contexts/contractsContext"; import CustomBranding from "@calcom/lib/CustomBranding"; import classNames from "@calcom/lib/classNames"; import { CAL_URL, WEBSITE_URL } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; +import useTheme from "@calcom/lib/hooks/useTheme"; import { getRecurringFreq } from "@calcom/lib/recurringStrings"; +import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@calcom/lib/telemetry"; +import { detectBrowserTimeFormat } from "@calcom/lib/timeFormat"; import { localStorage } from "@calcom/lib/webstorage"; import { trpc } from "@calcom/trpc/react"; import { Icon } from "@calcom/ui/Icon"; @@ -29,10 +32,7 @@ import DatePicker from "@calcom/ui/booker/DatePicker"; import { timeZone as localStorageTimeZone } from "@lib/clock"; // import { timeZone } from "@lib/clock"; import { useExposePlanGlobally } from "@lib/hooks/useExposePlanGlobally"; -import useTheme from "@lib/hooks/useTheme"; import { isBrandingHidden } from "@lib/isBrandingHidden"; -import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@lib/telemetry"; -import { detectBrowserTimeFormat } from "@lib/timeFormat"; import AvailableTimes from "@components/booking/AvailableTimes"; import TimeOptions from "@components/booking/TimeOptions"; diff --git a/apps/web/components/booking/pages/BookingPage.tsx b/apps/web/components/booking/pages/BookingPage.tsx index 7c335f4725..bd1f36e060 100644 --- a/apps/web/components/booking/pages/BookingPage.tsx +++ b/apps/web/components/booking/pages/BookingPage.tsx @@ -1,9 +1,7 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { EventTypeCustomInputType, WorkflowActions } from "@prisma/client"; -import { useContracts } from "contexts/contractsContext"; import { isValidPhoneNumber } from "libphonenumber-js"; import { useSession } from "next-auth/react"; -import dynamic from "next/dynamic"; import Head from "next/head"; import { useRouter } from "next/router"; import { useEffect, useMemo, useState } from "react"; @@ -14,36 +12,37 @@ import { useMutation } from "react-query"; import { v4 as uuidv4 } from "uuid"; import { z } from "zod"; +import { createPaymentLink } from "@calcom/app-store/stripepayment/lib/client"; import dayjs from "@calcom/dayjs"; import { useEmbedNonStylesConfig, useIsBackgroundTransparent, useIsEmbed, } from "@calcom/embed-core/embed-iframe"; +import { useContracts } from "@calcom/features/ee/web3/contexts/contractsContext"; import CustomBranding from "@calcom/lib/CustomBranding"; import classNames from "@calcom/lib/classNames"; import { useLocale } from "@calcom/lib/hooks/useLocale"; +import useTheme from "@calcom/lib/hooks/useTheme"; import { HttpError } from "@calcom/lib/http-error"; import { getEveryFreqFor } from "@calcom/lib/recurringStrings"; -import { createPaymentLink } from "@calcom/stripe/client"; +import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@calcom/lib/telemetry"; import { Button } from "@calcom/ui/Button"; import { Icon } from "@calcom/ui/Icon"; import { Tooltip } from "@calcom/ui/Tooltip"; +import PhoneInput from "@calcom/ui/form/PhoneInputLazy"; import { EmailInput, Form } from "@calcom/ui/form/fields"; import { asStringOrNull } from "@lib/asStringOrNull"; import { timeZone } from "@lib/clock"; import { ensureArray } from "@lib/ensureArray"; -import useTheme from "@lib/hooks/useTheme"; import { LocationObject, LocationType } from "@lib/location"; import createBooking from "@lib/mutations/bookings/create-booking"; import createRecurringBooking from "@lib/mutations/bookings/create-recurring-booking"; import { parseDate, parseRecurringDates } from "@lib/parseDate"; import slugify from "@lib/slugify"; -import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@lib/telemetry"; import AvatarGroup from "@components/ui/AvatarGroup"; -import type PhoneInputType from "@components/ui/form/PhoneInput"; import { BookPageProps } from "../../../pages/[user]/book"; import { HashLinkPageProps } from "../../../pages/d/[link]/book"; @@ -58,11 +57,6 @@ declare global { }; } -/** These are like 40kb that not every user needs */ -const PhoneInput = dynamic( - () => import("@components/ui/form/PhoneInput") -) as unknown as typeof PhoneInputType; - type BookingPageProps = (BookPageProps | TeamBookingPageProps | HashLinkPageProps) & { locationLabels: Record; }; diff --git a/apps/web/components/dialog/EditLocationDialog.tsx b/apps/web/components/dialog/EditLocationDialog.tsx index b768086af2..04d9d9e846 100644 --- a/apps/web/components/dialog/EditLocationDialog.tsx +++ b/apps/web/components/dialog/EditLocationDialog.tsx @@ -1,31 +1,25 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { isValidPhoneNumber } from "libphonenumber-js"; -import dynamic from "next/dynamic"; import { useEffect } from "react"; import { Controller, useForm, useWatch } from "react-hook-form"; import { z } from "zod"; -import classNames from "@calcom/lib/classNames"; +import { LocationOptionsToString } from "@calcom/app-store/locations"; +import { LocationType } from "@calcom/core/location"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { inferQueryOutput, trpc } from "@calcom/trpc/react"; import { Button } from "@calcom/ui"; import { Dialog, DialogContent } from "@calcom/ui/Dialog"; import { Icon } from "@calcom/ui/Icon"; +import PhoneInput from "@calcom/ui/form/PhoneInputLazy"; import { Form } from "@calcom/ui/form/fields"; import { QueryCell } from "@lib/QueryCell"; import { linkValueToString } from "@lib/linkValueToString"; -import { LocationType } from "@lib/location"; -import { LocationOptionsToString } from "@lib/locationOptions"; import CheckboxField from "@components/ui/form/CheckboxField"; -import type PhoneInputType from "@components/ui/form/PhoneInput"; import Select from "@components/ui/form/Select"; -const PhoneInput = dynamic( - () => import("@components/ui/form/PhoneInput") -) as unknown as typeof PhoneInputType; - type BookingItem = inferQueryOutput<"viewer.bookings">["bookings"][number]; type OptionTypeBase = { diff --git a/apps/web/components/eventtype/RecurringEventController.tsx b/apps/web/components/eventtype/RecurringEventController.tsx index 3e90df32a6..7365477339 100644 --- a/apps/web/components/eventtype/RecurringEventController.tsx +++ b/apps/web/components/eventtype/RecurringEventController.tsx @@ -4,7 +4,7 @@ import { UseFormReturn } from "react-hook-form"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Frequency } from "@calcom/prisma/zod-utils"; -import { RecurringEvent } from "@calcom/types/Calendar"; +import type { RecurringEvent } from "@calcom/types/Calendar"; import { Alert } from "@calcom/ui/Alert"; import Select from "@components/ui/form/Select"; diff --git a/apps/web/components/integrations/CalendarListContainer.tsx b/apps/web/components/integrations/CalendarListContainer.tsx index d2864bf265..2dd99a1310 100644 --- a/apps/web/components/integrations/CalendarListContainer.tsx +++ b/apps/web/components/integrations/CalendarListContainer.tsx @@ -7,15 +7,15 @@ import showToast from "@calcom/lib/notification"; import { inferQueryOutput, trpc } from "@calcom/trpc/react"; import { Alert } from "@calcom/ui/Alert"; import Button from "@calcom/ui/Button"; +import { List } from "@calcom/ui/List"; +import { ShellSubHeading } from "@calcom/ui/Shell"; import Switch from "@calcom/ui/Switch"; +import SkeletonLoader from "@calcom/ui/apps/SkeletonLoader"; import { QueryCell } from "@lib/QueryCell"; import AdditionalCalendarSelector from "@components/AdditionalCalendarSelector"; import DestinationCalendarSelector from "@components/DestinationCalendarSelector"; -import { List } from "@components/List"; -import { ShellSubHeading } from "@components/Shell"; -import SkeletonLoader from "@components/apps/SkeletonLoader"; import DisconnectIntegration from "./DisconnectIntegration"; import IntegrationListItem from "./IntegrationListItem"; diff --git a/apps/web/components/integrations/DisconnectIntegration.tsx b/apps/web/components/integrations/DisconnectIntegration.tsx index ec74fea0b2..316e932548 100644 --- a/apps/web/components/integrations/DisconnectIntegration.tsx +++ b/apps/web/components/integrations/DisconnectIntegration.tsx @@ -1,14 +1,12 @@ import { useState } from "react"; -import { useMutation } from "react-query"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import showToast from "@calcom/lib/notification"; import { trpc } from "@calcom/trpc/react"; import { ButtonBaseProps } from "@calcom/ui/Button"; +import ConfirmationDialogContent from "@calcom/ui/ConfirmationDialogContent"; import { Dialog } from "@calcom/ui/Dialog"; -import ConfirmationDialogContent from "@components/dialog/ConfirmationDialogContent"; - export default function DisconnectIntegration(props: { /** Integration credential id */ id: number; diff --git a/apps/web/components/integrations/IntegrationListItem.tsx b/apps/web/components/integrations/IntegrationListItem.tsx index 9333c747b9..ca1cf52595 100644 --- a/apps/web/components/integrations/IntegrationListItem.tsx +++ b/apps/web/components/integrations/IntegrationListItem.tsx @@ -1,9 +1,9 @@ import Link from "next/link"; import { ReactNode } from "react"; -import classNames from "@lib/classNames"; +import { ListItem, ListItemText, ListItemTitle } from "@calcom/ui/List"; -import { ListItem, ListItemText, ListItemTitle } from "@components/List"; +import classNames from "@lib/classNames"; function IntegrationListItem(props: { imageSrc?: string; diff --git a/apps/web/components/integrations/SubHeadingTitleWithConnections.tsx b/apps/web/components/integrations/SubHeadingTitleWithConnections.tsx index 80d120d301..f6e083859d 100644 --- a/apps/web/components/integrations/SubHeadingTitleWithConnections.tsx +++ b/apps/web/components/integrations/SubHeadingTitleWithConnections.tsx @@ -1,6 +1,6 @@ import { ReactNode } from "react"; -import Badge from "@components/ui/Badge"; +import Badge from "@calcom/ui/Badge"; function pluralize(opts: { num: number; plural: string; singular: string }) { if (opts.num === 0) { diff --git a/apps/web/components/security/DisableUserImpersonation.tsx b/apps/web/components/security/DisableUserImpersonation.tsx index 79b1f297c4..18269b3b13 100644 --- a/apps/web/components/security/DisableUserImpersonation.tsx +++ b/apps/web/components/security/DisableUserImpersonation.tsx @@ -1,10 +1,9 @@ import { useLocale } from "@calcom/lib/hooks/useLocale"; import showToast from "@calcom/lib/notification"; import { trpc } from "@calcom/trpc/react"; +import Badge from "@calcom/ui/Badge"; import Button from "@calcom/ui/Button"; -import Badge from "@components/ui/Badge"; - const DisableUserImpersonation = ({ disableImpersonation }: { disableImpersonation: boolean }) => { const utils = trpc.useContext(); diff --git a/apps/web/components/security/TwoFactorAuthSection.tsx b/apps/web/components/security/TwoFactorAuthSection.tsx index b21273fdd6..4a2b03325e 100644 --- a/apps/web/components/security/TwoFactorAuthSection.tsx +++ b/apps/web/components/security/TwoFactorAuthSection.tsx @@ -1,11 +1,10 @@ import { useState } from "react"; +import Badge from "@calcom/ui/Badge"; import Button from "@calcom/ui/Button"; import { useLocale } from "@lib/hooks/useLocale"; -import Badge from "@components/ui/Badge"; - import DisableTwoFactorModal from "./DisableTwoFactorModal"; import EnableTwoFactorModal from "./EnableTwoFactorModal"; diff --git a/apps/web/components/team/DisableTeamImpersonation.tsx b/apps/web/components/team/DisableTeamImpersonation.tsx index d1b75b5f7c..c88cf569bf 100644 --- a/apps/web/components/team/DisableTeamImpersonation.tsx +++ b/apps/web/components/team/DisableTeamImpersonation.tsx @@ -1,10 +1,9 @@ import { useLocale } from "@calcom/lib/hooks/useLocale"; import showToast from "@calcom/lib/notification"; import { trpc } from "@calcom/trpc/react"; +import Badge from "@calcom/ui/Badge"; import Button from "@calcom/ui/Button"; -import Badge from "@components/ui/Badge"; - const DisableTeamImpersonation = ({ teamId, memberId }: { teamId: number; memberId: number }) => { const { t } = useLocale(); diff --git a/apps/web/components/team/MemberListItem.tsx b/apps/web/components/team/MemberListItem.tsx index 4849c2ec9a..850b4a6f9b 100644 --- a/apps/web/components/team/MemberListItem.tsx +++ b/apps/web/components/team/MemberListItem.tsx @@ -3,11 +3,13 @@ import { signIn } from "next-auth/react"; import Link from "next/link"; import { useState } from "react"; +import TeamAvailabilityModal from "@calcom/features/ee/teams/components/TeamAvailabilityModal"; import { WEBAPP_URL } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import showToast from "@calcom/lib/notification"; import { inferQueryOutput, trpc } from "@calcom/trpc/react"; import Button from "@calcom/ui/Button"; +import ConfirmationDialogContent from "@calcom/ui/ConfirmationDialogContent"; import { Dialog, DialogTrigger } from "@calcom/ui/Dialog"; import Dropdown, { DropdownMenuContent, @@ -17,11 +19,9 @@ import Dropdown, { } from "@calcom/ui/Dropdown"; import { Icon } from "@calcom/ui/Icon"; import { Tooltip } from "@calcom/ui/Tooltip"; -import TeamAvailabilityModal from "@ee/components/team/availability/TeamAvailabilityModal"; import useCurrentUserId from "@lib/hooks/useCurrentUserId"; -import ConfirmationDialogContent from "@components/dialog/ConfirmationDialogContent"; import Avatar from "@components/ui/Avatar"; import ModalContainer from "@components/ui/ModalContainer"; diff --git a/apps/web/components/team/SkeletonloaderTeamList.tsx b/apps/web/components/team/SkeletonloaderTeamList.tsx index 137b1be84b..8acb96d944 100644 --- a/apps/web/components/team/SkeletonloaderTeamList.tsx +++ b/apps/web/components/team/SkeletonloaderTeamList.tsx @@ -1,10 +1,6 @@ -import React from "react"; - import { SkeletonText } from "@calcom/ui"; -import { ShellSubHeading } from "@components/Shell"; - -function SkeletonLoaderTeamList({ className }: { className?: string }) { +function SkeletonLoaderTeamList() { return ( <>