@bigbinary/neeto-tags-frontend 0.0.39 → 0.0.40
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 +23 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6823,7 +6823,8 @@ var fetch = function fetch(_ref) {
|
|
|
6823
6823
|
params: {
|
|
6824
6824
|
search_term: searchTerm,
|
|
6825
6825
|
limit: limit,
|
|
6826
|
-
page_no: pageNo
|
|
6826
|
+
page_no: pageNo,
|
|
6827
|
+
term: searchTerm
|
|
6827
6828
|
}
|
|
6828
6829
|
});
|
|
6829
6830
|
};
|
|
@@ -6874,7 +6875,8 @@ var useFetchTags = function useFetchTags(params) {
|
|
|
6874
6875
|
staleTime: STALE_TIME,
|
|
6875
6876
|
select: function select(response) {
|
|
6876
6877
|
return response.data || response;
|
|
6877
|
-
}
|
|
6878
|
+
},
|
|
6879
|
+
keepPreviousData: true
|
|
6878
6880
|
}, options));
|
|
6879
6881
|
};
|
|
6880
6882
|
|
|
@@ -7225,7 +7227,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
7225
7227
|
|
|
7226
7228
|
var _useFetchTags = useFetchTags({
|
|
7227
7229
|
url: tagType.url,
|
|
7228
|
-
searchTerm: debouncedSearchTerm,
|
|
7230
|
+
searchTerm: debouncedSearchTerm.trim(),
|
|
7229
7231
|
limit: DEFAULT_PAGE_SIZE,
|
|
7230
7232
|
pageNo: pageIndex
|
|
7231
7233
|
}),
|
|
@@ -7300,6 +7302,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
7300
7302
|
title: "".concat(tagType.label, " ").concat(t("title").toLocaleLowerCase()),
|
|
7301
7303
|
menuBarToggle: displayMenu ? handleMenuToggle : null,
|
|
7302
7304
|
searchProps: {
|
|
7305
|
+
"data-cy": "neeto-tags-search-text-input-field",
|
|
7303
7306
|
value: searchTerm,
|
|
7304
7307
|
onChange: function onChange(_ref3) {
|
|
7305
7308
|
var value = _ref3.target.value;
|
|
@@ -7311,6 +7314,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
7311
7314
|
})
|
|
7312
7315
|
},
|
|
7313
7316
|
actionBlock: /*#__PURE__*/React.createElement(React.Fragment, null, tagsMergable && /*#__PURE__*/React.createElement(Button, {
|
|
7317
|
+
"data-cy": "neeto-tags-merge-tags-button",
|
|
7314
7318
|
style: "secondary",
|
|
7315
7319
|
label: t("merge.mergeTags"),
|
|
7316
7320
|
onClick: function onClick() {
|
|
@@ -7345,8 +7349,9 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
7345
7349
|
className: "w-full flex-grow"
|
|
7346
7350
|
}, /*#__PURE__*/React.createElement(SubHeader, {
|
|
7347
7351
|
leftActionBlock: /*#__PURE__*/React.createElement(Typography, {
|
|
7352
|
+
className: "neeto-ui-gray-800 font-semibold",
|
|
7348
7353
|
component: "h4",
|
|
7349
|
-
|
|
7354
|
+
"data-cy": "neeto-tags-filtered-tags-count-text"
|
|
7350
7355
|
}, t("tagsWithCount", {
|
|
7351
7356
|
count: data === null || data === void 0 ? void 0 : data.totalCount,
|
|
7352
7357
|
type: (_tagType$label = tagType.label) === null || _tagType$label === void 0 ? void 0 : _tagType$label.toLowerCase()
|
|
@@ -7406,7 +7411,8 @@ var List = function List(_ref) {
|
|
|
7406
7411
|
onSelect = _ref.onSelect,
|
|
7407
7412
|
selectedCounterTagId = _ref.selectedCounterTagId,
|
|
7408
7413
|
selectedTagId = _ref.selectedTagId,
|
|
7409
|
-
type = _ref.type
|
|
7414
|
+
type = _ref.type,
|
|
7415
|
+
isSource = _ref.isSource;
|
|
7410
7416
|
|
|
7411
7417
|
var _useTranslation = useTranslation(),
|
|
7412
7418
|
t = _useTranslation.t;
|
|
@@ -7421,6 +7427,7 @@ var List = function List(_ref) {
|
|
|
7421
7427
|
searchTerm = _useState4[0],
|
|
7422
7428
|
setSearchTerm = _useState4[1];
|
|
7423
7429
|
|
|
7430
|
+
var listType = isSource ? "source" : "destination";
|
|
7424
7431
|
useEffect(function () {
|
|
7425
7432
|
var filteredTags = tagList.filter(function (_ref2) {
|
|
7426
7433
|
var name = _ref2.name;
|
|
@@ -7433,6 +7440,7 @@ var List = function List(_ref) {
|
|
|
7433
7440
|
}, /*#__PURE__*/React.createElement("div", {
|
|
7434
7441
|
className: "tags-merge__title"
|
|
7435
7442
|
}, /*#__PURE__*/React.createElement("h4", null, type)), /*#__PURE__*/React.createElement(Input$1, {
|
|
7443
|
+
"data-cy": "neeto-tags-merge-".concat(listType, "-search-text-input-field"),
|
|
7436
7444
|
value: searchTerm,
|
|
7437
7445
|
onChange: function onChange(e) {
|
|
7438
7446
|
return setSearchTerm(e.target.value);
|
|
@@ -7441,7 +7449,8 @@ var List = function List(_ref) {
|
|
|
7441
7449
|
where: t("tag").toLocaleLowerCase()
|
|
7442
7450
|
})
|
|
7443
7451
|
}), /*#__PURE__*/React.createElement("div", {
|
|
7444
|
-
className: "tags-merge__items"
|
|
7452
|
+
className: "tags-merge__items",
|
|
7453
|
+
"data-cy": "neeto-tags-merge-".concat(listType, "-tags-list")
|
|
7445
7454
|
}, tags.map(function (tag) {
|
|
7446
7455
|
return /*#__PURE__*/React.createElement("div", {
|
|
7447
7456
|
className: classnames("tags-merge__item", {
|
|
@@ -7552,11 +7561,13 @@ var MergeAlert = function MergeAlert(_ref) {
|
|
|
7552
7561
|
}))), /*#__PURE__*/React.createElement(Modal.Footer, {
|
|
7553
7562
|
className: "space-x-2"
|
|
7554
7563
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
7564
|
+
"data-cy": "neeto-tags-merge-proceed-button",
|
|
7555
7565
|
label: t("proceed"),
|
|
7556
7566
|
onClick: handleSubmit,
|
|
7557
7567
|
loading: isSubmitting,
|
|
7558
7568
|
disabled: isSubmitting
|
|
7559
7569
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
7570
|
+
"data-cy": "neeto-tags-merge-cancel-button",
|
|
7560
7571
|
style: "text",
|
|
7561
7572
|
label: t("cancel"),
|
|
7562
7573
|
onClick: function onClick() {
|
|
@@ -7649,6 +7660,7 @@ var Merge = function Merge(_ref) {
|
|
|
7649
7660
|
title: t("merge.mergeTags"),
|
|
7650
7661
|
menuBarToggle: displayMenu ? handleMenuToggle : null,
|
|
7651
7662
|
actionBlock: /*#__PURE__*/React.createElement(Button, {
|
|
7663
|
+
"data-cy": "neeto-tags-merge-button",
|
|
7652
7664
|
disabled: !(sourceTag !== null && sourceTag !== void 0 && sourceTag.id && destinationTag !== null && destinationTag !== void 0 && destinationTag.id),
|
|
7653
7665
|
onClick: function onClick() {
|
|
7654
7666
|
setIsModalOpen(true);
|
|
@@ -7660,6 +7672,7 @@ var Merge = function Merge(_ref) {
|
|
|
7660
7672
|
title: t("noTagsFound"),
|
|
7661
7673
|
kbArticleUrl: kbArticleUrl,
|
|
7662
7674
|
actionBlock: /*#__PURE__*/React.createElement(Button, {
|
|
7675
|
+
"data-cy": "neeto-tags-go-back-button",
|
|
7663
7676
|
size: "small",
|
|
7664
7677
|
onClick: function onClick() {
|
|
7665
7678
|
return history.push(tagsPath);
|
|
@@ -7677,7 +7690,8 @@ var Merge = function Merge(_ref) {
|
|
|
7677
7690
|
selectedTagId: sourceTag === null || sourceTag === void 0 ? void 0 : sourceTag.id,
|
|
7678
7691
|
type: t("select", {
|
|
7679
7692
|
what: t("merge.sourceTag").toLocaleLowerCase()
|
|
7680
|
-
})
|
|
7693
|
+
}),
|
|
7694
|
+
isSource: true
|
|
7681
7695
|
}), /*#__PURE__*/React.createElement(List, {
|
|
7682
7696
|
tagList: data === null || data === void 0 ? void 0 : data.tags,
|
|
7683
7697
|
onSelect: setDestinationTag,
|
|
@@ -7685,7 +7699,8 @@ var Merge = function Merge(_ref) {
|
|
|
7685
7699
|
selectedTagId: destinationTag === null || destinationTag === void 0 ? void 0 : destinationTag.id,
|
|
7686
7700
|
type: t("select", {
|
|
7687
7701
|
what: t("merge.destinationTag").toLocaleLowerCase()
|
|
7688
|
-
})
|
|
7702
|
+
}),
|
|
7703
|
+
isSource: false
|
|
7689
7704
|
})))), /*#__PURE__*/React.createElement(MergeAlert, {
|
|
7690
7705
|
showModal: isModalOpen,
|
|
7691
7706
|
setShowModal: setIsModalOpen,
|