contentoh-components-library 21.4.30 → 21.4.31
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/dist/assets/fonts/roboto/LICENSE.txt +202 -0
- package/dist/assets/images/defaultImages/check_circle.svg +10 -0
- package/dist/components/atoms/Avatar/index.js +3 -2
- package/dist/components/atoms/Card/index.js +46 -5
- package/dist/components/atoms/Card/styles.js +3 -1
- package/dist/components/atoms/CheckBox/index.js +7 -2
- package/dist/components/atoms/CheckBox/styles.js +1 -1
- package/dist/components/atoms/ImageCarousel/ImgeSlider.stories.js +90 -0
- package/dist/components/atoms/ImageCarousel/index.js +120 -0
- package/dist/components/atoms/ImageCarousel/styles.js +18 -0
- package/dist/components/atoms/InputFormatter/styles.js +1 -1
- package/dist/components/atoms/PercentTag/PercentTag.stories.js +31 -0
- package/dist/components/atoms/PercentTag/index.js +23 -0
- package/dist/components/atoms/PercentTag/styles.js +22 -0
- package/dist/components/atoms/RatingStars/RatingStars.stories.js +30 -0
- package/dist/components/atoms/RatingStars/index.js +53 -0
- package/dist/components/atoms/RatingStars/styles.js +18 -0
- package/dist/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +48 -0
- package/dist/components/atoms/RetailerCatalog/index.js +69 -0
- package/dist/components/atoms/RetailerCatalog/styles.js +20 -0
- package/dist/components/atoms/RetailerOption/RetailerOption.stories.js +33 -0
- package/dist/components/atoms/RetailerOption/index.js +62 -0
- package/dist/components/atoms/RetailerOption/styles.js +20 -0
- package/dist/components/atoms/RetailersList/RetailersList.stories.js +45 -0
- package/dist/components/atoms/RetailersList/index.js +46 -0
- package/dist/components/atoms/RetailersList/styles.js +18 -0
- package/dist/components/atoms/SliderToolTip/styles.js +1 -1
- package/dist/components/atoms/UserCatalog/UserCatalog.stories.js +73 -0
- package/dist/components/atoms/UserCatalog/index.js +101 -0
- package/dist/components/atoms/UserCatalog/styles.js +18 -0
- package/dist/components/atoms/UserOption/UserOption.stories.js +40 -0
- package/dist/components/atoms/UserOption/index.js +130 -0
- package/dist/components/atoms/UserOption/styles.js +20 -0
- package/dist/components/atoms/UserSelector/UserSelector.stories.js +40 -0
- package/dist/components/atoms/UserSelector/index.js +98 -0
- package/dist/components/atoms/UserSelector/styles.js +32 -0
- package/dist/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/dist/components/molecules/GridItem/GridItem.stories.js +123 -0
- package/dist/components/molecules/GridItem/index.js +152 -0
- package/dist/components/molecules/GridItem/styles.js +20 -0
- package/dist/components/molecules/HeaderItem/ColumnItem.js +23 -0
- package/dist/components/molecules/HeaderItem/HeaderItem.stories.js +70 -0
- package/dist/components/molecules/HeaderItem/index.js +42 -0
- package/dist/components/molecules/HeaderItem/styles.js +30 -0
- package/dist/components/molecules/HeaderTop/index.js +68 -11
- package/dist/components/molecules/RowItem/ColumnItem.js +23 -0
- package/dist/components/molecules/RowItem/RowItem.stories.js +5242 -0
- package/dist/components/molecules/RowItem/index.js +58 -0
- package/dist/components/molecules/RowItem/styles.js +30 -0
- package/dist/components/molecules/StripeCardForm/StripeCardForm.stories.js +32 -0
- package/dist/components/molecules/StripeCardForm/index.js +94 -0
- package/dist/components/molecules/StripeCardForm/paymentForm.js +199 -0
- package/dist/components/molecules/StripeCardForm/styles.js +27 -0
- package/dist/components/molecules/StripeCardSelector/CardSelector.stories.js +30 -0
- package/dist/components/molecules/StripeCardSelector/index.js +125 -0
- package/dist/components/molecules/StripeCardSelector/styles.js +22 -0
- package/dist/components/molecules/StripeCardSelector/utils.js +56 -0
- package/dist/components/molecules/TagAndInput/index.js +1 -1
- package/dist/components/organisms/Chat/Chat.stories.js +27 -8
- package/dist/components/organisms/Chat/ContainerItems/index.js +19 -3
- package/dist/components/organisms/Chat/ContainerItems/styles.js +1 -1
- package/dist/components/organisms/Chat/ContentChat/index.js +350 -197
- package/dist/components/organisms/Chat/Footer/index.js +48 -39
- package/dist/components/organisms/Chat/index.js +49 -4
- package/dist/components/organisms/Chat/styles.js +1 -1
- package/dist/components/organisms/FullProductNameHeader/index.js +2 -2
- package/dist/components/organisms/GridProducts/GridProducts.stories.js +5097 -0
- package/dist/components/organisms/GridProducts/index.js +63 -0
- package/dist/components/organisms/GridProducts/styles.js +18 -0
- package/dist/components/organisms/GridProducts/utils.js +149 -0
- package/dist/components/organisms/Modal/styles.js +1 -1
- package/dist/components/organisms/PanelLayout/PanelLayout.stories.js +87 -0
- package/dist/components/organisms/PanelLayout/index.js +29 -0
- package/dist/components/organisms/PanelLayout/styles.js +32 -0
- package/dist/components/organisms/SideModal/SideModal.stories.js +42 -0
- package/dist/components/organisms/SideModal/index.js +72 -0
- package/dist/components/organisms/SideModal/styles.js +18 -0
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +6 -4
- package/dist/components/pages/ProviderProductEdition/index.js +117 -142
- package/dist/components/pages/ProviderProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +7 -3
- package/dist/components/pages/RetailerProductEdition/index.js +276 -274
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/utils.js +61 -2
- package/dist/index.js +247 -52
- package/package.json +4 -1
- package/src/assets/images/defaultImages/check_circle.svg +10 -0
- package/src/components/atoms/Avatar/index.js +8 -2
- package/src/components/atoms/Card/index.js +35 -2
- package/src/components/atoms/Card/styles.js +41 -5
- package/src/components/atoms/CheckBox/index.js +4 -1
- package/src/components/atoms/CheckBox/styles.js +2 -0
- package/src/components/atoms/ImageCarousel/ImgeSlider.stories.js +76 -0
- package/src/components/atoms/ImageCarousel/index.js +103 -0
- package/src/components/atoms/ImageCarousel/styles.js +79 -0
- package/src/components/atoms/InputFormatter/styles.js +2 -1
- package/src/components/atoms/PercentTag/PercentTag.stories.js +7 -0
- package/src/components/atoms/PercentTag/index.js +9 -0
- package/src/components/atoms/PercentTag/styles.js +69 -0
- package/src/components/atoms/RatingStars/RatingStars.stories.js +10 -0
- package/src/components/atoms/RatingStars/index.js +31 -0
- package/src/components/atoms/RatingStars/styles.js +28 -0
- package/src/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +36 -0
- package/src/components/atoms/RetailerCatalog/index.js +49 -0
- package/src/components/atoms/RetailerCatalog/styles.js +30 -0
- package/src/components/atoms/RetailerOption/RetailerOption.stories.js +15 -0
- package/src/components/atoms/RetailerOption/index.js +53 -0
- package/src/components/atoms/RetailerOption/styles.js +41 -0
- package/src/components/atoms/RetailersList/RetailersList.stories.js +33 -0
- package/src/components/atoms/RetailersList/index.js +20 -0
- package/src/components/atoms/RetailersList/styles.js +19 -0
- package/src/components/atoms/SliderToolTip/styles.js +1 -1
- package/src/components/atoms/UserCatalog/UserCatalog.stories.js +67 -0
- package/src/components/atoms/UserCatalog/index.js +100 -0
- package/src/components/atoms/UserCatalog/styles.js +24 -0
- package/src/components/atoms/UserOption/UserOption.stories.js +25 -0
- package/src/components/atoms/UserOption/index.js +95 -0
- package/src/components/atoms/UserOption/styles.js +61 -0
- package/src/components/atoms/UserSelector/UserSelector.stories.js +25 -0
- package/src/components/atoms/UserSelector/index.js +86 -0
- package/src/components/atoms/UserSelector/styles.js +55 -0
- package/src/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/src/components/molecules/GridItem/GridItem.stories.js +126 -0
- package/src/components/molecules/GridItem/index.js +105 -0
- package/src/components/molecules/GridItem/styles.js +104 -0
- package/src/components/molecules/HeaderItem/ColumnItem.js +9 -0
- package/src/components/molecules/HeaderItem/HeaderItem.stories.js +24 -0
- package/src/components/molecules/HeaderItem/index.js +26 -0
- package/src/components/molecules/HeaderItem/styles.js +27 -0
- package/src/components/molecules/HeaderTop/index.js +52 -6
- package/src/components/molecules/RowItem/ColumnItem.js +9 -0
- package/src/components/molecules/RowItem/RowItem.stories.js +5660 -0
- package/src/components/molecules/RowItem/index.js +45 -0
- package/src/components/molecules/RowItem/styles.js +40 -0
- package/src/components/molecules/StripeCardForm/StripeCardForm.stories.js +14 -0
- package/src/components/molecules/StripeCardForm/index.js +45 -0
- package/src/components/molecules/StripeCardForm/paymentForm.js +126 -0
- package/src/components/molecules/StripeCardForm/styles.js +84 -0
- package/src/components/molecules/StripeCardSelector/CardSelector.stories.js +12 -0
- package/src/components/molecules/StripeCardSelector/index.js +59 -0
- package/src/components/molecules/StripeCardSelector/styles.js +15 -0
- package/src/components/molecules/StripeCardSelector/utils.js +17 -0
- package/src/components/molecules/TagAndInput/index.js +10 -8
- package/src/components/organisms/Chat/Chat.stories.js +27 -7
- package/src/components/organisms/Chat/ContainerItems/index.js +18 -2
- package/src/components/organisms/Chat/ContainerItems/styles.js +14 -2
- package/src/components/organisms/Chat/ContentChat/index.js +88 -12
- package/src/components/organisms/Chat/Footer/index.js +11 -0
- package/src/components/organisms/Chat/index.js +46 -4
- package/src/components/organisms/Chat/styles.js +4 -0
- package/src/components/organisms/FullProductNameHeader/index.js +1 -1
- package/src/components/organisms/GridProducts/GridProducts.stories.js +5485 -0
- package/src/components/organisms/GridProducts/index.js +50 -0
- package/src/components/organisms/GridProducts/styles.js +14 -0
- package/src/components/organisms/GridProducts/utils.js +111 -0
- package/src/components/organisms/Modal/styles.js +4 -1
- package/src/components/organisms/OrderDetail/utils/Table/utils.js +6 -16
- package/src/components/organisms/PanelLayout/PanelLayout.stories.js +63 -0
- package/src/components/organisms/PanelLayout/index.js +11 -0
- package/src/components/organisms/PanelLayout/styles.js +39 -0
- package/src/components/organisms/SideModal/SideModal.stories.js +23 -0
- package/src/components/organisms/SideModal/index.js +50 -0
- package/src/components/organisms/SideModal/styles.js +30 -0
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +6 -4
- package/src/components/pages/ProviderProductEdition/index.js +97 -129
- package/src/components/pages/ProviderProductEdition/styles.js +5 -1
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +6 -2
- package/src/components/pages/RetailerProductEdition/index.js +111 -142
- package/src/components/pages/RetailerProductEdition/styles.js +4 -0
- package/src/components/pages/RetailerProductEdition/utils.js +37 -0
- package/src/index.js +15 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Container } from "./styles";
|
|
2
|
+
import { GridItem } from "../../molecules/GridItem";
|
|
3
|
+
import { HeaderItem } from "../../molecules/HeaderItem";
|
|
4
|
+
import { RowItem } from "../../molecules/RowItem";
|
|
5
|
+
|
|
6
|
+
export const GridProducts = ({
|
|
7
|
+
products = [],
|
|
8
|
+
columnsArray = [],
|
|
9
|
+
gridView = true,
|
|
10
|
+
chkOnChange,
|
|
11
|
+
selected = [],
|
|
12
|
+
chkChecked,
|
|
13
|
+
checkAll,
|
|
14
|
+
chkCheckedAll,
|
|
15
|
+
onGridClick,
|
|
16
|
+
}) => {
|
|
17
|
+
return (
|
|
18
|
+
<Container>
|
|
19
|
+
{!gridView ? (
|
|
20
|
+
products?.map(({ gridElement, product, id }, i) => (
|
|
21
|
+
<GridItem
|
|
22
|
+
key={i}
|
|
23
|
+
id={id}
|
|
24
|
+
index={i}
|
|
25
|
+
product={product}
|
|
26
|
+
gridElement={gridElement}
|
|
27
|
+
chkOnChange={chkOnChange}
|
|
28
|
+
onGridClick={onGridClick}
|
|
29
|
+
selected={selected}
|
|
30
|
+
chkChecked={chkChecked}
|
|
31
|
+
/>
|
|
32
|
+
))
|
|
33
|
+
) : (
|
|
34
|
+
<div className="table-view">
|
|
35
|
+
<HeaderItem
|
|
36
|
+
columnsArray={columnsArray}
|
|
37
|
+
checkAll={checkAll}
|
|
38
|
+
chkCheckedAll={chkCheckedAll}
|
|
39
|
+
/>
|
|
40
|
+
<RowItem
|
|
41
|
+
productsArray={products}
|
|
42
|
+
chkOnChange={chkOnChange}
|
|
43
|
+
onGridClick={onGridClick}
|
|
44
|
+
chkChecked={chkChecked}
|
|
45
|
+
/>
|
|
46
|
+
</div>
|
|
47
|
+
)}
|
|
48
|
+
</Container>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { RetailerCatalog } from "../../atoms/RetailerCatalog";
|
|
2
|
+
import { UserCatalog } from "../../atoms/UserCatalog";
|
|
3
|
+
|
|
4
|
+
export const getProductsToTable = (
|
|
5
|
+
products = [],
|
|
6
|
+
textSpecialists,
|
|
7
|
+
imagesSpecialists,
|
|
8
|
+
auditors,
|
|
9
|
+
images,
|
|
10
|
+
onAssign
|
|
11
|
+
) => {
|
|
12
|
+
const productsTableArray = [];
|
|
13
|
+
|
|
14
|
+
products.forEach((product) => {
|
|
15
|
+
const { article, orderId, upc, status, version } = product;
|
|
16
|
+
const id = article?.id_article + "-" + orderId;
|
|
17
|
+
const imgArray = images[article?.id_article + "-" + version];
|
|
18
|
+
const element = {
|
|
19
|
+
id,
|
|
20
|
+
cols: [
|
|
21
|
+
{ name: article?.country || "-", flex: 1, minWidth: 100 },
|
|
22
|
+
{ name: orderId || "-", flex: 1, minWidth: 100 },
|
|
23
|
+
{ name: upc || "-", flex: 1, minWidth: 100 },
|
|
24
|
+
{ name: article?.name || "-", flex: 1, minWidth: 200 },
|
|
25
|
+
{ name: "S/M" || "-", flex: 1, minWidth: 100 },
|
|
26
|
+
{ name: status || "-", flex: 1, minWidth: 100 },
|
|
27
|
+
{
|
|
28
|
+
name: (
|
|
29
|
+
<RetailerCatalog
|
|
30
|
+
id={"retailers-" + id}
|
|
31
|
+
article={product}
|
|
32
|
+
retailers={product.retailers}
|
|
33
|
+
/>
|
|
34
|
+
),
|
|
35
|
+
flex: 1,
|
|
36
|
+
minWidth: 100,
|
|
37
|
+
},
|
|
38
|
+
{ name: product.prio, flex: 1, minWidth: 100 },
|
|
39
|
+
{
|
|
40
|
+
name: (
|
|
41
|
+
<UserCatalog
|
|
42
|
+
datasheet={article.id_datasheet_especialist}
|
|
43
|
+
description={article.id_description_especialist}
|
|
44
|
+
images={article.id_images_especialist}
|
|
45
|
+
auditor={article.id_auditor}
|
|
46
|
+
textSpecialists={textSpecialists}
|
|
47
|
+
imagesSpecialists={imagesSpecialists}
|
|
48
|
+
auditors={auditors}
|
|
49
|
+
id={"users-" + id}
|
|
50
|
+
product={product}
|
|
51
|
+
onAssign={onAssign}
|
|
52
|
+
/>
|
|
53
|
+
),
|
|
54
|
+
flex: 1,
|
|
55
|
+
minWidth: 100,
|
|
56
|
+
},
|
|
57
|
+
{ name: "Cont.", flex: 1, minWidth: 100 },
|
|
58
|
+
],
|
|
59
|
+
gridElement: {
|
|
60
|
+
images: imgArray,
|
|
61
|
+
info: [
|
|
62
|
+
{ title: "name", value: article?.name || "-" },
|
|
63
|
+
{ title: "order", value: orderId || "-" },
|
|
64
|
+
{ title: "category", value: article?.category || "-" },
|
|
65
|
+
{ title: "company", value: article?.company_name || "-" },
|
|
66
|
+
{ title: "price", value: article?.price || "-" },
|
|
67
|
+
],
|
|
68
|
+
status: [
|
|
69
|
+
{ title: "datasheet", value: product?.datasheet_status, percent: 80 },
|
|
70
|
+
{
|
|
71
|
+
title: "description",
|
|
72
|
+
value: product?.description_status,
|
|
73
|
+
percent: 80,
|
|
74
|
+
},
|
|
75
|
+
{ title: "images", value: product?.images_status, percent: 80 },
|
|
76
|
+
],
|
|
77
|
+
catalogs: {
|
|
78
|
+
leftSide: (
|
|
79
|
+
<RetailerCatalog
|
|
80
|
+
id={"retailers-" + id}
|
|
81
|
+
limit={2}
|
|
82
|
+
article={product}
|
|
83
|
+
retailers={product.retailers}
|
|
84
|
+
/>
|
|
85
|
+
),
|
|
86
|
+
rightSide: (
|
|
87
|
+
<UserCatalog
|
|
88
|
+
datasheet={article.id_datasheet_especialist}
|
|
89
|
+
description={article.id_description_especialist}
|
|
90
|
+
images={article.id_images_especialist}
|
|
91
|
+
auditor={article.id_auditor}
|
|
92
|
+
textSpecialists={textSpecialists}
|
|
93
|
+
imagesSpecialists={imagesSpecialists}
|
|
94
|
+
auditors={auditors}
|
|
95
|
+
id={"users-" + id}
|
|
96
|
+
product={product}
|
|
97
|
+
onAssign={onAssign}
|
|
98
|
+
/>
|
|
99
|
+
),
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
showBottom: true,
|
|
103
|
+
product,
|
|
104
|
+
article,
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
productsTableArray.push(element);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
return productsTableArray;
|
|
111
|
+
};
|
|
@@ -31,7 +31,6 @@ export const ContainerModal = styled.div`
|
|
|
31
31
|
align-items: center;
|
|
32
32
|
justify-content: flex-start;
|
|
33
33
|
gap: 6px;
|
|
34
|
-
margin-bottom: 20px;
|
|
35
34
|
|
|
36
35
|
.label-title {
|
|
37
36
|
width: 100%;
|
|
@@ -42,6 +41,10 @@ export const ContainerModal = styled.div`
|
|
|
42
41
|
color: #262626;
|
|
43
42
|
white-space: pre-wrap;
|
|
44
43
|
}
|
|
44
|
+
|
|
45
|
+
& + * {
|
|
46
|
+
margin-top: 20px;
|
|
47
|
+
}
|
|
45
48
|
}
|
|
46
49
|
|
|
47
50
|
.iconModal {
|
|
@@ -1,41 +1,31 @@
|
|
|
1
1
|
export const servicesCodeIcon = {
|
|
2
2
|
datasheet: (
|
|
3
3
|
<div key="datasheet" className="tooltip">
|
|
4
|
-
<span className="material-icons small">
|
|
5
|
-

|
|
6
|
-
</span>
|
|
4
|
+
<span className="material-icons small"></span>
|
|
7
5
|
<span className="tooltiptext">Ficha Técnica</span>
|
|
8
6
|
</div>
|
|
9
7
|
),
|
|
10
8
|
description: (
|
|
11
9
|
<div key="description" className="tooltip">
|
|
12
|
-
<span className="material-icons small">
|
|
13
|
-

|
|
14
|
-
</span>
|
|
10
|
+
<span className="material-icons small"></span>
|
|
15
11
|
<span className="tooltiptext">Descripción</span>
|
|
16
12
|
</div>
|
|
17
13
|
),
|
|
18
14
|
image: (
|
|
19
15
|
<div key="image" className="tooltip">
|
|
20
|
-
<span className="material-icons small">
|
|
21
|
-

|
|
22
|
-
</span>
|
|
16
|
+
<span className="material-icons small"></span>
|
|
23
17
|
<span className="tooltiptext">Imagen</span>
|
|
24
18
|
</div>
|
|
25
19
|
),
|
|
26
20
|
translate: (
|
|
27
21
|
<div key="translate" className="tooltip">
|
|
28
|
-
<span className="material-icons small">
|
|
29
|
-

|
|
30
|
-
</span>
|
|
22
|
+
<span className="material-icons small"></span>
|
|
31
23
|
<span className="tooltiptext">Traducción</span>
|
|
32
24
|
</div>
|
|
33
25
|
),
|
|
34
26
|
build: (
|
|
35
|
-
<div key="build"
|
|
36
|
-
<span className="material-icons small">
|
|
37
|
-

|
|
38
|
-
</span>
|
|
27
|
+
<div key="build" className="tooltip">
|
|
28
|
+
<span className="material-icons small"></span>
|
|
39
29
|
<span className="tooltiptext">Construcción</span>
|
|
40
30
|
</div>
|
|
41
31
|
),
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { ButtonV2 } from "../../atoms/ButtonV2";
|
|
3
|
+
import { PanelLayout } from "./index";
|
|
4
|
+
|
|
5
|
+
const TwoColumns = styled.div`
|
|
6
|
+
display: grid;
|
|
7
|
+
width: 100%;
|
|
8
|
+
grid-auto-rows: 1fr;
|
|
9
|
+
grid-template-columns: 85% 15%;
|
|
10
|
+
grid-template-rows: 100%;
|
|
11
|
+
gap: 0px 10px;
|
|
12
|
+
grid-template-areas: "first second";
|
|
13
|
+
.first {
|
|
14
|
+
grid-area: first;
|
|
15
|
+
width: 100%;
|
|
16
|
+
margin-left: 50px;
|
|
17
|
+
display: flex;
|
|
18
|
+
}
|
|
19
|
+
.second {
|
|
20
|
+
grid-area: second;
|
|
21
|
+
width: 100%;
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
export default {
|
|
26
|
+
title: "Components/organisms/PanelLayout",
|
|
27
|
+
component: PanelLayout,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const Template = (args) => <PanelLayout {...args} />;
|
|
31
|
+
|
|
32
|
+
export const PanelLayoutDefault = Template.bind({});
|
|
33
|
+
PanelLayoutDefault.args = {
|
|
34
|
+
header: (
|
|
35
|
+
<TwoColumns>
|
|
36
|
+
<div className="first">Productos</div>
|
|
37
|
+
<div className="second">Precio</div>
|
|
38
|
+
</TwoColumns>
|
|
39
|
+
),
|
|
40
|
+
children: (
|
|
41
|
+
<>
|
|
42
|
+
<TwoColumns>
|
|
43
|
+
<div className="first">Nombre de producto 1</div>
|
|
44
|
+
<div className="second">Precio de producto 1</div>
|
|
45
|
+
</TwoColumns>
|
|
46
|
+
<TwoColumns>
|
|
47
|
+
<div className="first">Nombre de producto 1</div>
|
|
48
|
+
<div className="second">Precio de producto 1</div>
|
|
49
|
+
</TwoColumns>
|
|
50
|
+
</>
|
|
51
|
+
),
|
|
52
|
+
footer: (
|
|
53
|
+
<TwoColumns>
|
|
54
|
+
<div className="first">
|
|
55
|
+
<ButtonV2 id="1" label="Seleccionar todos" type="pink" />
|
|
56
|
+
<ButtonV2 id="2" label="Manual" />
|
|
57
|
+
</div>
|
|
58
|
+
<div className="second">
|
|
59
|
+
<ButtonV2 id="3" label="Siguiente" type="pink" />
|
|
60
|
+
</div>
|
|
61
|
+
</TwoColumns>
|
|
62
|
+
),
|
|
63
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Container, Header, Body, Footer } from "./styles";
|
|
2
|
+
|
|
3
|
+
export const PanelLayout = ({ header, children, footer, className }) => {
|
|
4
|
+
return (
|
|
5
|
+
<Container className={className}>
|
|
6
|
+
{header ? <Header>{header}</Header> : null}
|
|
7
|
+
<Body>{children}</Body>
|
|
8
|
+
{footer ? <Footer>{footer}</Footer> : null}
|
|
9
|
+
</Container>
|
|
10
|
+
);
|
|
11
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { FontFamily } from "../../../global-files/variables";
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
display: grid;
|
|
6
|
+
grid-auto-rows: 1fr;
|
|
7
|
+
grid-template-columns: 1fr;
|
|
8
|
+
grid-template-rows: 34px 1fr 100%;
|
|
9
|
+
gap: 0px 0px;
|
|
10
|
+
grid-template-areas:
|
|
11
|
+
"header"
|
|
12
|
+
"body"
|
|
13
|
+
"footer";
|
|
14
|
+
font-family: ${FontFamily.RobotoMedium}, sans-serif;
|
|
15
|
+
font-size: 12px;
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
export const Header = styled.div`
|
|
19
|
+
grid-area: header;
|
|
20
|
+
background: #8a6caa;
|
|
21
|
+
color: #ffffff;
|
|
22
|
+
border-radius: 5px 5px 0px 0px;
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
`;
|
|
26
|
+
|
|
27
|
+
export const Body = styled.div`
|
|
28
|
+
grid-area: body;
|
|
29
|
+
border-left: 1px solid #f0f0f0;
|
|
30
|
+
border-right: 1px solid #f0f0f0;
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
export const Footer = styled.div`
|
|
34
|
+
grid-area: footer;
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
border: 1px solid #f0f0f0;
|
|
38
|
+
border-radius: 0 0 5px 5px;
|
|
39
|
+
`;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SideModal } from ".";
|
|
2
|
+
import { ButtonV2 } from "../../atoms/ButtonV2";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "Components/organisms/SideModal",
|
|
6
|
+
component: SideModal,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const Template = (args) => <SideModal {...args} />;
|
|
10
|
+
|
|
11
|
+
export const DefaultSideModal = Template.bind({});
|
|
12
|
+
DefaultSideModal.args = {
|
|
13
|
+
show: false,
|
|
14
|
+
header: [
|
|
15
|
+
<div className="title-container">
|
|
16
|
+
<h2></h2>
|
|
17
|
+
</div>,
|
|
18
|
+
<ButtonV2 label="Ir al Checkout" />,
|
|
19
|
+
<ButtonV2 label="X" />,
|
|
20
|
+
],
|
|
21
|
+
body: <></>,
|
|
22
|
+
footer: <></>,
|
|
23
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { useRef } from "react";
|
|
2
|
+
import { Container } from "./styles";
|
|
3
|
+
import { useEffect } from "react";
|
|
4
|
+
import { PropaneSharp } from "@mui/icons-material";
|
|
5
|
+
|
|
6
|
+
export const SideModal = ({
|
|
7
|
+
header,
|
|
8
|
+
body,
|
|
9
|
+
footer,
|
|
10
|
+
show,
|
|
11
|
+
setShow,
|
|
12
|
+
id = "side-modal",
|
|
13
|
+
}) => {
|
|
14
|
+
const modal = useRef();
|
|
15
|
+
|
|
16
|
+
const closeModal = (e) => {
|
|
17
|
+
if (!e.target.closest(`#${id}`) && show) {
|
|
18
|
+
document.removeEventListener("click", closeModal, false);
|
|
19
|
+
modal?.current?.classList?.remove("shown");
|
|
20
|
+
setShow && setShow(false);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (show && modal.current) {
|
|
26
|
+
document.addEventListener("click", closeModal, false);
|
|
27
|
+
modal?.current?.classList?.add("shown");
|
|
28
|
+
}
|
|
29
|
+
}, [show]);
|
|
30
|
+
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
return () => {
|
|
33
|
+
document.removeEventListener("click", closeModal, false);
|
|
34
|
+
modal?.current?.classList?.remove("shown");
|
|
35
|
+
setShow && setShow(false);
|
|
36
|
+
};
|
|
37
|
+
}, []);
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
show && (
|
|
41
|
+
<Container>
|
|
42
|
+
<div id={id} ref={modal} className="modal-container">
|
|
43
|
+
<div className="modal-header">{header}</div>
|
|
44
|
+
<div className="modal-body">{body}</div>
|
|
45
|
+
<div className="modal-footer">{footer}</div>
|
|
46
|
+
</div>
|
|
47
|
+
</Container>
|
|
48
|
+
)
|
|
49
|
+
);
|
|
50
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
|
|
3
|
+
export const Container = styled.div`
|
|
4
|
+
width: 100vw;
|
|
5
|
+
height: 100vh;
|
|
6
|
+
position: fixed;
|
|
7
|
+
z-index: 9999999;
|
|
8
|
+
background-color: transparent;
|
|
9
|
+
top: 0;
|
|
10
|
+
left: 0;
|
|
11
|
+
|
|
12
|
+
.modal-container {
|
|
13
|
+
width: 600px;
|
|
14
|
+
height: 100%;
|
|
15
|
+
position: absolute;
|
|
16
|
+
right: -600px;
|
|
17
|
+
background-color: #fff;
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
box-shadow: -0.5px 0px 5px #f0f0f0;
|
|
21
|
+
border: 1px solid #f0f0f0;
|
|
22
|
+
.modal-body {
|
|
23
|
+
flex: 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&.shown {
|
|
27
|
+
right: 0;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
@@ -16,10 +16,10 @@ ProviderProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: false,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
20
|
-
articleId:
|
|
21
|
-
category:
|
|
22
|
-
version:
|
|
19
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJmNTkyN2Y4ZS1jYmY3LTQ5MjItOWUwOS1lNjllYzBiMjczMWEiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6ImY1OTI3ZjhlLWNiZjctNDkyMi05ZTA5LWU2OWVjMGIyNzMxYSIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiIyM2Q1NTlmYi1jMzIwLTRhMjItYjJmNy1lOThhYTFhZGEyNmYiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY4MzkyNjgyMSwibmFtZSI6IklzbWFlbCBMb3BleiIsInBob25lX251bWJlciI6Iis1MjMxMTEzNjYzMzYiLCJleHAiOjE2ODM5MzA0MjEsImlhdCI6MTY4MzkyNjgyMSwiZW1haWwiOiJpbG9wZXpAY29udGVudG9oLmNvbSJ9.TvCoaKoctj5mypXWMz3NyV1Vm1ToBV0vJmpVyZSQw4-ikTChkxcZ5tFYvqhk1GdvNCFttfSQIqM-14dAYYBc28YwwKP86gqOuzB1fG41rN5x1Yx3tkJq6hiVRgiBbSHWtThA9c8VnxNQbrJiaRTvvkDiM5KNTEst1oxQHL5Ct9_iKQMJMRFie7Xv0xnyS0qZ6QHK4Q2A9OHsnDkAuumALZJcE19Zh6VgSitgWrZiz3x5Text4Q-U-R48NUAzUFirAzYZzJN_fCme5pGf1AnUaZjeUjPsmrV5TBVzPEYwXO0KG8lYjL8id80D7tbGs28ZIK6B4rf3-eqI_ngmBB4CjQ",
|
|
20
|
+
articleId: 238,
|
|
21
|
+
category: 846,
|
|
22
|
+
version: 2,
|
|
23
23
|
productSelected: {
|
|
24
24
|
orderId: 15275,
|
|
25
25
|
status: "AA",
|
|
@@ -153,6 +153,8 @@ ProviderProductEditionDefault.args = {
|
|
|
153
153
|
search: "",
|
|
154
154
|
hash: "",
|
|
155
155
|
state: {
|
|
156
|
+
withChat: true,
|
|
157
|
+
chatType: "product_status",
|
|
156
158
|
origin: "RequestWithContentoh",
|
|
157
159
|
},
|
|
158
160
|
key: "24vwut",
|