@meetelise/chat
Advanced tools
Comparing version 1.0.0-rc.11 to 1.0.0-rc.12
@@ -18,2 +18,22 @@ import fetchBuildingInfo from "./fetchBuildingInfo"; | ||
export default class MEChat { | ||
constructor({ organization, building, theme = {} }) { | ||
this.theme = theme; | ||
this.building = fetchBuildingInfo(organization, building); | ||
this.popup = Promise.all([ | ||
this.building, | ||
initialize(), | ||
]) | ||
.then(([building]) => { | ||
const resolvedTheme = this.theme = resolveTheme(building, theme); | ||
installTalkJSStyles(resolvedTheme); | ||
const p = createTalkJSPopup(building, resolvedTheme); | ||
return p.mount({ show: false }).then(() => p); | ||
}); | ||
this.launcher = this.popup.then(() => { | ||
const a = document.querySelector('a#__talkjs_launcher'); | ||
if (!a) | ||
throw new Error('MeetElise Chat: Could not locate launcher.'); | ||
return a; | ||
}); | ||
} | ||
/** | ||
@@ -78,27 +98,3 @@ * Start an instance of MeetElise chat and add to the web page. | ||
} | ||
popup; | ||
launcher; | ||
building; | ||
theme; | ||
constructor({ organization, building, theme = {} }) { | ||
this.theme = theme; | ||
this.building = fetchBuildingInfo(organization, building); | ||
this.popup = Promise.all([ | ||
this.building, | ||
initialize(), | ||
]) | ||
.then(([building]) => { | ||
const resolvedTheme = this.theme = resolveTheme(building, theme); | ||
installTalkJSStyles(resolvedTheme); | ||
const p = createTalkJSPopup(building, resolvedTheme); | ||
return p.mount({ show: false }).then(() => p); | ||
}); | ||
this.launcher = this.popup.then(() => { | ||
const a = document.querySelector('a#__talkjs_launcher'); | ||
if (!a) | ||
throw new Error('MeetElise Chat: Could not locate launcher.'); | ||
return a; | ||
}); | ||
} | ||
} | ||
//# sourceMappingURL=MEChat.js.map |
{ | ||
"name": "@meetelise/chat", | ||
"version": "1.0.0-rc.11", | ||
"version": "1.0.0-rc.12", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -7,3 +7,3 @@ { | ||
// "incremental": true, /* Enable incremental compilation */ | ||
"target": "esnext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ | ||
"target": "es2021", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ | ||
"module": "esnext", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ | ||
@@ -10,0 +10,0 @@ "lib": ["esnext", "dom"], /* Specify library files to be included in the compilation. */ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1
51265
877