@aws/mynah-ui 3.4.0 → 3.5.0
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-buttons.d.ts +18 -0
- package/dist/components/chat-item/chat-item-card.d.ts +4 -0
- package/dist/components/chat-item/chat-item-followup-option.d.ts +1 -0
- package/dist/components/chat-item/chat-item-form-items.d.ts +18 -0
- package/dist/components/feedback-form/feedback-form.d.ts +0 -1
- package/dist/components/select.d.ts +27 -0
- package/dist/components/text-area.d.ts +20 -0
- package/dist/main.d.ts +5 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/static.d.ts +20 -1
- package/package.json +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { ExtendedHTMLElement } from '../../helper/dom';
|
|
6
|
+
import { ChatItem, ChatItemButton } from '../../static';
|
|
7
|
+
export interface ChatItemButtonsWrapperProps {
|
|
8
|
+
tabId: string;
|
|
9
|
+
chatItem: ChatItem;
|
|
10
|
+
onActionClick: (action: ChatItemButton) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare class ChatItemButtonsWrapper {
|
|
13
|
+
private readonly props;
|
|
14
|
+
private readonly actions;
|
|
15
|
+
render: ExtendedHTMLElement;
|
|
16
|
+
constructor(props: ChatItemButtonsWrapperProps);
|
|
17
|
+
private readonly disableAll;
|
|
18
|
+
}
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
import { ExtendedHTMLElement } from '../../helper/dom';
|
|
6
6
|
import { ChatItem } from '../../static';
|
|
7
7
|
import { CardBody } from '../card/card-body';
|
|
8
|
+
import { ChatItemFormItemsWrapper } from './chat-item-form-items';
|
|
9
|
+
import { ChatItemButtonsWrapper } from './chat-item-buttons';
|
|
8
10
|
export interface ChatItemCardProps {
|
|
9
11
|
tabId: string;
|
|
10
12
|
chatItem: ChatItem;
|
|
@@ -15,6 +17,8 @@ export declare class ChatItemCard {
|
|
|
15
17
|
contentBody: CardBody;
|
|
16
18
|
chatAvatar: ExtendedHTMLElement;
|
|
17
19
|
updateStack: Array<Partial<ChatItem>>;
|
|
20
|
+
chatFormItems: ChatItemFormItemsWrapper | null;
|
|
21
|
+
chatButtons: ChatItemButtonsWrapper | null;
|
|
18
22
|
typewriterItemIndex: number;
|
|
19
23
|
previousTypewriterItemIndex: number;
|
|
20
24
|
typewriterId: string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { ExtendedHTMLElement } from '../../helper/dom';
|
|
6
|
+
import { ChatItem } from '../../static';
|
|
7
|
+
export interface ChatItemFormItemsWrapperProps {
|
|
8
|
+
tabId: string;
|
|
9
|
+
chatItem: ChatItem;
|
|
10
|
+
}
|
|
11
|
+
export declare class ChatItemFormItemsWrapper {
|
|
12
|
+
private readonly props;
|
|
13
|
+
private readonly options;
|
|
14
|
+
render: ExtendedHTMLElement;
|
|
15
|
+
constructor(props: ChatItemFormItemsWrapperProps);
|
|
16
|
+
disableAll: () => void;
|
|
17
|
+
getAllValues: () => Record<string, string>;
|
|
18
|
+
}
|
|
@@ -9,7 +9,6 @@ export interface FeedbackFormProps {
|
|
|
9
9
|
}
|
|
10
10
|
export declare class FeedbackForm {
|
|
11
11
|
private feedbackFormWrapper;
|
|
12
|
-
private readonly feedbackSelect;
|
|
13
12
|
private readonly feedbackOptionsWrapper;
|
|
14
13
|
private readonly feedbackComment;
|
|
15
14
|
private readonly feedbackSubmitButton;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { ExtendedHTMLElement } from '../helper/dom';
|
|
6
|
+
import { MynahIcons } from './icon';
|
|
7
|
+
interface SelectOption {
|
|
8
|
+
value: string;
|
|
9
|
+
label: string;
|
|
10
|
+
}
|
|
11
|
+
export interface SelectProps {
|
|
12
|
+
classNames?: string[];
|
|
13
|
+
attributes?: Record<string, string>;
|
|
14
|
+
icon?: MynahIcons;
|
|
15
|
+
label?: HTMLElement | ExtendedHTMLElement | string;
|
|
16
|
+
options?: SelectOption[];
|
|
17
|
+
onChange?: (value: string) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare class Select {
|
|
20
|
+
private readonly selectElement;
|
|
21
|
+
render: ExtendedHTMLElement;
|
|
22
|
+
constructor(props: SelectProps);
|
|
23
|
+
setValue: (value: string) => void;
|
|
24
|
+
getValue: () => string;
|
|
25
|
+
setEnabled: (enabled: boolean) => void;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { ExtendedHTMLElement } from '../helper/dom';
|
|
6
|
+
export interface TextAreaProps {
|
|
7
|
+
classNames?: string[];
|
|
8
|
+
attributes?: Record<string, string>;
|
|
9
|
+
label?: HTMLElement | ExtendedHTMLElement | string;
|
|
10
|
+
value?: string;
|
|
11
|
+
onChange?: (value: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare class TextArea {
|
|
14
|
+
private readonly inputElement;
|
|
15
|
+
render: ExtendedHTMLElement;
|
|
16
|
+
constructor(props: TextAreaProps);
|
|
17
|
+
setValue: (value: string) => void;
|
|
18
|
+
getValue: () => string;
|
|
19
|
+
setEnabled: (enabled: boolean) => void;
|
|
20
|
+
}
|
package/dist/main.d.ts
CHANGED
|
@@ -19,7 +19,11 @@ export interface MynahUIProps {
|
|
|
19
19
|
onResetStore?: (tabId: string) => void;
|
|
20
20
|
onChatPrompt?: (tabId: string, prompt: ChatPrompt) => void;
|
|
21
21
|
onFollowUpClicked?: (tabId: string, messageId: string, followUp: ChatItemAction) => void;
|
|
22
|
-
|
|
22
|
+
onInBodyButtonClicked?: (tabId: string, messageId: string, action: {
|
|
23
|
+
id: string;
|
|
24
|
+
text?: string;
|
|
25
|
+
formItemValues?: Record<string, string>;
|
|
26
|
+
}) => void;
|
|
23
27
|
onTabChange?: (tabId: string) => void;
|
|
24
28
|
onTabAdd?: (tabId: string) => void;
|
|
25
29
|
onTabRemove?: (tabId: string) => void;
|