@calcom/embed-snippet
Advanced tools
Comparing version 1.2.0 to 1.3.0
# @calcom/embed-snippet | ||
## 1.3.0 | ||
### Minor Changes | ||
- Added namespacing support throughout | ||
### Patch Changes | ||
- Updated dependencies | ||
- @calcom/embed-core@1.5.0 | ||
## 1.2.0 | ||
@@ -4,0 +15,0 @@ |
import type { GlobalCalWithoutNs } from "@calcom/embed-core"; | ||
/** | ||
* When modifying this snippet, make sure to keep the snippets in following places in sync | ||
* 1. EmbedTabs.tsx | ||
* 2. embed-core/index.html | ||
* 3. app-store/wordpress/plugin.php | ||
*/ | ||
export default function EmbedSnippet(url?: any): GlobalCalWithoutNs & { | ||
@@ -3,0 +9,0 @@ ns: Record<string, GlobalCalWithoutNs>; |
const l = "https://app.cal.com/embed/embed.js"; | ||
function r(d = l) { | ||
(function(a, p, s) { | ||
let i = function(t, n) { | ||
t.q.push(n); | ||
}, o = a.document; | ||
a.Cal = a.Cal || function() { | ||
let t = a.Cal, n = arguments; | ||
if (t.loaded || (t.ns = {}, t.q = t.q || [], o.head.appendChild(o.createElement("script")).src = p, t.loaded = !0), n[0] === s) { | ||
const e = function() { | ||
i(e, arguments); | ||
}, c = n[1]; | ||
e.q = e.q || [], typeof c == "string" ? ( | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
(t.ns[c] = e) && i(e, n) | ||
) : i(t, n); | ||
function r(o = l) { | ||
(function(i, p, d) { | ||
let t = function(e, n) { | ||
e.q.push(n); | ||
}, c = i.document; | ||
i.Cal = i.Cal || function() { | ||
let e = i.Cal, n = arguments; | ||
if (e.loaded || (e.ns = {}, e.q = e.q || [], c.head.appendChild(c.createElement("script")).src = p, e.loaded = !0), n[0] === d) { | ||
const s = function() { | ||
t(s, arguments); | ||
}, a = n[1]; | ||
s.q = s.q || [], typeof a == "string" ? (e.ns[a] = e.ns[a] || s, t(e.ns[a], n), t(e, ["initNamespace", a])) : t(e, n); | ||
return; | ||
} | ||
i(t, n); | ||
t(e, n); | ||
}; | ||
@@ -24,3 +21,3 @@ })( | ||
//! Replace it with "https://cal.com/embed.js" or the URL where you have embed.js installed | ||
d, | ||
o, | ||
"init" | ||
@@ -27,0 +24,0 @@ ); |
@@ -1,1 +0,1 @@ | ||
(function(t,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(t=typeof globalThis<"u"?globalThis:t||self,i(t.snippet={}))})(this,function(t){"use strict";const i="https://app.cal.com/embed/embed.js";function s(c=i){(function(d,f,r){let p=function(e,n){e.q.push(n)},u=d.document;d.Cal=d.Cal||function(){let e=d.Cal,n=arguments;if(e.loaded||(e.ns={},e.q=e.q||[],u.head.appendChild(u.createElement("script")).src=f,e.loaded=!0),n[0]===r){const o=function(){p(o,arguments)},l=n[1];o.q=o.q||[],typeof l=="string"?(e.ns[l]=o)&&p(o,n):p(e,n);return}p(e,n)}})(window,c,"init");/*! Copying ends here. */return window.Cal}const a=s.toString();t.EmbedSnippetString=a,t.default=s,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); | ||
(function(n,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(n=typeof globalThis<"u"?globalThis:n||self,i(n.snippet={}))})(this,function(n){"use strict";const i="https://app.cal.com/embed/embed.js";function u(c=i){(function(s,f,r){let o=function(e,t){e.q.push(t)},a=s.document;s.Cal=s.Cal||function(){let e=s.Cal,t=arguments;if(e.loaded||(e.ns={},e.q=e.q||[],a.head.appendChild(a.createElement("script")).src=f,e.loaded=!0),t[0]===r){const p=function(){o(p,arguments)},d=t[1];p.q=p.q||[],typeof d=="string"?(e.ns[d]=e.ns[d]||p,o(e.ns[d],t),o(e,["initNamespace",d])):o(e,t);return}o(e,t)}})(window,c,"init");/*! Copying ends here. */return window.Cal}const l=u.toString();n.EmbedSnippetString=l,n.default=u,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); |
{ | ||
"name": "@calcom/embed-snippet", | ||
"sideEffects": false, | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"main": "./dist/snippet.umd.js", | ||
@@ -32,4 +32,4 @@ "module": "./dist/snippet.es.js", | ||
"dependencies": { | ||
"@calcom/embed-core": "1.4.0" | ||
"@calcom/embed-core": "1.5.0" | ||
} | ||
} |
@@ -7,5 +7,5 @@ # embed-snippet | ||
`yarn build` will generate dist/snippet.es.js | ||
`yarn build` will generate dist/snippet.es.js. If you are going to test react embeds, make sure that you have built it so that they get the upto-date snippet | ||
- which can be used as `<script type="module" src=...` | ||
- You can also copy the appropriate portion of the code and install it directly as `<script>CODE_SUGGESTED_TO_BE_COPIED</script>` |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8018
46
+ Added@calcom/embed-core@1.5.0(transitive)
- Removed@calcom/embed-core@1.4.0(transitive)
Updated@calcom/embed-core@1.5.0