@bigbinary/neeto-message-templates-frontend 1.0.0 → 1.0.2
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 +2 -2
- package/app/javascript/src/translations/en.json +1 -1
- package/dist/index.cjs.js +22 -20
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +22 -20
- package/dist/index.js.map +1 -1
- package/package.json +14 -12
- package/types.d.ts +4 -2
package/README.md
CHANGED
|
@@ -128,7 +128,7 @@ along with filtering and search capabilities.
|
|
|
128
128
|
templates pane.
|
|
129
129
|
- `onMutationSuccess`: The callback function which is triggered on the success
|
|
130
130
|
of mutation functions(create, update & delete).
|
|
131
|
-
- `
|
|
131
|
+
- `helpPopoverProps`: To add help popover for the component. Refer [HelpPopover component doc](https://neeto-molecules.neeto.com/?path=/docs/helppopover--docs). NOTE: `href` from `helpLinkProps` will be used for displaying the help doc link in `NoData` component. Header title will be used as the help popover title if no title is provided.
|
|
132
132
|
|
|
133
133
|
##### Usage
|
|
134
134
|
|
|
@@ -273,7 +273,7 @@ filtering and search capabilities.
|
|
|
273
273
|
- `breadcrumbs`: An array of objects that specify breadcrumbs for navigation.
|
|
274
274
|
- `onMutationSuccess`: The callback function which is triggered on the success
|
|
275
275
|
of mutation functions(create, update & delete).
|
|
276
|
-
- `
|
|
276
|
+
- `helpPopoverProps`: To add help popover for the component. Refer [HelpPopover component doc](https://neeto-molecules.neeto.com/?path=/docs/helppopover--docs). NOTE: `href` from `helpLinkProps` will be used for displaying the help doc link in `NoData` component. Header title will be used as the help popover title if no title is provided.
|
|
277
277
|
|
|
278
278
|
##### Usage
|
|
279
279
|
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"subject": "Subject",
|
|
25
25
|
"title": "Template",
|
|
26
26
|
"active": "Active",
|
|
27
|
-
"linkToHelpArticle": "Here is how you can use <Link>{{entity}}</Link>.",
|
|
27
|
+
"linkToHelpArticle": "Here is how you can use <Link>{{entity, anyCase}}</Link>.",
|
|
28
28
|
"templateDeleteConfirmation": "You are deleting the template <strong>{{name}}</strong>. This can't be undone.",
|
|
29
29
|
"deleteTemplate": "Delete {{label, anyCase}}?",
|
|
30
30
|
"emailTemplates": "Email templates",
|
package/dist/index.cjs.js
CHANGED
|
@@ -3446,6 +3446,7 @@ var List = function List(_ref) {
|
|
|
3446
3446
|
function ownKeys$6(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3447
3447
|
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3448
3448
|
var MessageTemplates = function MessageTemplates(_ref) {
|
|
3449
|
+
var _helpPopoverProps$hel;
|
|
3449
3450
|
var _ref$breadcrumbs = _ref.breadcrumbs,
|
|
3450
3451
|
breadcrumbs = _ref$breadcrumbs === void 0 ? [] : _ref$breadcrumbs,
|
|
3451
3452
|
_ref$type = _ref.type,
|
|
@@ -3466,8 +3467,8 @@ var MessageTemplates = function MessageTemplates(_ref) {
|
|
|
3466
3467
|
manageTemplatesPaneCustomFields = _ref$manageTemplatesP === void 0 ? null : _ref$manageTemplatesP,
|
|
3467
3468
|
_ref$onMutationSucces = _ref.onMutationSuccess,
|
|
3468
3469
|
onMutationSuccess = _ref$onMutationSucces === void 0 ? neetoCist.noop : _ref$onMutationSucces,
|
|
3469
|
-
_ref$
|
|
3470
|
-
|
|
3470
|
+
_ref$helpPopoverProps = _ref.helpPopoverProps,
|
|
3471
|
+
helpPopoverProps = _ref$helpPopoverProps === void 0 ? {} : _ref$helpPopoverProps;
|
|
3471
3472
|
var _useState = react.useState(MESSAGE_TEMPLATE_INITIAL_STATE),
|
|
3472
3473
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3473
3474
|
manageTemplatePane = _useState2[0],
|
|
@@ -3518,6 +3519,8 @@ var MessageTemplates = function MessageTemplates(_ref) {
|
|
|
3518
3519
|
templateType: value
|
|
3519
3520
|
});
|
|
3520
3521
|
}, [value]);
|
|
3522
|
+
var shouldShowTemplatesCount = !isLoading && (isFilterApplied || templatesCount > 0);
|
|
3523
|
+
var helpDocUrl = (helpPopoverProps === null || helpPopoverProps === void 0 || (_helpPopoverProps$hel = helpPopoverProps.helpLinkProps) === null || _helpPopoverProps$hel === void 0 ? void 0 : _helpPopoverProps$hel.href) || "";
|
|
3521
3524
|
return /*#__PURE__*/jsxRuntime.jsxs(Container__default["default"], {
|
|
3522
3525
|
children: [/*#__PURE__*/jsxRuntime.jsx(NeetoHeader__default["default"], {
|
|
3523
3526
|
breadcrumbs: breadcrumbs,
|
|
@@ -3530,16 +3533,14 @@ var MessageTemplates = function MessageTemplates(_ref) {
|
|
|
3530
3533
|
}),
|
|
3531
3534
|
title: /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
3532
3535
|
className: "flex",
|
|
3533
|
-
children: [label, /*#__PURE__*/jsxRuntime.jsx(HelpPopover__default["default"], {
|
|
3534
|
-
className: "ml-2 self-center"
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
title: label
|
|
3539
|
-
})]
|
|
3536
|
+
children: [label, /*#__PURE__*/jsxRuntime.jsx(HelpPopover__default["default"], _objectSpread$6(_objectSpread$6({
|
|
3537
|
+
className: "ml-2 self-center"
|
|
3538
|
+
}, helpPopoverProps), {}, {
|
|
3539
|
+
title: (helpPopoverProps === null || helpPopoverProps === void 0 ? void 0 : helpPopoverProps.title) || label
|
|
3540
|
+
}))]
|
|
3540
3541
|
})
|
|
3541
3542
|
}), /*#__PURE__*/jsxRuntime.jsx(SubHeader__default["default"], {
|
|
3542
|
-
leftActionBlock: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
3543
|
+
leftActionBlock: shouldShowTemplatesCount && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
3543
3544
|
component: "h4",
|
|
3544
3545
|
children: t("neetoMessageTemplate.template.messageTemplatesWithCount", {
|
|
3545
3546
|
type: MESSAGE_TYPES[type],
|
|
@@ -4272,11 +4273,12 @@ var Form = function Form(_ref) {
|
|
|
4272
4273
|
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4273
4274
|
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4274
4275
|
var ApiTemplates = function ApiTemplates(_ref) {
|
|
4276
|
+
var _helpPopoverProps$hel;
|
|
4275
4277
|
var ownerId = _ref.ownerId,
|
|
4276
4278
|
_ref$breadcrumbs = _ref.breadcrumbs,
|
|
4277
4279
|
breadcrumbs = _ref$breadcrumbs === void 0 ? [] : _ref$breadcrumbs,
|
|
4278
|
-
_ref$
|
|
4279
|
-
|
|
4280
|
+
_ref$helpPopoverProps = _ref.helpPopoverProps,
|
|
4281
|
+
helpPopoverProps = _ref$helpPopoverProps === void 0 ? {} : _ref$helpPopoverProps,
|
|
4280
4282
|
_ref$onMutationSucces = _ref.onMutationSuccess,
|
|
4281
4283
|
onMutationSuccess = _ref$onMutationSucces === void 0 ? neetoCist.noop : _ref$onMutationSucces;
|
|
4282
4284
|
var _useTranslation = reactI18next.useTranslation(),
|
|
@@ -4374,6 +4376,7 @@ var ApiTemplates = function ApiTemplates(_ref) {
|
|
|
4374
4376
|
}
|
|
4375
4377
|
});
|
|
4376
4378
|
};
|
|
4379
|
+
var helpDocUrl = (helpPopoverProps === null || helpPopoverProps === void 0 || (_helpPopoverProps$hel = helpPopoverProps.helpLinkProps) === null || _helpPopoverProps$hel === void 0 ? void 0 : _helpPopoverProps$hel.href) || "";
|
|
4377
4380
|
var noDataProps = _objectSpread$1(_objectSpread$1({}, !isFilterApplied && {
|
|
4378
4381
|
primaryButtonProps: {
|
|
4379
4382
|
label: t("neetoMessageTemplate.api.addApiTemplate"),
|
|
@@ -4402,6 +4405,7 @@ var ApiTemplates = function ApiTemplates(_ref) {
|
|
|
4402
4405
|
type: title
|
|
4403
4406
|
})
|
|
4404
4407
|
});
|
|
4408
|
+
var shouldShowTemplatesCount = !isLoading && (isFilterApplied || totalCount > 0);
|
|
4405
4409
|
return /*#__PURE__*/jsxRuntime.jsxs(Container__default["default"], {
|
|
4406
4410
|
children: [/*#__PURE__*/jsxRuntime.jsx(NeetoHeader__default["default"], {
|
|
4407
4411
|
breadcrumbs: breadcrumbs,
|
|
@@ -4419,16 +4423,14 @@ var ApiTemplates = function ApiTemplates(_ref) {
|
|
|
4419
4423
|
},
|
|
4420
4424
|
title: /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
4421
4425
|
className: "flex",
|
|
4422
|
-
children: [title, /*#__PURE__*/jsxRuntime.jsx(HelpPopover__default["default"], {
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
}
|
|
4428
|
-
})]
|
|
4426
|
+
children: [title, /*#__PURE__*/jsxRuntime.jsx(HelpPopover__default["default"], _objectSpread$1(_objectSpread$1({
|
|
4427
|
+
className: "ml-2 self-center"
|
|
4428
|
+
}, helpPopoverProps), {}, {
|
|
4429
|
+
title: (helpPopoverProps === null || helpPopoverProps === void 0 ? void 0 : helpPopoverProps.title) || title
|
|
4430
|
+
}))]
|
|
4429
4431
|
})
|
|
4430
4432
|
}), /*#__PURE__*/jsxRuntime.jsx(SubHeader__default["default"], {
|
|
4431
|
-
leftActionBlock: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
4433
|
+
leftActionBlock: shouldShowTemplatesCount && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
4432
4434
|
component: "h4",
|
|
4433
4435
|
children: t("neetoMessageTemplate.template.messageTemplatesWithCount", {
|
|
4434
4436
|
type: t("messageType.api"),
|