@moveo-ai/web-client 0.108.0 → 0.109.0
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/README.md +164 -69
- package/dist/63.min.js +2 -0
- package/dist/{329.min.js.LICENSE.txt → 63.min.js.LICENSE.txt} +1 -1
- package/dist/752.min.js +2 -0
- package/dist/{147.min.js.LICENSE.txt → 752.min.js.LICENSE.txt} +1 -1
- package/dist/882.min.js +1 -1
- package/dist/882.min.js.LICENSE.txt +1 -1
- package/dist/929.min.js +1 -1
- package/dist/929.min.js.LICENSE.txt +1 -1
- package/dist/audio-client.min.js +1 -1
- package/dist/audio-client.min.js.LICENSE.txt +20 -10
- package/dist/iframe.min.js +1 -1
- package/dist/iframe.min.js.LICENSE.txt +24 -27
- package/dist/index.html +1 -7
- package/dist/preview/index.html +16 -14
- package/dist/preview-telnyx/index.html +79 -0
- package/dist/preview.css.min.js +1 -1
- package/dist/preview.css.min.js.LICENSE.txt +1 -1
- package/dist/telnyx-client.min.js +1 -1
- package/dist/telnyx-client.min.js.LICENSE.txt +20 -10
- package/dist/web-client.min.js +1 -1
- package/dist/web-client.min.js.LICENSE.txt +1 -1
- package/dist/webrtc-client.min.js +1 -1
- package/dist/webrtc-client.min.js.LICENSE.txt +20 -10
- package/package.json +108 -99
- package/web-client.d.ts +152 -0
- package/dist/147.min.js +0 -2
- package/dist/147.min.js.map +0 -1
- package/dist/329.min.js +0 -2
- package/dist/329.min.js.map +0 -1
- package/dist/882.min.js.map +0 -1
- package/dist/929.min.js.map +0 -1
- package/dist/954.min.js +0 -2
- package/dist/954.min.js.LICENSE.txt +0 -6
- package/dist/954.min.js.map +0 -1
- package/dist/audio-client.min.js.map +0 -1
- package/dist/iframe.min.js.map +0 -1
- package/dist/iframe.v2.min.js +0 -2
- package/dist/iframe.v2.min.js.LICENSE.txt +0 -63
- package/dist/iframe.v2.min.js.map +0 -1
- package/dist/preview.css.min.js.map +0 -1
- package/dist/telnyx-client.min.js.map +0 -1
- package/dist/web-client.min.js.map +0 -1
- package/dist/webrtc-client.min.js.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* @moveo-ai/web-client v0.
|
|
3
|
+
* @moveo-ai/web-client v0.109.0
|
|
4
4
|
* Copyright (c) Moveo.ai (TM)
|
|
5
5
|
*
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @license React
|
|
10
|
-
* react-dom.production.
|
|
10
|
+
* react-dom-client.production.js
|
|
11
11
|
*
|
|
12
|
-
* Copyright (c)
|
|
12
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the MIT license found in the
|
|
15
15
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* @license React
|
|
20
|
-
* react-
|
|
20
|
+
* react-dom.production.js
|
|
21
21
|
*
|
|
22
|
-
* Copyright (c)
|
|
22
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
23
23
|
*
|
|
24
24
|
* This source code is licensed under the MIT license found in the
|
|
25
25
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* @license React
|
|
30
|
-
* react.production.
|
|
30
|
+
* react-jsx-runtime.production.js
|
|
31
31
|
*
|
|
32
|
-
* Copyright (c)
|
|
32
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the MIT license found in the
|
|
35
35
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -37,16 +37,26 @@
|
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* @license React
|
|
40
|
-
*
|
|
40
|
+
* react.production.js
|
|
41
41
|
*
|
|
42
|
-
* Copyright (c)
|
|
42
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
43
43
|
*
|
|
44
44
|
* This source code is licensed under the MIT license found in the
|
|
45
45
|
* LICENSE file in the root directory of this source tree.
|
|
46
46
|
*/
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
|
-
* @license
|
|
49
|
+
* @license React
|
|
50
|
+
* scheduler.production.js
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @license lucide-react v1.28.0 - ISC
|
|
50
60
|
*
|
|
51
61
|
* This source code is licensed under the ISC license.
|
|
52
62
|
* See the LICENSE file in the root directory of this source tree.
|
package/package.json
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moveo-ai/web-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.109.0",
|
|
4
4
|
"description": "Client side library to load the moveo chat widget and connect it with your agent",
|
|
5
5
|
"main": "dist/web-client.min.js",
|
|
6
|
+
"types": "web-client.d.ts",
|
|
6
7
|
"scripts": {
|
|
7
8
|
"autofix": "eslint --fix .",
|
|
8
9
|
"build": "NODE_ENV=production webpack --config webpack.config.js",
|
|
10
|
+
"build:analyze": "ANALYZE=true NODE_ENV=production webpack --config webpack.config.js",
|
|
9
11
|
"build:dev": "NODE_ENV=development webpack --config webpack.config.js",
|
|
10
12
|
"build-storybook": "storybook build",
|
|
11
|
-
"lint": "npm run lint:js && npm run lint:
|
|
13
|
+
"lint": "npm run lint:js && npm run lint:css",
|
|
12
14
|
"lint:js": "eslint .",
|
|
13
|
-
"lint:
|
|
15
|
+
"lint:css": "npx stylelint \"{src,test}/**/*.css\"",
|
|
14
16
|
"prepare": "npm run build",
|
|
15
17
|
"prettier": "prettier --write \"{src,test}/**/*.{ts,tsx,json}\"",
|
|
16
18
|
"setup:certs": "node scripts/setup-certs.mjs",
|
|
@@ -21,11 +23,20 @@
|
|
|
21
23
|
"test:coverage": "vitest run --coverage",
|
|
22
24
|
"test:ci": "npx playwright test",
|
|
23
25
|
"type-check": "tsc --pretty --noEmit",
|
|
26
|
+
"verify:package": "node scripts/verify-package.mjs",
|
|
27
|
+
"visual-diff": "node scripts/visual-diff.mjs",
|
|
24
28
|
"watch": "webpack --watch"
|
|
25
29
|
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist",
|
|
32
|
+
"web-client.d.ts"
|
|
33
|
+
],
|
|
26
34
|
"publishConfig": {
|
|
27
35
|
"access": "public"
|
|
28
36
|
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=20"
|
|
39
|
+
},
|
|
29
40
|
"keywords": [
|
|
30
41
|
"bot",
|
|
31
42
|
"moveo.ai",
|
|
@@ -36,134 +47,126 @@
|
|
|
36
47
|
"author": "Moveo.ai (TM)",
|
|
37
48
|
"license": "MIT",
|
|
38
49
|
"devDependencies": {
|
|
39
|
-
"@babel/core": "^7.29.
|
|
40
|
-
"@babel/preset-env": "^7.29.
|
|
41
|
-
"@babel/preset-react": "^7.
|
|
42
|
-
"@babel/preset-typescript": "^7.
|
|
50
|
+
"@babel/core": "^7.29.7",
|
|
51
|
+
"@babel/preset-env": "^7.29.7",
|
|
52
|
+
"@babel/preset-react": "^7.29.7",
|
|
53
|
+
"@babel/preset-typescript": "^7.29.7",
|
|
43
54
|
"@chromatic-com/storybook": "^4.1.3",
|
|
44
|
-
"@commitlint/cli": "^20.
|
|
45
|
-
"@commitlint/config-conventional": "^20.
|
|
46
|
-
"@playwright/test": "^1.
|
|
47
|
-
"@radix-ui/react-checkbox": "^1.3.
|
|
48
|
-
"@radix-ui/react-dialog": "^1.1.
|
|
49
|
-
"@radix-ui/react-popover": "^1.1.
|
|
50
|
-
"@radix-ui/react-scroll-area": "^1.2.
|
|
51
|
-
"@radix-ui/react-select": "^2.
|
|
55
|
+
"@commitlint/cli": "^20.5.3",
|
|
56
|
+
"@commitlint/config-conventional": "^20.5.3",
|
|
57
|
+
"@playwright/test": "^1.62.1",
|
|
58
|
+
"@radix-ui/react-checkbox": "^1.3.11",
|
|
59
|
+
"@radix-ui/react-dialog": "^1.1.23",
|
|
60
|
+
"@radix-ui/react-popover": "^1.1.23",
|
|
61
|
+
"@radix-ui/react-scroll-area": "^1.2.18",
|
|
62
|
+
"@radix-ui/react-select": "^2.3.7",
|
|
52
63
|
"@radix-ui/react-slot": "^1.2.4",
|
|
53
|
-
"@storybook/addon-docs": "^10.
|
|
54
|
-
"@storybook/addon-links": "^10.
|
|
55
|
-
"@storybook/addon-webpack5-compiler-babel": "^4.0.
|
|
56
|
-
"@storybook/
|
|
57
|
-
"@
|
|
58
|
-
"@
|
|
59
|
-
"@tailwindcss/postcss": "^4.2.1",
|
|
64
|
+
"@storybook/addon-docs": "^10.5.6",
|
|
65
|
+
"@storybook/addon-links": "^10.5.6",
|
|
66
|
+
"@storybook/addon-webpack5-compiler-babel": "^4.0.1",
|
|
67
|
+
"@storybook/react-webpack5": "^10.5.6",
|
|
68
|
+
"@tailwindcss/postcss": "^4.3.3",
|
|
69
|
+
"@telnyx/webrtc": "^2.27.8",
|
|
60
70
|
"@testing-library/dom": "^10.4.1",
|
|
61
71
|
"@testing-library/react": "^16.3.2",
|
|
62
|
-
"@testing-library/user-event": "^14.6.
|
|
63
|
-
"@twilio/voice-sdk": "^2.18.
|
|
64
|
-
"@types/debug": "^4.1.
|
|
65
|
-
"@types/ejs": "^3.1.5",
|
|
72
|
+
"@testing-library/user-event": "^14.6.3",
|
|
73
|
+
"@twilio/voice-sdk": "^2.18.3",
|
|
74
|
+
"@types/debug": "^4.1.13",
|
|
66
75
|
"@types/lodash-es": "^4.17.12",
|
|
67
|
-
"@types/node": "^24.
|
|
68
|
-
"@types/react": "^
|
|
69
|
-
"@
|
|
70
|
-
"@
|
|
71
|
-
"@vitest/
|
|
76
|
+
"@types/node": "^24.13.3",
|
|
77
|
+
"@types/react": "^19.2.18",
|
|
78
|
+
"@types/react-dom": "^19.2.4",
|
|
79
|
+
"@vitejs/plugin-react": "^5.2.0",
|
|
80
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
81
|
+
"@vitest/ui": "^4.1.10",
|
|
72
82
|
"anchorme": "^3.0.8",
|
|
73
|
-
"autoprefixer": "^10.4
|
|
83
|
+
"autoprefixer": "^10.5.4",
|
|
74
84
|
"babel-loader": "^10.1.1",
|
|
75
|
-
"bowser": "^2.
|
|
85
|
+
"bowser": "^2.14.1",
|
|
76
86
|
"class-variance-authority": "^0.7.1",
|
|
77
87
|
"classnames": "^2.5.1",
|
|
78
|
-
"clean-webpack-plugin": "^4.0.0",
|
|
79
88
|
"copy-webpack-plugin": "^14.0.0",
|
|
80
89
|
"css-loader": "^7.1.4",
|
|
81
|
-
"css-modules-typescript-loader": "^4.0.1",
|
|
82
90
|
"debug": "^4.4.3",
|
|
83
|
-
"dompurify": "^3.
|
|
84
|
-
"dotenv": "^17.
|
|
85
|
-
"ejs": "^5.0.1",
|
|
91
|
+
"dompurify": "^3.4.13",
|
|
92
|
+
"dotenv": "^17.4.2",
|
|
86
93
|
"embla-carousel-react": "^8.6.0",
|
|
87
|
-
"emoji-picker-react": "^4.
|
|
88
|
-
"eslint": "^9.39.
|
|
94
|
+
"emoji-picker-react": "^4.19.1",
|
|
95
|
+
"eslint": "^9.39.5",
|
|
89
96
|
"eslint-config-prettier": "^10.1.8",
|
|
90
|
-
"eslint-import-resolver-typescript": "^4.4.
|
|
97
|
+
"eslint-import-resolver-typescript": "^4.4.5",
|
|
91
98
|
"eslint-plugin-import": "^2.32.0",
|
|
92
99
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
93
|
-
"eslint-plugin-prettier": "^5.5.
|
|
100
|
+
"eslint-plugin-prettier": "^5.5.6",
|
|
94
101
|
"eslint-plugin-react": "^7.37.5",
|
|
95
|
-
"eslint-plugin-react-hooks": "
|
|
96
|
-
"eslint-plugin-storybook": "^10.
|
|
97
|
-
"eslint-plugin-testing-library": "^7.16.
|
|
98
|
-
"globals": "^17.
|
|
99
|
-
"
|
|
100
|
-
"html-webpack-plugin": "^5.6.6",
|
|
102
|
+
"eslint-plugin-react-hooks": "~7.0.1",
|
|
103
|
+
"eslint-plugin-storybook": "^10.5.6",
|
|
104
|
+
"eslint-plugin-testing-library": "^7.16.2",
|
|
105
|
+
"globals": "^17.9.0",
|
|
106
|
+
"html-webpack-plugin": "^5.6.8",
|
|
101
107
|
"husky": "^9.1.7",
|
|
102
|
-
"i18next": "^25.
|
|
108
|
+
"i18next": "^25.10.10",
|
|
103
109
|
"i18next-browser-languagedetector": "^8.2.1",
|
|
104
|
-
"i18next-http-backend": "^
|
|
105
|
-
"isbot": "^5.1
|
|
106
|
-
"jotai": "^2.20.
|
|
107
|
-
"jotai-family": "^1.0
|
|
110
|
+
"i18next-http-backend": "^4.0.1",
|
|
111
|
+
"isbot": "^5.2.1",
|
|
112
|
+
"jotai": "^2.20.2",
|
|
113
|
+
"jotai-family": "^1.1.0",
|
|
108
114
|
"jsdom": "^28.1.0",
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"marked": "^17.0.4",
|
|
115
|
+
"lint-staged": "^16.4.0",
|
|
116
|
+
"lodash-es": "^4.18.1",
|
|
117
|
+
"lucide-react": "^1.28.0",
|
|
118
|
+
"marked": "^18.0.9",
|
|
114
119
|
"mkcert": "^3.2.0",
|
|
115
|
-
"nanoid": "^
|
|
116
|
-
"postcss": "^8.5.
|
|
120
|
+
"nanoid": "^6.0.1",
|
|
121
|
+
"postcss": "^8.5.25",
|
|
117
122
|
"postcss-loader": "^8.2.1",
|
|
118
|
-
"prettier": "^3.
|
|
123
|
+
"prettier": "^3.9.6",
|
|
119
124
|
"prettier-plugin-sort-json": "^4.2.0",
|
|
120
|
-
"prettier-plugin-tailwindcss": "^0.7.
|
|
121
|
-
"react": "^
|
|
122
|
-
"react-dom": "^
|
|
125
|
+
"prettier-plugin-tailwindcss": "^0.7.4",
|
|
126
|
+
"react": "^19.2.8",
|
|
127
|
+
"react-dom": "^19.2.8",
|
|
123
128
|
"react-dropzone": "^15.0.0",
|
|
124
|
-
"react-hook-form": "^7.
|
|
129
|
+
"react-hook-form": "^7.84.0",
|
|
125
130
|
"react-i18next": "^15.7.4",
|
|
126
|
-
"
|
|
127
|
-
"react-transition-group": "^4.4.5",
|
|
128
|
-
"sass": "^1.98.0",
|
|
129
|
-
"sass-embedded": "^1.98.0",
|
|
130
|
-
"sass-loader": "^16.0.7",
|
|
131
|
-
"semantic-release": "^25.0.3",
|
|
131
|
+
"semantic-release": "^25.0.8",
|
|
132
132
|
"serve": "^14.2.6",
|
|
133
133
|
"shader": "^1.0.0",
|
|
134
134
|
"smooth-scroll-into-view-if-needed": "^2.0.2",
|
|
135
135
|
"socket.io": "^4.8.3",
|
|
136
136
|
"socket.io-client": "^4.8.3",
|
|
137
137
|
"source-map-loader": "^5.0.0",
|
|
138
|
-
"storybook": "^10.
|
|
138
|
+
"storybook": "^10.5.6",
|
|
139
139
|
"storybook-react-i18next": "^10.1.2",
|
|
140
140
|
"style-loader": "^4.0.0",
|
|
141
|
-
"stylelint": "^17.
|
|
141
|
+
"stylelint": "^17.14.1",
|
|
142
142
|
"stylelint-config-standard-scss": "^17.0.0",
|
|
143
143
|
"stylelint-declaration-strict-value": "^1.11.1",
|
|
144
|
-
"tailwind-merge": "^3.
|
|
144
|
+
"tailwind-merge": "^3.6.0",
|
|
145
145
|
"tailwindcss": "^4.2.1",
|
|
146
|
-
"
|
|
147
|
-
"ts-
|
|
148
|
-
"ts-loader": "^9.5.4",
|
|
146
|
+
"ts-deepmerge": "^8.0.0",
|
|
147
|
+
"ts-loader": "^9.6.2",
|
|
149
148
|
"tsconfig-paths-webpack-plugin": "^4.2.0",
|
|
150
|
-
"type-fest": "^5.
|
|
149
|
+
"type-fest": "^5.8.0",
|
|
151
150
|
"typescript": "^5.9.3",
|
|
152
|
-
"typescript-eslint": "^8.
|
|
151
|
+
"typescript-eslint": "^8.66.0",
|
|
153
152
|
"url-loader": "^4.1.1",
|
|
154
|
-
"uuid": "^14.0.
|
|
155
|
-
"vitest": "^4.1.
|
|
153
|
+
"uuid": "^14.0.1",
|
|
154
|
+
"vitest": "^4.1.10",
|
|
156
155
|
"vitest-dom": "^0.1.1",
|
|
157
|
-
"webpack": "^5.
|
|
158
|
-
"webpack-bundle-analyzer": "^5.
|
|
159
|
-
"webpack-cli": "^
|
|
160
|
-
"webpack-dev-server": "^
|
|
156
|
+
"webpack": "^5.109.2",
|
|
157
|
+
"webpack-bundle-analyzer": "^5.3.1",
|
|
158
|
+
"webpack-cli": "^7.2.2",
|
|
159
|
+
"webpack-dev-server": "^6.0.0",
|
|
161
160
|
"webpack-merge": "^6.0.1",
|
|
162
|
-
"
|
|
163
|
-
"
|
|
161
|
+
"webrtc-adapter": "^9.0.6",
|
|
162
|
+
"wrangler": "^4.118.0"
|
|
164
163
|
},
|
|
165
164
|
"repository": {
|
|
166
|
-
"
|
|
165
|
+
"type": "git",
|
|
166
|
+
"url": "git+https://github.com/moveo-ai/web-client.git"
|
|
167
|
+
},
|
|
168
|
+
"bugs": {
|
|
169
|
+
"url": "https://github.com/moveo-ai/web-client/issues"
|
|
167
170
|
},
|
|
168
171
|
"homepage": "https://moveo.ai",
|
|
169
172
|
"bundlewatch": {
|
|
@@ -174,15 +177,11 @@
|
|
|
174
177
|
},
|
|
175
178
|
{
|
|
176
179
|
"path": "./dist/iframe.min.js",
|
|
177
|
-
"maxSize": "400 kB"
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
"path": "./dist/iframe.v2.min.js",
|
|
181
180
|
"maxSize": "450 kB"
|
|
182
181
|
},
|
|
183
182
|
{
|
|
184
183
|
"path": "./dist/audio-client.min.js",
|
|
185
|
-
"maxSize": "
|
|
184
|
+
"maxSize": "175 kB"
|
|
186
185
|
},
|
|
187
186
|
{
|
|
188
187
|
"path": "./dist/webrtc-client.min.js",
|
|
@@ -190,7 +189,7 @@
|
|
|
190
189
|
},
|
|
191
190
|
{
|
|
192
191
|
"path": "./dist/telnyx-client.min.js",
|
|
193
|
-
"maxSize": "
|
|
192
|
+
"maxSize": "195 kB"
|
|
194
193
|
}
|
|
195
194
|
]
|
|
196
195
|
},
|
|
@@ -214,14 +213,24 @@
|
|
|
214
213
|
"eslint --fix"
|
|
215
214
|
]
|
|
216
215
|
},
|
|
217
|
-
"
|
|
218
|
-
"
|
|
219
|
-
"
|
|
220
|
-
|
|
216
|
+
"sideEffects": [
|
|
217
|
+
"**/*.css",
|
|
218
|
+
"src/i18n/**",
|
|
219
|
+
"dist/*"
|
|
220
|
+
],
|
|
221
221
|
"overrides": {
|
|
222
222
|
"shell-quote": "^1.8.4",
|
|
223
223
|
"socket.io-parser": "^4.2.6",
|
|
224
224
|
"path-to-regexp@<0.1.13": "0.1.13",
|
|
225
|
-
"npm": "^11.17.0"
|
|
225
|
+
"npm": "^11.17.0",
|
|
226
|
+
"@telnyx/webrtc": {
|
|
227
|
+
"uuid": "^11.1.1"
|
|
228
|
+
},
|
|
229
|
+
"@peermetrics/webrtc-stats": {
|
|
230
|
+
"uuid": "^11.1.1"
|
|
231
|
+
},
|
|
232
|
+
"storybook-react-i18next": {
|
|
233
|
+
"i18next-http-backend": "$i18next-http-backend"
|
|
234
|
+
}
|
|
226
235
|
}
|
|
227
236
|
}
|
package/web-client.d.ts
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public type declarations for `@moveo-ai/web-client`.
|
|
3
|
+
*
|
|
4
|
+
* Product documentation lives at https://docs.moveo.ai; the README covers the
|
|
5
|
+
* full API surface. Hand-written because the source compiles with `@/` path
|
|
6
|
+
* aliases that generated declarations would leak.
|
|
7
|
+
* `src/__tests__/public-types.test.ts` keeps this file honest against the
|
|
8
|
+
* implementation.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/** Interaction events the widget tracks. New releases may add names. */
|
|
12
|
+
export type AnalyticsEventName =
|
|
13
|
+
| 'launcher_clicked'
|
|
14
|
+
| 'chat_expanded'
|
|
15
|
+
| 'minimize_icon_clicked'
|
|
16
|
+
| 'expand_icon_clicked'
|
|
17
|
+
| 'shrink_icon_clicked'
|
|
18
|
+
| 'close_icon_clicked'
|
|
19
|
+
| 'close_opening_message_click'
|
|
20
|
+
| 'download_conversation_clicked'
|
|
21
|
+
| 'session_start'
|
|
22
|
+
| 'session_end'
|
|
23
|
+
| 'message_click'
|
|
24
|
+
| 'message_sent'
|
|
25
|
+
| 'terms_and_conditions_link_clicked'
|
|
26
|
+
| 'welcome_form_submitted'
|
|
27
|
+
| 'rating_clicked'
|
|
28
|
+
| 'rating_submitted'
|
|
29
|
+
| 'popover_review_clicked'
|
|
30
|
+
| 'popover_inactivity_end_chat_clicked'
|
|
31
|
+
| 'popover_inactivity_continue_clicked'
|
|
32
|
+
| 'popover_end_chat_clicked'
|
|
33
|
+
| 'popover_end_chat_continue_clicked'
|
|
34
|
+
| 'popover_expired_new_clicked'
|
|
35
|
+
| 'popover_expired_end_clicked'
|
|
36
|
+
| 'popover_resolved_continue_clicked'
|
|
37
|
+
| 'popover_resolved_end_chat_clicked'
|
|
38
|
+
| 'popover_review_skip_and_close_clicked'
|
|
39
|
+
| 'popover_feedback_close_clicked';
|
|
40
|
+
|
|
41
|
+
export type SessionEventData = {
|
|
42
|
+
user_id: string;
|
|
43
|
+
session_id: string;
|
|
44
|
+
display_name: string;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** Payload of `onAnalyticsEvent`. `message_sent` never carries the text. */
|
|
48
|
+
export type AnalyticsEventData = {
|
|
49
|
+
/** ISO-8601 timestamp. */
|
|
50
|
+
timestamp: string;
|
|
51
|
+
/** Typed loosely on purpose: the widget can be newer than these typings. */
|
|
52
|
+
event: AnalyticsEventName | (string & {});
|
|
53
|
+
session_id?: string;
|
|
54
|
+
/** Event-specific extras, e.g. the value of a `rating_submitted`. */
|
|
55
|
+
properties: Record<string, unknown>;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export type WebchatOpenedData = {
|
|
59
|
+
/** The widget covers the viewport (mobile, or the expanded desktop view). */
|
|
60
|
+
isFull: boolean;
|
|
61
|
+
is_mobile?: boolean;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export type WebchatClosedData = {
|
|
65
|
+
isFull: boolean;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Conversation context. The reserved fields below are validated by the widget;
|
|
70
|
+
* every other root key passes through to the AI Agent as a context variable.
|
|
71
|
+
*/
|
|
72
|
+
export type Context = {
|
|
73
|
+
/** Visitor identity, merged into the session's user profile. */
|
|
74
|
+
user?: {
|
|
75
|
+
display_name?: string;
|
|
76
|
+
email?: string;
|
|
77
|
+
avatar?: string;
|
|
78
|
+
phone?: string;
|
|
79
|
+
address?: string;
|
|
80
|
+
[key: string]: unknown;
|
|
81
|
+
};
|
|
82
|
+
/** Normalized before sending: trimmed, transliterated, deduplicated. */
|
|
83
|
+
tags?: string[];
|
|
84
|
+
/**
|
|
85
|
+
* Host-page identity (`qm_*`, `client_*`) is shipped by the widget when
|
|
86
|
+
* `feature_flags.fiserv_web_activity` is on. `qm_session_id` comes from the
|
|
87
|
+
* in-frame session replay, never the host page.
|
|
88
|
+
*/
|
|
89
|
+
global?: {
|
|
90
|
+
client_url?: string;
|
|
91
|
+
ref?: string;
|
|
92
|
+
disclaimer_accepted?: boolean;
|
|
93
|
+
visitor_form_completed?: boolean;
|
|
94
|
+
qm_partner_id?: string;
|
|
95
|
+
qm_client_id?: string;
|
|
96
|
+
qm_config_id?: string;
|
|
97
|
+
qm_page_template?: string;
|
|
98
|
+
qm_session_id?: string;
|
|
99
|
+
client_path?: string;
|
|
100
|
+
client_journey?: string;
|
|
101
|
+
[key: string]: unknown;
|
|
102
|
+
};
|
|
103
|
+
[key: string]: unknown;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
export interface WidgetController {
|
|
107
|
+
openWindow(): void;
|
|
108
|
+
closeWindow(): void;
|
|
109
|
+
/** Ends the conversation; the widget hides unless `hide` is `false`. */
|
|
110
|
+
closeConversation(options: { hide?: boolean }): void;
|
|
111
|
+
/** Sends `text` into the conversation as the visitor. */
|
|
112
|
+
sendMessage(message: { text: string }): void;
|
|
113
|
+
/** Shows the teaser bubble, with the configured message when none is given. */
|
|
114
|
+
showTeaserMessage(message?: string): void;
|
|
115
|
+
updateContext(context: Context): void;
|
|
116
|
+
/** Overrides widget theme variables, e.g. `{ '--color-accent': '#f00' }`. */
|
|
117
|
+
setCSSVariables(variables: Record<string, string>): void;
|
|
118
|
+
/** Switches the widget language, e.g. `'es'`. */
|
|
119
|
+
setLocale(locale: string): void;
|
|
120
|
+
destroy(): Promise<void>;
|
|
121
|
+
|
|
122
|
+
onSessionCreated(callback: (data: SessionEventData) => void): void;
|
|
123
|
+
onSessionReconnected(callback: (data: SessionEventData) => void): void;
|
|
124
|
+
onSessionClosed(callback: () => void): void;
|
|
125
|
+
onConversationClosed(callback: () => void): void;
|
|
126
|
+
onWebchatOpened(callback: (data: WebchatOpenedData) => void): void;
|
|
127
|
+
onWebchatClosed(callback: (data: WebchatClosedData) => void): void;
|
|
128
|
+
onLinkClicked(callback: (data: { url: string }) => void): void;
|
|
129
|
+
onUnreadMessages(callback: () => void): void;
|
|
130
|
+
onNoUnreadMessages(callback: () => void): void;
|
|
131
|
+
onUserActivity(callback: () => void): void;
|
|
132
|
+
onMemberLeave(callback: () => void): void;
|
|
133
|
+
onAnalyticsEvent(callback: (data: AnalyticsEventData) => void): void;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface UserConfig {
|
|
137
|
+
integrationId: string;
|
|
138
|
+
/** Regional channels host, when it differs from the default. */
|
|
139
|
+
host?: string;
|
|
140
|
+
/** Embed target, required for the `embed` widget position. */
|
|
141
|
+
element?: HTMLElement | string;
|
|
142
|
+
identityToken?: string;
|
|
143
|
+
voiceIntegrationId?: string;
|
|
144
|
+
variant?: 'default' | 'nbg' | 'alpha' | 'fiserv';
|
|
145
|
+
/** Initial conversation context, same shape as `updateContext`. */
|
|
146
|
+
context?: Context;
|
|
147
|
+
/** Widget-config overrides pass through to the loaded integration config. */
|
|
148
|
+
[key: string]: unknown;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/** Resolves once the widget is ready. */
|
|
152
|
+
export function init(config: UserConfig): Promise<WidgetController>;
|
package/dist/147.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 147.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunkMoveoAI=this.webpackChunkMoveoAI||[]).push([[147],{1147:function(t,e,r){var o="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r.g&&r.g,n=function(){function t(){this.fetch=!1,this.DOMException=o.DOMException}return t.prototype=o,new t}();!function(t){!function(e){var o=void 0!==t&&t||"undefined"!=typeof self&&self||void 0!==r.g&&r.g||{},n="URLSearchParams"in o,s="Symbol"in o&&"iterator"in Symbol,i="FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch(t){return!1}}(),a="FormData"in o,h="ArrayBuffer"in o;if(h)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(t){return t&&u.indexOf(Object.prototype.toString.call(t))>-1};function c(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function d(t){return"string"!=typeof t&&(t=String(t)),t}function y(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return s&&(e[Symbol.iterator]=function(){return e}),e}function p(t){this.map={},t instanceof p?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){if(2!=t.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function l(t){if(!t._noBody)return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function b(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function m(t){var e=new FileReader,r=b(e);return e.readAsArrayBuffer(t),r}function w(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:a&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():h&&i&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=w(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):h&&(ArrayBuffer.prototype.isPrototypeOf(t)||f(t))?this._bodyArrayBuffer=w(t):this._bodyText=t=Object.prototype.toString.call(t):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var t=l(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer)return l(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer));if(i)return this.blob().then(m);throw new Error("could not read as ArrayBuffer")},this.text=function(){var t,e,r,o,n,s=l(this);if(s)return s;if(this._bodyBlob)return t=this._bodyBlob,r=b(e=new FileReader),n=(o=/charset=([A-Za-z0-9_-]+)/.exec(t.type))?o[1]:"utf-8",e.readAsText(t,n),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),o=0;o<e.length;o++)r[o]=String.fromCharCode(e[o]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(g)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(t,e){t=c(t),e=d(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},p.prototype.delete=function(t){delete this.map[c(t)]},p.prototype.get=function(t){return t=c(t),this.has(t)?this.map[t]:null},p.prototype.has=function(t){return this.map.hasOwnProperty(c(t))},p.prototype.set=function(t,e){this.map[c(t)]=d(e)},p.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},p.prototype.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),y(t)},p.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),y(t)},p.prototype.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),y(t)},s&&(p.prototype[Symbol.iterator]=p.prototype.entries);var E=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function A(t,e){if(!(this instanceof A))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,n,s=(e=e||{}).body;if(t instanceof A){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new p(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,s||null==t._bodyInit||(s=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new p(e.headers)),this.method=(n=(r=e.method||this.method||"GET").toUpperCase(),E.indexOf(n)>-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal||function(){if("AbortController"in o)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&s)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(s),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var i=/([?&])_=[^&]*/;i.test(this.url)?this.url=this.url.replace(i,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function g(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),o=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(o),decodeURIComponent(n))}}),e}function T(t,e){if(!(this instanceof T))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new p(e.headers),this.url=e.url||"",this._initBody(t)}A.prototype.clone=function(){return new A(this,{body:this._bodyInit})},v.call(A.prototype),v.call(T.prototype),T.prototype.clone=function(){return new T(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},T.error=function(){var t=new T(null,{status:200,statusText:""});return t.ok=!1,t.status=0,t.type="error",t};var _=[301,302,303,307,308];T.redirect=function(t,e){if(-1===_.indexOf(e))throw new RangeError("Invalid status code");return new T(null,{status:e,headers:{location:t}})},e.DOMException=o.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function x(t,r){return new Promise(function(n,s){var a=new A(t,r);if(a.signal&&a.signal.aborted)return s(new e.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function f(){u.abort()}if(u.onload=function(){var t,e,r={statusText:u.statusText,headers:(t=u.getAllResponseHeaders()||"",e=new p,t.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t}).forEach(function(t){var r=t.split(":"),o=r.shift().trim();if(o){var n=r.join(":").trim();try{e.append(o,n)}catch(t){console.warn("Response "+t.message)}}}),e)};0===a.url.indexOf("file://")&&(u.status<200||u.status>599)?r.status=200:r.status=u.status,r.url="responseURL"in u?u.responseURL:r.headers.get("X-Request-URL");var o="response"in u?u.response:u.responseText;setTimeout(function(){n(new T(o,r))},0)},u.onerror=function(){setTimeout(function(){s(new TypeError("Network request failed"))},0)},u.ontimeout=function(){setTimeout(function(){s(new TypeError("Network request timed out"))},0)},u.onabort=function(){setTimeout(function(){s(new e.DOMException("Aborted","AbortError"))},0)},u.open(a.method,function(t){try{return""===t&&o.location.href?o.location.href:t}catch(e){return t}}(a.url),!0),"include"===a.credentials?u.withCredentials=!0:"omit"===a.credentials&&(u.withCredentials=!1),"responseType"in u&&(i?u.responseType="blob":h&&(u.responseType="arraybuffer")),r&&"object"==typeof r.headers&&!(r.headers instanceof p||o.Headers&&r.headers instanceof o.Headers)){var y=[];Object.getOwnPropertyNames(r.headers).forEach(function(t){y.push(c(t)),u.setRequestHeader(t,d(r.headers[t]))}),a.headers.forEach(function(t,e){-1===y.indexOf(e)&&u.setRequestHeader(e,t)})}else a.headers.forEach(function(t,e){u.setRequestHeader(e,t)});a.signal&&(a.signal.addEventListener("abort",f),u.onreadystatechange=function(){4===u.readyState&&a.signal.removeEventListener("abort",f)}),u.send(void 0===a._bodyInit?null:a._bodyInit)})}x.polyfill=!0,o.fetch||(o.fetch=x,o.Headers=p,o.Request=A,o.Response=T),e.Headers=p,e.Request=A,e.Response=T,e.fetch=x}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var s=o.fetch?o:n;(e=s.fetch).default=s.fetch,e.fetch=s.fetch,e.Headers=s.Headers,e.Request=s.Request,e.Response=s.Response,t.exports=e}}]);
|