@aws/mynah-ui 2.0.0-beta.3 → 2.0.0-beta.5

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.
@@ -24,5 +24,5 @@ export declare class ChatItemCard {
24
24
  private readonly showLinkPreview;
25
25
  private readonly hideLinkPreview;
26
26
  private readonly getChatAvatar;
27
- readonly updateAnswerBody: (body: string) => void;
27
+ readonly updateAnswerBody: (body: ExtendedHTMLElement | HTMLElement | string) => void;
28
28
  }
@@ -3,9 +3,6 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { ExtendedHTMLElement } from '../../helper/dom';
6
- export interface CharPromptInputProps {
7
- showFeedbackButton?: boolean;
8
- }
9
6
  export declare class ChatPromptInput {
10
7
  render: ExtendedHTMLElement;
11
8
  private readonly attachmentWrapper;
@@ -13,11 +10,15 @@ export declare class ChatPromptInput {
13
10
  private readonly promptTextInput;
14
11
  private readonly promptTextInputSizer;
15
12
  private readonly sendButton;
16
- private readonly clearButton;
17
- private loading;
13
+ private readonly quickActionCommands;
14
+ private commandSelector;
15
+ private commandSelectorOpen;
16
+ private inputDisabled;
18
17
  private attachment?;
19
- constructor(props?: CharPromptInputProps);
18
+ private filteredCommandsList;
19
+ constructor();
20
20
  private readonly handleInputKeydown;
21
+ private readonly getQuickCommandActions;
21
22
  private readonly calculateTextAreaHeight;
22
23
  private readonly resetTextAreaHeight;
23
24
  private readonly sendPrompt;
@@ -6,7 +6,6 @@ import { ExtendedHTMLElement } from '../../helper/dom';
6
6
  export interface ChatWrapperProps {
7
7
  onStopChatResponse?: () => void;
8
8
  onShowAllWebResultsClick?: () => void;
9
- showFeedbackButton?: boolean;
10
9
  }
11
10
  export declare class ChatWrapper {
12
11
  private readonly props?;
@@ -14,10 +13,8 @@ export declare class ChatWrapper {
14
13
  private readonly intermediateBlockContainer;
15
14
  private readonly promptInput;
16
15
  private lastChatItemCard;
17
- private containerScollState;
18
16
  render: ExtendedHTMLElement;
19
17
  constructor(props?: ChatWrapperProps);
20
18
  private readonly insertChatItem;
21
- private readonly scrollToStreamingCardBottom;
22
19
  removeAllExceptAnswersAndPrompts: () => void;
23
20
  }
@@ -11,7 +11,7 @@ export declare class FeedbackForm {
11
11
  private feedbackFormWrapper;
12
12
  private readonly feedbackStars;
13
13
  private readonly feedbackComment;
14
- private feedbackPayload;
14
+ private readonly feedbackPayload;
15
15
  private readonly feedbackSubmitButton;
16
16
  readonly feedbackFormContainer: ExtendedHTMLElement;
17
17
  constructor(props?: FeedbackFormProps);
@@ -27,6 +27,7 @@ export interface OverlayProps {
27
27
  children: Array<HTMLElement | ExtendedHTMLElement | DomBuilderObject>;
28
28
  horizontalDirection?: OverlayHorizontalDirection;
29
29
  verticalDirection?: OverlayVerticalDirection;
30
+ stretchWidth?: boolean;
30
31
  dimOutside?: boolean;
31
32
  closeOnOutsideClick?: boolean;
32
33
  background?: boolean;
@@ -42,6 +43,7 @@ export declare class Overlay {
42
43
  close: () => void;
43
44
  private readonly windowBlurHandler;
44
45
  private readonly getCalculatedLeft;
46
+ private readonly getCalculatedWidth;
45
47
  private readonly getCalculatedTop;
46
48
  updateContent: (children: Array<string | DomBuilderObject | HTMLElement | ExtendedHTMLElement>) => void;
47
49
  }
@@ -19,4 +19,5 @@ export declare class SuggestionCardBody {
19
19
  private readonly processNode;
20
20
  private readonly getCardBodyChildren;
21
21
  readonly updateCardBody: (body: string) => void;
22
+ readonly addToCardBody: (elementToAdd: ExtendedHTMLElement | HTMLElement | string) => void;
22
23
  }
@@ -9,6 +9,7 @@ export interface SuggestionCardRelevanceVoteProps {
9
9
  }
10
10
  export declare class SuggestionCardRelevanceVote {
11
11
  render: ExtendedHTMLElement;
12
+ votingId: string;
12
13
  constructor(props: SuggestionCardRelevanceVoteProps);
13
14
  private readonly handleVoteChange;
14
15
  }
@@ -6,7 +6,7 @@ import { ExtendedHTMLElement } from '../../helper/dom';
6
6
  import { Suggestion } from '../../static';
7
7
  export interface SuggestionCardProps {
8
8
  suggestion: Suggestion;
9
- compact?: 'withBody' | true;
9
+ compact?: 'flat' | true;
10
10
  showFooterButtons?: boolean;
11
11
  }
12
12
  export declare class SuggestionCard {
package/dist/main.d.ts CHANGED
@@ -14,8 +14,7 @@ export interface MynahUIProps {
14
14
  onSearch?: ((searchPayload: SearchPayload) => void) | ((searchPayload: SearchPayload) => MynahUIDataModel);
15
15
  onShowMoreWebResultsClick?: () => void;
16
16
  onReady?: () => void;
17
- onClickSuggestionVote?: (suggestion: Suggestion, vote: RelevancyVoteType) => void;
18
- onClearChat?: () => void;
17
+ onVote?: (votedItemID: string, vote: RelevancyVoteType) => void;
19
18
  onStopChatResponse?: () => void;
20
19
  onResetStore?: () => void;
21
20
  onChatPrompt?: (prompt: ChatPrompt) => void;
@@ -28,6 +27,7 @@ export interface MynahUIProps {
28
27
  onCodeInsertToCursorPosition?: (code?: string, type?: 'selection' | 'block') => void;
29
28
  onSuggestionInteraction?: (eventName: SuggestionEventName, suggestion: Suggestion, mouseEvent?: MouseEvent) => void;
30
29
  onSendFeedback?: (feedbackPayload: FeedbackPayload) => void;
30
+ onOpenDiff?: (leftPath: string, rightPath: string) => void;
31
31
  }
32
32
  export declare class MynahUI {
33
33
  private readonly props;
@@ -42,11 +42,15 @@ export declare class MynahUI {
42
42
  private readonly addGlobalListeners;
43
43
  addChatAnswer: (answer: ChatItem) => void;
44
44
  getLastChatAnswer: () => ChatItem | undefined;
45
- updateLastChatAnswerStream: (body: string) => void;
45
+ updateLastChatAnswerStream: (updateWith: string | {
46
+ title?: string;
47
+ suggestions: Suggestion[];
48
+ }) => void;
46
49
  updateStore: (data: MynahUIDataModel) => void;
47
50
  getMode: () => MynahMode | undefined;
48
51
  setStoreDefaults: (defaults: MynahUIDataModel | null) => void;
49
52
  getSearchPayload: () => SearchPayload;
53
+ showFeedbackForm: () => void;
50
54
  notify: (props: {
51
55
  duration?: number;
52
56
  type?: NotificationType;