@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.
@@ -8,8 +8,8 @@ var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
8
8
  var Spinner = require('@bigbinary/neetoui/Spinner');
9
9
  var reactQuery = require('@tanstack/react-query');
10
10
  var axios = require('axios');
11
- var utils = require('../index-33a71cf7.js');
12
- var useThemeUtils = require('../useThemeUtils-8ebfd58f.js');
11
+ var utils = require('../index-a1b56b54.js');
12
+ var useThemeUtils = require('../useThemeUtils-ecaaa94b.js');
13
13
  var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
14
14
  var classnames = require('classnames');
15
15
  var Collapse = require('@bigbinary/neeto-icons/Collapse');
@@ -29,7 +29,7 @@ var Down = require('@bigbinary/neeto-icons/Down');
29
29
  var jsxRuntime = require('react/jsx-runtime');
30
30
  var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
31
31
  var _regeneratorRuntime = require('@babel/runtime/regenerator');
32
- var neetoImageUploaderFrontend = require('@bigbinary/neeto-image-uploader-frontend');
32
+ var ImageUploader = require('@bigbinary/neeto-image-uploader-frontend/ImageUploader');
33
33
  var utils$1 = require('@bigbinary/neeto-commons-frontend/utils');
34
34
  var Toastr = require('@bigbinary/neetoui/Toastr');
35
35
  var ramda = require('ramda');
@@ -85,6 +85,7 @@ var Editor__default = /*#__PURE__*/_interopDefaultLegacy(Editor);
85
85
  var Down__default = /*#__PURE__*/_interopDefaultLegacy(Down);
86
86
  var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultLegacy(_asyncToGenerator);
87
87
  var _regeneratorRuntime__default = /*#__PURE__*/_interopDefaultLegacy(_regeneratorRuntime);
88
+ var ImageUploader__default = /*#__PURE__*/_interopDefaultLegacy(ImageUploader);
88
89
  var Toastr__default = /*#__PURE__*/_interopDefaultLegacy(Toastr);
89
90
  var Select__default = /*#__PURE__*/_interopDefaultLegacy(Select);
90
91
  var CenterAlign__default = /*#__PURE__*/_interopDefaultLegacy(CenterAlign);
@@ -623,7 +624,7 @@ var ImageBlock = function ImageBlock(_ref) {
623
624
  key: "".concat(name, "_position")
624
625
  }, values.properties);
625
626
  var handleImageChange = /*#__PURE__*/function () {
626
- var _ref2 = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(image) {
627
+ var _ref2 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(image) {
627
628
  var dominantColor;
628
629
  return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
629
630
  while (1) switch (_context.prev = _context.next) {
@@ -666,7 +667,7 @@ var ImageBlock = function ImageBlock(_ref) {
666
667
  }();
667
668
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
668
669
  className: "space-y-3",
669
- "data-cy": "theme-style-".concat(utils$1.joinHyphenCase(label)),
670
+ "data-cy": "theme-style-".concat(label ? utils$1.joinHyphenCase(label) : "image-block"),
670
671
  children: [label && /*#__PURE__*/jsxRuntime.jsx("div", {
671
672
  className: "flex items-center justify-between",
672
673
  children: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
@@ -676,7 +677,7 @@ var ImageBlock = function ImageBlock(_ref) {
676
677
  })
677
678
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
678
679
  className: "space-y-3",
679
- children: [/*#__PURE__*/react.createElement(neetoImageUploaderFrontend.ImageUploader, {
680
+ children: [/*#__PURE__*/react.createElement(ImageUploader__default["default"], {
680
681
  uploadConfig: uploadConfig,
681
682
  className: "h-40 w-full",
682
683
  key: imageData === null || imageData === void 0 ? void 0 : imageData.url,
@@ -964,7 +965,7 @@ var Properties = function Properties(_ref) {
964
965
  }
965
966
  };
966
967
  react.useEffect(function () {
967
- onPropertiesChange === null || onPropertiesChange === void 0 || onPropertiesChange(values, handleChange, handleColorChange);
968
+ onPropertiesChange === null || onPropertiesChange === void 0 ? void 0 : onPropertiesChange(values, handleChange, handleColorChange);
968
969
  setTheme(values);
969
970
  setThemeState({
970
971
  previewingTheme: values
@@ -1034,13 +1035,13 @@ var Properties = function Properties(_ref) {
1034
1035
  }, key);
1035
1036
  case "position_selector":
1036
1037
  {
1037
- var _findBy3;
1038
+ var _findBy3, _findBy3$options;
1038
1039
  var index = neetoCist.findIndexBy({
1039
1040
  key: key
1040
1041
  }, values.properties);
1041
1042
  var options = (_findBy3 = neetoCist.findBy({
1042
1043
  key: key
1043
- }, themePropertiesSchema)) === null || _findBy3 === void 0 || (_findBy3 = _findBy3.options) === null || _findBy3 === void 0 ? void 0 : _findBy3.map(neetoCist.toLabelAndValue);
1044
+ }, themePropertiesSchema)) === null || _findBy3 === void 0 ? void 0 : (_findBy3$options = _findBy3.options) === null || _findBy3$options === void 0 ? void 0 : _findBy3$options.map(neetoCist.toLabelAndValue);
1044
1045
  return /*#__PURE__*/jsxRuntime.jsx(SelectBlock, {
1045
1046
  label: buildLabel(key, kind),
1046
1047
  options: options || POSITION_OPTIONS,
@@ -1158,7 +1159,7 @@ var Customize = function Customize(_ref) {
1158
1159
  resetForm({
1159
1160
  values: values
1160
1161
  });
1161
- onUpdateThemeSuccess === null || onUpdateThemeSuccess === void 0 || onUpdateThemeSuccess(values);
1162
+ onUpdateThemeSuccess === null || onUpdateThemeSuccess === void 0 ? void 0 : onUpdateThemeSuccess(values);
1162
1163
  }
1163
1164
  });
1164
1165
  };
@@ -1230,7 +1231,7 @@ var Customize = function Customize(_ref) {
1230
1231
  style: "text",
1231
1232
  onClick: function onClick() {
1232
1233
  var _popoverInstance$hide;
1233
- return popoverInstance === null || popoverInstance === void 0 || (_popoverInstance$hide = popoverInstance.hide) === null || _popoverInstance$hide === void 0 ? void 0 : _popoverInstance$hide.call(popoverInstance);
1234
+ return popoverInstance === null || popoverInstance === void 0 ? void 0 : (_popoverInstance$hide = popoverInstance.hide) === null || _popoverInstance$hide === void 0 ? void 0 : _popoverInstance$hide.call(popoverInstance);
1234
1235
  }
1235
1236
  }), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
1236
1237
  className: "w-72 pr-5",
@@ -1825,7 +1826,7 @@ var Sidebar = function Sidebar(_ref) {
1825
1826
  });
1826
1827
  setThemeBeingApplied({});
1827
1828
  setCurrentScreen(DESIGN_SCREENS.THEMES);
1828
- onApplyThemeSuccess === null || onApplyThemeSuccess === void 0 || onApplyThemeSuccess(theme);
1829
+ onApplyThemeSuccess === null || onApplyThemeSuccess === void 0 ? void 0 : onApplyThemeSuccess(theme);
1829
1830
  }
1830
1831
  }),
1831
1832
  applyTheme = _useApplyTheme.mutate,