contentoh-components-library 21.6.16 → 21.6.18

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 (42) hide show
  1. package/dist/ai/prompts/attribute.prompt.js +28 -0
  2. package/dist/ai/prompts/description.prompt.js +33 -0
  3. package/dist/ai/schemas/attribute.schema.js +35 -0
  4. package/dist/ai/schemas/description.schema.js +27 -0
  5. package/dist/components/atoms/InheritanceTag/InheritanceTag.stories.js +56 -0
  6. package/dist/components/atoms/InheritanceTag/index.js +50 -0
  7. package/dist/components/atoms/InheritanceTag/styles.js +22 -0
  8. package/dist/components/atoms/VerticalSideMenuMainPage/styles.js +7 -2
  9. package/dist/components/molecules/TagAndInputv2/index.js +17 -4
  10. package/dist/components/molecules/TagAndInputv2/styles.js +1 -1
  11. package/dist/components/organisms/InputGroupv2/index.js +24 -14
  12. package/dist/index.js +101 -88
  13. package/graphify-out/.graphify_labels.json +1 -0
  14. package/graphify-out/.graphify_python +1 -0
  15. package/graphify-out/.graphify_root +1 -0
  16. package/graphify-out/GRAPH_REPORT.md +903 -0
  17. package/graphify-out/cache/ast/v0.9.46/6d0cee1e8f404fcc1d96c99855263e354d8412e554fdfe066c16575ec14c738f.json +1 -0
  18. package/graphify-out/cache/semantic/pd5fd89c46bb5/13484ffc6f74ff83ebae4566989b1aa8b6510eccae667dc609aaa70089150a26.json +1 -0
  19. package/graphify-out/cache/semantic/pd5fd89c46bb5/14ff90e5ddd895e6e54771ab539f7211ddd194b1499e5fe561fc51f77fe2b245.json +1 -0
  20. package/graphify-out/cache/semantic/pd5fd89c46bb5/428a7d1a9c22e5e911aafd0c6e13f7be64d761e9e3c0cff4ce5b23d88c00175a.json +1 -0
  21. package/graphify-out/cache/semantic/pd5fd89c46bb5/42e7b55e8925a210f897ae43760580b21f7d77566759838870de2279d6c4e1e9.json +1 -0
  22. package/graphify-out/cache/semantic/pd5fd89c46bb5/6928143519ca2ba337c975a219ddb1fc7a11405b889c77924aade75265f71833.json +1 -0
  23. package/graphify-out/cache/semantic/pd5fd89c46bb5/71f0dbaca065136605e31256f61cbfac8f7a3cbbede3834e3b1baafa51c2b7a6.json +1 -0
  24. package/graphify-out/cache/semantic/pd5fd89c46bb5/7e0446f72cc4cb86a5c416da0d60fd5ddd488b17bd8268ea8df34d0c8e8dfa2b.json +1 -0
  25. package/graphify-out/cache/semantic/pd5fd89c46bb5/7ee4b774404d8878da36220627b110f9dc0b971f0597c3f9585bd09cdd214105.json +1 -0
  26. package/graphify-out/cache/semantic/pd5fd89c46bb5/8f4ad140fe6b97f55673f69d813be7c647eb8248e5058396fe0df5fa693d7313.json +1 -0
  27. package/graphify-out/cache/semantic/pd5fd89c46bb5/a192eee79fd368f9a14857aad515e2c01a8a63a69c195272dd7a74e827576572.json +1 -0
  28. package/graphify-out/cache/semantic/pd5fd89c46bb5/c9972dc0b5136350cd35ffbc18454c41b76319c9aed8cc02874623e75f7e0283.json +1 -0
  29. package/graphify-out/cache/stat-index.json +1 -0
  30. package/graphify-out/cost.json +12 -0
  31. package/graphify-out/graph.html +345 -0
  32. package/graphify-out/graph.json +79294 -0
  33. package/graphify-out/manifest.json +4244 -0
  34. package/package.json +1 -1
  35. package/src/components/atoms/InheritanceTag/InheritanceTag.stories.js +39 -0
  36. package/src/components/atoms/InheritanceTag/index.js +45 -0
  37. package/src/components/atoms/InheritanceTag/styles.js +56 -0
  38. package/src/components/atoms/VerticalSideMenuMainPage/styles.js +10 -3
  39. package/src/components/molecules/TagAndInputv2/index.js +15 -0
  40. package/src/components/molecules/TagAndInputv2/styles.js +13 -0
  41. package/src/components/organisms/InputGroupv2/index.js +10 -0
  42. package/src/index.js +1 -0
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.generateAttributePrompt = void 0;
7
+
8
+ var generateAttributePrompt = function generateAttributePrompt(_ref) {
9
+ var _ref$upc = _ref.upc,
10
+ upc = _ref$upc === void 0 ? 0 : _ref$upc,
11
+ _ref$inputName = _ref.inputName,
12
+ inputName = _ref$inputName === void 0 ? "" : _ref$inputName,
13
+ _ref$description = _ref.description,
14
+ description = _ref$description === void 0 ? "" : _ref$description,
15
+ _ref$currentValue = _ref.currentValue,
16
+ currentValue = _ref$currentValue === void 0 ? "" : _ref$currentValue,
17
+ _ref$name = _ref.name,
18
+ name = _ref$name === void 0 ? "" : _ref$name,
19
+ _ref$category = _ref.category,
20
+ category = _ref$category === void 0 ? "" : _ref$category,
21
+ _ref$retailer = _ref.retailer,
22
+ retailer = _ref$retailer === void 0 ? "" : _ref$retailer,
23
+ _ref$maxChar = _ref.maxChar,
24
+ maxChar = _ref$maxChar === void 0 ? 100 : _ref$maxChar;
25
+ return "\n Eres un especialista en la generaci\xF3n, optimizaci\xF3n, mejora y captura de atributos de la ficha t\xE9cnica de productos para cat\xE1logos en l\xEDnea.\n Tu tarea es crear atributos claros, concisos y relevantes que resalten las caracter\xEDsticas y beneficios del producto, utilizando un lenguaje preciso y adaptado al p\xFAblico objetivo.\n\n Datos del producto:\n - UPC: ".concat(upc, "\n - Nombre del producto: ").concat(name, "\n - Categor\xEDa: ").concat(category, "\n - Nombre del atributo: ").concat(inputName, "\n - Requerimiento del atributo: ").concat(description, "\n - Valor actual del atributo: ").concat(currentValue, "\n - Cadena comercial dirigida: ").concat(retailer, "\n\n Instrucciones:\n 1. Analiza el nombre del producto y la categor\xEDa para entender su contexto.\n 2. Analiza la descripci\xF3n del atributo actual del producto.\n 3. Identifica la informaci\xF3n clave del atributo que sean relevantes y \xFAtiles para los clientes potenciales.\n 4. Genera una lista de atributos que:\n - Cumplan con la descripcion del atributo proporcionada, no inventes datos o cambies el contexto de lo que pide la descripci\xF3n del atributo.\n - Sean claros y f\xE1ciles de entender.\n - Destaquen las caracter\xEDsticas y beneficios clave del producto.\n - Utilicen un lenguaje preciso y adaptado al p\xFAblico objetivo.\n - Mantengan un tono profesional y coherente con la marca.\n - Aumenten la probabilidad de compra del producto.\n - No excedan los ").concat(maxChar, " caracteres en total.\n - Si existe ejemplo en la descripci\xF3n del atributo, sigue el mismo formato para generar los atributos.\n 5. No incluyas emojis ni signos especiales (*/+\xB4!\xA1?\xBF)\n 6. No repitas el encabezado: ").concat(inputName, "\n 7. No incluyas call to action, ejemplo: \"!Compra ya!\" \"!Da click!\" \"!Apurate!\"\n\n Aseg\xFArate de que los atributos generados cumplan con todas las instrucciones proporcionadas.\n\n No lo olvides, el objetivo principal es mejorar la captura de atributos para la ficha t\xE9cnica del producto para atraer, convencer y dar la informaci\xF3n completa a los clientes potenciales que puedan realizar una compra.\n ");
26
+ };
27
+
28
+ exports.generateAttributePrompt = generateAttributePrompt;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.generateDescriptionPrompt = void 0;
7
+
8
+ // Cadena y Proveedor
9
+
10
+ /**
11
+ * La cadena ${cadena} tiene estas reglas ${reglas} para el tipo de descripcion que es: ${descripcion}
12
+ */
13
+ var generateDescriptionPrompt = function generateDescriptionPrompt(_ref) {
14
+ var _ref$upc = _ref.upc,
15
+ upc = _ref$upc === void 0 ? 0 : _ref$upc,
16
+ _ref$inputName = _ref.inputName,
17
+ inputName = _ref$inputName === void 0 ? "" : _ref$inputName,
18
+ _ref$description = _ref.description,
19
+ description = _ref$description === void 0 ? "" : _ref$description,
20
+ _ref$currentValue = _ref.currentValue,
21
+ currentValue = _ref$currentValue === void 0 ? "" : _ref$currentValue,
22
+ _ref$name = _ref.name,
23
+ name = _ref$name === void 0 ? "" : _ref$name,
24
+ _ref$category = _ref.category,
25
+ category = _ref$category === void 0 ? "" : _ref$category,
26
+ _ref$retailer = _ref.retailer,
27
+ retailer = _ref$retailer === void 0 ? "" : _ref$retailer,
28
+ _ref$maxChar = _ref.maxChar,
29
+ maxChar = _ref$maxChar === void 0 ? 100 : _ref$maxChar;
30
+ return "\n Eres un especialista en la generaci\xF3n, optimizaci\xF3n y mejora de descripciones de productos para cat\xE1logos en l\xEDnea.\n Tu tarea es crear descripciones claras, concisas y atractivas que resalten las caracter\xEDsticas y beneficios del producto, utilizando un lenguaje persuasivo y adaptado al p\xFAblico objetivo.\n\n Datos del producto:\n - UPC: ".concat(upc, "\n - Nombre del producto: ").concat(name, "\n - Categor\xEDa: ").concat(category, "\n - Encabezado de la descripci\xF3n: ").concat(inputName, "\n - Requerimiento de la descripcion: ").concat(description, "\n - Descripcion actual del producto: ").concat(currentValue, "\n - Cadena comercial dirigida: ").concat(retailer, "\n\n Instrucciones:\n 1. Analiza la descripci\xF3n actual del producto en caso de tenerla.\n 2. Identifica \xE1reas de mejora, como claridad, concisi\xF3n, atractivo y relevancia.\n 3. Genera una descripci\xF3n que:\n - Sea clara y f\xE1cil de entender.\n - Destaque las caracter\xEDsticas y beneficios clave del producto.\n - Utilice un lenguaje persuasivo y adaptado al p\xFAblico objetivo.\n - Mantenga un tono profesional y coherente con la marca.\n - No exceda los ").concat(maxChar, " caracteres.\n - Aumente la probabilidad de compra del producto, utilizando persuasi\xF3n en la necesidad de compra del producto.\n 4. No incluyas emojis ni signos especiales (*/+\xB4!\xA1?\xBF)\n 5. No repitas el encabezado: ").concat(inputName, "\n 6. No incluyas call to action, ejemplo: \"!Compra ya!\" \"!Da click!\" \"!Apurate!\"\n\n\n Aseg\xFArate de que la descripci\xF3n generada cumpla con todas las instrucciones proporcionadas.\n\n No lo olvides, el objetivo principal es mejorar la descripci\xF3n del producto para atraer y convencer a los clientes potenciales de realizar una compra. Eres un experto en marketing y redacci\xF3n persuasiva.\n\n Nota: No estas hablando con los clientes, estas descripciones ir\xE1n en la tienda de E-commerce de la cadena comercial. No realices saludos, despedidas, sugerencias\n ");
31
+ };
32
+
33
+ exports.generateDescriptionPrompt = generateDescriptionPrompt;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var schema = {
8
+ type: "object",
9
+ properties: {
10
+ results: {
11
+ type: "array",
12
+ items: {
13
+ type: "object",
14
+ properties: {
15
+ label: {
16
+ type: "string"
17
+ },
18
+ value: {
19
+ type: "string"
20
+ }
21
+ }
22
+ },
23
+ maxItems: 3
24
+ },
25
+ compliance_warnings: {
26
+ type: "array",
27
+ items: {
28
+ type: "string"
29
+ }
30
+ }
31
+ },
32
+ required: ["results"]
33
+ };
34
+ var _default = schema;
35
+ exports.default = _default;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var schema = {
8
+ type: "object",
9
+ properties: {
10
+ results: {
11
+ type: "array",
12
+ items: {
13
+ type: "object",
14
+ properties: {
15
+ value: {
16
+ type: "string"
17
+ }
18
+ }
19
+ },
20
+ minItems: 1,
21
+ maxItems: 3
22
+ }
23
+ },
24
+ required: ["results"]
25
+ };
26
+ var _default = schema;
27
+ exports.default = _default;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = exports.PropioSinAccion = exports.Propio = exports.NoEsVariante = exports.Heredado = void 0;
9
+
10
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
11
+
12
+ var _index = require("./index");
13
+
14
+ var _jsxRuntime = require("react/jsx-runtime");
15
+
16
+ var _default = {
17
+ title: "Components/atoms/InheritanceTag",
18
+ label: "Inheritance Tag",
19
+ component: _index.InheritanceTag
20
+ };
21
+ exports.default = _default;
22
+
23
+ var Template = function Template(args) {
24
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.InheritanceTag, (0, _objectSpread2.default)({}, args));
25
+ };
26
+
27
+ var Heredado = Template.bind({});
28
+ exports.Heredado = Heredado;
29
+ Heredado.args = {
30
+ isVariant: true,
31
+ isOverridden: false,
32
+ parentUpc: "7501234567890"
33
+ };
34
+ var Propio = Template.bind({});
35
+ exports.Propio = Propio;
36
+ Propio.args = {
37
+ isVariant: true,
38
+ isOverridden: true,
39
+ parentUpc: "7501234567890",
40
+ onRestore: function onRestore() {}
41
+ }; // Un valor propio sin onRestore no ofrece la acción: se marca, pero no se puede
42
+ // revertir desde ahí. Es el caso de las vistas de solo lectura.
43
+
44
+ var PropioSinAccion = Template.bind({});
45
+ exports.PropioSinAccion = PropioSinAccion;
46
+ PropioSinAccion.args = {
47
+ isVariant: true,
48
+ isOverridden: true
49
+ }; // En un producto que no es variante no se pinta nada.
50
+
51
+ var NoEsVariante = Template.bind({});
52
+ exports.NoEsVariante = NoEsVariante;
53
+ NoEsVariante.args = {
54
+ isVariant: false,
55
+ isOverridden: true
56
+ };
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.InheritanceTag = void 0;
7
+
8
+ var _styles = require("./styles");
9
+
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+
12
+ /**
13
+ * Marca si el valor de un atributo viene del producto padre o es propio de la
14
+ * variante. Solo tiene sentido dentro de una variante: en un producto sin padre
15
+ * no se pinta nada, porque no hay de quién heredar.
16
+ *
17
+ * El estado "propio" es el que carga información —ese campo se separó del padre—
18
+ * así que es el que lleva acento y el que ofrece la acción de volver a heredar.
19
+ * "Heredado" es el caso normal y se mantiene discreto: si gritara en cada campo,
20
+ * la ficha entera se volvería ruido.
21
+ */
22
+ var InheritanceTag = function InheritanceTag(_ref) {
23
+ var _ref$isVariant = _ref.isVariant,
24
+ isVariant = _ref$isVariant === void 0 ? false : _ref$isVariant,
25
+ _ref$isOverridden = _ref.isOverridden,
26
+ isOverridden = _ref$isOverridden === void 0 ? false : _ref$isOverridden,
27
+ parentUpc = _ref.parentUpc,
28
+ onRestore = _ref.onRestore,
29
+ _ref$restoreLabel = _ref.restoreLabel,
30
+ restoreLabel = _ref$restoreLabel === void 0 ? "Volver a heredar" : _ref$restoreLabel,
31
+ _ref$className = _ref.className,
32
+ className = _ref$className === void 0 ? "" : _ref$className;
33
+ if (!isVariant) return null;
34
+ var state = isOverridden ? "own" : "inherited";
35
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
36
+ className: "inheritance-tag ".concat(state, " ").concat(className),
37
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
38
+ className: "tag-label",
39
+ title: isOverridden ? "Valor propio de esta variante. La propagación del producto padre no lo modifica." : "Valor heredado".concat(parentUpc ? " del producto ".concat(parentUpc) : " del producto padre", "."),
40
+ children: isOverridden ? "Propio" : "Heredado"
41
+ }), isOverridden && onRestore && /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
42
+ type: "button",
43
+ className: "tag-action",
44
+ onClick: onRestore,
45
+ children: restoreLabel
46
+ })]
47
+ });
48
+ };
49
+
50
+ exports.InheritanceTag = InheritanceTag;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.Container = void 0;
9
+
10
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
11
+
12
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
13
+
14
+ require("../../../global-files/global-styles.css");
15
+
16
+ var _variables = require("../../../global-files/variables");
17
+
18
+ var _templateObject;
19
+
20
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: inline-flex;\n align-items: center;\n gap: 6px;\n width: fit-content;\n height: 16px;\n\n .tag-label {\n border-radius: 3px;\n padding: 2px 5px;\n font-family: ", ";\n font-size: 10px;\n line-height: 12px;\n letter-spacing: -0.015em;\n white-space: nowrap;\n cursor: default;\n }\n\n /* Heredado: el caso normal. Discreto a prop\xF3sito. */\n &.inherited .tag-label {\n background-color: ", ";\n color: ", ";\n }\n\n /* Propio: la excepci\xF3n que informa. Lleva el acento de marca. */\n &.own .tag-label {\n background-color: rgba(", ", 0.12);\n color: ", ";\n }\n\n .tag-action {\n border: none;\n background: none;\n padding: 0;\n font-family: ", ";\n font-size: 10px;\n line-height: 12px;\n color: ", ";\n text-decoration: underline;\n cursor: pointer;\n\n &:hover {\n color: ", ";\n }\n\n &:focus-visible {\n outline: 1px solid ", ";\n outline-offset: 2px;\n border-radius: 2px;\n }\n }\n"])), _variables.FontFamily.Raleway_500, _variables.GlobalColors.s2, _variables.GlobalColors.gray, _variables.GlobalColors.rgb_color_pink, _variables.GlobalColors.original_magenta, _variables.FontFamily.Raleway_500, _variables.GlobalColors.s4, _variables.GlobalColors.original_magenta, _variables.GlobalColors.magenta_s2);
21
+
22
+ exports.Container = Container;
@@ -32,11 +32,16 @@ var logoToWhite = "grayscale(1) brightness(0) invert(1)";
32
32
  anterior, lo que ensancha el trazo de forma pareja sin desenfocarlo (blur 0).
33
33
  Va DESPUÉS de logoToWhite a propósito: antes del invert(1) estas sombras
34
34
  blancas se voltearían a negro.
35
+
36
+ El peso se dosifica con el alfa, no con el offset: a 0.15px el desplazamiento
37
+ ya es sub-pixel, así que reducirlo cae en el mismo píxel al rasterizar y no se
38
+ distingue. Medio blanco (0.5) deja el trazo a mitad de camino entre el
39
+ original y el engrosado opaco, conservando las cuatro cardinales.
35
40
  */
36
41
 
37
- var logoThicken = "\n drop-shadow(0.15px 0 0 #fff) drop-shadow(-0.15px 0 0 #fff)\n drop-shadow(0 0.15px 0 #fff) drop-shadow(0 -0.15px 0 #fff)\n";
42
+ var logoThicken = "\n drop-shadow(0.15px 0 0 rgba(255, 255, 255, 0.5))\n drop-shadow(-0.15px 0 0 rgba(255, 255, 255, 0.5))\n drop-shadow(0 0.15px 0 rgba(255, 255, 255, 0.5))\n drop-shadow(0 -0.15px 0 rgba(255, 255, 255, 0.5))\n";
38
43
 
39
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: 100%;\n box-sizing: border-box;\n padding: 23px 0 26px 0;\n flex-direction: column;\n justify-content: space-between;\n overflow: none;\n width: ", ";\n background: linear-gradient(180deg, #e33aa9 0%, #3b1366 100%);\n scrollbar-width: none;\n display: flex;\n text-align: center;\n transition: width 0.3s linear;\n margin: 0;\n & + * {\n margin-left: 30px;\n }\n .logo-footer {\n /*\n Ambos logotipos son anchos (6:1 el del pie, 7.6:1 el de arriba), as\xED que\n el ancho es lo que decide si se ven parejos: 26px de alto dan ~156px,\n cerca de los ~167px del logotipo superior a 22px.\n */\n height: 26px;\n align-self: center;\n flex-shrink: 0;\n opacity: 0.9;\n filter: ", ";\n /* Firma anclada al pie: el space-between la baja hasta el padding. */\n margin-top: auto;\n }\n .navbar-top {\n /*\n Caja de alto fijo: el isotipo animado \"respira\" (sus frames crecen de\n 156px a 192px de contenido) y sin este slot cada latido empujar\xEDa el men\xFA\n hacia abajo. Tambi\xE9n absorbe el cambio de alto entre logotipo e isotipo.\n */\n .logo-slot {\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .logo {\n width: auto;\n filter: ", ";\n }\n .logo-wordmark {\n height: 22px;\n filter: ", " ", ";\n }\n /*\n El GIF trae ~20% de lienzo transparente por eje (contenido \xFAtil de 240x192\n dentro de 300x320), as\xED que necesita m\xE1s alto declarado que el SVG que\n sustituye para leerse del mismo tama\xF1o: 40px de caja \u2248 24px de glifo.\n */\n .logo-isotype {\n height: 40px;\n }\n .option {\n .option-div {\n width: 100%;\n white-space: nowrap;\n }\n display: flex;\n flex-direction: column;\n align-items: center;\n margin-top: 50px;\n .active {\n text-decoration: none;\n background: rgba(255, 255, 255, 0.1);\n }\n .sub-option {\n display: flex;\n flex-direction: column;\n padding-left: 32px;\n height: auto;\n width: auto;\n &:last-child {\n margin-bottom: 10px;\n }\n }\n }\n }\n"])), function (_ref) {
44
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: 100%;\n box-sizing: border-box;\n padding: 23px 0 26px 0;\n flex-direction: column;\n justify-content: space-between;\n overflow: none;\n width: ", ";\n background: linear-gradient(180deg, #e33aa9 0%, #3b1366 100%);\n scrollbar-width: none;\n display: flex;\n text-align: center;\n transition: width 0.3s linear;\n margin: 0;\n & + * {\n margin-left: 30px;\n }\n .logo-footer {\n /*\n Ambos logotipos son anchos (6:1 el del pie, 7.6:1 el de arriba), as\xED que\n el ancho es lo que decide si se ven parejos: 26px de alto dan ~156px,\n cerca de los ~167px del logotipo superior a 22px.\n */\n height: 29px;\n align-self: center;\n flex-shrink: 0;\n opacity: 0.9;\n filter: ", ";\n /* Firma anclada al pie: el space-between la baja hasta el padding. */\n margin-top: auto;\n }\n .navbar-top {\n /*\n Caja de alto fijo: el isotipo animado \"respira\" (sus frames crecen de\n 156px a 192px de contenido) y sin este slot cada latido empujar\xEDa el men\xFA\n hacia abajo. Tambi\xE9n absorbe el cambio de alto entre logotipo e isotipo.\n */\n .logo-slot {\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .logo {\n width: auto;\n filter: ", ";\n }\n .logo-wordmark {\n height: 22px;\n filter: ", " ", ";\n }\n /*\n El GIF trae ~20% de lienzo transparente por eje (contenido \xFAtil de 240x192\n dentro de 300x320), as\xED que necesita m\xE1s alto declarado que el SVG que\n sustituye para leerse del mismo tama\xF1o: 40px de caja \u2248 24px de glifo.\n */\n .logo-isotype {\n height: 40px;\n }\n .option {\n .option-div {\n width: 100%;\n white-space: nowrap;\n }\n display: flex;\n flex-direction: column;\n align-items: center;\n margin-top: 50px;\n .active {\n text-decoration: none;\n background: rgba(255, 255, 255, 0.1);\n }\n .sub-option {\n display: flex;\n flex-direction: column;\n padding-left: 32px;\n height: auto;\n width: auto;\n &:last-child {\n margin-bottom: 10px;\n }\n }\n }\n }\n"])), function (_ref) {
40
45
  var bar = _ref.bar;
41
46
  return bar ? "240px" : "66px";
42
47
  }, logoToWhite, logoToWhite, logoToWhite, logoThicken);
@@ -11,6 +11,8 @@ var _GeneralInputv = require("../../atoms/GeneralInputv2");
11
11
 
12
12
  var _ScreenHeaderv = require("../../atoms/ScreenHeaderv2");
13
13
 
14
+ var _InheritanceTag = require("../../atoms/InheritanceTag");
15
+
14
16
  var _jsxRuntime = require("react/jsx-runtime");
15
17
 
16
18
  var TagAndInputv2 = function TagAndInputv2(_ref) {
@@ -43,13 +45,17 @@ var TagAndInputv2 = function TagAndInputv2(_ref) {
43
45
  onKeyDown = _ref.onKeyDown,
44
46
  showTooltip = _ref.showTooltip,
45
47
  auditClass = _ref.auditClass,
46
- showMissingChars = _ref.showMissingChars;
48
+ showMissingChars = _ref.showMissingChars,
49
+ isVariant = _ref.isVariant,
50
+ isOverridden = _ref.isOverridden,
51
+ parentUpc = _ref.parentUpc,
52
+ onRestoreInheritance = _ref.onRestoreInheritance;
47
53
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
48
54
  inputType: inputType,
49
55
  className: "input-container",
50
- children: [(label === null || label === void 0 ? void 0 : label.length) && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
56
+ children: [(label === null || label === void 0 ? void 0 : label.length) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
51
57
  className: "title-container",
52
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeaderv.ScreenHeaderv2, {
58
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeaderv.ScreenHeaderv2, {
53
59
  text: label,
54
60
  headerType: "input-name-header",
55
61
  color: color,
@@ -61,7 +67,14 @@ var TagAndInputv2 = function TagAndInputv2(_ref) {
61
67
  required: required,
62
68
  description: description,
63
69
  showMissingChars: showMissingChars
64
- })
70
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_InheritanceTag.InheritanceTag, {
71
+ isVariant: isVariant,
72
+ isOverridden: isOverridden,
73
+ parentUpc: parentUpc,
74
+ onRestore: onRestoreInheritance ? function () {
75
+ return onRestoreInheritance(inputId);
76
+ } : undefined
77
+ })]
65
78
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralInputv.GeneralInputv2, {
66
79
  inputId: inputId,
67
80
  inputType: inputType,
@@ -15,7 +15,7 @@ var _variables = require("../../../global-files/variables");
15
15
 
16
16
  var _templateObject;
17
17
 
18
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .title-container {\n position: relative;\n .tooltip {\n display: none;\n position: absolute;\n background-color: ", ";\n color: ", ";\n font-family: ", ";\n font-size: 12px;\n line-height: 19px;\n left: 0;\n top: 0;\n height: fit-content;\n }\n\n // &:hover {\n // .tooltip {\n // display: block;\n // }\n // }\n }\n\n // & > :first-child {\n // & + * {\n // margin-top: ", "px;\n // }\n // }\n & + * {\n margin-top: ", "px;\n }\n"])), _variables.GlobalColors.white, function (_ref) {
18
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .title-container {\n position: relative;\n display: flex;\n align-items: center;\n gap: 8px;\n\n /* El nombre del atributo manda; el chip se acomoda a su lado sin\n empujarlo ni robarle ancho cuando el texto es largo. */\n & > :first-child {\n min-width: 0;\n }\n .inheritance-tag {\n flex-shrink: 0;\n }\n\n .tooltip {\n display: none;\n position: absolute;\n background-color: ", ";\n color: ", ";\n font-family: ", ";\n font-size: 12px;\n line-height: 19px;\n left: 0;\n top: 0;\n height: fit-content;\n }\n\n // &:hover {\n // .tooltip {\n // display: block;\n // }\n // }\n }\n\n // & > :first-child {\n // & + * {\n // margin-top: ", "px;\n // }\n // }\n & + * {\n margin-top: ", "px;\n }\n"])), _variables.GlobalColors.white, function (_ref) {
19
19
  var color = _ref.color;
20
20
  return color ? color : _variables.GlobalColors.s5;
21
21
  }, _variables.FontFamily.Raleway, function (_ref2) {
@@ -42,7 +42,9 @@ var InputGroupv2 = function InputGroupv2(_ref) {
42
42
  compare = _ref.compare,
43
43
  activeRetailer = _ref.activeRetailer,
44
44
  setUpdatedBoxData = _ref.setUpdatedBoxData,
45
- showMissingChars = _ref.showMissingChars;
45
+ showMissingChars = _ref.showMissingChars,
46
+ variant = _ref.variant,
47
+ onRestoreInheritance = _ref.onRestoreInheritance;
46
48
 
47
49
  var inputTypeValue = function inputTypeValue(type) {
48
50
  switch (type) {
@@ -106,7 +108,7 @@ var InputGroupv2 = function InputGroupv2(_ref) {
106
108
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
107
109
  className: "inputs-container",
108
110
  children: inputGroup === null || inputGroup === void 0 ? void 0 : (_inputGroup$inputs = inputGroup.inputs) === null || _inputGroup$inputs === void 0 ? void 0 : _inputGroup$inputs.map(function (input, index) {
109
- var _dataInputs$input, _dataInputs$input2, _dataInputs$input3, _dataInputs$input4, _dataInputs$input5, _dataInputs$input6, _auditInputs$input, _dataInputs$input7, _dataInputs$input8, _dataInputs$input9, _dataInputs$input10, _dataInputs$input11, _dataInputs$input12, _dataInputs$input13, _dataInputs$input14, _dataInputs$input15, _dataInputs$input16, _auditInputGroup$inpu, _auditInputGroup$inpu2;
111
+ var _dataInputs$input, _dataInputs$input2, _dataInputs$input3, _dataInputs$input4, _dataInputs$input5, _dataInputs$input6, _auditInputs$input, _dataInputs$input7, _dataInputs$input8, _dataInputs$input9, _dataInputs$input10, _dataInputs$input11, _dataInputs$input12, _dataInputs$input13, _dataInputs$input14, _dataInputs$input15, _dataInputs$input16, _dataInputs$input17, _variant$parent, _auditInputGroup$inpu, _auditInputGroup$inpu2;
110
112
 
111
113
  return activeSection === "Ficha técnica" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
112
114
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInputv.TagAndInputv2, {
@@ -131,7 +133,11 @@ var InputGroupv2 = function InputGroupv2(_ref) {
131
133
  description: (_dataInputs$input16 = dataInputs[input]) === null || _dataInputs$input16 === void 0 ? void 0 : _dataInputs$input16.description,
132
134
  showTooltip: true,
133
135
  auditClass: compare && !isEquals(dataInputs[input].value, auditInputs[input].value) ? "audit-class" : "",
134
- showMissingChars: showMissingChars
136
+ showMissingChars: showMissingChars,
137
+ isVariant: variant === null || variant === void 0 ? void 0 : variant.isVariant,
138
+ isOverridden: (_dataInputs$input17 = dataInputs[input]) === null || _dataInputs$input17 === void 0 ? void 0 : _dataInputs$input17.isOverridden,
139
+ parentUpc: variant === null || variant === void 0 ? void 0 : (_variant$parent = variant.parent) === null || _variant$parent === void 0 ? void 0 : _variant$parent.upc,
140
+ onRestoreInheritance: onRestoreInheritance
135
141
  }, index + "-" + ((_dataInputs$input = dataInputs[input]) === null || _dataInputs$input === void 0 ? void 0 : _dataInputs$input.value) + "-" + ((_dataInputs$input2 = dataInputs[input]) === null || _dataInputs$input2 === void 0 ? void 0 : _dataInputs$input2.id) + "-" + compare)
136
142
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInputv.TagAndInputv2, {
137
143
  inputId: input.id,
@@ -166,36 +172,40 @@ var InputGroupv2 = function InputGroupv2(_ref) {
166
172
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
167
173
  className: "inputs-container",
168
174
  children: inputGroup === null || inputGroup === void 0 ? void 0 : (_inputGroup$inputs2 = inputGroup.inputs) === null || _inputGroup$inputs2 === void 0 ? void 0 : _inputGroup$inputs2.map(function (input, index) {
169
- var _dataInputs$input17, _dataInputs$input18, _dataInputs$input19, _dataInputs$input20, _dataInputs$input21, _dataInputs$input22, _auditInputs$input2, _dataInputs$input23, _dataInputs$input24, _dataInputs$input25, _dataInputs$input26, _dataInputs$input27, _dataInputs$input28, _auditInputGroup$inpu3, _auditInputGroup$inpu4;
175
+ var _dataInputs$input18, _dataInputs$input19, _dataInputs$input20, _dataInputs$input21, _dataInputs$input22, _dataInputs$input23, _auditInputs$input2, _dataInputs$input24, _dataInputs$input25, _dataInputs$input26, _dataInputs$input27, _dataInputs$input28, _dataInputs$input29, _dataInputs$input30, _variant$parent2, _auditInputGroup$inpu3, _auditInputGroup$inpu4;
170
176
 
171
177
  return activeSection === "Ficha técnica" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
172
178
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInputv.TagAndInputv2, {
173
179
  //disabled={input === 40001}
174
180
  disabled: false,
175
- inputId: (_dataInputs$input19 = dataInputs[input]) === null || _dataInputs$input19 === void 0 ? void 0 : _dataInputs$input19.id,
181
+ inputId: (_dataInputs$input20 = dataInputs[input]) === null || _dataInputs$input20 === void 0 ? void 0 : _dataInputs$input20.id,
176
182
  version: version,
177
- inputType: inputTypeValue((_dataInputs$input20 = dataInputs[input]) === null || _dataInputs$input20 === void 0 ? void 0 : _dataInputs$input20.type),
178
- label: ((_dataInputs$input21 = dataInputs[input]) === null || _dataInputs$input21 === void 0 ? void 0 : _dataInputs$input21.name) + ((_dataInputs$input22 = dataInputs[input]) !== null && _dataInputs$input22 !== void 0 && _dataInputs$input22.required ? "*" : ""),
179
- value: compare ? (_auditInputs$input2 = auditInputs[input]) === null || _auditInputs$input2 === void 0 ? void 0 : _auditInputs$input2.value : (_dataInputs$input23 = dataInputs[input]) === null || _dataInputs$input23 === void 0 ? void 0 : _dataInputs$input23.value,
183
+ inputType: inputTypeValue((_dataInputs$input21 = dataInputs[input]) === null || _dataInputs$input21 === void 0 ? void 0 : _dataInputs$input21.type),
184
+ label: ((_dataInputs$input22 = dataInputs[input]) === null || _dataInputs$input22 === void 0 ? void 0 : _dataInputs$input22.name) + ((_dataInputs$input23 = dataInputs[input]) !== null && _dataInputs$input23 !== void 0 && _dataInputs$input23.required ? "*" : ""),
185
+ value: compare ? (_auditInputs$input2 = auditInputs[input]) === null || _auditInputs$input2 === void 0 ? void 0 : _auditInputs$input2.value : (_dataInputs$input24 = dataInputs[input]) === null || _dataInputs$input24 === void 0 ? void 0 : _dataInputs$input24.value,
180
186
  inputPlaceHolder: input === null || input === void 0 ? void 0 : input.placeholder,
181
187
  articleId: articleId,
182
- isRequired: (_dataInputs$input24 = dataInputs[input]) === null || _dataInputs$input24 === void 0 ? void 0 : _dataInputs$input24.required,
188
+ isRequired: (_dataInputs$input25 = dataInputs[input]) === null || _dataInputs$input25 === void 0 ? void 0 : _dataInputs$input25.required,
183
189
  required: input.required,
184
190
  minWords: input === null || input === void 0 ? void 0 : input.min_words,
185
191
  maxWords: input === null || input === void 0 ? void 0 : input.max_words,
186
192
  minChar: input === null || input === void 0 ? void 0 : input.min_chars,
187
193
  updatedDatasheets: updatedDatasheets,
188
194
  setUpdatedDatasheets: setUpdatedDatasheets,
189
- maxChar: (_dataInputs$input25 = dataInputs[input]) !== null && _dataInputs$input25 !== void 0 && _dataInputs$input25.max_chars ? (_dataInputs$input26 = dataInputs[input]) === null || _dataInputs$input26 === void 0 ? void 0 : _dataInputs$input26.max_chars : 999,
190
- optionList: (_dataInputs$input27 = dataInputs[input]) === null || _dataInputs$input27 === void 0 ? void 0 : _dataInputs$input27.option_list,
191
- description: (_dataInputs$input28 = dataInputs[input]) === null || _dataInputs$input28 === void 0 ? void 0 : _dataInputs$input28.description,
195
+ maxChar: (_dataInputs$input26 = dataInputs[input]) !== null && _dataInputs$input26 !== void 0 && _dataInputs$input26.max_chars ? (_dataInputs$input27 = dataInputs[input]) === null || _dataInputs$input27 === void 0 ? void 0 : _dataInputs$input27.max_chars : 999,
196
+ optionList: (_dataInputs$input28 = dataInputs[input]) === null || _dataInputs$input28 === void 0 ? void 0 : _dataInputs$input28.option_list,
197
+ description: (_dataInputs$input29 = dataInputs[input]) === null || _dataInputs$input29 === void 0 ? void 0 : _dataInputs$input29.description,
192
198
  showTooltip: true,
193
199
  inputGroup: inputGroup,
194
200
  dataInputs: dataInputs,
195
201
  onChange: setUpdatedBoxData,
196
202
  auditClass: compare && !isEquals(dataInputs[input].value, auditInputs[input].value) ? "audit-class" : "",
197
- showMissingChars: showMissingChars
198
- }, index + "-" + ((_dataInputs$input17 = dataInputs[input]) === null || _dataInputs$input17 === void 0 ? void 0 : _dataInputs$input17.value) + "-" + ((_dataInputs$input18 = dataInputs[input]) === null || _dataInputs$input18 === void 0 ? void 0 : _dataInputs$input18.id) + "-" + compare)
203
+ showMissingChars: showMissingChars,
204
+ isVariant: variant === null || variant === void 0 ? void 0 : variant.isVariant,
205
+ isOverridden: (_dataInputs$input30 = dataInputs[input]) === null || _dataInputs$input30 === void 0 ? void 0 : _dataInputs$input30.isOverridden,
206
+ parentUpc: variant === null || variant === void 0 ? void 0 : (_variant$parent2 = variant.parent) === null || _variant$parent2 === void 0 ? void 0 : _variant$parent2.upc,
207
+ onRestoreInheritance: onRestoreInheritance
208
+ }, index + "-" + ((_dataInputs$input18 = dataInputs[input]) === null || _dataInputs$input18 === void 0 ? void 0 : _dataInputs$input18.value) + "-" + ((_dataInputs$input19 = dataInputs[input]) === null || _dataInputs$input19 === void 0 ? void 0 : _dataInputs$input19.id) + "-" + compare)
199
209
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInputv.TagAndInputv2, {
200
210
  inputId: input.id,
201
211
  index: index,