@bigbinary/neeto-message-templates-frontend 1.0.1 → 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 +18 -18
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +18 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- 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],
|
|
@@ -3519,6 +3520,7 @@ var MessageTemplates = function MessageTemplates(_ref) {
|
|
|
3519
3520
|
});
|
|
3520
3521
|
}, [value]);
|
|
3521
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) || "";
|
|
3522
3524
|
return /*#__PURE__*/jsxRuntime.jsxs(Container__default["default"], {
|
|
3523
3525
|
children: [/*#__PURE__*/jsxRuntime.jsx(NeetoHeader__default["default"], {
|
|
3524
3526
|
breadcrumbs: breadcrumbs,
|
|
@@ -3531,13 +3533,11 @@ var MessageTemplates = function MessageTemplates(_ref) {
|
|
|
3531
3533
|
}),
|
|
3532
3534
|
title: /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
3533
3535
|
className: "flex",
|
|
3534
|
-
children: [label, /*#__PURE__*/jsxRuntime.jsx(HelpPopover__default["default"], {
|
|
3535
|
-
className: "ml-2 self-center"
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
title: label
|
|
3540
|
-
})]
|
|
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
|
+
}))]
|
|
3541
3541
|
})
|
|
3542
3542
|
}), /*#__PURE__*/jsxRuntime.jsx(SubHeader__default["default"], {
|
|
3543
3543
|
leftActionBlock: shouldShowTemplatesCount && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
@@ -4273,11 +4273,12 @@ var Form = function Form(_ref) {
|
|
|
4273
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; }
|
|
4274
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; }
|
|
4275
4275
|
var ApiTemplates = function ApiTemplates(_ref) {
|
|
4276
|
+
var _helpPopoverProps$hel;
|
|
4276
4277
|
var ownerId = _ref.ownerId,
|
|
4277
4278
|
_ref$breadcrumbs = _ref.breadcrumbs,
|
|
4278
4279
|
breadcrumbs = _ref$breadcrumbs === void 0 ? [] : _ref$breadcrumbs,
|
|
4279
|
-
_ref$
|
|
4280
|
-
|
|
4280
|
+
_ref$helpPopoverProps = _ref.helpPopoverProps,
|
|
4281
|
+
helpPopoverProps = _ref$helpPopoverProps === void 0 ? {} : _ref$helpPopoverProps,
|
|
4281
4282
|
_ref$onMutationSucces = _ref.onMutationSuccess,
|
|
4282
4283
|
onMutationSuccess = _ref$onMutationSucces === void 0 ? neetoCist.noop : _ref$onMutationSucces;
|
|
4283
4284
|
var _useTranslation = reactI18next.useTranslation(),
|
|
@@ -4375,6 +4376,7 @@ var ApiTemplates = function ApiTemplates(_ref) {
|
|
|
4375
4376
|
}
|
|
4376
4377
|
});
|
|
4377
4378
|
};
|
|
4379
|
+
var helpDocUrl = (helpPopoverProps === null || helpPopoverProps === void 0 || (_helpPopoverProps$hel = helpPopoverProps.helpLinkProps) === null || _helpPopoverProps$hel === void 0 ? void 0 : _helpPopoverProps$hel.href) || "";
|
|
4378
4380
|
var noDataProps = _objectSpread$1(_objectSpread$1({}, !isFilterApplied && {
|
|
4379
4381
|
primaryButtonProps: {
|
|
4380
4382
|
label: t("neetoMessageTemplate.api.addApiTemplate"),
|
|
@@ -4421,13 +4423,11 @@ var ApiTemplates = function ApiTemplates(_ref) {
|
|
|
4421
4423
|
},
|
|
4422
4424
|
title: /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
4423
4425
|
className: "flex",
|
|
4424
|
-
children: [title, /*#__PURE__*/jsxRuntime.jsx(HelpPopover__default["default"], {
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
}
|
|
4430
|
-
})]
|
|
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
|
+
}))]
|
|
4431
4431
|
})
|
|
4432
4432
|
}), /*#__PURE__*/jsxRuntime.jsx(SubHeader__default["default"], {
|
|
4433
4433
|
leftActionBlock: shouldShowTemplatesCount && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|