diff --git a/.github/workflows/run-ci.yml b/.github/workflows/run-ci.yml index 452de59ab5e111..00ba78b46bb567 100644 --- a/.github/workflows/run-ci.yml +++ b/.github/workflows/run-ci.yml @@ -19,21 +19,33 @@ jobs: with: script: | const adder = context.payload.sender.login; + const senderType = context.payload.sender.type; const pr = context.payload.pull_request; - // Verify label adder has write access - const { data: perm } = await github.rest.repos.getCollaboratorPermissionLevel({ - owner: context.repo.owner, - repo: context.repo.repo, - username: adder, - }); + console.log(`Sender: ${adder} (type: ${senderType})`); - if (!['admin', 'maintain', 'write'].includes(perm.permission)) { - core.setFailed(`${adder} does not have write access`); - return; + const trustedBotLogins = ['graphite-app[bot]']; + let isAuthorized = false; + + if (senderType === 'Bot' && trustedBotLogins.includes(adder)) { + console.log(`Authorized: trusted GitHub App`); + isAuthorized = true; } - console.log(`Label added by ${adder} (${perm.permission})`); + if (!isAuthorized) { + const { data: perm } = await github.rest.repos.getCollaboratorPermissionLevel({ + owner: context.repo.owner, + repo: context.repo.repo, + username: adder, + }); + + if (!['admin', 'maintain', 'write'].includes(perm.permission)) { + core.setFailed(`${adder} does not have write access`); + return; + } + + console.log(`Label added by ${adder}`); + } // Find the latest pr.yml run for this PR's head SHA const { data: runs } = await github.rest.actions.listWorkflowRuns({ @@ -56,13 +68,52 @@ jobs: const latestRun = matchingRuns[0]; - // Check if workflow is still running - can't re-run in-progress workflows + // If workflow is still running, cancel it first then re-run if (latestRun.status === 'in_progress' || latestRun.status === 'queued') { - core.setFailed(`Workflow is still running (status: ${latestRun.status}). Wait for it to complete or cancel it first.`); - return; + console.log(`Workflow is running (status: ${latestRun.status}). Cancelling it first...`); + + await github.rest.actions.cancelWorkflowRun({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: latestRun.id, + }); + + // Wait for the workflow to be cancelled (poll with timeout) + const maxWaitTime = 60000; // 60 seconds + const pollInterval = 2000; // 2 seconds + const startTime = Date.now(); + + while (Date.now() - startTime < maxWaitTime) { + await new Promise(resolve => setTimeout(resolve, pollInterval)); + + const { data: updatedRun } = await github.rest.actions.getWorkflowRun({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: latestRun.id, + }); + + if (updatedRun.status === 'completed') { + console.log(`Workflow cancelled successfully (conclusion: ${updatedRun.conclusion})`); + break; + } + + console.log(`Waiting for workflow to cancel... (status: ${updatedRun.status})`); + } + + // Check final status + const { data: finalRun } = await github.rest.actions.getWorkflowRun({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: latestRun.id, + }); + + if (finalRun.status !== 'completed') { + core.setFailed(`Timed out waiting for workflow to cancel (status: ${finalRun.status})`); + return; + } } - console.log(`Re-running workflow ${latestRun.id} (was: ${latestRun.conclusion})`); + console.log(`Re-running workflow ${latestRun.id} (was: ${latestRun.conclusion || latestRun.status})`); // Re-run preserves original context (PR, SHA, etc.) await github.rest.actions.reRunWorkflow({ diff --git a/apps/api/v1/lib/helpers/verifyApiKey.test.ts b/apps/api/v1/lib/helpers/verifyApiKey.test.ts index 1ec41081b8f085..bd8c404a04b932 100644 --- a/apps/api/v1/lib/helpers/verifyApiKey.test.ts +++ b/apps/api/v1/lib/helpers/verifyApiKey.test.ts @@ -139,6 +139,7 @@ describe("Verify API key - Unit Tests", () => { valid: true, userId: 1, user: { + uuid: "test-uuid-1", role: UserPermissionRole.ADMIN, locked: false, email: "admin@example.com", @@ -183,6 +184,7 @@ describe("Verify API key - Unit Tests", () => { valid: true, userId: 2, user: { + uuid: "test-uuid-2", role: UserPermissionRole.USER, locked: false, email: "org-admin@acme.com", @@ -227,6 +229,7 @@ describe("Verify API key - Unit Tests", () => { valid: true, userId: 3, user: { + uuid: "test-uuid-3", role: UserPermissionRole.USER, locked: true, email: "locked@example.com", diff --git a/apps/api/v1/lib/helpers/verifyApiKey.ts b/apps/api/v1/lib/helpers/verifyApiKey.ts index 804b21bce3e736..b71cdcab3153d0 100644 --- a/apps/api/v1/lib/helpers/verifyApiKey.ts +++ b/apps/api/v1/lib/helpers/verifyApiKey.ts @@ -36,9 +36,10 @@ export const verifyApiKey: NextMiddleware = async (req, res, next) => { return res.status(401).json({ error: result.error }); } - // save the user id in the request for later use - req.userId = result.userId!; - req.user = result.user!; + // save the user id and uuid in the request for later use + req.userId = result.userId; + req.userUuid = result.user.uuid; + req.user = result.user; const { isAdmin, scope } = await isAdminGuard(req); const userIsLockedOrBlocked = await isLockedOrBlocked(req); diff --git a/apps/api/v1/next.d.ts b/apps/api/v1/next.d.ts index 6816e97e4fc95c..3c4f4ac5360f9a 100644 --- a/apps/api/v1/next.d.ts +++ b/apps/api/v1/next.d.ts @@ -8,6 +8,7 @@ export declare module "next" { session?: Session | null; userId: number; + userUuid: string; user?: { role: string; locked: boolean; email: string } | null; method: string; // session: { user: { id: number } }; diff --git a/apps/api/v1/pages/api/invites/_post.ts b/apps/api/v1/pages/api/invites/_post.ts index e23595939b8956..67340c8e68f428 100644 --- a/apps/api/v1/pages/api/invites/_post.ts +++ b/apps/api/v1/pages/api/invites/_post.ts @@ -22,6 +22,7 @@ async function postHandler(req: NextApiRequest, res: NextApiResponse) { return { user: { id: req.userId, + uuid: req.userUuid, username: "", profile: { id: null, diff --git a/apps/api/v1/pages/api/teams/[teamId]/publish.ts b/apps/api/v1/pages/api/teams/[teamId]/publish.ts index bf3ea71df6388a..665d5bd391f212 100644 --- a/apps/api/v1/pages/api/teams/[teamId]/publish.ts +++ b/apps/api/v1/pages/api/teams/[teamId]/publish.ts @@ -22,6 +22,7 @@ const patchHandler = async (req: NextApiRequest, res: NextApiResponse) => { return { user: { id: req.userId, + uuid: req.userUuid, username: "" /* Not used in this context */, role: req.isSystemWideAdmin ? UserPermissionRole.ADMIN : UserPermissionRole.USER, profile: { diff --git a/apps/web/app/(booking-page-wrapper)/booking-successful/[uid]/page.tsx b/apps/web/app/(booking-page-wrapper)/booking-successful/[uid]/page.tsx index 357918cb63b0fc..881c585103f9f9 100644 --- a/apps/web/app/(booking-page-wrapper)/booking-successful/[uid]/page.tsx +++ b/apps/web/app/(booking-page-wrapper)/booking-successful/[uid]/page.tsx @@ -3,7 +3,7 @@ import { useParams } from "next/navigation"; import dayjs from "@calcom/dayjs"; -import { DecoyBookingSuccessCard } from "@calcom/features/bookings/Booker/components/DecoyBookingSuccessCard"; +import { DecoyBookingSuccessCard } from "~/bookings/components/DecoyBookingSuccessCard"; import { useDecoyBooking } from "@calcom/features/bookings/Booker/components/hooks/useDecoyBooking"; export default function BookingSuccessful() { diff --git a/apps/web/app/(use-page-wrapper)/(main-nav)/event-types/skeleton.tsx b/apps/web/app/(use-page-wrapper)/(main-nav)/event-types/skeleton.tsx index 089ee88c5f7266..44dc4a0542f8fb 100644 --- a/apps/web/app/(use-page-wrapper)/(main-nav)/event-types/skeleton.tsx +++ b/apps/web/app/(use-page-wrapper)/(main-nav)/event-types/skeleton.tsx @@ -2,7 +2,7 @@ import { ShellMainAppDir } from "app/(use-page-wrapper)/(main-nav)/ShellMainAppDir"; -import { EventTypesSkeletonLoader } from "@calcom/features/eventtypes/components/SkeletonLoader"; +import { EventTypesSkeletonLoader } from "@calcom/web/modules/event-types/components/SkeletonLoader"; import { useLocale } from "@calcom/lib/hooks/useLocale"; export function EventTypesSkeleton() { diff --git a/apps/web/app/(use-page-wrapper)/apps/routing-forms/forms/[[...pages]]/Forms.tsx b/apps/web/app/(use-page-wrapper)/apps/routing-forms/forms/[[...pages]]/Forms.tsx index a186fde67b2dea..c8f6ace04d78a9 100644 --- a/apps/web/app/(use-page-wrapper)/apps/routing-forms/forms/[[...pages]]/Forms.tsx +++ b/apps/web/app/(use-page-wrapper)/apps/routing-forms/forms/[[...pages]]/Forms.tsx @@ -7,7 +7,7 @@ import { useFormContext } from "react-hook-form"; import { isFallbackRoute } from "@calcom/app-store/routing-forms/lib/isFallbackRoute"; import type { RoutingFormWithResponseCount } from "@calcom/app-store/routing-forms/types/types"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; import { FilterResults } from "@calcom/features/filters/components/FilterResults"; import { TeamsFilter } from "@calcom/features/filters/components/TeamsFilter"; import { getTeamsFiltersFromQuery } from "@calcom/features/filters/lib/getTeamsFiltersFromQuery"; diff --git a/apps/web/app/(use-page-wrapper)/connect-and-join/page.tsx b/apps/web/app/(use-page-wrapper)/connect-and-join/page.tsx index 61bc9f450235a6..0edd5276d63f62 100644 --- a/apps/web/app/(use-page-wrapper)/connect-and-join/page.tsx +++ b/apps/web/app/(use-page-wrapper)/connect-and-join/page.tsx @@ -1,6 +1,6 @@ import { _generateMetadata } from "app/_utils"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; import LegacyPage from "~/connect-and-join/connect-and-join-view"; diff --git a/apps/web/app/(use-page-wrapper)/insights/call-history/page.tsx b/apps/web/app/(use-page-wrapper)/insights/call-history/page.tsx index 7335b1a5685e0c..97f6cf07535cca 100644 --- a/apps/web/app/(use-page-wrapper)/insights/call-history/page.tsx +++ b/apps/web/app/(use-page-wrapper)/insights/call-history/page.tsx @@ -1,6 +1,6 @@ import { _generateMetadata } from "app/_utils"; -import InsightsCallHistoryPage from "~/insights/insights-call-history-view"; +import InsightsCallHistoryPage from "~/insights/views/insights-call-history-view"; import { checkInsightsPagePermission } from "../checkInsightsPagePermission"; diff --git a/apps/web/app/(use-page-wrapper)/insights/page.tsx b/apps/web/app/(use-page-wrapper)/insights/page.tsx index b40b4a683c3b4a..8cd8fd36af96ce 100644 --- a/apps/web/app/(use-page-wrapper)/insights/page.tsx +++ b/apps/web/app/(use-page-wrapper)/insights/page.tsx @@ -2,7 +2,7 @@ import { _generateMetadata } from "app/_utils"; import prisma from "@calcom/prisma"; -import InsightsPage from "~/insights/insights-view"; +import InsightsPage from "~/insights/views/insights-view"; import { checkInsightsPagePermission } from "./checkInsightsPagePermission"; diff --git a/apps/web/app/(use-page-wrapper)/insights/router-position/page.tsx b/apps/web/app/(use-page-wrapper)/insights/router-position/page.tsx index 5a6dabcdbf75f3..634362705cadf0 100644 --- a/apps/web/app/(use-page-wrapper)/insights/router-position/page.tsx +++ b/apps/web/app/(use-page-wrapper)/insights/router-position/page.tsx @@ -1,6 +1,6 @@ import { _generateMetadata } from "app/_utils"; -import InsightsVirtualQueuesPage from "~/insights/insights-virtual-queues-view"; +import InsightsVirtualQueuesPage from "~/insights/views/insights-virtual-queues-view"; import { checkInsightsPagePermission } from "../checkInsightsPagePermission"; diff --git a/apps/web/app/(use-page-wrapper)/insights/routing/page.tsx b/apps/web/app/(use-page-wrapper)/insights/routing/page.tsx index 4693547e5f692b..886c8bffd0ef12 100644 --- a/apps/web/app/(use-page-wrapper)/insights/routing/page.tsx +++ b/apps/web/app/(use-page-wrapper)/insights/routing/page.tsx @@ -2,7 +2,7 @@ import { _generateMetadata } from "app/_utils"; import { prisma } from "@calcom/prisma"; -import InsightsRoutingPage from "~/insights/insights-routing-view"; +import InsightsRoutingPage from "~/insights/views/insights-routing-view"; import { checkInsightsPagePermission } from "../checkInsightsPagePermission"; diff --git a/apps/web/app/(use-page-wrapper)/payment/[uid]/PaymentPage.tsx b/apps/web/app/(use-page-wrapper)/payment/[uid]/PaymentPage.tsx index d4af324163eca4..a713f912ac2e4c 100644 --- a/apps/web/app/(use-page-wrapper)/payment/[uid]/PaymentPage.tsx +++ b/apps/web/app/(use-page-wrapper)/payment/[uid]/PaymentPage.tsx @@ -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/features/bookings/components/event-meta/PayIcon"; -import { Price } from "@calcom/features/bookings/components/event-meta/Price"; +import { PayIcon } from "@calcom/web/modules/bookings/components/event-meta/PayIcon"; +import { Price } from "@calcom/web/modules/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"; diff --git a/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/apps/[category]/page.tsx b/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/apps/[category]/page.tsx index 1b1bdb814f3d1e..9f8e3d077db6bb 100644 --- a/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/apps/[category]/page.tsx +++ b/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/apps/[category]/page.tsx @@ -1,7 +1,7 @@ import { _generateMetadata } from "app/_utils"; import { getTranslate } from "app/_utils"; -import AdminAppsList from "@calcom/features/apps/AdminAppsList"; +import AdminAppsList from "~/apps/components/AdminAppsList"; import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader"; export const generateMetadata = async ({ params }: { params: Promise<{ category: string }> }) => diff --git a/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/organizations/[id]/edit/page.tsx b/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/organizations/[id]/edit/page.tsx index 6e00831484a511..4e5a2368a1ae8a 100644 --- a/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/organizations/[id]/edit/page.tsx +++ b/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/organizations/[id]/edit/page.tsx @@ -2,7 +2,7 @@ import { type Params } from "app/_types"; import { _generateMetadata, getTranslate } from "app/_utils"; import { z } from "zod"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; import { OrgForm } from "~/ee/organizations/admin/AdminOrgEditPage"; import { getOrganizationRepository } from "@calcom/features/ee/organizations/di/OrganizationRepository.container"; import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader"; diff --git a/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/organizations/page.tsx b/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/organizations/page.tsx index 2ca701689685a5..24a387495f9004 100644 --- a/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/organizations/page.tsx +++ b/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/organizations/page.tsx @@ -1,7 +1,7 @@ import { _generateMetadata } from "app/_utils"; import { getTranslate } from "app/_utils"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; import AdminOrgTable from "~/ee/organizations/admin/AdminOrgPage"; import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader"; diff --git a/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/playground/bookings-by-hour/page.tsx b/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/playground/bookings-by-hour/page.tsx index 5a2db6f7fb720f..0e46fdb4d1051d 100644 --- a/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/playground/bookings-by-hour/page.tsx +++ b/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/playground/bookings-by-hour/page.tsx @@ -1,7 +1,7 @@ "use client"; -import { ChartCard } from "@calcom/features/insights/components/ChartCard"; -import { BookingsByHourChartContent } from "@calcom/features/insights/components/booking/BookingsByHourChart"; +import { ChartCard } from "@calcom/web/modules/insights/components/ChartCard"; +import { BookingsByHourChartContent } from "@calcom/web/modules/insights/components/booking/BookingsByHourChart"; import { useLocale } from "@calcom/lib/hooks/useLocale"; // Sample data for playground testing diff --git a/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/playground/date-range-filter/page.tsx b/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/playground/date-range-filter/page.tsx index 3ee39e2700c465..cd28a25f293f39 100644 --- a/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/playground/date-range-filter/page.tsx +++ b/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/playground/date-range-filter/page.tsx @@ -3,8 +3,9 @@ import { useReactTable, getCoreRowModel, createColumnHelper } from "@tanstack/react-table"; import { useMemo } from "react"; -import { ColumnFilterType, DateRangeFilter, DataTableProvider } from "@calcom/features/data-table"; +import { ColumnFilterType, DataTableProvider } from "@calcom/features/data-table"; import type { DateRangeFilterOptions } from "@calcom/features/data-table/lib/types"; +import { DateRangeFilter } from "~/data-table/components/filters/DateRangeFilter"; type DemoRow = { id: number; diff --git a/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/playground/routing-funnel/page.tsx b/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/playground/routing-funnel/page.tsx index e48bb20ddbb2e7..8b953b19f0ce38 100644 --- a/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/playground/routing-funnel/page.tsx +++ b/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/playground/routing-funnel/page.tsx @@ -1,10 +1,10 @@ "use client"; -import { ChartCard } from "@calcom/features/insights/components/ChartCard"; +import { ChartCard } from "@calcom/web/modules/insights/components/ChartCard"; import { RoutingFunnelContent, legend, -} from "@calcom/features/insights/components/routing/RoutingFunnelContent"; +} from "@calcom/web/modules/insights/components/routing/RoutingFunnelContent"; import { useLocale } from "@calcom/lib/hooks/useLocale"; // Random sample data for playground testing diff --git a/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/users/[id]/edit/page.tsx b/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/users/[id]/edit/page.tsx index e3d261a139f583..80738c57cb2f1f 100644 --- a/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/users/[id]/edit/page.tsx +++ b/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/users/[id]/edit/page.tsx @@ -2,8 +2,8 @@ import { type Params } from "app/_types"; import { _generateMetadata, getTranslate } from "app/_utils"; import { z } from "zod"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; -import { UsersEditView } from "@calcom/features/ee/users/pages/users-edit-view"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; +import { UsersEditView } from "~/ee/users/views/users-edit-view"; import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader"; import { UserRepository } from "@calcom/features/users/repositories/UserRepository"; import { prisma } from "@calcom/prisma"; diff --git a/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/users/add/page.tsx b/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/users/add/page.tsx index f3ba259e19a1bb..aa65dcaad94471 100644 --- a/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/users/add/page.tsx +++ b/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/users/add/page.tsx @@ -1,6 +1,6 @@ import { _generateMetadata, getTranslate } from "app/_utils"; -import UsersAddView from "@calcom/features/ee/users/pages/users-add-view"; +import UsersAddView from "~/ee/users/views/users-add-view"; import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader"; export const generateMetadata = async () => diff --git a/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/users/page.tsx b/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/users/page.tsx index 951efb9ded25db..4b367709a17ba9 100644 --- a/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/users/page.tsx +++ b/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/users/page.tsx @@ -1,6 +1,6 @@ import { _generateMetadata, getTranslate } from "app/_utils"; -import UsersListingView from "@calcom/features/ee/users/pages/users-listing-view"; +import UsersListingView from "~/ee/users/views/users-listing-view"; import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader"; import { Button } from "@calcom/ui/components/button"; diff --git a/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/workspace-platforms/page.tsx b/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/workspace-platforms/page.tsx index d92600e03018b2..9bc83137e22379 100644 --- a/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/workspace-platforms/page.tsx +++ b/apps/web/app/(use-page-wrapper)/settings/(admin-layout)/admin/workspace-platforms/page.tsx @@ -1,6 +1,6 @@ import { _generateMetadata, getTranslate } from "app/_utils"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; import WorkspacePlatformsPage from "~/ee/organizations/admin/WorkspacePlatformPage"; import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader"; diff --git a/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/(org-admin-only)/dsync/page.tsx b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/(org-admin-only)/dsync/page.tsx index 9204d01c30a8fc..f79769cc115254 100644 --- a/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/(org-admin-only)/dsync/page.tsx +++ b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/(org-admin-only)/dsync/page.tsx @@ -1,6 +1,6 @@ import { _generateMetadata, getTranslate } from "app/_utils"; -import DirectorySyncTeamView from "@calcom/features/ee/dsync/page/team-dsync-view"; +import DirectorySyncTeamView from "~/ee/dsync/views/team-dsync-view"; import { Resource } from "@calcom/features/pbac/domain/types/permission-registry"; import { getResourcePermissions } from "@calcom/features/pbac/lib/resource-permissions"; import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader"; diff --git a/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/(org-admin-only)/sso/page.tsx b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/(org-admin-only)/sso/page.tsx index c5011563c5d1c1..855222afbb9748 100644 --- a/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/(org-admin-only)/sso/page.tsx +++ b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/(org-admin-only)/sso/page.tsx @@ -1,7 +1,7 @@ import { _generateMetadata, getTranslate } from "app/_utils"; import { redirect } from "next/navigation"; -import OrgSSOView from "@calcom/features/ee/sso/page/orgs-sso-view"; +import OrgSSOView from "~/ee/sso/views/orgs-sso-view"; import { Resource } from "@calcom/features/pbac/domain/types/permission-registry"; import { getResourcePermissions } from "@calcom/features/pbac/lib/resource-permissions"; import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader"; diff --git a/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/actions/validateUserHasOrg.test.ts b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/actions/validateUserHasOrg.test.ts index ecc2f9eece6ba5..2fc5361f77f06c 100644 --- a/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/actions/validateUserHasOrg.test.ts +++ b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/actions/validateUserHasOrg.test.ts @@ -38,6 +38,7 @@ describe("validateUserHasOrg", () => { hasValidLicense: true, user: { id: 123, + uuid: "test-uuid-123", email: "test@example.com", name: "Test User", org: { @@ -87,6 +88,7 @@ describe("validateUserHasOrg", () => { const mockSession = createMockSession({ user: { id: 123, + uuid: "test-uuid-123", email: "test@example.com", name: "Test User", org: undefined, @@ -132,6 +134,7 @@ describe("validateUserHasOrg", () => { const mockSession = createMockSession({ user: { id: 123, + uuid: "test-uuid-123", email: "test@example.com", name: "Test User", org: undefined, @@ -159,6 +162,7 @@ describe("validateUserHasOrg", () => { const mockSession = createMockSession({ user: { id: undefined as unknown as number, + uuid: "test-uuid-123", email: "test@example.com", name: "Test User", org: { diff --git a/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/actions/validateUserHasOrgAdmin.test.ts b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/actions/validateUserHasOrgAdmin.test.ts index 664fc02fac1e01..65e523ff0371ec 100644 --- a/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/actions/validateUserHasOrgAdmin.test.ts +++ b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/actions/validateUserHasOrgAdmin.test.ts @@ -44,6 +44,7 @@ describe("validateUserHasOrgAdmin", () => { hasValidLicense: true, user: { id: 123, + uuid: "test-uuid-123", email: "test@example.com", name: "Test User", org: { @@ -95,6 +96,7 @@ describe("validateUserHasOrgAdmin", () => { const mockSession = createMockSession({ user: { id: 123, + uuid: "test-uuid-123", email: "test@example.com", name: "Test User", org: { @@ -136,6 +138,7 @@ describe("validateUserHasOrgAdmin", () => { const mockSession = createMockSession({ user: { id: 123, + uuid: "test-uuid-123", email: "test@example.com", name: "Test User", org: undefined, @@ -187,6 +190,7 @@ describe("validateUserHasOrgAdmin", () => { const mockSession = createMockSession({ user: { id: 123, + uuid: "test-uuid-123", email: "test@example.com", name: "Test User", org: undefined, @@ -216,6 +220,7 @@ describe("validateUserHasOrgAdmin", () => { const mockSession = createMockSession({ user: { id: 123, + uuid: "test-uuid-123", email: "test@example.com", name: "Test User", org: { @@ -260,6 +265,7 @@ describe("validateUserHasOrgAdmin", () => { const mockSession = createMockSession({ user: { id: 123, + uuid: "test-uuid-123", email: "test@example.com", name: "Test User", org: undefined, @@ -324,6 +330,7 @@ describe("validateUserHasOrgAdmin", () => { const mockSession = createMockSession({ user: { id: 123, + uuid: "test-uuid-123", email: "test@example.com", name: "Test User", org: { @@ -366,6 +373,7 @@ describe("validateUserHasOrgAdmin", () => { const mockSession = createMockSession({ user: { id: 123, + uuid: "test-uuid-123", email: "test@example.com", name: "Test User", org: undefined, diff --git a/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/teams/other/(main-page)/page.tsx b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/teams/other/(main-page)/page.tsx index 1359594aae9428..2f5518a79f78e1 100644 --- a/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/teams/other/(main-page)/page.tsx +++ b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/teams/other/(main-page)/page.tsx @@ -1,7 +1,7 @@ import { _generateMetadata, getTranslate } from "app/_utils"; import { redirect } from "next/navigation"; -import { OtherTeamsListing } from "@calcom/features/ee/organizations/pages/components/OtherTeamsListing"; +import { OtherTeamsListing } from "~/ee/organizations/components/OtherTeamsListing"; import { getOrganizationRepository } from "@calcom/features/ee/organizations/di/OrganizationRepository.container"; import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader"; diff --git a/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/security/sso/page.tsx b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/security/sso/page.tsx index c9c264b47bfe52..7042d70891565a 100644 --- a/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/security/sso/page.tsx +++ b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/security/sso/page.tsx @@ -1,7 +1,7 @@ import { _generateMetadata } from "app/_utils"; import { getTranslate } from "app/_utils"; -import SAMLSSO from "@calcom/features/ee/sso/page/user-sso-view"; +import SAMLSSO from "~/ee/sso/views/user-sso-view"; import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader"; export const generateMetadata = async () => diff --git a/apps/web/app/(use-page-wrapper)/settings/organizations/new/page.tsx b/apps/web/app/(use-page-wrapper)/settings/organizations/new/page.tsx index 380d92ed3169b8..d913f69a7b8b9c 100644 --- a/apps/web/app/(use-page-wrapper)/settings/organizations/new/page.tsx +++ b/apps/web/app/(use-page-wrapper)/settings/organizations/new/page.tsx @@ -1,6 +1,6 @@ import { _generateMetadata } from "app/_utils"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; import LegacyPage, { LayoutWrapper } from "~/ee/organizations/new/create-new-view"; diff --git a/apps/web/app/(use-page-wrapper)/settings/platform/members/page.tsx b/apps/web/app/(use-page-wrapper)/settings/platform/members/page.tsx index f8dd1d278d2d24..41b14296602acf 100644 --- a/apps/web/app/(use-page-wrapper)/settings/platform/members/page.tsx +++ b/apps/web/app/(use-page-wrapper)/settings/platform/members/page.tsx @@ -1,7 +1,7 @@ import { createRouterCaller } from "app/_trpc/context"; import { _generateMetadata } from "app/_utils"; -import PlatformMembersView from "@calcom/features/ee/platform/pages/settings/members"; +import PlatformMembersView from "~/ee/platform/views/members"; import { viewerOrganizationsRouter } from "@calcom/trpc/server/routers/viewer/organizations/_router"; export const generateMetadata = async () => diff --git a/apps/web/app/(use-page-wrapper)/settings/platform/new/page.tsx b/apps/web/app/(use-page-wrapper)/settings/platform/new/page.tsx index a35a026a6eaef2..a3a1ddcef39c50 100644 --- a/apps/web/app/(use-page-wrapper)/settings/platform/new/page.tsx +++ b/apps/web/app/(use-page-wrapper)/settings/platform/new/page.tsx @@ -3,7 +3,7 @@ import { cookies, headers } from "next/headers"; import { redirect } from "next/navigation"; import { getServerSession } from "@calcom/features/auth/lib/getServerSession"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; import { WEBAPP_URL } from "@calcom/lib/constants"; import { buildLegacyRequest } from "@lib/buildLegacyCtx"; diff --git a/apps/web/app/api/link/route.ts b/apps/web/app/api/link/route.ts index d105ee3b28e08b..36113b72bc4d13 100644 --- a/apps/web/app/api/link/route.ts +++ b/apps/web/app/api/link/route.ts @@ -37,10 +37,11 @@ const decryptedSchema = z.object({ }); // Move the sessionGetter function outside the GET function -const createSessionGetter = (userId: number) => async () => { +const createSessionGetter = (userId: number, userUuid: string) => async () => { return { user: { id: userId, + uuid: userUuid, username: "" /* Not used in this context */, role: UserPermissionRole.USER, /* Not used in this context */ @@ -85,13 +86,14 @@ async function handler(request: NextRequest) { }); // Use the factory function instead of declaring inside the block - const sessionGetter = createSessionGetter(userId); + const sessionGetter = createSessionGetter(userId, user.uuid); try { /** @see https://trpc.io/docs/server-side-calls */ // Create a legacy request object for compatibility const legacyReq = buildLegacyRequest(await headers(), await cookies()); - const res = {} as any; // Response is still mocked as it's not used in this context + // eslint-disable-next-line @typescript-eslint/no-explicit-any -- Response is mocked as it's not used in this context + const res = {} as any; const ctx = await createContext({ req: legacyReq, res }, sessionGetter); const createCaller = createCallerFactory(bookingsRouter); diff --git a/apps/web/app/api/verify-booking-token/route.ts b/apps/web/app/api/verify-booking-token/route.ts index 642b4fc00e3d6f..c0401168b2a704 100644 --- a/apps/web/app/api/verify-booking-token/route.ts +++ b/apps/web/app/api/verify-booking-token/route.ts @@ -96,6 +96,7 @@ async function handleBookingAction( return { user: { id: Number(userId), + uuid: user.uuid, username: "" /* Not used in this context */, role: UserPermissionRole.USER, /* Not used in this context */ @@ -118,7 +119,9 @@ async function handleBookingAction( const createCaller = createCallerFactory(bookingsRouter); // Use buildLegacyRequest to create a request object compatible with Pages Router + const legacyReq = request ? buildLegacyRequest(await headers(), await cookies()) : ({} as any); + const res = {} as any; const ctx = await createContext({ req: legacyReq, res }, sessionGetter); diff --git a/apps/web/app/e2e/session-warmup/page.tsx b/apps/web/app/e2e/session-warmup/page.tsx new file mode 100644 index 00000000000000..f7a2c65ed228ab --- /dev/null +++ b/apps/web/app/e2e/session-warmup/page.tsx @@ -0,0 +1,25 @@ +import process from "node:process"; + +import { notFound } from "next/navigation"; + +/** + * E2E-only page for warming up the NextAuth session. + * This triggers the jwt and session callbacks that populate the session + * with profile, org, and other important data. + * + * Only available when NEXT_PUBLIC_IS_E2E=1 is set (automatically set by playwright.config.ts) + * or in development mode. + */ +const Page = (): JSX.Element => { + // Gate this page to E2E test mode or dev only + if ( + process.env.NEXT_PUBLIC_IS_E2E !== "1" && + process.env.NODE_ENV !== "development" + ) { + notFound(); + } + + return
; +}; + +export default Page; diff --git a/apps/web/components/PageWrapper.tsx b/apps/web/components/PageWrapper.tsx index eebcf44ea29a1f..9a689a1dac5daf 100644 --- a/apps/web/components/PageWrapper.tsx +++ b/apps/web/components/PageWrapper.tsx @@ -16,7 +16,7 @@ import Head from "next/head"; import Script from "next/script"; import "@calcom/embed-core/src/embed-iframe"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; import { IS_CALCOM, WEBAPP_URL } from "@calcom/lib/constants"; import { getCalcomUrl } from "@calcom/lib/getCalcomUrl"; import { buildCanonical } from "@calcom/lib/next-seo.config"; diff --git a/apps/web/components/PageWrapperAppDir.tsx b/apps/web/components/PageWrapperAppDir.tsx index 4eae7e122a47a4..93a0689298535a 100644 --- a/apps/web/components/PageWrapperAppDir.tsx +++ b/apps/web/components/PageWrapperAppDir.tsx @@ -1,7 +1,7 @@ "use client"; import "@calcom/embed-core/src/embed-iframe"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; import AppProviders from "@lib/app-providers-app-dir"; diff --git a/apps/web/components/apps/App.tsx b/apps/web/components/apps/App.tsx index ef36f2a2a766a8..ae928824a7046b 100644 --- a/apps/web/components/apps/App.tsx +++ b/apps/web/components/apps/App.tsx @@ -1,4 +1,4 @@ -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import Shell from "~/shell/Shell"; diff --git a/apps/web/components/apps/AppPage.tsx b/apps/web/components/apps/AppPage.tsx index 06f95931303ef1..61d9428a6bc330 100644 --- a/apps/web/components/apps/AppPage.tsx +++ b/apps/web/components/apps/AppPage.tsx @@ -8,7 +8,7 @@ import { InstallAppButton } from "@calcom/app-store/InstallAppButton"; import { isRedirectApp } from "@calcom/app-store/_utils/redirectApps"; import useAddAppMutation from "@calcom/app-store/_utils/useAddAppMutation"; import { doesAppSupportTeamInstall, isConferencing } from "@calcom/app-store/utils"; -import DisconnectIntegration from "@calcom/features/apps/components/DisconnectIntegration"; +import DisconnectIntegration from "@calcom/web/modules/apps/components/DisconnectIntegration"; import { AppOnboardingSteps } from "@calcom/lib/apps/appOnboardingSteps"; import { getAppOnboardingUrl } from "@calcom/lib/apps/getAppOnboardingUrl"; import { APP_NAME, COMPANY_NAME, SUPPORT_MAIL_ADDRESS, WEBAPP_URL } from "@calcom/lib/constants"; diff --git a/apps/web/components/apps/CalendarListContainer.tsx b/apps/web/components/apps/CalendarListContainer.tsx index 5c6a51215438e5..bdcbbb46caf5e4 100644 --- a/apps/web/components/apps/CalendarListContainer.tsx +++ b/apps/web/components/apps/CalendarListContainer.tsx @@ -5,8 +5,8 @@ import { useEffect, Suspense } from "react"; import { InstallAppButton } from "@calcom/app-store/InstallAppButton"; import { DestinationCalendarSettingsWebWrapper } from "@calcom/atoms/destination-calendar/wrappers/DestinationCalendarSettingsWebWrapper"; import { SelectedCalendarsSettingsWebWrapper } from "@calcom/atoms/selected-calendars/wrappers/SelectedCalendarsSettingsWebWrapper"; -import AppListCard from "@calcom/features/apps/components/AppListCard"; -import { SkeletonLoader } from "@calcom/features/apps/components/SkeletonLoader"; +import AppListCard from "@calcom/web/modules/apps/components/AppListCard"; +import { SkeletonLoader } from "@calcom/web/modules/apps/components/SkeletonLoader"; import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; diff --git a/apps/web/components/apps/routing-forms/FormActions.tsx b/apps/web/components/apps/routing-forms/FormActions.tsx index cb4ae284f4bd06..cb78efa7288273 100644 --- a/apps/web/components/apps/routing-forms/FormActions.tsx +++ b/apps/web/components/apps/routing-forms/FormActions.tsx @@ -8,7 +8,7 @@ import { Dialog } from "@calcom/features/components/controlled-dialog"; import { dataTableQueryParamsSerializer } from "@calcom/features/data-table/lib/serializers"; import { ColumnFilterType } from "@calcom/features/data-table/lib/types"; import { useOrgBranding } from "@calcom/features/ee/organizations/context/provider"; -import { RoutingFormEmbedButton, RoutingFormEmbedDialog } from "@calcom/features/embed/RoutingFormEmbed"; +import { RoutingFormEmbedButton, RoutingFormEmbedDialog } from "@calcom/web/modules/embed/components/RoutingFormEmbed"; import { EmbedDialogProvider } from "@calcom/features/embed/lib/hooks/useEmbedDialogCtx"; import { WEBSITE_URL } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; diff --git a/apps/web/components/apps/routing-forms/SingleForm.tsx b/apps/web/components/apps/routing-forms/SingleForm.tsx index 79df045523085d..51514e743ee3ee 100644 --- a/apps/web/components/apps/routing-forms/SingleForm.tsx +++ b/apps/web/components/apps/routing-forms/SingleForm.tsx @@ -7,7 +7,7 @@ import type { UseFormReturn } from "react-hook-form"; import { InfoLostWarningDialog } from "@calcom/app-store/routing-forms/components/InfoLostWarningDialog"; import type { RoutingFormWithResponseCount } from "@calcom/app-store/routing-forms/types/types"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import type { inferSSRProps } from "@calcom/types/inferSSRProps"; diff --git a/apps/web/components/booking/actions/BookingActionsDropdown.tsx b/apps/web/components/booking/actions/BookingActionsDropdown.tsx index 5d3b3fc331daf4..c8836854819c1e 100644 --- a/apps/web/components/booking/actions/BookingActionsDropdown.tsx +++ b/apps/web/components/booking/actions/BookingActionsDropdown.tsx @@ -1,8 +1,8 @@ import { useState } from "react"; import type { z } from "zod"; -import { MeetingSessionDetailsDialog } from "@calcom/features/ee/video/MeetingSessionDetailsDialog"; -import ViewRecordingsDialog from "~/ee/video/ViewRecordingsDialog"; +import { MeetingSessionDetailsDialog } from "@calcom/web/modules/ee/video/components/MeetingSessionDetailsDialog"; +import ViewRecordingsDialog from "~/ee/video/components/ViewRecordingsDialog"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { bookingMetadataSchema } from "@calcom/prisma/zod-utils"; import { trpc } from "@calcom/trpc/react"; diff --git a/apps/web/modules/apps/apps-view.tsx b/apps/web/modules/apps/apps-view.tsx index c467d35f684ef4..3f9d1f625d91c3 100644 --- a/apps/web/modules/apps/apps-view.tsx +++ b/apps/web/modules/apps/apps-view.tsx @@ -3,10 +3,10 @@ import type { ChangeEventHandler } from "react"; import { useState } from "react"; -import { AllApps } from "@calcom/features/apps/components/AllApps"; -import { AppStoreCategories } from "@calcom/features/apps/components/Categories"; -import { PopularAppsSlider } from "@calcom/features/apps/components/PopularAppsSlider"; -import { RecentAppsSlider } from "@calcom/features/apps/components/RecentAppsSlider"; +import { AllApps } from "@calcom/web/modules/apps/components/AllApps"; +import { AppStoreCategories } from "@calcom/web/modules/apps/components/Categories"; +import { PopularAppsSlider } from "@calcom/web/modules/apps/components/PopularAppsSlider"; +import { RecentAppsSlider } from "@calcom/web/modules/apps/components/RecentAppsSlider"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { AppCategories } from "@calcom/prisma/enums"; import type { AppFrontendPayload } from "@calcom/types/App"; diff --git a/apps/web/modules/apps/categories/[category]/category-view.tsx b/apps/web/modules/apps/categories/[category]/category-view.tsx index ff79f2596ed1ea..c11dcd32342fb9 100644 --- a/apps/web/modules/apps/categories/[category]/category-view.tsx +++ b/apps/web/modules/apps/categories/[category]/category-view.tsx @@ -2,7 +2,7 @@ import Link from "next/link"; -import { AppCard } from "@calcom/features/apps/components/AppCard"; +import { AppCard } from "@calcom/web/modules/apps/components/AppCard"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { SkeletonText } from "@calcom/ui/components/skeleton"; diff --git a/packages/features/apps/AdminAppsList.tsx b/apps/web/modules/apps/components/AdminAppsList.tsx similarity index 99% rename from packages/features/apps/AdminAppsList.tsx rename to apps/web/modules/apps/components/AdminAppsList.tsx index 73fb63a4b01aeb..e1afc0d243a47d 100644 --- a/packages/features/apps/AdminAppsList.tsx +++ b/apps/web/modules/apps/components/AdminAppsList.tsx @@ -10,7 +10,7 @@ import { z } from "zod"; import AppCategoryNavigation from "@calcom/app-store/_components/AppCategoryNavigation"; import { appKeysSchemas } from "@calcom/app-store/apps.keys-schemas.generated"; -import AppListCard from "@calcom/features/apps/components/AppListCard"; +import AppListCard from "@calcom/web/modules/apps/components/AppListCard"; import { Dialog } from "@calcom/features/components/controlled-dialog"; import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams"; import { useLocale } from "@calcom/lib/hooks/useLocale"; diff --git a/packages/features/apps/components/AllApps.tsx b/apps/web/modules/apps/components/AllApps.tsx similarity index 100% rename from packages/features/apps/components/AllApps.tsx rename to apps/web/modules/apps/components/AllApps.tsx diff --git a/packages/features/apps/components/AppCard.tsx b/apps/web/modules/apps/components/AppCard.tsx similarity index 100% rename from packages/features/apps/components/AppCard.tsx rename to apps/web/modules/apps/components/AppCard.tsx diff --git a/packages/features/apps/components/AppList.tsx b/apps/web/modules/apps/components/AppList.tsx similarity index 95% rename from packages/features/apps/components/AppList.tsx rename to apps/web/modules/apps/components/AppList.tsx index 6e5e8cd91816d8..efb85347ad5cc6 100644 --- a/packages/features/apps/components/AppList.tsx +++ b/apps/web/modules/apps/components/AppList.tsx @@ -4,14 +4,14 @@ import { InstallAppButton } from "@calcom/app-store/InstallAppButton"; import { AppSettings } from "@calcom/app-store/_components/AppSettings"; import { getLocationFromApp, type EventLocationType } from "@calcom/app-store/locations"; import type { AppCardApp } from "@calcom/app-store/types"; -import AppListCard from "@calcom/features/apps/components/AppListCard"; -import type { UpdateUsersDefaultConferencingAppParams } from "@calcom/features/apps/components/AppSetDefaultLinkDialog"; -import { AppSetDefaultLinkDialog } from "@calcom/features/apps/components/AppSetDefaultLinkDialog"; +import AppListCard from "@calcom/web/modules/apps/components/AppListCard"; +import type { UpdateUsersDefaultConferencingAppParams } from "@calcom/web/modules/apps/components/AppSetDefaultLinkDialog"; +import { AppSetDefaultLinkDialog } from "@calcom/web/modules/apps/components/AppSetDefaultLinkDialog"; import type { BulkUpdatParams, EventTypes, -} from "@calcom/features/eventtypes/components/BulkEditDefaultForEventsModal"; -import { BulkEditDefaultForEventsModal } from "@calcom/features/eventtypes/components/BulkEditDefaultForEventsModal"; +} from "@calcom/web/modules/event-types/components/BulkEditDefaultForEventsModal"; +import { BulkEditDefaultForEventsModal } from "@calcom/web/modules/event-types/components/BulkEditDefaultForEventsModal"; import { isDelegationCredential } from "@calcom/lib/delegationCredential"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { AppCategories } from "@calcom/prisma/enums"; diff --git a/packages/features/apps/components/AppListCard.tsx b/apps/web/modules/apps/components/AppListCard.tsx similarity index 100% rename from packages/features/apps/components/AppListCard.tsx rename to apps/web/modules/apps/components/AppListCard.tsx diff --git a/packages/features/apps/components/AppListCardPlatformWrapper.tsx b/apps/web/modules/apps/components/AppListCardPlatformWrapper.tsx similarity index 100% rename from packages/features/apps/components/AppListCardPlatformWrapper.tsx rename to apps/web/modules/apps/components/AppListCardPlatformWrapper.tsx diff --git a/packages/features/apps/components/AppListCardWebWrapper.tsx b/apps/web/modules/apps/components/AppListCardWebWrapper.tsx similarity index 100% rename from packages/features/apps/components/AppListCardWebWrapper.tsx rename to apps/web/modules/apps/components/AppListCardWebWrapper.tsx diff --git a/packages/features/apps/components/AppSetDefaultLinkDialog.tsx b/apps/web/modules/apps/components/AppSetDefaultLinkDialog.tsx similarity index 100% rename from packages/features/apps/components/AppSetDefaultLinkDialog.tsx rename to apps/web/modules/apps/components/AppSetDefaultLinkDialog.tsx diff --git a/packages/features/apps/components/Categories.tsx b/apps/web/modules/apps/components/Categories.tsx similarity index 100% rename from packages/features/apps/components/Categories.tsx rename to apps/web/modules/apps/components/Categories.tsx diff --git a/packages/features/apps/components/CredentialActionsDropdown.tsx b/apps/web/modules/apps/components/CredentialActionsDropdown.tsx similarity index 100% rename from packages/features/apps/components/CredentialActionsDropdown.tsx rename to apps/web/modules/apps/components/CredentialActionsDropdown.tsx diff --git a/packages/features/apps/components/DisconnectIntegration.tsx b/apps/web/modules/apps/components/DisconnectIntegration.tsx similarity index 100% rename from packages/features/apps/components/DisconnectIntegration.tsx rename to apps/web/modules/apps/components/DisconnectIntegration.tsx diff --git a/packages/features/apps/components/DisconnectIntegrationModal.tsx b/apps/web/modules/apps/components/DisconnectIntegrationModal.tsx similarity index 100% rename from packages/features/apps/components/DisconnectIntegrationModal.tsx rename to apps/web/modules/apps/components/DisconnectIntegrationModal.tsx diff --git a/packages/features/apps/components/PopularAppsSlider.tsx b/apps/web/modules/apps/components/PopularAppsSlider.tsx similarity index 100% rename from packages/features/apps/components/PopularAppsSlider.tsx rename to apps/web/modules/apps/components/PopularAppsSlider.tsx diff --git a/packages/features/apps/components/RecentAppsSlider.tsx b/apps/web/modules/apps/components/RecentAppsSlider.tsx similarity index 100% rename from packages/features/apps/components/RecentAppsSlider.tsx rename to apps/web/modules/apps/components/RecentAppsSlider.tsx diff --git a/packages/features/apps/components/SkeletonLoader.tsx b/apps/web/modules/apps/components/SkeletonLoader.tsx similarity index 100% rename from packages/features/apps/components/SkeletonLoader.tsx rename to apps/web/modules/apps/components/SkeletonLoader.tsx diff --git a/packages/features/apps/components/Slider.tsx b/apps/web/modules/apps/components/Slider.tsx similarity index 100% rename from packages/features/apps/components/Slider.tsx rename to apps/web/modules/apps/components/Slider.tsx diff --git a/packages/features/apps/components/_storybookData.ts b/apps/web/modules/apps/components/_storybookData.ts similarity index 100% rename from packages/features/apps/components/_storybookData.ts rename to apps/web/modules/apps/components/_storybookData.ts diff --git a/packages/features/apps/components/appCard.test.tsx b/apps/web/modules/apps/components/appCard.test.tsx similarity index 100% rename from packages/features/apps/components/appCard.test.tsx rename to apps/web/modules/apps/components/appCard.test.tsx diff --git a/packages/features/apps/components/index.ts b/apps/web/modules/apps/components/index.ts similarity index 100% rename from packages/features/apps/components/index.ts rename to apps/web/modules/apps/components/index.ts diff --git a/apps/web/modules/apps/installed/[category]/installed-category-view.tsx b/apps/web/modules/apps/installed/[category]/installed-category-view.tsx index 4932ee9cfb4a57..1d6e81989bdc9f 100644 --- a/apps/web/modules/apps/installed/[category]/installed-category-view.tsx +++ b/apps/web/modules/apps/installed/[category]/installed-category-view.tsx @@ -3,12 +3,12 @@ import { useReducer } from "react"; import getAppCategoryTitle from "@calcom/app-store/_utils/getAppCategoryTitle"; -import { AppList, type HandleDisconnect } from "@calcom/features/apps/components/AppList"; -import type { UpdateUsersDefaultConferencingAppParams } from "@calcom/features/apps/components/AppSetDefaultLinkDialog"; -import DisconnectIntegrationModal from "@calcom/features/apps/components/DisconnectIntegrationModal"; -import type { RemoveAppParams } from "@calcom/features/apps/components/DisconnectIntegrationModal"; -import { SkeletonLoader } from "@calcom/features/apps/components/SkeletonLoader"; -import type { BulkUpdatParams } from "@calcom/features/eventtypes/components/BulkEditDefaultForEventsModal"; +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 { SkeletonLoader } from "@calcom/web/modules/apps/components/SkeletonLoader"; +import type { BulkUpdatParams } from "@calcom/web/modules/event-types/components/BulkEditDefaultForEventsModal"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { AppCategories } from "@calcom/prisma/enums"; import { trpc } from "@calcom/trpc/react"; diff --git a/apps/web/modules/auth/setup-view.tsx b/apps/web/modules/auth/setup-view.tsx index a3069ca85695f3..0e12dc1d159220 100644 --- a/apps/web/modules/auth/setup-view.tsx +++ b/apps/web/modules/auth/setup-view.tsx @@ -3,7 +3,7 @@ import { useRouter } from "next/navigation"; import { useMemo, useState } from "react"; -import AdminAppsList from "@calcom/features/apps/AdminAppsList"; +import AdminAppsList from "~/apps/components/AdminAppsList"; import { APP_NAME } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { inferSSRProps } from "@calcom/types/inferSSRProps"; diff --git a/apps/web/modules/availability/[schedule]/schedule-view.tsx b/apps/web/modules/availability/[schedule]/schedule-view.tsx index 71822472d65ed8..93b82d08f59ec8 100644 --- a/apps/web/modules/availability/[schedule]/schedule-view.tsx +++ b/apps/web/modules/availability/[schedule]/schedule-view.tsx @@ -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/features/eventtypes/components/BulkEditDefaultForEventsModal"; +import type { BulkUpdatParams } from "@calcom/web/modules/event-types/components/BulkEditDefaultForEventsModal"; import { withErrorFromUnknown } from "@calcom/lib/getClientErrorFromUnknown"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { HttpError } from "@calcom/lib/http-error"; diff --git a/apps/web/modules/availability/availability-view.tsx b/apps/web/modules/availability/availability-view.tsx index 5b5355422eae82..5e4ae68742ba88 100644 --- a/apps/web/modules/availability/availability-view.tsx +++ b/apps/web/modules/availability/availability-view.tsx @@ -7,8 +7,8 @@ import { useRouter, usePathname } from "next/navigation"; import { useCallback, useState } from "react"; import posthog from "posthog-js"; -import { BulkEditDefaultForEventsModal } from "@calcom/features/eventtypes/components/BulkEditDefaultForEventsModal"; -import type { BulkUpdatParams } from "@calcom/features/eventtypes/components/BulkEditDefaultForEventsModal"; +import { BulkEditDefaultForEventsModal } from "@calcom/web/modules/event-types/components/BulkEditDefaultForEventsModal"; +import type { BulkUpdatParams } from "@calcom/web/modules/event-types/components/BulkEditDefaultForEventsModal"; import { NewScheduleButton } from "@calcom/features/schedules/components/NewScheduleButton"; import { ScheduleListItem } from "@calcom/features/schedules/components/ScheduleListItem"; import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams"; diff --git a/packages/features/bookings/Booker/components/AvailableTimeSlots.tsx b/apps/web/modules/bookings/components/AvailableTimeSlots.tsx similarity index 96% rename from packages/features/bookings/Booker/components/AvailableTimeSlots.tsx rename to apps/web/modules/bookings/components/AvailableTimeSlots.tsx index 34f67e690c55f9..cd85a4738a957c 100644 --- a/packages/features/bookings/Booker/components/AvailableTimeSlots.tsx +++ b/apps/web/modules/bookings/components/AvailableTimeSlots.tsx @@ -1,7 +1,7 @@ import { useCallback, useMemo, useRef } from "react"; import dayjs from "@calcom/dayjs"; -import { AvailableTimes, AvailableTimesSkeleton } from "@calcom/features/bookings"; +import { AvailableTimes, AvailableTimesSkeleton } from "@calcom/web/modules/bookings/components/AvailableTimes"; import { useBookerStoreContext } from "@calcom/features/bookings/Booker/BookerStoreProvider"; import type { IUseBookingLoadingStates } from "@calcom/features/bookings/Booker/components/hooks/useBookings"; import type { BookerEvent } from "@calcom/features/bookings/types"; @@ -13,9 +13,9 @@ import { localStorage } from "@calcom/lib/webstorage"; import { BookerLayouts } from "@calcom/prisma/zod-utils"; import classNames from "@calcom/ui/classNames"; -import { AvailableTimesHeader } from "../../components/AvailableTimesHeader"; -import type { useScheduleForEventReturnType } from "../utils/event"; -import { getQueryParam } from "../utils/query-param"; +import { AvailableTimesHeader } from "@calcom/web/modules/bookings/components/AvailableTimesHeader"; +import type { useScheduleForEventReturnType } from "@calcom/features/bookings/Booker/utils/event"; +import { getQueryParam } from "@calcom/features/bookings/Booker/utils/query-param"; type AvailableTimeSlotsProps = { extraDays?: number; diff --git a/packages/features/bookings/components/AvailableTimes.tsx b/apps/web/modules/bookings/components/AvailableTimes.tsx similarity index 96% rename from packages/features/bookings/components/AvailableTimes.tsx rename to apps/web/modules/bookings/components/AvailableTimes.tsx index 8034be9206ca3f..6fb16177dbe447 100644 --- a/packages/features/bookings/components/AvailableTimes.tsx +++ b/apps/web/modules/bookings/components/AvailableTimes.tsx @@ -8,7 +8,7 @@ import { useIsPlatform } from "@calcom/atoms/hooks/useIsPlatform"; import dayjs from "@calcom/dayjs"; import type { IOutOfOfficeData } from "@calcom/features/availability/lib/getUserAvailability"; import { useBookerStoreContext } from "@calcom/features/bookings/Booker/BookerStoreProvider"; -import { OutOfOfficeInSlots } from "@calcom/features/bookings/Booker/components/OutOfOfficeInSlots"; +import { OutOfOfficeInSlots } from "./OutOfOfficeInSlots"; import type { IUseBookingLoadingStates } from "@calcom/features/bookings/Booker/components/hooks/useBookings"; import type { BookerEvent } from "@calcom/features/bookings/types"; import type { Slot } from "@calcom/features/schedules/lib/use-schedule/types"; @@ -19,10 +19,10 @@ import { Button } from "@calcom/ui/components/button"; import { Icon } from "@calcom/ui/components/icon"; import { SkeletonText } from "@calcom/ui/components/skeleton"; -import { useBookerTime } from "../Booker/components/hooks/useBookerTime"; -import { getQueryParam } from "../Booker/utils/query-param"; -import { useCheckOverlapWithOverlay } from "../lib/useCheckOverlapWithOverlay"; -import type { Slots } from "../types"; +import { useBookerTime } from "@calcom/features/bookings/Booker/components/hooks/useBookerTime"; +import { getQueryParam } from "@calcom/features/bookings/Booker/utils/query-param"; +import { useCheckOverlapWithOverlay } from "@calcom/features/bookings/lib/useCheckOverlapWithOverlay"; +import type { Slots } from "@calcom/features/bookings/types"; import { SeatsAvailabilityText } from "./SeatsAvailabilityText"; type TOnTimeSelect = ( diff --git a/packages/features/bookings/components/AvailableTimesHeader.tsx b/apps/web/modules/bookings/components/AvailableTimesHeader.tsx similarity index 100% rename from packages/features/bookings/components/AvailableTimesHeader.tsx rename to apps/web/modules/bookings/components/AvailableTimesHeader.tsx diff --git a/packages/features/bookings/Booker/components/BookEventForm/BookEventForm.tsx b/apps/web/modules/bookings/components/BookEventForm/BookEventForm.tsx similarity index 96% rename from packages/features/bookings/Booker/components/BookEventForm/BookEventForm.tsx rename to apps/web/modules/bookings/components/BookEventForm/BookEventForm.tsx index 49c10637082c67..8a6c3b95dfda05 100644 --- a/packages/features/bookings/Booker/components/BookEventForm/BookEventForm.tsx +++ b/apps/web/modules/bookings/components/BookEventForm/BookEventForm.tsx @@ -17,10 +17,10 @@ import { Button } from "@calcom/ui/components/button"; import { EmptyScreen } from "@calcom/ui/components/empty-screen"; import { Form } from "@calcom/ui/components/form"; -import { formatEventFromTime } from "../../utils/dates"; -import { useBookerTime } from "../hooks/useBookerTime"; -import type { UseBookingFormReturnType } from "../hooks/useBookingForm"; -import type { IUseBookingErrors, IUseBookingLoadingStates } from "../hooks/useBookings"; +import { formatEventFromTime } from "@calcom/features/bookings/Booker/utils/dates"; +import { useBookerTime } from "@calcom/features/bookings/Booker/components/hooks/useBookerTime"; +import type { UseBookingFormReturnType } from "@calcom/features/bookings/Booker/components/hooks/useBookingForm"; +import type { IUseBookingErrors, IUseBookingLoadingStates } from "@calcom/features/bookings/Booker/components/hooks/useBookings"; import { BookingFields } from "./BookingFields"; import { FormSkeleton } from "./Skeleton"; diff --git a/packages/features/bookings/Booker/components/BookEventForm/BookFormAsModal.tsx b/apps/web/modules/bookings/components/BookEventForm/BookFormAsModal.tsx similarity index 92% rename from packages/features/bookings/Booker/components/BookEventForm/BookFormAsModal.tsx rename to apps/web/modules/bookings/components/BookEventForm/BookFormAsModal.tsx index a33280e62d024b..4c1c565de07449 100644 --- a/packages/features/bookings/Booker/components/BookEventForm/BookFormAsModal.tsx +++ b/apps/web/modules/bookings/components/BookEventForm/BookFormAsModal.tsx @@ -9,10 +9,10 @@ import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Badge } from "@calcom/ui/components/badge"; import { DialogContent } from "@calcom/ui/components/dialog"; -import { getDurationFormatted } from "../../../components/event-meta/Duration"; -import { FromTime } from "../../utils/dates"; -import { useEvent } from "../../utils/event"; -import { useBookerTime } from "../hooks/useBookerTime"; +import { getDurationFormatted } from "../event-meta/Duration"; +import { FromTime } from "@calcom/features/bookings/Booker/utils/dates"; +import { useEvent } from "@calcom/features/bookings/Booker/utils/event"; +import { useBookerTime } from "@calcom/features/bookings/Booker/components/hooks/useBookerTime"; const BookEventFormWrapper = ({ children, onCancel }: { onCancel: () => void; children: ReactNode }) => { const { data } = useEvent(); diff --git a/packages/features/bookings/Booker/components/BookEventForm/BookingFields.tsx b/apps/web/modules/bookings/components/BookEventForm/BookingFields.tsx similarity index 100% rename from packages/features/bookings/Booker/components/BookEventForm/BookingFields.tsx rename to apps/web/modules/bookings/components/BookEventForm/BookingFields.tsx diff --git a/packages/features/bookings/Booker/components/BookEventForm/Skeleton.tsx b/apps/web/modules/bookings/components/BookEventForm/Skeleton.tsx similarity index 100% rename from packages/features/bookings/Booker/components/BookEventForm/Skeleton.tsx rename to apps/web/modules/bookings/components/BookEventForm/Skeleton.tsx diff --git a/packages/features/bookings/Booker/components/BookEventForm/index.ts b/apps/web/modules/bookings/components/BookEventForm/index.ts similarity index 100% rename from packages/features/bookings/Booker/components/BookEventForm/index.ts rename to apps/web/modules/bookings/components/BookEventForm/index.ts diff --git a/packages/features/bookings/Booker/__tests__/Booker.test.tsx b/apps/web/modules/bookings/components/Booker.test.tsx similarity index 84% rename from packages/features/bookings/Booker/__tests__/Booker.test.tsx rename to apps/web/modules/bookings/components/Booker.test.tsx index f1b6810e851508..55df93c54a3181 100644 --- a/packages/features/bookings/Booker/__tests__/Booker.test.tsx +++ b/apps/web/modules/bookings/components/Booker.test.tsx @@ -1,12 +1,12 @@ import "@calcom/features/bookings/Booker/__mocks__/config"; -import "@calcom/features/bookings/Booker/components/OverlayCalendar/__mocks__/OverlayCalendar"; -import "@calcom/features/bookings/Booker/components/__mocks__/AvailableTimeSlots"; -import "@calcom/features/bookings/Booker/components/__mocks__/DatePicker"; -import "@calcom/features/bookings/Booker/components/__mocks__/DryRunMessage"; -import "@calcom/features/bookings/Booker/components/__mocks__/EventMeta"; -import "@calcom/features/bookings/Booker/components/__mocks__/Header"; -import "@calcom/features/bookings/Booker/components/__mocks__/LargeCalendar"; -import "@calcom/features/bookings/Booker/components/__mocks__/Section"; +import "./__mocks__/OverlayCalendar"; +import "./__mocks__/AvailableTimeSlots"; +import "./__mocks__/DatePicker"; +import "./__mocks__/DryRunMessage"; +import "./__mocks__/EventMeta"; +import "./__mocks__/Header"; +import "./__mocks__/LargeCalendar"; +import "./__mocks__/Section"; import { constantsScenarios } from "@calcom/lib/__mocks__/constants"; import "@calcom/lib/__mocks__/logger"; @@ -16,8 +16,9 @@ import { vi } from "vitest"; import "@calcom/dayjs/__mocks__"; import "@calcom/features/auth/Turnstile"; -import { Booker } from "../Booker"; -import { render, screen } from "./test-utils"; +import { Booker } from "./Booker"; +import { render, screen } from "@calcom/features/bookings/Booker/__tests__/test-utils"; +import type { BookerProps, WrappedBookerProps } from "@calcom/features/bookings/Booker/types"; vi.mock("framer-motion", async (importOriginal) => { const actual = (await importOriginal()) as any; @@ -27,7 +28,7 @@ vi.mock("framer-motion", async (importOriginal) => { }); // Mock components that we don't want to test -vi.mock("../components/BookEventForm", () => ({ +vi.mock("./BookEventForm", () => ({ BookEventForm: ({ isTimeslotUnavailable, onCancel, @@ -45,7 +46,7 @@ vi.mock("../components/BookEventForm", () => ({ }, })); -vi.mock("../components/BookEventForm/BookFormAsModal", () => ({ +vi.mock("./BookEventForm/BookFormAsModal", () => ({ BookFormAsModal: () => { return
Mock Book Form As Modal
; }, @@ -62,7 +63,7 @@ const mockEvent = { isPending: false, }; -vi.mock("../../../calendars/NoAvailabilityDialog", () => ({ +vi.mock("@calcom/features/calendars/NoAvailabilityDialog", () => ({ default: () => { return null; }, @@ -174,7 +175,7 @@ describe("Booker", () => { }); it("should render null when in loading state", () => { - const { container } = render(, { + const { container } = render(, { mockStore: { state: "loading" }, }); expect(container).toBeEmptyDOMElement(); @@ -193,7 +194,7 @@ describe("Booker", () => { }, }; - render(, { + render(, { mockStore: { state: "selecting_time", selectedDate: "2024-01-01", @@ -217,7 +218,7 @@ describe("Booker", () => { }, }; - render(, { + render(, { mockStore: { state: "booking" }, }); screen.logTestingPlaygroundURL(); @@ -239,11 +240,11 @@ describe("Booker", () => { }, }; - render(, { + render(, { mockStore: { state: "booking" }, }); const bookEventForm = screen.getByTestId("book-event-form"); await expect(bookEventForm).toHaveAttribute("data-unavailable", "true"); }); }); -}); +}); \ No newline at end of file diff --git a/packages/features/bookings/Booker/Booker.tsx b/apps/web/modules/bookings/components/Booker.tsx similarity index 94% rename from packages/features/bookings/Booker/Booker.tsx rename to apps/web/modules/bookings/components/Booker.tsx index 77ca19b4500c4b..b0c21cc39062ca 100644 --- a/packages/features/bookings/Booker/Booker.tsx +++ b/apps/web/modules/bookings/components/Booker.tsx @@ -7,7 +7,7 @@ import { shallow } from "zustand/shallow"; import BookingPageTagManager from "@calcom/app-store/BookingPageTagManager"; import { useIsPlatformBookerEmbed } from "@calcom/atoms/hooks/useIsPlatformBookerEmbed"; import dayjs from "@calcom/dayjs"; -import PoweredBy from "@calcom/ee/components/PoweredBy"; +import PoweredBy from "@calcom/web/modules/ee/common/components/PoweredBy"; import { useEmbedUiConfig } from "@calcom/embed-core/embed-iframe"; import { updateEmbedBookerState } from "@calcom/embed-core/src/embed-iframe"; import TurnstileCaptcha from "@calcom/features/auth/Turnstile"; @@ -23,27 +23,27 @@ import { BookerLayouts } from "@calcom/prisma/zod-utils"; import classNames from "@calcom/ui/classNames"; import { UnpublishedEntity } from "@calcom/ui/components/unpublished-entity"; -import { VerifyCodeDialog } from "../components/VerifyCodeDialog"; -import { AvailableTimeSlots } from "./components/AvailableTimeSlots"; -import { BookEventForm } from "./components/BookEventForm"; -import { BookFormAsModal } from "./components/BookEventForm/BookFormAsModal"; -import { DatePicker } from "./components/DatePicker"; -import { DryRunMessage } from "./components/DryRunMessage"; -import { EventMeta } from "./components/EventMeta"; -import { HavingTroubleFindingTime } from "./components/HavingTroubleFindingTime"; -import { Header } from "./components/Header"; -import { InstantBooking } from "./components/InstantBooking"; -import { LargeCalendar } from "./components/LargeCalendar"; -import { OverlayCalendar } from "./components/OverlayCalendar/OverlayCalendar"; -import { RedirectToInstantMeetingModal } from "./components/RedirectToInstantMeetingModal"; -import { BookerSection } from "./components/Section"; -import { NotFound } from "./components/Unavailable"; -import { useIsQuickAvailabilityCheckFeatureEnabled } from "./components/hooks/useIsQuickAvailabilityCheckFeatureEnabled"; -import { fadeInLeft, getBookerSizeClassNames, useBookerResizeAnimation } from "./config"; -import framerFeatures from "./framer-features"; -import type { BookerProps, WrappedBookerProps } from "./types"; -import { isBookingDryRun } from "./utils/isBookingDryRun"; -import { isTimeSlotAvailable } from "./utils/isTimeslotAvailable"; +import { VerifyCodeDialog } from "./VerifyCodeDialog"; +import { AvailableTimeSlots } from "./AvailableTimeSlots"; +import { BookEventForm } from "./BookEventForm"; +import { BookFormAsModal } from "./BookEventForm/BookFormAsModal"; +import { DatePicker } from "./DatePicker"; +import { DryRunMessage } from "./DryRunMessage"; +import { EventMeta } from "./EventMeta"; +import { HavingTroubleFindingTime } from "./HavingTroubleFindingTime"; +import { Header } from "./Header"; +import { InstantBooking } from "./InstantBooking"; +import { LargeCalendar } from "./LargeCalendar"; +import { OverlayCalendar } from "./OverlayCalendar/OverlayCalendar"; +import { RedirectToInstantMeetingModal } from "./RedirectToInstantMeetingModal"; +import { BookerSection } from "./Section"; +import { NotFound } from "./Unavailable"; +import { useIsQuickAvailabilityCheckFeatureEnabled } from "@calcom/features/bookings/Booker/components/hooks/useIsQuickAvailabilityCheckFeatureEnabled"; +import { fadeInLeft, getBookerSizeClassNames, useBookerResizeAnimation } from "@calcom/features/bookings/Booker/config"; +import framerFeatures from "@calcom/features/bookings/Booker/framer-features"; +import type { BookerProps, WrappedBookerProps } from "@calcom/features/bookings/Booker/types"; +import { isBookingDryRun } from "@calcom/features/bookings/Booker/utils/isBookingDryRun"; +import { isTimeSlotAvailable } from "@calcom/features/bookings/Booker/utils/isTimeslotAvailable"; const BookerComponent = ({ username, diff --git a/apps/web/modules/bookings/components/BookingCalendarContainer.tsx b/apps/web/modules/bookings/components/BookingCalendarContainer.tsx index 37a0c273f5ca90..29fbe4d4bcbf70 100644 --- a/apps/web/modules/bookings/components/BookingCalendarContainer.tsx +++ b/apps/web/modules/bookings/components/BookingCalendarContainer.tsx @@ -4,7 +4,7 @@ import { useReactTable, getCoreRowModel, getSortedRowModel } from "@tanstack/rea import React, { useMemo, useEffect } from "react"; import dayjs from "@calcom/dayjs"; -import { DataTableFilters } from "@calcom/features/data-table"; +import { DataTableFilters } from "~/data-table/components/filters"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import useMeQuery from "@calcom/trpc/react/hooks/useMeQuery"; diff --git a/apps/web/modules/bookings/components/BookingList.tsx b/apps/web/modules/bookings/components/BookingList.tsx index 438263e20e0b37..b42ae2b1467f75 100644 --- a/apps/web/modules/bookings/components/BookingList.tsx +++ b/apps/web/modules/bookings/components/BookingList.tsx @@ -2,7 +2,7 @@ import type { Table as ReactTable } from "@tanstack/react-table"; -import { DataTableWrapper } from "@calcom/features/data-table"; +import { DataTableWrapper } from "~/data-table/components"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { EmptyScreen } from "@calcom/ui/components/empty-screen"; diff --git a/apps/web/modules/bookings/components/BookingListContainer.tsx b/apps/web/modules/bookings/components/BookingListContainer.tsx index 470272f81fbbe5..6793811152687d 100644 --- a/apps/web/modules/bookings/components/BookingListContainer.tsx +++ b/apps/web/modules/bookings/components/BookingListContainer.tsx @@ -7,10 +7,9 @@ import React, { useState, useMemo, useEffect, useCallback } from "react"; import dayjs from "@calcom/dayjs"; import { useDataTable, - DataTableFilters, - DataTableSegment, useDisplayedFilterCount, } from "@calcom/features/data-table"; +import { DataTableSegment, DataTableFilters } from "~/data-table/components"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import useMeQuery from "@calcom/trpc/react/hooks/useMeQuery"; diff --git a/packages/features/bookings/components/BookingSuccessCard.tsx b/apps/web/modules/bookings/components/BookingSuccessCard.tsx similarity index 100% rename from packages/features/bookings/components/BookingSuccessCard.tsx rename to apps/web/modules/bookings/components/BookingSuccessCard.tsx diff --git a/packages/features/bookings/Booker/components/DatePicker.test.tsx b/apps/web/modules/bookings/components/DatePicker.test.tsx similarity index 97% rename from packages/features/bookings/Booker/components/DatePicker.test.tsx rename to apps/web/modules/bookings/components/DatePicker.test.tsx index ffb49b26fb959a..43c81dfc48de8e 100644 --- a/packages/features/bookings/Booker/components/DatePicker.test.tsx +++ b/apps/web/modules/bookings/components/DatePicker.test.tsx @@ -4,7 +4,7 @@ import { vi, afterEach } from "vitest"; import dayjs from "@calcom/dayjs"; import { DatePicker as DatePickerComponent } from "@calcom/features/calendars/DatePicker"; -import { render } from "../__tests__/test-utils"; +import { render } from "@calcom/features/bookings/Booker/__tests__/test-utils"; import { DatePicker } from "./DatePicker"; vi.mock("@calcom/features/calendars/DatePicker", () => { diff --git a/packages/features/bookings/Booker/components/DatePicker.tsx b/apps/web/modules/bookings/components/DatePicker.tsx similarity index 98% rename from packages/features/bookings/Booker/components/DatePicker.tsx rename to apps/web/modules/bookings/components/DatePicker.tsx index e4025bc44a06fd..7c35dc14a4528b 100644 --- a/packages/features/bookings/Booker/components/DatePicker.tsx +++ b/apps/web/modules/bookings/components/DatePicker.tsx @@ -11,7 +11,7 @@ import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { User } from "@calcom/prisma/client"; import type { PeriodData } from "@calcom/types/Event"; -import type { Slots } from "../../types"; +import type { Slots } from "@calcom/features/bookings/types"; const useMoveToNextMonthOnNoAvailability = ({ browsingDate, diff --git a/packages/features/bookings/Booker/components/DecoyBookingSuccessCard.tsx b/apps/web/modules/bookings/components/DecoyBookingSuccessCard.tsx similarity index 100% rename from packages/features/bookings/Booker/components/DecoyBookingSuccessCard.tsx rename to apps/web/modules/bookings/components/DecoyBookingSuccessCard.tsx diff --git a/packages/features/bookings/Booker/components/DryRunMessage.tsx b/apps/web/modules/bookings/components/DryRunMessage.tsx similarity index 100% rename from packages/features/bookings/Booker/components/DryRunMessage.tsx rename to apps/web/modules/bookings/components/DryRunMessage.tsx diff --git a/packages/features/bookings/Booker/components/EventMeta.tsx b/apps/web/modules/bookings/components/EventMeta.tsx similarity index 95% rename from packages/features/bookings/Booker/components/EventMeta.tsx rename to apps/web/modules/bookings/components/EventMeta.tsx index b3d7445b7418f1..9811fe5e3eb262 100644 --- a/packages/features/bookings/Booker/components/EventMeta.tsx +++ b/apps/web/modules/bookings/components/EventMeta.tsx @@ -4,11 +4,11 @@ import { useEffect, useMemo } from "react"; import { shallow } from "zustand/shallow"; import { Timezone as PlatformTimezoneSelect } from "@calcom/atoms/timezone"; -import { EventDetails, EventMembers, EventMetaSkeleton, EventTitle } from "@calcom/features/bookings"; +import { EventDetails, EventMembers, EventMetaSkeleton, EventTitle } from "./event-meta"; import { useBookerStoreContext } from "@calcom/features/bookings/Booker/BookerStoreProvider"; import type { Timezone } from "@calcom/features/bookings/Booker/types"; -import { SeatsAvailabilityText } from "@calcom/features/bookings/components/SeatsAvailabilityText"; -import { EventMetaBlock } from "@calcom/features/bookings/components/event-meta/Details"; +import { SeatsAvailabilityText } from "@calcom/web/modules/bookings/components/SeatsAvailabilityText"; +import { EventMetaBlock } from "@calcom/web/modules/bookings/components/event-meta/Details"; import { useTimePreferences } from "@calcom/features/bookings/lib"; import type { BookerEvent } from "@calcom/features/bookings/types"; import { useLocale } from "@calcom/lib/hooks/useLocale"; @@ -18,10 +18,10 @@ import type { EventTypeTranslation } from "@calcom/prisma/client"; import { EventTypeAutoTranslatedField } from "@calcom/prisma/enums"; import i18nConfigration from "../../../../../i18n.json"; -import { fadeInUp } from "../config"; -import { FromToTime } from "../utils/dates"; +import { fadeInUp } from "@calcom/features/bookings/Booker/config"; +import { FromToTime } from "@calcom/features/bookings/Booker/utils/dates"; import { ScrollableWithGradients } from "./ScrollableWithGradients"; -import { useBookerTime } from "./hooks/useBookerTime"; +import { useBookerTime } from "@calcom/features/bookings/Booker/components/hooks/useBookerTime"; const WebTimezoneSelect = dynamic( () => import("@calcom/features/components/timezone-select").then((mod) => mod.TimezoneSelect), diff --git a/packages/features/bookings/Booker/components/HavingTroubleFindingTime.tsx b/apps/web/modules/bookings/components/HavingTroubleFindingTime.tsx similarity index 100% rename from packages/features/bookings/Booker/components/HavingTroubleFindingTime.tsx rename to apps/web/modules/bookings/components/HavingTroubleFindingTime.tsx diff --git a/packages/features/bookings/Booker/components/Header.tsx b/apps/web/modules/bookings/components/Header.tsx similarity index 98% rename from packages/features/bookings/Booker/components/Header.tsx rename to apps/web/modules/bookings/components/Header.tsx index 0c121dadd19bb1..2de49bbe99d77d 100644 --- a/packages/features/bookings/Booker/components/Header.tsx +++ b/apps/web/modules/bookings/components/Header.tsx @@ -15,8 +15,8 @@ import { ToggleGroup } from "@calcom/ui/components/form"; import { Icon } from "@calcom/ui/components/icon"; import { Tooltip } from "@calcom/ui/components/tooltip"; -import { TimeFormatToggle } from "../../components/TimeFormatToggle"; -import type { BookerLayout } from "../types"; +import { TimeFormatToggle } from "@calcom/web/modules/bookings/components/TimeFormatToggle"; +import type { BookerLayout } from "@calcom/features/bookings/Booker/types"; export function Header({ extraDays, diff --git a/packages/features/bookings/Booker/components/InstantBooking.tsx b/apps/web/modules/bookings/components/InstantBooking.tsx similarity index 100% rename from packages/features/bookings/Booker/components/InstantBooking.tsx rename to apps/web/modules/bookings/components/InstantBooking.tsx diff --git a/packages/features/bookings/Booker/components/LargeCalendar.tsx b/apps/web/modules/bookings/components/LargeCalendar.tsx similarity index 90% rename from packages/features/bookings/Booker/components/LargeCalendar.tsx rename to apps/web/modules/bookings/components/LargeCalendar.tsx index 893f9c6572d54c..9f22ba57176b0c 100644 --- a/packages/features/bookings/Booker/components/LargeCalendar.tsx +++ b/apps/web/modules/bookings/components/LargeCalendar.tsx @@ -9,9 +9,9 @@ import { Calendar } from "@calcom/features/calendars/weeklyview"; import type { CalendarEvent } from "@calcom/features/calendars/weeklyview/types/events"; import { localStorage } from "@calcom/lib/webstorage"; -import type { useScheduleForEventReturnType } from "../utils/event"; -import { getQueryParam } from "../utils/query-param"; -import { useOverlayCalendarStore } from "./OverlayCalendar/store"; +import type { useScheduleForEventReturnType } from "@calcom/features/bookings/Booker/utils/event"; +import { getQueryParam } from "@calcom/features/bookings/Booker/utils/query-param"; +import { useOverlayCalendarStore } from "@calcom/features/bookings/Booker/components/OverlayCalendar/store"; export const LargeCalendar = ({ extraDays, diff --git a/packages/features/bookings/Booker/components/OutOfOfficeInSlots.tsx b/apps/web/modules/bookings/components/OutOfOfficeInSlots.tsx similarity index 100% rename from packages/features/bookings/Booker/components/OutOfOfficeInSlots.tsx rename to apps/web/modules/bookings/components/OutOfOfficeInSlots.tsx diff --git a/packages/features/bookings/Booker/components/OverlayCalendar/OverlayCalendar.tsx b/apps/web/modules/bookings/components/OverlayCalendar/OverlayCalendar.tsx similarity index 92% rename from packages/features/bookings/Booker/components/OverlayCalendar/OverlayCalendar.tsx rename to apps/web/modules/bookings/components/OverlayCalendar/OverlayCalendar.tsx index 0236732e0d646e..cf5aae3bd33f57 100644 --- a/packages/features/bookings/Booker/components/OverlayCalendar/OverlayCalendar.tsx +++ b/apps/web/modules/bookings/components/OverlayCalendar/OverlayCalendar.tsx @@ -2,8 +2,8 @@ import { useEffect } from "react"; import { useIsPlatform } from "@calcom/atoms/hooks/useIsPlatform"; -import type { UseCalendarsReturnType } from "../hooks/useCalendars"; -import { useOverlayCalendar } from "../hooks/useOverlayCalendar"; +import type { UseCalendarsReturnType } from "@calcom/features/bookings/Booker/components/hooks/useCalendars"; +import { useOverlayCalendar } from "@calcom/features/bookings/Booker/components/hooks/useOverlayCalendar"; import { OverlayCalendarContinueModal } from "./OverlayCalendarContinueModal"; import { OverlayCalendarSettingsModal } from "./OverlayCalendarSettingsModal"; import { OverlayCalendarSwitch } from "./OverlayCalendarSwitch"; diff --git a/packages/features/bookings/Booker/components/OverlayCalendar/OverlayCalendarContinueModal.tsx b/apps/web/modules/bookings/components/OverlayCalendar/OverlayCalendarContinueModal.tsx similarity index 100% rename from packages/features/bookings/Booker/components/OverlayCalendar/OverlayCalendarContinueModal.tsx rename to apps/web/modules/bookings/components/OverlayCalendar/OverlayCalendarContinueModal.tsx diff --git a/packages/features/bookings/Booker/components/OverlayCalendar/OverlayCalendarSettingsModal.tsx b/apps/web/modules/bookings/components/OverlayCalendar/OverlayCalendarSettingsModal.tsx similarity index 98% rename from packages/features/bookings/Booker/components/OverlayCalendar/OverlayCalendarSettingsModal.tsx rename to apps/web/modules/bookings/components/OverlayCalendar/OverlayCalendarSettingsModal.tsx index d88f4be868edab..2bdb6d91340757 100644 --- a/packages/features/bookings/Booker/components/OverlayCalendar/OverlayCalendarSettingsModal.tsx +++ b/apps/web/modules/bookings/components/OverlayCalendar/OverlayCalendarSettingsModal.tsx @@ -13,7 +13,7 @@ import { ListItem, ListItemText, ListItemTitle } from "@calcom/ui/components/lis import { SkeletonContainer } from "@calcom/ui/components/skeleton"; import { SkeletonText } from "@calcom/ui/components/skeleton"; -import type { UseCalendarsReturnType } from "../hooks/useCalendars"; +import type { UseCalendarsReturnType } from "@calcom/features/bookings/Booker/components/hooks/useCalendars"; interface IOverlayCalendarSettingsModalProps { open?: boolean; diff --git a/packages/features/bookings/Booker/components/OverlayCalendar/OverlayCalendarSwitch.tsx b/apps/web/modules/bookings/components/OverlayCalendar/OverlayCalendarSwitch.tsx similarity index 95% rename from packages/features/bookings/Booker/components/OverlayCalendar/OverlayCalendarSwitch.tsx rename to apps/web/modules/bookings/components/OverlayCalendar/OverlayCalendarSwitch.tsx index e6c449b08c3ca3..93600829b3371f 100644 --- a/packages/features/bookings/Booker/components/OverlayCalendar/OverlayCalendarSwitch.tsx +++ b/apps/web/modules/bookings/components/OverlayCalendar/OverlayCalendarSwitch.tsx @@ -6,7 +6,7 @@ import classNames from "@calcom/ui/classNames"; import { Button } from "@calcom/ui/components/button"; import { Switch } from "@calcom/ui/components/form"; -import { useOverlayCalendarStore } from "./store"; +import { useOverlayCalendarStore } from "@calcom/features/bookings/Booker/components/OverlayCalendar/store"; interface OverlayCalendarSwitchProps { enabled?: boolean; diff --git a/packages/features/bookings/Booker/components/RedirectToInstantMeetingModal.tsx b/apps/web/modules/bookings/components/RedirectToInstantMeetingModal.tsx similarity index 100% rename from packages/features/bookings/Booker/components/RedirectToInstantMeetingModal.tsx rename to apps/web/modules/bookings/components/RedirectToInstantMeetingModal.tsx diff --git a/packages/features/bookings/Booker/components/ScrollableWithGradients.tsx b/apps/web/modules/bookings/components/ScrollableWithGradients.tsx similarity index 100% rename from packages/features/bookings/Booker/components/ScrollableWithGradients.tsx rename to apps/web/modules/bookings/components/ScrollableWithGradients.tsx diff --git a/packages/features/bookings/components/SeatsAvailabilityText.tsx b/apps/web/modules/bookings/components/SeatsAvailabilityText.tsx similarity index 100% rename from packages/features/bookings/components/SeatsAvailabilityText.tsx rename to apps/web/modules/bookings/components/SeatsAvailabilityText.tsx diff --git a/packages/features/bookings/Booker/components/Section.tsx b/apps/web/modules/bookings/components/Section.tsx similarity index 95% rename from packages/features/bookings/Booker/components/Section.tsx rename to apps/web/modules/bookings/components/Section.tsx index d3593d1ce2f30d..6b34ea6b47c71a 100644 --- a/packages/features/bookings/Booker/components/Section.tsx +++ b/apps/web/modules/bookings/components/Section.tsx @@ -5,7 +5,7 @@ import { forwardRef } from "react"; import { useBookerStoreContext } from "@calcom/features/bookings/Booker/BookerStoreProvider"; import classNames from "@calcom/ui/classNames"; -import type { BookerAreas, BookerLayout } from "../types"; +import type { BookerAreas, BookerLayout } from "@calcom/features/bookings/Booker/types"; /** * Define what grid area a section should be in. diff --git a/packages/features/bookings/components/TimeFormatToggle.tsx b/apps/web/modules/bookings/components/TimeFormatToggle.tsx similarity index 92% rename from packages/features/bookings/components/TimeFormatToggle.tsx rename to apps/web/modules/bookings/components/TimeFormatToggle.tsx index 44e0e883e8b62f..04c00113d096be 100644 --- a/packages/features/bookings/components/TimeFormatToggle.tsx +++ b/apps/web/modules/bookings/components/TimeFormatToggle.tsx @@ -2,7 +2,7 @@ import { useLocale } from "@calcom/lib/hooks/useLocale"; import { TimeFormat } from "@calcom/lib/timeFormat"; import { ToggleGroup } from "@calcom/ui/components/form"; -import { useTimePreferences } from "../lib"; +import { useTimePreferences } from "@calcom/features/bookings/lib"; export const TimeFormatToggle = ({ customClassName }: { customClassName?: string }) => { const timeFormat = useTimePreferences((state) => state.timeFormat); diff --git a/packages/features/bookings/Booker/components/Unavailable.tsx b/apps/web/modules/bookings/components/Unavailable.tsx similarity index 100% rename from packages/features/bookings/Booker/components/Unavailable.tsx rename to apps/web/modules/bookings/components/Unavailable.tsx diff --git a/packages/features/bookings/components/VerifyCodeDialog.tsx b/apps/web/modules/bookings/components/VerifyCodeDialog.tsx similarity index 100% rename from packages/features/bookings/components/VerifyCodeDialog.tsx rename to apps/web/modules/bookings/components/VerifyCodeDialog.tsx diff --git a/packages/features/bookings/Booker/components/__mocks__/AvailableTimeSlots.tsx b/apps/web/modules/bookings/components/__mocks__/AvailableTimeSlots.tsx similarity index 86% rename from packages/features/bookings/Booker/components/__mocks__/AvailableTimeSlots.tsx rename to apps/web/modules/bookings/components/__mocks__/AvailableTimeSlots.tsx index 28449479a04e81..d91677e66fc8ab 100644 --- a/packages/features/bookings/Booker/components/__mocks__/AvailableTimeSlots.tsx +++ b/apps/web/modules/bookings/components/__mocks__/AvailableTimeSlots.tsx @@ -1,3 +1,4 @@ +import { vi } from "vitest"; vi.mock("../AvailableTimeSlots", () => ({ AvailableTimeSlots: ({ children }: { children: React.ReactNode }) => (
{children}
diff --git a/packages/features/bookings/Booker/components/__mocks__/DatePicker.tsx b/apps/web/modules/bookings/components/__mocks__/DatePicker.tsx similarity index 55% rename from packages/features/bookings/Booker/components/__mocks__/DatePicker.tsx rename to apps/web/modules/bookings/components/__mocks__/DatePicker.tsx index be3b15129ac725..d4968fe0df8c5b 100644 --- a/packages/features/bookings/Booker/components/__mocks__/DatePicker.tsx +++ b/apps/web/modules/bookings/components/__mocks__/DatePicker.tsx @@ -1,3 +1,4 @@ -vi.mock("../components/DatePicker", () => ({ +import { vi } from "vitest"; +vi.mock("../DatePicker", () => ({ DatePicker: () =>
Mock Date Picker
, })); diff --git a/packages/features/bookings/Booker/components/__mocks__/DryRunMessage.tsx b/apps/web/modules/bookings/components/__mocks__/DryRunMessage.tsx similarity index 83% rename from packages/features/bookings/Booker/components/__mocks__/DryRunMessage.tsx rename to apps/web/modules/bookings/components/__mocks__/DryRunMessage.tsx index b5d58bb43f7805..cfd3a010b53d99 100644 --- a/packages/features/bookings/Booker/components/__mocks__/DryRunMessage.tsx +++ b/apps/web/modules/bookings/components/__mocks__/DryRunMessage.tsx @@ -1,5 +1,6 @@ +import { vi } from "vitest"; vi.mock("../DryRunMessage", () => ({ DryRunMessage: ({ isEmbed }: { isEmbed: boolean }) => (
Mock Dry Run Message
), -})); +})); \ No newline at end of file diff --git a/packages/features/bookings/Booker/components/__mocks__/EventMeta.tsx b/apps/web/modules/bookings/components/__mocks__/EventMeta.tsx similarity index 100% rename from packages/features/bookings/Booker/components/__mocks__/EventMeta.tsx rename to apps/web/modules/bookings/components/__mocks__/EventMeta.tsx diff --git a/packages/features/bookings/Booker/components/__mocks__/Header.tsx b/apps/web/modules/bookings/components/__mocks__/Header.tsx similarity index 84% rename from packages/features/bookings/Booker/components/__mocks__/Header.tsx rename to apps/web/modules/bookings/components/__mocks__/Header.tsx index ae6e7334cf6231..6bea2f305522ea 100644 --- a/packages/features/bookings/Booker/components/__mocks__/Header.tsx +++ b/apps/web/modules/bookings/components/__mocks__/Header.tsx @@ -1,3 +1,4 @@ +import { vi } from "vitest"; // Mock layout components vi.mock("../Header", () => ({ Header: ({ children }: { children: React.ReactNode }) =>
{children}
, diff --git a/packages/features/bookings/Booker/components/__mocks__/LargeCalendar.tsx b/apps/web/modules/bookings/components/__mocks__/LargeCalendar.tsx similarity index 100% rename from packages/features/bookings/Booker/components/__mocks__/LargeCalendar.tsx rename to apps/web/modules/bookings/components/__mocks__/LargeCalendar.tsx diff --git a/packages/features/bookings/Booker/components/OverlayCalendar/__mocks__/OverlayCalendar.tsx b/apps/web/modules/bookings/components/__mocks__/OverlayCalendar.tsx similarity index 89% rename from packages/features/bookings/Booker/components/OverlayCalendar/__mocks__/OverlayCalendar.tsx rename to apps/web/modules/bookings/components/__mocks__/OverlayCalendar.tsx index 6aa405031c1a9b..9ba24f59b1bc9b 100644 --- a/packages/features/bookings/Booker/components/OverlayCalendar/__mocks__/OverlayCalendar.tsx +++ b/apps/web/modules/bookings/components/__mocks__/OverlayCalendar.tsx @@ -14,7 +14,7 @@ const mockOverlayCalendar = vi.fn(() => { }; }); -vi.mock("../OverlayCalendar", () => ({ +vi.mock("../OverlayCalendar/OverlayCalendar", () => ({ OverlayCalendar: mockOverlayCalendar, })); diff --git a/apps/web/modules/bookings/components/__mocks__/Section.tsx b/apps/web/modules/bookings/components/__mocks__/Section.tsx new file mode 100644 index 00000000000000..69decce772610c --- /dev/null +++ b/apps/web/modules/bookings/components/__mocks__/Section.tsx @@ -0,0 +1,28 @@ +import type React from "react"; +import { vi } from "vitest"; + +vi.mock("../Section", () => { + const BookerSection = ({ + children, + className = "", + area, + }: { + children: React.ReactNode; + className?: string; + area?: string | { default: string; month_view: string }; + }): React.ReactElement => { + let areaValue: string | undefined; + if (typeof area === "string") { + areaValue = area; + } else { + areaValue = area?.default; + } + return ( + // biome-ignore lint/suspicious/noReactSpecificProps: This is a React component that requires className +
+ {children} +
+ ); + }; + return { BookerSection }; +}); diff --git a/packages/features/bookings/components/event-meta/AvailableEventLocations.tsx b/apps/web/modules/bookings/components/event-meta/AvailableEventLocations.tsx similarity index 100% rename from packages/features/bookings/components/event-meta/AvailableEventLocations.tsx rename to apps/web/modules/bookings/components/event-meta/AvailableEventLocations.tsx diff --git a/packages/features/bookings/components/event-meta/Details.tsx b/apps/web/modules/bookings/components/event-meta/Details.tsx similarity index 97% rename from packages/features/bookings/components/event-meta/Details.tsx rename to apps/web/modules/bookings/components/event-meta/Details.tsx index 7f8fd6c2ab307b..693d2962562c06 100644 --- a/packages/features/bookings/components/event-meta/Details.tsx +++ b/apps/web/modules/bookings/components/event-meta/Details.tsx @@ -2,14 +2,14 @@ import React, { Fragment } from "react"; import { getPaymentAppData } from "@calcom/app-store/_utils/payments/getPaymentAppData"; import { useBookerStore } from "@calcom/features/bookings/Booker/store"; -import { PriceIcon } from "@calcom/features/bookings/components/event-meta/PriceIcon"; +import { PriceIcon } from "@calcom/web/modules/bookings/components/event-meta/PriceIcon"; import type { BookerEvent } from "@calcom/features/bookings/types"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import classNames from "@calcom/ui/classNames"; import { Icon } from "@calcom/ui/components/icon"; import { type IconName } from "@calcom/ui/components/icon"; -import { EventDetailBlocks } from "../../types"; +import { EventDetailBlocks } from "@calcom/features/bookings/types"; import { AvailableEventLocations } from "./AvailableEventLocations"; import { EventDuration } from "./Duration"; import { EventOccurences } from "./Occurences"; diff --git a/packages/features/bookings/components/event-meta/Duration.tsx b/apps/web/modules/bookings/components/event-meta/Duration.tsx similarity index 98% rename from packages/features/bookings/components/event-meta/Duration.tsx rename to apps/web/modules/bookings/components/event-meta/Duration.tsx index cbdd5136d20c54..024e1b764d643e 100644 --- a/packages/features/bookings/components/event-meta/Duration.tsx +++ b/apps/web/modules/bookings/components/event-meta/Duration.tsx @@ -3,7 +3,7 @@ import { useEffect, useRef } from "react"; import { useIsPlatform } from "@calcom/atoms/hooks/useIsPlatform"; import { useIsEmbed } from "@calcom/embed-core/embed-iframe"; -import { useShouldShowArrows } from "@calcom/features/apps/components/AllApps"; +import { useShouldShowArrows } from "@calcom/web/modules/apps/components/AllApps"; import { useBookerStoreContext } from "@calcom/features/bookings/Booker/BookerStoreProvider"; import type { BookerEvent } from "@calcom/features/bookings/types"; import { useLocale } from "@calcom/lib/hooks/useLocale"; diff --git a/packages/features/bookings/components/event-meta/Locations.tsx b/apps/web/modules/bookings/components/event-meta/Locations.tsx similarity index 100% rename from packages/features/bookings/components/event-meta/Locations.tsx rename to apps/web/modules/bookings/components/event-meta/Locations.tsx diff --git a/packages/features/bookings/components/event-meta/Members.tsx b/apps/web/modules/bookings/components/event-meta/Members.tsx similarity index 100% rename from packages/features/bookings/components/event-meta/Members.tsx rename to apps/web/modules/bookings/components/event-meta/Members.tsx diff --git a/packages/features/bookings/components/event-meta/Occurences.tsx b/apps/web/modules/bookings/components/event-meta/Occurences.tsx similarity index 98% rename from packages/features/bookings/components/event-meta/Occurences.tsx rename to apps/web/modules/bookings/components/event-meta/Occurences.tsx index 81d78161de21de..fb0706cfee1bd2 100644 --- a/packages/features/bookings/components/event-meta/Occurences.tsx +++ b/apps/web/modules/bookings/components/event-meta/Occurences.tsx @@ -11,7 +11,7 @@ import { Badge } from "@calcom/ui/components/badge"; import { Input } from "@calcom/ui/components/form"; import { Tooltip } from "@calcom/ui/components/tooltip"; -import { useBookerTime } from "../../Booker/components/hooks/useBookerTime"; +import { useBookerTime } from "@calcom/features/bookings/Booker/components/hooks/useBookerTime"; export const EventOccurences = ({ event }: { event: Pick }) => { const maxOccurences = event.recurringEvent?.count || null; diff --git a/packages/features/bookings/components/event-meta/PayIcon.tsx b/apps/web/modules/bookings/components/event-meta/PayIcon.tsx similarity index 100% rename from packages/features/bookings/components/event-meta/PayIcon.tsx rename to apps/web/modules/bookings/components/event-meta/PayIcon.tsx diff --git a/packages/features/bookings/components/event-meta/Price.tsx b/apps/web/modules/bookings/components/event-meta/Price.tsx similarity index 90% rename from packages/features/bookings/components/event-meta/Price.tsx rename to apps/web/modules/bookings/components/event-meta/Price.tsx index 8fdc2b9d98534b..7020c9408ffbba 100644 --- a/packages/features/bookings/components/event-meta/Price.tsx +++ b/apps/web/modules/bookings/components/event-meta/Price.tsx @@ -2,7 +2,7 @@ import dynamic from "next/dynamic"; import { formatPrice } from "@calcom/lib/currencyConversions"; -import type { EventPrice } from "../../types"; +import type { EventPrice } from "@calcom/features/bookings/types"; const AlbyPriceComponent = dynamic( () => import("@calcom/app-store/alby/components/AlbyPriceComponent").then((m) => m.AlbyPriceComponent), diff --git a/packages/features/bookings/components/event-meta/PriceIcon.tsx b/apps/web/modules/bookings/components/event-meta/PriceIcon.tsx similarity index 100% rename from packages/features/bookings/components/event-meta/PriceIcon.tsx rename to apps/web/modules/bookings/components/event-meta/PriceIcon.tsx diff --git a/packages/features/bookings/components/event-meta/Skeleton.tsx b/apps/web/modules/bookings/components/event-meta/Skeleton.tsx similarity index 100% rename from packages/features/bookings/components/event-meta/Skeleton.tsx rename to apps/web/modules/bookings/components/event-meta/Skeleton.tsx diff --git a/packages/features/bookings/components/event-meta/Title.tsx b/apps/web/modules/bookings/components/event-meta/Title.tsx similarity index 100% rename from packages/features/bookings/components/event-meta/Title.tsx rename to apps/web/modules/bookings/components/event-meta/Title.tsx diff --git a/packages/features/bookings/components/event-meta/index.ts b/apps/web/modules/bookings/components/event-meta/index.ts similarity index 100% rename from packages/features/bookings/components/event-meta/index.ts rename to apps/web/modules/bookings/components/event-meta/index.ts diff --git a/apps/web/modules/bookings/views/bookings-single-view.tsx b/apps/web/modules/bookings/views/bookings-single-view.tsx index 19ea066159810d..c7d50efd98ab03 100644 --- a/apps/web/modules/bookings/views/bookings-single-view.tsx +++ b/apps/web/modules/bookings/views/bookings-single-view.tsx @@ -21,7 +21,7 @@ import { useIsBackgroundTransparent, useIsEmbed, } from "@calcom/embed-core/embed-iframe"; -import { Price } from "@calcom/features/bookings/components/event-meta/Price"; +import { Price } from "@calcom/web/modules/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"; diff --git a/packages/features/calendars/weeklyview/components/Calendar.tsx b/apps/web/modules/calendars/weeklyview/components/Calendar.tsx similarity index 96% rename from packages/features/calendars/weeklyview/components/Calendar.tsx rename to apps/web/modules/calendars/weeklyview/components/Calendar.tsx index a957681ebf68bd..8133909b185051 100644 --- a/packages/features/calendars/weeklyview/components/Calendar.tsx +++ b/apps/web/modules/calendars/weeklyview/components/Calendar.tsx @@ -2,10 +2,10 @@ import React, { useEffect, useMemo, useRef } from "react"; import classNames from "@calcom/ui/classNames"; -import { CalendarStoreContext, createCalendarStore, useCalendarStore } from "../state/store"; -import "../styles/styles.css"; -import type { CalendarComponentProps } from "../types/state"; -import { getDaysBetweenDates, getHoursToDisplay } from "../utils"; +import { CalendarStoreContext, createCalendarStore, useCalendarStore } from "@calcom/features/calendars/weeklyview/state/store"; +import "@calcom/features/calendars/weeklyview/styles/styles.css"; +import type { CalendarComponentProps } from "@calcom/features/calendars/weeklyview/types/state"; +import { getDaysBetweenDates, getHoursToDisplay } from "@calcom/features/calendars/weeklyview/utils"; import { DateValues } from "./DateValues"; import { CurrentTime } from "./currentTime"; import { AvailableCellsForDay, EmptyCell } from "./event/Empty"; diff --git a/packages/features/calendars/weeklyview/components/DateValues/index.tsx b/apps/web/modules/calendars/weeklyview/components/DateValues/index.tsx similarity index 95% rename from packages/features/calendars/weeklyview/components/DateValues/index.tsx rename to apps/web/modules/calendars/weeklyview/components/DateValues/index.tsx index 2000fa186de410..804cb6d9d9711d 100644 --- a/packages/features/calendars/weeklyview/components/DateValues/index.tsx +++ b/apps/web/modules/calendars/weeklyview/components/DateValues/index.tsx @@ -4,8 +4,8 @@ import dayjs from "@calcom/dayjs"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import classNames from "@calcom/ui/classNames"; -import { useCalendarStore } from "../../state/store"; -import type { BorderColor } from "../../types/common"; +import { useCalendarStore } from "@calcom/features/calendars/weeklyview/state/store"; +import type { BorderColor } from "@calcom/features/calendars/weeklyview/types/common"; type Props = { showBorder: boolean; diff --git a/packages/features/calendars/weeklyview/components/blocking/BlockedList.tsx b/apps/web/modules/calendars/weeklyview/components/blocking/BlockedList.tsx similarity index 97% rename from packages/features/calendars/weeklyview/components/blocking/BlockedList.tsx rename to apps/web/modules/calendars/weeklyview/components/blocking/BlockedList.tsx index 567eb5b0cadcb9..ec0f5ac1eaf1c7 100644 --- a/packages/features/calendars/weeklyview/components/blocking/BlockedList.tsx +++ b/apps/web/modules/calendars/weeklyview/components/blocking/BlockedList.tsx @@ -3,7 +3,7 @@ import { shallow } from "zustand/shallow"; import dayjs from "@calcom/dayjs"; -import { useCalendarStore } from "../../state/store"; +import { useCalendarStore } from "@calcom/features/calendars/weeklyview/state/store"; import { BlockedTimeCell } from "./BlockedTimeCell"; type Props = { diff --git a/packages/features/calendars/weeklyview/components/blocking/BlockedTimeCell.tsx b/apps/web/modules/calendars/weeklyview/components/blocking/BlockedTimeCell.tsx similarity index 100% rename from packages/features/calendars/weeklyview/components/blocking/BlockedTimeCell.tsx rename to apps/web/modules/calendars/weeklyview/components/blocking/BlockedTimeCell.tsx diff --git a/packages/features/calendars/weeklyview/components/currentTime/index.tsx b/apps/web/modules/calendars/weeklyview/components/currentTime/index.tsx similarity index 96% rename from packages/features/calendars/weeklyview/components/currentTime/index.tsx rename to apps/web/modules/calendars/weeklyview/components/currentTime/index.tsx index 533a907b9c6753..312445f7bb92c9 100644 --- a/packages/features/calendars/weeklyview/components/currentTime/index.tsx +++ b/apps/web/modules/calendars/weeklyview/components/currentTime/index.tsx @@ -3,7 +3,7 @@ import { useEffect, useState, useRef } from "react"; import dayjs from "@calcom/dayjs"; import { useTimePreferences } from "@calcom/features/bookings/lib"; -import { useCalendarStore } from "../../state/store"; +import { useCalendarStore } from "@calcom/features/calendars/weeklyview/state/store"; function calculateMinutesFromStart(startHour: number, currentHour: number, currentMinute: number) { const startMinute = startHour * 60; diff --git a/packages/features/calendars/weeklyview/components/event/Empty.tsx b/apps/web/modules/calendars/weeklyview/components/event/Empty.tsx similarity index 93% rename from packages/features/calendars/weeklyview/components/event/Empty.tsx rename to apps/web/modules/calendars/weeklyview/components/event/Empty.tsx index 66f753c3860dd8..789bfba17eec08 100644 --- a/packages/features/calendars/weeklyview/components/event/Empty.tsx +++ b/apps/web/modules/calendars/weeklyview/components/event/Empty.tsx @@ -6,11 +6,11 @@ import dayjs from "@calcom/dayjs"; import { useTimePreferences } from "@calcom/features/bookings/lib"; import classNames from "@calcom/ui/classNames"; -import { OutOfOfficeInSlots } from "../../../../bookings/Booker/components/OutOfOfficeInSlots"; -import { useCalendarStore } from "../../state/store"; -import type { CalendarAvailableTimeslots } from "../../types/state"; -import type { GridCellToDateProps } from "../../utils"; -import { gridCellToDateTime } from "../../utils"; +import { OutOfOfficeInSlots } from "@calcom/web/modules/bookings/components/OutOfOfficeInSlots"; +import { useCalendarStore } from "@calcom/features/calendars/weeklyview/state/store"; +import type { CalendarAvailableTimeslots } from "@calcom/features/calendars/weeklyview/types/state"; +import type { GridCellToDateProps } from "@calcom/features/calendars/weeklyview/utils"; +import { gridCellToDateTime } from "@calcom/features/calendars/weeklyview/utils"; type EmptyCellProps = GridCellToDateProps & { isDisabled?: boolean; diff --git a/packages/features/calendars/weeklyview/components/event/Event.tsx b/apps/web/modules/calendars/weeklyview/components/event/Event.tsx similarity index 98% rename from packages/features/calendars/weeklyview/components/event/Event.tsx rename to apps/web/modules/calendars/weeklyview/components/event/Event.tsx index c188c5b2184f90..1e5ad7c8aca449 100644 --- a/packages/features/calendars/weeklyview/components/event/Event.tsx +++ b/apps/web/modules/calendars/weeklyview/components/event/Event.tsx @@ -5,7 +5,7 @@ import type { BookingStatus } from "@calcom/prisma/enums"; import classNames from "@calcom/ui/classNames"; import { Tooltip } from "@calcom/ui/components/tooltip"; -import type { CalendarEvent } from "../../types/events"; +import type { CalendarEvent } from "@calcom/features/calendars/weeklyview/types/events"; type EventProps = { event: CalendarEvent; diff --git a/packages/features/calendars/weeklyview/components/event/EventList.tsx b/apps/web/modules/calendars/weeklyview/components/event/EventList.tsx similarity index 95% rename from packages/features/calendars/weeklyview/components/event/EventList.tsx rename to apps/web/modules/calendars/weeklyview/components/event/EventList.tsx index c46caab20afb18..bdbc0909e298d4 100644 --- a/packages/features/calendars/weeklyview/components/event/EventList.tsx +++ b/apps/web/modules/calendars/weeklyview/components/event/EventList.tsx @@ -4,8 +4,8 @@ import { shallow } from "zustand/shallow"; import dayjs from "@calcom/dayjs"; import classNames from "@calcom/ui/classNames"; -import { useCalendarStore } from "../../state/store"; -import { calculateEventLayouts, createLayoutMap } from "../../utils/overlap"; +import { useCalendarStore } from "@calcom/features/calendars/weeklyview/state/store"; +import { calculateEventLayouts, createLayoutMap } from "@calcom/features/calendars/weeklyview/utils/overlap"; import { Event } from "./Event"; type Props = { diff --git a/packages/features/calendars/weeklyview/components/event/index.tsx b/apps/web/modules/calendars/weeklyview/components/event/index.tsx similarity index 100% rename from packages/features/calendars/weeklyview/components/event/index.tsx rename to apps/web/modules/calendars/weeklyview/components/event/index.tsx diff --git a/packages/features/calendars/weeklyview/components/grid/index.tsx b/apps/web/modules/calendars/weeklyview/components/grid/index.tsx similarity index 100% rename from packages/features/calendars/weeklyview/components/grid/index.tsx rename to apps/web/modules/calendars/weeklyview/components/grid/index.tsx diff --git a/packages/features/calendars/weeklyview/components/heading/SchedulerHeading.tsx b/apps/web/modules/calendars/weeklyview/components/heading/SchedulerHeading.tsx similarity index 95% rename from packages/features/calendars/weeklyview/components/heading/SchedulerHeading.tsx rename to apps/web/modules/calendars/weeklyview/components/heading/SchedulerHeading.tsx index 6c78992c3f3943..8cba239bf76f49 100644 --- a/packages/features/calendars/weeklyview/components/heading/SchedulerHeading.tsx +++ b/apps/web/modules/calendars/weeklyview/components/heading/SchedulerHeading.tsx @@ -2,7 +2,7 @@ import dayjs from "@calcom/dayjs"; import { Button } from "@calcom/ui/components/button"; import { ButtonGroup } from "@calcom/ui/components/buttonGroup"; -import { useCalendarStore } from "../../state/store"; +import { useCalendarStore } from "@calcom/features/calendars/weeklyview/state/store"; export function SchedulerHeading() { const { startDate, endDate, handleDateChange } = useCalendarStore((state) => ({ diff --git a/packages/features/calendars/weeklyview/components/heading/index.tsx b/apps/web/modules/calendars/weeklyview/components/heading/index.tsx similarity index 100% rename from packages/features/calendars/weeklyview/components/heading/index.tsx rename to apps/web/modules/calendars/weeklyview/components/heading/index.tsx diff --git a/packages/features/calendars/weeklyview/components/horizontalLines/index.tsx b/apps/web/modules/calendars/weeklyview/components/horizontalLines/index.tsx similarity index 95% rename from packages/features/calendars/weeklyview/components/horizontalLines/index.tsx rename to apps/web/modules/calendars/weeklyview/components/horizontalLines/index.tsx index 59e53dc61d364c..49c66070e7835f 100644 --- a/packages/features/calendars/weeklyview/components/horizontalLines/index.tsx +++ b/apps/web/modules/calendars/weeklyview/components/horizontalLines/index.tsx @@ -4,7 +4,7 @@ import type dayjs from "@calcom/dayjs"; import { useTimePreferences } from "@calcom/features/bookings/lib"; import classNames from "@calcom/ui/classNames"; -import type { BorderColor } from "../../types/common"; +import type { BorderColor } from "@calcom/features/calendars/weeklyview/types/common"; export const HorizontalLines = ({ hours, diff --git a/packages/features/calendars/weeklyview/components/index.tsx b/apps/web/modules/calendars/weeklyview/components/index.tsx similarity index 100% rename from packages/features/calendars/weeklyview/components/index.tsx rename to apps/web/modules/calendars/weeklyview/components/index.tsx diff --git a/packages/features/calendars/weeklyview/components/spinner/Spinner.tsx b/apps/web/modules/calendars/weeklyview/components/spinner/Spinner.tsx similarity index 100% rename from packages/features/calendars/weeklyview/components/spinner/Spinner.tsx rename to apps/web/modules/calendars/weeklyview/components/spinner/Spinner.tsx diff --git a/packages/features/calendars/weeklyview/components/verticalLines/index.tsx b/apps/web/modules/calendars/weeklyview/components/verticalLines/index.tsx similarity index 93% rename from packages/features/calendars/weeklyview/components/verticalLines/index.tsx rename to apps/web/modules/calendars/weeklyview/components/verticalLines/index.tsx index 5ae47657f1bf47..092b18146b1a50 100644 --- a/packages/features/calendars/weeklyview/components/verticalLines/index.tsx +++ b/apps/web/modules/calendars/weeklyview/components/verticalLines/index.tsx @@ -1,7 +1,7 @@ import type dayjs from "@calcom/dayjs"; import classNames from "@calcom/ui/classNames"; -import type { BorderColor } from "../../types/common"; +import type { BorderColor } from "@calcom/features/calendars/weeklyview/types/common"; export const VerticalLines = ({ days, borderColor }: { days: dayjs.Dayjs[]; borderColor: BorderColor }) => { const isRTL = () => { diff --git a/packages/features/data-table/components/DataTable.tsx b/apps/web/modules/data-table/components/DataTable.tsx similarity index 98% rename from packages/features/data-table/components/DataTable.tsx rename to apps/web/modules/data-table/components/DataTable.tsx index bf5bda06195198..fca0356287f5c4 100644 --- a/packages/features/data-table/components/DataTable.tsx +++ b/apps/web/modules/data-table/components/DataTable.tsx @@ -21,10 +21,10 @@ import { TableRow, } from "@calcom/ui/components/table"; -import { useColumnSizingVars } from "../hooks"; -import { useColumnResizing } from "../hooks/useColumnResizing"; -import type { SeparatorRow } from "../lib/separator"; -import { isSeparatorRow } from "../lib/separator"; +import { useColumnSizingVars } from "@calcom/features/data-table/hooks"; +import { useColumnResizing } from "@calcom/features/data-table/hooks/useColumnResizing"; +import type { SeparatorRow } from "@calcom/features/data-table/lib/separator"; +import { isSeparatorRow } from "@calcom/features/data-table/lib/separator"; export type DataTablePropsFromWrapper = { table: ReactTableType; diff --git a/packages/features/data-table/components/DataTablePagination.tsx b/apps/web/modules/data-table/components/DataTablePagination.tsx similarity index 94% rename from packages/features/data-table/components/DataTablePagination.tsx rename to apps/web/modules/data-table/components/DataTablePagination.tsx index 75eecbc9303a97..ff7218a4752664 100644 --- a/packages/features/data-table/components/DataTablePagination.tsx +++ b/apps/web/modules/data-table/components/DataTablePagination.tsx @@ -4,7 +4,7 @@ import { type Table } from "@tanstack/react-table"; import { Pagination } from "@calcom/ui/components/pagination"; -import { useDataTable } from "../hooks"; +import { useDataTable } from "@calcom/features/data-table/hooks"; interface DataTablePaginationProps { table: Table; diff --git a/packages/features/data-table/components/DataTableSelectionBar.tsx b/apps/web/modules/data-table/components/DataTableSelectionBar.tsx similarity index 100% rename from packages/features/data-table/components/DataTableSelectionBar.tsx rename to apps/web/modules/data-table/components/DataTableSelectionBar.tsx diff --git a/packages/features/data-table/components/DataTableSkeleton.tsx b/apps/web/modules/data-table/components/DataTableSkeleton.tsx similarity index 100% rename from packages/features/data-table/components/DataTableSkeleton.tsx rename to apps/web/modules/data-table/components/DataTableSkeleton.tsx diff --git a/packages/features/data-table/components/DataTableToolbar.tsx b/apps/web/modules/data-table/components/DataTableToolbar.tsx similarity index 97% rename from packages/features/data-table/components/DataTableToolbar.tsx rename to apps/web/modules/data-table/components/DataTableToolbar.tsx index a7508c773dbb5a..7788b98846bdf7 100644 --- a/packages/features/data-table/components/DataTableToolbar.tsx +++ b/apps/web/modules/data-table/components/DataTableToolbar.tsx @@ -10,7 +10,7 @@ import classNames from "@calcom/ui/classNames"; import { Button, type ButtonProps } from "@calcom/ui/components/button"; import { FilterSearchField } from "@calcom/ui/components/form"; -import { useColumnFilters, useDataTable } from "../hooks"; +import { useColumnFilters, useDataTable } from "@calcom/features/data-table/hooks"; interface DataTableToolbarProps extends ComponentPropsWithoutRef<"div"> { children: React.ReactNode; diff --git a/packages/features/data-table/components/DataTableWrapper.tsx b/apps/web/modules/data-table/components/DataTableWrapper.tsx similarity index 95% rename from packages/features/data-table/components/DataTableWrapper.tsx rename to apps/web/modules/data-table/components/DataTableWrapper.tsx index 64135daf4eaca2..dad2c14ab8b846 100644 --- a/packages/features/data-table/components/DataTableWrapper.tsx +++ b/apps/web/modules/data-table/components/DataTableWrapper.tsx @@ -4,9 +4,9 @@ import type { Row, VisibilityState } from "@tanstack/react-table"; import { noop } from "lodash"; import { useEffect, useRef } from "react"; -import { useColumnFilters } from "../hooks/useColumnFilters"; -import { useDataTable } from "../hooks/useDataTable"; -import { useFetchMoreOnBottomReached } from "../hooks/useFetchMoreOnBottomReached"; +import { useColumnFilters } from "@calcom/features/data-table/hooks/useColumnFilters"; +import { useDataTable } from "@calcom/features/data-table/hooks/useDataTable"; +import { useFetchMoreOnBottomReached } from "@calcom/features/data-table/hooks/useFetchMoreOnBottomReached"; import type { DataTablePropsFromWrapper } from "./DataTable"; import { DataTable } from "./DataTable"; import { DataTablePagination } from "./DataTablePagination"; diff --git a/packages/features/data-table/components/filters/ActiveFilters.tsx b/apps/web/modules/data-table/components/filters/ActiveFilters.tsx similarity index 88% rename from packages/features/data-table/components/filters/ActiveFilters.tsx rename to apps/web/modules/data-table/components/filters/ActiveFilters.tsx index 7e69e5031e6792..20207cb734d917 100644 --- a/packages/features/data-table/components/filters/ActiveFilters.tsx +++ b/apps/web/modules/data-table/components/filters/ActiveFilters.tsx @@ -2,8 +2,8 @@ import { type Table } from "@tanstack/react-table"; -import { useDataTable, useFilterableColumns } from "../../hooks"; -import { ColumnFilterType } from "../../lib/types"; +import { useDataTable, useFilterableColumns } from "@calcom/features/data-table/hooks"; +import { ColumnFilterType } from "@calcom/features/data-table/lib/types"; import { DateRangeFilter } from "./DateRangeFilter"; import { FilterPopover } from "./FilterPopover"; diff --git a/packages/features/data-table/components/filters/AddFilterButton.tsx b/apps/web/modules/data-table/components/filters/AddFilterButton.tsx similarity index 97% rename from packages/features/data-table/components/filters/AddFilterButton.tsx rename to apps/web/modules/data-table/components/filters/AddFilterButton.tsx index 71395c8a466d14..11767ba1b78cd8 100644 --- a/packages/features/data-table/components/filters/AddFilterButton.tsx +++ b/apps/web/modules/data-table/components/filters/AddFilterButton.tsx @@ -11,7 +11,7 @@ import { Icon } from "@calcom/ui/components/icon"; import { Popover, PopoverTrigger, PopoverContent } from "@calcom/ui/components/popover"; import { Tooltip } from "@calcom/ui/components/tooltip"; -import { useDataTable, useFilterableColumns } from "../../hooks"; +import { useDataTable, useFilterableColumns } from "@calcom/features/data-table/hooks"; export interface AddFilterButtonProps { table: Table; diff --git a/packages/features/data-table/components/filters/BaseSelectFilterOptions.tsx b/apps/web/modules/data-table/components/filters/BaseSelectFilterOptions.tsx similarity index 97% rename from packages/features/data-table/components/filters/BaseSelectFilterOptions.tsx rename to apps/web/modules/data-table/components/filters/BaseSelectFilterOptions.tsx index 6383cdd33afabe..937e623e5c5408 100644 --- a/packages/features/data-table/components/filters/BaseSelectFilterOptions.tsx +++ b/apps/web/modules/data-table/components/filters/BaseSelectFilterOptions.tsx @@ -16,12 +16,12 @@ import { } from "@calcom/ui/components/command"; import { Icon } from "@calcom/ui/components/icon"; -import { useDataTable, useFilterValue } from "../../hooks"; +import { useDataTable, useFilterValue } from "@calcom/features/data-table/hooks"; import type { FacetedValue, FilterableColumn as _FilterableColumn, FilterValueSchema, -} from "../../lib/types"; +} from "@calcom/features/data-table/lib/types"; import type { FilterType } from "@calcom/types/data-table"; type FilterableColumn = Extract< diff --git a/packages/features/data-table/components/filters/ClearFiltersButton.tsx b/apps/web/modules/data-table/components/filters/ClearFiltersButton.tsx similarity index 90% rename from packages/features/data-table/components/filters/ClearFiltersButton.tsx rename to apps/web/modules/data-table/components/filters/ClearFiltersButton.tsx index 32ecc81ffe6f0d..d04c46c89e483a 100644 --- a/packages/features/data-table/components/filters/ClearFiltersButton.tsx +++ b/apps/web/modules/data-table/components/filters/ClearFiltersButton.tsx @@ -2,7 +2,7 @@ import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Button } from "@calcom/ui/components/button"; import { Tooltip } from "@calcom/ui/components/tooltip"; -import { useDataTable } from "../../hooks/useDataTable"; +import { useDataTable } from "@calcom/features/data-table/hooks/useDataTable"; export const ClearFiltersButton = ({ exclude }: { exclude?: string[] }) => { const { t } = useLocale(); diff --git a/packages/features/data-table/components/filters/ColumnVisibilityButton.test.tsx b/apps/web/modules/data-table/components/filters/ColumnVisibilityButton.test.tsx similarity index 100% rename from packages/features/data-table/components/filters/ColumnVisibilityButton.test.tsx rename to apps/web/modules/data-table/components/filters/ColumnVisibilityButton.test.tsx diff --git a/packages/features/data-table/components/filters/ColumnVisibilityButton.tsx b/apps/web/modules/data-table/components/filters/ColumnVisibilityButton.tsx similarity index 100% rename from packages/features/data-table/components/filters/ColumnVisibilityButton.tsx rename to apps/web/modules/data-table/components/filters/ColumnVisibilityButton.tsx diff --git a/packages/features/data-table/components/filters/DateRangeFilter.tsx b/apps/web/modules/data-table/components/filters/DateRangeFilter.tsx similarity index 95% rename from packages/features/data-table/components/filters/DateRangeFilter.tsx rename to apps/web/modules/data-table/components/filters/DateRangeFilter.tsx index cb03b3f73fba89..29c79c64bd08c5 100644 --- a/packages/features/data-table/components/filters/DateRangeFilter.tsx +++ b/apps/web/modules/data-table/components/filters/DateRangeFilter.tsx @@ -19,7 +19,7 @@ import { DateRangePicker } from "@calcom/ui/components/form"; import { Icon } from "@calcom/ui/components/icon"; import { Popover, PopoverContent, PopoverTrigger } from "@calcom/ui/components/popover"; -import { useDataTable, useFilterValue } from "../../hooks"; +import { useDataTable, useFilterValue } from "@calcom/features/data-table/hooks"; import { CUSTOM_PRESET, CUSTOM_PRESET_VALUE, @@ -29,10 +29,10 @@ import { getDateRangeFromPreset, getCompatiblePresets, type PresetOption, -} from "../../lib/dateRange"; -import { preserveLocalTime } from "../../lib/preserveLocalTime"; -import type { FilterableColumn, DateRangeFilterOptions } from "../../lib/types"; -import { ZDateRangeFilterValue, ColumnFilterType } from "../../lib/types"; +} from "@calcom/features/data-table/lib/dateRange"; +import { preserveLocalTime } from "@calcom/features/data-table/lib/preserveLocalTime"; +import type { FilterableColumn, DateRangeFilterOptions } from "@calcom/features/data-table/lib/types"; +import { ZDateRangeFilterValue, ColumnFilterType } from "@calcom/features/data-table/lib/types"; import type { FilterType } from "@calcom/types/data-table"; import { useFilterPopoverOpen } from "./useFilterPopoverOpen"; diff --git a/packages/features/data-table/components/filters/FilterBar.tsx b/apps/web/modules/data-table/components/filters/FilterBar.tsx similarity index 89% rename from packages/features/data-table/components/filters/FilterBar.tsx rename to apps/web/modules/data-table/components/filters/FilterBar.tsx index e024fcdd9b29d1..3cc08dbc84fe95 100644 --- a/packages/features/data-table/components/filters/FilterBar.tsx +++ b/apps/web/modules/data-table/components/filters/FilterBar.tsx @@ -2,7 +2,7 @@ import { type Table } from "@tanstack/react-table"; -import { useDisplayedFilterCount } from "../../hooks"; +import { useDisplayedFilterCount } from "@calcom/features/data-table/hooks"; import { ActiveFilters } from "./ActiveFilters"; import { AddFilterButton } from "./AddFilterButton"; diff --git a/packages/features/data-table/components/filters/FilterOptions.tsx b/apps/web/modules/data-table/components/filters/FilterOptions.tsx similarity index 85% rename from packages/features/data-table/components/filters/FilterOptions.tsx rename to apps/web/modules/data-table/components/filters/FilterOptions.tsx index 598b1305228d9c..f4a571c3044bdd 100644 --- a/packages/features/data-table/components/filters/FilterOptions.tsx +++ b/apps/web/modules/data-table/components/filters/FilterOptions.tsx @@ -1,7 +1,7 @@ "use client"; -import type { FilterableColumn } from "../../lib/types"; -import { ColumnFilterType } from "../../lib/types"; +import type { FilterableColumn } from "@calcom/features/data-table/lib/types"; +import { ColumnFilterType } from "@calcom/features/data-table/lib/types"; import { MultiSelectFilterOptions } from "./MultiSelectFilterOptions"; import { NumberFilterOptions } from "./NumberFilterOptions"; import { SingleSelectFilterOptions } from "./SingleSelectFilterOptions"; diff --git a/packages/features/data-table/components/filters/FilterPopover.tsx b/apps/web/modules/data-table/components/filters/FilterPopover.tsx similarity index 96% rename from packages/features/data-table/components/filters/FilterPopover.tsx rename to apps/web/modules/data-table/components/filters/FilterPopover.tsx index 7e420111c22934..c1cb9c5835d733 100644 --- a/packages/features/data-table/components/filters/FilterPopover.tsx +++ b/apps/web/modules/data-table/components/filters/FilterPopover.tsx @@ -7,14 +7,14 @@ import { Button } from "@calcom/ui/components/button"; import type { IconName } from "@calcom/ui/components/icon"; import { Popover, PopoverContent, PopoverTrigger } from "@calcom/ui/components/popover"; -import { useFilterValue } from "../../hooks"; -import { type FilterableColumn, type FilterValue, ZFilterValue, ColumnFilterType } from "../../lib/types"; +import { useFilterValue } from "@calcom/features/data-table/hooks"; +import { type FilterableColumn, type FilterValue, ZFilterValue, ColumnFilterType } from "@calcom/features/data-table/lib/types"; import { isSingleSelectFilterValue, isMultiSelectFilterValue, isTextFilterValue, isNumberFilterValue, -} from "../../lib/utils"; +} from "@calcom/features/data-table/lib/utils"; import { FilterOptions } from "./FilterOptions"; import { useFilterPopoverOpen } from "./useFilterPopoverOpen"; import { numberFilterOperatorOptions, useTextFilterOperatorOptions } from "./utils"; diff --git a/packages/features/data-table/components/filters/MultiSelectFilterOptions.tsx b/apps/web/modules/data-table/components/filters/MultiSelectFilterOptions.tsx similarity index 82% rename from packages/features/data-table/components/filters/MultiSelectFilterOptions.tsx rename to apps/web/modules/data-table/components/filters/MultiSelectFilterOptions.tsx index ef1462dad78b7d..5e21428c821976 100644 --- a/packages/features/data-table/components/filters/MultiSelectFilterOptions.tsx +++ b/apps/web/modules/data-table/components/filters/MultiSelectFilterOptions.tsx @@ -1,8 +1,8 @@ "use client"; -import { useDataTable } from "../../hooks"; -import type { FilterableColumn } from "../../lib/types"; -import { ZMultiSelectFilterValue, ColumnFilterType } from "../../lib/types"; +import { useDataTable } from "@calcom/features/data-table/hooks"; +import type { FilterableColumn } from "@calcom/features/data-table/lib/types"; +import { ZMultiSelectFilterValue, ColumnFilterType } from "@calcom/features/data-table/lib/types"; import type { FilterType } from "@calcom/types/data-table"; import { BaseSelectFilterOptions } from "./BaseSelectFilterOptions"; diff --git a/packages/features/data-table/components/filters/NumberFilterOptions.tsx b/apps/web/modules/data-table/components/filters/NumberFilterOptions.tsx similarity index 92% rename from packages/features/data-table/components/filters/NumberFilterOptions.tsx rename to apps/web/modules/data-table/components/filters/NumberFilterOptions.tsx index f0d5db9f54894c..f4f1dcf1ca0ec1 100644 --- a/packages/features/data-table/components/filters/NumberFilterOptions.tsx +++ b/apps/web/modules/data-table/components/filters/NumberFilterOptions.tsx @@ -6,9 +6,9 @@ import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Button } from "@calcom/ui/components/button"; import { Form, Select, NumberInput } from "@calcom/ui/components/form"; -import { useFilterValue, useDataTable } from "../../hooks"; -import type { FilterableColumn } from "../../lib/types"; -import { ZNumberFilterValue, ColumnFilterType } from "../../lib/types"; +import { useFilterValue, useDataTable } from "@calcom/features/data-table/hooks"; +import type { FilterableColumn } from "@calcom/features/data-table/lib/types"; +import { ZNumberFilterValue, ColumnFilterType } from "@calcom/features/data-table/lib/types"; import type { FilterType } from "@calcom/types/data-table"; import { numberFilterOperatorOptions } from "./utils"; diff --git a/packages/features/data-table/components/filters/SingleSelectFilterOptions.tsx b/apps/web/modules/data-table/components/filters/SingleSelectFilterOptions.tsx similarity index 77% rename from packages/features/data-table/components/filters/SingleSelectFilterOptions.tsx rename to apps/web/modules/data-table/components/filters/SingleSelectFilterOptions.tsx index cf6b74f3859f88..c3672831e9a960 100644 --- a/packages/features/data-table/components/filters/SingleSelectFilterOptions.tsx +++ b/apps/web/modules/data-table/components/filters/SingleSelectFilterOptions.tsx @@ -2,9 +2,9 @@ import type { FilterType } from "@calcom/types/data-table"; -import { useDataTable } from "../../hooks"; -import type { FilterableColumn } from "../../lib/types"; -import { ZSingleSelectFilterValue, ColumnFilterType } from "../../lib/types"; +import { useDataTable } from "@calcom/features/data-table/hooks"; +import type { FilterableColumn } from "@calcom/features/data-table/lib/types"; +import { ZSingleSelectFilterValue, ColumnFilterType } from "@calcom/features/data-table/lib/types"; import { BaseSelectFilterOptions } from "./BaseSelectFilterOptions"; export type SingleSelectFilterOptionsProps = { diff --git a/packages/features/data-table/components/filters/TextFilterOptions.tsx b/apps/web/modules/data-table/components/filters/TextFilterOptions.tsx similarity index 92% rename from packages/features/data-table/components/filters/TextFilterOptions.tsx rename to apps/web/modules/data-table/components/filters/TextFilterOptions.tsx index 40abefa3563907..5dc273e3fa2e22 100644 --- a/packages/features/data-table/components/filters/TextFilterOptions.tsx +++ b/apps/web/modules/data-table/components/filters/TextFilterOptions.tsx @@ -6,9 +6,9 @@ import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Button } from "@calcom/ui/components/button"; import { Form, Select, Input } from "@calcom/ui/components/form"; -import { useFilterValue, useDataTable } from "../../hooks"; -import type { FilterableColumn } from "../../lib/types"; -import { ZTextFilterValue, ColumnFilterType } from "../../lib/types"; +import { useFilterValue, useDataTable } from "@calcom/features/data-table/hooks"; +import type { FilterableColumn } from "@calcom/features/data-table/lib/types"; +import { ZTextFilterValue, ColumnFilterType } from "@calcom/features/data-table/lib/types"; import type { FilterType } from "@calcom/types/data-table"; import { useTextFilterOperatorOptions } from "./utils"; diff --git a/packages/features/data-table/components/filters/index.ts b/apps/web/modules/data-table/components/filters/index.ts similarity index 100% rename from packages/features/data-table/components/filters/index.ts rename to apps/web/modules/data-table/components/filters/index.ts diff --git a/packages/features/data-table/components/filters/types.ts b/apps/web/modules/data-table/components/filters/types.ts similarity index 67% rename from packages/features/data-table/components/filters/types.ts rename to apps/web/modules/data-table/components/filters/types.ts index 839a5eff993cea..2d394da8b00650 100644 --- a/packages/features/data-table/components/filters/types.ts +++ b/apps/web/modules/data-table/components/filters/types.ts @@ -1,4 +1,4 @@ -import type { NumberFilterOperator, TextFilterOperator } from "../../lib/types"; +import type { NumberFilterOperator, TextFilterOperator } from "@calcom/features/data-table/lib/types"; export type NumberFilterOperatorOption = { label: string; diff --git a/packages/features/data-table/components/filters/useFilterPopoverOpen.ts b/apps/web/modules/data-table/components/filters/useFilterPopoverOpen.ts similarity index 93% rename from packages/features/data-table/components/filters/useFilterPopoverOpen.ts rename to apps/web/modules/data-table/components/filters/useFilterPopoverOpen.ts index 10de3ab6214cc2..9931b20e4201ca 100644 --- a/packages/features/data-table/components/filters/useFilterPopoverOpen.ts +++ b/apps/web/modules/data-table/components/filters/useFilterPopoverOpen.ts @@ -1,6 +1,6 @@ import { useState, useEffect, useCallback } from "react"; -import { useDataTable } from "../../hooks"; +import { useDataTable } from "@calcom/features/data-table/hooks"; export function useFilterPopoverOpen(columnId: string) { const { filterToOpen } = useDataTable(); diff --git a/packages/features/data-table/components/filters/utils.ts b/apps/web/modules/data-table/components/filters/utils.ts similarity index 93% rename from packages/features/data-table/components/filters/utils.ts rename to apps/web/modules/data-table/components/filters/utils.ts index a9a6ca59d437cb..b1ff38e7fde7e8 100644 --- a/packages/features/data-table/components/filters/utils.ts +++ b/apps/web/modules/data-table/components/filters/utils.ts @@ -1,6 +1,6 @@ import { useLocale } from "@calcom/lib/hooks/useLocale"; -import { type TextFilterOperator, textFilterOperators } from "../../lib/types"; +import { type TextFilterOperator, textFilterOperators } from "@calcom/features/data-table/lib/types"; import type { TextFilterOperatorOption, NumberFilterOperatorOption } from "./types"; export const numberFilterOperatorOptions: NumberFilterOperatorOption[] = [ diff --git a/packages/features/data-table/components/index.ts b/apps/web/modules/data-table/components/index.ts similarity index 100% rename from packages/features/data-table/components/index.ts rename to apps/web/modules/data-table/components/index.ts diff --git a/packages/features/data-table/components/segment/DeleteSegmentDialog.tsx b/apps/web/modules/data-table/components/segment/DeleteSegmentDialog.tsx similarity index 91% rename from packages/features/data-table/components/segment/DeleteSegmentDialog.tsx rename to apps/web/modules/data-table/components/segment/DeleteSegmentDialog.tsx index 0a8226da4f140d..4517a71c3a30a9 100644 --- a/packages/features/data-table/components/segment/DeleteSegmentDialog.tsx +++ b/apps/web/modules/data-table/components/segment/DeleteSegmentDialog.tsx @@ -3,8 +3,8 @@ import { trpc } from "@calcom/trpc/react"; import { Dialog, ConfirmationDialogContent } from "@calcom/ui/components/dialog"; import { showToast } from "@calcom/ui/components/toast"; -import { useDataTable } from "../../hooks"; -import type { FilterSegmentOutput } from "../../lib/types"; +import { useDataTable } from "@calcom/features/data-table/hooks"; +import type { FilterSegmentOutput } from "@calcom/features/data-table/lib/types"; export function DeleteSegmentDialog({ segment, diff --git a/packages/features/data-table/components/segment/DuplicateSegmentDialog.tsx b/apps/web/modules/data-table/components/segment/DuplicateSegmentDialog.tsx similarity index 95% rename from packages/features/data-table/components/segment/DuplicateSegmentDialog.tsx rename to apps/web/modules/data-table/components/segment/DuplicateSegmentDialog.tsx index 448181502f9074..2e97f3df67822e 100644 --- a/packages/features/data-table/components/segment/DuplicateSegmentDialog.tsx +++ b/apps/web/modules/data-table/components/segment/DuplicateSegmentDialog.tsx @@ -9,8 +9,8 @@ import { Dialog, DialogContent, DialogFooter, DialogHeader } from "@calcom/ui/co import { Form, TextField } from "@calcom/ui/components/form"; import { showToast } from "@calcom/ui/components/toast"; -import { useDataTable } from "../../hooks"; -import type { CombinedFilterSegment } from "../../lib/types"; +import { useDataTable } from "@calcom/features/data-table/hooks"; +import type { CombinedFilterSegment } from "@calcom/features/data-table/lib/types"; type FormValues = { name: string; diff --git a/packages/features/data-table/components/segment/FilterSegmentSelect.tsx b/apps/web/modules/data-table/components/segment/FilterSegmentSelect.tsx similarity index 98% rename from packages/features/data-table/components/segment/FilterSegmentSelect.tsx rename to apps/web/modules/data-table/components/segment/FilterSegmentSelect.tsx index 68409e70c0e0dd..8a54814ec02592 100644 --- a/packages/features/data-table/components/segment/FilterSegmentSelect.tsx +++ b/apps/web/modules/data-table/components/segment/FilterSegmentSelect.tsx @@ -15,13 +15,13 @@ import { } from "@calcom/ui/components/dropdown"; import { Icon, type IconName } from "@calcom/ui/components/icon"; -import { useDataTable } from "../../hooks"; +import { useDataTable } from "@calcom/features/data-table/hooks"; import type { FilterSegmentOutput, CombinedFilterSegment, SystemFilterSegmentInternal, UserFilterSegment, -} from "../../lib/types"; +} from "@calcom/features/data-table/lib/types"; import { DeleteSegmentDialog } from "./DeleteSegmentDialog"; import { DuplicateSegmentDialog } from "./DuplicateSegmentDialog"; import { RenameSegmentDialog } from "./RenameSegmentDialog"; diff --git a/packages/features/data-table/components/segment/RenameSegmentDialog.tsx b/apps/web/modules/data-table/components/segment/RenameSegmentDialog.tsx similarity index 96% rename from packages/features/data-table/components/segment/RenameSegmentDialog.tsx rename to apps/web/modules/data-table/components/segment/RenameSegmentDialog.tsx index 39503b9321218a..618ce0f4f532db 100644 --- a/packages/features/data-table/components/segment/RenameSegmentDialog.tsx +++ b/apps/web/modules/data-table/components/segment/RenameSegmentDialog.tsx @@ -7,7 +7,7 @@ import { Dialog, DialogContent, DialogFooter, DialogHeader } from "@calcom/ui/co import { Form, TextField } from "@calcom/ui/components/form"; import { showToast } from "@calcom/ui/components/toast"; -import type { FilterSegmentOutput } from "../../lib/types"; +import type { FilterSegmentOutput } from "@calcom/features/data-table/lib/types"; type FormValues = { name: string; diff --git a/packages/features/data-table/components/segment/SaveFilterSegmentButton.tsx b/apps/web/modules/data-table/components/segment/SaveFilterSegmentButton.tsx similarity index 99% rename from packages/features/data-table/components/segment/SaveFilterSegmentButton.tsx rename to apps/web/modules/data-table/components/segment/SaveFilterSegmentButton.tsx index ac264bf40fa679..db2e10592da6ff 100644 --- a/packages/features/data-table/components/segment/SaveFilterSegmentButton.tsx +++ b/apps/web/modules/data-table/components/segment/SaveFilterSegmentButton.tsx @@ -19,7 +19,7 @@ import { Form, Input, Label, Select, Switch } from "@calcom/ui/components/form"; import { RadioGroup, RadioField } from "@calcom/ui/components/radio"; import { showToast } from "@calcom/ui/components/toast"; -import { useDataTable } from "../../hooks"; +import { useDataTable } from "@calcom/features/data-table/hooks"; interface FormValues { name: string; diff --git a/packages/features/data-table/components/segment/index.ts b/apps/web/modules/data-table/components/segment/index.ts similarity index 100% rename from packages/features/data-table/components/segment/index.ts rename to apps/web/modules/data-table/components/segment/index.ts diff --git a/packages/features/ee/api-keys/components/ApiKeyDialogForm.tsx b/apps/web/modules/ee/api-keys/components/ApiKeyDialogForm.tsx similarity index 98% rename from packages/features/ee/api-keys/components/ApiKeyDialogForm.tsx rename to apps/web/modules/ee/api-keys/components/ApiKeyDialogForm.tsx index e3dde14770e3fd..8b8d26890c7707 100644 --- a/packages/features/ee/api-keys/components/ApiKeyDialogForm.tsx +++ b/apps/web/modules/ee/api-keys/components/ApiKeyDialogForm.tsx @@ -3,8 +3,8 @@ import { useState } from "react"; import { Controller, useForm } from "react-hook-form"; import dayjs from "@calcom/dayjs"; -import type { TApiKeys } from "@calcom/ee/api-keys/components/ApiKeyListItem"; -import LicenseRequired from "@calcom/ee/common/components/LicenseRequired"; +import type { TApiKeys } from "~/ee/api-keys/components/ApiKeyListItem"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; import { API_NAME_LENGTH_MAX_LIMIT } from "@calcom/lib/constants"; import { IS_CALCOM } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; diff --git a/packages/features/ee/api-keys/components/ApiKeyListItem.tsx b/apps/web/modules/ee/api-keys/components/ApiKeyListItem.tsx similarity index 100% rename from packages/features/ee/api-keys/components/ApiKeyListItem.tsx rename to apps/web/modules/ee/api-keys/components/ApiKeyListItem.tsx diff --git a/packages/features/ee/components/BrandColorsForm.tsx b/apps/web/modules/ee/common/components/BrandColorsForm.tsx similarity index 100% rename from packages/features/ee/components/BrandColorsForm.tsx rename to apps/web/modules/ee/common/components/BrandColorsForm.tsx diff --git a/packages/features/ee/components/CommonSkeletonLoaders.tsx b/apps/web/modules/ee/common/components/CommonSkeletonLoaders.tsx similarity index 100% rename from packages/features/ee/components/CommonSkeletonLoaders.tsx rename to apps/web/modules/ee/common/components/CommonSkeletonLoaders.tsx diff --git a/packages/features/ee/common/components/LicenseRequired.tsx b/apps/web/modules/ee/common/components/LicenseRequired.tsx similarity index 100% rename from packages/features/ee/common/components/LicenseRequired.tsx rename to apps/web/modules/ee/common/components/LicenseRequired.tsx diff --git a/packages/features/ee/components/PoweredBy.tsx b/apps/web/modules/ee/common/components/PoweredBy.tsx similarity index 100% rename from packages/features/ee/components/PoweredBy.tsx rename to apps/web/modules/ee/common/components/PoweredBy.tsx diff --git a/packages/features/ee/dsync/components/ConfigureDirectorySync.tsx b/apps/web/modules/ee/dsync/components/ConfigureDirectorySync.tsx similarity index 97% rename from packages/features/ee/dsync/components/ConfigureDirectorySync.tsx rename to apps/web/modules/ee/dsync/components/ConfigureDirectorySync.tsx index 1fd090c11c9056..93483ea75eb17d 100644 --- a/packages/features/ee/dsync/components/ConfigureDirectorySync.tsx +++ b/apps/web/modules/ee/dsync/components/ConfigureDirectorySync.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; -import { SkeletonLoader } from "@calcom/features/apps/components/SkeletonLoader"; +import { SkeletonLoader } from "@calcom/web/modules/apps/components/SkeletonLoader"; import { Dialog } from "@calcom/features/components/controlled-dialog"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; diff --git a/packages/features/ee/dsync/components/CreateDirectory.tsx b/apps/web/modules/ee/dsync/components/CreateDirectory.tsx similarity index 97% rename from packages/features/ee/dsync/components/CreateDirectory.tsx rename to apps/web/modules/ee/dsync/components/CreateDirectory.tsx index 87c69fa9206594..65ccdf9c959738 100644 --- a/packages/features/ee/dsync/components/CreateDirectory.tsx +++ b/apps/web/modules/ee/dsync/components/CreateDirectory.tsx @@ -9,7 +9,7 @@ import { DialogContent, DialogFooter } from "@calcom/ui/components/dialog"; import { Form, TextField, SelectField } from "@calcom/ui/components/form"; import { showToast } from "@calcom/ui/components/toast"; -import { directoryProviders } from "../lib/directoryProviders"; +import { directoryProviders } from "@calcom/features/ee/dsync/lib/directoryProviders"; const defaultValues = { name: "", diff --git a/packages/features/ee/dsync/components/CreateTeamDialog.tsx b/apps/web/modules/ee/dsync/components/CreateTeamDialog.tsx similarity index 100% rename from packages/features/ee/dsync/components/CreateTeamDialog.tsx rename to apps/web/modules/ee/dsync/components/CreateTeamDialog.tsx diff --git a/packages/features/ee/dsync/components/DirectoryInfo.tsx b/apps/web/modules/ee/dsync/components/DirectoryInfo.tsx similarity index 100% rename from packages/features/ee/dsync/components/DirectoryInfo.tsx rename to apps/web/modules/ee/dsync/components/DirectoryInfo.tsx diff --git a/packages/features/ee/dsync/components/GroupNameCell.tsx b/apps/web/modules/ee/dsync/components/GroupNameCell.tsx similarity index 100% rename from packages/features/ee/dsync/components/GroupNameCell.tsx rename to apps/web/modules/ee/dsync/components/GroupNameCell.tsx diff --git a/packages/features/ee/dsync/components/GroupTeamMappingTable.tsx b/apps/web/modules/ee/dsync/components/GroupTeamMappingTable.tsx similarity index 96% rename from packages/features/ee/dsync/components/GroupTeamMappingTable.tsx rename to apps/web/modules/ee/dsync/components/GroupTeamMappingTable.tsx index 3591fea782b01c..93f287d1e5b0fe 100644 --- a/packages/features/ee/dsync/components/GroupTeamMappingTable.tsx +++ b/apps/web/modules/ee/dsync/components/GroupTeamMappingTable.tsx @@ -4,7 +4,7 @@ import { usePathname } from "next/navigation"; import { useRef, useState } from "react"; import { DataTableProvider } from "@calcom/features/data-table/DataTableProvider"; -import { DataTable, DataTableToolbar } from "@calcom/features/data-table/components"; +import { DataTable, DataTableToolbar } from "~/data-table/components"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; diff --git a/packages/features/ee/dsync/page/team-dsync-view.tsx b/apps/web/modules/ee/dsync/views/team-dsync-view.tsx similarity index 95% rename from packages/features/ee/dsync/page/team-dsync-view.tsx rename to apps/web/modules/ee/dsync/views/team-dsync-view.tsx index bf8202f3af2e25..021352e54894a6 100644 --- a/packages/features/ee/dsync/page/team-dsync-view.tsx +++ b/apps/web/modules/ee/dsync/views/team-dsync-view.tsx @@ -3,7 +3,7 @@ import { useRouter } from "next/navigation"; import { useEffect } from "react"; -import { SkeletonLoader } from "@calcom/features/apps/components/SkeletonLoader"; +import { SkeletonLoader } from "@calcom/web/modules/apps/components/SkeletonLoader"; import { HOSTED_CAL_FEATURES } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; diff --git a/packages/features/ee/impersonation/components/ImpersonatingBanner.tsx b/apps/web/modules/ee/impersonation/components/ImpersonatingBanner.tsx similarity index 100% rename from packages/features/ee/impersonation/components/ImpersonatingBanner.tsx rename to apps/web/modules/ee/impersonation/components/ImpersonatingBanner.tsx diff --git a/apps/web/modules/ee/organizations/admin-api.tsx b/apps/web/modules/ee/organizations/admin-api.tsx index 16f4bc59d40c5f..300d3ae0c396d2 100644 --- a/apps/web/modules/ee/organizations/admin-api.tsx +++ b/apps/web/modules/ee/organizations/admin-api.tsx @@ -1,6 +1,6 @@ "use client"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Button } from "@calcom/ui/components/button"; import { ButtonGroup } from "@calcom/ui/components/buttonGroup"; diff --git a/apps/web/modules/ee/organizations/appearance.tsx b/apps/web/modules/ee/organizations/appearance.tsx index 48c02395c2e7ec..69a0b8246f9257 100644 --- a/apps/web/modules/ee/organizations/appearance.tsx +++ b/apps/web/modules/ee/organizations/appearance.tsx @@ -6,8 +6,8 @@ import { useState, useEffect } from "react"; import { useForm } from "react-hook-form"; import { checkAdminOrOwner } from "@calcom/features/auth/lib/checkAdminOrOwner"; -import BrandColorsForm from "@calcom/features/ee/components/BrandColorsForm"; -import { AppearanceSkeletonLoader } from "@calcom/features/ee/components/CommonSkeletonLoaders"; +import BrandColorsForm from "~/ee/common/components/BrandColorsForm"; +import { AppearanceSkeletonLoader } from "~/ee/common/components/CommonSkeletonLoaders"; import SectionBottomActions from "@calcom/features/settings/SectionBottomActions"; import ThemeLabel from "@calcom/features/settings/ThemeLabel"; import { DEFAULT_LIGHT_BRAND_COLOR, DEFAULT_DARK_BRAND_COLOR } from "@calcom/lib/constants"; diff --git a/apps/web/modules/ee/organizations/attributes/attributes-create-view.tsx b/apps/web/modules/ee/organizations/attributes/attributes-create-view.tsx index 06f9b166cc191a..ee9be9a0146587 100644 --- a/apps/web/modules/ee/organizations/attributes/attributes-create-view.tsx +++ b/apps/web/modules/ee/organizations/attributes/attributes-create-view.tsx @@ -4,7 +4,7 @@ import { useRouter } from "next/navigation"; import { useFormContext } from "react-hook-form"; import { z } from "zod"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; 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/attributes/attributes-edit-view.tsx b/apps/web/modules/ee/organizations/attributes/attributes-edit-view.tsx index 6605b2aa238e8a..934af8573319f1 100644 --- a/apps/web/modules/ee/organizations/attributes/attributes-edit-view.tsx +++ b/apps/web/modules/ee/organizations/attributes/attributes-edit-view.tsx @@ -4,7 +4,7 @@ import { useParams } from "next/navigation"; import { useFormContext } from "react-hook-form"; import { z } from "zod"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; 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/attributes/attributes-list-view.tsx b/apps/web/modules/ee/organizations/attributes/attributes-list-view.tsx index 49c0b7ce6a3ccd..e026472d1cdc8b 100644 --- a/apps/web/modules/ee/organizations/attributes/attributes-list-view.tsx +++ b/apps/web/modules/ee/organizations/attributes/attributes-list-view.tsx @@ -3,7 +3,7 @@ import type { Dispatch, SetStateAction } from "react"; import { useState } from "react"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { RouterOutputs } from "@calcom/trpc/react"; import { trpc } from "@calcom/trpc/react"; diff --git a/packages/features/ee/organizations/components/AboutOrganizationForm.tsx b/apps/web/modules/ee/organizations/components/AboutOrganizationForm.tsx similarity index 100% rename from packages/features/ee/organizations/components/AboutOrganizationForm.tsx rename to apps/web/modules/ee/organizations/components/AboutOrganizationForm.tsx diff --git a/packages/features/ee/organizations/components/AdminOnboardingHandover.tsx b/apps/web/modules/ee/organizations/components/AdminOnboardingHandover.tsx similarity index 100% rename from packages/features/ee/organizations/components/AdminOnboardingHandover.tsx rename to apps/web/modules/ee/organizations/components/AdminOnboardingHandover.tsx diff --git a/packages/features/ee/organizations/components/CreateANewOrganizationForm.tsx b/apps/web/modules/ee/organizations/components/CreateANewOrganizationForm.tsx similarity index 99% rename from packages/features/ee/organizations/components/CreateANewOrganizationForm.tsx rename to apps/web/modules/ee/organizations/components/CreateANewOrganizationForm.tsx index cf8a0b9237ee5f..1c8f2caae512fc 100644 --- a/packages/features/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 "../lib/onboardingStore"; +import { useOnboarding } from "@calcom/features/ee/organizations/lib/onboardingStore"; function extractDomainFromEmail(email: string) { const match = email.match(/^(?:.*?:\/\/)?.*?([\w-]*(?:\.\w{2,}|\.\w{2,}\.\w{2}))(?:[/?#:]|$)/); diff --git a/packages/features/ee/organizations/pages/components/DisableAutofillOnBookingPageSwitch.tsx b/apps/web/modules/ee/organizations/components/DisableAutofillOnBookingPageSwitch.tsx similarity index 100% rename from packages/features/ee/organizations/pages/components/DisableAutofillOnBookingPageSwitch.tsx rename to apps/web/modules/ee/organizations/components/DisableAutofillOnBookingPageSwitch.tsx diff --git a/packages/features/ee/organizations/pages/components/DisableGuestBookingEmailsSetting.tsx b/apps/web/modules/ee/organizations/components/DisableGuestBookingEmailsSetting.tsx similarity index 100% rename from packages/features/ee/organizations/pages/components/DisableGuestBookingEmailsSetting.tsx rename to apps/web/modules/ee/organizations/components/DisableGuestBookingEmailsSetting.tsx diff --git a/packages/features/ee/organizations/pages/components/DisablePhoneOnlySMSNotificationsSwitch.tsx b/apps/web/modules/ee/organizations/components/DisablePhoneOnlySMSNotificationsSwitch.tsx similarity index 100% rename from packages/features/ee/organizations/pages/components/DisablePhoneOnlySMSNotificationsSwitch.tsx rename to apps/web/modules/ee/organizations/components/DisablePhoneOnlySMSNotificationsSwitch.tsx diff --git a/packages/features/ee/organizations/pages/components/LockEventTypeSwitch.tsx b/apps/web/modules/ee/organizations/components/LockEventTypeSwitch.tsx similarity index 100% rename from packages/features/ee/organizations/pages/components/LockEventTypeSwitch.tsx rename to apps/web/modules/ee/organizations/components/LockEventTypeSwitch.tsx diff --git a/packages/features/ee/organizations/pages/components/MemberListItem.tsx b/apps/web/modules/ee/organizations/components/MemberListItem.tsx similarity index 100% rename from packages/features/ee/organizations/pages/components/MemberListItem.tsx rename to apps/web/modules/ee/organizations/components/MemberListItem.tsx diff --git a/packages/features/ee/organizations/pages/components/NoSlotsNotificationSwitch.tsx b/apps/web/modules/ee/organizations/components/NoSlotsNotificationSwitch.tsx similarity index 100% rename from packages/features/ee/organizations/pages/components/NoSlotsNotificationSwitch.tsx rename to apps/web/modules/ee/organizations/components/NoSlotsNotificationSwitch.tsx diff --git a/packages/features/ee/organizations/pages/components/OrgAutoJoinSetting.tsx b/apps/web/modules/ee/organizations/components/OrgAutoJoinSetting.tsx similarity index 100% rename from packages/features/ee/organizations/pages/components/OrgAutoJoinSetting.tsx rename to apps/web/modules/ee/organizations/components/OrgAutoJoinSetting.tsx diff --git a/packages/features/ee/organizations/components/OrgUpgradeBanner.tsx b/apps/web/modules/ee/organizations/components/OrgUpgradeBanner.tsx similarity index 100% rename from packages/features/ee/organizations/components/OrgUpgradeBanner.tsx rename to apps/web/modules/ee/organizations/components/OrgUpgradeBanner.tsx diff --git a/packages/features/ee/organizations/pages/components/OtherTeamList.tsx b/apps/web/modules/ee/organizations/components/OtherTeamList.tsx similarity index 100% rename from packages/features/ee/organizations/pages/components/OtherTeamList.tsx rename to apps/web/modules/ee/organizations/components/OtherTeamList.tsx diff --git a/packages/features/ee/organizations/pages/components/OtherTeamListItem.tsx b/apps/web/modules/ee/organizations/components/OtherTeamListItem.tsx similarity index 98% rename from packages/features/ee/organizations/pages/components/OtherTeamListItem.tsx rename to apps/web/modules/ee/organizations/components/OtherTeamListItem.tsx index d92c59c5eb52fa..1c2f9be26288c9 100644 --- a/packages/features/ee/organizations/pages/components/OtherTeamListItem.tsx +++ b/apps/web/modules/ee/organizations/components/OtherTeamListItem.tsx @@ -16,7 +16,7 @@ import { import { showToast } from "@calcom/ui/components/toast"; import { Tooltip } from "@calcom/ui/components/tooltip"; -import { useOrgBranding } from "../../../organizations/context/provider"; +import { useOrgBranding } from "@calcom/features/ee/organizations/context/provider"; interface Props { team: RouterOutputs["viewer"]["organizations"]["listOtherTeams"][number]; diff --git a/packages/features/ee/organizations/pages/components/OtherTeamsListing.tsx b/apps/web/modules/ee/organizations/components/OtherTeamsListing.tsx similarity index 100% rename from packages/features/ee/organizations/pages/components/OtherTeamsListing.tsx rename to apps/web/modules/ee/organizations/components/OtherTeamsListing.tsx diff --git a/packages/features/ee/organizations/components/TeamInviteFromOrg.tsx b/apps/web/modules/ee/organizations/components/TeamInviteFromOrg.tsx similarity index 100% rename from packages/features/ee/organizations/components/TeamInviteFromOrg.tsx rename to apps/web/modules/ee/organizations/components/TeamInviteFromOrg.tsx diff --git a/packages/features/ee/organizations/components/WelcomeToOrganizationsModal.tsx b/apps/web/modules/ee/organizations/components/WelcomeToOrganizationsModal.tsx similarity index 98% rename from packages/features/ee/organizations/components/WelcomeToOrganizationsModal.tsx rename to apps/web/modules/ee/organizations/components/WelcomeToOrganizationsModal.tsx index 9600dd66463b1f..dd262d500dd627 100644 --- a/packages/features/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 "../hooks/useWelcomeModal"; +import { useWelcomeModal } from "@calcom/features/ee/organizations/hooks/useWelcomeModal"; const features = [ "1_parent_team_unlimited_subteams", diff --git a/apps/web/modules/ee/organizations/general.tsx b/apps/web/modules/ee/organizations/general.tsx index 8fbbe163da0008..c59484ebe7e2e3 100644 --- a/apps/web/modules/ee/organizations/general.tsx +++ b/apps/web/modules/ee/organizations/general.tsx @@ -6,11 +6,11 @@ import { useEffect } from "react"; import { Controller, useForm } from "react-hook-form"; import { TimezoneSelect } from "@calcom/features/components/timezone-select"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; -import { DisableAutofillOnBookingPageSwitch } from "@calcom/features/ee/organizations/pages/components/DisableAutofillOnBookingPageSwitch"; -import { DisablePhoneOnlySMSNotificationsSwitch } from "@calcom/features/ee/organizations/pages/components/DisablePhoneOnlySMSNotificationsSwitch"; -import { LockEventTypeSwitch } from "@calcom/features/ee/organizations/pages/components/LockEventTypeSwitch"; -import { NoSlotsNotificationSwitch } from "@calcom/features/ee/organizations/pages/components/NoSlotsNotificationSwitch"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; +import { DisableAutofillOnBookingPageSwitch } from "~/ee/organizations/components/DisableAutofillOnBookingPageSwitch"; +import { DisablePhoneOnlySMSNotificationsSwitch } from "~/ee/organizations/components/DisablePhoneOnlySMSNotificationsSwitch"; +import { LockEventTypeSwitch } from "~/ee/organizations/components/LockEventTypeSwitch"; +import { NoSlotsNotificationSwitch } from "~/ee/organizations/components/NoSlotsNotificationSwitch"; import SectionBottomActions from "@calcom/features/settings/SectionBottomActions"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { nameOfDay } from "@calcom/lib/weekday"; diff --git a/apps/web/modules/ee/organizations/guest-notifications.tsx b/apps/web/modules/ee/organizations/guest-notifications.tsx index 8d33443b8073da..745f0b93b032d3 100644 --- a/apps/web/modules/ee/organizations/guest-notifications.tsx +++ b/apps/web/modules/ee/organizations/guest-notifications.tsx @@ -1,10 +1,10 @@ "use client"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; import { trpc } from "@calcom/trpc/react"; import { SkeletonContainer, SkeletonText, SkeletonButton } from "@calcom/ui/components/skeleton"; -import DisableGuestBookingEmailsSetting from "@calcom/features/ee/organizations/pages/components/DisableGuestBookingEmailsSetting"; +import DisableGuestBookingEmailsSetting from "~/ee/organizations/components/DisableGuestBookingEmailsSetting"; const SkeletonLoader = () => { return ( diff --git a/apps/web/modules/ee/organizations/new/about-view.tsx b/apps/web/modules/ee/organizations/new/about-view.tsx index 385d50a0841d2b..5ca1c7779217b3 100644 --- a/apps/web/modules/ee/organizations/new/about-view.tsx +++ b/apps/web/modules/ee/organizations/new/about-view.tsx @@ -1,6 +1,6 @@ "use client"; -import { AboutOrganizationForm } from "@calcom/features/ee/organizations/components"; +import { AboutOrganizationForm } from "~/ee/organizations/components/AboutOrganizationForm"; import { OrganizationWizardLayout } from "./_components/OrganizationWizardLayout"; diff --git a/apps/web/modules/ee/organizations/new/create-new-view.tsx b/apps/web/modules/ee/organizations/new/create-new-view.tsx index 0c479838353573..7931564ed2d684 100644 --- a/apps/web/modules/ee/organizations/new/create-new-view.tsx +++ b/apps/web/modules/ee/organizations/new/create-new-view.tsx @@ -1,6 +1,6 @@ "use client"; -import { CreateANewOrganizationForm } from "@calcom/features/ee/organizations/components"; +import { CreateANewOrganizationForm } from "~/ee/organizations/components/CreateANewOrganizationForm"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Alert } from "@calcom/ui/components/alert"; import { useGetUserAttributes } from "@calcom/web/components/settings/platform/hooks/useGetUserAttributes"; diff --git a/apps/web/modules/ee/organizations/new/onboarding-handover.tsx b/apps/web/modules/ee/organizations/new/onboarding-handover.tsx index 30d28ad75f7d43..44ed36513caf86 100644 --- a/apps/web/modules/ee/organizations/new/onboarding-handover.tsx +++ b/apps/web/modules/ee/organizations/new/onboarding-handover.tsx @@ -1,6 +1,6 @@ "use client"; -import { AdminOnboardingHandover } from "@calcom/features/ee/organizations/components"; +import { AdminOnboardingHandover } from "~/ee/organizations/components/AdminOnboardingHandover"; import { WizardLayout } from "@calcom/ui/components/layout"; export const LayoutWrapper = ({ children }: { children: React.ReactNode }) => { diff --git a/apps/web/modules/ee/organizations/other-team-members-view.tsx b/apps/web/modules/ee/organizations/other-team-members-view.tsx index c9d5a7bba3c99d..0936739b55d3ac 100644 --- a/apps/web/modules/ee/organizations/other-team-members-view.tsx +++ b/apps/web/modules/ee/organizations/other-team-members-view.tsx @@ -7,7 +7,7 @@ import { useRouter } from "next/navigation"; import { useState, useEffect } from "react"; import { checkAdminOrOwner } from "@calcom/features/auth/lib/checkAdminOrOwner"; -import MemberListItem from "@calcom/features/ee/organizations/pages/components/MemberListItem"; +import MemberListItem from "~/ee/organizations/components/MemberListItem"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { useParamsWithFallback } from "@calcom/lib/hooks/useParamsWithFallback"; import { CreationSource } from "@calcom/prisma/enums"; diff --git a/apps/web/modules/ee/organizations/privacy.tsx b/apps/web/modules/ee/organizations/privacy.tsx index 62caa7f807de93..4c992581ea8744 100644 --- a/apps/web/modules/ee/organizations/privacy.tsx +++ b/apps/web/modules/ee/organizations/privacy.tsx @@ -4,8 +4,8 @@ import { usePathname } from "next/navigation"; import { DataTableProvider } from "@calcom/features/data-table"; import { useSegments } from "@calcom/features/data-table/hooks/useSegments"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; -import OrgAutoJoinSetting from "@calcom/features/ee/organizations/pages/components/OrgAutoJoinSetting"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; +import OrgAutoJoinSetting from "~/ee/organizations/components/OrgAutoJoinSetting"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; diff --git a/apps/web/modules/ee/organizations/privacy/blocklist-table.tsx b/apps/web/modules/ee/organizations/privacy/blocklist-table.tsx index fce84cdf134ae9..f3f1900e633ee8 100644 --- a/apps/web/modules/ee/organizations/privacy/blocklist-table.tsx +++ b/apps/web/modules/ee/organizations/privacy/blocklist-table.tsx @@ -2,7 +2,7 @@ import { useState } from "react"; -import { DataTableToolbar } from "@calcom/features/data-table"; +import { DataTableToolbar } from "~/data-table/components"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Button } from "@calcom/ui/components/button"; import { ToggleGroup } from "@calcom/ui/components/form"; diff --git a/apps/web/modules/ee/organizations/privacy/components/blocked-entries-table.tsx b/apps/web/modules/ee/organizations/privacy/components/blocked-entries-table.tsx index 82d4a9b99afbae..6da3f56b9a94a9 100644 --- a/apps/web/modules/ee/organizations/privacy/components/blocked-entries-table.tsx +++ b/apps/web/modules/ee/organizations/privacy/components/blocked-entries-table.tsx @@ -4,7 +4,8 @@ import { keepPreviousData } from "@tanstack/react-query"; import { getCoreRowModel, getSortedRowModel, useReactTable } from "@tanstack/react-table"; import { useMemo, useState } from "react"; -import { DataTableWrapper, useDataTable } from "@calcom/features/data-table"; +import { useDataTable } from "@calcom/features/data-table"; +import { DataTableWrapper } from "~/data-table/components"; import { IS_CALCOM } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; diff --git a/apps/web/modules/ee/organizations/privacy/components/pending-reports-table.tsx b/apps/web/modules/ee/organizations/privacy/components/pending-reports-table.tsx index 13ef58452a23aa..d4ab742aa37fcb 100644 --- a/apps/web/modules/ee/organizations/privacy/components/pending-reports-table.tsx +++ b/apps/web/modules/ee/organizations/privacy/components/pending-reports-table.tsx @@ -4,7 +4,8 @@ import { keepPreviousData } from "@tanstack/react-query"; import { getCoreRowModel, getSortedRowModel, useReactTable } from "@tanstack/react-table"; import { useMemo, useState } from "react"; -import { DataTableWrapper, useDataTable } from "@calcom/features/data-table"; +import { useDataTable } from "@calcom/features/data-table"; +import { DataTableWrapper } from "~/data-table/components"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import type { RouterOutputs } from "@calcom/trpc/react"; diff --git a/apps/web/modules/ee/organizations/profile.tsx b/apps/web/modules/ee/organizations/profile.tsx index 0cb3433a6c218a..a052b39f93a158 100644 --- a/apps/web/modules/ee/organizations/profile.tsx +++ b/apps/web/modules/ee/organizations/profile.tsx @@ -6,7 +6,7 @@ import { useEffect, useLayoutEffect, useState } from "react"; import { Controller, useForm } from "react-hook-form"; import { z } from "zod"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; import { useOrgBranding } from "@calcom/features/ee/organizations/context/provider"; import { subdomainSuffix } from "@calcom/features/ee/organizations/lib/orgDomains"; import SectionBottomActions from "@calcom/features/settings/SectionBottomActions"; diff --git a/packages/features/ee/platform/components/CreateANewPlatformForm.tsx b/apps/web/modules/ee/platform/components/CreateANewPlatformForm.tsx similarity index 96% rename from packages/features/ee/platform/components/CreateANewPlatformForm.tsx rename to apps/web/modules/ee/platform/components/CreateANewPlatformForm.tsx index 48344baa89289b..46ed0fe6be4831 100644 --- a/packages/features/ee/platform/components/CreateANewPlatformForm.tsx +++ b/apps/web/modules/ee/platform/components/CreateANewPlatformForm.tsx @@ -7,8 +7,7 @@ import { useState } from "react"; import { Controller, useForm } from "react-hook-form"; import { uuid } from "short-uuid"; -import { deriveOrgNameFromEmail } from "@calcom/ee/organizations/components/CreateANewOrganizationForm"; -import { deriveSlugFromEmail } from "@calcom/ee/organizations/components/CreateANewOrganizationForm"; +import { deriveOrgNameFromEmail, deriveSlugFromEmail } from "~/ee/organizations/components/CreateANewOrganizationForm"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import slugify from "@calcom/lib/slugify"; import { UserPermissionRole } from "@calcom/prisma/enums"; diff --git a/packages/features/ee/platform/pages/settings/members.tsx b/apps/web/modules/ee/platform/views/members.tsx similarity index 100% rename from packages/features/ee/platform/pages/settings/members.tsx rename to apps/web/modules/ee/platform/views/members.tsx diff --git a/packages/features/ee/sso/components/ConnectionInfo.tsx b/apps/web/modules/ee/sso/components/ConnectionInfo.tsx similarity index 99% rename from packages/features/ee/sso/components/ConnectionInfo.tsx rename to apps/web/modules/ee/sso/components/ConnectionInfo.tsx index 687b0e474bdeb0..54aa01e372f8ee 100644 --- a/packages/features/ee/sso/components/ConnectionInfo.tsx +++ b/apps/web/modules/ee/sso/components/ConnectionInfo.tsx @@ -1,3 +1,5 @@ +"use client"; + import type { SSOConnection } from "@calcom/ee/sso/lib/saml"; import { Dialog } from "@calcom/features/components/controlled-dialog"; import { APP_NAME } from "@calcom/lib/constants"; diff --git a/packages/features/ee/sso/components/OIDCConnection.tsx b/apps/web/modules/ee/sso/components/OIDCConnection.tsx similarity index 99% rename from packages/features/ee/sso/components/OIDCConnection.tsx rename to apps/web/modules/ee/sso/components/OIDCConnection.tsx index 0e78a65fc203fd..fd38ca0ae48a88 100644 --- a/packages/features/ee/sso/components/OIDCConnection.tsx +++ b/apps/web/modules/ee/sso/components/OIDCConnection.tsx @@ -1,3 +1,5 @@ +"use client"; + import { useState } from "react"; import { Controller, useForm } from "react-hook-form"; diff --git a/packages/features/ee/sso/components/SAMLConnection.tsx b/apps/web/modules/ee/sso/components/SAMLConnection.tsx similarity index 99% rename from packages/features/ee/sso/components/SAMLConnection.tsx rename to apps/web/modules/ee/sso/components/SAMLConnection.tsx index 6e233f41c66edf..6c42da590b0348 100644 --- a/packages/features/ee/sso/components/SAMLConnection.tsx +++ b/apps/web/modules/ee/sso/components/SAMLConnection.tsx @@ -1,3 +1,5 @@ +"use client"; + import { useState } from "react"; import { Controller, useForm } from "react-hook-form"; diff --git a/packages/features/ee/sso/components/SSOConfiguration.tsx b/apps/web/modules/ee/sso/components/SSOConfiguration.tsx similarity index 85% rename from packages/features/ee/sso/components/SSOConfiguration.tsx rename to apps/web/modules/ee/sso/components/SSOConfiguration.tsx index f893518f0ce58b..0dda515cdde31e 100644 --- a/packages/features/ee/sso/components/SSOConfiguration.tsx +++ b/apps/web/modules/ee/sso/components/SSOConfiguration.tsx @@ -1,7 +1,9 @@ -import ConnectionInfo from "@calcom/ee/sso/components/ConnectionInfo"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; -import OIDCConnection from "@calcom/features/ee/sso/components/OIDCConnection"; -import SAMLConnection from "@calcom/features/ee/sso/components/SAMLConnection"; +"use client"; + +import ConnectionInfo from "./ConnectionInfo"; +import OIDCConnection from "./OIDCConnection"; +import SAMLConnection from "./SAMLConnection"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import { Alert } from "@calcom/ui/components/alert"; diff --git a/packages/features/ee/sso/page/orgs-sso-view.tsx b/apps/web/modules/ee/sso/views/orgs-sso-view.tsx similarity index 90% rename from packages/features/ee/sso/page/orgs-sso-view.tsx rename to apps/web/modules/ee/sso/views/orgs-sso-view.tsx index bbf5b22b996af8..eadf6ff0f806e0 100644 --- a/packages/features/ee/sso/page/orgs-sso-view.tsx +++ b/apps/web/modules/ee/sso/views/orgs-sso-view.tsx @@ -2,7 +2,7 @@ import { useSession } from "next-auth/react"; -import { SkeletonLoader } from "@calcom/features/apps/components/SkeletonLoader"; +import { SkeletonLoader } from "@calcom/web/modules/apps/components/SkeletonLoader"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import SSOConfiguration from "../components/SSOConfiguration"; diff --git a/packages/features/ee/sso/page/user-sso-view.tsx b/apps/web/modules/ee/sso/views/user-sso-view.tsx similarity index 100% rename from packages/features/ee/sso/page/user-sso-view.tsx rename to apps/web/modules/ee/sso/views/user-sso-view.tsx diff --git a/apps/web/modules/ee/teams/components/DeleteBulkTeamMembers.tsx b/apps/web/modules/ee/teams/components/DeleteBulkTeamMembers.tsx index a3ed1b16f78e26..2d60af46eab162 100644 --- a/apps/web/modules/ee/teams/components/DeleteBulkTeamMembers.tsx +++ b/apps/web/modules/ee/teams/components/DeleteBulkTeamMembers.tsx @@ -1,5 +1,5 @@ import { Dialog } from "@calcom/features/components/controlled-dialog"; -import { DataTableSelectionBar } from "@calcom/features/data-table"; +import { DataTableSelectionBar } from "~/data-table/components"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import type { RouterOutputs } from "@calcom/trpc/react"; diff --git a/apps/web/modules/ee/teams/components/EventTypesList.tsx b/apps/web/modules/ee/teams/components/EventTypesList.tsx index 48bafb0b780050..88406c338764ba 100644 --- a/apps/web/modules/ee/teams/components/EventTypesList.tsx +++ b/apps/web/modules/ee/teams/components/EventTypesList.tsx @@ -2,7 +2,7 @@ import type { Table } from "@tanstack/react-table"; import type { Dispatch, SetStateAction } from "react"; import { useState, Fragment } from "react"; -import { DataTableSelectionBar } from "@calcom/features/data-table"; +import { DataTableSelectionBar } from "~/data-table/components"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { SchedulingType } from "@calcom/prisma/enums"; import { trpc } from "@calcom/trpc/react"; diff --git a/apps/web/modules/ee/teams/components/MemberInvitationModal.tsx b/apps/web/modules/ee/teams/components/MemberInvitationModal.tsx index 531635316a976a..983e477421c191 100644 --- a/apps/web/modules/ee/teams/components/MemberInvitationModal.tsx +++ b/apps/web/modules/ee/teams/components/MemberInvitationModal.tsx @@ -4,7 +4,7 @@ import type { FormEvent } from "react"; import { useMemo, useRef, useState } from "react"; import { Controller, useForm } from "react-hook-form"; -import TeamInviteFromOrg from "@calcom/ee/organizations/components/TeamInviteFromOrg"; +import TeamInviteFromOrg from "~/ee/organizations/components/TeamInviteFromOrg"; import { checkAdminOrOwner } from "@calcom/features/auth/lib/checkAdminOrOwner"; import { Dialog } from "@calcom/features/components/controlled-dialog"; import type { PendingMember } from "@calcom/features/ee/teams/lib/types"; diff --git a/apps/web/modules/ee/teams/components/MemberList.tsx b/apps/web/modules/ee/teams/components/MemberList.tsx index 33b7f7e238b362..e3494f48c77897 100644 --- a/apps/web/modules/ee/teams/components/MemberList.tsx +++ b/apps/web/modules/ee/teams/components/MemberList.tsx @@ -20,15 +20,12 @@ import type { Dispatch, SetStateAction } from "react"; import { Dialog } from "@calcom/features/components/controlled-dialog"; import { DataTableProvider, - DataTableToolbar, - DataTableFilters, - DataTableWrapper, - DataTableSelectionBar, useDataTable, useFetchMoreOnBottomReached, useColumnFilters, convertFacetedValuesToMap, } from "@calcom/features/data-table"; +import { DataTableToolbar, DataTableFilters, DataTableWrapper, DataTableSelectionBar } from "~/data-table/components"; import { useOrgBranding } from "@calcom/features/ee/organizations/context/provider"; import { WEBAPP_URL } from "@calcom/lib/constants"; import { getUserAvatarUrl } from "@calcom/lib/getAvatarUrl"; diff --git a/apps/web/modules/ee/teams/components/TeamAvailabilityModal.tsx b/apps/web/modules/ee/teams/components/TeamAvailabilityModal.tsx index a55721bb66a05e..6b41947c4d8de2 100644 --- a/apps/web/modules/ee/teams/components/TeamAvailabilityModal.tsx +++ b/apps/web/modules/ee/teams/components/TeamAvailabilityModal.tsx @@ -3,7 +3,7 @@ import { useEffect, useState } from "react"; import dayjs from "@calcom/dayjs"; import { TimezoneSelect } from "@calcom/features/components/timezone-select"; import type { ITimezone } from "@calcom/features/components/timezone-select"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; import { WEBAPP_URL } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { CURRENT_TIMEZONE } from "@calcom/lib/timezoneConstants"; diff --git a/apps/web/modules/ee/teams/views/team-appearance-view.tsx b/apps/web/modules/ee/teams/views/team-appearance-view.tsx index 6e03bee517733b..b4d4f08f875c76 100644 --- a/apps/web/modules/ee/teams/views/team-appearance-view.tsx +++ b/apps/web/modules/ee/teams/views/team-appearance-view.tsx @@ -5,8 +5,8 @@ import { useState, useEffect } from "react"; import { useForm } from "react-hook-form"; import { checkAdminOrOwner } from "@calcom/features/auth/lib/checkAdminOrOwner"; -import BrandColorsForm from "@calcom/features/ee/components/BrandColorsForm"; -import { AppearanceSkeletonLoader } from "@calcom/features/ee/components/CommonSkeletonLoaders"; +import BrandColorsForm from "~/ee/common/components/BrandColorsForm"; +import { AppearanceSkeletonLoader } from "~/ee/common/components/CommonSkeletonLoaders"; import SectionBottomActions from "@calcom/features/settings/SectionBottomActions"; import ThemeLabel from "@calcom/features/settings/ThemeLabel"; import { APP_NAME } from "@calcom/lib/constants"; diff --git a/apps/web/modules/ee/teams/views/team-members-view.tsx b/apps/web/modules/ee/teams/views/team-members-view.tsx index 69b34ec8079d29..6cb88bf86c8c23 100644 --- a/apps/web/modules/ee/teams/views/team-members-view.tsx +++ b/apps/web/modules/ee/teams/views/team-members-view.tsx @@ -2,7 +2,7 @@ import { useState } from "react"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { RouterOutputs } from "@calcom/trpc/react"; import type { MemberPermissions } from "@calcom/web/modules/users/components/UserTable/types"; diff --git a/apps/web/modules/ee/teams/views/team-settings-view.tsx b/apps/web/modules/ee/teams/views/team-settings-view.tsx index 9f330660bc97e0..c82780a0394ddf 100644 --- a/apps/web/modules/ee/teams/views/team-settings-view.tsx +++ b/apps/web/modules/ee/teams/views/team-settings-view.tsx @@ -6,7 +6,7 @@ import { useEffect } from "react"; import { useForm, Controller } from "react-hook-form"; import { checkAdminOrOwner } from "@calcom/features/auth/lib/checkAdminOrOwner"; -import { AppearanceSkeletonLoader } from "@calcom/features/ee/components/CommonSkeletonLoaders"; +import { AppearanceSkeletonLoader } from "~/ee/common/components/CommonSkeletonLoaders"; import SectionBottomActions from "@calcom/features/settings/SectionBottomActions"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { useParamsWithFallback } from "@calcom/lib/hooks/useParamsWithFallback"; diff --git a/packages/features/ee/users/components/UserForm.tsx b/apps/web/modules/ee/users/components/UserForm.tsx similarity index 99% rename from packages/features/ee/users/components/UserForm.tsx rename to apps/web/modules/ee/users/components/UserForm.tsx index 288db9ea8ce4de..d4fa30c52c4513 100644 --- a/packages/features/ee/users/components/UserForm.tsx +++ b/apps/web/modules/ee/users/components/UserForm.tsx @@ -1,3 +1,5 @@ +"use client"; + import { noop } from "lodash"; import { Controller, useForm } from "react-hook-form"; diff --git a/packages/features/ee/users/components/UsersTable.tsx b/apps/web/modules/ee/users/components/UsersTable.tsx similarity index 99% rename from packages/features/ee/users/components/UsersTable.tsx rename to apps/web/modules/ee/users/components/UsersTable.tsx index c62d3551241212..b24a6384d07e25 100644 --- a/packages/features/ee/users/components/UsersTable.tsx +++ b/apps/web/modules/ee/users/components/UsersTable.tsx @@ -1,3 +1,5 @@ +"use client"; + import { keepPreviousData } from "@tanstack/react-query"; import { signIn } from "next-auth/react"; import { useRouter } from "next/navigation"; @@ -22,7 +24,7 @@ import { Icon } from "@calcom/ui/components/icon"; import { DropdownActions, Table } from "@calcom/ui/components/table"; import { showToast } from "@calcom/ui/components/toast"; -import { withLicenseRequired } from "../../common/components/LicenseRequired"; +import { withLicenseRequired } from "~/ee/common/components/LicenseRequired"; const { Cell, ColumnTitle, Header, Row } = Table; diff --git a/packages/features/ee/users/pages/users-add-view.tsx b/apps/web/modules/ee/users/views/users-add-view.tsx similarity index 89% rename from packages/features/ee/users/pages/users-add-view.tsx rename to apps/web/modules/ee/users/views/users-add-view.tsx index a3ba67045e7d75..0d4ffa18353608 100644 --- a/packages/features/ee/users/pages/users-add-view.tsx +++ b/apps/web/modules/ee/users/views/users-add-view.tsx @@ -6,9 +6,9 @@ import { getParserWithGeneric } from "@calcom/prisma/zod-utils"; import { trpc } from "@calcom/trpc/react"; import { showToast } from "@calcom/ui/components/toast"; -import LicenseRequired from "../../common/components/LicenseRequired"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; +import { userBodySchema } from "@calcom/features/ee/users/schemas/userBodySchema"; import { UserForm } from "../components/UserForm"; -import { userBodySchema } from "../schemas/userBodySchema"; const UsersAddView = () => { const pathname = usePathname(); diff --git a/packages/features/ee/users/pages/users-edit-view.tsx b/apps/web/modules/ee/users/views/users-edit-view.tsx similarity index 95% rename from packages/features/ee/users/pages/users-edit-view.tsx rename to apps/web/modules/ee/users/views/users-edit-view.tsx index d7bf00545bfe79..d6dda837388e83 100644 --- a/packages/features/ee/users/pages/users-edit-view.tsx +++ b/apps/web/modules/ee/users/views/users-edit-view.tsx @@ -6,8 +6,8 @@ import { getParserWithGeneric } from "@calcom/prisma/zod-utils"; import { trpc } from "@calcom/trpc/react"; import { showToast } from "@calcom/ui/components/toast"; +import { userBodySchema } from "@calcom/features/ee/users/schemas/userBodySchema"; import { UserForm } from "../components/UserForm"; -import { userBodySchema } from "../schemas/userBodySchema"; interface User { id: number; diff --git a/packages/features/ee/users/pages/users-listing-view.tsx b/apps/web/modules/ee/users/views/users-listing-view.tsx similarity index 100% rename from packages/features/ee/users/pages/users-listing-view.tsx rename to apps/web/modules/ee/users/views/users-listing-view.tsx diff --git a/packages/features/ee/video/MeetingSessionDetailsDialog.tsx b/apps/web/modules/ee/video/components/MeetingSessionDetailsDialog.tsx similarity index 100% rename from packages/features/ee/video/MeetingSessionDetailsDialog.tsx rename to apps/web/modules/ee/video/components/MeetingSessionDetailsDialog.tsx diff --git a/apps/web/modules/ee/video/ViewRecordingsDialog.tsx b/apps/web/modules/ee/video/components/ViewRecordingsDialog.tsx similarity index 97% rename from apps/web/modules/ee/video/ViewRecordingsDialog.tsx rename to apps/web/modules/ee/video/components/ViewRecordingsDialog.tsx index 0e57bf1dd76c69..0e4b04c13d7044 100644 --- a/apps/web/modules/ee/video/ViewRecordingsDialog.tsx +++ b/apps/web/modules/ee/video/components/ViewRecordingsDialog.tsx @@ -5,7 +5,7 @@ import { Suspense, useEffect, useState } from "react"; import dayjs from "@calcom/dayjs"; import { Dialog } from "@calcom/features/components/controlled-dialog"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { RecordingItemSchema } from "@calcom/prisma/zod-utils"; import type { RouterOutputs } from "@calcom/trpc/react"; @@ -15,7 +15,7 @@ import { Button } from "@calcom/ui/components/button"; import { DialogContent, DialogFooter, DialogHeader, DialogClose } from "@calcom/ui/components/dialog"; import { useHasTeamPlan } from "@calcom/web/modules/billing/hooks/useHasPaidPlan"; -import RecordingListSkeleton from "./components/RecordingListSkeleton"; +import RecordingListSkeleton from "./RecordingListSkeleton"; type BookingItem = RouterOutputs["viewer"]["bookings"]["get"]["bookings"][number]; diff --git a/apps/web/modules/ee/workflows/components/VoiceSelectionDialog.tsx b/apps/web/modules/ee/workflows/components/VoiceSelectionDialog.tsx index 0017c01250f4c7..7a372357bc10d8 100644 --- a/apps/web/modules/ee/workflows/components/VoiceSelectionDialog.tsx +++ b/apps/web/modules/ee/workflows/components/VoiceSelectionDialog.tsx @@ -2,7 +2,8 @@ import { getCoreRowModel, getSortedRowModel, useReactTable, type ColumnDef } fro import { usePathname } from "next/navigation"; import { useMemo, useState, useCallback } from "react"; -import { DataTableProvider, DataTableWrapper } from "@calcom/features/data-table"; +import { DataTableProvider } from "@calcom/features/data-table"; +import { DataTableWrapper } from "~/data-table/components"; import { useSegments } from "@calcom/features/data-table/hooks/useSegments"; import { useVoicePreview } from "@calcom/features/ee/workflows/hooks/useVoicePreview"; import { useLocale } from "@calcom/lib/hooks/useLocale"; diff --git a/apps/web/modules/ee/workflows/views/WorkflowPage.tsx b/apps/web/modules/ee/workflows/views/WorkflowPage.tsx index aa33da46ce66f0..ba6dca4e205a6d 100644 --- a/apps/web/modules/ee/workflows/views/WorkflowPage.tsx +++ b/apps/web/modules/ee/workflows/views/WorkflowPage.tsx @@ -7,7 +7,7 @@ import { useEffect, useState } from "react"; import { useForm, useWatch } from "react-hook-form"; import { Toaster } from "sonner"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; import { isSMSAction, isSMSOrWhatsappAction, diff --git a/apps/web/modules/ee/workflows/views/WorkflowsPage.tsx b/apps/web/modules/ee/workflows/views/WorkflowsPage.tsx index c6a20b06994b87..78841ddc98847f 100644 --- a/apps/web/modules/ee/workflows/views/WorkflowsPage.tsx +++ b/apps/web/modules/ee/workflows/views/WorkflowsPage.tsx @@ -5,7 +5,7 @@ import { useRouter } from "next/navigation"; import type { Dispatch, SetStateAction } from "react"; import { useState } from "react"; -import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; +import LicenseRequired from "~/ee/common/components/LicenseRequired"; import type { WorkflowRepository } from "@calcom/features/ee/workflows/repositories/WorkflowRepository"; import { FilterResults } from "@calcom/features/filters/components/FilterResults"; import { TeamsFilter } from "@calcom/features/filters/components/TeamsFilter"; diff --git a/packages/features/embed/Embed.tsx b/apps/web/modules/embed/components/Embed.tsx similarity index 98% rename from packages/features/embed/Embed.tsx rename to apps/web/modules/embed/components/Embed.tsx index 9f67d5a759ae27..62b312d41f7e3d 100644 --- a/packages/features/embed/Embed.tsx +++ b/apps/web/modules/embed/components/Embed.tsx @@ -10,7 +10,8 @@ import { shallow } from "zustand/shallow"; import type { Dayjs } from "@calcom/dayjs"; import dayjs from "@calcom/dayjs"; -import { AvailableTimes, AvailableTimesHeader } from "@calcom/features/bookings"; +import { AvailableTimes } from "@calcom/web/modules/bookings/components/AvailableTimes"; +import { AvailableTimesHeader } from "@calcom/web/modules/bookings/components/AvailableTimesHeader"; import { BookerStoreProvider, useInitializeBookerStoreContext, @@ -41,14 +42,14 @@ import { Icon } from "@calcom/ui/components/icon"; import { HorizontalTabs } from "@calcom/ui/components/navigation"; import { showToast } from "@calcom/ui/components/toast"; -import { useBookerTime } from "../bookings/Booker/components/hooks/useBookerTime"; -import { EmbedTabName } from "./lib/EmbedTabs"; -import { buildCssVarsPerTheme } from "./lib/buildCssVarsPerTheme"; -import { EmbedTheme } from "./lib/constants"; -import { getDimension } from "./lib/getDimension"; -import { useEmbedDialogCtx } from "./lib/hooks/useEmbedDialogCtx"; -import { useEmbedParams } from "./lib/hooks/useEmbedParams"; -import type { EmbedTabs, EmbedType, EmbedTypes, PreviewState, EmbedConfig } from "./types"; +import { useBookerTime } from "@calcom/features/bookings/Booker/components/hooks/useBookerTime"; +import { EmbedTabName } from "@calcom/features/embed/lib/EmbedTabs"; +import { buildCssVarsPerTheme } from "@calcom/features/embed/lib/buildCssVarsPerTheme"; +import { EmbedTheme } from "@calcom/features/embed/lib/constants"; +import { getDimension } from "@calcom/features/embed/lib/getDimension"; +import { useEmbedDialogCtx } from "@calcom/features/embed/lib/hooks/useEmbedDialogCtx"; +import { useEmbedParams } from "@calcom/features/embed/lib/hooks/useEmbedParams"; +import type { EmbedTabs, EmbedType, EmbedTypes, PreviewState, EmbedConfig } from "@calcom/features/embed/types"; type EventType = RouterOutputs["viewer"]["eventTypes"]["get"]["eventType"] | undefined; type EmbedDialogProps = { diff --git a/packages/features/embed/EventTypeEmbed.tsx b/apps/web/modules/embed/components/EventTypeEmbed.tsx similarity index 83% rename from packages/features/embed/EventTypeEmbed.tsx rename to apps/web/modules/embed/components/EventTypeEmbed.tsx index b71beea49fa648..3162536195f469 100644 --- a/packages/features/embed/EventTypeEmbed.tsx +++ b/apps/web/modules/embed/components/EventTypeEmbed.tsx @@ -3,8 +3,8 @@ import type { ComponentProps } from "react"; import { trpc } from "@calcom/trpc/react"; import { EmbedButton, EmbedDialog } from "./Embed"; -import { tabs } from "./lib/EmbedTabs"; -import { useEmbedTypes } from "./lib/hooks"; +import { tabs } from "@calcom/features/embed/lib/EmbedTabs"; +import { useEmbedTypes } from "@calcom/features/embed/lib/hooks"; export const EventTypeEmbedDialog = () => { const types = useEmbedTypes(); diff --git a/packages/features/embed/RoutingFormEmbed.tsx b/apps/web/modules/embed/components/RoutingFormEmbed.tsx similarity index 93% rename from packages/features/embed/RoutingFormEmbed.tsx rename to apps/web/modules/embed/components/RoutingFormEmbed.tsx index a1283aa16e0d15..23dbc75d4f15ec 100644 --- a/packages/features/embed/RoutingFormEmbed.tsx +++ b/apps/web/modules/embed/components/RoutingFormEmbed.tsx @@ -1,12 +1,12 @@ import type { ComponentProps } from "react"; -import { EmbedDialog, EmbedButton } from "@calcom/features/embed/Embed"; +import { EmbedDialog, EmbedButton } from "@calcom/web/modules/embed/components/Embed"; import { IS_CALCOM } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; -import { tabs } from "./lib/EmbedTabs"; -import { useEmbedTypes } from "./lib/hooks"; +import { tabs } from "@calcom/features/embed/lib/EmbedTabs"; +import { useEmbedTypes } from "@calcom/features/embed/lib/hooks"; export const RoutingFormEmbedDialog = () => { const types = useEmbedTypes(); diff --git a/packages/features/eventtypes/components/AddMembersWithSwitch.tsx b/apps/web/modules/event-types/components/AddMembersWithSwitch.tsx similarity index 100% rename from packages/features/eventtypes/components/AddMembersWithSwitch.tsx rename to apps/web/modules/event-types/components/AddMembersWithSwitch.tsx diff --git a/packages/features/eventtypes/components/AddVerifiedEmail.tsx b/apps/web/modules/event-types/components/AddVerifiedEmail.tsx similarity index 86% rename from packages/features/eventtypes/components/AddVerifiedEmail.tsx rename to apps/web/modules/event-types/components/AddVerifiedEmail.tsx index e147f12b796304..54a2aa31ae9044 100644 --- a/packages/features/eventtypes/components/AddVerifiedEmail.tsx +++ b/apps/web/modules/event-types/components/AddVerifiedEmail.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; -import { VerifyCodeDialog } from "@calcom/features/bookings/components/VerifyCodeDialog"; +import { VerifyCodeDialog } from "@calcom/web/modules/bookings/components/VerifyCodeDialog"; import { isValidEmail } from "@calcom/features/isValidEmail"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import classNames from "@calcom/ui/classNames"; @@ -8,10 +8,10 @@ import { Button } from "@calcom/ui/components/button"; import { TextField, Label } from "@calcom/ui/components/form"; import { Tooltip } from "@calcom/ui/components/tooltip"; -import { useAddVerifiedEmail } from "../../../platform/atoms/event-types/hooks/useAddVerifiedEmail"; -import { useGetVerifiedEmails } from "../../../platform/atoms/event-types/hooks/useGetVerifiedEmails"; -import { useVerifyCode } from "../../../platform/atoms/hooks/useVerifyCode"; -import { useVerifyEmail } from "../../../platform/atoms/hooks/useVerifyEmail"; +import { useAddVerifiedEmail } from "../../../../../packages/platform/atoms/event-types/hooks/useAddVerifiedEmail"; +import { useGetVerifiedEmails } from "../../../../../packages/platform/atoms/event-types/hooks/useGetVerifiedEmails"; +import { useVerifyCode } from "../../../../../packages/platform/atoms/hooks/useVerifyCode"; +import { useVerifyEmail } from "../../../../../packages/platform/atoms/hooks/useVerifyEmail"; type AddVerifiedEmailProps = { username?: string; diff --git a/packages/features/eventtypes/components/AssignAllTeamMembers.tsx b/apps/web/modules/event-types/components/AssignAllTeamMembers.tsx similarity index 100% rename from packages/features/eventtypes/components/AssignAllTeamMembers.tsx rename to apps/web/modules/event-types/components/AssignAllTeamMembers.tsx diff --git a/packages/features/eventtypes/components/BulkEditDefaultForEventsModal.tsx b/apps/web/modules/event-types/components/BulkEditDefaultForEventsModal.tsx similarity index 100% rename from packages/features/eventtypes/components/BulkEditDefaultForEventsModal.tsx rename to apps/web/modules/event-types/components/BulkEditDefaultForEventsModal.tsx diff --git a/packages/features/eventtypes/components/CheckedTeamSelect.tsx b/apps/web/modules/event-types/components/CheckedTeamSelect.tsx similarity index 100% rename from packages/features/eventtypes/components/CheckedTeamSelect.tsx rename to apps/web/modules/event-types/components/CheckedTeamSelect.tsx diff --git a/packages/features/eventtypes/components/CheckedUserSelect.tsx b/apps/web/modules/event-types/components/CheckedUserSelect.tsx similarity index 100% rename from packages/features/eventtypes/components/CheckedUserSelect.tsx rename to apps/web/modules/event-types/components/CheckedUserSelect.tsx diff --git a/packages/features/eventtypes/components/ChildrenEventTypeSelect.tsx b/apps/web/modules/event-types/components/ChildrenEventTypeSelect.tsx similarity index 100% rename from packages/features/eventtypes/components/ChildrenEventTypeSelect.tsx rename to apps/web/modules/event-types/components/ChildrenEventTypeSelect.tsx diff --git a/apps/web/modules/event-types/components/CreateEventTypeDialog.tsx b/apps/web/modules/event-types/components/CreateEventTypeDialog.tsx index 08defa76e96279..389c83a0ff9753 100644 --- a/apps/web/modules/event-types/components/CreateEventTypeDialog.tsx +++ b/apps/web/modules/event-types/components/CreateEventTypeDialog.tsx @@ -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/features/eventtypes/components/CreateEventTypeForm"; +import CreateEventTypeForm from "@calcom/web/modules/event-types/components/CreateEventTypeForm"; import { useCreateEventType } from "@calcom/features/eventtypes/hooks/useCreateEventType"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { useTypedQuery } from "@calcom/lib/hooks/useTypedQuery"; diff --git a/packages/features/eventtypes/components/CreateEventTypeForm.tsx b/apps/web/modules/event-types/components/CreateEventTypeForm.tsx similarity index 100% rename from packages/features/eventtypes/components/CreateEventTypeForm.tsx rename to apps/web/modules/event-types/components/CreateEventTypeForm.tsx diff --git a/packages/features/eventtypes/components/DuplicateDialog.tsx b/apps/web/modules/event-types/components/DuplicateDialog.tsx similarity index 100% rename from packages/features/eventtypes/components/DuplicateDialog.tsx rename to apps/web/modules/event-types/components/DuplicateDialog.tsx diff --git a/packages/features/eventtypes/components/EditWeightsForAllTeamMembers.tsx b/apps/web/modules/event-types/components/EditWeightsForAllTeamMembers.tsx similarity index 99% rename from packages/features/eventtypes/components/EditWeightsForAllTeamMembers.tsx rename to apps/web/modules/event-types/components/EditWeightsForAllTeamMembers.tsx index 9c026030ef3fcc..89f9db882e1293 100644 --- a/packages/features/eventtypes/components/EditWeightsForAllTeamMembers.tsx +++ b/apps/web/modules/event-types/components/EditWeightsForAllTeamMembers.tsx @@ -28,7 +28,7 @@ import { showToast } from "@calcom/ui/components/toast"; import { useTeamMembersWithSegment, useTeamMembersWithSegmentPlatform, -} from "../../../platform/atoms/event-types/hooks/useTeamMembersWithSegment"; +} from "../../../../../packages/platform/atoms/event-types/hooks/useTeamMembersWithSegment"; type TeamMemberItemProps = { member: Omit & { weight?: number }; diff --git a/packages/features/eventtypes/components/EmptyPage.tsx b/apps/web/modules/event-types/components/EmptyPage.tsx similarity index 100% rename from packages/features/eventtypes/components/EmptyPage.tsx rename to apps/web/modules/event-types/components/EmptyPage.tsx diff --git a/packages/features/eventtypes/components/EventType.tsx b/apps/web/modules/event-types/components/EventType.tsx similarity index 91% rename from packages/features/eventtypes/components/EventType.tsx rename to apps/web/modules/event-types/components/EventType.tsx index f365b448d28fc6..517b48b118e006 100644 --- a/packages/features/eventtypes/components/EventType.tsx +++ b/apps/web/modules/event-types/components/EventType.tsx @@ -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/features/eventtypes/components/ChildrenEventTypeSelect"; +import type { ChildrenEventType } from "@calcom/web/modules/event-types/components/ChildrenEventTypeSelect"; import type { TabMap, EventTypeSetupProps, @@ -46,8 +46,6 @@ const tabs = [ ] as const; export type EventTypeSetup = RouterOutputs["viewer"]["eventTypes"]["get"]["eventType"]; -export type EventTypeAssignedUsers = RouterOutputs["viewer"]["eventTypes"]["get"]["eventType"]["children"]; -export type EventTypeHosts = RouterOutputs["viewer"]["eventTypes"]["get"]["eventType"]["hosts"]; export type TeamMembers = RouterOutputs["viewer"]["eventTypes"]["get"]["teamMembers"]; export type EventTypeComponentProps = EventTypeSetupProps & { diff --git a/packages/features/eventtypes/components/EventTypeDescription.tsx b/apps/web/modules/event-types/components/EventTypeDescription.tsx similarity index 96% rename from packages/features/eventtypes/components/EventTypeDescription.tsx rename to apps/web/modules/event-types/components/EventTypeDescription.tsx index 023021f926e78a..eb65bc2d635184 100644 --- a/packages/features/eventtypes/components/EventTypeDescription.tsx +++ b/apps/web/modules/event-types/components/EventTypeDescription.tsx @@ -2,8 +2,8 @@ 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/features/bookings/components/event-meta/Price"; -import { PriceIcon } from "@calcom/features/bookings/components/event-meta/PriceIcon"; +import { Price } from "@calcom/web/modules/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"; import { markdownToSafeHTML } from "@calcom/lib/markdownToSafeHTML"; diff --git a/packages/features/eventtypes/components/EventTypeLayout.tsx b/apps/web/modules/event-types/components/EventTypeLayout.tsx similarity index 98% rename from packages/features/eventtypes/components/EventTypeLayout.tsx rename to apps/web/modules/event-types/components/EventTypeLayout.tsx index a6d67cb47f8315..7a28d747f9899a 100644 --- a/packages/features/eventtypes/components/EventTypeLayout.tsx +++ b/apps/web/modules/event-types/components/EventTypeLayout.tsx @@ -2,7 +2,7 @@ import { useMemo, useState, Suspense } from "react"; import type { UseFormReturn } from "react-hook-form"; import useLockedFieldsManager from "@calcom/features/ee/managed-event-types/hooks/useLockedFieldsManager"; -import { EventTypeEmbedButton, EventTypeEmbedDialog } from "@calcom/features/embed/EventTypeEmbed"; +import { EventTypeEmbedButton, EventTypeEmbedDialog } from "@calcom/web/modules/embed/components/EventTypeEmbed"; import type { FormValues } from "@calcom/features/eventtypes/lib/types"; import type { EventTypeSetupProps } from "@calcom/features/eventtypes/lib/types"; import { useLocale } from "@calcom/lib/hooks/useLocale"; @@ -29,7 +29,7 @@ import { showToast } from "@calcom/ui/components/toast"; import { Tooltip } from "@calcom/ui/components/tooltip"; import WebShell from "@calcom/web/modules/shell/Shell"; -import { Shell as PlatformShell } from "../../../platform/atoms/src/components/ui/shell"; +import { Shell as PlatformShell } from "../../../../../packages/platform/atoms/src/components/ui/shell"; import { DeleteDialog } from "./dialogs/DeleteDialog"; type Props = { diff --git a/packages/features/eventtypes/components/HostEditDialogs.tsx b/apps/web/modules/event-types/components/HostEditDialogs.tsx similarity index 100% rename from packages/features/eventtypes/components/HostEditDialogs.tsx rename to apps/web/modules/event-types/components/HostEditDialogs.tsx diff --git a/packages/features/eventtypes/components/LearnMoreLink.tsx b/apps/web/modules/event-types/components/LearnMoreLink.tsx similarity index 100% rename from packages/features/eventtypes/components/LearnMoreLink.tsx rename to apps/web/modules/event-types/components/LearnMoreLink.tsx diff --git a/packages/features/eventtypes/components/MultiDropdownSelect.tsx b/apps/web/modules/event-types/components/MultiDropdownSelect.tsx similarity index 59% rename from packages/features/eventtypes/components/MultiDropdownSelect.tsx rename to apps/web/modules/event-types/components/MultiDropdownSelect.tsx index b360fb7e0f04da..442a0962a4cc6c 100644 --- a/packages/features/eventtypes/components/MultiDropdownSelect.tsx +++ b/apps/web/modules/event-types/components/MultiDropdownSelect.tsx @@ -1,9 +1,14 @@ -import type { GroupBase, Props, ValueContainerProps } from "react-select"; +import type { CSSObjectWithLabel, GroupBase, Props, ValueContainerProps } from "react-select"; import { components } from "react-select"; import { Icon } from "@calcom/ui/components/icon"; import { Select } from "@calcom/ui/components/form"; +// Helper to merge react-select styles with type safety +const mergeStyles = (base: CSSObjectWithLabel, overrides: Record): CSSObjectWithLabel => { + return { ...base, ...overrides } as CSSObjectWithLabel; +}; + const LimitedChipsContainer = >({ children, ...props @@ -40,9 +45,8 @@ export const MultiDropdownSelect = ({ options = [], value = [], ...props }: Prop return (