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