No more modules folder 🔥 (#6158)
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
This commit is contained in:
parent
2fe9c782d4
commit
9d0cf6be0b
|
@ -17,6 +17,7 @@ import {
|
|||
useIsBackgroundTransparent,
|
||||
useIsEmbed,
|
||||
} from "@calcom/embed-core/embed-iframe";
|
||||
import DatePicker from "@calcom/features/calendars/DatePicker";
|
||||
import CustomBranding from "@calcom/lib/CustomBranding";
|
||||
import classNames from "@calcom/lib/classNames";
|
||||
import getStripeAppData from "@calcom/lib/getStripeAppData";
|
||||
|
@ -27,7 +28,7 @@ import { getRecurringFreq } from "@calcom/lib/recurringStrings";
|
|||
import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@calcom/lib/telemetry";
|
||||
import { detectBrowserTimeFormat, setIs24hClockInLocalStorage, TimeFormat } from "@calcom/lib/timeFormat";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import { Icon, DatePicker } from "@calcom/ui";
|
||||
import { Icon } from "@calcom/ui";
|
||||
|
||||
import { timeZone as localStorageTimeZone } from "@lib/clock";
|
||||
import useRouterQuery from "@lib/hooks/useRouterQuery";
|
||||
|
|
|
@ -6,13 +6,13 @@ import short from "short-uuid";
|
|||
import { v5 as uuidv5 } from "uuid";
|
||||
|
||||
import DestinationCalendarSelector from "@calcom/features/calendars/DestinationCalendarSelector";
|
||||
import CustomInputItem from "@calcom/features/eventtypes/components/CustomInputItem";
|
||||
import { APP_NAME, CAL_URL } from "@calcom/lib/constants";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import {
|
||||
Button,
|
||||
Checkbox,
|
||||
CustomInputItem,
|
||||
Dialog,
|
||||
DialogClose,
|
||||
DialogContent,
|
||||
|
|
|
@ -3,9 +3,10 @@ import { EventTypeSetupInfered, FormValues } from "pages/event-types/[type]";
|
|||
import { useMemo } from "react";
|
||||
import { Controller, useFormContext } from "react-hook-form";
|
||||
|
||||
import CheckedTeamSelect from "@calcom/features/eventtypes/components/CheckedTeamSelect";
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { Avatar, Button, CheckedTeamSelect, Icon, Label, Select } from "@calcom/ui";
|
||||
import { Avatar, Button, Icon, Label, Select } from "@calcom/ui";
|
||||
|
||||
interface IMemberToValue {
|
||||
id: number | null;
|
||||
|
|
|
@ -12,6 +12,7 @@ import {
|
|||
useEmbedStyles,
|
||||
useIsEmbed,
|
||||
} from "@calcom/embed-core/embed-iframe";
|
||||
import { EventTypeDescriptionLazy as EventTypeDescription } from "@calcom/features/eventtypes/components";
|
||||
import EmptyPage from "@calcom/features/eventtypes/components/EmptyPage";
|
||||
import CustomBranding from "@calcom/lib/CustomBranding";
|
||||
import defaultEvents, {
|
||||
|
@ -26,7 +27,7 @@ import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@calco
|
|||
import prisma from "@calcom/prisma";
|
||||
import { baseEventTypeSelect } from "@calcom/prisma/selects";
|
||||
import { EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils";
|
||||
import { BadgeCheckIcon, EventTypeDescriptionLazy as EventTypeDescription, Icon } from "@calcom/ui";
|
||||
import { BadgeCheckIcon, Icon } from "@calcom/ui";
|
||||
|
||||
import { inferSSRProps } from "@lib/types/inferSSRProps";
|
||||
import { EmbedProps } from "@lib/withEmbedSsr";
|
||||
|
|
|
@ -7,12 +7,13 @@ import { useState } from "react";
|
|||
import { FormProvider, useForm } from "react-hook-form";
|
||||
import { FaGoogle } from "react-icons/fa";
|
||||
|
||||
import { SAMLLogin } from "@calcom/features/auth/SAMLLogin";
|
||||
import { isSAMLLoginEnabled, samlProductID, samlTenantID } from "@calcom/features/ee/sso/lib/saml";
|
||||
import { getSafeRedirectUrl } from "@calcom/lib/getSafeRedirectUrl";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@calcom/lib/telemetry";
|
||||
import prisma from "@calcom/prisma";
|
||||
import { Alert, Button, EmailField, Icon, PasswordField, SAMLLogin } from "@calcom/ui";
|
||||
import { Alert, Button, EmailField, Icon, PasswordField } from "@calcom/ui";
|
||||
|
||||
import { ErrorCode, getSession } from "@lib/auth";
|
||||
import { WEBAPP_URL, WEBSITE_URL } from "@lib/config/constants";
|
||||
|
|
|
@ -4,7 +4,10 @@ import Link from "next/link";
|
|||
import { useRouter } from "next/router";
|
||||
import React, { Fragment, useEffect, useState } from "react";
|
||||
|
||||
import CreateEventTypeButton from "@calcom/features/eventtypes/components/CreateEventTypeButton";
|
||||
import {
|
||||
CreateEventTypeButton,
|
||||
EventTypeDescriptionLazy as EventTypeDescription,
|
||||
} from "@calcom/features/eventtypes/components";
|
||||
import { APP_NAME, CAL_URL, WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { RouterOutputs, trpc, TRPCClientError } from "@calcom/trpc/react";
|
||||
|
@ -22,7 +25,6 @@ import {
|
|||
DropdownMenuSeparator,
|
||||
DropdownMenuTrigger,
|
||||
EmptyScreen,
|
||||
EventTypeDescription,
|
||||
Icon,
|
||||
Shell,
|
||||
showToast,
|
||||
|
|
|
@ -5,13 +5,14 @@ import { useRouter } from "next/router";
|
|||
import { useEffect } from "react";
|
||||
|
||||
import { useIsEmbed } from "@calcom/embed-core/embed-iframe";
|
||||
import EventTypeDescription from "@calcom/features/eventtypes/components/EventTypeDescription";
|
||||
import { CAL_URL } from "@calcom/lib/constants";
|
||||
import { getPlaceholderAvatar } from "@calcom/lib/getPlaceholderAvatar";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import useTheme from "@calcom/lib/hooks/useTheme";
|
||||
import { getTeamWithMembers } from "@calcom/lib/server/queries/teams";
|
||||
import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@calcom/lib/telemetry";
|
||||
import { Avatar, Button, EventTypeDescription, Icon } from "@calcom/ui";
|
||||
import { Avatar, Button, Icon } from "@calcom/ui";
|
||||
|
||||
import { useToggleQuery } from "@lib/hooks/useToggleQuery";
|
||||
import { inferSSRProps } from "@lib/types/inferSSRProps";
|
||||
|
|
|
@ -7,8 +7,7 @@ import { HOSTED_CAL_FEATURES } from "@calcom/lib/constants";
|
|||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@calcom/lib/telemetry";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
|
||||
import { Button, Icon } from "../../..";
|
||||
import { Button, Icon } from "@calcom/ui";
|
||||
|
||||
interface Props {
|
||||
samlTenantID: string;
|
||||
|
@ -20,7 +19,7 @@ const schema = z.object({
|
|||
email: z.string().email({ message: "Please enter a valid email" }),
|
||||
});
|
||||
|
||||
export default function SAMLLogin({ samlTenantID, samlProductID, setErrorMessage }: Props) {
|
||||
export function SAMLLogin({ samlTenantID, samlProductID, setErrorMessage }: Props) {
|
||||
const { t } = useLocale();
|
||||
const methods = useFormContext();
|
||||
const telemetry = useTelemetry();
|
|
@ -6,9 +6,7 @@ import classNames from "@calcom/lib/classNames";
|
|||
import { daysInMonth, yyyymmdd } from "@calcom/lib/date-fns";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { weekdayNames } from "@calcom/lib/weekday";
|
||||
import { Button, Icon } from "@calcom/ui";
|
||||
|
||||
import { SkeletonText } from "../../..";
|
||||
import { Button, Icon, SkeletonText } from "@calcom/ui";
|
||||
|
||||
export type DatePickerProps = {
|
||||
/** which day of the week to render the calendar. Usually Sunday (=0) or Monday (=1) - default: Sunday */
|
|
@ -3,8 +3,7 @@ import { Props } from "react-select";
|
|||
|
||||
import { classNames } from "@calcom/lib";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
|
||||
import { Avatar, Icon, Select } from "../../..";
|
||||
import { Avatar, Icon, Select } from "@calcom/ui";
|
||||
|
||||
type CheckedSelectOption = {
|
||||
avatar: string;
|
|
@ -1,6 +1,5 @@
|
|||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
|
||||
import { Badge, Button, ButtonGroup, Icon } from "../../..";
|
||||
import { Badge, Button, ButtonGroup, Icon } from "@calcom/ui";
|
||||
|
||||
type Props = {
|
||||
required?: boolean;
|
|
@ -8,8 +8,7 @@ import getStripeAppData from "@calcom/lib/getStripeAppData";
|
|||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { baseEventTypeSelect } from "@calcom/prisma";
|
||||
import { EventTypeModel } from "@calcom/prisma/zod";
|
||||
|
||||
import { Badge, Icon } from "../../..";
|
||||
import { Badge, Icon } from "@calcom/ui";
|
||||
|
||||
export type EventTypeDescriptionProps = {
|
||||
eventType: Pick<
|
|
@ -2,4 +2,6 @@ import dynamic from "next/dynamic";
|
|||
|
||||
export { default as CheckedTeamSelect } from "./CheckedTeamSelect";
|
||||
export { default as CustomInputItem } from "./CustomInputItem";
|
||||
export { default as CreateEventTypeButton } from "./CreateEventTypeButton";
|
||||
export { default as EventTypeDescription } from "./EventTypeDescription";
|
||||
export const EventTypeDescriptionLazy = dynamic(() => import("./EventTypeDescription"));
|
|
@ -13,11 +13,11 @@ import {
|
|||
DialogHeader,
|
||||
DialogClose,
|
||||
Switch,
|
||||
DatePicker,
|
||||
Form,
|
||||
Button,
|
||||
} from "@calcom/ui";
|
||||
|
||||
import DatePicker from "../../calendars/DatePicker";
|
||||
import { DayRanges, TimeRange } from "./Schedule";
|
||||
|
||||
const ALL_DAY_RANGE = {
|
||||
|
|
|
@ -3,8 +3,7 @@ import { useEffect, useState } from "react";
|
|||
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { localStorage } from "@calcom/lib/webstorage";
|
||||
|
||||
import Card from "../../core/Card";
|
||||
import { Card } from "@calcom/ui";
|
||||
|
||||
export const tips = [
|
||||
{
|
|
@ -0,0 +1,2 @@
|
|||
export { List, ListItem, ListItemText, ListItemTitle } from "./List";
|
||||
export type { ListItemProps, ListProps } from "./List";
|
|
@ -46,8 +46,6 @@ export { default as TimezoneChangeDialog } from "./TimezoneChangeDialog";
|
|||
// export { default as Tooltip } from "./Tooltip";
|
||||
export {
|
||||
Alert,
|
||||
CheckedTeamSelect,
|
||||
CustomInputItem,
|
||||
EmptyScreen,
|
||||
HorizontalTabs,
|
||||
SettingsToggle,
|
||||
|
@ -58,6 +56,7 @@ export {
|
|||
SkeletonText,
|
||||
Swatch,
|
||||
Switch,
|
||||
Card,
|
||||
VerticalTabs,
|
||||
} from "./v2";
|
||||
export type { AlertProps } from "./v2";
|
||||
|
@ -118,8 +117,3 @@ export type { ITimezone, ITimezoneOption } from "./v2/core/TimezoneSelect";
|
|||
export { Tooltip } from "./v2/core/Tooltip";
|
||||
export { default as VerticalDivider } from "./v2/core/VerticalDivider";
|
||||
export { default as WizardForm } from "./v2/core/WizardForm";
|
||||
export { default as SAMLLogin } from "./v2/modules/auth/SAMLLogin";
|
||||
export { default as DatePicker } from "./v2/modules/booker/DatePicker";
|
||||
export { EventTypeDescriptionLazy } from "./v2/modules/event-types";
|
||||
export { EventTypeDescription } from "./v2/modules/event-types/EventTypeDescription";
|
||||
export { default as Tips } from "./v2/modules/tips/Tips";
|
||||
|
|
|
@ -12,6 +12,7 @@ import UnconfirmedBookingBadge from "@calcom/features/bookings/UnconfirmedBookin
|
|||
import ImpersonatingBanner from "@calcom/features/ee/impersonation/components/ImpersonatingBanner";
|
||||
import HelpMenuItem from "@calcom/features/ee/support/components/HelpMenuItem";
|
||||
import { TeamsUpgradeBanner } from "@calcom/features/ee/teams/components";
|
||||
import { Tips } from "@calcom/features/tips";
|
||||
import CustomBranding from "@calcom/lib/CustomBranding";
|
||||
import classNames from "@calcom/lib/classNames";
|
||||
import {
|
||||
|
@ -40,7 +41,6 @@ import {
|
|||
Icon,
|
||||
showToast,
|
||||
TimezoneChangeDialog,
|
||||
Tips,
|
||||
} from "../..";
|
||||
|
||||
/* TODO: Get this from endpoint */
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
/* TODO: Make this index explicit */
|
||||
export * from "./core";
|
||||
export * from "./modules";
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
# To all Cal.com contributors
|
||||
|
||||
All these components should live in `packages/features`
|
||||
|
||||
With love,
|
||||
|
||||
zomars 💕
|
|
@ -1 +0,0 @@
|
|||
export { default as SAMLLogin } from "./SAMLLogin";
|
|
@ -1 +0,0 @@
|
|||
export * from "./DatePicker";
|
|
@ -1,3 +0,0 @@
|
|||
export * from "./auth";
|
||||
export * from "./booker";
|
||||
export * from "./event-types";
|
Loading…
Reference in New Issue
Block a user