@aws/mynah-ui 4.21.6 → 4.22.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/static.d.ts CHANGED
@@ -136,6 +136,7 @@ export declare enum MynahEventNames {
136
136
  CARD_VOTE = "cardVote",
137
137
  SOURCE_LINK_CLICK = "sourceLinkClick",
138
138
  INFO_LINK_CLICK = "infoLinkClick",
139
+ FORM_LINK_CLICK = "formLinkClick",
139
140
  LINK_CLICK = "linkClick",
140
141
  CHAT_ITEM_ENGAGEMENT = "chatItemEngagement",
141
142
  COPY_CODE_TO_CLIPBOARD = "copyCodeToClipboard",
@@ -437,6 +438,7 @@ export type CodeBlockActions = Record<'copy' | 'insert-to-cursor' | string, Code
437
438
  export interface ConfigTexts {
438
439
  mainTitle: string;
439
440
  feedbackFormTitle: string;
441
+ feedbackFormDescription: string;
440
442
  feedbackFormOptionsLabel: string;
441
443
  feedbackFormCommentLabel: string;
442
444
  feedbackThanks: string;
package/docs/CONFIG.md CHANGED
@@ -12,6 +12,7 @@ interface ConfigModel {
12
12
  texts: {
13
13
  mainTitle?: string;
14
14
  feedbackFormTitle?: string;
15
+ feedbackFormDescription?: string;
15
16
  feedbackFormOptionsLabel?: string;
16
17
  feedbackFormCommentLabel?: string;
17
18
  feedbackThanks?: string;
@@ -124,7 +125,7 @@ Default tab title text if it is not set through store data for that tab.
124
125
 
125
126
  ---
126
127
 
127
- ## feedbackFormTitle, feedbackFormOptionsLabel, feedbackFormCommentLabel, submit, cancel
128
+ ## feedbackFormTitle, feedbackFormDescription, feedbackFormOptionsLabel, feedbackFormCommentLabel, submit, cancel
128
129
  <p align="center">
129
130
  <img src="./img/texts/feedbackForm.png" alt="feedbackForm" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
130
131
  </p>
@@ -102,6 +102,10 @@ export interface MynahUIProps {
102
102
  link: string,
103
103
  mouseEvent?: MouseEvent,
104
104
  eventId?: string) => void;
105
+ onFormLinkClick?: (
106
+ link: string,
107
+ mouseEvent?: MouseEvent,
108
+ eventId?: string) => void;
105
109
  onInfoLinkClick?: (
106
110
  tabId: string,
107
111
  link: string,
@@ -745,6 +749,30 @@ onLinkClick?: (
745
749
  ```
746
750
  ---
747
751
 
752
+ ### `onFormLinkClick`
753
+
754
+ This event will be fired when user clicks a link inside the description field on feedback or custom forms. It will pass `link`, for the clicked link and the `mouseEvent` and the to check userIntent the `eventId`.
755
+
756
+ **Note:** For example, JetBrains JCEF WebView opens the links in a new browser view of its own. However to prevent this action and navigate to user's own preferred browser to open the links, you may want to cancel the default behaviour and run your own function to open the OS default browser.
757
+
758
+
759
+ <p align="center">
760
+ <img src="./img/onFormLinkClick.png" alt="onFormLinkClick" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
761
+ </p>
762
+
763
+ ```typescript
764
+ ...
765
+ onFormLinkClick?: (
766
+ link: string,
767
+ mouseEvent?: MouseEvent):void => {
768
+ console.log(`Sent from Form`);
769
+ console.log(`link: ${link}`);
770
+ // mouseEvent.preventDefault();
771
+ }
772
+ ...
773
+ ```
774
+ ---
775
+
748
776
  ### `onInfoLinkClick`
749
777
 
750
778
  This event will be fired when user clicks a link inside the footer information message below the prompt input field for that tab. It will pass `tabId`, `link` for the clicked link and the `mouseEvent` for the event object in case if it needs to be prevented as the arguments.
Binary file
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.21.6",
4
+ "version": "4.22.0",
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",