@aws/mynah-ui 2.0.0-beta.6.1 → 2.0.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/static.d.ts CHANGED
@@ -2,6 +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 { MynahIcons } from './components/icon';
5
6
  export interface QuickActionCommandGroup {
6
7
  groupName?: string;
7
8
  commands: Array<{
@@ -37,10 +38,9 @@ export declare enum MynahEventNames {
37
38
  INSERT_CODE_TO_CURSOR_POSITION = "insertCodeToCursorPosition",
38
39
  CHAT_PROMPT = "chatPrompt",
39
40
  FOLLOW_UP_CLICKED = "followUpClicked",
40
- SUGGESTION_ATTACHED_TO_CHAT = "suggestionAttachedToChat",
41
41
  UPDATE_LAST_CHAT_ANSWER_STREAM = "updateLastChatAnswerStream",
42
42
  SHOW_MORE_WEB_RESULTS_CLICK = "showMoreWebResultsClick",
43
- SHOW_FEEDBACK_FORM_CLICK = "showFeedbackFormClick",
43
+ SHOW_FEEDBACK_FORM = "showFeedbackForm",
44
44
  OPEN_DIFF = "openDiff"
45
45
  }
46
46
  export declare const MynahPortalNames: {
@@ -58,14 +58,13 @@ export interface SuggestionMetaData {
58
58
  score?: number;
59
59
  lastActivityDate?: number;
60
60
  }
61
- export declare type SuggestionMetaDataUnion = Record<string, SuggestionMetaData>;
62
61
  export interface Suggestion {
63
62
  title: string;
64
63
  id?: string;
65
64
  url?: string;
66
65
  body?: string;
67
66
  type?: string;
68
- metadata?: SuggestionMetaDataUnion;
67
+ metadata?: Record<string, SuggestionMetaData>;
69
68
  }
70
69
  export declare enum ChatItemType {
71
70
  PROMPT = "prompt",
@@ -79,7 +78,7 @@ export declare enum ChatItemType {
79
78
  export interface ChatItem {
80
79
  body?: string | string[];
81
80
  type: ChatItemType;
82
- id?: string;
81
+ messageId?: string;
83
82
  canBeVoted?: boolean;
84
83
  followUp?: {
85
84
  text?: string;
@@ -101,6 +100,8 @@ export interface ChatPrompt {
101
100
  export interface ChatItemFollowUp extends ChatPrompt {
102
101
  type?: string;
103
102
  pillText: string;
103
+ status?: 'info' | 'success' | 'warning' | 'error';
104
+ icon?: MynahIcons;
104
105
  }
105
106
  export declare enum KeyMap {
106
107
  ESCAPE = "Escape",
@@ -162,9 +163,10 @@ export interface SuggestionEngagement {
162
163
  selectedText?: string;
163
164
  };
164
165
  }
165
- export declare type FeedbackStars = 1 | 2 | 3 | 4 | 5;
166
166
  export interface FeedbackPayload {
167
- stars?: FeedbackStars;
167
+ messageId: string;
168
+ tabId: string;
169
+ selectedOption: string;
168
170
  comment?: string;
169
171
  }
170
172
  export declare enum NotificationType {
@@ -173,4 +175,24 @@ export declare enum NotificationType {
173
175
  WARNING = "warning",
174
176
  ERROR = "error"
175
177
  }
178
+ export interface ConfigModel {
179
+ texts: {
180
+ feedbackFormTitle: string;
181
+ feedbackFormOptionsLabel: string;
182
+ feedbackFormCommentLabel: string;
183
+ feedbackThanks: string;
184
+ feedbackReportButtonLabel: string;
185
+ insertAtCursorLabel: string;
186
+ copy: string;
187
+ showMore: string;
188
+ save: string;
189
+ cancel: string;
190
+ submit: string;
191
+ stopGenerating: string;
192
+ };
193
+ feedbackOptions: Array<{
194
+ label: string;
195
+ value: string;
196
+ }>;
197
+ }
176
198
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws/mynah-ui",
3
3
  "displayName": "AWS Mynah UI",
4
- "version": "2.0.0-beta.6.1",
4
+ "version": "2.0.0-beta.7",
5
5
  "description": "AWS Tookit VSCode and Intellij IDE Extension Mynah UI",
6
6
  "publisher": "Amazon Web Services",
7
7
  "license": "Apache License 2.0",
@@ -48,6 +48,7 @@
48
48
  "sass": "1.49.8",
49
49
  "sass-loader": "12.6.0",
50
50
  "style-loader": "3.3.1",
51
+ "svg-url-loader": "^8.0.0",
51
52
  "ts-loader": "9.2.6",
52
53
  "ts-node": "10.4.0",
53
54
  "typescript": "4.5.2",
@@ -1,15 +0,0 @@
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 { FeedbackStars } from '../../static';
7
- export interface FeedbackFormStarsProps {
8
- onChange?: (star: FeedbackStars) => void;
9
- initStar?: FeedbackStars;
10
- }
11
- export declare class FeedbackFormStars {
12
- render: ExtendedHTMLElement;
13
- constructor(props: FeedbackFormStarsProps);
14
- setStar: (star: FeedbackStars) => void;
15
- }
@@ -1,15 +0,0 @@
1
- /*!
2
- * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
- * SPDX-License-Identifier: Apache-2.0
4
- */
5
- import { Suggestion } from '../../static';
6
- import { ExtendedHTMLElement } from '../../helper/dom';
7
- export interface SuggestionCardRelevanceVoteProps {
8
- suggestion: Suggestion;
9
- }
10
- export declare class SuggestionCardRelevanceVote {
11
- render: ExtendedHTMLElement;
12
- votingId: string;
13
- constructor(props: SuggestionCardRelevanceVoteProps);
14
- private readonly handleVoteChange;
15
- }
@@ -1,13 +0,0 @@
1
- /*!
2
- * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
- * SPDX-License-Identifier: Apache-2.0
4
- */
5
- declare const en: {
6
- limitByUrl: string;
7
- relatedContent: string;
8
- chatPromptInputPlaceholder: string;
9
- chatPromptInputFollowUpPlaceholder: string;
10
- searchInputAPIHelpPlaceholder: string;
11
- searchInputMynahPlaceholder: string;
12
- };
13
- export default en;
@@ -1,17 +0,0 @@
1
- /*!
2
- * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
- * SPDX-License-Identifier: Apache-2.0
4
- */
5
- export declare class I18N {
6
- private static instance;
7
- texts: {
8
- limitByUrl: string;
9
- relatedContent: string;
10
- chatPromptInputPlaceholder: string;
11
- chatPromptInputFollowUpPlaceholder: string;
12
- searchInputAPIHelpPlaceholder: string;
13
- searchInputMynahPlaceholder: string;
14
- };
15
- private constructor();
16
- static getInstance(localLanguage?: string): I18N;
17
- }