From 24334d8884ebe275d925ff7e9e4507f274a2fdbb Mon Sep 17 00:00:00 2001 From: Adrian Gonzales Date: Sat, 13 Aug 2022 12:00:15 -0500 Subject: [PATCH] Pull latest changes from main (#5) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adds custom rewrite logic for hosted cal.com * Fixes lint:fix script * Linting fixes * Submodule sync * New Crowdin translations by Github Action (#3356) Co-authored-by: Crowdin Bot * Update submodule-sync.yml * Update submodule-sync.yml * Preventing technical debt to break linting * Fix/main zoom schema parsing (#3275) * zod zoom parsing only required fields * Change logger for console.error * Workflows (#3236) * build basic database structure and basic design * create simple workflow list * add editing dots to list * add mutation to create workflows * add createMutation on submit + redirect to editing page * redirect to edit page when clicking on row * add functionality to delete workflow * add timeUnit + input validation * add empty screen view * add time before it triggers to description * add multi select with checkboxes * remove getServerSideProps * set default time period to 24 * fetch eventypes and display in dropdown * add functionality to update workflows + many-to-many relationship * fix all checked event types * add SMS reminders * fix bug with trigger + relocate sms template * clean code * add model for unscheduled reminders * fix selected eventTypes * fixing value to show how many event types selected * fix plural of event types in select * add onDelete cascade for all relations * fix errors * add functionality to send SMS to specific number * fix type error for timeUnit * set default value for time unit + fix type issues * remove console.logs * fix error in checking if scheduled date is more than 1h in advance * fix build errors * add migration for workflows * add basic UI for editing workflow steps * add formSchema * improve functionality to update a step * remove console logs * fix issue with active event types * allow null value for time and timeUnit * sort steps asc step number * add action to workflow (frontend) * add phone number input for SMS to specific number * use PhoneInput for number input + input validation * improve invalid input for phone number * improve UI of phoneInput * Improve design and validation * fix undefined error * set default action when adding action * include all team event types * fix phone number input for editing steps * fix update muation to add steps * remove console logs * fix order of steps * functionality to delete steps * add trigger when event is cancelled * add custom email body * sms and email reminder updates * add custom emails * add custom email subject * send reminder email to all attendees * update migration * fix default value for time and timeUnit * save email reminders to database * clean code * add custom template to SMS actions * schedule emails with sendgrid * clean code * add workflow templates * keep custom template saved when changing templates * create reminder template for email * add dot at the end of sentace for email template * fix merge error * fix issue that template was not saved * include sending emails for when event is cancelled * fix bug that email was always sent * add templates to sms reminders * add info that sending sms to attendees won't trigger for already exisitng bookings * only schedule sms for attendees when smsReminderNumber exists * only schedule sms for attendees when smsReminderNumber exists * set scheduled of workflow reminder to false when longer than 72 hours * add cron for email scheduling + fixes for for sms an email scheduling * adjust step number when deleting a step * cast to boolean with !! * update cron job for email reminders * update sms template * send reminder email not to guests * remove sendTo from workflow reminder * fixes sending sms without name + removing sendTo everywhere * fix undefined name in sms template * set user name to undefined for sending sms to a specific number * fix singular and plural for time unit * set to edit mode when changing action and custom template is selected * delete reminders when booking cancelled or not active anymore * fix type errors * fix error that deleted reminders twice * create booking reminders for existing bookings when eventType is set active * improve email and sms templates * use BookingInfo type instead of calendarEvent for reminder emails * schedule emails for already existing bookings * add and remove reminders for new active event types and cancelled events * connect add action button with last step * fix step container width for mobile view * helper functions that return options for select * fix typo and remove comment * clean code * add/improve error messages for forms * fix typo * clean code * improve email template * clean code * fix missing prop * save reference id when scheduling reminder * fix step not added because of changed id for new steps * small fixes + code cleanup * code cleanup * show error message when number is invalid * fix typo * fix phone number input when location is already phone * set multi select checkbox to read only * change email scheduling in cron job from 7 days to 72 hours * show active event types in workflow list * fix trigger information for workflow list * improve layout for small screens in workflow list * remove optional from zod type for workflow name * order workflows by id * use link icon to show active event types * fix plural and add translation for showing nr of active eventtypes * fix text for sms reminder template * add reminders for added steps * remove optional for activeOn * improve reminder templates * improve design of custom input fields * set edit mode to false when phone number isn't needed anymore * set sendTo in workflow step only for SMS_NUMBER action * set email body and subject only when custom template * only delete reminders that belong to workflow steps * improve text for new event book trigger * move reminders folder to workflows * fix issue that save button was sometimes enabled in edit mode * fix form issues for send to * delete all scheduled reminders when workflow is deleted * use enum for method * fix imports for workflow methods * add missing import * fix edit mode * create reminders when event is confirmed * add reminderScheduler to reduce duplicate code * make workflow enterprise and pro only feature * move all files to /ee/ folder * move package.json change to /ee/ folder * add pro badge to shell * set to edit mode to true if email subject is missing when action changes * fix loading bug * add migration * fix old imports * don't schedule reminders for opt-ins * fix style of email body * code clean up * Update yarn.lock * fix isLoading for active on dropdown * update import for prisma Co-authored-by: Omar López * update imports * remove console * use session to check if user has valid license * use defaultHandler * clean up code * Create db-staging-snapshot.yml * move LisenceRequired inside shell * update import for FormValues * fix phone input design * fix disabled save button for edit mode * squah all migration into a single one * use isAfter and isBefore instead of isBetween * import dayjs from @calcom * validate phone number for sms reminders when booking event * Allows auto approvals for crowdin Co-authored-by: CarinaWolli Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars * Only make web3 call if credential exists (#3323) * Add has web3 credential * Address feedback * Address feedback * Fix e2e test * Remove unused code * Remove unused import Co-authored-by: Peer Richelsen Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Fix Caldav not valid destination calendar and only display calendars that user can edit (#3326) * Default readOnly to false * Display only calendars users can edit * Remove console.log * Remove console.log Co-authored-by: Omar López Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Adds a fully extensible command(ctrl)+k interface for Cal (#3346) * init * action function added * kbar trigger placed * UI improvements to KBar, added command + K tooltip * renamed quick find to commandbar * replaced window router with nextjs router * keyboard up n down nav shows up Co-authored-by: Peer Richelsen Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * New Crowdin translations by Github Action (#3360) Co-authored-by: Crowdin Bot * Fixes label to set Riverside link (#3358) * fix label for riverside link * add missing space Co-authored-by: CarinaWolli Co-authored-by: Peer Richelsen * Improves UI stability of availability page. No CLS now. (#3347) * New Crowdin translations by Github Action (#3362) Co-authored-by: Crowdin Bot * kbar follow up (#3361) * added more routes to kbar * added right direction for tooltip, moved search icon next to logo, added keyboard shortcuts to command bar * added right direction for tooltip, moved search icon next to logo, added keyboard shortcuts to command bar * fixed search icon for tablet * fixed search icon for mobile * hide keyboard shortcut legend on mobile * extracted strings * Routing Forms (#2785) * Add Routing logic to Query builder * Make a working redirect * Make it an app * Move pages and components to App * Integrate all pages in the app * Integrate prisma everywhere * Fix Routing Link * Add routing preview * Fixes * Get deplouyed on preview with ts disabled * Fix case * add reordering for routes * Move away from react DnD * Add sidebar * Add sidebar support and select support * Various fixes and improvements * Ignore eslint temporarly * Route might be falsy * Make CalNumber support required validation * Loader improvements * Add SSR support * Fix few typescript issues * More typesafety, download csv, bug fiees * Add seo friendly link * Avoid seding credebtials to frontend * Self review fixes * Improvements in app-store * Cahnge Form layout * Add scaffolding for app tests * Add playwright tests and add user check in serving data * Add CI tests * Add route builder test * Styling * Apply suggestions from code review Co-authored-by: Agusti Fernandez Pardo <6601142+agustif@users.noreply.github.com> * Changes as per loom feedback * Increase time for tests * Fix PR suggestions * Import CSS only in the module * Fix codacy issues * Move the codebbase to ee and add PRO and license check * Add Badge * Avoid lodash import * Fix TS error * Fix lint errors * Fix bug to merge conflicts resolution - me query shouldnt cause the Shell to go in loading state Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars Co-authored-by: Agusti Fernandez Pardo <6601142+agustif@users.noreply.github.com> * Update LicenseRequired.tsx * Update LicenseRequired.tsx * Revert "Adds custom rewrite logic for hosted cal.com" This reverts commit 9e5b1f121f0a6d404810cf960d901029b596517f. # Conflicts: # apps/web/next.config.js * create cron-scheduleEmailReminders (#3374) * Create cron-scheduleSMSReminders.yml (#3373) Co-authored-by: Omar López * Restores old CI config * Fixes timezone in reminder templates (workflows) (#3376) * fix time zone in reminder template * fix timezone in email subject * add missing timezone * fix date in sms reminder template * use organizer time zone if message send to host * fix build error Co-authored-by: CarinaWolli Co-authored-by: Omar López * Routing Forms - Avoid Flicker, Fix preload of Cal Font (#3368) * Fix flicker due to Shell on Routing Form pages. Fix font preload(unrealted to routing forms) * Update _app.tsx Co-authored-by: Omar López * New Crowdin translations by Github Action (#3364) Co-authored-by: Crowdin Bot * minor improvements to routing forms (#3380) * minor improvements to routing forms * UX improvements and text changes Co-authored-by: Hariom Balhara Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Add workflow setup information to README.md (#3379) * purged shadow-sm (#3381) Co-authored-by: Omar López * New Crowdin translations by Github Action (#3382) Co-authored-by: Crowdin Bot Co-authored-by: Peer Richelsen * Fixes broken avatar slug link in availability page : OG image (#3255) * fixed broken avatar slug link * alternate fix Co-authored-by: Peer Richelsen Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * extracted upgrade to pro strings (#3383) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * New Crowdin translations by Github Action (#3385) Co-authored-by: Crowdin Bot * Handle fake video apps (#3232) Co-authored-by: Omar López * Bug(header): profile dropdown flickering on mobile (#3071) Co-authored-by: gitstart Co-authored-by: Peer Richelsen Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars * Submodule sync * v1.8.0 * New Crowdin translations by Github Action (#3387) Co-authored-by: Crowdin Bot * fix bug with disabled save button (#3390) Co-authored-by: CarinaWolli * Fix possible 404 when obtaining calendar busy lists (#3345) * Edited typo (#3391) "Workflows enable you to automate sending reminders and notifcations." --> "Workflows enable you to automate sending reminders and notifications." Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * HOTFIX: fixes soft failing on settings/profile routes (#3394) * fixes soft failing on settings/profile routes * Fixed auto changed code * Fixed auto changed code Probably down to some random windows incompatibility with the parser/beautifier at commit time * Fix the path for "schema.prisma" file in README.md (#3386) * Remove shallow routing (#3401) * added title to forms, removed shadow-sm (#3412) * Ensure / is used for paths in import (#3411) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * When rescheduling update specific calendar (#3375) Co-authored-by: Omar López Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * moved impersonating alert to the top (#3420) * Disables batching for i18n query (#3181) * Disables batching for i18n query * Makes i18n batch skip explicit * Added optional to password to zoom response (#3422) * Remove Add Another for global - fix spacing (#3432) * Use nodeJS 14+ compatible method for replacing (#3429) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Hotfix: Unrelated bookings marked as cancelled due to recurring event (#3427) * Fix updatedAt not updating * Fix accidental cacnellation of all bookings if recurringEventId is null * Update apps/web/pages/api/cancel.ts Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com> * Fix linting * Linting warnings Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars * Fix routing (#3445) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Import ee from package instead of as @ee as that isnt available to api (#3446) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Cancelling recurring vs single event (#3448) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * New Crowdin translations by Github Action (#3398) Co-authored-by: Crowdin Bot * Refactor cancel integrations logic (#3416) * Refactor cancel integrations logic * Add additional comments Co-authored-by: Peer Richelsen Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Hotfix: Cancelling recurring events follow-up (#3454) * Other fixes and applying feedback * Adds defaultResponder to handle zod errors Co-authored-by: zomars * Hide useless windows scrollbar when they are not event required (#3458) * subtle adjustment to the position of the search icon (#3440) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Fix a typo in the server lib (#3439) Co-authored-by: Peer Richelsen * Submodule sync * v1.8.1 * Fixed action button display while responsive and fix translations (#3469) * Feature: Routing Forms Webhook for Form Responses (#3444) Co-authored-by: Omar López Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Upgrades prisma to v4 (#3179) * Upgrades prisma to v4 * Upgrades prisma to v4 * Upgrades prisma to v4 * Removes preview feature as it's on stable now * Adds missing owner relationship * Adds missing onCascades to prevent orphans * TODO * Adds default date to feedback * Adds missing foreign keys * Update schema.prisma * Update console * Fixes build error * Update console * Delete migration.sql * Bump prisma to v4.1 * Implementing additional feedback from Workflows PR (#3456) * implement feedback * put formSchema outside of react component * don't show new workflow button for free Users * code clean up Co-authored-by: CarinaWolli Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Omar López * fix/error-handling-with-proper-status (#3453) * Add conditional on error handling * Fix return type for handleError Co-authored-by: Omar López * fix setting away status (#3473) * show error message when wrong workflow id (#3474) * Fix TS errors and weird instances of undefined error due to prisma upgrade and turbo cache (#3475) * Fix TS errors * Always reexecute prisma postinstall as prisma version might change after yarn * Hide button if readonly (#3471) Co-authored-by: Alex van Andel * New Crowdin translations by Github Action (#3461) Co-authored-by: Crowdin Bot * Apply suggestions from code review (#3480) Co-authored-by: gitstart Co-authored-by: Peer Richelsen * Add getSchedule tests (#3233) * Add getSchedule tests * Add first integration test * Update turbo.json * Make sure unit tests run asap * Worker threads * Improve team event test * Remove unrelated changes * Improve tests readability * Update CalendarManager.ts * Add README * Debug tests * Temporarily disabled build errors * Fix failing tests * Remove unncessary logs Co-authored-by: zomars * Team Impersonation (#3450) * Team Impersonation * Refactor - Disable Imeprsonate button * Change copy * Add .env toggle * Fix eslint * Update role selection Co-authored-by: Omar López * New 'admin' seed user, improve flow ImpersonationProvider * Fix impersonation string * Adds fullstop Co-authored-by: Sean Brydon Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Omar López Co-authored-by: Alex van Andel Co-authored-by: Peer Richelsen * Fixes bug that new line is not working in workflow reminder emails (#3452) * add html format to email template * remove workflow reminder email * fix that text was used instead of html * fixes that email subject was used instead of body * remove \n\n from text template Co-authored-by: CarinaWolli Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Self-hosted onboarding first admin wizard (#3393) * WIP * API and step done fallback * Finishing up tweaks * Inline comment * Translations * Revert "Self-hosted onboarding first admin wizard (#3393)" (#3485) This reverts commit ee14423f4c2899ab16fb1a39b35047e37d3b9d1d. * Update labeler.yml * Adds missing migration * fix reschedule translation (#3487) Co-authored-by: CarinaWolli * New Crowdin translations by Github Action (#3483) Co-authored-by: Crowdin Bot * Hotfix: Embed ModalBox - Hidden Content (#3491) * Riverside,whereby doesnt have videoApi handle that (#3494) * Add session info to Beacon (#3497) * fixes #3336 - Avatar on New Event Type (#3465) Co-authored-by: Bailey Pumfleet Co-authored-by: Peer Richelsen * Migrates all tRPC code to a monorepo package (#3484) * WIP * WIP * Type and migration fixes * Adds missing default import * Fixes import * Fixes tRPC imports in App Store * Migrate stripe helpers * WIP * Type fixes * Type fix? * Test fixes * Adds missing stripe packages * Moved queries to lib instead Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Add verification json (#3505) * Refactor: use EditableHeading in event-types/[type].tsx (#3468) Co-authored-by: Peer Richelsen * New Crowdin translations by Github Action (#3501) Co-authored-by: Crowdin Bot * Adds missing migration * Feat/design system (#3051) * Storybook Boilerplate setup * Inital Setup * First story * Color Design System * Badge Story + Comp * Checkbox UI + Stories * Update Red colors + Button Group * Switch+Stories / Default brand color * Update Version + Button Group combined * Compact Butotn Group * Tidy up Selectors * Adds Tooltip to Button * TextInput * Update SB * Prefix Input * Match text area styles * Prefix Controls * Update spacing on text area * Text Input Suffix * Color Picker * Update storybook * Icon Suffix/Prefix * Datepicker + move components to monorepo * Text color on labels * Move Radio over to monorepo * Move CustomBranding to calcom/ib * Radio * IconBadge Component * Update radio indicator background * Disabled radio state * Delete yarn.lock * Revert "Delete yarn.lock" This reverts commit 9b99d244b70872153a16bec1f1f3bc651e94be7a. * Fix webhook test * Replace old toast location * Update radio path * Empty State * Update Badge.tsx * Update Badge.tsx * Banner Component+story * Creation Modal * Creation Dialog updated * Button hover dialog * Confirmation Modal * Datepicker (Booking) * PageHeader * Fix border width * PageHeader update search bar * Fix input height * Fix button group size * Add spacing between badges - font smoothing * Update button position on banner * Banner update * Fixing focus state on suffix/prefix inputs * Implement A11y addon * Add aria label * error && "text-red-800" * Fix button hover * Change colors * Generate snapshot tests for on hover button * Revert colors to demo * Change colors * Fix Linear Issues * Form Stepper component * Add padding back to input * Move ui to UI_V2 * Use V2 * Update imports for v1 * Update imports for v1 * Upgrade to nextjs in storybook root * Update website submodule * Avatar Groups * Fix webpack again * Vertical Tab Item [WIP] - active state on small item is not working currently * Vertical Tab Group * Add Github action * Fix website submodule * Fix GH action * Rename Workflow * Adds lint report for CI * Lint report fixes * NavigationItem comments * VerticalTabItem type fixes * Fix avatar blur * Fix comments * Adding isEmbed to window object * Disable components that use router mock. * Load inter via google fonts * Started select * Adding base Breadcrumb * Update readme * Formatting * Fixes * Dependencies matching * Linting * Update FormStep.stories.tsx * Linting * Update MultiSelectCheckboxes.tsx Co-authored-by: zomars Co-authored-by: Peer Richelsen * Fixing already installed apps & link to them (#3500) Co-authored-by: Peer Richelsen * Wipe my cal e2e fixes (#3509) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Fix V1 Colors (#3520) * HubSpot app improvement: create contacts (#3502) * WIP * Last changes * Create non-existing contacts from attendees * Adding list of features * Removing unneeded code * Missing error when creating contacts Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Fixes/bookings 500 (#3523) * Fixes an annoying 500 error in bookings * Fixes back to bookings link Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Storybook router issue fix (#3525) Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> * fix cron job for reminders (#3488) Co-authored-by: CarinaWolli * Fixes Atlantic/Azores blank results (#3516) * Disallow search engine indexing of hidden event types (#3478) Co-authored-by: gitstart Co-authored-by: Alex van Andel * Improve phone number input (#3472) * add country code once country selected * add changes also for when editing workflows Co-authored-by: CarinaWolli Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * fix translation key (#3527) Co-authored-by: CarinaWolli * Feat: Add next-themes for theme handling (#3263) * chore: add next-themes * feat: add next theme provider * fix: modify useTheme hook to use next-themes * fix: use the new hook for theming * remove conditional rendering with isReady boolean flag * remove Theme component returned from useTheme hook * Update missing useTheme usage * Fix theme switching as per system. Also, ensure that booking and non booking pages can maintain their own requirements of theme simulatenously Co-authored-by: Peer Richelsen Co-authored-by: zomars Co-authored-by: Alex van Andel Co-authored-by: Hariom Balhara * Some optimisations to the storybook (#3526) * Some optimisations to the storybook * Fixed merge artifact Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> * Build fixes handleErrorsJson signature changed which triggered errors here * Update check-if-ui-has-changed.yml * Playwright should not live on deps * Display correct time format on availability page (#3441) * Pass time format * Write 24hr time format * Remove console.log * Change regex * Add console.log * Remove console.log * Remove console.log * Update TimeOptions.tsx * Write time format to localstorage on user create / edit * Grab and set from local storage * On user create grab timeformat from browser * Update timeFormat in DB * Fix typo Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars * Fix input on trial accounts (#3522) * Fix input on trial accounts * Refactor conditional * Prevent team members from creating events (#3498) * Delete CreateEventTypeBtn.tsx * Adding Permission to creation router * Disable button if membership role is member * Fix linting error * Update explicit role selection Co-authored-by: Omar López * Type fix Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Omar López * v1.8.2 * hotfix: bookings and availability pages commit 36e1c9272fa9b86cbe9e53e03e83799820674f17 Author: zomars Date: Tue Jul 26 18:27:57 2022 -0600 Update [schedule].tsx commit f39535feea22a11a857d179f3506803602a95728 Author: zomars Date: Tue Jul 26 18:07:30 2022 -0600 Update [status].tsx commit c3ac1bcc8c7ff8dc7ebf178d23a6e5c7ea223749 Author: zomars Date: Tue Jul 26 17:53:43 2022 -0600 Update [schedule].tsx commit 39364d8476b3c582d4a7fe3f8d139c5d254e3ecf Author: zomars Date: Tue Jul 26 17:43:13 2022 -0600 Debugging prod commit 4b428d22dec734dab19096b4fe07741f18e5bc5d Author: zomars Date: Tue Jul 26 17:20:44 2022 -0600 Update checkLicense.ts commit 4212e6d61908face52d647bb661d71db959cf864 Author: zomars Date: Tue Jul 26 17:11:37 2022 -0600 Booking fixes attempt commit e3160027ea0ce40d129b445daeb3bb17711ac640 Author: zomars Date: Tue Jul 26 13:52:35 2022 -0600 migration conflict fixes * v1.8.3 * feather icons and inter (#3366) * Fix chormatic Action (#3548) * Updates build DIR/command (#3550) * Avoid global variables leak by making the entire code IIFE (#3543) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Fixes button appearance on Safari * Fix/office365 api call (#3534) * WIP fixes for handling office365 api call * First working version microsoft api call handling * Remove logs * Clean up and improve function names * Clean up * Remove log * Fix function missing its correct name * Fix direct return of statement * Cleanup * Simplify with private fetcher * Update CalendarService.ts * Update getOfficeAppKeys.ts Co-authored-by: zomars Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Fixes depth (#3555) * Add axiom to next config (#3556) * Few updates to V2 components (#3532) * Fix breadcrumb colors * HorizontalTabs * Team List Item WIP * Horizontal Tabs * Cards * Remove team list item WIP Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Feat/onboarding admin (#3486) * WIP * API and step done fallback * Finishing up tweaks * Inline comment * Translations * Update apps/web/pages/api/auth/setup.ts Co-authored-by: Omar López * Update apps/web/pages/api/auth/setup.ts Co-authored-by: Omar López * Update apps/web/pages/api/auth/setup.ts Co-authored-by: Omar López * Update apps/web/pages/api/auth/setup.ts Co-authored-by: Omar López * Linting fixes * Update apps/web/pages/auth/setup.tsx Co-authored-by: Omar López * Linting fix * Moving to v2 * Translations Co-authored-by: Leo Giovanetti Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Fix getSchedule tests (#3560) * Embedded Routing Forms - Part1 (#3530) * Support dark theme in routing form * Fix Embed detection * Add routing form embed example * Better rendering support in dark mode for react-select * Fix more theme issues * Added test for Routing Form Embed Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * New Crowdin translations by Github Action (#3539) Co-authored-by: Crowdin Bot * Fix: Doc typo fix in coding styling (Developer docs) (#3533) Co-authored-by: Bailey Pumfleet * Improve help dialog strings (#3570) * Refactors EE code (#3490) * WIP * WIP * Type and migration fixes * Adds missing default import * Fixes import * Fixes tRPC imports in App Store * Migrate stripe helpers * WIP * Type fixes * Type fix? * WIP * WIP * Update index.ts * Fixes * Update workflow.tsx * Moved queries to lib * Moves QueryCell * Migrates MultiSelectCheckboxes * WIP * CryptoSection type fixes * WIP * Import fixes * Build fixes * Update app-providers.tsx * Build fixes * Upgrades hookform zod resolvers * Build fixes * Cleanup * Build fixes * Relocates QueryCell to ui * Moved List and SkeletonLoader * Revert QueryCell migration * Can't use QueryCell here * oops * CryptoSection cleanup * Update app-providers.tsx * Moved ee to features * ee to features/ee * Removes @calcom/ee * Adds possible feature locations * Build fixes * Migrates stripe to app-store lib * Colocates stripe imports * Update subscription.ts * Submodule sync Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Submodule sync * UI tweaks (#3576) * added status.cal.com badge * Fix broken getLocaleFromHeaders import (#3592) * Fixes tailwind for EE code * Fix Deploy with Vercel and add note and build commands and root directory (#3590) * Squashed commit of the following: commit e84ca3c1fcb625f8cde160b31c1f2b5def78e0bf Author: zomars Date: Thu Jul 28 14:10:57 2022 -0600 fix commit 29025a1104c2853597b5f3abd0d26aaa27a76aa2 Author: zomars Date: Thu Jul 28 14:10:04 2022 -0600 Force vercel deploy commit b070a6460cf871488340a22d71c14962f37e7023 Author: Hariom Balhara Date: Thu Jul 28 19:03:07 2022 +0530 Avoid global variables leak by making the entire code IIFE (#3543) (#3568) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> commit f05c7c40829947aefb0c67b931420bca18b79b29 Author: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com> Date: Wed Jul 27 16:19:59 2022 -0400 Add axiom to next config (#3556) commit c3d05e86862277c270557bab98e170cc8b051afe Author: Hariom Balhara Date: Wed Jul 27 14:12:09 2022 +0530 Potential fix, broken workflow (#3545) commit 36e1c9272fa9b86cbe9e53e03e83799820674f17 Author: zomars Date: Tue Jul 26 18:27:57 2022 -0600 Update [schedule].tsx commit f39535feea22a11a857d179f3506803602a95728 Author: zomars Date: Tue Jul 26 18:07:30 2022 -0600 Update [status].tsx commit c3ac1bcc8c7ff8dc7ebf178d23a6e5c7ea223749 Author: zomars Date: Tue Jul 26 17:53:43 2022 -0600 Update [schedule].tsx commit 39364d8476b3c582d4a7fe3f8d139c5d254e3ecf Author: zomars Date: Tue Jul 26 17:43:13 2022 -0600 Debugging prod commit 4b428d22dec734dab19096b4fe07741f18e5bc5d Author: zomars Date: Tue Jul 26 17:20:44 2022 -0600 Update checkLicense.ts commit 4212e6d61908face52d647bb661d71db959cf864 Author: zomars Date: Tue Jul 26 17:11:37 2022 -0600 Booking fixes attempt commit e3160027ea0ce40d129b445daeb3bb17711ac640 Author: zomars Date: Tue Jul 26 13:52:35 2022 -0600 migration conflict fixes * Fixes dotenv replacements * Update Kbar.tsx * Type fixes * Update WebhookListContainer.tsx * Update [status].tsx * Uses ISR on setup pages * Fixes missing import * New Crowdin translations by Github Action (#3569) Co-authored-by: Crowdin Bot * added help wanted project board * added figma design system and help wanted shields to readme * nit change to readme * change prerequistic of node.js from min 14.x to 15.x (#3587) * Improved German locale (#3521) Improved and corrected the grammar and wording. Co-authored-by: Omar López Co-authored-by: Peer Richelsen * Fix last day of month handling logic in tests (#3605) * Fix last day of month handling logic * Update apps/web/test/lib/getSchedule.test.ts Co-authored-by: Omar López * Update apps/web/test/lib/getSchedule.test.ts * Update apps/web/test/lib/getSchedule.test.ts Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Peer Richelsen Co-authored-by: Omar López * fix design issue (#3606) Co-authored-by: CarinaWolli * Refactors twilio provider (#3604) Prevents multiple twilio redeclarations Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * New Crowdin translations by Github Action (#3609) Co-authored-by: Crowdin Bot * Hide dropdown under modal dialog (#3607) Co-authored-by: Adam Garbowski Co-authored-by: Peer Richelsen * Use non shallow mode (#3620) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Fixes unique constraint error of batchId when scheduling emails (#3542) * make batchid unique + return response status 200 * use correct batchId * change for loop and updateMany Co-authored-by: CarinaWolli Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Fix app id when creating credential (#3629) * Sorts root scripts and adds prisma alias * Feat/onboarding username (#3580) * fix: remove duplicate button in textusernamefield * feat: adds username if not present in getting-started first onboarding step * fix: credentials * fix: typo * fix: user type * fix: type errors * Validates successRedirectUrl earlier with zod * Removes deprecated api endpoint * Reduces the data needed for the frontend on onboarding Co-authored-by: Agusti Fernandez Pardo Co-authored-by: Peer Richelsen Co-authored-by: Omar López * Fixes successRedirectUrl * v1.8.4 * Submodule sync * Fixes successRedirectUrl commit b006240b0c62e9e62944cb7184793f099358e2ec Merge: 6179b3fbe e7418f68a Author: zomars Date: Mon Aug 1 18:20:47 2022 -0600 Merge branch 'main' into production commit 6179b3fbe06709f1cf3a4e54214a7dbb1543765e Author: zomars Date: Mon Aug 1 18:20:40 2022 -0600 Fixes successRedirectUrl validation commit 14443099e0377e8d9af52f53f15c2f8b91b784d2 Author: zomars Date: Mon Aug 1 17:59:47 2022 -0600 successRedirectUrl fixes * Correcting syntax of overloading (#3598) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * fix: base_url for login link should be WEBAPP_URL not WEBSITE_URL (#3637) * fix: cleanup onboarding username (#3638) * fixed dark mode profile page (#3650) * fixed dark mode profile page * nit * Fix/google calendar false alert (#3636) * Avoid duplicating any video credential (#3593) Co-authored-by: gitstart Co-authored-by: alannnc * feat(troubleshoot): add event titles to the troubleshoot page (#3434) (#3437) * [Proposal] Event type error popover proposal (#3627) * Update LICENSE * Update LICENSE * Update README.md * Update README.md * Potential fix (#3671) * When no location, defaults to cal video (#3517) * yarn * fixed bug * fixed warning * fixed problem on server side * yarn update * Delete yarn.lock * removed unused type * Revert "Delete yarn.lock" This reverts commit 4fe99af4757343d9efb2326be546cd81161c8da3. revert delete yarn.lock * Delete yarn.lock * Revert "Delete yarn.lock" This reverts commit 9f76a548e0950202674e5c5fcb755db3ff7867bd. revert delete yarn.lock * Revert "yarn update" This reverts commit 2bef496c1693acd509a7b577ca7013e94ab7200a. * yarn * remove yarn.lock * remove yarn.lock * removed double declaration * Revert "yarn update" This reverts commit 2bef496c1693acd509a7b577ca7013e94ab7200a. * stop tracking yarn lockfile * undo all yarn lockfile changes * Revert "yarn" This reverts commit 46eb3595cf687504c6783315749b3124936080b9. * remove all yarn changes * Update packages/trpc/server/routers/viewer/bookings.tsx Co-authored-by: Omar López * zod transform insteead of ternary operator Co-authored-by: Peer Richelsen Co-authored-by: Omar López * Update V2 components + Move to react-icons (#3670) * Tweaks for Website signup form (#3635) * WIP, only deep testing needed * Feedback suggestions * Uses early returns instead * Allows overriding t function via prop Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars * Fix/api build (#3675) * fix: shared next-auth calendso session type fix * fix: move imports from @lib -> @calcom/lib to fix types * Consolidates next-auth definitions Co-authored-by: Agusti Fernandez Pardo Co-authored-by: zomars * Variables for custom templates in workflows (#3602) * improve functionality to update a step * remove console logs * fix issue with active event types * allow null value for time and timeUnit * sort steps asc step number * add action to workflow (frontend) * add phone number input for SMS to specific number * use PhoneInput for number input + input validation * improve invalid input for phone number * improve UI of phoneInput * Improve design and validation * fix undefined error * set default action when adding action * include all team event types * fix phone number input for editing steps * fix update muation to add steps * remove console logs * fix order of steps * functionality to delete steps * add trigger when event is cancelled * add custom email body * sms and email reminder updates * add custom emails * add custom email subject * send reminder email to all attendees * update migration * fix default value for time and timeUnit * save email reminders to database * clean code * add custom template to SMS actions * schedule emails with sendgrid * clean code * add workflow templates * keep custom template saved when changing templates * create reminder template for email * add dot at the end of sentace for email template * fix merge error * fix issue that template was not saved * include sending emails for when event is cancelled * fix bug that email was always sent * add templates to sms reminders * add info that sending sms to attendees won't trigger for already exisitng bookings * only schedule sms for attendees when smsReminderNumber exists * only schedule sms for attendees when smsReminderNumber exists * set scheduled of workflow reminder to false when longer than 72 hours * add cron for email scheduling + fixes for for sms an email scheduling * adjust step number when deleting a step * cast to boolean with !! * update cron job for email reminders * update sms template * send reminder email not to guests * remove sendTo from workflow reminder * fixes sending sms without name + removing sendTo everywhere * fix undefined name in sms template * set user name to undefined for sending sms to a specific number * fix singular and plural for time unit * set to edit mode when changing action and custom template is selected * delete reminders when booking cancelled or not active anymore * fix type errors * fix error that deleted reminders twice * create booking reminders for existing bookings when eventType is set active * improve email and sms templates * use BookingInfo type instead of calendarEvent for reminder emails * schedule emails for already existing bookings * add and remove reminders for new active event types and cancelled events * connect add action button with last step * fix step container width for mobile view * helper functions that return options for select * fix typo and remove comment * clean code * add/improve error messages for forms * fix typo * clean code * improve email template * clean code * fix missing prop * save reference id when scheduling reminder * fix step not added because of changed id for new steps * small fixes + code cleanup * code cleanup * show error message when number is invalid * fix typo * fix phone number input when location is already phone * set multi select checkbox to read only * change email scheduling in cron job from 7 days to 72 hours * show active event types in workflow list * fix trigger information for workflow list * improve layout for small screens in workflow list * remove optional from zod type for workflow name * order workflows by id * use link icon to show active event types * fix plural and add translation for showing nr of active eventtypes * fix text for sms reminder template * add reminders for added steps * remove optional for activeOn * improve reminder templates * improve design of custom input fields * set edit mode to false when phone number isn't needed anymore * set sendTo in workflow step only for SMS_NUMBER action * set email body and subject only when custom template * only delete reminders that belong to workflow steps * improve text for new event book trigger * move reminders folder to workflows * fix issue that save button was sometimes enabled in edit mode * fix form issues for send to * delete all scheduled reminders when workflow is deleted * use enum for method * fix imports for workflow methods * add missing import * fix edit mode * create reminders when event is confirmed * add reminderScheduler to reduce duplicate code * make workflow enterprise and pro only feature * move all files to /ee/ folder * move package.json change to /ee/ folder * add pro badge to shell * set to edit mode to true if email subject is missing when action changes * fix loading bug * add migration * fix old imports * don't schedule reminders for opt-ins * fix style of email body * code clean up * Update yarn.lock * fix isLoading for active on dropdown * update import for prisma Co-authored-by: Omar López * update imports * remove console * use session to check if user has valid license * use defaultHandler * clean up code * Create db-staging-snapshot.yml * move LisenceRequired inside shell * update import for FormValues * fix phone input design * fix disabled save button for edit mode * squah all migration into a single one * use isAfter and isBefore instead of isBetween * import dayjs from @calcom * validate phone number for sms reminders when booking event * Allows auto approvals for crowdin * add dropdown for adding dynamic variables to string * use lighter text colour for disabled button * change textarea for email subject to one row only * add function to create custom template with dynamic variables * add location to dynamic variables * add missing locations to custom template * add variables at cursor position * remove second curly brakets from variables * code cleanup * fix names for attendee and organizer * enable internationaliztion for custom reminders * disabled add workflow button when mutation is loading * fix translation keys * internationalize dates * code clean up * add translation for email subject * skip translation for english * remove language from BookingInfo type * add additional notes as variable * add custom inputs as variables * add information for custom inputs * add translation * Add formated variables in additional input information * fix type errors * code clean up * Update AddVariablesDropdown.tsx * Update variableTranslations.ts * Update variableTranslations.ts * Formatting * Update [workflow].tsx Co-authored-by: CarinaWolli Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars * make edit button full width (#3686) * New Crowdin translations by Github Action (#3683) * New Crowdin translations by Github Action (#3689) Co-authored-by: Crowdin Bot Co-authored-by: Peer Richelsen * Improve design of workflow reminder email (#3685) * Fix app-store seeding (#3693) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Properly parse list calendar call to MS Graph (#3698) * fix heroku build (#3630) * pick https://github.com/nosovk/cal.com/pull/1 * make all devdeps to devDependencies * add more ENV to Heroku config https://github.com/calcom/cal.com/pull/3630 Co-authored-by: Peer Richelsen Co-authored-by: Omar López * fix: made add-to-calendar responsive (#3703) * Adding debugging info (#3706) * Fixing App tabs routing (#3711) * Removing linkProps * Fixing format * Fix textarea dark theme (#3712) * Embed Test: Verifies that app remains hidden till link is ready (#3669) * Add test to verify that webapp remains hidden till link is considered ready * Make tests more stable * updates to all public booking pages (#3648) * updates to all public booking pages * sidebar tweak * resolving error * Fix linting errors Co-authored-by: CarinaWolli Co-authored-by: Peer Richelsen Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * fix: group hover bug (#3699) Co-authored-by: Peer Richelsen * fix: icon positioning (#3715) * Cleans up cli generator and enables prettier formatting (#3718) * Fix bug for reschedule on opt-in bookings (#3678) * Fix bug for reschedule on opt-in bookings * Fix a missing query parameter being removed when changing month, useRouterQuery * Added test for rescheduling user type condition * Fix conditional that triggers input disabling when rescheduling Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Bailey Pumfleet * feat: support lark calendar (#3019) * feat: support lark calendar * New Crowdin translations by Github Action (#3016) Co-authored-by: Crowdin Bot Co-authored-by: Peer Richelsen * fix: lark calendar get app ticket bugs * feat: add send msg service for lark bot * fix: comment on PR of lark-calendar * chore: update lark bot message * Refactors add endpoint * Adds missing GET endpoint handler * Update yarn.lock * fix: comments * Update yarn.lock * fix: comment about inferred type * Added fetcher helper * Update yarn.lock Co-authored-by: chengcheng.frontend Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Crowdin Bot Co-authored-by: Peer Richelsen Co-authored-by: zomars * Event description now supports markdown formatting (#3688) * yarn * yarn update * added Mardown style formatting with sanitized inputs * Revert "yarn" This reverts commit 46eb3595cf687504c6783315749b3124936080b9. * Revert "yarn" This reverts commit 46eb3595cf687504c6783315749b3124936080b9. * Revert "yarn update" This reverts commit f4600d83a67b930c6dd72e292827578856ca5428. * Revert "yarn" This reverts commit 46eb3595cf687504c6783315749b3124936080b9. * Revert "yarn update" This reverts commit f4600d83a67b930c6dd72e292827578856ca5428. * Revert "Revert "yarn update"" This reverts commit 8ccab5ee237fb228115229f3c89cf4b848bc9449. * Revert "Revert "yarn"" This reverts commit 78a755eb39cb518eb0526272a3c11882c48004de. * yarn.lock removed * Parses using prisma middleware * Reverting changes * Fixes hydration warning * Fixes Dom warnings * Update yarn.lock Co-authored-by: Peer Richelsen Co-authored-by: zomars * Squashed commit of the following: commit c378c647fe4822071cbdfc577fcfc950e53973df Author: zomars Date: Fri Aug 5 17:36:21 2022 -0600 Cleanup commit a89cc7981df1c2aae96188466833490eb3b227a1 Author: zomars Date: Fri Aug 5 17:17:57 2022 -0600 redirect fixes commit a27979c2b3f06c9956ee9abfef1e82a5558b6411 Author: zomars Date: Fri Aug 5 17:02:33 2022 -0600 Fingers crossed commit c08a09e8d2ba3eb2561f418bb3b0370245f79bf7 Author: zomars Date: Fri Aug 5 16:28:55 2022 -0600 Update [...nextauth].tsx commit 4063bddb2ea3cbf3dda6be6cc10070ecc1eb578c Author: zomars Date: Fri Aug 5 16:05:21 2022 -0600 Submodule sync commit e44dc73a3b751ba4cacc85abfe6680a668393c0d Author: zomars Date: Fri Aug 5 16:05:06 2022 -0600 Upgrade next-auth commit 2b36e0a1b376083739ea06b793f1523e2f158a33 Author: zomars Date: Fri Aug 5 15:23:03 2022 -0600 Magic signup fixes commit 2cc81ca7e2f79a4e3fcab370e23ac29cbe3ee18d Author: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com> Date: Thu Aug 4 11:49:51 2022 -0400 Properly parse list calendar call to MS Graph (#3698) commit 65887d8f9db8b399964fce38ec104ed24fcc48e6 Author: Leo Giovanetti Date: Thu Aug 4 12:52:50 2022 -0300 Fix app-store seeding (#3693) (#3697) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Hariom Balhara Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> commit 71594b962352519c4ed4ee6cf68d16aac9b71e26 Author: Leo Giovanetti Date: Wed Aug 3 16:48:07 2022 -0300 fixed dark mode profile page (#3650) (#3681) * fixed dark mode profile page * nit Co-authored-by: Peer Richelsen commit 78a5ae988274ff05f26309033821acc48e22823d Author: Leo Giovanetti Date: Wed Aug 3 14:05:02 2022 -0300 Potential fix (#3671) (#3676) commit b006240b0c62e9e62944cb7184793f099358e2ec Merge: 6179b3fbe e7418f68a Author: zomars Date: Mon Aug 1 18:20:47 2022 -0600 Merge branch 'main' into production commit 6179b3fbe06709f1cf3a4e54214a7dbb1543765e Author: zomars Date: Mon Aug 1 18:20:40 2022 -0600 Fixes successRedirectUrl validation commit 14443099e0377e8d9af52f53f15c2f8b91b784d2 Author: zomars Date: Mon Aug 1 17:59:47 2022 -0600 successRedirectUrl fixes * Adds verify page * fixed icons (#3730) * Update README.md * Update README.md * added ping.gg app (#3728) * added ping.gg app, not sure why its not showing * nit * Fixes * fixed email Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> * Added notes for running tests for embed-core (#3720) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Updating website to latest (#3731) Co-authored-by: Peer Richelsen * Setup Wizard Not Pulling Timezone (#3677) Co-authored-by: Nitesh Singh Co-authored-by: gitstart Co-authored-by: Matheus Benini Co-authored-by: Grace Nshokano Co-authored-by: Matheus Muniz <87545749+matheusmuniz03@users.noreply.github.com> Co-authored-by: gitstart Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com> Co-authored-by: Júlio Piubello da Silva Cabral Co-authored-by: Matheus Muniz Co-authored-by: Justine Nakitto Co-authored-by: gitstart Co-authored-by: Nitesh Singh Co-authored-by: Matheus Benini Co-authored-by: Grace Nshokano Co-authored-by: Matheus Muniz <87545749+matheusmuniz03@users.noreply.github.com> Co-authored-by: gitstart Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com> Co-authored-by: Júlio Piubello da Silva Cabral Co-authored-by: Matheus Muniz Co-authored-by: Justine Nakitto Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Update instructions for integration with google calendar (#3558) Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com> * RHF conditionals fixes Improved legibility * Fixes bug when changing the location of a booking (#3585) * use correct booking * delete calendar event and update booking reference * use middleware to get booking * updating event instad of deleting and creating a new one * fix issue with google hangout link * remove unsed imports * Apply suggestions from code review * Update bookings.tsx Co-authored-by: CarinaWolli Co-authored-by: Omar López Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com> Co-authored-by: Peer Richelsen Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * added a few desktop only improvements (#3725) * added a few desktop only improvements * added horizontal line * fixed icon * hide download button when already in desktop app * codacy fixes Co-authored-by: zomars * Same-day schedules created invalid workingHours (#3742) * Same-day schedules created invalid workingHours * Uncomment logger * Previous version did not properly substract the days Co-authored-by: Leo Giovanetti * fix: remove mt (#3740) * fix: remove mt * fix: un comment icon Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Adds middleware to get V2 early access (#3617) Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> * Update README.md * Update README.md * Fix request-reschedule for team events (#3721) * fix: cancel booking buttons design (#3748) * fix: cancel booking buttons design * chore: remove rounded Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> * Fix url redirect to a only path redirect when joining a team (#3757) * fix full url redirect to a only path redirect * Remove string templates Co-authored-by: Omar López Co-authored-by: Omar López * feat: signin test email magic signup in app (#3749) * feat: signin test email magic signup in app * fix: no signIn page in nextauth * fix: remove commented signIN * Update apps/web/pages/auth/signin.tsx remove import useRouter Co-authored-by: Omar López Co-authored-by: Agusti Fernandez Pardo Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Omar López * v1.8.5 * Fixes security issue when updating workflows (#3661) * check if workflow is deleted before deleting reminders * disable continue button when mutation is loading * check if new active event types belong to user * fix issue with onCascade deletion * Simplified ANDs Co-authored-by: CarinaWolli Co-authored-by: zomars Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Submodule sync * fix: error message for riverside and whereby added (#3751) * fix: error message for riverside and whereby added * fix: around and ping error message added Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> * refactor: use BookingReference instead of DailyEventReference (#3667) * refactor: use BookingReference instead of DailyEventReference * refactor: migrate DailyEventReference records to BookingReference * refactor: drop DailyEventReference table * fix linting * Daily Video API adapter fixes Co-authored-by: zomars * Allows tree shaking unused modules (#3752) * Allows tree shaking unused modules * don't tree shake embed-core side effects Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * adds attendee (#3808) * Upgrade turborepo v4 (#3804) * Upgrades to turborepo 4 Adds turbo eslint config * Linting according to turbo eslint plugin * Add missing variables to turbo config * Adds more missing env vars to turbo json * Update turbo.json * Update turbo.json * Matches local lint with CI lint * Update turbo.json Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * Hotfix: Signup fix error not shown (#3815) * Fix error not shown * Simplifying * Removing dead code * Adds script to generate dummy DB per preview * chmod vercel script * Clarifies new db vs old db * Adds symlink to use DATABASE_URL from root * migrate api/availability/[user] to viewer.availability.user in trpc (#3591) Co-authored-by: Alex van Andel * Adds symlink to use DATABASE_URL from root * Imports performance explicitly for Node v14 (#3823) * Imports performance explicitly for Node v14 * Update packages/trpc/server/routers/viewer/slots.tsx * Adds missing performance imports * Update turbo.json Co-authored-by: Omar López * Dynamic Links re-integrate with availability logic (#3687) * -re init dynamic links * typing fix 001 * added missing div closing tag * added necessary DB column pull to satisfy Type errors * further type fixes * WIP * removed console logs * some revert * WIP * another approach * enabled dynamic links availability fetch * Added users to eventTypeObject for consistency * WIP: Moving user and changing map item name * Fix user list call * Removed explicit User type in map * modify default user attributes * adds explicit users to EventTypeObject in teams * Updated availability page * Updates Availability * Futher availability change * Remove explicit user type from slot router * more fixes * more fixes WIP * cleaning up more errors WIP * object assign used for typesafety * added check if dynamic booking is allowed by all users * cleaned up console logs * clean up * Improvement * resolving suggestions by alex * changes requested by Omar * Filter out empty usernames instead of accepting null Co-authored-by: Peer Richelsen Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars * Adds actions to cleanup preview DBs * Fixes issues with video location links from apps (#3760) * fix issue with video apps link not saved as location * use link as location for ping.gg * fix around link in availability page + allow breaking line for locations * use find instead of filter to get the first item Co-authored-by: Omar López Co-authored-by: CarinaWolli Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Omar López * Fix early return when expanding RRULE in CalDav/iCal (#3665) Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com> * Feature: Routing Forms Typeform App and other improvements (#3625) * Add Embed ModalBox for routing forms * Add duplicate form support * Fix duplication logic * Change to feathericons everywhere and other fixes * Dont allow routes for fallback route * Fix all TS issues * Fix tests * Support routing using query params * Support multiselect in router endpoint * Fix the issue where app goes in embed mode after viewing embed once * Add router url tests * Add Responses download and form toggling tests * Add required validation test * Change Icons everywhere * App typeform app * Improvements in cli * Add typeform how-to-use page * Add typeform how-to-use page and screenshots * Fix TS error * Add missing image * Update CliApp.tsx * Revert unexpected zapier change * Revert yarn.lock, not sure why it was modified Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Crowdin Bot Co-authored-by: alannnc Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Co-authored-by: CarinaWolli Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com> Co-authored-by: Peer Richelsen Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com> Co-authored-by: Peer Richelsen Co-authored-by: Hariom Balhara Co-authored-by: Agusti Fernandez Pardo <6601142+agustif@users.noreply.github.com> Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Co-authored-by: GitStart <1501599+gitstart@users.noreply.github.com> Co-authored-by: gitstart Co-authored-by: martincollignon <2604526+martincollignon@users.noreply.github.com> Co-authored-by: Taha <57881112+taha-programmer@users.noreply.github.com> Co-authored-by: Leo Giovanetti Co-authored-by: Ciarán Hanrahan Co-authored-by: Pavel Shapel Co-authored-by: Alex van Andel Co-authored-by: Sean Brydon Co-authored-by: noobyogi0010 <55592987+noobyogi0010@users.noreply.github.com> Co-authored-by: Bailey Pumfleet Co-authored-by: Nafees Nazik <84864519+G3root@users.noreply.github.com> Co-authored-by: Muhammad Ali Co-authored-by: Adam Garbowski Co-authored-by: Sagar Co-authored-by: mohammed hussam <52914487+hussamkhatib@users.noreply.github.com> Co-authored-by: Rebecca Co-authored-by: Adam Garbowski Co-authored-by: Agusti Fernandez Pardo Co-authored-by: Heiki <17280588+heikir@users.noreply.github.com> Co-authored-by: Om Ray <38233712+om-ray@users.noreply.github.com> Co-authored-by: Konstantin Nosov Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: Cheng CHENG Co-authored-by: chengcheng.frontend Co-authored-by: Nitesh Singh Co-authored-by: Matheus Benini Co-authored-by: Grace Nshokano Co-authored-by: Matheus Muniz <87545749+matheusmuniz03@users.noreply.github.com> Co-authored-by: gitstart Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com> Co-authored-by: Júlio Piubello da Silva Cabral Co-authored-by: Matheus Muniz Co-authored-by: Justine Nakitto Co-authored-by: Ilya Katz Co-authored-by: Will Gittoes --- .env.appStore.example | 8 + .env.example | 18 +- .../{bug-hunting.yml => add-to-project.yml} | 4 +- .github/workflows/check-if-ui-has-changed.yml | 36 + .github/workflows/check-types.yml | 16 +- .../workflows/cleanup-preview-databases.yml | 20 + .../workflows/cron-scheduleEmailReminders.yml | 23 + .../workflows/cron-scheduleSMSReminders.yml | 23 + .github/workflows/db-staging-snapshot.yml | 18 + .github/workflows/e2e-app-store.yml | 99 + .github/workflows/e2e-embed.yml | 15 +- .github/workflows/e2e.yml | 13 +- .github/workflows/labeler.yml | 3 + .github/workflows/lint.yml | 21 +- .github/workflows/required-checks.yml | 6 +- .github/workflows/submodule-sync.yml | 15 +- .gitignore | 4 + .kodiak.toml | 3 +- .vscode/tasks.json | 4 - LICENSE | 2 +- README.md | 72 +- SECURITY.md | 43 +- app.json | 63 +- apps/api | 2 +- apps/console | 2 +- apps/docs/package.json | 9 +- apps/docs/pages/developer/code-styling.mdx | 4 +- apps/docs/pages/integrations/google.mdx | 2 +- apps/docs/pages/self-hosting/install.mdx | 3 +- apps/storybook/.gitignore | 37 + apps/storybook/.storybook/main.js | 57 + apps/storybook/.storybook/preview-head.html | 8 + apps/storybook/.storybook/preview.js | 24 + apps/storybook/README.md | 21 + apps/storybook/next-env.d.ts | 5 + apps/storybook/next.config.js | 7 + apps/storybook/package.json | 63 + apps/storybook/pages/_app.tsx | 9 + apps/storybook/pages/index.tsx | 63 + apps/storybook/postcss.config.js | 6 + apps/storybook/public/favicon.ico | Bin 0 -> 25931 bytes apps/storybook/public/vercel.svg | 4 + apps/storybook/stories/Avatar.stories.tsx | 26 + .../storybook/stories/AvatarGroup.stories.tsx | 60 + apps/storybook/stories/Badge.stories.tsx | 58 + apps/storybook/stories/Banner.stories.tsx | 46 + apps/storybook/stories/Breadcrumb.stories.tsx | 22 + apps/storybook/stories/Button.stories.tsx | 95 + .../storybook/stories/ButtonGroup.stories.tsx | 31 + apps/storybook/stories/Cards.stories.tsx | 53 + apps/storybook/stories/Checkbox.stories.tsx | 31 + apps/storybook/stories/Colors.stories.tsx | 208 + apps/storybook/stories/DatePicker.stories.tsx | 17 + .../storybook/stories/EmptyScreen.stories.tsx | 26 + apps/storybook/stories/FormStep.stories.tsx | 27 + .../stories/HorizontalTab.stories.tsx | 30 + apps/storybook/stories/Input.stories.tsx | 68 + apps/storybook/stories/Modal.stories.tsx | 52 + .../stories/Notifcations.stories.tsx | 25 + apps/storybook/stories/PageHeader.stories.tsx | 52 + apps/storybook/stories/Radio.stories.tsx | 19 + apps/storybook/stories/Select.stories.tsx | 10 + apps/storybook/stories/Switch.stories.tsx | 15 + apps/storybook/stories/TabItem.stories.tsx | 67 + .../storybook/stories/VerticalTab.stories.tsx | 85 + apps/storybook/styles/globals.css | 11 + apps/storybook/tailwind.config.js | 167 + apps/storybook/tsconfig.json | 9 + apps/swagger/package.json | 8 +- apps/swagger/tsconfig.json | 23 +- apps/web/components/AddToHomescreen.tsx | 6 +- .../components/AdditionalCalendarSelector.tsx | 8 +- apps/web/components/App.tsx | 437 +- apps/web/components/AppsShell.tsx | 4 +- apps/web/components/BookingsShell.tsx | 2 +- .../DestinationCalendarSelector.tsx | 17 +- apps/web/components/Embed.tsx | 140 +- apps/web/components/I18nLanguageHandler.tsx | 7 +- apps/web/components/ImageUploader.tsx | 2 +- apps/web/components/NavTabs.tsx | 8 +- apps/web/components/SettingsShell.tsx | 25 +- apps/web/components/UpgradeToProDialog.tsx | 9 +- apps/web/components/apps/AllApps.tsx | 1 + apps/web/components/apps/AppCard.tsx | 13 +- apps/web/components/apps/Slider.tsx | 7 +- .../components/apps/TrendingAppsSlider.tsx | 1 + apps/web/components/auth/SAMLLogin.tsx | 6 +- .../availability/NewScheduleButton.tsx | 8 +- apps/web/components/availability/Schedule.tsx | 38 +- .../availability/ScheduleListItem.tsx | 9 +- .../availability/SkeletonLoader.tsx | 10 +- .../web/components/booking/AvailableTimes.tsx | 23 +- .../components/booking/BookingListItem.tsx | 72 +- apps/web/components/booking/CancelBooking.tsx | 163 +- apps/web/components/booking/TimeOptions.tsx | 17 +- .../booking/pages/AvailabilityPage.tsx | 229 +- .../components/booking/pages/BookingPage.tsx | 821 +- .../dialog/DeleteStripeDialogContent.tsx | 9 +- .../components/dialog/EditLocationDialog.tsx | 123 +- .../components/dialog/RescheduleDialog.tsx | 6 +- .../components/eventtype/CreateEventType.tsx | 133 +- .../eventtype/EventTypeDescription.tsx | 37 +- .../EventTypeDescriptionSafeHTML.tsx | 12 + .../eventtype/RecurringEventController.tsx | 8 +- .../components/eventtype/SkeletonLoader.tsx | 31 +- .../integrations/CalendarListContainer.tsx | 16 +- .../integrations/DisconnectIntegration.tsx | 12 +- .../integrations/IntegrationListItem.tsx | 17 +- .../SubHeadingTitleWithConnections.tsx | 2 +- .../pages/eventtypes/CustomInputTypeForm.tsx | 6 +- .../security/ChangePasswordSection.tsx | 4 +- .../security/DisableTwoFactorModal.tsx | 2 +- .../security/DisableUserImpersonation.tsx | 6 +- .../security/EnableTwoFactorModal.tsx | 4 +- .../security/TwoFactorAuthSection.tsx | 3 +- .../security/TwoFactorModalHeader.tsx | 3 +- .../team/DisableTeamImpersonation.tsx | 61 + .../components/team/MemberChangeRoleModal.tsx | 5 +- .../components/team/MemberInvitationModal.tsx | 15 +- apps/web/components/team/MemberList.tsx | 2 +- apps/web/components/team/MemberListItem.tsx | 82 +- .../team/SkeletonloaderTeamList.tsx | 18 +- apps/web/components/team/TeamCreateModal.tsx | 9 +- apps/web/components/team/TeamList.tsx | 9 +- apps/web/components/team/TeamListItem.tsx | 55 +- apps/web/components/team/TeamSettings.tsx | 26 +- .../team/TeamSettingsRightSidebar.tsx | 18 +- .../team/UpgradeToFlexibleProModal.tsx | 4 +- apps/web/components/team/screens/Team.tsx | 7 +- apps/web/components/ui/Avatar.tsx | 9 +- apps/web/components/ui/AvatarGroup.tsx | 3 +- apps/web/components/ui/AvatarSSR.tsx | 56 +- apps/web/components/ui/EditableHeading.tsx | 34 +- apps/web/components/ui/InfoBadge.tsx | 7 +- apps/web/components/ui/PoweredByCal.tsx | 2 +- .../components/ui/SettingInputContainer.tsx | 2 +- apps/web/components/ui/TableActions.tsx | 8 +- .../UsernameAvailability/PremiumTextfield.tsx | 48 +- .../UsernameTextfield.tsx | 41 +- apps/web/components/ui/colorpicker.tsx | 6 +- apps/web/components/ui/form/CheckboxField.tsx | 2 +- apps/web/components/ui/form/CheckedSelect.tsx | 6 +- apps/web/components/ui/form/DatePicker.tsx | 7 +- .../components/ui/form/DateRangePicker.tsx | 9 +- apps/web/components/ui/form/MinutesField.tsx | 6 +- apps/web/components/ui/form/Select.tsx | 136 +- .../components/ui/form/radio-area/Select.tsx | 7 +- .../components/webhook/WebhookDialogForm.tsx | 19 +- .../webhook/WebhookListContainer.tsx | 29 +- .../components/webhook/WebhookListItem.tsx | 24 +- .../webhook/WebhookTestDisclosure.tsx | 9 +- apps/web/ee/LICENSE | 42 - apps/web/ee/README.md | 38 - .../ee/components/support/ContactMenuItem.tsx | 13 - .../impersonation/ImpersonationProvider.ts | 67 - apps/web/jest.config.ts | 2 +- apps/web/lib/QueryCell.tsx | 18 +- apps/web/lib/app-providers.tsx | 55 +- apps/web/lib/asStringOrNull.tsx | 5 + apps/web/lib/clock.ts | 3 +- apps/web/lib/core/i18n/i18n.utils.ts | 6 +- apps/web/lib/core/server/checkUsername.ts | 6 - apps/web/lib/getting-started.tsx | 16 - apps/web/lib/hasKeyInMetadata.ts | 9 + apps/web/lib/hooks/useMeQuery.ts | 2 +- apps/web/lib/hooks/useTheme.tsx | 58 - apps/web/lib/isOutOfBounds.tsx | 44 +- apps/web/lib/isPrismaObj.ts | 11 + apps/web/lib/locationOptions.tsx | 36 - apps/web/lib/parseDate.ts | 28 +- .../queries/event-types/get-event-types.ts | 11 - apps/web/lib/saml.ts | 4 +- apps/web/lib/slots.ts | 117 +- apps/web/lib/timeFormat.ts | 12 - apps/web/lib/types/booking.ts | 1 + apps/web/lib/webhooks/constants.ts | 17 +- apps/web/lib/webhooks/sendPayload.tsx | 32 +- apps/web/lib/webhooks/subscriptions.tsx | 2 +- apps/web/middleware.ts | 26 + apps/web/next-i18next.config.js | 30 +- apps/web/next.config.js | 30 +- apps/web/package.json | 35 +- apps/web/pages/404.tsx | 49 +- apps/web/pages/[user].tsx | 108 +- apps/web/pages/[user]/[type].tsx | 17 +- apps/web/pages/[user]/book.tsx | 14 +- apps/web/pages/_app.tsx | 63 +- apps/web/pages/_document.tsx | 63 +- apps/web/pages/_middleware.ts | 9 - apps/web/pages/api/app-store/[...static].ts | 23 +- apps/web/pages/api/auth/[...nextauth].tsx | 23 +- apps/web/pages/api/auth/changepw.ts | 3 +- apps/web/pages/api/auth/reset-password.ts | 3 +- apps/web/pages/api/auth/saml/userinfo.ts | 8 +- apps/web/pages/api/auth/setup.ts | 59 + apps/web/pages/api/auth/signup.ts | 3 +- .../pages/api/auth/two-factor/totp/disable.ts | 3 +- .../pages/api/auth/two-factor/totp/enable.ts | 2 +- .../pages/api/auth/two-factor/totp/setup.ts | 2 +- apps/web/pages/api/availability/[user].ts | 4 + apps/web/pages/api/availability/calendar.ts | 2 +- apps/web/pages/api/availability/eventtype.ts | 6 +- apps/web/pages/api/book/confirm.ts | 18 +- apps/web/pages/api/book/event.ts | 88 +- apps/web/pages/api/book/request-reschedule.ts | 52 +- apps/web/pages/api/cancel.ts | 159 +- apps/web/pages/api/collect-events.ts | 2 +- .../cron/workflows/scheduleEmailReminders.ts | 1 + .../cron/workflows/scheduleSMSReminders.ts | 1 + apps/web/pages/api/event-type/index.ts | 46 - apps/web/pages/api/eventType.ts | 2 +- apps/web/pages/api/integrations.ts | 3 +- apps/web/pages/api/integrations/[...args].ts | 53 +- .../api/integrations/stripepayment/webhook.ts | 2 +- apps/web/pages/api/intent-username/index.ts | 3 +- apps/web/pages/api/me.ts | 3 +- apps/web/pages/api/schedule/index.ts | 3 +- apps/web/pages/api/teams.ts | 3 +- apps/web/pages/api/teams/[team]/index.ts | 5 +- apps/web/pages/api/teams/[team]/invite.ts | 2 +- apps/web/pages/api/teams/[team]/membership.ts | 3 +- apps/web/pages/api/teams/[team]/profile.ts | 3 +- apps/web/pages/api/teams/[team]/upgrade.ts | 2 +- apps/web/pages/api/trpc/[trpc].ts | 6 +- apps/web/pages/api/upgrade.ts | 4 +- apps/web/pages/api/user/[id].ts | 18 +- apps/web/pages/api/user/avatar.ts | 5 +- apps/web/pages/api/user/me.ts | 4 +- apps/web/pages/api/user/membership.ts | 3 +- apps/web/pages/api/user/profile.ts | 3 +- apps/web/pages/api/username.ts | 2 +- apps/web/pages/api/v2-opt-in.ts | 15 + apps/web/pages/apps/[slug]/[...pages].tsx | 141 + apps/web/pages/apps/[slug]/index.tsx | 6 +- apps/web/pages/apps/[slug]/setup.tsx | 14 +- apps/web/pages/apps/categories/[category].tsx | 13 +- apps/web/pages/apps/categories/index.tsx | 6 +- apps/web/pages/apps/index.tsx | 2 +- apps/web/pages/apps/installed.tsx | 20 +- apps/web/pages/auth/error.tsx | 4 +- apps/web/pages/auth/forgot-password/[id].tsx | 10 +- apps/web/pages/auth/login.tsx | 23 +- apps/web/pages/auth/logout.tsx | 4 +- apps/web/pages/auth/setup.tsx | 214 + apps/web/pages/auth/signin.tsx | 42 + apps/web/pages/auth/signup.tsx | 10 +- apps/web/pages/auth/sso/[provider].tsx | 8 +- apps/web/pages/auth/verify.tsx | 161 + apps/web/pages/availability/[schedule].tsx | 47 +- apps/web/pages/availability/index.tsx | 9 +- apps/web/pages/availability/troubleshoot.tsx | 68 +- apps/web/pages/bookings/[status].tsx | 92 +- apps/web/pages/bookings/index.tsx | 18 - apps/web/pages/cancel/[uid].tsx | 52 +- apps/web/pages/cancel/success.tsx | 9 +- apps/web/pages/d/[link]/[slug].tsx | 14 +- apps/web/pages/d/[link]/book.tsx | 18 +- apps/web/pages/event-types/[type].tsx | 302 +- apps/web/pages/event-types/index.tsx | 497 +- apps/web/pages/getting-started.tsx | 210 +- apps/web/pages/payment/[uid].tsx | 7 +- apps/web/pages/sandbox/Badge.tsx | 2 +- apps/web/pages/sandbox/Button.tsx | 6 +- apps/web/pages/sandbox/List.tsx | 3 +- apps/web/pages/sandbox/RadioArea.tsx | 9 +- apps/web/pages/settings/billing.tsx | 10 +- apps/web/pages/settings/developer.tsx | 18 +- apps/web/pages/settings/profile.tsx | 49 +- apps/web/pages/settings/security.tsx | 4 +- .../settings/teams/[id]/availability.tsx | 2 +- apps/web/pages/settings/teams/[id]/index.tsx | 25 +- apps/web/pages/settings/teams/index.tsx | 20 +- apps/web/pages/success.tsx | 628 +- apps/web/pages/team/[slug].tsx | 99 +- apps/web/pages/team/[slug]/[type].tsx | 15 +- apps/web/pages/team/[slug]/book.tsx | 21 +- apps/web/pages/v2/settings/admin/apps.tsx | 13 + .../pages/v2/settings/admin/impersonation.tsx | 47 + apps/web/pages/v2/settings/admin/index.tsx | 13 + apps/web/pages/v2/settings/admin/users.tsx | 13 + apps/web/pages/video/[uid].tsx | 192 +- apps/web/pages/video/meeting-ended/[uid].tsx | 123 +- .../pages/video/meeting-not-started/[uid].tsx | 149 +- apps/web/pages/video/no-meeting-found.tsx | 8 +- apps/web/pages/workflows/[workflow].tsx | 28 + apps/web/pages/workflows/index.tsx | 1 + apps/web/playwright/auth/auth-index.test.ts | 3 +- apps/web/playwright/change-username.test.ts | 9 +- .../playwright/embed-code-generator.test.ts | 60 +- apps/web/playwright/event-types.test.ts | 10 +- apps/web/playwright/fixtures/users.ts | 13 + apps/web/playwright/lib/teardown.ts | 2 +- apps/web/playwright/onboarding.test.ts | 2 +- apps/web/playwright/reschedule.test.ts | 44 +- .../{lib/appstore => }/wipe-my-cal.test.ts | 15 +- apps/web/public/apps/metamask.svg | 61 - ...te-word.svg => calcom-logo-white-word.svg} | 0 ...ord-dark.svg => calcom-logo-word-dark.svg} | 0 ...dso-logo-word.svg => calcom-logo-word.svg} | 0 .../{calendso-white.svg => calcom-white.svg} | 0 apps/web/public/fonts/Inter-roman.var.woff2 | Bin 0 -> 227180 bytes apps/web/public/fonts/Roboto-Black.ttf | Bin 180652 -> 0 bytes apps/web/public/fonts/Roboto-Black.woff | Bin 94016 -> 0 bytes apps/web/public/fonts/Roboto-Black.woff2 | Bin 66148 -> 0 bytes apps/web/public/fonts/Roboto-BlackItalic.ttf | Bin 186608 -> 0 bytes apps/web/public/fonts/Roboto-BlackItalic.woff | Bin 101560 -> 0 bytes .../web/public/fonts/Roboto-BlackItalic.woff2 | Bin 73112 -> 0 bytes apps/web/public/fonts/Roboto-Bold.ttf | Bin 179812 -> 0 bytes apps/web/public/fonts/Roboto-Bold.woff | Bin 93700 -> 0 bytes apps/web/public/fonts/Roboto-Bold.woff2 | Bin 65972 -> 0 bytes apps/web/public/fonts/Roboto-BoldItalic.ttf | Bin 184092 -> 0 bytes apps/web/public/fonts/Roboto-BoldItalic.woff | Bin 99360 -> 0 bytes apps/web/public/fonts/Roboto-BoldItalic.woff2 | Bin 71276 -> 0 bytes apps/web/public/fonts/Roboto-Italic.ttf | Bin 182964 -> 0 bytes apps/web/public/fonts/Roboto-Italic.woff | Bin 99060 -> 0 bytes apps/web/public/fonts/Roboto-Italic.woff2 | Bin 71468 -> 0 bytes apps/web/public/fonts/Roboto-Light.ttf | Bin 179520 -> 0 bytes apps/web/public/fonts/Roboto-Light.woff | Bin 93120 -> 0 bytes apps/web/public/fonts/Roboto-Light.woff2 | Bin 65512 -> 0 bytes apps/web/public/fonts/Roboto-LightItalic.ttf | Bin 188444 -> 0 bytes apps/web/public/fonts/Roboto-LightItalic.woff | Bin 100716 -> 0 bytes .../web/public/fonts/Roboto-LightItalic.woff2 | Bin 72212 -> 0 bytes apps/web/public/fonts/Roboto-Medium.ttf | Bin 181256 -> 0 bytes apps/web/public/fonts/Roboto-Medium.woff | Bin 94032 -> 0 bytes apps/web/public/fonts/Roboto-Medium.woff2 | Bin 66792 -> 0 bytes apps/web/public/fonts/Roboto-MediumItalic.ttf | Bin 185944 -> 0 bytes .../web/public/fonts/Roboto-MediumItalic.woff | Bin 100656 -> 0 bytes .../public/fonts/Roboto-MediumItalic.woff2 | Bin 72420 -> 0 bytes apps/web/public/fonts/Roboto-Regular.ttf | Bin 180932 -> 0 bytes apps/web/public/fonts/Roboto-Regular.woff | Bin 93388 -> 0 bytes apps/web/public/fonts/Roboto-Regular.woff2 | Bin 65916 -> 0 bytes apps/web/public/fonts/Roboto-Thin.ttf | Bin 180928 -> 0 bytes apps/web/public/fonts/Roboto-Thin.woff | Bin 91804 -> 0 bytes apps/web/public/fonts/Roboto-Thin.woff2 | Bin 64416 -> 0 bytes apps/web/public/fonts/Roboto-ThinItalic.ttf | Bin 185368 -> 0 bytes apps/web/public/fonts/Roboto-ThinItalic.woff | Bin 97880 -> 0 bytes apps/web/public/fonts/Roboto-ThinItalic.woff2 | Bin 69664 -> 0 bytes apps/web/public/fonts/cal.ttf | Bin 0 -> 148964 bytes apps/web/public/static/locales/ar/common.json | 33 +- apps/web/public/static/locales/bg/common.json | 1 + apps/web/public/static/locales/cs/common.json | 41 +- apps/web/public/static/locales/de/common.json | 229 +- apps/web/public/static/locales/en/common.json | 108 +- apps/web/public/static/locales/es/common.json | 38 +- apps/web/public/static/locales/fr/common.json | 27 +- apps/web/public/static/locales/he/common.json | 31 +- apps/web/public/static/locales/hu/common.json | 6 +- apps/web/public/static/locales/it/common.json | 41 +- apps/web/public/static/locales/ja/common.json | 31 +- apps/web/public/static/locales/ko/common.json | 41 +- apps/web/public/static/locales/nl/common.json | 39 +- apps/web/public/static/locales/pl/common.json | 31 +- .../public/static/locales/pt-BR/common.json | 100 +- apps/web/public/static/locales/pt/common.json | 91 +- apps/web/public/static/locales/ro/common.json | 41 +- apps/web/public/static/locales/ru/common.json | 37 +- apps/web/public/static/locales/sr/common.json | 39 +- apps/web/public/static/locales/sv/common.json | 17 +- apps/web/public/static/locales/tr/common.json | 15 +- apps/web/public/static/locales/uk/common.json | 45 +- apps/web/public/static/locales/vi/common.json | 31 +- .../public/static/locales/zh-CN/common.json | 41 +- .../public/static/locales/zh-TW/common.json | 41 +- apps/web/server/lib/i18n.ts | 19 +- apps/web/server/lib/ssg.ts | 7 +- apps/web/server/lib/ssr.ts | 7 +- apps/web/server/routers/viewer/slots.tsx | 252 - apps/web/styles/fonts.css | 117 +- apps/web/styles/globals.css | 208 +- apps/web/tailwind.config.js | 6 +- apps/web/test/.env.test.example | 3 + apps/web/test/README.md | 12 + apps/web/test/docker-compose.yml | 15 + apps/web/test/lib/getSchedule.test.ts | 591 ++ apps/web/test/lib/slots.test.ts | 2 +- apps/web/test/lib/team-event-types.test.ts | 1 + apps/web/tsconfig.json | 3 +- apps/web/web3/dummyResps/bloxyApi.js | 7004 -------------- apps/website | 2 +- package.json | 45 +- packages/app-store-cli/package.json | 6 +- packages/app-store-cli/readme.md | 11 +- packages/app-store-cli/src/CliApp.tsx | 189 +- packages/app-store-cli/src/app-store.ts | 108 +- packages/app-store/_appRegistry.ts | 11 +- .../_apps-playwright/config/globalSetup.ts | 19 + .../config/playwright.config.ts | 57 + .../_apps-playwright/lib/testUtils.ts | 1 + packages/app-store/_baseApp/README.mdx | 14 +- packages/app-store/_baseApp/_metadata.ts | 2 - packages/app-store/_baseApp/api/add.ts | 20 +- .../app-store/_baseApp/components}/.gitkeep | 0 .../app-store/_baseApp/components/icon.tsx | 15 - packages/app-store/_baseApp/config.json | 4 +- packages/app-store/_baseApp/index.ts | 1 - .../app-store/_utils/getAppKeysFromSlug.ts | 2 +- packages/app-store/_utils/getCalendar.ts | 2 +- .../_utils/getParsedAppKeysFromSlug.ts | 10 + .../app-store/_utils/useAddAppMutation.ts | 16 +- packages/app-store/apps.browser.generated.tsx | 129 +- packages/app-store/apps.server.generated.ts | 72 +- packages/app-store/components.tsx | 77 +- .../dailyvideo/lib/VideoApiAdapter.ts | 109 +- .../dailyvideo/lib/getDailyAppKeys.ts | 12 + .../app-store/ee/routing_forms/_metadata.ts | 18 + .../app-store/ee/routing_forms/api/add.ts | 25 + .../app-store/ee/routing_forms/api/index.ts | 2 + .../routing_forms/api/responses/[formId].ts | 68 + .../components/RoutingNavBar.tsx | 28 + .../routing_forms/components/RoutingShell.tsx | 25 + .../ee/routing_forms/components/SideBar.tsx | 122 + .../routing_forms}/components/index.ts | 0 .../config/config.tsx | 133 + .../react-awesome-query-builder/styles.css | 125 + .../react-awesome-query-builder/widgets.tsx | 301 + .../app-store/ee/routing_forms/config.json | 16 + packages/app-store/ee/routing_forms/env.d.ts | 1 + packages/app-store/ee/routing_forms/index.ts | 3 + .../routing_forms/lib/getFieldIdentifier.ts | 5 + .../routing_forms/lib/getSerializableForm.ts | 26 + .../ee/routing_forms/lib/processRoute.tsx | 66 + .../app-store/ee/routing_forms/package.json | 22 + .../pages/app-routing.config.tsx | 16 + .../pages/form-edit/[...appPages].tsx | 434 + .../pages/forms/[...appPages].tsx | 397 + .../pages/route-builder/[...appPages].tsx | 540 ++ .../pages/router/[...appPages].tsx | 106 + .../pages/routing-link/[...appPages].tsx | 252 + .../playwright/config/globalSetup.ts | 44 + .../playwright/config/globalTeardown.ts | 18 + .../playwright/config/playwright.config.ts | 12 + .../playwright/fixtures/fixtures.ts | 5 + .../routing_forms/playwright/lib/testUtils.ts | 20 + .../playwright/tests/basic.test.ts | 229 + .../ee/routing_forms/static/icon.svg | 3 + .../app-store/ee/routing_forms/trpc-router.ts | 280 + .../ee/routing_forms/types/types.d.ts | 26 + packages/app-store/ee/routing_forms/zod.ts | 41 + .../app-store/exchange2013calendar/api/add.ts | 2 +- .../lib/CalendarService.ts | 1 + .../app-store/exchange2016calendar/api/add.ts | 2 +- .../giphy/components/InstallAppButton.tsx | 1 + .../giphy/components/SearchDialog.tsx | 6 +- .../giphy/components/SelectGifInput.tsx | 2 +- .../googlecalendar/lib/CalendarService.ts | 86 +- .../app-store/hubspotothercalendar/README.mdx | 4 + .../lib/CalendarService.ts | 88 +- packages/app-store/huddle01video/api/add.ts | 3 +- packages/app-store/index.ts | 2 + packages/app-store/larkcalendar/README.mdx | 8 + packages/app-store/larkcalendar/_metadata.ts | 25 + packages/app-store/larkcalendar/api/add.ts | 50 + .../app-store/larkcalendar/api/callback.ts | 100 + packages/app-store/larkcalendar/api/events.ts | 122 + packages/app-store/larkcalendar/api/index.ts | 3 + packages/app-store/larkcalendar/common.ts | 26 + .../components/InstallAppButton.tsx | 3 +- .../larkcalendar/components/index.ts | 1 + packages/app-store/larkcalendar/index.ts | 3 + .../larkcalendar/lib/AppAccessToken.ts | 155 + .../app-store/larkcalendar/lib/BotService.ts | 130 + .../larkcalendar/lib/CalendarService.ts | 390 + packages/app-store/larkcalendar/lib/index.ts | 1 + packages/app-store/larkcalendar/package.json | 15 + .../app-store/larkcalendar/static/icon.svg | 5 + .../larkcalendar/types/LarkCalendar.ts | 160 + packages/app-store/locations.ts | 36 + .../metamask/components/InstallAppButton.tsx | 1 + packages/app-store/next-auth.d.ts | 15 - packages/app-store/next.d.ts | 10 - .../office365calendar/lib/CalendarService.ts | 344 +- .../office365calendar/lib/getOfficeAppKeys.ts | 12 + .../app-store/office365video/api/callback.ts | 1 - packages/app-store/package.json | 13 +- packages/app-store/ping/README.mdx | 10 + packages/app-store/ping/_metadata.ts | 19 + .../{_baseApp => ping}/api/_getAdd.ts | 0 packages/app-store/ping/api/add.ts | 5 + packages/app-store/ping/api/index.ts | 1 + packages/app-store/ping/config.json | 16 + packages/app-store/ping/index.ts | 3 + packages/app-store/ping/package.json | 14 + packages/app-store/ping/static/1.png | Bin 0 -> 1002075 bytes packages/app-store/ping/static/2.png | Bin 0 -> 120551 bytes packages/app-store/ping/static/3.png | Bin 0 -> 477528 bytes packages/app-store/ping/static/icon.svg | 1 + packages/app-store/riverside/README.mdx | 2 +- packages/app-store/riverside/config.json | 2 +- packages/app-store/riverside/package.json | 2 +- .../app-store/slackmessaging/api/callback.ts | 2 +- .../slackmessaging/lib/actions/createEvent.ts | 2 +- .../slackmessaging/lib/showTodayMessage.ts | 2 +- .../slackmessaging/lib/slackVerify.ts | 3 +- .../slackmessaging/lib/views/ShowLinks.ts | 2 +- .../slackmessaging/lib/views/TodayMessage.ts | 2 +- .../app-store/stripepayment/api/callback.ts | 5 +- .../app-store/stripepayment/api/portal.ts | 4 +- .../stripepayment/api/subscription.ts | 9 +- .../lib/client/createPaymentLink.ts | 17 + .../stripepayment/lib/client/getStripe.ts} | 15 - .../stripepayment/lib/client/index.ts | 2 + .../stripepayment/lib}/constants.ts | 0 .../stripepayment/lib}/customer.ts | 3 +- .../stripepayment/lib}/downgrade.ts | 2 +- .../stripepayment/lib}/index.ts | 0 .../app-store/stripepayment/lib}/server.ts | 37 +- .../stripepayment/lib}/subscriptions.ts | 3 +- .../stripepayment/lib}/team-billing.ts | 2 +- .../stripepayment/lib}/utils.ts | 0 packages/app-store/stripepayment/package.json | 19 +- .../app-store/tandemvideo/api/callback.ts | 20 + packages/app-store/trpc-routers.ts | 4 + packages/app-store/tsconfig.json | 19 +- packages/app-store/typeform/README.mdx | 13 + packages/app-store/typeform/_metadata.ts | 16 + packages/app-store/typeform/api/add.ts | 17 + packages/app-store/typeform/api/index.ts | 1 + .../components/CopyRedirectUrlButton.tsx | 32 + .../app-store/typeform/components/index.ts | 1 + packages/app-store/typeform/config.json | 16 + packages/app-store/typeform/index.ts | 3 + packages/app-store/typeform/package.json | 14 + .../typeform/pages/app-routing.config.tsx | 8 + .../pages/how-to-use/[...appPages].tsx | 79 + .../static/copy-typeform-redirect-url.png | Bin 0 -> 50734 bytes .../static/how-it-looks-in-typeform.png | Bin 0 -> 93376 bytes packages/app-store/typeform/static/icon.svg | 3 + packages/app-store/types.d.ts | 8 +- packages/app-store/vital/api/webhook.ts | 2 +- .../vital/components/AppConfiguration.tsx | 6 +- packages/app-store/vital/lib/reschedule.ts | 4 +- .../components/confirmDialog.tsx | 17 +- .../components/wipeMyCalActionButton.tsx | 10 +- .../wipemycalother/lib/reschedule.ts | 4 +- .../api/subscriptions/addSubscription.ts | 2 +- .../api/subscriptions/deleteSubscription.ts | 2 +- .../zapier/api/subscriptions/listBookings.ts | 2 +- .../app-store/zapier/api/subscriptions/me.ts | 2 +- .../app-store/zapier/pages/setup/index.tsx | 12 +- packages/app-store/zoomvideo/api/callback.ts | 26 + .../zoomvideo/lib/VideoApiAdapter.ts | 177 +- packages/config/ColorPalletGenerator.js | 163 + packages/config/eslint-preset.js | 8 +- packages/config/next-i18next.config.js | 35 + packages/config/package.json | 3 + packages/config/tailwind-preset.js | 26 +- packages/core/CalendarManager.ts | 47 +- packages/core/EventManager.ts | 123 +- .../core/builders/CalendarEvent/builder.ts | 12 +- packages/core/builders/CalendarEvent/class.ts | 10 +- packages/core/getBusyTimes.ts | 31 +- packages/core/getUserAvailability.ts | 17 +- packages/core/package.json | 1 + packages/core/videoClient.ts | 18 +- packages/dayjs/index.ts | 27 + packages/ee/index.ts | 1 - packages/ee/package.json | 17 - packages/ee/tsconfig.json | 8 - packages/emails/email-manager.ts | 1 - packages/emails/package.json | 1 + .../emails/src/components/BaseEmailHtml.tsx | 8 +- .../emails/src/components/EmailBodyLogo.tsx | 2 +- .../src/components/EmailCommonDivider.tsx | 2 +- packages/emails/src/components/EmailHead.tsx | 4 +- .../emails/src/components/LocationInfo.tsx | 18 +- packages/emails/src/components/WhenInfo.tsx | 2 +- .../src/templates/OrganizerRequestEmail.tsx | 2 +- .../OrganizerRequestRescheduledEmail.tsx | 1 + .../attendee-request-reschedule-email.ts | 2 +- .../templates/organizer-request-email.ts | 2 +- .../organizer-request-reschedule-email.ts | 16 +- packages/embeds/embed-core/README.md | 29 +- packages/embeds/embed-core/index.html | 66 +- packages/embeds/embed-core/package.json | 3 +- .../playwright/config/playwright.config.ts | 34 +- .../playwright/fixtures/fixtures.ts | 26 +- .../embed-core/playwright/lib/testUtils.ts | 31 +- .../playwright/tests/action-based.test.ts | 27 +- .../embed-core/src/ModalBox/ModalBoxHtml.ts | 34 +- .../embeds/embed-core/src/embed-iframe.ts | 35 +- packages/embeds/embed-core/src/embed.ts | 7 +- packages/embeds/embed-core/vite.config.js | 13 +- packages/embeds/embed-react/package.json | 4 +- packages/embeds/embed-react/src/Cal.tsx | 2 +- packages/embeds/embed-snippet/package.json | 4 +- packages/embeds/vite.config.js | 1 + packages/eslint-plugin/package.json | 16 + packages/eslint-plugin/src/configs/index.ts | 4 + .../eslint-plugin/src/configs/recommended.ts | 9 + packages/eslint-plugin/src/index.js | 11 + .../src/rules/deprecated-imports.ts | 41 + packages/eslint-plugin/src/rules/index.ts | 7 + .../eslint-plugin/src/rules/my-first-rule.ts | 23 + packages/features/auth/README.md | 1 + packages/features/availability/README.md | 4 + packages/features/bookings/README.md | 1 + packages/features/calendars/README.md | 4 + packages/features/conferencing/README.md | 3 + packages/{ => features}/ee/LICENSE | 0 packages/{ => features}/ee/README.md | 4 +- .../api-keys/components}/ApiKeyDialogForm.tsx | 12 +- .../components}/ApiKeyListContainer.tsx | 39 +- .../api-keys/components}/ApiKeyListItem.tsx | 23 +- .../ee/api-keys/lib}/apiKeys.ts | 0 .../ee/api-keys/lib}/findValidApiKey.ts | 2 +- .../ee/common}/components/LicenseBanner.tsx | 10 +- .../ee/common}/components/LicenseRequired.tsx | 24 +- .../common/components/SamlConfiguration.tsx | 14 +- .../ee/common}/components/TrialBanner.tsx | 0 .../ee/common/lib}/checkPremiumUsername.ts | 4 +- .../ee/common}/server/checkLicense.ts | 0 .../components}/ImpersonatingBanner.tsx | 0 .../lib/ImpersonationProvider.ts | 138 + packages/features/ee/index.ts | 1 + packages/features/ee/package.json | 21 + .../features/ee/payments/api}/webhook.ts | 4 +- .../ee/payments/components}/Payment.tsx | 4 +- .../ee/payments/components}/PaymentPage.tsx | 25 +- .../features/ee/payments/pages/payment.tsx | 16 +- .../ee/support/components/ContactMenuItem.tsx | 13 + .../ee/support/components}/HelpMenuItem.tsx | 20 +- .../lib/helpscout/HelpscoutMenuItem.tsx | 0 .../ee/support}/lib/helpscout/provider.tsx | 0 .../lib/helpscout/providerDynamic.tsx | 0 .../lib/intercom/IntercomMenuItem.tsx | 0 .../ee/support}/lib/intercom/provider.tsx | 0 .../support}/lib/intercom/providerDynamic.tsx | 0 .../ee/support}/lib/intercom/useIntercom.ts | 0 .../support}/lib/zendesk/ZendeskMenuItem.tsx | 0 .../features/ee/teams/api}/upgrade.ts | 5 +- .../components}/TeamAvailabilityModal.tsx | 19 +- .../components}/TeamAvailabilityScreen.tsx | 17 +- .../components}/TeamAvailabilityTimes.tsx | 8 +- .../features/ee/teams/pages}/availability.tsx | 27 +- .../ee}/web3/abis/abiWithGetBalance.json | 0 .../ee/web3/components}/CryptoSection.tsx | 45 +- .../ee/web3}/contexts/contractsContext.tsx | 0 .../features/ee}/web3/utils/verifyAccount.ts | 0 .../workflows/api/scheduleEmailReminders.ts | 171 + .../ee/workflows/api/scheduleSMSReminders.ts | 129 + .../workflows/components/AddActionDialog.tsx | 140 + .../components/AddVariablesDropdown.tsx | 49 + .../components/NewWorkflowButton.tsx | 255 + .../components/WorkflowDetailsPage.tsx | 192 + .../workflows/components/WorkflowListPage.tsx | 168 + .../components/WorkflowStepContainer.tsx | 560 ++ .../features/ee/workflows/lib/constants.ts | 18 + .../features/ee/workflows/lib/getOptions.ts | 27 + .../lib/reminders/emailReminderManager.ts | 174 + .../lib/reminders/reminderScheduler.ts | 130 + .../reminders/smsProviders/twilioProvider.ts | 49 + .../lib/reminders/smsReminderManager.ts | 142 + .../lib/reminders/templates/customTemplate.ts | 91 + .../templates/emailReminderTemplate.ts | 43 + .../templates/smsReminderTemplate.ts | 28 + .../ee/workflows/lib/variableTranslations.ts | 57 + .../features/ee/workflows/pages/index.tsx | 46 + .../features/ee/workflows/pages/workflow.tsx | 181 + packages/features/index.ts | 1 + packages/features/links/README.md | 3 + packages/features/package.json | 9 + packages/features/tsconfig.json | 12 + packages/features/users/README.md | 1 + packages/lib/CalEventParser.ts | 51 +- packages/lib/CalendarService.ts | 10 +- .../lib}/CustomBranding.tsx | 76 +- packages/lib/auth.ts | 41 + packages/lib/availability.ts | 2 +- packages/lib/constants.ts | 12 +- packages/lib/defaultAvatarImage.ts | 18 + packages/lib/defaultEvents.ts | 74 +- packages/lib/errors.ts | 14 +- .../lib/getPlaceholderAvatar.tsx | 0 packages/lib/hooks/useApp.ts | 11 + packages/lib/hooks/useTheme.tsx | 29 + packages/lib/i18n.ts | 49 + packages/lib/index.ts | 1 + packages/lib/isMac.ts | 1 + packages/lib/isOutOfBounds.tsx | 41 + packages/lib/jackson.ts | 40 + packages/lib/jest.config.js | 4 + packages/lib/notification.ts | 1 + packages/lib/package.json | 13 +- packages/lib/profile.ts | 11 + packages/lib/recurringStrings.ts | 4 +- packages/lib/saml.ts | 59 + .../lib}/server/checkRegularUsername.ts | 4 +- packages/lib/server/checkUsername.ts | 6 + packages/lib/server/defaultResponder.ts | 4 +- ...Unkown.ts => getServerErrorFromUnknown.ts} | 2 +- packages/lib/server/index.ts | 2 +- packages/lib/server/perfObserver.ts | 3 +- packages/lib/server/queries/index.ts | 1 + .../lib/server}/queries/teams/index.ts | 5 +- packages/lib/slots.ts | 114 + {apps/web => packages}/lib/telemetry.ts | 10 +- packages/lib/test/.env.test | 1 + packages/lib/test/CalEventParser.test.ts | 63 + packages/lib/test/builder.ts | 46 + packages/lib/timeFormat.ts | 30 + packages/lib/tsconfig.json | 2 +- packages/lib/webhooks/constants.ts | 17 + packages/lib/webhooks/integrationTemplate.tsx | 28 + packages/lib/webhooks/sendPayload.tsx | 108 + packages/lib/webhooks/subscriptions.tsx | 43 + packages/prisma/.env | 1 + packages/prisma/.env.example | 2 - packages/prisma/index.ts | 3 +- .../prisma/middleware/bookingReference.ts | 2 +- .../eventTypeDescriptionParseAndSanitize.ts | 40 + packages/prisma/middleware/index.ts | 1 + .../migration.sql | 33 + .../migration.sql | 2 + .../migration.sql | 41 + .../migration.sql | 2 + .../migration.sql | 86 + .../migration.sql | 23 + .../migration.sql | 2 + .../migration.sql | 2 + .../migrations/20220721183745_/migration.sql | 11 + .../migrations/20220723001233_/migration.sql | 5 + .../migration.sql | 2 + .../migration.sql | 4 + .../migration.sql | 11 + packages/prisma/package.json | 13 +- packages/prisma/schema.prisma | 334 +- packages/prisma/seed-app-store.config.json | 40 +- packages/prisma/seed-app-store.ts | 155 +- packages/prisma/seed.ts | 22 +- packages/prisma/selects/event-types.ts | 9 + packages/prisma/selects/user.ts | 4 +- packages/prisma/zod-utils.ts | 19 +- packages/stripe/LICENSE | 42 - packages/stripe/README.md | 38 - packages/stripe/package.json | 29 - packages/stripe/server.ts | 31 - packages/stripe/tsconfig.json | 8 - packages/trpc/client/index.ts | 1 + packages/trpc/client/links/httpBatchLink.ts | 1 + packages/trpc/client/links/httpLink.ts | 1 + packages/trpc/client/links/loggerLink.ts | 1 + packages/trpc/client/links/splitLink.ts | 1 + packages/trpc/index.ts | 4 + packages/trpc/next/index.ts | 1 + packages/trpc/package.json | 16 + packages/trpc/react/hooks/useMeQuery.ts | 13 + packages/trpc/react/index.ts | 2 + packages/trpc/react/ssg.ts | 1 + {apps/web/lib => packages/trpc/react}/trpc.ts | 10 +- packages/trpc/server/adapters/next.ts | 1 + .../trpc}/server/createContext.ts | 12 +- .../trpc}/server/createRouter.ts | 0 packages/trpc/server/index.ts | 1 + .../trpc}/server/routers/_app.ts | 0 .../trpc}/server/routers/viewer.tsx | 240 +- .../trpc}/server/routers/viewer/apiKeys.tsx | 4 +- .../server/routers/viewer/availability.tsx | 26 +- .../trpc}/server/routers/viewer/bookings.tsx | 68 +- .../server/routers/viewer/eventTypes.tsx | 41 +- packages/trpc/server/routers/viewer/slots.tsx | 344 + .../trpc}/server/routers/viewer/teams.tsx | 75 +- .../trpc}/server/routers/viewer/webhook.tsx | 16 +- .../trpc/server/routers/viewer/workflows.tsx | 712 ++ packages/trpc/tsconfig.json | 3 + packages/tsconfig/nextjs.json | 3 +- packages/tsconfig/package.json | 1 + packages/tsconfig/react-library.json | 4 +- packages/types/App.d.ts | 11 +- packages/types/AppGetServerSideProps.d.ts | 16 + packages/types/AppHandler.d.ts | 15 + packages/types/Calendar.d.ts | 7 +- packages/types/EventManager.d.ts | 5 + packages/types/VideoApiAdapter.d.ts | 15 +- packages/types/next-auth.d.ts | 2 +- packages/types/next.d.ts | 2 + packages/types/utils.d.ts | 10 + .../web/components => packages}/ui/Badge.tsx | 2 +- packages/ui/BooleanToggleGroup.tsx | 56 + packages/ui/Button.tsx | 17 +- .../ui}/ConfirmationDialogContent.tsx | 9 +- packages/ui/CustomBranding.tsx | 269 + packages/ui/Dialog.tsx | 2 +- packages/ui/Dropdown.tsx | 7 +- packages/ui/EmptyScreen.tsx | 9 +- .../web/lib => packages/ui}/ErrorBoundary.tsx | 0 packages/ui/Icon.tsx | 18 + packages/ui/Kbar.tsx | 277 + {apps/web/components => packages/ui}/List.tsx | 2 +- packages/ui/Loader.tsx | 2 +- {apps/web/components => packages/ui}/Logo.tsx | 4 +- .../web/components => packages/ui}/Shell.tsx | 424 +- packages/ui/Switch.tsx | 2 +- packages/ui/Tooltip.tsx | 12 +- .../ui}/apps/SkeletonLoader.tsx | 15 +- packages/ui/booker/DatePicker.tsx | 12 +- packages/ui/form/MultiSelectCheckboxes.tsx | 94 + .../ui/form/PhoneInput.tsx | 3 +- packages/ui/form/PhoneInputLazy.tsx | 8 + packages/ui/form/Select.tsx | 2 +- .../ui/form/TimezoneSelect.tsx | 4 +- packages/ui/form/fields.tsx | 2 +- packages/ui/index.tsx | 2 + packages/ui/package.json | 19 +- packages/ui/tsconfig.json | 3 + packages/ui/v2/Alert.tsx | 48 + packages/ui/v2/Avatar.tsx | 57 + packages/ui/v2/AvatarGroup.tsx | 61 + packages/ui/v2/Badge.tsx | 50 + packages/ui/v2/Breadcrumb.tsx | 69 + packages/ui/v2/Button.tsx | 151 + packages/ui/v2/ButtonGroup.tsx | 9 + packages/ui/v2/Card.tsx | 66 + packages/ui/v2/Dialog.tsx | 154 + packages/ui/v2/Dropdown.tsx | 94 + packages/ui/v2/EmptyScreen.tsx | 40 + packages/ui/v2/Loader.tsx | 7 + packages/ui/v2/PageHeader.tsx | 29 + packages/ui/v2/Shell.tsx | 646 ++ packages/ui/v2/Stepper.tsx | 50 + .../components => packages/ui/v2}/Swatch.tsx | 7 +- packages/ui/v2/Switch.tsx | 40 + packages/ui/v2/Tooltip.tsx | 36 + packages/ui/v2/WizardForm.tsx | 69 + packages/ui/v2/banner.tsx | 59 + packages/ui/v2/booker/DatePicker.tsx | 176 + packages/ui/v2/colorpicker.tsx | 102 + packages/ui/v2/form/Checkbox.tsx | 73 + packages/ui/v2/form/DatePicker.tsx | 33 + packages/ui/v2/form/FormStep.tsx | 35 + packages/ui/v2/form/Select.tsx | 63 + packages/ui/v2/form/fields.tsx | 395 + packages/ui/v2/form/index.ts | 5 + packages/ui/v2/form/radio-area/Radio.tsx | 57 + .../ui/v2/form/radio-area/RadioAreaGroup.tsx | 79 + packages/ui/v2/form/radio-area/Select.tsx | 59 + packages/ui/v2/form/radio-area/index.ts | 2 + packages/ui/v2/index.tsx | 23 + packages/ui/v2/layouts/AdminLayout.tsx | 19 + packages/ui/v2/layouts/SettingsLayout.tsx | 84 + packages/ui/v2/navigation/NavigationItem.tsx | 2 + .../v2/navigation/tabs/HorizontalTabItem.tsx | 66 + .../ui/v2/navigation/tabs/HorizontalTabs.tsx | 21 + .../ui/v2/navigation/tabs/VerticalTabItem.tsx | 91 + .../ui/v2/navigation/tabs/VerticalTabs.tsx | 21 + packages/ui/v2/navigation/tabs/index.tsx | 5 + packages/ui/v2/notfications.tsx | 51 + packages/ui/v2/skeleton/index.tsx | 56 + scripts/vercel.sh | 76 + tests/config/globalSetup.ts | 2 +- tests/config/playwright.config.ts | 2 +- turbo.json | 78 +- vercel.sh | 59 - yarn.lock | 8395 +++++++++++++++-- 853 files changed, 34036 insertions(+), 14408 deletions(-) rename .github/workflows/{bug-hunting.yml => add-to-project.yml} (78%) create mode 100644 .github/workflows/check-if-ui-has-changed.yml create mode 100644 .github/workflows/cleanup-preview-databases.yml create mode 100644 .github/workflows/cron-scheduleEmailReminders.yml create mode 100644 .github/workflows/cron-scheduleSMSReminders.yml create mode 100644 .github/workflows/db-staging-snapshot.yml create mode 100644 .github/workflows/e2e-app-store.yml create mode 100755 apps/storybook/.gitignore create mode 100644 apps/storybook/.storybook/main.js create mode 100644 apps/storybook/.storybook/preview-head.html create mode 100644 apps/storybook/.storybook/preview.js create mode 100644 apps/storybook/README.md create mode 100755 apps/storybook/next-env.d.ts create mode 100755 apps/storybook/next.config.js create mode 100644 apps/storybook/package.json create mode 100755 apps/storybook/pages/_app.tsx create mode 100755 apps/storybook/pages/index.tsx create mode 100644 apps/storybook/postcss.config.js create mode 100755 apps/storybook/public/favicon.ico create mode 100755 apps/storybook/public/vercel.svg create mode 100644 apps/storybook/stories/Avatar.stories.tsx create mode 100644 apps/storybook/stories/AvatarGroup.stories.tsx create mode 100644 apps/storybook/stories/Badge.stories.tsx create mode 100644 apps/storybook/stories/Banner.stories.tsx create mode 100644 apps/storybook/stories/Breadcrumb.stories.tsx create mode 100644 apps/storybook/stories/Button.stories.tsx create mode 100644 apps/storybook/stories/ButtonGroup.stories.tsx create mode 100644 apps/storybook/stories/Cards.stories.tsx create mode 100644 apps/storybook/stories/Checkbox.stories.tsx create mode 100644 apps/storybook/stories/Colors.stories.tsx create mode 100644 apps/storybook/stories/DatePicker.stories.tsx create mode 100644 apps/storybook/stories/EmptyScreen.stories.tsx create mode 100644 apps/storybook/stories/FormStep.stories.tsx create mode 100644 apps/storybook/stories/HorizontalTab.stories.tsx create mode 100644 apps/storybook/stories/Input.stories.tsx create mode 100644 apps/storybook/stories/Modal.stories.tsx create mode 100644 apps/storybook/stories/Notifcations.stories.tsx create mode 100644 apps/storybook/stories/PageHeader.stories.tsx create mode 100644 apps/storybook/stories/Radio.stories.tsx create mode 100644 apps/storybook/stories/Select.stories.tsx create mode 100644 apps/storybook/stories/Switch.stories.tsx create mode 100644 apps/storybook/stories/TabItem.stories.tsx create mode 100644 apps/storybook/stories/VerticalTab.stories.tsx create mode 100755 apps/storybook/styles/globals.css create mode 100644 apps/storybook/tailwind.config.js create mode 100755 apps/storybook/tsconfig.json create mode 100644 apps/web/components/eventtype/EventTypeDescriptionSafeHTML.tsx create mode 100644 apps/web/components/team/DisableTeamImpersonation.tsx delete mode 100644 apps/web/ee/LICENSE delete mode 100644 apps/web/ee/README.md delete mode 100644 apps/web/ee/components/support/ContactMenuItem.tsx delete mode 100644 apps/web/ee/lib/impersonation/ImpersonationProvider.ts delete mode 100644 apps/web/lib/core/server/checkUsername.ts delete mode 100644 apps/web/lib/getting-started.tsx create mode 100644 apps/web/lib/hasKeyInMetadata.ts delete mode 100644 apps/web/lib/hooks/useTheme.tsx create mode 100644 apps/web/lib/isPrismaObj.ts delete mode 100644 apps/web/lib/locationOptions.tsx delete mode 100644 apps/web/lib/queries/event-types/get-event-types.ts delete mode 100644 apps/web/lib/timeFormat.ts create mode 100644 apps/web/middleware.ts delete mode 100644 apps/web/pages/_middleware.ts create mode 100644 apps/web/pages/api/auth/setup.ts create mode 100644 apps/web/pages/api/cron/workflows/scheduleEmailReminders.ts create mode 100644 apps/web/pages/api/cron/workflows/scheduleSMSReminders.ts delete mode 100644 apps/web/pages/api/event-type/index.ts create mode 100644 apps/web/pages/api/v2-opt-in.ts create mode 100644 apps/web/pages/apps/[slug]/[...pages].tsx create mode 100644 apps/web/pages/auth/setup.tsx create mode 100644 apps/web/pages/auth/signin.tsx create mode 100644 apps/web/pages/auth/verify.tsx delete mode 100644 apps/web/pages/bookings/index.tsx create mode 100644 apps/web/pages/v2/settings/admin/apps.tsx create mode 100644 apps/web/pages/v2/settings/admin/impersonation.tsx create mode 100644 apps/web/pages/v2/settings/admin/index.tsx create mode 100644 apps/web/pages/v2/settings/admin/users.tsx create mode 100644 apps/web/pages/workflows/[workflow].tsx create mode 100644 apps/web/pages/workflows/index.tsx rename apps/web/playwright/{lib/appstore => }/wipe-my-cal.test.ts (83%) delete mode 100644 apps/web/public/apps/metamask.svg rename apps/web/public/{calendso-logo-white-word.svg => calcom-logo-white-word.svg} (100%) rename apps/web/public/{calendso-logo-word-dark.svg => calcom-logo-word-dark.svg} (100%) rename apps/web/public/{calendso-logo-word.svg => calcom-logo-word.svg} (100%) rename apps/web/public/{calendso-white.svg => calcom-white.svg} (100%) create mode 100644 apps/web/public/fonts/Inter-roman.var.woff2 delete mode 100644 apps/web/public/fonts/Roboto-Black.ttf delete mode 100644 apps/web/public/fonts/Roboto-Black.woff delete mode 100644 apps/web/public/fonts/Roboto-Black.woff2 delete mode 100644 apps/web/public/fonts/Roboto-BlackItalic.ttf delete mode 100644 apps/web/public/fonts/Roboto-BlackItalic.woff delete mode 100644 apps/web/public/fonts/Roboto-BlackItalic.woff2 delete mode 100644 apps/web/public/fonts/Roboto-Bold.ttf delete mode 100644 apps/web/public/fonts/Roboto-Bold.woff delete mode 100644 apps/web/public/fonts/Roboto-Bold.woff2 delete mode 100644 apps/web/public/fonts/Roboto-BoldItalic.ttf delete mode 100644 apps/web/public/fonts/Roboto-BoldItalic.woff delete mode 100644 apps/web/public/fonts/Roboto-BoldItalic.woff2 delete mode 100644 apps/web/public/fonts/Roboto-Italic.ttf delete mode 100644 apps/web/public/fonts/Roboto-Italic.woff delete mode 100644 apps/web/public/fonts/Roboto-Italic.woff2 delete mode 100644 apps/web/public/fonts/Roboto-Light.ttf delete mode 100644 apps/web/public/fonts/Roboto-Light.woff delete mode 100644 apps/web/public/fonts/Roboto-Light.woff2 delete mode 100644 apps/web/public/fonts/Roboto-LightItalic.ttf delete mode 100644 apps/web/public/fonts/Roboto-LightItalic.woff delete mode 100644 apps/web/public/fonts/Roboto-LightItalic.woff2 delete mode 100644 apps/web/public/fonts/Roboto-Medium.ttf delete mode 100644 apps/web/public/fonts/Roboto-Medium.woff delete mode 100644 apps/web/public/fonts/Roboto-Medium.woff2 delete mode 100644 apps/web/public/fonts/Roboto-MediumItalic.ttf delete mode 100644 apps/web/public/fonts/Roboto-MediumItalic.woff delete mode 100644 apps/web/public/fonts/Roboto-MediumItalic.woff2 delete mode 100644 apps/web/public/fonts/Roboto-Regular.ttf delete mode 100644 apps/web/public/fonts/Roboto-Regular.woff delete mode 100644 apps/web/public/fonts/Roboto-Regular.woff2 delete mode 100644 apps/web/public/fonts/Roboto-Thin.ttf delete mode 100644 apps/web/public/fonts/Roboto-Thin.woff delete mode 100644 apps/web/public/fonts/Roboto-Thin.woff2 delete mode 100644 apps/web/public/fonts/Roboto-ThinItalic.ttf delete mode 100644 apps/web/public/fonts/Roboto-ThinItalic.woff delete mode 100644 apps/web/public/fonts/Roboto-ThinItalic.woff2 create mode 100644 apps/web/public/fonts/cal.ttf create mode 100644 apps/web/public/static/locales/bg/common.json delete mode 100644 apps/web/server/routers/viewer/slots.tsx create mode 100644 apps/web/test/.env.test.example create mode 100644 apps/web/test/README.md create mode 100644 apps/web/test/docker-compose.yml create mode 100644 apps/web/test/lib/getSchedule.test.ts delete mode 100644 apps/web/web3/dummyResps/bloxyApi.js create mode 100644 packages/app-store/_apps-playwright/config/globalSetup.ts create mode 100644 packages/app-store/_apps-playwright/config/playwright.config.ts create mode 100644 packages/app-store/_apps-playwright/lib/testUtils.ts rename {apps/storybook => packages/app-store/_baseApp/components}/.gitkeep (100%) delete mode 100644 packages/app-store/_baseApp/components/icon.tsx create mode 100644 packages/app-store/_utils/getParsedAppKeysFromSlug.ts create mode 100644 packages/app-store/dailyvideo/lib/getDailyAppKeys.ts create mode 100644 packages/app-store/ee/routing_forms/_metadata.ts create mode 100644 packages/app-store/ee/routing_forms/api/add.ts create mode 100644 packages/app-store/ee/routing_forms/api/index.ts create mode 100644 packages/app-store/ee/routing_forms/api/responses/[formId].ts create mode 100644 packages/app-store/ee/routing_forms/components/RoutingNavBar.tsx create mode 100644 packages/app-store/ee/routing_forms/components/RoutingShell.tsx create mode 100644 packages/app-store/ee/routing_forms/components/SideBar.tsx rename packages/app-store/{_baseApp => ee/routing_forms}/components/index.ts (100%) create mode 100644 packages/app-store/ee/routing_forms/components/react-awesome-query-builder/config/config.tsx create mode 100644 packages/app-store/ee/routing_forms/components/react-awesome-query-builder/styles.css create mode 100644 packages/app-store/ee/routing_forms/components/react-awesome-query-builder/widgets.tsx create mode 100644 packages/app-store/ee/routing_forms/config.json create mode 100644 packages/app-store/ee/routing_forms/env.d.ts create mode 100644 packages/app-store/ee/routing_forms/index.ts create mode 100644 packages/app-store/ee/routing_forms/lib/getFieldIdentifier.ts create mode 100644 packages/app-store/ee/routing_forms/lib/getSerializableForm.ts create mode 100644 packages/app-store/ee/routing_forms/lib/processRoute.tsx create mode 100644 packages/app-store/ee/routing_forms/package.json create mode 100644 packages/app-store/ee/routing_forms/pages/app-routing.config.tsx create mode 100644 packages/app-store/ee/routing_forms/pages/form-edit/[...appPages].tsx create mode 100644 packages/app-store/ee/routing_forms/pages/forms/[...appPages].tsx create mode 100644 packages/app-store/ee/routing_forms/pages/route-builder/[...appPages].tsx create mode 100644 packages/app-store/ee/routing_forms/pages/router/[...appPages].tsx create mode 100644 packages/app-store/ee/routing_forms/pages/routing-link/[...appPages].tsx create mode 100644 packages/app-store/ee/routing_forms/playwright/config/globalSetup.ts create mode 100644 packages/app-store/ee/routing_forms/playwright/config/globalTeardown.ts create mode 100644 packages/app-store/ee/routing_forms/playwright/config/playwright.config.ts create mode 100644 packages/app-store/ee/routing_forms/playwright/fixtures/fixtures.ts create mode 100644 packages/app-store/ee/routing_forms/playwright/lib/testUtils.ts create mode 100644 packages/app-store/ee/routing_forms/playwright/tests/basic.test.ts create mode 100644 packages/app-store/ee/routing_forms/static/icon.svg create mode 100644 packages/app-store/ee/routing_forms/trpc-router.ts create mode 100644 packages/app-store/ee/routing_forms/types/types.d.ts create mode 100644 packages/app-store/ee/routing_forms/zod.ts create mode 100644 packages/app-store/larkcalendar/README.mdx create mode 100644 packages/app-store/larkcalendar/_metadata.ts create mode 100644 packages/app-store/larkcalendar/api/add.ts create mode 100644 packages/app-store/larkcalendar/api/callback.ts create mode 100644 packages/app-store/larkcalendar/api/events.ts create mode 100644 packages/app-store/larkcalendar/api/index.ts create mode 100644 packages/app-store/larkcalendar/common.ts rename packages/app-store/{_baseApp => larkcalendar}/components/InstallAppButton.tsx (79%) create mode 100644 packages/app-store/larkcalendar/components/index.ts create mode 100644 packages/app-store/larkcalendar/index.ts create mode 100644 packages/app-store/larkcalendar/lib/AppAccessToken.ts create mode 100644 packages/app-store/larkcalendar/lib/BotService.ts create mode 100644 packages/app-store/larkcalendar/lib/CalendarService.ts create mode 100644 packages/app-store/larkcalendar/lib/index.ts create mode 100644 packages/app-store/larkcalendar/package.json create mode 100644 packages/app-store/larkcalendar/static/icon.svg create mode 100644 packages/app-store/larkcalendar/types/LarkCalendar.ts delete mode 100644 packages/app-store/next-auth.d.ts delete mode 100644 packages/app-store/next.d.ts create mode 100644 packages/app-store/office365calendar/lib/getOfficeAppKeys.ts create mode 100644 packages/app-store/ping/README.mdx create mode 100644 packages/app-store/ping/_metadata.ts rename packages/app-store/{_baseApp => ping}/api/_getAdd.ts (100%) create mode 100644 packages/app-store/ping/api/add.ts create mode 100644 packages/app-store/ping/api/index.ts create mode 100644 packages/app-store/ping/config.json create mode 100644 packages/app-store/ping/index.ts create mode 100644 packages/app-store/ping/package.json create mode 100644 packages/app-store/ping/static/1.png create mode 100644 packages/app-store/ping/static/2.png create mode 100644 packages/app-store/ping/static/3.png create mode 100644 packages/app-store/ping/static/icon.svg create mode 100644 packages/app-store/stripepayment/lib/client/createPaymentLink.ts rename packages/{stripe/client.ts => app-store/stripepayment/lib/client/getStripe.ts} (56%) create mode 100644 packages/app-store/stripepayment/lib/client/index.ts rename packages/{stripe => app-store/stripepayment/lib}/constants.ts (100%) rename packages/{stripe => app-store/stripepayment/lib}/customer.ts (98%) rename packages/{stripe => app-store/stripepayment/lib}/downgrade.ts (98%) rename packages/{stripe => app-store/stripepayment/lib}/index.ts (100%) rename {apps/web/ee/lib/stripe => packages/app-store/stripepayment/lib}/server.ts (83%) rename packages/{stripe => app-store/stripepayment/lib}/subscriptions.ts (97%) rename packages/{stripe => app-store/stripepayment/lib}/team-billing.ts (99%) rename packages/{stripe => app-store/stripepayment/lib}/utils.ts (100%) create mode 100644 packages/app-store/trpc-routers.ts create mode 100644 packages/app-store/typeform/README.mdx create mode 100644 packages/app-store/typeform/_metadata.ts create mode 100644 packages/app-store/typeform/api/add.ts create mode 100644 packages/app-store/typeform/api/index.ts create mode 100644 packages/app-store/typeform/components/CopyRedirectUrlButton.tsx create mode 100644 packages/app-store/typeform/components/index.ts create mode 100644 packages/app-store/typeform/config.json create mode 100644 packages/app-store/typeform/index.ts create mode 100644 packages/app-store/typeform/package.json create mode 100644 packages/app-store/typeform/pages/app-routing.config.tsx create mode 100644 packages/app-store/typeform/pages/how-to-use/[...appPages].tsx create mode 100644 packages/app-store/typeform/static/copy-typeform-redirect-url.png create mode 100644 packages/app-store/typeform/static/how-it-looks-in-typeform.png create mode 100644 packages/app-store/typeform/static/icon.svg create mode 100644 packages/config/ColorPalletGenerator.js create mode 100644 packages/config/next-i18next.config.js delete mode 100644 packages/ee/index.ts delete mode 100644 packages/ee/package.json delete mode 100644 packages/ee/tsconfig.json create mode 100644 packages/eslint-plugin/package.json create mode 100644 packages/eslint-plugin/src/configs/index.ts create mode 100644 packages/eslint-plugin/src/configs/recommended.ts create mode 100644 packages/eslint-plugin/src/index.js create mode 100644 packages/eslint-plugin/src/rules/deprecated-imports.ts create mode 100644 packages/eslint-plugin/src/rules/index.ts create mode 100644 packages/eslint-plugin/src/rules/my-first-rule.ts create mode 100644 packages/features/auth/README.md create mode 100644 packages/features/availability/README.md create mode 100644 packages/features/bookings/README.md create mode 100644 packages/features/calendars/README.md create mode 100644 packages/features/conferencing/README.md rename packages/{ => features}/ee/LICENSE (100%) rename packages/{ => features}/ee/README.md (87%) rename {apps/web/ee/components/apiKeys => packages/features/ee/api-keys/components}/ApiKeyDialogForm.tsx (94%) rename {apps/web/ee/components/apiKeys => packages/features/ee/api-keys/components}/ApiKeyListContainer.tsx (74%) rename {apps/web/ee/components/apiKeys => packages/features/ee/api-keys/components}/ApiKeyListItem.tsx (84%) rename packages/{ee/lib/api => features/ee/api-keys/lib}/apiKeys.ts (100%) rename packages/{ee/lib/api => features/ee/api-keys/lib}/findValidApiKey.ts (89%) rename {apps/web/ee => packages/features/ee/common}/components/LicenseBanner.tsx (91%) rename {apps/web/ee => packages/features/ee/common}/components/LicenseRequired.tsx (70%) rename apps/web/ee/components/saml/Configuration.tsx => packages/features/ee/common/components/SamlConfiguration.tsx (94%) rename {apps/web/ee => packages/features/ee/common}/components/TrialBanner.tsx (100%) rename packages/{ee/lib/core => features/ee/common/lib}/checkPremiumUsername.ts (89%) rename packages/{ee => features/ee/common}/server/checkLicense.ts (100%) rename {apps/web/components/ui => packages/features/ee/impersonation/components}/ImpersonatingBanner.tsx (100%) create mode 100644 packages/features/ee/impersonation/lib/ImpersonationProvider.ts create mode 100644 packages/features/ee/index.ts create mode 100644 packages/features/ee/package.json rename {apps/web/ee/pages/api/integrations/stripepayment => packages/features/ee/payments/api}/webhook.ts (98%) rename {apps/web/ee/components/stripe => packages/features/ee/payments/components}/Payment.tsx (95%) rename {apps/web/ee/components/stripe => packages/features/ee/payments/components}/PaymentPage.tsx (91%) rename apps/web/ee/pages/payment/[uid].tsx => packages/features/ee/payments/pages/payment.tsx (87%) create mode 100644 packages/features/ee/support/components/ContactMenuItem.tsx rename {apps/web/ee/components/support => packages/features/ee/support/components}/HelpMenuItem.tsx (96%) rename {apps/web/ee => packages/features/ee/support}/lib/helpscout/HelpscoutMenuItem.tsx (100%) rename {apps/web/ee => packages/features/ee/support}/lib/helpscout/provider.tsx (100%) rename {apps/web/ee => packages/features/ee/support}/lib/helpscout/providerDynamic.tsx (100%) rename {apps/web/ee => packages/features/ee/support}/lib/intercom/IntercomMenuItem.tsx (100%) rename {apps/web/ee => packages/features/ee/support}/lib/intercom/provider.tsx (100%) rename {apps/web/ee => packages/features/ee/support}/lib/intercom/providerDynamic.tsx (100%) rename {apps/web/ee => packages/features/ee/support}/lib/intercom/useIntercom.ts (100%) rename {apps/web/ee => packages/features/ee/support}/lib/zendesk/ZendeskMenuItem.tsx (100%) rename {apps/web/ee/pages/api/teams/[team] => packages/features/ee/teams/api}/upgrade.ts (81%) rename {apps/web/ee/components/team/availability => packages/features/ee/teams/components}/TeamAvailabilityModal.tsx (86%) rename {apps/web/ee/components/team/availability => packages/features/ee/teams/components}/TeamAvailabilityScreen.tsx (91%) rename {apps/web/ee/components/team/availability => packages/features/ee/teams/components}/TeamAvailabilityTimes.tsx (94%) rename {apps/web/ee/pages/settings/teams/[id] => packages/features/ee/teams/pages}/availability.tsx (70%) rename {apps/web => packages/features/ee}/web3/abis/abiWithGetBalance.json (100%) rename {apps/web/ee/components/web3 => packages/features/ee/web3/components}/CryptoSection.tsx (75%) rename {apps/web => packages/features/ee/web3}/contexts/contractsContext.tsx (100%) rename {apps/web => packages/features/ee}/web3/utils/verifyAccount.ts (100%) create mode 100644 packages/features/ee/workflows/api/scheduleEmailReminders.ts create mode 100644 packages/features/ee/workflows/api/scheduleSMSReminders.ts create mode 100644 packages/features/ee/workflows/components/AddActionDialog.tsx create mode 100644 packages/features/ee/workflows/components/AddVariablesDropdown.tsx create mode 100644 packages/features/ee/workflows/components/NewWorkflowButton.tsx create mode 100644 packages/features/ee/workflows/components/WorkflowDetailsPage.tsx create mode 100644 packages/features/ee/workflows/components/WorkflowListPage.tsx create mode 100644 packages/features/ee/workflows/components/WorkflowStepContainer.tsx create mode 100644 packages/features/ee/workflows/lib/constants.ts create mode 100644 packages/features/ee/workflows/lib/getOptions.ts create mode 100644 packages/features/ee/workflows/lib/reminders/emailReminderManager.ts create mode 100644 packages/features/ee/workflows/lib/reminders/reminderScheduler.ts create mode 100644 packages/features/ee/workflows/lib/reminders/smsProviders/twilioProvider.ts create mode 100644 packages/features/ee/workflows/lib/reminders/smsReminderManager.ts create mode 100644 packages/features/ee/workflows/lib/reminders/templates/customTemplate.ts create mode 100644 packages/features/ee/workflows/lib/reminders/templates/emailReminderTemplate.ts create mode 100644 packages/features/ee/workflows/lib/reminders/templates/smsReminderTemplate.ts create mode 100644 packages/features/ee/workflows/lib/variableTranslations.ts create mode 100644 packages/features/ee/workflows/pages/index.tsx create mode 100644 packages/features/ee/workflows/pages/workflow.tsx create mode 100644 packages/features/index.ts create mode 100644 packages/features/links/README.md create mode 100644 packages/features/package.json create mode 100644 packages/features/tsconfig.json create mode 100644 packages/features/users/README.md rename {apps/web/components => packages/lib}/CustomBranding.tsx (78%) create mode 100644 packages/lib/defaultAvatarImage.ts rename {apps/web => packages}/lib/getPlaceholderAvatar.tsx (100%) create mode 100644 packages/lib/hooks/useApp.ts create mode 100644 packages/lib/hooks/useTheme.tsx create mode 100644 packages/lib/i18n.ts create mode 100644 packages/lib/isMac.ts create mode 100644 packages/lib/isOutOfBounds.tsx create mode 100644 packages/lib/jackson.ts create mode 100644 packages/lib/jest.config.js create mode 100644 packages/lib/profile.ts create mode 100644 packages/lib/saml.ts rename {apps/web/lib/core => packages/lib}/server/checkRegularUsername.ts (86%) create mode 100644 packages/lib/server/checkUsername.ts rename packages/lib/server/{getServerErrorFromUnkown.ts => getServerErrorFromUnknown.ts} (95%) create mode 100644 packages/lib/server/queries/index.ts rename {apps/web/lib => packages/lib/server}/queries/teams/index.ts (93%) create mode 100644 packages/lib/slots.ts rename {apps/web => packages}/lib/telemetry.ts (91%) create mode 100644 packages/lib/test/.env.test create mode 100644 packages/lib/test/CalEventParser.test.ts create mode 100644 packages/lib/test/builder.ts create mode 100644 packages/lib/timeFormat.ts create mode 100644 packages/lib/webhooks/constants.ts create mode 100644 packages/lib/webhooks/integrationTemplate.tsx create mode 100644 packages/lib/webhooks/sendPayload.tsx create mode 100644 packages/lib/webhooks/subscriptions.tsx create mode 120000 packages/prisma/.env delete mode 100644 packages/prisma/.env.example create mode 100644 packages/prisma/middleware/eventTypeDescriptionParseAndSanitize.ts create mode 100644 packages/prisma/migrations/20220616072241_app_routing_forms/migration.sql create mode 100644 packages/prisma/migrations/20220628184929_adds_missing_owner_relationship/migration.sql create mode 100644 packages/prisma/migrations/20220628190334_adds_missing_oncascades/migration.sql create mode 100644 packages/prisma/migrations/20220628191702_adds_default_date_to_feedback/migration.sql create mode 100644 packages/prisma/migrations/20220711182928_add_workflows/migration.sql create mode 100644 packages/prisma/migrations/20220714175322_destination_calendar_one_to_many_bookings/migration.sql create mode 100644 packages/prisma/migrations/20220719110415_form_submitted_webhook/migration.sql create mode 100644 packages/prisma/migrations/20220719144253_disabled_impersonation_teams/migration.sql create mode 100644 packages/prisma/migrations/20220721183745_/migration.sql create mode 100644 packages/prisma/migrations/20220723001233_/migration.sql create mode 100644 packages/prisma/migrations/20220728111440_add_created_at_form_response/migration.sql create mode 100644 packages/prisma/migrations/20220803090845_migrate_daily_event_reference_to_booking_reference/migration.sql create mode 100644 packages/prisma/migrations/20220803091114_drop_daily_event_reference/migration.sql delete mode 100644 packages/stripe/LICENSE delete mode 100644 packages/stripe/README.md delete mode 100644 packages/stripe/package.json delete mode 100644 packages/stripe/server.ts delete mode 100644 packages/stripe/tsconfig.json create mode 100644 packages/trpc/client/index.ts create mode 100644 packages/trpc/client/links/httpBatchLink.ts create mode 100644 packages/trpc/client/links/httpLink.ts create mode 100644 packages/trpc/client/links/loggerLink.ts create mode 100644 packages/trpc/client/links/splitLink.ts create mode 100644 packages/trpc/index.ts create mode 100644 packages/trpc/next/index.ts create mode 100644 packages/trpc/package.json create mode 100644 packages/trpc/react/hooks/useMeQuery.ts create mode 100644 packages/trpc/react/index.ts create mode 100644 packages/trpc/react/ssg.ts rename {apps/web/lib => packages/trpc/react}/trpc.ts (86%) create mode 100644 packages/trpc/server/adapters/next.ts rename {apps/web => packages/trpc}/server/createContext.ts (89%) rename {apps/web => packages/trpc}/server/createRouter.ts (100%) create mode 100644 packages/trpc/server/index.ts rename {apps/web => packages/trpc}/server/routers/_app.ts (100%) rename {apps/web => packages/trpc}/server/routers/viewer.tsx (84%) rename {apps/web => packages/trpc}/server/routers/viewer/apiKeys.tsx (95%) rename {apps/web => packages/trpc}/server/routers/viewer/availability.tsx (89%) rename {apps/web => packages/trpc}/server/routers/viewer/bookings.tsx (77%) rename {apps/web => packages/trpc}/server/routers/viewer/eventTypes.tsx (93%) create mode 100644 packages/trpc/server/routers/viewer/slots.tsx rename {apps/web => packages/trpc}/server/routers/viewer/teams.tsx (88%) rename {apps/web => packages/trpc}/server/routers/viewer/webhook.tsx (93%) create mode 100644 packages/trpc/server/routers/viewer/workflows.tsx create mode 100644 packages/trpc/tsconfig.json create mode 100644 packages/types/AppGetServerSideProps.d.ts create mode 100644 packages/types/AppHandler.d.ts rename {apps/web/components => packages}/ui/Badge.tsx (93%) create mode 100644 packages/ui/BooleanToggleGroup.tsx rename {apps/web/components/dialog => packages/ui}/ConfirmationDialogContent.tsx (88%) create mode 100644 packages/ui/CustomBranding.tsx rename {apps/web/lib => packages/ui}/ErrorBoundary.tsx (100%) create mode 100644 packages/ui/Icon.tsx create mode 100644 packages/ui/Kbar.tsx rename {apps/web/components => packages/ui}/List.tsx (97%) rename {apps/web/components => packages/ui}/Logo.tsx (73%) rename {apps/web/components => packages/ui}/Shell.tsx (56%) rename {apps/web/components => packages/ui}/apps/SkeletonLoader.tsx (70%) create mode 100644 packages/ui/form/MultiSelectCheckboxes.tsx rename {apps/web/components => packages}/ui/form/PhoneInput.tsx (74%) create mode 100644 packages/ui/form/PhoneInputLazy.tsx rename {apps/web/components => packages}/ui/form/TimezoneSelect.tsx (91%) create mode 100644 packages/ui/v2/Alert.tsx create mode 100644 packages/ui/v2/Avatar.tsx create mode 100644 packages/ui/v2/AvatarGroup.tsx create mode 100644 packages/ui/v2/Badge.tsx create mode 100644 packages/ui/v2/Breadcrumb.tsx create mode 100644 packages/ui/v2/Button.tsx create mode 100644 packages/ui/v2/ButtonGroup.tsx create mode 100644 packages/ui/v2/Card.tsx create mode 100644 packages/ui/v2/Dialog.tsx create mode 100644 packages/ui/v2/Dropdown.tsx create mode 100644 packages/ui/v2/EmptyScreen.tsx create mode 100644 packages/ui/v2/Loader.tsx create mode 100644 packages/ui/v2/PageHeader.tsx create mode 100644 packages/ui/v2/Shell.tsx create mode 100644 packages/ui/v2/Stepper.tsx rename {apps/web/components => packages/ui/v2}/Swatch.tsx (81%) create mode 100644 packages/ui/v2/Switch.tsx create mode 100644 packages/ui/v2/Tooltip.tsx create mode 100644 packages/ui/v2/WizardForm.tsx create mode 100644 packages/ui/v2/banner.tsx create mode 100644 packages/ui/v2/booker/DatePicker.tsx create mode 100644 packages/ui/v2/colorpicker.tsx create mode 100644 packages/ui/v2/form/Checkbox.tsx create mode 100644 packages/ui/v2/form/DatePicker.tsx create mode 100644 packages/ui/v2/form/FormStep.tsx create mode 100644 packages/ui/v2/form/Select.tsx create mode 100644 packages/ui/v2/form/fields.tsx create mode 100644 packages/ui/v2/form/index.ts create mode 100644 packages/ui/v2/form/radio-area/Radio.tsx create mode 100644 packages/ui/v2/form/radio-area/RadioAreaGroup.tsx create mode 100644 packages/ui/v2/form/radio-area/Select.tsx create mode 100644 packages/ui/v2/form/radio-area/index.ts create mode 100644 packages/ui/v2/index.tsx create mode 100644 packages/ui/v2/layouts/AdminLayout.tsx create mode 100644 packages/ui/v2/layouts/SettingsLayout.tsx create mode 100644 packages/ui/v2/navigation/NavigationItem.tsx create mode 100644 packages/ui/v2/navigation/tabs/HorizontalTabItem.tsx create mode 100644 packages/ui/v2/navigation/tabs/HorizontalTabs.tsx create mode 100644 packages/ui/v2/navigation/tabs/VerticalTabItem.tsx create mode 100644 packages/ui/v2/navigation/tabs/VerticalTabs.tsx create mode 100644 packages/ui/v2/navigation/tabs/index.tsx create mode 100644 packages/ui/v2/notfications.tsx create mode 100644 packages/ui/v2/skeleton/index.tsx create mode 100755 scripts/vercel.sh delete mode 100755 vercel.sh diff --git a/.env.appStore.example b/.env.appStore.example index 886b3d3024a83d..921e46f5bf7352 100644 --- a/.env.appStore.example +++ b/.env.appStore.example @@ -88,3 +88,11 @@ VITAL_REGION="us" # @see https://github.com/calcom/cal.com/blob/main/packages/app-store/zapier/README.md ZAPIER_INVITE_LINK="" # ********************************************************************************************************* + +# - LARK +# Needed to enable Lark Calendar integration and Login with Lark +# @see +LARK_OPEN_APP_ID="" +LARK_OPEN_APP_SECRET="" +LARK_OPEN_VERIFICATION_TOKEN="" +# ********************************************************************************************************* diff --git a/.env.example b/.env.example index c621143796e4fa..774e96a4b5ab2d 100644 --- a/.env.example +++ b/.env.example @@ -21,7 +21,7 @@ CALCOM_LICENSE_KEY= # *********************************************************************************************************** # - DATABASE ************************************************************************************************ -# ⚠️ ⚠️ ⚠️ DATABASE_URL got moved to `packages/prisma/.env.example` ⚠️ ⚠️ ⚠️ +DATABASE_URL="postgresql://postgres:@localhost:5450/calendso" # *********************************************************************************************************** # - SHARED ************************************************************************************************** @@ -30,6 +30,8 @@ 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 @@ -77,6 +79,17 @@ NEXT_PUBLIC_HELPSCOUT_KEY= # Inbox to send user feedback SEND_FEEDBACK_EMAIL= +# Sengrid +# Used for email reminders in workflows +SENDGRID_API_KEY= +SENDGRID_EMAIL= + +# Twilio +# Used to send SMS reminders in workflows +TWILIO_SID= +TWILIO_TOKEN= +TWILIO_MESSAGING_SID= + # This is used so we can bypass emails in auth flows for E2E testing # Set it to "1" if you need to run E2E tests locally NEXT_PUBLIC_IS_E2E= @@ -116,3 +129,6 @@ EMAIL_SERVER_PASSWORD='' ## @see https://support.google.com/accounts/answer/185833 # EMAIL_SERVER_PASSWORD='' # ********************************************************************************************************** + +# Set the following value to true if you wish to enable Team Impersonation +NEXT_PUBLIC_TEAM_IMPERSONATION=false diff --git a/.github/workflows/bug-hunting.yml b/.github/workflows/add-to-project.yml similarity index 78% rename from .github/workflows/bug-hunting.yml rename to .github/workflows/add-to-project.yml index bea2ffac437a35..41d2ba63fc8f96 100644 --- a/.github/workflows/bug-hunting.yml +++ b/.github/workflows/add-to-project.yml @@ -11,7 +11,7 @@ on: - labeled jobs: - bug-hunting: + add-to-project: name: Add issue to project runs-on: ubuntu-latest steps: @@ -19,4 +19,4 @@ jobs: with: project-url: https://github.com/orgs/calcom/projects/1 github-token: ${{ secrets.GH_ACCESS_TOKEN }} - labeled: '🐛 bug' + labeled: 🐛 bug, 🎨 needs design, 🙋🏻‍♂️help wanted, 🚨 urgent diff --git a/.github/workflows/check-if-ui-has-changed.yml b/.github/workflows/check-if-ui-has-changed.yml new file mode 100644 index 00000000000000..ce6a01ff90693e --- /dev/null +++ b/.github/workflows/check-if-ui-has-changed.yml @@ -0,0 +1,36 @@ +# .github/workflows/chromatic.yml + +# Workflow name +name: 'Chromatic' + +# Event for the workflow +on: + pull_request_target: # So we can test on forks + branches: + - main + paths: + - apps/storybook/** + - packages/ui/** + workflow_dispatch: + +# List of jobs +jobs: + chromatic-deployment: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} # So we can test on forks + fetch-depth: 0 + - name: Install dependencies + run: yarn + # 👇 Adds Chromatic as a step in the workflow + - name: Publish to Chromatic + uses: chromaui/action@v1 + # Options required to the GitHub Chromatic Action + with: + # 👇 Chromatic projectToken, refer to the manage page to obtain it. + projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + workingDir: "apps/storybook" + buildScriptName: "build" diff --git a/.github/workflows/check-types.yml b/.github/workflows/check-types.yml index 6147355fce251f..edcfb3a6717adf 100644 --- a/.github/workflows/check-types.yml +++ b/.github/workflows/check-types.yml @@ -1,19 +1,13 @@ name: Check types on: - pull_request: + pull_request_target: branches: - main paths: - - '**.tsx?' + - "**.tsx?" jobs: check-types: - name: Check types - strategy: - matrix: - node: ["16.x"] - os: [ubuntu-latest] - runs-on: ${{ matrix.os }} - + runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@v2 @@ -21,10 +15,10 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 2 - - name: Use Node ${{ matrix.node }} + - name: Use Node 16.x uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node }} + node-version: 16.x cache: "yarn" - run: yarn --frozen-lockfile - run: yarn type-check diff --git a/.github/workflows/cleanup-preview-databases.yml b/.github/workflows/cleanup-preview-databases.yml new file mode 100644 index 00000000000000..a8be8db1d3505f --- /dev/null +++ b/.github/workflows/cleanup-preview-databases.yml @@ -0,0 +1,20 @@ +name: Cleanup Preview Databases + +env: + SNAPLET_ACCESS_TOKEN: ${{ secrets.SNAPLET_ACCESS_TOKEN }} + SNAPLET_PROJECT_ID: cl4u26bwz7962859ply7ibuo43t + +on: + pull_request: + types: [closed] + branches: + - main + +jobs: + delete: + runs-on: ubuntu-latest + steps: + - uses: snaplet/action@v1 + if: ${{ env.SNAPLET_ACCESS_TOKEN && env.SNAPLET_PROJECT_ID }} + with: + delete: true diff --git a/.github/workflows/cron-scheduleEmailReminders.yml b/.github/workflows/cron-scheduleEmailReminders.yml new file mode 100644 index 00000000000000..dc77c2d5dd297d --- /dev/null +++ b/.github/workflows/cron-scheduleEmailReminders.yml @@ -0,0 +1,23 @@ +name: Cron - scheduleEmailReminders + +on: + # "Scheduled workflows run on the latest commit on the default or base branch." + # — https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule + schedule: + # Runs “At minute 0, 15, 30, and 45.” (see https://crontab.guru) + - cron: "0,15,30,45 * * * *" +jobs: + cron-scheduleEmailReminders: + env: + APP_URL: ${{ secrets.APP_URL }} + CRON_API_KEY: ${{ secrets.CRON_API_KEY }} + runs-on: ubuntu-latest + steps: + - name: cURL request + if: ${{ env.APP_URL && env.CRON_API_KEY }} + run: | + curl ${{ secrets.APP_URL }}/api/cron/workflows/scheduleEmailReminders \ + -X POST \ + -H 'content-type: application/json' \ + -H 'authorization: ${{ secrets.CRON_API_KEY }}' \ + --fail diff --git a/.github/workflows/cron-scheduleSMSReminders.yml b/.github/workflows/cron-scheduleSMSReminders.yml new file mode 100644 index 00000000000000..392a9cf5ecc405 --- /dev/null +++ b/.github/workflows/cron-scheduleSMSReminders.yml @@ -0,0 +1,23 @@ +name: Cron - scheduleSMSReminders + +on: + # "Scheduled workflows run on the latest commit on the default or base branch." + # — https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule + schedule: + # Runs “At minute 0, 15, 30, and 45.” (see https://crontab.guru) + - cron: "0,15,30,45 * * * *" +jobs: + cron-scheduleSMSReminders: + env: + APP_URL: ${{ secrets.APP_URL }} + CRON_API_KEY: ${{ secrets.CRON_API_KEY }} + runs-on: ubuntu-latest + steps: + - name: cURL request + if: ${{ env.APP_URL && env.CRON_API_KEY }} + run: | + curl ${{ secrets.APP_URL }}/api/cron/workflows/scheduleSMSReminders \ + -X POST \ + -H 'content-type: application/json' \ + -H 'authorization: ${{ secrets.CRON_API_KEY }}' \ + --fail diff --git a/.github/workflows/db-staging-snapshot.yml b/.github/workflows/db-staging-snapshot.yml new file mode 100644 index 00000000000000..4fa1ae35f98e68 --- /dev/null +++ b/.github/workflows/db-staging-snapshot.yml @@ -0,0 +1,18 @@ +name: Staging DB Snapshot +on: + schedule: + - cron: "0 4 * * 1-5" # At 04:00 on every day-of-week from Monday through Friday. + workflow_dispatch: +jobs: + db-staging-snapshot: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install Snaplet CLI + run: curl -sL https://app.snaplet.dev/get-cli/ | bash + - name: Restore Snapshot + run: snaplet snapshot restore -y + env: + SNAPLET_DATABASE_URL: ${{ secrets.SNAPLET_DATA_TARGET_DB_URL }} + SNAPLET_ACCESS_TOKEN: ${{ secrets.SNAPLET_ACCESS_TOKEN }} + SNAPLET_DATABASE_ID: ${{ secrets.SNAPLET_DATABASE_ID }} diff --git a/.github/workflows/e2e-app-store.yml b/.github/workflows/e2e-app-store.yml new file mode 100644 index 00000000000000..deb42ffe07fca2 --- /dev/null +++ b/.github/workflows/e2e-app-store.yml @@ -0,0 +1,99 @@ +name: E2E App-Store Apps +on: + push: + branches: [ feature/event-routing ] + pull_request_target: # So we can test on forks + branches: + - main + paths-ignore: + - apps/api/** + - apps/console/** + - apps/docs/** + - apps/swagger/** + - apps/website/** + - apps/web/public/** +jobs: + test: + timeout-minutes: 20 + name: E2E App-Store Apps + strategy: + matrix: + node: ["16.x"] + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + + env: + DATABASE_URL: postgresql://postgres:@localhost:5432/calendso + NEXT_PUBLIC_WEBAPP_URL: http://localhost:3000 + NEXT_PUBLIC_WEBSITE_URL: http://localhost:3000 + NEXTAUTH_SECRET: secret + GOOGLE_API_CREDENTIALS: ${{ secrets.CI_GOOGLE_API_CREDENTIALS }} + GOOGLE_LOGIN_ENABLED: true + # CRON_API_KEY: xxx + CALENDSO_ENCRYPTION_KEY: ${{ secrets.CI_CALENDSO_ENCRYPTION_KEY }} + NEXT_PUBLIC_STRIPE_PUBLIC_KEY: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PUBLIC_KEY }} + STRIPE_PRIVATE_KEY: ${{ secrets.CI_STRIPE_PRIVATE_KEY }} + STRIPE_CLIENT_ID: ${{ secrets.CI_STRIPE_CLIENT_ID }} + STRIPE_WEBHOOK_SECRET: ${{ secrets.CI_STRIPE_WEBHOOK_SECRET }} + PAYMENT_FEE_PERCENTAGE: 0.005 + PAYMENT_FEE_FIXED: 10 + SAML_DATABASE_URL: postgresql://postgres:@localhost:5432/calendso + SAML_ADMINS: pro@example.com + NEXTAUTH_URL: http://localhost:3000/api/auth + NEXT_PUBLIC_IS_E2E: 1 + # EMAIL_FROM: e2e@cal.com + # EMAIL_SERVER_HOST: ${{ secrets.CI_EMAIL_SERVER_HOST }} + # EMAIL_SERVER_PORT: ${{ secrets.CI_EMAIL_SERVER_PORT }} + # EMAIL_SERVER_USER: ${{ secrets.CI_EMAIL_SERVER_USER }} + # EMAIL_SERVER_PASSWORD: ${{ secrets.CI_EMAIL_SERVER_PASSWORD }} + # MS_GRAPH_CLIENT_ID: xxx + # MS_GRAPH_CLIENT_SECRET: xxx + # ZOOM_CLIENT_ID: xxx + # ZOOM_CLIENT_SECRET: xxx + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_TEAM: ${{ secrets.TURBO_TEAM }} + services: + postgres: + image: postgres:12.1 + env: + POSTGRES_USER: postgres + POSTGRES_DB: calendso + ports: + - 5432:5432 + + steps: + - name: Checkout repo + uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} # So we can test on forks + fetch-depth: 2 + - run: echo 'NODE_OPTIONS="--max_old_space_size=4096"' >> $GITHUB_ENV + - name: Use Node ${{ matrix.node }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + cache: "yarn" + + - name: Cache playwright binaries + uses: actions/cache@v2 + id: playwright-cache + with: + path: | + ~/Library/Caches/ms-playwright + ~/.cache/ms-playwright + ${{ github.workspace }}/node_modules/playwright + key: cache-playwright-${{ hashFiles('**/yarn.lock') }} + restore-keys: cache-playwright- + - run: yarn --frozen-lockfile + - name: Install playwright deps + # if: steps.playwright-cache.outputs.cache-hit != 'true' + run: yarn playwright install --with-deps + - name: Run Tests + run: yarn app-e2e-quick + + - name: Upload Test Results + if: ${{ always() }} + uses: actions/upload-artifact@v2 + with: + name: test-results-core + path: packages/app-store/**/playwright/results \ No newline at end of file diff --git a/.github/workflows/e2e-embed.yml b/.github/workflows/e2e-embed.yml index 14d07dfb01b1b4..719a1e2b94695e 100644 --- a/.github/workflows/e2e-embed.yml +++ b/.github/workflows/e2e-embed.yml @@ -1,6 +1,6 @@ -name: E2E tests Embed +name: E2E Embed tests and booking flow(for non-embed as well) on: - pull_request: # So we can test on forks + pull_request_target: # So we can test on forks branches: - main # Embed e2e - tests verify booking flow which is applicable to non-embed case also. So, don't ignore apps/web changes. @@ -10,12 +10,7 @@ on: jobs: e2e-embed: timeout-minutes: 20 - name: Embed and booking flow(for non-embed as well) - strategy: - matrix: - node: ["16.x"] - os: [ubuntu-latest] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest env: DATABASE_URL: postgresql://postgres:@localhost:5432/calendso @@ -66,10 +61,10 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} # So we can test on forks fetch-depth: 2 - run: echo 'NODE_OPTIONS="--max_old_space_size=4096"' >> $GITHUB_ENV - - name: Use Node ${{ matrix.node }} + - name: Use Node 16.x uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node }} + node-version: 16.x cache: "yarn" - name: Cache playwright binaries diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index db6c2569354ba6..0b702c2a6f1f11 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -1,6 +1,6 @@ name: E2E test on: - pull_request: # So we can test on forks + pull_request_target: # So we can test on forks branches: - main paths: @@ -9,12 +9,7 @@ on: jobs: e2e: timeout-minutes: 20 - name: Testing ${{ matrix.node }} and ${{ matrix.os }} - strategy: - matrix: - node: ["16.x"] - os: [ubuntu-latest] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest env: DATABASE_URL: postgresql://postgres:@localhost:5432/calendso @@ -68,10 +63,10 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} # So we can test on forks fetch-depth: 2 - run: echo 'NODE_OPTIONS="--max_old_space_size=4096"' >> $GITHUB_ENV - - name: Use Node ${{ matrix.node }} + - name: Use Node 16.x uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node }} + node-version: 16.x cache: "yarn" - name: Cache playwright binaries diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 2f10275dfe5f29..ff514935a76c0b 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -10,5 +10,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/labeler@v4 + # Checking the actor will prevent your Action run failing on non-Dependabot + # PRs but also ensures that it only does work for Dependabot PRs. + if: ${{ github.actor == 'github-actions[bot]' }} with: repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c2310c11cab89f..f868fd30b75b9c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,18 +1,14 @@ name: Lint on: - pull_request: + pull_request_target: branches: - main paths: - - '**.tsx?' - - '**.jsx?' + - "**.tsx?" + - "**.jsx?" jobs: lint: - strategy: - matrix: - node: ["16.x"] - os: [ubuntu-latest] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest steps: - name: Checkout repo @@ -21,10 +17,10 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 2 - - name: Use Node ${{ matrix.node }} + - name: Use Node 16.x uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node }} + node-version: 16.x cache: "yarn" - name: Install deps @@ -39,10 +35,11 @@ jobs: run: jq -s '[.[]]|flatten' lint-results/*.json &> lint-results/eslint_report.json - name: Annotate Code Linting Results - uses: ataylorme/eslint-annotate-action@1.2.0 + uses: ataylorme/eslint-annotate-action@v2 with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" + repo-token: ${{ secrets.GITHUB_TOKEN }} report-json: "lint-results/eslint_report.json" + only-pr-files: false - name: Upload ESLint report if: ${{ always() }} diff --git a/.github/workflows/required-checks.yml b/.github/workflows/required-checks.yml index ff8dc301b8c01f..4a50b02bc05e47 100644 --- a/.github/workflows/required-checks.yml +++ b/.github/workflows/required-checks.yml @@ -5,11 +5,7 @@ on: - main jobs: required-checks: - strategy: - matrix: - node: ["16.x"] - os: [ubuntu-latest] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest steps: - name: Ensure All Conditional Checks Have Passed uses: blend/require-conditional-status-checks@2022.02.04 diff --git a/.github/workflows/submodule-sync.yml b/.github/workflows/submodule-sync.yml index c4b61885bdca51..e8c90cb83e4f61 100644 --- a/.github/workflows/submodule-sync.yml +++ b/.github/workflows/submodule-sync.yml @@ -3,7 +3,6 @@ on: schedule: - cron: "15 */4 * * *" workflow_dispatch: ~ - jobs: submodule-sync: name: Submodule update @@ -11,11 +10,11 @@ jobs: steps: - name: Checkout Code uses: actions/checkout@v2 - - name: run action - uses: releasehub-com/github-action-create-pr-parent-submodule@v1 with: - github_token: ${{ secrets.GH_ACCESS_TOKEN }} - parent_repository: "calcom/cal.com" - checkout_branch: "main" - pr_against_branch: "main" - owner: "calcom" + submodules: recursive + token: ${{ secrets.GH_ACCESS_TOKEN }} + - name: Commit + run: | + git config user.email "actions@github.com" + git config user.name "github-actions" + git commit -am "Auto updated submodule references" && git push || echo "No changes to commit" diff --git a/.gitignore b/.gitignore index a99226a7833dec..be21d9cdd8028d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ # .env file .env +!packages/prisma/.env # dependencies node_modules @@ -73,6 +74,9 @@ dist # Linting lint-results +#Storybook +apps/storybook/build-storybook.log + # Snaplet .snaplet/snapshots .snaplet/structure.d.ts diff --git a/.kodiak.toml b/.kodiak.toml index cf0f51c83ecc34..419e2c7dc0347d 100644 --- a/.kodiak.toml +++ b/.kodiak.toml @@ -4,5 +4,4 @@ version = 1 autoupdate_label = "♻️ autoupdate" [approve] -auto_approve_usernames = ["dependabot"] - +auto_approve_usernames = ["dependabot", "github-actions"] diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 1f3424f531542d..6ca5d40f3c4f55 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -22,10 +22,6 @@ "group": { "kind": "build", "isDefault": true - }, - // Try start the task on folder open - "runOptions": { - "runOn": "folderOpen" } }, { diff --git a/LICENSE b/LICENSE index 6f18e1551ed61b..ce5231ba9b2209 100644 --- a/LICENSE +++ b/LICENSE @@ -2,7 +2,7 @@ Copyright (c) 2020-present Cal.com, Inc. Portions of this software are licensed as follows: -* All content that resides under "apps/web/ee/" (https://github.com/calcom/cal.com/tree/main/apps/web/ee) directory of this repository (Enterprise Edition) is licensed under the license defined in "ee/LICENSE". +* All content that resides under https://github.com/calcom/cal.com/tree/main/packages/features/ee directory of this repository (Enterprise Edition) is licensed under the license defined in "ee/LICENSE". * All third party components incorporated into the Cal.com Software are licensed under the original license provided by the owner of the applicable component. * Content outside of the above mentioned directories or restrictions above is available under the "AGPLv3" license as defined below. diff --git a/README.md b/README.md index 567b6feff66d6e..322a9ef951d052 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@

Join Cal.com Slack Product Hunt + Uptime Github Stars Hacker News License @@ -36,6 +37,8 @@ + +

@@ -61,6 +64,9 @@ That's where Cal.com comes in. Self-hosted or hosted by us. White-label by desig Cal.com - The open source Calendly alternative | Product Hunt Cal.com - The open source Calendly alternative | Product Hunt Cal.com - The open source Calendly alternative | Product Hunt + + + ### Built With - [Next.js](https://nextjs.org/) @@ -84,7 +90,7 @@ To get a local copy up and running, please follow these simple steps. Here is what you need to be able to run Cal. -- Node.js (Version: >=14.x <17) +- Node.js (Version: >=15.x <17) - PostgreSQL - Yarn _(recommended)_ @@ -133,7 +139,7 @@ echo 'NEXT_PUBLIC_DEBUG=1' >> .env #### Manual setup -1. Configure environment variables in the `packages/prisma/.env` file. Replace ``, ``, ``, `` with their applicable values +1. Configure environment variables in the `.env` file. Replace ``, ``, ``, `` with their applicable values ``` DATABASE_URL='postgresql://:@:' @@ -167,7 +173,7 @@ echo 'NEXT_PUBLIC_DEBUG=1' >> .env 1. Set a 32 character random string in your .env file for the `CALENDSO_ENCRYPTION_KEY` (You can use a command like `openssl rand -base64 24` to generate one). -1. Set up the database using the Prisma schema (found in `apps/web/prisma/schema.prisma`) +1. Set up the database using the Prisma schema (found in `packages/prisma/schema.prisma`) ```sh yarn workspace @calcom/prisma db-deploy @@ -189,7 +195,7 @@ echo 'NEXT_PUBLIC_DEBUG=1' >> .env 1. Click on the `User` model to add a new user record. 1. Fill out the fields `email`, `username`, `password`, and set `metadata` to empty `{}` (remembering to encrypt your password with [BCrypt](https://bcrypt-generator.com/)) and click `Save 1 Record` to create your first user. - > New users are set on a `TRIAL` plan by default. You might want to adjust this behavior to your needs in the `apps/web/prisma/schema.prisma` file. + > New users are set on a `TRIAL` plan by default. You might want to adjust this behavior to your needs in the `packages/prisma/schema.prisma` file. 1. Open a browser to [http://localhost:3000](http://localhost:3000) and login with your just created, first user. ### E2E-Testing @@ -260,12 +266,16 @@ yarn workspace @calcom/web playwright-report ### Docker -The Docker configuration for Cal is an effort powered by people within the community. Cal.com, Inc. does not provide official support for Docker, but we will accept fixes and documentation. Use at your own risk. +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. + +Cal.com, Inc. does not provide official support for Docker, but we will accept fixes and documentation. Use at your own risk. + ### Heroku @@ -278,12 +288,17 @@ The Docker configuration can be found [in our docker repository](https://github. 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. +### Vercel + +Currently Vercel Pro Plan is required to be able to Deploy this application with Vercel, due to limitations on the number of serverless functions on the free plan. + +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fcalcom%2Fcal.com&env=DATABASE_URL,NEXT_PUBLIC_WEBAPP_URL,NEXTAUTH_URL,NEXTAUTH_SECRET,CRON_API_KEY,CALENDSO_ENCRYPTION_KEY,NEXT_PUBLIC_LICENSE_CONSENT&envDescription=See%20all%20available%20env%20vars&envLink=https%3A%2F%2Fgithub.com%2Fcalcom%2Fcal.com%2Fblob%2Fmain%2F.env.example&project-name=cal&repo-name=cal.com&build-command=cd%20../..%20%26%26%20yarn%20build&root-directory=apps%2Fweb%2F) + ## Roadmap - - Cal.com Roadmap +Cal.com Roadmap See the [roadmap project](https://cal.com/roadmap) for a list of proposed features (and known issues). You can change the view to see planned tagged releases. @@ -295,7 +310,7 @@ Please see our [contributing guide](/CONTRIBUTING.md). ### Good First Issues -We have a list of [good first issues](https://github.com/calcom/cal.com/labels/✅%20good%20first%20issue) that contain bugs which have a relatively limited scope. This is a great place to get started, gain experience, and get familiar with our contribution process. +We have a list of [help wanted](https://github.com/orgs/calcom/projects/1/views/25) that contain small features and bugs which have a relatively limited scope. This is a great place to get started, gain experience, and get familiar with our contribution process. ## Integrations @@ -313,6 +328,22 @@ We have a list of [good first issues](https://github.com/calcom/cal.com/labels/ 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* + +After adding Google credentials, you can now Google Calendar App to the app store. +You can repopulate the App store by running + +``` +cd packages/prisma +yarn seed-app-store +``` + +You will need to complete a few more steps to activate Google Calendar App. +Make sure to complete section "Obtaining the Google API Credentials". After the do the +following + +1. Add extra redirect 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 @@ -421,6 +452,31 @@ Next make sure you have your app running `yarn dx`. Then in the slack chat type 1. Select all events for the webhook you interested, e.g. `sleep_created` 1. Copy the webhook secret (`sec...`) to `VITAL_WEBHOOK_SECRET` in the .env.appStore file. +## Workflows + +### Setting up SendGrid for Email reminders + +1. Create a SendGrid account (https://signup.sendgrid.com/) +2. Go to Settings -> API keys and create an API key +3. Copy API key to your .env file into the SENDGRID_API_KEY field +4. Go to Settings -> Sender Authentication and verify a single sender +5. Copy the verified E-Mail to your .env file into the SENDGRID_EMAIL field + +### Setting up Twilio for SMS reminders + +1. Create a Twilio account (https://www.twilio.com/try-twilio) +2. Click ‘Get a Twilio phone number’ +3. Copy Account SID to your .env file into the TWILIO_SID field +4. Copy Auth Token to your .env file into the TWILIO_TOKEN field +5. Create a messaging service (Develop -> Messaging -> Services) +6. Choose any name for the messaging service +7. Click 'Add Senders' +8. Choose phone number as sender type +9. Add the listed phone number +10. Leave all other fields as they are +11. Complete setup and click ‘View my new Messaging Service’ +12. Copy Messaging Service SID to your .env file into the TWILIO_MESSAGING_SID field + ## License diff --git a/SECURITY.md b/SECURITY.md index 45e909fe464d10..734a6f4e6d7aab 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,4 +1,5 @@ # Security + Contact: security@cal.com Based on [https://supabase.com/.well-known/security.txt](https://supabase.com/.well-known/security.txt) @@ -9,30 +10,30 @@ If you discover a vulnerability, we would like to know about it so we can take s ## Out of scope vulnerabilities: -* Clickjacking on pages with no sensitive actions. -* Unauthenticated/logout/login CSRF. -* Attacks requiring MITM or physical access to a user's device. -* Any activity that could lead to the disruption of our service (DoS). -* Content spoofing and text injection issues without showing an attack vector/without being able to modify HTML/CSS. -* Email spoofing -* Missing DNSSEC, CAA, CSP headers -* Lack of Secure or HTTP only flag on non-sensitive cookies -* Deadlinks +- Clickjacking on pages with no sensitive actions. +- Unauthenticated/logout/login CSRF. +- Attacks requiring MITM or physical access to a user's device. +- Any activity that could lead to the disruption of our service (DoS). +- Content spoofing and text injection issues without showing an attack vector/without being able to modify HTML/CSS. +- Email spoofing +- Missing DNSSEC, CAA, CSP headers +- Lack of Secure or HTTP only flag on non-sensitive cookies +- Deadlinks ## Please do the following: -* E-mail your findings to [security@cal.com](mailto:security@cal.com). -* Do not run automated scanners on our infrastructure or dashboard. If you wish to do this, contact us and we will set up a sandbox for you. -* Do not take advantage of the vulnerability or problem you have discovered, for example by downloading more data than necessary to demonstrate the vulnerability or deleting or modifying other people's data, -* Do not reveal the problem to others until it has been resolved, -* Do not use attacks on physical security, social engineering, distributed denial of service, spam or applications of third parties, -* Do provide sufficient information to reproduce the problem, so we will be able to resolve it as quickly as possible. Usually, the IP address or the URL of the affected system and a description of the vulnerability will be sufficient, but complex vulnerabilities may require further explanation. +- E-mail your findings to [security@cal.com](mailto:security@cal.com). +- Do not run automated scanners on our infrastructure or dashboard. If you wish to do this, contact us and we will set up a sandbox for you. +- Do not take advantage of the vulnerability or problem you have discovered, for example by downloading more data than necessary to demonstrate the vulnerability or deleting or modifying other people's data, +- Do not reveal the problem to others until it has been resolved, +- Do not use attacks on physical security, social engineering, distributed denial of service, spam or applications of third parties, +- Do provide sufficient information to reproduce the problem, so we will be able to resolve it as quickly as possible. Usually, the IP address or the URL of the affected system and a description of the vulnerability will be sufficient, but complex vulnerabilities may require further explanation. ## What we promise: -* We will respond to your report within 3 business days with our evaluation of the report and an expected resolution date, -* If you have followed the instructions above, we will not take any legal action against you in regard to the report, -* We will handle your report with strict confidentiality, and not pass on your personal details to third parties without your permission, -* We will keep you informed of the progress towards resolving the problem, -* In the public information concerning the problem reported, we will give your name as the discoverer of the problem (unless you desire otherwise), and -* We strive to resolve all problems as quickly as possible, and we would like to play an active role in the ultimate publication on the problem after it is resolved. +- We will respond to your report within 3 business days with our evaluation of the report and an expected resolution date, +- If you have followed the instructions above, we will not take any legal action against you in regard to the report, +- We will handle your report with strict confidentiality, and not pass on your personal details to third parties without your permission, +- We will keep you informed of the progress towards resolving the problem, +- In the public information concerning the problem reported, we will give your name as the discoverer of the problem (unless you desire otherwise), and +- We strive to resolve all problems as quickly as possible, and we would like to play an active role in the ultimate publication on the problem after it is resolved. diff --git a/app.json b/app.json index 3f91f1b1a3d46e..2ad52b916c011d 100644 --- a/app.json +++ b/app.json @@ -10,18 +10,73 @@ } ], "env": { - "BASE_URL": { + "PGSSLMODE": { + "description": "If you use Heroku to deploy Postgres (or use self-signed certs for Postgres) then put 'no-verify' here.", + "value": "no-verify" + }, + "NEXT_PUBLIC_WEBAPP_URL": { "description": "Replace HEROKU_APP_NAME with the name given to your app", - "value": "https://HEROKU_APP_NAME.herokuapp.com" + "value": "https://HEROKU_APP_NAME.herokuapp.com", + "required": "true" }, "CALENDSO_ENCRYPTION_KEY": { "description": "Application Key for symmetric encryption and decryption. Must be 32 bytes for AES256 encryption algorithm.", - "value": "secret" + "value": "secret", + "required": "true" }, - "NEXTAUTH_SECRET": "secret", "NEXTAUTH_URL": { "description": "Replace HEROKU_APP_NAME with the name given to your app", "value": "https://HEROKU_APP_NAME.herokuapp.com" + }, + "NEXTAUTH_SECRET": { + "description": "Cookie encryption key", + "generator": "secret", + "required": "true" + }, + "NEXT_PUBLIC_LICENSE_CONSENT": { + "description": "License consent", + "value": "true", + "required": "true" + }, + "CRON_API_KEY": { + "description": "ApiKey for cronjobs", + "value": "" + }, + "SEND_FEEDBACK_EMAIL": { + "description": "Send feedback email", + "value": "" + }, + "SENDGRID_API_KEY": { + "description": "Sendgrid api key. Used for email reminders in workflows", + "value": "" + }, + "SENDGRID_EMAIL": { + "description": "Sendgrid email. Used for email reminders in workflows", + "value": "" + }, + "EMAIL_FROM": { + "description": "Configures the global From: header whilst sending emails", + "value": "" + }, + "EMAIL_SERVER_HOST": { + "description": "Configures the global SMTP server host", + "value": "smtp.gmail.com" + }, + "EMAIL_SERVER_PORT": { + "description": "Configures the global SMTP server port", + "value": "465" + }, + "EMAIL_SERVER_USER": { + "description": "Configures the global SMTP server user", + "value": "" + }, + "EMAIL_SERVER_PASSWORD": { + "description": "Configures the global SMTP server password", + "value": "" + }, + "NEXT_PUBLIC_TEAM_IMPERSONATION": { + "description": "Set the following value to true if you wish to enable Team Impersonation", + "value": "false" } }, "scripts": { diff --git a/apps/api b/apps/api index 74c227f5f12b49..7560fdbfc576f7 160000 --- a/apps/api +++ b/apps/api @@ -1 +1 @@ -Subproject commit 74c227f5f12b497cf5f8c200213fd6236b3019d7 +Subproject commit 7560fdbfc576f7a72ac840f9bef2b9fb92cbe3a3 diff --git a/apps/console b/apps/console index 74bd9e2831975b..544ded3da4649b 160000 --- a/apps/console +++ b/apps/console @@ -1 +1 @@ -Subproject commit 74bd9e2831975b025093152658cbdf77fc7a33ef +Subproject commit 544ded3da4649b01ea90b21cddf9830ce62adcb8 diff --git a/apps/docs/package.json b/apps/docs/package.json index b565c43eb1e8ab..1d92c74ee2c4e6 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -4,19 +4,20 @@ "description": "", "main": "index.js", "scripts": { + "build": "next build", "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next", "dev": "PORT=4000 next", - "lint": "next lint", - "type-check": "tsc --pretty --noEmit", + "lint": "eslint . --ignore-path .gitignore", + "lint:fix": "eslint . --ext .ts,.js,.tsx,.jsx --fix", "lint:report": "eslint . --format json --output-file ../../lint-results/docs.json", "start": "PORT=4000 next start", - "build": "next build" + "type-check": "tsc --pretty --noEmit" }, "author": "Cal.com, Inc.", "license": "MIT", "dependencies": { "iframe-resizer-react": "^1.1.0", - "next": "^12.1.6", + "next": "^12.2.0", "nextra": "^1.1.0", "nextra-theme-docs": "^1.2.2", "react": "^18.1.0", diff --git a/apps/docs/pages/developer/code-styling.mdx b/apps/docs/pages/developer/code-styling.mdx index cddf746fe063ae..b18a4cf26b0bea 100644 --- a/apps/docs/pages/developer/code-styling.mdx +++ b/apps/docs/pages/developer/code-styling.mdx @@ -10,10 +10,10 @@ We use a number of style guides written by other amazing companies, simply becau We don't expect you to study every single rule of each style guide, but these are great reference points as to how your code should be styled. We may reject a pull request if your code style significantly differs from these style guides however. ## ESLint & Prettier -Calendso uses the ESLint and Prettier formatting tools, and the repository comes with defined rules for each tool. We recommend setting up both tools and using these to help automatically style your code to our guidelines. +Cal.com uses the ESLint and Prettier formatting tools, and the repository comes with defined rules for each tool. We recommend setting up both tools and using these to help automatically style your code to our guidelines. ## JavaScript/TypeScript -We use the [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript) for all JavaScript and Typescript code. +We use the [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript) for all JavaScript and TypeScript code. ## HTML & CSS We use the [Google HTML/CSS Style Guide](https://google.github.io/styleguide/htmlcssguide.html) for any HTML and CSS markup. However, exceptions to the HTML guide apply where JSX differentiates from standard HTML. diff --git a/apps/docs/pages/integrations/google.mdx b/apps/docs/pages/integrations/google.mdx index 97890f340d0ba4..06de91189ad57c 100644 --- a/apps/docs/pages/integrations/google.mdx +++ b/apps/docs/pages/integrations/google.mdx @@ -25,7 +25,7 @@ To remove a product from your account that isn't listed in your Google Account, 6. In the third page (Test Users), add the Google account(s) you'll using. Make sure the details are correct on the last page of the wizard and your consent screen will be configured. 7. Now select [Credentials](https://console.cloud.google.com/apis/credentials) from the side pane and then select Create Credentials. Select the OAuth Client ID option. 8. Select Web Application as the Application Type. -9. Under Authorized redirect URI's, select Add URI and then add the URI `/api/integrations/googlecalendar/callback` replacing CALENDSO URL with the URI at which your application runs. +9. Under Authorized redirect URI's, select Add URI and then add the two URIs `/api/integrations/googlecalendar/callback` and `/api/auth/callback/google` replacing CALENDSO URL with the URI at which your application runs. 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. diff --git a/apps/docs/pages/self-hosting/install.mdx b/apps/docs/pages/self-hosting/install.mdx index a37a5eebc62a4d..93e5cac0bfc731 100644 --- a/apps/docs/pages/self-hosting/install.mdx +++ b/apps/docs/pages/self-hosting/install.mdx @@ -34,7 +34,6 @@ Here is what you need to be able to run Cal. ```sh cp apps/web/.env.example apps/web/.env - cp packages/prisma/.env.example packages/prisma/.env ``` 1. Install packages with yarn @@ -54,7 +53,7 @@ yarn dx ### Manual setup -1. Configure database in the `packages/prisma/.env` file. Replace ``, ``, ``, `` with their applicable values +1. Configure database in the `.env` file. Replace ``, ``, ``, `` with their applicable values ```text DATABASE_URL='postgresql://:@:' diff --git a/apps/storybook/.gitignore b/apps/storybook/.gitignore new file mode 100755 index 00000000000000..0bcd6d7e0a7021 --- /dev/null +++ b/apps/storybook/.gitignore @@ -0,0 +1,37 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo + +storybook-static/ diff --git a/apps/storybook/.storybook/main.js b/apps/storybook/.storybook/main.js new file mode 100644 index 00000000000000..31885a65ff834c --- /dev/null +++ b/apps/storybook/.storybook/main.js @@ -0,0 +1,57 @@ +const path = require("path"); + +module.exports = { + stories: ["../stories/**/*.stories.mdx", "../stories/**/*.stories.@(js|jsx|ts|tsx)"], + addons: [ + "@storybook/addon-links", + "@storybook/addon-essentials", + "@storybook/addon-interactions", + "storybook-addon-designs", + "@storybook/addon-a11y", + "storybook-addon-next", + ], + framework: "@storybook/react", + core: { + builder: "webpack5", + }, + webpackFinal: async (config) => { + /** + * Fixes font import with / + * @see https://github.com/storybookjs/storybook/issues/12844#issuecomment-867544160 + */ + config.resolve.roots = [path.resolve(__dirname, "../public"), "node_modules"]; + + /** + * Why webpack5... Just why? + * @type {{console: boolean, process: boolean, timers: boolean, os: boolean, querystring: boolean, sys: boolean, fs: boolean, url: boolean, crypto: boolean, path: boolean, zlib: boolean, punycode: boolean, util: boolean, stream: boolean, assert: boolean, string_decoder: boolean, domain: boolean, vm: boolean, tty: boolean, http: boolean, buffer: boolean, constants: boolean, https: boolean, events: boolean}} + */ + config.resolve.fallback = { + fs: false, + assert: false, + buffer: false, + console: false, + constants: false, + crypto: false, + domain: false, + events: false, + http: false, + https: false, + os: false, + path: false, + punycode: false, + process: false, + querystring: false, + stream: false, + string_decoder: false, + sys: false, + timers: false, + tty: false, + url: false, + util: false, + vm: false, + zlib: false, + }; + + return config; + }, +}; diff --git a/apps/storybook/.storybook/preview-head.html b/apps/storybook/.storybook/preview-head.html new file mode 100644 index 00000000000000..d14ce9f633a118 --- /dev/null +++ b/apps/storybook/.storybook/preview-head.html @@ -0,0 +1,8 @@ + + diff --git a/apps/storybook/.storybook/preview.js b/apps/storybook/.storybook/preview.js new file mode 100644 index 00000000000000..8a440987b9bebf --- /dev/null +++ b/apps/storybook/.storybook/preview.js @@ -0,0 +1,24 @@ +import { RouterContext } from "next/dist/shared/lib/router-context"; +import * as NextImage from "next/image"; + +import "../styles/globals.css"; + +const OriginalNextImage = NextImage.default; + +Object.defineProperty(NextImage, "default", { + configurable: true, + value: (props) => , +}); + +export const parameters = { + actions: { argTypesRegex: "^on[A-Z].*" }, + controls: { + matchers: { + color: /(background|color)$/i, + date: /Date$/, + }, + }, + nextRouter: { + Provider: RouterContext.Provider, + }, +}; diff --git a/apps/storybook/README.md b/apps/storybook/README.md new file mode 100644 index 00000000000000..97ce36c5aad192 --- /dev/null +++ b/apps/storybook/README.md @@ -0,0 +1,21 @@ +# Storybook & UI + +Storybook is home to all of our commonly used components. We use this app to visually show all components that we have within the project + automatic type documentation generated for each component. + +All changes to storybook/ui must require a visual/code review. + +- Visual reviews happen on a tool called [Chormatic](http://chromatic.com/) and these reviews will happen by our product team. + +- Code reviews happen as normal on any changes to storybook/ui designs + +## Deployment + +To deploy this project run + +```bash + cd apps/storybook +``` + +```bash + yarn dev +``` diff --git a/apps/storybook/next-env.d.ts b/apps/storybook/next-env.d.ts new file mode 100755 index 00000000000000..4f11a03dc6cc37 --- /dev/null +++ b/apps/storybook/next-env.d.ts @@ -0,0 +1,5 @@ +/// +/// + +// NOTE: This file should not be edited +// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/apps/storybook/next.config.js b/apps/storybook/next.config.js new file mode 100755 index 00000000000000..c79b3b37722f25 --- /dev/null +++ b/apps/storybook/next.config.js @@ -0,0 +1,7 @@ +const withTM = require("next-transpile-modules")(["@calcom/dayjs", "@calcom/ui"]); +/** @type {import('next').NextConfig} */ +const nextConfig = { + reactStrictMode: true, +}; + +module.exports = withTM(nextConfig); diff --git a/apps/storybook/package.json b/apps/storybook/package.json new file mode 100644 index 00000000000000..e95ad2231e02c8 --- /dev/null +++ b/apps/storybook/package.json @@ -0,0 +1,63 @@ +{ + "name": "@calcom/storybook", + "version": "0.1.0", + "private": true, + "scripts": { + "dev:next": "next dev", + "build:next": "next build", + "start": "next start", + "lint": "eslint . --ignore-path .gitignore", + "lint:report": "eslint . --format json --output-file ../../lint-results/storybook.json", + "dev": "start-storybook -p 6006", + "build": "build-storybook", + "chromatic": "npx chromatic --project-token=56fadc9ab496" + }, + "dependencies": { + "@calcom/dayjs": "*", + "@calcom/ui": "*", + "@radix-ui/react-avatar": "^0.1.4", + "@radix-ui/react-collapsible": "^0.1.0", + "@radix-ui/react-dialog": "^0.1.0", + "@radix-ui/react-dropdown-menu": "^0.1.1", + "@radix-ui/react-id": "^0.1.0", + "@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", + "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" + }, + "devDependencies": { + "@babel/core": "^7.18.6", + "@calcom/config": "*", + "@storybook/addon-a11y": "^6.5.9", + "@storybook/addon-actions": "^6.5.9", + "@storybook/addon-essentials": "^6.5.9", + "@storybook/addon-interactions": "^6.5.9", + "@storybook/addon-links": "^6.5.9", + "@storybook/addon-postcss": "^2.0.0", + "@storybook/builder-webpack5": "^6.5.9", + "@storybook/manager-webpack5": "^6.5.9", + "@storybook/react": "^6.5.9", + "@types/node": "16.9.1", + "@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", + "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", + "tsconfig-paths-webpack-plugin": "^3.5.2", + "typescript": "^4.6.4" + }, + "readme": "ERROR: No README data found!", + "_id": "@calcom/storybook@0.1.0" +} diff --git a/apps/storybook/pages/_app.tsx b/apps/storybook/pages/_app.tsx new file mode 100755 index 00000000000000..e9a8374578f058 --- /dev/null +++ b/apps/storybook/pages/_app.tsx @@ -0,0 +1,9 @@ +import type { AppProps } from "next/app"; + +import "../styles/globals.css"; + +function MyApp({ Component, pageProps }: AppProps) { + return ; +} + +export default MyApp; diff --git a/apps/storybook/pages/index.tsx b/apps/storybook/pages/index.tsx new file mode 100755 index 00000000000000..785828e44a4bf4 --- /dev/null +++ b/apps/storybook/pages/index.tsx @@ -0,0 +1,63 @@ +import type { NextPage } from "next"; +import Head from "next/head"; +import Image from "next/image"; + +const Home: NextPage = () => { + return ( + + ); +}; + +export default Home; diff --git a/apps/storybook/postcss.config.js b/apps/storybook/postcss.config.js new file mode 100644 index 00000000000000..12a703d900da81 --- /dev/null +++ b/apps/storybook/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/apps/storybook/public/favicon.ico b/apps/storybook/public/favicon.ico new file mode 100755 index 0000000000000000000000000000000000000000..718d6fea4835ec2d246af9800eddb7ffb276240c GIT binary patch literal 25931 zcmeHv30#a{`}aL_*G&7qml|y<+KVaDM2m#dVr!KsA!#An?kSQM(q<_dDNCpjEux83 zLb9Z^XxbDl(w>%i@8hT6>)&Gu{h#Oeyszu?xtw#Zb1mO{pgX9699l+Qppw7jXaYf~-84xW z)w4x8?=youko|}Vr~(D$UXIbiXABHh`p1?nn8Po~fxRJv}|0e(BPs|G`(TT%kKVJAdg5*Z|x0leQq0 zkdUBvb#>9F()jo|T~kx@OM8$9wzs~t2l;K=woNssA3l6|sx2r3+kdfVW@e^8e*E}v zA1y5{bRi+3Z`uD3{F7LgFJDdvm;nJilkzDku>BwXH(8ItVCXk*-lSJnR?-2UN%hJ){&rlvg`CDTj z)Bzo!3v7Ou#83zEDEFcKt(f1E0~=rqeEbTnMvWR#{+9pg%7G8y>u1OVRUSoox-ovF z2Ydma(;=YuBY(eI|04{hXzZD6_f(v~H;C~y5=DhAC{MMS>2fm~1H_t2$56pc$NH8( z5bH|<)71dV-_oCHIrzrT`2s-5w_+2CM0$95I6X8p^r!gHp+j_gd;9O<1~CEQQGS8) zS9Qh3#p&JM-G8rHekNmKVewU;pJRcTAog68KYo^dRo}(M>36U4Us zfgYWSiHZL3;lpWT=zNAW>Dh#mB!_@Lg%$ms8N-;aPqMn+C2HqZgz&9~Eu z4|Kp<`$q)Uw1R?y(~S>ePdonHxpV1#eSP1B;Ogo+-Pk}6#0GsZZ5!||ev2MGdh}_m z{DeR7?0-1^zVs&`AV6Vt;r3`I`OI_wgs*w=eO%_#7Kepl{B@xiyCANc(l zzIyd4y|c6PXWq9-|KM8(zIk8LPk(>a)zyFWjhT!$HJ$qX1vo@d25W<fvZQ2zUz5WRc(UnFMKHwe1| zWmlB1qdbiA(C0jmnV<}GfbKtmcu^2*P^O?MBLZKt|As~ge8&AAO~2K@zbXelK|4T<{|y4`raF{=72kC2Kn(L4YyenWgrPiv z@^mr$t{#X5VuIMeL!7Ab6_kG$&#&5p*Z{+?5U|TZ`B!7llpVmp@skYz&n^8QfPJzL z0G6K_OJM9x+Wu2gfN45phANGt{7=C>i34CV{Xqlx(fWpeAoj^N0Biu`w+MVcCUyU* zDZuzO0>4Z6fbu^T_arWW5n!E45vX8N=bxTVeFoep_G#VmNlQzAI_KTIc{6>c+04vr zx@W}zE5JNSU>!THJ{J=cqjz+4{L4A{Ob9$ZJ*S1?Ggg3klFp!+Y1@K+pK1DqI|_gq z5ZDXVpge8-cs!o|;K73#YXZ3AShj50wBvuq3NTOZ`M&qtjj#GOFfgExjg8Gn8>Vq5 z`85n+9|!iLCZF5$HJ$Iu($dm?8~-ofu}tEc+-pyke=3!im#6pk_Wo8IA|fJwD&~~F zc16osQ)EBo58U7XDuMexaPRjU@h8tXe%S{fA0NH3vGJFhuyyO!Uyl2^&EOpX{9As0 zWj+P>{@}jxH)8|r;2HdupP!vie{sJ28b&bo!8`D^x}TE$%zXNb^X1p@0PJ86`dZyj z%ce7*{^oo+6%&~I!8hQy-vQ7E)0t0ybH4l%KltWOo~8cO`T=157JqL(oq_rC%ea&4 z2NcTJe-HgFjNg-gZ$6!Y`SMHrlj}Etf7?r!zQTPPSv}{so2e>Fjs1{gzk~LGeesX%r(Lh6rbhSo_n)@@G-FTQy93;l#E)hgP@d_SGvyCp0~o(Y;Ee8{ zdVUDbHm5`2taPUOY^MAGOw*>=s7=Gst=D+p+2yON!0%Hk` zz5mAhyT4lS*T3LS^WSxUy86q&GnoHxzQ6vm8)VS}_zuqG?+3td68_x;etQAdu@sc6 zQJ&5|4(I?~3d-QOAODHpZ=hlSg(lBZ!JZWCtHHSj`0Wh93-Uk)_S%zsJ~aD>{`A0~ z9{AG(e|q3g5B%wYKRxiL2Y$8(4w6bzchKuloQW#e&S3n+P- z8!ds-%f;TJ1>)v)##>gd{PdS2Oc3VaR`fr=`O8QIO(6(N!A?pr5C#6fc~Ge@N%Vvu zaoAX2&(a6eWy_q&UwOhU)|P3J0Qc%OdhzW=F4D|pt0E4osw;%<%Dn58hAWD^XnZD= z>9~H(3bmLtxpF?a7su6J7M*x1By7YSUbxGi)Ot0P77`}P3{)&5Un{KD?`-e?r21!4vTTnN(4Y6Lin?UkSM z`MXCTC1@4A4~mvz%Rh2&EwY))LeoT=*`tMoqcEXI>TZU9WTP#l?uFv+@Dn~b(>xh2 z;>B?;Tz2SR&KVb>vGiBSB`@U7VIWFSo=LDSb9F{GF^DbmWAfpms8Sx9OX4CnBJca3 zlj9(x!dIjN?OG1X4l*imJNvRCk}F%!?SOfiOq5y^mZW)jFL@a|r-@d#f7 z2gmU8L3IZq0ynIws=}~m^#@&C%J6QFo~Mo4V`>v7MI-_!EBMMtb%_M&kvAaN)@ZVw z+`toz&WG#HkWDjnZE!6nk{e-oFdL^$YnbOCN}JC&{$#$O27@|Tn-skXr)2ml2~O!5 zX+gYoxhoc7qoU?C^3~&!U?kRFtnSEecWuH0B0OvLodgUAi}8p1 zrO6RSXHH}DMc$&|?D004DiOVMHV8kXCP@7NKB zgaZq^^O<7PoKEp72kby@W0Z!Y*Ay{&vfg#C&gG@YVR9g?FEocMUi1gSN$+V+ayF45{a zuDZDTN}mS|;BO%gEf}pjBfN2-gIrU#G5~cucA;dokXW89%>AyXJJI z9X4UlIWA|ZYHgbI z5?oFk@A=Ik7lrEQPDH!H+b`7_Y~aDb_qa=B2^Y&Ow41cU=4WDd40dp5(QS-WMN-=Y z9g;6_-JdNU;|6cPwf$ak*aJIcwL@1n$#l~zi{c{EW?T;DaW*E8DYq?Umtz{nJ&w-M zEMyTDrC&9K$d|kZe2#ws6)L=7K+{ zQw{XnV6UC$6-rW0emqm8wJoeZK)wJIcV?dST}Z;G0Arq{dVDu0&4kd%N!3F1*;*pW zR&qUiFzK=@44#QGw7k1`3t_d8&*kBV->O##t|tonFc2YWrL7_eqg+=+k;!F-`^b8> z#KWCE8%u4k@EprxqiV$VmmtiWxDLgnGu$Vs<8rppV5EajBXL4nyyZM$SWVm!wnCj-B!Wjqj5-5dNXukI2$$|Bu3Lrw}z65Lc=1G z^-#WuQOj$hwNGG?*CM_TO8Bg-1+qc>J7k5c51U8g?ZU5n?HYor;~JIjoWH-G>AoUP ztrWWLbRNqIjW#RT*WqZgPJXU7C)VaW5}MiijYbABmzoru6EmQ*N8cVK7a3|aOB#O& zBl8JY2WKfmj;h#Q!pN%9o@VNLv{OUL?rixHwOZuvX7{IJ{(EdPpuVFoQqIOa7giLVkBOKL@^smUA!tZ1CKRK}#SSM)iQHk)*R~?M!qkCruaS!#oIL1c z?J;U~&FfH#*98^G?i}pA{ z9Jg36t4=%6mhY(quYq*vSxptes9qy|7xSlH?G=S@>u>Ebe;|LVhs~@+06N<4CViBk zUiY$thvX;>Tby6z9Y1edAMQaiH zm^r3v#$Q#2T=X>bsY#D%s!bhs^M9PMAcHbCc0FMHV{u-dwlL;a1eJ63v5U*?Q_8JO zT#50!RD619#j_Uf))0ooADz~*9&lN!bBDRUgE>Vud-i5ck%vT=r^yD*^?Mp@Q^v+V zG#-?gKlr}Eeqifb{|So?HM&g91P8|av8hQoCmQXkd?7wIJwb z_^v8bbg`SAn{I*4bH$u(RZ6*xUhuA~hc=8czK8SHEKTzSxgbwi~9(OqJB&gwb^l4+m`k*Q;_?>Y-APi1{k zAHQ)P)G)f|AyjSgcCFps)Fh6Bca*Xznq36!pV6Az&m{O8$wGFD? zY&O*3*J0;_EqM#jh6^gMQKpXV?#1?>$ml1xvh8nSN>-?H=V;nJIwB07YX$e6vLxH( zqYwQ>qxwR(i4f)DLd)-$P>T-no_c!LsN@)8`e;W@)-Hj0>nJ-}Kla4-ZdPJzI&Mce zv)V_j;(3ERN3_@I$N<^|4Lf`B;8n+bX@bHbcZTopEmDI*Jfl)-pFDvo6svPRoo@(x z);_{lY<;);XzT`dBFpRmGrr}z5u1=pC^S-{ce6iXQlLGcItwJ^mZx{m$&DA_oEZ)B{_bYPq-HA zcH8WGoBG(aBU_j)vEy+_71T34@4dmSg!|M8Vf92Zj6WH7Q7t#OHQqWgFE3ARt+%!T z?oLovLVlnf?2c7pTc)~cc^($_8nyKwsN`RA-23ed3sdj(ys%pjjM+9JrctL;dy8a( z@en&CQmnV(()bu|Y%G1-4a(6x{aLytn$T-;(&{QIJB9vMox11U-1HpD@d(QkaJdEb zG{)+6Dos_L+O3NpWo^=gR?evp|CqEG?L&Ut#D*KLaRFOgOEK(Kq1@!EGcTfo+%A&I z=dLbB+d$u{sh?u)xP{PF8L%;YPPW53+@{>5W=Jt#wQpN;0_HYdw1{ksf_XhO4#2F= zyPx6Lx2<92L-;L5PD`zn6zwIH`Jk($?Qw({erA$^bC;q33hv!d!>%wRhj# zal^hk+WGNg;rJtb-EB(?czvOM=H7dl=vblBwAv>}%1@{}mnpUznfq1cE^sgsL0*4I zJ##!*B?=vI_OEVis5o+_IwMIRrpQyT_Sq~ZU%oY7c5JMIADzpD!Upz9h@iWg_>>~j zOLS;wp^i$-E?4<_cp?RiS%Rd?i;f*mOz=~(&3lo<=@(nR!_Rqiprh@weZlL!t#NCc zO!QTcInq|%#>OVgobj{~ixEUec`E25zJ~*DofsQdzIa@5^nOXj2T;8O`l--(QyU^$t?TGY^7#&FQ+2SS3B#qK*k3`ye?8jUYSajE5iBbJls75CCc(m3dk{t?- zopcER9{Z?TC)mk~gpi^kbbu>b-+a{m#8-y2^p$ka4n60w;Sc2}HMf<8JUvhCL0B&Btk)T`ctE$*qNW8L$`7!r^9T+>=<=2qaq-;ll2{`{Rg zc5a0ZUI$oG&j-qVOuKa=*v4aY#IsoM+1|c4Z)<}lEDvy;5huB@1RJPquU2U*U-;gu z=En2m+qjBzR#DEJDO`WU)hdd{Vj%^0V*KoyZ|5lzV87&g_j~NCjwv0uQVqXOb*QrQ zy|Qn`hxx(58c70$E;L(X0uZZ72M1!6oeg)(cdKO ze0gDaTz+ohR-#d)NbAH4x{I(21yjwvBQfmpLu$)|m{XolbgF!pmsqJ#D}(ylp6uC> z{bqtcI#hT#HW=wl7>p!38sKsJ`r8}lt-q%Keqy%u(xk=yiIJiUw6|5IvkS+#?JTBl z8H5(Q?l#wzazujH!8o>1xtn8#_w+397*_cy8!pQGP%K(Ga3pAjsaTbbXJlQF_+m+-UpUUent@xM zg%jqLUExj~o^vQ3Gl*>wh=_gOr2*|U64_iXb+-111aH}$TjeajM+I20xw(((>fej-@CIz4S1pi$(#}P7`4({6QS2CaQS4NPENDp>sAqD z$bH4KGzXGffkJ7R>V>)>tC)uax{UsN*dbeNC*v}#8Y#OWYwL4t$ePR?VTyIs!wea+ z5Urmc)X|^`MG~*dS6pGSbU+gPJoq*^a=_>$n4|P^w$sMBBy@f*Z^Jg6?n5?oId6f{ z$LW4M|4m502z0t7g<#Bx%X;9<=)smFolV&(V^(7Cv2-sxbxopQ!)*#ZRhTBpx1)Fc zNm1T%bONzv6@#|dz(w02AH8OXe>kQ#1FMCzO}2J_mST)+ExmBr9cva-@?;wnmWMOk z{3_~EX_xadgJGv&H@zK_8{(x84`}+c?oSBX*Ge3VdfTt&F}yCpFP?CpW+BE^cWY0^ zb&uBN!Ja3UzYHK-CTyA5=L zEMW{l3Usky#ly=7px648W31UNV@K)&Ub&zP1c7%)`{);I4b0Q<)B}3;NMG2JH=X$U zfIW4)4n9ZM`-yRj67I)YSLDK)qfUJ_ij}a#aZN~9EXrh8eZY2&=uY%2N0UFF7<~%M zsB8=erOWZ>Ct_#^tHZ|*q`H;A)5;ycw*IcmVxi8_0Xk}aJA^ath+E;xg!x+As(M#0=)3!NJR6H&9+zd#iP(m0PIW8$ z1Y^VX`>jm`W!=WpF*{ioM?C9`yOR>@0q=u7o>BP-eSHqCgMDj!2anwH?s%i2p+Q7D zzszIf5XJpE)IG4;d_(La-xenmF(tgAxK`Y4sQ}BSJEPs6N_U2vI{8=0C_F?@7<(G; zo$~G=8p+076G;`}>{MQ>t>7cm=zGtfbdDXm6||jUU|?X?CaE?(<6bKDYKeHlz}DA8 zXT={X=yp_R;HfJ9h%?eWvQ!dRgz&Su*JfNt!Wu>|XfU&68iRikRrHRW|ZxzRR^`eIGt zIeiDgVS>IeExKVRWW8-=A=yA`}`)ZkWBrZD`hpWIxBGkh&f#ijr449~m`j6{4jiJ*C!oVA8ZC?$1RM#K(_b zL9TW)kN*Y4%^-qPpMP7d4)o?Nk#>aoYHT(*g)qmRUb?**F@pnNiy6Fv9rEiUqD(^O zzyS?nBrX63BTRYduaG(0VVG2yJRe%o&rVrLjbxTaAFTd8s;<<@Qs>u(<193R8>}2_ zuwp{7;H2a*X7_jryzriZXMg?bTuegABb^87@SsKkr2)0Gyiax8KQWstw^v#ix45EVrcEhr>!NMhprl$InQMzjSFH54x5k9qHc`@9uKQzvL4ihcq{^B zPrVR=o_ic%Y>6&rMN)hTZsI7I<3&`#(nl+3y3ys9A~&^=4?PL&nd8)`OfG#n zwAMN$1&>K++c{^|7<4P=2y(B{jJsQ0a#U;HTo4ZmWZYvI{+s;Td{Yzem%0*k#)vjpB zia;J&>}ICate44SFYY3vEelqStQWFihx%^vQ@Do(sOy7yR2@WNv7Y9I^yL=nZr3mb zXKV5t@=?-Sk|b{XMhA7ZGB@2hqsx}4xwCW!in#C zI@}scZlr3-NFJ@NFaJlhyfcw{k^vvtGl`N9xSo**rDW4S}i zM9{fMPWo%4wYDG~BZ18BD+}h|GQKc-g^{++3MY>}W_uq7jGHx{mwE9fZiPCoxN$+7 zrODGGJrOkcPQUB(FD5aoS4g~7#6NR^ma7-!>mHuJfY5kTe6PpNNKC9GGRiu^L31uG z$7v`*JknQHsYB!Tm_W{a32TM099djW%5e+j0Ve_ct}IM>XLF1Ap+YvcrLV=|CKo6S zb+9Nl3_YdKP6%Cxy@6TxZ>;4&nTneadr z_ES90ydCev)LV!dN=#(*f}|ZORFdvkYBni^aLbUk>BajeWIOcmHP#8S)*2U~QKI%S zyrLmtPqb&TphJ;>yAxri#;{uyk`JJqODDw%(Z=2`1uc}br^V%>j!gS)D*q*f_-qf8&D;W1dJgQMlaH5er zN2U<%Smb7==vE}dDI8K7cKz!vs^73o9f>2sgiTzWcwY|BMYHH5%Vn7#kiw&eItCqa zIkR2~Q}>X=Ar8W|^Ms41Fm8o6IB2_j60eOeBB1Br!boW7JnoeX6Gs)?7rW0^5psc- zjS16yb>dFn>KPOF;imD}e!enuIniFzv}n$m2#gCCv4jM#ArwlzZ$7@9&XkFxZ4n!V zj3dyiwW4Ki2QG{@i>yuZXQizw_OkZI^-3otXC{!(lUpJF33gI60ak;Uqitp74|B6I zgg{b=Iz}WkhCGj1M=hu4#Aw173YxIVbISaoc z-nLZC*6Tgivd5V`K%GxhBsp@SUU60-rfc$=wb>zdJzXS&-5(NRRodFk;Kxk!S(O(a0e7oY=E( zAyS;Ow?6Q&XA+cnkCb{28_1N8H#?J!*$MmIwLq^*T_9-z^&UE@A(z9oGYtFy6EZef LrJugUA?W`A8`#=m literal 0 HcmV?d00001 diff --git a/apps/storybook/public/vercel.svg b/apps/storybook/public/vercel.svg new file mode 100755 index 00000000000000..fbf0e25a651c28 --- /dev/null +++ b/apps/storybook/public/vercel.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/apps/storybook/stories/Avatar.stories.tsx b/apps/storybook/stories/Avatar.stories.tsx new file mode 100644 index 00000000000000..252f5bd6404063 --- /dev/null +++ b/apps/storybook/stories/Avatar.stories.tsx @@ -0,0 +1,26 @@ +import { ComponentMeta } from "@storybook/react"; + +import Avatar from "@calcom/ui/v2/Avatar"; + +export default { + title: "Avatar", + component: Avatar, +} as ComponentMeta; + +export const Default = () => { + return ( + <> + + + + ); +}; + +export const Accepted = () => { + return ( + <> + + + + ); +}; diff --git a/apps/storybook/stories/AvatarGroup.stories.tsx b/apps/storybook/stories/AvatarGroup.stories.tsx new file mode 100644 index 00000000000000..1c322867d987f8 --- /dev/null +++ b/apps/storybook/stories/AvatarGroup.stories.tsx @@ -0,0 +1,60 @@ +import { ComponentMeta } from "@storybook/react"; + +import Avatar from "@calcom/ui/v2/Avatar"; +import AvatarGroup from "@calcom/ui/v2/AvatarGroup"; + +export default { + title: "Avatar/Group", + component: AvatarGroup, +} as ComponentMeta; + +const IMAGES = [ + { + image: "https://cal.com/stakeholder/peer.jpg", + alt: "Peer", + title: "Peer Richelsen", + }, + { + image: "https://cal.com/stakeholder/bailey.jpg", + alt: "Bailey", + title: "Bailey Pumfleet", + }, + { + image: "https://cal.com/stakeholder/alex-van-andel.jpg", + alt: "Alex", + title: "Alex Van Andel", + }, + { + image: "https://cal.com/stakeholder/ciaran.jpg", + alt: "Ciarán", + title: "Ciarán Hanrahan", + }, + { + image: "https://cal.com/stakeholder/peer.jpg", + alt: "Peer", + title: "Peer Richelsen", + }, + { + image: "https://cal.com/stakeholder/bailey.jpg", + alt: "Bailey", + title: "Bailey Pumfleet", + }, + { + image: "https://cal.com/stakeholder/alex-van-andel.jpg", + alt: "Alex", + title: "Alex Van Andel", + }, + { + image: "https://cal.com/stakeholder/ciaran.jpg", + alt: "Ciarán", + title: "Ciarán Hanrahan", + }, +]; + +export const Default = () => { + return ( + <> + + + ); +}; diff --git a/apps/storybook/stories/Badge.stories.tsx b/apps/storybook/stories/Badge.stories.tsx new file mode 100644 index 00000000000000..e4e6103c86b005 --- /dev/null +++ b/apps/storybook/stories/Badge.stories.tsx @@ -0,0 +1,58 @@ +import { ComponentMeta } from "@storybook/react"; +import { Bell } from "react-feather"; + +import { Badge } from "@calcom/ui/v2"; + +export default { + title: "Badge", + component: Badge, +} as ComponentMeta; + +export const All = () => ( +
+

Default

+
+ Badge + Badge + Badge + Badge + Badge +
+

Icons

+
+ + Badge + + + Badge + + + Badge + + + Badge + + + Badge + +
+

Large

+
+ + Badge + + + Badge + + + Badge + + + Badge + + + Badge + +
+
+); diff --git a/apps/storybook/stories/Banner.stories.tsx b/apps/storybook/stories/Banner.stories.tsx new file mode 100644 index 00000000000000..7c36991343b07a --- /dev/null +++ b/apps/storybook/stories/Banner.stories.tsx @@ -0,0 +1,46 @@ +import { ComponentStory, ComponentMeta } from "@storybook/react"; +import { Info } from "react-feather"; + +import { Banner } from "@calcom/ui/v2"; + +export default { + title: "Banner", + component: Banner, +} as ComponentMeta; + +export const Default = () => { + return ( + console.log("dismissed")} + /> + ); +}; + +export const Warning = () => { + return ( + console.log("dismissed")} + /> + ); +}; + +export const Error = () => { + return ( + console.log("dismissed")} + /> + ); +}; diff --git a/apps/storybook/stories/Breadcrumb.stories.tsx b/apps/storybook/stories/Breadcrumb.stories.tsx new file mode 100644 index 00000000000000..201e00b1014939 --- /dev/null +++ b/apps/storybook/stories/Breadcrumb.stories.tsx @@ -0,0 +1,22 @@ +import { ComponentMeta } from "@storybook/react"; + +import { Breadcrumb, BreadcrumbItem } from "@calcom/ui/v2"; + +export default { + title: "Breadcrumbs", + component: Breadcrumb, +} as ComponentMeta; + +export const Default = () => ( + + Home + Test + +); + +Default.parameters = { + nextRouter: { + path: "/test", + asPath: "/test", + }, +}; diff --git a/apps/storybook/stories/Button.stories.tsx b/apps/storybook/stories/Button.stories.tsx new file mode 100644 index 00000000000000..673866b581dba1 --- /dev/null +++ b/apps/storybook/stories/Button.stories.tsx @@ -0,0 +1,95 @@ +import { ComponentMeta, ComponentStory } from "@storybook/react"; +import { Trash2 } from "react-feather"; + +import { Button as ButtonComponent } from "@calcom/ui/v2"; + +export default { + title: "Button", + component: ButtonComponent, + argTypes: { + color: { + options: ["primary", "secondary", "minimal", "destructive"], + control: { type: "select" }, + }, + disabled: { + options: [true, false], + control: { type: "boolean" }, + }, + loading: { + options: [true, false], + control: { type: "boolean" }, + }, + size: { + options: ["base", "lg", "icon"], + control: { type: "radio" }, + }, + }, +} as ComponentMeta; + +const Template: ComponentStory = (args) => ; + +export const All = () => ( +
+

Primary

+
+ Button Text + + Button Text + +
+

Secondary

+
+ + Button Text + + + Button Text + + +
+

Minimal

+
+ + Button Text + + + Button Text + + +
+

Destructive

+ +

Tooltip

+ +
+); + +export const Button = Template.bind({}); +Button.args = { + color: "primary", + children: "Button Text", +}; + +export const Disabled = Template.bind({}); +Disabled.args = { + ...Button.args, + disabled: true, +}; + +export const Loading = Template.bind({}); +Loading.args = { + ...Button.args, + loading: true, +}; +export const Icon = Template.bind({}); +Icon.args = { + color: "secondary", + StartIcon: Trash2, + size: "icon", +}; diff --git a/apps/storybook/stories/ButtonGroup.stories.tsx b/apps/storybook/stories/ButtonGroup.stories.tsx new file mode 100644 index 00000000000000..96c223183768df --- /dev/null +++ b/apps/storybook/stories/ButtonGroup.stories.tsx @@ -0,0 +1,31 @@ +import { ComponentMeta } from "@storybook/react"; +import { ArrowLeft, ArrowRight, Clipboard, Navigation2, Trash2 } from "react-feather"; + +import { Button, ButtonGroup } from "@calcom/ui/v2"; + +export default { + title: "Button Group", + component: ButtonGroup, +} as ComponentMeta; + +export const Default = () => ( + + + + + + + ); +}; diff --git a/apps/storybook/stories/HorizontalTab.stories.tsx b/apps/storybook/stories/HorizontalTab.stories.tsx new file mode 100644 index 00000000000000..784a2c7b67167b --- /dev/null +++ b/apps/storybook/stories/HorizontalTab.stories.tsx @@ -0,0 +1,30 @@ +// Disabling until we figure out what is happening with the RouterMock. +import { ComponentMeta } from "@storybook/react"; + +import { HorizontalTabs } from "@calcom/ui/v2/navigation/tabs"; +import { HorizontalTabItemProps } from "@calcom/ui/v2/navigation/tabs/HorizontalTabItem"; + +export default { + title: "Horizontal Tabs", + component: HorizontalTabs, +} as ComponentMeta; + +const HorizontalTabsPropsDefault: HorizontalTabItemProps[] = [ + { + name: "Tab One", + href: "/tab-one", + }, +]; + +export const Default = () => ( +
+ +
+); + +Default.parameters = { + nextRouter: { + path: "/[page]", + asPath: "/profile", + }, +}; diff --git a/apps/storybook/stories/Input.stories.tsx b/apps/storybook/stories/Input.stories.tsx new file mode 100644 index 00000000000000..42c2f1781688ff --- /dev/null +++ b/apps/storybook/stories/Input.stories.tsx @@ -0,0 +1,68 @@ +import { ComponentMeta, ComponentStory } from "@storybook/react"; +import { Copy } from "react-feather"; + +import DatePicker from "@calcom/ui/v2/form/DatePicker"; +import { TextAreaField, TextField } from "@calcom/ui/v2/form/fields"; + +export default { + title: "Inputs", + component: TextField, + argTypes: { + disabled: { + options: [false, true], + }, + }, +} as ComponentMeta; + +const TextInputTemplate: ComponentStory = (args) => ; +// name="demo" label="Demo Label" hint="Hint text" +export const TextInput = TextInputTemplate.bind({}); +TextInput.args = { + name: "demo", + label: "Demo Label", + hint: "Hint Text", + disabled: false, +}; + +export const TextInputPrefix = TextInputTemplate.bind({}); +TextInputPrefix.args = { + name: "demo", + label: "Demo Label", + hint: "Hint Text", + addOnLeading: "https://", + disabled: false, +}; + +export const TextInputSuffix = TextInputTemplate.bind({}); +TextInputSuffix.args = { + name: "demo", + label: "Demo Label", + hint: "Hint Text", + addOnSuffix: "Minutes", + disabled: false, +}; + +export const TextInputPrefixIcon = TextInputTemplate.bind({}); +TextInputPrefixIcon.args = { + name: "demo", + label: "Demo Label", + hint: "Hint Text", + addOnFilled: false, + addOnSuffix: , + disabled: false, +}; +export const TextInputSuffixIcon = TextInputTemplate.bind({}); +TextInputSuffixIcon.args = { + name: "demo", + label: "Demo Label", + hint: "Hint Text", + addOnFilled: false, + addOnLeading: , + disabled: false, +}; + +export const TextAreaInput: ComponentStory = () => ( + +); + +export const DatePickerInput: ComponentStory = () => ; diff --git a/apps/storybook/stories/Modal.stories.tsx b/apps/storybook/stories/Modal.stories.tsx new file mode 100644 index 00000000000000..82b2cdb0261bc2 --- /dev/null +++ b/apps/storybook/stories/Modal.stories.tsx @@ -0,0 +1,52 @@ +import { useState } from "react"; +import { Info } from "react-feather"; + +import { Button } from "@calcom/ui/v2"; +import { Dialog, DialogContent, DialogTrigger } from "@calcom/ui/v2/Dialog"; +import { TextField } from "@calcom/ui/v2/form/fields"; + +export default { + title: "pattern/Modal", + component: Dialog, +}; + +export const Creation = () => { + const [open, setOpen] = useState(false); + return ( + + + + + setOpen(false)}> + + + + + + + ); +}; + +export const Confirmation = () => { + const [open, setOpen] = useState(false); + return ( + + + + + setOpen(false)} + /> + + ); +}; diff --git a/apps/storybook/stories/Notifcations.stories.tsx b/apps/storybook/stories/Notifcations.stories.tsx new file mode 100644 index 00000000000000..3ce0693a4fd197 --- /dev/null +++ b/apps/storybook/stories/Notifcations.stories.tsx @@ -0,0 +1,25 @@ +import { ComponentMeta } from "@storybook/react"; +import { Toaster } from "react-hot-toast"; + +import { Button } from "@calcom/ui/v2"; +import showToast from "@calcom/ui/v2/notfications"; + +export default { + title: "Notifcations-Toasts", + decorators: [ + (Story) => ( + <> + + + + ), + ], +} as ComponentMeta; // We have to fake this type as the story for this component isn't really a component. + +export const All = () => ( +
+ + + +
+); diff --git a/apps/storybook/stories/PageHeader.stories.tsx b/apps/storybook/stories/PageHeader.stories.tsx new file mode 100644 index 00000000000000..6204e9e698b15c --- /dev/null +++ b/apps/storybook/stories/PageHeader.stories.tsx @@ -0,0 +1,52 @@ +import { ComponentMeta } from "@storybook/react"; +import { Search } from "react-feather"; + +import { Button, PageHeader } from "@calcom/ui/v2"; +import { TextField } from "@calcom/ui/v2/form"; + +export default { + title: "pattern/Page Header", + component: PageHeader, + decorators: [ + (Story) => ( +
+ +
+ ), + ], +} as ComponentMeta; + +export const Default = () => ( + +); + +export const ButtonRight = () => ( + Button Text} + /> +); +export const ComingSoon = () => ( + +); +export const SearchInstalledApps = () => ( + } + name="search" + labelSrOnly + placeholder="WIP" + /> + } + /> +); diff --git a/apps/storybook/stories/Radio.stories.tsx b/apps/storybook/stories/Radio.stories.tsx new file mode 100644 index 00000000000000..fcc328cef4f66d --- /dev/null +++ b/apps/storybook/stories/Radio.stories.tsx @@ -0,0 +1,19 @@ +import * as Radio from "@calcom/ui/v2/form/radio-area/Radio"; +import { RadioField } from "@calcom/ui/v2/form/radio-area/Radio"; + +export default { + title: "Radio", + component: RadioField, +}; + +export const RadioGroupDemo = () => { + return ( +
+ + + + + +
+ ); +}; diff --git a/apps/storybook/stories/Select.stories.tsx b/apps/storybook/stories/Select.stories.tsx new file mode 100644 index 00000000000000..1668b48c6ab822 --- /dev/null +++ b/apps/storybook/stories/Select.stories.tsx @@ -0,0 +1,10 @@ +import { ComponentMeta } from "@storybook/react"; + +import { Select } from "@calcom/ui/v2"; + +export default { + title: "Form/Select", + component: Select, +} as ComponentMeta; + +export const Single = () => diff --git a/apps/web/components/App.tsx b/apps/web/components/App.tsx index 9abb8aab858c66..961397c62b82d7 100644 --- a/apps/web/components/App.tsx +++ b/apps/web/components/App.tsx @@ -1,26 +1,19 @@ -import { - BookOpenIcon, - CheckIcon, - DocumentTextIcon, - ExternalLinkIcon, - FlagIcon, - MailIcon, - PlusIcon, - ShieldCheckIcon, -} from "@heroicons/react/outline"; -import { ChevronLeftIcon } from "@heroicons/react/solid"; import Link from "next/link"; import React, { useEffect, useState } from "react"; +import useAddAppMutation from "@calcom/app-store/_utils/useAddAppMutation"; import { InstallAppButton } from "@calcom/app-store/components"; +import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; import { useLocale } from "@calcom/lib/hooks/useLocale"; +import showToast from "@calcom/lib/notification"; +import { trpc } from "@calcom/trpc/react"; import { App as AppType } from "@calcom/types/App"; import { Button, SkeletonButton } from "@calcom/ui"; +import Badge from "@calcom/ui/Badge"; +import { Icon } from "@calcom/ui/Icon"; +import Shell from "@calcom/ui/Shell"; -import Shell from "@components/Shell"; -import Badge from "@components/ui/Badge"; - -export default function App({ +const Component = ({ name, type, logo, @@ -36,25 +29,19 @@ export default function App({ email, tos, privacy, -}: { - name: string; - type: AppType["type"]; - isGlobal?: AppType["isGlobal"]; - logo: string; - body: React.ReactNode; - categories: string[]; - author: string; - pro?: boolean; - price?: number; - commission?: number; - feeType?: AppType["feeType"]; - docs?: string; - website?: string; - email: string; // required - tos?: string; - privacy?: string; -}) { + isProOnly, +}: Parameters[0]) => { const { t } = useLocale(); + const { data: user } = trpc.useQuery(["viewer.me"]); + + const mutation = useAddAppMutation(null, { + onSuccess: () => { + showToast("App successfully installed", "success"); + }, + onError: (error) => { + if (error instanceof Error) showToast(error.message || "App could not be installed", "error"); + }, + }); const priceInDollar = Intl.NumberFormat("en-US", { style: "currency", @@ -90,176 +77,238 @@ export default function App({ getInstalledApp(type); }, [type]); const allowedMultipleInstalls = categories.indexOf("calendar") > -1; + return ( - <> - -
-
- - - {t("browse_apps")} - - -
-
- {name} -
-

{name}

-

- {categories[0]} • {t("published_by", { author })} -

-
+
+
+ + + {t("browse_apps")} + + +
+
+ {name} +
+
+

{name}

+ {isProOnly && user?.plan === "FREE" ? ( + + PRO + + ) : null}
+

+ {categories[0]} • {t("published_by", { author })} +

+
+
-
- {!isLoading ? ( - isGlobal || (installedAppCount > 0 && allowedMultipleInstalls) ? ( -
- - ( - - )} - /> -
- ) : ( +
+ {!isLoading ? ( + isGlobal || (installedAppCount > 0 && allowedMultipleInstalls) ? ( +
+ + {!isGlobal && ( ( - - )} + isProOnly={isProOnly} + render={({ useDefaultComponent, ...props }) => { + if (useDefaultComponent) { + props = { + onClick: () => { + mutation.mutate({ type }); + }, + loading: mutation.isLoading, + }; + } + return ( + + ); + }} /> - ) - ) : ( - - )} - {price !== 0 && ( - - {feeType === "usage-based" - ? commission + "% + " + priceInDollar + "/booking" - : priceInDollar} - {feeType === "monthly" && "/" + t("month")} - - )} -
-
- {/* reintroduce once we show permissions and features - */} + )} +
+ ) : installedAppCount > 0 ? ( + + ) : ( + { + if (useDefaultComponent) { + props = { + onClick: () => { + mutation.mutate({ type }); + }, + loading: mutation.isLoading, + }; + } + return ( + + ); + }} + /> + ) + ) : ( + + )} + {price !== 0 && ( + + {feeType === "usage-based" ? commission + "% + " + priceInDollar + "/booking" : priceInDollar} + {feeType === "monthly" && "/" + t("month")} + + )}
+
+
-
-
{body}
-
-

{t("categories")}

-
- {categories.map((category) => ( - - - {category} - - - ))} -
-

{t("pricing")}

- - {price === 0 ? ( - "Free" - ) : ( - <> - {Intl.NumberFormat("en-US", { - style: "currency", - currency: "USD", - useGrouping: false, - }).format(price)} - {feeType === "monthly" && "/" + t("month")} - - )} - -

{t("learn_more")}

- -
- - Every app published on the Cal.com App Store is open source and thoroughly tested via peer - reviews. Nevertheless, Cal.com, Inc. does not endorse or certify these apps unless they are - published by Cal.com. If you encounter inappropriate content or behaviour please report it. - - - Report App - -
+
+
{body}
+
+

{t("categories")}

+
+ {categories.map((category) => ( + + + {category} + + + ))}
+

{t("pricing")}

+ + {price === 0 ? ( + "Free" + ) : ( + <> + {Intl.NumberFormat("en-US", { + style: "currency", + currency: "USD", + useGrouping: false, + }).format(price)} + {feeType === "monthly" && "/" + t("month")} + + )} + +

{t("learn_more")}

+ +
+ + Every app published on the Cal.com App Store is open source and thoroughly tested via peer + reviews. Nevertheless, Cal.com, Inc. does not endorse or certify these apps unless they are + published by Cal.com. If you encounter inappropriate content or behaviour please report it. + + + Report App +
- - +
+
+ ); +}; + +export default function App(props: { + name: string; + type: AppType["type"]; + isGlobal?: AppType["isGlobal"]; + logo: string; + body: React.ReactNode; + categories: string[]; + author: string; + pro?: boolean; + price?: number; + commission?: number; + feeType?: AppType["feeType"]; + docs?: string; + website?: string; + email: string; // required + tos?: string; + privacy?: string; + licenseRequired: AppType["licenseRequired"]; + isProOnly: AppType["isProOnly"]; +}) { + return ( + + {props.licenseRequired ? ( + + + + ) : ( + + )} + ); } diff --git a/apps/web/components/AppsShell.tsx b/apps/web/components/AppsShell.tsx index 23755ab80ddf16..1c6230eaf394e1 100644 --- a/apps/web/components/AppsShell.tsx +++ b/apps/web/components/AppsShell.tsx @@ -19,9 +19,7 @@ export default function AppsShell({ children }: { children: React.ReactNode }) { return ( <> -
- {status === "authenticated" && } -
+
{status === "authenticated" && }
{children}
); diff --git a/apps/web/components/BookingsShell.tsx b/apps/web/components/BookingsShell.tsx index bbf5894dbbf121..5382c98aacc3ce 100644 --- a/apps/web/components/BookingsShell.tsx +++ b/apps/web/components/BookingsShell.tsx @@ -24,7 +24,7 @@ const tabs = [ export default function BookingsShell({ children }: { children: React.ReactNode }) { return ( <> - +
{children}
); diff --git a/apps/web/components/DestinationCalendarSelector.tsx b/apps/web/components/DestinationCalendarSelector.tsx index 746d352a630d3c..8f3cb539acd263 100644 --- a/apps/web/components/DestinationCalendarSelector.tsx +++ b/apps/web/components/DestinationCalendarSelector.tsx @@ -3,8 +3,7 @@ import React, { useEffect, useState } from "react"; import Select from "react-select"; import { useLocale } from "@calcom/lib/hooks/useLocale"; - -import { trpc } from "@lib/trpc"; +import { trpc } from "@calcom/trpc/react"; interface Props { onChange: (value: { externalId: string; integration: string }) => void; @@ -61,15 +60,17 @@ const DestinationCalendarSelector = ({ query.data.connectedCalendars.map((selectedCalendar) => ({ key: selectedCalendar.credentialId, label: `${selectedCalendar.integration.title} (${selectedCalendar.primary?.name})`, - options: (selectedCalendar.calendars ?? []).map((cal) => ({ - label: cal.name || "", - value: `${cal.integration}:${cal.externalId}`, - })), + options: (selectedCalendar.calendars ?? []) + .filter((cal) => cal.readOnly === false) + .map((cal) => ({ + label: cal.name || "", + value: `${cal.integration}:${cal.externalId}`, + })), })) ?? []; return (
+ options={FloatingPopupPositionOptions} + />
+ }} + />
+ }} + />
-
+
setIsBookingCustomizationOpen((val) => !val)}>
Cal Booking Customization
- + options={ThemeOptions} + /> {[ { name: "brandColor", title: "Brand Color" }, @@ -1065,7 +1059,8 @@ const EmbedTypeCodeAndPreviewDialogContent = ({ embedType={embedType} calLink={calLink} previewState={previewState} - ref={refOfEmbedCodesRefs.current[tab.name]}> + ref={refOfEmbedCodesRefs.current[tab.name]} + /> ) : ( )}
-
+
{tab.type === "code" ? ( @@ -1107,39 +1102,46 @@ const EmbedTypeCodeAndPreviewDialogContent = ({ export const EmbedDialog = () => { const router = useRouter(); - const eventTypeId: EventType["id"] = +(router.query.eventTypeId as string); + const embedUrl: string = router.query.embedUrl as string; return ( - + { + if (!open) window.resetEmbedStatus(); + }}> {!router.query.embedType ? ( ) : ( )} ); }; +type EmbedButtonProps = { + embedUrl: string; + children?: React.ReactNode; + className: string; + as?: T; +}; -export const EmbedButton = ({ - eventTypeId, +export const EmbedButton = ({ + embedUrl, + children, className = "", - dark, + as, ...props -}: { - eventTypeId: EventType["id"]; - className: string; - dark?: boolean; -}) => { - const { t } = useLocale(); +}: EmbedButtonProps & React.ComponentPropsWithoutRef) => { const router = useRouter(); className = classNames(className, "hidden lg:flex"); const openEmbedModal = () => { const query = { ...router.query, dialog: "embed", - eventTypeId, + embedUrl, }; router.push( { @@ -1150,20 +1152,16 @@ export const EmbedButton = ({ { shallow: true } ); }; + const Component = as ?? Button; return ( - + {children} + ); }; diff --git a/apps/web/components/I18nLanguageHandler.tsx b/apps/web/components/I18nLanguageHandler.tsx index 591e7c712afff6..c4c7d2070ebd09 100644 --- a/apps/web/components/I18nLanguageHandler.tsx +++ b/apps/web/components/I18nLanguageHandler.tsx @@ -1,11 +1,16 @@ import { useTranslation } from "next-i18next"; import { useEffect } from "react"; -import { trpc } from "@lib/trpc"; +import { trpc } from "@calcom/trpc/react"; export function useViewerI18n() { return trpc.useQuery(["viewer.public.i18n"], { staleTime: Infinity, + /** + * i18n should never be clubbed with other queries, so that it's caching can be managed independently. + * We intend to not cache i18n query + **/ + context: { skipBatch: true }, }); } diff --git a/apps/web/components/ImageUploader.tsx b/apps/web/components/ImageUploader.tsx index c7ce6b8a370a99..c8ded6c1605ef5 100644 --- a/apps/web/components/ImageUploader.tsx +++ b/apps/web/components/ImageUploader.tsx @@ -142,7 +142,7 @@ export default function ImageUploader({
)} {result && } -