@aws/mynah-ui 4.27.0-beta.1 → 4.27.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.
@@ -1,13 +1,19 @@
1
1
  import { ExtendedHTMLElement } from '../../helper/dom';
2
- import { DetailedListItem } from '../../static';
2
+ import { ChatItemButton, DetailedListItem } from '../../static';
3
3
  export interface DetailedListItemWrapperProps {
4
4
  listItem: DetailedListItem;
5
- onSelect: (detailedListItem: DetailedListItem) => void;
5
+ onSelect?: (detailedListItem: DetailedListItem) => void;
6
+ onActionClick?: (action: ChatItemButton) => void;
7
+ selectable?: boolean;
6
8
  }
7
9
  export declare class DetailedListItemWrapper {
8
10
  render: ExtendedHTMLElement;
9
11
  private readonly props;
12
+ private actionMenuOverlay;
10
13
  constructor(props: DetailedListItemWrapperProps);
11
14
  readonly setFocus: (isFocused: boolean) => void;
12
15
  readonly getItem: () => DetailedListItem;
16
+ private readonly showActionMenuOverlay;
17
+ private getActionButton;
18
+ private readonly hideActionMenuOverlay;
13
19
  }
@@ -0,0 +1,22 @@
1
+ import { ChatItemButton, DetailedList, DetailedListItem } from '../../static';
2
+ import { DetailedListWrapper } from './detailed-list';
3
+ export interface DetailedListSheetProps {
4
+ tabId: string;
5
+ detailedList: DetailedList;
6
+ events?: {
7
+ onFilterValueChange?: (filterValues: Record<string, any>, isValid: boolean) => void;
8
+ onKeyPress?: (e: KeyboardEvent) => void;
9
+ onItemSelect?: (detailedListItem: DetailedListItem) => void;
10
+ onActionClick?: (action: ChatItemButton) => void;
11
+ onClose?: () => void;
12
+ };
13
+ }
14
+ export declare class DetailedListSheet {
15
+ props: DetailedListSheetProps;
16
+ detailedListWrapper: DetailedListWrapper;
17
+ private readonly keyPressHandler;
18
+ constructor(props: DetailedListSheetProps);
19
+ open: () => void;
20
+ update: (detailedList: DetailedList) => void;
21
+ close: () => void;
22
+ }
@@ -3,8 +3,9 @@ import { ChatItemButton, DetailedList, DetailedListItem } from '../../static';
3
3
  export interface DetailedListWrapperProps {
4
4
  detailedList: DetailedList;
5
5
  onFilterValueChange?: (filterValues: Record<string, any>, isValid: boolean) => void;
6
- onDetailedListItemGroupActionClick: (action: ChatItemButton) => void;
7
- onDetailedListItemSelect: (detailedListItem: DetailedListItem) => void;
6
+ onDetailedListItemGroupActionClick?: (action: ChatItemButton) => void;
7
+ onDetailedListItemSelect?: (detailedListItem: DetailedListItem) => void;
8
+ onDetailedListItemActionClick?: (action: ChatItemButton) => void;
8
9
  }
9
10
  export declare class DetailedListWrapper {
10
11
  render: ExtendedHTMLElement;
@@ -10,10 +10,12 @@ export interface SheetProps {
10
10
  children?: Array<ExtendedHTMLElement | HTMLElement | string | DomBuilderObject>;
11
11
  fullScreen?: boolean;
12
12
  description?: string;
13
+ onClose: () => void;
13
14
  }
14
15
  export declare class Sheet {
15
16
  sheetContainer: ExtendedHTMLElement;
16
17
  sheetWrapper: ExtendedHTMLElement;
18
+ onClose: () => void;
17
19
  constructor();
18
20
  close: () => void;
19
21
  show: () => void;
@@ -118,6 +118,10 @@ declare const _default: {
118
118
  description: string;
119
119
  closeButton: string;
120
120
  };
121
+ detailedList: {
122
+ action: string;
123
+ actionMenu: string;
124
+ };
121
125
  tabBar: {
122
126
  wrapper: string;
123
127
  buttonsWrapper: string;
package/dist/main.d.ts CHANGED
@@ -4,6 +4,7 @@
4
4
  */
5
5
  import { RelevancyVoteType, FeedbackPayload, MynahUIDataModel, NotificationType, ChatItem, ChatItemAction, ChatPrompt, MynahUITabStoreModel, MynahUITabStoreTab, ConfigModel, ReferenceTrackerInformation, CodeSelectionType, Engagement, ChatItemFormItem, ChatItemButton, CardRenderDetails, PromptAttachmentType, QuickActionCommand, DetailedList } from './static';
6
6
  import './styles/styles.scss';
7
+ import { DetailedListSheetProps } from './components/detailed-list/detailed-list-sheet';
7
8
  export { generateUID } from './helper/guid';
8
9
  export { ChatItemBodyRenderer, } from './helper/dom';
9
10
  export { AllowedAttributesInCustomRenderer, AllowedTagsInCustomRenderer } from './helper/sanitize';
@@ -87,9 +88,6 @@ export interface MynahUIProps {
87
88
  onQuickCommandGroupActionClick?: (tabId: string, action: {
88
89
  id: string;
89
90
  }, eventId?: string) => void;
90
- onDetailActionClick?: () => void;
91
- onDetailItemClick?: () => void;
92
- onDetailFilterChange?: () => void;
93
91
  }
94
92
  export declare class MynahUI {
95
93
  private readonly render;
@@ -200,12 +198,9 @@ export declare class MynahUI {
200
198
  * Simply creates and shows a custom form
201
199
  */
202
200
  showCustomForm: (tabId: string, formItems?: ChatItemFormItem[], buttons?: ChatItemButton[], title?: string, description?: string) => void;
203
- openSheet: (data: {
204
- tabId: string;
205
- title?: string;
206
- children?: Array<ChatItem | DetailedList>;
207
- fullScreen?: boolean;
208
- description?: string;
209
- }) => void;
201
+ openDetailedList: (data: DetailedListSheetProps) => {
202
+ update: (data: DetailedList) => void;
203
+ close: () => void;
204
+ };
210
205
  destroy: () => void;
211
206
  }