@aws/mynah-ui 4.22.1 → 4.23.0-beta.2

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,7 +24,6 @@ export declare class ChatPromptInput {
24
24
  private remainingCharsOverlay;
25
25
  private quickPickTriggerIndex;
26
26
  private quickPickType;
27
- private textAfter;
28
27
  private quickPickItemGroups;
29
28
  private filteredQuickPickItemGroups;
30
29
  private quickPick;
@@ -1,9 +1,8 @@
1
1
  import { ExtendedHTMLElement } from '../../../helper/dom';
2
+ import { QuickActionCommand } from '../../../static';
2
3
  export interface PromptTextInputProps {
3
4
  tabId: string;
4
5
  initMaxLength: number;
5
- contextReplacement?: boolean;
6
- contextItems?: string[];
7
6
  onKeydown: (e: KeyboardEvent) => void;
8
7
  onInput?: (e: KeyboardEvent) => void;
9
8
  onFocus?: () => void;
@@ -13,32 +12,27 @@ export declare class PromptTextInput {
13
12
  render: ExtendedHTMLElement;
14
13
  promptTextInputMaxLength: number;
15
14
  private readonly props;
16
- private readonly promptTextInputSizer;
17
15
  private readonly promptTextInput;
18
16
  private promptInputOverlay;
19
17
  private keydownSupport;
20
18
  constructor(props: PromptTextInputProps);
21
- private readonly updatePromptTextInputSizer;
22
- readonly setContextReplacement: (contextReplacement: boolean) => void;
19
+ private readonly checkIsEmpty;
20
+ private readonly removeContextPlaceholderOverlay;
21
+ private readonly insertElementToGivenPosition;
22
+ private readonly moveCursorToEnd;
23
+ readonly insertContextItem: (contextItem: QuickActionCommand, position: number) => void;
23
24
  readonly getCursorPos: () => number;
24
- readonly getWordAndIndexOnCursorPos: () => {
25
- wordStartIndex: number;
26
- word: string;
27
- };
28
- readonly getContextElementAtTextIndex: (textIndex: number) => HTMLSpanElement | null;
29
25
  readonly clear: () => void;
30
- readonly focus: (cursorIndex?: number) => void;
26
+ readonly focus: () => void;
31
27
  readonly blur: () => void;
32
28
  readonly getTextInputValue: () => string;
33
- readonly updateTextInputValue: (value: string, placeHolder?: {
34
- index?: number;
35
- text?: string;
36
- }) => void;
29
+ readonly updateTextInputValue: (value: string) => void;
37
30
  readonly updateTextInputMaxLength: (maxLength: number) => void;
38
31
  readonly updateTextInputPlaceholder: (text: string) => void;
39
- readonly updateContextItems: (contextItems: string[]) => void;
32
+ readonly deleteTextRange: (position: number, endPosition: number) => void;
40
33
  readonly getCursorLine: () => {
41
34
  cursorLine: number;
42
35
  totalLines: number;
43
36
  };
37
+ readonly getUsedContext: () => string[][];
44
38
  }
@@ -65,8 +65,9 @@ export declare enum MynahIcons {
65
65
  TRASH = "trash",
66
66
  TRANSFORM = "transform"
67
67
  }
68
+ export type MynahIconsType = `${MynahIcons}`;
68
69
  export interface IconProps {
69
- icon: MynahIcons;
70
+ icon: MynahIcons | MynahIconsType;
70
71
  classNames?: string[];
71
72
  }
72
73
  export declare class Icon {
@@ -3,12 +3,12 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { DomBuilderObject, ExtendedHTMLElement } from '../helper/dom';
6
- import { MynahIcons } from './icon';
6
+ import { MynahIcons, MynahIconsType } from './icon';
7
7
  import '../styles/components/_title-description-icon.scss';
8
8
  interface TitleDescriptionWithIconProps {
9
9
  title?: string | ExtendedHTMLElement | HTMLElement | DomBuilderObject;
10
10
  description?: string | ExtendedHTMLElement | HTMLElement | DomBuilderObject;
11
- icon?: MynahIcons;
11
+ icon?: MynahIcons | MynahIconsType;
12
12
  testId?: string;
13
13
  classNames?: string[];
14
14
  }
@@ -0,0 +1,3 @@
1
+ import { QuickActionCommandGroupInternal } from '../static';
2
+ export declare const filterQuickPickItems: (commands: QuickActionCommandGroupInternal[], searchTerm: string) => QuickActionCommandGroupInternal[];
3
+ export declare const addRouteToCommandGroups: (commandGroups: QuickActionCommandGroupInternal[], parentRoute?: string[]) => QuickActionCommandGroupInternal[];
package/dist/main.d.ts CHANGED
@@ -9,7 +9,7 @@ export { ChatItemBodyRenderer, } from './helper/dom';
9
9
  export { AllowedAttributesInCustomRenderer, AllowedTagsInCustomRenderer } from './helper/sanitize';
10
10
  export * from './static';
11
11
  export { ToggleOption } from './components/toggle';
12
- export { MynahIcons } from './components/icon';
12
+ export { MynahIcons, MynahIconsType } from './components/icon';
13
13
  export { DomBuilder, DomBuilderObject, ExtendedHTMLElement, } from './helper/dom';
14
14
  export { ButtonProps, ButtonAbstract } from './components/button';
15
15
  export { RadioGroupProps, RadioGroupAbstract } from './components/form-items/radio-group';
@@ -80,6 +80,9 @@ export interface MynahUIProps {
80
80
  onFileClick?: (tabId: string, filePath: string, deleted: boolean, messageId?: string, eventId?: string) => void;
81
81
  onFileActionClick?: (tabId: string, messageId: string, filePath: string, actionName: string, eventId?: string) => void;
82
82
  onTabBarButtonClick?: (tabId: string, buttonId: string, eventId?: string) => void;
83
+ onQuickCommandGroupActionClick?: (tabId: string, action: {
84
+ id: string;
85
+ }, eventId?: string) => void;
83
86
  }
84
87
  export declare class MynahUI {
85
88
  private readonly render;
@@ -159,6 +162,7 @@ export declare class MynahUI {
159
162
  * @returns string selectedTabId or undefined
160
163
  */
161
164
  getAllTabs: () => MynahUITabStoreModel;
165
+ getTabData: (tabId: string) => any;
162
166
  /**
163
167
  * Toggles the visibility of the splash loader screen
164
168
  */