@telia-ace/widget-conversation 1.0.26 → 1.0.28

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.
Files changed (46) hide show
  1. package/README.md +246 -106
  2. package/dist/{ui → components}/conversation/conversation.d.ts +0 -0
  3. package/dist/{ui/conversation/conversation-component.d.ts → components/conversation/plugin.d.ts} +13 -2
  4. package/dist/components/conversation/ui/content.d.ts +2 -0
  5. package/dist/{ui/conversation/conversation-input.d.ts → components/conversation/ui/input.d.ts} +0 -0
  6. package/dist/components/conversation/ui/loader.d.ts +9 -0
  7. package/dist/components/conversation/ui/message-list-items/button-list.d.ts +8 -0
  8. package/dist/components/conversation/ui/message-list-items/custom.d.ts +9 -0
  9. package/dist/components/conversation/ui/message-list-items/html.d.ts +5 -0
  10. package/dist/components/conversation/ui/message-list-items/link-list.d.ts +8 -0
  11. package/dist/components/conversation/ui/message-list-items/separator.d.ts +2 -0
  12. package/dist/components/conversation/ui/message-list-items/text.d.ts +6 -0
  13. package/dist/components/conversation/ui/message-list-items/video-request.d.ts +8 -0
  14. package/dist/{ui/conversation → components/conversation/ui}/message-types/agent.d.ts +1 -1
  15. package/dist/{ui/conversation → components/conversation/ui}/message-types/index.d.ts +0 -1
  16. package/dist/components/conversation/ui/message-types/message-list.d.ts +9 -0
  17. package/dist/{ui/conversation → components/conversation/ui}/message-types/system.d.ts +1 -1
  18. package/dist/{ui/conversation → components/conversation/ui}/message-types/timestamp.d.ts +0 -0
  19. package/dist/{ui/conversation → components/conversation/ui}/message-types/user.d.ts +0 -0
  20. package/dist/components/conversation/ui/message.d.ts +5 -0
  21. package/dist/components/conversation/ui/overlay-outlets.d.ts +13 -0
  22. package/dist/components/conversation/ui/styles.d.ts +31 -0
  23. package/dist/{ui/return-button/return-button-component.d.ts → components/return-button/plugin.d.ts} +1 -2
  24. package/dist/{ui → components}/return-button/return-button.d.ts +0 -0
  25. package/dist/conversation.d7aad569.js +1153 -0
  26. package/dist/conversation.d7aad569.js.map +1 -0
  27. package/dist/index.d.ts +2 -1
  28. package/dist/index.js +453 -341
  29. package/dist/index.js.map +1 -1
  30. package/dist/{return-button.8773c0de.js → return-button.9c517bbe.js} +11 -14
  31. package/dist/return-button.9c517bbe.js.map +1 -0
  32. package/dist/types.d.ts +34 -41
  33. package/dist/utils/map-actions.d.ts +1 -0
  34. package/dist/utils/open-chat-widget.d.ts +1 -1
  35. package/package.json +10 -9
  36. package/dist/conversation.3981560b.js +0 -1100
  37. package/dist/conversation.3981560b.js.map +0 -1
  38. package/dist/return-button.8773c0de.js.map +0 -1
  39. package/dist/ui/conversation/conversation-content.d.ts +0 -11
  40. package/dist/ui/conversation/conversation-loader.d.ts +0 -8
  41. package/dist/ui/conversation/conversation-message.d.ts +0 -7
  42. package/dist/ui/conversation/conversation-styles.d.ts +0 -11
  43. package/dist/ui/conversation/index.d.ts +0 -2
  44. package/dist/ui/conversation/message-types/custom.d.ts +0 -9
  45. package/dist/ui/index.d.ts +0 -2
  46. package/dist/ui/return-button/index.d.ts +0 -2
package/README.md CHANGED
@@ -2,21 +2,23 @@
2
2
 
3
3
  The Widget Conversation API provides support for reading and writing to a conversational component inside a widget.
4
4
 
5
- ## Explore the API
5
+ ## Sandbox
6
6
 
7
- You can try out and watch the Conversation API in action by clicking the button below.
8
- Keep in mind that this is for demonstration purposes only and may not be best practice.
9
- We do not recommend binding functions to the `Window` object.
7
+ For demonstration purposes, we've set up a sandbox for the Widget Conversational API so that you can see it in action. Keep in mind that this is for demonstration purposes only and may not reflect best practice.
8
+
9
+ > We do not recommend binding functions to the `window` object.
10
10
 
11
11
  [![Edit elegant-jones-rnyrd](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/elegant-jones-rnyrd?fontsize=14&hidenavigation=1&theme=dark)
12
12
 
13
13
  ## Accessing the API
14
14
 
15
- Inside a plugin, access the global instance of `ConversationPlatform` by passing in the current `Container` to the `getInstance()` method. It will return a `Promise` that is resolved to the `ConversationPlatform` instance. On the instance, register a provider and pass in a name and handler by calling the `registerProvider()` function as shown below.
15
+ In order to access the API you need to have a widget with a conversational component.
16
16
 
17
- The handler function will be called once a conversational component for the specified provider is activated in the widget. Use the provider to interact with the conversation.
17
+ ### Creating the plugin
18
+
19
+ You need to register the conversational provider in the `providers`-property in the component. To access the global instance of `ConversationPlatform`, you pass in the current `Container` to the `getInstance()` method. It will return a `Promise` that is resolved to the `ConversationPlatform` instance. In the instance, register a provider and pass in name and handler by calling the `registerProvider()` function as shown below.
18
20
 
19
- ##### Example
21
+ The handler function will be called once a conversational component for the specified provider is activated in the widget. Use the provider to interact with the conversation.
20
22
 
21
23
  ```ts
22
24
  import { ConversationPlatform } from '@telia-ace/widget-conversation';
@@ -30,71 +32,122 @@ const MyPlugin = async (container) => {
30
32
  };
31
33
  ```
32
34
 
33
- ## Writing to the conversation
34
-
35
- When writing content to the conversation you will first need to create an `Agent` object and then use its `print()` function. Specify the type of entry to print and pass in the content.
35
+ You also need to register the provider inside the widget configuration:
36
36
 
37
- ### `print(content: object)`
37
+ ```JSON
38
+ "my-conversation-component": {
39
+ "type": "conversation",
40
+ "properties": {
41
+ "providers": ["my-chat"],
42
+ // ...
43
+ },
44
+ "context": {}
45
+ },
46
+ ```
38
47
 
39
- Returns a `ConversationEntry` message that can be used to update and/or remove the content from the conversation at a later stage.
48
+ ### Creating an agent in the conversation
40
49
 
41
- ##### Example
50
+ When using `createAgent` you can specify both a name and an avatar. These will then be displayed in the conversation alongside that agent's entries.
42
51
 
43
52
  ```ts
44
- const agent = conversation.createAgent();
45
- const entry = agent.print('Lorem ipsum');
46
-
47
- entry.update({
48
- // ...
53
+ const agent = conversation.createAgent({
54
+ name: 'Agent Smith',
55
+ avatar: 'https://www.site.com/avatar.jpg',
49
56
  });
50
-
51
- entry.remove();
52
57
  ```
53
58
 
54
- ### Messages
59
+ ## Writing to the conversation
60
+
61
+ **`print()` accepts an array, which is considered best practice when writing to the conversation. The previous way of posting an object will still currently be supported, but is considered to be deprecated.**
62
+
63
+ ### Posting, updating and removing content
55
64
 
56
- #### Simple text message
65
+ When managing content in the conversation you'll first need to create an `Agent`-object and then use its `print()` function. There are serveral types of entries in order to accommodate different types of content.
57
66
 
58
- Used to render plain text without HTML-formatting.
67
+ The `print(items: ConversationMessageItem[])` function let's you return a `ConversationEntry` message that can be used to update and/or remove the content from the conversation.
59
68
 
60
- ##### Example
69
+ ##### Example of simple text message
61
70
 
62
71
  ```ts
63
72
  // print user message
64
- conversation.user.print('Lorem ipsum');
73
+ conversation.user.print([['text', 'Lorem ipsum']]);
65
74
 
66
75
  // print agent message
67
76
  const agent = conversation.createAgent();
68
- agent.print('Lorem ipsum');
77
+ agent.print([['text', 'Lorem ipsum']]);
69
78
  ```
70
79
 
71
- #### Message with list of actions
80
+ ##### Example of updating or removing content
72
81
 
73
- Example of how to render a list with actions. Is only supported on `Agent` and as system message.
82
+ ```ts
83
+ const agent = conversation.createAgent();
84
+ const entry = agent.print([['text', 'Hello world!']]);
74
85
 
75
- | Name | Type | Description |
76
- | --------- | -------- | ------------------------------------------------------------- |
77
- | `title` | `string` | Title for the entry. |
78
- | `body` | `string` | Body content for the entry. Supports HTML. |
79
- | `actions` | `object` | Key-value-pairs representing available actions for the entry. |
86
+ entry.update([
87
+ // ...
88
+ ]);
80
89
 
81
- ##### Example
90
+ entry.remove();
91
+ ```
92
+
93
+ ### Entry with list of actions
94
+
95
+ You can post an entry into the conversation with actions. You can specify a title, body and available actions. This is only supported for the `Agent` and will be displayed as a system message.
96
+
97
+ This can be either in the form of a "ButtonList" or an "LinkList" as demostrated below.
98
+
99
+ | Name | Type | Description |
100
+ | --------- | -------- | -------------------------------------------- |
101
+ | `header` | `string` | Header for the entry. |
102
+ | `actions` | `array` | Array of of available actions for the entry. |
103
+
104
+ ##### Example of a list of actions
82
105
 
83
106
  ```ts
84
- agent.print({
85
- title: 'Download invoices',
86
- body: 'Click an invoice below to download a copy.',
87
- actions: {
88
- invoice_190201: 'Invoice 190201',
89
- invoice_190301: 'Invoice 190301',
90
- invoice_190401: 'Invoice 190401',
91
- },
92
- });
107
+ // example of button list
108
+ agent.print([
109
+ [
110
+ 'button-list',
111
+ {
112
+ header: 'Download invoices',
113
+ actions: [
114
+ {
115
+ actionKey: 'invoice_190201',
116
+ label: 'Invoice 190201',
117
+ },
118
+ {
119
+ actionKey: 'invoice_190301',
120
+ label: 'Invoice 190301',
121
+ },
122
+ ],
123
+ },
124
+ ],
125
+ ]);
126
+
127
+ // here we use a link list instead, but with the same actions
128
+ agent.print([
129
+ [
130
+ 'link-list',
131
+ {
132
+ header: 'Download invoices',
133
+ actions: [
134
+ {
135
+ actionKey: 'invoice_190201',
136
+ label: 'Invoice 190201',
137
+ },
138
+ {
139
+ actionKey: 'invoice_190301',
140
+ label: 'Invoice 190301',
141
+ },
142
+ ],
143
+ },
144
+ ],
145
+ ]);
93
146
  ```
94
147
 
95
- #### Message with a form
148
+ ### Entry with a form
96
149
 
97
- Example of how to render a form that can be handled by the `conversation.form` event. Is only supported on `Agent` and as system message.
150
+ You can also post a message with a form attached. This uses the `FormBuilder`-method. This is handled by the `conversation.form` event. It is only supported for `Agent` and will be displayed as a system message.
98
151
 
99
152
  | Name | Type | Description |
100
153
  | ------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -103,7 +156,7 @@ Example of how to render a form that can be handled by the `conversation.form` e
103
156
  | `form` | `(FormBuilder) => void` | A callback function for building the form. Refer to the [`@telia-ace/widget-forms`](https://www.npmjs.com/package/@telia-ace/widget-forms) package for more information about `FormBuilder`. |
104
157
  | `key` | `string` | The key used to refer to the form when validating and submitting the form. |
105
158
 
106
- ##### Example
159
+ ##### Example of an entry with a form
107
160
 
108
161
  ```ts
109
162
  agent.print({
@@ -132,107 +185,146 @@ agent.print({
132
185
  });
133
186
  ```
134
187
 
135
- ### Specify a sender name and/or avatar
188
+ ### Entry with a video call
189
+
190
+ Use the `video-request` item type to create an entry representing an incoming video call. This entry can also have a form attached, which uses the `FormBuilder`-method and is handled by the `conversation.form` event. It is only supported for an `Agent` and will be displayed as a system message.
136
191
 
137
- To create an agent with a name and avatar use the `createAgent` method on the conversation.
192
+ | Name | Type | Description |
193
+ | -------------- | -------- | ----------------------------------------------- |
194
+ | `header` | `string` | Header for the entry. |
195
+ | `acceptLabel` | `string` | Label to be shown for the "accept call button" |
196
+ | `declineLabel` | `string` | Label to be shown for the "decline call button" |
138
197
 
139
- ##### Example
198
+ ##### Example of an entry for an incoming video call
140
199
 
141
200
  ```ts
142
- const agent = conversation.createAgent({
143
- name: 'Mr. Agent',
144
- avatar: 'https://www.site.com/avatar.jpg',
145
- });
201
+ agent.print([
202
+ [
203
+ 'video-request',
204
+ {
205
+ header: 'Video call',
206
+ accept: 'Accept',
207
+ decline: 'Decline',
208
+ },
209
+ ],
210
+ ]);
211
+ ```
146
212
 
147
- agent.print({
148
- title: 'I found the following invoices associated to your account:',
149
- actions: {
150
- action1: 'Action 1',
151
- action2: 'Action 2',
152
- action3: 'Action 3',
153
- },
213
+ When the user presses one of these buttons to accept or decline the call, an action will be dispatched with actionKey `accept-video-call` or `decline-video-call`, depending on which button was clicked.
214
+
215
+ Listening to these actions can be done as following:
216
+
217
+ ```ts
218
+ component.actions.watch('conversation.action', (input, next) => {
219
+ if (input.actionKey === 'accept-video-call') {
220
+ // this will render an overlay over the widget,
221
+ // and prepare the widget for displaying the actual call
222
+ component.actions.dispatch('show-overlay', {});
223
+ } else if (input.actionKey === 'decline-video-call') {
224
+ // ...
225
+ }
226
+ return next(input);
154
227
  });
155
228
  ```
156
229
 
157
- ### Writing system messages
230
+ ### Video Call Events
158
231
 
159
- In order to print a system message to the conversation you invoke the `print` method on the `conversation`. The `print` method accepts the same arguments as on the `Agent`.
232
+ | Action Key | Description |
233
+ | --------------------------- | ---------------------------------------------------------------------------------------------- |
234
+ | `show-overlay` | Dispatch this event when you want to render an overlay where you can render the video call |
235
+ | `overlay-mounted` | Dispatched when the overlay is rendered, will provide an HTML element to render the video call |
236
+ | `hide-overlay` | Hide overlay |
237
+ | `show-overlay-conversation` | Show the underlying conversation on top of the video overlay |
238
+ | `hide-overlay-conversation` | Hide the conversation overlay. |
160
239
 
161
- #### Example
240
+ #### show-overlay
241
+
242
+ This event is recommended to be used when a user accept an video call. See the example above for one way of implementing it. This event will result in the `overlay-mounted` event being dispatched, which you may subscribe to and use to render the video call.
243
+
244
+ #### overlay-mounted
245
+
246
+ Use an overlay over the conversation to render your video call. The `show-overlay`-action, as described above, accomplishes this. After the overlay is rendered and ready it will dispatch another event: `overlay-mounted`. Use the HTML element this generates to render your video call.
162
247
 
163
248
  ```ts
164
- conversation.print('Lorem ipsum');
249
+ component.actions.watch('overlay-mounted', (overlayElem, next) => {
250
+ // the overlayElem here may be used to render the ongoing call
251
+ });
165
252
  ```
166
253
 
167
- ### Loading/typing indicator
254
+ #### hide-overlay
168
255
 
169
- In many cases you will likely fetch data from an external resource before the content is written to the conversation. In this case you should use the `loading()` function on the `ConversationProvider` to inform the user that something is about to happen. Even in cases when the response is available immediately it gives a better user experience to present a loading indicator for a short while.
256
+ Dispatching this event will hide the overlay
170
257
 
171
- In cases where you want to notify the user that the agent is currently typing, you should use the `typing` function on `Agent`.
258
+ ```ts
259
+ component.actions.dispatch('hide-overlay', {});
260
+ ```
172
261
 
173
- #### Example
262
+ #### show-overlay-conversation
174
263
 
175
- ##### Loading
264
+ Dispatching this event will show the underlying conversation on top of the video overlay.
176
265
 
177
266
  ```ts
178
- const done = conversation.loading();
179
- // ...
180
- done(); // remove loader
267
+ component.actions.dispatch('show-overlay-conversation', {});
181
268
  ```
182
269
 
183
- ##### Typing indicator
270
+ #### hide-overlay-conversation
271
+
272
+ Dispatching this event will hide the conversation overlay.
184
273
 
185
274
  ```ts
186
- const done = agent.typing();
187
- // ...
188
- done(); // remove loader
275
+ component.actions.dispatch('hide-overlay-conversation', {});
189
276
  ```
190
277
 
191
- ## Reading from the conversation
192
-
193
- The second parameter to your provider handler is a `ComponentNode` instance representing the conversational component. On it you can read the component's properties and react to action emitted by the component.
278
+ ### The loading and typing indicators
194
279
 
195
- ### Actions
280
+ When you need to fetch data from external resource you should use the `loading()` function on the `ConversationProvider` to inform the user that something is about to happen. Even in cases when the response is available immediately it gives a better user experience to present a loading indicator for a short while.
196
281
 
197
- The following actions are emitted from the conversational component.
282
+ When you need to make the user aware that your agent is currently typing, you should use the `typing` function on `Agent`.
198
283
 
199
- **Important**: For default actions it is important to call `next()` unless you want to completely stop the execution flow for the particular action. Not doing so will stop any succeeding handlers and may unintentionally break functionality.
284
+ #### Example of `loading`
200
285
 
201
- #### `conversation.user-typing`
286
+ ```ts
287
+ const done = conversation.loading();
288
+ // ...
289
+ done(); // remove loader
290
+ ```
202
291
 
203
- Is emitted when the user´s typing indicator is changed.
292
+ #### Example of `typing`
204
293
 
205
- | Name | Type | Description |
206
- | ------------ | -------- | ---------------------------------------------- |
207
- | `textLength` | `number` | The current text length of the user's message. |
294
+ ```ts
295
+ const done = agent.typing();
296
+ // ...
297
+ done(); // remove loader
298
+ ```
208
299
 
209
- #### `conversation.user-submit`
300
+ ## Writing system messages
210
301
 
211
- Is emitted when the user submits a message.
302
+ System message in the conversation are sent by using the `print` method on the `conversation`. The `print` method accepts the same arguments as on the `Agent`.
212
303
 
213
- | Name | Type | Description |
214
- | ------ | -------- | ------------------- |
215
- | `text` | `string` | The submitted text. |
304
+ #### Example
216
305
 
217
- #### `conversation.action`
306
+ ```ts
307
+ conversation.print([['text', 'Hello world!']]);
308
+ ```
218
309
 
219
- Is emitted when the user clicks on an action.
310
+ ## Reading from the conversation
220
311
 
221
- | Name | Type | Description |
222
- | ------ | -------- | ---------------------------- |
223
- | `text` | `string` | Key of the submitted action. |
312
+ The second parameter to your provider handler is a `ComponentNode` instance representing the conversational component. From it you can read the component's properties and react to action emitted by the component.
224
313
 
225
- #### `conversation.form`
314
+ The following actions are emitted from the conversational component:
226
315
 
227
- Is emitted when the data of a form is changed.
316
+ > For default actions it is necessary to call `next()` unless you want to completely stop the execution flow for the particular action. Not doing so will stop any succeeding handlers and may unintentionally break functionality.
228
317
 
229
- | Name | Type | Description |
230
- | ----------- | ---------- | --------------------------------------------------------- |
231
- | `data` | `FormData` | The form data. |
232
- | `formKey` | `string` | The unique key for the form. |
233
- | `actionKey` | `string` | The key of the form component responsible for the change. |
318
+ | Action | Name | Type | Description |
319
+ | -------------------------- | ------------ | ---------- | --------------------------------------------------------- |
320
+ | `conversation.user-typing` | `textLength` | `number` | The current text length of the user's message. |
321
+ | `conversation.user-submit` | `text` | `string` | The submitted text. |
322
+ | `conversation.action` | `text` | `string` | Key of the submitted action. |
323
+ | `conversation.form` | `data` | `FormData` | The form data. |
324
+ | `conversation.form` | `formKey` | `string` | The unique key for the form. |
325
+ | `conversation.form` | `actionKey` | `string` | The key of the form component responsible for the change. |
234
326
 
235
- In order to subscribe to any of these actions you have access to the `ComponentNodeController`. Below is an example how to subscribe to the `conversation.form` action.
327
+ If you want to subscribe to any of the `conversation.form`-actions you have access to the `ComponentNodeController`. Example below:
236
328
 
237
329
  ```ts
238
330
  component.actions.watch('conversation.form', (input, next) => {
@@ -242,7 +334,7 @@ component.actions.watch('conversation.form', (input, next) => {
242
334
 
243
335
  ### Submitting forms
244
336
 
245
- In order to listen for form events you should subscribe to the `conversation.form` event. By passing a `key` to the form, you are able to target the form in this listener.
337
+ If you want to listen for form events you should subscribe to the `conversation.form` event. By passing a `key` to the form, you are able to target the form in this listener.
246
338
 
247
339
  ```ts
248
340
  component.actions.watch('conversation.form', (input, next) => {
@@ -254,3 +346,51 @@ component.actions.watch('conversation.form', (input, next) => {
254
346
  return next(input);
255
347
  });
256
348
  ```
349
+
350
+ ### Adding custom list items
351
+
352
+ You can add custom list items to the conversation. To do so you have to register your own custom React component, which will be mapped to a key also provided by you.
353
+
354
+ #### Example of custom list items
355
+
356
+ ```ts
357
+ import { registerCustomMessageComponent } from '@telia-ace/widget-conversation';
358
+
359
+ registerCustomMessageComponent(container, 'my-custom-list-item', import('./my-custom-list-item'));
360
+ ```
361
+
362
+ Once the component has been registered it will be available to be used as any other item in the `print` method on the Conversation API.
363
+
364
+ ## Custom secondary action
365
+
366
+ You can add a secondary action button that's displayed next to the user input field. This button can run any event that you write. You need to add the `secondaryAction` property to the conversation component in the configuration. It accepts an object with the following properties:
367
+
368
+ | Name | Type | Description |
369
+ | -------- | -------- | ------------------------------------------------------------------- |
370
+ | `action` | `string` | An action that will be dispatched when the button is pressed |
371
+ | `label` | `string` | Will be used as a "title" and aria-label on the HTML button element |
372
+ | `icon` | `string` | An icon to be displayed, defaults to "browse" icon if left empty |
373
+
374
+ ```json
375
+ "conversation": {
376
+ "type": "conversation",
377
+ "properties": {
378
+ "secondaryAction": {
379
+ "action": "my-secondary-action",
380
+ "label": "Label for the secondary action",
381
+ "icon": "my-icon"
382
+ }
383
+ // ...other properties
384
+ }
385
+ }
386
+ ```
387
+
388
+ When you have added this property to the component, you can create an event for it in your code:
389
+
390
+ ```ts
391
+ component.actions.watch('conversation.action', (input, next) => {
392
+ if (input === 'my-secondary-action') {
393
+ // handle action
394
+ }
395
+ });
396
+ ```
@@ -18,6 +18,12 @@ export declare type ConversationContent = {
18
18
  export declare type ConversationComponentProperties = {
19
19
  providers: string[];
20
20
  messages: BundledConversationMessage[];
21
+ overlay?: {
22
+ conversation: boolean;
23
+ secondary: boolean;
24
+ };
25
+ overlayConversationHeader?: string;
26
+ overlayConversationCloseLabel?: string;
21
27
  loading: boolean;
22
28
  inputPlaceholder: string;
23
29
  inputDisabled: boolean;
@@ -27,6 +33,11 @@ export declare type ConversationComponentProperties = {
27
33
  avatarSize: string;
28
34
  typingActors: any[];
29
35
  sendButtonLabel: string;
36
+ secondaryAction?: {
37
+ icon?: string;
38
+ action: string;
39
+ label: string;
40
+ };
30
41
  };
31
- declare const ConversationComponent: (container: Container) => Promise<void>;
32
- export default ConversationComponent;
42
+ export declare const ConversationComponent: (container: Container) => Promise<void>;
43
+ export {};
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const ConversationContent: React.FC;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { ConversationMessageSender } from '../../../types';
3
+ declare type Props = {
4
+ className?: string;
5
+ agentData?: ConversationMessageSender;
6
+ boxed?: boolean;
7
+ };
8
+ declare const ConversationLoader: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
9
+ export default ConversationLoader;
@@ -0,0 +1,8 @@
1
+ import { DispatchAction } from '@telia-ace/widget-ui';
2
+ import { FC } from 'react';
3
+ import { ButtonListProperties } from '../../../../types';
4
+ declare type Props = {
5
+ dispatch: DispatchAction;
6
+ } & ButtonListProperties;
7
+ export declare const ButtonList: FC<Props>;
8
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ declare type Props = {
3
+ type: string;
4
+ content?: {
5
+ [key: string]: any;
6
+ };
7
+ };
8
+ export declare const Custom: React.FC<Props>;
9
+ export {};
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { HtmlProperties } from '../../../../types';
3
+ declare type Props = HtmlProperties;
4
+ export declare const Html: FC<Props>;
5
+ export {};
@@ -0,0 +1,8 @@
1
+ import { DispatchAction } from '@telia-ace/widget-ui';
2
+ import { FC } from 'react';
3
+ import { LinkListProperties } from '../../../../types';
4
+ declare type Props = {
5
+ dispatch: DispatchAction;
6
+ } & LinkListProperties;
7
+ export declare const LinkList: FC<Props>;
8
+ export {};
@@ -0,0 +1,2 @@
1
+ import { FC } from 'react';
2
+ export declare const Separator: FC;
@@ -0,0 +1,6 @@
1
+ import { FC } from 'react';
2
+ declare type Props = {
3
+ text: string;
4
+ };
5
+ export declare const Text: FC<Props>;
6
+ export {};
@@ -0,0 +1,8 @@
1
+ import { DispatchAction } from '@telia-ace/widget-ui';
2
+ import { FC } from 'react';
3
+ import { VideoRequestProperties } from '../../../../types';
4
+ declare type Props = {
5
+ dispatch: DispatchAction;
6
+ } & VideoRequestProperties;
7
+ export declare const VideoRequest: FC<Props>;
8
+ export {};
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ConversationMessageSender } from '../../../types';
2
+ import { ConversationMessageSender } from '../../../../types';
3
3
  declare type Props = {
4
4
  className?: string;
5
5
  children: any;
@@ -1,5 +1,4 @@
1
1
  export { default as AgentMessage } from './agent';
2
- export { default as CustomMessage } from './custom';
3
2
  export { default as SystemMessage } from './system';
4
3
  export { default as Timestamp } from './timestamp';
5
4
  export { default as UserMessage } from './user';
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import { DispatchAction } from '@telia-ace/widget-ui';
3
+ import { ConverstationMessageItem } from '../../../../types';
4
+ declare type Props = {
5
+ items: ConverstationMessageItem<any>[];
6
+ dispatch: DispatchAction;
7
+ };
8
+ export declare const MessageList: FC<Props>;
9
+ export {};
@@ -6,7 +6,7 @@ export declare type Props = {
6
6
  fullWidth?: boolean;
7
7
  children: any;
8
8
  };
9
- declare const SystemMessage: React.FC<Props>;
9
+ declare const SystemMessage: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
10
10
  export declare const StyledSystemMessage: import("styled-components").StyledComponent<"div", any, any, never>;
11
11
  export declare const Discrete: import("styled-components").StyledComponent<"div", any, {}, never>;
12
12
  export default SystemMessage;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { BundledConversationMessage } from '../plugin';
3
+ export declare const ConversationMessage: React.ForwardRefExoticComponent<{
4
+ className?: string | undefined;
5
+ } & BundledConversationMessage & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,13 @@
1
+ import { DispatchAction } from '@telia-ace/widget-ui';
2
+ import { FC } from 'react';
3
+ declare type OverlayOutletProps = {
4
+ dispatch: DispatchAction;
5
+ };
6
+ export declare const OverlayOutlet: FC<OverlayOutletProps>;
7
+ declare type ConversationOverlayProps = {
8
+ dispatch: DispatchAction;
9
+ header?: string;
10
+ buttonLabel?: string;
11
+ };
12
+ export declare const ConversationOverlayOutlet: FC<ConversationOverlayProps>;
13
+ export {};