@aws/mynah-ui 4.1.1 → 4.2.0
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/dist/main.d.ts +22 -19
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/static.d.ts +3 -0
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -12,38 +12,39 @@ export interface MynahUIProps {
|
|
|
12
12
|
defaults?: MynahUITabStoreTab;
|
|
13
13
|
tabs?: MynahUITabStoreModel;
|
|
14
14
|
config?: Partial<ConfigModel>;
|
|
15
|
-
onShowMoreWebResultsClick?: (tabId: string, messageId: string) => void;
|
|
15
|
+
onShowMoreWebResultsClick?: (tabId: string, messageId: string, eventId?: string) => void;
|
|
16
16
|
onReady?: () => void;
|
|
17
|
-
onVote?: (tabId: string, messageId: string, vote: RelevancyVoteType) => void;
|
|
18
|
-
onStopChatResponse?: (tabId: string) => void;
|
|
17
|
+
onVote?: (tabId: string, messageId: string, vote: RelevancyVoteType, eventId?: string) => void;
|
|
18
|
+
onStopChatResponse?: (tabId: string, eventId?: string) => void;
|
|
19
19
|
onResetStore?: (tabId: string) => void;
|
|
20
|
-
onChatPrompt?: (tabId: string, prompt: ChatPrompt) => void;
|
|
21
|
-
onFollowUpClicked?: (tabId: string, messageId: string, followUp: ChatItemAction) => void;
|
|
20
|
+
onChatPrompt?: (tabId: string, prompt: ChatPrompt, eventId?: string) => void;
|
|
21
|
+
onFollowUpClicked?: (tabId: string, messageId: string, followUp: ChatItemAction, eventId?: string) => void;
|
|
22
22
|
onInBodyButtonClicked?: (tabId: string, messageId: string, action: {
|
|
23
23
|
id: string;
|
|
24
24
|
text?: string;
|
|
25
25
|
formItemValues?: Record<string, string>;
|
|
26
|
-
}) => void;
|
|
27
|
-
onTabChange?: (tabId: string) => void;
|
|
28
|
-
onTabAdd?: (tabId: string) => void;
|
|
29
|
-
onTabRemove?: (tabId: string) => void;
|
|
30
|
-
onBeforeTabRemove?: (tabId: string) => boolean;
|
|
26
|
+
}, eventId?: string) => void;
|
|
27
|
+
onTabChange?: (tabId: string, eventId?: string) => void;
|
|
28
|
+
onTabAdd?: (tabId: string, eventId?: string) => void;
|
|
29
|
+
onTabRemove?: (tabId: string, eventId?: string) => void;
|
|
30
|
+
onBeforeTabRemove?: (tabId: string, eventId?: string) => boolean;
|
|
31
31
|
onChatItemEngagement?: (tabId: string, messageId: string, engagement: Engagement) => void;
|
|
32
|
-
onCopyCodeToClipboard?: (tabId: string, messageId: string, code?: string, type?: CodeSelectionType, referenceTrackerInformation?: ReferenceTrackerInformation[]) => void;
|
|
33
|
-
onCodeInsertToCursorPosition?: (tabId: string, messageId: string, code?: string, type?: CodeSelectionType, referenceTrackerInformation?: ReferenceTrackerInformation[]) => void;
|
|
34
|
-
onSourceLinkClick?: (tabId: string, messageId: string, link: string, mouseEvent?: MouseEvent) => void;
|
|
35
|
-
onLinkClick?: (tabId: string, messageId: string, link: string, mouseEvent?: MouseEvent) => void;
|
|
36
|
-
onInfoLinkClick?: (tabId: string, link: string, mouseEvent?: MouseEvent) => void;
|
|
37
|
-
onSendFeedback?: (tabId: string, feedbackPayload: FeedbackPayload) => void;
|
|
32
|
+
onCopyCodeToClipboard?: (tabId: string, messageId: string, code?: string, type?: CodeSelectionType, referenceTrackerInformation?: ReferenceTrackerInformation[], eventId?: string) => void;
|
|
33
|
+
onCodeInsertToCursorPosition?: (tabId: string, messageId: string, code?: string, type?: CodeSelectionType, referenceTrackerInformation?: ReferenceTrackerInformation[], eventId?: string) => void;
|
|
34
|
+
onSourceLinkClick?: (tabId: string, messageId: string, link: string, mouseEvent?: MouseEvent, eventId?: string) => void;
|
|
35
|
+
onLinkClick?: (tabId: string, messageId: string, link: string, mouseEvent?: MouseEvent, eventId?: string) => void;
|
|
36
|
+
onInfoLinkClick?: (tabId: string, link: string, mouseEvent?: MouseEvent, eventId?: string) => void;
|
|
37
|
+
onSendFeedback?: (tabId: string, feedbackPayload: FeedbackPayload, eventId?: string) => void;
|
|
38
38
|
onCustomFormAction?: (tabId: string, action: {
|
|
39
39
|
id: string;
|
|
40
40
|
text?: string;
|
|
41
41
|
formItemValues?: Record<string, string>;
|
|
42
|
-
}) => void;
|
|
43
|
-
onOpenDiff?: (tabId: string, filePath: string, deleted: boolean, messageId?: string) => void;
|
|
44
|
-
onFileActionClick?: (tabId: string, messageId: string, filePath: string, actionName: string) => void;
|
|
42
|
+
}, eventId?: string) => void;
|
|
43
|
+
onOpenDiff?: (tabId: string, filePath: string, deleted: boolean, messageId?: string, eventId?: string) => void;
|
|
44
|
+
onFileActionClick?: (tabId: string, messageId: string, filePath: string, actionName: string, eventId?: string) => void;
|
|
45
45
|
}
|
|
46
46
|
export declare class MynahUI {
|
|
47
|
+
private lastEventId;
|
|
47
48
|
private readonly props;
|
|
48
49
|
private readonly wrapper;
|
|
49
50
|
private readonly tabsWrapper;
|
|
@@ -51,11 +52,13 @@ export declare class MynahUI {
|
|
|
51
52
|
private readonly feedbackForm?;
|
|
52
53
|
private readonly chatWrappers;
|
|
53
54
|
constructor(props: MynahUIProps);
|
|
55
|
+
private readonly getUserEventId;
|
|
54
56
|
private readonly addGlobalListeners;
|
|
55
57
|
addToUserPrompt: (tabId: string, prompt: string) => void;
|
|
56
58
|
addChatItem: (tabId: string, chatItem: ChatItem) => void;
|
|
57
59
|
updateLastChatAnswer: (tabId: string, updateWith: Partial<ChatItem>) => void;
|
|
58
60
|
updateChatAnswerWithMessageId: (tabId: string, messageId: string, updateWith: Partial<ChatItem>) => void;
|
|
61
|
+
selectTab: (tabId: string, eventId: string) => void;
|
|
59
62
|
updateStore: (tabId: string | '', data: MynahUIDataModel) => string | undefined;
|
|
60
63
|
getSelectedTabId: () => string | undefined;
|
|
61
64
|
getAllTabs: () => MynahUITabStoreModel;
|