@bigbinary/neeto-message-templates-frontend 0.6.7 → 0.7.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.
@@ -34,6 +34,9 @@
34
34
  "whatsappTemplate": "Whatsapp Template",
35
35
  "apiTemplates": "API templates",
36
36
  "emptyState": "There are no {{type, anyCase}} to show.",
37
+ "whatsapp": {
38
+ "helpDocText": "You can create and add new WhatsApp templates by referring to this <Link>help document</Link>."
39
+ },
37
40
  "sendTestEmail": "Send test email",
38
41
  "sendTestSms": "Send test SMS",
39
42
  "filtersEmptyState": "There are no {{type, anyCase}} to show for applied filters.",
package/dist/index.cjs.js CHANGED
@@ -3636,7 +3636,9 @@ var Whatsapp = function Whatsapp(_ref) {
3636
3636
  handleSubmit = _ref.handleSubmit,
3637
3637
  customFields = _ref.customFields,
3638
3638
  customFieldsInitialValues = _ref.customFieldsInitialValues,
3639
- customFieldsValidationSchema = _ref.customFieldsValidationSchema;
3639
+ customFieldsValidationSchema = _ref.customFieldsValidationSchema,
3640
+ _ref$helpDocUrl = _ref.helpDocUrl,
3641
+ helpDocUrl = _ref$helpDocUrl === void 0 ? "" : _ref$helpDocUrl;
3640
3642
  var _useTranslation = reactI18next.useTranslation(),
3641
3643
  t = _useTranslation.t;
3642
3644
  var getInitialVariableComponents = function getInitialVariableComponents(variables) {
@@ -3665,6 +3667,15 @@ var Whatsapp = function Whatsapp(_ref) {
3665
3667
  if (ramda.isEmpty(templates)) {
3666
3668
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, null, t("neetoMessageTemplate.template.emptyState", {
3667
3669
  type: t("neetoMessageTemplate.template.whatsappTemplates")
3670
+ }), " ", helpDocUrl && /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
3671
+ i18nKey: "neetoMessageTemplate.template.whatsapp.helpDocText",
3672
+ components: {
3673
+ Link: /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
3674
+ size: "large",
3675
+ style: "link",
3676
+ to: helpDocUrl
3677
+ })
3678
+ }
3668
3679
  })), /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Footer, {
3669
3680
  className: "absolute bottom-0 left-0"
3670
3681
  }, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
@@ -3765,7 +3776,9 @@ var SendMessagePane = function SendMessagePane(_ref) {
3765
3776
  _ref$templateVariable = _ref.templateVariables,
3766
3777
  templateVariables = _ref$templateVariable === void 0 ? {} : _ref$templateVariable,
3767
3778
  _ref$ownerId = _ref.ownerId,
3768
- ownerId = _ref$ownerId === void 0 ? "" : _ref$ownerId;
3779
+ ownerId = _ref$ownerId === void 0 ? "" : _ref$ownerId,
3780
+ _ref$helpDocUrl = _ref.helpDocUrl,
3781
+ helpDocUrl = _ref$helpDocUrl === void 0 ? "" : _ref$helpDocUrl;
3769
3782
  var _useTranslation = reactI18next.useTranslation(),
3770
3783
  t = _useTranslation.t;
3771
3784
  var initialFocusField = React.useRef();
@@ -3796,6 +3809,7 @@ var SendMessagePane = function SendMessagePane(_ref) {
3796
3809
  customFieldsInitialValues: customFieldsInitialValues,
3797
3810
  customFieldsValidationSchema: customFieldsValidationSchema,
3798
3811
  handleSubmit: handleSubmit,
3812
+ helpDocUrl: helpDocUrl,
3799
3813
  onClose: onClose,
3800
3814
  templates: templates
3801
3815
  }) : /*#__PURE__*/React__default["default"].createElement(EmailAndSms, {