@aws/mynah-ui 4.26.0 → 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.
- package/dist/components/detailed-list/detailed-list-item.d.ts +8 -2
- package/dist/components/detailed-list/detailed-list-sheet.d.ts +22 -0
- package/dist/components/detailed-list/detailed-list.d.ts +3 -2
- package/dist/components/feedback-form/feedback-form.d.ts +4 -4
- package/dist/components/sheet.d.ts +22 -0
- package/dist/helper/test-ids.d.ts +6 -5
- package/dist/main.d.ts +8 -3
- package/dist/main.js +1 -1
- package/dist/main.js.LICENSE.txt +5 -0
- package/dist/main.js.map +1 -1
- package/dist/static.d.ts +6 -2
- package/docs/DATAMODEL.md +23 -7
- package/package.json +1 -1
- package/dist/components/feedback-form/custom-form.d.ts +0 -25
- package/ui-tests/dist/27f62b53b93858475a7f.ttf +0 -0
- package/ui-tests/dist/d50a80138ec4f2fb5e9f.ttf +0 -0
- package/ui-tests/dist/index.html +0 -9
- package/ui-tests/dist/main.js +0 -1362
- package/ui-tests/dist/main.js.map +0 -1
|
@@ -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
|
|
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
|
|
7
|
-
onDetailedListItemSelect
|
|
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;
|
|
@@ -4,19 +4,19 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { FeedbackPayload } from '../../static';
|
|
6
6
|
import { ExtendedHTMLElement } from '../../helper/dom';
|
|
7
|
-
import '../../styles/components/_feedback-form.scss';
|
|
8
7
|
export interface FeedbackFormProps {
|
|
9
8
|
initPayload?: FeedbackPayload;
|
|
10
9
|
}
|
|
11
10
|
export declare class FeedbackForm {
|
|
12
|
-
private feedbackFormWrapper;
|
|
13
11
|
private readonly feedbackOptionsWrapper;
|
|
14
12
|
private readonly feedbackComment;
|
|
15
13
|
private readonly feedbackSubmitButton;
|
|
14
|
+
readonly defaultFeedbackFormItems: ExtendedHTMLElement[];
|
|
16
15
|
private feedbackPayload;
|
|
17
|
-
|
|
16
|
+
private chatFormItems;
|
|
17
|
+
private chatButtons;
|
|
18
18
|
constructor(props?: FeedbackFormProps);
|
|
19
19
|
private readonly onFeedbackSet;
|
|
20
20
|
close: () => void;
|
|
21
|
-
|
|
21
|
+
private readonly getFormItems;
|
|
22
22
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { DomBuilderObject, ExtendedHTMLElement } from '../main';
|
|
6
|
+
import '../styles/components/_sheet.scss';
|
|
7
|
+
export interface SheetProps {
|
|
8
|
+
tabId: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
children?: Array<ExtendedHTMLElement | HTMLElement | string | DomBuilderObject>;
|
|
11
|
+
fullScreen?: boolean;
|
|
12
|
+
description?: string;
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare class Sheet {
|
|
16
|
+
sheetContainer: ExtendedHTMLElement;
|
|
17
|
+
sheetWrapper: ExtendedHTMLElement;
|
|
18
|
+
onClose: () => void;
|
|
19
|
+
constructor();
|
|
20
|
+
close: () => void;
|
|
21
|
+
show: () => void;
|
|
22
|
+
}
|
|
@@ -105,22 +105,23 @@ declare const _default: {
|
|
|
105
105
|
};
|
|
106
106
|
};
|
|
107
107
|
feedbackForm: {
|
|
108
|
-
wrapper: string;
|
|
109
|
-
title: string;
|
|
110
|
-
description: string;
|
|
111
108
|
optionsSelectWrapper: string;
|
|
112
109
|
optionsSelect: string;
|
|
113
110
|
comment: string;
|
|
114
|
-
closeButton: string;
|
|
115
111
|
cancelButton: string;
|
|
116
112
|
submitButton: string;
|
|
117
113
|
};
|
|
118
|
-
|
|
114
|
+
sheet: {
|
|
119
115
|
wrapper: string;
|
|
116
|
+
header: string;
|
|
120
117
|
title: string;
|
|
121
118
|
description: string;
|
|
122
119
|
closeButton: string;
|
|
123
120
|
};
|
|
121
|
+
detailedList: {
|
|
122
|
+
action: string;
|
|
123
|
+
actionMenu: string;
|
|
124
|
+
};
|
|
124
125
|
tabBar: {
|
|
125
126
|
wrapper: string;
|
|
126
127
|
buttonsWrapper: string;
|
package/dist/main.d.ts
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import { RelevancyVoteType, FeedbackPayload, MynahUIDataModel, NotificationType, ChatItem, ChatItemAction, ChatPrompt, MynahUITabStoreModel, MynahUITabStoreTab, ConfigModel, ReferenceTrackerInformation, CodeSelectionType, Engagement, ChatItemFormItem, ChatItemButton, CardRenderDetails, PromptAttachmentType, QuickActionCommand } from './static';
|
|
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';
|
|
@@ -97,6 +98,7 @@ export declare class MynahUI {
|
|
|
97
98
|
private readonly tabsWrapper;
|
|
98
99
|
private readonly tabContentsWrapper;
|
|
99
100
|
private readonly feedbackForm?;
|
|
101
|
+
private readonly sheet?;
|
|
100
102
|
private readonly chatWrappers;
|
|
101
103
|
constructor(props: MynahUIProps);
|
|
102
104
|
private readonly getUserEventId;
|
|
@@ -193,9 +195,12 @@ export declare class MynahUI {
|
|
|
193
195
|
onNotificationHide?: ((eventId: string) => void) | undefined;
|
|
194
196
|
}) => void;
|
|
195
197
|
/**
|
|
196
|
-
* Simply creates and shows a
|
|
197
|
-
* @param props NotificationProps
|
|
198
|
+
* Simply creates and shows a custom form
|
|
198
199
|
*/
|
|
199
200
|
showCustomForm: (tabId: string, formItems?: ChatItemFormItem[], buttons?: ChatItemButton[], title?: string, description?: string) => void;
|
|
201
|
+
openDetailedList: (data: DetailedListSheetProps) => {
|
|
202
|
+
update: (data: DetailedList) => void;
|
|
203
|
+
close: () => void;
|
|
204
|
+
};
|
|
200
205
|
destroy: () => void;
|
|
201
206
|
}
|