@corvesta/chat-widget 20.0.0 → 20.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -208,8 +208,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
208
208
|
|
|
209
209
|
class AuviousCobrowseComponent {
|
|
210
210
|
constructor() {
|
|
211
|
-
// The
|
|
212
|
-
this.
|
|
211
|
+
// The tooltip text displayed when hovering over the widget button.
|
|
212
|
+
this.tooltipText = '';
|
|
213
213
|
// Configuration for the application ID, which determines which application the widget will accept connections from.
|
|
214
214
|
this._applicationId = '';
|
|
215
215
|
// Configuration for shifting the widget to the right when Talkdesk Chat is enabled.
|
|
@@ -260,7 +260,61 @@ class AuviousCobrowseComponent {
|
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
adjustFloatingMargin() {
|
|
263
|
-
|
|
263
|
+
if (this._isTalkdeskChatEnabled) {
|
|
264
|
+
document.documentElement.style.setProperty('--av-floating-margin-right', '80px');
|
|
265
|
+
this.observeTalkdeskWidget();
|
|
266
|
+
}
|
|
267
|
+
else {
|
|
268
|
+
this.resizeObserver?.disconnect();
|
|
269
|
+
this.mutationObserver?.disconnect();
|
|
270
|
+
if (this.updateTimeout) {
|
|
271
|
+
clearTimeout(this.updateTimeout);
|
|
272
|
+
}
|
|
273
|
+
document.documentElement.style.setProperty('--av-floating-margin-right', '20px');
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Method to observe Talkdesk Chat widget and adjust the floating margin accordingly.
|
|
278
|
+
* @private
|
|
279
|
+
*/
|
|
280
|
+
observeTalkdeskWidget() {
|
|
281
|
+
const element = document.getElementById('talkdesk-chat-widget');
|
|
282
|
+
if (element) {
|
|
283
|
+
this.setupTalkdeskObservers(element);
|
|
284
|
+
}
|
|
285
|
+
else {
|
|
286
|
+
const observer = new MutationObserver(() => {
|
|
287
|
+
const el = document.getElementById('talkdesk-chat-widget');
|
|
288
|
+
if (el) {
|
|
289
|
+
observer.disconnect();
|
|
290
|
+
this.setupTalkdeskObservers(el);
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
observer.observe(document.body, { childList: true, subtree: true });
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
setupTalkdeskObservers(element) {
|
|
297
|
+
const updateMargin = () => {
|
|
298
|
+
if (this.updateTimeout) {
|
|
299
|
+
clearTimeout(this.updateTimeout);
|
|
300
|
+
}
|
|
301
|
+
this.updateTimeout = globalThis.setTimeout(() => {
|
|
302
|
+
const width = element.offsetWidth;
|
|
303
|
+
const isVisible = globalThis.getComputedStyle(element).visibility !== 'hidden';
|
|
304
|
+
const margin = isVisible ? width + 40 : 80;
|
|
305
|
+
document.documentElement.style.setProperty('--av-floating-margin-right', `${margin}px`);
|
|
306
|
+
}, 50);
|
|
307
|
+
};
|
|
308
|
+
this.resizeObserver?.disconnect();
|
|
309
|
+
this.resizeObserver = new ResizeObserver(updateMargin);
|
|
310
|
+
this.resizeObserver.observe(element);
|
|
311
|
+
this.mutationObserver?.disconnect();
|
|
312
|
+
this.mutationObserver = new MutationObserver(updateMargin);
|
|
313
|
+
this.mutationObserver.observe(element, {
|
|
314
|
+
attributes: true,
|
|
315
|
+
attributeFilter: ['aria-hidden'],
|
|
316
|
+
});
|
|
317
|
+
updateMargin();
|
|
264
318
|
}
|
|
265
319
|
initializeCobrowse() {
|
|
266
320
|
const defaultScript = document.createElement('script');
|
|
@@ -284,12 +338,23 @@ class AuviousCobrowseComponent {
|
|
|
284
338
|
const value = widgetOptions[key];
|
|
285
339
|
widget.setAttribute(key, value);
|
|
286
340
|
}
|
|
287
|
-
if (this.connectionMessage) {
|
|
341
|
+
if (this.connectionMessage !== undefined) {
|
|
288
342
|
// @ts-ignore
|
|
289
343
|
widget.setTranslations({ 'Please enter the 7-digit code provided by the agent.': this.connectionMessage }, 'en');
|
|
290
344
|
}
|
|
291
345
|
// add the newly created widget to the body.
|
|
292
346
|
document.body.appendChild(widget);
|
|
347
|
+
// Set tooltip on the launcher button inside shadow DOM
|
|
348
|
+
if (this.tooltipText && widget.shadowRoot) {
|
|
349
|
+
const observer = new MutationObserver(() => {
|
|
350
|
+
const launcher = widget.shadowRoot?.querySelector('app-launcher');
|
|
351
|
+
if (launcher) {
|
|
352
|
+
launcher.setAttribute('title', this.tooltipText);
|
|
353
|
+
observer.disconnect();
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
observer.observe(widget.shadowRoot, { childList: true, subtree: true });
|
|
357
|
+
}
|
|
293
358
|
};
|
|
294
359
|
(async () => {
|
|
295
360
|
await customElements.whenDefined('app-auvious-widget');
|
|
@@ -297,13 +362,15 @@ class AuviousCobrowseComponent {
|
|
|
297
362
|
})();
|
|
298
363
|
}
|
|
299
364
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuviousCobrowseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
300
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: AuviousCobrowseComponent, isStandalone: true, selector: "lib-auvious-cobrowse", inputs: { connectionMessage: "connectionMessage", applicationId: "applicationId", isTalkdeskChatEnabled: "isTalkdeskChatEnabled", primaryColor: "primaryColor", accentColor: "accentColor" }, ngImport: i0, template: '', isInline: true }); }
|
|
365
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: AuviousCobrowseComponent, isStandalone: true, selector: "lib-auvious-cobrowse", inputs: { connectionMessage: "connectionMessage", tooltipText: "tooltipText", applicationId: "applicationId", isTalkdeskChatEnabled: "isTalkdeskChatEnabled", primaryColor: "primaryColor", accentColor: "accentColor" }, ngImport: i0, template: '', isInline: true }); }
|
|
301
366
|
}
|
|
302
367
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuviousCobrowseComponent, decorators: [{
|
|
303
368
|
type: Component,
|
|
304
369
|
args: [{ selector: 'lib-auvious-cobrowse', imports: [], template: '' }]
|
|
305
370
|
}], propDecorators: { connectionMessage: [{
|
|
306
371
|
type: Input
|
|
372
|
+
}], tooltipText: [{
|
|
373
|
+
type: Input
|
|
307
374
|
}], applicationId: [{
|
|
308
375
|
type: Input,
|
|
309
376
|
args: [{ required: true }]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"corvesta-chat-widget.mjs","sources":["../../../../projects/corvesta/chat-widget/src/lib/models/chat-widget-type.ts","../../../../projects/corvesta/chat-widget/src/lib/components/talkdesk-chat/talkdesk-chat.component.ts","../../../../projects/corvesta/chat-widget/src/lib/components/chat-widget/chat-widget.component.ts","../../../../projects/corvesta/chat-widget/src/lib/chat-widget.module.ts","../../../../projects/corvesta/chat-widget/src/lib/components/genesys-script/genesys-script.component.ts","../../../../projects/corvesta/chat-widget/src/lib/components/auvious-cobrowse/auvious-cobrowse.component.ts","../../../../projects/corvesta/chat-widget/src/public-api.ts","../../../../projects/corvesta/chat-widget/src/corvesta-chat-widget.ts"],"sourcesContent":["export enum ChatWidgetType {\r\n\tOFF = 'OFF',\r\n\t// GENESYS = 'GENESYS',\r\n\tTALKDESK = 'TALKDESK'\r\n}\r\n","import { Component, Input, OnInit } from '@angular/core';\r\n\r\ndeclare var TalkdeskChatSDK: any;\r\n\r\n@Component({\r\n\tselector: 'lib-talkdesk-chat',\r\n\ttemplate: '',\r\n\tstyles: [''],\r\n\tstandalone: false\r\n})\r\nexport class TalkdeskChatComponent implements OnInit {\r\n\t@Input() chatClientId!: string;\r\n\t@Input() chatClientRegion!: string;\r\n\t@Input() chatBranding!: any;\r\n\r\n\tconstructor() {\r\n\t}\r\n\r\n\tpublic ngOnInit(): void {\r\n\t\tthis.createTalkDeskWidget();\r\n\t}\r\n\r\n\tprivate createTalkDeskWidget(): void {\r\n\r\n\t\tlet webchat;\r\n\t\t((window, document, node, props, configs) => {\r\n\t\t\tif ((window as any).TalkdeskChatSDK) {\r\n\t\t\t\tconsole.error('TalkdeskChatSDK already included');\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tconst divContainer = document.createElement('div');\r\n\t\t\tdivContainer.id = node;\r\n\t\t\tdocument.body.appendChild(divContainer);\r\n\t\t\tconst src = `https://talkdeskchatsdk.talkdeskapp.com/v2/talkdeskchatsdk.js`;\r\n\t\t\tconst script: HTMLScriptElement = document.createElement('script');\r\n\t\t\tconst firstScriptTag: HTMLScriptElement = document.getElementsByTagName('script')[0];\r\n\t\t\tscript.type = 'text/javascript';\r\n\t\t\tscript.charset = 'UTF-8';\r\n\t\t\tscript.id = 'tdwebchatscript';\r\n\t\t\tscript.src = src;\r\n\t\t\tscript.async = true;\r\n\t\t\tfirstScriptTag.parentNode?.insertBefore(script, firstScriptTag);\r\n\t\t\tscript.onload = () => {\r\n\t\t\t\twebchat = TalkdeskChatSDK(node, props);\r\n\t\t\t\twebchat.init(configs);\r\n\t\t\t\t/*\r\n\t\t\t\t * Send custom data from your website to TalkDesk!\r\n\t\t\t\t * If you would like to do it, you need to remove the following commented code and\r\n\t\t\t\t * modify the webchat.setContextParam parameters to pass in the data you need.\r\n\t\t\t\t */\r\n\t\t\t\t/*function setContext() {\r\n\t\t\t\t webchat.setContextParam({ \"var1\": \"value1\", \"var2\": \"value2\", \"var3\": 100 })\r\n\t\t\t\t}\r\n\t\t\t\t// Send data when the chat conversation is initiated\r\n\t\t\t\twebchat.onConversationStart = function() {\r\n\t\t\t\t setContext()\r\n\t\t\t\t}\r\n\t\t\t\t// Send data when the chat widget is open\r\n\t\t\t\twebchat.onOpenWebchat = function() {\r\n\t\t\t\t setContext()\r\n\t\t\t\t}*/\r\n\t\t\t};\r\n\t\t})(\r\n\t\t\twindow,\r\n\t\t\tdocument,\r\n\t\t\t'tdWebchat',\r\n\t\t\t{touchpointId: this.chatClientId, accountId: '', region: this.chatClientRegion},\r\n\t\t\t{...this.chatBranding}\r\n\t\t);\r\n\t}\r\n}\r\n","import { Component, Input } from '@angular/core';\r\nimport { ChatWidgetType } from '../../models/chat-widget-type';\r\nimport { ChatConfig } from '../../models/chat-config';\r\n\r\n@Component({\r\n\tselector: 'lib-chat-widget',\r\n\ttemplate: `\r\n <ng-container [ngSwitch]=\"chatType\">\r\n <lib-talkdesk-chat *ngSwitchCase=\"ChatWidgetType.TALKDESK\"\r\n [chatBranding]=\"chatConfig.chatBranding\"\r\n [chatClientId]=\"chatConfig.chatClientId\"\r\n [chatClientRegion]=\"chatConfig.chatClientRegion\"></lib-talkdesk-chat>\r\n <ng-container *ngSwitchCase=\"ChatWidgetType.OFF\"></ng-container>\r\n <ng-container *ngSwitchDefault></ng-container>\r\n </ng-container>\r\n `,\r\n\tstyles: [],\r\n\tstandalone: false\r\n})\r\nexport class ChatWidgetComponent {\r\n\t@Input() chatType!: ChatWidgetType;\r\n\t@Input() chatConfig!: ChatConfig;\r\n\r\n\tprotected readonly ChatWidgetType = ChatWidgetType;\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { ChatWidgetComponent } from './components/chat-widget/chat-widget.component';\r\nimport { TalkdeskChatComponent } from './components/talkdesk-chat/talkdesk-chat.component';\r\nimport { NgSwitch, NgSwitchCase, NgSwitchDefault } from '@angular/common';\r\n\r\n\r\n@NgModule({\r\n\tdeclarations: [\r\n\t\tChatWidgetComponent,\r\n\t\tTalkdeskChatComponent\r\n\t],\r\n\timports: [\r\n\t\tNgSwitch,\r\n\t\tNgSwitchCase,\r\n\t\tNgSwitchDefault\r\n\t],\r\n\texports: [\r\n\t\tChatWidgetComponent\r\n\t]\r\n})\r\nexport class ChatWidgetModule {\r\n}\r\n","import { Component, Input } from '@angular/core';\r\n\r\n@Component({\r\n\tselector: 'lib-genesys-script',\r\n\timports: [],\r\n\ttemplate: '',\r\n\tstyles: ''\r\n})\r\nexport class GenesysScriptComponent {\r\n\tprivate scriptElement: HTMLScriptElement | null = null;\r\n\r\n\tprivate _deploymentId: string = '';\r\n\r\n\tget deploymentId(): string {\r\n\t\treturn this._deploymentId;\r\n\t}\r\n\r\n\t@Input({required: true})\r\n\tset deploymentId(value: string) {\r\n\t\tthis._deploymentId = value;\r\n\t\tthis.updateScriptTag();\r\n\t}\r\n\r\n\tprivate _environment: string = 'prod-usw2';\r\n\r\n\tget environment(): string {\r\n\t\treturn this._environment;\r\n\t}\r\n\r\n\t@Input()\r\n\tset environment(value: string) {\r\n\t\tthis._environment = value;\r\n\t\tthis.updateScriptTag();\r\n\t}\r\n\r\n\tprivate _genesysScriptUrl: string = 'https://apps.usw2.pure.cloud/genesys-bootstrap/genesys.min.js';\r\n\r\n\tget genesysScriptUrl(): string {\r\n\t\treturn this._genesysScriptUrl;\r\n\t}\r\n\r\n\t@Input()\r\n\tset genesysScriptUrl(value: string) {\r\n\t\tthis._genesysScriptUrl = value;\r\n\t\tthis.updateScriptTag();\r\n\t}\r\n\r\n\tprivate updateScriptTag() {\r\n\t\tif (!this.deploymentId) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst script: string = `(function (g, e, n, es, ys) {\r\n\t\t\tg['_genesysJs'] = e;\r\n\t\t\tg[e] = g[e] || function () {\r\n\t\t\t\t(g[e].q = g[e].q || []).push(arguments)\r\n\t\t\t};\r\n\t\t\tg[e].t = 1 * new Date();\r\n\t\t\tg[e].c = es;\r\n\t\t\tys = document.createElement('script');\r\n\t\t\tys.async = 1;\r\n\t\t\tys.src = n;\r\n\t\t\tys.charset = 'utf-8';\r\n\t\t\tdocument.head.appendChild(ys);\r\n\t\t})(window, 'Genesys', '${this.genesysScriptUrl}', {\r\n\t\t\tenvironment: '${this.environment}',\r\n\t\t\tdeploymentId: '${this.deploymentId}'\r\n\t\t});`;\r\n\r\n\t\tif (this.scriptElement) {\r\n\t\t\tthis.scriptElement.remove();\r\n\t\t}\r\n\r\n\t\t// Create new script element\r\n\t\tthis.scriptElement = document.createElement('script');\r\n\t\tthis.scriptElement.type = 'text/javascript';\r\n\t\tthis.scriptElement.text = script;\r\n\r\n\t\t// Add an ID for easier reference\r\n\t\tthis.scriptElement.id = `genesys-script-${Date.now()}`;\r\n\r\n\t\t// Append the new script\r\n\t\tdocument.head.appendChild(this.scriptElement);\r\n\t}\r\n}\r\n","import { Component, Input } from '@angular/core';\r\n\r\n@Component({\r\n\tselector: 'lib-auvious-cobrowse',\r\n\timports: [],\r\n\ttemplate: '',\r\n\tstyles: []\r\n})\r\nexport class AuviousCobrowseComponent {\r\n\t// The message displayed above the code input field.\r\n\t@Input() connectionMessage: string = '';\r\n\r\n\t// Configuration for the application ID, which determines which application the widget will accept connections from.\r\n\tprivate _applicationId: string = '';\r\n\r\n\tget applicationId(): string {\r\n\t\treturn this._applicationId;\r\n\t}\r\n\r\n\t@Input({required: true})\r\n\tset applicationId(value: string) {\r\n\t\tthis._applicationId = value;\r\n\t\tif (this._applicationId) {\r\n\t\t\tthis.initializeCobrowse();\r\n\t\t}\r\n\t}\r\n\r\n\t// Configuration for shifting the widget to the right when Talkdesk Chat is enabled.\r\n\tprivate _isTalkdeskChatEnabled: boolean = false;\r\n\r\n\tget isTalkdeskChatEnabled(): boolean {\r\n\t\treturn this._isTalkdeskChatEnabled;\r\n\t}\r\n\r\n\t@Input({required: true})\r\n\tset isTalkdeskChatEnabled(value: boolean) {\r\n\t\tthis._isTalkdeskChatEnabled = value;\r\n\t\tthis.adjustFloatingMargin();\r\n\t}\r\n\r\n\t// Configuration for customizing the widget colors, mainly effecting the icon color.\r\n\tprivate _primaryColor: string = 'black';\r\n\r\n\tget primaryColor(): string {\r\n\t\treturn this._primaryColor;\r\n\t}\r\n\r\n\t@Input()\r\n\tset primaryColor(value: string) {\r\n\t\tthis._primaryColor = value;\r\n\t\tif (this._primaryColor) {\r\n\t\t\tdocument.documentElement.style.setProperty('--av-color-primary', this._primaryColor);\r\n\t\t} else {\r\n\t\t\tdocument.documentElement.style.setProperty('--av-color-primary', 'black');\r\n\t\t}\r\n\t}\r\n\r\n\t// Configuration for customizing the widget colors, mainly effecting the button color within the popup.\r\n\tprivate _accentColor: string = 'black';\r\n\r\n\tget accentColor(): string {\r\n\t\treturn this._accentColor;\r\n\t}\r\n\r\n\t@Input()\r\n\tset accentColor(value: string) {\r\n\t\tthis._accentColor = value;\r\n\t\tif (this._accentColor) {\r\n\t\t\tdocument.documentElement.style.setProperty('--av-color-accent', this._accentColor);\r\n\t\t} else {\r\n\t\t\tdocument.documentElement.style.setProperty('--av-color-accent', 'black');\r\n\t\t}\r\n\t}\r\n\r\n\tadjustFloatingMargin() {\r\n\t\tdocument.documentElement.style.setProperty('--av-floating-margin-right', this._isTalkdeskChatEnabled ? '80px' : '20px');\r\n\t}\r\n\r\n\tprivate initializeCobrowse() {\r\n\t\tconst defaultScript: HTMLScriptElement = document.createElement('script');\r\n\t\tdefaultScript.type = 'module';\r\n\t\tdefaultScript.src = 'https://auvious.video/widget/dist/auvious/auvious.esm.js';\r\n\t\tconst fallbackScript: HTMLScriptElement = document.createElement('script');\r\n\t\tfallbackScript.noModule = true;\r\n\t\tfallbackScript.src = 'https://auvious.video/widget/dist/auvious/auvious.js';\r\n\t\tdocument.head.append(defaultScript, fallbackScript);\r\n\r\n\t\tconst widgetOptions = {\r\n\t\t\t'application-id': this._applicationId,\r\n\t\t\t'active-widgets': 'cobrowse',\r\n\t\t\t'application-verify-source': true\r\n\t\t};\r\n\r\n\t\tconst showWidget = () => {\r\n\r\n\t\t\t// create our widget\r\n\t\t\tconst widget = document.createElement('app-auvious-widget');\r\n\r\n\t\t\t// get all the widget options and pass it to our widget.\r\n\t\t\tfor (const key of Object.keys(widgetOptions)) {\r\n\t\t\t\t// @ts-ignore\r\n\t\t\t\tconst value = widgetOptions[key];\r\n\t\t\t\twidget.setAttribute(key, value);\r\n\t\t\t}\r\n\r\n\t\t\tif (this.connectionMessage) {\r\n\t\t\t\t// @ts-ignore\r\n\t\t\t\twidget.setTranslations(\r\n\t\t\t\t\t{'Please enter the 7-digit code provided by the agent.': this.connectionMessage},\r\n\t\t\t\t\t'en'\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\t// add the newly created widget to the body.\r\n\t\t\tdocument.body.appendChild(widget);\r\n\t\t};\r\n\r\n\t\t(async () => {\r\n\t\t\tawait customElements.whenDefined('app-auvious-widget');\r\n\t\t\tshowWidget();\r\n\t\t})();\r\n\t}\r\n}\r\n","/*\r\n * Public API Surface of chat-widget\r\n */\r\n\r\nexport * from './lib/components/chat-widget/chat-widget.component';\r\nexport * from './lib/chat-widget.module';\r\nexport * from './lib/models/chat-config';\r\nexport * from './lib/models/chat-widget-type';\r\nexport * from './lib/components/genesys-script/genesys-script.component';\r\nexport * from './lib/components/auvious-cobrowse/auvious-cobrowse.component';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.TalkdeskChatComponent"],"mappings":";;;;;IAAY;AAAZ,CAAA,UAAY,cAAc,EAAA;AACzB,IAAA,cAAA,CAAA,KAAA,CAAA,GAAA,KAAW;;AAEX,IAAA,cAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACtB,CAAC,EAJW,cAAc,KAAd,cAAc,GAAA,EAAA,CAAA,CAAA;;MCUb,qBAAqB,CAAA;AAKjC,IAAA,WAAA,GAAA;IACA;IAEO,QAAQ,GAAA;QACd,IAAI,CAAC,oBAAoB,EAAE;IAC5B;IAEQ,oBAAoB,GAAA;AAE3B,QAAA,IAAI,OAAO;QACX,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,KAAI;AAC3C,YAAA,IAAK,MAAc,CAAC,eAAe,EAAE;AACpC,gBAAA,OAAO,CAAC,KAAK,CAAC,kCAAkC,CAAC;gBACjD;YACD;YACA,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;AAClD,YAAA,YAAY,CAAC,EAAE,GAAG,IAAI;AACtB,YAAA,QAAQ,CAAC,IAAI,CA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,CAAA;kBANpC,SAAS;+BACC,sBAAsB,EAAA,OAAA,EACvB,EAAE,EAAA,QAAA,EACD,EAAE,EAAA;;sBAKX;;sBASA,KAAK;uBAAC,EAAC,QAAQ,EAAE,IAAI,EAAC;;sBAetB,KAAK;uBAAC,EAAC,QAAQ,EAAE,IAAI,EAAC;;sBAatB;;sBAiBA;;;AChEF;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"corvesta-chat-widget.mjs","sources":["../../../../projects/corvesta/chat-widget/src/lib/models/chat-widget-type.ts","../../../../projects/corvesta/chat-widget/src/lib/components/talkdesk-chat/talkdesk-chat.component.ts","../../../../projects/corvesta/chat-widget/src/lib/components/chat-widget/chat-widget.component.ts","../../../../projects/corvesta/chat-widget/src/lib/chat-widget.module.ts","../../../../projects/corvesta/chat-widget/src/lib/components/genesys-script/genesys-script.component.ts","../../../../projects/corvesta/chat-widget/src/lib/components/auvious-cobrowse/auvious-cobrowse.component.ts","../../../../projects/corvesta/chat-widget/src/public-api.ts","../../../../projects/corvesta/chat-widget/src/corvesta-chat-widget.ts"],"sourcesContent":["export enum ChatWidgetType {\r\n\tOFF = 'OFF',\r\n\t// GENESYS = 'GENESYS',\r\n\tTALKDESK = 'TALKDESK'\r\n}\r\n","import { Component, Input, OnInit } from '@angular/core';\r\n\r\ndeclare var TalkdeskChatSDK: any;\r\n\r\n@Component({\r\n\tselector: 'lib-talkdesk-chat',\r\n\ttemplate: '',\r\n\tstyles: [''],\r\n\tstandalone: false\r\n})\r\nexport class TalkdeskChatComponent implements OnInit {\r\n\t@Input() chatClientId!: string;\r\n\t@Input() chatClientRegion!: string;\r\n\t@Input() chatBranding!: any;\r\n\r\n\tconstructor() {\r\n\t}\r\n\r\n\tpublic ngOnInit(): void {\r\n\t\tthis.createTalkDeskWidget();\r\n\t}\r\n\r\n\tprivate createTalkDeskWidget(): void {\r\n\r\n\t\tlet webchat;\r\n\t\t((window, document, node, props, configs) => {\r\n\t\t\tif ((window as any).TalkdeskChatSDK) {\r\n\t\t\t\tconsole.error('TalkdeskChatSDK already included');\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tconst divContainer = document.createElement('div');\r\n\t\t\tdivContainer.id = node;\r\n\t\t\tdocument.body.appendChild(divContainer);\r\n\t\t\tconst src = `https://talkdeskchatsdk.talkdeskapp.com/v2/talkdeskchatsdk.js`;\r\n\t\t\tconst script: HTMLScriptElement = document.createElement('script');\r\n\t\t\tconst firstScriptTag: HTMLScriptElement = document.getElementsByTagName('script')[0];\r\n\t\t\tscript.type = 'text/javascript';\r\n\t\t\tscript.charset = 'UTF-8';\r\n\t\t\tscript.id = 'tdwebchatscript';\r\n\t\t\tscript.src = src;\r\n\t\t\tscript.async = true;\r\n\t\t\tfirstScriptTag.parentNode?.insertBefore(script, firstScriptTag);\r\n\t\t\tscript.onload = () => {\r\n\t\t\t\twebchat = TalkdeskChatSDK(node, props);\r\n\t\t\t\twebchat.init(configs);\r\n\t\t\t\t/*\r\n\t\t\t\t * Send custom data from your website to TalkDesk!\r\n\t\t\t\t * If you would like to do it, you need to remove the following commented code and\r\n\t\t\t\t * modify the webchat.setContextParam parameters to pass in the data you need.\r\n\t\t\t\t */\r\n\t\t\t\t/*function setContext() {\r\n\t\t\t\t webchat.setContextParam({ \"var1\": \"value1\", \"var2\": \"value2\", \"var3\": 100 })\r\n\t\t\t\t}\r\n\t\t\t\t// Send data when the chat conversation is initiated\r\n\t\t\t\twebchat.onConversationStart = function() {\r\n\t\t\t\t setContext()\r\n\t\t\t\t}\r\n\t\t\t\t// Send data when the chat widget is open\r\n\t\t\t\twebchat.onOpenWebchat = function() {\r\n\t\t\t\t setContext()\r\n\t\t\t\t}*/\r\n\t\t\t};\r\n\t\t})(\r\n\t\t\twindow,\r\n\t\t\tdocument,\r\n\t\t\t'tdWebchat',\r\n\t\t\t{touchpointId: this.chatClientId, accountId: '', region: this.chatClientRegion},\r\n\t\t\t{...this.chatBranding}\r\n\t\t);\r\n\t}\r\n}\r\n","import { Component, Input } from '@angular/core';\r\nimport { ChatWidgetType } from '../../models/chat-widget-type';\r\nimport { ChatConfig } from '../../models/chat-config';\r\n\r\n@Component({\r\n\tselector: 'lib-chat-widget',\r\n\ttemplate: `\r\n <ng-container [ngSwitch]=\"chatType\">\r\n <lib-talkdesk-chat *ngSwitchCase=\"ChatWidgetType.TALKDESK\"\r\n [chatBranding]=\"chatConfig.chatBranding\"\r\n [chatClientId]=\"chatConfig.chatClientId\"\r\n [chatClientRegion]=\"chatConfig.chatClientRegion\"></lib-talkdesk-chat>\r\n <ng-container *ngSwitchCase=\"ChatWidgetType.OFF\"></ng-container>\r\n <ng-container *ngSwitchDefault></ng-container>\r\n </ng-container>\r\n `,\r\n\tstyles: [],\r\n\tstandalone: false\r\n})\r\nexport class ChatWidgetComponent {\r\n\t@Input() chatType!: ChatWidgetType;\r\n\t@Input() chatConfig!: ChatConfig;\r\n\r\n\tprotected readonly ChatWidgetType = ChatWidgetType;\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { ChatWidgetComponent } from './components/chat-widget/chat-widget.component';\r\nimport { TalkdeskChatComponent } from './components/talkdesk-chat/talkdesk-chat.component';\r\nimport { NgSwitch, NgSwitchCase, NgSwitchDefault } from '@angular/common';\r\n\r\n\r\n@NgModule({\r\n\tdeclarations: [\r\n\t\tChatWidgetComponent,\r\n\t\tTalkdeskChatComponent\r\n\t],\r\n\timports: [\r\n\t\tNgSwitch,\r\n\t\tNgSwitchCase,\r\n\t\tNgSwitchDefault\r\n\t],\r\n\texports: [\r\n\t\tChatWidgetComponent\r\n\t]\r\n})\r\nexport class ChatWidgetModule {\r\n}\r\n","import { Component, Input } from '@angular/core';\r\n\r\n@Component({\r\n\tselector: 'lib-genesys-script',\r\n\timports: [],\r\n\ttemplate: '',\r\n\tstyles: ''\r\n})\r\nexport class GenesysScriptComponent {\r\n\tprivate scriptElement: HTMLScriptElement | null = null;\r\n\r\n\tprivate _deploymentId: string = '';\r\n\r\n\tget deploymentId(): string {\r\n\t\treturn this._deploymentId;\r\n\t}\r\n\r\n\t@Input({required: true})\r\n\tset deploymentId(value: string) {\r\n\t\tthis._deploymentId = value;\r\n\t\tthis.updateScriptTag();\r\n\t}\r\n\r\n\tprivate _environment: string = 'prod-usw2';\r\n\r\n\tget environment(): string {\r\n\t\treturn this._environment;\r\n\t}\r\n\r\n\t@Input()\r\n\tset environment(value: string) {\r\n\t\tthis._environment = value;\r\n\t\tthis.updateScriptTag();\r\n\t}\r\n\r\n\tprivate _genesysScriptUrl: string = 'https://apps.usw2.pure.cloud/genesys-bootstrap/genesys.min.js';\r\n\r\n\tget genesysScriptUrl(): string {\r\n\t\treturn this._genesysScriptUrl;\r\n\t}\r\n\r\n\t@Input()\r\n\tset genesysScriptUrl(value: string) {\r\n\t\tthis._genesysScriptUrl = value;\r\n\t\tthis.updateScriptTag();\r\n\t}\r\n\r\n\tprivate updateScriptTag() {\r\n\t\tif (!this.deploymentId) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst script: string = `(function (g, e, n, es, ys) {\r\n\t\t\tg['_genesysJs'] = e;\r\n\t\t\tg[e] = g[e] || function () {\r\n\t\t\t\t(g[e].q = g[e].q || []).push(arguments)\r\n\t\t\t};\r\n\t\t\tg[e].t = 1 * new Date();\r\n\t\t\tg[e].c = es;\r\n\t\t\tys = document.createElement('script');\r\n\t\t\tys.async = 1;\r\n\t\t\tys.src = n;\r\n\t\t\tys.charset = 'utf-8';\r\n\t\t\tdocument.head.appendChild(ys);\r\n\t\t})(window, 'Genesys', '${this.genesysScriptUrl}', {\r\n\t\t\tenvironment: '${this.environment}',\r\n\t\t\tdeploymentId: '${this.deploymentId}'\r\n\t\t});`;\r\n\r\n\t\tif (this.scriptElement) {\r\n\t\t\tthis.scriptElement.remove();\r\n\t\t}\r\n\r\n\t\t// Create new script element\r\n\t\tthis.scriptElement = document.createElement('script');\r\n\t\tthis.scriptElement.type = 'text/javascript';\r\n\t\tthis.scriptElement.text = script;\r\n\r\n\t\t// Add an ID for easier reference\r\n\t\tthis.scriptElement.id = `genesys-script-${Date.now()}`;\r\n\r\n\t\t// Append the new script\r\n\t\tdocument.head.appendChild(this.scriptElement);\r\n\t}\r\n}\r\n","import { Component, Input } from '@angular/core';\r\n\r\n@Component({\r\n\tselector: 'lib-auvious-cobrowse',\r\n\timports: [],\r\n\ttemplate: '',\r\n\tstyles: []\r\n})\r\nexport class AuviousCobrowseComponent {\r\n\t// The message displayed above the code input field.\r\n\t@Input() connectionMessage: string | undefined;\r\n\t// The tooltip text displayed when hovering over the widget button.\r\n\t@Input() tooltipText: string = '';\r\n\tprivate resizeObserver?: ResizeObserver;\r\n\tprivate mutationObserver?: MutationObserver;\r\n\tprivate updateTimeout?: ReturnType<typeof globalThis.setTimeout>;\r\n\r\n\t// Configuration for the application ID, which determines which application the widget will accept connections from.\r\n\tprivate _applicationId: string = '';\r\n\r\n\tget applicationId(): string {\r\n\t\treturn this._applicationId;\r\n\t}\r\n\r\n\t@Input({required: true})\r\n\tset applicationId(value: string) {\r\n\t\tthis._applicationId = value;\r\n\t\tif (this._applicationId) {\r\n\t\t\tthis.initializeCobrowse();\r\n\t\t}\r\n\t}\r\n\r\n\t// Configuration for shifting the widget to the right when Talkdesk Chat is enabled.\r\n\tprivate _isTalkdeskChatEnabled: boolean = false;\r\n\r\n\tget isTalkdeskChatEnabled(): boolean {\r\n\t\treturn this._isTalkdeskChatEnabled;\r\n\t}\r\n\r\n\t@Input({required: true})\r\n\tset isTalkdeskChatEnabled(value: boolean) {\r\n\t\tthis._isTalkdeskChatEnabled = value;\r\n\t\tthis.adjustFloatingMargin();\r\n\t}\r\n\r\n\t// Configuration for customizing the widget colors, mainly effecting the icon color.\r\n\tprivate _primaryColor: string = 'black';\r\n\r\n\tget primaryColor(): string {\r\n\t\treturn this._primaryColor;\r\n\t}\r\n\r\n\t@Input()\r\n\tset primaryColor(value: string) {\r\n\t\tthis._primaryColor = value;\r\n\t\tif (this._primaryColor) {\r\n\t\t\tdocument.documentElement.style.setProperty('--av-color-primary', this._primaryColor);\r\n\t\t} else {\r\n\t\t\tdocument.documentElement.style.setProperty('--av-color-primary', 'black');\r\n\t\t}\r\n\t}\r\n\r\n\t// Configuration for customizing the widget colors, mainly effecting the button color within the popup.\r\n\tprivate _accentColor: string = 'black';\r\n\r\n\tget accentColor(): string {\r\n\t\treturn this._accentColor;\r\n\t}\r\n\r\n\t@Input()\r\n\tset accentColor(value: string) {\r\n\t\tthis._accentColor = value;\r\n\t\tif (this._accentColor) {\r\n\t\t\tdocument.documentElement.style.setProperty('--av-color-accent', this._accentColor);\r\n\t\t} else {\r\n\t\t\tdocument.documentElement.style.setProperty('--av-color-accent', 'black');\r\n\t\t}\r\n\t}\r\n\r\n\tadjustFloatingMargin(): void {\r\n\t\tif (this._isTalkdeskChatEnabled) {\r\n\t\t\tdocument.documentElement.style.setProperty('--av-floating-margin-right', '80px');\r\n\t\t\tthis.observeTalkdeskWidget();\r\n\t\t} else {\r\n\t\t\tthis.resizeObserver?.disconnect();\r\n\t\t\tthis.mutationObserver?.disconnect();\r\n\t\t\tif (this.updateTimeout) {\r\n\t\t\t\tclearTimeout(this.updateTimeout);\r\n\t\t\t}\r\n\t\t\tdocument.documentElement.style.setProperty('--av-floating-margin-right', '20px');\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Method to observe Talkdesk Chat widget and adjust the floating margin accordingly.\r\n\t * @private\r\n\t */\r\n\tprivate observeTalkdeskWidget(): void {\r\n\t\tconst element = document.getElementById('talkdesk-chat-widget');\r\n\r\n\t\tif (element) {\r\n\t\t\tthis.setupTalkdeskObservers(element);\r\n\t\t} else {\r\n\t\t\tconst observer = new MutationObserver(() => {\r\n\t\t\t\tconst el = document.getElementById('talkdesk-chat-widget');\r\n\t\t\t\tif (el) {\r\n\t\t\t\t\tobserver.disconnect();\r\n\t\t\t\t\tthis.setupTalkdeskObservers(el);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tobserver.observe(document.body, { childList: true, subtree: true });\r\n\t\t}\r\n\t}\r\n\r\n\tprivate setupTalkdeskObservers(element: HTMLElement): void {\r\n\t\tconst updateMargin = (): void => {\r\n\t\t\tif (this.updateTimeout) {\r\n\t\t\t\tclearTimeout(this.updateTimeout);\r\n\t\t\t}\r\n\t\t\tthis.updateTimeout = globalThis.setTimeout(() => {\r\n\t\t\t\tconst width: number = element.offsetWidth;\r\n\t\t\t\tconst isVisible: boolean = globalThis.getComputedStyle(element).visibility !== 'hidden';\r\n\t\t\t\tconst margin: number = isVisible ? width + 40 : 80;\r\n\t\t\t\tdocument.documentElement.style.setProperty('--av-floating-margin-right', `${margin}px`);\r\n\t\t\t}, 50);\r\n\t\t};\r\n\r\n\t\tthis.resizeObserver?.disconnect();\r\n\t\tthis.resizeObserver = new ResizeObserver(updateMargin);\r\n\t\tthis.resizeObserver.observe(element);\r\n\r\n\t\tthis.mutationObserver?.disconnect();\r\n\t\tthis.mutationObserver = new MutationObserver(updateMargin);\r\n\t\tthis.mutationObserver.observe(element, {\r\n\t\t\tattributes: true,\r\n\t\t\tattributeFilter: ['aria-hidden'],\r\n\t\t});\r\n\r\n\t\tupdateMargin();\r\n\t}\r\n\r\n\tprivate initializeCobrowse(): void {\r\n\t\tconst defaultScript: HTMLScriptElement = document.createElement('script');\r\n\t\tdefaultScript.type = 'module';\r\n\t\tdefaultScript.src = 'https://auvious.video/widget/dist/auvious/auvious.esm.js';\r\n\t\tconst fallbackScript: HTMLScriptElement = document.createElement('script');\r\n\t\tfallbackScript.noModule = true;\r\n\t\tfallbackScript.src = 'https://auvious.video/widget/dist/auvious/auvious.js';\r\n\t\tdocument.head.append(defaultScript, fallbackScript);\r\n\r\n\t\tconst widgetOptions = {\r\n\t\t\t'application-id': this._applicationId,\r\n\t\t\t'active-widgets': 'cobrowse',\r\n\t\t\t'application-verify-source': true\r\n\t\t};\r\n\r\n\t\tconst showWidget = () => {\r\n\r\n\t\t\t// create our widget\r\n\t\t\tconst widget = document.createElement('app-auvious-widget');\r\n\r\n\t\t\t// get all the widget options and pass it to our widget.\r\n\t\t\tfor (const key of Object.keys(widgetOptions)) {\r\n\t\t\t\t// @ts-ignore\r\n\t\t\t\tconst value = widgetOptions[key];\r\n\t\t\t\twidget.setAttribute(key, value);\r\n\t\t\t}\r\n\r\n\t\t\tif (this.connectionMessage !== undefined) {\r\n\t\t\t\t// @ts-ignore\r\n\t\t\t\twidget.setTranslations(\r\n\t\t\t\t\t{'Please enter the 7-digit code provided by the agent.': this.connectionMessage},\r\n\t\t\t\t\t'en'\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\t// add the newly created widget to the body.\r\n\t\t\tdocument.body.appendChild(widget);\r\n\r\n\t\t\t// Set tooltip on the launcher button inside shadow DOM\r\n\t\t\tif (this.tooltipText && widget.shadowRoot) {\r\n\t\t\t\tconst observer = new MutationObserver(() => {\r\n\t\t\t\t\tconst launcher = widget.shadowRoot?.querySelector('app-launcher');\r\n\t\t\t\t\tif (launcher) {\r\n\t\t\t\t\t\tlauncher.setAttribute('title', this.tooltipText);\r\n\t\t\t\t\t\tobserver.disconnect();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tobserver.observe(widget.shadowRoot, { childList: true, subtree: true });\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t(async () => {\r\n\t\t\tawait customElements.whenDefined('app-auvious-widget');\r\n\t\t\tshowWidget();\r\n\t\t})();\r\n\t}\r\n}\r\n","/*\r\n * Public API Surface of chat-widget\r\n */\r\n\r\nexport * from './lib/components/chat-widget/chat-widget.component';\r\nexport * from './lib/chat-widget.module';\r\nexport * from './lib/models/chat-config';\r\nexport * from './lib/models/chat-widget-type';\r\nexport * from './lib/components/genesys-script/genesys-script.component';\r\nexport * from './lib/components/auvious-cobrowse/auvious-cobrowse.component';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.TalkdeskChatComponent"],"mappings":";;;;;IAAY;AAAZ,CAAA,UA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wBAChD,QAAQ,CAAC,UAAU,EAAE;oBACtB;AACD,gBAAA,CAAC,CAAC;AACF,gBAAA,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;YACxE;AACD,QAAA,CAAC;QAED,CAAC,YAAW;AACX,YAAA,MAAM,cAAc,CAAC,WAAW,CAAC,oBAAoB,CAAC;AACtD,YAAA,UAAU,EAAE;QACb,CAAC,GAAG;IACL;+GA5LY,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAxB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,wBAAwB,0SAH1B,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;;4FAGA,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBANpC,SAAS;+BACC,sBAAsB,EAAA,OAAA,EACvB,EAAE,EAAA,QAAA,EACD,EAAE,EAAA;;sBAKX;;sBAEA;;sBAYA,KAAK;uBAAC,EAAC,QAAQ,EAAE,IAAI,EAAC;;sBAetB,KAAK;uBAAC,EAAC,QAAQ,EAAE,IAAI,EAAC;;sBAatB;;sBAiBA;;;ACrEF;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -55,7 +55,11 @@ declare class GenesysScriptComponent {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
declare class AuviousCobrowseComponent {
|
|
58
|
-
connectionMessage: string;
|
|
58
|
+
connectionMessage: string | undefined;
|
|
59
|
+
tooltipText: string;
|
|
60
|
+
private resizeObserver?;
|
|
61
|
+
private mutationObserver?;
|
|
62
|
+
private updateTimeout?;
|
|
59
63
|
private _applicationId;
|
|
60
64
|
get applicationId(): string;
|
|
61
65
|
set applicationId(value: string);
|
|
@@ -69,9 +73,15 @@ declare class AuviousCobrowseComponent {
|
|
|
69
73
|
get accentColor(): string;
|
|
70
74
|
set accentColor(value: string);
|
|
71
75
|
adjustFloatingMargin(): void;
|
|
76
|
+
/**
|
|
77
|
+
* Method to observe Talkdesk Chat widget and adjust the floating margin accordingly.
|
|
78
|
+
* @private
|
|
79
|
+
*/
|
|
80
|
+
private observeTalkdeskWidget;
|
|
81
|
+
private setupTalkdeskObservers;
|
|
72
82
|
private initializeCobrowse;
|
|
73
83
|
static ɵfac: i0.ɵɵFactoryDeclaration<AuviousCobrowseComponent, never>;
|
|
74
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AuviousCobrowseComponent, "lib-auvious-cobrowse", never, { "connectionMessage": { "alias": "connectionMessage"; "required": false; }; "applicationId": { "alias": "applicationId"; "required": true; }; "isTalkdeskChatEnabled": { "alias": "isTalkdeskChatEnabled"; "required": true; }; "primaryColor": { "alias": "primaryColor"; "required": false; }; "accentColor": { "alias": "accentColor"; "required": false; }; }, {}, never, never, true, never>;
|
|
84
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AuviousCobrowseComponent, "lib-auvious-cobrowse", never, { "connectionMessage": { "alias": "connectionMessage"; "required": false; }; "tooltipText": { "alias": "tooltipText"; "required": false; }; "applicationId": { "alias": "applicationId"; "required": true; }; "isTalkdeskChatEnabled": { "alias": "isTalkdeskChatEnabled"; "required": true; }; "primaryColor": { "alias": "primaryColor"; "required": false; }; "accentColor": { "alias": "accentColor"; "required": false; }; }, {}, never, never, true, never>;
|
|
75
85
|
}
|
|
76
86
|
|
|
77
87
|
export { AuviousCobrowseComponent, ChatWidgetComponent, ChatWidgetModule, ChatWidgetType, GenesysScriptComponent };
|