Add calOrigin
parent
79c1aa60a2
commit
bfe32dccc8
|
@ -236,7 +236,7 @@ export class Cal {
|
||||||
}: {
|
}: {
|
||||||
calLink: string;
|
calLink: string;
|
||||||
queryObject?: PrefillAndIframeAttrsConfig & { guest?: string | string[] };
|
queryObject?: PrefillAndIframeAttrsConfig & { guest?: string | string[] };
|
||||||
calOrigin?: string;
|
calOrigin: string | null;
|
||||||
}) {
|
}) {
|
||||||
const iframe = (this.iframe = document.createElement("iframe"));
|
const iframe = (this.iframe = document.createElement("iframe"));
|
||||||
iframe.className = "cal-embed";
|
iframe.className = "cal-embed";
|
||||||
|
@ -473,10 +473,12 @@ class CalApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
config.embedType = "inline";
|
config.embedType = "inline";
|
||||||
|
const calConfig = this.cal.getConfig();
|
||||||
|
|
||||||
const iframe = this.cal.createIframe({
|
const iframe = this.cal.createIframe({
|
||||||
calLink,
|
calLink,
|
||||||
queryObject: withColorScheme(Cal.getQueryObject(config), containerEl),
|
queryObject: withColorScheme(Cal.getQueryObject(config), containerEl),
|
||||||
|
calOrigin: calConfig.calOrigin,
|
||||||
});
|
});
|
||||||
|
|
||||||
iframe.style.height = "100%";
|
iframe.style.height = "100%";
|
||||||
|
@ -555,6 +557,7 @@ class CalApi {
|
||||||
modal({
|
modal({
|
||||||
calLink,
|
calLink,
|
||||||
config = {},
|
config = {},
|
||||||
|
calOrigin,
|
||||||
__prerender = false,
|
__prerender = false,
|
||||||
}: {
|
}: {
|
||||||
calLink: string;
|
calLink: string;
|
||||||
|
@ -607,6 +610,7 @@ class CalApi {
|
||||||
iframe = this.cal.createIframe({
|
iframe = this.cal.createIframe({
|
||||||
calLink,
|
calLink,
|
||||||
queryObject,
|
queryObject,
|
||||||
|
calOrigin: calOrigin || null,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue