@corvesta/chat-widget 19.0.0 → 19.1.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.
package/README.md
CHANGED
|
@@ -1,24 +1,120 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Chat Widget Library
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
### What is this repository for?
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
* This repository provides a unified chat widget library supporting multiple chat platforms
|
|
6
|
+
* This component should be used across portals to allow for consistent chat functionality and easy integration of different chat providers
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
> Note: Don't forget to add `--project chat-widget` or else it will be added to the default project in your `angular.json` file.
|
|
8
|
+
### Features
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
**Multi-Platform Support**<br>
|
|
11
|
+
Using the `ChatWidgetType` enum, you can easily switch between different chat platforms including Talkdesk and Genesys, or disable chat entirely.
|
|
12
|
+
|
|
13
|
+
**Co-browsing Integration**<br>
|
|
14
|
+
Built-in support for Auvious co-browsing functionality that can be configured to work alongside chat widgets with automatic margin adjustments.
|
|
15
|
+
|
|
16
|
+
**Dynamic Script Loading**<br>
|
|
17
|
+
All chat platforms are loaded dynamically, ensuring optimal performance by only loading the necessary scripts when needed.
|
|
18
|
+
|
|
19
|
+
**Flexible Configuration**<br>
|
|
20
|
+
Each chat platform can be configured independently through the `ChatConfig` interface, allowing for customized branding, regions, and client settings.
|
|
21
|
+
|
|
22
|
+
**CSS Variable Integration**<br>
|
|
23
|
+
Automatic CSS variable management for proper widget positioning and responsive design integration.
|
|
24
|
+
|
|
25
|
+
### Components
|
|
26
|
+
|
|
27
|
+
**ChatWidgetComponent**<br>
|
|
28
|
+
Main orchestrator component that renders different chat widgets based on configuration. Uses Angular's ngSwitch to conditionally display chat implementations.
|
|
29
|
+
|
|
30
|
+
**TalkdeskChatComponent**<br>
|
|
31
|
+
Implements Talkdesk chat widget functionality with full SDK integration and customizable branding options.
|
|
32
|
+
|
|
33
|
+
**GenesysScriptComponent**<br>
|
|
34
|
+
Dynamically injects Genesys chat scripts with configurable environments and deployment settings.
|
|
35
|
+
|
|
36
|
+
**AuviousCobrowseComponent**<br>
|
|
37
|
+
Provides co-browsing functionality through the Auvious platform with automatic chat widget integration.
|
|
38
|
+
|
|
39
|
+
### How do I get set up?
|
|
40
|
+
|
|
41
|
+
#### Local Development
|
|
42
|
+
|
|
43
|
+
* Run `ng build chat-widget --watch` from the main project to build in watch mode
|
|
44
|
+
* Assuming the dependency is already in the portal's `package.json`, add the following code to your `tsconfig.json` file under paths.
|
|
45
|
+
Double check that the relative path used for the chat widget library matches your repository location
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
"@angular/*": [
|
|
49
|
+
"./node_modules/@angular/*"
|
|
50
|
+
],
|
|
51
|
+
"@corvesta/chat-widget": [
|
|
52
|
+
"../chat-widget/dist/corvesta/chat-widget"
|
|
53
|
+
]
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
* If the package is not already installed then run `npm install "../chat-widget/dist/corvesta/chat-widget"`, again making sure that the path matches for the chat-widget
|
|
57
|
+
|
|
58
|
+
#### Usage Example
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
// In your component
|
|
62
|
+
export class AppComponent {
|
|
63
|
+
chatType = ChatWidgetType.TALKDESK;
|
|
64
|
+
chatConfig: ChatConfig = {
|
|
65
|
+
chatClientId: 'your-client-id',
|
|
66
|
+
chatClientRegion: 'us-east-1',
|
|
67
|
+
chatBranding: {
|
|
68
|
+
primaryColor: '#007bff',
|
|
69
|
+
// ... other branding options
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
```html
|
|
76
|
+
<!-- In your template -->
|
|
77
|
+
<lib-chat-widget
|
|
78
|
+
[chatType]="chatType"
|
|
79
|
+
[chatConfig]="chatConfig">
|
|
80
|
+
</lib-chat-widget>
|
|
81
|
+
|
|
82
|
+
<!-- For co-browsing -->
|
|
83
|
+
<lib-auvious-cobrowse
|
|
84
|
+
applicationId="your-app-id"
|
|
85
|
+
[isTalkdeskChatEnabled]="chatType === ChatWidgetType.TALKDESK">
|
|
86
|
+
</lib-auvious-cobrowse>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Relevant Models
|
|
90
|
+
|
|
91
|
+
**ChatConfig**
|
|
92
|
+
|
|
93
|
+
```typescript
|
|
94
|
+
interface ChatConfig {
|
|
95
|
+
chatClientId: string;
|
|
96
|
+
chatClientRegion: string;
|
|
97
|
+
chatBranding: any;
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**ChatWidgetType**
|
|
102
|
+
|
|
103
|
+
```typescript
|
|
104
|
+
enum ChatWidgetType {
|
|
105
|
+
OFF = 'OFF',
|
|
106
|
+
TALKDESK = 'TALKDESK'
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Build
|
|
11
111
|
|
|
12
112
|
Run `ng build chat-widget` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
113
|
|
|
14
|
-
|
|
114
|
+
### Publishing
|
|
15
115
|
|
|
16
116
|
After building your library with `ng build chat-widget`, go to the dist folder `cd dist/chat-widget` and run `npm publish`.
|
|
17
117
|
|
|
18
|
-
|
|
118
|
+
### Running unit tests
|
|
19
119
|
|
|
20
120
|
Run `ng test chat-widget` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
21
|
-
|
|
22
|
-
## Further help
|
|
23
|
-
|
|
24
|
-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
|
@@ -11,7 +11,8 @@ var ChatWidgetType;
|
|
|
11
11
|
})(ChatWidgetType || (ChatWidgetType = {}));
|
|
12
12
|
|
|
13
13
|
class TalkdeskChatComponent {
|
|
14
|
-
constructor() {
|
|
14
|
+
constructor() {
|
|
15
|
+
}
|
|
15
16
|
ngOnInit() {
|
|
16
17
|
this.createTalkDeskWidget();
|
|
17
18
|
}
|
|
@@ -56,10 +57,10 @@ class TalkdeskChatComponent {
|
|
|
56
57
|
};
|
|
57
58
|
})(window, document, 'tdWebchat', { touchpointId: this.chatClientId, accountId: '', region: this.chatClientRegion }, { ...this.chatBranding });
|
|
58
59
|
}
|
|
59
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
60
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
60
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TalkdeskChatComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
61
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TalkdeskChatComponent, isStandalone: false, selector: "lib-talkdesk-chat", inputs: { chatClientId: "chatClientId", chatClientRegion: "chatClientRegion", chatBranding: "chatBranding" }, ngImport: i0, template: '', isInline: true, styles: [""] }); }
|
|
61
62
|
}
|
|
62
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TalkdeskChatComponent, decorators: [{
|
|
63
64
|
type: Component,
|
|
64
65
|
args: [{ selector: 'lib-talkdesk-chat', template: '', standalone: false }]
|
|
65
66
|
}], ctorParameters: () => [], propDecorators: { chatClientId: [{
|
|
@@ -74,8 +75,8 @@ class ChatWidgetComponent {
|
|
|
74
75
|
constructor() {
|
|
75
76
|
this.ChatWidgetType = ChatWidgetType;
|
|
76
77
|
}
|
|
77
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
78
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
78
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ChatWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
79
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: ChatWidgetComponent, isStandalone: false, selector: "lib-chat-widget", inputs: { chatType: "chatType", chatConfig: "chatConfig" }, ngImport: i0, template: `
|
|
79
80
|
<ng-container [ngSwitch]="chatType">
|
|
80
81
|
<lib-talkdesk-chat *ngSwitchCase="ChatWidgetType.TALKDESK"
|
|
81
82
|
[chatBranding]="chatConfig.chatBranding"
|
|
@@ -86,7 +87,7 @@ class ChatWidgetComponent {
|
|
|
86
87
|
</ng-container>
|
|
87
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"] }] }); }
|
|
88
89
|
}
|
|
89
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ChatWidgetComponent, decorators: [{
|
|
90
91
|
type: Component,
|
|
91
92
|
args: [{ selector: 'lib-chat-widget', template: `
|
|
92
93
|
<ng-container [ngSwitch]="chatType">
|
|
@@ -105,14 +106,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImpor
|
|
|
105
106
|
}] } });
|
|
106
107
|
|
|
107
108
|
class ChatWidgetModule {
|
|
108
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
109
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
109
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ChatWidgetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
110
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: ChatWidgetModule, declarations: [ChatWidgetComponent,
|
|
110
111
|
TalkdeskChatComponent], imports: [NgSwitch,
|
|
111
112
|
NgSwitchCase,
|
|
112
113
|
NgSwitchDefault], exports: [ChatWidgetComponent] }); }
|
|
113
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
114
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ChatWidgetModule }); }
|
|
114
115
|
}
|
|
115
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ChatWidgetModule, decorators: [{
|
|
116
117
|
type: NgModule,
|
|
117
118
|
args: [{
|
|
118
119
|
declarations: [
|
|
@@ -190,10 +191,10 @@ class GenesysScriptComponent {
|
|
|
190
191
|
// Append the new script
|
|
191
192
|
document.head.appendChild(this.scriptElement);
|
|
192
193
|
}
|
|
193
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
194
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
194
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GenesysScriptComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
195
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: GenesysScriptComponent, isStandalone: true, selector: "lib-genesys-script", inputs: { deploymentId: "deploymentId", environment: "environment", genesysScriptUrl: "genesysScriptUrl" }, ngImport: i0, template: '', isInline: true, styles: [""] }); }
|
|
195
196
|
}
|
|
196
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
197
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GenesysScriptComponent, decorators: [{
|
|
197
198
|
type: Component,
|
|
198
199
|
args: [{ selector: 'lib-genesys-script', imports: [], template: '' }]
|
|
199
200
|
}], propDecorators: { deploymentId: [{
|
|
@@ -205,6 +206,116 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImpor
|
|
|
205
206
|
type: Input
|
|
206
207
|
}] } });
|
|
207
208
|
|
|
209
|
+
class AuviousCobrowseComponent {
|
|
210
|
+
constructor() {
|
|
211
|
+
// The message displayed above the code input field.
|
|
212
|
+
this.connectionMessage = '';
|
|
213
|
+
// Configuration for the application ID, which determines which application the widget will accept connections from.
|
|
214
|
+
this._applicationId = '';
|
|
215
|
+
// Configuration for shifting the widget to the right when Talkdesk Chat is enabled.
|
|
216
|
+
this._isTalkdeskChatEnabled = false;
|
|
217
|
+
// Configuration for customizing the widget colors, mainly effecting the icon color.
|
|
218
|
+
this._primaryColor = 'black';
|
|
219
|
+
// Configuration for customizing the widget colors, mainly effecting the button color within the popup.
|
|
220
|
+
this._accentColor = 'black';
|
|
221
|
+
}
|
|
222
|
+
get applicationId() {
|
|
223
|
+
return this._applicationId;
|
|
224
|
+
}
|
|
225
|
+
set applicationId(value) {
|
|
226
|
+
this._applicationId = value;
|
|
227
|
+
if (this._applicationId) {
|
|
228
|
+
this.initializeCobrowse();
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
get isTalkdeskChatEnabled() {
|
|
232
|
+
return this._isTalkdeskChatEnabled;
|
|
233
|
+
}
|
|
234
|
+
set isTalkdeskChatEnabled(value) {
|
|
235
|
+
this._isTalkdeskChatEnabled = value;
|
|
236
|
+
this.adjustFloatingMargin();
|
|
237
|
+
}
|
|
238
|
+
get primaryColor() {
|
|
239
|
+
return this._primaryColor;
|
|
240
|
+
}
|
|
241
|
+
set primaryColor(value) {
|
|
242
|
+
this._primaryColor = value;
|
|
243
|
+
if (this._primaryColor) {
|
|
244
|
+
document.documentElement.style.setProperty('--av-color-primary', this._primaryColor);
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
document.documentElement.style.setProperty('--av-color-primary', 'black');
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
get accentColor() {
|
|
251
|
+
return this._accentColor;
|
|
252
|
+
}
|
|
253
|
+
set accentColor(value) {
|
|
254
|
+
this._accentColor = value;
|
|
255
|
+
if (this._accentColor) {
|
|
256
|
+
document.documentElement.style.setProperty('--av-color-accent', this._accentColor);
|
|
257
|
+
}
|
|
258
|
+
else {
|
|
259
|
+
document.documentElement.style.setProperty('--av-color-accent', 'black');
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
adjustFloatingMargin() {
|
|
263
|
+
document.documentElement.style.setProperty('--av-floating-margin-right', this._isTalkdeskChatEnabled ? '80px' : '20px');
|
|
264
|
+
}
|
|
265
|
+
initializeCobrowse() {
|
|
266
|
+
const defaultScript = document.createElement('script');
|
|
267
|
+
defaultScript.type = 'module';
|
|
268
|
+
defaultScript.src = 'https://auvious.video/widget/dist/auvious/auvious.esm.js';
|
|
269
|
+
const fallbackScript = document.createElement('script');
|
|
270
|
+
fallbackScript.noModule = true;
|
|
271
|
+
fallbackScript.src = 'https://auvious.video/widget/dist/auvious/auvious.js';
|
|
272
|
+
document.head.append(defaultScript, fallbackScript);
|
|
273
|
+
const widgetOptions = {
|
|
274
|
+
'application-id': this._applicationId,
|
|
275
|
+
'active-widgets': 'cobrowse',
|
|
276
|
+
'application-verify-source': true
|
|
277
|
+
};
|
|
278
|
+
const showWidget = () => {
|
|
279
|
+
// create our widget
|
|
280
|
+
const widget = document.createElement('app-auvious-widget');
|
|
281
|
+
// get all the widget options and pass it to our widget.
|
|
282
|
+
for (const key of Object.keys(widgetOptions)) {
|
|
283
|
+
// @ts-ignore
|
|
284
|
+
const value = widgetOptions[key];
|
|
285
|
+
widget.setAttribute(key, value);
|
|
286
|
+
}
|
|
287
|
+
if (this.connectionMessage) {
|
|
288
|
+
// @ts-ignore
|
|
289
|
+
widget.setTranslations({ 'Please enter the 7-digit code provided by the agent.': this.connectionMessage }, 'en');
|
|
290
|
+
}
|
|
291
|
+
// add the newly created widget to the body.
|
|
292
|
+
document.body.appendChild(widget);
|
|
293
|
+
};
|
|
294
|
+
(async () => {
|
|
295
|
+
await customElements.whenDefined('app-auvious-widget');
|
|
296
|
+
showWidget();
|
|
297
|
+
})();
|
|
298
|
+
}
|
|
299
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AuviousCobrowseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
300
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", 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
|
+
}
|
|
302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AuviousCobrowseComponent, decorators: [{
|
|
303
|
+
type: Component,
|
|
304
|
+
args: [{ selector: 'lib-auvious-cobrowse', imports: [], template: '' }]
|
|
305
|
+
}], propDecorators: { connectionMessage: [{
|
|
306
|
+
type: Input
|
|
307
|
+
}], applicationId: [{
|
|
308
|
+
type: Input,
|
|
309
|
+
args: [{ required: true }]
|
|
310
|
+
}], isTalkdeskChatEnabled: [{
|
|
311
|
+
type: Input,
|
|
312
|
+
args: [{ required: true }]
|
|
313
|
+
}], primaryColor: [{
|
|
314
|
+
type: Input
|
|
315
|
+
}], accentColor: [{
|
|
316
|
+
type: Input
|
|
317
|
+
}] } });
|
|
318
|
+
|
|
208
319
|
/*
|
|
209
320
|
* Public API Surface of chat-widget
|
|
210
321
|
*/
|
|
@@ -213,5 +324,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImpor
|
|
|
213
324
|
* Generated bundle index. Do not edit.
|
|
214
325
|
*/
|
|
215
326
|
|
|
216
|
-
export { ChatWidgetComponent, ChatWidgetModule, ChatWidgetType, GenesysScriptComponent };
|
|
327
|
+
export { AuviousCobrowseComponent, ChatWidgetComponent, ChatWidgetModule, ChatWidgetType, GenesysScriptComponent };
|
|
217
328
|
//# sourceMappingURL=corvesta-chat-widget.mjs.map
|
|
@@ -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/public-api.ts","../../../../projects/corvesta/chat-widget/src/corvesta-chat-widget.ts"],"sourcesContent":["export enum ChatWidgetType {\r\n OFF = 'OFF',\r\n // GENESYS = 'GENESYS',\r\n TALKDESK = '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 @Input() chatClientId!: string;\r\n @Input() chatClientRegion!: string;\r\n @Input() chatBranding!: any;\r\n\r\n constructor() { }\r\n\r\n public ngOnInit (): void {\r\n this.createTalkDeskWidget();\r\n }\r\n\r\n private createTalkDeskWidget(): void {\r\n\r\n let webchat;\r\n ((window, document, node, props, configs) => {\r\n if ((window as any).TalkdeskChatSDK) {\r\n console.error('TalkdeskChatSDK already included');\r\n return;\r\n }\r\n const divContainer = document.createElement ('div');\r\n divContainer.id = node;\r\n document.body.appendChild(divContainer);\r\n const src = `https://talkdeskchatsdk.talkdeskapp.com/talkdeskchatsdk.js`;\r\n const script: HTMLScriptElement = document.createElement ('script');\r\n const firstScriptTag: HTMLScriptElement = document.getElementsByTagName ('script')[0];\r\n script.type = 'text/javascript';\r\n script.charset = 'UTF-8';\r\n script.id = 'tdwebchatscript';\r\n script.src = src;\r\n script.async = true;\r\n firstScriptTag.parentNode?.insertBefore(script, firstScriptTag);\r\n script.onload = () => {\r\n webchat = TalkdeskChatSDK(node, props);\r\n webchat.init(configs);\r\n /*\r\n * Send custom data from your website to TalkDesk!\r\n * If you would like to do it, you need to remove the following commented code and\r\n * modify the webchat.setContextParam parameters to pass in the data you need.\r\n */\r\n /*function setContext() {\r\n webchat.setContextParam({ \"var1\": \"value1\", \"var2\": \"value2\", \"var3\": 100 })\r\n }\r\n // Send data when the chat conversation is initiated\r\n webchat.onConversationStart = function() {\r\n setContext()\r\n }\r\n // Send data when the chat widget is open\r\n webchat.onOpenWebchat = function() {\r\n setContext()\r\n }*/\r\n };\r\n })(\r\n window,\r\n document,\r\n 'tdWebchat',\r\n { touchpointId: this.chatClientId, accountId: '', region: this.chatClientRegion },\r\n { ...this.chatBranding}\r\n );\r\n }\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 @Input() chatType!: ChatWidgetType;\r\n @Input() chatConfig!: ChatConfig;\r\n\r\n protected 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\r\n@NgModule({\r\n declarations: [\r\n ChatWidgetComponent,\r\n TalkdeskChatComponent\r\n ],\r\n imports: [\r\n NgSwitch,\r\n NgSwitchCase,\r\n NgSwitchDefault\r\n ],\r\n exports: [\r\n ChatWidgetComponent\r\n ]\r\n})\r\nexport class ChatWidgetModule { }\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","/*\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\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;AACxB,IAAA,cAAA,CAAA,KAAA,CAAA,GAAA,KAAW;;AAEX,IAAA,cAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACvB,CAAC,EAJW,cAAc,KAAd,cAAc,GAIzB,EAAA,CAAA,CAAA;;MCMY,qBAAqB,CAAA;AAKhC,IAAA,WAAA,GAAA;IAEO,QAAQ,GAAA;QACb,IAAI,CAAC,oBAAoB,EAAE;;IAGrB,oBAAoB,GAAA;AAE1B,QAAA,IAAI,OAAO;QACX,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,KAAI;AAC1C,YAAA,IAAK,MAAc,CAAC,eAAe,EAAE;AACnC,gBAAA,OAAO,CAAC,KAAK,CAAC,kCAAkC,CAAC;gBACjD;;YAEF,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAE,KAAK,CAAC;AACnD,YAAA,YAAY,CAAC,EAAE,GAAG,IAAI;AACtB,YAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC;YACvC,MAAM,GAAG,GAAG,CAAA,0DAAA,CAA4D;YACxE,MAAM,MAAM,GAAsB,QAAQ,CAAC,aAAa,CAAE,QAAQ,CAAC;YACnE,MAAM,cAAc,GAAsB,QAAQ,CAAC,oBAAoB,CAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;AACrF,YAAA,MAAM,CAAC,IAAI,GAAG,iBAAiB;AAC/B,YAAA,M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AA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,0LAHxB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAGA,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBANlC,SAAS;+BACC,oBAAoB,EAAA,OAAA,EACrB,EAAE,EAAA,QAAA,EACD,EAAE,EAAA;8BAaR,YAAY,EAAA,CAAA;sBADf,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAarB,WAAW,EAAA,CAAA;sBADd;gBAaG,gBAAgB,EAAA,CAAA;sBADnB;;;ACzCF;;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/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,YAAA,IAAK,MAAc,CAAC,eAAe,EAAE;AACpC,gBAAA,OAAO,CAAC,KAAK,CAAC,kCAAkC,CAAC;gBACjD;;YAED,MAAM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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;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -3,3 +3,4 @@ export * from './lib/chat-widget.module';
|
|
|
3
3
|
export * from './lib/models/chat-config';
|
|
4
4
|
export * from './lib/models/chat-widget-type';
|
|
5
5
|
export * from './lib/components/genesys-script/genesys-script.component';
|
|
6
|
+
export * from './lib/components/auvious-cobrowse/auvious-cobrowse.component';
|