@clikvn/agent-widget-embedded 1.1.11 → 1.1.12-1.1-dev

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.
@@ -0,0 +1,12 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(yarn lint:fix)",
5
+ "Bash(yarn build)",
6
+ "Bash(yarn lint src/components/Chat/Message.tsx src/utils/toolUtils.ts src/utils/messageUtils.ts)",
7
+ "Bash(yarn lint src/components/Chat/ProductList.tsx)"
8
+ ],
9
+ "deny": [],
10
+ "ask": []
11
+ }
12
+ }
@@ -1,9 +1,12 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="JAVA_MODULE" version="4">
3
- <component name="NewModuleRootManager" inherit-compiler-output="true">
4
- <exclude-output />
5
- <content url="file://$MODULE_DIR$" />
6
- <orderEntry type="inheritedJdk" />
7
- <orderEntry type="sourceFolder" forTests="false" />
8
- </component>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="WEB_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$">
5
+ <excludeFolder url="file://$MODULE_DIR$/.tmp" />
6
+ <excludeFolder url="file://$MODULE_DIR$/temp" />
7
+ <excludeFolder url="file://$MODULE_DIR$/tmp" />
8
+ </content>
9
+ <orderEntry type="inheritedJdk" />
10
+ <orderEntry type="sourceFolder" forTests="false" />
11
+ </component>
9
12
  </module>
@@ -0,0 +1,59 @@
1
+ <component name="ProjectCodeStyleConfiguration">
2
+ <code_scheme name="Project" version="173">
3
+ <HTMLCodeStyleSettings>
4
+ <option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
5
+ </HTMLCodeStyleSettings>
6
+ <JSCodeStyleSettings version="0">
7
+ <option name="FORCE_SEMICOLON_STYLE" value="true" />
8
+ <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
9
+ <option name="USE_DOUBLE_QUOTES" value="false" />
10
+ <option name="FORCE_QUOTE_STYlE" value="true" />
11
+ <option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
12
+ <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
13
+ <option name="SPACES_WITHIN_IMPORTS" value="true" />
14
+ </JSCodeStyleSettings>
15
+ <TypeScriptCodeStyleSettings version="0">
16
+ <option name="FORCE_SEMICOLON_STYLE" value="true" />
17
+ <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
18
+ <option name="USE_DOUBLE_QUOTES" value="false" />
19
+ <option name="FORCE_QUOTE_STYlE" value="true" />
20
+ <option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
21
+ <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
22
+ <option name="SPACES_WITHIN_IMPORTS" value="true" />
23
+ </TypeScriptCodeStyleSettings>
24
+ <VueCodeStyleSettings>
25
+ <option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
26
+ <option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
27
+ </VueCodeStyleSettings>
28
+ <codeStyleSettings language="HTML">
29
+ <option name="SOFT_MARGINS" value="80" />
30
+ <indentOptions>
31
+ <option name="INDENT_SIZE" value="2" />
32
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
33
+ <option name="TAB_SIZE" value="2" />
34
+ </indentOptions>
35
+ </codeStyleSettings>
36
+ <codeStyleSettings language="JavaScript">
37
+ <option name="SOFT_MARGINS" value="80" />
38
+ <indentOptions>
39
+ <option name="INDENT_SIZE" value="2" />
40
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
41
+ <option name="TAB_SIZE" value="2" />
42
+ </indentOptions>
43
+ </codeStyleSettings>
44
+ <codeStyleSettings language="TypeScript">
45
+ <option name="SOFT_MARGINS" value="80" />
46
+ <indentOptions>
47
+ <option name="INDENT_SIZE" value="2" />
48
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
49
+ <option name="TAB_SIZE" value="2" />
50
+ </indentOptions>
51
+ </codeStyleSettings>
52
+ <codeStyleSettings language="Vue">
53
+ <option name="SOFT_MARGINS" value="80" />
54
+ <indentOptions>
55
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
56
+ </indentOptions>
57
+ </codeStyleSettings>
58
+ </code_scheme>
59
+ </component>
@@ -1,5 +1,5 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <state>
3
- <option name="PREFERRED_PROJECT_CODE_STYLE" value="Default copy" />
4
- </state>
1
+ <component name="ProjectCodeStyleConfiguration">
2
+ <state>
3
+ <option name="USE_PER_PROJECT_SETTINGS" value="true" />
4
+ </state>
5
5
  </component>
@@ -1,36 +1,6 @@
1
1
  <component name="InspectionProjectProfileManager">
2
2
  <profile version="1.0">
3
3
  <option name="myName" value="Project Default" />
4
- <inspection_tool class="AngularAmbiguousComponentTag" enabled="false" level="ERROR" enabled_by_default="false" />
5
- <inspection_tool class="AngularCliAddDependency" enabled="false" level="WARNING" enabled_by_default="false" />
6
- <inspection_tool class="AngularInaccessibleComponentMemberInAotMode" enabled="false" level="WARNING" enabled_by_default="false" />
7
- <inspection_tool class="AngularIncorrectTemplateDefinition" enabled="false" level="ERROR" enabled_by_default="false" />
8
- <inspection_tool class="AngularInsecureBindingToEvent" enabled="false" level="WARNING" enabled_by_default="false" />
9
- <inspection_tool class="AngularInvalidAnimationTriggerAssignment" enabled="false" level="ERROR" enabled_by_default="false" />
10
- <inspection_tool class="AngularInvalidEntryComponent" enabled="false" level="ERROR" enabled_by_default="false" />
11
- <inspection_tool class="AngularInvalidI18nAttribute" enabled="false" level="WARNING" enabled_by_default="false" />
12
- <inspection_tool class="AngularInvalidImportedOrDeclaredSymbol" enabled="false" level="ERROR" enabled_by_default="false" />
13
- <inspection_tool class="AngularInvalidSelector" enabled="false" level="ERROR" enabled_by_default="false" />
14
- <inspection_tool class="AngularInvalidTemplateReferenceVariable" enabled="false" level="ERROR" enabled_by_default="false" />
15
- <inspection_tool class="AngularMissingEventHandler" enabled="false" level="ERROR" enabled_by_default="false" />
16
- <inspection_tool class="AngularMissingOrInvalidDeclarationInModule" enabled="false" level="ERROR" enabled_by_default="false" />
17
- <inspection_tool class="AngularMissingRequiredDirectiveInputBinding" enabled="false" level="ERROR" enabled_by_default="false" />
18
- <inspection_tool class="AngularMultipleStructuralDirectives" enabled="false" level="ERROR" enabled_by_default="false" />
19
- <inspection_tool class="AngularNgOptimizedImage" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
20
- <inspection_tool class="AngularNonEmptyNgContent" enabled="false" level="ERROR" enabled_by_default="false" />
21
- <inspection_tool class="AngularRecursiveModuleImportExport" enabled="false" level="ERROR" enabled_by_default="false" />
22
- <inspection_tool class="AngularUndefinedBinding" enabled="false" level="ERROR" enabled_by_default="false" />
23
- <inspection_tool class="AngularUndefinedModuleExport" enabled="false" level="ERROR" enabled_by_default="false" />
24
- <inspection_tool class="AngularUndefinedTag" enabled="false" level="ERROR" enabled_by_default="false" />
25
4
  <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
26
- <inspection_tool class="MicronautDataMethodInconsistency" enabled="false" level="ERROR" enabled_by_default="false" />
27
- <inspection_tool class="MicronautDataRepositoryMethodParameters" enabled="false" level="WARNING" enabled_by_default="false" />
28
- <inspection_tool class="MicronautDataRepositoryMethodReturnType" enabled="false" level="WARNING" enabled_by_default="false" />
29
- <inspection_tool class="MnCacheAnnotationParameters" enabled="false" level="ERROR" enabled_by_default="false" />
30
- <inspection_tool class="MnInjectionPoints" enabled="false" level="WARNING" enabled_by_default="false" />
31
- <inspection_tool class="MnPropertiesConfig" enabled="false" level="WARNING" enabled_by_default="false" />
32
- <inspection_tool class="MnUnresolvedPathVariable" enabled="false" level="WARNING" enabled_by_default="false" />
33
- <inspection_tool class="MnYamlConfig" enabled="false" level="WARNING" enabled_by_default="false" />
34
- <inspection_tool class="TsLint" enabled="true" level="WARNING" enabled_by_default="true" />
35
5
  </profile>
36
6
  </component>
@@ -1,7 +1,6 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="EslintConfiguration">
4
- <custom-configuration-file used="true" path="$PROJECT_DIR$/.eslintrc" />
5
- <option name="fix-on-save" value="true" />
6
- </component>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="EslintConfiguration">
4
+ <custom-configuration-file used="true" path="$PROJECT_DIR$/.eslintrc" />
5
+ </component>
7
6
  </project>
package/.idea/modules.xml CHANGED
@@ -1,8 +1,8 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/clik-ai-chatbot-embedded.iml" filepath="$PROJECT_DIR$/.idea/clik-ai-chatbot-embedded.iml" />
6
- </modules>
7
- </component>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/clik-ai-chatbot-embedded.iml" filepath="$PROJECT_DIR$/.idea/clik-ai-chatbot-embedded.iml" />
6
+ </modules>
7
+ </component>
8
8
  </project>
@@ -1,8 +1,6 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="PrettierConfiguration">
4
- <option name="myConfigurationMode" value="MANUAL" />
5
- <option name="myRunOnSave" value="true" />
6
- <option name="myRunOnReformat" value="true" />
7
- </component>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="PrettierConfiguration">
4
+ <option name="myConfigurationMode" value="AUTOMATIC" />
5
+ </component>
8
6
  </project>
package/.idea/vcs.xml CHANGED
@@ -1,6 +1,6 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="" vcs="Git" />
5
- </component>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
6
  </project>
package/README.md CHANGED
@@ -1,20 +1,20 @@
1
- <!-- markdownlint-disable MD030 -->
2
-
3
- # Clik Agent Widget Embed
4
-
5
- Javascript library to display Clik Agent Embed on your website
6
-
7
- ```html
8
- <!-- public/index.html -->
9
- <script type="module">
10
- import Agent from 'http://localhost:3000/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
11
- Agent.initWidget({
12
- apiHost: 'https://ci-api.clik.vn/chatbot',
13
- agentId: '6d02b23f-465f-44ec-8766-27a82890a9b8',
14
- overrideConfig: {
15
- chatId: '',
16
- },
17
- });
18
- </script>
19
- <clik-agent-widget></clik-agent-widget>
20
- ```
1
+ <!-- markdownlint-disable MD030 -->
2
+
3
+ # Clik Agent Widget Embed
4
+
5
+ Javascript library to display Clik Agent Embed on your website
6
+
7
+ ```html
8
+ <!-- public/index.html -->
9
+ <script type="module">
10
+ import Agent from 'http://localhost:3000/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
11
+ Agent.initWidget({
12
+ apiHost: 'https://ci-api.clik.vn/chatbot',
13
+ agentId: '6d02b23f-465f-44ec-8766-27a82890a9b8',
14
+ overrideConfig: {
15
+ chatId: '',
16
+ },
17
+ });
18
+ </script>
19
+ <clik-agent-widget></clik-agent-widget>
20
+ ```
@@ -1 +1 @@
1
- {"version":3,"file":"ProductDetail.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/ProductDetail.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAcxE,UAAU,SAAS;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;;AAiQD,wBAAyC"}
1
+ {"version":3,"file":"ProductDetail.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/ProductDetail.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AAcvD,UAAU,SAAS;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;;AAyPD,wBAAyC"}
@@ -1,10 +1,10 @@
1
- import { FC } from 'react';
1
+ import React from 'react';
2
2
  interface PropTypes {
3
3
  productCodes?: string[];
4
4
  tourCode?: string;
5
5
  languageCode?: string;
6
6
  apiUrl?: string;
7
7
  }
8
- declare const ProductList: FC<PropTypes>;
9
- export default ProductList;
8
+ declare const _default: React.NamedExoticComponent<PropTypes>;
9
+ export default _default;
10
10
  //# sourceMappingURL=ProductList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProductList.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/ProductList.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,EAAE,EAA8C,MAAM,OAAO,CAAC;AAkB9E,UAAU,SAAS;IACjB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,SAAS,CA8P9B,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"ProductList.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/ProductList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAkB7D,UAAU,SAAS;IACjB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;;AAkRD,wBAA2C"}
@@ -1 +1 @@
1
- {"version":3,"file":"useChat.d.ts","sourceRoot":"","sources":["../../src/hooks/useChat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AASnD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAEL,eAAe,EAKhB,MAAM,uBAAuB,CAAC;AAI/B,KAAK,SAAS,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,eAAe,EAAE,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC;IAC7B,WAAW,EAAE,CAAC,QAAQ,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;IACnD,YAAY,EAAE,CAAC,KAAK,CAAC,EAAE;QAAE,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,IAAI,CAAC;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,WAAW,EAAE,cAAc,EAAE,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,OAAO,UAAW,SAAS,KAAG,UAqR1C,CAAC"}
1
+ {"version":3,"file":"useChat.d.ts","sourceRoot":"","sources":["../../src/hooks/useChat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AASnD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAEL,eAAe,EAKhB,MAAM,uBAAuB,CAAC;AAI/B,KAAK,SAAS,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,eAAe,EAAE,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC;IAC7B,WAAW,EAAE,CAAC,QAAQ,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;IACnD,YAAY,EAAE,CAAC,KAAK,CAAC,EAAE;QAAE,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,IAAI,CAAC;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,WAAW,EAAE,cAAc,EAAE,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,OAAO,UAAW,SAAS,KAAG,UAuR1C,CAAC"}
package/dist/index.html CHANGED
@@ -1,65 +1,65 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
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:49651/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
9
- Agent.initWidget({
10
- elementName: 'clik-agent-simplified-widget',
11
- apiHost: 'https://ci-api.clik.vn/chatbot',
12
- agentId: 'fe4cf6a9-fa43-4986-bc6f-df67092568c6',
4
+ <meta charset="UTF-8">
5
+ <title></title>
6
+ <style>
7
+ clik-agent-widget {
8
+ display: block;
9
+ height: 100vh;
10
+ }
11
+ </style>
12
+ <!-- <script type="module">
13
+ import Agent from 'http://localhost:3000/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
14
+ Agent.initWidget({
15
+ apiHost: 'https://ci-api.clik.vn/chatbot',
16
+ agentId: '697a9f37-2ed6-4d90-b540-6682eabdc5eb',
17
+ overrideConfig: {
18
+ chatId: '88107d47-75eb-42c4-abb2-e54bfbeea5c',
13
19
  overrideConfig: {
14
- chatId: 'f6a855d2-7edc-4fb8-9dd3-74204aa1e2a2',
15
- skipSuggestion: true,
16
- overrideConfig: {
17
- vars: {
18
- TOUR_CODE: 'TOUR_K9EK76KTX7K4',
19
- LANGUAGE: 'VN',
20
- CLIK_GRAPHQL_API: 'https://api.clik.vn/graphql',
21
- CLIK_VIRTUALTOUR_API: 'https://api.clik.vn/vt360'
22
- }
20
+ vars: {
21
+ SHOWROOM_CODE: 'SHR_9FVXUTV62G47',
22
+ TOUR_CODE: 'TOUR_7YUL2ALGFL94',
23
+ LANGUAGE: 'VN',
24
+ CLIK_GRAPHQL_API: 'https://ci-api.clik.vn/graphql',
25
+ CLIK_VIRTUALTOUR_API: 'https://ci-api.clik.vn/vt360',
26
+ BRAND_API: 'https://ci-api.clik.vn/showroom',
23
27
  }
24
28
  },
25
- listeners: {
26
- ON_LINK_CLICK: console.log,
27
- ON_CLICK: (arg) => {
28
- console.log('ON_CLICK', arg);
29
- },
30
- 'ON_START_RECORDING': () => {
31
- console.log('ON_START_RECORDING');
32
- },
33
- 'ON_CANCEL_RECORDING': () => {
34
- console.log('ON_CANCEL_RECORDING');
35
- },
36
- 'ON_FINISHED_RECORDING': () => {
37
- console.log('ON_FINISHED_RECORDING');
38
- },
39
- 'ON_SUBMIT_MESSAGE': () => {
40
- console.log('ON_SUBMIT_MESSAGE');
41
- },
42
- 'ON_FINISHED_SUBMITTING_MESSAGE': () => {
43
- console.log('ON_FINISHED_SUBMITTING_MESSAGE');
44
- },
45
- 'ON_PLAY_AUDIO': () => {
46
- console.log('ON_PLAY_AUDIO');
47
- },
48
- 'ON_PAUSE_AUDIO': () => {
49
- console.log('ON_PAUSE_AUDIO');
50
- },
51
- 'ON_ENDED_AUDIO': () => {
52
- console.log('ON_ENDED_AUDIO');
29
+ },
30
+ listeners: {
31
+ ON_LINK_CLICK: console.log,
32
+ CMD_CALLBACK: console.log,
33
+ }
34
+ });
35
+ </script> -->
36
+ <script type="module">
37
+ import Agent from 'http://localhost:3000/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
38
+ Agent.initWidget({
39
+ apiHost: 'https://ci-api.clik.vn/chatbot',
40
+ agentId: 'd4d99930-f01c-4243-b48f-fcbc366197f8',
41
+ overrideConfig: {
42
+ chatId: '88107d47-75eb-42c4-abb2-e54bfbeea5c3',
43
+ overrideConfig: {
44
+ vars: {
45
+ SHOWROOM_CODE: 'SHR_XRUXUDP4JF47',
46
+ TOUR_CODE: 'TOUR_KUFGDEPDTJA4',
47
+ LANGUAGE: 'VN',
48
+ CLIK_GRAPHQL_API: 'https://ci-api.clik.vn/graphql',
49
+ CLIK_VIRTUALTOUR_API: 'https://ci-api.clik.vn/vt360',
50
+ BRAND_API: 'https://ci-api.clik.vn/showroom',
53
51
  }
54
52
  },
55
- onLoaded: (tool) => {
56
- console.log('Chatbot loaded!!!');
57
- window.tool = tool;
53
+ },
54
+ listeners: {
55
+ ON_LINK_CLICK: console.log,
56
+ CMD_CALLBACK: console.log,
58
57
  }
59
- });
60
- </script>
58
+ });
59
+ </script>
60
+
61
61
  </head>
62
- <body style="background-color: #717182">
63
- <clik-agent-simplified-widget></clik-agent-simplified-widget>
62
+ <body>
63
+ <clik-agent-widget></clik-agent-widget>
64
64
  </body>
65
65
  </html>
@@ -1 +1 @@
1
- {"version":3,"file":"agentTraceUtils.d.ts","sourceRoot":"","sources":["../../src/utils/agentTraceUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,MAAM,oBAAoB,CAAC;AAEhE;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAqFtE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,CAqClE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,CAyCnE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAuU3E"}
1
+ {"version":3,"file":"agentTraceUtils.d.ts","sourceRoot":"","sources":["../../src/utils/agentTraceUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,MAAM,oBAAoB,CAAC;AAEhE;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAqFtE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,CAqClE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,CAyCnE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAsU3E"}
package/dist/web.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../src/web.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,YAAY;;UAIsD,CAAC;mBAAqB,CAAC;;;UAAioB,CAAC;mBAAqB,CAAC;;;CAJ/sB,CAAC;AAGzC,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../src/web.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,YAAY;;UAI4C,CAAC;mBAAqB,CAAC;;;UAA0mB,CAAC;mBAAqB,CAAC;;;CAJ9qB,CAAC;AAGzC,eAAe,YAAY,CAAC"}