contentoh-components-library 21.6.48 → 21.6.50
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/.claude/launch.json +14 -0
- package/.env.test +1 -0
- package/dist/ai/prompts/attribute.prompt.js +28 -0
- package/dist/ai/prompts/description.prompt.js +33 -0
- package/dist/ai/schemas/attribute.schema.js +35 -0
- package/dist/ai/schemas/description.schema.js +27 -0
- package/dist/components/atoms/AssetPreview/AssetPreview.stories.js +118 -0
- package/dist/components/atoms/AssetPreview/index.js +150 -0
- package/dist/components/atoms/AssetPreview/styles.js +28 -0
- package/dist/components/atoms/IconFile/index.js +85 -2
- package/dist/components/atoms/IconFile/styles.js +1 -1
- package/dist/components/atoms/ProductImage/ProductImage.stories.js +70 -2
- package/dist/components/atoms/ProductImage/index.js +100 -27
- package/dist/components/atoms/ProductImage/styles.js +3 -1
- package/dist/components/molecules/EditionActiveImage/index.js +4 -2
- package/dist/components/molecules/GalleryAssetElement/GalleryAssetElement.stories.js +147 -0
- package/dist/components/molecules/GalleryAssetElement/index.js +178 -0
- package/dist/components/molecules/GalleryAssetElement/styles.js +26 -0
- package/dist/components/molecules/GalleryElement/index.js +13 -4
- package/dist/components/molecules/GalleryHeader/index.js +96 -24
- package/dist/components/molecules/GalleryHeader/styles.js +4 -1
- package/dist/components/molecules/GalleryTrayTabs/GalleryTrayTabs.stories.js +56 -0
- package/dist/components/molecules/GalleryTrayTabs/index.js +60 -0
- package/dist/components/molecules/GalleryTrayTabs/styles.js +20 -0
- package/dist/components/molecules/ImageSelector/index.js +1 -0
- package/dist/components/organisms/DigitalAssetsTray/DigitalAssetsTray.stories.js +171 -0
- package/dist/components/organisms/DigitalAssetsTray/index.js +211 -0
- package/dist/components/organisms/DigitalAssetsTray/styles.js +22 -0
- package/dist/components/organisms/ImagePreviewer/index.js +1 -0
- package/dist/components/organisms/ProductImageModal/index.js +3 -2
- package/dist/components/organisms/PropagateChangesModal/index.js +12 -1
- package/dist/components/organisms/PropagateChangesModal/non-propagable.js +45 -0
- package/dist/components/organisms/VariantGroupModal/index.js +261 -37
- package/dist/components/organisms/VariantGroupModal/styles.js +25 -5
- package/dist/components/pages/ProviderProductEdition/index.js +11 -1
- package/dist/components/pages/RetailerProductEdition/context/provider-product-edition.context.js +330 -15
- package/dist/components/pages/RetailerProductEdition/context/provider-product-edition.reducer.js +12 -2
- package/dist/components/pages/RetailerProductEdition/index.js +605 -414
- package/dist/components/pages/RetailerProductEdition/stories/ImageEditor.stories.js +1 -0
- package/dist/components/pages/RetailerProductEdition/stories/TextEditor.stories.js +45 -145
- package/dist/global-files/data.js +16 -3
- package/dist/global-files/digital-assets/assetTypes.js +480 -0
- package/dist/global-files/digital-assets/assets.actions.js +64 -0
- package/dist/global-files/digital-assets/assets.adapter.js +304 -0
- package/dist/global-files/digital-assets/assets.mock.js +136 -0
- package/dist/global-files/digital-assets/assets.reducer.js +220 -0
- package/dist/global-files/digital-assets/uploadAssets.js +179 -0
- package/dist/global-files/digital-assets/useDigitalAssets.js +522 -0
- package/dist/index.js +142 -90
- package/docs/activos-digitales.md +273 -0
- package/package.json +1 -1
- package/src/components/atoms/AssetPreview/AssetPreview.stories.js +78 -0
- package/src/components/atoms/AssetPreview/index.js +119 -0
- package/src/components/atoms/AssetPreview/styles.js +190 -0
- package/src/components/atoms/IconFile/index.js +28 -1
- package/src/components/atoms/IconFile/styles.js +8 -0
- package/src/components/atoms/ProductImage/ProductImage.stories.js +38 -0
- package/src/components/atoms/ProductImage/index.js +95 -20
- package/src/components/atoms/ProductImage/styles.js +92 -7
- package/src/components/molecules/EditionActiveImage/index.js +2 -2
- package/src/components/molecules/GalleryAssetElement/GalleryAssetElement.stories.js +102 -0
- package/src/components/molecules/GalleryAssetElement/index.js +162 -0
- package/src/components/molecules/GalleryAssetElement/styles.js +159 -0
- package/src/components/molecules/GalleryElement/index.js +9 -0
- package/src/components/molecules/GalleryHeader/index.js +65 -13
- package/src/components/molecules/GalleryHeader/styles.js +2 -1
- package/src/components/molecules/GalleryTrayTabs/GalleryTrayTabs.stories.js +32 -0
- package/src/components/molecules/GalleryTrayTabs/index.js +41 -0
- package/src/components/molecules/GalleryTrayTabs/styles.js +52 -0
- package/src/components/molecules/ImageSelector/index.js +1 -0
- package/src/components/organisms/DigitalAssetsTray/DigitalAssetsTray.stories.js +101 -0
- package/src/components/organisms/DigitalAssetsTray/index.js +189 -0
- package/src/components/organisms/DigitalAssetsTray/styles.js +183 -0
- package/src/components/organisms/ImagePreviewer/index.js +1 -0
- package/src/components/organisms/ProductImageModal/index.js +1 -0
- package/src/components/organisms/PropagateChangesModal/index.js +11 -1
- package/src/components/organisms/PropagateChangesModal/non-propagable.js +29 -0
- package/src/components/organisms/VariantGroupModal/index.js +235 -38
- package/src/components/organisms/VariantGroupModal/styles.js +148 -1
- package/src/components/pages/ProviderProductEdition/index.js +10 -1
- package/src/components/pages/RetailerProductEdition/context/provider-product-edition.context.jsx +201 -0
- package/src/components/pages/RetailerProductEdition/context/provider-product-edition.reducer.js +12 -0
- package/src/components/pages/RetailerProductEdition/index.js +366 -140
- package/src/components/pages/RetailerProductEdition/stories/ImageEditor.stories.js +1 -0
- package/src/components/pages/RetailerProductEdition/stories/TextEditor.stories.js +51 -104
- package/src/global-files/data.js +17 -2
- package/src/global-files/digital-assets/assetTypes.js +419 -0
- package/src/global-files/digital-assets/assets.actions.js +50 -0
- package/src/global-files/digital-assets/assets.adapter.js +229 -0
- package/src/global-files/digital-assets/assets.mock.js +122 -0
- package/src/global-files/digital-assets/assets.reducer.js +197 -0
- package/src/global-files/digital-assets/uploadAssets.js +109 -0
- package/src/global-files/digital-assets/useDigitalAssets.js +329 -0
- package/src/index.js +4 -0
package/.env.test
CHANGED
|
@@ -75,3 +75,4 @@ REACT_APP_ENVIRONMENT=test
|
|
|
75
75
|
REACT_APP_REGION=us-east-1
|
|
76
76
|
REACT_APP_VARIANTS_ENDPOINT=https://7o2hp8msfl.execute-api.us-east-1.amazonaws.com/test/variants
|
|
77
77
|
REACT_APP_NEW_ARTICLES_ENDPOINT=https://7o2hp8msfl.execute-api.us-east-1.amazonaws.com/test/new-articles
|
|
78
|
+
REACT_APP_ASSETS_PRESIGN_ENDPOINT=https://7o2hp8msfl.execute-api.us-east-1.amazonaws.com/test/articles-assets/presign
|
|
@@ -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,118 @@
|
|
|
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.VideoConControles = exports.Video360 = exports.SinFuente = exports.Pdf = exports.Gif360 = exports.Bandeja = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
|
+
|
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
13
|
+
|
|
14
|
+
var _index = require("./index");
|
|
15
|
+
|
|
16
|
+
var _assets = require("../../../global-files/digital-assets/assets.adapter");
|
|
17
|
+
|
|
18
|
+
var _assets2 = require("../../../global-files/digital-assets/assets.mock");
|
|
19
|
+
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
+
|
|
22
|
+
/*
|
|
23
|
+
Los activos del mock apuntan a claves de S3 que no existen todavía. Para poder
|
|
24
|
+
ver el componente antes de que haya backend, se sustituyen las URLs por
|
|
25
|
+
archivos públicos de ejemplo; el resto del objeto (tipo, nombre, peso,
|
|
26
|
+
duración) es el que devolvería el adaptador.
|
|
27
|
+
*/
|
|
28
|
+
var SAMPLES = {
|
|
29
|
+
mp4: "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4",
|
|
30
|
+
gif: "https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif"
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
var _fromBackendList$map = (0, _assets.fromBackendList)(_assets2.backendAssetsMock).map(function (asset) {
|
|
34
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, asset), {}, {
|
|
35
|
+
url: asset.ext === "mp4" ? SAMPLES.mp4 : asset.ext === "gif" ? SAMPLES.gif : "",
|
|
36
|
+
poster: ""
|
|
37
|
+
});
|
|
38
|
+
}),
|
|
39
|
+
_fromBackendList$map2 = (0, _slicedToArray2.default)(_fromBackendList$map, 4),
|
|
40
|
+
giro360 = _fromBackendList$map2[0],
|
|
41
|
+
gif360 = _fromBackendList$map2[1],
|
|
42
|
+
video = _fromBackendList$map2[2],
|
|
43
|
+
pdf = _fromBackendList$map2[3];
|
|
44
|
+
|
|
45
|
+
var _default = {
|
|
46
|
+
title: "Components/atoms/AssetPreview",
|
|
47
|
+
component: _index.AssetPreview,
|
|
48
|
+
argTypes: {
|
|
49
|
+
size: {
|
|
50
|
+
options: ["catalogue-image-small-size", "catalogue-image-big-size", "carousel-image", "catalogue-modal-image", "main-image"],
|
|
51
|
+
control: {
|
|
52
|
+
type: "select"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
exports.default = _default;
|
|
58
|
+
|
|
59
|
+
var Template = function Template(args) {
|
|
60
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.AssetPreview, (0, _objectSpread2.default)({}, args));
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
var Video360 = Template.bind({});
|
|
64
|
+
exports.Video360 = Video360;
|
|
65
|
+
Video360.args = {
|
|
66
|
+
asset: giro360,
|
|
67
|
+
size: "catalogue-image-big-size"
|
|
68
|
+
};
|
|
69
|
+
var Gif360 = Template.bind({});
|
|
70
|
+
exports.Gif360 = Gif360;
|
|
71
|
+
Gif360.args = {
|
|
72
|
+
asset: gif360,
|
|
73
|
+
size: "catalogue-image-big-size"
|
|
74
|
+
};
|
|
75
|
+
var VideoConControles = Template.bind({});
|
|
76
|
+
exports.VideoConControles = VideoConControles;
|
|
77
|
+
VideoConControles.args = {
|
|
78
|
+
asset: video,
|
|
79
|
+
size: "main-image",
|
|
80
|
+
controls: true
|
|
81
|
+
};
|
|
82
|
+
var Pdf = Template.bind({});
|
|
83
|
+
exports.Pdf = Pdf;
|
|
84
|
+
Pdf.args = {
|
|
85
|
+
asset: pdf,
|
|
86
|
+
size: "catalogue-image-big-size"
|
|
87
|
+
};
|
|
88
|
+
/** Un activo sin URL todavía —recién soltado en la bandeja— no debe romper. */
|
|
89
|
+
|
|
90
|
+
var SinFuente = Template.bind({});
|
|
91
|
+
exports.SinFuente = SinFuente;
|
|
92
|
+
SinFuente.args = {
|
|
93
|
+
asset: {
|
|
94
|
+
name: "manual_sin_subir.pdf",
|
|
95
|
+
ext: "pdf",
|
|
96
|
+
assetType: "pdf"
|
|
97
|
+
},
|
|
98
|
+
size: "catalogue-image-big-size"
|
|
99
|
+
};
|
|
100
|
+
/** Cómo se ve la bandeja completa, que es el uso real. */
|
|
101
|
+
|
|
102
|
+
var Bandeja = function Bandeja() {
|
|
103
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
104
|
+
style: {
|
|
105
|
+
display: "flex",
|
|
106
|
+
gap: 12,
|
|
107
|
+
flexWrap: "wrap"
|
|
108
|
+
},
|
|
109
|
+
children: [giro360, gif360, video, pdf].map(function (asset) {
|
|
110
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.AssetPreview, {
|
|
111
|
+
asset: asset,
|
|
112
|
+
size: "catalogue-image-big-size"
|
|
113
|
+
}, asset.id);
|
|
114
|
+
})
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
exports.Bandeja = Bandeja;
|
|
@@ -0,0 +1,150 @@
|
|
|
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.AssetPreview = void 0;
|
|
9
|
+
|
|
10
|
+
var _reactImageFallback = _interopRequireDefault(require("react-image-fallback"));
|
|
11
|
+
|
|
12
|
+
var _styles = require("./styles");
|
|
13
|
+
|
|
14
|
+
var _IconFile = require("../IconFile");
|
|
15
|
+
|
|
16
|
+
var _assetTypes = require("../../../global-files/digital-assets/assetTypes");
|
|
17
|
+
|
|
18
|
+
var _defaultProductImage = _interopRequireDefault(require("../../../assets/images/defaultImages/defaultProductImage.png"));
|
|
19
|
+
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
+
|
|
22
|
+
var PlayBadge = function PlayBadge() {
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
24
|
+
className: "play-badge",
|
|
25
|
+
"aria-hidden": "true",
|
|
26
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
|
|
27
|
+
viewBox: "0 0 24 24",
|
|
28
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
|
|
29
|
+
cx: "12",
|
|
30
|
+
cy: "12",
|
|
31
|
+
r: "11"
|
|
32
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("polygon", {
|
|
33
|
+
points: "9.5,7.5 17,12 9.5,16.5"
|
|
34
|
+
})]
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Previsualización de un activo digital o de una imagen de producto.
|
|
40
|
+
*
|
|
41
|
+
* Acepta el modelo de `assets.adapter` y también un objeto suelto
|
|
42
|
+
* (`{ url, mime, ext, name }`), para poder usarse donde todavía no hay activos
|
|
43
|
+
* adaptados.
|
|
44
|
+
*
|
|
45
|
+
* `controls` distingue los dos usos: en la bandeja se quieren miniaturas
|
|
46
|
+
* quietas; en el visor grande, un reproductor.
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
var AssetPreview = function AssetPreview(_ref) {
|
|
51
|
+
var _ref$asset = _ref.asset,
|
|
52
|
+
asset = _ref$asset === void 0 ? {} : _ref$asset,
|
|
53
|
+
_ref$size = _ref.size,
|
|
54
|
+
size = _ref$size === void 0 ? "catalogue-image-small-size" : _ref$size,
|
|
55
|
+
_ref$controls = _ref.controls,
|
|
56
|
+
controls = _ref$controls === void 0 ? false : _ref$controls,
|
|
57
|
+
_ref$showBadge = _ref.showBadge,
|
|
58
|
+
showBadge = _ref$showBadge === void 0 ? true : _ref$showBadge,
|
|
59
|
+
_ref$showDuration = _ref.showDuration,
|
|
60
|
+
showDuration = _ref$showDuration === void 0 ? true : _ref$showDuration,
|
|
61
|
+
onClick = _ref.onClick,
|
|
62
|
+
_ref$className = _ref.className,
|
|
63
|
+
className = _ref$className === void 0 ? "" : _ref$className;
|
|
64
|
+
var url = asset.url,
|
|
65
|
+
src = asset.src,
|
|
66
|
+
poster = asset.poster,
|
|
67
|
+
mime = asset.mime,
|
|
68
|
+
ext = asset.ext,
|
|
69
|
+
name = asset.name,
|
|
70
|
+
assetType = asset.assetType,
|
|
71
|
+
duration = asset.duration;
|
|
72
|
+
var source = url || src || "";
|
|
73
|
+
var kind = (0, _assetTypes.resolvePreviewKind)({
|
|
74
|
+
mime: mime,
|
|
75
|
+
ext: ext,
|
|
76
|
+
name: name
|
|
77
|
+
});
|
|
78
|
+
var extension = (ext || (0, _assetTypes.getExtension)(name) || "").toLowerCase();
|
|
79
|
+
var label = assetType ? (0, _assetTypes.getAssetType)(assetType).label : extension.toUpperCase();
|
|
80
|
+
var badge = showBadge && label ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
81
|
+
className: "asset-badge",
|
|
82
|
+
children: label
|
|
83
|
+
}) : null;
|
|
84
|
+
var durationTag = showDuration && duration ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
85
|
+
className: "asset-duration",
|
|
86
|
+
children: (0, _assetTypes.formatDuration)(duration)
|
|
87
|
+
}) : null;
|
|
88
|
+
|
|
89
|
+
var body = function body() {
|
|
90
|
+
if (!source) {
|
|
91
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
92
|
+
className: "asset-fallback",
|
|
93
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_IconFile.IconFile, {
|
|
94
|
+
ext: extension,
|
|
95
|
+
size: "34"
|
|
96
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
97
|
+
title: name,
|
|
98
|
+
children: name
|
|
99
|
+
})]
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (kind === _assetTypes.ASSET_PREVIEW.VIDEO) {
|
|
104
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
105
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("video", {
|
|
106
|
+
// `#t=0.5` pide al navegador el fotograma del medio segundo en vez
|
|
107
|
+
// de una pantalla negra. Resuelve la miniatura sin descargar el
|
|
108
|
+
// archivo entero ni convertirlo a base64, que es lo que hacía el
|
|
109
|
+
// parche que este componente reemplaza.
|
|
110
|
+
src: poster ? source : "".concat(source, "#t=0.5"),
|
|
111
|
+
poster: poster || undefined,
|
|
112
|
+
controls: controls,
|
|
113
|
+
muted: !controls,
|
|
114
|
+
playsInline: true,
|
|
115
|
+
preload: "metadata"
|
|
116
|
+
}), !controls && /*#__PURE__*/(0, _jsxRuntime.jsx)(PlayBadge, {})]
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (kind === _assetTypes.ASSET_PREVIEW.IMAGE) {
|
|
121
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactImageFallback.default, {
|
|
122
|
+
src: source,
|
|
123
|
+
fallbackImage: _defaultProductImage.default,
|
|
124
|
+
alt: name,
|
|
125
|
+
onClick: onClick
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
130
|
+
className: "asset-fallback",
|
|
131
|
+
onClick: onClick,
|
|
132
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_IconFile.IconFile, {
|
|
133
|
+
ext: extension,
|
|
134
|
+
size: "34"
|
|
135
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
136
|
+
title: name,
|
|
137
|
+
children: name
|
|
138
|
+
})]
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
143
|
+
className: "".concat(size, " ").concat(className).trim(),
|
|
144
|
+
onClick: controls ? undefined : onClick,
|
|
145
|
+
$clickable: Boolean(onClick) && !controls,
|
|
146
|
+
children: [body(), badge, durationTag]
|
|
147
|
+
});
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
exports.AssetPreview = AssetPreview;
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
var _variables = require("../../../global-files/variables");
|
|
15
|
+
|
|
16
|
+
var _templateObject;
|
|
17
|
+
|
|
18
|
+
/*
|
|
19
|
+
Los tamaños replican los de `ProductImage` con los mismos nombres de clase,
|
|
20
|
+
para que el componente entre donde ya había una imagen sin tocar el layout
|
|
21
|
+
de la bandeja.
|
|
22
|
+
*/
|
|
23
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n width: fit-content;\n display: flex;\n justify-content: center;\n align-items: center;\n\n cursor: ", ";\n\n img,\n video {\n object-fit: contain;\n background: ", ";\n }\n\n .asset-fallback {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 6px;\n width: 100%;\n height: 100%;\n padding: 8px;\n box-sizing: border-box;\n background: ", ";\n border-radius: 6px;\n\n p {\n margin: 0;\n font-family: ", ";\n font-size: 10px;\n color: ", ";\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n word-break: break-all;\n }\n }\n\n /* Solo aparece cuando el video se muestra sin controles. */\n .play-badge {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 32px;\n height: 32px;\n pointer-events: none;\n\n svg {\n width: 100%;\n height: 100%;\n display: block;\n }\n\n circle {\n fill: rgba(0, 0, 0, 0.55);\n }\n\n polygon {\n fill: ", ";\n }\n }\n\n &:hover .play-badge circle {\n fill: rgba(0, 0, 0, 0.75);\n }\n\n .asset-badge {\n position: absolute;\n top: 4px;\n left: 4px;\n padding: 1px 6px;\n border-radius: 10px;\n background: ", ";\n color: ", ";\n font-family: ", ";\n font-size: 9px;\n line-height: 14px;\n letter-spacing: 0.02em;\n pointer-events: none;\n }\n\n .asset-duration {\n position: absolute;\n bottom: 4px;\n right: 4px;\n padding: 1px 5px;\n border-radius: 4px;\n background: rgba(38, 38, 38, 0.75);\n color: ", ";\n font-family: ", ";\n font-size: 9px;\n line-height: 14px;\n pointer-events: none;\n }\n\n &.carousel-image {\n .play-badge {\n width: 22px;\n height: 22px;\n }\n\n img,\n video,\n .asset-fallback {\n width: 85px;\n height: 55px;\n cursor: pointer;\n }\n\n & + * {\n margin-left: 1px;\n }\n }\n\n &.main-image {\n img,\n video,\n .asset-fallback {\n width: 340px;\n height: 295px;\n }\n }\n\n &.catalogue-image-big-size {\n img,\n video,\n .asset-fallback {\n width: 179px;\n height: 179px;\n }\n }\n\n &.catalogue-image-small-size {\n img,\n video,\n .asset-fallback {\n width: 60px;\n height: 60px;\n }\n\n .asset-badge {\n font-size: 8px;\n padding: 0 4px;\n }\n\n /* En 60px un badge de 32 tapa el fotograma completo. */\n .play-badge {\n width: 20px;\n height: 20px;\n }\n }\n\n &.catalogue-modal-image {\n flex: 1 0 50%;\n cursor: pointer;\n\n img,\n video,\n .asset-fallback {\n width: 168px;\n height: 108px;\n }\n }\n\n &.expanded-modal-image {\n width: 710px;\n height: 710px;\n\n img,\n video,\n .asset-fallback {\n width: 710px;\n height: 710px;\n }\n }\n"])), function (_ref) {
|
|
24
|
+
var $clickable = _ref.$clickable;
|
|
25
|
+
return $clickable ? "pointer" : "default";
|
|
26
|
+
}, _variables.GlobalColors.gray_light, _variables.GlobalColors.gray_light, _variables.FontFamily.Raleway, _variables.GlobalColors.gray, _variables.GlobalColors.white, _variables.GlobalColors.color_purple, _variables.GlobalColors.white, _variables.FontFamily.Raleway_600, _variables.GlobalColors.white, _variables.FontFamily.Raleway);
|
|
27
|
+
|
|
28
|
+
exports.Container = Container;
|
|
@@ -69,14 +69,85 @@ var IconFile = function IconFile(props) {
|
|
|
69
69
|
type: "csv"
|
|
70
70
|
},
|
|
71
71
|
// file image
|
|
72
|
-
|
|
72
|
+
gif: {
|
|
73
73
|
icon: _freeSolidSvgIcons.faFileImage,
|
|
74
74
|
type: "image"
|
|
75
75
|
},
|
|
76
|
-
|
|
76
|
+
jpg: {
|
|
77
|
+
icon: _freeSolidSvgIcons.faFileImage,
|
|
78
|
+
type: "image"
|
|
79
|
+
},
|
|
80
|
+
jpeg: {
|
|
81
|
+
icon: _freeSolidSvgIcons.faFileImage,
|
|
82
|
+
type: "image"
|
|
83
|
+
},
|
|
84
|
+
png: {
|
|
77
85
|
icon: _freeSolidSvgIcons.faFileImage,
|
|
78
86
|
type: "image"
|
|
79
87
|
},
|
|
88
|
+
webp: {
|
|
89
|
+
icon: _freeSolidSvgIcons.faFileImage,
|
|
90
|
+
type: "image"
|
|
91
|
+
},
|
|
92
|
+
// archivos de diseño editables: no se pueden previsualizar en el navegador,
|
|
93
|
+
// así que el icono es lo único que distingue uno de otro en la bandeja.
|
|
94
|
+
psd: {
|
|
95
|
+
icon: _freeSolidSvgIcons.faSwatchbook,
|
|
96
|
+
type: "design"
|
|
97
|
+
},
|
|
98
|
+
psb: {
|
|
99
|
+
icon: _freeSolidSvgIcons.faSwatchbook,
|
|
100
|
+
type: "design"
|
|
101
|
+
},
|
|
102
|
+
ai: {
|
|
103
|
+
icon: _freeSolidSvgIcons.faSwatchbook,
|
|
104
|
+
type: "design"
|
|
105
|
+
},
|
|
106
|
+
eps: {
|
|
107
|
+
icon: _freeSolidSvgIcons.faSwatchbook,
|
|
108
|
+
type: "design"
|
|
109
|
+
},
|
|
110
|
+
indd: {
|
|
111
|
+
icon: _freeSolidSvgIcons.faSwatchbook,
|
|
112
|
+
type: "design"
|
|
113
|
+
},
|
|
114
|
+
idml: {
|
|
115
|
+
icon: _freeSolidSvgIcons.faSwatchbook,
|
|
116
|
+
type: "design"
|
|
117
|
+
},
|
|
118
|
+
sketch: {
|
|
119
|
+
icon: _freeSolidSvgIcons.faSwatchbook,
|
|
120
|
+
type: "design"
|
|
121
|
+
},
|
|
122
|
+
fig: {
|
|
123
|
+
icon: _freeSolidSvgIcons.faSwatchbook,
|
|
124
|
+
type: "design"
|
|
125
|
+
},
|
|
126
|
+
xd: {
|
|
127
|
+
icon: _freeSolidSvgIcons.faSwatchbook,
|
|
128
|
+
type: "design"
|
|
129
|
+
},
|
|
130
|
+
afphoto: {
|
|
131
|
+
icon: _freeSolidSvgIcons.faSwatchbook,
|
|
132
|
+
type: "design"
|
|
133
|
+
},
|
|
134
|
+
afdesign: {
|
|
135
|
+
icon: _freeSolidSvgIcons.faSwatchbook,
|
|
136
|
+
type: "design"
|
|
137
|
+
},
|
|
138
|
+
svg: {
|
|
139
|
+
icon: _freeSolidSvgIcons.faSwatchbook,
|
|
140
|
+
type: "design"
|
|
141
|
+
},
|
|
142
|
+
// proyectos de animación y edición de video
|
|
143
|
+
aep: {
|
|
144
|
+
icon: _freeSolidSvgIcons.faFilm,
|
|
145
|
+
type: "motion"
|
|
146
|
+
},
|
|
147
|
+
prproj: {
|
|
148
|
+
icon: _freeSolidSvgIcons.faFilm,
|
|
149
|
+
type: "motion"
|
|
150
|
+
},
|
|
80
151
|
// file pdf
|
|
81
152
|
pdf: {
|
|
82
153
|
icon: _freeSolidSvgIcons.faFilePdf,
|
|
@@ -132,6 +203,10 @@ var IconFile = function IconFile(props) {
|
|
|
132
203
|
icon: _freeSolidSvgIcons.faFileZipper,
|
|
133
204
|
type: "zip"
|
|
134
205
|
},
|
|
206
|
+
"7z": {
|
|
207
|
+
icon: _freeSolidSvgIcons.faFileZipper,
|
|
208
|
+
type: "zip"
|
|
209
|
+
},
|
|
135
210
|
// file code
|
|
136
211
|
xml: {
|
|
137
212
|
icon: _freeSolidSvgIcons.faFileCode,
|
|
@@ -198,6 +273,14 @@ var IconFile = function IconFile(props) {
|
|
|
198
273
|
icon: _freeSolidSvgIcons.faFileVideo,
|
|
199
274
|
type: "video"
|
|
200
275
|
},
|
|
276
|
+
mov: {
|
|
277
|
+
icon: _freeSolidSvgIcons.faFileVideo,
|
|
278
|
+
type: "video"
|
|
279
|
+
},
|
|
280
|
+
webm: {
|
|
281
|
+
icon: _freeSolidSvgIcons.faFileVideo,
|
|
282
|
+
type: "video"
|
|
283
|
+
},
|
|
201
284
|
mpeg: {
|
|
202
285
|
icon: _freeSolidSvgIcons.faFileVideo,
|
|
203
286
|
type: "video"
|
|
@@ -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 width: fit-content;\n min-width: min-content;\n min-height: min-content;\n overflow: hidden;\n cursor: default;\n display: grid;\n place-items: center;\n padding: 0px;\n border-radius: ", ";\n border: none;\n\n // colores de acuerdo al tipo de icono\n &.icon-word .icon {\n color: #1f3780;\n border-color: #1f3780;\n }\n &.icon-excel .icon {\n color: #2d5639;\n border-color: #2d5639;\n }\n &.icon-csv .icon {\n color: #6b8e73;\n border-color: #6b8e73;\n }\n &.icon-image .icon {\n color: #ca7f4d;\n border-color: #ca7f4d;\n }\n &.icon-pdf .icon {\n color: #951a1a;\n border-color: #951a1a;\n }\n &.icon-powerPoint .icon {\n color: #ba4f19;\n border-color: #ba4f19;\n }\n &.icon-zip .icon {\n color: #b8950c;\n border-color: #b8950c;\n }\n &.icon-code .icon {\n color: #1c778e;\n border-color: #1c778e;\n }\n &.icon-video .icon {\n color: #a15bb1;\n border-color: #a15bb1;\n }\n &.icon-audio .icon {\n color: #3090e9;\n border-color: #3090e9;\n }\n &.icon-default .icon {\n color: #5e6265;\n border-color: #5e6265;\n }\n"])), function (_ref) {
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: fit-content;\n min-width: min-content;\n min-height: min-content;\n overflow: hidden;\n cursor: default;\n display: grid;\n place-items: center;\n padding: 0px;\n border-radius: ", ";\n border: none;\n\n // colores de acuerdo al tipo de icono\n &.icon-word .icon {\n color: #1f3780;\n border-color: #1f3780;\n }\n &.icon-excel .icon {\n color: #2d5639;\n border-color: #2d5639;\n }\n &.icon-csv .icon {\n color: #6b8e73;\n border-color: #6b8e73;\n }\n &.icon-image .icon {\n color: #ca7f4d;\n border-color: #ca7f4d;\n }\n &.icon-pdf .icon {\n color: #951a1a;\n border-color: #951a1a;\n }\n &.icon-powerPoint .icon {\n color: #ba4f19;\n border-color: #ba4f19;\n }\n &.icon-zip .icon {\n color: #b8950c;\n border-color: #b8950c;\n }\n &.icon-code .icon {\n color: #1c778e;\n border-color: #1c778e;\n }\n &.icon-design .icon {\n color: #2a5cb8;\n border-color: #2a5cb8;\n }\n &.icon-motion .icon {\n color: #6d3fc0;\n border-color: #6d3fc0;\n }\n &.icon-video .icon {\n color: #a15bb1;\n border-color: #a15bb1;\n }\n &.icon-audio .icon {\n color: #3090e9;\n border-color: #3090e9;\n }\n &.icon-default .icon {\n color: #5e6265;\n border-color: #5e6265;\n }\n"])), function (_ref) {
|
|
19
19
|
var borderType = _ref.borderType;
|
|
20
20
|
return (borderType === null || borderType === void 0 ? void 0 : borderType.toLowerCase()) === "rectangle" ? "6px" : (borderType === null || borderType === void 0 ? void 0 : borderType.toLowerCase()) === "circle" ? "50%" : "0px";
|
|
21
21
|
});
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default = exports.Template = void 0;
|
|
8
|
+
exports.default = exports.VideoReproductor = exports.VideoMiniaturas = exports.Template = void 0;
|
|
9
9
|
|
|
10
10
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
11
|
|
|
@@ -36,4 +36,72 @@ var ProductImageDefault = Template.bind({});
|
|
|
36
36
|
ProductImageDefault.args = {
|
|
37
37
|
imageType: "main-image",
|
|
38
38
|
altText: "default image"
|
|
39
|
-
};
|
|
39
|
+
};
|
|
40
|
+
/*
|
|
41
|
+
Las escalas de video, lado a lado. Las cuatro primeras son miniaturas: sin
|
|
42
|
+
controles, con su duración y un botón de play, y todo el recuadro clicable.
|
|
43
|
+
Las dos últimas son reproductores de verdad.
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
var VIDEO = "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4";
|
|
47
|
+
|
|
48
|
+
var Escala = function Escala(_ref) {
|
|
49
|
+
var imageType = _ref.imageType;
|
|
50
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("figure", {
|
|
51
|
+
style: {
|
|
52
|
+
margin: 0
|
|
53
|
+
},
|
|
54
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.ProductImage, {
|
|
55
|
+
img: VIDEO,
|
|
56
|
+
ext: "mp4",
|
|
57
|
+
imageType: imageType,
|
|
58
|
+
altText: "video de producto",
|
|
59
|
+
onClick: function onClick() {
|
|
60
|
+
return console.log("clic en", imageType);
|
|
61
|
+
}
|
|
62
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("figcaption", {
|
|
63
|
+
style: {
|
|
64
|
+
fontFamily: "Lato",
|
|
65
|
+
fontSize: 11,
|
|
66
|
+
marginTop: 4
|
|
67
|
+
},
|
|
68
|
+
children: imageType
|
|
69
|
+
})]
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
var VideoMiniaturas = function VideoMiniaturas() {
|
|
74
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
75
|
+
style: {
|
|
76
|
+
display: "flex",
|
|
77
|
+
gap: 24,
|
|
78
|
+
alignItems: "flex-start"
|
|
79
|
+
},
|
|
80
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Escala, {
|
|
81
|
+
imageType: "carousel-image"
|
|
82
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Escala, {
|
|
83
|
+
imageType: "catalogue-image-small-size"
|
|
84
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Escala, {
|
|
85
|
+
imageType: "catalogue-modal-image"
|
|
86
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Escala, {
|
|
87
|
+
imageType: "catalogue-image-big-size"
|
|
88
|
+
})]
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
exports.VideoMiniaturas = VideoMiniaturas;
|
|
93
|
+
|
|
94
|
+
var VideoReproductor = function VideoReproductor() {
|
|
95
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
96
|
+
style: {
|
|
97
|
+
display: "flex",
|
|
98
|
+
gap: 24,
|
|
99
|
+
alignItems: "flex-start"
|
|
100
|
+
},
|
|
101
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Escala, {
|
|
102
|
+
imageType: "main-image"
|
|
103
|
+
})
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
exports.VideoReproductor = VideoReproductor;
|