@telia-ace/widget-conversation 1.3.31-rc.0 → 1.3.32
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/agent.d.ts +2 -1
- package/components/conversation/conversation.d.ts +2 -1
- package/components/conversation/plugin.d.ts +1 -0
- package/components/conversation/ui/content.d.ts +2 -1
- package/components/conversation/ui/input.d.ts +2 -1
- package/components/conversation/ui/language-context.d.ts +2 -1
- package/components/conversation/ui/loader.d.ts +2 -1
- package/components/conversation/ui/message-list-items/button-list.d.ts +2 -1
- package/components/conversation/ui/message-list-items/custom.d.ts +2 -1
- package/components/conversation/ui/message-list-items/html.d.ts +1 -0
- package/components/conversation/ui/message-list-items/item-list.d.ts +2 -1
- package/components/conversation/ui/message-list-items/link-list.d.ts +2 -1
- package/components/conversation/ui/message-list-items/separator.d.ts +1 -0
- package/components/conversation/ui/message-list-items/text.d.ts +1 -0
- package/components/conversation/ui/message-list-items/video-request.d.ts +2 -1
- package/components/conversation/ui/message-types/agent.d.ts +3 -2
- package/components/conversation/ui/message-types/message-list.d.ts +2 -1
- package/components/conversation/ui/message-types/system.d.ts +5 -4
- package/components/conversation/ui/message-types/timestamp.d.ts +2 -1
- package/components/conversation/ui/message-types/user.d.ts +2 -1
- package/components/conversation/ui/message.d.ts +2 -1
- package/components/conversation/ui/overlay-outlets.d.ts +2 -1
- package/components/conversation/ui/skip-link.d.ts +2 -1
- package/components/conversation/ui/styles.d.ts +33 -29
- package/components/return-button/plugin.d.ts +2 -1
- package/components/return-button/return-button.d.ts +2 -1
- package/conversation-controller.d.ts +6 -5
- package/conversation-history.d.ts +1 -0
- package/conversation-platform.d.ts +3 -2
- package/conversation-provider.d.ts +1 -0
- package/index.d.ts +1 -0
- package/package.json +8 -8
- package/store.d.ts +1 -0
- package/types.d.ts +3 -2
- package/user.d.ts +1 -0
- package/utils/custom-message.d.ts +2 -1
- package/utils/open-chat-widget.d.ts +2 -1
- package/utils/swap-provider.d.ts +1 -0
package/agent.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Symbol } from '
|
|
1
|
+
import { Symbol } from '../../ui/src/index.ts';
|
|
2
2
|
import { ConversationEntry } from './conversation-controller';
|
|
3
3
|
import { ConversationProvider } from './conversation-provider';
|
|
4
4
|
import { ConversationMessageSettings, ConverstationMessageItem } from './types';
|
|
5
|
+
|
|
5
6
|
export type AgentSettings = {
|
|
6
7
|
id?: string;
|
|
7
8
|
name?: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Container } from '@webprovisions/platform';
|
|
2
2
|
import { ConversationMessage, ConversationMessageType } from '../../conversation-controller';
|
|
3
3
|
import { ConversationMessageContent, ConversationMessageSender } from '../../types';
|
|
4
|
+
|
|
4
5
|
export type BundledConversationMessage = {
|
|
5
6
|
timestamp: number;
|
|
6
7
|
content: [BundledMessageContent];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { DispatchAction } from '
|
|
1
|
+
import { DispatchAction } from '../../../../../../ui/src/index.ts';
|
|
2
2
|
import { FC } from 'react';
|
|
3
3
|
import { ButtonListProperties } from '../../../../types';
|
|
4
|
+
|
|
4
5
|
type Props = {
|
|
5
6
|
dispatch: DispatchAction;
|
|
6
7
|
} & ButtonListProperties;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { DispatchAction } from '
|
|
1
|
+
import { DispatchAction } from '../../../../../../ui/src/index.ts';
|
|
2
2
|
import { FC } from 'react';
|
|
3
3
|
import { LinkListProperties } from '../../../../types';
|
|
4
|
+
|
|
4
5
|
type Props = {
|
|
5
6
|
dispatch: DispatchAction;
|
|
6
7
|
} & LinkListProperties;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { DispatchAction } from '
|
|
1
|
+
import { DispatchAction } from '../../../../../../ui/src/index.ts';
|
|
2
2
|
import { FC } from 'react';
|
|
3
3
|
import { LinkListProperties } from '../../../../types';
|
|
4
|
+
|
|
4
5
|
type Props = {
|
|
5
6
|
dispatch: DispatchAction;
|
|
6
7
|
} & LinkListProperties;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { DispatchAction } from '
|
|
1
|
+
import { DispatchAction } from '../../../../../../ui/src/index.ts';
|
|
2
2
|
import { FC } from 'react';
|
|
3
3
|
import { VideoRequestProperties } from '../../../../types';
|
|
4
|
+
|
|
4
5
|
type Props = {
|
|
5
6
|
dispatch: DispatchAction;
|
|
6
7
|
} & VideoRequestProperties;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import { default as React } from 'react';
|
|
2
2
|
import { ConversationMessageSender } from '../../../../types';
|
|
3
|
+
|
|
3
4
|
type Props = {
|
|
4
5
|
className?: string;
|
|
5
6
|
children: any;
|
|
@@ -7,5 +8,5 @@ type Props = {
|
|
|
7
8
|
timestamp: number | null;
|
|
8
9
|
};
|
|
9
10
|
declare const AgentMessage: React.FC<Props>;
|
|
10
|
-
export declare const StyledAgentMessage: import(
|
|
11
|
+
export declare const StyledAgentMessage: import('@emotion/styled').StyledComponent<any, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
11
12
|
export default AgentMessage;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { DispatchAction } from '
|
|
2
|
+
import { DispatchAction } from '../../../../../../ui/src/index.ts';
|
|
3
3
|
import { ConverstationMessageItem } from '../../../../types';
|
|
4
|
+
|
|
4
5
|
type Props = {
|
|
5
6
|
items: ConverstationMessageItem<any>[];
|
|
6
7
|
dispatch: DispatchAction;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
2
3
|
export type Props = {
|
|
3
4
|
className?: string;
|
|
4
5
|
timestamp: number;
|
|
@@ -7,9 +8,9 @@ export type Props = {
|
|
|
7
8
|
children: any;
|
|
8
9
|
};
|
|
9
10
|
declare const SystemMessage: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
-
export declare const StyledSystemMessage: import(
|
|
11
|
-
export declare const Discrete: import(
|
|
12
|
-
theme?: import(
|
|
11
|
+
export declare const StyledSystemMessage: import('@emotion/styled').StyledComponent<any, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
12
|
+
export declare const Discrete: import('@emotion/styled').StyledComponent<{
|
|
13
|
+
theme?: import('@emotion/react').Theme | undefined;
|
|
13
14
|
as?: React.ElementType<any> | undefined;
|
|
14
15
|
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
15
16
|
export default SystemMessage;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import { default as React } from 'react';
|
|
2
2
|
import { BundledConversationMessage } from '../plugin';
|
|
3
|
+
|
|
3
4
|
export declare const ConversationMessage: React.ForwardRefExoticComponent<{
|
|
4
5
|
className?: string | undefined;
|
|
5
6
|
} & BundledConversationMessage & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,58 +1,62 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { Theme } from '@emotion/react';
|
|
3
|
-
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
2
|
+
|
|
3
|
+
export declare const Avatar: import('@emotion/styled').StyledComponent<any, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
4
|
+
export declare const LoaderAnimation: import('@emotion/react').Keyframes;
|
|
5
|
+
export declare const Loader: import('@emotion/styled').StyledComponent<{
|
|
6
6
|
theme?: Theme | undefined;
|
|
7
|
-
as?: import(
|
|
8
|
-
}, import(
|
|
9
|
-
export declare const ContentBundle: import(
|
|
7
|
+
as?: import('react').ElementType<any> | undefined;
|
|
8
|
+
}, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
9
|
+
export declare const ContentBundle: import('@emotion/styled').StyledComponent<{
|
|
10
10
|
theme?: Theme | undefined;
|
|
11
|
-
as?: import(
|
|
12
|
-
}, import(
|
|
13
|
-
export declare const MessageTitle: import(
|
|
11
|
+
as?: import('react').ElementType<any> | undefined;
|
|
12
|
+
}, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
13
|
+
export declare const MessageTitle: import('@emotion/styled').StyledComponent<import('../../../../../ui/src/index.ts').TypographyProps & {
|
|
14
14
|
theme?: Theme | undefined;
|
|
15
15
|
}, {}, {}>;
|
|
16
|
-
export declare const MessageContainer: import(
|
|
16
|
+
export declare const MessageContainer: import('@emotion/styled').StyledComponent<{
|
|
17
17
|
theme?: Theme | undefined;
|
|
18
|
-
as?: import(
|
|
18
|
+
as?: import('react').ElementType<any> | undefined;
|
|
19
19
|
} & {
|
|
20
20
|
left?: boolean | undefined;
|
|
21
21
|
center?: boolean | undefined;
|
|
22
22
|
right?: boolean | undefined;
|
|
23
|
-
}, import(
|
|
23
|
+
}, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
24
24
|
export type Stacked = 'first' | 'last' | 'middle';
|
|
25
|
-
export declare const MessageContent: import(
|
|
25
|
+
export declare const MessageContent: import('@emotion/styled').StyledComponent<{
|
|
26
26
|
theme?: Theme | undefined;
|
|
27
|
-
as?: import(
|
|
27
|
+
as?: import('react').ElementType<any> | undefined;
|
|
28
28
|
} & {
|
|
29
29
|
user?: boolean | undefined;
|
|
30
30
|
fullWidth?: boolean | undefined;
|
|
31
31
|
stacked?: Stacked | undefined;
|
|
32
32
|
padded?: boolean | undefined;
|
|
33
|
-
}, import(
|
|
34
|
-
export declare const MessageContentPart: import(
|
|
33
|
+
}, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
34
|
+
export declare const MessageContentPart: import('@emotion/styled').StyledComponent<{
|
|
35
35
|
theme?: Theme | undefined;
|
|
36
|
-
as?: import(
|
|
37
|
-
}, import(
|
|
36
|
+
as?: import('react').ElementType<any> | undefined;
|
|
37
|
+
}, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
38
38
|
export declare const messageContentPadding: (p: {
|
|
39
39
|
theme: Theme;
|
|
40
|
-
}) => import(
|
|
41
|
-
export declare const StyledForm: import(
|
|
42
|
-
data?: import(
|
|
40
|
+
}) => import('@emotion/react').SerializedStyles;
|
|
41
|
+
export declare const StyledForm: import('@emotion/styled').StyledComponent<{
|
|
42
|
+
data?: import('../../../../../forms/src/index.ts').FormData | null | undefined;
|
|
43
43
|
className?: string | undefined;
|
|
44
44
|
onChange?: Function | undefined;
|
|
45
45
|
autoFocus?: boolean | undefined;
|
|
46
|
-
schema: import(
|
|
47
|
-
layout: import(
|
|
46
|
+
schema: import('libs/forms/src/form').FormSchema;
|
|
47
|
+
layout: import('libs/forms/src/form').FormLayout;
|
|
48
48
|
} & {
|
|
49
49
|
theme?: Theme | undefined;
|
|
50
50
|
}, {}, {}>;
|
|
51
|
-
export declare const StyledHtml: import(
|
|
52
|
-
export declare const StyledActionList: import(
|
|
51
|
+
export declare const StyledHtml: import('@emotion/styled').StyledComponent<any, {}, {}>;
|
|
52
|
+
export declare const StyledActionList: import('@emotion/styled').StyledComponent<Omit<Merge<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLUListElement>, HTMLUListElement>, {
|
|
53
|
+
renderItem: import('../../../../../ui/src/index.ts').ItemRenderer;
|
|
54
|
+
items: any[];
|
|
55
|
+
renderLi?: boolean | undefined;
|
|
56
|
+
}>, "ref"> & import('react').RefAttributes<HTMLUListElement> & {
|
|
53
57
|
theme?: Theme | undefined;
|
|
54
58
|
}, {}, {}>;
|
|
55
|
-
export declare const StyledActionButton: import(
|
|
59
|
+
export declare const StyledActionButton: import('@emotion/styled').StyledComponent<{
|
|
56
60
|
theme?: Theme | undefined;
|
|
57
|
-
as?: import(
|
|
58
|
-
}, import(
|
|
61
|
+
as?: import('react').ElementType<any> | undefined;
|
|
62
|
+
}, import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
@@ -3,6 +3,7 @@ import { AgentSettings } from './agent';
|
|
|
3
3
|
import { ConversationProvider } from './conversation-provider';
|
|
4
4
|
import { ConversationMessageContent, ConversationMessageSender, ConversationMessageSettings, ConversationMessageUpdateSettings, ConverstationMessageItem, NormalizedMessageSettings } from './types';
|
|
5
5
|
import { User } from './user';
|
|
6
|
+
|
|
6
7
|
export type ValidateHandler = (formValues: {
|
|
7
8
|
[key: string]: any;
|
|
8
9
|
}) => Promise<any>;
|
|
@@ -83,19 +84,19 @@ export declare class ConversationController {
|
|
|
83
84
|
providerName: string;
|
|
84
85
|
} | undefined;
|
|
85
86
|
dispose(): void;
|
|
86
|
-
onDispose(fn: EventListener): import(
|
|
87
|
-
onStarted(fn: EventListener): import(
|
|
88
|
-
onMessageCreated(fn: EventListener): import(
|
|
87
|
+
onDispose(fn: EventListener): import('@webprovisions/platform').EventSubscriptionCancellation;
|
|
88
|
+
onStarted(fn: EventListener): import('@webprovisions/platform').EventSubscriptionCancellation;
|
|
89
|
+
onMessageCreated(fn: EventListener): import('@webprovisions/platform').EventSubscriptionCancellation;
|
|
89
90
|
isRehydrated(): Promise<boolean>;
|
|
90
91
|
disposeProvider(target: ConversationProvider): void;
|
|
91
|
-
onProvidersChange(fn: EventListener): import(
|
|
92
|
+
onProvidersChange(fn: EventListener): import('@webprovisions/platform').EventSubscriptionCancellation;
|
|
92
93
|
setComponentMountedState(mounted: boolean): void;
|
|
93
94
|
setProviderOptions(providerName: string, options: ConversationOptions): void;
|
|
94
95
|
changeProvider(providerName: string): void;
|
|
95
96
|
queueProviders(providers: string[]): void;
|
|
96
97
|
onCompleteProvider(): void;
|
|
97
98
|
getComponentMountedState(): boolean;
|
|
98
|
-
onUnreadMessage(fn: EventListener): import(
|
|
99
|
+
onUnreadMessage(fn: EventListener): import('@webprovisions/platform').EventSubscriptionCancellation;
|
|
99
100
|
createEntry(key: string, content: ConversationMessageContent, type: ConversationMessageType, sender?: ConversationMessageSender, timestamp?: number | null): ConversationEntry;
|
|
100
101
|
print: (settings: string | ConversationMessageSettings, timestamp?: number | null) => ConversationEntry;
|
|
101
102
|
update(): void;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ComponentNodeController, ComponentPlatform } from '
|
|
2
|
-
import { RouteData } from '
|
|
1
|
+
import { ComponentNodeController, ComponentPlatform } from '../../core/src/index.ts';
|
|
2
|
+
import { RouteData } from '../../routing/src/index.ts';
|
|
3
3
|
import { Container, EventManager, EventSubscriptionCancellation } from '@webprovisions/platform';
|
|
4
4
|
import { ConversationController } from './conversation-controller';
|
|
5
5
|
import { ConversationProvider } from './conversation-provider';
|
|
6
|
+
|
|
6
7
|
export type ConversationHandler = (conversation: ConversationProvider, component: ComponentNodeController) => void | (() => void);
|
|
7
8
|
export type UnregisterControllerDelegate = () => void;
|
|
8
9
|
export type ConversationProviderRegistration = {
|
|
@@ -2,6 +2,7 @@ import { Container, EventListener, EventSubscriptionCancellation } from '@webpro
|
|
|
2
2
|
import { Agent, AgentSettings } from './agent';
|
|
3
3
|
import { CancelLoaderDelegate, ConversationController, ConversationEntry, ConversationMessageType, ConversationOptions } from './conversation-controller';
|
|
4
4
|
import { ConversationMessageContent, ConversationMessageSender, ConversationMessageSettings } from './types';
|
|
5
|
+
|
|
5
6
|
export declare class ConversationProvider {
|
|
6
7
|
name: string;
|
|
7
8
|
private container;
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ConversationEndedBehavior, ConversationPlatform, UnregisterControllerDelegate } from './conversation-platform';
|
|
2
|
+
|
|
2
3
|
export { ConversationComponent } from './components/conversation/plugin';
|
|
3
4
|
export { ConversationReturnButtonComponent } from './components/return-button/plugin';
|
|
4
5
|
export { ConversationController, ConversationEntry, ConversationMessageType, } from './conversation-controller';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/widget-conversation",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.32",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@telia-ace/widget-core": "^1.3.
|
|
14
|
-
"@telia-ace/widget-forms": "^1.3.
|
|
15
|
-
"@telia-ace/widget-plugins": "^1.3.
|
|
16
|
-
"@telia-ace/widget-routing": "^1.3.
|
|
17
|
-
"@telia-ace/widget-services": "^1.3.
|
|
18
|
-
"@telia-ace/widget-ui": "^1.3.
|
|
19
|
-
"@telia-ace/widget-utilities": "^1.3.
|
|
13
|
+
"@telia-ace/widget-core": "^1.3.32",
|
|
14
|
+
"@telia-ace/widget-forms": "^1.3.32",
|
|
15
|
+
"@telia-ace/widget-plugins": "^1.3.32",
|
|
16
|
+
"@telia-ace/widget-routing": "^1.3.32",
|
|
17
|
+
"@telia-ace/widget-services": "^1.3.32",
|
|
18
|
+
"@telia-ace/widget-ui": "^1.3.32",
|
|
19
|
+
"@telia-ace/widget-utilities": "^1.3.32",
|
|
20
20
|
"@webprovisions/platform": "^1.1.4"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
package/store.d.ts
CHANGED
package/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Form, FormBuilder } from '
|
|
2
|
-
import { Symbol } from '
|
|
1
|
+
import { Form, FormBuilder } from '../../forms/src/index.ts';
|
|
2
|
+
import { Symbol } from '../../ui/src/index.ts';
|
|
3
|
+
|
|
3
4
|
export type ConversationMessageSettings = {
|
|
4
5
|
key?: string;
|
|
5
6
|
timestamp?: number;
|
package/user.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { ReactComponent } from '
|
|
1
|
+
import { ReactComponent } from '../../../core/src/index.ts';
|
|
2
2
|
import { Container } from '@webprovisions/platform';
|
|
3
|
+
|
|
3
4
|
export declare const registerCustomMessageComponent: (container: Container, type: string, component: ReactComponent) => Promise<void>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Container } from '@webprovisions/platform';
|
|
2
|
+
|
|
2
3
|
export declare const shouldPreventDefault: (container: Container) => boolean;
|
|
3
|
-
export declare const openChatWidget: (container: Container, contactMethod: any, triggerDOMTarget?: HTMLElement) => boolean | Promise<
|
|
4
|
+
export declare const openChatWidget: (container: Container, contactMethod: any, triggerDOMTarget?: HTMLElement) => boolean | Promise<void> | Promise<boolean>;
|
|
4
5
|
export declare const navigateToConversation: (container: Container, contactMethod: any, routeName?: string) => any;
|