@bigbinary/neeto-themes-frontend 4.0.3 → 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.
|
@@ -1819,10 +1819,9 @@ var Themes = function Themes(_ref) {
|
|
|
1819
1819
|
}, shallow.shallow),
|
|
1820
1820
|
entityType = _useConfigStore.entityType,
|
|
1821
1821
|
entityId = _useConfigStore.entityId;
|
|
1822
|
-
var
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
setSearchQuery = _useState2[1];
|
|
1822
|
+
var _useQueryParams = reactUtils.useQueryParams(),
|
|
1823
|
+
_useQueryParams$searc = _useQueryParams.searchTerm,
|
|
1824
|
+
searchTerm = _useQueryParams$searc === void 0 ? "" : _useQueryParams$searc;
|
|
1826
1825
|
var _useCloneTheme = useCloneTheme(),
|
|
1827
1826
|
cloneTheme = _useCloneTheme.mutate;
|
|
1828
1827
|
var _useApplyGlobalTheme = useApplyGlobalTheme(),
|
|
@@ -1847,10 +1846,10 @@ var Themes = function Themes(_ref) {
|
|
|
1847
1846
|
setTheme(theme);
|
|
1848
1847
|
};
|
|
1849
1848
|
var filteredDefaultThemes = defaultThemes.filter(function (theme) {
|
|
1850
|
-
return theme.name.toLowerCase().includes(
|
|
1849
|
+
return theme.name.toLowerCase().includes(searchTerm.toLowerCase());
|
|
1851
1850
|
});
|
|
1852
1851
|
var filteredThemes = themes.filter(function (theme) {
|
|
1853
|
-
return theme.name.toLowerCase().includes(
|
|
1852
|
+
return theme.name.toLowerCase().includes(searchTerm.toLowerCase());
|
|
1854
1853
|
});
|
|
1855
1854
|
var isSearchFieldVisible = (themes === null || themes === void 0 ? void 0 : themes.length) + (defaultThemes === null || defaultThemes === void 0 ? void 0 : defaultThemes.length) > 10;
|
|
1856
1855
|
var handleCloneTheme = function handleCloneTheme(data) {
|
|
@@ -1887,14 +1886,14 @@ var Themes = function Themes(_ref) {
|
|
|
1887
1886
|
className: "mb-6 space-y-3",
|
|
1888
1887
|
children: [isSearchFieldVisible && /*#__PURE__*/jsxRuntime.jsx(Search, {
|
|
1889
1888
|
autoFocus: true,
|
|
1889
|
+
enableUrlSync: true,
|
|
1890
1890
|
autoComplete: "off",
|
|
1891
1891
|
className: "mb-4 mt-1 px-6",
|
|
1892
|
-
placeholder: t("neetoThemes.common.searchThemes")
|
|
1893
|
-
onSearch: setSearchQuery
|
|
1892
|
+
placeholder: t("neetoThemes.common.searchThemes")
|
|
1894
1893
|
}), ramda.isEmpty(filteredThemes) && ramda.isEmpty(filteredDefaultThemes) && /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1895
1894
|
className: "text-center",
|
|
1896
|
-
style: "body2",
|
|
1897
1895
|
"data-cy": "no-data-title",
|
|
1896
|
+
style: "body2",
|
|
1898
1897
|
children: t("neetoThemes.common.noResultsFound")
|
|
1899
1898
|
}), neetoCist.isNotEmpty(filteredDefaultThemes) && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1900
1899
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|