@bigbinary/neeto-themes-frontend 4.0.2 → 4.0.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.
@@ -1768,6 +1768,7 @@ var Card = function Card(_ref) {
1768
1768
  key: "delete",
1769
1769
  "data-cy": "delete-theme-menu-item",
1770
1770
  label: t("neetoThemes.build.leftSideBar.themes.themeOptions.delete"),
1771
+ isDisabled: isApplyingTheme,
1771
1772
  isVisible: utils.isFunction(onDeleteTheme),
1772
1773
  onClick: function onClick(e) {
1773
1774
  e.stopPropagation();
@@ -1818,10 +1819,9 @@ var Themes = function Themes(_ref) {
1818
1819
  }, shallow.shallow),
1819
1820
  entityType = _useConfigStore.entityType,
1820
1821
  entityId = _useConfigStore.entityId;
1821
- var _useState = react.useState(""),
1822
- _useState2 = _slicedToArray(_useState, 2),
1823
- searchQuery = _useState2[0],
1824
- setSearchQuery = _useState2[1];
1822
+ var _useQueryParams = reactUtils.useQueryParams(),
1823
+ _useQueryParams$searc = _useQueryParams.searchTerm,
1824
+ searchTerm = _useQueryParams$searc === void 0 ? "" : _useQueryParams$searc;
1825
1825
  var _useCloneTheme = useCloneTheme(),
1826
1826
  cloneTheme = _useCloneTheme.mutate;
1827
1827
  var _useApplyGlobalTheme = useApplyGlobalTheme(),
@@ -1846,10 +1846,10 @@ var Themes = function Themes(_ref) {
1846
1846
  setTheme(theme);
1847
1847
  };
1848
1848
  var filteredDefaultThemes = defaultThemes.filter(function (theme) {
1849
- return theme.name.toLowerCase().includes(searchQuery.toLowerCase());
1849
+ return theme.name.toLowerCase().includes(searchTerm.toLowerCase());
1850
1850
  });
1851
1851
  var filteredThemes = themes.filter(function (theme) {
1852
- return theme.name.toLowerCase().includes(searchQuery.toLowerCase());
1852
+ return theme.name.toLowerCase().includes(searchTerm.toLowerCase());
1853
1853
  });
1854
1854
  var isSearchFieldVisible = (themes === null || themes === void 0 ? void 0 : themes.length) + (defaultThemes === null || defaultThemes === void 0 ? void 0 : defaultThemes.length) > 10;
1855
1855
  var handleCloneTheme = function handleCloneTheme(data) {
@@ -1886,14 +1886,14 @@ var Themes = function Themes(_ref) {
1886
1886
  className: "mb-6 space-y-3",
1887
1887
  children: [isSearchFieldVisible && /*#__PURE__*/jsxRuntime.jsx(Search, {
1888
1888
  autoFocus: true,
1889
+ enableUrlSync: true,
1889
1890
  autoComplete: "off",
1890
1891
  className: "mb-4 mt-1 px-6",
1891
- placeholder: t("neetoThemes.common.searchThemes"),
1892
- onSearch: setSearchQuery
1892
+ placeholder: t("neetoThemes.common.searchThemes")
1893
1893
  }), ramda.isEmpty(filteredThemes) && ramda.isEmpty(filteredDefaultThemes) && /*#__PURE__*/jsxRuntime.jsx(Typography, {
1894
1894
  className: "text-center",
1895
- style: "body2",
1896
1895
  "data-cy": "no-data-title",
1896
+ style: "body2",
1897
1897
  children: t("neetoThemes.common.noResultsFound")
1898
1898
  }), neetoCist.isNotEmpty(filteredDefaultThemes) && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1899
1899
  children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {