@botfabrik/engine-webclient 4.93.7 → 4.94.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.
@@ -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-ux2toNv6.js"></script>
17
- <link rel="stylesheet" crossorigin href="./assets/index-DCpEIwB3.css">
16
+ <script type="module" crossorigin src="./assets/index-DUMQmGi5.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.93.7",
3
+ "version": "4.94.1",
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.93.7",
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": "4f10c922974f52f058df15510f37f7fcd748b299"
42
+ "gitHead": "5611319105815c61625be97d05bf623f80061b85"
43
43
  }