@telia-ace/widget-conversation-flamingo 1.1.12-rc.1 → 1.1.12-rc.10
Sign up to get free protection for your applications and to get access to all the features.
- package/conversation-1bf28a6e.js +572 -0
- package/conversation-7da6b954.mjs +2619 -0
- package/conversation-component.d.ts +2 -0
- package/conversation-platform.d.ts +10 -49
- package/conversation-session.d.ts +11 -0
- package/conversation.d.ts +23 -0
- package/entry.d.ts +9 -0
- package/group.d.ts +7 -0
- package/{index-1ea0fde8.mjs → index-217978bc.mjs} +320 -319
- package/index-43151bb4.js +1 -0
- package/index-494250de.js +3 -0
- package/index-4ba82b09.mjs +777 -0
- package/index.d.ts +6 -10
- package/index.js +1 -1
- package/index.mjs +7 -9
- package/{components/conversation/ui/message-types → message-types}/message-type-html.d.ts +3 -2
- package/models/agent.d.ts +8 -0
- package/models/conversation-entry.d.ts +11 -0
- package/models/conversation-provider.d.ts +19 -0
- package/models/conversation-session-state.d.ts +13 -0
- package/models/user.d.ts +8 -0
- package/package.json +5 -6
- package/types.d.ts +9 -123
- package/agent.d.ts +0 -20
- package/components/conversation/conversation.d.ts +0 -19
- package/components/conversation/plugin.d.ts +0 -45
- package/components/conversation/ui/message-list.d.ts +0 -9
- package/components/conversation/ui/message-types/message-type-link-list.d.ts +0 -8
- package/components/conversation/ui/message-types/message-type-separator.d.ts +0 -7
- package/components/conversation/ui/message.d.ts +0 -8
- package/components/conversation/utils.d.ts +0 -1
- package/conversation-5265abc7.js +0 -446
- package/conversation-8c2255c2.mjs +0 -1865
- package/conversation-controller.d.ts +0 -118
- package/conversation-history.d.ts +0 -26
- package/conversation-provider.d.ts +0 -32
- package/index-5cf6726d.js +0 -156
- package/index-836222bd.mjs +0 -3923
- package/index-c51d4b6a.js +0 -1
- package/send-18482cae.mjs +0 -4
- package/send-eb8b9428.js +0 -1
- package/store.d.ts +0 -31
- package/user.d.ts +0 -9
- package/utils/custom-message.d.ts +0 -2
- package/utils/index.d.ts +0 -1
- package/utils/open-chat-widget.d.ts +0 -4
- package/utils/swap-provider.d.ts +0 -8
@@ -1,51 +1,12 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import
|
4
|
-
|
5
|
-
export type ConversationHandler = (conversation: ConversationProvider, component: ComponentNodeController) => void | (() => void);
|
6
|
-
export type UnregisterControllerDelegate = () => void;
|
7
|
-
export type ConversationProviderRegistration = {
|
8
|
-
name: string;
|
9
|
-
handler: ConversationHandler;
|
10
|
-
};
|
11
|
-
export declare enum ConversationEndedBehavior {
|
12
|
-
Deactivate = "deactivate",
|
13
|
-
Navigate = "navigate",
|
14
|
-
None = "none"
|
15
|
-
}
|
16
|
-
export type SessionInfo = {
|
17
|
-
id?: string;
|
18
|
-
route?: any;
|
19
|
-
conversationEndedBehavior?: ConversationEndedBehavior;
|
20
|
-
};
|
1
|
+
import { ConversationSessionState } from './models/conversation-session-state';
|
2
|
+
import { ConversationProvider } from './models/conversation-provider';
|
3
|
+
import Conversation from './conversation';
|
4
|
+
export type ProviderFactory = () => ConversationProvider;
|
21
5
|
export declare class ConversationPlatform {
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
}[];
|
29
|
-
private providers;
|
30
|
-
private disposeProviders;
|
31
|
-
private subscriptions;
|
32
|
-
private storageWriter;
|
33
|
-
private buttonQuery;
|
34
|
-
private sessionInfo;
|
35
|
-
constructor(container: Container, components: ComponentPlatform);
|
36
|
-
initialize(): void;
|
37
|
-
addSubscription(sub: EventSubscriptionCancellation): void;
|
38
|
-
static getInstance(container: Container, key?: string): Promise<ConversationPlatform>;
|
39
|
-
setConversationEndedBehavior(behavior: ConversationEndedBehavior): Promise<void>;
|
40
|
-
createController(id: string, options: {
|
41
|
-
rehydrate: boolean;
|
42
|
-
}): Promise<ConversationController>;
|
43
|
-
registerProvider(name: string, handler: ConversationHandler): void;
|
44
|
-
registerController(conversation: ConversationController, component: ComponentNodeController): boolean;
|
45
|
-
private writeToComponents;
|
46
|
-
private invokeHandler;
|
47
|
-
getComponentRoute(): Promise<any>;
|
48
|
-
dispose(): void;
|
49
|
-
static handleContactMethodClick(event: any, container: Container, contactMethod: any, _callback?: () => any): Promise<void>;
|
50
|
-
static handleContactMethodSubmit(container: Container, contactMethod: any): Promise<any>;
|
6
|
+
sessions: Map<string, ConversationSessionState>;
|
7
|
+
registeredProviders: Map<string, ProviderFactory>;
|
8
|
+
activeSessionId: string | null;
|
9
|
+
registerProvider(name: string, provider: ProviderFactory): void;
|
10
|
+
createSession(component: Conversation): ConversationSessionState;
|
11
|
+
private getProviderByConfiguration;
|
51
12
|
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { ConversationEntry } from './models/conversation-entry';
|
2
|
+
import { LitElement } from 'lit';
|
3
|
+
import { ConversationSessionState } from './models/conversation-session-state';
|
4
|
+
export declare class ConversationSession extends LitElement {
|
5
|
+
static styles: import("lit").CSSResult[];
|
6
|
+
loading: boolean;
|
7
|
+
session: ConversationSessionState;
|
8
|
+
entries: ConversationEntry[];
|
9
|
+
connectedCallback(): void;
|
10
|
+
render(): import("lit-html").TemplateResult<1>;
|
11
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { LitElement, PropertyValueMap } from 'lit';
|
2
|
+
import { Ref } from 'lit-html/directives/ref.js';
|
3
|
+
import { ConversationPlatform } from './conversation-platform';
|
4
|
+
import { ConversationSessionState } from './models/conversation-session-state';
|
5
|
+
declare const WidgetElement: (new (...args: any[]) => import("@telia-ace/widget-core-flamingo").WidgetComponentType) & typeof LitElement;
|
6
|
+
export declare class Conversation extends WidgetElement {
|
7
|
+
static styles: import("lit").CSSResultGroup[];
|
8
|
+
connectedCallback(): Promise<void>;
|
9
|
+
_onSendMessage(e: Event): Promise<void>;
|
10
|
+
_inputHandler(e: any): void;
|
11
|
+
_actionHandler(_e: CustomEvent<{
|
12
|
+
actionKey: string;
|
13
|
+
payload: Record<string, any> | string;
|
14
|
+
}>): void;
|
15
|
+
message: string;
|
16
|
+
platform: ConversationPlatform | null;
|
17
|
+
session: ConversationSessionState | null;
|
18
|
+
conversationContentRef: Ref<HTMLDivElement>;
|
19
|
+
chatScrollHeight: number;
|
20
|
+
updated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
|
21
|
+
render(): import("lit-html").TemplateResult<1>;
|
22
|
+
}
|
23
|
+
export default Conversation;
|
package/entry.d.ts
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
import { LitElement, nothing } from 'lit';
|
2
|
+
import { ConversationEntry } from './models/conversation-entry';
|
3
|
+
export declare class ConversationMessage extends LitElement {
|
4
|
+
static styles: import("lit").CSSResult[];
|
5
|
+
entry: ConversationEntry;
|
6
|
+
connectedCallback(): void;
|
7
|
+
_renderTimestamp(name: string, timestamp: number | null): import("lit-html").TemplateResult<1> | typeof nothing;
|
8
|
+
render(): import("lit-html").TemplateResult<1> | typeof nothing | "";
|
9
|
+
}
|
package/group.d.ts
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
import { LitElement } from 'lit';
|
2
|
+
import type { ConversationMessageGroup } from './types';
|
3
|
+
export declare class Group extends LitElement {
|
4
|
+
static styles: import("lit").CSSResult[];
|
5
|
+
group: ConversationMessageGroup;
|
6
|
+
render(): import("lit-html").TemplateResult<1>;
|
7
|
+
}
|