@aws/mynah-ui 4.35.7 → 4.35.9

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.
Files changed (24) hide show
  1. package/dist/components/chat-item/chat-wrapper.d.ts +5 -4
  2. package/dist/components/form-items/text-input.d.ts +2 -0
  3. package/dist/helper/test-ids.d.ts +3 -3
  4. package/dist/main.js +1 -1
  5. package/dist/main.js.map +1 -1
  6. package/dist/static.d.ts +6 -1
  7. package/docs/CONFIG.md +28 -0
  8. package/docs/DATAMODEL.md +2 -0
  9. package/docs/img/dragOverlayIcon.png +0 -0
  10. package/docs/img/texts/dragOverlayText.png +0 -0
  11. package/docs/img/texts/pinContextHint.png +0 -0
  12. package/package.json +1 -1
  13. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button-1.png +0 -0
  14. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button-2.png +0 -0
  15. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button-3.png +0 -0
  16. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button-4.png +0 -0
  17. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button-5.png +0 -0
  18. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button-6.png +0 -0
  19. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button-1.png +0 -0
  20. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button-2.png +0 -0
  21. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button-3.png +0 -0
  22. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button-4.png +0 -0
  23. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button-5.png +0 -0
  24. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button-6.png +0 -0
package/dist/static.d.ts CHANGED
@@ -237,7 +237,7 @@ export declare enum MynahEventNames {
237
237
  TOP_BAR_BUTTON_CLICK = "promptInputTopBarButtonClick",
238
238
  CONTEXT_PINNED = "contextPinned",
239
239
  FILES_DROPPED = "filesDropped",
240
- CONTEXT_INSERTED = "contextInserted"
240
+ RESET_TOP_BAR_CLICKED = "resetTopBarClicked"
241
241
  }
242
242
  export declare enum MynahPortalNames {
243
243
  WRAPPER = "wrapper",
@@ -469,6 +469,7 @@ export type TextBasedFormItem = BaseFormItem & {
469
469
  genericValidationErrorMessage?: string;
470
470
  patterns: ValidationPattern[];
471
471
  };
472
+ validateOnChange?: boolean;
472
473
  };
473
474
  type DropdownFormItem = BaseFormItem & {
474
475
  type: 'select';
@@ -695,6 +696,7 @@ export interface ConfigTexts {
695
696
  add: string;
696
697
  pleaseSelect: string;
697
698
  stopGenerating: string;
699
+ stopGeneratingTooltip?: string;
698
700
  copyToClipboard: string;
699
701
  noMoreTabsTooltip: string;
700
702
  codeSuggestionWithReferenceTitle: string;
@@ -705,6 +707,8 @@ export interface ConfigTexts {
705
707
  noTabsOpen: string;
706
708
  openNewTab: string;
707
709
  commandConfirmation: string;
710
+ pinContextHint: string;
711
+ dragOverlayText: string;
708
712
  }
709
713
  type PickMatching<T, V> = {
710
714
  [K in keyof T as T[K] extends V ? K : never]: T[K];
@@ -737,6 +741,7 @@ export interface ConfigOptions {
737
741
  codeInsertToCursorEnabled?: boolean;
738
742
  codeCopyToClipboardEnabled?: boolean;
739
743
  test?: boolean;
744
+ dragOverlayIcon?: MynahIcons | MynahIconsType | CustomIcon;
740
745
  }
741
746
  export interface ConfigModel extends ConfigOptions {
742
747
  texts: Partial<ConfigTexts>;
package/docs/CONFIG.md CHANGED
@@ -37,6 +37,8 @@ interface ConfigModel {
37
37
  noTabsOpen: string; // Supports markdown
38
38
  openNewTab: string;
39
39
  commandConfirmation: string;
40
+ pinContextHint: string;
41
+ dragOverlayText: string;
40
42
  };
41
43
  // Options to show up on the overlay feedback form
42
44
  // after user clicks to downvote on a chat item
@@ -53,6 +55,7 @@ interface ConfigModel {
53
55
  autoFocus: boolean; // auto focuses to input panel after every action
54
56
  maxTabs: number; // set 1 to hide tabs panel
55
57
  showPromptField: boolean; // shows prompt field (default: true)
58
+ dragOverlayIcon?: MynahIcons | MynahIconsType | CustomIcon; // icon displayed in the overlay when a file is dragged into the chat area
56
59
  }
57
60
  ...
58
61
  ```
@@ -209,6 +212,16 @@ Default tab title text if it is not set through store data for that tab.
209
212
  <img src="./img/texts/commandConfirmation.png" alt="commandConfirmation" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
210
213
  </p>
211
214
 
215
+ ## pinContextHint
216
+ <p align="center">
217
+ <img src="./img/texts/pinContextHint.png" alt="pinContextHint" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
218
+ </p>
219
+ ---
220
+
221
+ ## dragOverlayText
222
+ <p align="center">
223
+ <img src="./img/texts/dragOverlayText.png" alt="dragOverlayText" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
224
+ </p>
212
225
  ---
213
226
 
214
227
  <p><br/></p>
@@ -377,4 +390,19 @@ _If you set `showPromptField` to `false`_
377
390
 
378
391
  <p align="center">
379
392
  <img src="./img/noPrompt.png" alt="noPrompt" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
393
+ </p>
394
+
395
+ ---
396
+
397
+ ## dragOverlayIcon
398
+
399
+ **Type:** `MynahIcons | MynahIconsType | CustomIcon`
400
+
401
+ **Description:**
402
+ Specifies the icon to display in the drag-and-drop overlay for adding files (such as images) to the chat context. This allows consumers to customize the overlay icon.
403
+
404
+ **Default:** `MynahIcons.IMAGE`
405
+
406
+ <p align="center">
407
+ <img src="./img/dragOverlayIcon.png" alt="noPrompt" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
380
408
  </p>
package/docs/DATAMODEL.md CHANGED
@@ -1176,6 +1176,7 @@ export type TextBasedFormItem = BaseFormItem & {
1176
1176
  type: 'textarea' | 'textinput' | 'numericinput' | 'email';
1177
1177
  autoFocus?: boolean;
1178
1178
  checkModifierEnterKeyPress?: boolean;
1179
+ validateOnChange?: boolean;
1179
1180
  validationPatterns?: {
1180
1181
  operator?: 'and' | 'or';
1181
1182
  genericValidationErrorMessage?: string;
@@ -2802,6 +2803,7 @@ interface ChatItemFormItem {
2802
2803
  placeholder?: string; // Placeholder for input, but only applicable to textarea, textinput and numericinput
2803
2804
  value?: string; // Initial value of the item. All types of form items will get and return string values, conversion of the value type is up to you
2804
2805
  checkModifierEnterKeyPress?: boolean; // Only applicable to textual inputs: whether the onFormModifierEnterPress event can be triggered from this input field
2806
+ validateOnChange?: boolean; // Only applicable to text input: whether the form should validate on this field's change. If this field is false (or not set), form will validate onBlur by default
2805
2807
  options?: Array<{ // Only applicable to select and radiogroup types
2806
2808
  value: string;
2807
2809
  label: string;
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws/mynah-ui",
3
3
  "displayName": "AWS Mynah UI",
4
- "version": "4.35.7",
4
+ "version": "4.35.9",
5
5
  "description": "AWS Toolkit VSCode and Intellij IDE Extension Mynah UI",
6
6
  "publisher": "Amazon Web Services",
7
7
  "license": "Apache License 2.0",