contentoh-components-library 21.2.58 → 21.2.59
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 +4 -1
- package/dist/assets/images/chatPopup/Spinner.gif +0 -0
- package/dist/assets/images/chatPopup/close.svg +3 -0
- package/dist/assets/images/chatPopup/defaultImage.png +0 -0
- package/dist/assets/images/chatPopup/defaultProfile.png +0 -0
- package/dist/assets/images/chatPopup/doc.svg +1 -0
- package/dist/assets/images/chatPopup/document.svg +1 -0
- package/dist/assets/images/chatPopup/iconChat.svg +19 -0
- package/dist/assets/images/chatPopup/iconPlus.svg +3 -0
- package/dist/assets/images/chatPopup/pdf.svg +75 -0
- package/dist/assets/images/chatPopup/remove.svg +4 -0
- package/dist/assets/images/chatPopup/send.svg +3 -0
- package/dist/assets/images/chatPopup/svgIcon.svg +109 -0
- package/dist/assets/images/chatPopup/upload_file.svg +3 -0
- package/dist/assets/images/chatPopup/xls.svg +53 -0
- package/dist/components/atoms/ChatPopUp/ChatPopUp.stories.js +28 -0
- package/dist/components/atoms/ChatPopUp/index.js +843 -0
- package/dist/components/atoms/ChatPopUp/styles.js +27 -0
- package/dist/components/atoms/ChatPopUp/utils/handlersChat.js +182 -0
- package/dist/components/atoms/ListCommercialRetailers/ListCommercialRetailers.stories.js +36 -0
- package/dist/components/atoms/ListCommercialRetailers/index.js +64 -0
- package/dist/components/atoms/ListCommercialRetailers/styles.js +20 -0
- package/dist/components/atoms/MenuCommercialRetailers/MenuCommercialRetailers.stories.js +37 -0
- package/dist/components/atoms/MenuCommercialRetailers/index.js +25 -0
- package/dist/components/atoms/MenuCommercialRetailers/styles.js +20 -0
- package/dist/components/atoms/MenuProductImage/MenuProductImage.stories.js +28 -0
- package/dist/components/atoms/MenuProductImage/index.js +88 -0
- package/dist/components/atoms/MenuProductImage/styles.js +20 -0
- package/dist/components/atoms/Tooltip/Tooltip.stories.js +36 -0
- package/dist/components/atoms/Tooltip/index.js +55 -0
- package/dist/components/atoms/Tooltip/styles.js +18 -0
- package/dist/components/molecules/ApproveRejetPanel/ApproveRejetPanel.stories.js +25 -0
- package/dist/components/molecules/ApproveRejetPanel/index.js +49 -0
- package/dist/components/molecules/ApproveRejetPanel/styles.js +18 -0
- package/dist/components/molecules/HeaderTop/index.js +19 -6
- package/dist/components/molecules/HeaderTop/styles.js +1 -1
- package/dist/components/molecules/SignInLoginCreationApp/SignInLogin.stories.js +28 -0
- package/dist/components/molecules/SignInLoginCreationApp/index.js +270 -0
- package/dist/components/molecules/SignInLoginCreationApp/styles.js +20 -0
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +1 -0
- package/dist/components/pages/ProviderProductEdition/index.js +7 -2
- package/package.json +6 -1
- package/src/assets/images/chatPopup/Spinner.gif +0 -0
- package/src/assets/images/chatPopup/close.svg +3 -0
- package/src/assets/images/chatPopup/defaultImage.png +0 -0
- package/src/assets/images/chatPopup/defaultProfile.png +0 -0
- package/src/assets/images/chatPopup/doc.svg +1 -0
- package/src/assets/images/chatPopup/document.svg +1 -0
- package/src/assets/images/chatPopup/iconChat.svg +19 -0
- package/src/assets/images/chatPopup/iconPlus.svg +3 -0
- package/src/assets/images/chatPopup/pdf.svg +75 -0
- package/src/assets/images/chatPopup/remove.svg +4 -0
- package/src/assets/images/chatPopup/send.svg +3 -0
- package/src/assets/images/chatPopup/svgIcon.svg +109 -0
- package/src/assets/images/chatPopup/upload_file.svg +3 -0
- package/src/assets/images/chatPopup/xls.svg +53 -0
- package/src/components/atoms/ChatPopUp/ChatPopUp.stories.js +11 -0
- package/src/components/atoms/ChatPopUp/index.js +545 -0
- package/src/components/atoms/ChatPopUp/styles.js +278 -0
- package/src/components/atoms/ChatPopUp/utils/handlersChat.js +104 -0
- package/src/components/atoms/Tooltip/Tooltip.stories.js +15 -0
- package/src/components/atoms/Tooltip/index.js +35 -0
- package/src/components/atoms/Tooltip/styles.js +5 -0
- package/src/components/molecules/HeaderTop/index.js +23 -7
- package/src/components/molecules/HeaderTop/styles.js +4 -0
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +1 -0
- package/src/components/pages/ProviderProductEdition/index.js +8 -1
|
@@ -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\tborder: 1px solid red;\n"])));
|
|
17
|
+
|
|
18
|
+
exports.Container = Container;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.ApproveRejetPanelDefault = void 0;
|
|
7
|
+
|
|
8
|
+
var _index = require("./index");
|
|
9
|
+
|
|
10
|
+
var _default = {
|
|
11
|
+
title: "Components/molecules/ApproveRejetPanel",
|
|
12
|
+
component: _index.ApproveRejetPanel
|
|
13
|
+
};
|
|
14
|
+
exports.default = _default;
|
|
15
|
+
|
|
16
|
+
var Template = function Template(args) {
|
|
17
|
+
return /*#__PURE__*/React.createElement(_index.ApproveRejetPanel, args);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
var ApproveRejetPanelDefault = Template.bind({});
|
|
21
|
+
exports.ApproveRejetPanelDefault = ApproveRejetPanelDefault;
|
|
22
|
+
ApproveRejetPanelDefault.args = {
|
|
23
|
+
text: "113 productos",
|
|
24
|
+
check: false
|
|
25
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
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.ApproveRejetPanel = void 0;
|
|
9
|
+
|
|
10
|
+
var _ScreenHeader = require("../../atoms/ScreenHeader");
|
|
11
|
+
|
|
12
|
+
var _Avatar = require("../../atoms/Avatar");
|
|
13
|
+
|
|
14
|
+
var _styles = require("./styles");
|
|
15
|
+
|
|
16
|
+
var _approveRejetPanelDelete = _interopRequireDefault(require("../../../assets/images/approveRejetPanel/approveRejetPanelDelete.svg"));
|
|
17
|
+
|
|
18
|
+
var _approveRejetPanelCancel = _interopRequireDefault(require("../../../assets/images/approveRejetPanel/approveRejetPanelCancel.svg"));
|
|
19
|
+
|
|
20
|
+
var _approveRejetPanelSave = _interopRequireDefault(require("../../../assets/images/approveRejetPanel/approveRejetPanelSave.svg"));
|
|
21
|
+
|
|
22
|
+
var _approveRejetPanelExclude = _interopRequireDefault(require("../../../assets/images/approveRejetPanel/approveRejetPanelExclude.svg"));
|
|
23
|
+
|
|
24
|
+
var _variables = require("../../../global-files/variables");
|
|
25
|
+
|
|
26
|
+
var ApproveRejetPanel = function ApproveRejetPanel(_ref) {
|
|
27
|
+
var text = _ref.text,
|
|
28
|
+
check = _ref.check;
|
|
29
|
+
return /*#__PURE__*/React.createElement(_styles.Container, null, /*#__PURE__*/React.createElement(_ScreenHeader.ScreenHeader, {
|
|
30
|
+
fontFamily: _variables.FontFamily.AvenirNext,
|
|
31
|
+
headerType: "date-header",
|
|
32
|
+
color: _variables.GlobalColors.s4,
|
|
33
|
+
text: text
|
|
34
|
+
}), /*#__PURE__*/React.createElement(_Avatar.Avatar, {
|
|
35
|
+
image: _approveRejetPanelDelete.default,
|
|
36
|
+
imageType: "big-image",
|
|
37
|
+
altText: "delete button"
|
|
38
|
+
}), /*#__PURE__*/React.createElement(_Avatar.Avatar, {
|
|
39
|
+
image: check ? _approveRejetPanelCancel.default : _approveRejetPanelExclude.default,
|
|
40
|
+
imageType: "big-image",
|
|
41
|
+
altText: check ? "cancel button" : "exclude button"
|
|
42
|
+
}), /*#__PURE__*/React.createElement(_Avatar.Avatar, {
|
|
43
|
+
image: check ? _approveRejetPanelSave.default : _approveRejetPanelExclude.default,
|
|
44
|
+
imageType: "big-image",
|
|
45
|
+
altText: check ? "save button" : "exclude button"
|
|
46
|
+
}));
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
exports.ApproveRejetPanel = ApproveRejetPanel;
|
|
@@ -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 justify-content: end;\n align-items: center;\n .date-header + * {\n margin-left: 30px;\n }\n .big-image + * {\n margin-left: 10px;\n }\n"])));
|
|
17
|
+
|
|
18
|
+
exports.Container = Container;
|
|
@@ -13,10 +13,16 @@ var _index2 = require("../../atoms/GeneralButton/index");
|
|
|
13
13
|
|
|
14
14
|
var _react = require("react");
|
|
15
15
|
|
|
16
|
+
var _index3 = require("../../atoms/ChatPopUp/index");
|
|
17
|
+
|
|
16
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
19
|
|
|
18
20
|
var HeaderTop = function HeaderTop(_ref) {
|
|
19
|
-
var setHeaderTop = _ref.setHeaderTop
|
|
21
|
+
var setHeaderTop = _ref.setHeaderTop,
|
|
22
|
+
chat_authorization = _ref.chat_authorization,
|
|
23
|
+
chat_id_article = _ref.chat_id_article,
|
|
24
|
+
chat_version_article = _ref.chat_version_article,
|
|
25
|
+
trueTHD = _ref.trueTHD;
|
|
20
26
|
var headerTop = (0, _react.useRef)();
|
|
21
27
|
(0, _react.useEffect)(function () {
|
|
22
28
|
setHeaderTop && setHeaderTop(headerTop.current.clientHeight);
|
|
@@ -25,11 +31,18 @@ var HeaderTop = function HeaderTop(_ref) {
|
|
|
25
31
|
ref: headerTop,
|
|
26
32
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
|
|
27
33
|
text: "Edici\xF3n de producto"
|
|
28
|
-
}), /*#__PURE__*/(0, _jsxRuntime.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
35
|
+
className: "buttons-top",
|
|
36
|
+
children: [trueTHD && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index3.ChatPopUp, {
|
|
37
|
+
chat_authorization: chat_authorization,
|
|
38
|
+
chat_id_article: chat_id_article,
|
|
39
|
+
chat_version_article: chat_version_article
|
|
40
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Button, {
|
|
41
|
+
buttonType: "close-button",
|
|
42
|
+
onClick: function onClick() {
|
|
43
|
+
window.location.href = "/products";
|
|
44
|
+
}
|
|
45
|
+
})]
|
|
33
46
|
})]
|
|
34
47
|
});
|
|
35
48
|
};
|
|
@@ -13,6 +13,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
13
13
|
|
|
14
14
|
var _templateObject;
|
|
15
15
|
|
|
16
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n"])));
|
|
16
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n .buttons-top {\n display: flex;\n align-items: center;\n }\n"])));
|
|
17
17
|
|
|
18
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.SignInLoginCreationAppDefault = 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/SignInLoginCreationApp",
|
|
18
|
+
component: _index.SignInLoginCreationApp
|
|
19
|
+
};
|
|
20
|
+
exports.default = _default;
|
|
21
|
+
|
|
22
|
+
var Template = function Template(args) {
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.SignInLoginCreationApp, (0, _objectSpread2.default)({}, args));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var SignInLoginCreationAppDefault = Template.bind({});
|
|
27
|
+
exports.SignInLoginCreationAppDefault = SignInLoginCreationAppDefault;
|
|
28
|
+
SignInLoginCreationAppDefault.args = {};
|
|
@@ -0,0 +1,270 @@
|
|
|
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.SignInLoginCreationApp = void 0;
|
|
9
|
+
|
|
10
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
|
+
|
|
12
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
|
|
13
|
+
|
|
14
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
15
|
+
|
|
16
|
+
var _styles = require("./styles");
|
|
17
|
+
|
|
18
|
+
var _index = require("../../atoms/LogoImage/index");
|
|
19
|
+
|
|
20
|
+
var _index2 = require("../../atoms/ScreenHeader/index");
|
|
21
|
+
|
|
22
|
+
var _index3 = require("../../atoms/GeneralButton/index");
|
|
23
|
+
|
|
24
|
+
var _index4 = require("../../atoms/CheckBox/index");
|
|
25
|
+
|
|
26
|
+
var _TagAndInput = require("../TagAndInput");
|
|
27
|
+
|
|
28
|
+
var _variables = require("../../../global-files/variables");
|
|
29
|
+
|
|
30
|
+
var _react = require("react");
|
|
31
|
+
|
|
32
|
+
var _Loading = require("../../atoms/Loading");
|
|
33
|
+
|
|
34
|
+
var _reactRouterDom = require("react-router-dom");
|
|
35
|
+
|
|
36
|
+
var _axios = _interopRequireDefault(require("axios"));
|
|
37
|
+
|
|
38
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
39
|
+
|
|
40
|
+
var SignInLoginCreationApp = function SignInLoginCreationApp(props) {
|
|
41
|
+
var _useState = (0, _react.useState)(false),
|
|
42
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
43
|
+
emptyEmail = _useState2[0],
|
|
44
|
+
setEmptyEmail = _useState2[1];
|
|
45
|
+
|
|
46
|
+
var _useState3 = (0, _react.useState)(false),
|
|
47
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
48
|
+
invalidEmail = _useState4[0],
|
|
49
|
+
setInvalidEmail = _useState4[1];
|
|
50
|
+
|
|
51
|
+
var _useState5 = (0, _react.useState)(false),
|
|
52
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
53
|
+
emptyPassword = _useState6[0],
|
|
54
|
+
setEmptyPassword = _useState6[1];
|
|
55
|
+
|
|
56
|
+
var _useState7 = (0, _react.useState)(true),
|
|
57
|
+
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
58
|
+
showErrors = _useState8[0],
|
|
59
|
+
setShowErrors = _useState8[1];
|
|
60
|
+
|
|
61
|
+
var _useState9 = (0, _react.useState)(""),
|
|
62
|
+
_useState10 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
63
|
+
signInError = _useState10[0],
|
|
64
|
+
setSignInError = _useState10[1];
|
|
65
|
+
|
|
66
|
+
var _useState11 = (0, _react.useState)(false),
|
|
67
|
+
_useState12 = (0, _slicedToArray2.default)(_useState11, 2),
|
|
68
|
+
loading = _useState12[0],
|
|
69
|
+
setLoading = _useState12[1];
|
|
70
|
+
|
|
71
|
+
var _useState13 = (0, _react.useState)(false),
|
|
72
|
+
_useState14 = (0, _slicedToArray2.default)(_useState13, 2),
|
|
73
|
+
upgradePlanRedirect = _useState14[0],
|
|
74
|
+
setUpgradePlanRedirect = _useState14[1];
|
|
75
|
+
|
|
76
|
+
var validate = /*#__PURE__*/function () {
|
|
77
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(e) {
|
|
78
|
+
var valid, email, password, session, userGroup, response, userGroupValue, user, company;
|
|
79
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
80
|
+
while (1) {
|
|
81
|
+
switch (_context.prev = _context.next) {
|
|
82
|
+
case 0:
|
|
83
|
+
e.preventDefault();
|
|
84
|
+
setSignInError("");
|
|
85
|
+
setShowErrors(true);
|
|
86
|
+
valid = true;
|
|
87
|
+
email = document.querySelector("#emailInput").value.trim();
|
|
88
|
+
password = document.querySelector("#passwordInput").value;
|
|
89
|
+
!/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(email) ? setInvalidEmail(true) : setInvalidEmail(false);
|
|
90
|
+
|
|
91
|
+
if (email === "") {
|
|
92
|
+
valid = false;
|
|
93
|
+
setEmptyEmail(true);
|
|
94
|
+
} else {
|
|
95
|
+
setEmptyEmail(false);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (password === "") {
|
|
99
|
+
valid = false;
|
|
100
|
+
setEmptyPassword(true);
|
|
101
|
+
} else {
|
|
102
|
+
setEmptyPassword(false);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (!valid) {
|
|
106
|
+
_context.next = 35;
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
_context.prev = 10;
|
|
111
|
+
setLoading(true);
|
|
112
|
+
_context.next = 14;
|
|
113
|
+
return props.Auth.signIn(email, password);
|
|
114
|
+
|
|
115
|
+
case 14:
|
|
116
|
+
session = _context.sent;
|
|
117
|
+
|
|
118
|
+
if (!(session.challengeName === "NEW_PASSWORD_REQUIRED")) {
|
|
119
|
+
_context.next = 20;
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
props.setUser(session);
|
|
124
|
+
props.setPaso(8);
|
|
125
|
+
_context.next = 28;
|
|
126
|
+
break;
|
|
127
|
+
|
|
128
|
+
case 20:
|
|
129
|
+
userGroup = session.signInUserSession.accessToken.payload["cognito:groups"];
|
|
130
|
+
_context.next = 23;
|
|
131
|
+
return _axios.default.get(process.env.REACT_APP_USER_ENDPOINT, {
|
|
132
|
+
headers: {
|
|
133
|
+
Authorization: session.signInUserSession.idToken.jwtToken
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
case 23:
|
|
138
|
+
response = _context.sent;
|
|
139
|
+
console.log(userGroup);
|
|
140
|
+
console.log(userGroup[0]);
|
|
141
|
+
userGroupValue = typeof userGroup === "string" ? userGroup : userGroup[0];
|
|
142
|
+
|
|
143
|
+
if (userGroupValue === "colaboradores_contentoh") {
|
|
144
|
+
sessionStorage.setItem("auth", true);
|
|
145
|
+
sessionStorage.setItem("jwt", session.signInUserSession.idToken.jwtToken);
|
|
146
|
+
user = JSON.parse(response.data.body).data[0];
|
|
147
|
+
company = JSON.parse(response.data.body).data[1];
|
|
148
|
+
caches.keys().then(function (names) {
|
|
149
|
+
names.forEach(function (name) {
|
|
150
|
+
caches.delete(name);
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
user.src = "https://".concat(process.env.REACT_APP_IMAGES_PROFILE_BUCKET, ".s3.amazonaws.com/id-").concat(user.id_user, "/").concat(user.id_user, ".png?").concat(new Date().getTime());
|
|
154
|
+
sessionStorage.setItem("user", JSON.stringify(user));
|
|
155
|
+
sessionStorage.setItem("company", JSON.stringify(company));
|
|
156
|
+
setUpgradePlanRedirect(true);
|
|
157
|
+
} else {
|
|
158
|
+
setSignInError("NotAuthorizedException");
|
|
159
|
+
setLoading(false);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
case 28:
|
|
163
|
+
_context.next = 35;
|
|
164
|
+
break;
|
|
165
|
+
|
|
166
|
+
case 30:
|
|
167
|
+
_context.prev = 30;
|
|
168
|
+
_context.t0 = _context["catch"](10);
|
|
169
|
+
console.log(_context.t0);
|
|
170
|
+
setLoading(false);
|
|
171
|
+
|
|
172
|
+
if (_context.t0.code === "NotAuthorizedException") {
|
|
173
|
+
setSignInError("NotAuthorizedException");
|
|
174
|
+
} else if (_context.t0.code === "UserNotConfirmedException") {
|
|
175
|
+
sessionStorage.setItem("email", JSON.stringify(document.querySelector("#usernameInput").value));
|
|
176
|
+
props.setPaso(5);
|
|
177
|
+
} else {
|
|
178
|
+
setSignInError("Error");
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
case 35:
|
|
182
|
+
case "end":
|
|
183
|
+
return _context.stop();
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}, _callee, null, [[10, 30]]);
|
|
187
|
+
}));
|
|
188
|
+
|
|
189
|
+
return function validate(_x) {
|
|
190
|
+
return _ref.apply(this, arguments);
|
|
191
|
+
};
|
|
192
|
+
}();
|
|
193
|
+
|
|
194
|
+
(0, _react.useEffect)(function () {
|
|
195
|
+
sessionStorage.getItem("resetPasswordProcess") && sessionStorage.removeItem("resetPasswordProcess");
|
|
196
|
+
}, []);
|
|
197
|
+
(0, _react.useEffect)(function () {
|
|
198
|
+
if (upgradePlanRedirect) setLoading(false);
|
|
199
|
+
}, [upgradePlanRedirect]);
|
|
200
|
+
return loading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Loading.Loading, {}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
201
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
202
|
+
className: "home-login",
|
|
203
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
204
|
+
className: "main-container",
|
|
205
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.LogoImage, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
206
|
+
className: "credenciales",
|
|
207
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.ScreenHeader, {
|
|
208
|
+
fontFamily: _variables.FontFamily.AvenirNext,
|
|
209
|
+
color: _variables.GlobalColors.s5,
|
|
210
|
+
text: "Ingresa tus credenciales"
|
|
211
|
+
})
|
|
212
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
213
|
+
className: "user",
|
|
214
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
|
|
215
|
+
inputType: "text",
|
|
216
|
+
label: "Nombre de usuario",
|
|
217
|
+
inputPlaceHolder: "username@contentoh.com",
|
|
218
|
+
inputId: "emailInput"
|
|
219
|
+
})
|
|
220
|
+
}), showErrors && emptyEmail && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
221
|
+
children: "Ingrese su correo"
|
|
222
|
+
}), invalidEmail && !emptyEmail && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
223
|
+
children: "Ingrese un correo v\xE1lido"
|
|
224
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
225
|
+
className: "password",
|
|
226
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
|
|
227
|
+
inputType: "password",
|
|
228
|
+
label: "Contraseña",
|
|
229
|
+
inputPlaceHolder: "Escribe tu contraseña",
|
|
230
|
+
inputId: "passwordInput"
|
|
231
|
+
})
|
|
232
|
+
}), showErrors && emptyPassword && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
233
|
+
children: "Ingrese su contrase\xF1a"
|
|
234
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
235
|
+
className: "select",
|
|
236
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index4.CheckBox, {
|
|
237
|
+
label: "Mantener sesión activada",
|
|
238
|
+
id: "chk-default",
|
|
239
|
+
className: "active-left"
|
|
240
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
241
|
+
onClick: function onClick() {
|
|
242
|
+
return props.setPaso(10);
|
|
243
|
+
},
|
|
244
|
+
className: "active-right",
|
|
245
|
+
children: "Olvide mi contrase\xF1a"
|
|
246
|
+
})]
|
|
247
|
+
}), showErrors && signInError === "NotAuthorizedException" && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
248
|
+
children: "Correo o contrase\xF1a incorrectos"
|
|
249
|
+
}), showErrors && signInError === "Error" && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
250
|
+
children: "Ha habido un problema al iniciar sesi\xF3n"
|
|
251
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
252
|
+
className: "button-right",
|
|
253
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index3.Button, {
|
|
254
|
+
buttonType: "general-default-button",
|
|
255
|
+
label: "Iniciar sesión",
|
|
256
|
+
onClick: function onClick(e) {
|
|
257
|
+
return validate(e);
|
|
258
|
+
}
|
|
259
|
+
})
|
|
260
|
+
})]
|
|
261
|
+
})
|
|
262
|
+
}), upgradePlanRedirect && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Redirect, {
|
|
263
|
+
to: {
|
|
264
|
+
pathname: "/dashboard"
|
|
265
|
+
}
|
|
266
|
+
})]
|
|
267
|
+
});
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
exports.SignInLoginCreationApp = SignInLoginCreationApp;
|
|
@@ -0,0 +1,20 @@
|
|
|
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 background: \"white\";\n display: flex;\n height: 100vh;\n width: 50%;\n justify-content: center;\n align-items: center;\n label {\n color: red;\n margin-top: 3px;\n margin-left: 15px;\n font-family: ", ";\n font-size: 11px;\n & + * {\n margin-top: 12px;\n }\n }\n\n &.home-login {\n .credenciales {\n & + * {\n margin-top: 30px;\n }\n }\n .user {\n & + * {\n margin-top: 20px;\n }\n }\n .password {\n & + * {\n margin-top: 20px;\n }\n }\n .select {\n display: flex;\n justify-content: space-between;\n .active-right {\n font-family: ", ";\n font-weight: 500;\n font-size: 13px;\n line-height: 24px;\n letter-spacing: -0.015em;\n color: ", ";\n cursor: pointer;\n }\n & + * {\n margin-top: 50px;\n }\n }\n .button-right {\n text-align: right;\n & + * {\n margin-top: 55px;\n }\n }\n .new-login {\n p {\n font-family: ", ";\n text-align: right;\n font-weight: 500;\n font-size: 13px;\n line-height: 24px;\n color: ", ";\n cursor: pointer;\n span {\n color: ", ";\n }\n }\n }\n }\n .main-container {\n max-width: 80%;\n max-height: 80%;\n }\n"])), _variables.FontFamily.Raleway_700, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s5, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s5, _variables.GlobalColors.secondary_magenta);
|
|
19
|
+
|
|
20
|
+
exports.Container = Container;
|
|
@@ -26,6 +26,7 @@ var Template = function Template(args) {
|
|
|
26
26
|
var ProviderProductEditionDefault = Template.bind({});
|
|
27
27
|
exports.ProviderProductEditionDefault = ProviderProductEditionDefault;
|
|
28
28
|
ProviderProductEditionDefault.args = {
|
|
29
|
+
trueTHD: true,
|
|
29
30
|
tabsSections: {
|
|
30
31
|
Descripción: true,
|
|
31
32
|
"Ficha técnica": true,
|
|
@@ -229,7 +229,8 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
229
229
|
revision = _ref$revision === void 0 ? false : _ref$revision,
|
|
230
230
|
setShowContentohRequestModal = _ref.setShowContentohRequestModal,
|
|
231
231
|
showSurvey = _ref.showSurvey,
|
|
232
|
-
company = _ref.company
|
|
232
|
+
company = _ref.company,
|
|
233
|
+
trueTHD = _ref.trueTHD;
|
|
233
234
|
|
|
234
235
|
var _useState = (0, _react.useState)("Descripción"),
|
|
235
236
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -1697,7 +1698,11 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1697
1698
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
1698
1699
|
headerTop: headerTop,
|
|
1699
1700
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_HeaderTop.HeaderTop, {
|
|
1700
|
-
setHeaderTop: setHeaderTop
|
|
1701
|
+
setHeaderTop: setHeaderTop,
|
|
1702
|
+
chat_authorization: token,
|
|
1703
|
+
chat_id_article: product.id_article,
|
|
1704
|
+
chat_version_article: version,
|
|
1705
|
+
trueTHD: trueTHD
|
|
1701
1706
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1702
1707
|
className: "data-container",
|
|
1703
1708
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
package/package.json
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contentoh-components-library",
|
|
3
|
-
"version": "21.2.
|
|
3
|
+
"version": "21.2.59",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@aws-amplify/auth": "^4.5.3",
|
|
6
6
|
"@aws-amplify/datastore": "^3.11.0",
|
|
7
7
|
"@aws-amplify/ui-react": "^2.17.0",
|
|
8
8
|
"@babel/runtime": "^7.17.2",
|
|
9
|
+
"@emotion/react": "^11.10.4",
|
|
10
|
+
"@emotion/styled": "^11.10.4",
|
|
11
|
+
"@mui/material": "^5.10.8",
|
|
12
|
+
"@mui/styled-engine-sc": "^5.10.6",
|
|
9
13
|
"@storybook/addon-postcss": "^2.0.0",
|
|
10
14
|
"@testing-library/jest-dom": "^5.11.4",
|
|
11
15
|
"@testing-library/react": "^11.1.0",
|
|
@@ -19,6 +23,7 @@
|
|
|
19
23
|
"draft-js": "^0.11.7",
|
|
20
24
|
"file-saver": "^2.0.5",
|
|
21
25
|
"js-base64": "^3.7.2",
|
|
26
|
+
"moment": "^2.29.4",
|
|
22
27
|
"prop-types": "^15.7.2",
|
|
23
28
|
"react": "^17.0.2",
|
|
24
29
|
"react-chartjs-2": "^4.0.1",
|
|
Binary file
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14">
|
|
2
|
+
<path id="close_FILL0_wght400_GRAD0_opsz48" d="M6.385,19.308,5.308,18.231l5.923-5.923L5.308,6.385,6.385,5.308l5.923,5.923,5.923-5.923,1.077,1.077-5.923,5.923,5.923,5.923-1.077,1.077-5.923-5.923Z" transform="translate(-5.308 -5.308)" fill="#fff"/>
|
|
3
|
+
</svg>
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 51 65" fill="#fff" fill-rule="evenodd" stroke="#000" stroke-linecap="round" stroke-linejoin="round"><use xlink:href="#C" x=".5" y=".5"/><defs><filter id="A" x="-6%" y="-4.6875%" width="116%" height="112.5%"><feGaussianBlur in="SourceAlpha" stdDeviation="1"/><feOffset dx="2" dy="2" result="B"/><feFlood flood-color="#000" flood-opacity=".2"/><feComposite in2="B" operator="in" result="C"/><feMerge><feMergeNode in="C"/><feMergeNode in="SourceGraphic"/></feMerge></filter><filter id="B" x="-27.5%" y="-32.5%" width="160%" height="160%"><feGaussianBlur in="SourceAlpha" stdDeviation="2"/><feOffset dx="1" dy="-1" result="B"/><feFlood flood-color="#000" flood-opacity=".2"/><feComposite in2="B" operator="in" result="C"/><feMerge><feMergeNode in="C"/><feMergeNode in="SourceGraphic"/></feMerge></filter></defs><symbol id="C" overflow="visible"><path d="M50 20L30 0H5a4.99 4.99 0 0 0-5 5v54a4.99 4.99 0 0 0 5 5h40a4.99 4.99 0 0 0 5-5z" fill="#2196f3" stroke="none" filter="url(#A)"/><defs/><g transform="matrix(-1 0 0 -1 50 20)"><path d="M20 20L0 0h15a4.99 4.99 0 0 1 5 5z" fill="#90caf9" stroke="none" filter="url(#B)"/><defs/></g><path d="M10 17.5h17.5V20H10zm0 10h27.5V30H10zm0 10h27.5V40H10zm0 10h27.5V50H10z" stroke="none"/></symbol></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 66 81" fill="#fff" fill-rule="evenodd" stroke="#000" stroke-linecap="round" stroke-linejoin="round"><use xlink:href="#A" x=".5" y=".5"/><symbol id="A" overflow="visible"><path d="M44.674 0H0v79.977h65V20.012L44.674 0zM60.93 75.993H4.07V4.007h38.593v18.008h18.291v53.978zm-10.151-40H14.221v-3.984h36.558zm0 9.995H14.221v-3.984h36.558zm0 10.017H14.221v-4.007h36.558zm0 9.994H14.221v-4.007h36.558z" fill="#2a3282" stroke="none"/></symbol></svg>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14" viewBox="0 0 14 14">
|
|
2
|
+
<defs>
|
|
3
|
+
<style>
|
|
4
|
+
.cls-1 {
|
|
5
|
+
fill: #707070;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.cls-2 {
|
|
9
|
+
clip-path: url(#clip-path);
|
|
10
|
+
}
|
|
11
|
+
</style>
|
|
12
|
+
<clipPath id="clip-path">
|
|
13
|
+
<rect id="Rectángulo_368" data-name="Rectángulo 368" class="cls-1" width="14" height="14" transform="translate(1737 869)"/>
|
|
14
|
+
</clipPath>
|
|
15
|
+
</defs>
|
|
16
|
+
<g id="Enmascarar_grupo_83" data-name="Enmascarar grupo 83" class="cls-2" transform="translate(-1737 -869)">
|
|
17
|
+
<path id="forum_FILL0_wght400_GRAD0_opsz48" class="cls-1" d="M1.4,11.9V2.135a.728.728,0,0,1,.228-.49A.651.651,0,0,1,2.1,1.4h9.082a.675.675,0,0,1,.49.236.714.714,0,0,1,.227.5v6.23a.728.728,0,0,1-.227.49.666.666,0,0,1-.49.245H4.2Zm3.518.7a.678.678,0,0,1-.481-.245.716.716,0,0,1-.236-.49V10.15h8.75V4.2H14.7a.651.651,0,0,1,.472.245.744.744,0,0,1,.227.508v10.43L12.617,12.6ZM10.85,2.45H2.45V9.363L3.763,8.05H10.85Zm-8.4,0v0Z" transform="translate(1735.6 867.609)"/>
|
|
18
|
+
</g>
|
|
19
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
|
|
2
|
+
<path id="Icono_cargar_más" data-name="Icono, cargar más" d="M18,28a9.64,9.64,0,0,1-7.078-2.922A9.64,9.64,0,0,1,8,18a9.64,9.64,0,0,1,2.922-7.078A9.64,9.64,0,0,1,18,8a9.665,9.665,0,0,1,4.656,1.078,11.027,11.027,0,0,1,3.469,2.953V8H28v7.938H20.063V14.063h5.25a9.572,9.572,0,0,0-3.031-3.031A7.888,7.888,0,0,0,18,9.875,8.056,8.056,0,0,0,9.875,18,8.056,8.056,0,0,0,18,26.125a8.2,8.2,0,0,0,4.75-1.484,7.72,7.72,0,0,0,3-3.922h1.937A9.576,9.576,0,0,1,24.094,26,9.947,9.947,0,0,1,18,28Z" transform="translate(-8 -8)" fill="#8a6caa"/>
|
|
3
|
+
</svg>
|