@aws/mynah-ui 4.31.0-beta.4 → 4.31.0-beta.6
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.
|
@@ -2,8 +2,16 @@
|
|
|
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 { CustomIcon } from '../icon';
|
|
5
6
|
export declare class MynahUIIconImporter {
|
|
6
7
|
private static instance;
|
|
8
|
+
private readonly customIcons;
|
|
9
|
+
private readonly portalId;
|
|
10
|
+
private readonly defaultIconMappings;
|
|
7
11
|
private constructor();
|
|
12
|
+
private cleanupExistingPortal;
|
|
13
|
+
private initializeDefaultIcons;
|
|
14
|
+
addCustomIcon(customIcon: CustomIcon): void;
|
|
15
|
+
private createIconStyles;
|
|
8
16
|
static getInstance: () => MynahUIIconImporter;
|
|
9
17
|
}
|
|
@@ -62,6 +62,7 @@ export declare enum MynahIcons {
|
|
|
62
62
|
CURSOR_INSERT = "cursor-insert",
|
|
63
63
|
TEXT_SELECT = "text-select",
|
|
64
64
|
REVERT = "revert",
|
|
65
|
+
UNDO = "undo",
|
|
65
66
|
ROCKET = "rocket",
|
|
66
67
|
ASTERISK = "asterisk",
|
|
67
68
|
BUG = "bug",
|
|
@@ -70,13 +71,18 @@ export declare enum MynahIcons {
|
|
|
70
71
|
SHELL = "shell",
|
|
71
72
|
HELP = "help",
|
|
72
73
|
MESSAGE = "message",
|
|
74
|
+
MCP = "mcp",
|
|
73
75
|
TRASH = "trash",
|
|
74
76
|
TRANSFORM = "transform",
|
|
75
77
|
HISTORY = "history"
|
|
76
78
|
}
|
|
79
|
+
export interface CustomIcon {
|
|
80
|
+
name: string;
|
|
81
|
+
base64Svg: string;
|
|
82
|
+
}
|
|
77
83
|
export type MynahIconsType = `${MynahIcons}`;
|
|
78
84
|
export interface IconProps {
|
|
79
|
-
icon: MynahIcons | MynahIconsType;
|
|
85
|
+
icon: MynahIcons | MynahIconsType | CustomIcon;
|
|
80
86
|
subtract?: boolean;
|
|
81
87
|
classNames?: string[];
|
|
82
88
|
status?: Status;
|
|
@@ -84,4 +90,5 @@ export interface IconProps {
|
|
|
84
90
|
export declare class Icon {
|
|
85
91
|
render: ExtendedHTMLElement;
|
|
86
92
|
constructor(props: IconProps);
|
|
93
|
+
private isCustomIcon;
|
|
87
94
|
}
|
|
@@ -90,6 +90,11 @@ export declare class MynahUITabsStore {
|
|
|
90
90
|
* @param defaults MynahUITabStoreTab
|
|
91
91
|
*/
|
|
92
92
|
updateTabDefaults: (defaults: MynahUITabStoreTab) => void;
|
|
93
|
+
/**
|
|
94
|
+
* Updates defaults of the tab store
|
|
95
|
+
* @param defaults MynahUITabStoreTab
|
|
96
|
+
*/
|
|
97
|
+
getTabDefaults: () => MynahUITabStoreTab;
|
|
93
98
|
destroy: () => void;
|
|
94
99
|
}
|
|
95
100
|
export {};
|
package/dist/main.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
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
7
|
import { DetailedListSheetProps } from './components/detailed-list/detailed-list-sheet';
|
|
8
|
+
import { MynahUIDataStore } from './helper/store';
|
|
8
9
|
export { generateUID } from './helper/guid';
|
|
9
10
|
export { ChatItemBodyRenderer, } from './helper/dom';
|
|
10
11
|
export { AllowedAttributesInCustomRenderer, AllowedTagsInCustomRenderer } from './helper/sanitize';
|
|
@@ -166,6 +167,11 @@ export declare class MynahUI {
|
|
|
166
167
|
* @param defaults MynahUITabStoreTab
|
|
167
168
|
*/
|
|
168
169
|
updateTabDefaults: (defaults: MynahUITabStoreTab) => void;
|
|
170
|
+
/**
|
|
171
|
+
* Updates defaults of the tab store
|
|
172
|
+
* @param defaults MynahUITabStoreTab
|
|
173
|
+
*/
|
|
174
|
+
getTabDefaults: () => MynahUITabStoreTab;
|
|
169
175
|
/**
|
|
170
176
|
* This function returns the selected tab id if there is any, otherwise returns undefined
|
|
171
177
|
* @returns string selectedTabId or undefined
|
|
@@ -176,7 +182,7 @@ export declare class MynahUI {
|
|
|
176
182
|
* @returns string selectedTabId or undefined
|
|
177
183
|
*/
|
|
178
184
|
getAllTabs: () => MynahUITabStoreModel;
|
|
179
|
-
getTabData: (tabId: string) =>
|
|
185
|
+
getTabData: (tabId: string) => MynahUIDataStore;
|
|
180
186
|
/**
|
|
181
187
|
* Toggles the visibility of the splash loader screen
|
|
182
188
|
*/
|