@aws/mynah-ui 4.12.0 → 4.13.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/button.d.ts +8 -6
- package/dist/components/card/card-body.d.ts +2 -5
- package/dist/components/card/card.d.ts +2 -1
- package/dist/components/chat-item/chat-item-buttons.d.ts +1 -1
- package/dist/components/chat-item/chat-item-card-content.d.ts +35 -0
- package/dist/components/chat-item/chat-item-card.d.ts +13 -18
- package/dist/components/chat-item/chat-item-form-items.d.ts +1 -0
- package/dist/components/chat-item/chat-item-relevance-vote.d.ts +1 -0
- package/dist/components/chat-item/chat-item-tree-view-wrapper.d.ts +1 -0
- package/dist/components/chat-item/chat-wrapper.d.ts +1 -0
- package/dist/components/chat-item/prompt-input/send-button.d.ts +4 -5
- package/dist/components/collapsible-content.d.ts +1 -0
- package/dist/components/feedback-form/feedback-form.d.ts +1 -0
- package/dist/components/form-items/radio-group.d.ts +15 -1
- package/dist/components/form-items/select.d.ts +16 -1
- package/dist/components/form-items/stars.d.ts +1 -0
- package/dist/components/form-items/text-area.d.ts +15 -1
- package/dist/components/form-items/text-input.d.ts +16 -2
- package/dist/components/icon.d.ts +1 -0
- package/dist/components/navigation-tabs.d.ts +1 -0
- package/dist/components/no-tabs.d.ts +1 -0
- package/dist/components/notification.d.ts +1 -0
- package/dist/components/overlay.d.ts +1 -0
- package/dist/components/syntax-highlighter.d.ts +2 -0
- package/dist/components/toggle.d.ts +1 -0
- package/dist/helper/config.d.ts +2 -1
- package/dist/helper/dom.d.ts +2 -0
- package/dist/main.d.ts +9 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/static.d.ts +15 -1
- package/docs/CONFIG.md +311 -0
- package/docs/DATAMODEL.md +2078 -0
- package/docs/DEVELOPER.md +499 -0
- package/docs/PROPERTIES.md +863 -0
- package/docs/STARTUP.md +51 -0
- package/docs/STYLING.md +195 -0
- package/docs/USAGE.md +502 -0
- package/docs/img/code-attachment.png +0 -0
- package/docs/img/customForm.png +0 -0
- package/docs/img/data-model/chatItems/actions.png +0 -0
- package/docs/img/data-model/chatItems/answer.png +0 -0
- package/docs/img/data-model/chatItems/answerStream.png +0 -0
- package/docs/img/data-model/chatItems/body.png +0 -0
- package/docs/img/data-model/chatItems/canBeVoted.png +0 -0
- package/docs/img/data-model/chatItems/codeInsertAndCopyButtons.png +0 -0
- package/docs/img/data-model/chatItems/codeReference-1.png +0 -0
- package/docs/img/data-model/chatItems/codeReference-2.png +0 -0
- package/docs/img/data-model/chatItems/codeResult.png +0 -0
- package/docs/img/data-model/chatItems/customRenderer_html.png +0 -0
- package/docs/img/data-model/chatItems/customRenderer_json.png +0 -0
- package/docs/img/data-model/chatItems/followUp-1.png +0 -0
- package/docs/img/data-model/chatItems/followUp-2.png +0 -0
- package/docs/img/data-model/chatItems/icon.png +0 -0
- package/docs/img/data-model/chatItems/notification-1.png +0 -0
- package/docs/img/data-model/chatItems/notification-2.png +0 -0
- package/docs/img/data-model/chatItems/notification-3.png +0 -0
- package/docs/img/data-model/chatItems/notification-4.png +0 -0
- package/docs/img/data-model/chatItems/options-all-filled.png +0 -0
- package/docs/img/data-model/chatItems/options-mandatory-filled.png +0 -0
- package/docs/img/data-model/chatItems/options-submitted.png +0 -0
- package/docs/img/data-model/chatItems/options.png +0 -0
- package/docs/img/data-model/chatItems/prompt.png +0 -0
- package/docs/img/data-model/chatItems/relatedContent-1.png +0 -0
- package/docs/img/data-model/chatItems/relatedContent-2.png +0 -0
- package/docs/img/data-model/chatItems/relatedContent-3.png +0 -0
- package/docs/img/data-model/chatItems/status.png +0 -0
- package/docs/img/data-model/chatItems/systemPrompt.png +0 -0
- package/docs/img/data-model/tabStore/contextCommands.png +0 -0
- package/docs/img/data-model/tabStore/loadingChat-1.png +0 -0
- package/docs/img/data-model/tabStore/loadingChat-2.png +0 -0
- package/docs/img/data-model/tabStore/promptInputDisabledState.png +0 -0
- package/docs/img/data-model/tabStore/promptInputPlaceholder.png +0 -0
- package/docs/img/data-model/tabStore/promptInputStickyCard.png +0 -0
- package/docs/img/data-model/tabStore/quickActionCommands.png +0 -0
- package/docs/img/data-model/tabStore/selectedCodeSnippet.png +0 -0
- package/docs/img/data-model/tabStore/stopChatResponse.png +0 -0
- package/docs/img/data-model/tabStore/tabBarButtons1.png +0 -0
- package/docs/img/data-model/tabStore/tabBarButtons2.png +0 -0
- package/docs/img/data-model/tabStore/tabTitle.png +0 -0
- package/docs/img/developer/comp0.png +0 -0
- package/docs/img/developer/comp1.png +0 -0
- package/docs/img/developer/comp2.png +0 -0
- package/docs/img/feedbackOptions.png +0 -0
- package/docs/img/maxTabs1.png +0 -0
- package/docs/img/noPrompt.png +0 -0
- package/docs/img/notification.png +0 -0
- package/docs/img/onBeforeTabRemove.png +0 -0
- package/docs/img/onBodyActionClicked.png +0 -0
- package/docs/img/onChatItemEngagement.png +0 -0
- package/docs/img/onChatPrompt.png +0 -0
- package/docs/img/onCodeInsertToCursorPosition.png +0 -0
- package/docs/img/onCopyCodeToClipboard.png +0 -0
- package/docs/img/onCustomFormAction.png +0 -0
- package/docs/img/onFileActionClick.png +0 -0
- package/docs/img/onFollowupClicked.png +0 -0
- package/docs/img/onInfoLinkClick.png +0 -0
- package/docs/img/onLinkClick.png +0 -0
- package/docs/img/onOpenDiff.png +0 -0
- package/docs/img/onSendFeedback-1.png +0 -0
- package/docs/img/onSendFeedback-2.png +0 -0
- package/docs/img/onSendFeedback-3.png +0 -0
- package/docs/img/onShowMoreClick.png +0 -0
- package/docs/img/onSourceLinkClick.png +0 -0
- package/docs/img/onStopChatResponse.png +0 -0
- package/docs/img/onTabAdd.png +0 -0
- package/docs/img/onTabChange.png +0 -0
- package/docs/img/onTabRemove.png +0 -0
- package/docs/img/onVote.png +0 -0
- package/docs/img/prompt-with-code-attached.png +0 -0
- package/docs/img/splash.gif +0 -0
- package/docs/img/texts/codeFileSuggestions.png +0 -0
- package/docs/img/texts/copyInsertToCursor.png +0 -0
- package/docs/img/texts/feedbackForm.png +0 -0
- package/docs/img/texts/fileTreeTitle.png +0 -0
- package/docs/img/texts/mainTitle.png +0 -0
- package/docs/img/texts/noMoreTabs.png +0 -0
- package/docs/img/texts/noTabsOpen.png +0 -0
- package/docs/img/texts/pleaseSelect.png +0 -0
- package/docs/img/texts/spinnerText.png +0 -0
- package/docs/img/texts/stopGenerating.png +0 -0
- package/docs/img/texts/tabCloseConfirmation.png +0 -0
- package/docs/img/texts/voteAndSourceActions.png +0 -0
- package/docs/img/theming-1.png +0 -0
- package/docs/img/theming-2.png +0 -0
- package/package.json +2 -2
- package/dist/__test__/main.spec.d.ts +0 -1
- package/dist/components/__test__/button.spec.d.ts +0 -1
- package/dist/components/__test__/chat-item/chat-item-followup.spec.d.ts +0 -1
- package/dist/components/__test__/chat-item/chat-prompt-input.spec.d.ts +0 -1
- package/dist/components/__test__/feedback-form/feedback-form.spec.d.ts +0 -1
- package/dist/components/__test__/notification.spec.d.ts +0 -1
- package/dist/components/__test__/syntax-highlighter.spec.d.ts +0 -1
- package/dist/components/__test__/toggle.spec.d.ts +0 -1
- package/dist/helper/__test__/date-time.spec.d.ts +0 -1
- package/dist/helper/__test__/dom.spec.d.ts +0 -1
- package/dist/helper/__test__/events.spec.d.ts +0 -1
- package/dist/helper/__test__/file-tree.spec.d.ts +0 -1
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { ExtendedHTMLElement } from '../helper/dom';
|
|
6
6
|
import { OverlayHorizontalDirection, OverlayVerticalDirection } from './overlay';
|
|
7
|
+
import '../styles/components/_button.scss';
|
|
7
8
|
export interface ButtonProps {
|
|
8
9
|
classNames?: string[];
|
|
9
10
|
attributes?: Record<string, string>;
|
|
10
|
-
icon?: HTMLElement | ExtendedHTMLElement
|
|
11
|
+
icon?: HTMLElement | ExtendedHTMLElement;
|
|
11
12
|
label?: HTMLElement | ExtendedHTMLElement | string;
|
|
12
13
|
tooltip?: string;
|
|
13
14
|
tooltipVerticalDirection?: OverlayVerticalDirection;
|
|
@@ -17,13 +18,14 @@ export interface ButtonProps {
|
|
|
17
18
|
additionalEvents?: Record<string, (event?: any) => any>;
|
|
18
19
|
onClick: (e: Event) => void;
|
|
19
20
|
}
|
|
20
|
-
export declare class
|
|
21
|
+
export declare abstract class ButtonAbstract {
|
|
22
|
+
render: ExtendedHTMLElement;
|
|
23
|
+
updateLabel: (label: HTMLElement | ExtendedHTMLElement | string) => void;
|
|
24
|
+
setEnabled: (enabled: boolean) => void;
|
|
25
|
+
}
|
|
26
|
+
export declare class Button extends ButtonAbstract {
|
|
21
27
|
render: ExtendedHTMLElement;
|
|
22
|
-
private buttonTooltip;
|
|
23
|
-
private buttonTooltipTimeout;
|
|
24
28
|
constructor(props: ButtonProps);
|
|
25
|
-
private readonly showButtonTooltip;
|
|
26
|
-
readonly hideButtonTooltip: () => void;
|
|
27
29
|
updateLabel: (label: HTMLElement | ExtendedHTMLElement | string) => void;
|
|
28
30
|
setEnabled: (enabled: boolean) => void;
|
|
29
31
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { DomBuilderObject, ExtendedHTMLElement } from '../../helper/dom';
|
|
6
6
|
import { OnCopiedToClipboardFunction, OnInsertToCursorPositionFunction, ReferenceTrackerInformation } from '../../static';
|
|
7
|
+
import '../../styles/components/card/_card.scss';
|
|
7
8
|
export declare const highlightersWithTooltip: {
|
|
8
9
|
start: {
|
|
9
10
|
markupStart: string;
|
|
@@ -24,6 +25,7 @@ export interface CardBodyProps {
|
|
|
24
25
|
useParts?: boolean;
|
|
25
26
|
codeBlockStartIndex?: number;
|
|
26
27
|
processChildren?: boolean;
|
|
28
|
+
classNames?: string[];
|
|
27
29
|
onLinkClick?: (url: string, e: MouseEvent) => void;
|
|
28
30
|
onCopiedToClipboard?: OnCopiedToClipboardFunction;
|
|
29
31
|
onInsertToCursorPosition?: OnInsertToCursorPositionFunction;
|
|
@@ -40,10 +42,5 @@ export declare class CardBody {
|
|
|
40
42
|
private readonly getReferenceTrackerInformationFromElement;
|
|
41
43
|
private readonly showHighlightRangeTooltip;
|
|
42
44
|
private readonly hideHighlightRangeTooltip;
|
|
43
|
-
/**
|
|
44
|
-
* Returns extension additions
|
|
45
|
-
* @returns marked options extensions
|
|
46
|
-
*/
|
|
47
|
-
private readonly getMarkedExtensions;
|
|
48
45
|
private readonly getContentBodyChildren;
|
|
49
46
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { DomBuilderObject, ExtendedHTMLElement } from '../../helper/dom';
|
|
6
6
|
import { EngagementType } from '../../static';
|
|
7
|
+
import '../../styles/components/card/_card.scss';
|
|
7
8
|
export interface CardProps extends Partial<DomBuilderObject> {
|
|
8
9
|
border?: boolean;
|
|
9
10
|
background?: boolean;
|
|
@@ -24,12 +25,12 @@ export interface CardProps extends Partial<DomBuilderObject> {
|
|
|
24
25
|
}) => void;
|
|
25
26
|
}
|
|
26
27
|
export declare class Card {
|
|
28
|
+
render: ExtendedHTMLElement;
|
|
27
29
|
private readonly props;
|
|
28
30
|
private engagementStartTime;
|
|
29
31
|
private totalMouseDistanceTraveled;
|
|
30
32
|
private previousMousePosition;
|
|
31
33
|
private mouseDownInfo;
|
|
32
|
-
render: ExtendedHTMLElement;
|
|
33
34
|
constructor(props: CardProps);
|
|
34
35
|
private readonly resetEngagement;
|
|
35
36
|
private readonly handleEngagement;
|
|
@@ -7,9 +7,9 @@ import { ChatItemButton } from '../../static';
|
|
|
7
7
|
import { ChatItemFormItemsWrapper } from './chat-item-form-items';
|
|
8
8
|
export interface ChatItemButtonsWrapperProps {
|
|
9
9
|
tabId: string;
|
|
10
|
+
classNames?: string[];
|
|
10
11
|
buttons: ChatItemButton[];
|
|
11
12
|
formItems: ChatItemFormItemsWrapper | null;
|
|
12
|
-
useButtonComponent?: boolean;
|
|
13
13
|
onActionClick: (action: ChatItemButton, e?: Event) => void;
|
|
14
14
|
}
|
|
15
15
|
export declare class ChatItemButtonsWrapper {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { DomBuilderObject, ExtendedHTMLElement } from '../../helper/dom';
|
|
6
|
+
import { CardRenderDetails, OnCopiedToClipboardFunction, OnInsertToCursorPositionFunction, ReferenceTrackerInformation } from '../../static';
|
|
7
|
+
import { CardBody } from '../card/card-body';
|
|
8
|
+
export interface ChatItemCardContentProps {
|
|
9
|
+
body?: string;
|
|
10
|
+
renderAsStream?: boolean;
|
|
11
|
+
classNames?: string[];
|
|
12
|
+
codeReference?: ReferenceTrackerInformation[];
|
|
13
|
+
onAnimationStateChange?: (isAnimating: boolean) => void;
|
|
14
|
+
contentEvents?: {
|
|
15
|
+
onLinkClick?: (url: string, e: MouseEvent) => void;
|
|
16
|
+
onCopiedToClipboard?: OnCopiedToClipboardFunction;
|
|
17
|
+
onInsertToCursorPosition?: OnInsertToCursorPositionFunction;
|
|
18
|
+
};
|
|
19
|
+
children?: Array<ExtendedHTMLElement | HTMLElement | string | DomBuilderObject>;
|
|
20
|
+
}
|
|
21
|
+
export declare class ChatItemCardContent {
|
|
22
|
+
private props;
|
|
23
|
+
render: ExtendedHTMLElement;
|
|
24
|
+
contentBody: CardBody | null;
|
|
25
|
+
private readonly updateStack;
|
|
26
|
+
private typewriterItemIndex;
|
|
27
|
+
private readonly typewriterId;
|
|
28
|
+
private lastAnimationDuration;
|
|
29
|
+
private updateTimer;
|
|
30
|
+
constructor(props: ChatItemCardContentProps);
|
|
31
|
+
private readonly getCardContent;
|
|
32
|
+
private readonly updateCard;
|
|
33
|
+
readonly updateCardStack: (updateWith: Partial<ChatItemCardContentProps>) => void;
|
|
34
|
+
readonly getRenderDetails: () => CardRenderDetails;
|
|
35
|
+
}
|
|
@@ -4,10 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { ExtendedHTMLElement } from '../../helper/dom';
|
|
6
6
|
import { CardRenderDetails, ChatItem } from '../../static';
|
|
7
|
-
import { CardBody } from '../card/card-body';
|
|
8
|
-
import { ChatItemTreeViewWrapper } from './chat-item-tree-view-wrapper';
|
|
9
|
-
import { ChatItemFormItemsWrapper } from './chat-item-form-items';
|
|
10
|
-
import { ChatItemButtonsWrapper } from './chat-item-buttons';
|
|
11
7
|
export interface ChatItemCardProps {
|
|
12
8
|
tabId: string;
|
|
13
9
|
chatItem: ChatItem;
|
|
@@ -15,24 +11,23 @@ export interface ChatItemCardProps {
|
|
|
15
11
|
export declare class ChatItemCard {
|
|
16
12
|
readonly props: ChatItemCardProps;
|
|
17
13
|
render: ExtendedHTMLElement;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
private
|
|
14
|
+
private readonly card;
|
|
15
|
+
private readonly updateStack;
|
|
16
|
+
private readonly initialSpinner;
|
|
17
|
+
private cardIcon;
|
|
18
|
+
private contentBody;
|
|
19
|
+
private chatAvatar;
|
|
20
|
+
private chatFormItems;
|
|
21
|
+
private customRendererWrapper;
|
|
22
|
+
private chatButtons;
|
|
23
|
+
private fileTreeWrapper;
|
|
24
|
+
private followUps;
|
|
25
|
+
private votes;
|
|
29
26
|
constructor(props: ChatItemCardProps);
|
|
30
27
|
private readonly generateCard;
|
|
31
28
|
private readonly getCardClasses;
|
|
32
|
-
private readonly
|
|
29
|
+
private readonly updateCardContent;
|
|
33
30
|
private readonly getChatAvatar;
|
|
34
|
-
private readonly getInsertedTypewriterPartsCss;
|
|
35
|
-
private readonly getInsertingTypewriterPartsCss;
|
|
36
31
|
private readonly checkCardSnap;
|
|
37
32
|
readonly updateCard: () => void;
|
|
38
33
|
readonly updateCardStack: (updateWith: Partial<ChatItem>) => void;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { ExtendedHTMLElement } from '../../helper/dom';
|
|
6
6
|
import { CardRenderDetails, ChatItem, PromptAttachmentType } from '../../static';
|
|
7
|
+
import '../../styles/components/chat/_chat-wrapper.scss';
|
|
7
8
|
export declare const CONTAINER_GAP = 12;
|
|
8
9
|
export interface ChatWrapperProps {
|
|
9
10
|
onStopChatResponse?: (tabId: string) => void;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { ExtendedHTMLElement } from '../../../helper/dom';
|
|
2
|
-
export interface
|
|
2
|
+
export interface SendButtonProps {
|
|
3
3
|
tabId: string;
|
|
4
4
|
onClick: () => void;
|
|
5
5
|
}
|
|
6
6
|
export declare class SendButton {
|
|
7
|
-
|
|
8
|
-
private readonly
|
|
9
|
-
constructor(props:
|
|
10
|
-
get render(): ExtendedHTMLElement;
|
|
7
|
+
render: ExtendedHTMLElement;
|
|
8
|
+
private readonly props;
|
|
9
|
+
constructor(props: SendButtonProps);
|
|
11
10
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { DomBuilderObject, ExtendedHTMLElement } from '../helper/dom';
|
|
6
|
+
import '../styles/components/_collapsible-content.scss';
|
|
6
7
|
interface CollapsibleContentProps {
|
|
7
8
|
title: string | ExtendedHTMLElement | HTMLElement | DomBuilderObject;
|
|
8
9
|
children: Array<string | ExtendedHTMLElement | HTMLElement | DomBuilderObject>;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { ExtendedHTMLElement } from '../../helper/dom';
|
|
6
|
+
import '../../styles/components/_form-input.scss';
|
|
6
7
|
interface SelectOption {
|
|
7
8
|
value: string;
|
|
8
9
|
label: string;
|
|
@@ -16,7 +17,13 @@ export interface RadioGroupProps {
|
|
|
16
17
|
options?: SelectOption[];
|
|
17
18
|
onChange?: (value: string) => void;
|
|
18
19
|
}
|
|
19
|
-
export declare class
|
|
20
|
+
export declare abstract class RadioGroupAbstract {
|
|
21
|
+
render: ExtendedHTMLElement;
|
|
22
|
+
setValue: (value: string) => void;
|
|
23
|
+
getValue: () => string;
|
|
24
|
+
setEnabled: (enabled: boolean) => void;
|
|
25
|
+
}
|
|
26
|
+
export declare class RadioGroupInternal extends RadioGroupAbstract {
|
|
20
27
|
private readonly radioGroupElement;
|
|
21
28
|
private readonly groupName;
|
|
22
29
|
render: ExtendedHTMLElement;
|
|
@@ -25,4 +32,11 @@ export declare class RadioGroup {
|
|
|
25
32
|
getValue: () => string;
|
|
26
33
|
setEnabled: (enabled: boolean) => void;
|
|
27
34
|
}
|
|
35
|
+
export declare class RadioGroup extends RadioGroupAbstract {
|
|
36
|
+
render: ExtendedHTMLElement;
|
|
37
|
+
constructor(props: RadioGroupProps);
|
|
38
|
+
setValue: (value: string) => void;
|
|
39
|
+
getValue: () => string;
|
|
40
|
+
setEnabled: (enabled: boolean) => void;
|
|
41
|
+
}
|
|
28
42
|
export {};
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { ExtendedHTMLElement } from '../../helper/dom';
|
|
6
6
|
import { MynahIcons } from '../icon';
|
|
7
|
+
import '../../styles/components/_form-input.scss';
|
|
7
8
|
interface SelectOption {
|
|
8
9
|
value: string;
|
|
9
10
|
label: string;
|
|
@@ -16,9 +17,16 @@ export interface SelectProps {
|
|
|
16
17
|
value?: string;
|
|
17
18
|
optional?: boolean;
|
|
18
19
|
options?: SelectOption[];
|
|
20
|
+
placeholder?: string;
|
|
19
21
|
onChange?: (value: string) => void;
|
|
20
22
|
}
|
|
21
|
-
export declare class
|
|
23
|
+
export declare abstract class SelectAbstract {
|
|
24
|
+
render: ExtendedHTMLElement;
|
|
25
|
+
setValue: (value: string) => void;
|
|
26
|
+
getValue: () => string;
|
|
27
|
+
setEnabled: (enabled: boolean) => void;
|
|
28
|
+
}
|
|
29
|
+
export declare class SelectInternal {
|
|
22
30
|
private readonly selectElement;
|
|
23
31
|
render: ExtendedHTMLElement;
|
|
24
32
|
constructor(props: SelectProps);
|
|
@@ -26,4 +34,11 @@ export declare class Select {
|
|
|
26
34
|
getValue: () => string;
|
|
27
35
|
setEnabled: (enabled: boolean) => void;
|
|
28
36
|
}
|
|
37
|
+
export declare class Select extends SelectAbstract {
|
|
38
|
+
render: ExtendedHTMLElement;
|
|
39
|
+
constructor(props: SelectProps);
|
|
40
|
+
setValue: (value: string) => void;
|
|
41
|
+
getValue: () => string;
|
|
42
|
+
setEnabled: (enabled: boolean) => void;
|
|
43
|
+
}
|
|
29
44
|
export {};
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { ExtendedHTMLElement } from '../../helper/dom';
|
|
6
|
+
import '../../styles/components/_form-input.scss';
|
|
6
7
|
export interface TextAreaProps {
|
|
7
8
|
classNames?: string[];
|
|
8
9
|
attributes?: Record<string, string>;
|
|
@@ -11,7 +12,13 @@ export interface TextAreaProps {
|
|
|
11
12
|
value?: string;
|
|
12
13
|
onChange?: (value: string) => void;
|
|
13
14
|
}
|
|
14
|
-
export declare class
|
|
15
|
+
export declare abstract class TextAreaAbstract {
|
|
16
|
+
render: ExtendedHTMLElement;
|
|
17
|
+
setValue: (value: string) => void;
|
|
18
|
+
getValue: () => string;
|
|
19
|
+
setEnabled: (enabled: boolean) => void;
|
|
20
|
+
}
|
|
21
|
+
export declare class TextAreaInternal extends TextAreaAbstract {
|
|
15
22
|
private readonly inputElement;
|
|
16
23
|
render: ExtendedHTMLElement;
|
|
17
24
|
constructor(props: TextAreaProps);
|
|
@@ -19,3 +26,10 @@ export declare class TextArea {
|
|
|
19
26
|
getValue: () => string;
|
|
20
27
|
setEnabled: (enabled: boolean) => void;
|
|
21
28
|
}
|
|
29
|
+
export declare class TextArea extends TextAreaAbstract {
|
|
30
|
+
render: ExtendedHTMLElement;
|
|
31
|
+
constructor(props: TextAreaProps);
|
|
32
|
+
setValue: (value: string) => void;
|
|
33
|
+
getValue: () => string;
|
|
34
|
+
setEnabled: (enabled: boolean) => void;
|
|
35
|
+
}
|
|
@@ -3,16 +3,23 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { ExtendedHTMLElement } from '../../helper/dom';
|
|
6
|
+
import '../../styles/components/_form-input.scss';
|
|
6
7
|
export interface TextInputProps {
|
|
7
8
|
classNames?: string[];
|
|
8
9
|
attributes?: Record<string, string>;
|
|
9
10
|
label?: HTMLElement | ExtendedHTMLElement | string;
|
|
10
11
|
placeholder?: string;
|
|
11
|
-
|
|
12
|
+
type?: 'text' | 'number' | 'email';
|
|
12
13
|
value?: string;
|
|
13
14
|
onChange?: (value: string) => void;
|
|
14
15
|
}
|
|
15
|
-
export declare class
|
|
16
|
+
export declare abstract class TextInputAbstract {
|
|
17
|
+
render: ExtendedHTMLElement;
|
|
18
|
+
setValue: (value: string) => void;
|
|
19
|
+
getValue: () => string;
|
|
20
|
+
setEnabled: (enabled: boolean) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare class TextInputInternal extends TextInputAbstract {
|
|
16
23
|
private readonly inputElement;
|
|
17
24
|
render: ExtendedHTMLElement;
|
|
18
25
|
constructor(props: TextInputProps);
|
|
@@ -20,3 +27,10 @@ export declare class TextInput {
|
|
|
20
27
|
getValue: () => string;
|
|
21
28
|
setEnabled: (enabled: boolean) => void;
|
|
22
29
|
}
|
|
30
|
+
export declare class TextInput extends TextInputAbstract {
|
|
31
|
+
render: ExtendedHTMLElement;
|
|
32
|
+
constructor(props: TextInputProps);
|
|
33
|
+
setValue: (value: string) => void;
|
|
34
|
+
getValue: () => string;
|
|
35
|
+
setEnabled: (enabled: boolean) => void;
|
|
36
|
+
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { ExtendedHTMLElement } from '../helper/dom';
|
|
6
|
+
import '../styles/components/_nav-tabs.scss';
|
|
6
7
|
export interface TabsProps {
|
|
7
8
|
onChange?: (selectedTabId: string) => void;
|
|
8
9
|
onBeforeTabRemove?: (tabId: string) => boolean;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { DomBuilderObject, ExtendedHTMLElement } from '../helper/dom';
|
|
6
6
|
import { NotificationType } from '../static';
|
|
7
|
+
import '../styles/components/_notification.scss';
|
|
7
8
|
type NotificationContentType = string | ExtendedHTMLElement | HTMLElement | DomBuilderObject;
|
|
8
9
|
export interface NotificationProps {
|
|
9
10
|
duration?: number;
|
|
@@ -30,6 +30,7 @@ import 'prismjs/plugins/line-numbers/prism-line-numbers.js';
|
|
|
30
30
|
import 'prismjs/plugins/keep-markup/prism-keep-markup.js';
|
|
31
31
|
import 'prismjs/plugins/diff-highlight/prism-diff-highlight.min';
|
|
32
32
|
import { CodeSelectionType } from '../static';
|
|
33
|
+
import '../styles/components/_syntax-highlighter.scss';
|
|
33
34
|
export declare const highlighters: {
|
|
34
35
|
start: {
|
|
35
36
|
markup: string;
|
|
@@ -64,6 +65,7 @@ export interface SyntaxHighlighterProps {
|
|
|
64
65
|
}
|
|
65
66
|
export declare class SyntaxHighlighter {
|
|
66
67
|
private readonly props?;
|
|
68
|
+
private readonly codeBlockButtons;
|
|
67
69
|
render: ExtendedHTMLElement;
|
|
68
70
|
constructor(props: SyntaxHighlighterProps);
|
|
69
71
|
private readonly getSelectedCodeContextMenu;
|
package/dist/helper/config.d.ts
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
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 { ConfigModel, ConfigOptions, ConfigTexts } from '../static';
|
|
5
|
+
import { ComponentOverrides, ConfigModel, ConfigOptions, ConfigTexts } from '../static';
|
|
6
6
|
interface ConfigFullModel extends ConfigOptions {
|
|
7
7
|
texts: ConfigTexts;
|
|
8
|
+
componentClasses: ComponentOverrides;
|
|
8
9
|
}
|
|
9
10
|
export declare class Config {
|
|
10
11
|
private static instance;
|
package/dist/helper/dom.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export declare class DomBuilder {
|
|
|
51
51
|
private portals;
|
|
52
52
|
private constructor();
|
|
53
53
|
static getInstance(rootSelector?: string): DomBuilder;
|
|
54
|
+
setRoot: (rootSelector?: string) => void;
|
|
54
55
|
addClass: (this: ExtendedHTMLElement, className: string) => ExtendedHTMLElement;
|
|
55
56
|
removeClass: (this: ExtendedHTMLElement, className: string) => ExtendedHTMLElement;
|
|
56
57
|
toggleClass: (this: ExtendedHTMLElement, className: string) => ExtendedHTMLElement;
|
|
@@ -66,4 +67,5 @@ export declare class DomBuilder {
|
|
|
66
67
|
removeAllPortals: (portalsWithName: MynahPortalNames) => void;
|
|
67
68
|
}
|
|
68
69
|
export declare const htmlDecode: (input: string) => string;
|
|
70
|
+
export declare const getTypewriterPartsCss: (typewriterId: string, lastVisibleItemIndex: number, totalNumberOfItems: number, timeForEach: number) => ExtendedHTMLElement;
|
|
69
71
|
export {};
|
package/dist/main.d.ts
CHANGED
|
@@ -4,11 +4,19 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { RelevancyVoteType, FeedbackPayload, MynahUIDataModel, NotificationType, ChatItem, ChatItemAction, ChatPrompt, MynahUITabStoreModel, MynahUITabStoreTab, ConfigModel, ReferenceTrackerInformation, CodeSelectionType, Engagement, ChatItemFormItem, ChatItemButton, CardRenderDetails, PromptAttachmentType } from './static';
|
|
6
6
|
import './styles/styles.scss';
|
|
7
|
+
export { generateUID } from './helper/guid';
|
|
7
8
|
export { ChatItemBodyRenderer, } from './helper/dom';
|
|
8
9
|
export { AllowedAttributesInCustomRenderer, AllowedTagsInCustomRenderer } from './helper/sanitize';
|
|
9
|
-
export
|
|
10
|
+
export * from './static';
|
|
10
11
|
export { ToggleOption } from './components/toggle';
|
|
11
12
|
export { MynahIcons } from './components/icon';
|
|
13
|
+
export { DomBuilder, DomBuilderObject, ExtendedHTMLElement, } from './helper/dom';
|
|
14
|
+
export { ButtonProps, ButtonAbstract } from './components/button';
|
|
15
|
+
export { RadioGroupProps, RadioGroupAbstract } from './components/form-items/radio-group';
|
|
16
|
+
export { SelectProps, SelectAbstract } from './components/form-items/select';
|
|
17
|
+
export { TextInputProps, TextInputAbstract } from './components/form-items/text-input';
|
|
18
|
+
export { TextAreaProps, TextAreaAbstract } from './components/form-items/text-area';
|
|
19
|
+
export { ChatItemCardContent, ChatItemCardContentProps } from './components/chat-item/chat-item-card-content';
|
|
12
20
|
export interface MynahUIProps {
|
|
13
21
|
rootSelector?: string;
|
|
14
22
|
defaults?: MynahUITabStoreTab;
|