@botfabrik/engine-webclient 4.93.7 → 4.94.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/README.md +4 -0
- package/dist/client/assets/{index-DCpEIwB3.css → index-C8odGRBC.css} +1 -1
- package/dist/client/assets/index-D-4bXog2.js +120 -0
- package/dist/client/assets/index-D-4bXog2.js.map +1 -0
- package/dist/client/index.html +2 -2
- package/dist/index.d.ts +52 -0
- package/dist/index.js +1 -0
- package/package.json +3 -3
- package/dist/client/assets/index-ux2toNv6.js +0 -119
- package/dist/client/assets/index-ux2toNv6.js.map +0 -1
package/dist/client/index.html
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
<meta name="theme-color" content="#000000" />
|
|
14
14
|
<meta name="google" content="notranslate" />
|
|
15
15
|
<title>Bubble Chat Client</title>
|
|
16
|
-
<script type="module" crossorigin src="./assets/index-
|
|
17
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
16
|
+
<script type="module" crossorigin src="./assets/index-D-4bXog2.js"></script>
|
|
17
|
+
<link rel="stylesheet" crossorigin href="./assets/index-C8odGRBC.css">
|
|
18
18
|
</head>
|
|
19
19
|
|
|
20
20
|
<body>
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,52 @@ export type RequestSessionRecordQuery = (params: {
|
|
|
6
6
|
querystrings: any;
|
|
7
7
|
sessionId: string;
|
|
8
8
|
}) => Promise<Record<string, unknown>>;
|
|
9
|
+
export type MenuItemType = 'link' | 'action';
|
|
10
|
+
export type MenuItemIcon = 'mail' | 'phone' | 'scroll' | 'link';
|
|
11
|
+
export type MenuItemVisibility = 'always' | 'chat-only' | 'start-screen-only';
|
|
12
|
+
type BaseMenuItem = {
|
|
13
|
+
/**
|
|
14
|
+
* Unique key for this menu item.
|
|
15
|
+
* Used for translation as `header.menu.<id>`.
|
|
16
|
+
*/
|
|
17
|
+
id: string;
|
|
18
|
+
/**
|
|
19
|
+
* Icon displayed for this menu item.
|
|
20
|
+
*/
|
|
21
|
+
icon: MenuItemIcon;
|
|
22
|
+
/**
|
|
23
|
+
* If true, a divider (line) will be displayed after this item in the menu.
|
|
24
|
+
*/
|
|
25
|
+
withDivider?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Visibility of the menu item.
|
|
28
|
+
* - `always`: visible in all contexts (start screen, chat)
|
|
29
|
+
* - `chat-only`: visible only in the chat context
|
|
30
|
+
* - `start-screen-only`: visible only in the start screen context
|
|
31
|
+
*/
|
|
32
|
+
visibility: MenuItemVisibility;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Represents a menu item that points to a web link.
|
|
36
|
+
*/
|
|
37
|
+
type LinkMenuItem = BaseMenuItem & {
|
|
38
|
+
type: 'link';
|
|
39
|
+
/**
|
|
40
|
+
* The URL that the menu item points to.
|
|
41
|
+
*/
|
|
42
|
+
url: string;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Represents a menu item that triggers an action.
|
|
46
|
+
*/
|
|
47
|
+
type ActionMenuItem = BaseMenuItem & {
|
|
48
|
+
type: 'action';
|
|
49
|
+
/**
|
|
50
|
+
* The action to be executed when the menu item is clicked.
|
|
51
|
+
*/
|
|
52
|
+
action: Action;
|
|
53
|
+
};
|
|
54
|
+
export type MenuItem = LinkMenuItem | ActionMenuItem;
|
|
9
55
|
export interface WebClientProps {
|
|
10
56
|
getStartedAction?: Action;
|
|
11
57
|
requestUserInfos?: RequestUserInfos;
|
|
@@ -78,6 +124,12 @@ export interface WebClientProps {
|
|
|
78
124
|
* @default []
|
|
79
125
|
* */
|
|
80
126
|
commands?: string[];
|
|
127
|
+
/**
|
|
128
|
+
* List of custom menu items displayed in the chat header.
|
|
129
|
+
*
|
|
130
|
+
* @default []
|
|
131
|
+
*/
|
|
132
|
+
menuItems?: MenuItem[];
|
|
81
133
|
}
|
|
82
134
|
export declare enum Devices {
|
|
83
135
|
All = "all",
|
package/dist/index.js
CHANGED
|
@@ -207,6 +207,7 @@ const sendConfigurationToClient = (socket, props, bot, clientName) => {
|
|
|
207
207
|
enableGeneralConditions: !!props.enableGeneralConditions,
|
|
208
208
|
enableSpeechSupport: !!props.speech,
|
|
209
209
|
commands: props.commands || [],
|
|
210
|
+
menuItems: props.menuItems || [],
|
|
210
211
|
};
|
|
211
212
|
socket.emit('set-settings', settings);
|
|
212
213
|
if (props.expandChatWindowAtStart &&
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botfabrik/engine-webclient",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.94.2",
|
|
4
4
|
"description": "Webclient for Botfabriks Bot Engine",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@botfabrik/engine-domain": "^4.90.6",
|
|
24
|
-
"@botfabrik/engine-transcript-export": "^4.
|
|
24
|
+
"@botfabrik/engine-transcript-export": "^4.94.1",
|
|
25
25
|
"@botfabrik/engine-utils": "^4.90.6",
|
|
26
26
|
"@google-cloud/speech": "^7.1.0",
|
|
27
27
|
"accept-language-parser": "^1.5.0",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"tsx": "^4.20.3",
|
|
40
40
|
"typescript": "5.8.3"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "cc274ce6b8cedfdd31428f05f098e0c74b12fd0f"
|
|
43
43
|
}
|