@bigbinary/neeto-themes-frontend 1.2.2 → 1.2.3

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.
@@ -53,7 +53,7 @@
53
53
  "primary": "Primary",
54
54
  "secondary": "Secondary"
55
55
  },
56
- "notAppliedYet": "This theme is <bold>not yet applied</bold> to this {{entityType, anyCase}}.",
56
+ "notAppliedYet": "This theme is <bold>not yet applied</bold> to this {{entityType}}.",
57
57
  "editTheme": {
58
58
  "title": "Edit theme",
59
59
  "imageUpload": "Drag and drop or <span>Browse</span> a file"
package/dist/index.cjs.js CHANGED
@@ -697,17 +697,16 @@ var SwitchBlock = function SwitchBlock(_ref) {
697
697
  });
698
698
  };
699
699
 
700
- var Properties = function Properties() {
700
+ var Properties = function Properties(_ref) {
701
+ var onPropertiesChange = _ref.onPropertiesChange;
701
702
  var _useTranslation = reactI18next.useTranslation(),
702
703
  t = _useTranslation.t;
703
704
  var _useConfigStore = useConfigStore(function (store) {
704
705
  return {
705
- themePropertiesSchema: store["themePropertiesSchema"],
706
- onPropertiesChange: store["onPropertiesChange"]
706
+ themePropertiesSchema: store["themePropertiesSchema"]
707
707
  };
708
708
  }, shallow.shallow),
709
- themePropertiesSchema = _useConfigStore.themePropertiesSchema,
710
- onPropertiesChange = _useConfigStore.onPropertiesChange;
709
+ themePropertiesSchema = _useConfigStore.themePropertiesSchema;
711
710
  var _useThemeStore = useThemeStore(function (store) {
712
711
  return {
713
712
  setThemeState: store["setThemeState"]
@@ -721,9 +720,9 @@ var Properties = function Properties() {
721
720
  setVariable = _useThemeUtils.setVariable,
722
721
  setTheme = _useThemeUtils.setTheme;
723
722
  var handleColorChange = function handleColorChange(name) {
724
- return function (_ref) {
725
- var hex = _ref.hex,
726
- rgb = _ref.rgb;
723
+ return function (_ref2) {
724
+ var hex = _ref2.hex,
725
+ rgb = _ref2.rgb;
727
726
  handleChange(name, hex, "".concat(rgb.r, ", ").concat(rgb.g, ", ").concat(rgb.b, ", ").concat(rgb.a));
728
727
  };
729
728
  };
@@ -760,27 +759,27 @@ var Properties = function Properties() {
760
759
  className: "divide-y divide-gray-200",
761
760
  children: [neetoCist.filterBy({
762
761
  kind: "font_family"
763
- }, values.properties).map(function (_ref2) {
764
- var key = _ref2.key,
765
- value = _ref2.value,
766
- kind = _ref2.kind;
762
+ }, values.properties).map(function (_ref3) {
763
+ var key = _ref3.key,
764
+ value = _ref3.value,
765
+ kind = _ref3.kind;
767
766
  return isPropertyVisible(key, values, themePropertiesSchema) && /*#__PURE__*/jsxRuntime.jsx(FontPickerBlock, {
768
767
  label: buildLabel(key, kind),
769
768
  options: FONT_OPTIONS,
770
769
  value: neetoCist.findBy({
771
770
  value: value || null
772
771
  }, FONT_OPTIONS),
773
- onChange: function onChange(_ref3) {
774
- var value = _ref3.value;
772
+ onChange: function onChange(_ref4) {
773
+ var value = _ref4.value;
775
774
  handleChange(key, value);
776
775
  }
777
776
  }, key);
778
777
  }), neetoCist.filterBy({
779
778
  kind: "color"
780
- }, values.properties).map(function (_ref4) {
781
- var key = _ref4.key,
782
- value = _ref4.value,
783
- kind = _ref4.kind;
779
+ }, values.properties).map(function (_ref5) {
780
+ var key = _ref5.key,
781
+ value = _ref5.value,
782
+ kind = _ref5.kind;
784
783
  return isPropertyVisible(key, values, themePropertiesSchema) && /*#__PURE__*/jsxRuntime.jsx(ColorBlock, {
785
784
  color: value,
786
785
  label: buildLabel(key, kind),
@@ -788,10 +787,10 @@ var Properties = function Properties() {
788
787
  }, key);
789
788
  }), neetoCist.filterBy({
790
789
  kind: "overlay_opacity"
791
- }, values.properties).map(function (_ref5) {
792
- var key = _ref5.key,
793
- value = _ref5.value,
794
- kind = _ref5.kind;
790
+ }, values.properties).map(function (_ref6) {
791
+ var key = _ref6.key,
792
+ value = _ref6.value,
793
+ kind = _ref6.kind;
795
794
  return isPropertyVisible(key, values, themePropertiesSchema) && /*#__PURE__*/jsxRuntime.jsx(SliderBlock, {
796
795
  label: buildLabel(key, kind),
797
796
  marks: OVERLAY_OPACITY_SLIDER_MARKS,
@@ -804,11 +803,11 @@ var Properties = function Properties() {
804
803
  }, key);
805
804
  }), neetoCist.filterBy({
806
805
  kind: "position_selector"
807
- }, values.properties).map(function (_ref6) {
806
+ }, values.properties).map(function (_ref7) {
808
807
  var _findBy;
809
- var key = _ref6.key,
810
- kind = _ref6.kind,
811
- value = _ref6.value;
808
+ var key = _ref7.key,
809
+ kind = _ref7.kind,
810
+ value = _ref7.value;
812
811
  var index = neetoCist.findIndexBy({
813
812
  key: key
814
813
  }, values.properties);
@@ -826,10 +825,10 @@ var Properties = function Properties() {
826
825
  }, key);
827
826
  }), neetoCist.filterBy({
828
827
  kind: "boolean"
829
- }, values.properties).map(function (_ref7) {
830
- var key = _ref7.key,
831
- kind = _ref7.kind,
832
- value = _ref7.value;
828
+ }, values.properties).map(function (_ref8) {
829
+ var key = _ref8.key,
830
+ kind = _ref8.kind,
831
+ value = _ref8.value;
833
832
  var index = neetoCist.findIndexBy({
834
833
  key: key
835
834
  }, values.properties);
@@ -864,7 +863,8 @@ var Customize = function Customize(_ref) {
864
863
  theme = _ref.theme,
865
864
  onCreateTheme = _ref.onCreateTheme,
866
865
  onApplyTheme = _ref.onApplyTheme,
867
- isApplyingTheme = _ref.isApplyingTheme;
866
+ isApplyingTheme = _ref.isApplyingTheme,
867
+ onPropertiesChange = _ref.onPropertiesChange;
868
868
  var _useTranslation = reactI18next.useTranslation(),
869
869
  t = _useTranslation.t;
870
870
  var _useState = react.useState({}),
@@ -928,7 +928,9 @@ var Customize = function Customize(_ref) {
928
928
  className: "neeto-themes-sidebar__scroll",
929
929
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
930
930
  className: "flex flex-col gap-6 p-4",
931
- children: [/*#__PURE__*/jsxRuntime.jsx(ThemeMeta, {}), /*#__PURE__*/jsxRuntime.jsx(Properties, {}), neetoCist.filterBy({
931
+ children: [/*#__PURE__*/jsxRuntime.jsx(ThemeMeta, {}), /*#__PURE__*/jsxRuntime.jsx(Properties, {
932
+ onPropertiesChange: onPropertiesChange
933
+ }), neetoCist.filterBy({
932
934
  kind: "image"
933
935
  }, themePropertiesSchema).map(function (_ref5) {
934
936
  var key = _ref5.key;
@@ -1473,7 +1475,8 @@ var TitleBar = function TitleBar(_ref) {
1473
1475
  var MemoizedAlert = /*#__PURE__*/react.memo(Alert__default["default"]);
1474
1476
  var Sidebar = function Sidebar(_ref) {
1475
1477
  var _themeToEdit$current, _themeToEdit$current2, _themeToDelete$curren2, _themeToDelete$curren3;
1476
- var thumbnail = _ref.thumbnail;
1478
+ var thumbnail = _ref.thumbnail,
1479
+ onPropertiesChange = _ref.onPropertiesChange;
1477
1480
  var _useState = react.useState(DESIGN_SCREENS.THEMES),
1478
1481
  _useState2 = _slicedToArray__default["default"](_useState, 2),
1479
1482
  currentScreen = _useState2[0],
@@ -1641,6 +1644,7 @@ var Sidebar = function Sidebar(_ref) {
1641
1644
  isApplyingTheme: isApplyingTheme,
1642
1645
  onApplyTheme: onApplyTheme,
1643
1646
  onCreateTheme: onCreateTheme,
1647
+ onPropertiesChange: onPropertiesChange,
1644
1648
  theme: themeToEdit.current,
1645
1649
  themeId: (_themeToEdit$current2 = themeToEdit.current) === null || _themeToEdit$current2 === void 0 ? void 0 : _themeToEdit$current2.id
1646
1650
  }), /*#__PURE__*/jsxRuntime.jsx(MemoizedAlert, {
@@ -1679,13 +1683,13 @@ var NeetoThemesBuilder = function NeetoThemesBuilder(_ref) {
1679
1683
  react.useEffect(function () {
1680
1684
  setConfigState({
1681
1685
  entityType: entityType,
1682
- entityId: entityId,
1683
- onPropertiesChange: onPropertiesChange
1686
+ entityId: entityId
1684
1687
  });
1685
1688
  }, []);
1686
1689
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
1687
1690
  className: "neeto-themes__wrapper",
1688
1691
  children: [/*#__PURE__*/jsxRuntime.jsx(Sidebar, {
1692
+ onPropertiesChange: onPropertiesChange,
1689
1693
  thumbnail: thumbnail
1690
1694
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
1691
1695
  className: "neeto-themes-preview__wrapper",