diff --git a/apps/web/app/(use-page-wrapper)/(main-nav)/booking/[uid]/logs/page.tsx b/apps/web/app/(use-page-wrapper)/(main-nav)/booking/[uid]/logs/page.tsx index ebe3c5c11b6165..6127f1a5d44751 100644 --- a/apps/web/app/(use-page-wrapper)/(main-nav)/booking/[uid]/logs/page.tsx +++ b/apps/web/app/(use-page-wrapper)/(main-nav)/booking/[uid]/logs/page.tsx @@ -11,7 +11,7 @@ import { getServerSession } from "@calcom/features/auth/lib/getServerSession"; import { buildLegacyRequest } from "@lib/buildLegacyCtx"; -import { BookingHistoryPage } from "@calcom/features/booking-audit/client/components/BookingHistoryPage"; +import { BookingHistoryPage } from "@calcom/web/modules/booking-audit/components/BookingHistoryPage"; export const generateMetadata = async ({ params }: { params: Promise<{ uid: string }> }) => await _generateMetadata( diff --git a/apps/web/components/apps/installation/EventTypeAppSettingsWrapper.tsx b/apps/web/components/apps/installation/EventTypeAppSettingsWrapper.tsx index 777e82bebd57d5..7b9a984a0d807b 100644 --- a/apps/web/components/apps/installation/EventTypeAppSettingsWrapper.tsx +++ b/apps/web/components/apps/installation/EventTypeAppSettingsWrapper.tsx @@ -2,7 +2,7 @@ import { useEffect, type FC } from "react"; import { EventTypeAppSettings } from "@calcom/app-store/_components/EventTypeAppSettingsInterface"; import type { EventTypeAppsList } from "@calcom/app-store/utils"; -import useAppsData from "@calcom/features/apps/hooks/useAppsData"; +import useAppsData from "@calcom/web/modules/apps/hooks/useAppsData"; import type { ConfigureStepCardProps } from "@components/apps/installation/ConfigureStepCard"; diff --git a/packages/features/apps/hooks/useAppsData.ts b/apps/web/modules/apps/hooks/useAppsData.ts similarity index 100% rename from packages/features/apps/hooks/useAppsData.ts rename to apps/web/modules/apps/hooks/useAppsData.ts diff --git a/packages/features/booking-audit/client/components/BookingHistory.tsx b/apps/web/modules/booking-audit/components/BookingHistory.tsx similarity index 100% rename from packages/features/booking-audit/client/components/BookingHistory.tsx rename to apps/web/modules/booking-audit/components/BookingHistory.tsx diff --git a/packages/features/booking-audit/client/components/BookingHistoryPage.tsx b/apps/web/modules/booking-audit/components/BookingHistoryPage.tsx similarity index 100% rename from packages/features/booking-audit/client/components/BookingHistoryPage.tsx rename to apps/web/modules/booking-audit/components/BookingHistoryPage.tsx diff --git a/apps/web/modules/bookings/components/BookingDetailsSheet.tsx b/apps/web/modules/bookings/components/BookingDetailsSheet.tsx index e7495cd94e10da..5029573d4c2540 100644 --- a/apps/web/modules/bookings/components/BookingDetailsSheet.tsx +++ b/apps/web/modules/bookings/components/BookingDetailsSheet.tsx @@ -45,7 +45,7 @@ import { usePaymentStatus } from "../hooks/usePaymentStatus"; import { useBookingDetailsSheetStore } from "../store/bookingDetailsSheetStore"; import type { BookingOutput } from "../types"; import { JoinMeetingButton } from "./JoinMeetingButton"; -import { BookingHistory } from "@calcom/features/booking-audit/client/components/BookingHistory"; +import { BookingHistory } from "@calcom/web/modules/booking-audit/components/BookingHistory"; import { SegmentedControl } from "@calcom/ui/components/segmented-control"; type BookingMetaData = z.infer; diff --git a/apps/web/modules/ee/organizations/components/AboutOrganizationForm.tsx b/apps/web/modules/ee/organizations/components/AboutOrganizationForm.tsx index edd294f5af6653..1781f3e21110d9 100644 --- a/apps/web/modules/ee/organizations/components/AboutOrganizationForm.tsx +++ b/apps/web/modules/ee/organizations/components/AboutOrganizationForm.tsx @@ -3,7 +3,7 @@ import { useRouter } from "next/navigation"; import { Controller, useForm } from "react-hook-form"; -import { useOnboarding } from "@calcom/features/ee/organizations/lib/onboardingStore"; +import { useOnboarding } from "@calcom/web/modules/ee/organizations/lib/onboardingStore"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { ImageUploader } from "@calcom/ui/components/image-uploader"; import { TextAreaField } from "@calcom/ui/components/form"; diff --git a/apps/web/modules/ee/organizations/components/AdminOnboardingHandover.tsx b/apps/web/modules/ee/organizations/components/AdminOnboardingHandover.tsx index 5e1266d0592eeb..53b0ef41be2485 100644 --- a/apps/web/modules/ee/organizations/components/AdminOnboardingHandover.tsx +++ b/apps/web/modules/ee/organizations/components/AdminOnboardingHandover.tsx @@ -3,7 +3,7 @@ import { useSession } from "next-auth/react"; import { useRouter } from "next/navigation"; -import { useOnboarding } from "@calcom/features/ee/organizations/lib/onboardingStore"; +import { useOnboarding } from "@calcom/web/modules/ee/organizations/lib/onboardingStore"; import { WEBAPP_URL } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Alert } from "@calcom/ui/components/alert"; diff --git a/apps/web/modules/ee/organizations/components/CreateANewOrganizationForm.tsx b/apps/web/modules/ee/organizations/components/CreateANewOrganizationForm.tsx index 1c8f2caae512fc..2cc4aa756d6aaf 100644 --- a/apps/web/modules/ee/organizations/components/CreateANewOrganizationForm.tsx +++ b/apps/web/modules/ee/organizations/components/CreateANewOrganizationForm.tsx @@ -22,7 +22,7 @@ import { Label } from "@calcom/ui/components/form"; import { TextField } from "@calcom/ui/components/form"; import { RadioAreaGroup as RadioArea } from "@calcom/ui/components/radio"; -import { useOnboarding } from "@calcom/features/ee/organizations/lib/onboardingStore"; +import { useOnboarding } from "@calcom/web/modules/ee/organizations/lib/onboardingStore"; function extractDomainFromEmail(email: string) { const match = email.match(/^(?:.*?:\/\/)?.*?([\w-]*(?:\.\w{2,}|\.\w{2,}\.\w{2}))(?:[/?#:]|$)/); diff --git a/apps/web/modules/ee/organizations/components/OtherTeamList.tsx b/apps/web/modules/ee/organizations/components/OtherTeamList.tsx index c5d4691d49e496..07d3e5a6536b3c 100644 --- a/apps/web/modules/ee/organizations/components/OtherTeamList.tsx +++ b/apps/web/modules/ee/organizations/components/OtherTeamList.tsx @@ -3,7 +3,7 @@ import { useState } from "react"; import type { OrganizationRepository } from "@calcom/features/ee/organizations/di/OrganizationRepository.module"; -import { trackFormbricksAction } from "@calcom/features/formbricks/formbricks-client"; +import { trackFormbricksAction } from "@calcom/web/modules/formbricks/lib/trackFormbricksAction"; import { trpc } from "@calcom/trpc/react"; import { showToast } from "@calcom/ui/components/toast"; diff --git a/apps/web/modules/ee/organizations/components/WelcomeToOrganizationsModal.tsx b/apps/web/modules/ee/organizations/components/WelcomeToOrganizationsModal.tsx index dd262d500dd627..f0c48f27cf29d7 100644 --- a/apps/web/modules/ee/organizations/components/WelcomeToOrganizationsModal.tsx +++ b/apps/web/modules/ee/organizations/components/WelcomeToOrganizationsModal.tsx @@ -8,7 +8,7 @@ import { Dialog, DialogContent } from "@calcom/ui/components/dialog"; import { Icon, type IconName } from "@calcom/ui/components/icon"; import { Logo } from "@calcom/ui/components/logo"; -import { useWelcomeModal } from "@calcom/features/ee/organizations/hooks/useWelcomeModal"; +import { useWelcomeModal } from "@calcom/web/modules/ee/organizations/hooks/useWelcomeModal"; const features = [ "1_parent_team_unlimited_subteams", diff --git a/packages/features/ee/organizations/hooks/useWelcomeModal.ts b/apps/web/modules/ee/organizations/hooks/useWelcomeModal.ts similarity index 100% rename from packages/features/ee/organizations/hooks/useWelcomeModal.ts rename to apps/web/modules/ee/organizations/hooks/useWelcomeModal.ts diff --git a/packages/features/ee/organizations/lib/onboardingStore.test.ts b/apps/web/modules/ee/organizations/lib/onboardingStore.test.ts similarity index 100% rename from packages/features/ee/organizations/lib/onboardingStore.test.ts rename to apps/web/modules/ee/organizations/lib/onboardingStore.test.ts diff --git a/packages/features/ee/organizations/lib/onboardingStore.ts b/apps/web/modules/ee/organizations/lib/onboardingStore.ts similarity index 100% rename from packages/features/ee/organizations/lib/onboardingStore.ts rename to apps/web/modules/ee/organizations/lib/onboardingStore.ts diff --git a/apps/web/modules/ee/organizations/new/_components/AddNewTeamsForm.tsx b/apps/web/modules/ee/organizations/new/_components/AddNewTeamsForm.tsx index b5f2e7ed0cf005..341e9f0337d977 100644 --- a/apps/web/modules/ee/organizations/new/_components/AddNewTeamsForm.tsx +++ b/apps/web/modules/ee/organizations/new/_components/AddNewTeamsForm.tsx @@ -5,7 +5,7 @@ import { useState } from "react"; import { Controller, useFieldArray, useForm } from "react-hook-form"; import { z } from "zod"; -import { useOnboarding } from "@calcom/features/ee/organizations/lib/onboardingStore"; +import { useOnboarding } from "@calcom/web/modules/ee/organizations/lib/onboardingStore"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import slugify from "@calcom/lib/slugify"; import { trpc } from "@calcom/trpc/react"; diff --git a/apps/web/modules/ee/organizations/new/_components/OnboardMembersView.tsx b/apps/web/modules/ee/organizations/new/_components/OnboardMembersView.tsx index 421bb94dc989af..277d704d3e6f6d 100644 --- a/apps/web/modules/ee/organizations/new/_components/OnboardMembersView.tsx +++ b/apps/web/modules/ee/organizations/new/_components/OnboardMembersView.tsx @@ -5,8 +5,8 @@ import { useState } from "react"; import { useForm } from "react-hook-form"; import { z } from "zod"; -import { setShowNewOrgModalFlag } from "@calcom/features/ee/organizations/hooks/useWelcomeModal"; -import { useOnboarding } from "@calcom/features/ee/organizations/lib/onboardingStore"; +import { setShowNewOrgModalFlag } from "@calcom/web/modules/ee/organizations/hooks/useWelcomeModal"; +import { useOnboarding } from "@calcom/web/modules/ee/organizations/lib/onboardingStore"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { RouterOutputs } from "@calcom/trpc/react"; import { trpc } from "@calcom/trpc/react"; diff --git a/apps/web/modules/ee/organizations/new/_components/PaymentStatusView.tsx b/apps/web/modules/ee/organizations/new/_components/PaymentStatusView.tsx index 1a5561b9217134..2fbb2f3a913d28 100644 --- a/apps/web/modules/ee/organizations/new/_components/PaymentStatusView.tsx +++ b/apps/web/modules/ee/organizations/new/_components/PaymentStatusView.tsx @@ -3,7 +3,7 @@ import { useRouter, useSearchParams } from "next/navigation"; import { useEffect, useState } from "react"; -import { useOnboarding } from "@calcom/features/ee/organizations/lib/onboardingStore"; +import { useOnboarding } from "@calcom/web/modules/ee/organizations/lib/onboardingStore"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import { Button } from "@calcom/ui/components/button"; diff --git a/apps/web/modules/ee/organizations/new/resume-view.tsx b/apps/web/modules/ee/organizations/new/resume-view.tsx index ce201863b416da..e9fe618ea08312 100644 --- a/apps/web/modules/ee/organizations/new/resume-view.tsx +++ b/apps/web/modules/ee/organizations/new/resume-view.tsx @@ -3,7 +3,7 @@ import { useRouter, useSearchParams } from "next/navigation"; import { useEffect } from "react"; -import { useOnboarding } from "@calcom/features/ee/organizations/lib/onboardingStore"; +import { useOnboarding } from "@calcom/web/modules/ee/organizations/lib/onboardingStore"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Alert } from "@calcom/ui/components/alert"; import { SkeletonContainer, SkeletonText } from "@calcom/ui/components/skeleton"; diff --git a/apps/web/modules/ee/organizations/other-team-profile-view.tsx b/apps/web/modules/ee/organizations/other-team-profile-view.tsx index 0411e1b6dfb999..6899d95b1f4723 100644 --- a/apps/web/modules/ee/organizations/other-team-profile-view.tsx +++ b/apps/web/modules/ee/organizations/other-team-profile-view.tsx @@ -9,7 +9,7 @@ import { z } from "zod"; import { Dialog } from "@calcom/features/components/controlled-dialog"; import { subdomainSuffix } from "@calcom/features/ee/organizations/lib/orgDomains"; -import { trackFormbricksAction } from "@calcom/features/formbricks/formbricks-client"; +import { trackFormbricksAction } from "@calcom/web/modules/formbricks/lib/trackFormbricksAction"; import { IS_TEAM_BILLING_ENABLED_CLIENT, WEBAPP_URL } from "@calcom/lib/constants"; import { getPlaceholderAvatar } from "@calcom/lib/defaultAvatarImage"; import { useLocale } from "@calcom/lib/hooks/useLocale"; diff --git a/apps/web/modules/ee/teams/components/TeamInviteList.tsx b/apps/web/modules/ee/teams/components/TeamInviteList.tsx index aebb8e47e19974..b92147e7637f16 100644 --- a/apps/web/modules/ee/teams/components/TeamInviteList.tsx +++ b/apps/web/modules/ee/teams/components/TeamInviteList.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; -import { trackFormbricksAction } from "@calcom/features/formbricks/formbricks-client"; +import { trackFormbricksAction } from "@calcom/web/modules/formbricks/lib/trackFormbricksAction"; import type { MembershipRole } from "@calcom/prisma/enums"; import { trpc } from "@calcom/trpc/react"; import { showToast } from "@calcom/ui/components/toast"; diff --git a/apps/web/modules/ee/teams/components/TeamList.tsx b/apps/web/modules/ee/teams/components/TeamList.tsx index ebddcbfc07a173..32465177b71397 100644 --- a/apps/web/modules/ee/teams/components/TeamList.tsx +++ b/apps/web/modules/ee/teams/components/TeamList.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; -import { trackFormbricksAction } from "@calcom/features/formbricks/formbricks-client"; +import { trackFormbricksAction } from "@calcom/web/modules/formbricks/lib/trackFormbricksAction"; import { ORG_SELF_SERVE_ENABLED, ORG_MINIMUM_PUBLISHED_TEAMS_SELF_SERVE_HELPER_DIALOGUE, diff --git a/apps/web/modules/ee/teams/views/team-profile-view.tsx b/apps/web/modules/ee/teams/views/team-profile-view.tsx index 41298f85ed38aa..7888552a3dd293 100644 --- a/apps/web/modules/ee/teams/views/team-profile-view.tsx +++ b/apps/web/modules/ee/teams/views/team-profile-view.tsx @@ -11,7 +11,7 @@ import { z } from "zod"; import { checkAdminOrOwner } from "@calcom/features/auth/lib/checkAdminOrOwner"; import { Dialog } from "@calcom/features/components/controlled-dialog"; import { getTeamUrlSync } from "@calcom/features/ee/organizations/lib/getTeamUrlSync"; -import { trackFormbricksAction } from "@calcom/features/formbricks/formbricks-client"; +import { trackFormbricksAction } from "@calcom/web/modules/formbricks/lib/trackFormbricksAction"; import SectionBottomActions from "@calcom/features/settings/SectionBottomActions"; import { IS_TEAM_BILLING_ENABLED, WEBAPP_URL } from "@calcom/lib/constants"; import { getPlaceholderAvatar } from "@calcom/lib/defaultAvatarImage"; diff --git a/apps/web/modules/ee/workflows/components/WorkflowDetailsPage.tsx b/apps/web/modules/ee/workflows/components/WorkflowDetailsPage.tsx index 6252c0a057ab44..915aa6c670d6a6 100644 --- a/apps/web/modules/ee/workflows/components/WorkflowDetailsPage.tsx +++ b/apps/web/modules/ee/workflows/components/WorkflowDetailsPage.tsx @@ -3,7 +3,7 @@ import type { Dispatch, SetStateAction } from "react"; import { useState, useEffect } from "react"; import type { UseFormReturn } from "react-hook-form"; -import { useAgentsData } from "@calcom/features/ee/workflows/hooks/useAgentsData"; +import { useAgentsData } from "@calcom/web/modules/ee/workflows/hooks/useAgentsData"; import { isCalAIAction, isSMSAction, diff --git a/packages/features/ee/workflows/hooks/useAgentsData.ts b/apps/web/modules/ee/workflows/hooks/useAgentsData.ts similarity index 100% rename from packages/features/ee/workflows/hooks/useAgentsData.ts rename to apps/web/modules/ee/workflows/hooks/useAgentsData.ts diff --git a/apps/web/modules/event-types/components/tabs/apps/EventAppsTab.tsx b/apps/web/modules/event-types/components/tabs/apps/EventAppsTab.tsx index 3145642f26ec69..7a638138a4b960 100644 --- a/apps/web/modules/event-types/components/tabs/apps/EventAppsTab.tsx +++ b/apps/web/modules/event-types/components/tabs/apps/EventAppsTab.tsx @@ -4,7 +4,7 @@ import { useFormContext } from "react-hook-form"; import { EventTypeAppCard } from "@calcom/app-store/_components/EventTypeAppCardInterface"; import type { EventTypeAppCardComponentProps } from "@calcom/app-store/types"; import type { EventTypeAppsList } from "@calcom/app-store/utils"; -import useAppsData from "@calcom/features/apps/hooks/useAppsData"; +import useAppsData from "@calcom/web/modules/apps/hooks/useAppsData"; import useLockedFieldsManager from "@calcom/features/ee/managed-event-types/hooks/useLockedFieldsManager"; import type { FormValues, EventTypeSetupProps, EventTypeApps } from "@calcom/features/eventtypes/lib/types"; import ServerTrans from "@calcom/lib/components/ServerTrans"; diff --git a/packages/features/formbricks/formbricks-client.ts b/apps/web/modules/formbricks/hooks/useFormbricks.ts similarity index 83% rename from packages/features/formbricks/formbricks-client.ts rename to apps/web/modules/formbricks/hooks/useFormbricks.ts index 73ddd147943c13..1c05fdeedc9906 100644 --- a/packages/features/formbricks/formbricks-client.ts +++ b/apps/web/modules/formbricks/hooks/useFormbricks.ts @@ -4,7 +4,7 @@ import { useEffect } from "react"; import useMeQuery from "@calcom/trpc/react/hooks/useMeQuery"; -export const initFormbricks = ({ +const initFormbricks = ({ userId, attributes, }: { @@ -29,12 +29,6 @@ export const initFormbricks = ({ } }; -export const trackFormbricksAction = (eventName: string, properties: Record = {}) => { - if (process.env.NEXT_PUBLIC_FORMBRICKS_HOST_URL && process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID) { - formbricks.track(eventName, properties); - } -}; - export const useFormbricks = () => { const { data: user, isLoading } = useMeQuery(); const { data: session, status } = useSession(); diff --git a/apps/web/modules/formbricks/lib/trackFormbricksAction.ts b/apps/web/modules/formbricks/lib/trackFormbricksAction.ts new file mode 100644 index 00000000000000..e65b220e99d272 --- /dev/null +++ b/apps/web/modules/formbricks/lib/trackFormbricksAction.ts @@ -0,0 +1,7 @@ +import formbricks from "@formbricks/js/app"; + +export const trackFormbricksAction = (eventName: string, properties: Record = {}) => { + if (process.env.NEXT_PUBLIC_FORMBRICKS_HOST_URL && process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID) { + formbricks.track(eventName, properties); + } +}; diff --git a/apps/web/modules/onboarding/hooks/useSubmitOnboarding.ts b/apps/web/modules/onboarding/hooks/useSubmitOnboarding.ts index 78a8ac24f56d96..68f1c30efc2161 100644 --- a/apps/web/modules/onboarding/hooks/useSubmitOnboarding.ts +++ b/apps/web/modules/onboarding/hooks/useSubmitOnboarding.ts @@ -1,6 +1,6 @@ import { useState } from "react"; -import { setShowNewOrgModalFlag } from "@calcom/features/ee/organizations/hooks/useWelcomeModal"; +import { setShowNewOrgModalFlag } from "@calcom/web/modules/ee/organizations/hooks/useWelcomeModal"; import { useFlagMap } from "@calcom/features/flags/context/provider"; import { CreationSource } from "@calcom/prisma/enums"; import { trpc } from "@calcom/trpc/react"; diff --git a/apps/web/modules/shell/Shell.tsx b/apps/web/modules/shell/Shell.tsx index 852ae579c1edf4..74c54a00c54885 100644 --- a/apps/web/modules/shell/Shell.tsx +++ b/apps/web/modules/shell/Shell.tsx @@ -7,9 +7,10 @@ import type React from "react"; import { cloneElement } from "react"; import { Toaster } from "sonner"; +import { useFormbricks } from "@calcom/web/modules/formbricks/hooks/useFormbricks"; import { useRedirectToLoginIfUnauthenticated } from "@calcom/web/modules/auth/hooks/useRedirectToLoginIfUnauthenticated"; import { useRedirectToOnboardingIfNeeded } from "@calcom/web/modules/auth/hooks/useRedirectToOnboardingIfNeeded"; -import { useFormbricks } from "@calcom/features/formbricks/formbricks-client"; + import TimezoneChangeDialog from "@calcom/web/modules/settings/components/TimezoneChangeDialog"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import classNames from "@calcom/ui/classNames"; diff --git a/packages/platform/atoms/event-types/wrappers/EventPaymentsTabPlatformWrapper.tsx b/packages/platform/atoms/event-types/wrappers/EventPaymentsTabPlatformWrapper.tsx index 7447d8b665f057..ca562fa861bc9b 100644 --- a/packages/platform/atoms/event-types/wrappers/EventPaymentsTabPlatformWrapper.tsx +++ b/packages/platform/atoms/event-types/wrappers/EventPaymentsTabPlatformWrapper.tsx @@ -4,7 +4,7 @@ import type { EventTypeForAppCard, } from "@calcom/app-store/_components/EventTypeAppCardInterface"; import type { EventTypeAppsList } from "@calcom/app-store/utils"; -import useAppsData from "@calcom/features/apps/hooks/useAppsData"; +import useAppsData from "@calcom/web/modules/apps/hooks/useAppsData"; import type { EventTypeSetupProps } from "@calcom/features/eventtypes/lib/types"; import { EmptyScreen } from "@calcom/ui/components/empty-screen";