@bigbinary/neeto-tags-frontend 1.1.8 → 1.1.10
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.cjs.js +52 -60
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +37 -45
- package/dist/index.js.map +1 -1
- package/package.json +29 -27
package/dist/index.cjs.js
CHANGED
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
+
var constants = require('@bigbinary/neeto-commons-frontend/constants');
|
|
6
7
|
var pure = require('@bigbinary/neeto-commons-frontend/pure');
|
|
7
8
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
8
9
|
var neetoui = require('@bigbinary/neetoui');
|
|
9
10
|
var ramda = require('ramda');
|
|
10
11
|
var reactI18next = require('react-i18next');
|
|
11
12
|
var reactRouterDom = require('react-router-dom');
|
|
12
|
-
var MenuBar = require('@bigbinary/neeto-molecules/MenuBar');
|
|
13
13
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
14
|
+
var MenuBar = require('@bigbinary/neeto-molecules/MenuBar');
|
|
14
15
|
var Container = require('@bigbinary/neeto-molecules/Container');
|
|
15
16
|
var PageLoader = require('@bigbinary/neeto-molecules/PageLoader');
|
|
16
17
|
var SubHeader = require('@bigbinary/neeto-molecules/SubHeader');
|
|
@@ -123,23 +124,6 @@ function _slicedToArray(arr, i) {
|
|
|
123
124
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
124
125
|
}
|
|
125
126
|
|
|
126
|
-
var DEFAULT_PAGE_INDEX = 1;
|
|
127
|
-
var DEFAULT_PAGE_SIZE = 10;
|
|
128
|
-
var PANE_TYPES = {
|
|
129
|
-
CREATE: "CREATE_TAG",
|
|
130
|
-
EDIT: "EDIT_TAG"
|
|
131
|
-
};
|
|
132
|
-
var INITIAL_TAG_VALUES = {
|
|
133
|
-
name: "",
|
|
134
|
-
description: ""
|
|
135
|
-
};
|
|
136
|
-
var SINGULAR = {
|
|
137
|
-
count: 1
|
|
138
|
-
};
|
|
139
|
-
var PLURAL = {
|
|
140
|
-
count: 2
|
|
141
|
-
};
|
|
142
|
-
|
|
143
127
|
/**
|
|
144
128
|
* A component that helps to manage tags.
|
|
145
129
|
* Renders selected tags, has dropdown to list down available tags
|
|
@@ -220,7 +204,7 @@ var Tags$2 = function Tags(_ref) {
|
|
|
220
204
|
}
|
|
221
205
|
}, selectProps)) : /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends({
|
|
222
206
|
icon: neetoIcons.Plus,
|
|
223
|
-
label: t("neetoTags.button.addTag", SINGULAR),
|
|
207
|
+
label: t("neetoTags.button.addTag", constants.SINGULAR),
|
|
224
208
|
size: "small",
|
|
225
209
|
style: "link",
|
|
226
210
|
onClick: function onClick() {
|
|
@@ -270,16 +254,15 @@ function _defineProperty(obj, key, value) {
|
|
|
270
254
|
return obj;
|
|
271
255
|
}
|
|
272
256
|
|
|
273
|
-
var Menu$1 = function
|
|
274
|
-
var
|
|
257
|
+
var Menu$1 = reactUtils.withT(function (_ref) {
|
|
258
|
+
var t = _ref.t,
|
|
259
|
+
tagTypes = _ref.tagTypes,
|
|
275
260
|
showMenu = _ref.showMenu,
|
|
276
261
|
tagType = _ref.tagType,
|
|
277
262
|
setTagType = _ref.setTagType;
|
|
278
|
-
var _useTranslation = reactI18next.useTranslation(),
|
|
279
|
-
t = _useTranslation.t;
|
|
280
263
|
return /*#__PURE__*/React__default["default"].createElement(MenuBar__default["default"], {
|
|
281
264
|
showMenu: showMenu,
|
|
282
|
-
title: t("neetoTags.common.tag", PLURAL)
|
|
265
|
+
title: t("neetoTags.common.tag", constants.PLURAL)
|
|
283
266
|
}, Object.values(tagTypes).map(function (tag) {
|
|
284
267
|
return /*#__PURE__*/React__default["default"].createElement(MenuBar__default["default"].Item, {
|
|
285
268
|
active: tagType.id === tag.id,
|
|
@@ -291,6 +274,16 @@ var Menu$1 = function Menu(_ref) {
|
|
|
291
274
|
}
|
|
292
275
|
});
|
|
293
276
|
}));
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
var DEFAULT_PAGE_SIZE = 10;
|
|
280
|
+
var PANE_TYPES = {
|
|
281
|
+
CREATE: "CREATE_TAG",
|
|
282
|
+
EDIT: "EDIT_TAG"
|
|
283
|
+
};
|
|
284
|
+
var INITIAL_TAG_VALUES = {
|
|
285
|
+
name: "",
|
|
286
|
+
description: ""
|
|
294
287
|
};
|
|
295
288
|
|
|
296
289
|
var fetch = function fetch(_ref) {
|
|
@@ -418,7 +411,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
418
411
|
|
|
419
412
|
var NO_DATA_PRIMARY_BUTTON_PROPS$1 = {
|
|
420
413
|
"data-cy": "add-new-tag-button",
|
|
421
|
-
label: i18next.t("neetoTags.common.addNewTag", SINGULAR)
|
|
414
|
+
label: i18next.t("neetoTags.common.addNewTag", constants.SINGULAR)
|
|
422
415
|
};
|
|
423
416
|
var TAG_NAME_MAX_LENGTH = 50;
|
|
424
417
|
var TAG_DESCRIPTION_ROW_LENGTH = 3;
|
|
@@ -465,13 +458,13 @@ var Header = function Header(_ref) {
|
|
|
465
458
|
var ActionBlock = function ActionBlock() {
|
|
466
459
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, tagsMergable && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
467
460
|
"data-cy": "neeto-tags-merge-tags-button",
|
|
468
|
-
disabled: (data === null || data === void 0 ? void 0 : data.tags.length) < PLURAL.count,
|
|
469
|
-
label: t("neetoTags.common.mergeTag", PLURAL),
|
|
461
|
+
disabled: (data === null || data === void 0 ? void 0 : data.tags.length) < constants.PLURAL.count,
|
|
462
|
+
label: t("neetoTags.common.mergeTag", constants.PLURAL),
|
|
470
463
|
style: "secondary",
|
|
471
464
|
onClick: reactUtils.handleMetaClick(history, "".concat(tagsPath, "/merge"))
|
|
472
465
|
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
473
466
|
"data-cy": "add-new-tag-button",
|
|
474
|
-
label: t("neetoTags.common.addNewTag", SINGULAR),
|
|
467
|
+
label: t("neetoTags.common.addNewTag", constants.SINGULAR),
|
|
475
468
|
onClick: function onClick() {
|
|
476
469
|
setSelectedTag(null);
|
|
477
470
|
setPaneType(PANE_TYPES.CREATE);
|
|
@@ -494,7 +487,7 @@ var Header = function Header(_ref) {
|
|
|
494
487
|
}
|
|
495
488
|
// eslint-disable-next-line @bigbinary/neeto/no-missing-localization
|
|
496
489
|
,
|
|
497
|
-
title: t("neetoTags.helper.tagWithType", _objectSpread$4(_objectSpread$4({}, PLURAL), {}, {
|
|
490
|
+
title: t("neetoTags.helper.tagWithType", _objectSpread$4(_objectSpread$4({}, constants.PLURAL), {}, {
|
|
498
491
|
type: tagType.label
|
|
499
492
|
}))
|
|
500
493
|
});
|
|
@@ -515,7 +508,7 @@ var useTagsForm = function useTagsForm(_ref) {
|
|
|
515
508
|
var handleSubmit = function handleSubmit(values, _ref2) {
|
|
516
509
|
var _values$description;
|
|
517
510
|
var resetForm = _ref2.resetForm;
|
|
518
|
-
values.description = values === null || values === void 0
|
|
511
|
+
values.description = values === null || values === void 0 || (_values$description = values.description) === null || _values$description === void 0 ? void 0 : _values$description.trim();
|
|
519
512
|
var tagData = {
|
|
520
513
|
payload: {
|
|
521
514
|
tag: values
|
|
@@ -529,7 +522,7 @@ var useTagsForm = function useTagsForm(_ref) {
|
|
|
529
522
|
onSuccess: function onSuccess() {
|
|
530
523
|
var _tagOperation$onSucce;
|
|
531
524
|
!isEdit && goToFirstPage();
|
|
532
|
-
tagOperation === null || tagOperation === void 0
|
|
525
|
+
tagOperation === null || tagOperation === void 0 || (_tagOperation$onSucce = tagOperation.onSuccess) === null || _tagOperation$onSucce === void 0 ? void 0 : _tagOperation$onSucce.callback();
|
|
533
526
|
onClose();
|
|
534
527
|
},
|
|
535
528
|
onError: function onError() {
|
|
@@ -575,7 +568,7 @@ var ManageTags = function ManageTags(_ref) {
|
|
|
575
568
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Header, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
576
569
|
style: "h2",
|
|
577
570
|
weight: "semibold"
|
|
578
|
-
}, isEdit ? t("neetoTags.common.editTag") : t("neetoTags.common.addNewTag", SINGULAR))), /*#__PURE__*/React__default["default"].createElement(formik.Form, {
|
|
571
|
+
}, isEdit ? t("neetoTags.common.editTag") : t("neetoTags.common.addNewTag", constants.SINGULAR))), /*#__PURE__*/React__default["default"].createElement(formik.Form, {
|
|
579
572
|
formikProps: _objectSpread$3(_objectSpread$3({}, TAGS_FORMIK_PROPS), {}, {
|
|
580
573
|
initialValues: initialValues,
|
|
581
574
|
onSubmit: handleSubmit
|
|
@@ -711,7 +704,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
711
704
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
712
705
|
searchTerm = _useState4[0],
|
|
713
706
|
setSearchTerm = _useState4[1];
|
|
714
|
-
var _useState5 = React.useState(DEFAULT_PAGE_INDEX),
|
|
707
|
+
var _useState5 = React.useState(constants.DEFAULT_PAGE_INDEX),
|
|
715
708
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
716
709
|
pageIndex = _useState6[0],
|
|
717
710
|
setPageIndex = _useState6[1];
|
|
@@ -765,12 +758,12 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
765
758
|
onSuccess: function onSuccess() {
|
|
766
759
|
var _data$tags, _deleteTags$onSuccess;
|
|
767
760
|
setIsDeleteAlertOpen(false);
|
|
768
|
-
if ((data === null || data === void 0
|
|
761
|
+
if ((data === null || data === void 0 || (_data$tags = data.tags) === null || _data$tags === void 0 ? void 0 : _data$tags.length) === 1) {
|
|
769
762
|
setPageIndex(function (pageIndex) {
|
|
770
763
|
return pageIndex - 1;
|
|
771
764
|
});
|
|
772
765
|
}
|
|
773
|
-
deleteTags === null || deleteTags === void 0
|
|
766
|
+
deleteTags === null || deleteTags === void 0 || (_deleteTags$onSuccess = deleteTags.onSuccess) === null || _deleteTags$onSuccess === void 0 ? void 0 : _deleteTags$onSuccess.callback();
|
|
774
767
|
// @ts-ignore
|
|
775
768
|
neetoui.Toastr.success("", {
|
|
776
769
|
icon: "👍",
|
|
@@ -792,9 +785,6 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
792
785
|
breadcrumbs: breadcrumbs,
|
|
793
786
|
data: data,
|
|
794
787
|
displayMenu: displayMenu,
|
|
795
|
-
goToFirstPage: function goToFirstPage() {
|
|
796
|
-
return setPageIndex(DEFAULT_PAGE_INDEX);
|
|
797
|
-
},
|
|
798
788
|
handleMenuToggle: handleMenuToggle,
|
|
799
789
|
searchTerm: searchTerm,
|
|
800
790
|
setPaneType: setPaneType,
|
|
@@ -802,7 +792,10 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
802
792
|
setSelectedTag: setSelectedTag,
|
|
803
793
|
tagType: tagType,
|
|
804
794
|
tagsMergable: tagsMergable,
|
|
805
|
-
tagsPath: tagsPath
|
|
795
|
+
tagsPath: tagsPath,
|
|
796
|
+
goToFirstPage: function goToFirstPage() {
|
|
797
|
+
return setPageIndex(constants.DEFAULT_PAGE_INDEX);
|
|
798
|
+
}
|
|
806
799
|
}), !(data !== null && data !== void 0 && (_data$tags2 = data.tags) !== null && _data$tags2 !== void 0 && _data$tags2.length) ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
807
800
|
className: "ntm-empty-state",
|
|
808
801
|
"data-cy": "empty-state-container"
|
|
@@ -845,14 +838,14 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
845
838
|
});
|
|
846
839
|
}
|
|
847
840
|
})))), /*#__PURE__*/React__default["default"].createElement(ManageTags, {
|
|
848
|
-
createTags: createTags,
|
|
849
841
|
goToFirstPage: function goToFirstPage() {
|
|
850
|
-
return setPageIndex(DEFAULT_PAGE_INDEX);
|
|
842
|
+
return setPageIndex(constants.DEFAULT_PAGE_INDEX);
|
|
851
843
|
},
|
|
852
844
|
tag: selectedTag,
|
|
845
|
+
createTags: createTags,
|
|
853
846
|
tagType: tagType,
|
|
854
|
-
type: paneType,
|
|
855
847
|
updateTags: updateTags,
|
|
848
|
+
type: paneType,
|
|
856
849
|
onClose: function onClose() {
|
|
857
850
|
return setPaneType(null);
|
|
858
851
|
}
|
|
@@ -887,12 +880,12 @@ var getListType = function getListType(_ref) {
|
|
|
887
880
|
_ref$sourceTags = _ref.sourceTags,
|
|
888
881
|
sourceTags = _ref$sourceTags === void 0 ? [] : _ref$sourceTags;
|
|
889
882
|
return isSource ? {
|
|
890
|
-
label: i18next.t("neetoTags.title.selectSourceTag", SINGULAR),
|
|
883
|
+
label: i18next.t("neetoTags.title.selectSourceTag", constants.SINGULAR),
|
|
891
884
|
value: "source",
|
|
892
885
|
tagIds: ramda.pluck("id", sourceTags),
|
|
893
886
|
counterTagIds: ramda.pluck("id", destinationTags)
|
|
894
887
|
} : {
|
|
895
|
-
label: i18next.t("neetoTags.title.selectDestinationTag", SINGULAR),
|
|
888
|
+
label: i18next.t("neetoTags.title.selectDestinationTag", constants.SINGULAR),
|
|
896
889
|
value: "destination",
|
|
897
890
|
tagIds: ramda.pluck("id", destinationTags),
|
|
898
891
|
counterTagIds: ramda.pluck("id", sourceTags)
|
|
@@ -933,8 +926,8 @@ var List = function List(_ref) {
|
|
|
933
926
|
);
|
|
934
927
|
|
|
935
928
|
var filteredTags = orderBySourceTags(tagList, sourceTags).filter(function (tag) {
|
|
936
|
-
var _tag$name
|
|
937
|
-
return tag === null || tag === void 0
|
|
929
|
+
var _tag$name;
|
|
930
|
+
return tag === null || tag === void 0 || (_tag$name = tag.name) === null || _tag$name === void 0 || (_tag$name = _tag$name.toLowerCase()) === null || _tag$name === void 0 ? void 0 : _tag$name.includes(searchTerm.toLowerCase().trim());
|
|
938
931
|
});
|
|
939
932
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
940
933
|
className: "neeto-tags-merge__list neeto-tags-border neeto-ui-border-gray-300 neeto-ui-shadow-xs neeto-ui-rounded-lg neeto-ui-flex neeto-ui-flex-col neeto-ui-p-6"
|
|
@@ -1487,8 +1480,9 @@ pluralize$1.exports;
|
|
|
1487
1480
|
var pluralizeExports = pluralize$1.exports;
|
|
1488
1481
|
var pluralize = /*@__PURE__*/getDefaultExportFromCjs(pluralizeExports);
|
|
1489
1482
|
|
|
1490
|
-
var MergeAlert = function
|
|
1491
|
-
var
|
|
1483
|
+
var MergeAlert = reactUtils.withT(function (_ref) {
|
|
1484
|
+
var t = _ref.t,
|
|
1485
|
+
_ref$destinationTags = _ref.destinationTags,
|
|
1492
1486
|
destinationTags = _ref$destinationTags === void 0 ? [] : _ref$destinationTags,
|
|
1493
1487
|
handleSubmit = _ref.handleSubmit,
|
|
1494
1488
|
_ref$isSubmitting = _ref.isSubmitting,
|
|
@@ -1500,8 +1494,6 @@ var MergeAlert = function MergeAlert(_ref) {
|
|
|
1500
1494
|
sourceTags = _ref$sourceTags === void 0 ? [] : _ref$sourceTags,
|
|
1501
1495
|
_ref$tagType = _ref.tagType,
|
|
1502
1496
|
tagType = _ref$tagType === void 0 ? "" : _ref$tagType;
|
|
1503
|
-
var _useTranslation = reactI18next.useTranslation(),
|
|
1504
|
-
t = _useTranslation.t;
|
|
1505
1497
|
return /*#__PURE__*/React__default["default"].createElement(neetoui.Modal, {
|
|
1506
1498
|
isOpen: showModal,
|
|
1507
1499
|
onClose: function onClose() {
|
|
@@ -1510,7 +1502,7 @@ var MergeAlert = function MergeAlert(_ref) {
|
|
|
1510
1502
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Modal.Header, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
1511
1503
|
id: "dialog1Title",
|
|
1512
1504
|
style: "h2"
|
|
1513
|
-
}, t("neetoTags.common.mergeTag", PLURAL))), /*#__PURE__*/React__default["default"].createElement(neetoui.Modal.Body, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
1505
|
+
}, t("neetoTags.common.mergeTag", constants.PLURAL))), /*#__PURE__*/React__default["default"].createElement(neetoui.Modal.Body, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
1514
1506
|
lineHeight: "normal",
|
|
1515
1507
|
style: "body2"
|
|
1516
1508
|
}, /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
|
|
@@ -1537,7 +1529,7 @@ var MergeAlert = function MergeAlert(_ref) {
|
|
|
1537
1529
|
return setShowModal(false);
|
|
1538
1530
|
}
|
|
1539
1531
|
})));
|
|
1540
|
-
};
|
|
1532
|
+
});
|
|
1541
1533
|
|
|
1542
1534
|
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1543
1535
|
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -1577,7 +1569,7 @@ var Merge = function Merge(_ref) {
|
|
|
1577
1569
|
});
|
|
1578
1570
|
var updatedBreadcrumbs = React.useMemo(function () {
|
|
1579
1571
|
return [].concat(_toConsumableArray(breadcrumbs), [{
|
|
1580
|
-
text: t("neetoTags.helper.tagWithType", _objectSpread$1(_objectSpread$1({}, PLURAL), {}, {
|
|
1572
|
+
text: t("neetoTags.helper.tagWithType", _objectSpread$1(_objectSpread$1({}, constants.PLURAL), {}, {
|
|
1581
1573
|
type: tagType.label
|
|
1582
1574
|
})),
|
|
1583
1575
|
link: tagsPath
|
|
@@ -1615,7 +1607,7 @@ var Merge = function Merge(_ref) {
|
|
|
1615
1607
|
var _mergeTags$onSuccess;
|
|
1616
1608
|
setDestinationTags([]);
|
|
1617
1609
|
setSourceTags([]);
|
|
1618
|
-
mergeTags === null || mergeTags === void 0
|
|
1610
|
+
mergeTags === null || mergeTags === void 0 || (_mergeTags$onSuccess = mergeTags.onSuccess) === null || _mergeTags$onSuccess === void 0 ? void 0 : _mergeTags$onSuccess.callback();
|
|
1619
1611
|
setIsModalOpen(false);
|
|
1620
1612
|
}
|
|
1621
1613
|
});
|
|
@@ -1632,7 +1624,7 @@ var Merge = function Merge(_ref) {
|
|
|
1632
1624
|
}, /*#__PURE__*/React__default["default"].createElement(NeetoHeader__default["default"], {
|
|
1633
1625
|
breadcrumbs: updatedBreadcrumbs,
|
|
1634
1626
|
menuBarToggle: displayMenu ? handleMenuToggle : null,
|
|
1635
|
-
title: t("neetoTags.common.mergeTag", PLURAL),
|
|
1627
|
+
title: t("neetoTags.common.mergeTag", constants.PLURAL),
|
|
1636
1628
|
actionBlock: /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
1637
1629
|
"data-cy": "neeto-tags-merge-button",
|
|
1638
1630
|
disabled: isMergeButtonDisabled,
|
|
@@ -1662,18 +1654,18 @@ var Merge = function Merge(_ref) {
|
|
|
1662
1654
|
size: 24
|
|
1663
1655
|
}), /*#__PURE__*/React__default["default"].createElement(List, {
|
|
1664
1656
|
destinationTags: destinationTags,
|
|
1665
|
-
isSource: false,
|
|
1666
1657
|
sourceTags: sourceTags,
|
|
1658
|
+
isSource: false,
|
|
1667
1659
|
tagList: data === null || data === void 0 ? void 0 : data.tags,
|
|
1668
1660
|
onSelect: handleOnTagSelect
|
|
1669
1661
|
})))), /*#__PURE__*/React__default["default"].createElement(MergeAlert, {
|
|
1670
1662
|
destinationTags: destinationTags,
|
|
1671
1663
|
handleSubmit: handleSubmit,
|
|
1672
1664
|
isSubmitting: isSubmitting,
|
|
1673
|
-
setShowModal: setIsModalOpen,
|
|
1674
|
-
showModal: isModalOpen,
|
|
1675
1665
|
sourceTags: sourceTags,
|
|
1676
|
-
tagType: tagType
|
|
1666
|
+
tagType: tagType,
|
|
1667
|
+
setShowModal: setIsModalOpen,
|
|
1668
|
+
showModal: isModalOpen
|
|
1677
1669
|
}));
|
|
1678
1670
|
};
|
|
1679
1671
|
|
|
@@ -1686,7 +1678,7 @@ var getCurrentTagType = function getCurrentTagType() {
|
|
|
1686
1678
|
var tagLabel = searchParams.get("view");
|
|
1687
1679
|
var requiredTagType = tagTypes.find(function (tagType) {
|
|
1688
1680
|
var _tagType$label;
|
|
1689
|
-
return (tagType === null || tagType === void 0
|
|
1681
|
+
return (tagType === null || tagType === void 0 || (_tagType$label = tagType.label) === null || _tagType$label === void 0 ? void 0 : _tagType$label.toLowerCase()) === tagLabel;
|
|
1690
1682
|
});
|
|
1691
1683
|
return requiredTagType || tagTypes[0];
|
|
1692
1684
|
};
|