contentoh-components-library 21.4.3 → 21.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.development +0 -1
- package/.env.production +0 -1
- package/dist/assets/fonts/roboto/LICENSE.txt +202 -0
- package/dist/components/atoms/Avatar/index.js +2 -3
- package/dist/components/atoms/CheckBox/index.js +1 -4
- package/dist/components/atoms/CheckBox/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +28 -41
- package/dist/components/pages/RetailerProductEdition/index.js +0 -23
- package/dist/global-files/customHooks.js +0 -1
- package/dist/index.js +58 -201
- package/package.json +1 -2
- package/src/components/atoms/Avatar/index.js +2 -8
- package/src/components/atoms/CheckBox/index.js +1 -2
- package/src/components/atoms/CheckBox/styles.js +0 -2
- package/src/components/organisms/OrderDetail/utils/Table/utils.js +16 -6
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +21 -39
- package/src/components/pages/RetailerProductEdition/index.js +0 -12
- package/src/global-files/customHooks.js +0 -1
- package/src/index.js +0 -12
- package/dist/components/atoms/ImageCarousel/ImgeSlider.stories.js +0 -90
- package/dist/components/atoms/ImageCarousel/index.js +0 -120
- package/dist/components/atoms/ImageCarousel/styles.js +0 -18
- package/dist/components/atoms/PercentTag/PercentTag.stories.js +0 -31
- package/dist/components/atoms/PercentTag/index.js +0 -23
- package/dist/components/atoms/PercentTag/styles.js +0 -22
- package/dist/components/atoms/RatingStars/RatingStars.stories.js +0 -30
- package/dist/components/atoms/RatingStars/index.js +0 -53
- package/dist/components/atoms/RatingStars/styles.js +0 -18
- package/dist/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +0 -48
- package/dist/components/atoms/RetailerCatalog/index.js +0 -70
- package/dist/components/atoms/RetailerCatalog/styles.js +0 -20
- package/dist/components/atoms/RetailerOption/RetailerOption.stories.js +0 -33
- package/dist/components/atoms/RetailerOption/index.js +0 -62
- package/dist/components/atoms/RetailerOption/styles.js +0 -20
- package/dist/components/atoms/RetailersList/RetailersList.stories.js +0 -45
- package/dist/components/atoms/RetailersList/index.js +0 -46
- package/dist/components/atoms/RetailersList/styles.js +0 -18
- package/dist/components/atoms/UserCatalog/UserCatalog.stories.js +0 -73
- package/dist/components/atoms/UserCatalog/index.js +0 -103
- package/dist/components/atoms/UserCatalog/styles.js +0 -18
- package/dist/components/atoms/UserOption/UserOption.stories.js +0 -40
- package/dist/components/atoms/UserOption/index.js +0 -128
- package/dist/components/atoms/UserOption/styles.js +0 -20
- package/dist/components/atoms/UserSelector/UserSelector.stories.js +0 -40
- package/dist/components/atoms/UserSelector/index.js +0 -100
- package/dist/components/atoms/UserSelector/styles.js +0 -32
- package/dist/components/molecules/GridItem/GridItem.stories.js +0 -123
- package/dist/components/molecules/GridItem/index.js +0 -123
- package/dist/components/molecules/GridItem/styles.js +0 -20
- package/dist/components/molecules/HeaderItem/ColumnItem.js +0 -23
- package/dist/components/molecules/HeaderItem/HeaderItem.stories.js +0 -70
- package/dist/components/molecules/HeaderItem/index.js +0 -42
- package/dist/components/molecules/HeaderItem/styles.js +0 -30
- package/dist/components/molecules/RowItem/ColumnItem.js +0 -23
- package/dist/components/molecules/RowItem/RowItem.stories.js +0 -5242
- package/dist/components/molecules/RowItem/index.js +0 -58
- package/dist/components/molecules/RowItem/styles.js +0 -30
- package/dist/components/organisms/GridProducts/GridProducts.stories.js +0 -5097
- package/dist/components/organisms/GridProducts/index.js +0 -63
- package/dist/components/organisms/GridProducts/styles.js +0 -18
- package/dist/components/organisms/GridProducts/utils.js +0 -144
- package/src/components/atoms/ImageCarousel/ImgeSlider.stories.js +0 -76
- package/src/components/atoms/ImageCarousel/index.js +0 -103
- package/src/components/atoms/ImageCarousel/styles.js +0 -79
- package/src/components/atoms/PercentTag/PercentTag.stories.js +0 -7
- package/src/components/atoms/PercentTag/index.js +0 -9
- package/src/components/atoms/PercentTag/styles.js +0 -69
- package/src/components/atoms/RatingStars/RatingStars.stories.js +0 -10
- package/src/components/atoms/RatingStars/index.js +0 -31
- package/src/components/atoms/RatingStars/styles.js +0 -28
- package/src/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +0 -36
- package/src/components/atoms/RetailerCatalog/index.js +0 -49
- package/src/components/atoms/RetailerCatalog/styles.js +0 -30
- package/src/components/atoms/RetailerOption/RetailerOption.stories.js +0 -15
- package/src/components/atoms/RetailerOption/index.js +0 -53
- package/src/components/atoms/RetailerOption/styles.js +0 -41
- package/src/components/atoms/RetailersList/RetailersList.stories.js +0 -33
- package/src/components/atoms/RetailersList/index.js +0 -20
- package/src/components/atoms/RetailersList/styles.js +0 -19
- package/src/components/atoms/UserCatalog/UserCatalog.stories.js +0 -67
- package/src/components/atoms/UserCatalog/index.js +0 -96
- package/src/components/atoms/UserCatalog/styles.js +0 -24
- package/src/components/atoms/UserOption/UserOption.stories.js +0 -25
- package/src/components/atoms/UserOption/index.js +0 -88
- package/src/components/atoms/UserOption/styles.js +0 -61
- package/src/components/atoms/UserSelector/UserSelector.stories.js +0 -25
- package/src/components/atoms/UserSelector/index.js +0 -88
- package/src/components/atoms/UserSelector/styles.js +0 -55
- package/src/components/molecules/GridItem/GridItem.stories.js +0 -126
- package/src/components/molecules/GridItem/index.js +0 -83
- package/src/components/molecules/GridItem/styles.js +0 -85
- package/src/components/molecules/HeaderItem/ColumnItem.js +0 -9
- package/src/components/molecules/HeaderItem/HeaderItem.stories.js +0 -24
- package/src/components/molecules/HeaderItem/index.js +0 -26
- package/src/components/molecules/HeaderItem/styles.js +0 -27
- package/src/components/molecules/RowItem/ColumnItem.js +0 -9
- package/src/components/molecules/RowItem/RowItem.stories.js +0 -5660
- package/src/components/molecules/RowItem/index.js +0 -45
- package/src/components/molecules/RowItem/styles.js +0 -38
- package/src/components/organisms/GridProducts/GridProducts.stories.js +0 -5485
- package/src/components/organisms/GridProducts/index.js +0 -50
- package/src/components/organisms/GridProducts/styles.js +0 -15
- package/src/components/organisms/GridProducts/utils.js +0 -108
|
@@ -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: 100%;\n overflow: auto;\n padding: 20px;\n\n .table-view {\n height: 100%;\n width: 100%;\n }\n"])));
|
|
17
|
-
|
|
18
|
-
exports.Container = Container;
|
|
@@ -1,144 +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: "none",
|
|
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
|
-
}),
|
|
80
|
-
flex: 1,
|
|
81
|
-
minWidth: 100
|
|
82
|
-
}, {
|
|
83
|
-
name: "Cont.",
|
|
84
|
-
flex: 1,
|
|
85
|
-
minWidth: 100
|
|
86
|
-
}],
|
|
87
|
-
gridElement: {
|
|
88
|
-
images: imgArray,
|
|
89
|
-
info: [{
|
|
90
|
-
title: "name",
|
|
91
|
-
value: (article === null || article === void 0 ? void 0 : article.name) || "-"
|
|
92
|
-
}, {
|
|
93
|
-
title: "category",
|
|
94
|
-
value: (article === null || article === void 0 ? void 0 : article.category) || "-"
|
|
95
|
-
}, {
|
|
96
|
-
title: "company",
|
|
97
|
-
value: (article === null || article === void 0 ? void 0 : article.company_name) || "-"
|
|
98
|
-
}, {
|
|
99
|
-
title: "price",
|
|
100
|
-
value: (article === null || article === void 0 ? void 0 : article.price) || "-"
|
|
101
|
-
}],
|
|
102
|
-
status: [{
|
|
103
|
-
title: "datasheet",
|
|
104
|
-
value: product === null || product === void 0 ? void 0 : product.datasheet_status,
|
|
105
|
-
percent: 80
|
|
106
|
-
}, {
|
|
107
|
-
title: "description",
|
|
108
|
-
value: product === null || product === void 0 ? void 0 : product.description_status,
|
|
109
|
-
percent: 80
|
|
110
|
-
}, {
|
|
111
|
-
title: "images",
|
|
112
|
-
value: product === null || product === void 0 ? void 0 : product.images_status,
|
|
113
|
-
percent: 80
|
|
114
|
-
}],
|
|
115
|
-
catalogs: {
|
|
116
|
-
leftSide: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RetailerCatalog.RetailerCatalog, {
|
|
117
|
-
id: "retailers-" + id,
|
|
118
|
-
limit: 2,
|
|
119
|
-
article: product,
|
|
120
|
-
retailers: product.retailers
|
|
121
|
-
}),
|
|
122
|
-
rightSide: /*#__PURE__*/(0, _jsxRuntime.jsx)(_UserCatalog.UserCatalog, {
|
|
123
|
-
datasheet: article.id_datasheet_especialist,
|
|
124
|
-
description: article.id_description_especialist,
|
|
125
|
-
images: article.id_images_especialist,
|
|
126
|
-
textSpecialists: textSpecialists,
|
|
127
|
-
imagesSpecialists: imagesSpecialists,
|
|
128
|
-
auditors: auditors,
|
|
129
|
-
id: "users-" + id,
|
|
130
|
-
onAssign: onAssign,
|
|
131
|
-
product: product
|
|
132
|
-
})
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
showBottom: true,
|
|
136
|
-
product: product,
|
|
137
|
-
article: article
|
|
138
|
-
};
|
|
139
|
-
productsTableArray.push(element);
|
|
140
|
-
});
|
|
141
|
-
return productsTableArray;
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
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: 175px;
|
|
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,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
|
-
};
|