@bigbinary/neeto-themes-frontend 3.1.20 → 3.1.21
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.
|
@@ -986,7 +986,8 @@ var ImageBlock = function ImageBlock(_ref) {
|
|
|
986
986
|
} : _ref$uploadConfig,
|
|
987
987
|
attribute = _ref.attribute,
|
|
988
988
|
defaultImageSize = _ref.defaultImageSize,
|
|
989
|
-
useDefaultImageSize = _ref.useDefaultImageSize
|
|
989
|
+
useDefaultImageSize = _ref.useDefaultImageSize,
|
|
990
|
+
fixedAspectRatio = _ref.fixedAspectRatio;
|
|
990
991
|
var _useTranslation = reactI18next.useTranslation(),
|
|
991
992
|
t = _useTranslation.t;
|
|
992
993
|
var _useFormikContext = formik.useFormikContext(),
|
|
@@ -1065,6 +1066,7 @@ var ImageBlock = function ImageBlock(_ref) {
|
|
|
1065
1066
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1066
1067
|
className: "space-y-3",
|
|
1067
1068
|
children: [/*#__PURE__*/react.createElement(ImageUploader, {
|
|
1069
|
+
fixedAspectRatio: fixedAspectRatio,
|
|
1068
1070
|
uploadConfig: uploadConfig,
|
|
1069
1071
|
className: "h-40 w-full",
|
|
1070
1072
|
defaultImageSize: useDefaultImageSize ? defaultImageSize : {},
|
|
@@ -1091,7 +1093,8 @@ var Images = function Images(_ref) {
|
|
|
1091
1093
|
className = _ref.className,
|
|
1092
1094
|
onPropertiesChange = _ref.onPropertiesChange,
|
|
1093
1095
|
defaultImageSize = _ref.defaultImageSize,
|
|
1094
|
-
useDefaultImageSize = _ref.useDefaultImageSize
|
|
1096
|
+
useDefaultImageSize = _ref.useDefaultImageSize,
|
|
1097
|
+
fixedAspectRatio = _ref.fixedAspectRatio;
|
|
1095
1098
|
var _useFormikContext = formik.useFormikContext(),
|
|
1096
1099
|
values = _useFormikContext.values;
|
|
1097
1100
|
var _useConfigStore = useThemeUtils.useConfigStore(function (store) {
|
|
@@ -1111,6 +1114,7 @@ var Images = function Images(_ref) {
|
|
|
1111
1114
|
children: [/*#__PURE__*/jsxRuntime.jsx(ImageBlock, {
|
|
1112
1115
|
attribute: attribute,
|
|
1113
1116
|
defaultImageSize: defaultImageSize,
|
|
1117
|
+
fixedAspectRatio: fixedAspectRatio,
|
|
1114
1118
|
imageData: imageData,
|
|
1115
1119
|
useDefaultImageSize: useDefaultImageSize,
|
|
1116
1120
|
name: key
|
|
@@ -1156,6 +1160,7 @@ var Customize = function Customize(_ref) {
|
|
|
1156
1160
|
isApplyingTheme = _ref.isApplyingTheme,
|
|
1157
1161
|
onPropertiesChange = _ref.onPropertiesChange,
|
|
1158
1162
|
defaultImageSize = _ref.defaultImageSize,
|
|
1163
|
+
fixedAspectRatio = _ref.fixedAspectRatio,
|
|
1159
1164
|
onEditCSSClick = _ref.onEditCSSClick,
|
|
1160
1165
|
currentScreen = _ref.currentScreen;
|
|
1161
1166
|
var _useTranslation = reactI18next.useTranslation(),
|
|
@@ -1298,17 +1303,20 @@ var Customize = function Customize(_ref) {
|
|
|
1298
1303
|
kind: "image"
|
|
1299
1304
|
}, themePropertiesSchema).map(function (_ref6) {
|
|
1300
1305
|
var key = _ref6.key,
|
|
1301
|
-
useDefaultImageSize = _ref6.useDefaultImageSize
|
|
1302
|
-
|
|
1303
|
-
|
|
1306
|
+
useDefaultImageSize = _ref6.useDefaultImageSize,
|
|
1307
|
+
propertyDefaultSize = _ref6.defaultImageSize,
|
|
1308
|
+
propertyFixedAspectRatio = _ref6.fixedAspectRatio;
|
|
1309
|
+
return /*#__PURE__*/react.createElement(Images, _defineProperty({
|
|
1310
|
+
fixedAspectRatio: fixedAspectRatio,
|
|
1304
1311
|
onPropertiesChange: onPropertiesChange,
|
|
1305
1312
|
useDefaultImageSize: useDefaultImageSize,
|
|
1306
1313
|
attribute: key,
|
|
1307
1314
|
className: classnames({
|
|
1308
1315
|
hidden: isCustomCssScreen
|
|
1309
1316
|
}),
|
|
1317
|
+
defaultImageSize: propertyDefaultSize || defaultImageSize,
|
|
1310
1318
|
key: key
|
|
1311
|
-
});
|
|
1319
|
+
}, "fixedAspectRatio", propertyFixedAspectRatio || fixedAspectRatio));
|
|
1312
1320
|
}), enabledFeatures.customCSS && /*#__PURE__*/jsxRuntime.jsx(CustomCSS, {
|
|
1313
1321
|
currentScreen: currentScreen,
|
|
1314
1322
|
onEditCSSClick: onEditCSSClick
|
|
@@ -1910,6 +1918,7 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
1910
1918
|
var thumbnail = _ref.thumbnail,
|
|
1911
1919
|
onPropertiesChange = _ref.onPropertiesChange,
|
|
1912
1920
|
defaultImageSize = _ref.defaultImageSize,
|
|
1921
|
+
fixedAspectRatio = _ref.fixedAspectRatio,
|
|
1913
1922
|
onApplyThemeSuccess = _ref.onApplyThemeSuccess,
|
|
1914
1923
|
onUpdateThemeSuccess = _ref.onUpdateThemeSuccess,
|
|
1915
1924
|
onApplyGlobalThemeSuccess = _ref.onApplyGlobalThemeSuccess;
|
|
@@ -1999,7 +2008,7 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
1999
2008
|
var themeToEdit = react.useRef(null);
|
|
2000
2009
|
var isCustomCssScreen = isScreenCustomCSS(currentScreen);
|
|
2001
2010
|
var handleCreateNewTheme = function handleCreateNewTheme() {
|
|
2002
|
-
history.push(
|
|
2011
|
+
history.push(buildPathname(routes.themes["new"]));
|
|
2003
2012
|
};
|
|
2004
2013
|
var handleEditTheme = function handleEditTheme(theme) {
|
|
2005
2014
|
themeToEdit.current = theme;
|
|
@@ -2018,7 +2027,7 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
2018
2027
|
};
|
|
2019
2028
|
var navigateToThemesScreen = function navigateToThemesScreen(themeId) {
|
|
2020
2029
|
highlightTheme(neetoCist.isPresent(themeId) ? themeId : currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.id);
|
|
2021
|
-
history.push(
|
|
2030
|
+
history.push(buildPathname(routes.themes.index));
|
|
2022
2031
|
themeToEdit.current = null;
|
|
2023
2032
|
};
|
|
2024
2033
|
var handleBackPress = function handleBackPress(themeId) {
|
|
@@ -2114,6 +2123,7 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
2114
2123
|
return /*#__PURE__*/jsxRuntime.jsx(Customize, {
|
|
2115
2124
|
currentScreen: currentScreen,
|
|
2116
2125
|
defaultImageSize: defaultImageSize,
|
|
2126
|
+
fixedAspectRatio: fixedAspectRatio,
|
|
2117
2127
|
isApplyingTheme: isApplyingTheme,
|
|
2118
2128
|
onApplyTheme: onApplyTheme,
|
|
2119
2129
|
onCreateTheme: onCreateTheme,
|
|
@@ -2129,6 +2139,7 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
2129
2139
|
return /*#__PURE__*/jsxRuntime.jsx(Customize, {
|
|
2130
2140
|
currentScreen: currentScreen,
|
|
2131
2141
|
defaultImageSize: defaultImageSize,
|
|
2142
|
+
fixedAspectRatio: fixedAspectRatio,
|
|
2132
2143
|
isApplyingTheme: isApplyingTheme,
|
|
2133
2144
|
onApplyTheme: onApplyTheme,
|
|
2134
2145
|
onCreateTheme: onCreateTheme,
|
|
@@ -2173,6 +2184,8 @@ var NeetoThemesBuilder = function NeetoThemesBuilder(_ref) {
|
|
|
2173
2184
|
onPropertiesChange = _ref.onPropertiesChange,
|
|
2174
2185
|
_ref$defaultImageSize = _ref.defaultImageSize,
|
|
2175
2186
|
defaultImageSize = _ref$defaultImageSize === void 0 ? {} : _ref$defaultImageSize,
|
|
2187
|
+
_ref$fixedAspectRatio = _ref.fixedAspectRatio,
|
|
2188
|
+
fixedAspectRatio = _ref$fixedAspectRatio === void 0 ? {} : _ref$fixedAspectRatio,
|
|
2176
2189
|
_ref$helpDocUrl = _ref.helpDocUrl,
|
|
2177
2190
|
helpDocUrl = _ref$helpDocUrl === void 0 ? null : _ref$helpDocUrl,
|
|
2178
2191
|
_ref$isTemplateThemes = _ref.isTemplateThemesEnabled,
|
|
@@ -2263,6 +2276,7 @@ var NeetoThemesBuilder = function NeetoThemesBuilder(_ref) {
|
|
|
2263
2276
|
title: pageTitle || t("neetoThemes.common.theme")
|
|
2264
2277
|
}), /*#__PURE__*/jsxRuntime.jsx(Sidebar, {
|
|
2265
2278
|
defaultImageSize: defaultImageSize,
|
|
2279
|
+
fixedAspectRatio: fixedAspectRatio,
|
|
2266
2280
|
onApplyGlobalThemeSuccess: onApplyGlobalThemeSuccess,
|
|
2267
2281
|
onApplyThemeSuccess: onApplyThemeSuccess,
|
|
2268
2282
|
onPropertiesChange: onPropertiesChange,
|