contentoh-components-library 21.6.32 → 21.6.34

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.
Files changed (30) hide show
  1. package/.claude/launch.json +15 -0
  2. package/dist/ai/prompts/attribute.prompt.js +28 -0
  3. package/dist/ai/prompts/description.prompt.js +33 -0
  4. package/dist/ai/schemas/attribute.schema.js +35 -0
  5. package/dist/ai/schemas/description.schema.js +27 -0
  6. package/dist/components/atoms/InheritanceTag/InheritanceTag.stories.js +5 -5
  7. package/dist/components/atoms/InheritanceTag/index.js +6 -6
  8. package/dist/components/organisms/InputGroup/index.js +12 -1
  9. package/dist/components/organisms/LinkVariantsModal/index.js +269 -356
  10. package/dist/components/organisms/LinkVariantsModal/styles.js +14 -5
  11. package/dist/components/organisms/PropagateChangesModal/index.js +12 -13
  12. package/dist/components/pages/ProviderProductEdition/context/provider-product-edition.context.js +5 -5
  13. package/dist/components/pages/ProviderProductEdition/context/reducers/inputs.js +5 -2
  14. package/dist/components/pages/ProviderProductEdition/index.js +96 -36
  15. package/dist/components/pages/RetailerProductEdition/context/provider-product-edition.context.js +5 -5
  16. package/dist/components/pages/RetailerProductEdition/context/reducers/inputs.js +5 -2
  17. package/dist/components/pages/RetailerProductEdition/index.js +100 -38
  18. package/package.json +1 -1
  19. package/src/components/atoms/InheritanceTag/InheritanceTag.stories.js +3 -3
  20. package/src/components/atoms/InheritanceTag/index.js +6 -6
  21. package/src/components/organisms/InputGroup/index.js +12 -0
  22. package/src/components/organisms/LinkVariantsModal/index.js +260 -287
  23. package/src/components/organisms/LinkVariantsModal/styles.js +65 -32
  24. package/src/components/organisms/PropagateChangesModal/index.js +19 -17
  25. package/src/components/pages/ProviderProductEdition/context/provider-product-edition.context.jsx +4 -4
  26. package/src/components/pages/ProviderProductEdition/context/reducers/inputs.js +13 -1
  27. package/src/components/pages/ProviderProductEdition/index.js +61 -20
  28. package/src/components/pages/RetailerProductEdition/context/provider-product-edition.context.jsx +4 -4
  29. package/src/components/pages/RetailerProductEdition/context/reducers/inputs.js +13 -1
  30. package/src/components/pages/RetailerProductEdition/index.js +74 -23
@@ -234,7 +234,7 @@ function _regenerateVideoThumbnails() {
234
234
  }
235
235
 
236
236
  var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
237
- var _state$product10, _family$variants, _state$product11, _state$errors, _family$variants2, _state$product14, _state$product15, _state$product16, _state$active_retaile5, _location$state, _location$state2, _state$active_retaile6, _state$active_retaile7, _state$images_values$2, _state$images_values10, _state$images_values11, _state$product17, _state$active_retaile8, _family$variants3, _family$variants4, _state$active_percent, _state$active_percent2, _state$active_percent3, _state$active_retaile9, _state$active_retaile10, _state$active_retaile11, _state$product18, _state$product19, _state$product20, _state$datasheets_inp, _state$datasheets_inp2, _state$product21, _state$images_values12, _state$comment;
237
+ var _state$product10, _family$variants, _state$product11, _state$errors, _family$variants2, _state$product14, _state$product15, _state$product16, _state$active_retaile5, _location$state, _location$state2, _state$active_retaile6, _state$active_retaile7, _state$images_values$2, _state$images_values10, _state$images_values11, _state$product17, _state$active_retaile8, _family$variants3, _family$variants4, _state$active_percent, _state$active_percent2, _state$active_percent3, _state$active_retaile9, _state$active_retaile10, _state$active_retaile11, _state$product18, _state$services2, _state$services2$data, _state$product19, _state$product20, _state$datasheets_inp, _state$datasheets_inp2, _state$product21, _state$images_values12, _state$comment;
238
238
 
239
239
  var tabsSections = _ref.tabsSections,
240
240
  _ref$productSelected = _ref.productSelected,
@@ -310,7 +310,7 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
310
310
  var _useState19 = (0, _react.useState)(false),
311
311
  _useState20 = (0, _slicedToArray2.default)(_useState19, 2),
312
312
  rejectAll = _useState20[0],
313
- setRejectAll = _useState20[1]; // Variantes: mismo comportamiento que la ficha de la aplicación de clientes.
313
+ setRejectAll = _useState20[1]; // Padre/hijo: mismo comportamiento que la ficha de la aplicación de clientes.
314
314
 
315
315
 
316
316
  var _useState21 = (0, _react.useState)(false),
@@ -1128,7 +1128,7 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
1128
1128
  }
1129
1129
  };
1130
1130
  /*
1131
- Trae la familia: las variantes del producto, o sus hermanas si el abierto es
1131
+ Trae la familia: los hijos del producto, o sus hermanos si el abierto es
1132
1132
  una de ellas. Se pide al abrir la sección y no al montar la pantalla: la
1133
1133
  mayoría de los productos no son familia.
1134
1134
  */
@@ -1215,26 +1215,27 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
1215
1215
  loadFamily(true); // eslint-disable-next-line react-hooks/exhaustive-deps
1216
1216
  }, [(_state$product10 = state.product) === null || _state$product10 === void 0 ? void 0 : _state$product10.id_article]); // El conteo sale de la familia recién consultada, no del producto.
1217
1217
 
1218
- var variantesDelProducto = family !== null && family !== void 0 && family.error ? 0 : ((_family$variants = family === null || family === void 0 ? void 0 : family.variants) !== null && _family$variants !== void 0 ? _family$variants : []).filter(function (v) {
1218
+ var hijosDelProducto = family !== null && family !== void 0 && family.error ? 0 : ((_family$variants = family === null || family === void 0 ? void 0 : family.variants) !== null && _family$variants !== void 0 ? _family$variants : []).filter(function (v) {
1219
1219
  return !v.isCurrent;
1220
1220
  }).length;
1221
- var esVarianteDeOtro = family !== null && family !== void 0 && family.error ? !!((_state$product11 = state.product) !== null && _state$product11 !== void 0 && _state$product11.parentArticleId) : !!(family !== null && family !== void 0 && family.parent);
1221
+ var esHijoDeOtro = family !== null && family !== void 0 && family.error ? !!((_state$product11 = state.product) !== null && _state$product11 !== void 0 && _state$product11.parentArticleId) : !!(family !== null && family !== void 0 && family.parent);
1222
1222
  /*
1223
- En Creators la lista de familia es INFORMATIVA: no se salta a otra variante.
1223
+ En Creators la lista de familia es INFORMATIVA: no se salta a otro producto.
1224
1224
  Saltar exige precargar el producto destino, y el endpoint que hace eso en la
1225
1225
  aplicación de clientes —read-articles-v2— filtra por la compañía del usuario:
1226
1226
  `AND a.company_id = <la del usuario>`. El equipo interno pertenece a ContentOh
1227
1227
  y trabaja productos de sus clientes, así que ahí no devuelve nada.
1228
1228
  Navegar sin precargar sería peor que no ofrecerlo: esta pantalla lee el
1229
1229
  producto de sessionStorage, así que cambiaría la URL y seguiría mostrando el
1230
- producto anterior, dando a entender que se cambió de variante cuando no.
1230
+ producto anterior, dando a entender que se cambió de producto cuando no.
1231
1231
  Para habilitarlo hace falta una forma de traer un producto por id sin filtro
1232
1232
  de compañía, respetando el alcance del perfil interno (§5.1 del contrato).
1233
1233
  */
1234
1234
 
1235
1235
  /*
1236
- Refresca tras ligar, sin recargar: el producto sale de sessionStorage, así que
1237
- un refresh devolvería el mismo objeto y el contador seguiría igual.
1236
+ Refresca tras ligar, sin recargar la página: el producto sale de
1237
+ sessionStorage, así que un F5 devolvería el mismo objeto y el contador
1238
+ seguiría igual.
1238
1239
  */
1239
1240
 
1240
1241
  var handleOnLinkedVariants = function handleOnLinkedVariants(result) {
@@ -1251,51 +1252,107 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
1251
1252
  type: "SET_PRODUCT",
1252
1253
  payload: updatedProduct
1253
1254
  });
1254
- setFamily(null);
1255
1255
 
1256
1256
  try {
1257
1257
  sessionStorage.setItem("productSelected", JSON.stringify(updatedProduct));
1258
1258
  } catch (error) {
1259
1259
  console.error("linkVariants/sessionStorage: ", error);
1260
1260
  }
1261
+ /*
1262
+ Volver a preguntar, no vaciar.
1263
+ Antes esto hacía `setFamily(null)` para invalidar la caché, y en esta
1264
+ pantalla eso tenía el efecto contrario al buscado: el bloque de parentesco
1265
+ se decide con `esHijoDeOtro`, que sale de `family`, no del producto. Con
1266
+ `family` en null el bloque desaparecía, así que después de ligar la
1267
+ pantalla se quedaba SIN ninguna señal de que el producto ya tenía padre
1268
+ —justo lo que el usuario acababa de hacer—.
1269
+ */
1270
+
1271
+
1272
+ loadFamily(true);
1273
+ /*
1274
+ Y se recargan los servicios, porque ligar cambia la herencia de cada campo
1275
+ en el servidor: al planchar, lo que era propio pasa a heredado y los chips
1276
+ tienen que decirlo. Sin esto la ficha sigue mostrando el estado anterior
1277
+ hasta que alguien cierra y vuelve a abrir el producto.
1278
+ Sin `enableLoading` para no parpadear el esqueleto encima de una pantalla
1279
+ que ya está pintada.
1280
+ */
1281
+
1282
+ loadData(false);
1261
1283
  };
1262
1284
  /*
1263
1285
  Acción "Volver a heredar" de los chips. Repinta en sitio con lo que devuelve
1264
1286
  el endpoint: recargar la ficha se llevaría lo que haya sin guardar.
1265
1287
  */
1266
1288
 
1289
+ /*
1290
+ `kind` distingue de qué pestaña salió el chip. Las descripciones viven en
1291
+ `rel_article_description` y la ficha técnica en `article_data`: el endpoint
1292
+ recibe una lista o la otra.
1293
+ */
1294
+
1267
1295
 
1268
1296
  var handleOnRestoreInheritance = /*#__PURE__*/function () {
1269
1297
  var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(attributeId) {
1270
1298
  var _state$product13;
1271
1299
 
1272
- var res, data;
1300
+ var kind,
1301
+ esDescripcion,
1302
+ res,
1303
+ data,
1304
+ _args6 = arguments;
1273
1305
  return _regenerator.default.wrap(function _callee6$(_context6) {
1274
1306
  while (1) {
1275
1307
  switch (_context6.prev = _context6.next) {
1276
1308
  case 0:
1309
+ kind = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : "attribute";
1310
+
1277
1311
  if (!(!attributeId || !((_state$product13 = state.product) !== null && _state$product13 !== void 0 && _state$product13.id_article))) {
1278
- _context6.next = 2;
1312
+ _context6.next = 3;
1279
1313
  break;
1280
1314
  }
1281
1315
 
1282
1316
  return _context6.abrupt("return");
1283
1317
 
1284
- case 2:
1285
- _context6.prev = 2;
1286
- _context6.next = 5;
1287
- return _axios.default.post("".concat(process.env.REACT_APP_VARIANTS_ENDPOINT, "/restore"), {
1288
- articleId: state.product.id_article,
1318
+ case 3:
1319
+ esDescripcion = kind === "description";
1320
+ _context6.prev = 4;
1321
+ _context6.next = 7;
1322
+ return _axios.default.post("".concat(process.env.REACT_APP_VARIANTS_ENDPOINT, "/restore"), (0, _objectSpread5.default)({
1323
+ articleId: state.product.id_article
1324
+ }, esDescripcion ? {
1325
+ descriptions: [Number(attributeId)]
1326
+ } : {
1289
1327
  attributes: [Number(attributeId)]
1290
- }, {
1328
+ }), {
1291
1329
  headers: {
1292
1330
  Authorization: token
1293
1331
  }
1294
1332
  });
1295
1333
 
1296
- case 5:
1334
+ case 7:
1297
1335
  res = _context6.sent;
1298
1336
  data = (0, _api.readPayload)(res);
1337
+
1338
+ if (!esDescripcion) {
1339
+ _context6.next = 12;
1340
+ break;
1341
+ }
1342
+
1343
+ dispatch({
1344
+ type: "UPDATE_DESCRIPTIONS_INPUTS",
1345
+ payload: (data.descriptionValues || []).map(function (item) {
1346
+ return {
1347
+ attributeId: item.id_description,
1348
+ value: item.value,
1349
+ isOverridden: 0
1350
+ };
1351
+ })
1352
+ });
1353
+ return _context6.abrupt("return");
1354
+
1355
+ case 12:
1299
1356
  dispatch({
1300
1357
  type: "UPDATE_DATASHEETS_INPUTS",
1301
1358
  payload: (data.values || []).map(function (item) {
@@ -1306,20 +1363,20 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
1306
1363
  };
1307
1364
  })
1308
1365
  });
1309
- _context6.next = 13;
1366
+ _context6.next = 18;
1310
1367
  break;
1311
1368
 
1312
- case 10:
1313
- _context6.prev = 10;
1314
- _context6.t0 = _context6["catch"](2);
1369
+ case 15:
1370
+ _context6.prev = 15;
1371
+ _context6.t0 = _context6["catch"](4);
1315
1372
  console.error("restoreInheritance: ", _context6.t0);
1316
1373
 
1317
- case 13:
1374
+ case 18:
1318
1375
  case "end":
1319
1376
  return _context6.stop();
1320
1377
  }
1321
1378
  }
1322
- }, _callee6, null, [[2, 10]]);
1379
+ }, _callee6, null, [[4, 15]]);
1323
1380
  }));
1324
1381
 
1325
1382
  return function handleOnRestoreInheritance(_x3) {
@@ -1376,10 +1433,10 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
1376
1433
  return _context7.abrupt("break", 21);
1377
1434
 
1378
1435
  case 8:
1379
- // Guardar un padre con variantes abre la decisión de propagar. Sin este
1380
- // paso el cambio se queda solo en el padre y las variantes se van
1436
+ // Guardar un padre con hijos abre la decisión de propagar. Sin este
1437
+ // paso el cambio se queda solo en el padre y los hijos se van
1381
1438
  // separando de él sin que nadie lo note.
1382
- esPadre = variantesDelProducto > 0;
1439
+ esPadre = hijosDelProducto > 0;
1383
1440
  cambios = cambiosDeFichaTecnica();
1384
1441
 
1385
1442
  if (!(esPadre && cambios.length > 0)) {
@@ -2537,7 +2594,7 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
2537
2594
  })]
2538
2595
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2539
2596
  className: "product-information",
2540
- children: [!esVarianteDeOtro && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2597
+ children: [!esHijoDeOtro && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2541
2598
  className: "variants-actions",
2542
2599
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
2543
2600
  type: "button",
@@ -2546,7 +2603,7 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
2546
2603
  return setShowLinkVariants(true);
2547
2604
  },
2548
2605
  children: "Ligar productos"
2549
- }), variantesDelProducto > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
2606
+ }), hijosDelProducto > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
2550
2607
  type: "button",
2551
2608
  className: "variants-count",
2552
2609
  "aria-expanded": showFamily,
@@ -2556,12 +2613,12 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
2556
2613
  });
2557
2614
  loadFamily();
2558
2615
  },
2559
- children: [variantesDelProducto, " variante", variantesDelProducto === 1 ? "" : "s", /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
2616
+ children: [hijosDelProducto, " hijo", hijosDelProducto === 1 ? "" : "s", /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
2560
2617
  "aria-hidden": "true",
2561
2618
  children: showFamily ? " ▴" : " ▾"
2562
2619
  })]
2563
2620
  })]
2564
- }), esVarianteDeOtro && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
2621
+ }), esHijoDeOtro && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
2565
2622
  className: "variants-actions",
2566
2623
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
2567
2624
  type: "button",
@@ -2573,7 +2630,7 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
2573
2630
  });
2574
2631
  loadFamily();
2575
2632
  },
2576
- children: ["Variante de otro producto", /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
2633
+ children: ["Hijo de otro producto", /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
2577
2634
  "aria-hidden": "true",
2578
2635
  children: showFamily ? " ▴" : " ▾"
2579
2636
  })]
@@ -2603,7 +2660,7 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
2603
2660
  className: "family-row".concat(variant.isCurrent ? " current" : ""),
2604
2661
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
2605
2662
  className: "role",
2606
- children: variant.isCurrent ? "Estás aquí" : "Variante"
2663
+ children: variant.isCurrent ? "Estás aquí" : "Hijo"
2607
2664
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
2608
2665
  className: "name",
2609
2666
  children: variant.name
@@ -2614,7 +2671,7 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
2614
2671
  }, variant.articleId);
2615
2672
  }), family && !family.error && !((_family$variants4 = family.variants) !== null && _family$variants4 !== void 0 && _family$variants4.length) && /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
2616
2673
  className: "loading",
2617
- children: "Este producto no tiene variantes."
2674
+ children: "Este producto no tiene hijos."
2618
2675
  })]
2619
2676
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FullProductNameHeader.FullProductNameHeader // states
2620
2677
  , {
@@ -2677,7 +2734,12 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
2677
2734
  children: [state.active_tab === "Descripción" && (((_state$product18 = state.product) === null || _state$product18 === void 0 ? void 0 : _state$product18.description_status) !== "NS" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputGroup.InputGroup, {
2678
2735
  activeSection: state.active_tab,
2679
2736
  inputGroup: state.descriptions_inputs[0],
2680
- updatedDescriptions: state.updated_descriptions_inputs,
2737
+ updatedDescriptions: state.updated_descriptions_inputs
2738
+ /* El parentesco es del producto, no del servicio: los
2739
+ dos endpoints lo devuelven igual. */
2740
+ ,
2741
+ variant: (_state$services2 = state.services) === null || _state$services2 === void 0 ? void 0 : (_state$services2$data = _state$services2.datasheets) === null || _state$services2$data === void 0 ? void 0 : _state$services2$data.variant,
2742
+ onRestoreInheritance: handleOnRestoreInheritance,
2681
2743
  articleId: (_state$product19 = state.product) === null || _state$product19 === void 0 ? void 0 : _state$product19.id_article,
2682
2744
  version: state.product.version,
2683
2745
  auditInputGroup: auditDescriptions[0],
@@ -2689,7 +2751,7 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
2689
2751
  headerType: "input-name-header"
2690
2752
  })), state.active_tab === "Ficha técnica" && (((_state$product20 = state.product) === null || _state$product20 === void 0 ? void 0 : _state$product20.datasheet_status) !== "NS" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
2691
2753
  children: (_state$datasheets_inp = state.datasheets_inputs[0]) === null || _state$datasheets_inp === void 0 ? void 0 : (_state$datasheets_inp2 = _state$datasheets_inp.data) === null || _state$datasheets_inp2 === void 0 ? void 0 : _state$datasheets_inp2.map(function (dataGroup, index) {
2692
- var _state$services2, _state$services2$data;
2754
+ var _state$services3, _state$services3$data;
2693
2755
 
2694
2756
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputGroup.InputGroup, {
2695
2757
  articleId: state.product.id_article,
@@ -2697,7 +2759,7 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
2697
2759
  activeSection: state.active_tab,
2698
2760
  inputGroup: dataGroup,
2699
2761
  dataInputs: state.datasheets_inputs[1],
2700
- variant: (_state$services2 = state.services) === null || _state$services2 === void 0 ? void 0 : (_state$services2$data = _state$services2.datasheets) === null || _state$services2$data === void 0 ? void 0 : _state$services2$data.variant,
2762
+ variant: (_state$services3 = state.services) === null || _state$services3 === void 0 ? void 0 : (_state$services3$data = _state$services3.datasheets) === null || _state$services3$data === void 0 ? void 0 : _state$services3$data.variant,
2701
2763
  onRestoreInheritance: handleOnRestoreInheritance,
2702
2764
  auditInputs: auditDatasheets[1],
2703
2765
  updatedDatasheets: state.updated_datasheets_inputs,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.6.32",
3
+ "version": "21.6.34",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -31,9 +31,9 @@ PropioSinAccion.args = {
31
31
  isOverridden: true,
32
32
  };
33
33
 
34
- // En un producto que no es variante no se pinta nada.
35
- export const NoEsVariante = Template.bind({});
36
- NoEsVariante.args = {
34
+ // En un producto que no es hijo de nadie no se pinta nada.
35
+ export const NoEsHijo = Template.bind({});
36
+ NoEsHijo.args = {
37
37
  isVariant: false,
38
38
  isOverridden: true,
39
39
  };
@@ -1,9 +1,9 @@
1
1
  import { Container } from "./styles";
2
2
 
3
3
  /**
4
- * Marca si el valor de un atributo viene del producto padre o es propio de la
5
- * variante. Solo tiene sentido dentro de una variante: en un producto sin padre
6
- * no se pinta nada, porque no hay de quién heredar.
4
+ * Marca si el valor de un atributo viene del producto padre o es propio del
5
+ * hijo. Solo tiene sentido dentro de un producto hijo: en uno sin padre no se
6
+ * pinta nada, porque no hay de quién heredar.
7
7
  *
8
8
  * El estado "propio" es el que carga información —ese campo se separó del padre—
9
9
  * así que es el que lleva acento y el que ofrece la acción de volver a heredar.
@@ -11,8 +11,8 @@ import { Container } from "./styles";
11
11
  * la ficha entera se volvería ruido.
12
12
  *
13
13
  * Un campo VACÍO no lleva marca: no heredó nada y tampoco tiene valor propio, así
14
- * que llamarlo "Heredado" es falso además de ruidoso. Sin esto la ficha de una
15
- * variante sale con el chip repetido en cada campo, incluidos los obligatorios en
14
+ * que llamarlo "Heredado" es falso además de ruidoso. Sin esto la ficha de un
15
+ * hijo sale con el chip repetido en cada campo, incluidos los obligatorios en
16
16
  * rojo que están sin capturar, y la marca deja de distinguir nada.
17
17
  *
18
18
  * Tampoco la lleva un atributo NO heredable. El UPC y el SKU son la identidad del
@@ -41,7 +41,7 @@ export const InheritanceTag = ({
41
41
  className="tag-label"
42
42
  title={
43
43
  isOverridden
44
- ? "Valor propio de esta variante. La propagación del producto padre no lo modifica."
44
+ ? "Valor propio de este producto hijo. La propagación del padre no lo modifica."
45
45
  : `Valor heredado${parentUpc ? ` del producto ${parentUpc}` : " del producto padre"}.`
46
46
  }
47
47
  >
@@ -296,6 +296,18 @@ export const InputGroup = ({
296
296
  dinamicHeight={dinamicHeight}
297
297
  description={input?.description}
298
298
  showTooltip={true}
299
+ isVariant={variant?.isVariant}
300
+ isOverridden={input?.isOverridden}
301
+ inheritable={input?.inheritable}
302
+ parentUpc={variant?.parent?.upc}
303
+ /* Las descripciones viven en otra tabla que la ficha
304
+ técnica, así que restore necesita saber cuál de las dos
305
+ listas está recibiendo. */
306
+ onRestoreInheritance={
307
+ onRestoreInheritance
308
+ ? (id) => onRestoreInheritance(id, "description")
309
+ : undefined
310
+ }
299
311
  auditClass={
300
312
  compare &&
301
313
  !isEquals(