@bigbinary/neeto-tags-frontend 0.0.37 → 0.0.39
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/dist/index.js +10 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3640,7 +3640,6 @@ var renderColumnData = function renderColumnData(columns, handleEdit, handleDele
|
|
|
3640
3640
|
return handleEdit(tag);
|
|
3641
3641
|
}
|
|
3642
3642
|
}, instance.t("edit")), /*#__PURE__*/React.createElement(MenuItem.Button, {
|
|
3643
|
-
style: "danger",
|
|
3644
3643
|
"data-cy": "tags-delete-button",
|
|
3645
3644
|
onClick: function onClick() {
|
|
3646
3645
|
return handleDelete(tag);
|
|
@@ -7182,7 +7181,7 @@ var EmptyState = function EmptyState(_ref) {
|
|
|
7182
7181
|
};
|
|
7183
7182
|
|
|
7184
7183
|
var Dashboard = function Dashboard(_ref) {
|
|
7185
|
-
var _data$tags2,
|
|
7184
|
+
var _data$tags2, _tagType$label;
|
|
7186
7185
|
|
|
7187
7186
|
var breadcrumbs = _ref.breadcrumbs,
|
|
7188
7187
|
createTags = _ref.createTags,
|
|
@@ -7260,14 +7259,16 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
7260
7259
|
};
|
|
7261
7260
|
|
|
7262
7261
|
var _useDeleteTag = useDeleteTag(),
|
|
7263
|
-
mutate = _useDeleteTag.mutate
|
|
7262
|
+
mutate = _useDeleteTag.mutate,
|
|
7263
|
+
isDeletingTag = _useDeleteTag.isLoading;
|
|
7264
7264
|
|
|
7265
7265
|
var handleConfirmDelete = function handleConfirmDelete() {
|
|
7266
7266
|
var payload = {
|
|
7267
7267
|
url: tagType.url,
|
|
7268
7268
|
id: selectedTag === null || selectedTag === void 0 ? void 0 : selectedTag.id
|
|
7269
7269
|
};
|
|
7270
|
-
|
|
7270
|
+
var isNotDeleting = !isDeletingTag && isDeleteAlertOpen;
|
|
7271
|
+
isNotDeleting && mutate(payload, {
|
|
7271
7272
|
onSuccess: function onSuccess() {
|
|
7272
7273
|
var _data$tags, _deleteTags$onSuccess;
|
|
7273
7274
|
|
|
@@ -7347,8 +7348,8 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
7347
7348
|
component: "h4",
|
|
7348
7349
|
className: "neeto-ui-gray-800 font-semibold"
|
|
7349
7350
|
}, t("tagsWithCount", {
|
|
7350
|
-
count: data === null || data === void 0 ? void 0 :
|
|
7351
|
-
type: tagType.label
|
|
7351
|
+
count: data === null || data === void 0 ? void 0 : data.totalCount,
|
|
7352
|
+
type: (_tagType$label = tagType.label) === null || _tagType$label === void 0 ? void 0 : _tagType$label.toLowerCase()
|
|
7352
7353
|
}))
|
|
7353
7354
|
}), /*#__PURE__*/React.createElement("div", {
|
|
7354
7355
|
className: "neeto-tags--table__wrapper"
|
|
@@ -7359,8 +7360,8 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
7359
7360
|
defaultPageSize: DEFAULT_PAGE_SIZE,
|
|
7360
7361
|
currentPageNumber: pageIndex,
|
|
7361
7362
|
handlePageChange: setPageIndex,
|
|
7362
|
-
totalCount: data === null || data === void 0 ? void 0 :
|
|
7363
|
-
allowRowClick: onTagRowClick,
|
|
7363
|
+
totalCount: data === null || data === void 0 ? void 0 : data.totalCount,
|
|
7364
|
+
allowRowClick: !!onTagRowClick,
|
|
7364
7365
|
onRowClick: function onRowClick(event, record, rowIndex) {
|
|
7365
7366
|
return onTagRowClick({
|
|
7366
7367
|
event: event,
|
|
@@ -7387,6 +7388,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
7387
7388
|
updateTags: updateTags
|
|
7388
7389
|
}), /*#__PURE__*/React.createElement(Alert, {
|
|
7389
7390
|
isOpen: isDeleteAlertOpen,
|
|
7391
|
+
isSubmitting: isDeletingTag,
|
|
7390
7392
|
title: t("deleteTag"),
|
|
7391
7393
|
message: /*#__PURE__*/React.createElement(React.Fragment, null, t("deleteItem", {
|
|
7392
7394
|
type: t("tag").toLocaleLowerCase()
|