@askdialog/dialog-vue 1.0.23 → 1.0.24-beta.1
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/dialog-vue.js +2908 -3113
- package/dist/dialog-vue.umd.cjs +5 -5
- package/package.json +15 -12
- package/README.md +0 -72
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@askdialog/dialog-vue",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.24-beta.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/dialog-vue.umd.js",
|
|
7
7
|
"module": "./dist/dialog-vue.js",
|
|
@@ -19,23 +19,26 @@
|
|
|
19
19
|
"dist"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"
|
|
23
|
-
"
|
|
22
|
+
"vue": "^3.5.13",
|
|
23
|
+
"@askdialog/dialog-sdk": "1.0.26-beta.1"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"vue": "^3.0.0"
|
|
24
27
|
},
|
|
25
28
|
"devDependencies": {
|
|
26
|
-
"@eslint/js": "^9.
|
|
29
|
+
"@eslint/js": "^9.17.0",
|
|
27
30
|
"@rollup/plugin-replace": "^6.0.2",
|
|
28
31
|
"@types/node": "^22.14.0",
|
|
29
|
-
"@typescript-eslint/eslint-plugin": "^8.29.1",
|
|
30
|
-
"@typescript-eslint/parser": "^8.29.1",
|
|
31
32
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
32
33
|
"@vue/tsconfig": "^0.7.0",
|
|
33
|
-
"eslint": "^9.
|
|
34
|
+
"eslint": "^9.17.0",
|
|
34
35
|
"eslint-config-prettier": "^10.1.2",
|
|
36
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
35
37
|
"eslint-plugin-vue": "^10.0.0",
|
|
36
38
|
"globals": "^16.0.0",
|
|
37
|
-
"
|
|
38
|
-
"typescript
|
|
39
|
+
"prettier": "^3.4.2",
|
|
40
|
+
"typescript": "^5.9.3",
|
|
41
|
+
"typescript-eslint": "^8.18.1",
|
|
39
42
|
"vite": "^6.2.0",
|
|
40
43
|
"vite-plugin-dts": "^4.5.3",
|
|
41
44
|
"vite-plugin-eslint": "^1.8.1",
|
|
@@ -55,8 +58,8 @@
|
|
|
55
58
|
"dev": "vite",
|
|
56
59
|
"clean": "rm -rf dist",
|
|
57
60
|
"build": "pnpm run clean && vue-tsc -b && vite build",
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
+
"lint": "eslint .",
|
|
62
|
+
"lint:fix": "eslint . --fix",
|
|
63
|
+
"preview": "vite preview"
|
|
61
64
|
}
|
|
62
65
|
}
|
package/README.md
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
# Dialog Vue
|
|
2
|
-
|
|
3
|
-
## Dialog
|
|
4
|
-
|
|
5
|
-
Dialog is an AI assistant designed to boost e-commerce sales by providing intelligent product recommendations and seamless customer interactions.
|
|
6
|
-
|
|
7
|
-
Visit our website: [Dialog AI Assistant](https://www.askdialog.com/)
|
|
8
|
-
|
|
9
|
-
## Description
|
|
10
|
-
|
|
11
|
-
Dialog vue is a component library designed to be used with he progressive javascript framework VueJs.
|
|
12
|
-
|
|
13
|
-
## Get started
|
|
14
|
-
|
|
15
|
-
### Prerequisites
|
|
16
|
-
|
|
17
|
-
Before using the Dialog Vue, you need:
|
|
18
|
-
|
|
19
|
-
- Our [Dialog SDK](https://www.npmjs.com/package/@askdialog/dialog-sdk) installed.
|
|
20
|
-
- An active API Key, you can retrieve your api key in your [organization settings](https://app.askdialog.com/settings)
|
|
21
|
-
|
|
22
|
-
### Installation
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
npm install @askdialog/dialog-vue
|
|
26
|
-
# or
|
|
27
|
-
pnpm add @askdialog/dialog-vue
|
|
28
|
-
# or
|
|
29
|
-
yarn add @askdialog/dialog-vue
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
### Instantiate the client
|
|
33
|
-
|
|
34
|
-
When you instantiate the Dialog SDK, it will automatically insert the assistant script into the DOM. If you configure it correctly with required fields, clicking on a suggestion question will trigger the assistant.
|
|
35
|
-
|
|
36
|
-
```typescript
|
|
37
|
-
import { Dialog } from '@askdialog/dialog-sdk';
|
|
38
|
-
|
|
39
|
-
const client = new Dialog({
|
|
40
|
-
apiKey: 'YOUR_API_KEY', // required
|
|
41
|
-
locale: 'TARGETED_LOCALE', // required
|
|
42
|
-
callbacks: {
|
|
43
|
-
addToCart: ({
|
|
44
|
-
productId,
|
|
45
|
-
quantity,
|
|
46
|
-
variantId,
|
|
47
|
-
}: {
|
|
48
|
-
productId: string;
|
|
49
|
-
quantity: number;
|
|
50
|
-
variantId?: string;
|
|
51
|
-
}): Promise<void>, // required
|
|
52
|
-
getProduct: (productId: string, variantId?: string) => Promise<SimplifiedProduct>, // required
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### Use DialogProductBlock component
|
|
58
|
-
|
|
59
|
-
- Import DialogProductBlock and the default style
|
|
60
|
-
|
|
61
|
-
```typescript
|
|
62
|
-
import { DialogProductBlock, } from "@askdialog/dialog-vue";
|
|
63
|
-
import "@askdialog/dialog-vue/style.css";
|
|
64
|
-
|
|
65
|
-
<DialogProductBlock
|
|
66
|
-
:client="client" // Required
|
|
67
|
-
product-id="Product identifier" // Required
|
|
68
|
-
product-title="Product Title" // Required
|
|
69
|
-
selected-variant-id="Variant identifier" // Optional
|
|
70
|
-
:enable-input="true" // Optional - true by default
|
|
71
|
-
/>
|
|
72
|
-
```
|