@telia-ace/widget-conversation 1.0.28 → 1.0.29-next.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.
Files changed (42) hide show
  1. package/LICENSE.txt +5 -5
  2. package/README.md +396 -396
  3. package/dist/agent.d.ts +17 -17
  4. package/dist/components/conversation/conversation.d.ts +6 -6
  5. package/dist/components/conversation/plugin.d.ts +43 -43
  6. package/dist/components/conversation/ui/content.d.ts +2 -2
  7. package/dist/components/conversation/ui/input.d.ts +6 -6
  8. package/dist/components/conversation/ui/loader.d.ts +9 -9
  9. package/dist/components/conversation/ui/message-list-items/button-list.d.ts +8 -8
  10. package/dist/components/conversation/ui/message-list-items/custom.d.ts +9 -9
  11. package/dist/components/conversation/ui/message-list-items/html.d.ts +5 -5
  12. package/dist/components/conversation/ui/message-list-items/link-list.d.ts +8 -8
  13. package/dist/components/conversation/ui/message-list-items/separator.d.ts +2 -2
  14. package/dist/components/conversation/ui/message-list-items/text.d.ts +6 -6
  15. package/dist/components/conversation/ui/message-list-items/video-request.d.ts +8 -8
  16. package/dist/components/conversation/ui/message-types/agent.d.ts +11 -11
  17. package/dist/components/conversation/ui/message-types/index.d.ts +4 -4
  18. package/dist/components/conversation/ui/message-types/message-list.d.ts +9 -9
  19. package/dist/components/conversation/ui/message-types/system.d.ts +12 -12
  20. package/dist/components/conversation/ui/message-types/timestamp.d.ts +8 -8
  21. package/dist/components/conversation/ui/message-types/user.d.ts +8 -8
  22. package/dist/components/conversation/ui/message.d.ts +5 -5
  23. package/dist/components/conversation/ui/overlay-outlets.d.ts +13 -13
  24. package/dist/components/conversation/ui/styles.d.ts +31 -31
  25. package/dist/components/return-button/plugin.d.ts +18 -18
  26. package/dist/components/return-button/return-button.d.ts +6 -6
  27. package/dist/conversation-controller.d.ts +88 -88
  28. package/dist/conversation-form-adapter.d.ts +7 -7
  29. package/dist/conversation-platform.d.ts +49 -49
  30. package/dist/conversation-provider.d.ts +22 -22
  31. package/dist/conversation.d7aad569.js.map +1 -1
  32. package/dist/index.d.ts +10 -10
  33. package/dist/index.js.map +1 -1
  34. package/dist/resolve-entity-value.d.ts +10 -10
  35. package/dist/return-button.9c517bbe.js.map +1 -1
  36. package/dist/types.d.ts +103 -103
  37. package/dist/user.d.ts +7 -7
  38. package/dist/utils/custom-message.d.ts +3 -3
  39. package/dist/utils/index.d.ts +1 -1
  40. package/dist/utils/map-actions.d.ts +1 -1
  41. package/dist/utils/open-chat-widget.d.ts +4 -4
  42. package/package.json +11 -14
package/dist/types.d.ts CHANGED
@@ -1,103 +1,103 @@
1
- import { Form, FormBuilder } from '@telia-ace/widget-forms';
2
- import { Symbol } from '@telia-ace/widget-ui';
3
- export declare type ConversationMessageSettings = {
4
- key?: string;
5
- timestamp?: number;
6
- title?: string;
7
- body?: string;
8
- actions?: {
9
- [actionKey: string]: any;
10
- };
11
- form?: (builder: FormBuilder) => void;
12
- type?: string;
13
- items?: ConversationMessageList[];
14
- [key: string]: any;
15
- };
16
- export declare type NormalizedMessageSettings = {
17
- content: ConversationMessageContent;
18
- key: string;
19
- timestamp: number | null;
20
- };
21
- export declare type ConversationMessageList = {
22
- header?: string;
23
- itemKey: string;
24
- type?: ConversationMessageListType;
25
- items: ConversationMessageListItem[];
26
- };
27
- export declare type ConversationMessageListItem = {
28
- icon?: string;
29
- type?: ConversationMessageListItemType;
30
- actions?: {
31
- [actionKey: string]: any;
32
- };
33
- form?: Form;
34
- body?: string;
35
- key: string;
36
- [key: string]: any;
37
- };
38
- export declare type ConversationMessageContent = {
39
- title?: string;
40
- body?: string;
41
- actions?: {
42
- [actionKey: string]: any;
43
- };
44
- items?: ConverstationMessageItem<any>[];
45
- form?: Form;
46
- [key: string]: any;
47
- };
48
- export declare type ConverstationMessageItem<T, R = ItemPayload> = R extends [T, any] ? R : never;
49
- export declare type ConversationMessageUpdateSettings = ConversationMessageContent & {
50
- timestamp?: number;
51
- };
52
- export declare type ConversationMessageSender = {
53
- name?: string;
54
- avatar?: string | Symbol;
55
- };
56
- export declare enum ConversationMessageListType {
57
- Ordinary = "ordinary",
58
- Seperator = "seperator"
59
- }
60
- export declare enum ConversationMessageListItemType {
61
- LinkList = "link-list",
62
- Separator = "separator",
63
- ButtonList = "button-list",
64
- Text = "text",
65
- HTML = "html",
66
- VideoRequest = "video-request"
67
- }
68
- export declare type LinkListProperties = {
69
- header?: string;
70
- actions: {
71
- [key: string]: string;
72
- } | {
73
- label: string;
74
- actionKey: string;
75
- data: any;
76
- }[];
77
- };
78
- declare type LinkListItem = [ConversationMessageListItemType.LinkList, LinkListProperties];
79
- declare type TextItem = [ConversationMessageListItemType.Text, string];
80
- declare type SeparatorItem = [ConversationMessageListItemType.Separator, undefined];
81
- export declare type ButtonListProperties = {
82
- header?: string;
83
- actions: {
84
- [key: string]: string;
85
- } | {
86
- label: string;
87
- actionKey: string;
88
- data: any;
89
- }[];
90
- };
91
- declare type ButtonListItem = [ConversationMessageListItemType.ButtonList, ButtonListProperties];
92
- export declare type VideoRequestProperties = {
93
- header?: string;
94
- acceptLabel: string;
95
- declineLabel: string;
96
- };
97
- declare type VideoRequestItem = [ConversationMessageListItemType.VideoRequest, VideoRequestProperties];
98
- export declare type HtmlProperties = {
99
- body: string;
100
- };
101
- declare type HtmlItem = [ConversationMessageListItemType.HTML, HtmlProperties];
102
- declare type ItemPayload = LinkListItem | TextItem | SeparatorItem | ButtonListItem | HtmlItem | VideoRequestItem;
103
- export {};
1
+ import { Form, FormBuilder } from '@telia-ace/widget-forms';
2
+ import { Symbol } from '@telia-ace/widget-ui';
3
+ export declare type ConversationMessageSettings = {
4
+ key?: string;
5
+ timestamp?: number;
6
+ title?: string;
7
+ body?: string;
8
+ actions?: {
9
+ [actionKey: string]: any;
10
+ };
11
+ form?: (builder: FormBuilder) => void;
12
+ type?: string;
13
+ items?: ConversationMessageList[];
14
+ [key: string]: any;
15
+ };
16
+ export declare type NormalizedMessageSettings = {
17
+ content: ConversationMessageContent;
18
+ key: string;
19
+ timestamp: number | null;
20
+ };
21
+ export declare type ConversationMessageList = {
22
+ header?: string;
23
+ itemKey: string;
24
+ type?: ConversationMessageListType;
25
+ items: ConversationMessageListItem[];
26
+ };
27
+ export declare type ConversationMessageListItem = {
28
+ icon?: string;
29
+ type?: ConversationMessageListItemType;
30
+ actions?: {
31
+ [actionKey: string]: any;
32
+ };
33
+ form?: Form;
34
+ body?: string;
35
+ key: string;
36
+ [key: string]: any;
37
+ };
38
+ export declare type ConversationMessageContent = {
39
+ title?: string;
40
+ body?: string;
41
+ actions?: {
42
+ [actionKey: string]: any;
43
+ };
44
+ items?: ConverstationMessageItem<any>[];
45
+ form?: Form;
46
+ [key: string]: any;
47
+ };
48
+ export declare type ConverstationMessageItem<T, R = ItemPayload> = R extends [T, any] ? R : never;
49
+ export declare type ConversationMessageUpdateSettings = ConversationMessageContent & {
50
+ timestamp?: number;
51
+ };
52
+ export declare type ConversationMessageSender = {
53
+ name?: string;
54
+ avatar?: string | Symbol;
55
+ };
56
+ export declare enum ConversationMessageListType {
57
+ Ordinary = "ordinary",
58
+ Seperator = "seperator"
59
+ }
60
+ export declare enum ConversationMessageListItemType {
61
+ LinkList = "link-list",
62
+ Separator = "separator",
63
+ ButtonList = "button-list",
64
+ Text = "text",
65
+ HTML = "html",
66
+ VideoRequest = "video-request"
67
+ }
68
+ export declare type LinkListProperties = {
69
+ header?: string;
70
+ actions: {
71
+ [key: string]: string;
72
+ } | {
73
+ label: string;
74
+ actionKey: string;
75
+ data: any;
76
+ }[];
77
+ };
78
+ declare type LinkListItem = [ConversationMessageListItemType.LinkList, LinkListProperties];
79
+ declare type TextItem = [ConversationMessageListItemType.Text, string];
80
+ declare type SeparatorItem = [ConversationMessageListItemType.Separator, undefined];
81
+ export declare type ButtonListProperties = {
82
+ header?: string;
83
+ actions: {
84
+ [key: string]: string;
85
+ } | {
86
+ label: string;
87
+ actionKey: string;
88
+ data: any;
89
+ }[];
90
+ };
91
+ declare type ButtonListItem = [ConversationMessageListItemType.ButtonList, ButtonListProperties];
92
+ export declare type VideoRequestProperties = {
93
+ header?: string;
94
+ acceptLabel: string;
95
+ declineLabel: string;
96
+ };
97
+ declare type VideoRequestItem = [ConversationMessageListItemType.VideoRequest, VideoRequestProperties];
98
+ export declare type HtmlProperties = {
99
+ body: string;
100
+ };
101
+ declare type HtmlItem = [ConversationMessageListItemType.HTML, HtmlProperties];
102
+ declare type ItemPayload = LinkListItem | TextItem | SeparatorItem | ButtonListItem | HtmlItem | VideoRequestItem;
103
+ export {};
package/dist/user.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { ConversationController, ConversationEntry } from './conversation-controller';
2
- import { ConversationMessageSettings } from './types';
3
- export declare class User {
4
- private controller;
5
- constructor(controller: ConversationController);
6
- print: (settings: string | ConversationMessageSettings) => ConversationEntry;
7
- }
1
+ import { ConversationController, ConversationEntry } from './conversation-controller';
2
+ import { ConversationMessageSettings } from './types';
3
+ export declare class User {
4
+ private controller;
5
+ constructor(controller: ConversationController);
6
+ print: (settings: string | ConversationMessageSettings) => ConversationEntry;
7
+ }
@@ -1,3 +1,3 @@
1
- import { ReactComponent } from '@telia-ace/widget-core';
2
- import { Container } from '@webprovisions/platform';
3
- export declare const registerCustomMessageComponent: (container: Container, type: string, component: ReactComponent) => Promise<void>;
1
+ import { ReactComponent } from '@telia-ace/widget-core';
2
+ import { Container } from '@webprovisions/platform';
3
+ export declare const registerCustomMessageComponent: (container: Container, type: string, component: ReactComponent) => Promise<void>;
@@ -1 +1 @@
1
- export { navigateToConversation, openChatWidget, shouldPreventDefault } from './open-chat-widget';
1
+ export { navigateToConversation, openChatWidget, shouldPreventDefault } from './open-chat-widget';
@@ -1 +1 @@
1
- export declare const mapActions: (actions: any) => any[];
1
+ export declare const mapActions: (actions: any) => any[];
@@ -1,4 +1,4 @@
1
- import { Container } from '@webprovisions/platform';
2
- export declare const shouldPreventDefault: (container: Container) => boolean;
3
- export declare const openChatWidget: (container: Container, contactMethod: any, triggerDOMTarget?: HTMLElement) => boolean | Promise<void> | Promise<boolean>;
4
- export declare const navigateToConversation: (container: Container, contactMethod: any, routeName?: string) => any;
1
+ import { Container } from '@webprovisions/platform';
2
+ export declare const shouldPreventDefault: (container: Container) => boolean;
3
+ export declare const openChatWidget: (container: Container, contactMethod: any, triggerDOMTarget?: HTMLElement) => boolean | Promise<void> | Promise<boolean>;
4
+ export declare const navigateToConversation: (container: Container, contactMethod: any, routeName?: string) => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-conversation",
3
- "version": "1.0.28",
3
+ "version": "1.0.29-next.1",
4
4
  "description": "ACE Widget Conversation Platform",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "Telia Company AB",
@@ -26,21 +26,18 @@
26
26
  },
27
27
  "sideEffects": false,
28
28
  "dependencies": {
29
- "@telia-ace/widget-core": "^1.0.15",
30
- "@telia-ace/widget-forms": "^1.0.22",
31
- "@telia-ace/widget-plugins": "^1.0.16",
32
- "@telia-ace/widget-routing": "^1.0.16",
33
- "@telia-ace/widget-services": "^1.0.15",
34
- "@telia-ace/widget-ui": "^1.0.22",
35
- "@telia-ace/widget-utilities": "^1.0.4",
29
+ "@telia-ace/widget-core": "^1.0.16-next.1",
30
+ "@telia-ace/widget-forms": "^1.0.23-next.1",
31
+ "@telia-ace/widget-plugins": "^1.0.17-next.1",
32
+ "@telia-ace/widget-routing": "^1.0.17-next.1",
33
+ "@telia-ace/widget-services": "^1.0.16-next.1",
34
+ "@telia-ace/widget-ui": "^1.0.23-next.1",
35
+ "@telia-ace/widget-utilities": "^1.0.5-next.1",
36
36
  "@webprovisions/platform": "^1.1.2"
37
37
  },
38
38
  "peerDependencies": {
39
- "react": "^16.8.0",
40
- "styled-components": "^4.3.2"
39
+ "react": "^18.2.0",
40
+ "styled-components": "^5.3.6"
41
41
  },
42
- "devDependencies": {
43
- "@types/react": "^16.8.0"
44
- },
45
- "gitHead": "9cb0d80e6c65317a2e27a381ebe24fd0662f33e8"
42
+ "gitHead": "482f101cb80f02edf0da977ae1ec6c1abd2e146c"
46
43
  }