contentoh-components-library 21.4.45 → 21.4.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/components/molecules/BoxAttribute/index.js +2 -2
  2. package/dist/components/organisms/Box/index.js +44 -7
  3. package/dist/components/organisms/BoxOnboarding/index.js +37 -48
  4. package/dist/components/organisms/InputGroup/index.js +17 -19
  5. package/dist/components/pages/ProviderProductEdition/index.js +36 -16
  6. package/package.json +1 -1
  7. package/src/components/molecules/BoxAttribute/index.js +2 -2
  8. package/src/components/organisms/Box/index.js +1 -3
  9. package/src/components/organisms/BoxOnboarding/index.js +17 -12
  10. package/src/components/organisms/InputGroup/index.js +2 -2
  11. package/src/components/pages/ProviderProductEdition/index.js +25 -3
  12. package/src/components/pages/ProviderProductEdition/out.json +0 -0
  13. package/src/components/pages/ProviderProductEdition/out2.json +0 -0
  14. package/dist/assets/images/Icons/delete.svg +0 -8
  15. package/dist/assets/images/Icons/edit.svg +0 -3
  16. package/dist/components/molecules/ButtonsAssignation/ButtonsAssignation.stories.js +0 -34
  17. package/dist/components/molecules/ButtonsAssignation/index.js +0 -142
  18. package/dist/components/molecules/ButtonsAssignation/styles.js +0 -20
  19. package/dist/components/molecules/ButtonsEdition/ButtonsEdition.stories.js +0 -34
  20. package/dist/components/molecules/ButtonsEdition/index.js +0 -182
  21. package/dist/components/molecules/ButtonsEdition/styles.js +0 -24
  22. package/dist/components/molecules/ProductSkuStatus/ProductSkuStatus.stories.js +0 -64
  23. package/dist/components/molecules/ProductSkuStatus/index.js +0 -36
  24. package/dist/components/molecules/ProductSkuStatus/styles.js +0 -18
  25. package/dist/components/molecules/Validation/Validation.stories.js +0 -28
  26. package/dist/components/molecules/Validation/index.js +0 -77
  27. package/dist/components/molecules/Validation/styles.js +0 -18
  28. package/dist/components/organisms/BarButtons/BarButtons.stories.js +0 -30
  29. package/dist/components/organisms/BarButtons/index.js +0 -61
  30. package/dist/components/organisms/BarButtons/styles.js +0 -18
  31. package/dist/components/pages/ProviderProductEdition1/ProviderProductEdition.stories.js +0 -222
  32. package/dist/components/pages/ProviderProductEdition1/index.js +0 -2339
  33. package/dist/components/pages/ProviderProductEdition1/styles.js +0 -23
  34. package/src/components/organisms/BoxOnboarding/out.json +0 -1
@@ -1,142 +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.ButtonsAssignation = void 0;
9
-
10
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
11
-
12
- var _styles = require("./styles");
13
-
14
- var _index = require("../../atoms/ScreenHeader/index");
15
-
16
- var _Avatar = require("../../atoms/Avatar");
17
-
18
- var _index2 = require("../../atoms/Status/index");
19
-
20
- var _react = require("react");
21
-
22
- var _index3 = require("../../atoms/AsignationOption/index");
23
-
24
- var _data = require("../../../global-files/data");
25
-
26
- var _jsxRuntime = require("react/jsx-runtime");
27
-
28
- var ButtonsAssignation = function ButtonsAssignation(_ref) {
29
- var _assignationsImages$a, _assignationsImages$c;
30
-
31
- var _ref$status = _ref.status,
32
- status = _ref$status === void 0 ? "-" : _ref$status,
33
- _ref$percent = _ref.percent,
34
- percent = _ref$percent === void 0 ? 0 : _ref$percent,
35
- assignationsImages = _ref.assignationsImages,
36
- setAssignation = _ref.setAssignation,
37
- isRetailer = _ref.isRetailer,
38
- _ref$id = _ref.id,
39
- id = _ref$id === void 0 ? "default-id" : _ref$id,
40
- canAssign = _ref.canAssign;
41
-
42
- var _useState = (0, _react.useState)(false),
43
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
44
- showAsignationPanel = _useState2[0],
45
- setShowAsignationPanel = _useState2[1];
46
-
47
- var _useState3 = (0, _react.useState)(false),
48
- _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
49
- layout = _useState4[0],
50
- setLayout = _useState4[1];
51
-
52
- var _useState5 = (0, _react.useState)("facilitator"),
53
- _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
54
- assignationType = _useState6[0],
55
- setAssignationType = _useState6[1];
56
-
57
- var closeAsignations = function closeAsignations(e) {
58
- if (!e.target.closest("#default-id") && showAsignationPanel) {
59
- document.removeEventListener("click", closeAsignations, false);
60
- setShowAsignationPanel(false);
61
- }
62
- };
63
-
64
- (0, _react.useEffect)(function () {
65
- if (showAsignationPanel) {
66
- document.addEventListener("click", closeAsignations, false);
67
- }
68
- }, [showAsignationPanel]);
69
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
70
- id: id,
71
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
72
- className: "assignations-container",
73
- children: assignationsImages === null || assignationsImages === void 0 ? void 0 : (_assignationsImages$a = assignationsImages.assignations) === null || _assignationsImages$a === void 0 ? void 0 : _assignationsImages$a.map(function (assignation, index) {
74
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.Avatar, {
75
- imageType: "small-image",
76
- image: (0, _data.getProfilePicture)(assignation.id, 20, 20),
77
- altText: "user profile image",
78
- onClick: function onClick(e) {
79
- e.preventDefault();
80
- e.stopPropagation();
81
- setShowAsignationPanel(true);
82
- setAssignationType(assignation === null || assignation === void 0 ? void 0 : assignation.collaboratorType);
83
- }
84
- }, index + "-" + assignation.id);
85
- })
86
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
87
- text: "Asig.",
88
- color: "#969696",
89
- fontFamily: "Avenir Next",
90
- headerType: "input-name-header"
91
- }), showAsignationPanel && canAssign && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
92
- className: "asignation-panel",
93
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
94
- className: "asignation-header",
95
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
96
- className: "asignation-status",
97
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
98
- children: "Estatus"
99
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Status, {
100
- statusType: status,
101
- ovalForm: true
102
- })]
103
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
104
- className: "asignation-percent",
105
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
106
- children: "Estatus"
107
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
108
- className: "percent",
109
- children: [percent, "%"]
110
- })]
111
- })]
112
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
113
- className: "asignations-list",
114
- children: (assignationsImages === null || assignationsImages === void 0 ? void 0 : assignationsImages.collaborators) !== undefined ? assignationsImages === null || assignationsImages === void 0 ? void 0 : (_assignationsImages$c = assignationsImages.collaborators[assignationType]) === null || _assignationsImages$c === void 0 ? void 0 : _assignationsImages$c.map(function (asignation, index) {
115
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index3.AsignationOption, {
116
- profileImage: (0, _data.getProfilePicture)(asignation === null || asignation === void 0 ? void 0 : asignation.id_user, 40, 40),
117
- onClick: function onClick() {
118
- setAssignation(assignationType, asignation === null || asignation === void 0 ? void 0 : asignation.id_user);
119
- },
120
- name: asignation.name
121
- }, index + "-" + asignation.name);
122
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
123
- className: "no-asignations",
124
- children: "Sin personas para asignar"
125
- })
126
- }), isRetailer === 1 && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
127
- className: "default-asignations-list",
128
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index3.AsignationOption, {
129
- asignationType: "provider",
130
- name: "Solicitar a",
131
- team: "Proveedor"
132
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index3.AsignationOption, {
133
- asignationType: "team",
134
- name: "Solicitar a",
135
- team: "Content-oh!"
136
- })]
137
- })]
138
- })]
139
- });
140
- };
141
-
142
- exports.ButtonsAssignation = ButtonsAssignation;
@@ -1,20 +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 _variables = require("../../../global-files/variables");
15
-
16
- var _templateObject;
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 border: 1px solid #F0F0F0;\n min-width:78px;\n\n > * + * {\n margin-left: 8px;\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;
@@ -1,34 +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.default = exports.ButtonsEditionDefault = 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/ButtonsEdition",
18
- component: _index.ButtonsEdition
19
- };
20
- exports.default = _default;
21
-
22
- var Template = function Template(args) {
23
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ButtonsEdition, (0, _objectSpread2.default)({}, args));
24
- };
25
-
26
- var ButtonsEditionDefault = Template.bind({});
27
- exports.ButtonsEditionDefault = ButtonsEditionDefault;
28
- ButtonsEditionDefault.args = {
29
- status: "AA",
30
- image: {
31
- src: "https://image.shutterstock.com/image-illustration/3d-render-generic-drug-pills-260nw-709112806.jpg"
32
- },
33
- imagesSection: true
34
- };
@@ -1,182 +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.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;
@@ -1,24 +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.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;
@@ -1,64 +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.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
- };
@@ -1,36 +0,0 @@
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;
@@ -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 align-items: center;\n\n * + * {\n margin-left: 10px;\n }\n"])));
17
-
18
- exports.Container = Container;
@@ -1,28 +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.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 = {};
@@ -1,77 +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.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;
@@ -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 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;