@clikvn/agent-widget-embedded 1.0.20-dev → 1.0.22-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.
- package/.idea/clik-ai-chatbot-embedded.iml +9 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/inspectionProfiles/Project_Default.xml +36 -0
- package/.idea/jsLinters/eslint.xml +7 -0
- package/.idea/misc.xml +9 -0
- package/.idea/modules.xml +8 -0
- package/.idea/prettier.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/dist/components/Chat/AudioPlayerSimple.d.ts +9 -0
- package/dist/components/Chat/AudioPlayerSimple.d.ts.map +1 -0
- package/dist/components/Chat/MultimodalInputSimple.d.ts +22 -0
- package/dist/components/Chat/MultimodalInputSimple.d.ts.map +1 -0
- package/dist/components/Chat/Sidebar.d.ts +8 -0
- package/dist/components/Chat/Sidebar.d.ts.map +1 -0
- package/dist/components/Chat/Simplified/MultimodalInputSimplified.d.ts.map +1 -1
- package/dist/index.html +44 -15
- package/dist/serve.json +11 -0
- package/dist/web.css +3680 -0
- package/dist/web.js +1 -1
- package/package.json +1 -1
- package/dist/index-old.html +0 -108
|
@@ -0,0 +1,9 @@
|
|
|
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>
|
|
9
|
+
</module>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<component name="InspectionProjectProfileManager">
|
|
2
|
+
<profile version="1.0">
|
|
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
|
+
<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
|
+
</profile>
|
|
36
|
+
</component>
|
package/.idea/misc.xml
ADDED
|
@@ -0,0 +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>
|
|
8
|
+
</project>
|
|
@@ -0,0 +1,8 @@
|
|
|
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>
|
|
8
|
+
</project>
|
package/.idea/vcs.xml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChatMessageType } from '../../types/flowise.type';
|
|
2
|
+
declare const AudioPlayerSimple: ({ message, chatId, autoplay, onClose, }: {
|
|
3
|
+
message: ChatMessageType;
|
|
4
|
+
chatId?: string;
|
|
5
|
+
autoplay?: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default AudioPlayerSimple;
|
|
9
|
+
//# sourceMappingURL=AudioPlayerSimple.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AudioPlayerSimple.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/AudioPlayerSimple.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAI3D,QAAA,MAAM,iBAAiB,4CAKpB;IACD,OAAO,EAAE,eAAe,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,4CAoRA,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { BotType } from '../../types/bot.type';
|
|
3
|
+
import { ChatMessageType, IFileUpload } from '../../types/flowise.type';
|
|
4
|
+
type PropsType = {
|
|
5
|
+
input: string;
|
|
6
|
+
setInput: (value: string) => void;
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
stop: () => void;
|
|
9
|
+
message?: ChatMessageType;
|
|
10
|
+
chatId: string;
|
|
11
|
+
handleSubmit: (event?: {
|
|
12
|
+
preventDefault?: () => void;
|
|
13
|
+
}, files?: IFileUpload[]) => void;
|
|
14
|
+
className?: string;
|
|
15
|
+
bot: BotType | null;
|
|
16
|
+
apiHost: string;
|
|
17
|
+
setEnableTTS: (value: boolean) => void;
|
|
18
|
+
enableTTS: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare const MultimodalInputSimple: FC<PropsType>;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=MultimodalInputSimple.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultimodalInputSimple.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/MultimodalInputSimple.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,EAAE,EAKH,MAAM,OAAO,CAAC;AAKf,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAgBxE,KAAK,SAAS,GAAG;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,CACZ,KAAK,CAAC,EAAE;QAAE,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,EACvC,KAAK,CAAC,EAAE,WAAW,EAAE,KAClB,IAAI,CAAC;IACV,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,SAAS,CA2V/C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/Sidebar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAGrC,UAAU,YAAY;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AASD,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,CAsJpC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultimodalInputSimplified.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/Simplified/MultimodalInputSimplified.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MultimodalInputSimplified.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/Simplified/MultimodalInputSimplified.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,EAAE,EAKH,MAAM,OAAO,CAAC;AAMf,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAe3E,KAAK,SAAS,GAAG;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,CACZ,KAAK,CAAC,EAAE;QAAE,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,EACvC,KAAK,CAAC,EAAE,WAAW,EAAE,KAClB,IAAI,CAAC;IACV,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B,CAAC;AAcF,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,SAAS,CA6jBnD,CAAC"}
|
package/dist/index.html
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
<!
|
|
1
|
+
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
|
-
|
|
4
|
-
<meta charset="UTF-8"
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
5
6
|
<title>Title</title>
|
|
6
7
|
<script type="module">
|
|
7
|
-
import Agent from '
|
|
8
|
+
import Agent from 'https://626d1ebdcb1d.ngrok-free.app/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
|
|
8
9
|
Agent.initWidget({
|
|
9
10
|
apiHost: 'https://ci-api.clik.vn/chatbot',
|
|
10
11
|
agentId: 'fe4cf6a9-fa43-4986-bc6f-df67092568c6',
|
|
@@ -16,27 +17,55 @@
|
|
|
16
17
|
TOUR_CODE: 'TOUR_K9EK76KTX7K4',
|
|
17
18
|
LANGUAGE: 'VN',
|
|
18
19
|
CLIK_GRAPHQL_API: 'https://api.clik.vn/graphql',
|
|
19
|
-
CLIK_VIRTUALTOUR_API: 'https://api.clik.vn/vt360'
|
|
20
|
-
}
|
|
21
|
-
}
|
|
20
|
+
CLIK_VIRTUALTOUR_API: 'https://api.clik.vn/vt360'
|
|
21
|
+
}
|
|
22
|
+
}
|
|
22
23
|
},
|
|
23
24
|
listeners: {
|
|
24
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
|
+
}
|
|
25
53
|
},
|
|
26
54
|
theme: {
|
|
55
|
+
modeButtonChat: true,
|
|
27
56
|
simplified: true,
|
|
28
57
|
autoCloseAudioPlayer: true,
|
|
29
58
|
hideAudioMetadata: true,
|
|
30
|
-
|
|
31
|
-
gapInput: 30,
|
|
59
|
+
noAutoplayMessage: true
|
|
32
60
|
},
|
|
33
61
|
onLoaded: (tool) => {
|
|
62
|
+
console.log('Chatbot loaded!!!');
|
|
34
63
|
window.tool = tool;
|
|
35
|
-
}
|
|
64
|
+
}
|
|
36
65
|
});
|
|
37
66
|
</script>
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
</html>
|
|
67
|
+
</head>
|
|
68
|
+
<body style="background-color: #717182">
|
|
69
|
+
<clik-agent-widget></clik-agent-widget>
|
|
70
|
+
</body>
|
|
71
|
+
</html>
|