contentoh-components-library 21.3.11 → 21.3.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 (125) hide show
  1. package/.env.development +0 -5
  2. package/dist/assets/images/generalButton/closeIcon.svg +2 -2
  3. package/dist/components/atoms/ButtonFileChooser/index.js +25 -33
  4. package/dist/components/atoms/ImagePreview/index.js +0 -14
  5. package/dist/components/atoms/ProgressBar/index.js +6 -36
  6. package/dist/components/atoms/ProgressBar/styles.js +3 -11
  7. package/dist/components/molecules/ButtonDownloadFile/index.js +2 -2
  8. package/dist/components/molecules/CustomSelect/CustomSelect.stories.js +22 -21
  9. package/dist/components/molecules/CustomSelect/SelectItem.js +1 -10
  10. package/dist/components/molecules/HeaderTop/index.js +6 -23
  11. package/dist/components/molecules/HeaderTop/styles.js +1 -1
  12. package/dist/components/molecules/ProductNameHeader/index.js +4 -6
  13. package/dist/components/organisms/Chat/ContainerItems/index.js +15 -49
  14. package/dist/components/organisms/Chat/ContentChat/index.js +81 -131
  15. package/dist/components/organisms/Chat/Footer/index.js +25 -33
  16. package/dist/components/organisms/FullProductNameHeader/index.js +0 -1
  17. package/dist/components/pages/Dashboard/index.js +21 -13
  18. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +50 -65
  19. package/dist/components/pages/ProviderProductEdition/index.js +11 -15
  20. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +86 -60
  21. package/dist/components/pages/RetailerProductEdition/index.js +12 -13
  22. package/dist/global-files/fonts.css +0 -6
  23. package/dist/global-files/handle_http.js +7 -9
  24. package/dist/global-files/utils.js +3 -9
  25. package/dist/global-files/variables.js +0 -2
  26. package/dist/index.js +46 -267
  27. package/package.json +1 -12
  28. package/src/assets/images/generalButton/closeIcon.svg +2 -2
  29. package/src/components/atoms/ProgressBar/index.js +5 -40
  30. package/src/components/atoms/ProgressBar/styles.js +0 -24
  31. package/src/components/molecules/CustomSelect/CustomSelect.stories.js +12 -20
  32. package/src/components/molecules/CustomSelect/SelectItem.js +0 -7
  33. package/src/components/molecules/HeaderTop/index.js +8 -29
  34. package/src/components/molecules/HeaderTop/styles.js +0 -4
  35. package/src/components/molecules/ProductNameHeader/index.js +2 -7
  36. package/src/components/organisms/FullProductNameHeader/index.js +0 -1
  37. package/src/components/pages/Dashboard/index.js +37 -31
  38. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +49 -67
  39. package/src/components/pages/ProviderProductEdition/index.js +7 -16
  40. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +85 -62
  41. package/src/components/pages/RetailerProductEdition/index.js +10 -12
  42. package/src/global-files/fonts.css +0 -6
  43. package/src/global-files/variables.js +0 -2
  44. package/src/index.js +0 -17
  45. package/src/assets/images/customSelect/starIcon.svg +0 -14
  46. package/src/assets/images/defaultImages/Spinner.gif +0 -0
  47. package/src/assets/images/defaultImages/notFound.svg +0 -124
  48. package/src/components/atoms/ButtonFileChooser/ButtonFileChooser.stories.js +0 -47
  49. package/src/components/atoms/ButtonFileChooser/index.js +0 -69
  50. package/src/components/atoms/ButtonFileChooser/styles.js +0 -4
  51. package/src/components/atoms/ButtonV2/ButtonV2.stories.js +0 -53
  52. package/src/components/atoms/ButtonV2/index.js +0 -85
  53. package/src/components/atoms/ButtonV2/styles.js +0 -217
  54. package/src/components/atoms/CustomIcon/CustomIcon.stories.js +0 -36
  55. package/src/components/atoms/CustomIcon/index.js +0 -41
  56. package/src/components/atoms/CustomIcon/styles.js +0 -85
  57. package/src/components/atoms/IconFile/IconFile.stories.js +0 -35
  58. package/src/components/atoms/IconFile/index.js +0 -119
  59. package/src/components/atoms/IconFile/styles.js +0 -67
  60. package/src/components/atoms/Image/Image.stories.js +0 -51
  61. package/src/components/atoms/Image/index.js +0 -55
  62. package/src/components/atoms/Image/styles.js +0 -34
  63. package/src/components/atoms/ImageLink/ImageLink.stories.js +0 -43
  64. package/src/components/atoms/ImageLink/index.js +0 -57
  65. package/src/components/atoms/ImageLink/styles.js +0 -30
  66. package/src/components/atoms/ImagePreview/ImagePreview.stories.js +0 -52
  67. package/src/components/atoms/ImagePreview/index.js +0 -191
  68. package/src/components/atoms/ImagePreview/styles.js +0 -77
  69. package/src/components/atoms/InputText/InputText.stories.js +0 -39
  70. package/src/components/atoms/InputText/index.js +0 -61
  71. package/src/components/atoms/InputText/styles.js +0 -89
  72. package/src/components/atoms/NotFound/NotFound.stories.js +0 -19
  73. package/src/components/atoms/NotFound/index.js +0 -52
  74. package/src/components/atoms/NotFound/styles.js +0 -55
  75. package/src/components/atoms/SelectItemV2/SelectItemV2.stories.js +0 -26
  76. package/src/components/atoms/SelectItemV2/index.js +0 -61
  77. package/src/components/atoms/SelectItemV2/styles.js +0 -90
  78. package/src/components/atoms/Tooltip/Tooltip.stories.js +0 -51
  79. package/src/components/atoms/Tooltip/index.js +0 -59
  80. package/src/components/atoms/Tooltip/styles.js +0 -42
  81. package/src/components/molecules/ButtonDownloadFile/DownloadFile.stories.js +0 -54
  82. package/src/components/molecules/ButtonDownloadFile/index.js +0 -111
  83. package/src/components/molecules/ButtonDownloadFile/styles.js +0 -66
  84. package/src/components/molecules/Dropdown/Dropdown.stories.js +0 -103
  85. package/src/components/molecules/Dropdown/index.js +0 -150
  86. package/src/components/molecules/Dropdown/styles.js +0 -75
  87. package/src/components/molecules/ImageTooltip/ImageTooltip.stories.js +0 -68
  88. package/src/components/molecules/ImageTooltip/index.js +0 -63
  89. package/src/components/molecules/ImageTooltip/styles.js +0 -18
  90. package/src/components/molecules/SelectV2/SelectV2.stories.js +0 -115
  91. package/src/components/molecules/SelectV2/index.js +0 -357
  92. package/src/components/molecules/SelectV2/styles.js +0 -105
  93. package/src/components/molecules/SelectV2/test.js +0 -61
  94. package/src/components/molecules/SelectV2/test.stories.js +0 -10
  95. package/src/components/organisms/Chat/Chat.stories.js +0 -147
  96. package/src/components/organisms/Chat/ChatLists/ChatLists.stories.js +0 -65
  97. package/src/components/organisms/Chat/ChatLists/Rotoplas.jpeg +0 -0
  98. package/src/components/organisms/Chat/ChatLists/THD.png +0 -0
  99. package/src/components/organisms/Chat/ChatLists/index.js +0 -141
  100. package/src/components/organisms/Chat/ChatLists/styles.js +0 -162
  101. package/src/components/organisms/Chat/ContainerItems/ContainerItems.stories.js +0 -142
  102. package/src/components/organisms/Chat/ContainerItems/index.js +0 -550
  103. package/src/components/organisms/Chat/ContainerItems/styles.js +0 -328
  104. package/src/components/organisms/Chat/ContentChat/ContentChat.stories.js +0 -102
  105. package/src/components/organisms/Chat/ContentChat/Rotoplas.jpeg +0 -0
  106. package/src/components/organisms/Chat/ContentChat/THD.png +0 -0
  107. package/src/components/organisms/Chat/ContentChat/index.js +0 -947
  108. package/src/components/organisms/Chat/ContentChat/styles.js +0 -41
  109. package/src/components/organisms/Chat/Footer/Footer.stories.js +0 -22
  110. package/src/components/organisms/Chat/Footer/index.js +0 -669
  111. package/src/components/organisms/Chat/Footer/styles.js +0 -286
  112. package/src/components/organisms/Chat/Header/Header.stories.js +0 -66
  113. package/src/components/organisms/Chat/Header/index.js +0 -94
  114. package/src/components/organisms/Chat/Header/styles.js +0 -49
  115. package/src/components/organisms/Chat/index.js +0 -235
  116. package/src/components/organisms/Chat/styles.js +0 -42
  117. package/src/components/organisms/Modal/Modal.stories.js +0 -55
  118. package/src/components/organisms/Modal/index.js +0 -97
  119. package/src/components/organisms/Modal/styles.js +0 -103
  120. package/src/components/organisms/RangeCalendar/RangeCalendar.stories.js +0 -16
  121. package/src/components/organisms/RangeCalendar/index.js +0 -121
  122. package/src/components/organisms/RangeCalendar/styles.js +0 -883
  123. package/src/global-files/handle_http.js +0 -231
  124. package/src/global-files/handle_userTech.js +0 -7
  125. package/src/global-files/utils.js +0 -322
package/.env.development CHANGED
@@ -21,9 +21,6 @@ REACT_APP_READ_REQUIRED_ORDERS=https://fc069ovhuk.execute-api.us-east-1.amazonaw
21
21
  REACT_APP_CATEGORY_ENDPOINT=https://fc069ovhuk.execute-api.us-east-1.amazonaws.com/dev/categories
22
22
  REACT_APP_READ_PROVIDERS=https://fc069ovhuk.execute-api.us-east-1.amazonaws.com/dev/providers
23
23
  REACT_APP_PENDING_INVITATIONS=https://fc069ovhuk.execute-api.us-east-1.amazonaws.com/dev/pending-invitations
24
- REACT_APP_PRODUCTS_CHAT_ENDPOINT=https://fc069ovhuk.execute-api.us-east-1.amazonaws.com/dev/products-chat
25
- REACT_APP_TICKETS_CHAT_ENDPOINT=https://ocqbzaa4a2.execute-api.us-east-1.amazonaws.com/dev/ticket-chat
26
- REACT_APP_IMAGES_ENDPOINT=https://content-management-images.s3.amazonaws.com
27
24
 
28
25
  REACT_APP_IMAGES_BUCKET=content-management-images
29
26
  REACT_APP_IMAGES_PROFILE_BUCKET=content-management-profile
@@ -31,5 +28,3 @@ REACT_APP_KUTS3=AKIA5CPHLQTTS22HCGHW
31
28
  REACT_APP_AKUTS3=RSpwEaM0fsLEgN7BJzRyCKqyU0lNExTsPUvxyNXm
32
29
  REACT_APP_USER_POOL_ID=us-east-1_XMZQdqkGj
33
30
  REACT_APP_USER_POOL_WEB_CLIENT_ID=5ac8tpgs6gbsq13frvrpieep40
34
- REACT_APP_KEY_UPLOAD_TO_S3=AKIA5CPHLQTTYNYWQ2TM
35
- REACT_APP_ACCESS_KEY_UPLOAD_TO_S3=zGYWR4rW52rqg1bW1CrC00zBXv2od0mNCF8WGcvr
@@ -1,4 +1,4 @@
1
1
  <svg width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <line x1="13.3585" y1="12.1333" x2="39.8661" y2="38.641" stroke="#E33AA9" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
3
- <path d="M39.8672 12.1333L13.8672 38.1333" stroke="#E33AA9" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
2
+ <line x1="13.3585" y1="12.1333" x2="39.8661" y2="38.641" stroke="#E33AA9" stroke-width="1.73333" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path d="M39.8672 12.1333L13.8672 38.1333" stroke="#E33AA9" stroke-width="1.73333" stroke-linecap="round" stroke-linejoin="round"/>
4
4
  </svg>
@@ -55,43 +55,35 @@ var ButtonFileChooser = function ButtonFileChooser(props) {
55
55
  if (multipleFiles) chooser.multiple = true;
56
56
  if (filters) chooser.accept = filters; // "image/*,text/*,application/*"
57
57
 
58
- chooser.onchange = /*#__PURE__*/function () {
59
- var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(event) {
60
- var _iterator, _step, file;
61
-
62
- return _regenerator.default.wrap(function _callee$(_context) {
63
- while (1) {
64
- switch (_context.prev = _context.next) {
65
- case 0:
66
- //console.log("files:", chooser.files);
67
- _iterator = (0, _createForOfIteratorHelper2.default)(chooser.files);
68
-
69
- try {
70
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
71
- file = _step.value;
72
- files.push(file);
73
- }
74
- } catch (err) {
75
- _iterator.e(err);
76
- } finally {
77
- _iterator.f();
58
+ chooser.onchange = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
59
+ var _iterator, _step, file;
60
+
61
+ return _regenerator.default.wrap(function _callee$(_context) {
62
+ while (1) {
63
+ switch (_context.prev = _context.next) {
64
+ case 0:
65
+ _iterator = (0, _createForOfIteratorHelper2.default)(chooser.files);
66
+
67
+ try {
68
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
69
+ file = _step.value;
70
+ files.push(file);
78
71
  }
72
+ } catch (err) {
73
+ _iterator.e(err);
74
+ } finally {
75
+ _iterator.f();
76
+ }
79
77
 
80
- onChangeFiles && onChangeFiles(files);
78
+ onChangeFiles && onChangeFiles(files);
81
79
 
82
- case 3:
83
- case "end":
84
- return _context.stop();
85
- }
80
+ case 3:
81
+ case "end":
82
+ return _context.stop();
86
83
  }
87
- }, _callee);
88
- }));
89
-
90
- return function (_x) {
91
- return _ref.apply(this, arguments);
92
- };
93
- }();
94
-
84
+ }
85
+ }, _callee);
86
+ }));
95
87
  document.body.appendChild(chooser);
96
88
  chooser.click();
97
89
  document.body.removeChild(chooser);
@@ -125,20 +125,6 @@ var ImagePreview = function ImagePreview(props) {
125
125
  link.click();
126
126
  document.body.removeChild(link);
127
127
  };
128
- /* solo para hacer pruebas en modo dev
129
- useEffect(() => {
130
- setTimeout(() => {
131
- setLoading(false);
132
- }, 5000);
133
- }, []); */
134
-
135
- /*
136
- useEffect(() => {
137
- console.log("imgURL:", imgURL);
138
- console.log("modalImgURL:", modalImgURL);
139
- }, []);
140
- */
141
-
142
128
 
143
129
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
144
130
  className: className,
@@ -7,46 +7,16 @@ exports.ProgressBar = void 0;
7
7
 
8
8
  var _styles = require("./styles");
9
9
 
10
- var _Tooltip = require("../Tooltip");
11
-
12
10
  var _jsxRuntime = require("react/jsx-runtime");
13
11
 
14
12
  var ProgressBar = function ProgressBar(_ref) {
15
13
  var percent = _ref.percent,
16
- progressBarType = _ref.progressBarType,
17
- percentRequired = _ref.percentRequired;
18
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
19
- children: [percentRequired ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
20
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.Tooltip, {
21
- componentTooltip: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
22
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
23
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("b", {
24
- children: "Campos requeridos"
25
- })
26
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
27
- children: ["Este nuevo icono te indicar\xE1 cuando ", /*#__PURE__*/(0, _jsxRuntime.jsx)("br", {}), " completes todos los campos requeridos"]
28
- })]
29
- }),
30
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.ContainerIcon, {
31
- className: "fondo",
32
- percentageRequired: percentRequired,
33
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
34
- class: "hola",
35
- children: "local_police"
36
- })
37
- }),
38
- classNameTooltip: "container-tooltip",
39
- position: undefined,
40
- addArrow: undefined,
41
- transitionType: undefined,
42
- followCursor: undefined
43
- })
44
- }) : "", /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
45
- className: "status-".concat(progressBarType),
46
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
47
- children: [percent, "%"]
48
- })
49
- })]
14
+ progressBarType = _ref.progressBarType;
15
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
16
+ className: "status-".concat(progressBarType),
17
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
18
+ children: [percent, "%"]
19
+ })
50
20
  });
51
21
  };
52
22
 
@@ -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.ContainerIcon = exports.Container = void 0;
8
+ exports.Container = void 0;
9
9
 
10
10
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
11
11
 
@@ -13,18 +13,10 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
13
13
 
14
14
  var _variables = require("../../../global-files/variables");
15
15
 
16
- var _templateObject, _templateObject2;
16
+ var _templateObject;
17
17
 
18
18
  var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n width: fit-content;\n height: 27px;\n padding: 4px;\n border-radius: 15px;\n font-family: ", ";\n font-weight: 600;\n font-size: 14px;\n line-height: 19px;\n color: ", ";\n\n &.status-CA,\n &.status-IE {\n background-color: ", ";\n }\n\n &.status-R,\n &.status-AS,\n &.status-PA {\n background-color: ", ";\n }\n\n &.status-AA,\n &.status-AP,\n &.status-ACA,\n &.status-AC {\n background-color: ", ";\n }\n\n &.status-RA,\n &.status-RC,\n &.status-RP,\n &.status-RCA {\n background-color: ", ";\n }\n\n &.status-Dat,\n &.status-Dsc,\n &.status-Imgs {\n background-color: ", ";\n }\n\n &.status-Ex {\n background-color: ", ";\n }\n\n &.status-DDI {\n background-color: ", ";\n }\n\n &.status-GLD {\n background-color: ", ";\n }\n\n &.status-TAB {\n background-color: ", ";\n }\n\n &.status-Pt {\n background-color: ", ";\n color: ", ";\n }\n"])), _variables.GlobalColors.s3, _variables.FontFamily.AvenirNext, function (backgroundColor) {
19
19
  return backgroundColor === "s2" || backgroundColor === "s1" ? _variables.GlobalColors.s4 : _variables.GlobalColors.white;
20
20
  }, _variables.GlobalColors.in_progress, _variables.GlobalColors.reception, _variables.GlobalColors.finished, _variables.GlobalColors.rejected_status, _variables.GlobalColors.s4, _variables.GlobalColors.exported, _variables.GlobalColors.original_purpura, _variables.GlobalColors.in_progress, _variables.GlobalColors.deep_gray, _variables.GlobalColors.s2, _variables.GlobalColors.s4);
21
21
 
22
- exports.Container = Container;
23
-
24
- var ContainerIcon = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n cursor: pointer;\n @font-face {\n font-family: \"Material Symbols Outlined\";\n font-style: normal;\n font-weight: 100 700;\n src: url(https://fonts.gstatic.com/s/materialsymbolsoutlined/v68/kJEhBvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oFsLjBuVY.woff2)\n format(\"woff2\");\n }\n\n .hola {\n font-family: \"Material Symbols Outlined\";\n font-size: 30px;\n //line-height: 1;\n margin-top: 10px;\n }\n .hola {\n font-variation-settings: \"FILL\"\n ", ",\n \"wght\" 400, \"GRAD\" 0, \"opsz\" 48;\n color: ", ";\n }\n"])), function (props) {
25
- return props.percentageRequired < 100 ? 0 : 1;
26
- }, function (props) {
27
- return props.percentageRequired < 100 ? "#d4d1d7" : "#e33aa9";
28
- });
29
-
30
- exports.ContainerIcon = ContainerIcon;
22
+ exports.Container = Container;
@@ -128,12 +128,12 @@ var ButtonDownloadFile = function ButtonDownloadFile(props) {
128
128
  borderType: borderType,
129
129
  onMouseEnter: function onMouseEnter(event) {
130
130
  if (!showDownload) {
131
- setShowDownload(true); //console.log("showDownload");
131
+ setShowDownload(true);
132
132
  }
133
133
  },
134
134
  onMouseLeave: function onMouseLeave(event) {
135
135
  if (!loading) {
136
- setShowDownload(false); //console.log("showIconFile");
136
+ setShowDownload(false);
137
137
  }
138
138
  },
139
139
  children: showDownload ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
@@ -11,8 +11,6 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/
11
11
 
12
12
  var _index = require("./index");
13
13
 
14
- var _starIcon = _interopRequireDefault(require("../../../assets/images/customSelect/starIcon.svg"));
15
-
16
14
  var _jsxRuntime = require("react/jsx-runtime");
17
15
 
18
16
  var _default = {
@@ -28,26 +26,29 @@ var Template = function Template(args) {
28
26
  var CustomSelectDefault = Template.bind({});
29
27
  exports.CustomSelectDefault = CustomSelectDefault;
30
28
  CustomSelectDefault.args = {
31
- // selectLabel: "Todos los departamentos",
29
+ selectLabel: "Todos los departamentos",
32
30
  defaultOption: "Todos los departamentos",
33
31
  options: [{
34
- id: 47,
35
- name: "Enero 2023",
36
- isSelected: true
32
+ id: 1,
33
+ value: "Decoración",
34
+ subOptions: [{
35
+ id: 1,
36
+ value: "Espejos"
37
+ }, {
38
+ id: 2,
39
+ value: "Persianas"
40
+ }]
41
+ }, {
42
+ id: 2,
43
+ value: "Eléctrico"
44
+ }, {
45
+ id: 3,
46
+ value: "Ferretería"
47
+ }, {
48
+ id: 4,
49
+ value: "Herramientas"
37
50
  }, {
38
- id: 49,
39
- name: "Mis Favoritos"
40
- }],
41
- onClickItem: function onClickItem(v, id) {
42
- if (v) {
43
- console.log("Agregar a la lista", id);
44
- } else {
45
- console.log("Eliminar a la lista", id);
46
- }
47
- },
48
- icon: _starIcon.default,
49
- showSearchBar: true,
50
- customOptions: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
51
- children: "Esto es un customOptions"
52
- })
51
+ id: 5,
52
+ value: "Iluminación"
53
+ }]
53
54
  };
@@ -26,8 +26,7 @@ var SelecItem = function SelecItem(_ref) {
26
26
  customSelectId = _ref.customSelectId,
27
27
  setParameterArray = _ref.setParameterArray,
28
28
  activeFilters = _ref.activeFilters,
29
- setActiveFilters = _ref.setActiveFilters,
30
- onClickItem = _ref.onClickItem;
29
+ setActiveFilters = _ref.setActiveFilters;
31
30
 
32
31
  var _useState = (0, _react.useState)(false),
33
32
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
@@ -47,10 +46,6 @@ var SelecItem = function SelecItem(_ref) {
47
46
  id: "main-item-" + option.id,
48
47
  label: option.name,
49
48
  onChange: function onChange(e) {
50
- if (onClickItem) {
51
- onClickItem(e.target.checked, option.id);
52
- }
53
-
54
49
  var subOptions = option.subOptions;
55
50
  var filtersCopy = (0, _objectSpread2.default)({}, activeFilters);
56
51
 
@@ -113,10 +108,6 @@ var SelecItem = function SelecItem(_ref) {
113
108
  label: sub.name,
114
109
  defaultChecked: activeFilters[option.name] && activeFilters[option.name][sub.name],
115
110
  onChange: function onChange(e) {
116
- if (onClickItem) {
117
- onClickItem(e.target.checked, sub.id);
118
- }
119
-
120
111
  if (e.target.checked) {
121
112
  setParameterArray(function (current) {
122
113
  return [].concat((0, _toConsumableArray2.default)(current), [sub.id]).sort(function (a, b) {
@@ -13,15 +13,10 @@ var _index2 = require("../../atoms/GeneralButton/index");
13
13
 
14
14
  var _react = require("react");
15
15
 
16
- var _Chat = require("../../organisms/Chat");
17
-
18
16
  var _jsxRuntime = require("react/jsx-runtime");
19
17
 
20
18
  var HeaderTop = function HeaderTop(_ref) {
21
- var setHeaderTop = _ref.setHeaderTop,
22
- withChat = _ref.withChat,
23
- productSelected = _ref.productSelected,
24
- token = _ref.token;
19
+ var setHeaderTop = _ref.setHeaderTop;
25
20
  var headerTop = (0, _react.useRef)();
26
21
  (0, _react.useEffect)(function () {
27
22
  setHeaderTop && setHeaderTop(headerTop.current.clientHeight);
@@ -30,23 +25,11 @@ var HeaderTop = function HeaderTop(_ref) {
30
25
  ref: headerTop,
31
26
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
32
27
  text: "Edici\xF3n de producto"
33
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
34
- className: "buttons-top",
35
- children: [withChat && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chat.Chat, {
36
- chatType: "merchant_product",
37
- chatContainerType: "popUp",
38
- chatData: {
39
- userToken: token,
40
- id: productSelected.id_article,
41
- version: productSelected.version
42
- },
43
- size: 18
44
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Button, {
45
- buttonType: "close-button",
46
- onClick: function onClick() {
47
- window.location.href = "/products";
48
- }
49
- })]
28
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Button, {
29
+ buttonType: "close-button",
30
+ onClick: function onClick() {
31
+ window.location.href = "/products";
32
+ }
50
33
  })]
51
34
  });
52
35
  };
@@ -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 display: flex;\n justify-content: space-between;\n .buttons-top {\n display: flex;\n align-items: center;\n }\n"])));
16
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n"])));
17
17
 
18
18
  exports.Container = Container;
@@ -22,18 +22,16 @@ var ProductNameHeader = function ProductNameHeader(_ref) {
22
22
  statusType = _ref.statusType,
23
23
  percent = _ref.percent,
24
24
  priority = _ref.priority,
25
- date = _ref.date,
26
- percentRequired = _ref.percentRequired;
25
+ date = _ref.date;
27
26
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
28
27
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
29
28
  headerType: "product-name-header",
30
29
  text: productName
31
- }), statusType && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Status, {
30
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Status, {
32
31
  statusType: statusType
33
32
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index3.ProgressBar, {
34
- percent: percentRequired,
35
- progressBarType: statusType,
36
- percentRequired: percentRequired
33
+ percent: percent,
34
+ progressBarType: statusType
37
35
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index4.PriorityFlag, {
38
36
  priority: priority
39
37
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
@@ -81,32 +81,9 @@ var ContainerItems = function ContainerItems(props) {
81
81
  setModalAlert = _useState8[1];
82
82
 
83
83
  var containerList = (0, _react.useRef)(null);
84
- /*
85
- useEffect(() => {
86
- //console.log("new observer");
87
- const observer = new MutationObserver((mutationList) => {
88
- updateScroll();
89
- });
90
- const itemsList = document.getElementById("ulItems");
91
- const observerOptions = {
92
- attributes: false,
93
- childList: true,
94
- subtree: false,
95
- characterData: false,
96
- attributeOldValue: false,
97
- characterDataOldValue: false,
98
- };
99
- observer.observe(itemsList, observerOptions);
100
- return () => {
101
- observer.disconnect();
102
- //console.log("remove observer");
103
- };
104
- }, [scrollHeight]);
105
- */
106
-
107
84
  (0, _react.useEffect)(function () {
108
85
  if (!items) return;
109
- if (chatType === "merchant_product") renderItems();else if (chatType === "order_product") renderItems();else if (chatType === "ticket") renderItemsTicket();else setCustomItems([]);
86
+ if (["merchant_product", "order_product"].includes(chatType)) renderItems();else if (chatType === "ticket") renderItemsTicket();else setCustomItems([]);
110
87
  }, [items]);
111
88
 
112
89
  var updateScroll = function updateScroll() {
@@ -115,13 +92,6 @@ var ContainerItems = function ContainerItems(props) {
115
92
  if (containerScroll) {
116
93
  var newScrollHeight = containerScroll.scrollHeight + 15;
117
94
  var positionScroll = newScrollHeight - scrollHeight;
118
- /*
119
- console.log("========");
120
- console.log("old:", scrollHeight);
121
- console.log("new:", newScrollHeight);
122
- console.log("pos:", positionScroll);
123
- console.log("========");
124
- */
125
95
 
126
96
  if (newScrollHeight !== scrollHeight) {
127
97
  containerScroll.scrollTop = positionScroll;
@@ -213,12 +183,10 @@ var ContainerItems = function ContainerItems(props) {
213
183
  var value = (0, _utils.decodeJSON)(item.value);
214
184
  var originalImgURL = "".concat(process.env.REACT_APP_IMAGES_ENDPOINT, "/").concat(value.key); // dimensiones de la imagen a mostrar en el chat
215
185
 
216
- var imgHeight = (0, _utils.getResizeImgHeight)((_value$width = value.width) !== null && _value$width !== void 0 ? _value$width : 400, (_value$height = value.height) !== null && _value$height !== void 0 ? _value$height : 400, 400); //console.log("newHeight imgURL:", imgHeight);
217
-
186
+ var imgHeight = (0, _utils.getResizeImgHeight)((_value$width = value.width) !== null && _value$width !== void 0 ? _value$width : 400, (_value$height = value.height) !== null && _value$height !== void 0 ? _value$height : 400, 400);
218
187
  var imgURL = (0, _utils.getImageURL)(process.env.REACT_APP_IMAGES_BUCKET, value.key, 400, imgHeight); // dimensiones de la imagen a mostrar en modal full
219
188
 
220
- var modalImgHeight = (0, _utils.getResizeImgHeight)((_value$width2 = value.width) !== null && _value$width2 !== void 0 ? _value$width2 : screen.width, (_value$height2 = value.height) !== null && _value$height2 !== void 0 ? _value$height2 : screen.height, screen.width); //console.log("height full:", modalImgHeight);
221
-
189
+ var modalImgHeight = (0, _utils.getResizeImgHeight)((_value$width2 = value.width) !== null && _value$width2 !== void 0 ? _value$width2 : screen.width, (_value$height2 = value.height) !== null && _value$height2 !== void 0 ? _value$height2 : screen.height, screen.width);
222
190
  var modalImgURL = (0, _utils.getImageURL)(process.env.REACT_APP_IMAGES_BUCKET, value.key, screen.width, modalImgHeight);
223
191
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
224
192
  className: "item-img",
@@ -324,7 +292,7 @@ var ContainerItems = function ContainerItems(props) {
324
292
  timeout: 500,
325
293
  container: containerList.current,
326
294
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("li", {
327
- className: (ownMessage ? "own-message " : "") + (lastUserId == item.userId ? "sameUser" : ""),
295
+ className: (ownMessage ? "own-message " : "") + (lastUserId === item.userId ? "sameUser" : ""),
328
296
  children: [lastUserId !== item.userId && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageTooltip.ImageTooltip, {
329
297
  className: "container-imgUser",
330
298
  sizeLoading: 25,
@@ -377,11 +345,12 @@ var ContainerItems = function ContainerItems(props) {
377
345
  // manejo de las etiquetas fechas
378
346
  if (!date) {
379
347
  date = (0, _utils.getFullDate)(new Date(item.date));
348
+ jsxItems.push(renderGrayLabel(date, "itemDate-".concat(countDate++)));
380
349
  } else {
381
350
  var newDate = (0, _utils.getFullDate)(new Date(item.date));
382
351
 
383
352
  if (newDate !== date) {
384
- jsxItems.push(renderGrayLabel(date, "itemDate-".concat(countDate++)));
353
+ jsxItems.push(renderGrayLabel(newDate, "itemDate-".concat(countDate++)));
385
354
  date = newDate;
386
355
  }
387
356
  } // elementos que van alineados al centro
@@ -390,25 +359,25 @@ var ContainerItems = function ContainerItems(props) {
390
359
  switch (item.type) {
391
360
  case "statusArticle":
392
361
  jsxItems.push(renderStatusArticle(item.value, "item-".concat(item.id)));
393
- continue;
362
+ break;
394
363
 
395
364
  case "statusService":
396
365
  jsxItems.push(renderStatusService(item.value, "item-".concat(item.id)));
397
- continue;
366
+ break;
398
367
  } // acomodo del item (left o right)
399
368
 
400
369
 
401
370
  var ownMessage = false; // CHAT MERCHANT ARTICLE
402
371
 
403
372
  if (chatType === "merchant_product") {
404
- if (currentUser.companyId == users[item.userId].companyId) {
373
+ if (currentUser.companyId === users[item.userId].companyId) {
405
374
  ownMessage = true;
406
375
  }
407
376
  } // CHAT ORDER ARTICLE
408
377
  else if (chatType === "order_product") {
409
- if (currentUser.companyId == users[item.userId].companyId) {
410
- if (activeCompanyId && activeCompanyId == currentUser.companyId) {
411
- if (item.userId == currentUser.id) {
378
+ if (currentUser.companyId === users[item.userId].companyId) {
379
+ if (activeCompanyId && activeCompanyId === currentUser.companyId) {
380
+ if (item.userId === currentUser.id) {
412
381
  ownMessage = true;
413
382
  }
414
383
  } else {
@@ -426,7 +395,6 @@ var ContainerItems = function ContainerItems(props) {
426
395
  _iterator.f();
427
396
  }
428
397
 
429
- if (date) jsxItems.push(renderGrayLabel(date, "itemDate-".concat(countDate), "label-date"));
430
398
  setCustomItems(jsxItems);
431
399
  };
432
400
 
@@ -434,8 +402,7 @@ var ContainerItems = function ContainerItems(props) {
434
402
  var jsxItems = [];
435
403
  var date = undefined;
436
404
  var countDate = 1;
437
- var lastUserId = undefined; //console.log("isUserTech:", currentUser.isUserTech);
438
- // recorrido de los items (del mas viejo al mas reciente)
405
+ var lastUserId = undefined; // recorrido de los items (del mas viejo al mas reciente)
439
406
 
440
407
  for (var index = items.length - 1; index >= 0; index--) {
441
408
  var item = items[index]; // manejo de las etiquetas fechas
@@ -472,14 +439,13 @@ var ContainerItems = function ContainerItems(props) {
472
439
  } // user normal
473
440
  else {
474
441
  if (!(0, _handle_userTech.isUserTech)(users[item.userId].isUserTech)) {
475
- if (currentUser.companyId == users[item.userId].companyId) {
442
+ if (currentUser.companyId === users[item.userId].companyId) {
476
443
  ownMessage = true;
477
444
  }
478
- } else if (currentUser.id == item.userId) {
445
+ } else if (currentUser.id === item.userId) {
479
446
  ownMessage = true;
480
447
  }
481
448
  } // renderizar tipo de item
482
- //console.log(lastUserId + "<>" + item.userId);
483
449
 
484
450
 
485
451
  jsxItems.push(getUserCreatedItem(ownMessage, item, lastUserId));