feat: cal.ai enterprise phone calls (#14100)
* added empty layout * init * yarn lock due to package changes * added retell ai to .env * removed ton of glue code * nit * Discard changes to package.json * Upgrades lucide-react * minor UI fixes * nit * nit * feat: save progress * feat: v1 * fix: type error * feat: change schema * fix: type error and testr * chore: update agent * chore: change default prompt * feat: feedback and improvements * fix: type error * fix: type error * hidden for now while in trial * added i18n and removed some comments * feat: add cal api key * fix: type error --------- Co-authored-by: Omar López <[email protected]> Co-authored-by: Udit Takkar <[email protected]> Co-authored-by: Udit Takkar <[email protected]> Co-authored-by: Joe Au-Yeung <[email protected]>
This commit is contained in:
42 files changed
+724
-59
No files matched your search
@@ -3,6 +3,7 @@ import type { ReactNode } from "react";
|
||||
import { forwardRef } from "react";
|
||||
import type { IconType } from "react-icons";
|
||||
|
||||
import type { LucideIcon } from "@calcom/ui/components/icon";
|
||||
import { CheckCircle2, Info, XCircle, AlertTriangle } from "@calcom/ui/components/icon";
|
||||
|
||||
export interface AlertProps {
|
||||
@@ -15,7 +16,7 @@ export interface AlertProps {
|
||||
iconClassName?: string;
|
||||
// @TODO: Success and info shouldn't exist as per design?
|
||||
severity: "success" | "warning" | "error" | "info" | "neutral" | "green";
|
||||
CustomIcon?: IconType;
|
||||
CustomIcon?: IconType | LucideIcon;
|
||||
customIconColor?: string;
|
||||
}
|
||||
export const Alert = forwardRef<HTMLDivElement, AlertProps>((props, ref) => {
|
||||
|
||||
@@ -273,7 +273,7 @@ const InstallAppButtonChild = ({
|
||||
type="button"
|
||||
disabled={isInstalledTeamOrUser}
|
||||
key={team.id}
|
||||
StartIcon={(props) => (
|
||||
StartIcon={(props: { className?: string }) => (
|
||||
<Avatar
|
||||
alt={team.logo || ""}
|
||||
imageSrc={team.logo || `${WEBAPP_URL}/${team.logo}/avatar.png`} // if no image, use default avatar
|
||||
|
||||
@@ -5,6 +5,7 @@ import { GoPrimitiveDot } from "react-icons/go";
|
||||
|
||||
import classNames from "@calcom/lib/classNames";
|
||||
import type { SVGComponent } from "@calcom/types/SVGComponent";
|
||||
import type { LucideIcon } from "@calcom/ui/components/icon";
|
||||
|
||||
export const badgeStyles = cva("font-medium inline-flex items-center justify-center rounded gap-x-1", {
|
||||
variants: {
|
||||
@@ -36,7 +37,7 @@ type InferredBadgeStyles = VariantProps<typeof badgeStyles>;
|
||||
|
||||
type IconOrDot =
|
||||
| {
|
||||
startIcon?: SVGComponent;
|
||||
startIcon?: SVGComponent | LucideIcon;
|
||||
withDot?: unknown;
|
||||
}
|
||||
| { startIcon?: unknown; withDot?: boolean };
|
||||
|
||||
@@ -6,6 +6,7 @@ import React, { forwardRef } from "react";
|
||||
|
||||
import classNames from "@calcom/lib/classNames";
|
||||
import type { SVGComponent } from "@calcom/types/SVGComponent";
|
||||
import type { LucideIcon } from "@calcom/ui/components/icon";
|
||||
|
||||
import { Plus } from "../icon";
|
||||
import { Tooltip } from "../tooltip";
|
||||
@@ -17,9 +18,9 @@ export type ButtonBaseProps = {
|
||||
/** Action that happens when the button is clicked */
|
||||
onClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
||||
/**Left aligned icon*/
|
||||
StartIcon?: SVGComponent | React.ElementType;
|
||||
StartIcon?: SVGComponent | React.ElementType | LucideIcon;
|
||||
/**Right aligned icon */
|
||||
EndIcon?: SVGComponent;
|
||||
EndIcon?: SVGComponent | LucideIcon;
|
||||
shallow?: boolean;
|
||||
/**Tool tip used when icon size is set to small */
|
||||
tooltip?: string;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import React from "react";
|
||||
|
||||
import type { SVGComponent } from "@calcom/types/SVGComponent";
|
||||
import type { LucideIcon } from "@calcom/ui/components/icon";
|
||||
|
||||
interface LinkIconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
||||
Icon: SVGComponent;
|
||||
Icon: SVGComponent | LucideIcon;
|
||||
}
|
||||
|
||||
export default function LinkIconButton(props: LinkIconButtonProps) {
|
||||
|
||||
@@ -113,7 +113,7 @@ export function CreateButton(props: CreateBtnProps) {
|
||||
<DropdownItem
|
||||
type="button"
|
||||
data-testid={`option${option.teamId ? "-team" : ""}-${idx}`}
|
||||
StartIcon={(props) => (
|
||||
StartIcon={(props: { className?: string }) => (
|
||||
<Avatar alt={option.label || ""} imageSrc={option.image} size="sm" {...props} />
|
||||
)}
|
||||
onClick={() =>
|
||||
|
||||
@@ -9,6 +9,7 @@ import classNames from "@calcom/lib/classNames";
|
||||
import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import type { SVGComponent } from "@calcom/types/SVGComponent";
|
||||
import type { LucideIcon } from "@calcom/ui/components/icon";
|
||||
|
||||
import type { ButtonProps } from "../../components/button";
|
||||
import { Button } from "../../components/button";
|
||||
@@ -85,7 +86,7 @@ type DialogContentProps = React.ComponentProps<(typeof DialogPrimitive)["Content
|
||||
description?: string | JSX.Element | null;
|
||||
closeText?: string;
|
||||
actionDisabled?: boolean;
|
||||
Icon?: SVGComponent;
|
||||
Icon?: SVGComponent | LucideIcon;
|
||||
enableOverflow?: boolean;
|
||||
};
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import { forwardRef } from "react";
|
||||
import { classNames } from "@calcom/lib";
|
||||
import type { SVGComponent } from "@calcom/types/SVGComponent";
|
||||
import { CheckCircle } from "@calcom/ui/components/icon";
|
||||
import type { LucideIcon } from "@calcom/ui/components/icon";
|
||||
|
||||
import type { ButtonColor } from "../../button/Button";
|
||||
|
||||
@@ -105,8 +106,8 @@ DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
|
||||
type DropdownItemProps = {
|
||||
children: React.ReactNode;
|
||||
color?: ButtonColor;
|
||||
StartIcon?: SVGComponent;
|
||||
EndIcon?: SVGComponent;
|
||||
StartIcon?: SVGComponent | LucideIcon;
|
||||
EndIcon?: SVGComponent | LucideIcon;
|
||||
href?: string;
|
||||
disabled?: boolean;
|
||||
childrenClassName?: string;
|
||||
|
||||
@@ -4,6 +4,7 @@ import classNames from "@calcom/lib/classNames";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { useUrlMatchesCurrentUrl } from "@calcom/lib/hooks/useUrlMatchesCurrentUrl";
|
||||
import type { SVGComponent } from "@calcom/types/SVGComponent";
|
||||
import type { LucideIcon } from "@calcom/ui/components/icon";
|
||||
|
||||
import { Avatar } from "../../avatar";
|
||||
import { SkeletonText } from "../../skeleton";
|
||||
@@ -16,7 +17,7 @@ export type HorizontalTabItemProps = {
|
||||
href: string;
|
||||
linkShallow?: boolean;
|
||||
linkScroll?: boolean;
|
||||
icon?: SVGComponent;
|
||||
icon?: SVGComponent | LucideIcon;
|
||||
avatar?: string;
|
||||
};
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import classNames from "@calcom/lib/classNames";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { useUrlMatchesCurrentUrl } from "@calcom/lib/hooks/useUrlMatchesCurrentUrl";
|
||||
import type { SVGComponent } from "@calcom/types/SVGComponent";
|
||||
import type { LucideIcon } from "@calcom/ui/components/icon";
|
||||
|
||||
import { ChevronRight, ExternalLink } from "../../icon";
|
||||
import { Skeleton } from "../../skeleton";
|
||||
@@ -12,7 +13,7 @@ import { Skeleton } from "../../skeleton";
|
||||
export type VerticalTabItemProps = {
|
||||
name: string;
|
||||
info?: string;
|
||||
icon?: SVGComponent;
|
||||
icon?: SVGComponent | LucideIcon;
|
||||
disabled?: boolean;
|
||||
children?: VerticalTabItemProps[];
|
||||
textClassNames?: string;
|
||||
|
||||
Reference in new issue
Block a user