@askdialog/dialog-vue 1.0.23 → 1.0.24-beta.2
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 +14 -13
- package/README.md +0 -72
- package/dist/App.vue.d.ts +0 -2
- package/dist/app.d.ts +0 -0
- package/dist/vite.svg +0 -1
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.2",
|
|
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.2"
|
|
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",
|
|
@@ -52,11 +55,9 @@
|
|
|
52
55
|
"vue components"
|
|
53
56
|
],
|
|
54
57
|
"scripts": {
|
|
55
|
-
"dev": "vite",
|
|
56
58
|
"clean": "rm -rf dist",
|
|
57
59
|
"build": "pnpm run clean && vue-tsc -b && vite build",
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"test-linter": "ESLINT_USE_FLAT_CONFIG=true eslint --ext .ts,.vue . --fix"
|
|
60
|
+
"lint": "eslint .",
|
|
61
|
+
"lint:fix": "eslint . --fix"
|
|
61
62
|
}
|
|
62
63
|
}
|
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
|
-
```
|
package/dist/App.vue.d.ts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
package/dist/app.d.ts
DELETED
|
File without changes
|
package/dist/vite.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|