@aws/mynah-ui 4.27.0-beta.1 → 4.27.0-beta.3
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/components/detailed-list/detailed-list-item.d.ts +10 -3
- package/dist/components/detailed-list/detailed-list-sheet.d.ts +22 -0
- package/dist/components/detailed-list/detailed-list.d.ts +4 -3
- package/dist/components/sheet.d.ts +2 -0
- package/dist/helper/test-ids.d.ts +4 -0
- package/dist/main.d.ts +6 -10
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/static.d.ts +4 -4
- package/package.json +1 -1
|
@@ -1,13 +1,20 @@
|
|
|
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
|
|
5
|
+
onSelect?: (detailedListItem: DetailedListItem) => void;
|
|
6
|
+
onActionClick?: (action: ChatItemButton) => void;
|
|
7
|
+
selectable?: boolean;
|
|
8
|
+
textDirection?: 'row' | 'column';
|
|
6
9
|
}
|
|
7
10
|
export declare class DetailedListItemWrapper {
|
|
8
11
|
render: ExtendedHTMLElement;
|
|
9
12
|
private readonly props;
|
|
13
|
+
private actionMenuOverlay;
|
|
10
14
|
constructor(props: DetailedListItemWrapperProps);
|
|
11
|
-
readonly setFocus: (isFocused: boolean) => void;
|
|
15
|
+
readonly setFocus: (isFocused: boolean, scrollIntoView: boolean) => void;
|
|
12
16
|
readonly getItem: () => DetailedListItem;
|
|
17
|
+
private readonly showActionMenuOverlay;
|
|
18
|
+
private getActionButton;
|
|
19
|
+
private readonly hideActionMenuOverlay;
|
|
13
20
|
}
|
|
@@ -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
|
-
|
|
7
|
-
|
|
6
|
+
onGroupActionClick?: (action: ChatItemButton) => void;
|
|
7
|
+
onItemSelect?: (detailedListItem: DetailedListItem) => void;
|
|
8
|
+
onItemActionClick?: (action: ChatItemButton) => void;
|
|
8
9
|
}
|
|
9
10
|
export declare class DetailedListWrapper {
|
|
10
11
|
render: ExtendedHTMLElement;
|
|
@@ -18,7 +19,7 @@ export declare class DetailedListWrapper {
|
|
|
18
19
|
private readonly getHeader;
|
|
19
20
|
private readonly getFilters;
|
|
20
21
|
private readonly getDetailedListItemGroups;
|
|
21
|
-
readonly changeTarget: (direction: 'up' | 'down', snapOnLastAndFirst?: boolean) => void;
|
|
22
|
+
readonly changeTarget: (direction: 'up' | 'down', snapOnLastAndFirst?: boolean, scrollIntoView?: boolean) => void;
|
|
22
23
|
readonly getTargetElement: () => DetailedListItem | null;
|
|
23
24
|
readonly update: (detailedList: DetailedList) => void;
|
|
24
25
|
}
|
|
@@ -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;
|
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,10 @@ 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
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
description?: string;
|
|
209
|
-
}) => void;
|
|
201
|
+
openDetailedList: (data: DetailedListSheetProps) => {
|
|
202
|
+
update: (data: DetailedList) => void;
|
|
203
|
+
close: () => void;
|
|
204
|
+
changeTarget: (direction: 'up' | 'down', snapOnLastAndFirst?: boolean) => void;
|
|
205
|
+
};
|
|
210
206
|
destroy: () => void;
|
|
211
207
|
}
|