vdb-ai-chat 1.0.14 → 1.0.16
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/chat-widget.js +1 -1
- package/lib/commonjs/api.js +44 -3
- package/lib/commonjs/api.js.map +1 -1
- package/lib/commonjs/components/ChatWidget.js +129 -34
- package/lib/commonjs/components/ChatWidget.js.map +1 -1
- package/lib/commonjs/components/MessageBubble.js +3 -1
- package/lib/commonjs/components/MessageBubble.js.map +1 -1
- package/lib/commonjs/components/ProductsListView.js +2 -3
- package/lib/commonjs/components/ProductsListView.js.map +1 -1
- package/lib/commonjs/components/SuggestionsRow.js.map +1 -1
- package/lib/commonjs/components/utils.js +436 -5
- package/lib/commonjs/components/utils.js.map +1 -1
- package/lib/module/api.js +43 -3
- package/lib/module/api.js.map +1 -1
- package/lib/module/components/ChatWidget.js +131 -36
- package/lib/module/components/ChatWidget.js.map +1 -1
- package/lib/module/components/MessageBubble.js +3 -1
- package/lib/module/components/MessageBubble.js.map +1 -1
- package/lib/module/components/ProductsListView.js +2 -3
- package/lib/module/components/ProductsListView.js.map +1 -1
- package/lib/module/components/SuggestionsRow.js.map +1 -1
- package/lib/module/components/utils.js +434 -4
- package/lib/module/components/utils.js.map +1 -1
- package/lib/module/hooks/useAnalytics.js.map +1 -1
- package/lib/typescript/api.d.ts +12 -0
- package/lib/typescript/api.d.ts.map +1 -1
- package/lib/typescript/components/ChatWidget.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble.d.ts.map +1 -1
- package/lib/typescript/components/ProductsListView.d.ts.map +1 -1
- package/lib/typescript/components/SuggestionsRow.d.ts.map +1 -1
- package/lib/typescript/components/utils.d.ts +6 -0
- package/lib/typescript/components/utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/api.ts +69 -7
- package/src/components/ChatWidget.tsx +187 -36
- package/src/components/MessageBubble.tsx +15 -4
- package/src/components/ProductsListView.tsx +32 -17
- package/src/components/SuggestionsRow.tsx +1 -7
- package/src/components/utils.ts +545 -7
- package/src/hooks/useAnalytics.tsx +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
type JsonMap = Record<string, unknown>;
|
|
2
2
|
import { Platform } from "react-native";
|
|
3
|
-
import {
|
|
3
|
+
import { getDeviceType, getUserDetails } from "../components/utils";
|
|
4
4
|
import { useAnalyticsClient } from "../contexts/AnalyticsClientContext";
|
|
5
5
|
|
|
6
6
|
const getSystemTypeEnum = (deviceType: any) => {
|
|
@@ -127,7 +127,7 @@ export const useUserAnalytics = () => {
|
|
|
127
127
|
}
|
|
128
128
|
const client = analyticsClient || (window as any).analytics;
|
|
129
129
|
if (!client) return;
|
|
130
|
-
|
|
130
|
+
|
|
131
131
|
const user = await getUserDetails();
|
|
132
132
|
if (!user?.id) {
|
|
133
133
|
console.error(
|