@bigbinary/neeto-message-templates-frontend 0.4.4 → 0.5.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/README.md CHANGED
@@ -70,6 +70,9 @@ You can learn more about usage here:
70
70
  yarn add @bigbinary/neeto-message-templates-frontend
71
71
  ```
72
72
 
73
+ ### Instructions for development
74
+ Check the [Frontend package development guide](https://neeto-engineering.neetokb.com/p/a-d34cb4b0) for step-by-step instructions to develop the frontend package.
75
+
73
76
  ### Components
74
77
  #### `MessageTemplates` ([source code](https://github.com/bigbinary/neeto-message-templates-nano/blob/80a73223e8facf21a0135675d4dc837645d0f2b0/app/javascript/src/components/MessageTemplates/index.jsx))
75
78
  This component is used to manage message templates in your web application. It provides a user-friendly interface for viewing, adding, and editing templates, along with filtering and search capabilities.
@@ -84,6 +87,8 @@ This component is used to manage message templates in your web application. It p
84
87
  - `templateVariables`: (optional) To add dynamic variables to form body field.
85
88
  - `ownerId`: (optional) To provide the `ID` of the owner if it is not an Organization model. If the owner is an Organization, this prop can be left unspecified.
86
89
  - `breadcrumbs`: An array of objects that specify breadcrumbs for navigation.
90
+ - `isTestingTemplateDisabled`: A boolean indicating whether the test template button should be enabled or not.
91
+ - `manageTemplatesPaneCustomFields`: To add custom components to the manage templates pane.
87
92
 
88
93
  ##### Usage
89
94
  ```jsx
@@ -109,6 +114,12 @@ const App = () => {
109
114
  },
110
115
  ];
111
116
 
117
+ const manageTemplatesPaneCustomFields = () => (
118
+ <Callout icon={Warning} style="warning">
119
+ Twilio integration is required for sending SMS. Please connect your Twilio account.
120
+ </Callout>
121
+ );
122
+
112
123
  return (
113
124
  <MessageTemplates
114
125
  shouldIncludeTestTemplate
@@ -117,6 +128,8 @@ const App = () => {
117
128
  isTestMessageLoading={isTestMessageLoading}
118
129
  templateVariables={TEMPLATE_VARIABLES}
119
130
  type={type}
131
+ isTestingTemplateDisabled={isTestingTemplateDisabled}
132
+ manageTemplatesPaneCustomFields={manageTemplatesPaneCustomFields()}
120
133
  />
121
134
  );
122
135
  };
@@ -23,8 +23,8 @@
23
23
  "subject": "Subject",
24
24
  "title": "Template",
25
25
  "active": "Active",
26
- "templateDeleteConfirmation": "Are you sure want to delete <strong>{{name}}</strong>. This action cannot be undone.",
27
- "deleteTemplate": "Delete {{label, anyCase}}",
26
+ "templateDeleteConfirmation": "You are deleting the template <strong>{{name}}</strong>. This can't be undone.",
27
+ "deleteTemplate": "Delete {{label, anyCase}}?",
28
28
  "emailTemplates": "Email templates",
29
29
  "emailTemplate": "Email template",
30
30
  "smsTemplates": "SMS templates",
@@ -37,6 +37,7 @@
37
37
  "filtersEmptyState": "There are no {{type, anyCase}} to show for applied filters.",
38
38
  "preview": "Template Preview",
39
39
  "resolveVariable": "Resolve {{type}} variables",
40
+ "phoneNumberHelpText": "Example: +918888888888",
40
41
  "validation": {
41
42
  "namePresence": "Name is required",
42
43
  "subjectPresence": "Subject is required",