contentoh-components-library 21.5.12 → 21.5.13

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 (29) hide show
  1. package/dist/assets/images/Icons/save-white-gray.svg +1 -1
  2. package/dist/assets/images/Icons/save-white.svg +1 -1
  3. package/dist/components/atoms/GeneralInput/styles.js +1 -1
  4. package/dist/components/atoms/ProductImage/index.js +27 -9
  5. package/dist/components/atoms/ProductImage/styles.js +1 -1
  6. package/dist/components/organisms/Table/index.js +16 -2
  7. package/dist/components/organisms/Table/styles.js +17 -11
  8. package/dist/components/pages/MultipleEdition/MultipleEdition.stories.js +3 -3
  9. package/dist/components/pages/MultipleEdition/index.js +5 -3
  10. package/dist/components/pages/MultipleEdition/styles.js +2 -2
  11. package/dist/components/pages/MultipleEdition/utils.js +99 -43
  12. package/dist/components/pages/ProductEditionv2/index.js +18 -17
  13. package/dist/components/pages/RetailerProductEdition/generateThumnail.js +34 -0
  14. package/dist/components/pages/RetailerProductEdition/index.js +465 -262
  15. package/package.json +1 -1
  16. package/src/assets/images/Icons/save-white-gray.svg +1 -1
  17. package/src/assets/images/Icons/save-white.svg +1 -1
  18. package/src/components/atoms/GeneralInput/styles.js +1 -1
  19. package/src/components/atoms/ProductImage/index.js +24 -11
  20. package/src/components/atoms/ProductImage/styles.js +7 -0
  21. package/src/components/organisms/Table/index.js +12 -2
  22. package/src/components/organisms/Table/styles.js +6 -5
  23. package/src/components/pages/MultipleEdition/MultipleEdition.stories.js +3 -3
  24. package/src/components/pages/MultipleEdition/index.js +5 -1
  25. package/src/components/pages/MultipleEdition/styles.js +34 -8
  26. package/src/components/pages/MultipleEdition/utils.js +109 -57
  27. package/src/components/pages/ProductEditionv2/index.js +1 -1
  28. package/src/components/pages/RetailerProductEdition/generateThumnail.js +21 -0
  29. package/src/components/pages/RetailerProductEdition/index.js +141 -24
@@ -1,4 +1,4 @@
1
- <svg width="34" height="34" viewBox="0 0 34 34" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ <svg width="24" height="24" viewBox="0 0 34 34" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <rect width="34" height="34" rx="17" fill="#F0F0F0"/>
3
3
  <mask id="mask0_346_670" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="10" y="10" width="14" height="14">
4
4
  <rect x="10" y="10" width="14" height="14" fill="#D9D9D9"/>
@@ -1,4 +1,4 @@
1
- <svg width="34" height="34" viewBox="0 0 34 34" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ <svg width="24" height="24" viewBox="0 0 34 34" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <rect width="34" height="34" rx="17" fill="#E33AA9"/>
3
3
  <mask id="mask0_346_670" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="10" y="10" width="14" height="14">
4
4
  <rect x="10" y="10" width="14" height="14" fill="#D9D9D9"/>
@@ -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: 100%;\n\n > div {\n label {\n &:before {\n outline: 1px solid ", ";\n }\n }\n }\n\n input,\n textarea {\n width: 100%;\n border: 1px solid\n ", ";\n\n font-family: ", ";\n color: ", ";\n font-weight: normal;\n font-size: 12px;\n line-height: 15px;\n padding: 10px;\n outline: none;\n border-radius: 2px;\n resize: none;\n\n &:focus {\n border: 1px solid ", ";\n }\n }\n\n select {\n background: #fafafa;\n outline: none;\n border: 1px solid\n ", ";\n width: 100%;\n cursor: pointer;\n font-family: ", ";\n color: ", ";\n font-size: 12px;\n line-height: 21px;\n padding: 10px;\n border-right: 2px solid #e33aa9;\n\n &:focus {\n border: 1px solid ", ";\n }\n }\n\n p {\n font-family: ", ";\n font-size: 12px;\n color: ", ";\n }\n\n &.audit-class {\n input,\n .quill {\n border: 1px solid #8a6caa;\n background-color: #ededfc;\n }\n }\n\n .btnReviewState {\n display: \"flex\";\n flex-direction: \"column\";\n border: 1px solid lightgray;\n border-radius: 3px;\n z-index: 1000;\n /* position: absolute; */\n }\n\n .btnReviewState button {\n border: none;\n background: white;\n border-radius: 3px;\n }\n .btnReviewState button:hover {\n background: lightgray;\n }\n"])), function (_ref) {
18
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n\n > div {\n label {\n &:before {\n outline: 1px solid ", ";\n }\n }\n }\n\n input,\n textarea {\n width: 100%;\n border: 1px solid\n ", ";\n\n font-family: ", ";\n color: ", ";\n font-weight: normal;\n font-size: 12px;\n line-height: 15px;\n padding: 10px;\n outline: none;\n border-radius: 5px;\n resize: none;\n\n &:focus {\n border: 1px solid ", ";\n }\n }\n\n select {\n background: #fafafa;\n outline: none;\n border: 1px solid\n ", ";\n width: 100%;\n cursor: pointer;\n font-family: ", ";\n color: ", ";\n font-size: 12px;\n line-height: 21px;\n padding: 10px;\n border-right: 2px solid #e33aa9;\n\n &:focus {\n border: 1px solid ", ";\n }\n }\n\n p {\n font-family: ", ";\n font-size: 12px;\n color: ", ";\n }\n\n &.audit-class {\n input,\n .quill {\n border: 1px solid #8a6caa;\n background-color: #ededfc;\n }\n }\n\n .btnReviewState {\n display: \"flex\";\n flex-direction: \"column\";\n border: 1px solid lightgray;\n border-radius: 3px;\n z-index: 1000;\n /* position: absolute; */\n }\n\n .btnReviewState button {\n border: none;\n background: white;\n border-radius: 3px;\n }\n .btnReviewState button:hover {\n background: lightgray;\n }\n"])), function (_ref) {
19
19
  var isRequired = _ref.isRequired;
20
20
  return isRequired ? "red" : "none";
21
21
  }, function (_ref2) {
@@ -20,15 +20,33 @@ var ProductImage = function ProductImage(_ref) {
20
20
  imageType = _ref.imageType,
21
21
  altText = _ref.altText,
22
22
  onClick = _ref.onClick;
23
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
24
- className: imageType,
25
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactImageFallback.default, {
26
- src: img,
27
- fallbackImage: _defaultProductImage.default,
28
- alt: altText,
29
- onClick: onClick
30
- })
31
- });
23
+ // Expresión regular para validar que los últimos tres caracteres sean ".mp4"
24
+ var regex = /\.mp4$/;
25
+
26
+ if (regex.test(img)) {
27
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
28
+ className: imageType,
29
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("video", {
30
+ controls: true,
31
+ width: "100%",
32
+ height: "auto",
33
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("source", {
34
+ src: img,
35
+ type: "video/mp4"
36
+ })
37
+ })
38
+ });
39
+ } else {
40
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
41
+ className: imageType,
42
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactImageFallback.default, {
43
+ src: img,
44
+ fallbackImage: _defaultProductImage.default,
45
+ alt: altText,
46
+ onClick: onClick
47
+ })
48
+ });
49
+ }
32
50
  };
33
51
 
34
52
  exports.ProductImage = ProductImage;
@@ -13,6 +13,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
13
13
 
14
14
  var _templateObject;
15
15
 
16
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: fit-content;\n\n img {\n object-fit: contain;\n }\n\n &.carousel-image {\n img {\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 width: 340px;\n height: 295px;\n }\n }\n\n &.catalogue-image-big-size {\n img {\n width: 179px;\n height: 179px;\n }\n }\n\n &.catalogue-image-small-size {\n img {\n width: 60px;\n height: 60px;\n }\n }\n\n &.catalogue-modal-image {\n flex: 1 0 50%;\n cursor: pointer;\n\n img {\n width: 168px;\n height: 108px;\n }\n }\n\n &.expanded-modal-image {\n width: 710px;\n height: 710px;\n\n img {\n width: 710px;\n height: 710px;\n }\n }\n"])));
16
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: fit-content;\n\n img {\n object-fit: contain;\n }\n\n &.carousel-image {\n img {\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 width: 340px;\n height: 295px;\n }\n }\n\n &.catalogue-image-big-size {\n display: flex; \n justify-content: center; \n align-items: center; \n img {\n width: 179px;\n height: 179px;\n }\n }\n\n &.catalogue-image-small-size {\n img {\n width: 60px;\n height: 60px;\n }\n }\n\n &.catalogue-modal-image {\n flex: 1 0 50%;\n cursor: pointer;\n\n img {\n width: 168px;\n height: 108px;\n }\n }\n\n &.expanded-modal-image {\n width: 710px;\n height: 710px;\n display: flex; \n justify-content: center; \n align-items: center; \n\n img {\n width: 710px;\n height: 710px;\n }\n }\n"])));
17
17
 
18
18
  exports.Container = Container;
@@ -21,12 +21,16 @@ var _CheckBox = require("../../atoms/CheckBox");
21
21
 
22
22
  var _styles = require("./styles");
23
23
 
24
+ var _Tooltip = require("../../atoms/Tooltip");
25
+
24
26
  var _jsxRuntime = require("react/jsx-runtime");
25
27
 
26
28
  var Table = function Table(_ref) {
27
29
  var columns = _ref.columns,
28
30
  data = _ref.data,
29
- withCheckbox = _ref.withCheckbox;
31
+ withCheckbox = _ref.withCheckbox,
32
+ _ref$withTooltip = _ref.withTooltip,
33
+ withTooltip = _ref$withTooltip === void 0 ? false : _ref$withTooltip;
30
34
 
31
35
  var _useState = (0, _react.useState)([]),
32
36
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
@@ -73,7 +77,17 @@ var Table = function Table(_ref) {
73
77
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.TH, (0, _objectSpread2.default)((0, _objectSpread2.default)({
74
78
  withCheckbox: withCheckbox
75
79
  }, column), {}, {
76
- children: column.Header
80
+ children: column.description && withTooltip ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.Tooltip, {
81
+ componentTooltip: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
82
+ children: column.description
83
+ }),
84
+ position: "topCenter",
85
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
86
+ children: column.Header
87
+ })
88
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
89
+ children: column.Header
90
+ })
77
91
  }), "".concat(column.accessor).concat(i));
78
92
  })]
79
93
  })
@@ -15,34 +15,40 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
15
15
 
16
16
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
17
17
 
18
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: #fff;\n box-sizing: border-box;\n height: 100%;\n overflow-x: auto;\n width: 100%;\n margin-right: 30px;\n .checkbox_fixed {\n left: 0px;\n position: sticky;\n z-index: 5;\n }\n\n .custom-table {\n border-collapse: collapse;\n box-sizing: border-box;\n width: 100%;\n & > thead {\n top: 0;\n height: 45px;\n position: sticky;\n z-index: 5;\n & > tr {\n background-color: #f7f7fc;\n border-radius: 5px 5px 0px 0px;\n height: 45px;\n }\n }\n & > tbody > tr {\n height: 70px;\n &:last-child {\n border-radius: 0px 0px 5px 5px;\n }\n }\n }\n\n .custom-table th,\n .custom-table td {\n padding: 8px;\n border: 0;\n }\n\n .custom-table th {\n border-radius: 5px 0 0 5px;\n border: 0;\n color: var(--black-main, #262626);\n font-family: Roboto;\n font-size: 12px;\n font-style: normal;\n font-weight: 500;\n line-height: normal;\n text-align: left;\n }\n\n .custom-table tr {\n background: var(--white-main, #fff);\n border-bottom: 1px solid var(--grey-light, #f0f0f0);\n border-left: 1px solid var(--grey-light, #f0f0f0);\n border-right: 1px solid var(--grey-light, #f0f0f0);\n & > td {\n color: var(--grey-main, #707070);\n font-family: Roboto;\n font-size: 12px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n }\n display: flex;\n align-items: center;\n ", "\n }\n"])), function (_ref) {
18
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: #fff;\n box-sizing: border-box;\n height: 100%;\n overflow-x: auto;\n width: 100%;\n margin-right: 30px;\n .checkbox_fixed {\n left: 0px;\n position: sticky;\n z-index: 5;\n }\n\n .custom-table {\n border-collapse: collapse;\n box-sizing: border-box;\n width: 100%;\n & > thead {\n top: 0;\n height: 45px;\n position: sticky;\n z-index: 2;\n & > tr {\n background-color: #f7f7fc;\n border-radius: 5px 5px 0px 0px;\n height: 45px;\n }\n }\n & > tbody > tr {\n height: 70px;\n &:last-child {\n border-radius: 0px 0px 5px 5px;\n }\n }\n }\n\n .custom-table th,\n .custom-table td {\n padding: 8px;\n border: 0;\n }\n\n .custom-table th {\n border-radius: 5px 0 0 5px;\n border: 0;\n color: var(--black-main, #262626);\n font-family: Roboto;\n font-size: 12px;\n font-style: normal;\n font-weight: 500;\n line-height: normal;\n text-align: left;\n }\n\n .custom-table tr {\n background: var(--white-main, #fff);\n border-bottom: 1px solid var(--grey-light, #f0f0f0);\n border-left: 1px solid var(--grey-light, #f0f0f0);\n border-right: 1px solid var(--grey-light, #f0f0f0);\n & > td {\n color: var(--grey-main, #707070);\n font-family: Roboto;\n font-size: 12px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n gap:5px;\n }\n display: flex;\n align-items: center;\n ", "\n }\n"])), function (_ref) {
19
19
  var withCheckbox = _ref.withCheckbox;
20
20
  return withCheckbox && "padding-left: 10px;";
21
21
  });
22
22
 
23
23
  exports.Container = Container;
24
24
 
25
- var TH = _styledComponents.default.th(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background: inherit;\n min-height: ", ";\n min-width: ", ";\n position: sticky;\n left: 20px;\n ", "\n"])), function (_ref2) {
25
+ var TH = _styledComponents.default.th(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background: inherit;\n min-height: ", ";\n min-width: ", ";\n position: sticky;\n left: ", ";\n ", "\n"])), function (_ref2) {
26
26
  var height = _ref2.height;
27
27
  return height !== null && height !== void 0 ? height : "auto";
28
28
  }, function (_ref3) {
29
29
  var width = _ref3.width;
30
30
  return width !== null && width !== void 0 ? width : "auto";
31
31
  }, function (_ref4) {
32
- var fixedToLeft = _ref4.fixedToLeft,
33
- withCheckbox = _ref4.withCheckbox;
34
- return fixedToLeft >= 0 && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n left: ", "px;\n z-index: 5;\n "])), withCheckbox ? 20 + fixedToLeft : fixedToLeft);
32
+ var fixedToLeft = _ref4.fixedToLeft;
33
+ return fixedToLeft >= 0 ? "".concat(fixedToLeft, "px") : "20px";
34
+ }, function (_ref5) {
35
+ var fixedToLeft = _ref5.fixedToLeft,
36
+ withCheckbox = _ref5.withCheckbox;
37
+ return fixedToLeft >= 0 && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n left: ", "px;\n z-index: 10;\n "])), withCheckbox ? 20 + fixedToLeft : fixedToLeft);
35
38
  });
36
39
 
37
40
  exports.TH = TH;
38
41
 
39
- var TD = _styledComponents.default.td(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n background: inherit;\n box-sizing: border-box;\n display: flex;\n height: 100%;\n min-width: ", ";\n text-align: center;\n vertical-align: middle;\n z-index: 5;\n position: sticky;\n left: 20px;\n .content {\n white-space: nowrap;\n overflow: hidden;\n /* text-overflow: ellipsis; */\n }\n ", "\n"])), function (_ref5) {
40
- var width = _ref5.width;
42
+ var TD = _styledComponents.default.td(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n background: inherit;\n box-sizing: border-box;\n display: flex;\n height: 100%;\n min-width: ", ";\n text-align: center;\n vertical-align: middle;\n z-index: 5;\n position: sticky;\n left: ", ";\n .content {\n white-space: nowrap;\n overflow: hidden;\n /* text-overflow: ellipsis; */\n }\n ", "\n"])), function (_ref6) {
43
+ var width = _ref6.width;
41
44
  return width !== null && width !== void 0 ? width : "auto";
42
- }, function (_ref6) {
43
- var fixedToLeft = _ref6.fixedToLeft,
44
- withCheckbox = _ref6.withCheckbox;
45
- return fixedToLeft >= 0 && (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n left: ", "px;\n z-index: 5;\n "])), withCheckbox ? 20 + fixedToLeft : fixedToLeft);
45
+ }, function (_ref7) {
46
+ var fixedToLeft = _ref7.fixedToLeft;
47
+ return fixedToLeft >= 0 ? "".concat(fixedToLeft, "px") : "20px";
48
+ }, function (_ref8) {
49
+ var fixedToLeft = _ref8.fixedToLeft,
50
+ withCheckbox = _ref8.withCheckbox;
51
+ return fixedToLeft >= 0 && (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n left: ", "px;\n z-index: 10;\n "])), withCheckbox ? 20 + fixedToLeft : fixedToLeft);
46
52
  });
47
53
 
48
54
  exports.TD = TD;
@@ -26,10 +26,10 @@ var Template = function Template(args) {
26
26
  var MultipleEditionDefault = Template.bind({});
27
27
  exports.MultipleEditionDefault = MultipleEditionDefault;
28
28
  MultipleEditionDefault.args = {
29
- articles: [121151, 121152],
29
+ articles: [121219],
30
30
  //[216, 238, 239],
31
- versions: [1, 1],
31
+ versions: [1],
32
32
  //token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIxZmFjNjY2Ny1hMDMzLTQ1NjAtOWU5ZC01MTQwMDc2MmI2MWYiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLW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0ODYyYy02OTYxLTQ5YjktODMwOC1hMDM3Mzg1MjUwYzAiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTcwMjQxMTc0MSwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTcwMjQxNTM0MSwiaWF0IjoxNzAyNDExNzQxLCJlbWFpbCI6ImlzbWFlbDk3bG9wZXpAZ21haWwuY29tIn0.O4Lr5HZLuueNNY1FxqrRBaQZKMgnTXY9IG7KAMkhWO20Dxnfj253sqOme36AbqIAsCQBy77GmnZtTAFs0uF9QBfEDzZXRQ1xcctboGZ9U235LlLdz-BNGoH5QCRXeZsZdXJ1M7yL8IvIdEnXkFC0WYcUMWMRUc6K6vgOvmCCQhzOr-uW-2nsLBGjBb7Tj_okViYvT0Lupo5Z0Z9Xc20oOWnVmrSuaYa1-b4AjOjEOnETA9usnRa6blOVOkHqi5fX8u11ejczINxNBtoizMPOQROuzuuPTvHrl17ae8JkNoxVCJe5ZdfRrUN1lwUXnOZim7QhNg8YR_uvPs_EJRIwfw",
34
34
 
35
35
  };
@@ -174,15 +174,17 @@ var MultipleEdition = function MultipleEdition(_ref) {
174
174
  src: _closeMagenta.default,
175
175
  alt: "Cerrar",
176
176
  onClick: function onClick() {
177
- return onClose && onClose();
178
- }
177
+ window.location.href = "/products";
178
+ } //onClick={() => onClose && onClose()}
179
+
179
180
  }), " "]
180
181
  }), " ", /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
181
182
  className: "table",
182
183
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Table.Table, {
183
184
  withCheckbox: true,
184
185
  columns: currentData.columns,
185
- data: currentData.data
186
+ data: currentData.data,
187
+ withTooltip: true
186
188
  }), " "]
187
189
  }), " ", modalFromTable, " ", /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.Modal, (0, _objectSpread2.default)({}, modal)), " ", showRejectModal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.Modal, {
188
190
  title: "Agregar mensaje de rechazo",
@@ -15,9 +15,9 @@ 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 display: grid;\n grid-template-columns: 75% 25%;\n grid-template-rows: 75px 1fr;\n grid-template-areas:\n \"tabs action_buttons\"\n \"table table\";\n margin: 0 30px;\n body{\n font-family: Roboto;\n }\n\n .tabs {\n grid-area: tabs;\n display: flex;\n align-items: center;\n gap: 0 10px;\n }\n .action_buttons {\n grid-area: action_buttons;\n display: flex;\n align-items: center;\n justify-content: end;\n gap: 0 10px;\n & > * {\n cursor: pointer;\n }\n }\n .table {\n grid-area: table;\n background: red;\n height: 100%;\n font-family: Raleway;\n }\n \n .buttons-container{\n background: white;\n width: max-content;\n padding: 8px;\n border: 1px solid ", ";\n box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25);\n border-radius: 3px;\n position: absolute;\n top: -10%;\n left: 50px;\n z-index: 100;\n }\n\n .validation-button{\n width: 30px;\n height: 20px;\n display: flex;\n align-items: center;\n border: none;\n cursor: pointer;\n color: black;\n font-weight: 400;\n font-size: 13px;\n line-height: 18px;\n background-color: white;\n\n img {\n & + p {\n margin-left: 7px;\n }\n }\n\n &:hover {\n border-radius: 10px;\n }\n\n & + * {\n margin-top: 8px;\n }\n }\n\n .validation-option {\n width: 82px;\n height: 20px;\n display: flex;\n align-items: center;\n border: none;\n cursor: pointer;\n color: black;\n font-weight: 400;\n font-size: 13px;\n line-height: 18px;\n background-color: white;\n left: 7px;\n\n img {\n & + p {\n margin-left: 7px;\n }\n }\n\n &:hover {\n border-radius: 10px;\n }\n\n & + * {\n margin-top: 8px;\n }\n }\n\n td{\n margin:0;\n }\n \n textarea {\n width: 100%;\n border: 1px solid\n ", ";\n\n font-family: ", ";\n color: ", ";\n font-weight: normal;\n font-size: 12px;\n line-height: 15px;\n padding: 10px;\n outline: none;\n border-radius: 2px;\n resize: none;\n\n &:focus {\n border: 1px solid ", ";\n }\n }\n\n .tooltip {\n position: relative;\n display: inline-block;\n }\n \n .tooltiptext {\n visibility: hidden;\n width: 200px;\n background-color: #ffffff;\n color: #000000;\n text-align: center;\n border-radius: 6px;\n position: absolute;\n z-index: 6 important!;\n bottom: 100%;\n left: 20%;\n margin-left: -80px;\n opacity: 0;\n transition: opacity 0.3s;\n box-shadow: 0px 2px 4px 0px #00000040;\n font-family: Roboto;\n font-size: 12px;\n padding: 10px;\n text-align: justify;\n }\n \n\n \n .tooltip:hover .tooltiptext {\n visibility: visible;\n opacity: 1;\n }\n"])), _variables.GlobalColors.s3, function (_ref) {
18
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: grid;\n grid-template-columns: 75% 25%;\n grid-template-rows: 75px 1fr;\n grid-template-areas:\n \"tabs action_buttons\"\n \"table table\";\n margin: 0 30px;\n body{\n font-family: Roboto;\n }\n\n .tabs {\n grid-area: tabs;\n display: flex;\n align-items: center;\n gap: 0 10px;\n }\n .action_buttons {\n grid-area: action_buttons;\n display: flex;\n align-items: center;\n justify-content: end;\n gap: 0 10px;\n & > * {\n cursor: pointer;\n }\n }\n .table {\n grid-area: table;\n background: red;\n height: 100%;\n font-family: Raleway;\n }\n \n .buttons-container{\n display: flex;\n flex-direction: column;\n background: white;\n width: max-content;\n padding: 8px;\n border: 1px solid ", ";\n box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25);\n border-radius: 3px;\n position: absolute;\n top: 0;\n left: 50px;\n z-index: 100;\n }\n\n .validation-button{\n width: 30px;\n height: 20px;\n display: flex;\n align-items: center;\n border: none;\n cursor: pointer;\n color: black;\n font-weight: 400;\n font-size: 13px;\n line-height: 18px;\n background-color: white;\n margin-right:5px;\n img {\n & + p {\n margin-left: 7px;\n }\n }\n\n &:hover {\n border-radius: 10px;\n }\n }\n\n .validation-option {\n display: flex;\n width: 82px;\n height: 20px;\n align-items: center;\n border: none;\n cursor: pointer;\n color: black;\n font-weight: 400;\n font-size: 13px;\n line-height: 18px;\n background-color: white;\n left: 7px;\n\n img {\n & + p {\n margin-left: 7px;\n }\n }\n\n &:hover {\n border-radius: 10px;\n }\n\n & + * {\n margin-top: 8px;\n }\n }\n\n td{\n margin:0;\n }\n \n textarea {\n width: 100%;\n border: 1px solid\n ", ";\n\n font-family: ", ";\n color: ", ";\n font-weight: normal;\n font-size: 12px;\n line-height: 15px;\n padding: 10px;\n outline: none;\n border-radius: 5px;\n resize: none;\n\n &:focus {\n border: 1px solid ", ";\n }\n }\n\n .general-input {\n width: 100%;\n height:27px;\n max-height:100px;\n }\n\n .select-edition-multiple {\n padding: 5px 10px;\n border-radius: 5px;\n gap: 10px;\n border:1px solid ", ";\n border-width: 1px 2px 1px 1px;\n outline: none;\n border-image: initial;\n width: 100%;\n min-height:27px;\n cursor: pointer;\n color: ", ";\n font-size: 12px;\n line-height: 21px;\n overflow:hidden; \n white-space:nowrap; \n text-overflow:ellipsis;\n :focus{\n border:1px solid ", ";\n }\n }\n\n .tooltip {\n position: relative;\n display: inline-block;\n }\n \n .tooltiptext {\n visibility: hidden;\n width: 200px;\n background-color: #ffffff;\n color: #000000;\n text-align: center;\n border-radius: 6px;\n position: absolute;\n z-index: 6 important!;\n bottom: 100%;\n left: 20%;\n margin-left: -80px;\n opacity: 0;\n transition: opacity 0.3s;\n box-shadow: 0px 2px 4px 0px #00000040;\n font-family: Roboto;\n font-size: 12px;\n padding: 10px;\n text-align: justify;\n }\n \n\n \n .tooltip:hover .tooltiptext {\n visibility: visible;\n opacity: 1;\n }\n"])), _variables.GlobalColors.s3, function (_ref) {
19
19
  var isRequired = _ref.isRequired;
20
20
  return isRequired ? "red" : "".concat(_variables.GlobalColors.s2);
21
- }, _variables.FontFamily.AvenirNext, _variables.GlobalColors.deep_gray, _variables.GlobalColors.magenta_s2);
21
+ }, _variables.FontFamily.AvenirNext, _variables.GlobalColors.deep_gray, _variables.GlobalColors.magenta_s2, _variables.GlobalColors.gray_light, _variables.GlobalColors.deep_gray, _variables.GlobalColors.magenta_s2);
22
22
 
23
23
  exports.Container = Container;
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+
3
5
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
6
 
5
7
  Object.defineProperty(exports, "__esModule", {
@@ -48,6 +50,12 @@ var _saveWhiteGray = _interopRequireDefault(require("../../../assets/images/Icon
48
50
 
49
51
  var _iconsMaterial = require("@mui/icons-material");
50
52
 
53
+ var _react = _interopRequireWildcard(require("react"));
54
+
55
+ var _nullIcon = _interopRequireDefault(require("../../../assets/images/generalButton/nullIcon.svg"));
56
+
57
+ var _Tooltip = require("../../atoms/Tooltip");
58
+
51
59
  var _jsxRuntime = require("react/jsx-runtime");
52
60
 
53
61
  // variables
@@ -532,16 +540,76 @@ function setDataColumns(section, dataService, token, setModalFromTable, setDataS
532
540
  Header: rules[attributeId].name,
533
541
  accessor: "".concat(attributeId + "-" + ret.id),
534
542
  width: "200px",
535
- style: styleData
543
+ style: styleData,
544
+ description: rules[attributeId].description
536
545
  });
537
546
  }
538
547
  });
548
+
549
+ var handleChangeOptions = function handleChangeOptions(attributeId, newValue) {
550
+ var updatedAttributes = Object.values(item.attributes).map(function (attr) {
551
+ if (attr.attributeId === attributeId) {
552
+ return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, attr), {}, {
553
+ value: newValue
554
+ });
555
+ }
556
+
557
+ return attr;
558
+ });
559
+ var updatedAttributesObject = {};
560
+ updatedAttributes.forEach(function (attr) {
561
+ updatedAttributesObject[attr.attributeId] = attr;
562
+ });
563
+ return updatedAttributesObject;
564
+ };
565
+
566
+ var inputTypeValue = function inputTypeValue(type) {
567
+ switch (type) {
568
+ case "Booleano":
569
+ return "checkbox";
570
+
571
+ case "Numérico":
572
+ return "number";
573
+
574
+ default:
575
+ return "text";
576
+ }
577
+ };
578
+
539
579
  Object.values(item.attributes).forEach(function (des) {
540
580
  var props = {
541
581
  inputId: item.id + "_" + rules[des.attributeId].attributeId + "_" + item.version,
542
582
  name: item.id + "-" + rules[des.attributeId].attributeId + "-" + item.version,
543
- value: des.value
583
+ value: des.value,
584
+ inputType: inputTypeValue(des.type)
544
585
  };
586
+ var inputComponent;
587
+
588
+ if (des.option_list.length > 0) {
589
+ inputComponent = /*#__PURE__*/(0, _jsxRuntime.jsxs)("select", {
590
+ id: item.id + "_" + rules[des.attributeId].attributeId + "_" + item.version,
591
+ name: item.id + "-" + rules[des.attributeId].attributeId + "-" + item.version,
592
+ className: "select-edition-multiple",
593
+ defaultValue: des.value,
594
+ onChange: function onChange(e) {
595
+ handleChangeOptions(des.attributeId, e.target.value);
596
+ },
597
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
598
+ value: "",
599
+ selected: true,
600
+ disabled: true,
601
+ children: "Selecciona una opci\xF3n"
602
+ }), des.option_list.map(function (option, index) {
603
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
604
+ value: option,
605
+ children: option
606
+ }, index);
607
+ })]
608
+ });
609
+ } else {
610
+ inputComponent = /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, (0, _objectSpread3.default)({}, props));
611
+ }
612
+
545
613
  if (!attributesReviewed.find(function (e) {
546
614
  return e.articleId == item.id && e.attributeId == des.attributeId && e.versionId == item.version;
547
615
  })) attributesReviewed.push({
@@ -570,16 +638,32 @@ function setDataColumns(section, dataService, token, setModalFromTable, setDataS
570
638
  id: "button_" + item.id + "_" + des.attributeId + "_" + item.version,
571
639
  src: _acceptIcon.default,
572
640
  alt: "accept button"
573
- }), " ", attributesReviewed[index].isReviewed && !attributesReviewed[index].isApproved && /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
574
- id: "button_" + item.id + "_" + des.attributeId + "_" + item.version,
575
- src: _rejectIcon.default,
576
- alt: "reject button"
577
- }), " ", typeof des.isApproved === "undefined" && !attributesReviewed[index].isReviewed && /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
578
- id: "button_" + item.id + "_" + des.attributeId + "_" + item.version,
579
- src: _rejectIcon.default,
580
- alt: "reject button"
641
+ }), attributesReviewed[index].isReviewed && !attributesReviewed[index].isApproved && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.Tooltip, {
642
+ position: "topCenter",
643
+ componentTooltip: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
644
+ children: "Debes aprobar o rechazar para continuar"
645
+ }),
646
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
647
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
648
+ id: "button_" + item.id + "_" + des.attributeId + "_" + item.version,
649
+ src: _nullIcon.default,
650
+ alt: "null button"
651
+ })
652
+ })
653
+ }), typeof des.isApproved === "undefined" && !attributesReviewed[index].isReviewed && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.Tooltip, {
654
+ position: "topCenter",
655
+ componentTooltip: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
656
+ children: "Debes aprobar o rechazar para continuar"
657
+ }),
658
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
659
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
660
+ id: "button_" + item.id + "_" + des.attributeId + "_" + item.version,
661
+ src: _nullIcon.default,
662
+ alt: "null button"
663
+ })
664
+ })
581
665
  })]
582
- }), " ", showValidationPanel && attributeSelected.articleId === item.id && attributeSelected.attributeId === des.attributeId && attributeSelected.versionId === item.version && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
666
+ }), showValidationPanel && attributeSelected.articleId === item.id && attributeSelected.attributeId === des.attributeId && attributeSelected.versionId === item.version && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
583
667
  className: "buttons-container",
584
668
  style: {
585
669
  left: "35px"
@@ -613,7 +697,7 @@ function setDataColumns(section, dataService, token, setModalFromTable, setDataS
613
697
  }), " "]
614
698
  }), " ", des.comment && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
615
699
  class: "tooltip",
616
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, (0, _objectSpread3.default)({}, props)), /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
700
+ children: [inputComponent, /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
617
701
  class: "tooltiptext",
618
702
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
619
703
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("b", {
@@ -624,7 +708,7 @@ function setDataColumns(section, dataService, token, setModalFromTable, setDataS
624
708
  })]
625
709
  })]
626
710
  }), !des.comment && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
627
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, (0, _objectSpread3.default)({}, props))
711
+ children: inputComponent
628
712
  })]
629
713
  });
630
714
  });
@@ -670,7 +754,8 @@ function setDataColumns(section, dataService, token, setModalFromTable, setDataS
670
754
  Header: rules[ret.id][descriptionId].name,
671
755
  accessor: "".concat(descriptionId),
672
756
  width: "250px",
673
- style: styleData
757
+ style: styleData,
758
+ description: rules[ret.id][descriptionId].description
674
759
  });
675
760
  }
676
761
  });
@@ -897,35 +982,6 @@ function modalReducer(state, action) {
897
982
  function updateArticleData(_x9, _x10, _x11, _x12, _x13, _x14) {
898
983
  return _updateArticleData.apply(this, arguments);
899
984
  }
900
- /**
901
- * Componentes para guardar y validación multiple
902
- * <img
903
- src={saveWhite}
904
- alt="Guardar"
905
- onClick={() => {
906
- const params = {
907
- section, data: dataServices[section], token, callbackToInitData, setModal,
908
- };
909
- saveData(params);
910
- }}
911
- />
912
-
913
- <SelectV2
914
- items={optionsSelect}
915
- triggerType="click"
916
- selectButton={{
917
- type: "whiteS3",
918
- label: "Validación masiva",
919
- size: 12,
920
- }}
921
- typeSelectItems="labelOnly"
922
- borderType="oval"
923
- onChange={(selectedItems) => {
924
- console.log(selectedItems);
925
- }}
926
- />
927
- */
928
-
929
985
 
930
986
  function _updateArticleData() {
931
987
  _updateArticleData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(version, articleId, attributes, token, setMessage, section) {
@@ -1366,6 +1366,7 @@ var ProductEditionv2 = function ProductEditionv2(_ref) {
1366
1366
  duplicated = imagesList === null || imagesList === void 0 ? void 0 : imagesList.filter(function (image) {
1367
1367
  return imagesListTemp[image === null || image === void 0 ? void 0 : image.image_id];
1368
1368
  });
1369
+ console.log(imagesList);
1369
1370
  attrForImgs = Object.values(images === null || images === void 0 ? void 0 : images.attrForImgs);
1370
1371
  attrForImgs.pop();
1371
1372
  data = {
@@ -1405,19 +1406,19 @@ var ProductEditionv2 = function ProductEditionv2(_ref) {
1405
1406
  }
1406
1407
 
1407
1408
  if (!(valid && (duplicated === null || duplicated === void 0 ? void 0 : duplicated.length) === 0)) {
1408
- _context14.next = 31;
1409
+ _context14.next = 32;
1409
1410
  break;
1410
1411
  }
1411
1412
 
1412
1413
  setLoading(true);
1413
- _context14.prev = 11;
1414
+ _context14.prev = 12;
1414
1415
  data === null || data === void 0 ? void 0 : (_data$articleData3 = data.articleData) === null || _data$articleData3 === void 0 ? void 0 : _data$articleData3.forEach(function (e) {
1415
1416
  e.uuid = (0, _uuid.v4)();
1416
1417
  });
1417
1418
  setDataImages(data);
1418
1419
 
1419
1420
  if (!((data === null || data === void 0 ? void 0 : (_data$articleData4 = data.articleData) === null || _data$articleData4 === void 0 ? void 0 : _data$articleData4.length) > 0)) {
1420
- _context14.next = 23;
1421
+ _context14.next = 24;
1421
1422
  break;
1422
1423
  }
1423
1424
 
@@ -1433,40 +1434,40 @@ var ProductEditionv2 = function ProductEditionv2(_ref) {
1433
1434
  };
1434
1435
  promiseArray.push(myBucket.putObject(params).promise());
1435
1436
  });
1436
- _context14.next = 20;
1437
+ _context14.next = 21;
1437
1438
  return Promise.all(promiseArray);
1438
1439
 
1439
- case 20:
1440
+ case 21:
1440
1441
  setImagesUploaded(true);
1441
- _context14.next = 24;
1442
+ _context14.next = 25;
1442
1443
  break;
1443
1444
 
1444
- case 23:
1445
+ case 24:
1445
1446
  setImagesUploaded(true);
1446
1447
 
1447
- case 24:
1448
- _context14.next = 29;
1448
+ case 25:
1449
+ _context14.next = 30;
1449
1450
  break;
1450
1451
 
1451
- case 26:
1452
- _context14.prev = 26;
1453
- _context14.t0 = _context14["catch"](11);
1452
+ case 27:
1453
+ _context14.prev = 27;
1454
+ _context14.t0 = _context14["catch"](12);
1454
1455
  console.log(_context14.t0); // setMainLoading(false);
1455
1456
 
1456
- case 29:
1457
- _context14.next = 32;
1457
+ case 30:
1458
+ _context14.next = 33;
1458
1459
  break;
1459
1460
 
1460
- case 31:
1461
+ case 32:
1461
1462
  // setMainLoading(false);
1462
1463
  setMessage("Completa los campos que solicita cada una de la imágenes o hay imágenes con el mismo tipo de toma.\nRecuerda hay campos obligatorios y no podras avanzar si no estan completos.");
1463
1464
 
1464
- case 32:
1465
+ case 33:
1465
1466
  case "end":
1466
1467
  return _context14.stop();
1467
1468
  }
1468
1469
  }
1469
- }, _callee14, null, [[11, 26]]);
1470
+ }, _callee14, null, [[12, 27]]);
1470
1471
  })), [images, imagesUploaded]);
1471
1472
  (0, _react.useEffect)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
1472
1473
  var res;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ function generateThumbnail(videoSrc, timeInSeconds) {
13
+ return new Promise(function (resolve, reject) {
14
+ var video = document.createElement('video');
15
+ video.crossOrigin = 'anonymous'; // Necessary for CORS-enabled videos
16
+
17
+ video.src = videoSrc;
18
+ video.currentTime = timeInSeconds; // Set the time to capture the desired frame
19
+
20
+ video.addEventListener('loadeddata', function () {
21
+ var canvas = document.createElement('canvas');
22
+ canvas.width = video.videoWidth;
23
+ canvas.height = video.videoHeight;
24
+ canvas.getContext('2d').drawImage(video, 0, 0, canvas.width, canvas.height);
25
+ var dataURL = canvas.toDataURL('image/jpeg'); // Change format if needed
26
+
27
+ resolve(dataURL);
28
+ });
29
+ video.addEventListener('error', reject);
30
+ });
31
+ }
32
+
33
+ var _default = generateThumbnail;
34
+ exports.default = _default;