@aws/mynah-ui 4.35.9 → 4.36.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-wrapper.d.ts +1 -1
- package/dist/components/detailed-list/detailed-list-item.d.ts +1 -0
- package/dist/components/detailed-list/detailed-list.d.ts +2 -0
- package/dist/main.d.ts +12 -0
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/static.d.ts +2 -0
- package/docs/CONFIG.md +10 -1
- package/docs/DATAMODEL.md +4 -1
- package/docs/PROPERTIES.md +20 -0
- package/docs/USAGE.md +39 -0
- package/package.json +1 -1
- package/ui-tests/__snapshots__/chromium/Open-MynahUI-Context-selector-should-filter-context-selector-list/Open-MynahUI-Context-selector-should-filter-context-selector-list-1.png +0 -0
- package/ui-tests/__snapshots__/chromium/Open-MynahUI-Context-selector-should-render-the-context-selector/Open-MynahUI-Context-selector-should-render-the-context-selector-1.png +0 -0
- package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-Top-Bar-should-show-overlay-when-clicking-top-bar-button/Open-MynahUI-Prompt-Top-Bar-should-show-overlay-when-clicking-top-bar-button-1.png +0 -0
- package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-Top-Bar-should-show-overlay-when-clicking-top-bar-button/Open-MynahUI-Prompt-Top-Bar-should-show-overlay-when-clicking-top-bar-button-2.png +0 -0
- package/ui-tests/__snapshots__/chromium/Open-MynahUI-Quick-Action-Commands-Header-should-handle-quick-action-commands-header-interaction/quick-action-commands-header-hover.png +0 -0
- package/ui-tests/__snapshots__/chromium/Open-MynahUI-Quick-Action-Commands-Header-should-not-render-header-when-not-applicable/quick-action-commands-header-not-present.png +0 -0
- package/ui-tests/__snapshots__/chromium/Open-MynahUI-Quick-Action-Commands-Header-should-render-header-with-correct-status-styling/quick-action-commands-header-status.png +0 -0
- package/ui-tests/__snapshots__/chromium/Open-MynahUI-Quick-Action-Commands-Header-should-render-the-quick-action-commands-header/quick-action-commands-header.png +0 -0
- package/ui-tests/__snapshots__/chromium/Open-MynahUI-Quick-command-selector-should-filter-quick-command-selector-list/Open-MynahUI-Quick-command-selector-should-filter-quick-command-selector-list-1.png +0 -0
- package/ui-tests/__snapshots__/chromium/Open-MynahUI-Quick-command-selector-should-render-the-quick-command-selector/Open-MynahUI-Quick-command-selector-should-render-the-quick-command-selector-1.png +0 -0
- package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-render-custom-icons-correctly/Open-MynahUI-should-render-custom-icons-correctly-2.png +0 -0
- package/ui-tests/__snapshots__/webkit/Open-MynahUI-Context-selector-should-filter-context-selector-list/Open-MynahUI-Context-selector-should-filter-context-selector-list-1.png +0 -0
- package/ui-tests/__snapshots__/webkit/Open-MynahUI-Context-selector-should-render-the-context-selector/Open-MynahUI-Context-selector-should-render-the-context-selector-1.png +0 -0
- package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-Top-Bar-should-show-overlay-when-clicking-top-bar-button/Open-MynahUI-Prompt-Top-Bar-should-show-overlay-when-clicking-top-bar-button-1.png +0 -0
- package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-Top-Bar-should-show-overlay-when-clicking-top-bar-button/Open-MynahUI-Prompt-Top-Bar-should-show-overlay-when-clicking-top-bar-button-2.png +0 -0
- package/ui-tests/__snapshots__/webkit/Open-MynahUI-Quick-Action-Commands-Header-should-handle-quick-action-commands-header-interaction/quick-action-commands-header-hover.png +0 -0
- package/ui-tests/__snapshots__/webkit/Open-MynahUI-Quick-Action-Commands-Header-should-not-render-header-when-not-applicable/quick-action-commands-header-not-present.png +0 -0
- package/ui-tests/__snapshots__/webkit/Open-MynahUI-Quick-Action-Commands-Header-should-render-header-with-correct-status-styling/quick-action-commands-header-status.png +0 -0
- package/ui-tests/__snapshots__/webkit/Open-MynahUI-Quick-Action-Commands-Header-should-render-the-quick-action-commands-header/quick-action-commands-header.png +0 -0
- package/ui-tests/__snapshots__/webkit/Open-MynahUI-Quick-command-selector-should-filter-quick-command-selector-list/Open-MynahUI-Quick-command-selector-should-filter-quick-command-selector-list-1.png +0 -0
- package/ui-tests/__snapshots__/webkit/Open-MynahUI-Quick-command-selector-should-render-the-quick-command-selector/Open-MynahUI-Quick-command-selector-should-render-the-quick-command-selector-1.png +0 -0
- package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-render-custom-icons-correctly/Open-MynahUI-should-render-custom-icons-correctly-2.png +0 -0
package/dist/static.d.ts
CHANGED
|
@@ -479,6 +479,7 @@ type DropdownFormItem = BaseFormItem & {
|
|
|
479
479
|
value: string;
|
|
480
480
|
label: string;
|
|
481
481
|
}>;
|
|
482
|
+
disabled?: boolean;
|
|
482
483
|
};
|
|
483
484
|
type Stars = BaseFormItem & {
|
|
484
485
|
type: 'stars';
|
|
@@ -742,6 +743,7 @@ export interface ConfigOptions {
|
|
|
742
743
|
codeCopyToClipboardEnabled?: boolean;
|
|
743
744
|
test?: boolean;
|
|
744
745
|
dragOverlayIcon?: MynahIcons | MynahIconsType | CustomIcon;
|
|
746
|
+
enableSearchKeyboardShortcut?: boolean;
|
|
745
747
|
}
|
|
746
748
|
export interface ConfigModel extends ConfigOptions {
|
|
747
749
|
texts: Partial<ConfigTexts>;
|
package/docs/CONFIG.md
CHANGED
|
@@ -56,6 +56,7 @@ interface ConfigModel {
|
|
|
56
56
|
maxTabs: number; // set 1 to hide tabs panel
|
|
57
57
|
showPromptField: boolean; // shows prompt field (default: true)
|
|
58
58
|
dragOverlayIcon?: MynahIcons | MynahIconsType | CustomIcon; // icon displayed in the overlay when a file is dragged into the chat area
|
|
59
|
+
enableSearchKeyboardShortcut?: boolean; // if true, calls onSearchShortcut on Command + f or Ctrl + f (default: false)
|
|
59
60
|
}
|
|
60
61
|
...
|
|
61
62
|
```
|
|
@@ -405,4 +406,12 @@ Specifies the icon to display in the drag-and-drop overlay for adding files (suc
|
|
|
405
406
|
|
|
406
407
|
<p align="center">
|
|
407
408
|
<img src="./img/dragOverlayIcon.png" alt="noPrompt" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
|
|
408
|
-
</p>
|
|
409
|
+
</p>
|
|
410
|
+
|
|
411
|
+
## enableSearchKeyboardShortcut
|
|
412
|
+
|
|
413
|
+
**Type:** `boolean`
|
|
414
|
+
|
|
415
|
+
When set to `true`, this option enables capturing the search keyboard shortcut. When enabled, pressing Command+F (Mac) or Ctrl+F (Windows/Linux) will trigger the `onSearchShortcut` event instead of the browser's default search behavior. This allows implementing custom search functionality within the chat interface.
|
|
416
|
+
|
|
417
|
+
Default: `false`
|
package/docs/DATAMODEL.md
CHANGED
|
@@ -1192,6 +1192,7 @@ type DropdownFormItem = BaseFormItem & {
|
|
|
1192
1192
|
value: string;
|
|
1193
1193
|
label: string;
|
|
1194
1194
|
}>;
|
|
1195
|
+
disabled?: boolean;
|
|
1195
1196
|
};
|
|
1196
1197
|
|
|
1197
1198
|
type Stars = BaseFormItem & {
|
|
@@ -2808,6 +2809,7 @@ interface ChatItemFormItem {
|
|
|
2808
2809
|
value: string;
|
|
2809
2810
|
label: string;
|
|
2810
2811
|
}>;
|
|
2812
|
+
disabled?: boolean; // this is only applicable to DropDownFormItem. If this is set to true, the dropdown is disabled. User cannot use the dropdown.
|
|
2811
2813
|
}
|
|
2812
2814
|
```
|
|
2813
2815
|
|
|
@@ -2815,8 +2817,9 @@ Since you can give unlimited form items with several different types, it might b
|
|
|
2815
2817
|
|
|
2816
2818
|
`validationPattenrs` works only for textual inputs. You can define one or more validation regex patterns, use an operator between them as `AND` or `OR`. You can show individual error messages for each validation or use one generic message if the combined validation fails (Might be useful for `OR` operator).
|
|
2817
2819
|
|
|
2818
|
-
**Another thing which might be interesting** is to know that if you set the `select` or the `radiogroup` mandatory, they'll be rendered as the first item's of them selected if you don't provide an initial value. And you cannot deselet a radio item in any case. For select, if it is mandatory there won't be the option `Please select
|
|
2820
|
+
**Another thing which might be interesting** is to know that if you set the `select` or the `radiogroup` mandatory, they'll be rendered as the first item's of them selected if you don't provide an initial value. And you cannot deselet a radio item in any case. For select, if it is mandatory there won't be the option `Please select...`.
|
|
2819
2821
|
|
|
2822
|
+
**Important note for DropdownFormItem:** If you set `disabled` to `true` for `DropdownFormItem`, the dropdown will be disabled and the user cannot interact with it. When you have a default value and want to ensure it's always displayed, you can combine `mandatory: true` with `disabled: true` - this will automatically select and display the first value in `options` while preventing user interaction.
|
|
2820
2823
|
|
|
2821
2824
|
_**NOTE**: If you set `options` for `textinput` for example, it won't affect the textinput to be rendered and work properly._
|
|
2822
2825
|
|
package/docs/PROPERTIES.md
CHANGED
|
@@ -1296,3 +1296,23 @@ onFilesDropped: (tabId, files, insertPosition) => {
|
|
|
1296
1296
|
```
|
|
1297
1297
|
|
|
1298
1298
|
---
|
|
1299
|
+
|
|
1300
|
+
### `onSearchShortcut`
|
|
1301
|
+
|
|
1302
|
+
This event will be fired when the user presses Command+F (Mac) or Ctrl+F (Windows/Linux). It passes the `tabId` of the current tab and the `eventId` for tracking user intent. This allows the consumer to implement custom search functionality when the standard browser search shortcut is pressed.
|
|
1303
|
+
|
|
1304
|
+
```typescript
|
|
1305
|
+
...
|
|
1306
|
+
onSearchShortcut?: (
|
|
1307
|
+
tabId: string,
|
|
1308
|
+
eventId?: string) => void;
|
|
1309
|
+
...
|
|
1310
|
+
```
|
|
1311
|
+
|
|
1312
|
+
**Example:**
|
|
1313
|
+
```typescript
|
|
1314
|
+
onSearchShortcut: (tabId, eventId) => {
|
|
1315
|
+
console.log(`Search shortcut triggered in tab: ${tabId}`);
|
|
1316
|
+
// Implement custom search functionality, such as opening a history sheet
|
|
1317
|
+
},
|
|
1318
|
+
```
|
package/docs/USAGE.md
CHANGED
|
@@ -30,6 +30,8 @@ mynahUI.showCustomForm(...);
|
|
|
30
30
|
mynahUI.updateTabDefaults(...);
|
|
31
31
|
mynahUI.toggleSplashLoader(...);
|
|
32
32
|
mynahUI.addCustomContextToPrompt(...);
|
|
33
|
+
mynahUI.resetTopBarClicked(...);
|
|
34
|
+
mynahUI.setDragOverlayVisible(...);
|
|
33
35
|
mynahUI.destroy();
|
|
34
36
|
```
|
|
35
37
|
|
|
@@ -710,3 +712,40 @@ When called, this function will:
|
|
|
710
712
|
- Update the tab's data store so that the custom context is tracked and can be referenced or removed later.
|
|
711
713
|
|
|
712
714
|
**Note:** If the prompt input is not currently visible or the tab does not exist, the function will have no effect.
|
|
715
|
+
|
|
716
|
+
---
|
|
717
|
+
|
|
718
|
+
# Show or hide the drag-and-drop overlay (`setDragOverlayVisible`)
|
|
719
|
+
|
|
720
|
+
Show or hide the drag-and-drop overlay for a specific tab programmatically.
|
|
721
|
+
|
|
722
|
+
**Signature:**
|
|
723
|
+
```ts
|
|
724
|
+
setDragOverlayVisible(tabId: string, visible: boolean): void
|
|
725
|
+
```
|
|
726
|
+
|
|
727
|
+
- `tabId`: The ID of the tab for which to show/hide the overlay.
|
|
728
|
+
- `visible`: `true` to show the overlay, `false` to hide it.
|
|
729
|
+
|
|
730
|
+
**Example:**
|
|
731
|
+
```ts
|
|
732
|
+
mynahUI.setDragOverlayVisible('tab-1', true); // Show overlay
|
|
733
|
+
mynahUI.setDragOverlayVisible('tab-1', false); // Hide overlay
|
|
734
|
+
```
|
|
735
|
+
|
|
736
|
+
---
|
|
737
|
+
# Reset Top Bar Clicked Method (`resetTopBarClicked`)
|
|
738
|
+
|
|
739
|
+
Programmatically resets topBarClicked for the specified tab by dispatching a RESET_TOP_BAR_CLICKED event. This is useful for scenarios like drag-and-drop
|
|
740
|
+
|
|
741
|
+
**Signature:**
|
|
742
|
+
```ts
|
|
743
|
+
resetTopBarClicked(tabId: string): void
|
|
744
|
+
```
|
|
745
|
+
|
|
746
|
+
- `tabId`: The ID of the tab for which to reset the top bar overlay.
|
|
747
|
+
|
|
748
|
+
**Example:**
|
|
749
|
+
```ts
|
|
750
|
+
mynahUI.resetTopBarClicked('tab-1');
|
|
751
|
+
```
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|