@bigbinary/neeto-themes-frontend 4.2.4 → 4.2.6
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/ar.json +3 -1
- package/app/javascript/src/translations/bg.json +3 -1
- package/app/javascript/src/translations/ca.json +3 -1
- package/app/javascript/src/translations/cs.json +3 -1
- package/app/javascript/src/translations/da.json +3 -1
- package/app/javascript/src/translations/de.json +3 -1
- package/app/javascript/src/translations/es-MX.json +3 -1
- package/app/javascript/src/translations/es.json +3 -1
- package/app/javascript/src/translations/et.json +3 -1
- package/app/javascript/src/translations/fi.json +3 -1
- package/app/javascript/src/translations/fil.json +3 -1
- package/app/javascript/src/translations/fr.json +3 -1
- package/app/javascript/src/translations/he.json +3 -1
- package/app/javascript/src/translations/hi.json +3 -1
- package/app/javascript/src/translations/hr.json +3 -1
- package/app/javascript/src/translations/hu.json +3 -1
- package/app/javascript/src/translations/id.json +3 -1
- package/app/javascript/src/translations/it.json +3 -1
- package/app/javascript/src/translations/ja.json +3 -1
- package/app/javascript/src/translations/ko.json +3 -1
- package/app/javascript/src/translations/lv.json +3 -1
- package/app/javascript/src/translations/nl.json +3 -1
- package/app/javascript/src/translations/pl.json +3 -1
- package/app/javascript/src/translations/pt-BR.json +3 -1
- package/app/javascript/src/translations/pt.json +3 -1
- package/app/javascript/src/translations/ro.json +3 -1
- package/app/javascript/src/translations/ru.json +3 -1
- package/app/javascript/src/translations/sk.json +3 -1
- package/app/javascript/src/translations/sl.json +3 -1
- package/app/javascript/src/translations/sv.json +3 -1
- package/app/javascript/src/translations/th.json +3 -1
- package/app/javascript/src/translations/tr.json +3 -1
- package/app/javascript/src/translations/uk.json +3 -1
- package/app/javascript/src/translations/vi.json +3 -1
- package/app/javascript/src/translations/zh-CN.json +3 -1
- package/app/javascript/src/translations/zh-TW.json +3 -1
- package/dist/.ready +1 -1
- package/dist/NeetoThemesBuilder.js +1 -1
- package/dist/cjs/NeetoThemesBuilder.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/v2/NeetoThemesBuilder.js +74 -32
- package/dist/cjs/v2/NeetoThemesBuilder.js.map +1 -1
- package/dist/cjs/v2/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{useGlobalThemesApi-D04VWBoL.js → useGlobalThemesApi-BdrPI8PW.js} +106 -36
- package/dist/{useGlobalThemesApi-D04VWBoL.js.map → useGlobalThemesApi-BdrPI8PW.js.map} +1 -1
- package/dist/{useGlobalThemesApi-gt4U6XWZ.js → useGlobalThemesApi-DjZDCCZE.js} +106 -36
- package/dist/{useGlobalThemesApi-gt4U6XWZ.js.map → useGlobalThemesApi-DjZDCCZE.js.map} +1 -1
- package/dist/v2/NeetoThemesBuilder.js +74 -32
- package/dist/v2/NeetoThemesBuilder.js.map +1 -1
- package/dist/v2/index.js +1 -1
- package/package.json +9 -9
|
@@ -6,7 +6,7 @@ var neetoAtoms = require('@bigbinary/neeto-atoms');
|
|
|
6
6
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
7
7
|
var reactUtils$1 = require('@bigbinary/neeto-commons-frontend/v2/react-utils');
|
|
8
8
|
var reactI18next = require('react-i18next');
|
|
9
|
-
var useGlobalThemesApi = require('../../useGlobalThemesApi-
|
|
9
|
+
var useGlobalThemesApi = require('../../useGlobalThemesApi-DjZDCCZE.js');
|
|
10
10
|
var useExpandedSection = require('../../useExpandedSection-BTBI4UqP.js');
|
|
11
11
|
var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
|
|
12
12
|
var _regeneratorRuntime = require('@babel/runtime/regenerator');
|
|
@@ -272,7 +272,8 @@ var Card$2 = function Card(_ref) {
|
|
|
272
272
|
name = _ref.name,
|
|
273
273
|
className = _ref.className,
|
|
274
274
|
helpPopoverProps = _ref.helpPopoverProps,
|
|
275
|
-
required = _ref.required
|
|
275
|
+
required = _ref.required,
|
|
276
|
+
dataTestid = _ref.dataTestid;
|
|
276
277
|
var _useExpandedSection = useExpandedSection.useExpandedSection(),
|
|
277
278
|
expandedSection = _useExpandedSection.expandedSection,
|
|
278
279
|
setExpandedSection = _useExpandedSection.setExpandedSection;
|
|
@@ -286,7 +287,7 @@ var Card$2 = function Card(_ref) {
|
|
|
286
287
|
var triggerId = "neeto-themes-section-".concat(sectionId, "-trigger");
|
|
287
288
|
var contentId = "neeto-themes-section-".concat(sectionId, "-content");
|
|
288
289
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
289
|
-
"data-testid": "theme-".concat(neetoCist.hyphenate(title), "-properties"),
|
|
290
|
+
"data-testid": dataTestid || "theme-".concat(neetoCist.hyphenate(title), "-properties"),
|
|
290
291
|
className: classnames("neeto-themes-nano-section border-border border-b pt-2 transition-all duration-300 last:border-none", className, {
|
|
291
292
|
"pb-2": !isOpen,
|
|
292
293
|
"pb-3": isOpen
|
|
@@ -470,6 +471,7 @@ var CustomCSS = function CustomCSS(_ref) {
|
|
|
470
471
|
id: "css-editor",
|
|
471
472
|
children: /*#__PURE__*/jsxRuntime.jsx(Card$2, {
|
|
472
473
|
name: "customcss",
|
|
474
|
+
dataTestid: isCustomCssScreen ? undefined : "theme-custom-css-properties",
|
|
473
475
|
helpPopoverProps: isEnabled ? customCssHelpPopoverProps : {
|
|
474
476
|
title: t("neetoThemes.common.proFeature.customCSS.title"),
|
|
475
477
|
description: t("neetoThemes.common.proFeature.customCSS.description")
|
|
@@ -775,10 +777,11 @@ var buildSystemThemeCopy = function buildSystemThemeCopy(systemTheme) {
|
|
|
775
777
|
var AlignmentBlock = reactUtils.withT(function (_ref) {
|
|
776
778
|
var t = _ref.t,
|
|
777
779
|
label = _ref.label,
|
|
778
|
-
name = _ref.name
|
|
780
|
+
name = _ref.name,
|
|
781
|
+
dataTestid = _ref.dataTestid;
|
|
779
782
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
780
783
|
className: "flex items-center justify-between gap-2",
|
|
781
|
-
"data-testid": utils$1.joinHyphenCase(label),
|
|
784
|
+
"data-testid": dataTestid || utils$1.joinHyphenCase(label),
|
|
782
785
|
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
783
786
|
"data-testid": "style-fields-labels",
|
|
784
787
|
variant: "body2",
|
|
@@ -824,10 +827,11 @@ var ColorBlock = function ColorBlock(_ref) {
|
|
|
824
827
|
_ref$color = _ref.color,
|
|
825
828
|
color = _ref$color === void 0 ? "#FFFFFF" : _ref$color,
|
|
826
829
|
onChange = _ref.onChange,
|
|
827
|
-
showTransparencyControl = _ref.showTransparencyControl
|
|
830
|
+
showTransparencyControl = _ref.showTransparencyControl,
|
|
831
|
+
dataTestid = _ref.dataTestid;
|
|
828
832
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
829
833
|
className: "flex min-h-9 items-center justify-between",
|
|
830
|
-
"data-testid": "theme-style-".concat(utils$1.joinHyphenCase(label)),
|
|
834
|
+
"data-testid": dataTestid || "theme-style-".concat(utils$1.joinHyphenCase(label)),
|
|
831
835
|
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Label, {
|
|
832
836
|
"data-testid": "style-fields-labels",
|
|
833
837
|
children: label
|
|
@@ -847,10 +851,11 @@ var FontPickerBlock = function FontPickerBlock(_ref) {
|
|
|
847
851
|
placeholder = _ref$placeholder === void 0 ? "" : _ref$placeholder,
|
|
848
852
|
value = _ref.value,
|
|
849
853
|
options = _ref.options,
|
|
850
|
-
onChange = _ref.onChange
|
|
854
|
+
onChange = _ref.onChange,
|
|
855
|
+
dataTestid = _ref.dataTestid;
|
|
851
856
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
852
857
|
className: "flex items-center justify-between",
|
|
853
|
-
"data-testid": "theme-style-".concat(utils$1.joinHyphenCase(label)),
|
|
858
|
+
"data-testid": dataTestid || "theme-style-".concat(utils$1.joinHyphenCase(label)),
|
|
854
859
|
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Label, {
|
|
855
860
|
"data-testid": "style-fields-labels",
|
|
856
861
|
children: label
|
|
@@ -883,10 +888,11 @@ var SelectBlock = function SelectBlock(_ref) {
|
|
|
883
888
|
placeholder = _ref$placeholder === void 0 ? "" : _ref$placeholder,
|
|
884
889
|
value = _ref.value,
|
|
885
890
|
options = _ref.options,
|
|
886
|
-
onChange = _ref.onChange
|
|
891
|
+
onChange = _ref.onChange,
|
|
892
|
+
dataTestid = _ref.dataTestid;
|
|
887
893
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
888
894
|
className: "flex min-h-9 items-center justify-between gap-3",
|
|
889
|
-
"data-testid": "theme-style-".concat(utils$1.joinHyphenCase(label)),
|
|
895
|
+
"data-testid": dataTestid || "theme-style-".concat(utils$1.joinHyphenCase(label)),
|
|
890
896
|
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Label, {
|
|
891
897
|
"data-testid": "logo-field-labels",
|
|
892
898
|
children: label
|
|
@@ -910,10 +916,11 @@ var SliderBlock = function SliderBlock(_ref) {
|
|
|
910
916
|
onChange = _ref.onChange,
|
|
911
917
|
value = _ref.value,
|
|
912
918
|
min = _ref.min,
|
|
913
|
-
max = _ref.max
|
|
919
|
+
max = _ref.max,
|
|
920
|
+
dataTestid = _ref.dataTestid;
|
|
914
921
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
915
922
|
className: "flex min-h-9 items-center justify-between gap-3",
|
|
916
|
-
"data-testid": "theme-style-".concat(utils$1.joinHyphenCase(label)),
|
|
923
|
+
"data-testid": dataTestid || "theme-style-".concat(utils$1.joinHyphenCase(label)),
|
|
917
924
|
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Label, {
|
|
918
925
|
"data-testid": "style-fields-labels",
|
|
919
926
|
children: label
|
|
@@ -927,7 +934,7 @@ var SliderBlock = function SliderBlock(_ref) {
|
|
|
927
934
|
});
|
|
928
935
|
};
|
|
929
936
|
|
|
930
|
-
var _excluded = ["label", "name", "asCheckbox"];
|
|
937
|
+
var _excluded = ["label", "name", "asCheckbox", "dataTestid"];
|
|
931
938
|
function ownKeys$1(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; }
|
|
932
939
|
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
933
940
|
var SwitchBlock = function SwitchBlock(_ref) {
|
|
@@ -935,6 +942,7 @@ var SwitchBlock = function SwitchBlock(_ref) {
|
|
|
935
942
|
name = _ref.name,
|
|
936
943
|
_ref$asCheckbox = _ref.asCheckbox,
|
|
937
944
|
asCheckbox = _ref$asCheckbox === void 0 ? false : _ref$asCheckbox,
|
|
945
|
+
dataTestid = _ref.dataTestid,
|
|
938
946
|
inputProps = _objectWithoutProperties(_ref, _excluded);
|
|
939
947
|
var _useTranslation = reactI18next.useTranslation(),
|
|
940
948
|
t = _useTranslation.t,
|
|
@@ -944,7 +952,7 @@ var SwitchBlock = function SwitchBlock(_ref) {
|
|
|
944
952
|
if (asCheckbox) {
|
|
945
953
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
946
954
|
className: "flex min-h-9 items-center gap-2",
|
|
947
|
-
"data-testid": "theme-style-content-background",
|
|
955
|
+
"data-testid": dataTestid || "theme-style-content-background",
|
|
948
956
|
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Checkbox, _objectSpread$1(_objectSpread$1({}, _objectSpread$1({
|
|
949
957
|
label: label,
|
|
950
958
|
name: name
|
|
@@ -958,7 +966,7 @@ var SwitchBlock = function SwitchBlock(_ref) {
|
|
|
958
966
|
}
|
|
959
967
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
960
968
|
className: "flex min-h-9 items-center justify-between",
|
|
961
|
-
"data-testid": "theme-style-content-background",
|
|
969
|
+
"data-testid": dataTestid || "theme-style-content-background",
|
|
962
970
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
963
971
|
className: "inline-flex items-center gap-4",
|
|
964
972
|
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Label, {
|
|
@@ -989,10 +997,11 @@ var TextBlock = function TextBlock(_ref) {
|
|
|
989
997
|
value = _ref.value,
|
|
990
998
|
onChange = _ref.onChange,
|
|
991
999
|
placeholder = _ref.placeholder,
|
|
992
|
-
error = _ref.error
|
|
1000
|
+
error = _ref.error,
|
|
1001
|
+
dataTestid = _ref.dataTestid;
|
|
993
1002
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
994
1003
|
className: "flex flex-col gap-2",
|
|
995
|
-
"data-testid": "theme-style-".concat(utils$1.joinHyphenCase(label)),
|
|
1004
|
+
"data-testid": dataTestid || "theme-style-".concat(utils$1.joinHyphenCase(label)),
|
|
996
1005
|
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Label, {
|
|
997
1006
|
"data-testid": "style-fields-labels",
|
|
998
1007
|
children: label
|
|
@@ -1087,7 +1096,7 @@ var Properties = function Properties(_ref) {
|
|
|
1087
1096
|
};
|
|
1088
1097
|
return order(a.key) - order(b.key);
|
|
1089
1098
|
}).map(function (_ref3) {
|
|
1090
|
-
var
|
|
1099
|
+
var _findBy4, _findBy5, _findBy6, _findBy7, _findBy8;
|
|
1091
1100
|
var key = _ref3.key,
|
|
1092
1101
|
value = _ref3.value,
|
|
1093
1102
|
kind = _ref3.kind;
|
|
@@ -1096,7 +1105,7 @@ var Properties = function Properties(_ref) {
|
|
|
1096
1105
|
switch (kind) {
|
|
1097
1106
|
case "text_input":
|
|
1098
1107
|
{
|
|
1099
|
-
var _errors$properties;
|
|
1108
|
+
var _errors$properties, _findBy3;
|
|
1100
1109
|
var index = neetoCist.findIndexBy({
|
|
1101
1110
|
key: key
|
|
1102
1111
|
}, values.properties);
|
|
@@ -1107,6 +1116,9 @@ var Properties = function Properties(_ref) {
|
|
|
1107
1116
|
label: buildLabel(key, kind),
|
|
1108
1117
|
name: "properties[".concat(index, "].value"),
|
|
1109
1118
|
value: value || "",
|
|
1119
|
+
dataTestid: (_findBy3 = neetoCist.findBy({
|
|
1120
|
+
key: key
|
|
1121
|
+
}, themePropertiesSchema)) === null || _findBy3 === void 0 ? void 0 : _findBy3.dataTestid,
|
|
1110
1122
|
onChange: function onChange(e) {
|
|
1111
1123
|
return setFieldValue("properties[".concat(index, "].value"), e.target.value);
|
|
1112
1124
|
}
|
|
@@ -1117,6 +1129,9 @@ var Properties = function Properties(_ref) {
|
|
|
1117
1129
|
label: buildLabel(key, kind),
|
|
1118
1130
|
options: FONT_OPTIONS,
|
|
1119
1131
|
value: value || "",
|
|
1132
|
+
dataTestid: (_findBy4 = neetoCist.findBy({
|
|
1133
|
+
key: key
|
|
1134
|
+
}, themePropertiesSchema)) === null || _findBy4 === void 0 ? void 0 : _findBy4.dataTestid,
|
|
1120
1135
|
onChange: function onChange(newValue) {
|
|
1121
1136
|
return handleChange(key, newValue);
|
|
1122
1137
|
}
|
|
@@ -1125,9 +1140,12 @@ var Properties = function Properties(_ref) {
|
|
|
1125
1140
|
return /*#__PURE__*/jsxRuntime.jsx(ColorBlock, {
|
|
1126
1141
|
color: value,
|
|
1127
1142
|
label: buildLabel(key, kind),
|
|
1128
|
-
|
|
1143
|
+
dataTestid: (_findBy5 = neetoCist.findBy({
|
|
1129
1144
|
key: key
|
|
1130
|
-
}, themePropertiesSchema)) === null ||
|
|
1145
|
+
}, themePropertiesSchema)) === null || _findBy5 === void 0 ? void 0 : _findBy5.dataTestid,
|
|
1146
|
+
showTransparencyControl: ((_findBy6 = neetoCist.findBy({
|
|
1147
|
+
key: key
|
|
1148
|
+
}, themePropertiesSchema)) === null || _findBy6 === void 0 ? void 0 : _findBy6.showTransparencyControl) || false,
|
|
1131
1149
|
onChange: handleColorChange(key)
|
|
1132
1150
|
}, key);
|
|
1133
1151
|
case "radius":
|
|
@@ -1136,6 +1154,9 @@ var Properties = function Properties(_ref) {
|
|
|
1136
1154
|
max: 50,
|
|
1137
1155
|
min: 0,
|
|
1138
1156
|
value: Number(value) || 0,
|
|
1157
|
+
dataTestid: (_findBy7 = neetoCist.findBy({
|
|
1158
|
+
key: key
|
|
1159
|
+
}, themePropertiesSchema)) === null || _findBy7 === void 0 ? void 0 : _findBy7.dataTestid,
|
|
1139
1160
|
onChange: function onChange(radius) {
|
|
1140
1161
|
return handleChange(key, radius, "".concat(radius, "px"));
|
|
1141
1162
|
}
|
|
@@ -1147,25 +1168,31 @@ var Properties = function Properties(_ref) {
|
|
|
1147
1168
|
max: HUNDRED,
|
|
1148
1169
|
min: ramda.negate(HUNDRED),
|
|
1149
1170
|
value: Number(value) || 0,
|
|
1171
|
+
dataTestid: (_findBy8 = neetoCist.findBy({
|
|
1172
|
+
key: key
|
|
1173
|
+
}, themePropertiesSchema)) === null || _findBy8 === void 0 ? void 0 : _findBy8.dataTestid,
|
|
1150
1174
|
onChange: function onChange(opacity) {
|
|
1151
1175
|
return handleOverlayChange(key, opacity);
|
|
1152
1176
|
}
|
|
1153
1177
|
}, key);
|
|
1154
1178
|
case "position_selector":
|
|
1155
1179
|
{
|
|
1156
|
-
var
|
|
1180
|
+
var _findBy9, _findBy0;
|
|
1157
1181
|
var _index = neetoCist.findIndexBy({
|
|
1158
1182
|
key: key
|
|
1159
1183
|
}, values.properties);
|
|
1160
|
-
var options = (
|
|
1184
|
+
var options = (_findBy9 = neetoCist.findBy({
|
|
1161
1185
|
key: key
|
|
1162
|
-
}, themePropertiesSchema)) === null ||
|
|
1186
|
+
}, themePropertiesSchema)) === null || _findBy9 === void 0 || (_findBy9 = _findBy9.options) === null || _findBy9 === void 0 ? void 0 : _findBy9.map(toCapitalizedOption);
|
|
1163
1187
|
return /*#__PURE__*/react.createElement(SelectBlock, {
|
|
1164
1188
|
value: value,
|
|
1165
1189
|
key: key,
|
|
1166
1190
|
label: buildLabel(key, kind),
|
|
1167
1191
|
options: options || POSITION_OPTIONS,
|
|
1168
1192
|
placeholder: "left",
|
|
1193
|
+
dataTestid: (_findBy0 = neetoCist.findBy({
|
|
1194
|
+
key: key
|
|
1195
|
+
}, themePropertiesSchema)) === null || _findBy0 === void 0 ? void 0 : _findBy0.dataTestid,
|
|
1169
1196
|
onChange: function onChange(newValue) {
|
|
1170
1197
|
return setFieldValue("properties[".concat(_index, "].value"), newValue);
|
|
1171
1198
|
}
|
|
@@ -1173,18 +1200,21 @@ var Properties = function Properties(_ref) {
|
|
|
1173
1200
|
}
|
|
1174
1201
|
case "boolean":
|
|
1175
1202
|
{
|
|
1176
|
-
var
|
|
1203
|
+
var _findBy1, _findBy10;
|
|
1177
1204
|
var _index2 = neetoCist.findIndexBy({
|
|
1178
1205
|
key: key
|
|
1179
1206
|
}, values.properties);
|
|
1180
|
-
var renderAsCheckbox = ((
|
|
1207
|
+
var renderAsCheckbox = ((_findBy1 = neetoCist.findBy({
|
|
1181
1208
|
key: key
|
|
1182
|
-
}, themePropertiesSchema)) === null ||
|
|
1209
|
+
}, themePropertiesSchema)) === null || _findBy1 === void 0 ? void 0 : _findBy1.renderAsCheckbox) || false;
|
|
1183
1210
|
return /*#__PURE__*/jsxRuntime.jsx(SwitchBlock, {
|
|
1184
1211
|
asCheckbox: renderAsCheckbox,
|
|
1185
1212
|
checked: value !== "false",
|
|
1186
1213
|
label: buildLabel(key, kind),
|
|
1187
1214
|
name: neetoCist.snakeToCamelCase(key),
|
|
1215
|
+
dataTestid: (_findBy10 = neetoCist.findBy({
|
|
1216
|
+
key: key
|
|
1217
|
+
}, themePropertiesSchema)) === null || _findBy10 === void 0 ? void 0 : _findBy10.dataTestid,
|
|
1188
1218
|
onCheckedChange: function onCheckedChange(checked) {
|
|
1189
1219
|
return setFieldValue("properties[".concat(_index2, "].value"), String(checked));
|
|
1190
1220
|
}
|
|
@@ -1192,12 +1222,16 @@ var Properties = function Properties(_ref) {
|
|
|
1192
1222
|
}
|
|
1193
1223
|
case "alignment_block":
|
|
1194
1224
|
{
|
|
1225
|
+
var _findBy11;
|
|
1195
1226
|
var _index3 = neetoCist.findIndexBy({
|
|
1196
1227
|
key: key
|
|
1197
1228
|
}, values.properties);
|
|
1198
1229
|
return /*#__PURE__*/jsxRuntime.jsx(AlignmentBlock, {
|
|
1199
1230
|
label: buildLabel(key, kind),
|
|
1200
|
-
name: "properties[".concat(_index3, "].value")
|
|
1231
|
+
name: "properties[".concat(_index3, "].value"),
|
|
1232
|
+
dataTestid: (_findBy11 = neetoCist.findBy({
|
|
1233
|
+
key: key
|
|
1234
|
+
}, themePropertiesSchema)) === null || _findBy11 === void 0 ? void 0 : _findBy11.dataTestid
|
|
1201
1235
|
}, key);
|
|
1202
1236
|
}
|
|
1203
1237
|
default:
|
|
@@ -1320,7 +1354,7 @@ var ImageBlock = function ImageBlock(_ref) {
|
|
|
1320
1354
|
};
|
|
1321
1355
|
|
|
1322
1356
|
var Images = function Images(_ref) {
|
|
1323
|
-
var _values$coverImage;
|
|
1357
|
+
var _findBy, _values$coverImage;
|
|
1324
1358
|
var attribute = _ref.attribute,
|
|
1325
1359
|
className = _ref.className,
|
|
1326
1360
|
onPropertiesChange = _ref.onPropertiesChange,
|
|
@@ -1331,16 +1365,21 @@ var Images = function Images(_ref) {
|
|
|
1331
1365
|
values = _useFormikContext.values;
|
|
1332
1366
|
var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
|
|
1333
1367
|
return {
|
|
1334
|
-
helpPopoverProps: store["helpPopoverProps"]
|
|
1368
|
+
helpPopoverProps: store["helpPopoverProps"],
|
|
1369
|
+
themePropertiesSchema: store["themePropertiesSchema"]
|
|
1335
1370
|
};
|
|
1336
1371
|
}, shallow.shallow),
|
|
1337
|
-
helpPopoverProps = _useConfigStore.helpPopoverProps
|
|
1372
|
+
helpPopoverProps = _useConfigStore.helpPopoverProps,
|
|
1373
|
+
themePropertiesSchema = _useConfigStore.themePropertiesSchema;
|
|
1338
1374
|
var key = neetoCist.snakeToCamelCase(attribute);
|
|
1339
1375
|
var title = buildLabel(key, "image");
|
|
1340
1376
|
var imageData = values[key];
|
|
1341
1377
|
return /*#__PURE__*/jsxRuntime.jsxs(Card$2, {
|
|
1342
1378
|
className: className,
|
|
1343
1379
|
title: title,
|
|
1380
|
+
dataTestid: (_findBy = neetoCist.findBy({
|
|
1381
|
+
key: attribute
|
|
1382
|
+
}, themePropertiesSchema)) === null || _findBy === void 0 ? void 0 : _findBy.dataTestid,
|
|
1344
1383
|
helpPopoverProps: helpPopoverProps[key],
|
|
1345
1384
|
name: key,
|
|
1346
1385
|
children: [/*#__PURE__*/jsxRuntime.jsx(ImageBlock, {
|
|
@@ -1372,6 +1411,7 @@ var ThemeMeta = function ThemeMeta(_ref) {
|
|
|
1372
1411
|
return /*#__PURE__*/jsxRuntime.jsx(Card$2, {
|
|
1373
1412
|
className: className,
|
|
1374
1413
|
required: true,
|
|
1414
|
+
dataTestid: "theme-name-properties",
|
|
1375
1415
|
helpPopoverProps: nameHelpPopoverProps,
|
|
1376
1416
|
name: "name",
|
|
1377
1417
|
title: t("neetoThemes.common.name"),
|
|
@@ -1586,6 +1626,7 @@ var Customize = function Customize(_ref) {
|
|
|
1586
1626
|
className: classnames({
|
|
1587
1627
|
hidden: isCustomCssScreen
|
|
1588
1628
|
}),
|
|
1629
|
+
dataTestid: "theme-style-properties",
|
|
1589
1630
|
helpPopoverProps: styleHelpPopoverProps,
|
|
1590
1631
|
name: "style",
|
|
1591
1632
|
title: t("neetoThemes.common.style"),
|
|
@@ -1623,6 +1664,7 @@ var Customize = function Customize(_ref) {
|
|
|
1623
1664
|
content: t("neetoThemes.build.leftSideBar.themes.themeOptions.setAsGlobalTheme.tooltipContent"),
|
|
1624
1665
|
children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Switch, {
|
|
1625
1666
|
checked: values.shouldSetAsGlobalTheme,
|
|
1667
|
+
dataTestId: "set-as-default-theme",
|
|
1626
1668
|
disabled: isThemeGlobalTheme,
|
|
1627
1669
|
name: "shouldSetAsGlobalTheme",
|
|
1628
1670
|
size: "lg",
|