@bigbinary/neeto-themes-frontend 2.0.4 → 2.0.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  import { shallow } from 'zustand/shallow';
2
2
  import { useEffect, createElement, useState, useRef, memo, useCallback } from 'react';
3
3
  import { t as t$1 } from 'i18next';
4
- import { isNotPresent, snakeToCamelCase, filterBy, isPresent, isNot, findBy, findIndexBy, toLabelAndValue, humanize, isNotEmpty } from '@bigbinary/neeto-cist';
4
+ import { isNotPresent, snakeToCamelCase, filterBy, isPresent, isNot, findBy, findIndexBy, toLabelAndValue, humanize, isNotEmpty, noop } from '@bigbinary/neeto-cist';
5
5
  import { withImmutableActions, useMutationWithInvalidation, withT, withTitle } from '@bigbinary/neeto-commons-frontend/react-utils';
6
6
  import Spinner from '@bigbinary/neetoui/Spinner';
7
7
  import { useQuery } from '@tanstack/react-query';
@@ -1689,7 +1689,8 @@ var MemoizedAlert = /*#__PURE__*/memo(Alert);
1689
1689
  var Sidebar = function Sidebar(_ref) {
1690
1690
  var _themeToEdit$current, _themeToEdit$current2, _themeToDelete$curren2, _themeToDelete$curren3, _themeToDelete$curren4;
1691
1691
  var thumbnail = _ref.thumbnail,
1692
- onPropertiesChange = _ref.onPropertiesChange;
1692
+ onPropertiesChange = _ref.onPropertiesChange,
1693
+ onApplyThemeSuccess = _ref.onApplyThemeSuccess;
1693
1694
  var _useState = useState(DESIGN_SCREENS.THEMES),
1694
1695
  _useState2 = _slicedToArray(_useState, 2),
1695
1696
  currentScreen = _useState2[0],
@@ -1756,6 +1757,7 @@ var Sidebar = function Sidebar(_ref) {
1756
1757
  });
1757
1758
  setThemeBeingApplied({});
1758
1759
  setCurrentScreen(DESIGN_SCREENS.THEMES);
1760
+ onApplyThemeSuccess === null || onApplyThemeSuccess === void 0 || onApplyThemeSuccess();
1759
1761
  }
1760
1762
  }),
1761
1763
  applyTheme = _useApplyTheme.mutate,
@@ -1878,7 +1880,9 @@ var NeetoThemesBuilder = function NeetoThemesBuilder(_ref) {
1878
1880
  thumbnail = _ref.thumbnail,
1879
1881
  onPropertiesChange = _ref.onPropertiesChange,
1880
1882
  _ref$isTemplateThemes = _ref.isTemplateThemesEnabled,
1881
- isTemplateThemesEnabled = _ref$isTemplateThemes === void 0 ? false : _ref$isTemplateThemes;
1883
+ isTemplateThemesEnabled = _ref$isTemplateThemes === void 0 ? false : _ref$isTemplateThemes,
1884
+ _ref$onApplyThemeSucc = _ref.onApplyThemeSuccess,
1885
+ onApplyThemeSuccess = _ref$onApplyThemeSucc === void 0 ? noop : _ref$onApplyThemeSucc;
1882
1886
  var _useThemeStore = useThemeStore(function (store) {
1883
1887
  return {
1884
1888
  setThemeState: store["setThemeState"]
@@ -1923,6 +1927,7 @@ var NeetoThemesBuilder = function NeetoThemesBuilder(_ref) {
1923
1927
  return /*#__PURE__*/jsxs("div", {
1924
1928
  className: "neeto-themes__wrapper",
1925
1929
  children: [/*#__PURE__*/jsx(Sidebar, {
1930
+ onApplyThemeSuccess: onApplyThemeSuccess,
1926
1931
  onPropertiesChange: onPropertiesChange,
1927
1932
  thumbnail: thumbnail
1928
1933
  }), /*#__PURE__*/jsx("div", {