Scheduling infrastructure for absolutely everyone.
perf: Remove app-store reference from @calcom/ui (#20188)
Keith Williams352d68ae1cc8
diff --git a/apps/web/components/apps/CalendarListContainer.tsx b/apps/web/components/apps/CalendarListContainer.tsxindex 1b54b1d3503..f1a95c7d248 100644--- a/apps/web/components/apps/CalendarListContainer.tsx+++ b/apps/web/components/apps/CalendarListContainer.tsx@@ -6,16 +6,14 @@ import { InstallAppButton } from "@calcom/app-store/components";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 { useLocale } from "@calcom/lib/hooks/useLocale";import { trpc } from "@calcom/trpc/react";-import {- Button,- EmptyScreen,- List,- ShellSubHeading,- AppSkeletonLoader as SkeletonLoader,- showToast,-} from "@calcom/ui";+import { Button } from "@calcom/ui/components/button";+import { EmptyScreen } from "@calcom/ui/components/empty-screen";+import { ShellSubHeading } from "@calcom/ui/components/layout";+import { List } from "@calcom/ui/components/list";+import { showToast } from "@calcom/ui/components/toast";import { QueryCell } from "@lib/QueryCell";import useRouterQuery from "@lib/hooks/useRouterQuery";diff --git a/apps/web/modules/apps/apps-view.tsx b/apps/web/modules/apps/apps-view.tsxindex 3aaadb75118..962507014d3 100644--- a/apps/web/modules/apps/apps-view.tsx+++ b/apps/web/modules/apps/apps-view.tsx@@ -3,17 +3,14 @@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 { useLocale } from "@calcom/lib/hooks/useLocale";import type { inferSSRProps } from "@calcom/types/inferSSRProps";import type { HorizontalTabItemProps } from "@calcom/ui";-import {- AllApps,- AppStoreCategories,- HorizontalTabs,- TextField,- PopularAppsSlider,- RecentAppsSlider,-} from "@calcom/ui";+import { HorizontalTabs, TextField } from "@calcom/ui";import { Icon } from "@calcom/ui";import classNames from "@calcom/ui/classNames";diff --git a/apps/web/modules/apps/categories/[category]/category-view.tsx b/apps/web/modules/apps/categories/[category]/category-view.tsxindex 6a6fec22ccb..8bbab69f244 100644--- a/apps/web/modules/apps/categories/[category]/category-view.tsx+++ b/apps/web/modules/apps/categories/[category]/category-view.tsx@@ -2,9 +2,10 @@import Link from "next/link";+import { AppCard } from "@calcom/features/apps/components/AppCard";import Shell from "@calcom/features/shell/Shell";import { useLocale } from "@calcom/lib/hooks/useLocale";-import { AppCard, SkeletonText } from "@calcom/ui";+import { SkeletonText } from "@calcom/ui";import type { CategoryDataProps } from "@lib/apps/categories/[category]/getStaticProps";diff --git a/apps/web/modules/apps/installed/[category]/installed-category-view.tsx b/apps/web/modules/apps/installed/[category]/installed-category-view.tsxindex d981d56cee9..479ada66703 100644--- a/apps/web/modules/apps/installed/[category]/installed-category-view.tsx+++ b/apps/web/modules/apps/installed/[category]/installed-category-view.tsx@@ -7,18 +7,13 @@ import { AppList, type HandleDisconnect } from "@calcom/features/apps/componentsimport 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 { useLocale } from "@calcom/lib/hooks/useLocale";import { AppCategories } from "@calcom/prisma/enums";import { trpc } from "@calcom/trpc/react";import type { Icon } from "@calcom/ui";-import {- AppSkeletonLoader as SkeletonLoader,- Button,- EmptyScreen,- ShellSubHeading,- showToast,-} from "@calcom/ui";+import { Button, EmptyScreen, ShellSubHeading, showToast } from "@calcom/ui";import { QueryCell } from "@lib/QueryCell";diff --git a/packages/ui/components/apps/AllApps.tsx b/packages/features/apps/components/AllApps.tsxsimilarity index 98%rename from packages/ui/components/apps/AllApps.tsxrename to packages/features/apps/components/AllApps.tsxindex 9b19b6a78cf..ea48e668fd0 100644--- a/packages/ui/components/apps/AllApps.tsx+++ b/packages/features/apps/components/AllApps.tsx@@ -10,9 +10,9 @@ import type { UserAdminTeams } from "@calcom/lib/server/repository/user";import type { AppFrontendPayload as App } from "@calcom/types/App";import type { CredentialFrontendPayload as Credential } from "@calcom/types/Credential";import classNames from "@calcom/ui/classNames";+import { EmptyScreen } from "@calcom/ui/components/empty-screen";+import { Icon } from "@calcom/ui/components/icon";-import { EmptyScreen } from "../empty-screen";-import { Icon } from "../icon";import { AppCard } from "./AppCard";export function useShouldShowArrows() {diff --git a/packages/ui/components/apps/AppCard.tsx b/packages/features/apps/components/AppCard.tsxsimilarity index 97%rename from packages/ui/components/apps/AppCard.tsxrename to packages/features/apps/components/AppCard.tsxindex fb3a01db167..4270971cfd8 100644--- a/packages/ui/components/apps/AppCard.tsx+++ b/packages/features/apps/components/AppCard.tsx@@ -14,11 +14,10 @@ import type { UserAdminTeams } from "@calcom/lib/server/repository/user";import type { AppFrontendPayload as App } from "@calcom/types/App";import type { CredentialFrontendPayload as Credential } from "@calcom/types/Credential";import classNames from "@calcom/ui/classNames";--import { Badge } from "../badge/Badge";-import type { ButtonProps } from "../button";-import { Button } from "../button";-import { showToast } from "../toast/showToast";+import { Badge } from "@calcom/ui/components/badge";+import { Button } from "@calcom/ui/components/button";+import type { ButtonProps } from "@calcom/ui/components/button";+import { showToast } from "@calcom/ui/components/toast";interface AppCardProps {app: App;diff --git a/packages/ui/components/apps/Categories.tsx b/packages/features/apps/components/Categories.tsxsimilarity index 94%rename from packages/ui/components/apps/Categories.tsxrename to packages/features/apps/components/Categories.tsxindex d465cfc9a2b..98abfab021e 100644--- a/packages/ui/components/apps/Categories.tsx+++ b/packages/features/apps/components/Categories.tsx@@ -2,9 +2,9 @@ import Image from "next/image";import Link from "next/link";import { useLocale } from "@calcom/lib/hooks/useLocale";+import { Icon } from "@calcom/ui/components/icon";+import { SkeletonText } from "@calcom/ui/components/skeleton";-import { Icon } from "../icon";-import { SkeletonText } from "../skeleton";import { Slider } from "./Slider";export function AppStoreCategories({diff --git a/packages/ui/components/apps/PopularAppsSlider.tsx b/packages/features/apps/components/PopularAppsSlider.tsxsimilarity index 100%rename from packages/ui/components/apps/PopularAppsSlider.tsxrename to packages/features/apps/components/PopularAppsSlider.tsxdiff --git a/packages/ui/components/apps/RecentAppsSlider.tsx b/packages/features/apps/components/RecentAppsSlider.tsxsimilarity index 100%rename from packages/ui/components/apps/RecentAppsSlider.tsxrename to packages/features/apps/components/RecentAppsSlider.tsxdiff --git a/packages/ui/components/apps/SkeletonLoader.tsx b/packages/features/apps/components/SkeletonLoader.tsxsimilarity index 90%rename from packages/ui/components/apps/SkeletonLoader.tsxrename to packages/features/apps/components/SkeletonLoader.tsxindex 6a0ca1debe1..1e965632574 100644--- a/packages/ui/components/apps/SkeletonLoader.tsx+++ b/packages/features/apps/components/SkeletonLoader.tsx@@ -1,5 +1,5 @@-import { ShellSubHeading } from "../layout";-import { SkeletonText } from "../skeleton";+import { ShellSubHeading } from "@calcom/ui/components/layout";+import { SkeletonText } from "@calcom/ui/components/skeleton";export function SkeletonLoader({ className }: { className?: string }) {return (diff --git a/packages/ui/components/apps/Slider.tsx b/packages/features/apps/components/Slider.tsxsimilarity index 95%rename from packages/ui/components/apps/Slider.tsxrename to packages/features/apps/components/Slider.tsxindex 69512fee5dc..bad9f0f78b8 100644--- a/packages/ui/components/apps/Slider.tsx+++ b/packages/features/apps/components/Slider.tsx@@ -8,9 +8,8 @@ import type { ComponentProps, FC } from "react";import { useEffect, useRef } from "react";import { useLocale } from "@calcom/lib/hooks/useLocale";--import { Icon } from "../icon";-import { SkeletonText } from "../skeleton";+import { Icon } from "@calcom/ui/components/icon";+import { SkeletonText } from "@calcom/ui/components/skeleton";const SliderButton: FC<ComponentProps<"button">> = (props) => {const { children, ...rest } = props;diff --git a/packages/ui/components/apps/_storybookData.ts b/packages/features/apps/components/_storybookData.tssimilarity index 100%rename from packages/ui/components/apps/_storybookData.tsrename to packages/features/apps/components/_storybookData.tsdiff --git a/packages/ui/components/apps/appCard.test.tsx b/packages/features/apps/components/appCard.test.tsxsimilarity index 100%rename from packages/ui/components/apps/appCard.test.tsxrename to packages/features/apps/components/appCard.test.tsxdiff --git a/packages/ui/components/apps/index.ts b/packages/features/apps/components/index.tssimilarity index 82%rename from packages/ui/components/apps/index.tsrename to packages/features/apps/components/index.tsindex dd595fdb9cf..a98918b3d59 100644--- a/packages/ui/components/apps/index.ts+++ b/packages/features/apps/components/index.ts@@ -1,7 +1,6 @@export { useShouldShowArrows, AllApps } from "./AllApps";export { AppCard } from "./AppCard";export { Slider } from "./Slider";-export { SkeletonLoader as AppSkeletonLoader } from "./SkeletonLoader";export { SkeletonLoader } from "./SkeletonLoader";export { PopularAppsSlider } from "./PopularAppsSlider";export { RecentAppsSlider } from "./RecentAppsSlider";diff --git a/packages/features/bookings/components/event-meta/Duration.tsx b/packages/features/bookings/components/event-meta/Duration.tsxindex 7d98f0e2c11..853364c6b48 100644--- a/packages/features/bookings/components/event-meta/Duration.tsx+++ b/packages/features/bookings/components/event-meta/Duration.tsx@@ -3,11 +3,12 @@ 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 { useBookerStore } from "@calcom/features/bookings/Booker/store";import type { BookerEvent } from "@calcom/features/bookings/types";import { useLocale } from "@calcom/lib/hooks/useLocale";-import { useShouldShowArrows, Icon } from "@calcom/ui";import classNames from "@calcom/ui/classNames";+import { Icon } from "@calcom/ui/components/icon";/** Render X mins as X hours or X hours Y mins instead of in minutes once >= 60 minutes */export const getDurationFormatted = (mins: number | undefined, t: TFunction) => {diff --git a/packages/features/ee/dsync/components/ConfigureDirectorySync.tsx b/packages/features/ee/dsync/components/ConfigureDirectorySync.tsxindex b6e4bfffea0..cac90f49890 100644--- a/packages/features/ee/dsync/components/ConfigureDirectorySync.tsx+++ b/packages/features/ee/dsync/components/ConfigureDirectorySync.tsx@@ -1,9 +1,9 @@import { useState } from "react";+import { SkeletonLoader } from "@calcom/features/apps/components/SkeletonLoader";import { useLocale } from "@calcom/lib/hooks/useLocale";import { trpc } from "@calcom/trpc/react";import {- AppSkeletonLoader as SkeletonLoader,Button,Dialog,DialogClose,diff --git a/packages/features/ee/dsync/page/team-dsync-view.tsx b/packages/features/ee/dsync/page/team-dsync-view.tsxindex 41b14cb54b2..c8a453ba2e1 100644--- a/packages/features/ee/dsync/page/team-dsync-view.tsx+++ b/packages/features/ee/dsync/page/team-dsync-view.tsx@@ -3,10 +3,11 @@import { useRouter } from "next/navigation";import { useEffect } from "react";+import { SkeletonLoader } from "@calcom/features/apps/components/SkeletonLoader";import { HOSTED_CAL_FEATURES } from "@calcom/lib/constants";import { useLocale } from "@calcom/lib/hooks/useLocale";import { trpc } from "@calcom/trpc/react";-import { SkeletonLoader, showToast } from "@calcom/ui";+import { showToast } from "@calcom/ui/components/toast";import ConfigureDirectorySync from "../components/ConfigureDirectorySync";diff --git a/packages/features/ee/sso/page/orgs-sso-view.tsx b/packages/features/ee/sso/page/orgs-sso-view.tsxindex 7db14ff84b0..8a700c9519f 100644--- a/packages/features/ee/sso/page/orgs-sso-view.tsx+++ b/packages/features/ee/sso/page/orgs-sso-view.tsx@@ -2,9 +2,9 @@import { useSession } from "next-auth/react";+import { SkeletonLoader } from "@calcom/features/apps/components/SkeletonLoader";import { useLocale } from "@calcom/lib/hooks/useLocale";import { MembershipRole } from "@calcom/prisma/enums";-import { AppSkeletonLoader as SkeletonLoader } from "@calcom/ui";import SSOConfiguration from "../components/SSOConfiguration";diff --git a/packages/ui/index.ts b/packages/ui/index.tsindex 4b852029ef7..471b7b11ddf 100644--- a/packages/ui/index.ts+++ b/packages/ui/index.ts@@ -60,17 +60,6 @@ export {export { RangeSlider } from "./components/form/slider/RangeSlider";export { RangeSliderPopover } from "./components/form/slider/RangeSliderPopover";-export {- AllApps,- AppCard,- AppSkeletonLoader,- SkeletonLoader,- Slider,- PopularAppsSlider,- RecentAppsSlider,- useShouldShowArrows,- AppStoreCategories,-} from "./components/apps";export { TopBanner } from "./components/top-banner";export type { TopBannerProps } from "./components/top-banner";export { AnimatedPopover, MeetingTimeInTimezones } from "./components/popover";diff --git a/packages/ui/package.json b/packages/ui/package.jsonindex 158804be88a..16d7e012ec9 100644--- a/packages/ui/package.json+++ b/packages/ui/package.json@@ -7,49 +7,47 @@"exports": {".": "./index.ts","./classNames": "./classNames.ts",- "./alert": "./components/alert/index.ts",- "./app-list-card": "./components/app-list-card/index.ts",- "./apps": "./components/apps/index.ts",- "./arrow-button": "./components/arrow-button/index.ts",- "./avatar": "./components/avatar/index.ts",- "./badge": "./components/badge/index.ts",- "./breadcrumb": "./components/breadcrumb/index.ts",- "./button": "./components/button/index.ts",- "./buttonGroup": "./components/buttonGroup/index.ts",- "./calendar-switch": "./components/calendar-switch/index.ts",- "./card": "./components/card/index.ts",- "./command": "./components/command/index.ts",- "./createButton": "./components/createButton/index.ts",- "./credits": "./components/credits/index.ts",- "./dialog": "./components/dialog/index.ts",- "./disconnect-calendar-integration": "./components/disconnect-calendar-integration/index.ts",- "./divider": "./components/divider/index.ts",- "./dropdown": "./components/dropdown/index.ts",- "./editable-heading": "./components/editable-heading/index.ts",- "./editor": "./components/editor/index.ts",- "./empty-screen": "./components/empty-screen/index.ts",- "./errorBoundary": "./components/errorBoundary/index.ts",- "./form": "./components/form/index.ts",- "./form/timezone-select": "./components/form/timezone-select/index.ts",- "./head-seo": "./components/head-seo/index.ts",- "./icon": "./components/icon/index.ts",- "./image-uploader": "./components/image-uploader/index.ts",- "./layout": "./components/layout/index.ts",- "./list": "./components/list/index.ts",- "./logo": "./components/logo/index.ts",- "./meta": "./components/meta/index.ts",- "./navigation": "./components/navigation/index.ts",- "./organization-banner": "./components/organization-banner/index.ts",- "./popover": "./components/popover/index.ts",- "./scrollable": "./components/scrollable/index.ts",- "./sheet": "./components/sheet/index.ts",- "./skeleton": "./components/skeleton/index.ts",- "./table": "./components/table/index.ts",- "./toast": "./components/toast/index.ts",- "./tooltip": "./components/tooltip/index.ts",- "./top-banner": "./components/top-banner/index.ts",- "./filter-select": "./components/filter-select/index.ts",- "./unpublished-entity/UnpublishedEntity": "./components/unpublished-entity/index.ts",+ "./components/alert": "./components/alert/index.ts",+ "./components/app-list-card": "./components/app-list-card/index.ts",+ "./components/apps": "./components/apps/index.ts",+ "./components/arrow-button": "./components/arrow-button/index.ts",+ "./components/avatar": "./components/avatar/index.ts",+ "./components/badge": "./components/badge/index.ts",+ "./components/breadcrumb": "./components/breadcrumb/index.ts",+ "./components/button": "./components/button/index.ts",+ "./components/buttonGroup": "./components/buttonGroup/index.ts",+ "./components/calendar-switch": "./components/calendar-switch/index.ts",+ "./components/card": "./components/card/index.ts",+ "./components/command": "./components/command/index.ts",+ "./components/createButton": "./components/createButton/index.ts",+ "./components/credits": "./components/credits/index.ts",+ "./components/dialog": "./components/dialog/index.ts",+ "./components/disconnect-calendar-integration": "./components/disconnect-calendar-integration/index.ts",+ "./components/divider": "./components/divider/index.ts",+ "./components/dropdown": "./components/dropdown/index.ts",+ "./components/editable-heading": "./components/editable-heading/index.ts",+ "./components/editor": "./components/editor/index.ts",+ "./components/empty-screen": "./components/empty-screen/index.ts",+ "./components/errorBoundary": "./components/errorBoundary/index.ts",+ "./components/form": "./components/form/index.ts",+ "./components/form/timezone-select": "./components/form/timezone-select/index.ts",+ "./components/head-seo": "./components/head-seo/index.ts",+ "./components/image-uploader": "./components/image-uploader/index.ts",+ "./components/layout": "./components/layout/index.ts",+ "./components/list": "./components/list/index.ts",+ "./components/logo": "./components/logo/index.ts",+ "./components/meta": "./components/meta/index.ts",+ "./components/navigation": "./components/navigation/index.ts",+ "./components/organization-banner": "./components/organization-banner/index.ts",+ "./components/popover": "./components/popover/index.ts",+ "./components/scrollable": "./components/scrollable/index.ts",+ "./components/sheet": "./components/sheet/index.ts",+ "./components/skeleton": "./components/skeleton/index.ts",+ "./components/table": "./components/table/index.ts",+ "./components/toast": "./components/toast/index.ts",+ "./components/tooltip": "./components/tooltip/index.ts",+ "./components/top-banner": "./components/top-banner/index.ts",+ "./components/filter-select": "./components/filter-select/index.ts","./components/icon": "./components/icon/index.ts","./components/icon/SatSymbol": "./components/icon/SatSymbol.tsx","./components/icon/Spinner": "./components/icon/Spinner.tsx",