refactor: move shared components from apps/web to packages/features (#27490)
* refactor: move shared components from apps/web to packages/features Move components that don't require dependency injection: - DisconnectIntegrationModal - Booking components (Header, Section, TimeFormatToggle, PayIcon, Price) - useInitializeWeekStart hook - TeamEventTypeForm - Event type components (AssignAllTeamMembers, BulkEditDefaultForEventsModal, etc.) - Event type dialogs (HostEditDialogs, ManagedEventDialog) - Location components (LocationInput, types) - Tab components (EventLimitsTab, EventRecurringTab, etc.) Co-Authored-By: benny@cal.com <sldisek783@gmail.com> * refactor: update import paths to use @calcom/features Update imports in apps/web and packages/platform/atoms to reference the moved components from @calcom/features instead of @calcom/web. Co-Authored-By: benny@cal.com <sldisek783@gmail.com> * refactor: delete original files from apps/web/modules Complete the file move by deleting the original files that were copied to packages/features. This makes it a proper move instead of a copy, reducing the PR size significantly. Co-Authored-By: benny@cal.com <sldisek783@gmail.com> * fix: update import paths to use @calcom/features for moved files Update import paths in apps/web files that reference components that were moved from apps/web/modules to packages/features: - LearnMoreLink - ChildrenEventTypeSelect - AssignAllTeamMembers - WeightDescription - LocationCustomClassNames (types) Co-Authored-By: benny@cal.com <sldisek783@gmail.com> * fix: update additional import paths for moved components Update import paths in apps/web files that reference components moved from apps/web/modules to packages/features: - AppList.tsx: BulkEditDefaultForEventsModal - schedule-view.tsx: BulkUpdatParams type - AddMembersWithSwitch.tsx: AssignAllTeamMembers, CheckedTeamSelect - EventTypeWebWrapper.tsx: ChildrenEventType, ManagedEventDialog - DefaultLocationSettings.tsx: LocationCustomClassNames, LocationInput - Locations.tsx: LocationCustomClassNames, LocationInput Co-Authored-By: benny@cal.com <sldisek783@gmail.com> * fix: resolve circular dependency by adding isPlatform prop to Header This fixes the circular dependency where @calcom/atoms (CalendarViewComponent) was importing Header from @calcom/features, but Header was importing useIsPlatform from @calcom/atoms. The fix adds an isPlatform prop to the Header component so it no longer needs to import useIsPlatform from @calcom/atoms. Callers now pass the isPlatform value directly: - atoms components pass isPlatform={true} - web components pass the isPlatform prop they receive Fix confidence: 9/10 (Cubic AI) Co-Authored-By: unknown <> * fix * fix * fix * fix * fix * fix --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
unknown <>
Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent
e29662b173
commit
8c123ece25
@@ -9,8 +9,8 @@ import { getPaymentAppData } from "@calcom/app-store/_utils/payments/getPaymentA
|
||||
import { getSuccessPageLocationMessage } from "@calcom/app-store/locations";
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import { sdkActionManager, useIsEmbed } from "@calcom/embed-core/embed-iframe";
|
||||
import { PayIcon } from "@calcom/web/modules/bookings/components/event-meta/PayIcon";
|
||||
import { Price } from "@calcom/web/modules/bookings/components/event-meta/Price";
|
||||
import { PayIcon } from "@calcom/features/bookings/components/event-meta/PayIcon";
|
||||
import { Price } from "@calcom/features/bookings/components/event-meta/Price";
|
||||
import type { PaymentPageProps } from "@calcom/features/ee/payments/pages/payment";
|
||||
import { APP_NAME, WEBSITE_URL } from "@calcom/lib/constants";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
|
||||
@@ -10,8 +10,8 @@ import { AppSetDefaultLinkDialog } from "@calcom/web/modules/apps/components/App
|
||||
import type {
|
||||
BulkUpdatParams,
|
||||
EventTypes,
|
||||
} from "@calcom/web/modules/event-types/components/BulkEditDefaultForEventsModal";
|
||||
import { BulkEditDefaultForEventsModal } from "@calcom/web/modules/event-types/components/BulkEditDefaultForEventsModal";
|
||||
} from "@calcom/features/eventtypes/components/BulkEditDefaultForEventsModal";
|
||||
import { BulkEditDefaultForEventsModal } from "@calcom/features/eventtypes/components/BulkEditDefaultForEventsModal";
|
||||
import { isDelegationCredential } from "@calcom/lib/delegationCredential";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import type { AppCategories } from "@calcom/prisma/enums";
|
||||
|
||||
@@ -12,7 +12,7 @@ import { SkeletonText, SkeletonContainer } from "@calcom/ui/components/skeleton"
|
||||
import { showToast } from "@calcom/ui/components/toast";
|
||||
|
||||
import { AppList } from "./AppList";
|
||||
import DisconnectIntegrationModal from "./DisconnectIntegrationModal";
|
||||
import DisconnectIntegrationModal from "@calcom/features/apps/components/DisconnectIntegrationModal";
|
||||
|
||||
type UpdateUsersDefaultConferencingAppParams = {
|
||||
appSlug: string;
|
||||
|
||||
@@ -5,10 +5,10 @@ import { useReducer } from "react";
|
||||
import getAppCategoryTitle from "@calcom/app-store/_utils/getAppCategoryTitle";
|
||||
import { AppList, type HandleDisconnect } from "@calcom/web/modules/apps/components/AppList";
|
||||
import type { UpdateUsersDefaultConferencingAppParams } from "@calcom/web/modules/apps/components/AppSetDefaultLinkDialog";
|
||||
import DisconnectIntegrationModal from "@calcom/web/modules/apps/components/DisconnectIntegrationModal";
|
||||
import type { RemoveAppParams } from "@calcom/web/modules/apps/components/DisconnectIntegrationModal";
|
||||
import DisconnectIntegrationModal from "@calcom/features/apps/components/DisconnectIntegrationModal";
|
||||
import type { RemoveAppParams } from "@calcom/features/apps/components/DisconnectIntegrationModal";
|
||||
import { SkeletonLoader } from "@calcom/web/modules/apps/components/SkeletonLoader";
|
||||
import type { BulkUpdatParams } from "@calcom/web/modules/event-types/components/BulkEditDefaultForEventsModal";
|
||||
import type { BulkUpdatParams } from "@calcom/features/eventtypes/components/BulkEditDefaultForEventsModal";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { AppCategories } from "@calcom/prisma/enums";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useRouter, useSearchParams } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
|
||||
import { AvailabilitySettings } from "@calcom/atoms/availability/AvailabilitySettings";
|
||||
import type { BulkUpdatParams } from "@calcom/web/modules/event-types/components/BulkEditDefaultForEventsModal";
|
||||
import type { BulkUpdatParams } from "@calcom/features/eventtypes/components/BulkEditDefaultForEventsModal";
|
||||
import { withErrorFromUnknown } from "@calcom/lib/getClientErrorFromUnknown";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { HttpError } from "@calcom/lib/http-error";
|
||||
|
||||
@@ -7,8 +7,8 @@ import { useRouter, usePathname } from "next/navigation";
|
||||
import { useCallback, useState } from "react";
|
||||
import posthog from "posthog-js";
|
||||
|
||||
import { BulkEditDefaultForEventsModal } from "@calcom/web/modules/event-types/components/BulkEditDefaultForEventsModal";
|
||||
import type { BulkUpdatParams } from "@calcom/web/modules/event-types/components/BulkEditDefaultForEventsModal";
|
||||
import { BulkEditDefaultForEventsModal } from "@calcom/features/eventtypes/components/BulkEditDefaultForEventsModal";
|
||||
import type { BulkUpdatParams } from "@calcom/features/eventtypes/components/BulkEditDefaultForEventsModal";
|
||||
import { NewScheduleButton } from "@calcom/web/modules/schedules/components/NewScheduleButton";
|
||||
import { ScheduleListItem } from "@calcom/features/schedules/components/ScheduleListItem";
|
||||
import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";
|
||||
|
||||
@@ -8,7 +8,7 @@ import { nameOfDay } from "@calcom/lib/weekday";
|
||||
import { BookerLayouts } from "@calcom/prisma/zod-utils";
|
||||
import classNames from "@calcom/ui/classNames";
|
||||
|
||||
import { TimeFormatToggle } from "./TimeFormatToggle";
|
||||
import { TimeFormatToggle } from "@calcom/features/bookings/components/TimeFormatToggle";
|
||||
|
||||
type AvailableTimesHeaderProps = {
|
||||
date: Dayjs;
|
||||
|
||||
@@ -45,12 +45,12 @@ import { DatePicker } from "./DatePicker";
|
||||
import { DryRunMessage } from "./DryRunMessage";
|
||||
import { EventMeta } from "./EventMeta";
|
||||
import { HavingTroubleFindingTime } from "./HavingTroubleFindingTime";
|
||||
import { Header } from "./Header";
|
||||
import { Header } from "@calcom/features/bookings/components/Header";
|
||||
import { InstantBooking } from "./InstantBooking";
|
||||
import { LargeCalendar } from "./LargeCalendar";
|
||||
import { OverlayCalendar } from "./OverlayCalendar/OverlayCalendar";
|
||||
import { RedirectToInstantMeetingModal } from "./RedirectToInstantMeetingModal";
|
||||
import { BookerSection } from "./Section";
|
||||
import { BookerSection } from "@calcom/features/bookings/components/Section";
|
||||
import { SlotSelectionModalHeader } from "./SlotSelectionModalHeader";
|
||||
import { NotFound } from "./Unavailable";
|
||||
import { VerifyCodeDialog } from "./VerifyCodeDialog";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { vi } from "vitest";
|
||||
// Mock layout components
|
||||
vi.mock("../Header", () => ({
|
||||
|
||||
vi.mock("@calcom/features/bookings/components/Header", () => ({
|
||||
Header: ({ children }: { children: React.ReactNode }) => <div data-testid="header">{children}</div>,
|
||||
}));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type React from "react";
|
||||
import { vi } from "vitest";
|
||||
|
||||
vi.mock("../Section", () => {
|
||||
vi.mock("@calcom/features/bookings/components/Section", () => {
|
||||
const BookerSection = ({
|
||||
children,
|
||||
className = "",
|
||||
|
||||
@@ -13,7 +13,7 @@ import { EventDetailBlocks } from "@calcom/features/bookings/types";
|
||||
import { AvailableEventLocations } from "./AvailableEventLocations";
|
||||
import { EventDuration } from "./Duration";
|
||||
import { EventOccurences } from "./Occurences";
|
||||
import { Price } from "./Price";
|
||||
import { Price } from "@calcom/features/bookings/components/event-meta/Price";
|
||||
|
||||
type EventDetailsPropsBase = {
|
||||
event: Pick<
|
||||
|
||||
@@ -3,4 +3,4 @@ export { EventTitle } from "./Title";
|
||||
export { EventMetaSkeleton } from "./Skeleton";
|
||||
export { EventMembers } from "./Members";
|
||||
export { PriceIcon } from "./PriceIcon";
|
||||
export { PayIcon } from "./PayIcon";
|
||||
export { PayIcon } from "@calcom/features/bookings/components/event-meta/PayIcon";
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
useIsBackgroundTransparent,
|
||||
useIsEmbed,
|
||||
} from "@calcom/embed-core/embed-iframe";
|
||||
import { Price } from "@calcom/web/modules/bookings/components/event-meta/Price";
|
||||
import { Price } from "@calcom/features/bookings/components/event-meta/Price";
|
||||
import { getCalendarLinks, CalendarLinkType } from "@calcom/features/bookings/lib/getCalendarLinks";
|
||||
import { RATING_OPTIONS, validateRating } from "@calcom/features/bookings/lib/rating";
|
||||
import { isWithinMinimumRescheduleNotice as isWithinMinimumRescheduleNoticeUtil } from "@calcom/features/bookings/lib/reschedule/isWithinMinimumRescheduleNotice";
|
||||
|
||||
@@ -21,7 +21,7 @@ import { SettingsToggle } from "@calcom/ui/components/form";
|
||||
import { CheckboxField } from "@calcom/ui/components/form";
|
||||
import { showToast } from "@calcom/ui/components/toast";
|
||||
import { revalidateTeamDataCache } from "@calcom/web/app/(booking-page-wrapper)/team/[slug]/[type]/actions";
|
||||
import { IntervalLimitsManager } from "@calcom/web/modules/event-types/components/tabs/limits/EventLimitsTab";
|
||||
import { IntervalLimitsManager } from "@calcom/features/eventtypes/components/tabs/limits/EventLimitsTab";
|
||||
|
||||
import DisableTeamImpersonation from "../components/DisableTeamImpersonation";
|
||||
import { default as InternalNotePresetsView } from "../components/InternalNotePresetsView";
|
||||
|
||||
@@ -15,9 +15,9 @@ import { Controller, useFormContext } from "react-hook-form";
|
||||
import type { Options } from "react-select";
|
||||
import { AddMembersWithSwitchWebWrapper } from "./AddMembersWithSwitchWebWrapper";
|
||||
|
||||
import AssignAllTeamMembers from "./AssignAllTeamMembers";
|
||||
import type { CheckedSelectOption, CheckedTeamSelectCustomClassNames } from "./CheckedTeamSelect";
|
||||
import CheckedTeamSelect from "./CheckedTeamSelect";
|
||||
import AssignAllTeamMembers from "@calcom/features/eventtypes/components/AssignAllTeamMembers";
|
||||
import type { CheckedSelectOption, CheckedTeamSelectCustomClassNames } from "@calcom/features/eventtypes/components/CheckedTeamSelect";
|
||||
import CheckedTeamSelect from "@calcom/features/eventtypes/components/CheckedTeamSelect";
|
||||
|
||||
interface IUserToValue {
|
||||
id: number | null;
|
||||
|
||||
@@ -4,7 +4,7 @@ import { z } from "zod";
|
||||
|
||||
import { Dialog } from "@calcom/features/components/controlled-dialog";
|
||||
import { useOrgBranding } from "@calcom/features/ee/organizations/context/provider";
|
||||
import CreateEventTypeForm from "@calcom/web/modules/event-types/components/CreateEventTypeForm";
|
||||
import CreateEventTypeForm from "@calcom/features/eventtypes/components/CreateEventTypeForm";
|
||||
import { useCreateEventType } from "@calcom/features/eventtypes/hooks/useCreateEventType";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { useTypedQuery } from "@calcom/lib/hooks/useTypedQuery";
|
||||
@@ -15,7 +15,7 @@ import { trpc } from "@calcom/trpc/react";
|
||||
import { Button } from "@calcom/ui/components/button";
|
||||
import { DialogContent, DialogFooter, DialogClose } from "@calcom/ui/components/dialog";
|
||||
import { showToast } from "@calcom/ui/components/toast";
|
||||
import { TeamEventTypeForm } from "@calcom/web/modules/ee/teams/components/TeamEventTypeForm";
|
||||
import { TeamEventTypeForm } from "@calcom/features/ee/teams/components/TeamEventTypeForm";
|
||||
|
||||
// this describes the uniform data needed to create a new event type on Profile or Team
|
||||
export interface EventTypeParent {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useAutoAnimate } from "@formkit/auto-animate/react";
|
||||
import type { UseFormReturn } from "react-hook-form";
|
||||
|
||||
import type { Workflow } from "@calcom/features/ee/workflows/lib/types";
|
||||
import type { ChildrenEventType } from "@calcom/web/modules/event-types/components/ChildrenEventTypeSelect";
|
||||
import type { ChildrenEventType } from "@calcom/features/eventtypes/components/ChildrenEventTypeSelect";
|
||||
import type {
|
||||
TabMap,
|
||||
EventTypeSetupProps,
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useMemo } from "react";
|
||||
|
||||
import { getPaymentAppData } from "@calcom/app-store/_utils/payments/getPaymentAppData";
|
||||
import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";
|
||||
import { Price } from "@calcom/web/modules/bookings/components/event-meta/Price";
|
||||
import { Price } from "@calcom/features/bookings/components/event-meta/Price";
|
||||
import { PriceIcon } from "@calcom/web/modules/bookings/components/event-meta/PriceIcon";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { parseRecurringEvent } from "@calcom/lib/isRecurringEvent";
|
||||
|
||||
@@ -24,7 +24,7 @@ import { TRPCClientError } from "@trpc/react-query";
|
||||
import { revalidateTeamEventTypeCache } from "@calcom/web/app/(booking-page-wrapper)/team/[slug]/[type]/actions";
|
||||
import { revalidateEventTypeEditPage } from "@calcom/web/app/(use-page-wrapper)/event-types/[type]/actions";
|
||||
|
||||
import type { ChildrenEventType } from "./ChildrenEventTypeSelect";
|
||||
import type { ChildrenEventType } from "@calcom/features/eventtypes/components/ChildrenEventTypeSelect";
|
||||
import { EventType as EventTypeComponent } from "./EventType";
|
||||
import { useEventTypeForm } from "@calcom/atoms/event-types/hooks/useEventTypeForm";
|
||||
import { useHandleRouteChange } from "@calcom/atoms/event-types/hooks/useHandleRouteChange";
|
||||
@@ -45,7 +45,9 @@ type EventPermissions = {
|
||||
};
|
||||
};
|
||||
|
||||
const ManagedEventTypeDialog = dynamic(() => import("./dialogs/ManagedEventDialog"));
|
||||
const ManagedEventTypeDialog = dynamic(() =>
|
||||
import("@calcom/features/eventtypes/components/dialogs/ManagedEventDialog")
|
||||
);
|
||||
|
||||
const AssignmentWarningDialog = dynamic(() => import("./dialogs/AssignmentWarningDialog"));
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import dynamic from "next/dynamic";
|
||||
|
||||
export { default as CheckedTeamSelect } from "./CheckedTeamSelect";
|
||||
export { default as CheckedTeamSelect } from "@calcom/features/eventtypes/components/CheckedTeamSelect";
|
||||
export { default as EventTypeDescription } from "./EventTypeDescription";
|
||||
export { LearnMoreLink } from "./LearnMoreLink";
|
||||
export { LearnMoreLink } from "@calcom/features/eventtypes/components/LearnMoreLink";
|
||||
export { MultiplePrivateLinksController } from "./MultiplePrivateLinksController";
|
||||
export const EventTypeDescriptionLazy = dynamic(() => import("./EventTypeDescription"));
|
||||
|
||||
@@ -2,14 +2,14 @@ import { ErrorMessage } from "@hookform/error-message";
|
||||
import { useFieldArray, useFormContext } from "react-hook-form";
|
||||
|
||||
import { getEventLocationType } from "@calcom/app-store/locations";
|
||||
import type { LocationCustomClassNames } from "./types";
|
||||
import type { LocationCustomClassNames } from "@calcom/features/eventtypes/components/locations/types";
|
||||
import type { LocationFormValues, FormValues } from "@calcom/features/eventtypes/lib/types";
|
||||
import CheckboxField from "@calcom/features/form/components/CheckboxField";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import classNames from "@calcom/ui/classNames";
|
||||
import { TextField } from "@calcom/ui/components/form";
|
||||
|
||||
import LocationInput from "./LocationInput";
|
||||
import LocationInput from "@calcom/features/eventtypes/components/locations/LocationInput";
|
||||
import LocationOptionContainer from "./LocationSettingsContainer";
|
||||
|
||||
const DefaultLocationSettings = ({
|
||||
|
||||
@@ -8,7 +8,7 @@ import type { UseFormGetValues, UseFormSetValue, Control, FormState } from "reac
|
||||
import type { EventLocationType } from "@calcom/app-store/locations";
|
||||
import { getEventLocationType, MeetLocationType } from "@calcom/app-store/locations";
|
||||
import { useIsPlatform } from "@calcom/atoms/hooks/useIsPlatform";
|
||||
import type { LocationCustomClassNames } from "./types";
|
||||
import type { LocationCustomClassNames } from "@calcom/features/eventtypes/components/locations/types";
|
||||
import type { LocationFormValues, EventTypeSetupProps } from "@calcom/features/eventtypes/lib/types";
|
||||
import CheckboxField from "@calcom/features/form/components/CheckboxField";
|
||||
import type { SingleValueLocationOption } from "@calcom/features/form/components/LocationSelect";
|
||||
@@ -23,7 +23,7 @@ import { showToast } from "@calcom/ui/components/toast";
|
||||
|
||||
import CalVideoSettings from "./CalVideoSettings";
|
||||
import DefaultLocationSettings from "./DefaultLocationSettings";
|
||||
import LocationInput from "./LocationInput";
|
||||
import LocationInput from "@calcom/features/eventtypes/components/locations/LocationInput";
|
||||
|
||||
export type TEventTypeLocation = Pick<EventTypeSetupProps["eventType"], "locations" | "calVideoSettings">;
|
||||
export type TLocationOptions = Pick<EventTypeSetupProps, "locationOptions">["locationOptions"];
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import { useEffect, useRef, useState } from "react";
|
||||
import { Controller, useFormContext } from "react-hook-form";
|
||||
|
||||
import useLockedFieldsManager from "@calcom/features/ee/managed-event-types/hooks/useLockedFieldsManager";
|
||||
import { LearnMoreLink } from "@calcom/web/modules/event-types/components/LearnMoreLink";
|
||||
import { LearnMoreLink } from "@calcom/features/eventtypes/components/LearnMoreLink";
|
||||
import type { EventTypeSetup, SettingsToggleClassNames } from "@calcom/features/eventtypes/lib/types";
|
||||
import type { FormValues } from "@calcom/features/eventtypes/lib/types";
|
||||
import ServerTrans from "@calcom/lib/components/ServerTrans";
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
} from "@calcom/features/ee/workflows/lib/allowDisablingStandardEmails";
|
||||
import { MultiplePrivateLinksController } from "@calcom/web/modules/event-types/components";
|
||||
import AddVerifiedEmail from "@calcom/web/modules/event-types/components/AddVerifiedEmail";
|
||||
import { LearnMoreLink } from "@calcom/web/modules/event-types/components/LearnMoreLink";
|
||||
import { LearnMoreLink } from "@calcom/features/eventtypes/components/LearnMoreLink";
|
||||
import type { EventNameObjectType } from "@calcom/features/eventtypes/lib/eventNaming";
|
||||
import { getEventName } from "@calcom/features/eventtypes/lib/eventNaming";
|
||||
import type {
|
||||
|
||||
@@ -7,7 +7,7 @@ import { ZodError } from "zod";
|
||||
|
||||
import { useIsPlatform } from "@calcom/atoms/hooks/useIsPlatform";
|
||||
import { Dialog } from "@calcom/features/components/controlled-dialog";
|
||||
import { LearnMoreLink } from "@calcom/web/modules/event-types/components/LearnMoreLink";
|
||||
import { LearnMoreLink } from "@calcom/features/eventtypes/components/LearnMoreLink";
|
||||
import { getCurrencySymbol } from "@calcom/lib/currencyConversions";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { md } from "@calcom/lib/markdownIt";
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import { Controller, useFormContext } from "react-hook-form";
|
||||
import type z from "zod";
|
||||
|
||||
import useLockedFieldsManager from "@calcom/features/ee/managed-event-types/hooks/useLockedFieldsManager";
|
||||
import { LearnMoreLink } from "@calcom/web/modules/event-types/components/LearnMoreLink";
|
||||
import { LearnMoreLink } from "@calcom/features/eventtypes/components/LearnMoreLink";
|
||||
import type { EventTypeSetup, SettingsToggleClassNames } from "@calcom/features/eventtypes/lib/types";
|
||||
import type { FormValues } from "@calcom/features/eventtypes/lib/types";
|
||||
import ServerTrans from "@calcom/lib/components/ServerTrans";
|
||||
|
||||
@@ -20,12 +20,12 @@ import type { AddMembersWithSwitchCustomClassNames } from "@calcom/web/modules/e
|
||||
import AddMembersWithSwitch, {
|
||||
mapUserToValue,
|
||||
} from "@calcom/web/modules/event-types/components/AddMembersWithSwitch";
|
||||
import AssignAllTeamMembers from "@calcom/web/modules/event-types/components/AssignAllTeamMembers";
|
||||
import type { ChildrenEventTypeSelectCustomClassNames } from "@calcom/web/modules/event-types/components/ChildrenEventTypeSelect";
|
||||
import ChildrenEventTypeSelect from "@calcom/web/modules/event-types/components/ChildrenEventTypeSelect";
|
||||
import AssignAllTeamMembers from "@calcom/features/eventtypes/components/AssignAllTeamMembers";
|
||||
import type { ChildrenEventTypeSelectCustomClassNames } from "@calcom/features/eventtypes/components/ChildrenEventTypeSelect";
|
||||
import ChildrenEventTypeSelect from "@calcom/features/eventtypes/components/ChildrenEventTypeSelect";
|
||||
import { EditWeightsForAllTeamMembers } from "@calcom/web/modules/event-types/components/EditWeightsForAllTeamMembers";
|
||||
import { LearnMoreLink } from "@calcom/web/modules/event-types/components/LearnMoreLink";
|
||||
import WeightDescription from "@calcom/web/modules/event-types/components/WeightDescription";
|
||||
import { LearnMoreLink } from "@calcom/features/eventtypes/components/LearnMoreLink";
|
||||
import WeightDescription from "@calcom/features/eventtypes/components/WeightDescription";
|
||||
import type { TFunction } from "i18next";
|
||||
import Link from "next/link";
|
||||
import type { ComponentProps, Dispatch, SetStateAction } from "react";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { EventLimitsTab } from "@calcom/web/modules/event-types/components/tabs/limits/EventLimitsTab";
|
||||
import type { EventLimitsTabProps } from "@calcom/web/modules/event-types/components/tabs/limits/EventLimitsTab";
|
||||
import { EventLimitsTab } from "@calcom/features/eventtypes/components/tabs/limits/EventLimitsTab";
|
||||
import type { EventLimitsTabProps } from "@calcom/features/eventtypes/components/tabs/limits/EventLimitsTab";
|
||||
|
||||
const EventLimitsTabWebWrapper = (props: EventLimitsTabProps) => {
|
||||
return <EventLimitsTab {...props} />;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { EventRecurringTabProps } from "@calcom/web/modules/event-types/components/tabs/recurring/EventRecurringTab";
|
||||
import { EventRecurringTab } from "@calcom/web/modules/event-types/components/tabs/recurring/EventRecurringTab";
|
||||
import type { EventRecurringTabProps } from "@calcom/features/eventtypes/components/tabs/recurring/EventRecurringTab";
|
||||
import { EventRecurringTab } from "@calcom/features/eventtypes/components/tabs/recurring/EventRecurringTab";
|
||||
|
||||
const EventRecurringWebWrapper = (props: EventRecurringTabProps) => {
|
||||
return <EventRecurringTab {...props} />;
|
||||
|
||||
@@ -26,7 +26,7 @@ import { useState } from "react";
|
||||
import type { Control, FormState, UseFormGetValues, UseFormSetValue } from "react-hook-form";
|
||||
import { Controller, useFormContext } from "react-hook-form";
|
||||
import type { MultiValue } from "react-select";
|
||||
import type { LocationCustomClassNames } from "../../locations/types";
|
||||
import type { LocationCustomClassNames } from "@calcom/features/eventtypes/components/locations/types";
|
||||
|
||||
export type EventSetupTabCustomClassNames = {
|
||||
wrapper?: string;
|
||||
|
||||
@@ -10,7 +10,7 @@ import { trpc } from "@calcom/trpc/react";
|
||||
import { Button } from "@calcom/ui/components/button";
|
||||
import { WizardLayout } from "@calcom/ui/components/layout";
|
||||
import { showToast } from "@calcom/ui/components/toast";
|
||||
import { TeamEventTypeForm } from "@calcom/web/modules/ee/teams/components/TeamEventTypeForm";
|
||||
import { TeamEventTypeForm } from "@calcom/features/ee/teams/components/TeamEventTypeForm";
|
||||
|
||||
type CreateTeamEventTypeProps = {
|
||||
permissions: { canCreateEventType: boolean };
|
||||
|
||||
+2
-3
@@ -5,7 +5,7 @@ import { useIsPlatform } from "@calcom/atoms/hooks/useIsPlatform";
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import { useIsEmbed } from "@calcom/embed-core/embed-iframe";
|
||||
import { useBookerStoreContext } from "@calcom/features/bookings/Booker/BookerStoreProvider";
|
||||
import { useInitializeWeekStart } from "@calcom/web/modules/bookings/hooks/useInitializeWeekStart";
|
||||
import { useInitializeWeekStart } from "@calcom/features/bookings/hooks/useInitializeWeekStart";
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import { formatDateTime } from "@calcom/lib/dateTimeFormatter";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
@@ -16,7 +16,7 @@ import { ToggleGroup } from "@calcom/ui/components/form";
|
||||
import { Icon } from "@calcom/ui/components/icon";
|
||||
import { Tooltip } from "@calcom/ui/components/tooltip";
|
||||
|
||||
import { TimeFormatToggle } from "@calcom/web/modules/bookings/components/TimeFormatToggle";
|
||||
import { TimeFormatToggle } from "@calcom/features/bookings/components/TimeFormatToggle";
|
||||
import type { BookerLayout } from "@calcom/features/bookings/Booker/types";
|
||||
|
||||
export function Header({
|
||||
@@ -187,7 +187,6 @@ const LayoutToggle = ({
|
||||
}) => {
|
||||
const isEmbed = useIsEmbed();
|
||||
const isPlatform = useIsPlatform();
|
||||
|
||||
const { t } = useLocale();
|
||||
|
||||
const layoutOptions = useMemo(() => {
|
||||
+2
-2
@@ -15,8 +15,8 @@ import { Select } from "@calcom/ui/components/form";
|
||||
import { Icon } from "@calcom/ui/components/icon";
|
||||
import { Tooltip } from "@calcom/ui/components/tooltip";
|
||||
|
||||
import type { PriorityDialogCustomClassNames, WeightDialogCustomClassNames } from "./HostEditDialogs";
|
||||
import { PriorityDialog, WeightDialog } from "./HostEditDialogs";
|
||||
import type { PriorityDialogCustomClassNames, WeightDialogCustomClassNames } from "@calcom/features/eventtypes/components/dialogs/HostEditDialogs";
|
||||
import { PriorityDialog, WeightDialog } from "@calcom/features/eventtypes/components/dialogs/HostEditDialogs";
|
||||
|
||||
export type CheckedSelectOption = {
|
||||
avatar: string;
|
||||
+2
-2
@@ -20,8 +20,8 @@ import { Label } from "@calcom/ui/components/form";
|
||||
import { Select } from "@calcom/ui/components/form";
|
||||
import { TextField } from "@calcom/ui/components/form";
|
||||
|
||||
import type { CheckedSelectOption } from "./CheckedTeamSelect";
|
||||
import WeightDescription from "./WeightDescription";
|
||||
import type { CheckedSelectOption } from "@calcom/features/eventtypes/components/CheckedTeamSelect";
|
||||
import WeightDescription from "@calcom/features/eventtypes/components/WeightDescription";
|
||||
|
||||
interface IDialog {
|
||||
isOpenDialog: boolean;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ChildrenEventType } from "@calcom/web/modules/event-types/components/ChildrenEventTypeSelect";
|
||||
import type { ChildrenEventType } from "@calcom/features/eventtypes/components/ChildrenEventTypeSelect";
|
||||
import ServerTrans from "@calcom/lib/components/ServerTrans";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { ConfirmationDialogContent, Dialog } from "@calcom/ui/components/dialog";
|
||||
+1
-1
@@ -29,7 +29,7 @@ import {
|
||||
import { Icon } from "@calcom/ui/components/icon";
|
||||
import { Tooltip } from "@calcom/ui/components/tooltip";
|
||||
import { Badge } from "@calcom/ui/components/badge";
|
||||
import { LearnMoreLink } from "@calcom/web/modules/event-types/components/LearnMoreLink";
|
||||
import { LearnMoreLink } from "@calcom/features/eventtypes/components/LearnMoreLink";
|
||||
import { useAutoAnimate } from "@formkit/auto-animate/react";
|
||||
import * as RadioGroup from "@radix-ui/react-radio-group";
|
||||
import type { Key } from "react";
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import { useState } from "react";
|
||||
import { Controller, useFormContext } from "react-hook-form";
|
||||
|
||||
import { LearnMoreLink } from "@calcom/web/modules/event-types/components/LearnMoreLink";
|
||||
import { LearnMoreLink } from "@calcom/features/eventtypes/components/LearnMoreLink";
|
||||
import type { FormValues } from "@calcom/features/eventtypes/lib/types";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import classNames from "@calcom/ui/classNames";
|
||||
+1
-1
@@ -2,7 +2,7 @@ import { useState } from "react";
|
||||
import { useFormContext } from "react-hook-form";
|
||||
|
||||
import useLockedFieldsManager from "@calcom/features/ee/managed-event-types/hooks/useLockedFieldsManager";
|
||||
import { LearnMoreLink } from "@calcom/web/modules/event-types/components/LearnMoreLink";
|
||||
import { LearnMoreLink } from "@calcom/features/eventtypes/components/LearnMoreLink";
|
||||
import type {
|
||||
EventTypeSetup,
|
||||
InputClassNames,
|
||||
@@ -20,8 +20,8 @@ import { TimezoneSelect as WebTimezoneSelect } from "@calcom/web/modules/timezon
|
||||
import type {
|
||||
BulkUpdatParams,
|
||||
EventTypes,
|
||||
} from "@calcom/web/modules/event-types/components/BulkEditDefaultForEventsModal";
|
||||
import { BulkEditDefaultForEventsModal } from "@calcom/web/modules/event-types/components/BulkEditDefaultForEventsModal";
|
||||
} from "@calcom/features/eventtypes/components/BulkEditDefaultForEventsModal";
|
||||
import { BulkEditDefaultForEventsModal } from "@calcom/features/eventtypes/components/BulkEditDefaultForEventsModal";
|
||||
import DateOverrideInputDialog from "@calcom/features/schedules/components/DateOverrideInputDialog";
|
||||
import DateOverrideList from "@calcom/features/schedules/components/DateOverrideList";
|
||||
import {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Header } from "@calcom/web/modules/bookings/components/Header";
|
||||
import { BookerSection } from "@calcom/web/modules/bookings/components/Section";
|
||||
import { Header } from "@calcom/features/bookings/components/Header";
|
||||
import { BookerSection } from "@calcom/features/bookings/components/Section";
|
||||
import { LargeCalendar } from "@calcom/web/modules/calendar-view/components/LargeCalendar";
|
||||
import { bookerLayoutOptions } from "@calcom/prisma/zod-utils";
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ import {
|
||||
useBookerStoreContext,
|
||||
useInitializeBookerStoreContext,
|
||||
} from "@calcom/features/bookings/Booker/BookerStoreProvider";
|
||||
import { Header } from "@calcom/web/modules/bookings/components/Header";
|
||||
import { BookerSection } from "@calcom/web/modules/bookings/components/Section";
|
||||
import { Header } from "@calcom/features/bookings/components/Header";
|
||||
import { BookerSection } from "@calcom/features/bookings/components/Section";
|
||||
import { useAvailableTimeSlots } from "@calcom/features/bookings/Booker/hooks/useAvailableTimeSlots";
|
||||
import { useBookerLayout } from "@calcom/features/bookings/Booker/hooks/useBookerLayout";
|
||||
import { useTimePreferences } from "@calcom/features/bookings/lib";
|
||||
|
||||
@@ -3,8 +3,8 @@ import React, { Suspense } from "react";
|
||||
import { getPaymentAppData } from "@calcom/app-store/_utils/payments/getPaymentAppData";
|
||||
import { getSuccessPageLocationMessage } from "@calcom/app-store/locations";
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import { PayIcon } from "@calcom/web/modules/bookings/components/event-meta/PayIcon";
|
||||
import { Price } from "@calcom/web/modules/bookings/components/event-meta/Price";
|
||||
import { PayIcon } from "@calcom/features/bookings/components/event-meta/PayIcon";
|
||||
import { Price } from "@calcom/features/bookings/components/event-meta/Price";
|
||||
import type { PaymentPageProps } from "@calcom/features/ee/payments/pages/payment";
|
||||
import { APP_NAME, WEBSITE_URL } from "@calcom/lib/constants";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { AtomsWrapper } from "@/components/atoms-wrapper";
|
||||
|
||||
import CreateEventTypeForm from "@calcom/web/modules/event-types/components/CreateEventTypeForm";
|
||||
import CreateEventTypeForm from "@calcom/features/eventtypes/components/CreateEventTypeForm";
|
||||
import { useCreateEventTypeForm } from "@calcom/features/eventtypes/hooks/useCreateEventType";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import type { EventType } from "@calcom/prisma/client";
|
||||
import { Button } from "@calcom/ui/components/button";
|
||||
import { TeamEventTypeForm } from "@calcom/web/modules/ee/teams/components/TeamEventTypeForm";
|
||||
import { TeamEventTypeForm } from "@calcom/features/ee/teams/components/TeamEventTypeForm";
|
||||
|
||||
import { useCreateEventType } from "../../hooks/event-types/private/useCreateEventType";
|
||||
import { useCreateTeamEventType } from "../../hooks/event-types/private/useCreateTeamEventType";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { EventLimitsTab } from "@calcom/web/modules/event-types/components/tabs/limits/EventLimitsTab";
|
||||
import type { EventLimitsTabProps } from "@calcom/web/modules/event-types/components/tabs/limits/EventLimitsTab";
|
||||
import { EventLimitsTab } from "@calcom/features/eventtypes/components/tabs/limits/EventLimitsTab";
|
||||
import type { EventLimitsTabProps } from "@calcom/features/eventtypes/components/tabs/limits/EventLimitsTab";
|
||||
|
||||
const EventLimitsTabPlatformWrapper = (props: EventLimitsTabProps) => {
|
||||
return <EventLimitsTab {...props} />;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { EventRecurringTabProps } from "@calcom/web/modules/event-types/components/tabs/recurring/EventRecurringTab";
|
||||
import { EventRecurringTab } from "@calcom/web/modules/event-types/components/tabs/recurring/EventRecurringTab";
|
||||
import type { EventRecurringTabProps } from "@calcom/features/eventtypes/components/tabs/recurring/EventRecurringTab";
|
||||
import { EventRecurringTab } from "@calcom/features/eventtypes/components/tabs/recurring/EventRecurringTab";
|
||||
|
||||
const EventRecurringTabPlatformWrapper = (props: EventRecurringTabProps) => {
|
||||
return <EventRecurringTab {...props} />;
|
||||
|
||||
Reference in New Issue
Block a user