Skip to content

Commit

Permalink
v.1.9.1 (#3925)
Browse files Browse the repository at this point in the history
* Close.com App (#3709)

* WIP close.com app

* Removing leaked dev key (now invalid)

* Misspelled env variable

* Making progress still WIP

* Progress + tests

* Final touches

* More unit tests

* Finished up tests

* Merge main

* Removing unneeded stuff + submodules

* Removing static props, fields fix

* Removing unneeded stuff p2

* Commenting

* Standarizing APIs

* Zodifying

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: zomars <zomars@me.com>

* fix: padding of kBarTrigger (#3846)

* fixes issue with variables not working (#3859)

Co-authored-by: CarinaWolli <wollencarina@gmail.com>

* fix: remove redundant AND (#3833)

Co-authored-by: hussamkhatib <hussamkhatib@gmail.com>

* Hotfix: Embed - Fix issue in accessing sessionStorage in certain scenarios (#3851)

* Fixes issue when sessionStorage is not accessible in privacy focussed modes in various browsers

* Fix eslint errors

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* fixed iframe in lark suite, added lark contact info (#3866)

* fixed iframe in lark suite, added lark contact info

* Update _metadata.ts

* Update Railway Template (#3862)

* Update Railway Template

* Update URL

Co-authored-by: Peer Richelsen <peeroke@gmail.com>

* New Crowdin translations by Github Action (#3857)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* Attempt at redirect to 404 (#3877)

* Attempt at redirect to 404

404 should be able to handle the traffic no problem - better ideas welcome. Just a temp fix I imagine; we're not going to want to keep this nor can we expect the User-Agent to continue identifying the traffic source.

* Update next.config.js

Co-authored-by: zomars <zomars@me.com>

* hotfix dynamic issue (#3864)

* Hotfix/dos mitigation attempt error configuration (#3879)

* Fixes 'Task timed out after 60.03 seconds'

* DDoS rewrite fixes

Co-authored-by: zomars <zomars@me.com>

* Fix desktop app link (#3883)

* fixed 404 logo on cal video (#3885)

* Update all Yarn dependencies (2022-07-29) (#3599)

* Update all Yarn dependencies (2022-07-29)

* Adds syncpack config

* Fixes mismatches

* Update yarn.lock

* RRule fixes

* Locking dayjs to fix build

* Type fixes

* Fixes mismatches

* Submodule sync

* Update yarn.lock

* Update event.ts

* Conflict fixes

* Fixes prisma warnings

* Liting

* Upgrade next, zod

* Prevents articfact overwriting

* Yarn fixes

* Jest fixes

* Submodule sync

* Formatting

* Submodule sync

* Adds provider for react-tooltip

* Removed dotenv-cli

* Readds dotenv-cli

* Skips getSchedule tests

Until prisma is mocked properly

* Fixes

* Revert prisma seed script

* E2E fixes

* test

* Removed deprecated req.page in middleware

* Make tests stable

* Unskip getSchedule tests

* fixed 404 logo on cal video (#3885)

* Removed PW aliases as aren't needed anymore

Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
Co-authored-by: zomars <zomars@me.com>
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>

* Submodule sync

* temporally removed missing calendar badge on event-types (#3889)

* New Crowdin translations by Github Action (#3878)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* use default cursor on desktop (#3876)

* New Crowdin translations by Github Action (#3890)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>

* NEXTAUTH_DOMAIN isn't used

* Sync submodules

* New Crowdin translations by Github Action (#3897)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* adjust react version

* Revert "adjust react version"

This reverts commit 6e161da.

* cancel booking new design added (#3660)

* feat:  cancel booking new design added

* style: add space-y in button

* style: ui fixed for recurring booking

* fix: scroll in recurring event and use translation

* style: text 2xl instead of text-[24px]

* fix: typo, spacing

* fix: replaced multiple h2 tags with div

* fix: padding and Icon name

* Revert " cancel booking new design added" (#3922)

This reverts commit a06c564.

* New Crowdin translations by Github Action (#3909)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* New Crowdin translations by Github Action (#3924)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* New Crowdin translations by Github Action (#3926)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* fix/auto-connect-calendar-3582 (#3891)

* Added alert when there isn't default calendar connected

* Add default calendar externalId to select placeholder

* Fix typos

* Fixes prisma import

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: zomars <zomars@me.com>

* redesigned cancel page to new design (#3923)

Co-authored-by: Alex van Andel <me@alexvanandel.com>

* New Crowdin translations by Github Action (#3927)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* New Crowdin translations by Github Action (#3929)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* Design issues on success page in some languages (#3900)

Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Júlio Piubello da Silva Cabral <julio.piubello@gitstart.dev>
Co-authored-by: Matheus Muniz <87545749+matheusmuniz03@users.noreply.github.com>
Co-authored-by: Matheus Benini <matheus_benini@hotmail.com>
Co-authored-by: Grace Nshokano <grace.devolop@gmail.com>
Co-authored-by: Matheus Muniz <matheusmuniz100@hotmail.com>
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>

* fix: developer docs url (#3914)

* fix: developer docs url added

* chore : remove /

* chore : import url

Co-authored-by: Zach Waterfield <zlwaterfield@gmail.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>

* Fixes collective availability for teams with overlapping day timezones (#3898)

* WIP

* Fix for team availability with time offsets

* Prevent empty schedule from opening up everything

* When no utcOffset or timeZone's are given, default to 0 utcOffset (UTC)

* timeZone should not be part of getUserAvailability

* Prevents {days:[X],startTime:0,endTime:0} error entry

* Added getAggregateWorkingHours() (#3913)

* Added test for getAggregateWorkingHours

* Timezone isn't used here anymore

* fix: developer docs url (#3914)

* fix: developer docs url added

* chore : remove /

* chore : import url

Co-authored-by: Zach Waterfield <zlwaterfield@gmail.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>

* Test fixes

* Reinstate prisma (generate only) and few comments

* Test fixes

* Skipping getSchedule again

* Added await to expect() as it involves async logic causing the promise to timeout

* Test cleanup

* Update jest.config.ts

Co-authored-by: Alan <alannnc@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Zach Waterfield <zlwaterfield@gmail.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>

* v1.9.1

Co-authored-by: Leo Giovanetti <hello@leog.me>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: zomars <zomars@me.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com>
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: mohammed hussam <52914487+hussamkhatib@users.noreply.github.com>
Co-authored-by: hussamkhatib <hussamkhatib@gmail.com>
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
Co-authored-by: Jake Cooper <jake.elijah.cooper@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com>
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
Co-authored-by: Julian Benegas <julianbenegas99@gmail.com>
Co-authored-by: alannnc <alannnc@gmail.com>
Co-authored-by: GitStart <1501599+gitstart@users.noreply.github.com>
Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Júlio Piubello da Silva Cabral <julio.piubello@gitstart.dev>
Co-authored-by: Matheus Muniz <87545749+matheusmuniz03@users.noreply.github.com>
Co-authored-by: Matheus Benini <matheus_benini@hotmail.com>
Co-authored-by: Grace Nshokano <grace.devolop@gmail.com>
Co-authored-by: Matheus Muniz <matheusmuniz100@hotmail.com>
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com>
Co-authored-by: Zach Waterfield <zlwaterfield@gmail.com>
  • Loading branch information
1 parent 025019f commit be42ccb
Show file tree
Hide file tree
Showing 148 changed files with 7,950 additions and 5,558 deletions.
4 changes: 1 addition & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ NEXT_PUBLIC_WEBAPP_URL='http://localhost:3000'
NEXT_PUBLIC_WEBSITE_URL='http://localhost:3000'
NEXT_PUBLIC_CONSOLE_URL='http://localhost:3004'
NEXT_PUBLIC_EMBED_LIB_URL='http://localhost:3000/embed/embed.js'
# Make sure you don't have .example.com as a value
NEXTAUTH_DOMAIN='localhost:3000'

# To enable SAML login, set both these variables
# @see https://github.com/calcom/cal.com/tree/main/packages/ee#setting-up-saml-login
Expand All @@ -54,7 +52,7 @@ NEXTAUTH_URL=
# You can use: `openssl rand -base64 32` to generate one
NEXTAUTH_SECRET=
# Used for cross-domain cookie authentication
NEXTAUTH_COOKIE_DOMAIN=.example.com
NEXTAUTH_COOKIE_DOMAIN=

# Set this to '1' if you don't want Cal to collect anonymous usage
CALCOM_TELEMETRY_DISABLED=
Expand Down
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ That's where Cal.com comes in. Self-hosted or hosted by us. White-label by desig

<a href="https://www.producthunt.com/posts/calendso?utm_source=badge-top-post-badge&utm_medium=badge&utm_souce=badge-calendso" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=291910&theme=light&period=monthly" alt="Cal.com - The open source Calendly alternative | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a> <a href="https://www.producthunt.com/posts/calendso?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-calendso" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=291910&theme=light" alt="Cal.com - The open source Calendly alternative | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a> <a href="https://www.producthunt.com/stories/how-this-open-source-calendly-alternative-rocketed-to-product-of-the-day" target="_blank"><img src="https://cal.com/maker-grant.svg" alt="Cal.com - The open source Calendly alternative | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>




### Built With

- [Next.js](https://nextjs.org/)
Expand Down Expand Up @@ -266,13 +263,13 @@ yarn workspace @calcom/web playwright-report

### Docker

The Docker configuration for Cal is an effort powered by people within the community.
The Docker configuration for Cal is an effort powered by people within the community.

If you want to contribute to the Docker repository, [reply here](https://github.com/calcom/docker/discussions/32).

The Docker configuration can be found [in our docker repository](https://github.com/calcom/docker).

Issues with Docker? Find your answer or open a new discussion [here](https://github.com/calcom/docker/discussions) to ask the community.
Issues with Docker? Find your answer or open a new discussion [here](https://github.com/calcom/docker/discussions) to ask the community.

Cal.com, Inc. does not provide official support for Docker, but we will accept fixes and documentation. Use at your own risk.

Expand All @@ -284,7 +281,7 @@ Cal.com, Inc. does not provide official support for Docker, but we will accept f

### Railway

[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2Fcalendso%2Fcalendso&plugins=postgresql&envs=GOOGLE_API_CREDENTIALS%2CBASE_URL%2CNEXTAUTH_URL%2CPORT&BASE_URLDefault=http%3A%2F%2Flocalhost%3A3000&NEXTAUTH_URLDefault=http%3A%2F%2Flocalhost%3A3000&PORTDefault=3000)
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template/cal)

You can deploy Cal on [Railway](https://railway.app/) using the button above. The team at Railway also have a [detailed blog post](https://blog.railway.app/p/calendso) on deploying Cal on their platform.

Expand Down Expand Up @@ -328,7 +325,7 @@ We have a list of [help wanted](https://github.com/orgs/calcom/projects/1/views/
10. The key will be created and you will be redirected back to the Credentials page. Select the newly generated client ID under OAuth 2.0 Client IDs.
11. Select Download JSON. Copy the contents of this file and paste the entire JSON string in the .env file as the value for GOOGLE_API_CREDENTIALS key.

#### *Adding google calendar to Cal.com App Store*
#### _Adding google calendar to Cal.com App Store_

After adding Google credentials, you can now Google Calendar App to the app store.
You can repopulate the App store by running
Expand All @@ -344,6 +341,7 @@ following

1. Add extra redirect URL `<Cal.com URL>/api/auth/callback/google`
1. Under 'OAuth concent screen', click "PUBLISH APP"

### Obtaining Microsoft Graph Client ID and Secret

1. Open [Azure App Registration](https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps) and select New registration
Expand Down
2 changes: 1 addition & 1 deletion apps/api
Submodule api updated from 7560fd to 181921
2 changes: 1 addition & 1 deletion apps/console
8 changes: 4 additions & 4 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
"license": "MIT",
"dependencies": {
"iframe-resizer-react": "^1.1.0",
"next": "^12.2.0",
"next": "^12.2.5",
"nextra": "^1.1.0",
"nextra-theme-docs": "^1.2.2",
"react": "^18.1.0",
"react-dom": "^18.1.0"
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@calcom/config": "*",
"eslint": "^8.15.0"
"eslint": "^8.20.0"
}
}
24 changes: 12 additions & 12 deletions apps/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
"@radix-ui/react-radio-group": "^0.1.1",
"@radix-ui/react-slider": "^0.1.1",
"@radix-ui/react-switch": "^0.1.1",
"@radix-ui/react-tooltip": "^0.1.0",
"next": "^12.2.0",
"@radix-ui/react-tooltip": "^1.0.0",
"next": "^12.2.5",
"next-transpile-modules": "^9.0.0",
"react": "18.1.0",
"react-dom": "18.1.0",
"react-feather": "^2.0.9",
"react-hot-toast": "^2.2.0"
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-feather": "^2.0.10",
"react-hot-toast": "^2.3.0"
},
"devDependencies": {
"@babel/core": "^7.18.6",
"@babel/core": "^7.18.9",
"@calcom/config": "*",
"@storybook/addon-a11y": "^6.5.9",
"@storybook/addon-actions": "^6.5.9",
Expand All @@ -44,19 +44,19 @@
"@storybook/manager-webpack5": "^6.5.9",
"@storybook/react": "^6.5.9",
"@types/node": "16.9.1",
"@types/react": "18.0.9",
"@types/react": "^18.0.9",
"@types/react-dom": "18.0.4",
"autoprefixer": "^10.4.7",
"babel-loader": "^8.2.5",
"chromatic": "^6.6.4",
"eslint": "^8.15.0",
"chromatic": "^6.7.1",
"eslint": "^8.20.0",
"postcss": "^8.4.13",
"postcss-loader": "^7.0.0",
"storybook-addon-designs": "^6.3.1",
"storybook-addon-next": "^1.6.7",
"tailwindcss": "^3.1.3",
"tailwindcss": "^3.1.6",
"tsconfig-paths-webpack-plugin": "^3.5.2",
"typescript": "^4.6.4"
"typescript": "^4.7.4"
},
"readme": "ERROR: No README data found!",
"_id": "@calcom/storybook@0.1.0"
Expand Down
12 changes: 6 additions & 6 deletions apps/swagger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
"start": "PORT=4200 next start"
},
"dependencies": {
"highlight.js": "^11.5.1",
"highlight.js": "^11.6.0",
"isarray": "2.0.5",
"next": "12.2.0",
"next": "^12.2.5",
"openapi-snippet": "^0.13.0",
"react": "18.1.0",
"react-dom": "18.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"swagger-ui-react": "4.11.1"
},
"devDependencies": {
"@types/node": "16.9.1",
"@types/react": "18.0.9",
"@types/react": "^18.0.9",
"@types/react-dom": "18.0.4",
"typescript": "4.6.4"
"typescript": "^4.7.4"
}
}
14 changes: 13 additions & 1 deletion apps/web/components/DestinationCalendarSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React, { useEffect, useState } from "react";
import Select from "react-select";

import { useLocale } from "@calcom/lib/hooks/useLocale";
import { DestinationCalendar } from "@calcom/prisma/client";
import { trpc } from "@calcom/trpc/react";

interface Props {
Expand All @@ -11,13 +12,15 @@ interface Props {
hidePlaceholder?: boolean;
/** The external Id of the connected calendar */
value: string | undefined;
destinationCalendar?: DestinationCalendar | null;
}

const DestinationCalendarSelector = ({
onChange,
isLoading,
value,
hidePlaceholder,
destinationCalendar,
}: Props): JSX.Element | null => {
const { t } = useLocale();
const query = trpc.useQuery(["viewer.connectedCalendars"]);
Expand Down Expand Up @@ -67,11 +70,20 @@ const DestinationCalendarSelector = ({
value: `${cal.integration}:${cal.externalId}`,
})),
})) ?? [];

return (
<div className="relative" title={`${t("select_destination_calendar")}: ${selectedOption?.label || ""}`}>
<Select
name="primarySelectedCalendar"
placeholder={!hidePlaceholder ? `${t("select_destination_calendar")}:` : undefined}
placeholder={
!hidePlaceholder ? (
`${t("select_destination_calendar")}`
) : (
<span>
{t("default_calendar_selected")} ({destinationCalendar?.externalId})
</span>
)
}
options={options}
styles={{
placeholder: (styles) => ({ ...styles, ...content(hidePlaceholder) }),
Expand Down
5 changes: 5 additions & 0 deletions apps/web/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
import type { Config } from "@jest/types";

const config: Config.InitialOptions = {
preset: "ts-jest",
clearMocks: true,
setupFilesAfterEnv: ["../../tests/config/singleton.ts"],
verbose: true,
roots: ["<rootDir>"],
setupFiles: ["<rootDir>/test/jest-setup.js"],
testMatch: ["**/test/lib/**/*.(spec|test).(ts|tsx|js)"],
testPathIgnorePatterns: ["<rootDir>/.next", "<rootDir>/playwright/"],
transform: {
"^.+\\.(js|jsx|ts|tsx)$": ["babel-jest", { presets: ["next/babel"] }],
},
transformIgnorePatterns: ["/node_modules/", "^.+\\.module\\.(css|sass|scss)$"],
testEnvironment: "jsdom",
resolver: `<rootDir>/test/jest-resolver.js`,
moduleNameMapper: {
"^@components(.*)$": "<rootDir>/components$1",
"^@lib(.*)$": "<rootDir>/lib$1",
Expand Down
19 changes: 11 additions & 8 deletions apps/web/lib/app-providers.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { TooltipProvider } from "@radix-ui/react-tooltip";
import { SessionProvider } from "next-auth/react";
import { EventCollectionProvider } from "next-collect/client";
import { appWithTranslation } from "next-i18next";
Expand Down Expand Up @@ -72,14 +73,16 @@ const AppProviders = (props: AppPropsWithChildren) => {
<ContractsProvider>
<SessionProvider session={session || undefined}>
<CustomI18nextProvider {...props}>
{/* color-scheme makes background:transparent not work which is required by embed. We need to ensure next-theme adds color-scheme to `body` instead of `html`(https://github.com/pacocoursey/next-themes/blob/main/src/index.tsx#L74). Once that's done we can enable color-scheme support */}
<ThemeProvider
enableColorScheme={false}
storageKey={storageKey}
forcedTheme={forcedTheme}
attribute="class">
{props.children}
</ThemeProvider>
<TooltipProvider>
{/* color-scheme makes background:transparent not work which is required by embed. We need to ensure next-theme adds color-scheme to `body` instead of `html`(https://github.com/pacocoursey/next-themes/blob/main/src/index.tsx#L74). Once that's done we can enable color-scheme support */}
<ThemeProvider
enableColorScheme={false}
storageKey={storageKey}
forcedTheme={forcedTheme}
attribute="class">
{props.children}
</ThemeProvider>
</TooltipProvider>
</CustomI18nextProvider>
</SessionProvider>
</ContractsProvider>
Expand Down
1 change: 0 additions & 1 deletion apps/web/middleware.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { collectEvents } from "next-collect/server";
// eslint-disable-next-line @next/next/no-server-import-in-page
import { NextMiddleware, NextResponse, userAgent } from "next/server";

import { CONSOLE_URL, WEBAPP_URL, WEBSITE_URL } from "@calcom/lib/constants";
Expand Down
Loading

1 comment on commit be42ccb

@vercel
Copy link

@vercel vercel bot commented on be42ccb Aug 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

cal – ./apps/web

app.cal.com
cal-git-production-cal.vercel.app
cal-cal.vercel.app
app.calendso.com

Please sign in to comment.