From dce6ebd79ae7bb20eb9307dce5584f88b577a893 Mon Sep 17 00:00:00 2001 From: Jeroen Reumkens Date: Mon, 30 Jan 2023 08:57:59 -0500 Subject: [PATCH] Merged main --- README.md | 10 +-- apps/docs/README.md | 80 ------------------- apps/storybook/package.json | 2 +- apps/swagger/package.json | 2 +- apps/web/components/apps/App.tsx | 2 +- .../components/booking/pages/BookingPage.tsx | 2 +- .../components/dialog/EditLocationDialog.tsx | 12 ++- .../components/eventtype/EventSetupTab.tsx | 4 +- .../steps-views/UserProfile.tsx | 4 +- apps/web/components/team/screens/Team.tsx | 2 +- apps/web/components/ui/AuthContainer.tsx | 7 +- apps/web/lib/availability.ts | 1 - apps/web/lib/config/constants.ts | 2 - apps/web/lib/core/i18n/weekday.ts | 1 - apps/web/lib/isOutOfBounds.tsx | 3 - apps/web/lib/location.ts | 1 - apps/web/lib/prisma.ts | 1 - apps/web/lib/random.ts | 2 - apps/web/lib/slots.ts | 3 - apps/web/lib/slugify.ts | 3 - apps/web/package.json | 2 +- apps/web/pages/[user].tsx | 2 +- apps/web/pages/api/auth/[...nextauth].tsx | 4 +- apps/web/pages/api/auth/forgot-password.ts | 3 +- apps/web/pages/api/auth/signup.ts | 3 +- apps/web/pages/api/cron/bookingReminder.ts | 3 +- apps/web/pages/apps/categories/[category].tsx | 4 +- apps/web/pages/auth/login.tsx | 4 +- apps/web/pages/booking/[uid].tsx | 1 + apps/web/pages/d/[link]/[slug].tsx | 2 +- apps/web/pages/event-types/index.tsx | 5 +- .../web/pages/getting-started/[[...step]].tsx | 3 +- .../web/pages/settings/my-account/general.tsx | 2 +- .../web/pages/settings/my-account/profile.tsx | 4 +- apps/web/pages/signup.tsx | 13 +-- apps/web/pages/team/[slug].tsx | 2 +- apps/web/pages/team/[slug]/[type].tsx | 2 +- apps/web/playwright/event-types.e2e.ts | 2 +- apps/web/server/lib/i18n.ts | 1 - .../lib/getAvailabilityFromSchedule.test.ts | 3 +- apps/web/test/lib/slots.test.ts | 3 +- packages/app-store-cli/package.json | 4 +- packages/app-store-cli/readme.md | 9 --- packages/app-store/around/config.json | 11 ++- .../components/FormInputFields.tsx | 1 + packages/app-store/ping/config.json | 11 ++- packages/app-store/riverside/config.json | 10 ++- packages/app-store/whereby/config.json | 11 ++- packages/config/next-i18next.config.js | 1 + packages/config/package.json | 2 +- .../templates/attendee-scheduled-email.ts | 8 -- packages/embeds/embed-core/package.json | 6 +- packages/embeds/embed-react/package.json | 2 +- packages/embeds/embed-snippet/package.json | 2 +- packages/eslint-plugin/package.json | 2 +- .../features/bookings/lib/handleNewBooking.ts | 5 ++ .../ee/common/components/LicenseRequired.tsx | 2 +- .../common/components/v2/LicenseRequired.tsx | 2 +- .../ee/teams/pages/team-profile-view.tsx | 6 +- .../components/CreateEventTypeButton.tsx | 2 +- .../eventtypes/components/DuplicateDialog.tsx | 1 - packages/features/shell/Shell.tsx | 12 ++- packages/lib/errors.ts | 3 +- packages/lib/package.json | 2 +- packages/lib/turndownService.ts | 45 ++++++++++- .../migration.sql | 10 +++ packages/prisma/schema.prisma | 12 ++- packages/prisma/zod-utils.ts | 20 ++++- .../trpc/server/routers/viewer/eventTypes.tsx | 10 ++- .../ui/components/alert/alert.stories.mdx | 5 +- packages/ui/components/apps/AllApps.tsx | 2 +- .../ui/components/apps/Categories.stories.mdx | 21 ++--- .../ui/components/avatar/avatar.stories.mdx | 1 - .../breadcrumb/breadcrumb.stories.mdx | 2 - .../ui/components/credits/credits.stories.mdx | 1 - .../ui/components/divider/divider.stories.mdx | 1 - .../editor/plugins/ToolbarPlugin.tsx | 23 +++--- .../ui/components/editor/stylesEditor.css | 1 - .../form/checkbox/checkbox.stories.mdx | 2 - .../components/form/inputs/inputs.stories.mdx | 3 +- packages/ui/components/head-seo/HeadSeo.tsx | 8 +- packages/ui/components/list/list.stories.mdx | 1 - .../popover/MeetingTimeInTimezones.tsx | 9 ++- .../components/skeleton/skeleton.stories.mdx | 1 - packages/ui/components/table/TableActions.tsx | 2 +- .../ui/components/toast/toast.stories.mdx | 1 - .../top-banner/topbanner.stories.mdx | 1 - .../ui/form/radio-area/RadioAreaGroup.tsx | 8 +- packages/ui/package.json | 2 +- yarn.lock | 58 ++++++++------ 90 files changed, 298 insertions(+), 279 deletions(-) delete mode 100644 apps/web/lib/availability.ts delete mode 100644 apps/web/lib/config/constants.ts delete mode 100644 apps/web/lib/core/i18n/weekday.ts delete mode 100644 apps/web/lib/isOutOfBounds.tsx delete mode 100644 apps/web/lib/location.ts delete mode 100644 apps/web/lib/prisma.ts delete mode 100644 apps/web/lib/random.ts delete mode 100644 apps/web/lib/slots.ts delete mode 100644 apps/web/lib/slugify.ts delete mode 100644 apps/web/server/lib/i18n.ts delete mode 100644 packages/app-store-cli/readme.md create mode 100644 packages/prisma/migrations/20230125182832_add_deployment/migration.sql diff --git a/README.md b/README.md index 91c08baffc..69454c9fae 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,6 @@ Jitsu Tracked Checkly Availability - @@ -85,10 +84,11 @@ That's where Cal.com comes in. Self-hosted or hosted by us. White-label by desig ### Built With -- [Next.js](https://nextjs.org/) -- [React](https://reactjs.org/) -- [Tailwind](https://tailwindcss.com/) -- [Prisma](https://prisma.io/) +- [Next.js](https://nextjs.org/?ref=cal.com) +- [tRPC](https://trpc.io/?ref=cal.com) +- [React](https://reactjs.org/?ref=cal.com) +- [Tailwind](https://tailwindcss.com/?ref=cal.com) +- [Prisma](https://prisma.io/?ref=cal.com) ## Stay Up-to-Date diff --git a/apps/docs/README.md b/apps/docs/README.md index 6ecd19c64a..8b13789179 100644 --- a/apps/docs/README.md +++ b/apps/docs/README.md @@ -1,81 +1 @@ - -
- - Logo - - Website - ยท - Community Support -
-# Cal.com Documentation - -The official product, support and developer documentation, containing information and guides about using the product as well as support for self-hosted installations. This documentation site runs on [Nextra](https://nextra.vercel.app), so you may refer to their documentation should you need information on anything that isn't covered here. - -## Prerequisites - -- Git -- Node.js & npm -- Yarn - -## Installation - -Firstly, clone the repository using Git: - -```console -git clone https://github.com/calcom/docs.git -``` - -Now, you can install the dependencies with yarn: - -```console -yarn install -``` - -## Editing - -To create, edit and delete documentation pages, you can simply create markdown (.mdx) files in the `pages/` folder. You can edit Markdown with any text editor, but VS Code and WebStorm have side-by-side previews so you can see your formatted content whilst writing markdown. - -You will also need to add it as an entry to the `meta.json` file found in whichever directory that the .mdx file is in. - -## Local Development - -```console -yarn dev -``` - -This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. - -## Build - -```console -yarn build -``` - -This command generates static content into the `build` directory and can be served using any static content hosting service. - -## How to easily contribute - -## Existing Page - -1. From the documentation's GitHub repository, head to the folder called 'pages' and open it. -2. From here you can view all current pages on the documentation site. Select the page you would like to contribute to. -3. You should now be able to view the page you have selected. Located at the top right of the page will be a pencil icon. Pressing this will bring you up an editor to edit and make changes. You can add formatting using the buttons at the top, which will automatically insert the relevant markdown content needed to style the text. -4. From here make the changes you wish to make. -5. At the bottom of the screen will be a 'Propose Changes' box, fill in all the relevant details such as title and description then press the green 'Propose Changes' button. -6. Your changes have been saved, to submit them for review, located on your screen, press the green 'Create Pull Request' button. -7. Fill in all the relevant details such as title and description and after finalize the submission. - -You have now successfully edited and submitted changes to our documentation site. - -## Creating a New Page - -1. From the documentation's GitHub repository, head to the folder called 'pages' and open it. -2. From here you can view all current pages on the documentation site. At the top of your screen press the 'New file' button. -3. You should now be able to view the page you have created. Remember when renaming the document to put .mdx at the end of the file name. -4. From here make the changes you wish to make. Such as creating a title, sub-title and body text. -5. At the bottom of the screen will be a 'Propose Changes' box, fill in all the relevant details such as title and description then press the green 'Propose Changes' button. -6. Your changes have been saved, to submit them for review, located on your screen, press the greem 'Create Pull Request' button. -7. Fill in all the relevant details such as title and description and after finalize the submission. - -You have now successfully created and submitted changes to our documentation site. diff --git a/apps/storybook/package.json b/apps/storybook/package.json index d20d281bd9..f0791e14ef 100644 --- a/apps/storybook/package.json +++ b/apps/storybook/package.json @@ -49,7 +49,7 @@ "storybook-addon-next": "^1.6.9", "storybook-react-i18next": "^1.1.2", "tailwindcss": "^3.2.1", - "typescript": "^4.7.4", + "typescript": "^4.9.4", "vite": "^2.9.15" } } diff --git a/apps/swagger/package.json b/apps/swagger/package.json index 6fa2dc8067..69fe1c4ee9 100644 --- a/apps/swagger/package.json +++ b/apps/swagger/package.json @@ -24,6 +24,6 @@ "@types/node": "16.9.1", "@types/react": "^18.0.17", "@types/react-dom": "^18.0.6", - "typescript": "^4.7.4" + "typescript": "^4.9.4" } } diff --git a/apps/web/components/apps/App.tsx b/apps/web/components/apps/App.tsx index 1260313028..1af16c2ee5 100644 --- a/apps/web/components/apps/App.tsx +++ b/apps/web/components/apps/App.tsx @@ -331,7 +331,7 @@ export default function App(props: { const { t } = useLocale(); return ( - + { {t("edit_location")} {!booking && ( -

{t("this_input_will_shown_booking_this_event")}

+

+ + Can't find the right video app? Visit our + + App Store + + . + +

)}
diff --git a/apps/web/components/eventtype/EventSetupTab.tsx b/apps/web/components/eventtype/EventSetupTab.tsx index 3fcb26912e..c19ac33475 100644 --- a/apps/web/components/eventtype/EventSetupTab.tsx +++ b/apps/web/components/eventtype/EventSetupTab.tsx @@ -12,11 +12,10 @@ import { z } from "zod"; import { EventLocationType, getEventLocationType, MeetLocationType } from "@calcom/app-store/locations"; import { CAL_URL } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; +import { slugify } from "@calcom/lib/slugify"; import { Button, Label, Select, SettingsToggle, Skeleton, TextField } from "@calcom/ui"; import { FiEdit2, FiCheck, FiX, FiPlus } from "@calcom/ui/components/icon"; -import { slugify } from "@lib/slugify"; - import { EditLocationDialog } from "@components/dialog/EditLocationDialog"; import LocationSelect, { SingleValueLocationOption, @@ -150,6 +149,7 @@ export const EventSetupTab = ( options={locationOptions} isSearchable={false} className="block w-full min-w-0 flex-1 rounded-sm text-sm" + menuPlacement="auto" onChange={(e: SingleValueLocationOption) => { if (e?.value) { const newLocationType = e.value; diff --git a/apps/web/components/getting-started/steps-views/UserProfile.tsx b/apps/web/components/getting-started/steps-views/UserProfile.tsx index 1cb8f91ea1..74de82d55c 100644 --- a/apps/web/components/getting-started/steps-views/UserProfile.tsx +++ b/apps/web/components/getting-started/steps-views/UserProfile.tsx @@ -5,7 +5,7 @@ import { FormEvent, useRef, useState } from "react"; import { useForm } from "react-hook-form"; import { useLocale } from "@calcom/lib/hooks/useLocale"; -import turndownService from "@calcom/lib/turndownService"; +import turndown from "@calcom/lib/turndownService"; import { trpc } from "@calcom/trpc/react"; import { Button, Editor, ImageUploader, Label, showToast } from "@calcom/ui"; import { Avatar } from "@calcom/ui"; @@ -142,7 +142,7 @@ const UserProfile = (props: IUserProfileProps) => { md.render(getValues("bio") || user?.bio || "")} - setText={(value: string) => setValue("bio", turndownService.turndown(value))} + setText={(value: string) => setValue("bio", turndown(value))} excludedToolbarItems={["blockType"]} />

diff --git a/apps/web/components/team/screens/Team.tsx b/apps/web/components/team/screens/Team.tsx index 505bae1732..9ba8899833 100644 --- a/apps/web/components/team/screens/Team.tsx +++ b/apps/web/components/team/screens/Team.tsx @@ -32,7 +32,7 @@ const Member = ({ member, teamName }: { member: MemberType; teamName: string | n {!isBioEmpty ? ( <>

diff --git a/apps/web/components/ui/AuthContainer.tsx b/apps/web/components/ui/AuthContainer.tsx index 846d133d62..c153081b3a 100644 --- a/apps/web/components/ui/AuthContainer.tsx +++ b/apps/web/components/ui/AuthContainer.tsx @@ -1,7 +1,7 @@ import classNames from "classnames"; import { APP_NAME, LOGO } from "@calcom/lib/constants"; -import { Credits, HeadSeo } from "@calcom/ui"; +import { HeadSeo } from "@calcom/ui"; import Loader from "@components/Loader"; @@ -35,10 +35,7 @@ export default function AuthContainer(props: React.PropsWithChildren) {
{props.children}
-
- {props.footerText} - -
+
{props.footerText}
); diff --git a/apps/web/lib/availability.ts b/apps/web/lib/availability.ts deleted file mode 100644 index 68fe5cc72f..0000000000 --- a/apps/web/lib/availability.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "@calcom/lib/availability"; diff --git a/apps/web/lib/config/constants.ts b/apps/web/lib/config/constants.ts deleted file mode 100644 index 1dd7c7a65e..0000000000 --- a/apps/web/lib/config/constants.ts +++ /dev/null @@ -1,2 +0,0 @@ -// TODO: Remove this file once everything is imported from `@calcom/lib` -export * from "@calcom/lib/constants"; diff --git a/apps/web/lib/core/i18n/weekday.ts b/apps/web/lib/core/i18n/weekday.ts deleted file mode 100644 index 82a7a6850d..0000000000 --- a/apps/web/lib/core/i18n/weekday.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "@calcom/lib/weekday"; diff --git a/apps/web/lib/isOutOfBounds.tsx b/apps/web/lib/isOutOfBounds.tsx deleted file mode 100644 index d4d3bacbbc..0000000000 --- a/apps/web/lib/isOutOfBounds.tsx +++ /dev/null @@ -1,3 +0,0 @@ -/* Prefer import from `@calcom/lib/isOutOfBounds` */ -export * from "@calcom/lib/isOutOfBounds"; -export { default } from "@calcom/lib/isOutOfBounds"; diff --git a/apps/web/lib/location.ts b/apps/web/lib/location.ts deleted file mode 100644 index 1f632382b7..0000000000 --- a/apps/web/lib/location.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "@calcom/core/location"; diff --git a/apps/web/lib/prisma.ts b/apps/web/lib/prisma.ts deleted file mode 100644 index 3f0ea376b1..0000000000 --- a/apps/web/lib/prisma.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from "@calcom/prisma"; diff --git a/apps/web/lib/random.ts b/apps/web/lib/random.ts deleted file mode 100644 index 998205392b..0000000000 --- a/apps/web/lib/random.ts +++ /dev/null @@ -1,2 +0,0 @@ -// TODO: Remove this file once everything is imported from `@calcom/lib` -export * from "@calcom/lib/random"; diff --git a/apps/web/lib/slots.ts b/apps/web/lib/slots.ts deleted file mode 100644 index 82c1fff3e7..0000000000 --- a/apps/web/lib/slots.ts +++ /dev/null @@ -1,3 +0,0 @@ -/** Prefer import from `@calcom/lib/slots` */ -export * from "@calcom/lib/slots"; -export { default } from "@calcom/lib/slots"; diff --git a/apps/web/lib/slugify.ts b/apps/web/lib/slugify.ts deleted file mode 100644 index f06442b718..0000000000 --- a/apps/web/lib/slugify.ts +++ /dev/null @@ -1,3 +0,0 @@ -// TODO: Remove this file once every `classNames` is imported from `@calcom/lib` -export * from "@calcom/lib/slugify"; -export { default } from "@calcom/lib/slugify"; diff --git a/apps/web/package.json b/apps/web/package.json index 36158ca3dc..9daf095907 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -164,6 +164,6 @@ "tailwindcss": "^3.2.1", "ts-jest": "^28.0.8", "ts-node": "^10.9.1", - "typescript": "^4.7.4" + "typescript": "^4.9.4" } } diff --git a/apps/web/pages/[user].tsx b/apps/web/pages/[user].tsx index 4cf826ac30..1aac1494c8 100644 --- a/apps/web/pages/[user].tsx +++ b/apps/web/pages/[user].tsx @@ -146,7 +146,7 @@ export default function User(props: inferSSRProps & E {!isBioEmpty && ( <>
diff --git a/apps/web/pages/api/auth/[...nextauth].tsx b/apps/web/pages/api/auth/[...nextauth].tsx index c5f7f9bb9e..5fc2fe1894 100644 --- a/apps/web/pages/api/auth/[...nextauth].tsx +++ b/apps/web/pages/api/auth/[...nextauth].tsx @@ -17,14 +17,14 @@ import { ErrorCode, isPasswordValid, verifyPassword } from "@calcom/lib/auth"; import { APP_NAME, IS_TEAM_BILLING_ENABLED, WEBAPP_URL } from "@calcom/lib/constants"; import { symmetricDecrypt } from "@calcom/lib/crypto"; import { defaultCookies } from "@calcom/lib/default-cookies"; +import { randomString } from "@calcom/lib/random"; import rateLimit from "@calcom/lib/rateLimit"; import { serverConfig } from "@calcom/lib/serverConfig"; +import slugify from "@calcom/lib/slugify"; import prisma from "@calcom/prisma"; import { teamMetadataSchema } from "@calcom/prisma/zod-utils"; import CalComAdapter from "@lib/auth/next-auth-custom-adapter"; -import { randomString } from "@lib/random"; -import slugify from "@lib/slugify"; import { GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, IS_GOOGLE_LOGIN_ENABLED } from "@server/lib/constants"; diff --git a/apps/web/pages/api/auth/forgot-password.ts b/apps/web/pages/api/auth/forgot-password.ts index 452ea549b6..2e31ebace5 100644 --- a/apps/web/pages/api/auth/forgot-password.ts +++ b/apps/web/pages/api/auth/forgot-password.ts @@ -4,10 +4,9 @@ import { NextApiRequest, NextApiResponse } from "next"; import dayjs from "@calcom/dayjs"; import { sendPasswordResetEmail } from "@calcom/emails"; import { PASSWORD_RESET_EXPIRY_HOURS } from "@calcom/emails/templates/forgot-password-email"; +import { getTranslation } from "@calcom/lib/server/i18n"; import prisma from "@calcom/prisma"; -import { getTranslation } from "@server/lib/i18n"; - export default async function handler(req: NextApiRequest, res: NextApiResponse) { const t = await getTranslation(req.body.language ?? "en", "common"); diff --git a/apps/web/pages/api/auth/signup.ts b/apps/web/pages/api/auth/signup.ts index 7c9a347633..61b540ec0a 100644 --- a/apps/web/pages/api/auth/signup.ts +++ b/apps/web/pages/api/auth/signup.ts @@ -2,11 +2,10 @@ import { IdentityProvider } from "@prisma/client"; import { NextApiRequest, NextApiResponse } from "next"; import { hashPassword } from "@calcom/lib/auth"; +import slugify from "@calcom/lib/slugify"; import { closeComUpsertTeamUser } from "@calcom/lib/sync/SyncServiceManager"; import prisma from "@calcom/prisma"; -import slugify from "@lib/slugify"; - export default async function handler(req: NextApiRequest, res: NextApiResponse) { if (req.method !== "POST") { return; diff --git a/apps/web/pages/api/cron/bookingReminder.ts b/apps/web/pages/api/cron/bookingReminder.ts index a3e809214e..b6ae7eefdb 100644 --- a/apps/web/pages/api/cron/bookingReminder.ts +++ b/apps/web/pages/api/cron/bookingReminder.ts @@ -4,11 +4,10 @@ import type { NextApiRequest, NextApiResponse } from "next"; import dayjs from "@calcom/dayjs"; import { sendOrganizerRequestReminderEmail } from "@calcom/emails"; import { isPrismaObjOrUndefined, parseRecurringEvent } from "@calcom/lib"; +import { getTranslation } from "@calcom/lib/server/i18n"; import prisma, { bookingMinimalSelect } from "@calcom/prisma"; import type { CalendarEvent } from "@calcom/types/Calendar"; -import { getTranslation } from "@server/lib/i18n"; - export default async function handler(req: NextApiRequest, res: NextApiResponse) { const apiKey = req.headers.authorization || req.query.apiKey; if (process.env.CRON_API_KEY !== apiKey) { diff --git a/apps/web/pages/apps/categories/[category].tsx b/apps/web/pages/apps/categories/[category].tsx index 35cdbb992e..1d0e638125 100644 --- a/apps/web/pages/apps/categories/[category].tsx +++ b/apps/web/pages/apps/categories/[category].tsx @@ -19,6 +19,7 @@ export default function Apps({ apps }: InferGetStaticPropsType )} - } - large> + }>
{apps.map((app) => { diff --git a/apps/web/pages/auth/login.tsx b/apps/web/pages/auth/login.tsx index 4ca72f73ad..0d1fa4ac67 100644 --- a/apps/web/pages/auth/login.tsx +++ b/apps/web/pages/auth/login.tsx @@ -9,6 +9,7 @@ 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 { WEBAPP_URL, WEBSITE_URL } from "@calcom/lib/constants"; import { getSafeRedirectUrl } from "@calcom/lib/getSafeRedirectUrl"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@calcom/lib/telemetry"; @@ -17,7 +18,6 @@ import { Alert, Button, EmailField, PasswordField } from "@calcom/ui"; import { FiArrowLeft } from "@calcom/ui/components/icon"; import { ErrorCode, getSession } from "@lib/auth"; -import { WEBAPP_URL, WEBSITE_URL } from "@lib/config/constants"; import { inferSSRProps } from "@lib/types/inferSSRProps"; import AddToHomescreen from "@components/AddToHomescreen"; @@ -149,7 +149,7 @@ export default function Login({
)}
- + ); }; diff --git a/apps/web/pages/getting-started/[[...step]].tsx b/apps/web/pages/getting-started/[[...step]].tsx index 5632e63ce3..0c441eba08 100644 --- a/apps/web/pages/getting-started/[[...step]].tsx +++ b/apps/web/pages/getting-started/[[...step]].tsx @@ -7,10 +7,9 @@ import { z } from "zod"; import { getSession } from "@calcom/lib/auth"; import { APP_NAME } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; -import { User } from "@calcom/prisma/client"; +import prisma from "@calcom/prisma"; import { Button, StepCard, Steps } from "@calcom/ui"; -import prisma from "@lib/prisma"; import { inferSSRProps } from "@lib/types/inferSSRProps"; import { ConnectedCalendars } from "@components/getting-started/steps-views/ConnectCalendars"; diff --git a/apps/web/pages/settings/my-account/general.tsx b/apps/web/pages/settings/my-account/general.tsx index 56475dbf31..a6034594a8 100644 --- a/apps/web/pages/settings/my-account/general.tsx +++ b/apps/web/pages/settings/my-account/general.tsx @@ -5,6 +5,7 @@ import { Controller, useForm } from "react-hook-form"; import { getLayout } from "@calcom/features/settings/layouts/SettingsLayout"; import { useLocale } from "@calcom/lib/hooks/useLocale"; +import { nameOfDay } from "@calcom/lib/weekday"; import { RouterOutputs, trpc } from "@calcom/trpc/react"; import { Button, @@ -20,7 +21,6 @@ import { } from "@calcom/ui"; import { withQuery } from "@lib/QueryCell"; -import { nameOfDay } from "@lib/core/i18n/weekday"; import { ssrInit } from "@server/lib/ssr"; diff --git a/apps/web/pages/settings/my-account/profile.tsx b/apps/web/pages/settings/my-account/profile.tsx index e9c0dc4913..a3d576335c 100644 --- a/apps/web/pages/settings/my-account/profile.tsx +++ b/apps/web/pages/settings/my-account/profile.tsx @@ -10,7 +10,7 @@ import { getLayout } from "@calcom/features/settings/layouts/SettingsLayout"; import { ErrorCode } from "@calcom/lib/auth"; import { APP_NAME } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; -import turndownService from "@calcom/lib/turndownService"; +import turndown from "@calcom/lib/turndownService"; import { TRPCClientErrorLike } from "@calcom/trpc/client"; import { trpc } from "@calcom/trpc/react"; import { AppRouter } from "@calcom/trpc/server/routers/_app"; @@ -370,7 +370,7 @@ const ProfileForm = ({ md.render(formMethods.getValues("bio") || "")} setText={(value: string) => { - formMethods.setValue("bio", turndownService.turndown(value), { shouldDirty: true }); + formMethods.setValue("bio", turndown(value), { shouldDirty: true }); }} excludedToolbarItems={["blockType"]} /> diff --git a/apps/web/pages/signup.tsx b/apps/web/pages/signup.tsx index 9582610cb6..7d574e2fa5 100644 --- a/apps/web/pages/signup.tsx +++ b/apps/web/pages/signup.tsx @@ -5,15 +5,16 @@ import { FormProvider, SubmitHandler, useForm } from "react-hook-form"; import LicenseRequired from "@calcom/features/ee/common/components/v2/LicenseRequired"; import { isSAMLLoginEnabled } from "@calcom/features/ee/sso/lib/saml"; +import { WEBAPP_URL } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@calcom/lib/telemetry"; +import prisma from "@calcom/prisma"; import { inferSSRProps } from "@calcom/types/inferSSRProps"; -import { Alert, Button, EmailField, PasswordField, TextField, HeadSeo } from "@calcom/ui"; -import { asStringOrNull } from "@calcom/web/lib/asStringOrNull"; -import { WEBAPP_URL } from "@calcom/web/lib/config/constants"; -import prisma from "@calcom/web/lib/prisma"; -import { IS_GOOGLE_LOGIN_ENABLED } from "@calcom/web/server/lib/constants"; -import { ssrInit } from "@calcom/web/server/lib/ssr"; +import { Alert, Button, EmailField, HeadSeo, PasswordField, TextField } from "@calcom/ui"; + +import { asStringOrNull } from "../lib/asStringOrNull"; +import { IS_GOOGLE_LOGIN_ENABLED } from "../server/lib/constants"; +import { ssrInit } from "../server/lib/ssr"; type FormValues = { username: string; diff --git a/apps/web/pages/team/[slug].tsx b/apps/web/pages/team/[slug].tsx index dbc44375d1..505b540f07 100644 --- a/apps/web/pages/team/[slug].tsx +++ b/apps/web/pages/team/[slug].tsx @@ -99,7 +99,7 @@ function TeamPage({ team }: TeamPageProps) { {!isBioEmpty && ( <>
diff --git a/apps/web/pages/team/[slug]/[type].tsx b/apps/web/pages/team/[slug]/[type].tsx index 2534d92666..50e7817da7 100644 --- a/apps/web/pages/team/[slug]/[type].tsx +++ b/apps/web/pages/team/[slug]/[type].tsx @@ -2,11 +2,11 @@ import { GetServerSidePropsContext } from "next"; import { privacyFilteredLocations, LocationObject } from "@calcom/core/location"; import { parseRecurringEvent } from "@calcom/lib"; +import { getWorkingHours } from "@calcom/lib/availability"; import prisma from "@calcom/prisma"; import { EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils"; import { asStringOrNull } from "@lib/asStringOrNull"; -import { getWorkingHours } from "@lib/availability"; import getBooking, { GetBookingType } from "@lib/getBooking"; import { inferSSRProps } from "@lib/types/inferSSRProps"; import { EmbedProps } from "@lib/withEmbedSsr"; diff --git a/apps/web/playwright/event-types.e2e.ts b/apps/web/playwright/event-types.e2e.ts index 662e18cf00..760804a27b 100644 --- a/apps/web/playwright/event-types.e2e.ts +++ b/apps/web/playwright/event-types.e2e.ts @@ -1,8 +1,8 @@ import { expect } from "@playwright/test"; import { WEBAPP_URL } from "@calcom/lib/constants"; +import { randomString } from "@calcom/lib/random"; -import { randomString } from "../lib/random"; import { test } from "./lib/fixtures"; test.describe.configure({ mode: "parallel" }); diff --git a/apps/web/server/lib/i18n.ts b/apps/web/server/lib/i18n.ts deleted file mode 100644 index 0a3f56aead..0000000000 --- a/apps/web/server/lib/i18n.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "@calcom/lib/server/i18n"; diff --git a/apps/web/test/lib/getAvailabilityFromSchedule.test.ts b/apps/web/test/lib/getAvailabilityFromSchedule.test.ts index 04cafdce9f..fcee4dcf6a 100644 --- a/apps/web/test/lib/getAvailabilityFromSchedule.test.ts +++ b/apps/web/test/lib/getAvailabilityFromSchedule.test.ts @@ -3,8 +3,7 @@ import { Availability } from "@prisma/client"; import MockDate from "mockdate"; import dayjs from "@calcom/dayjs"; - -import { getAvailabilityFromSchedule } from "@lib/availability"; +import { getAvailabilityFromSchedule } from "@calcom/lib/availability"; MockDate.set("2021-06-20T11:59:59Z"); diff --git a/apps/web/test/lib/slots.test.ts b/apps/web/test/lib/slots.test.ts index 57f775e790..3643c593f0 100644 --- a/apps/web/test/lib/slots.test.ts +++ b/apps/web/test/lib/slots.test.ts @@ -2,10 +2,9 @@ import { expect, it } from "@jest/globals"; import MockDate from "mockdate"; import dayjs from "@calcom/dayjs"; +import { MINUTES_DAY_END, MINUTES_DAY_START } from "@calcom/lib/availability"; import getSlots from "@calcom/lib/slots"; -import { MINUTES_DAY_END, MINUTES_DAY_START } from "@lib/availability"; - MockDate.set("2021-06-20T11:59:59Z"); describe("Tests the slot logic", () => { diff --git a/packages/app-store-cli/package.json b/packages/app-store-cli/package.json index 22b63dabe7..3b76be06c0 100644 --- a/packages/app-store-cli/package.json +++ b/packages/app-store-cli/package.json @@ -25,11 +25,11 @@ "react": "^18.2.0" }, "devDependencies": { - "chokidar": "^3.5.3", "@types/react": "^18.0.17", + "chokidar": "^3.5.3", "eslint-plugin-react": "^7.30.1", "eslint-plugin-react-hooks": "^4.6.0", "ts-node": "^10.9.1", - "typescript": "^4.7.4" + "typescript": "^4.9.4" } } diff --git a/packages/app-store-cli/readme.md b/packages/app-store-cli/readme.md deleted file mode 100644 index 48153efd01..0000000000 --- a/packages/app-store-cli/readme.md +++ /dev/null @@ -1,9 +0,0 @@ -## How to build an App using the CLI -Refer to https://developer.cal.com/guides/how-to-build-an-app - -## TODO -- Merge app-store:watch and app-store commands; introduce app-store --watch -- An app created through CLI should be able to completely skip API validation for testing purposes. Credentials should be created with no API specified specific to the app. It would allow us to test any app end to end not worrying about the corresponding API endpoint. -- Someone can add wrong directory name(which doesn't satisfy slug requirements) manually. How to handle it. -- Allow editing and updating app from the cal app itself - including assets uploading when developing locally. -- Use AppDeclarativeHandler across all apps. Whatever isn't supported in it, support that. \ No newline at end of file diff --git a/packages/app-store/around/config.json b/packages/app-store/around/config.json index 7da74c6d21..8322367ae7 100644 --- a/packages/app-store/around/config.json +++ b/packages/app-store/around/config.json @@ -12,5 +12,14 @@ "publisher": "Cal.com", "email": "help@cal.com", "description": "Discover radically unique video calls designed to help hybrid-remote teams create, collaborate and celebrate together.", - "__createdUsingCli": true + "__createdUsingCli": true, + "appData": { + "location": { + "linkType": "static", + "type": "integrations:around_video", + "label": "Around Video", + "urlRegExp": "^http(s)?:\\/\\/(www\\.)?around.co\\/[a-zA-Z0-9]*", + "organizerInputPlaceholder": "https://www.around.co/rick" + } + } } diff --git a/packages/app-store/ee/routing-forms/components/FormInputFields.tsx b/packages/app-store/ee/routing-forms/components/FormInputFields.tsx index 5daa15d543..f05547fac0 100644 --- a/packages/app-store/ee/routing-forms/components/FormInputFields.tsx +++ b/packages/app-store/ee/routing-forms/components/FormInputFields.tsx @@ -20,6 +20,7 @@ export default function FormInputFields(props: Props) { <> {form.fields?.map((field) => { if (isRouterLinkedField(field)) { + // @ts-expect-error FIXME @hariombalhara field = field.routerField; } const widget = queryBuilderConfig.widgets[field.type]; diff --git a/packages/app-store/ping/config.json b/packages/app-store/ping/config.json index 068945376c..a199ec7896 100644 --- a/packages/app-store/ping/config.json +++ b/packages/app-store/ping/config.json @@ -12,5 +12,14 @@ "publisher": "Ping.gg", "email": "support@ping.gg", "description": "Ping.gg makes high quality video collaborations easier than ever. Think 'Zoom for streamers and creators'. Join a call in 3 clicks, manage audio and video like a pro, and copy-paste your guests straight into OBS", - "__createdUsingCli": true + "__createdUsingCli": true, + "appData": { + "location": { + "linkType": "static", + "type": "integrations:ping_video", + "label": "Ping.gg", + "organizerInputPlaceholder": "https://www.ping.gg/call/theo", + "urlRegExp": "^http(s)?:\\/\\/(www\\.)?ping.gg\\/call\\/[a-zA-Z0-9]*" + } + } } diff --git a/packages/app-store/riverside/config.json b/packages/app-store/riverside/config.json index f2541ff1b3..957242e2cf 100644 --- a/packages/app-store/riverside/config.json +++ b/packages/app-store/riverside/config.json @@ -11,5 +11,13 @@ "publisher": "Cal.com", "email": "help@cal.com", "description": "Your online recording studio. The easiest way to record podcasts and videos in studio quality from anywhere. All from the browser.", - "__createdUsingCli": true + "__createdUsingCli": true, + "appData": { + "location": { + "label": "Riverside Video", + "urlRegExp": "^http(s)?:\\/\\/(www\\.)?riverside.fm\\/studio\\/[a-zA-Z0-9]*", + "type": "integrations:riverside_video", + "linkType": "static" + } + } } diff --git a/packages/app-store/whereby/config.json b/packages/app-store/whereby/config.json index cf7f0ceaeb..847a23e99e 100644 --- a/packages/app-store/whereby/config.json +++ b/packages/app-store/whereby/config.json @@ -12,5 +12,14 @@ "publisher": "Cal.com", "email": "help@cal.com", "description": "Whereby makes it super simple for collaborating teams to jump on a video call.", - "__createdUsingCli": true + "__createdUsingCli": true, + "appData": { + "location": { + "linkType": "static", + "type": "integrations:whereby_video", + "label": "Whereby Video", + "organizerInputPlaceholder": "https://www.whereby.com/cal", + "urlRegExp": "^http(s)?:\\/\\/(www\\.)?(team.)?whereby.com\\/[a-zA-Z0-9]*" + } + } } diff --git a/packages/config/next-i18next.config.js b/packages/config/next-i18next.config.js index 84ddb6b647..39f4cc7c33 100644 --- a/packages/config/next-i18next.config.js +++ b/packages/config/next-i18next.config.js @@ -28,6 +28,7 @@ const config = { "sv", "vi", "no", + "ua", ], }, reloadOnPrerender: process.env.NODE_ENV !== "production", diff --git a/packages/config/package.json b/packages/config/package.json index 9d0b277000..821ae7c4ae 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -28,6 +28,6 @@ "prettier-plugin-tailwindcss": "^0.1.13", "tailwind-scrollbar": "^2.0.1", "tailwindcss": "^3.2.1", - "typescript": "^4.7.4" + "typescript": "^4.9.4" } } diff --git a/packages/emails/templates/attendee-scheduled-email.ts b/packages/emails/templates/attendee-scheduled-email.ts index cb946510d0..b1a6f1ffd1 100644 --- a/packages/emails/templates/attendee-scheduled-email.ts +++ b/packages/emails/templates/attendee-scheduled-email.ts @@ -22,14 +22,6 @@ export default class AttendeeScheduledEmail extends BaseEmail { this.attendee = attendee; this.showAttendees = showAttendees; this.t = attendee.language.translate; - - if (!this.showAttendees) { - this.calEvent.attendees = [ - { - ...this.attendee, - }, - ]; - } } protected getiCalEventAsString(): string | undefined { diff --git a/packages/embeds/embed-core/package.json b/packages/embeds/embed-core/package.json index bba4bd788f..4e38daf641 100644 --- a/packages/embeds/embed-core/package.json +++ b/packages/embeds/embed-core/package.json @@ -46,8 +46,8 @@ "eslint": "^8.22.0", "npm-run-all": "^4.1.5", "postcss": "^8.4.18", - "typescript": "^4.7.4", - "vite": "^2.9.15", - "tailwindcss": "^3.2.1" + "tailwindcss": "^3.2.1", + "typescript": "^4.9.4", + "vite": "^2.9.15" } } diff --git a/packages/embeds/embed-react/package.json b/packages/embeds/embed-react/package.json index bad7a7d42a..0344e608ae 100644 --- a/packages/embeds/embed-react/package.json +++ b/packages/embeds/embed-react/package.json @@ -46,7 +46,7 @@ "@vitejs/plugin-react": "^1.3.2", "eslint": "^8.22.0", "npm-run-all": "^4.1.5", - "typescript": "^4.7.4", + "typescript": "^4.9.4", "vite": "^2.9.15" }, "dependencies": { diff --git a/packages/embeds/embed-snippet/package.json b/packages/embeds/embed-snippet/package.json index 03454f9ac4..e234603943 100644 --- a/packages/embeds/embed-snippet/package.json +++ b/packages/embeds/embed-snippet/package.json @@ -25,7 +25,7 @@ "types": "./dist/index.d.ts", "devDependencies": { "eslint": "^8.22.0", - "typescript": "^4.7.4" + "typescript": "^4.9.4" }, "dependencies": { "@calcom/embed-core": "*" diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 0a7216a330..2dcbdec19d 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -8,7 +8,7 @@ "@typescript-eslint/utils": "^5.33.1", "eslint": "^8.22.0", "ts-node": "^10.9.1", - "typescript": "^4.7.4" + "typescript": "^4.9.4" }, "devDependencies": { "@types/eslint": "^8.4.5" diff --git a/packages/features/bookings/lib/handleNewBooking.ts b/packages/features/bookings/lib/handleNewBooking.ts index fa389846ec..a96d3a832a 100644 --- a/packages/features/bookings/lib/handleNewBooking.ts +++ b/packages/features/bookings/lib/handleNewBooking.ts @@ -620,6 +620,11 @@ async function handler(req: NextApiRequest & { userId?: number | undefined }) { }); const newSeat = booking.attendees.length !== 0; + + if (!evt.seatsShowAttendees) { + evt.attendees = invitee; + } + /** * Remember objects are passed into functions as references * so if you modify it in a inner function it will be modified in the outer function diff --git a/packages/features/ee/common/components/LicenseRequired.tsx b/packages/features/ee/common/components/LicenseRequired.tsx index 6c60bc239e..d477575124 100644 --- a/packages/features/ee/common/components/LicenseRequired.tsx +++ b/packages/features/ee/common/components/LicenseRequired.tsx @@ -61,7 +61,7 @@ const LicenseRequired = ({ children, as = "", ...rest }: LicenseRequiredProps) = }; export const withLicenseRequired = - (Component: ComponentType) => + (Component: ComponentType) => // eslint-disable-next-line react/display-name (hocProps: T) => ( diff --git a/packages/features/ee/common/components/v2/LicenseRequired.tsx b/packages/features/ee/common/components/v2/LicenseRequired.tsx index 6ae329ce5f..56d426e440 100644 --- a/packages/features/ee/common/components/v2/LicenseRequired.tsx +++ b/packages/features/ee/common/components/v2/LicenseRequired.tsx @@ -51,7 +51,7 @@ const LicenseRequired = ({ children, as = "", ...rest }: LicenseRequiredProps) = }; export const withLicenseRequired = - (Component: ComponentType) => + (Component: ComponentType) => // eslint-disable-next-line react/display-name (hocProps: T) => ( diff --git a/packages/features/ee/teams/pages/team-profile-view.tsx b/packages/features/ee/teams/pages/team-profile-view.tsx index f1e41da271..ed3d49d49f 100644 --- a/packages/features/ee/teams/pages/team-profile-view.tsx +++ b/packages/features/ee/teams/pages/team-profile-view.tsx @@ -12,7 +12,7 @@ import { IS_TEAM_BILLING_ENABLED, WEBAPP_URL } from "@calcom/lib/constants"; import { getPlaceholderAvatar } from "@calcom/lib/getPlaceholderAvatar"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import objectKeys from "@calcom/lib/objectKeys"; -import turndownService from "@calcom/lib/turndownService"; +import turndown from "@calcom/lib/turndownService"; import { trpc } from "@calcom/trpc/react"; import { Avatar, @@ -223,7 +223,7 @@ const ProfileView = () => { md.render(form.getValues("bio") || "")} - setText={(value: string) => form.setValue("bio", turndownService.turndown(value))} + setText={(value: string) => form.setValue("bio", turndown(value))} excludedToolbarItems={["blockType"]} />
@@ -256,7 +256,7 @@ const ProfileView = () => { <>
diff --git a/packages/features/eventtypes/components/CreateEventTypeButton.tsx b/packages/features/eventtypes/components/CreateEventTypeButton.tsx index 42afb328fb..01aff2ebde 100644 --- a/packages/features/eventtypes/components/CreateEventTypeButton.tsx +++ b/packages/features/eventtypes/components/CreateEventTypeButton.tsx @@ -202,7 +202,7 @@ const CreateEventTypeDialog = () => { min="10" placeholder="15" label={t("length")} - className="pr-20" + className="pr-4" {...register("length", { valueAsNumber: true })} addOnSuffix={t("minutes")} /> diff --git a/packages/features/eventtypes/components/DuplicateDialog.tsx b/packages/features/eventtypes/components/DuplicateDialog.tsx index 9e3082d3eb..60444fdb0a 100644 --- a/packages/features/eventtypes/components/DuplicateDialog.tsx +++ b/packages/features/eventtypes/components/DuplicateDialog.tsx @@ -117,7 +117,6 @@ const DuplicateDialog = () => { min="10" placeholder="15" label={t("length")} - className="pr-20" {...register("length", { valueAsNumber: true })} addOnSuffix={t("minutes")} /> diff --git a/packages/features/shell/Shell.tsx b/packages/features/shell/Shell.tsx index eab4287ce3..ad55159426 100644 --- a/packages/features/shell/Shell.tsx +++ b/packages/features/shell/Shell.tsx @@ -188,6 +188,7 @@ type LayoutProps = { withoutSeo?: boolean; // Gives the ability to include actions to the right of the heading actions?: JSX.Element; + smallHeading?: boolean; }; const CustomBrandingContainer = () => { @@ -785,7 +786,8 @@ export function ShellMain(props: LayoutProps) { const { isLocaleReady } = useLocale(); return ( <> -
+
{!!props.backPath && (