@clikvn/agent-widget-embedded 1.1.8-dev-05 → 1.1.8-dev-07

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/dist/index.html CHANGED
@@ -1,67 +1,71 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <!-- <meta charset="UTF-8" /> -->
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>Clik Agent Widget - Dev</title>
8
- <script type="module">
9
- import Agent from 'http://localhost:3000/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
10
- Agent.initWidget({
11
- apiHost: 'https://ci-api.clik.vn/chatbot',
12
- agentId: '697a9f37-2ed6-4d90-b540-6682eabdc5eb',
13
- overrideConfig: {
14
- chatId: '420aafc6-ddb6-4a99-9995-ef5b5570a754',
15
- skipSuggestion: true,
16
- overrideConfig: {
17
- vars: {
18
- TOUR_CODE: 'TOUR_FXYCEN7ZZVW6',
19
- LANGUAGE_CODE: 'VN',
20
- // CLIK_VIRTUALTOUR_API: 'https://api.clik.vn/vt360',
21
- SHOWROOM_CODE: 'SHR_9FVXUTV62G47',
22
- SCENE_CODE: 'SCENE_KR3RGEEZZVW6',
23
- CATEGORY_CODE: 'CAT_34DYENUXN6MC',
24
- CLIK_GRAPHQL_API: 'http://localhost:8080/graphql',
25
- USER_LOCALE: 'EN',
26
- USER_IP: '192.168.1.11',
27
- PRODUCT_CODE: '',
28
- USER_ID: 'f80d74fb-15c9-4ff7-8678-5afeb1ae58df',
29
- BRAND_ALIAS: 'an-cuong',
30
- },
31
- },
32
- },
33
- listeners: {
34
- ON_LINK_CLICK: console.log,
35
- },
36
- theme: {
37
- // simplified: true,
38
- autoCloseAudioPlayer: true,
39
- hideAudioMetadata: true,
40
- modeButtonChat: true,
41
- gapInput: 30,
42
- // bookMeetingForm: {
43
- // labelDate: 'Booking Date',
44
- // labelTime: 'Booking Time',
45
- // labelDuration: 'Booking Duration',
46
- // labelChannel: 'Booking Channel',
47
- // labelHost: 'Host',
48
- // },
49
- },
50
- onLoaded: (tool) => {
51
- window.tool = tool;
52
- },
53
- });
54
- </script>
55
- </head>
56
- <body>
57
- <div style="width: 100vw; height: 100vh">
58
- <clik-agent-widget></clik-agent-widget>
59
- </div>
60
- </body>
61
- <style>
62
- html,
63
- body {
64
- font-size: 14px;
65
- }
66
- </style>
67
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Title</title>
7
+ <script type="module">
8
+ import Agent from 'http://localhost:51747/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
9
+ Agent.initWidget({
10
+ apiHost: 'https://ci-api.clik.vn/chatbot',
11
+ agentId: 'fe4cf6a9-fa43-4986-bc6f-df67092568c6',
12
+ overrideConfig: {
13
+ chatId: 'f6a855d2-7edc-4fb8-9dd3-74204aa1e2a2',
14
+ skipSuggestion: true,
15
+ overrideConfig: {
16
+ vars: {
17
+ TOUR_CODE: 'TOUR_K9EK76KTX7K4',
18
+ LANGUAGE: 'VN',
19
+ CLIK_GRAPHQL_API: 'https://api.clik.vn/graphql',
20
+ CLIK_VIRTUALTOUR_API: 'https://api.clik.vn/vt360'
21
+ }
22
+ }
23
+ },
24
+ listeners: {
25
+ ON_LINK_CLICK: console.log,
26
+ ON_CLICK: (arg) => {
27
+ console.log('ON_CLICK', arg);
28
+ },
29
+ 'ON_START_RECORDING': () => {
30
+ console.log('ON_START_RECORDING');
31
+ },
32
+ 'ON_CANCEL_RECORDING': () => {
33
+ console.log('ON_CANCEL_RECORDING');
34
+ },
35
+ 'ON_FINISHED_RECORDING': () => {
36
+ console.log('ON_FINISHED_RECORDING');
37
+ },
38
+ 'ON_SUBMIT_MESSAGE': () => {
39
+ console.log('ON_SUBMIT_MESSAGE');
40
+ },
41
+ 'ON_FINISHED_SUBMITTING_MESSAGE': () => {
42
+ console.log('ON_FINISHED_SUBMITTING_MESSAGE');
43
+ },
44
+ 'ON_PLAY_AUDIO': () => {
45
+ console.log('ON_PLAY_AUDIO');
46
+ },
47
+ 'ON_PAUSE_AUDIO': () => {
48
+ console.log('ON_PAUSE_AUDIO');
49
+ },
50
+ 'ON_ENDED_AUDIO': () => {
51
+ console.log('ON_ENDED_AUDIO');
52
+ }
53
+ },
54
+ theme: {
55
+ modeButtonChat: true,
56
+ simplified: true,
57
+ autoCloseAudioPlayer: true,
58
+ hideAudioMetadata: true,
59
+ noAutoplayMessage: true
60
+ },
61
+ onLoaded: (tool) => {
62
+ console.log('Chatbot loaded!!!');
63
+ window.tool = tool;
64
+ }
65
+ });
66
+ </script>
67
+ </head>
68
+ <body style="background-color: #717182">
69
+ <clik-agent-widget></clik-agent-widget>
70
+ </body>
71
+ </html>
@@ -0,0 +1,11 @@
1
+ {
2
+ "headers": [
3
+ {
4
+ "source" : "**/*.@(jpg|jpeg|gif|png|js)",
5
+ "headers" : [{
6
+ "key" : "Access-Control-Allow-Origin",
7
+ "value" : "*"
8
+ }]
9
+ }
10
+ ]
11
+ }
@@ -7,5 +7,6 @@ export interface BotType {
7
7
  chatflowConfig: any;
8
8
  hidden: boolean;
9
9
  avatar: string;
10
+ showSuggestions: boolean;
10
11
  }
11
12
  //# sourceMappingURL=bot.type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bot.type.d.ts","sourceRoot":"","sources":["../../src/types/bot.type.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,GAAG,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB"}
1
+ {"version":3,"file":"bot.type.d.ts","sourceRoot":"","sources":["../../src/types/bot.type.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,GAAG,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,OAAO,CAAC;CAC1B"}