contentoh-components-library 10.0.0 → 13.0.0
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 +12 -10
- package/.env.production +2 -0
- package/dist/components/atoms/ActivedFilter/ActivedFilter.stories.js +7 -1
- package/dist/components/atoms/ActivedFilter/index.js +12 -4
- package/dist/components/atoms/AsignationOption/AsignationOptions.stories.js +7 -1
- package/dist/components/atoms/AsignationOption/index.js +29 -22
- package/dist/components/atoms/AsignationOption/styles.js +1 -1
- package/dist/components/atoms/AtomList/AtomList.stories.js +7 -1
- package/dist/components/atoms/AtomList/index.js +14 -9
- package/dist/components/atoms/Avatar/AsignationImage.stories.js +7 -1
- package/dist/components/atoms/Avatar/index.js +11 -8
- package/dist/components/atoms/Card/Card.stories.js +7 -1
- package/dist/components/atoms/Card/index.js +8 -4
- package/dist/components/atoms/CheckBox/CheckBox.stories.js +7 -1
- package/dist/components/atoms/CheckBox/index.js +16 -12
- package/dist/components/atoms/Commentary/index.js +10 -2
- package/dist/components/atoms/Commentary/styles.js +4 -1
- package/dist/components/atoms/CustomerTypeImage/CustomerTypeImage.stories.js +7 -1
- package/dist/components/atoms/CustomerTypeImage/index.js +8 -6
- package/dist/components/atoms/DropDownButton/DropDownButton.stories.js +7 -1
- package/dist/components/atoms/DropDownButton/index.js +9 -6
- package/dist/components/atoms/EditField/EditField.stories.js +7 -1
- package/dist/components/atoms/EditField/index.js +17 -10
- package/dist/components/atoms/FeatureTag/FeatureTag.stories.js +7 -1
- package/dist/components/atoms/FeatureTag/index.js +11 -5
- package/dist/components/atoms/GeneralButton/GeneralButton.stories.js +7 -1
- package/dist/components/atoms/GeneralButton/index.js +13 -7
- package/dist/components/atoms/GeneralInput/GeneralInput.stories.js +7 -1
- package/dist/components/atoms/GeneralInput/index.js +23 -20
- package/dist/components/atoms/GeneralTextBox/GeneralTextBox.stories.js +7 -1
- package/dist/components/atoms/GeneralTextBox/index.js +12 -7
- package/dist/components/atoms/GenericModal/GenericModal.stories.js +46 -59
- package/dist/components/atoms/GenericModal/index.js +12 -7
- package/dist/components/atoms/GradientPanel/GradientPanel.stories.js +85 -80
- package/dist/components/atoms/GradientPanel/index.js +11 -7
- package/dist/components/atoms/Graphic/Graphic.stories.js +7 -1
- package/dist/components/atoms/Graphic/index.js +9 -5
- package/dist/components/atoms/Input/index.js +14 -7
- package/dist/components/atoms/LabelToInput/index.js +19 -13
- package/dist/components/atoms/LoadImageMenu/LoadImageMenu.stories.js +7 -1
- package/dist/components/atoms/LoadImageMenu/index.js +33 -22
- package/dist/components/atoms/LogoImage/LogoImage.stories.js +7 -1
- package/dist/components/atoms/LogoImage/index.js +8 -6
- package/dist/components/atoms/MenuNotification/MenuNotification.stories.js +7 -1
- package/dist/components/atoms/MenuNotification/index.js +21 -15
- package/dist/components/atoms/MenuProfile/MenuProfile.stories.js +7 -1
- package/dist/components/atoms/MenuProfile/index.js +25 -15
- package/dist/components/atoms/Notification/Notification.stories.js +5 -1
- package/dist/components/atoms/Notification/index.js +15 -9
- package/dist/components/atoms/Percent/Percent.stories.js +7 -1
- package/dist/components/atoms/Percent/index.js +21 -14
- package/dist/components/atoms/PriorityFlag/PriorityFlag.stories.js +7 -1
- package/dist/components/atoms/PriorityFlag/index.js +8 -4
- package/dist/components/atoms/ProductImage/ProductImage.stories.js +7 -1
- package/dist/components/atoms/ProductImage/index.js +11 -8
- package/dist/components/atoms/ProgressBar/ProgressBar.stories.js +7 -1
- package/dist/components/atoms/ProgressBar/index.js +8 -3
- package/dist/components/atoms/ScreenHeader/ScreenHeader.stories.js +7 -1
- package/dist/components/atoms/ScreenHeader/index.js +9 -3
- package/dist/components/atoms/Select/index.js +25 -20
- package/dist/components/atoms/SideMenuButton/SideMenuButton.stories.js +5 -1
- package/dist/components/atoms/SideMenuButton/index.js +10 -4
- package/dist/components/atoms/StatusTag/StatusTag.stories.js +7 -1
- package/dist/components/atoms/StatusTag/index.js +8 -3
- package/dist/components/atoms/TabSection/TabSection.stories.js +7 -1
- package/dist/components/atoms/TabSection/index.js +8 -3
- package/dist/components/atoms/ValidationPanel/ValidationPanel.stories.js +7 -1
- package/dist/components/atoms/ValidationPanel/index.js +39 -27
- package/dist/components/molecules/AddProvidersAndProducts/AddProvidersAndProducts.stories.js +5 -1
- package/dist/components/molecules/AddProvidersAndProducts/index.js +18 -12
- package/dist/components/molecules/AssignedWork/AssignedWork.stories.js +5 -1
- package/dist/components/molecules/AssignedWork/index.js +36 -30
- package/dist/components/molecules/AvatarAndValidation/AvatarAndValidation.stories.js +7 -1
- package/dist/components/molecules/AvatarAndValidation/index.js +22 -17
- package/dist/components/molecules/EditionActiveImage/EditionActiveImage.stories.js +7 -1
- package/dist/components/molecules/EditionActiveImage/index.js +14 -10
- package/dist/components/molecules/FeaturesBar/FeaturesBar.stories.js +7 -1
- package/dist/components/molecules/FeaturesBar/index.js +11 -9
- package/dist/components/molecules/GalleryElement/GalleryElement.stories.js +7 -1
- package/dist/components/molecules/GalleryElement/index.js +69 -55
- package/dist/components/molecules/GalleryHeader/GalleryHeader.stories.js +7 -1
- package/dist/components/molecules/GalleryHeader/index.js +28 -15
- package/dist/components/molecules/HeaderTop/HeaderTop.stories.js +7 -1
- package/dist/components/molecules/HeaderTop/index.js +10 -7
- package/dist/components/molecules/ImageSelector/ImageSelector.stories.js +7 -1
- package/dist/components/molecules/ImageSelector/index.js +15 -13
- package/dist/components/molecules/ParentComponent/ParentComponent.stories.js +10 -2
- package/dist/components/molecules/ParentComponent/index.js +9 -5
- package/dist/components/molecules/PayMethod/PayMethod.stories.js +7 -1
- package/dist/components/molecules/PayMethod/index.js +38 -33
- package/dist/components/molecules/PlanSelection/PlanSelection.stories.js +7 -1
- package/dist/components/molecules/PlanSelection/index.js +14 -11
- package/dist/components/molecules/ProductNameHeader/ProductNameHeader.stories.js +7 -1
- package/dist/components/molecules/ProductNameHeader/index.js +18 -14
- package/dist/components/molecules/ProductNotification/ProductNotification.stories.js +7 -1
- package/dist/components/molecules/ProductNotification/index.js +12 -9
- package/dist/components/molecules/ProfileHeader/ProfileHeader.stories.js +5 -1
- package/dist/components/molecules/ProfileHeader/index.js +21 -15
- package/dist/components/molecules/RetailerSelector/RetailerSelector.stories.js +7 -1
- package/dist/components/molecules/RetailerSelector/index.js +27 -24
- package/dist/components/molecules/SidebarNotification/SidebarNotification.stories.js +5 -1
- package/dist/components/molecules/SidebarNotification/index.js +43 -37
- package/dist/components/molecules/StatusAsignationInfo/StatusAsignationInfo.stories.js +7 -1
- package/dist/components/molecules/StatusAsignationInfo/index.js +115 -88
- package/dist/components/molecules/StatusAsignationInfo/styles.js +1 -1
- package/dist/components/molecules/TableHeader/TableHeader.stories.js +7 -1
- package/dist/components/molecules/TableHeader/index.js +17 -9
- package/dist/components/molecules/TableRow/TableRow.stories.js +7 -1
- package/dist/components/molecules/TableRow/index.js +11 -7
- package/dist/components/molecules/TabsMenu/TabsMenu.stories.js +7 -1
- package/dist/components/molecules/TabsMenu/index.js +13 -10
- package/dist/components/molecules/TagAndInput/TagAndInput.stories.js +7 -1
- package/dist/components/molecules/TagAndInput/index.js +24 -22
- package/dist/components/organisms/FullProductNameHeader/FullProductNameHeader.stories.js +7 -1
- package/dist/components/organisms/FullProductNameHeader/index.js +35 -30
- package/dist/components/organisms/FullTabsMenu/FullTabsMenu.stories.js +7 -1
- package/dist/components/organisms/FullTabsMenu/index.js +26 -19
- package/dist/components/organisms/Fullplan/FullPlan.stories.js +7 -1
- package/dist/components/organisms/Fullplan/index.js +23 -15
- package/dist/components/organisms/ImageDataTable/ImageDataTable.stories.js +7 -1
- package/dist/components/organisms/ImageDataTable/index.js +79 -62
- package/dist/components/organisms/ImagePreviewer/ImagePreviewer.stories.js +7 -1
- package/dist/components/organisms/ImagePreviewer/index.js +12 -8
- package/dist/components/organisms/ImagesGroup/index.js +5 -1
- package/dist/components/organisms/InputGroup/InputGroup.stories.js +7 -1
- package/dist/components/organisms/InputGroup/index.js +39 -37
- package/dist/components/organisms/ProductImageModal/ProductImageModal.stories.js +7 -1
- package/dist/components/organisms/ProductImageModal/index.js +49 -43
- package/dist/components/pages/CustomerLogin/CustomerLogin.stories.js +52 -47
- package/dist/components/pages/CustomerLogin/index.js +18 -12
- package/dist/components/pages/CustomerPayMethod/CustomerPayMethod.stories.js +36 -28
- package/dist/components/pages/CustomerPayMethod/index.js +18 -12
- package/dist/components/pages/CustomerType/CustomerType.stories.js +21 -22
- package/dist/components/pages/CustomerType/index.js +18 -12
- package/dist/components/pages/OnboardPlan/OnboardPlan.stories.js +12 -9
- package/dist/components/pages/OnboardPlan/index.js +18 -12
- package/dist/components/pages/RetailerPlan/RetailerPlan.stories.js +13 -10
- package/dist/components/pages/RetailerPlan/index.js +18 -12
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +8 -1
- package/dist/components/pages/RetailerProductEdition/index.js +538 -244
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/global-files/data.js +51 -4
- package/dist/index.js +0 -70
- package/package.json +8 -1
- package/src/components/atoms/AsignationOption/index.js +1 -1
- package/src/components/atoms/AsignationOption/styles.js +6 -0
- package/src/components/atoms/Commentary/index.js +2 -2
- package/src/components/atoms/Commentary/styles.js +1 -0
- package/src/components/atoms/GeneralButton/index.js +1 -0
- package/src/components/atoms/GeneralInput/index.js +12 -6
- package/src/components/molecules/StatusAsignationInfo/index.js +38 -24
- package/src/components/molecules/StatusAsignationInfo/styles.js +8 -2
- package/src/components/molecules/TableHeader/index.js +9 -1
- package/src/components/organisms/FullTabsMenu/index.js +6 -3
- package/src/components/organisms/ImageDataTable/index.js +4 -0
- package/src/components/organisms/ProductImageModal/index.js +0 -4
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +2 -0
- package/src/components/pages/RetailerProductEdition/index.js +194 -54
- package/src/components/pages/RetailerProductEdition/styles.js +4 -0
- package/src/global-files/data.js +29 -2
- package/src/index.js +0 -7
|
@@ -15,26 +15,30 @@ var _index3 = require("../../atoms/ProgressBar/index");
|
|
|
15
15
|
|
|
16
16
|
var _index4 = require("../../atoms/PriorityFlag/index");
|
|
17
17
|
|
|
18
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
+
|
|
18
20
|
var ProductNameHeader = function ProductNameHeader(_ref) {
|
|
19
21
|
var productName = _ref.productName,
|
|
20
22
|
statusType = _ref.statusType,
|
|
21
23
|
percent = _ref.percent,
|
|
22
24
|
priority = _ref.priority,
|
|
23
25
|
date = _ref.date;
|
|
24
|
-
return /*#__PURE__*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
26
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
27
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
|
|
28
|
+
headerType: "product-name-header",
|
|
29
|
+
text: productName
|
|
30
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.StatusTag, {
|
|
31
|
+
statusType: statusType
|
|
32
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index3.ProgressBar, {
|
|
33
|
+
percent: percent,
|
|
34
|
+
progressBarType: statusType
|
|
35
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index4.PriorityFlag, {
|
|
36
|
+
priority: priority
|
|
37
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
|
|
38
|
+
headerType: "date-header",
|
|
39
|
+
text: date
|
|
40
|
+
})]
|
|
41
|
+
});
|
|
38
42
|
};
|
|
39
43
|
|
|
40
44
|
exports.ProductNameHeader = ProductNameHeader;
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.default = exports.ProductNotificationDefault = void 0;
|
|
7
9
|
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
|
+
|
|
8
12
|
var _index = require("./index");
|
|
9
13
|
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
|
|
10
16
|
var _default = {
|
|
11
17
|
title: "Components/molecules/ProductNotification",
|
|
12
18
|
component: _index.ProductNotification
|
|
@@ -14,7 +20,7 @@ var _default = {
|
|
|
14
20
|
exports.default = _default;
|
|
15
21
|
|
|
16
22
|
var Template = function Template(args) {
|
|
17
|
-
return /*#__PURE__*/
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ProductNotification, (0, _objectSpread2.default)({}, args));
|
|
18
24
|
};
|
|
19
25
|
|
|
20
26
|
var ProductNotificationDefault = Template.bind({});
|
|
@@ -19,6 +19,8 @@ var _MenuNotification = require("../../atoms/MenuNotification");
|
|
|
19
19
|
|
|
20
20
|
var _productNotification = _interopRequireDefault(require("../../../assets/images/productNotification/productNotification.svg"));
|
|
21
21
|
|
|
22
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
|
+
|
|
22
24
|
var ProductNotification = function ProductNotification(_ref) {
|
|
23
25
|
var notification = _ref.notification;
|
|
24
26
|
|
|
@@ -49,7 +51,7 @@ var ProductNotification = function ProductNotification(_ref) {
|
|
|
49
51
|
notificationType: "productAssignation",
|
|
50
52
|
label: "Agregaron comentario en producto 123"
|
|
51
53
|
}];
|
|
52
|
-
return /*#__PURE__*/
|
|
54
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
53
55
|
onClick: function onClick(e) {
|
|
54
56
|
e.stopPropagation();
|
|
55
57
|
setShowMenu(!showMenu);
|
|
@@ -58,14 +60,15 @@ var ProductNotification = function ProductNotification(_ref) {
|
|
|
58
60
|
document.removeEventListener("click", closeMenu, false);
|
|
59
61
|
}
|
|
60
62
|
},
|
|
61
|
-
className: notification && "new-notification"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
className: notification && "new-notification",
|
|
64
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Avatar, {
|
|
65
|
+
image: _productNotification.default,
|
|
66
|
+
imageType: "big-image",
|
|
67
|
+
altText: "Notification Picture"
|
|
68
|
+
}), showMenu && /*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuNotification.MenuNotification, {
|
|
69
|
+
content: content
|
|
70
|
+
})]
|
|
71
|
+
});
|
|
69
72
|
};
|
|
70
73
|
|
|
71
74
|
exports.ProductNotification = ProductNotification;
|
|
@@ -7,10 +7,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = exports.ProfileHeaderDefault = void 0;
|
|
9
9
|
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
|
+
|
|
10
12
|
var _index = require("./index");
|
|
11
13
|
|
|
12
14
|
var _profilePicture = _interopRequireDefault(require("../../../assets/images/profileHeader/profilePicture.svg"));
|
|
13
15
|
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
|
|
14
18
|
var _default = {
|
|
15
19
|
title: "Components/molecules/ProfileHeader",
|
|
16
20
|
component: _index.ProfileHeader
|
|
@@ -18,7 +22,7 @@ var _default = {
|
|
|
18
22
|
exports.default = _default;
|
|
19
23
|
|
|
20
24
|
var Template = function Template(args) {
|
|
21
|
-
return /*#__PURE__*/
|
|
25
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ProfileHeader, (0, _objectSpread2.default)({}, args));
|
|
22
26
|
};
|
|
23
27
|
|
|
24
28
|
var ProfileHeaderDefault = Template.bind({});
|
|
@@ -21,6 +21,8 @@ var _react = require("react");
|
|
|
21
21
|
|
|
22
22
|
var _MenuProfile = require("../../atoms/MenuProfile");
|
|
23
23
|
|
|
24
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
|
+
|
|
24
26
|
var ProfileHeader = function ProfileHeader(_ref) {
|
|
25
27
|
var customerProfileImg = _ref.customerProfileImg,
|
|
26
28
|
customerName = _ref.customerName,
|
|
@@ -46,7 +48,7 @@ var ProfileHeader = function ProfileHeader(_ref) {
|
|
|
46
48
|
var MenuInfo = {
|
|
47
49
|
user: "Administrador"
|
|
48
50
|
};
|
|
49
|
-
return /*#__PURE__*/
|
|
51
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
50
52
|
onClick: function onClick(e) {
|
|
51
53
|
e.stopPropagation();
|
|
52
54
|
setShowMenu(!showMenu);
|
|
@@ -54,20 +56,24 @@ var ProfileHeader = function ProfileHeader(_ref) {
|
|
|
54
56
|
if (showMenu) {
|
|
55
57
|
document.removeEventListener("click", closeMenu, false);
|
|
56
58
|
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
59
|
+
},
|
|
60
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Avatar, {
|
|
61
|
+
image: customerProfileImg,
|
|
62
|
+
imageType: "profile-image",
|
|
63
|
+
altText: "Profile Picture"
|
|
64
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
65
|
+
className: "user-info",
|
|
66
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
|
|
67
|
+
headerType: "retailer-name-header",
|
|
68
|
+
text: customerName,
|
|
69
|
+
color: _variables.GlobalColors.original_magenta
|
|
70
|
+
}), customer && /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
71
|
+
children: customer
|
|
72
|
+
})]
|
|
73
|
+
}), showMenu && /*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuProfile.MenuProfile, {
|
|
74
|
+
user: MenuInfo.user
|
|
75
|
+
})]
|
|
76
|
+
});
|
|
71
77
|
};
|
|
72
78
|
|
|
73
79
|
exports.ProfileHeader = ProfileHeader;
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.default = exports.RetailerSelectorDefault = void 0;
|
|
7
9
|
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
|
+
|
|
8
12
|
var _index = require("./index");
|
|
9
13
|
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
|
|
10
16
|
var _default = {
|
|
11
17
|
title: "Components/molecules/RetailerSelector",
|
|
12
18
|
component: _index.RetailerSelector
|
|
@@ -14,7 +20,7 @@ var _default = {
|
|
|
14
20
|
exports.default = _default;
|
|
15
21
|
|
|
16
22
|
var Template = function Template(args) {
|
|
17
|
-
return /*#__PURE__*/
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.RetailerSelector, (0, _objectSpread2.default)({}, args));
|
|
18
24
|
};
|
|
19
25
|
|
|
20
26
|
var RetailerSelectorDefault = Template.bind({});
|
|
@@ -17,6 +17,8 @@ var _react = require("react");
|
|
|
17
17
|
|
|
18
18
|
var _AsignationOption = require("../../atoms/AsignationOption");
|
|
19
19
|
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
+
|
|
20
22
|
var RetailerSelector = function RetailerSelector(_ref) {
|
|
21
23
|
var retailers = _ref.retailers,
|
|
22
24
|
activeRetailer = _ref.activeRetailer,
|
|
@@ -39,33 +41,34 @@ var RetailerSelector = function RetailerSelector(_ref) {
|
|
|
39
41
|
document.addEventListener("click", closeRetailersPanel, false);
|
|
40
42
|
}
|
|
41
43
|
}, [retailersPanel]);
|
|
42
|
-
return /*#__PURE__*/
|
|
43
|
-
id: "retailers-assignation"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
imageType: "medium-image",
|
|
48
|
-
onClick: function onClick() {
|
|
49
|
-
retailers.length > 1 && setRetailersPanel(!retailersPanel);
|
|
50
|
-
if (retailersPanel) document.removeEventListener("click", closeRetailersPanel, false);
|
|
51
|
-
}
|
|
52
|
-
}), retailersPanel && /*#__PURE__*/React.createElement("div", {
|
|
53
|
-
className: "retailers-panel"
|
|
54
|
-
}, retailers.map(function (retailer, index) {
|
|
55
|
-
return /*#__PURE__*/React.createElement(_AsignationOption.AsignationOption, {
|
|
56
|
-
key: "".concat(index, "-").concat(retailer === null || retailer === void 0 ? void 0 : retailer.name),
|
|
57
|
-
profileImage: retailer === null || retailer === void 0 ? void 0 : retailer.image,
|
|
44
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
45
|
+
id: "retailers-assignation",
|
|
46
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.Avatar, {
|
|
47
|
+
image: activeRetailer === null || activeRetailer === void 0 ? void 0 : activeRetailer.image,
|
|
48
|
+
altText: activeRetailer === null || activeRetailer === void 0 ? void 0 : activeRetailer.name,
|
|
58
49
|
imageType: "medium-image",
|
|
59
|
-
asignationType: null,
|
|
60
|
-
name: retailer === null || retailer === void 0 ? void 0 : retailer.name,
|
|
61
|
-
team: retailer === null || retailer === void 0 ? void 0 : retailer.team,
|
|
62
50
|
onClick: function onClick() {
|
|
63
|
-
|
|
64
|
-
document.removeEventListener("click", closeRetailersPanel, false);
|
|
65
|
-
setRetailersPanel(false);
|
|
51
|
+
retailers.length > 1 && setRetailersPanel(!retailersPanel);
|
|
52
|
+
if (retailersPanel) document.removeEventListener("click", closeRetailersPanel, false);
|
|
66
53
|
}
|
|
67
|
-
})
|
|
68
|
-
|
|
54
|
+
}), retailersPanel && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
55
|
+
className: "retailers-panel",
|
|
56
|
+
children: retailers.map(function (retailer, index) {
|
|
57
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_AsignationOption.AsignationOption, {
|
|
58
|
+
profileImage: retailer === null || retailer === void 0 ? void 0 : retailer.image,
|
|
59
|
+
imageType: "medium-image",
|
|
60
|
+
asignationType: null,
|
|
61
|
+
name: retailer === null || retailer === void 0 ? void 0 : retailer.name,
|
|
62
|
+
team: retailer === null || retailer === void 0 ? void 0 : retailer.team,
|
|
63
|
+
onClick: function onClick() {
|
|
64
|
+
setActiveRetailer(retailer);
|
|
65
|
+
document.removeEventListener("click", closeRetailersPanel, false);
|
|
66
|
+
setRetailersPanel(false);
|
|
67
|
+
}
|
|
68
|
+
}, "".concat(index, "-").concat(retailer === null || retailer === void 0 ? void 0 : retailer.name));
|
|
69
|
+
})
|
|
70
|
+
})]
|
|
71
|
+
});
|
|
69
72
|
};
|
|
70
73
|
|
|
71
74
|
exports.RetailerSelector = RetailerSelector;
|
|
@@ -7,10 +7,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = exports.SidebarNotificationDefault = void 0;
|
|
9
9
|
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
|
+
|
|
10
12
|
var _index = require("./index");
|
|
11
13
|
|
|
12
14
|
var _defaultProfileImage = _interopRequireDefault(require("../../../assets/images/defaultImages/defaultProfileImage.svg"));
|
|
13
15
|
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
|
|
14
18
|
var _default = {
|
|
15
19
|
title: "Components/molecules/SidebarNotification",
|
|
16
20
|
component: _index.SidebarNotification,
|
|
@@ -31,7 +35,7 @@ var setShowSidebar = function setShowSidebar(value) {
|
|
|
31
35
|
};
|
|
32
36
|
|
|
33
37
|
var Template = function Template(args) {
|
|
34
|
-
return /*#__PURE__*/
|
|
38
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.SidebarNotification, (0, _objectSpread2.default)({}, args));
|
|
35
39
|
};
|
|
36
40
|
|
|
37
41
|
var SidebarNotificationDefault = Template.bind({});
|
|
@@ -23,6 +23,8 @@ var _Notification = require("../../atoms/Notification");
|
|
|
23
23
|
|
|
24
24
|
var _react = require("react");
|
|
25
25
|
|
|
26
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
|
+
|
|
26
28
|
var SidebarNotification = function SidebarNotification(_ref) {
|
|
27
29
|
var _ref$array = _ref.array,
|
|
28
30
|
array = _ref$array === void 0 ? [] : _ref$array,
|
|
@@ -63,43 +65,47 @@ var SidebarNotification = function SidebarNotification(_ref) {
|
|
|
63
65
|
return date;
|
|
64
66
|
};
|
|
65
67
|
|
|
66
|
-
return /*#__PURE__*/
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
68
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
69
|
+
children: [showSidebar && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
70
|
+
id: "side-bar",
|
|
71
|
+
ref: sidebar,
|
|
72
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
73
|
+
className: "notification-header",
|
|
74
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Avatar, {
|
|
75
|
+
image: _productNotification.default,
|
|
76
|
+
imageType: "retailer-image",
|
|
77
|
+
altText: "Notification Picture"
|
|
78
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
|
|
79
|
+
headerType: "product-name-header",
|
|
80
|
+
text: "Notificaciones",
|
|
81
|
+
color: "#867586"
|
|
82
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
83
|
+
buttonType: "close-button"
|
|
84
|
+
})]
|
|
85
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
86
|
+
className: "scroll",
|
|
87
|
+
children: array === null || array === void 0 ? void 0 : array.map(function (element, index) {
|
|
88
|
+
var _element$notification;
|
|
89
|
+
|
|
90
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
91
|
+
className: "date-notification",
|
|
92
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
|
|
93
|
+
headerType: "input-name-header",
|
|
94
|
+
text: comparisonDate(element === null || element === void 0 ? void 0 : element.dates),
|
|
95
|
+
color: "#6A5880",
|
|
96
|
+
FontFamily: _variables.FontFamily.AvenirNext
|
|
97
|
+
}), element === null || element === void 0 ? void 0 : (_element$notification = element.notifications) === null || _element$notification === void 0 ? void 0 : _element$notification.map(function (notification, index) {
|
|
98
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Notification.Notification, {
|
|
99
|
+
profilePicture: notification === null || notification === void 0 ? void 0 : notification.profilePicture,
|
|
100
|
+
notification: notification === null || notification === void 0 ? void 0 : notification.notification,
|
|
101
|
+
newNotification: notification === null || notification === void 0 ? void 0 : notification.newNotification
|
|
102
|
+
}, index);
|
|
103
|
+
})]
|
|
104
|
+
}, index + "-" + (element === null || element === void 0 ? void 0 : element.dates));
|
|
105
|
+
})
|
|
106
|
+
})]
|
|
107
|
+
}), " "]
|
|
108
|
+
});
|
|
103
109
|
};
|
|
104
110
|
|
|
105
111
|
exports.SidebarNotification = SidebarNotification;
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.default = exports.StatusAsignationInfoDefault = void 0;
|
|
7
9
|
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
|
+
|
|
8
12
|
var _index = require("./index");
|
|
9
13
|
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
|
|
10
16
|
var _default = {
|
|
11
17
|
title: "Components/molecules/StatusAsignationInfo",
|
|
12
18
|
component: _index.StatusAsignationInfo
|
|
@@ -14,7 +20,7 @@ var _default = {
|
|
|
14
20
|
exports.default = _default;
|
|
15
21
|
|
|
16
22
|
var Template = function Template(args) {
|
|
17
|
-
return /*#__PURE__*/
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.StatusAsignationInfo, (0, _objectSpread2.default)({}, args));
|
|
18
24
|
};
|
|
19
25
|
|
|
20
26
|
var StatusAsignationInfoDefault = Template.bind({});
|