chore: Update version in main for embeds that are already released. (#9822)
* Release latest embeds * Release latest embeds * Ensure that unpublished packages arent imported * linter is important to catch unexpected imports * Create new release * Add a new patchpull/10267/head^2
parent
1566a80e40
commit
2a8eca7885
|
@ -1,5 +1,39 @@
|
|||
# @calcom/web
|
||||
|
||||
## 3.1.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @calcom/embed-react@1.3.0
|
||||
|
||||
## 3.0.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @calcom/embed-snippet@1.1.2
|
||||
- @calcom/embed-react@1.2.2
|
||||
- @calcom/embed-core@1.3.2
|
||||
|
||||
## 3.0.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @calcom/embed-snippet@1.1.1
|
||||
- @calcom/embed-react@1.2.1
|
||||
- @calcom/embed-core@1.3.1
|
||||
|
||||
## 3.0.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @calcom/embed-core@1.3.0
|
||||
- @calcom/embed-react@1.2.0
|
||||
- @calcom/embed-snippet@1.1.0
|
||||
|
||||
## 2.9.4
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
module.exports = {
|
||||
extends: ["../../.eslintrc.js"],
|
||||
rules: {
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
{
|
||||
// Ensure that embed packages(They are published) can't access unpublished packages which is basically all @calcom/* packages except embed packages
|
||||
patterns: ["@calcom/*", "!@calcom/embed-*"],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
|
@ -1,5 +1,23 @@
|
|||
# @calcom/embed-core
|
||||
|
||||
## 1.3.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Improve UI instruction layout typings
|
||||
|
||||
## 1.3.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- layout type fix as zod-utils can't be used in npm package
|
||||
|
||||
## 1.3.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Supports new booker layout
|
||||
|
||||
## 1.2.1
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@calcom/embed-core",
|
||||
"version": "1.2.1",
|
||||
"version": "1.3.2",
|
||||
"description": "This is the vanilla JS core script that embeds Cal Link",
|
||||
"main": "./dist/embed/embed.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
|
@ -30,7 +30,7 @@
|
|||
"embed-tests-quick": "QUICK=true yarn embed-tests",
|
||||
"embed-tests-update-snapshots:ci": "yarn embed-tests-quick --update-snapshots",
|
||||
"withEmbedPublishEnv": "NEXT_PUBLIC_EMBED_LIB_URL='https://app.cal.com/embed/embed.js' NEXT_PUBLIC_WEBAPP_URL='https://app.cal.com' yarn",
|
||||
"prepack": "yarn withEmbedPublishEnv build",
|
||||
"prepack": "yarn ../../../ lint --filter='@calcom/embed-core' && yarn withEmbedPublishEnv build",
|
||||
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf ../../../apps/web/public/embed"
|
||||
},
|
||||
"files": [
|
||||
|
|
|
@ -2,13 +2,13 @@ import { useRouter } from "next/router";
|
|||
import type { CSSProperties } from "react";
|
||||
import { useState, useEffect } from "react";
|
||||
|
||||
import type { BookerStore } from "@calcom/features/bookings/Booker/store";
|
||||
import { BookerLayouts } from "@calcom/prisma/zod-utils";
|
||||
|
||||
import type { Message } from "./embed";
|
||||
import { sdkActionManager } from "./sdk-event";
|
||||
|
||||
type Theme = "dark" | "light";
|
||||
|
||||
export type BookerLayouts = "month_view" | "week_view" | "column_view";
|
||||
|
||||
export type EmbedThemeConfig = Theme | "auto";
|
||||
export type UiConfig = {
|
||||
hideEventTypeDetails?: boolean;
|
||||
|
@ -45,7 +45,6 @@ const embedStore = {
|
|||
* We maintain a list of all setUiConfig setters that are in use at the moment so that we can update all those components.
|
||||
*/
|
||||
setUiConfig: [] as ((arg0: UiConfig) => void)[],
|
||||
layout: BookerLayouts,
|
||||
};
|
||||
|
||||
declare global {
|
||||
|
@ -54,7 +53,6 @@ declare global {
|
|||
__logQueue?: unknown[];
|
||||
embedStore: typeof embedStore;
|
||||
applyCssVars: (cssVarsPerTheme: UiConfig["cssVarsPerTheme"]) => void;
|
||||
setLayout?: BookerStore["setLayout"];
|
||||
};
|
||||
CalComPageStatus: string;
|
||||
isEmbed?: () => boolean;
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
/// <reference types="../env" />
|
||||
import type { BookerLayouts } from "@calcom/prisma/zod-utils";
|
||||
|
||||
import { FloatingButton } from "./FloatingButton/FloatingButton";
|
||||
import { Inline } from "./Inline/inline";
|
||||
import { ModalBox } from "./ModalBox/ModalBox";
|
||||
import type { InterfaceWithParent, interfaceWithParent, UiConfig, EmbedThemeConfig } from "./embed-iframe";
|
||||
import type {
|
||||
InterfaceWithParent,
|
||||
interfaceWithParent,
|
||||
UiConfig,
|
||||
EmbedThemeConfig,
|
||||
BookerLayouts,
|
||||
} from "./embed-iframe";
|
||||
import css from "./embed.css";
|
||||
import type { EventData, EventDataMap } from "./sdk-action-manager";
|
||||
import { SdkActionManager } from "./sdk-action-manager";
|
||||
|
@ -164,9 +168,11 @@ export type PrefillAndIframeAttrsConfig = Record<string, string | string[] | Rec
|
|||
// TODO: It should have a dedicated prefill prop
|
||||
// prefill: {},
|
||||
|
||||
// TODO: Move layout and theme as nested props of ui as it makes it clear that these two can be configured using `ui` instruction as well any time.
|
||||
// ui: {layout; theme}
|
||||
layout?: BookerLayouts;
|
||||
// TODO: Rename layout and theme as ui.layout and ui.theme as it makes it clear that these two can be configured using `ui` instruction as well any time.
|
||||
"ui.color-scheme"?: string;
|
||||
layout?: `${BookerLayouts}`;
|
||||
theme?: EmbedThemeConfig;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,41 @@
|
|||
# @calcom/embed-react
|
||||
|
||||
## 1.3.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Fix module import of the embed-react package
|
||||
|
||||
## 1.2.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Improve UI instruction layout typings
|
||||
- Updated dependencies
|
||||
- @calcom/embed-snippet@1.1.2
|
||||
- @calcom/embed-core@1.3.2
|
||||
|
||||
## 1.2.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- layout type fix as zod-utils can't be used in npm package
|
||||
- Updated dependencies
|
||||
- @calcom/embed-snippet@1.1.1
|
||||
- @calcom/embed-core@1.3.1
|
||||
|
||||
## 1.2.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Supports new booker layout
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @calcom/embed-core@1.3.0
|
||||
- @calcom/embed-snippet@1.1.0
|
||||
|
||||
## 1.1.1
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@calcom/embed-react",
|
||||
"sideEffects": false,
|
||||
"version": "1.1.1",
|
||||
"version": "1.3.0",
|
||||
"description": "Embed Cal Link as a React Component",
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"repository": {
|
||||
|
@ -11,7 +11,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"dev": "vite --port=3101 --open",
|
||||
"build": "rm -rf dist && vite build && tsc --emitDeclarationOnly --declarationDir dist",
|
||||
"build": "rm -rf dist && vite build && cp ./dist/Cal.es.js ./dist/Cal.es.mjs && tsc --emitDeclarationOnly --declarationDir dist",
|
||||
"preview": "vite preview",
|
||||
"type-check": "tsc --pretty --noEmit",
|
||||
"type-check:ci": "tsc-absolute --pretty --noEmit",
|
||||
|
@ -21,13 +21,13 @@
|
|||
"embed-tests-update-snapshots:ci": "yarn embed-tests-quick --update-snapshots",
|
||||
"packaged:tests": "cd test/packaged && yarn tsc --noEmit && yarn run -T test -- --packaged-embed-tests-only",
|
||||
"withEmbedPublishEnv": "NEXT_PUBLIC_EMBED_LIB_URL='https://app.cal.com/embed/embed.js' NEXT_PUBLIC_WEBAPP_URL='https://app.cal.com' yarn",
|
||||
"prepack": "yarn withEmbedPublishEnv build && yarn packaged:tests",
|
||||
"prepack": "yarn ../../../ lint --filter='@calcom/embed-react' && yarn withEmbedPublishEnv build && yarn packaged:tests",
|
||||
"embed-web-start": "yarn workspace @calcom/web start",
|
||||
"embed-dev": "yarn workspace @calcom/embed-react dev",
|
||||
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
|
||||
},
|
||||
"main": "./dist/Cal.umd.js",
|
||||
"module": "./dist/Cal.es.js",
|
||||
"module": "./dist/Cal.es.mjs",
|
||||
"types": "./dist/embed-react/src/index.d.ts",
|
||||
"peerDependencies": {
|
||||
"react": "^18.2.0",
|
||||
|
@ -38,7 +38,7 @@
|
|||
],
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/Cal.es.js",
|
||||
"import": "./dist/Cal.es.mjs",
|
||||
"require": "./dist/Cal.umd.js"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -11,6 +11,14 @@ import { getCalApi } from "@calcom/embed-react";
|
|||
|
||||
const api = getCalApi();
|
||||
|
||||
test("Check that the API is available", () => {
|
||||
test("Check that the API is available", async () => {
|
||||
expect(api).toBeDefined()
|
||||
const awaitedApi = await api;
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
awaitedApi('floatingButton', {
|
||||
config: {
|
||||
// @ts-expect-error We are intentionaly testing invalid value
|
||||
layout: 'wrongview'
|
||||
}
|
||||
})
|
||||
});
|
||||
|
|
|
@ -1,5 +1,32 @@
|
|||
# @calcom/embed-snippet
|
||||
|
||||
## 1.1.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Improve UI instruction layout typings
|
||||
- Updated dependencies
|
||||
- @calcom/embed-core@1.3.2
|
||||
|
||||
## 1.1.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- layout type fix as zod-utils can't be used in npm package
|
||||
- Updated dependencies
|
||||
- @calcom/embed-core@1.3.1
|
||||
|
||||
## 1.1.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Supports new booker layout
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @calcom/embed-core@1.3.0
|
||||
|
||||
## 1.0.9
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@calcom/embed-snippet",
|
||||
"sideEffects": false,
|
||||
"version": "1.0.9",
|
||||
"version": "1.1.2",
|
||||
"main": "./dist/snippet.umd.js",
|
||||
"module": "./dist/snippet.es.js",
|
||||
"description": "Vanilla JS embed snippet that is responsible to fetch @calcom/embed-core and thus show Cal Link as an embed on a page.",
|
||||
|
@ -17,7 +17,7 @@
|
|||
"type-check:ci": "tsc-absolute --pretty --noEmit",
|
||||
"lint": "eslint --ext .ts,.js src",
|
||||
"withEmbedPublishEnv": "NEXT_PUBLIC_EMBED_LIB_URL='https://app.cal.com/embed/embed.js' NEXT_PUBLIC_WEBAPP_URL='https://app.cal.com' yarn",
|
||||
"prepack": "yarn withEmbedPublishEnv build",
|
||||
"prepack": "yarn ../../../ lint --filter='@calcom/embed-snippet' && yarn withEmbedPublishEnv build",
|
||||
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
|
||||
},
|
||||
"files": [
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
/* eslint-disable @typescript-eslint/ban-ts-comment,prefer-rest-params,prefer-const */
|
||||
import type { GlobalCal, GlobalCalWithoutNs } from "@calcom/embed-core";
|
||||
// FIXME: embed-snippet is a published package and shouldn't import from @calcom/types which is unpublished
|
||||
// This isn't a problem at the moment because embed-snippet isn't directly imported and embed-react which uses it doesn't depend on this
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
import type { Optional } from "@calcom/types/utils";
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import type { BookerLayouts } from "@calcom/prisma/zod-utils";
|
||||
import { bookerLayoutOptions } from "@calcom/prisma/zod-utils";
|
||||
|
||||
export const validateLayout = (layout?: BookerLayouts | null) => {
|
||||
export const validateLayout = (layout?: "week_view" | "month_view" | "column_view" | null) => {
|
||||
return bookerLayoutOptions.find((validLayout) => validLayout === layout);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue