contentoh-components-library 21.4.67 → 21.4.68

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 (157) hide show
  1. package/dist/components/atoms/Avatar/index.js +2 -3
  2. package/dist/components/atoms/CheckBox/styles.js +1 -1
  3. package/dist/components/atoms/InputFormatter/styles.js +1 -1
  4. package/dist/components/atoms/SliderToolTip/styles.js +1 -1
  5. package/dist/components/molecules/BoxAttribute/index.js +3 -3
  6. package/dist/components/molecules/BoxAttribute/styles.js +1 -1
  7. package/dist/components/molecules/BoxButtons/index.js +1 -0
  8. package/dist/components/molecules/CarouselImagesLogin/index.js +1 -1
  9. package/dist/components/molecules/HeaderTop/index.js +11 -68
  10. package/dist/components/molecules/SignInLogin/index.js +28 -36
  11. package/dist/components/molecules/StripeCardSelector/CardSelector.stories.js +2 -1
  12. package/dist/components/organisms/Chat/Chat.stories.js +8 -27
  13. package/dist/components/organisms/Chat/ContainerItems/index.js +3 -19
  14. package/dist/components/organisms/Chat/ContainerItems/styles.js +1 -1
  15. package/dist/components/organisms/Chat/ContentChat/index.js +197 -350
  16. package/dist/components/organisms/Chat/Footer/index.js +39 -48
  17. package/dist/components/organisms/Chat/index.js +4 -49
  18. package/dist/components/organisms/Chat/styles.js +1 -1
  19. package/dist/components/organisms/DashboardMetric/index.js +6 -12
  20. package/dist/components/organisms/FullProductNameHeader/index.js +2 -2
  21. package/dist/components/organisms/InputGroup/index.js +10 -1
  22. package/dist/components/organisms/Modal/styles.js +1 -1
  23. package/dist/components/pages/Dashboard/Dashboard.stories.js +36 -33
  24. package/dist/components/pages/Dashboard/index.js +18 -67
  25. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +3 -3
  26. package/dist/components/pages/ProviderProductEdition/index.js +144 -120
  27. package/dist/components/pages/ProviderProductEdition/styles.js +1 -1
  28. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +3 -7
  29. package/dist/components/pages/RetailerProductEdition/index.js +433 -312
  30. package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
  31. package/dist/components/pages/RetailerProductEdition/utils.js +2 -61
  32. package/dist/global-files/data.js +3 -11
  33. package/dist/global-files/variables.js +1 -5
  34. package/dist/index.js +58 -201
  35. package/package.json +1 -2
  36. package/src/components/atoms/Avatar/index.js +2 -8
  37. package/src/components/atoms/CheckBox/styles.js +0 -2
  38. package/src/components/atoms/InputFormatter/styles.js +1 -2
  39. package/src/components/atoms/SliderToolTip/styles.js +1 -1
  40. package/src/components/atoms/TabSection/styles.js +1 -1
  41. package/src/components/molecules/BoxAttribute/index.js +25 -32
  42. package/src/components/molecules/BoxAttribute/styles.js +1 -1
  43. package/src/components/molecules/BoxButtons/index.js +22 -23
  44. package/src/components/molecules/CarouselImagesLogin/index.js +1 -1
  45. package/src/components/molecules/HeaderTop/index.js +6 -52
  46. package/src/components/molecules/SignInLogin/index.js +11 -11
  47. package/src/components/molecules/StripeCardSelector/CardSelector.stories.js +2 -1
  48. package/src/components/molecules/TagAndInput/index.js +5 -6
  49. package/src/components/organisms/Chat/Chat.stories.js +7 -27
  50. package/src/components/organisms/Chat/ContainerItems/index.js +2 -18
  51. package/src/components/organisms/Chat/ContainerItems/styles.js +2 -14
  52. package/src/components/organisms/Chat/ContentChat/index.js +12 -88
  53. package/src/components/organisms/Chat/Footer/index.js +0 -11
  54. package/src/components/organisms/Chat/index.js +4 -46
  55. package/src/components/organisms/Chat/styles.js +0 -4
  56. package/src/components/organisms/DashboardMetric/index.js +3 -6
  57. package/src/components/organisms/FullProductNameHeader/index.js +1 -1
  58. package/src/components/organisms/InputGroup/index.js +119 -131
  59. package/src/components/organisms/Modal/styles.js +1 -4
  60. package/src/components/organisms/OrderDetail/utils/Table/utils.js +16 -6
  61. package/src/components/pages/Dashboard/Dashboard.stories.js +38 -33
  62. package/src/components/pages/Dashboard/index.js +39 -80
  63. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +83 -100
  64. package/src/components/pages/ProviderProductEdition/index.js +131 -100
  65. package/src/components/pages/ProviderProductEdition/styles.js +1 -5
  66. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +2 -6
  67. package/src/components/pages/RetailerProductEdition/index.js +309 -147
  68. package/src/components/pages/RetailerProductEdition/styles.js +0 -4
  69. package/src/components/pages/RetailerProductEdition/utils.js +0 -37
  70. package/src/global-files/data.js +13 -7
  71. package/src/global-files/variables.js +0 -4
  72. package/src/index.js +0 -11
  73. package/dist/assets/fonts/roboto/LICENSE.txt +0 -202
  74. package/dist/components/atoms/ImageCarousel/ImgeSlider.stories.js +0 -90
  75. package/dist/components/atoms/ImageCarousel/index.js +0 -120
  76. package/dist/components/atoms/ImageCarousel/styles.js +0 -18
  77. package/dist/components/atoms/PercentTag/PercentTag.stories.js +0 -31
  78. package/dist/components/atoms/PercentTag/index.js +0 -23
  79. package/dist/components/atoms/PercentTag/styles.js +0 -22
  80. package/dist/components/atoms/RatingStars/RatingStars.stories.js +0 -30
  81. package/dist/components/atoms/RatingStars/index.js +0 -53
  82. package/dist/components/atoms/RatingStars/styles.js +0 -18
  83. package/dist/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +0 -48
  84. package/dist/components/atoms/RetailerCatalog/index.js +0 -69
  85. package/dist/components/atoms/RetailerCatalog/styles.js +0 -20
  86. package/dist/components/atoms/RetailerOption/RetailerOption.stories.js +0 -33
  87. package/dist/components/atoms/RetailerOption/index.js +0 -62
  88. package/dist/components/atoms/RetailerOption/styles.js +0 -20
  89. package/dist/components/atoms/RetailersList/RetailersList.stories.js +0 -45
  90. package/dist/components/atoms/RetailersList/index.js +0 -46
  91. package/dist/components/atoms/RetailersList/styles.js +0 -18
  92. package/dist/components/atoms/UserCatalog/UserCatalog.stories.js +0 -73
  93. package/dist/components/atoms/UserCatalog/index.js +0 -101
  94. package/dist/components/atoms/UserCatalog/styles.js +0 -18
  95. package/dist/components/atoms/UserOption/UserOption.stories.js +0 -40
  96. package/dist/components/atoms/UserOption/index.js +0 -130
  97. package/dist/components/atoms/UserOption/styles.js +0 -20
  98. package/dist/components/atoms/UserSelector/UserSelector.stories.js +0 -40
  99. package/dist/components/atoms/UserSelector/index.js +0 -98
  100. package/dist/components/atoms/UserSelector/styles.js +0 -32
  101. package/dist/components/molecules/GridItem/GridItem.stories.js +0 -123
  102. package/dist/components/molecules/GridItem/index.js +0 -152
  103. package/dist/components/molecules/GridItem/styles.js +0 -20
  104. package/dist/components/molecules/HeaderItem/ColumnItem.js +0 -23
  105. package/dist/components/molecules/HeaderItem/HeaderItem.stories.js +0 -70
  106. package/dist/components/molecules/HeaderItem/index.js +0 -42
  107. package/dist/components/molecules/HeaderItem/styles.js +0 -30
  108. package/dist/components/molecules/RowItem/ColumnItem.js +0 -23
  109. package/dist/components/molecules/RowItem/RowItem.stories.js +0 -5242
  110. package/dist/components/molecules/RowItem/index.js +0 -58
  111. package/dist/components/molecules/RowItem/styles.js +0 -30
  112. package/dist/components/organisms/GridProducts/GridProducts.stories.js +0 -5097
  113. package/dist/components/organisms/GridProducts/index.js +0 -63
  114. package/dist/components/organisms/GridProducts/styles.js +0 -18
  115. package/dist/components/organisms/GridProducts/utils.js +0 -149
  116. package/src/components/atoms/ImageCarousel/ImgeSlider.stories.js +0 -76
  117. package/src/components/atoms/ImageCarousel/index.js +0 -103
  118. package/src/components/atoms/ImageCarousel/styles.js +0 -79
  119. package/src/components/atoms/PercentTag/PercentTag.stories.js +0 -7
  120. package/src/components/atoms/PercentTag/index.js +0 -9
  121. package/src/components/atoms/PercentTag/styles.js +0 -69
  122. package/src/components/atoms/RatingStars/RatingStars.stories.js +0 -10
  123. package/src/components/atoms/RatingStars/index.js +0 -31
  124. package/src/components/atoms/RatingStars/styles.js +0 -28
  125. package/src/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +0 -36
  126. package/src/components/atoms/RetailerCatalog/index.js +0 -49
  127. package/src/components/atoms/RetailerCatalog/styles.js +0 -30
  128. package/src/components/atoms/RetailerOption/RetailerOption.stories.js +0 -15
  129. package/src/components/atoms/RetailerOption/index.js +0 -53
  130. package/src/components/atoms/RetailerOption/styles.js +0 -41
  131. package/src/components/atoms/RetailersList/RetailersList.stories.js +0 -33
  132. package/src/components/atoms/RetailersList/index.js +0 -20
  133. package/src/components/atoms/RetailersList/styles.js +0 -19
  134. package/src/components/atoms/UserCatalog/UserCatalog.stories.js +0 -67
  135. package/src/components/atoms/UserCatalog/index.js +0 -100
  136. package/src/components/atoms/UserCatalog/styles.js +0 -24
  137. package/src/components/atoms/UserOption/UserOption.stories.js +0 -25
  138. package/src/components/atoms/UserOption/index.js +0 -95
  139. package/src/components/atoms/UserOption/styles.js +0 -61
  140. package/src/components/atoms/UserSelector/UserSelector.stories.js +0 -25
  141. package/src/components/atoms/UserSelector/index.js +0 -86
  142. package/src/components/atoms/UserSelector/styles.js +0 -55
  143. package/src/components/molecules/GridItem/GridItem.stories.js +0 -126
  144. package/src/components/molecules/GridItem/index.js +0 -105
  145. package/src/components/molecules/GridItem/styles.js +0 -104
  146. package/src/components/molecules/HeaderItem/ColumnItem.js +0 -9
  147. package/src/components/molecules/HeaderItem/HeaderItem.stories.js +0 -24
  148. package/src/components/molecules/HeaderItem/index.js +0 -26
  149. package/src/components/molecules/HeaderItem/styles.js +0 -27
  150. package/src/components/molecules/RowItem/ColumnItem.js +0 -9
  151. package/src/components/molecules/RowItem/RowItem.stories.js +0 -5660
  152. package/src/components/molecules/RowItem/index.js +0 -45
  153. package/src/components/molecules/RowItem/styles.js +0 -40
  154. package/src/components/organisms/GridProducts/GridProducts.stories.js +0 -5485
  155. package/src/components/organisms/GridProducts/index.js +0 -50
  156. package/src/components/organisms/GridProducts/styles.js +0 -14
  157. package/src/components/organisms/GridProducts/utils.js +0 -111
@@ -1,63 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.GridProducts = void 0;
7
-
8
- var _styles = require("./styles");
9
-
10
- var _GridItem = require("../../molecules/GridItem");
11
-
12
- var _HeaderItem = require("../../molecules/HeaderItem");
13
-
14
- var _RowItem = require("../../molecules/RowItem");
15
-
16
- var _jsxRuntime = require("react/jsx-runtime");
17
-
18
- var GridProducts = function GridProducts(_ref) {
19
- var _ref$products = _ref.products,
20
- products = _ref$products === void 0 ? [] : _ref$products,
21
- _ref$columnsArray = _ref.columnsArray,
22
- columnsArray = _ref$columnsArray === void 0 ? [] : _ref$columnsArray,
23
- _ref$gridView = _ref.gridView,
24
- gridView = _ref$gridView === void 0 ? true : _ref$gridView,
25
- chkOnChange = _ref.chkOnChange,
26
- _ref$selected = _ref.selected,
27
- selected = _ref$selected === void 0 ? [] : _ref$selected,
28
- chkChecked = _ref.chkChecked,
29
- checkAll = _ref.checkAll,
30
- chkCheckedAll = _ref.chkCheckedAll,
31
- onGridClick = _ref.onGridClick;
32
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
33
- children: !gridView ? products === null || products === void 0 ? void 0 : products.map(function (_ref2, i) {
34
- var gridElement = _ref2.gridElement,
35
- product = _ref2.product,
36
- id = _ref2.id;
37
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridItem.GridItem, {
38
- id: id,
39
- index: i,
40
- product: product,
41
- gridElement: gridElement,
42
- chkOnChange: chkOnChange,
43
- onGridClick: onGridClick,
44
- selected: selected,
45
- chkChecked: chkChecked
46
- }, i);
47
- }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
48
- className: "table-view",
49
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_HeaderItem.HeaderItem, {
50
- columnsArray: columnsArray,
51
- checkAll: checkAll,
52
- chkCheckedAll: chkCheckedAll
53
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_RowItem.RowItem, {
54
- productsArray: products,
55
- chkOnChange: chkOnChange,
56
- onGridClick: onGridClick,
57
- chkChecked: chkChecked
58
- })]
59
- })
60
- });
61
- };
62
-
63
- exports.GridProducts = GridProducts;
@@ -1,18 +0,0 @@
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 _templateObject;
15
-
16
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n height: calc(100% - 100px);\n overflow: auto;\n\n .table-view {\n height: 100%;\n width: 100%;\n }\n"])));
17
-
18
- exports.Container = Container;
@@ -1,149 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getProductsToTable = void 0;
7
-
8
- var _RetailerCatalog = require("../../atoms/RetailerCatalog");
9
-
10
- var _UserCatalog = require("../../atoms/UserCatalog");
11
-
12
- var _jsxRuntime = require("react/jsx-runtime");
13
-
14
- var getProductsToTable = function getProductsToTable() {
15
- var products = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
16
- var textSpecialists = arguments.length > 1 ? arguments[1] : undefined;
17
- var imagesSpecialists = arguments.length > 2 ? arguments[2] : undefined;
18
- var auditors = arguments.length > 3 ? arguments[3] : undefined;
19
- var images = arguments.length > 4 ? arguments[4] : undefined;
20
- var onAssign = arguments.length > 5 ? arguments[5] : undefined;
21
- var productsTableArray = [];
22
- products.forEach(function (product) {
23
- var article = product.article,
24
- orderId = product.orderId,
25
- upc = product.upc,
26
- status = product.status,
27
- version = product.version;
28
- var id = (article === null || article === void 0 ? void 0 : article.id_article) + "-" + orderId;
29
- var imgArray = images[(article === null || article === void 0 ? void 0 : article.id_article) + "-" + version];
30
- var element = {
31
- id: id,
32
- cols: [{
33
- name: (article === null || article === void 0 ? void 0 : article.country) || "-",
34
- flex: 1,
35
- minWidth: 100
36
- }, {
37
- name: orderId || "-",
38
- flex: 1,
39
- minWidth: 100
40
- }, {
41
- name: upc || "-",
42
- flex: 1,
43
- minWidth: 100
44
- }, {
45
- name: (article === null || article === void 0 ? void 0 : article.name) || "-",
46
- flex: 1,
47
- minWidth: 200
48
- }, {
49
- name: "S/M" || "-",
50
- flex: 1,
51
- minWidth: 100
52
- }, {
53
- name: status || "-",
54
- flex: 1,
55
- minWidth: 100
56
- }, {
57
- name: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RetailerCatalog.RetailerCatalog, {
58
- id: "retailers-" + id,
59
- article: product,
60
- retailers: product.retailers
61
- }),
62
- flex: 1,
63
- minWidth: 100
64
- }, {
65
- name: product.prio,
66
- flex: 1,
67
- minWidth: 100
68
- }, {
69
- name: /*#__PURE__*/(0, _jsxRuntime.jsx)(_UserCatalog.UserCatalog, {
70
- datasheet: article.id_datasheet_especialist,
71
- description: article.id_description_especialist,
72
- images: article.id_images_especialist,
73
- auditor: article.id_auditor,
74
- textSpecialists: textSpecialists,
75
- imagesSpecialists: imagesSpecialists,
76
- auditors: auditors,
77
- id: "users-" + id,
78
- product: product,
79
- onAssign: onAssign
80
- }),
81
- flex: 1,
82
- minWidth: 100
83
- }, {
84
- name: "Cont.",
85
- flex: 1,
86
- minWidth: 100
87
- }],
88
- gridElement: {
89
- images: imgArray,
90
- info: [{
91
- title: "name",
92
- value: (article === null || article === void 0 ? void 0 : article.name) || "-"
93
- }, {
94
- title: "order",
95
- value: orderId || "-"
96
- }, {
97
- title: "category",
98
- value: (article === null || article === void 0 ? void 0 : article.category) || "-"
99
- }, {
100
- title: "company",
101
- value: (article === null || article === void 0 ? void 0 : article.company_name) || "-"
102
- }, {
103
- title: "price",
104
- value: (article === null || article === void 0 ? void 0 : article.price) || "-"
105
- }],
106
- status: [{
107
- title: "datasheet",
108
- value: product === null || product === void 0 ? void 0 : product.datasheet_status,
109
- percent: 80
110
- }, {
111
- title: "description",
112
- value: product === null || product === void 0 ? void 0 : product.description_status,
113
- percent: 80
114
- }, {
115
- title: "images",
116
- value: product === null || product === void 0 ? void 0 : product.images_status,
117
- percent: 80
118
- }],
119
- catalogs: {
120
- leftSide: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RetailerCatalog.RetailerCatalog, {
121
- id: "retailers-" + id,
122
- limit: 2,
123
- article: product,
124
- retailers: product.retailers
125
- }),
126
- rightSide: /*#__PURE__*/(0, _jsxRuntime.jsx)(_UserCatalog.UserCatalog, {
127
- datasheet: article.id_datasheet_especialist,
128
- description: article.id_description_especialist,
129
- images: article.id_images_especialist,
130
- auditor: article.id_auditor,
131
- textSpecialists: textSpecialists,
132
- imagesSpecialists: imagesSpecialists,
133
- auditors: auditors,
134
- id: "users-" + id,
135
- product: product,
136
- onAssign: onAssign
137
- })
138
- }
139
- },
140
- showBottom: true,
141
- product: product,
142
- article: article
143
- };
144
- productsTableArray.push(element);
145
- });
146
- return productsTableArray;
147
- };
148
-
149
- exports.getProductsToTable = getProductsToTable;
@@ -1,76 +0,0 @@
1
- import { ImageCarousel } from ".";
2
-
3
- export default {
4
- title: "Components/atoms/ImageCarousel",
5
- component: ImageCarousel,
6
- };
7
-
8
- const Template = (args) => <ImageCarousel {...args} />;
9
- export const ImageCarouselDefault = Template.bind({});
10
- ImageCarouselDefault.args = {
11
- imageArray: [
12
- {
13
- id: 35596,
14
- status: null,
15
- image_id: 1,
16
- packing_type: "3",
17
- image_type: "1",
18
- article_id: "38443",
19
- src: "https://d24s337exbt5zr.cloudfront.net/eyJidWNrZXQiOiJjb250ZW50LW1hbmFnZW1lbnQtaW1hZ2VzIiwia2V5IjoiaWQtMzg0NDMvMTUvMS1kNDQ2ZjIwNy0wYTkzLTQyNzgtYWZjNi01MTY2ZjIyY2EzNDMucG5nIiwiZWRpdHMiOnsicmVzaXplIjp7IndpZHRoIjoxMDAwLCJoZWlnaHQiOjEwMDAsImZpdCI6ImNvbnRhaW4iLCJiYWNrZ3JvdW5kIjp7InIiOjI1NSwiZyI6MjU1LCJiIjoyNTUsImFscGhhIjoxfX19fQ==",
20
- timestamp: "2023-05-30T03:01:12.000Z",
21
- id_version: 15,
22
- width: null,
23
- height: null,
24
- scene_type: null,
25
- image_shot_type: null,
26
- last_modified: "2023-06-05T23:49:49.000Z",
27
- name: "Central (Frente Comercial)",
28
- version: 15,
29
- ext: "png",
30
- uuid: "d446f207-0a93-4278-afc6-5166f22ca343",
31
- srcDB: "id-38443/15/1-d446f207-0a93-4278-afc6-5166f22ca343.png",
32
- },
33
- {
34
- id: 35597,
35
- status: null,
36
- image_id: 3,
37
- packing_type: "3",
38
- image_type: "1",
39
- article_id: "38443",
40
- src: "https://d24s337exbt5zr.cloudfront.net/eyJidWNrZXQiOiJjb250ZW50LW1hbmFnZW1lbnQtaW1hZ2VzIiwia2V5IjoiaWQtMzg0NDMvMTUvMy0yOTZkMzU3ZC00OTUzLTRiMzktYjFjMy04YWZmZDI2NDgwMWIucG5nIiwiZWRpdHMiOnsicmVzaXplIjp7IndpZHRoIjoxMDAwLCJoZWlnaHQiOjEwMDAsImZpdCI6ImNvbnRhaW4iLCJiYWNrZ3JvdW5kIjp7InIiOjI1NSwiZyI6MjU1LCJiIjoyNTUsImFscGhhIjoxfX19fQ==",
41
- timestamp: "2023-05-30T03:01:12.000Z",
42
- id_version: 15,
43
- width: null,
44
- height: null,
45
- scene_type: null,
46
- image_shot_type: null,
47
- last_modified: "2023-06-05T23:49:49.000Z",
48
- name: "Trasera (Back)",
49
- version: 15,
50
- ext: "png",
51
- uuid: "296d357d-4953-4b39-b1c3-8affd264801b",
52
- srcDB: "id-38443/15/3-296d357d-4953-4b39-b1c3-8affd264801b.png",
53
- },
54
- {
55
- id: 35598,
56
- status: null,
57
- image_id: 16,
58
- packing_type: "3",
59
- image_type: "1",
60
- article_id: "38443",
61
- src: "https://d24s337exbt5zr.cloudfront.net/eyJidWNrZXQiOiJjb250ZW50LW1hbmFnZW1lbnQtaW1hZ2VzIiwia2V5IjoiaWQtMzg0NDMvMTUvMTYtOGMzNDIzM2YtZTRiMC00MjU0LWFlYzUtZjEyN2ZiYjhkYmVkLnBuZyIsImVkaXRzIjp7InJlc2l6ZSI6eyJ3aWR0aCI6MTAwMCwiaGVpZ2h0IjoxMDAwLCJmaXQiOiJjb250YWluIiwiYmFja2dyb3VuZCI6eyJyIjoyNTUsImciOjI1NSwiYiI6MjU1LCJhbHBoYSI6MX19fX0=",
62
- timestamp: "2023-05-30T03:01:12.000Z",
63
- id_version: 15,
64
- width: null,
65
- height: null,
66
- scene_type: null,
67
- image_shot_type: null,
68
- last_modified: "2023-06-05T23:49:49.000Z",
69
- name: "Detalle / Características 1",
70
- version: 15,
71
- ext: "png",
72
- uuid: "8c34233f-e4b0-4254-aec5-f127fbb8dbed",
73
- srcDB: "id-38443/15/16-8c34233f-e4b0-4254-aec5-f127fbb8dbed.png",
74
- },
75
- ],
76
- };
@@ -1,103 +0,0 @@
1
- import { Container } from "./styles";
2
- import { useState, useEffect } from "react";
3
- import ReactImageFallback from "react-image-fallback";
4
- import spinner from "../../../assets/images/Icons/Spinner.gif";
5
- import ArrowBackIosIcon from "@mui/icons-material/ArrowBackIos";
6
- import productImage from "../../../assets/images/defaultImages/defaultProductImage.png";
7
-
8
- export const ImageCarousel = ({ imageArray = [] }) => {
9
- const [currentIndex, setCurrentIndex] = useState(0);
10
- const [transitioning, setTransitioning] = useState(false);
11
- const [isHover, setIsHover] = useState(false);
12
-
13
- const goToNextSlide = () => {
14
- if (!transitioning) {
15
- setTransitioning(true);
16
- setCurrentIndex((prevIndex) => (prevIndex + 1) % imageArray.length);
17
-
18
- setTimeout(() => {
19
- setTransitioning(false);
20
- }, 500); // Adjust the transition duration to match your CSS
21
- }
22
- };
23
-
24
- const goToPrevSlide = () => {
25
- if (!transitioning) {
26
- setTransitioning(true);
27
- setCurrentIndex(
28
- (prevIndex) => (prevIndex - 1 + imageArray.length) % imageArray.length
29
- );
30
-
31
- setTimeout(() => {
32
- setTransitioning(false);
33
- }, 500); // Adjust the transition duration to match your CSS
34
- }
35
- };
36
-
37
- // useEffect(() => {
38
- // const delay = 0;
39
- // let repeat;
40
- // setTimeout(() => {
41
- // repeat = setInterval(() => {
42
- // if (!isHover && imageArray.length > 1) goToNextSlide();
43
- // }, 10000);
44
- // }, delay);
45
- // return () => {
46
- // clearInterval(repeat);
47
- // };
48
- // }, [isHover]);
49
-
50
- return (
51
- <Container
52
- // onMouseEnter={() => setIsHover(true)}
53
- // onMouseLeave={() => setIsHover(false)}
54
- >
55
- {imageArray.length > 1 && (
56
- <button
57
- className="prev"
58
- onClick={(e) => {
59
- e.stopPropagation();
60
- goToPrevSlide();
61
- }}
62
- >
63
- <ArrowBackIosIcon />
64
- </button>
65
- )}
66
- <div className="slide-container">
67
- {imageArray.length ? (
68
- imageArray.map((img, index) => (
69
- <div
70
- key={index}
71
- className={`image-container slide ${
72
- index === currentIndex ? "active" : ""
73
- }`}
74
- >
75
- <ReactImageFallback
76
- key={index}
77
- src={`https://${process.env.REACT_APP_IMAGES_BUCKET}.s3.amazonaws.com/${img.src}`}
78
- fallbackImage={spinner}
79
- alt={img?.name}
80
- style={{
81
- transform: `translateX(-${currentIndex * 100}%)`,
82
- }}
83
- />
84
- </div>
85
- ))
86
- ) : (
87
- <img src={productImage} alt="not image" />
88
- )}
89
- </div>
90
- {imageArray.length > 1 && (
91
- <button
92
- className="next"
93
- onClick={(e) => {
94
- e.stopPropagation();
95
- goToNextSlide();
96
- }}
97
- >
98
- <ArrowBackIosIcon />
99
- </button>
100
- )}
101
- </Container>
102
- );
103
- };
@@ -1,79 +0,0 @@
1
- import styled from "styled-components";
2
-
3
- export const Container = styled.div`
4
- width: 174px;
5
- height: 175px;
6
- border-radius: 5px 5px 0px 0px;
7
- position: relative;
8
- overflow: hidden;
9
- display: flex;
10
- background-color: #f0f0f0;
11
-
12
- .slide-container {
13
- display: flex;
14
- width: 100%;
15
-
16
- .image-container {
17
- width: 100%;
18
- height: 100%;
19
-
20
- img {
21
- width: 100%;
22
- height: 100%;
23
- object-fit: fill;
24
- }
25
-
26
- &.slide {
27
- flex: 0 0 100%;
28
- opacity: 0;
29
- transition: opacity 0.5s ease-in-out;
30
-
31
- &.active {
32
- opacity: 1;
33
- }
34
- }
35
- }
36
-
37
- & > img {
38
- width: 100%;
39
- }
40
- }
41
-
42
- button {
43
- position: absolute;
44
- top: 0;
45
- border: none;
46
- cursor: pointer;
47
- background-color: transparent;
48
- color: white;
49
- z-index: 1;
50
- height: 100%;
51
- width: 30px;
52
-
53
- svg {
54
- font-size: 24px;
55
- }
56
-
57
- &.prev {
58
- left: 0;
59
-
60
- &:hover {
61
- background: linear-gradient(90deg, darkgray, transparent);
62
- }
63
- }
64
- &.next {
65
- right: 0;
66
-
67
- svg {
68
- transform: rotate(180deg);
69
- }
70
- &:hover {
71
- background: linear-gradient(-90deg, darkgray, transparent);
72
- }
73
- }
74
- }
75
-
76
- button:focus {
77
- outline: none;
78
- }
79
- `;
@@ -1,7 +0,0 @@
1
- import { PercentTag } from ".";
2
-
3
- export default { title: "Components/atoms/PercentTag", component: PercentTag };
4
-
5
- const Template = (args) => <PercentTag {...args} />;
6
- export const PercentTagDefault = Template.bind({});
7
- PercentTagDefault.args = { percent: 88, progressBarType: "AA" };
@@ -1,9 +0,0 @@
1
- import { Container } from "./styles";
2
-
3
- export const PercentTag = ({ percent, progressBarType }) => {
4
- return (
5
- <Container className={`status-${progressBarType}`}>
6
- <p>{percent}%</p>
7
- </Container>
8
- );
9
- };
@@ -1,69 +0,0 @@
1
- import styled from "styled-components";
2
- import { GlobalColors, FontFamily } from "../../../global-files/variables";
3
-
4
- export const Container = styled.div`
5
- background-color: ${GlobalColors.s3};
6
- display: inline-block;
7
- padding: 0 10px;
8
- border-radius: 5px;
9
- font-family: ${FontFamily.Lato};
10
- font-weight: 600;
11
- font-size: 12px;
12
- line-height: 20px;
13
- color: ${(backgroundColor) =>
14
- backgroundColor === "s2" || backgroundColor === "s1"
15
- ? GlobalColors.s4
16
- : GlobalColors.white};
17
-
18
- &.status-CA,
19
- &.status-IE {
20
- background-color: ${GlobalColors.in_progress};
21
- }
22
-
23
- &.status-R,
24
- &.status-AS,
25
- &.status-PA {
26
- background-color: ${GlobalColors.reception};
27
- }
28
-
29
- &.status-AA,
30
- &.status-AP,
31
- &.status-ACA,
32
- &.status-AC {
33
- background-color: ${GlobalColors.finished};
34
- }
35
-
36
- &.status-RA,
37
- &.status-RC,
38
- &.status-RP,
39
- &.status-RCA {
40
- background-color: ${GlobalColors.rejected_status};
41
- }
42
-
43
- &.status-Dat,
44
- &.status-Dsc,
45
- &.status-Imgs {
46
- background-color: ${GlobalColors.s4};
47
- }
48
-
49
- &.status-Ex {
50
- background-color: ${GlobalColors.exported};
51
- }
52
-
53
- &.status-DDI {
54
- background-color: ${GlobalColors.original_purpura};
55
- }
56
-
57
- &.status-GLD {
58
- background-color: ${GlobalColors.in_progress};
59
- }
60
-
61
- &.status-TAB {
62
- background-color: ${GlobalColors.deep_gray};
63
- }
64
-
65
- &.status-Pt {
66
- background-color: ${GlobalColors.s2};
67
- color: ${GlobalColors.s4};
68
- }
69
- `;
@@ -1,10 +0,0 @@
1
- import { RatingStars } from ".";
2
-
3
- export default {
4
- title: "Components/atoms/RatingStars",
5
- component: RatingStars,
6
- };
7
-
8
- const Template = (args) => <RatingStars {...args} />;
9
- export const RatingStarsDefault = Template.bind({});
10
- RatingStarsDefault.args = { percent: 80 };
@@ -1,31 +0,0 @@
1
- import { Container } from "./styles";
2
- import { faStar as starIcon } from "@fortawesome/free-regular-svg-icons";
3
- import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
4
- import { useEffect } from "react";
5
- import { useState } from "react";
6
-
7
- export const RatingStars = ({ ratingValue = 0 }) => {
8
- const [rating, setRating] = useState(0);
9
-
10
- const handleRating = (value) => {
11
- setRating(value);
12
- };
13
-
14
- useEffect(() => {
15
- setRating(ratingValue);
16
- }, []);
17
-
18
- return (
19
- <Container>
20
- {[...Array(5)].map((_, index) => (
21
- <span
22
- key={index}
23
- className={`star ${index < rating ? "active" : ""}`}
24
- onClick={() => handleRating(index + 1)}
25
- >
26
-
27
- </span>
28
- ))}
29
- </Container>
30
- );
31
- };
@@ -1,28 +0,0 @@
1
- import styled from "styled-components";
2
-
3
- export const Container = styled.div`
4
- font-size: 10px;
5
- display: flex;
6
- align-items: center;
7
-
8
- .star {
9
- cursor: pointer;
10
- font-size: 12px;
11
- color: #d9d9d9;
12
- transition: color 0.3s;
13
- line-height: 10px;
14
-
15
- &:hover {
16
- color: gold;
17
- }
18
-
19
- &.active {
20
- transform: scale(1.2);
21
- color: #8a6caa;
22
- }
23
-
24
- &:not(:first-child) {
25
- margin-left: 5px;
26
- }
27
- }
28
- `;
@@ -1,36 +0,0 @@
1
- import { RetailerCatalog } from ".";
2
-
3
- export default {
4
- title: "Components/atoms/RetailerCatalog",
5
- component: RetailerCatalog,
6
- };
7
-
8
- const Template = (args) => <RetailerCatalog {...args} />;
9
- export const RetailerCatalogDefault = Template.bind({});
10
- RetailerCatalogDefault.args = {
11
- limit: 3,
12
- articleId: 39474,
13
- orderId: 15270,
14
- retailers: [
15
- {
16
- id: 58,
17
- name: "The Home Depot Golden",
18
- },
19
- {
20
- id: 59,
21
- name: "The Home Depot Platinum",
22
- },
23
- {
24
- id: 60,
25
- name: "The Home Depot Resizing",
26
- },
27
- {
28
- id: 61,
29
- name: "Home Depot TAB",
30
- },
31
- {
32
- id: 68,
33
- name: "The Home Depot Dropship",
34
- },
35
- ],
36
- };