@bigbinary/neeto-themes-frontend 3.1.23 → 3.1.24
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.
- package/app/javascript/src/translations/en.json +5 -0
- package/dist/NeetoThemesBuilder.js +35 -1
- package/dist/NeetoThemesBuilder.js.map +1 -1
- package/dist/cjs/NeetoThemesBuilder.js +35 -1
- package/dist/cjs/NeetoThemesBuilder.js.map +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +12 -12
|
@@ -87,6 +87,11 @@
|
|
|
87
87
|
"newThemeName": "My theme"
|
|
88
88
|
},
|
|
89
89
|
"customCSS": "Custom CSS",
|
|
90
|
+
"logoPosition": {
|
|
91
|
+
"title": "Logo position",
|
|
92
|
+
"belowLeft": "Below left",
|
|
93
|
+
"overLeft": "Over left"
|
|
94
|
+
},
|
|
90
95
|
"themeCloned": "Theme has been cloned successfully.",
|
|
91
96
|
"themeCloneFailed": "Failed to clone theme, please try after some time."
|
|
92
97
|
}
|
|
@@ -30,6 +30,7 @@ import { useFormikContext, Field } from 'formik';
|
|
|
30
30
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
31
31
|
import Right from '@bigbinary/neeto-icons/Right';
|
|
32
32
|
import HelpPopover from '@bigbinary/neeto-molecules/HelpPopover';
|
|
33
|
+
import Radio from '@bigbinary/neetoui/formik/Radio';
|
|
33
34
|
import { t as t$1 } from 'i18next';
|
|
34
35
|
import CenterAlign from '@bigbinary/neeto-icons/CenterAlign';
|
|
35
36
|
import LeftAlign from '@bigbinary/neeto-icons/LeftAlign';
|
|
@@ -415,6 +416,30 @@ var CustomCSS = function CustomCSS(_ref) {
|
|
|
415
416
|
});
|
|
416
417
|
};
|
|
417
418
|
|
|
419
|
+
var LogoPosition = function LogoPosition() {
|
|
420
|
+
var _useTranslation = useTranslation(),
|
|
421
|
+
t = _useTranslation.t;
|
|
422
|
+
var _useFormikContext = useFormikContext(),
|
|
423
|
+
values = _useFormikContext.values;
|
|
424
|
+
var index = findIndexBy({
|
|
425
|
+
key: "logo_position"
|
|
426
|
+
}, values.properties);
|
|
427
|
+
// Do not show this field if the logo_position property is not present.
|
|
428
|
+
if (index === -1) return null;
|
|
429
|
+
return /*#__PURE__*/jsxs(Radio, {
|
|
430
|
+
stacked: true,
|
|
431
|
+
label: t("neetoThemes.build.leftSideBar.themes.logoPosition.title"),
|
|
432
|
+
name: "properties[".concat(index, "].value"),
|
|
433
|
+
children: [/*#__PURE__*/jsx(Radio.Item, {
|
|
434
|
+
label: t("neetoThemes.build.leftSideBar.themes.logoPosition.belowLeft"),
|
|
435
|
+
value: "below_left"
|
|
436
|
+
}), /*#__PURE__*/jsx(Radio.Item, {
|
|
437
|
+
label: t("neetoThemes.build.leftSideBar.themes.logoPosition.overLeft"),
|
|
438
|
+
value: "over_left"
|
|
439
|
+
})]
|
|
440
|
+
});
|
|
441
|
+
};
|
|
442
|
+
|
|
418
443
|
function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
419
444
|
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
420
445
|
var buildInitialValues = function buildInitialValues(theme, themePropertiesSchema) {
|
|
@@ -510,6 +535,15 @@ var buildInitialValues = function buildInitialValues(theme, themePropertiesSchem
|
|
|
510
535
|
}, order !== null && {
|
|
511
536
|
order: order
|
|
512
537
|
});
|
|
538
|
+
case "logo_position":
|
|
539
|
+
return _objectSpread$3({
|
|
540
|
+
value: defaultValue,
|
|
541
|
+
kind: "logo_position",
|
|
542
|
+
key: key,
|
|
543
|
+
dependsOn: dependsOn
|
|
544
|
+
}, order !== null && {
|
|
545
|
+
order: order
|
|
546
|
+
});
|
|
513
547
|
default:
|
|
514
548
|
return null;
|
|
515
549
|
}
|
|
@@ -1119,7 +1153,7 @@ var Images = function Images(_ref) {
|
|
|
1119
1153
|
}), /*#__PURE__*/jsx(Properties, {
|
|
1120
1154
|
onPropertiesChange: onPropertiesChange,
|
|
1121
1155
|
condition: attribute
|
|
1122
|
-
})]
|
|
1156
|
+
}), key === "logo" && /*#__PURE__*/jsx(LogoPosition, {})]
|
|
1123
1157
|
});
|
|
1124
1158
|
};
|
|
1125
1159
|
|