@bigbinary/neeto-themes-frontend 4.2.8-beta1 → 4.2.9

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.
@@ -913,7 +913,7 @@ var SliderBlock = function SliderBlock(_ref) {
913
913
  });
914
914
  };
915
915
 
916
- var _excluded = ["label", "name", "asCheckbox", "dataTestid"];
916
+ var _excluded = ["label", "name", "asCheckbox", "dataTestid", "checkboxDataTestid"];
917
917
  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; }
918
918
  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; }
919
919
  var SwitchBlock = function SwitchBlock(_ref) {
@@ -922,6 +922,7 @@ var SwitchBlock = function SwitchBlock(_ref) {
922
922
  _ref$asCheckbox = _ref.asCheckbox,
923
923
  asCheckbox = _ref$asCheckbox === void 0 ? false : _ref$asCheckbox,
924
924
  dataTestid = _ref.dataTestid,
925
+ checkboxDataTestid = _ref.checkboxDataTestid,
925
926
  inputProps = _objectWithoutProperties(_ref, _excluded);
926
927
  var _useTranslation = useTranslation(),
927
928
  t = _useTranslation.t,
@@ -936,7 +937,8 @@ var SwitchBlock = function SwitchBlock(_ref) {
936
937
  label: label,
937
938
  name: name
938
939
  }, inputProps)), {}, {
939
- "data-testid": "enable-background-color-toggle"
940
+ "data-testid": "enable-background-color-toggle",
941
+ dataTestId: checkboxDataTestid || hyphenate(name)
940
942
  })), doesHelpTextExist && /*#__PURE__*/jsx(HelpPopover, {
941
943
  className: "shrink-0",
942
944
  description: t(translationKey)
@@ -1179,7 +1181,7 @@ var Properties = function Properties(_ref) {
1179
1181
  }
1180
1182
  case "boolean":
1181
1183
  {
1182
- var _findBy1, _findBy10;
1184
+ var _findBy1, _findBy10, _findBy11;
1183
1185
  var _index2 = findIndexBy({
1184
1186
  key: key
1185
1187
  }, values.properties);
@@ -1191,9 +1193,12 @@ var Properties = function Properties(_ref) {
1191
1193
  checked: value !== "false",
1192
1194
  label: buildLabel(key, kind),
1193
1195
  name: snakeToCamelCase(key),
1194
- dataTestid: (_findBy10 = findBy({
1196
+ checkboxDataTestid: (_findBy10 = findBy({
1195
1197
  key: key
1196
- }, themePropertiesSchema)) === null || _findBy10 === void 0 ? void 0 : _findBy10.dataTestid,
1198
+ }, themePropertiesSchema)) === null || _findBy10 === void 0 ? void 0 : _findBy10.checkboxDataTestid,
1199
+ dataTestid: (_findBy11 = findBy({
1200
+ key: key
1201
+ }, themePropertiesSchema)) === null || _findBy11 === void 0 ? void 0 : _findBy11.dataTestid,
1197
1202
  onCheckedChange: function onCheckedChange(checked) {
1198
1203
  return setFieldValue("properties[".concat(_index2, "].value"), String(checked));
1199
1204
  }
@@ -1201,16 +1206,16 @@ var Properties = function Properties(_ref) {
1201
1206
  }
1202
1207
  case "alignment_block":
1203
1208
  {
1204
- var _findBy11;
1209
+ var _findBy12;
1205
1210
  var _index3 = findIndexBy({
1206
1211
  key: key
1207
1212
  }, values.properties);
1208
1213
  return /*#__PURE__*/jsx(AlignmentBlock, {
1209
1214
  label: buildLabel(key, kind),
1210
1215
  name: "properties[".concat(_index3, "].value"),
1211
- dataTestid: (_findBy11 = findBy({
1216
+ dataTestid: (_findBy12 = findBy({
1212
1217
  key: key
1213
- }, themePropertiesSchema)) === null || _findBy11 === void 0 ? void 0 : _findBy11.dataTestid
1218
+ }, themePropertiesSchema)) === null || _findBy12 === void 0 ? void 0 : _findBy12.dataTestid
1214
1219
  }, key);
1215
1220
  }
1216
1221
  default:
@@ -1252,6 +1257,7 @@ var ImageBlock = function ImageBlock(_ref) {
1252
1257
  var positionKeyInSchema = findBy({
1253
1258
  key: "".concat(name, "_position")
1254
1259
  }, themePropertiesSchema);
1260
+ var positionDataTestid = (positionKeyInSchema === null || positionKeyInSchema === void 0 ? void 0 : positionKeyInSchema.dataTestid) || "theme-style-".concat(hyphenate(name), "-position");
1255
1261
  var isPositionChangerVisible = enablePositionChanger && (imageData === null || imageData === void 0 ? void 0 : imageData.url) && isPresent(positionKeyInSchema);
1256
1262
  var positionKeyIndex = findIndexBy({
1257
1263
  key: "".concat(name, "_position")
@@ -1300,7 +1306,7 @@ var ImageBlock = function ImageBlock(_ref) {
1300
1306
  }();
1301
1307
  return /*#__PURE__*/jsxs("div", {
1302
1308
  className: "space-y-3",
1303
- "data-testid": "theme-style-".concat(label ? joinHyphenCase(label) : "image-block"),
1309
+ "data-testid": "theme-style-image-block",
1304
1310
  children: [label && /*#__PURE__*/jsx("div", {
1305
1311
  className: "flex items-center justify-between",
1306
1312
  children: /*#__PURE__*/jsx(Label, {
@@ -1318,6 +1324,7 @@ var ImageBlock = function ImageBlock(_ref) {
1318
1324
  src: imageData === null || imageData === void 0 ? void 0 : imageData.url,
1319
1325
  onUploadComplete: handleImageChange
1320
1326
  }), isPositionChangerVisible && /*#__PURE__*/jsx(SelectBlock, {
1327
+ dataTestid: positionDataTestid,
1321
1328
  label: buildLabel("".concat(name, "Position"), "image"),
1322
1329
  options: (options === null || options === void 0 ? void 0 : options.map(toCapitalizedOption)) || POSITION_OPTIONS,
1323
1330
  placeholder: t("neetoThemes.common.left"),