contentoh-components-library 21.4.37 → 21.4.38
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/images/Icons/delete.svg +8 -0
- package/dist/assets/images/Icons/edit.svg +3 -0
- package/dist/assets/images/Icons/info.svg +8 -0
- package/dist/components/molecules/BoxAttribute/BoxAttribute.stories.js +33 -0
- package/dist/components/molecules/BoxAttribute/index.js +73 -0
- package/dist/components/molecules/BoxAttribute/styles.js +23 -0
- package/dist/components/molecules/BoxButtons/BoxButtons.stories.js +31 -0
- package/dist/components/molecules/BoxButtons/index.js +56 -0
- package/dist/components/molecules/BoxButtons/styles.js +24 -0
- package/dist/components/molecules/ButtonsAssignation/ButtonsAssignation.stories.js +34 -0
- package/dist/components/molecules/ButtonsAssignation/index.js +142 -0
- package/dist/components/molecules/ButtonsAssignation/styles.js +20 -0
- package/dist/components/molecules/ButtonsEdition/ButtonsEdition.stories.js +34 -0
- package/dist/components/molecules/ButtonsEdition/index.js +182 -0
- package/dist/components/molecules/ButtonsEdition/styles.js +24 -0
- package/dist/components/molecules/ProductSkuStatus/ProductSkuStatus.stories.js +64 -0
- package/dist/components/molecules/ProductSkuStatus/index.js +36 -0
- package/dist/components/molecules/ProductSkuStatus/styles.js +18 -0
- package/dist/components/molecules/Validation/Validation.stories.js +28 -0
- package/dist/components/molecules/Validation/index.js +77 -0
- package/dist/components/molecules/Validation/styles.js +18 -0
- package/dist/components/organisms/BarButtons/BarButtons.stories.js +30 -0
- package/dist/components/organisms/BarButtons/index.js +61 -0
- package/dist/components/organisms/BarButtons/styles.js +18 -0
- package/dist/components/organisms/Box/Box.stories.js +37 -0
- package/dist/components/organisms/Box/index.js +99 -0
- package/dist/components/organisms/Box/styles.js +20 -0
- package/dist/components/organisms/BoxOnboarding/BoxOnboarding.stories.js +37 -0
- package/dist/components/organisms/BoxOnboarding/index.js +69 -0
- package/dist/components/organisms/BoxOnboarding/styles.js +20 -0
- package/dist/components/organisms/InputGroup/index.js +66 -48
- package/dist/components/pages/ProviderProductEdition/index.js +1 -1
- package/dist/components/pages/ProviderProductEdition1/ProviderProductEdition.stories.js +222 -0
- package/dist/components/pages/ProviderProductEdition1/index.js +2339 -0
- package/dist/components/pages/ProviderProductEdition1/styles.js +23 -0
- package/dist/global-files/data.js +4 -4
- package/dist/global-files/variables.js +5 -1
- package/package.json +1 -1
- package/src/assets/images/Icons/info.svg +8 -0
- package/src/components/molecules/BoxAttribute/BoxAttribute.stories.js +17 -0
- package/src/components/molecules/BoxAttribute/index.js +71 -0
- package/src/components/molecules/BoxAttribute/styles.js +35 -0
- package/src/components/molecules/BoxButtons/BoxButtons.stories.js +15 -0
- package/src/components/molecules/BoxButtons/index.js +32 -0
- package/src/components/molecules/BoxButtons/styles.js +43 -0
- package/src/components/organisms/Box/Box.stories.js +17 -0
- package/src/components/organisms/Box/index.js +61 -0
- package/src/components/organisms/Box/styles.js +48 -0
- package/src/components/organisms/BoxOnboarding/BoxOnboarding.stories.js +17 -0
- package/src/components/organisms/BoxOnboarding/index.js +63 -0
- package/src/components/organisms/BoxOnboarding/styles.js +44 -0
- package/src/components/organisms/InputGroup/index.js +22 -0
- package/src/components/pages/ProviderProductEdition/index.js +2 -1
- package/src/global-files/data.js +3 -2
- package/src/global-files/variables.js +4 -0
|
@@ -0,0 +1,182 @@
|
|
|
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.ButtonsEdition = void 0;
|
|
9
|
+
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
11
|
+
|
|
12
|
+
var _styles = require("./styles");
|
|
13
|
+
|
|
14
|
+
var _GeneralButton = require("../../atoms/GeneralButton");
|
|
15
|
+
|
|
16
|
+
var _react = require("react");
|
|
17
|
+
|
|
18
|
+
var _Chat = require("../../organisms/Chat");
|
|
19
|
+
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
+
|
|
22
|
+
// import { Button } from "@mui/material";
|
|
23
|
+
var ButtonsEdition = function ButtonsEdition(_ref) {
|
|
24
|
+
var imagesSection = _ref.imagesSection,
|
|
25
|
+
setImageLayout = _ref.setImageLayout,
|
|
26
|
+
downloadImages = _ref.downloadImages,
|
|
27
|
+
askToDeleteImages = _ref.askToDeleteImages,
|
|
28
|
+
_ref$id = _ref.id,
|
|
29
|
+
id = _ref$id === void 0 ? "default-id" : _ref$id,
|
|
30
|
+
onClickSave = _ref.onClickSave,
|
|
31
|
+
showSaveButton = _ref.showSaveButton,
|
|
32
|
+
activeRetailer = _ref.activeRetailer,
|
|
33
|
+
productSelected = _ref.productSelected,
|
|
34
|
+
isAuditor = _ref.isAuditor,
|
|
35
|
+
auditableVersion = _ref.auditableVersion,
|
|
36
|
+
setHeaderTop = _ref.setHeaderTop,
|
|
37
|
+
withChat = _ref.withChat,
|
|
38
|
+
chatType = _ref.chatType,
|
|
39
|
+
token = _ref.token;
|
|
40
|
+
|
|
41
|
+
var _useState = (0, _react.useState)(false),
|
|
42
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
43
|
+
showAsignationPanel = _useState2[0],
|
|
44
|
+
setShowAsignationPanel = _useState2[1];
|
|
45
|
+
|
|
46
|
+
var _useState3 = (0, _react.useState)(false),
|
|
47
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
48
|
+
layout = _useState4[0],
|
|
49
|
+
setLayout = _useState4[1];
|
|
50
|
+
|
|
51
|
+
var _useState5 = (0, _react.useState)("facilitator"),
|
|
52
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
53
|
+
assignationType = _useState6[0],
|
|
54
|
+
setAssignationType = _useState6[1];
|
|
55
|
+
|
|
56
|
+
var headerTop = (0, _react.useRef)();
|
|
57
|
+
|
|
58
|
+
var _useState7 = (0, _react.useState)(null),
|
|
59
|
+
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
60
|
+
chat = _useState8[0],
|
|
61
|
+
setChat = _useState8[1];
|
|
62
|
+
|
|
63
|
+
var _useState9 = (0, _react.useState)(null),
|
|
64
|
+
_useState10 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
65
|
+
chatData = _useState10[0],
|
|
66
|
+
setChatData = _useState10[1];
|
|
67
|
+
|
|
68
|
+
var closeAsignations = function closeAsignations(e) {
|
|
69
|
+
if (!e.target.closest("#default-id") && showAsignationPanel) {
|
|
70
|
+
document.removeEventListener("click", closeAsignations, false);
|
|
71
|
+
setShowAsignationPanel(false);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
(0, _react.useEffect)(function () {
|
|
76
|
+
if (showAsignationPanel) {
|
|
77
|
+
document.addEventListener("click", closeAsignations, false);
|
|
78
|
+
}
|
|
79
|
+
}, [showAsignationPanel]);
|
|
80
|
+
(0, _react.useEffect)(function () {
|
|
81
|
+
if (activeRetailer.id && productSelected && token.length) {
|
|
82
|
+
var _productSelected$arti;
|
|
83
|
+
|
|
84
|
+
setChatData({
|
|
85
|
+
id: (productSelected === null || productSelected === void 0 ? void 0 : (_productSelected$arti = productSelected.article) === null || _productSelected$arti === void 0 ? void 0 : _productSelected$arti.id_article) || (productSelected === null || productSelected === void 0 ? void 0 : productSelected.id_article),
|
|
86
|
+
version: productSelected === null || productSelected === void 0 ? void 0 : productSelected.version,
|
|
87
|
+
retailerId: activeRetailer === null || activeRetailer === void 0 ? void 0 : activeRetailer.id,
|
|
88
|
+
status: productSelected === null || productSelected === void 0 ? void 0 : productSelected.status,
|
|
89
|
+
userToken: token
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}, [activeRetailer, productSelected, token]);
|
|
93
|
+
(0, _react.useEffect)(function () {
|
|
94
|
+
if (chatType) renderChat(chatType);
|
|
95
|
+
}, [chatData, chatType]);
|
|
96
|
+
(0, _react.useEffect)(function () {
|
|
97
|
+
setHeaderTop && setHeaderTop(headerTop.current.clientHeight);
|
|
98
|
+
}, []);
|
|
99
|
+
|
|
100
|
+
var renderChat = function renderChat(chatType) {
|
|
101
|
+
switch (chatType) {
|
|
102
|
+
case "product_status":
|
|
103
|
+
chatData && setChat( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chat.Chat, {
|
|
104
|
+
chatType: "product_status",
|
|
105
|
+
chatContainerType: "popUp",
|
|
106
|
+
chatData: {
|
|
107
|
+
id: chatData === null || chatData === void 0 ? void 0 : chatData.id,
|
|
108
|
+
version: chatData === null || chatData === void 0 ? void 0 : chatData.version,
|
|
109
|
+
retailerId: chatData === null || chatData === void 0 ? void 0 : chatData.retailerId,
|
|
110
|
+
status: chatData === null || chatData === void 0 ? void 0 : chatData.status,
|
|
111
|
+
userToken: chatData === null || chatData === void 0 ? void 0 : chatData.userToken
|
|
112
|
+
},
|
|
113
|
+
size: 18,
|
|
114
|
+
activeRetailer: activeRetailer
|
|
115
|
+
}));
|
|
116
|
+
break;
|
|
117
|
+
|
|
118
|
+
default:
|
|
119
|
+
setChat( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chat.Chat, {
|
|
120
|
+
chatType: "merchant_product",
|
|
121
|
+
chatContainerType: "popUp",
|
|
122
|
+
chatData: {
|
|
123
|
+
userToken: token,
|
|
124
|
+
id: productSelected.id_article,
|
|
125
|
+
version: productSelected.version
|
|
126
|
+
},
|
|
127
|
+
size: 18,
|
|
128
|
+
activeRetailer: activeRetailer
|
|
129
|
+
}));
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
135
|
+
id: id,
|
|
136
|
+
children: [showSaveButton && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
137
|
+
buttonType: "circular-button save-button",
|
|
138
|
+
onClick: onClickSave
|
|
139
|
+
}), imagesSection && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
140
|
+
className: "images-buttons",
|
|
141
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
142
|
+
buttonType: layout ? "grid-layout" : "row-layout",
|
|
143
|
+
onClick: function onClick() {
|
|
144
|
+
setLayout(!layout);
|
|
145
|
+
setImageLayout && setImageLayout(!layout);
|
|
146
|
+
}
|
|
147
|
+
})
|
|
148
|
+
}), imagesSection && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
149
|
+
className: "images-buttons",
|
|
150
|
+
children: showSaveButton && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
151
|
+
buttonType: "circular-button delete-button",
|
|
152
|
+
onClick: function onClick() {
|
|
153
|
+
askToDeleteImages && askToDeleteImages();
|
|
154
|
+
}
|
|
155
|
+
})
|
|
156
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
157
|
+
className: "buttons-container",
|
|
158
|
+
children: [withChat && chat, isAuditor && auditableVersion && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
159
|
+
variant: "outlined",
|
|
160
|
+
className: "button-circle",
|
|
161
|
+
onClick: function onClick() {
|
|
162
|
+
setCompare(function (current) {
|
|
163
|
+
return !current;
|
|
164
|
+
});
|
|
165
|
+
},
|
|
166
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.ContainerIcon, {
|
|
167
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
168
|
+
class: "iconos-out iconos-grises",
|
|
169
|
+
children: "forum"
|
|
170
|
+
})
|
|
171
|
+
})
|
|
172
|
+
})]
|
|
173
|
+
}), imagesSection && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
174
|
+
buttonType: "circular-button download-button",
|
|
175
|
+
onClick: function onClick() {
|
|
176
|
+
downloadImages();
|
|
177
|
+
}
|
|
178
|
+
})]
|
|
179
|
+
});
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
exports.ButtonsEdition = ButtonsEdition;
|
|
@@ -0,0 +1,24 @@
|
|
|
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.ContainerIcon = 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 _variables = require("../../../global-files/variables");
|
|
15
|
+
|
|
16
|
+
var _templateObject, _templateObject2;
|
|
17
|
+
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n height: 34px;\n align-items: center;\n position: relative;\n border-radius: 117px;\n padding: 4px 5px;\n display: flex;\n\n > * + * {\n margin-left: 8px;\n }\n\n .button-circle{\n width:34px;\n height:34px;\n padding:2px;\n border-radius:100%;\n min-width:34px;\n border: 1px solid #F0F0F0;\n }\n\n .images-buttons {\n display:flex;\n button + * {\n margin-left: 8px;\n }\n }\n\n .assignations-container {\n display: flex;\n cursor: pointer;\n }\n\n .asignation-panel {\n background: ", ";\n border: 1px solid ", ";\n box-sizing: border-box;\n box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.25);\n border-radius: 4px;\n padding: 10px 8px;\n position: absolute;\n top: calc(100% + 10px);\n right: 0;\n z-index: 10;\n\n .asignation-header {\n display: flex;\n justify-content: space-between;\n\n .asignation-status,\n .asignation-percent {\n & > p {\n font-family: ", ";\n font-weight: 500;\n font-size: 14px;\n line-height: 16px;\n color: ", ";\n }\n }\n\n .asignation-percent {\n text-align: right;\n }\n\n & + * {\n margin-top: 10px;\n }\n }\n\n .asignations-list {\n min-height: 40px;\n\n .no-asignations {\n padding: 5px;\n font-family: ", ";\n font-weight: 500;\n font-size: 14px;\n line-height: 16px;\n color: ", ";\n }\n\n & + * {\n margin-top: 10px;\n border-top: 1px solid ", ";\n }\n }\n\n .default-asignations-list {\n padding-top: 10px;\n }\n }\n"])), _variables.GlobalColors.s2, _variables.GlobalColors.s3, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s5, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s5, _variables.GlobalColors.s3);
|
|
19
|
+
|
|
20
|
+
exports.Container = Container;
|
|
21
|
+
|
|
22
|
+
var ContainerIcon = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\ncursor: pointer;\n@font-face {\n font-family: \"Material Symbols Outlined\";\n font-style: normal;\n font-weight: 100 700;\n src: url(https://fonts.gstatic.com/s/materialsymbolsoutlined/v68/kJEhBvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oFsLjBuVY.woff2)\n format(\"woff2\");\n}\n\n.iconos-out {\n font-family: \"Material Symbols Outlined\";\n font-size: 14px;\n //line-height: 1;\n margin-top: 10px;\n}\n.iconos-out {\n font-variation-settings: \"FILL\" 0, \"wght\" 400, \"GRAD\" 0, \"opsz\" 48;\n color: #B64545;\n}\n.iconos-grises {\n font-variation-settings: \"FILL\" 0, \"wght\" 400, \"GRAD\" 0, \"opsz\" 48;\n color: ", ";\n}"])), _variables.GlobalColors.gray);
|
|
23
|
+
|
|
24
|
+
exports.ContainerIcon = ContainerIcon;
|
|
@@ -0,0 +1,64 @@
|
|
|
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.default = exports.ProductSkuStatusDefault = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
|
+
|
|
12
|
+
var _index = require("./index");
|
|
13
|
+
|
|
14
|
+
var _variables = require("../../../global-files/variables");
|
|
15
|
+
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
|
|
18
|
+
var _default = {
|
|
19
|
+
title: "Components/molecules/ProductSkuStatus",
|
|
20
|
+
component: _index.ProductSkuStatus,
|
|
21
|
+
argTypes: {
|
|
22
|
+
statusType: {
|
|
23
|
+
options: Object.values(_variables.GlobalStatus),
|
|
24
|
+
control: {
|
|
25
|
+
type: "select"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
percent: {
|
|
29
|
+
control: {
|
|
30
|
+
type: "range",
|
|
31
|
+
min: 0,
|
|
32
|
+
max: 100,
|
|
33
|
+
step: 1
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
backgroundColor: {
|
|
37
|
+
options: Object.keys(_variables.GlobalColors),
|
|
38
|
+
control: {
|
|
39
|
+
type: "select"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
priority: {
|
|
43
|
+
options: ["no priority", "low", "medium", "high"],
|
|
44
|
+
control: {
|
|
45
|
+
type: "select"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
exports.default = _default;
|
|
51
|
+
|
|
52
|
+
var Template = function Template(args) {
|
|
53
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ProductSkuStatus, (0, _objectSpread2.default)({}, args));
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
var ProductSkuStatusDefault = Template.bind({});
|
|
57
|
+
exports.ProductSkuStatusDefault = ProductSkuStatusDefault;
|
|
58
|
+
ProductSkuStatusDefault.args = {
|
|
59
|
+
statusType: "AP",
|
|
60
|
+
percent: 10,
|
|
61
|
+
backgroundColor: "s2",
|
|
62
|
+
priority: "no priority" // date: new Date().toLocaleDateString(),
|
|
63
|
+
|
|
64
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ProductSkuStatus = void 0;
|
|
7
|
+
|
|
8
|
+
var _styles = require("./styles");
|
|
9
|
+
|
|
10
|
+
var _index = require("../../atoms/Status/index");
|
|
11
|
+
|
|
12
|
+
var _index2 = require("../../atoms/ProgressBar/index");
|
|
13
|
+
|
|
14
|
+
var _GeneralButton = require("../../atoms/GeneralButton");
|
|
15
|
+
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
|
|
18
|
+
var ProductSkuStatus = function ProductSkuStatus(_ref) {
|
|
19
|
+
var statusType = _ref.statusType,
|
|
20
|
+
percentRequired = _ref.percentRequired,
|
|
21
|
+
version = _ref.version,
|
|
22
|
+
setShowVersionSelector = _ref.setShowVersionSelector;
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
24
|
+
children: [statusType && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Status, {
|
|
25
|
+
statusType: statusType
|
|
26
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.ProgressBar, {
|
|
27
|
+
percent: percentRequired,
|
|
28
|
+
progressBarType: statusType,
|
|
29
|
+
percentRequired: percentRequired,
|
|
30
|
+
version: version,
|
|
31
|
+
setShowVersionSelector: setShowVersionSelector
|
|
32
|
+
})]
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
exports.ProductSkuStatus = ProductSkuStatus;
|
|
@@ -0,0 +1,18 @@
|
|
|
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 align-items: center;\n\n * + * {\n margin-left: 10px;\n }\n"])));
|
|
17
|
+
|
|
18
|
+
exports.Container = Container;
|
|
@@ -0,0 +1,28 @@
|
|
|
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.default = exports.ValidationDefault = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
|
+
|
|
12
|
+
var _index = require("./index");
|
|
13
|
+
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
|
|
16
|
+
var _default = {
|
|
17
|
+
title: "Components/molecules/Validation",
|
|
18
|
+
component: _index.Validation
|
|
19
|
+
};
|
|
20
|
+
exports.default = _default;
|
|
21
|
+
|
|
22
|
+
var Template = function Template(args) {
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Validation, (0, _objectSpread2.default)({}, args));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var ValidationDefault = Template.bind({});
|
|
27
|
+
exports.ValidationDefault = ValidationDefault;
|
|
28
|
+
ValidationDefault.args = {};
|
|
@@ -0,0 +1,77 @@
|
|
|
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.Validation = void 0;
|
|
9
|
+
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
11
|
+
|
|
12
|
+
var _react = require("react");
|
|
13
|
+
|
|
14
|
+
var _styles = require("./styles");
|
|
15
|
+
|
|
16
|
+
var _GeneralButton = require("../../atoms/GeneralButton");
|
|
17
|
+
|
|
18
|
+
var _ValidationPanel = require("../../atoms/ValidationPanel");
|
|
19
|
+
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
+
|
|
22
|
+
//Components
|
|
23
|
+
var Validation = function Validation(_ref) {
|
|
24
|
+
var validation = _ref.validation,
|
|
25
|
+
showValidationButtons = _ref.showValidationButtons,
|
|
26
|
+
approve = _ref.approve,
|
|
27
|
+
reject = _ref.reject,
|
|
28
|
+
approveAll = _ref.approveAll,
|
|
29
|
+
rejectAll = _ref.rejectAll,
|
|
30
|
+
showApproveRejectAll = _ref.showApproveRejectAll;
|
|
31
|
+
|
|
32
|
+
var _useState = (0, _react.useState)(false),
|
|
33
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
34
|
+
showValidationPanel = _useState2[0],
|
|
35
|
+
setShowValidationPanel = _useState2[1];
|
|
36
|
+
|
|
37
|
+
var _useState3 = (0, _react.useState)(validation ? validation : "null-button"),
|
|
38
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
39
|
+
buttonType = _useState4[0],
|
|
40
|
+
setButtonType = _useState4[1];
|
|
41
|
+
|
|
42
|
+
var closeValidationPanel = function closeValidationPanel(e) {
|
|
43
|
+
if (!e.target.closest("#validation-panel") || e.target.closest(".validation-option") && showValidationPanel) {
|
|
44
|
+
document.removeEventListener("click", closeValidationPanel, false);
|
|
45
|
+
setShowValidationPanel(false);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
(0, _react.useEffect)(function () {
|
|
50
|
+
if (showValidationPanel) {
|
|
51
|
+
document.addEventListener("click", closeValidationPanel, false);
|
|
52
|
+
}
|
|
53
|
+
}, [showValidationPanel]);
|
|
54
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
55
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
56
|
+
className: "buttons-container",
|
|
57
|
+
children: showValidationButtons && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
58
|
+
buttonType: "circular-button ".concat(buttonType),
|
|
59
|
+
onClick: function onClick(e) {
|
|
60
|
+
e.stopPropagation();
|
|
61
|
+
setShowValidationPanel(true);
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
}), showValidationPanel && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ValidationPanel.ValidationPanel, {
|
|
65
|
+
id: "validation-panel",
|
|
66
|
+
setOptionClicked: setButtonType,
|
|
67
|
+
setShowValidationPanel: setShowValidationPanel,
|
|
68
|
+
approve: approve,
|
|
69
|
+
reject: reject,
|
|
70
|
+
approveAll: approveAll,
|
|
71
|
+
rejectAll: rejectAll,
|
|
72
|
+
showApproveRejectAll: showApproveRejectAll
|
|
73
|
+
})]
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
exports.Validation = Validation;
|
|
@@ -0,0 +1,18 @@
|
|
|
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 position: relative;\n width: fit-content;\n\n .buttons-container {\n display: flex;\n align-items: center;\n\n > * + * {\n margin-left: 3px;\n }\n }\n"])));
|
|
17
|
+
|
|
18
|
+
exports.Container = Container;
|
|
@@ -0,0 +1,30 @@
|
|
|
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.default = exports.BarButtonsDefault = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
|
+
|
|
12
|
+
var _index = require("./index");
|
|
13
|
+
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
|
|
16
|
+
var _default = {
|
|
17
|
+
title: "Components/organisms/BarButtons",
|
|
18
|
+
component: _index.BarButtons
|
|
19
|
+
};
|
|
20
|
+
exports.default = _default;
|
|
21
|
+
|
|
22
|
+
var Template = function Template(args) {
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BarButtons, (0, _objectSpread2.default)({}, args));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var BarButtonsDefault = Template.bind({});
|
|
27
|
+
exports.BarButtonsDefault = BarButtonsDefault;
|
|
28
|
+
BarButtonsDefault.args = {
|
|
29
|
+
panelText: "Elige la plataforma que conecta proovedores y retailers"
|
|
30
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
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.BarButtons = void 0;
|
|
9
|
+
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
11
|
+
|
|
12
|
+
var _styles = require("./styles");
|
|
13
|
+
|
|
14
|
+
var _variables = require("../../../global-files/variables");
|
|
15
|
+
|
|
16
|
+
var _GeneralButton = require("../../atoms/GeneralButton");
|
|
17
|
+
|
|
18
|
+
var _react = require("react");
|
|
19
|
+
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
+
|
|
22
|
+
var BarButtons = function BarButtons(_ref) {
|
|
23
|
+
var showSaveButton = _ref.showSaveButton,
|
|
24
|
+
imagesSection = _ref.imagesSection,
|
|
25
|
+
onClickSave = _ref.onClickSave;
|
|
26
|
+
|
|
27
|
+
var _useState = (0, _react.useState)(false),
|
|
28
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
29
|
+
layout = _useState2[0],
|
|
30
|
+
setLayout = _useState2[1];
|
|
31
|
+
|
|
32
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
33
|
+
fontFamily: _variables.FontFamily.Raleway,
|
|
34
|
+
color: _variables.GlobalColors.original_magenta,
|
|
35
|
+
children: [showSaveButton && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
36
|
+
buttonType: "circular-button save-button",
|
|
37
|
+
onClick: onClickSave
|
|
38
|
+
}), imagesSection && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
39
|
+
className: "images-buttons",
|
|
40
|
+
children: [showSaveButton && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
41
|
+
buttonType: "circular-button delete-button",
|
|
42
|
+
onClick: function onClick() {
|
|
43
|
+
askToDeleteImages && askToDeleteImages();
|
|
44
|
+
}
|
|
45
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
46
|
+
buttonType: "circular-button download-button",
|
|
47
|
+
onClick: function onClick() {
|
|
48
|
+
downloadImages();
|
|
49
|
+
}
|
|
50
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
51
|
+
buttonType: layout ? "grid-layout" : "row-layout",
|
|
52
|
+
onClick: function onClick() {
|
|
53
|
+
setLayout(!layout);
|
|
54
|
+
setImageLayout && setImageLayout(!layout);
|
|
55
|
+
}
|
|
56
|
+
})]
|
|
57
|
+
})]
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
exports.BarButtons = BarButtons;
|
|
@@ -0,0 +1,18 @@
|
|
|
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)(["\ndisplay:flex;\njustify-content: center;\nwidth: 28%;\nheight:34px;\nborder-radius: 117px;\npadding: 4px 5px;\nborder: 1px solid #F0F0F0;\n\n * + * {\n margin-left: 10px;\n }\n"])));
|
|
17
|
+
|
|
18
|
+
exports.Container = Container;
|
|
@@ -0,0 +1,37 @@
|
|
|
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.default = exports.BoxDefault = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
|
+
|
|
12
|
+
var _index = require("./index");
|
|
13
|
+
|
|
14
|
+
var _loginImage = _interopRequireDefault(require("../../../assets/images/carouselImagesLogin/loginImage.svg"));
|
|
15
|
+
|
|
16
|
+
var _login = _interopRequireDefault(require("../../../assets/images/carouselImagesLogin/login2.svg"));
|
|
17
|
+
|
|
18
|
+
var _login2 = _interopRequireDefault(require("../../../assets/images/carouselImagesLogin/login3.svg"));
|
|
19
|
+
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
+
|
|
22
|
+
var _default = {
|
|
23
|
+
title: "Components/organisms/Box",
|
|
24
|
+
component: _index.Box
|
|
25
|
+
};
|
|
26
|
+
exports.default = _default;
|
|
27
|
+
|
|
28
|
+
var Template = function Template(args) {
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Box, (0, _objectSpread2.default)({}, args));
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
var BoxDefault = Template.bind({});
|
|
33
|
+
exports.BoxDefault = BoxDefault;
|
|
34
|
+
BoxDefault.args = {
|
|
35
|
+
panelImg: [_loginImage.default, _login.default, _login2.default],
|
|
36
|
+
panelText: "Elige la plataforma que conecta proovedores y retailers"
|
|
37
|
+
};
|