@bigbinary/neeto-tags-frontend 1.6.3 → 1.6.4

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 CHANGED
@@ -14,6 +14,7 @@ var i18next = require('i18next');
14
14
  var classNames = require('classnames');
15
15
  var Metadata = require('@bigbinary/neeto-molecules/Metadata');
16
16
  var reactRouterDom = require('react-router-dom');
17
+ var utils = require('@bigbinary/neeto-commons-frontend/utils');
17
18
  var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
18
19
  var neetoFiltersFrontend = require('@bigbinary/neeto-filters-frontend');
19
20
  var Container$1 = require('@bigbinary/neeto-molecules/Container');
@@ -944,9 +945,9 @@ var Dashboard = function Dashboard(_ref) {
944
945
  setTagType = _ref.setTagType,
945
946
  tagTypes = _ref.tagTypes;
946
947
  var history = reactRouterDom.useHistory();
947
- var _useQueryParams = reactUtils.useQueryParams(),
948
- _useQueryParams$searc = _useQueryParams.searchTerm,
949
- searchTerm = _useQueryParams$searc === void 0 ? "" : _useQueryParams$searc;
948
+ var queryParams = reactUtils.useQueryParams();
949
+ var _queryParams$searchTe = queryParams.searchTerm,
950
+ searchTerm = _queryParams$searchTe === void 0 ? "" : _queryParams$searchTe;
950
951
  var searchKeywordProps = {
951
952
  node: "name",
952
953
  value: searchTerm
@@ -1041,11 +1042,9 @@ var Dashboard = function Dashboard(_ref) {
1041
1042
  });
1042
1043
  };
1043
1044
  var handleFiltersChange = function handleFiltersChange(filters) {
1044
- var searchParams = new URLSearchParams(history.location.search);
1045
- searchParams.set("page", constants.DEFAULT_PAGE_INDEX.toString());
1046
- history.push({
1047
- search: searchParams.toString()
1048
- });
1045
+ history.push(utils.buildUrl(window.location.pathname, ramda.mergeLeft({
1046
+ page: constants.DEFAULT_PAGE_INDEX
1047
+ }, queryParams)));
1049
1048
  setNeetoFilters(filters);
1050
1049
  };
1051
1050
  var resetPage = function resetPage() {
@@ -1927,8 +1926,8 @@ var Merge = function Merge(_ref) {
1927
1926
 
1928
1927
  var getCurrentTagType = function getCurrentTagType() {
1929
1928
  var tagTypes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
1930
- var searchParams = new URLSearchParams(window.location.search);
1931
- var tagLabel = searchParams.get("view");
1929
+ var _getQueryParams = utils.getQueryParams(),
1930
+ tagLabel = _getQueryParams.view;
1932
1931
  var requiredTagType = tagTypes.find(function (tagType) {
1933
1932
  var _tagType$label;
1934
1933
  return (tagType === null || tagType === void 0 || (_tagType$label = tagType.label) === null || _tagType$label === void 0 ? void 0 : _tagType$label.toLowerCase()) === tagLabel;