@corvesta/chat-widget 19.1.2 → 20.0.0
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.
- package/fesm2022/corvesta-chat-widget.mjs +16 -16
- package/fesm2022/corvesta-chat-widget.mjs.map +1 -1
- package/index.d.ts +78 -5
- package/package.json +3 -3
- package/lib/chat-widget.module.d.ts +0 -9
- package/lib/components/auvious-cobrowse/auvious-cobrowse.component.d.ts +0 -20
- package/lib/components/chat-widget/chat-widget.component.d.ts +0 -10
- package/lib/components/genesys-script/genesys-script.component.d.ts +0 -16
- package/lib/components/talkdesk-chat/talkdesk-chat.component.d.ts +0 -12
- package/lib/models/chat-config.d.ts +0 -5
- package/lib/models/chat-widget-type.d.ts +0 -4
- package/public-api.d.ts +0 -6
|
@@ -57,10 +57,10 @@ class TalkdeskChatComponent {
|
|
|
57
57
|
};
|
|
58
58
|
})(window, document, 'tdWebchat', { touchpointId: this.chatClientId, accountId: '', region: this.chatClientRegion }, { ...this.chatBranding });
|
|
59
59
|
}
|
|
60
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
61
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
60
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TalkdeskChatComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
61
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: TalkdeskChatComponent, isStandalone: false, selector: "lib-talkdesk-chat", inputs: { chatClientId: "chatClientId", chatClientRegion: "chatClientRegion", chatBranding: "chatBranding" }, ngImport: i0, template: '', isInline: true, styles: [""] }); }
|
|
62
62
|
}
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TalkdeskChatComponent, decorators: [{
|
|
64
64
|
type: Component,
|
|
65
65
|
args: [{ selector: 'lib-talkdesk-chat', template: '', standalone: false }]
|
|
66
66
|
}], ctorParameters: () => [], propDecorators: { chatClientId: [{
|
|
@@ -75,8 +75,8 @@ class ChatWidgetComponent {
|
|
|
75
75
|
constructor() {
|
|
76
76
|
this.ChatWidgetType = ChatWidgetType;
|
|
77
77
|
}
|
|
78
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
79
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
78
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ChatWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
79
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: ChatWidgetComponent, isStandalone: false, selector: "lib-chat-widget", inputs: { chatType: "chatType", chatConfig: "chatConfig" }, ngImport: i0, template: `
|
|
80
80
|
<ng-container [ngSwitch]="chatType">
|
|
81
81
|
<lib-talkdesk-chat *ngSwitchCase="ChatWidgetType.TALKDESK"
|
|
82
82
|
[chatBranding]="chatConfig.chatBranding"
|
|
@@ -87,7 +87,7 @@ class ChatWidgetComponent {
|
|
|
87
87
|
</ng-container>
|
|
88
88
|
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: TalkdeskChatComponent, selector: "lib-talkdesk-chat", inputs: ["chatClientId", "chatClientRegion", "chatBranding"] }] }); }
|
|
89
89
|
}
|
|
90
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ChatWidgetComponent, decorators: [{
|
|
91
91
|
type: Component,
|
|
92
92
|
args: [{ selector: 'lib-chat-widget', template: `
|
|
93
93
|
<ng-container [ngSwitch]="chatType">
|
|
@@ -106,14 +106,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
106
106
|
}] } });
|
|
107
107
|
|
|
108
108
|
class ChatWidgetModule {
|
|
109
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
110
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
109
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ChatWidgetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
110
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: ChatWidgetModule, declarations: [ChatWidgetComponent,
|
|
111
111
|
TalkdeskChatComponent], imports: [NgSwitch,
|
|
112
112
|
NgSwitchCase,
|
|
113
113
|
NgSwitchDefault], exports: [ChatWidgetComponent] }); }
|
|
114
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
114
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ChatWidgetModule }); }
|
|
115
115
|
}
|
|
116
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ChatWidgetModule, decorators: [{
|
|
117
117
|
type: NgModule,
|
|
118
118
|
args: [{
|
|
119
119
|
declarations: [
|
|
@@ -191,10 +191,10 @@ class GenesysScriptComponent {
|
|
|
191
191
|
// Append the new script
|
|
192
192
|
document.head.appendChild(this.scriptElement);
|
|
193
193
|
}
|
|
194
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
195
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
194
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GenesysScriptComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
195
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: GenesysScriptComponent, isStandalone: true, selector: "lib-genesys-script", inputs: { deploymentId: "deploymentId", environment: "environment", genesysScriptUrl: "genesysScriptUrl" }, ngImport: i0, template: '', isInline: true, styles: [""] }); }
|
|
196
196
|
}
|
|
197
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
197
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GenesysScriptComponent, decorators: [{
|
|
198
198
|
type: Component,
|
|
199
199
|
args: [{ selector: 'lib-genesys-script', imports: [], template: '' }]
|
|
200
200
|
}], propDecorators: { deploymentId: [{
|
|
@@ -296,10 +296,10 @@ class AuviousCobrowseComponent {
|
|
|
296
296
|
showWidget();
|
|
297
297
|
})();
|
|
298
298
|
}
|
|
299
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
300
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
299
|
+
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 }); }
|
|
301
301
|
}
|
|
302
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuviousCobrowseComponent, decorators: [{
|
|
303
303
|
type: Component,
|
|
304
304
|
args: [{ selector: 'lib-auvious-cobrowse', imports: [], template: '' }]
|
|
305
305
|
}], propDecorators: { connectionMessage: [{
|
|
@@ -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,GAIzB,EAAA,CAAA,CAAA;;MCMY,qBAAqB,CAAA;AAKjC,IAAA,WAAA,GAAA;;IAGO,QAAQ,GAAA;QACd,IAAI,CAAC,oBAAoB,EAAE;;IAGpB,oBAAoB,GAAA;AAE3B,QAAA,IAAI,OAAO;QACX,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,KAAI;AAC3C,YAA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AAA,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,8QAH1B,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;8BAKH,iBAAiB,EAAA,CAAA;sBAAzB;gBAUG,aAAa,EAAA,CAAA;sBADhB,KAAK;uBAAC,EAAC,QAAQ,EAAE,IAAI,EAAC;gBAgBnB,qBAAqB,EAAA,CAAA;sBADxB,KAAK;uBAAC,EAAC,QAAQ,EAAE,IAAI,EAAC;gBAcnB,YAAY,EAAA,CAAA;sBADf;gBAkBG,WAAW,EAAA,CAAA;sBADd;;;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 = '';\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,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,GAAG;IACL;+GAjHY,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,8QAH1B,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;;sBASA,KAAK;uBAAC,EAAC,QAAQ,EAAE,IAAI,EAAC;;sBAetB,KAAK;uBAAC,EAAC,QAAQ,EAAE,IAAI,EAAC;;sBAatB;;sBAiBA;;;AChEF;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,78 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnInit } from '@angular/core';
|
|
3
|
+
import * as i3 from '@angular/common';
|
|
4
|
+
|
|
5
|
+
declare enum ChatWidgetType {
|
|
6
|
+
OFF = "OFF",
|
|
7
|
+
TALKDESK = "TALKDESK"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface ChatConfig {
|
|
11
|
+
chatClientId: string;
|
|
12
|
+
chatClientRegion: string;
|
|
13
|
+
chatBranding: any;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare class ChatWidgetComponent {
|
|
17
|
+
chatType: ChatWidgetType;
|
|
18
|
+
chatConfig: ChatConfig;
|
|
19
|
+
protected readonly ChatWidgetType: typeof ChatWidgetType;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatWidgetComponent, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatWidgetComponent, "lib-chat-widget", never, { "chatType": { "alias": "chatType"; "required": false; }; "chatConfig": { "alias": "chatConfig"; "required": false; }; }, {}, never, never, false, never>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare class TalkdeskChatComponent implements OnInit {
|
|
25
|
+
chatClientId: string;
|
|
26
|
+
chatClientRegion: string;
|
|
27
|
+
chatBranding: any;
|
|
28
|
+
constructor();
|
|
29
|
+
ngOnInit(): void;
|
|
30
|
+
private createTalkDeskWidget;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TalkdeskChatComponent, never>;
|
|
32
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TalkdeskChatComponent, "lib-talkdesk-chat", never, { "chatClientId": { "alias": "chatClientId"; "required": false; }; "chatClientRegion": { "alias": "chatClientRegion"; "required": false; }; "chatBranding": { "alias": "chatBranding"; "required": false; }; }, {}, never, never, false, never>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare class ChatWidgetModule {
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatWidgetModule, never>;
|
|
37
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ChatWidgetModule, [typeof ChatWidgetComponent, typeof TalkdeskChatComponent], [typeof i3.NgSwitch, typeof i3.NgSwitchCase, typeof i3.NgSwitchDefault], [typeof ChatWidgetComponent]>;
|
|
38
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ChatWidgetModule>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare class GenesysScriptComponent {
|
|
42
|
+
private scriptElement;
|
|
43
|
+
private _deploymentId;
|
|
44
|
+
get deploymentId(): string;
|
|
45
|
+
set deploymentId(value: string);
|
|
46
|
+
private _environment;
|
|
47
|
+
get environment(): string;
|
|
48
|
+
set environment(value: string);
|
|
49
|
+
private _genesysScriptUrl;
|
|
50
|
+
get genesysScriptUrl(): string;
|
|
51
|
+
set genesysScriptUrl(value: string);
|
|
52
|
+
private updateScriptTag;
|
|
53
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GenesysScriptComponent, never>;
|
|
54
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GenesysScriptComponent, "lib-genesys-script", never, { "deploymentId": { "alias": "deploymentId"; "required": true; }; "environment": { "alias": "environment"; "required": false; }; "genesysScriptUrl": { "alias": "genesysScriptUrl"; "required": false; }; }, {}, never, never, true, never>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
declare class AuviousCobrowseComponent {
|
|
58
|
+
connectionMessage: string;
|
|
59
|
+
private _applicationId;
|
|
60
|
+
get applicationId(): string;
|
|
61
|
+
set applicationId(value: string);
|
|
62
|
+
private _isTalkdeskChatEnabled;
|
|
63
|
+
get isTalkdeskChatEnabled(): boolean;
|
|
64
|
+
set isTalkdeskChatEnabled(value: boolean);
|
|
65
|
+
private _primaryColor;
|
|
66
|
+
get primaryColor(): string;
|
|
67
|
+
set primaryColor(value: string);
|
|
68
|
+
private _accentColor;
|
|
69
|
+
get accentColor(): string;
|
|
70
|
+
set accentColor(value: string);
|
|
71
|
+
adjustFloatingMargin(): void;
|
|
72
|
+
private initializeCobrowse;
|
|
73
|
+
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>;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export { AuviousCobrowseComponent, ChatWidgetComponent, ChatWidgetModule, ChatWidgetType, GenesysScriptComponent };
|
|
78
|
+
export type { ChatConfig };
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@corvesta/chat-widget",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^
|
|
6
|
-
"@angular/core": "^
|
|
5
|
+
"@angular/common": "^20.0.0",
|
|
6
|
+
"@angular/core": "^20.0.0"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"tslib": "^2.3.0"
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./components/chat-widget/chat-widget.component";
|
|
3
|
-
import * as i2 from "./components/talkdesk-chat/talkdesk-chat.component";
|
|
4
|
-
import * as i3 from "@angular/common";
|
|
5
|
-
export declare class ChatWidgetModule {
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ChatWidgetModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ChatWidgetModule, [typeof i1.ChatWidgetComponent, typeof i2.TalkdeskChatComponent], [typeof i3.NgSwitch, typeof i3.NgSwitchCase, typeof i3.NgSwitchDefault], [typeof i1.ChatWidgetComponent]>;
|
|
8
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<ChatWidgetModule>;
|
|
9
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class AuviousCobrowseComponent {
|
|
3
|
-
connectionMessage: string;
|
|
4
|
-
private _applicationId;
|
|
5
|
-
get applicationId(): string;
|
|
6
|
-
set applicationId(value: string);
|
|
7
|
-
private _isTalkdeskChatEnabled;
|
|
8
|
-
get isTalkdeskChatEnabled(): boolean;
|
|
9
|
-
set isTalkdeskChatEnabled(value: boolean);
|
|
10
|
-
private _primaryColor;
|
|
11
|
-
get primaryColor(): string;
|
|
12
|
-
set primaryColor(value: string);
|
|
13
|
-
private _accentColor;
|
|
14
|
-
get accentColor(): string;
|
|
15
|
-
set accentColor(value: string);
|
|
16
|
-
adjustFloatingMargin(): void;
|
|
17
|
-
private initializeCobrowse;
|
|
18
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AuviousCobrowseComponent, never>;
|
|
19
|
-
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>;
|
|
20
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ChatWidgetType } from '../../models/chat-widget-type';
|
|
2
|
-
import { ChatConfig } from '../../models/chat-config';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class ChatWidgetComponent {
|
|
5
|
-
chatType: ChatWidgetType;
|
|
6
|
-
chatConfig: ChatConfig;
|
|
7
|
-
protected readonly ChatWidgetType: typeof ChatWidgetType;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ChatWidgetComponent, never>;
|
|
9
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ChatWidgetComponent, "lib-chat-widget", never, { "chatType": { "alias": "chatType"; "required": false; }; "chatConfig": { "alias": "chatConfig"; "required": false; }; }, {}, never, never, false, never>;
|
|
10
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class GenesysScriptComponent {
|
|
3
|
-
private scriptElement;
|
|
4
|
-
private _deploymentId;
|
|
5
|
-
get deploymentId(): string;
|
|
6
|
-
set deploymentId(value: string);
|
|
7
|
-
private _environment;
|
|
8
|
-
get environment(): string;
|
|
9
|
-
set environment(value: string);
|
|
10
|
-
private _genesysScriptUrl;
|
|
11
|
-
get genesysScriptUrl(): string;
|
|
12
|
-
set genesysScriptUrl(value: string);
|
|
13
|
-
private updateScriptTag;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GenesysScriptComponent, never>;
|
|
15
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GenesysScriptComponent, "lib-genesys-script", never, { "deploymentId": { "alias": "deploymentId"; "required": true; }; "environment": { "alias": "environment"; "required": false; }; "genesysScriptUrl": { "alias": "genesysScriptUrl"; "required": false; }; }, {}, never, never, true, never>;
|
|
16
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class TalkdeskChatComponent implements OnInit {
|
|
4
|
-
chatClientId: string;
|
|
5
|
-
chatClientRegion: string;
|
|
6
|
-
chatBranding: any;
|
|
7
|
-
constructor();
|
|
8
|
-
ngOnInit(): void;
|
|
9
|
-
private createTalkDeskWidget;
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TalkdeskChatComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TalkdeskChatComponent, "lib-talkdesk-chat", never, { "chatClientId": { "alias": "chatClientId"; "required": false; }; "chatClientRegion": { "alias": "chatClientRegion"; "required": false; }; "chatBranding": { "alias": "chatBranding"; "required": false; }; }, {}, never, never, false, never>;
|
|
12
|
-
}
|
package/public-api.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export * from './lib/components/chat-widget/chat-widget.component';
|
|
2
|
-
export * from './lib/chat-widget.module';
|
|
3
|
-
export * from './lib/models/chat-config';
|
|
4
|
-
export * from './lib/models/chat-widget-type';
|
|
5
|
-
export * from './lib/components/genesys-script/genesys-script.component';
|
|
6
|
-
export * from './lib/components/auvious-cobrowse/auvious-cobrowse.component';
|