@aws/mynah-ui 4.23.0-beta.5 → 4.23.0-beta.7
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/chat-item/chat-item-card.d.ts +3 -0
- package/dist/components/chat-item/chat-item-tree-view-wrapper.d.ts +2 -0
- package/dist/components/chat-item/chat-item-tree-view.d.ts +3 -0
- package/dist/components/form-items/radio-group.d.ts +1 -0
- package/dist/components/form-items/select.d.ts +1 -0
- package/dist/components/form-items/stars.d.ts +1 -0
- package/dist/components/form-items/text-area.d.ts +2 -0
- package/dist/components/form-items/text-input.d.ts +2 -0
- package/dist/helper/test-ids.d.ts +1 -0
- package/dist/main.d.ts +3 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/static.d.ts +8 -1
- package/docs/DATAMODEL.md +45 -0
- package/docs/PROPERTIES.md +47 -0
- package/docs/STARTUP.md +1 -0
- package/docs/img/data-model/chatItems/header.png +0 -0
- package/package.json +1 -1
|
@@ -18,6 +18,7 @@ export declare class ChatItemCard {
|
|
|
18
18
|
private readonly updateStack;
|
|
19
19
|
private readonly initialSpinner;
|
|
20
20
|
private cardFooter;
|
|
21
|
+
private cardHeader;
|
|
21
22
|
private informationCard;
|
|
22
23
|
private tabbedCard;
|
|
23
24
|
private cardIcon;
|
|
@@ -31,8 +32,10 @@ export declare class ChatItemCard {
|
|
|
31
32
|
private followUps;
|
|
32
33
|
private votes;
|
|
33
34
|
private footer;
|
|
35
|
+
private header;
|
|
34
36
|
constructor(props: ChatItemCardProps);
|
|
35
37
|
private readonly getCardFooter;
|
|
38
|
+
private readonly getCardHeader;
|
|
36
39
|
private readonly generateCard;
|
|
37
40
|
private readonly getCardClasses;
|
|
38
41
|
private readonly updateCardContent;
|
|
@@ -14,6 +14,8 @@ export interface ChatItemTreeViewWrapperProps {
|
|
|
14
14
|
deletedFiles: string[];
|
|
15
15
|
actions?: Record<string, FileNodeAction[]>;
|
|
16
16
|
details?: Record<string, TreeNodeDetails>;
|
|
17
|
+
hideFileCount?: boolean;
|
|
18
|
+
collapsedByDefault?: boolean;
|
|
17
19
|
referenceSuggestionLabel: string;
|
|
18
20
|
references: ReferenceTrackerInformation[];
|
|
19
21
|
}
|
|
@@ -5,6 +5,8 @@ export interface ChatItemTreeViewProps {
|
|
|
5
5
|
depth?: number;
|
|
6
6
|
tabId: string;
|
|
7
7
|
messageId: string;
|
|
8
|
+
hideFileCount?: boolean;
|
|
9
|
+
collapsedByDefault?: boolean;
|
|
8
10
|
}
|
|
9
11
|
export declare class ChatItemTreeView {
|
|
10
12
|
private readonly node;
|
|
@@ -12,6 +14,7 @@ export declare class ChatItemTreeView {
|
|
|
12
14
|
private readonly depth;
|
|
13
15
|
private readonly tabId;
|
|
14
16
|
private readonly messageId;
|
|
17
|
+
private readonly hideFileCount;
|
|
15
18
|
render: ExtendedHTMLElement;
|
|
16
19
|
constructor(props: ChatItemTreeViewProps);
|
|
17
20
|
getClassNames(): string[];
|
|
@@ -12,6 +12,7 @@ export interface RadioGroupProps {
|
|
|
12
12
|
classNames?: string[];
|
|
13
13
|
attributes?: Record<string, string>;
|
|
14
14
|
label?: HTMLElement | ExtendedHTMLElement | string;
|
|
15
|
+
description?: ExtendedHTMLElement;
|
|
15
16
|
value?: string;
|
|
16
17
|
optional?: boolean;
|
|
17
18
|
options?: SelectOption[];
|
|
@@ -9,6 +9,7 @@ export interface StarsProps {
|
|
|
9
9
|
classNames?: string[];
|
|
10
10
|
attributes?: Record<string, string>;
|
|
11
11
|
label?: HTMLElement | ExtendedHTMLElement | string;
|
|
12
|
+
description?: ExtendedHTMLElement;
|
|
12
13
|
value?: string;
|
|
13
14
|
onChange?: (value: string) => void;
|
|
14
15
|
initStar?: StarValues;
|
|
@@ -9,6 +9,8 @@ export interface TextAreaProps {
|
|
|
9
9
|
classNames?: string[];
|
|
10
10
|
attributes?: Record<string, string>;
|
|
11
11
|
label?: HTMLElement | ExtendedHTMLElement | string;
|
|
12
|
+
description?: ExtendedHTMLElement;
|
|
13
|
+
fireModifierAndEnterKeyPress?: () => void;
|
|
12
14
|
placeholder?: string;
|
|
13
15
|
validationPatterns?: {
|
|
14
16
|
operator?: 'and' | 'or';
|
|
@@ -9,6 +9,8 @@ export interface TextInputProps {
|
|
|
9
9
|
classNames?: string[];
|
|
10
10
|
attributes?: Record<string, string>;
|
|
11
11
|
label?: HTMLElement | ExtendedHTMLElement | string;
|
|
12
|
+
description?: ExtendedHTMLElement;
|
|
13
|
+
fireModifierAndEnterKeyPress?: () => void;
|
|
12
14
|
placeholder?: string;
|
|
13
15
|
type?: 'text' | 'number' | 'email';
|
|
14
16
|
validationPatterns?: {
|
package/dist/main.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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 } from './static';
|
|
5
|
+
import { RelevancyVoteType, FeedbackPayload, MynahUIDataModel, NotificationType, ChatItem, ChatItemAction, ChatPrompt, MynahUITabStoreModel, MynahUITabStoreTab, ConfigModel, ReferenceTrackerInformation, CodeSelectionType, Engagement, ChatItemFormItem, ChatItemButton, CardRenderDetails, PromptAttachmentType, QuickActionCommand } from './static';
|
|
6
6
|
import './styles/styles.scss';
|
|
7
7
|
export { generateUID } from './helper/guid';
|
|
8
8
|
export { ChatItemBodyRenderer, } from './helper/dom';
|
|
@@ -47,6 +47,7 @@ export interface MynahUIProps {
|
|
|
47
47
|
onTabbedContentTabChange?: (tabId: string, messageId: string, contentTabId: string, eventId?: string) => void;
|
|
48
48
|
onTabChange?: (tabId: string, eventId?: string) => void;
|
|
49
49
|
onTabAdd?: (tabId: string, eventId?: string) => void;
|
|
50
|
+
onContextSelected?: (contextItem: QuickActionCommand, tabId: string, eventId?: string) => boolean;
|
|
50
51
|
onTabRemove?: (tabId: string, eventId?: string) => void;
|
|
51
52
|
/**
|
|
52
53
|
* @param tabId tabId which the close button triggered
|
|
@@ -68,6 +69,7 @@ export interface MynahUIProps {
|
|
|
68
69
|
onInfoLinkClick?: (tabId: string, link: string, mouseEvent?: MouseEvent, eventId?: string) => void;
|
|
69
70
|
onFormLinkClick?: (link: string, mouseEvent?: MouseEvent, eventId?: string) => void;
|
|
70
71
|
onSendFeedback?: (tabId: string, feedbackPayload: FeedbackPayload, eventId?: string) => void;
|
|
72
|
+
onFormModifierEnterPress?: (formData: Record<string, string>, tabId: string, eventId?: string) => void;
|
|
71
73
|
onCustomFormAction?: (tabId: string, action: {
|
|
72
74
|
id: string;
|
|
73
75
|
text?: string;
|