@bigbinary/neeto-rules-frontend 2.5.15-beta-8 → 2.5.15-beta-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.
package/README.md CHANGED
@@ -722,6 +722,8 @@ const initialProps = {
722
722
  6. `separator`: Separator to be shown between action sub items. If there is only
723
723
  one sub item, provide a string value. If there are multiple sub items,
724
724
  provide an array of separators.
725
+ 7. `isSaveAsTemplateEnabled`: To allow users to save the contents of current
726
+ message as a new template.
725
727
 
726
728
  Refer to the [Actions section](./docs/actions.md) for more information.
727
729
 
@@ -764,6 +766,49 @@ which is being sent by neeto-form in action options.
764
766
  }
765
767
  ```
766
768
 
769
+ #### 3.11 Saving the contents of current message as a new template
770
+
771
+ To save the contents of the current message as a new template, set `isSaveAsTemplateEnabled` to true. The message contents will then be available in the values passed to the `handleSubmit` callback, allowing the host application to use this data for creating new templates.
772
+
773
+ #### 3.12 Displaying help popovers in the action panel
774
+
775
+ You can configure help popovers to appear next to input fields in Email, SMS, and API actions. To do this, provide the appropriate `helpPopoverProps` in the action options.
776
+
777
+ ```jsx
778
+ {
779
+ label: t("form.settings.automationRules.actions.sendToApi"),
780
+ value: ACTION_OPTIONS.sendToApi,
781
+ type: "sendToApi",
782
+ helpPopoverProps: {
783
+ customHeaders: {
784
+ title: "Title for custom headers popover",
785
+ description: "Description for custom headers popover.",
786
+ helpLinkProps: { href: CUSTOM_HEADERS_HELP_DOC_URL },
787
+ },
788
+ body: {
789
+ title: "Title for API payload popover",
790
+ description: "Description for API payload popover.",
791
+ helpLinkProps: { href: API_PAYLOAD_HELP_DOC_URL },
792
+ },
793
+ },
794
+ }
795
+ ```
796
+
797
+ Below are the supported actions and fields where help popovers can be displayed:
798
+
799
+ 1. Email actions:
800
+ - `template`: Displays a help popover next to the template dropdown
801
+ - `recipientField`: Displays a help popover next to the recipient selection dropdown (lists records with emails)
802
+
803
+ 2. SMS actions:
804
+ - `template`: Displays a help popover next to the template dropdown
805
+ - `recipientField`: Displays a help popover next to the recipient selection dropdown (lists records with phone numbers)
806
+
807
+ 3. API actions:
808
+ - `template`: Displays a help popover next to the template dropdown
809
+ - `customHeaders`: Displays a help popover next to the custom headers label
810
+ - `body`: Displays a help popover next to the body label
811
+
767
812
  #### 4. `RulePreview`
768
813
 
769
814
  The `RulePreview` component is used to preview the automation rule.
@@ -179,7 +179,10 @@
179
179
  "selectCannedResponse": "Select a canned response",
180
180
  "headers": "Headers",
181
181
  "includeHeaders": "Include headers",
182
- "addEntity": "Add {{entity}}"
182
+ "addEntity": "Add {{entity}}",
183
+ "templateName": "Template name",
184
+ "saveAsTemplate": "Save as template",
185
+ "viewHelpArticle": "View help article"
183
186
  },
184
187
  "placeholders": {
185
188
  "if": "If",
@@ -8,7 +8,7 @@ import Container from '@bigbinary/neeto-molecules/Container';
8
8
  import { u as useUpdateAutomationRule, a as useCloneAutomationRule, b as useDeleteAutomationRule, c as useFetchAutomationRules, R as RulesReorder, I as INITIAL_RULES_DATA } from './index-CYeamuNR.js';
9
9
  import NeetoHeader from '@bigbinary/neeto-molecules/Header';
10
10
  import Button from '@bigbinary/neetoui/Button';
11
- import { c as createRoutes, u as useUtilityStore } from './useUtilityStore-y6y2o_xQ.js';
11
+ import { c as createRoutes, u as useUtilityStore } from './useUtilityStore-BcSUEW_u.js';
12
12
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
13
13
  import { shallow } from 'zustand/shallow';
14
14
  import SubHeader from '@bigbinary/neeto-molecules/SubHeader';