@clikvn/agent-widget-embedded 0.0.54-dev → 0.0.56-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/dist/components/Chat/Header.d.ts.map +1 -1
- package/dist/components/Chat/HtmlContent.d.ts +7 -0
- package/dist/components/Chat/HtmlContent.d.ts.map +1 -0
- package/dist/components/Chat/Message.d.ts.map +1 -1
- package/dist/components/Chat/ProductDetail.d.ts +19 -0
- package/dist/components/Chat/ProductDetail.d.ts.map +1 -0
- package/dist/components/Chat/ProductList.d.ts +17 -1
- package/dist/components/Chat/ProductList.d.ts.map +1 -1
- package/dist/components/Chat/ScenariosList.d.ts +12 -0
- package/dist/components/Chat/ScenariosList.d.ts.map +1 -0
- package/dist/hooks/useChatData.d.ts +5 -2
- package/dist/hooks/useChatData.d.ts.map +1 -1
- package/dist/index.html +12 -2
- package/dist/models.d.ts +1 -1
- package/dist/models.d.ts.map +1 -1
- package/dist/web.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAI3B,UAAU,cAAc;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,QAAA,MAAM,MAAM,EAAE,EAAE,CAAC,cAAc,CAgF9B,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HtmlContent.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/HtmlContent.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAA+B,MAAM,OAAO,CAAC;AAGxD,UAAU,SAAS;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,SAAS,CAgDrC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/Message.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAsB,MAAM,OAAO,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EACL,eAAe,EAGhB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/Message.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAsB,MAAM,OAAO,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EACL,eAAe,EAGhB,MAAM,0BAA0B,CAAC;AAalC,KAAK,SAAS,GAAG;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,eAAe,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAUF,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,SAAS,CA0PxC,CAAC;AAEF,eAAO,MAAM,eAAe,YAAa;IAAE,GAAG,EAAE,OAAO,GAAG,IAAI,CAAA;CAAE,4CAyC/D,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
interface ProductType {
|
|
3
|
+
code: string;
|
|
4
|
+
name: string;
|
|
5
|
+
url: string;
|
|
6
|
+
price: number;
|
|
7
|
+
rating: number;
|
|
8
|
+
description: string;
|
|
9
|
+
icon: {
|
|
10
|
+
url: string;
|
|
11
|
+
};
|
|
12
|
+
virtualTourUrl: string;
|
|
13
|
+
}
|
|
14
|
+
interface PropTypes {
|
|
15
|
+
content?: ProductType | string;
|
|
16
|
+
}
|
|
17
|
+
export declare const ProductDetail: FC<PropTypes>;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=ProductDetail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductDetail.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/ProductDetail.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAA+B,MAAM,OAAO,CAAC;AAQxD,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE;QACJ,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,SAAS;IACjB,OAAO,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;CAChC;AAED,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,SAAS,CA+GvC,CAAC"}
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
+
interface ProductDataResultType {
|
|
3
|
+
products: ProductType[];
|
|
4
|
+
scenarioUrl: string;
|
|
5
|
+
}
|
|
6
|
+
interface ProductType {
|
|
7
|
+
code: string;
|
|
8
|
+
name: string;
|
|
9
|
+
url: string;
|
|
10
|
+
price: number;
|
|
11
|
+
rating: number;
|
|
12
|
+
description: string;
|
|
13
|
+
icon: {
|
|
14
|
+
url: string;
|
|
15
|
+
};
|
|
16
|
+
virtualTourUrl: string;
|
|
17
|
+
}
|
|
2
18
|
interface PropTypes {
|
|
3
|
-
content
|
|
19
|
+
content?: ProductDataResultType | string;
|
|
4
20
|
}
|
|
5
21
|
export declare const ProductList: FC<PropTypes>;
|
|
6
22
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductList.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/ProductList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"ProductList.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/ProductList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAA+B,MAAM,OAAO,CAAC;AAQxD,UAAU,qBAAqB;IAC7B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE;QACJ,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,SAAS;IACjB,OAAO,CAAC,EAAE,qBAAqB,GAAG,MAAM,CAAC;CAC1C;AAED,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,SAAS,CA2KrC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
interface ScenarioType {
|
|
3
|
+
code: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
}
|
|
7
|
+
interface PropTypes {
|
|
8
|
+
content?: ScenarioType[];
|
|
9
|
+
}
|
|
10
|
+
export declare const ScenariosList: FC<PropTypes>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=ScenariosList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScenariosList.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/ScenariosList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAuB,MAAM,OAAO,CAAC;AAGhD,UAAU,YAAY;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,SAAS;IACjB,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;CAC1B;AAED,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,SAAS,CAsFvC,CAAC"}
|
|
@@ -4,14 +4,17 @@ import { ChatMessageType } from '../types/flowise.type';
|
|
|
4
4
|
import { SuggestionType } from '../types/common.type';
|
|
5
5
|
type ChatData = {
|
|
6
6
|
chatId?: string | undefined;
|
|
7
|
-
listeners?: Record<EVENT_TYPE, (props
|
|
7
|
+
listeners?: Record<EVENT_TYPE, (props?: any) => void>;
|
|
8
8
|
initialMessages?: ChatMessageType[];
|
|
9
9
|
suggestedActions?: SuggestionType[];
|
|
10
10
|
};
|
|
11
|
+
type Actions = {
|
|
12
|
+
createNew?: () => string;
|
|
13
|
+
};
|
|
11
14
|
export declare const ChatDataProvider: ({ children, data, }: {
|
|
12
15
|
children: React.ReactNode;
|
|
13
16
|
data: ChatData;
|
|
14
17
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export declare const useChatData: () => ChatData;
|
|
18
|
+
export declare const useChatData: () => ChatData & Actions;
|
|
16
19
|
export {};
|
|
17
20
|
//# sourceMappingURL=useChatData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChatData.d.ts","sourceRoot":"","sources":["../../src/hooks/useChatData.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,KAAK,QAAQ,GAAG;IACd,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"useChatData.d.ts","sourceRoot":"","sources":["../../src/hooks/useChatData.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,KAAK,QAAQ,GAAG;IACd,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC,CAAC;IACtD,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;IACpC,gBAAgB,CAAC,EAAE,cAAc,EAAE,CAAC;CACrC,CAAC;AAEF,KAAK,OAAO,GAAG;IACb,SAAS,CAAC,EAAE,MAAM,MAAM,CAAC;CAC1B,CAAC;AAMF,eAAO,MAAM,gBAAgB,wBAG1B;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,EAAE,QAAQ,CAAC;CAChB,4CAiDA,CAAC;AAEF,eAAO,MAAM,WAAW,0BAMvB,CAAC"}
|
package/dist/index.html
CHANGED
|
@@ -7,9 +7,19 @@
|
|
|
7
7
|
import Agent from 'http://localhost:3000/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
|
|
8
8
|
Agent.initWidget({
|
|
9
9
|
apiHost: 'https://ci-api.clik.vn/chatbot',
|
|
10
|
-
agentId: '
|
|
10
|
+
agentId: 'fe4cf6a9-fa43-4986-bc6f-df67092568c6',
|
|
11
11
|
overrideConfig: {
|
|
12
|
-
|
|
12
|
+
overrideConfig: {
|
|
13
|
+
vars: {
|
|
14
|
+
TOUR_CODE: 'TOUR_K9EK76KTX7K4',
|
|
15
|
+
LANGUAGE: 'VN',
|
|
16
|
+
CLIK_GRAPHQL_API: 'https://api.clik.vn/graphql',
|
|
17
|
+
CLIK_VIRTUALTOUR_API: 'https://api.clik.vn/vt360',
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
listeners: {
|
|
22
|
+
ON_LINK_CLICK: console.log,
|
|
13
23
|
}
|
|
14
24
|
});
|
|
15
25
|
</script>
|
package/dist/models.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type EVENT_TYPE = 'CONNECT' | 'DISCONNECT' | 'ON_LINK_CLICK' | 'CMD_CALLBACK';
|
|
1
|
+
export type EVENT_TYPE = 'CONNECT' | 'DISCONNECT' | 'ON_LINK_CLICK' | 'CMD_CALLBACK' | 'ON_NEW_CHAT';
|
|
2
2
|
//# sourceMappingURL=models.d.ts.map
|
package/dist/models.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAClB,SAAS,GACT,YAAY,GACZ,eAAe,GACf,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAClB,SAAS,GACT,YAAY,GACZ,eAAe,GACf,cAAc,GACd,aAAa,CAAC"}
|