@bigbinary/neeto-themes-frontend 3.1.17 → 3.1.19

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.
@@ -821,6 +821,16 @@ var Properties = function Properties(_ref) {
821
821
  return function (_ref2) {
822
822
  var hex = _ref2.hex,
823
823
  rgb = _ref2.rgb;
824
+ if (name === "background_color") {
825
+ var _findBy, _values$backgroundIma;
826
+ var isDominantBackgroundColorEnabled = ((_findBy = findBy({
827
+ key: "is_dominant_background_color_enabled"
828
+ }, values.properties)) === null || _findBy === void 0 ? void 0 : _findBy.value) === "true";
829
+ var hasImageWithDominantColor = values === null || values === void 0 || (_values$backgroundIma = values.backgroundImage) === null || _values$backgroundIma === void 0 ? void 0 : _values$backgroundIma.dominantColor;
830
+ if (isDominantBackgroundColorEnabled && hasImageWithDominantColor) {
831
+ return;
832
+ }
833
+ }
824
834
  handleChange(name, hex, "".concat(rgb.r, ", ").concat(rgb.g, ", ").concat(rgb.b, ", ").concat(rgb.a));
825
835
  };
826
836
  };
@@ -856,14 +866,14 @@ var Properties = function Properties(_ref) {
856
866
  return /*#__PURE__*/jsx(Fragment, {
857
867
  children: buildProperties(values === null || values === void 0 ? void 0 : values.properties, condition, themePropertiesSchema).sort(function (a, b) {
858
868
  var order = function order(key) {
859
- var _findBy;
860
- return ((_findBy = findBy({
869
+ var _findBy2;
870
+ return ((_findBy2 = findBy({
861
871
  key: key
862
- }, themePropertiesSchema)) === null || _findBy === void 0 ? void 0 : _findBy.order) || Infinity;
872
+ }, themePropertiesSchema)) === null || _findBy2 === void 0 ? void 0 : _findBy2.order) || Infinity;
863
873
  };
864
874
  return order(a.key) - order(b.key);
865
875
  }).map(function (_ref3) {
866
- var _findBy2;
876
+ var _findBy3;
867
877
  var key = _ref3.key,
868
878
  value = _ref3.value,
869
879
  kind = _ref3.kind;
@@ -886,9 +896,9 @@ var Properties = function Properties(_ref) {
886
896
  return /*#__PURE__*/jsx(ColorBlock, {
887
897
  color: value,
888
898
  label: buildLabel(key, kind),
889
- showTransparencyControl: ((_findBy2 = findBy({
899
+ showTransparencyControl: ((_findBy3 = findBy({
890
900
  key: key
891
- }, themePropertiesSchema)) === null || _findBy2 === void 0 ? void 0 : _findBy2.showTransparencyControl) || false,
901
+ }, themePropertiesSchema)) === null || _findBy3 === void 0 ? void 0 : _findBy3.showTransparencyControl) || false,
892
902
  onChange: handleColorChange(key)
893
903
  }, key);
894
904
  case "radius":
@@ -914,13 +924,13 @@ var Properties = function Properties(_ref) {
914
924
  }, key);
915
925
  case "position_selector":
916
926
  {
917
- var _findBy3;
927
+ var _findBy4;
918
928
  var index = findIndexBy({
919
929
  key: key
920
930
  }, values.properties);
921
- var options = (_findBy3 = findBy({
931
+ var options = (_findBy4 = findBy({
922
932
  key: key
923
- }, themePropertiesSchema)) === null || _findBy3 === void 0 || (_findBy3 = _findBy3.options) === null || _findBy3 === void 0 ? void 0 : _findBy3.map(toLabelAndValue);
933
+ }, themePropertiesSchema)) === null || _findBy4 === void 0 || (_findBy4 = _findBy4.options) === null || _findBy4 === void 0 ? void 0 : _findBy4.map(toLabelAndValue);
924
934
  return /*#__PURE__*/jsx(SelectBlock, {
925
935
  label: buildLabel(key, kind),
926
936
  options: options || POSITION_OPTIONS,