@telia-ace/widget-conversation-flamingo 1.1.70-rc.2 → 1.1.70-rc.20
Sign up to get free protection for your applications and to get access to all the features.
- package/conversation.d.ts +15 -2
- package/index.js +108 -71
- package/index.mjs +594 -506
- package/package.json +2 -2
package/conversation.d.ts
CHANGED
@@ -1,21 +1,26 @@
|
|
1
1
|
import { LitElement } from 'lit';
|
2
2
|
import { Ref } from 'lit-html/directives/ref.js';
|
3
3
|
import { ConversationPlatform } from './conversation-platform';
|
4
|
-
import { Observable } from 'rxjs';
|
4
|
+
import { Observable, Subject } from 'rxjs';
|
5
5
|
import { ConversationEntry } from './models/conversation-entry';
|
6
6
|
declare const WidgetElement: (new (...args: any[]) => import("@telia-ace/widget-core-flamingo").WidgetComponentType) & typeof LitElement;
|
7
7
|
export declare class Conversation extends WidgetElement {
|
8
8
|
static styles: import("lit").CSSResultGroup[];
|
9
9
|
message: string;
|
10
|
-
|
10
|
+
disabledInput: boolean;
|
11
|
+
disabledSubmit: boolean;
|
11
12
|
chatOverlayActive: boolean;
|
12
13
|
textAreaLength: number;
|
13
14
|
conversationContentRef: Ref<HTMLDivElement>;
|
15
|
+
conversationFeedRef: Ref<HTMLDivElement>;
|
14
16
|
formRef: Ref<HTMLFormElement>;
|
15
17
|
inputRef: Ref<HTMLTextAreaElement>;
|
18
|
+
scrollRef: Ref<HTMLDivElement>;
|
16
19
|
chatScrollHeight: number;
|
20
|
+
chatCurrentScrollPosition: number;
|
17
21
|
private toast;
|
18
22
|
private messageMaxLength;
|
23
|
+
private skipToLatestMessageLabel;
|
19
24
|
platform: ConversationPlatform | null;
|
20
25
|
entries: ConversationEntry[];
|
21
26
|
typing: boolean;
|
@@ -24,20 +29,28 @@ export declare class Conversation extends WidgetElement {
|
|
24
29
|
private conversationState$;
|
25
30
|
private stateMachine;
|
26
31
|
private provider$;
|
32
|
+
userTyping$: Subject<string>;
|
27
33
|
connectedCallback(): Promise<void>;
|
28
34
|
disconnectedCallback(): void;
|
29
35
|
_actionHandler(_e: CustomEvent<{
|
30
36
|
actionKey: string;
|
31
37
|
payload: Record<string, any> | string;
|
32
38
|
}>): void;
|
39
|
+
private isTypingState;
|
40
|
+
private isAtBottom;
|
41
|
+
private scrollToBottom;
|
33
42
|
private onSessionUpdated;
|
34
43
|
disableInput(): void;
|
35
44
|
enableInput(): void;
|
45
|
+
disableSubmit(): void;
|
46
|
+
enableSubmit(): void;
|
47
|
+
clearMessages(): void;
|
36
48
|
setToastMessage(message: string | null): void;
|
37
49
|
_onSendMessage(e: Event): Promise<void>;
|
38
50
|
_addHeaderOptions(): void;
|
39
51
|
_inputHandler(e: any): void;
|
40
52
|
_keyDownHandler(e: KeyboardEvent): void;
|
53
|
+
skipToLatestMessage(): void;
|
41
54
|
handover(providerKey: string, providerOptions: Record<string, any>): Observable<void>;
|
42
55
|
render(): import("lit-html").TemplateResult<1>;
|
43
56
|
}
|