@bigbinary/neeto-themes-frontend 2.1.5 → 2.1.6

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.
@@ -6,8 +6,8 @@ import { useMutationWithInvalidation, withT, useBreakpoints, withTitle } from '@
6
6
  import Spinner from '@bigbinary/neetoui/Spinner';
7
7
  import { useQuery } from '@tanstack/react-query';
8
8
  import axios from 'axios';
9
- import { B as BASE_URL, a as scrollElementIntoView, b as setCustomCSS, g as getDominantColorFromUrl, i as isFunction } from './index-da3e7846.js';
10
- import { Q as QUERY_KEYS, a as useConfigStore, b as useThemeStore, u as useThemeUtils } from './useThemeUtils-500caefe.js';
9
+ import { B as BASE_URL, a as scrollElementIntoView, b as setCustomCSS, g as getDominantColorFromUrl, i as isFunction } from './index-26ff400e.js';
10
+ import { Q as QUERY_KEYS, a as useConfigStore, b as useThemeStore, u as useThemeUtils } from './useThemeUtils-d305cede.js';
11
11
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
12
12
  import classnames from 'classnames';
13
13
  import Collapse from '@bigbinary/neeto-icons/Collapse';
@@ -27,7 +27,7 @@ import Down from '@bigbinary/neeto-icons/Down';
27
27
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
28
28
  import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
29
29
  import _regeneratorRuntime from '@babel/runtime/regenerator';
30
- import { ImageUploader } from '@bigbinary/neeto-image-uploader-frontend';
30
+ import ImageUploader from '@bigbinary/neeto-image-uploader-frontend/ImageUploader';
31
31
  import { joinHyphenCase } from '@bigbinary/neeto-commons-frontend/utils';
32
32
  import Toastr from '@bigbinary/neetoui/Toastr';
33
33
  import { isEmpty, negate } from 'ramda';
@@ -570,7 +570,7 @@ var ImageBlock = function ImageBlock(_ref) {
570
570
  key: "".concat(name, "_position")
571
571
  }, values.properties);
572
572
  var handleImageChange = /*#__PURE__*/function () {
573
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(image) {
573
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(image) {
574
574
  var dominantColor;
575
575
  return _regeneratorRuntime.wrap(function _callee$(_context) {
576
576
  while (1) switch (_context.prev = _context.next) {
@@ -613,7 +613,7 @@ var ImageBlock = function ImageBlock(_ref) {
613
613
  }();
614
614
  return /*#__PURE__*/jsxs("div", {
615
615
  className: "space-y-3",
616
- "data-cy": "theme-style-".concat(joinHyphenCase(label)),
616
+ "data-cy": "theme-style-".concat(label ? joinHyphenCase(label) : "image-block"),
617
617
  children: [label && /*#__PURE__*/jsx("div", {
618
618
  className: "flex items-center justify-between",
619
619
  children: /*#__PURE__*/jsx(Typography, {
@@ -911,7 +911,7 @@ var Properties = function Properties(_ref) {
911
911
  }
912
912
  };
913
913
  useEffect(function () {
914
- onPropertiesChange === null || onPropertiesChange === void 0 || onPropertiesChange(values, handleChange, handleColorChange);
914
+ onPropertiesChange === null || onPropertiesChange === void 0 ? void 0 : onPropertiesChange(values, handleChange, handleColorChange);
915
915
  setTheme(values);
916
916
  setThemeState({
917
917
  previewingTheme: values
@@ -981,13 +981,13 @@ var Properties = function Properties(_ref) {
981
981
  }, key);
982
982
  case "position_selector":
983
983
  {
984
- var _findBy3;
984
+ var _findBy3, _findBy3$options;
985
985
  var index = findIndexBy({
986
986
  key: key
987
987
  }, values.properties);
988
988
  var options = (_findBy3 = findBy({
989
989
  key: key
990
- }, themePropertiesSchema)) === null || _findBy3 === void 0 || (_findBy3 = _findBy3.options) === null || _findBy3 === void 0 ? void 0 : _findBy3.map(toLabelAndValue);
990
+ }, themePropertiesSchema)) === null || _findBy3 === void 0 ? void 0 : (_findBy3$options = _findBy3.options) === null || _findBy3$options === void 0 ? void 0 : _findBy3$options.map(toLabelAndValue);
991
991
  return /*#__PURE__*/jsx(SelectBlock, {
992
992
  label: buildLabel(key, kind),
993
993
  options: options || POSITION_OPTIONS,
@@ -1105,7 +1105,7 @@ var Customize = function Customize(_ref) {
1105
1105
  resetForm({
1106
1106
  values: values
1107
1107
  });
1108
- onUpdateThemeSuccess === null || onUpdateThemeSuccess === void 0 || onUpdateThemeSuccess(values);
1108
+ onUpdateThemeSuccess === null || onUpdateThemeSuccess === void 0 ? void 0 : onUpdateThemeSuccess(values);
1109
1109
  }
1110
1110
  });
1111
1111
  };
@@ -1177,7 +1177,7 @@ var Customize = function Customize(_ref) {
1177
1177
  style: "text",
1178
1178
  onClick: function onClick() {
1179
1179
  var _popoverInstance$hide;
1180
- return popoverInstance === null || popoverInstance === void 0 || (_popoverInstance$hide = popoverInstance.hide) === null || _popoverInstance$hide === void 0 ? void 0 : _popoverInstance$hide.call(popoverInstance);
1180
+ return popoverInstance === null || popoverInstance === void 0 ? void 0 : (_popoverInstance$hide = popoverInstance.hide) === null || _popoverInstance$hide === void 0 ? void 0 : _popoverInstance$hide.call(popoverInstance);
1181
1181
  }
1182
1182
  }), /*#__PURE__*/jsx(Typography, {
1183
1183
  className: "w-72 pr-5",
@@ -1772,7 +1772,7 @@ var Sidebar = function Sidebar(_ref) {
1772
1772
  });
1773
1773
  setThemeBeingApplied({});
1774
1774
  setCurrentScreen(DESIGN_SCREENS.THEMES);
1775
- onApplyThemeSuccess === null || onApplyThemeSuccess === void 0 || onApplyThemeSuccess(theme);
1775
+ onApplyThemeSuccess === null || onApplyThemeSuccess === void 0 ? void 0 : onApplyThemeSuccess(theme);
1776
1776
  }
1777
1777
  }),
1778
1778
  applyTheme = _useApplyTheme.mutate,