contentoh-components-library 21.2.20 → 21.2.23

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 (24) hide show
  1. package/dist/components/atoms/InputFormatter/index.js +3 -3
  2. package/dist/components/atoms/ListCommercialRetailers/ListCommercialRetailers.stories.js +36 -0
  3. package/dist/components/atoms/ListCommercialRetailers/index.js +64 -0
  4. package/dist/components/atoms/ListCommercialRetailers/styles.js +20 -0
  5. package/dist/components/atoms/MenuCommercialRetailers/MenuCommercialRetailers.stories.js +37 -0
  6. package/dist/components/atoms/MenuCommercialRetailers/index.js +25 -0
  7. package/dist/components/atoms/MenuCommercialRetailers/styles.js +20 -0
  8. package/dist/components/atoms/MenuProductImage/MenuProductImage.stories.js +28 -0
  9. package/dist/components/atoms/MenuProductImage/index.js +88 -0
  10. package/dist/components/atoms/MenuProductImage/styles.js +20 -0
  11. package/dist/components/atoms/VerticalSideMenuMainPage/VerticalSideMenuMainPage.stories.js +12 -20
  12. package/dist/components/atoms/VerticalSideMenuMainPage/index.js +25 -35
  13. package/dist/components/atoms/VerticalSideMenuMainPage/styles.js +14 -14
  14. package/dist/components/molecules/ApproveRejetPanel/ApproveRejetPanel.stories.js +25 -0
  15. package/dist/components/molecules/ApproveRejetPanel/index.js +49 -0
  16. package/dist/components/molecules/ApproveRejetPanel/styles.js +18 -0
  17. package/dist/components/molecules/SignInLoginCreationApp/SignInLogin.stories.js +28 -0
  18. package/dist/components/molecules/SignInLoginCreationApp/index.js +270 -0
  19. package/dist/components/molecules/SignInLoginCreationApp/styles.js +20 -0
  20. package/package.json +1 -1
  21. package/src/components/atoms/InputFormatter/index.js +8 -3
  22. package/src/components/atoms/VerticalSideMenuMainPage/VerticalSideMenuMainPage.stories.js +18 -13
  23. package/src/components/atoms/VerticalSideMenuMainPage/index.js +18 -33
  24. package/src/components/atoms/VerticalSideMenuMainPage/styles.js +33 -27
@@ -62,7 +62,7 @@ var InputFormatter = function InputFormatter(_ref) {
62
62
  var maxLength = maxChar ? maxChar : 999;
63
63
 
64
64
  var getValue = function getValue(value) {
65
- var temp = value.replace(/\n/gm, "<br>").replace(/\&(nbsp;|amp;)/gm, " ");
65
+ var temp = value.replace(/\n/gm, "<br>").replace(/\&nbsp;/gm, " ").replace(/\&amp;/gm, "&");
66
66
  return temp;
67
67
  }; //const quillRef = useRef();
68
68
 
@@ -74,7 +74,7 @@ var InputFormatter = function InputFormatter(_ref) {
74
74
  };
75
75
 
76
76
  var valueFormater = function valueFormater(value) {
77
- return value.replace(/<\/p><p>/gm, "\n").replace(/<\/?br>|<\/?p>/gm, "").replace(/\&(nbsp;|amp;)/gm, " ");
77
+ return value.replace(/<\/p><p>/gm, "\n").replace(/<\/?br>|<\/?p>/gm, "").replace(/\&nbsp;/gm, " ").replace(/\&amp;/gm, "&");
78
78
  };
79
79
 
80
80
  var _onChange = function onChange(valueInput, delta, user, h) {
@@ -82,7 +82,7 @@ var InputFormatter = function InputFormatter(_ref) {
82
82
 
83
83
  try {
84
84
  if (h.getLength() - 1 <= maxLength) {
85
- var unformattedText = valueInput.replace(/<li.*?>/gm, " - ").replace(/<\/li>/gm, "\n").replace(/<\/p><p>/gm, "\n").replaceAll(/<\/?(?!\/?strong).*?>/gm, "").replace(/\&(nbsp;|amp;)/gm, " ");
85
+ var unformattedText = valueInput.replace(/<li.*?>/gm, " - ").replace(/<\/li>/gm, "\n").replace(/<\/p><p>/gm, "\n").replaceAll(/<\/?(?!\/?strong).*?>/gm, "").replace(/\&nbsp;/gm, " ").replace(/\&amp;/gm, "&");
86
86
  setInputValue(valueInput);
87
87
  value = unformattedText;
88
88
  } else {
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.ListCommercialRetailersDefault = void 0;
7
+
8
+ var _index = require("./index");
9
+
10
+ var _default = {
11
+ title: "Components/atoms/ListCommercialRetailers",
12
+ component: _index.ListCommercialRetailers
13
+ };
14
+ exports.default = _default;
15
+
16
+ var Template = function Template(args) {
17
+ return /*#__PURE__*/React.createElement(_index.ListCommercialRetailers, args);
18
+ };
19
+
20
+ var ListCommercialRetailersDefault = Template.bind({});
21
+ exports.ListCommercialRetailersDefault = ListCommercialRetailersDefault;
22
+ ListCommercialRetailersDefault.args = {
23
+ retailersAvailable: [{
24
+ id: 54,
25
+ name: "Construrama",
26
+ country: "México",
27
+ id_region: 1,
28
+ active: 1
29
+ }, {
30
+ id: 4,
31
+ name: "Walmart Super y Superama"
32
+ }, {
33
+ id: 6,
34
+ name: "HEB"
35
+ }]
36
+ };
@@ -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.ListCommercialRetailers = void 0;
9
+
10
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
11
+
12
+ var _styles = require("./styles");
13
+
14
+ var _listCommercialRetailers = _interopRequireDefault(require("../../../assets/images/listCommercialRetailers/listCommercialRetailers.svg"));
15
+
16
+ var _react = require("react");
17
+
18
+ var _index = require("../CheckBox/index");
19
+
20
+ var ListCommercialRetailers = function ListCommercialRetailers(_ref) {
21
+ var retailersAvailable = _ref.retailersAvailable;
22
+
23
+ var _useState = (0, _react.useState)(false),
24
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
25
+ showMenu = _useState2[0],
26
+ setShowMenu = _useState2[1];
27
+
28
+ var closeMenu = function closeMenu(e) {
29
+ if (!e.target.closest(".menu-list-commercial-retailers") && showMenu) {
30
+ document.removeEventListener("click", closeMenu, false);
31
+ setShowMenu(false);
32
+ }
33
+ };
34
+
35
+ (0, _react.useEffect)(function () {
36
+ if (showMenu) {
37
+ document.addEventListener("click", closeMenu, false);
38
+ }
39
+ }, [showMenu]);
40
+ return /*#__PURE__*/React.createElement(_styles.Container, {
41
+ onClick: function onClick(event) {
42
+ if (!showMenu) {
43
+ setShowMenu(true);
44
+ } else if (showMenu && !event.target.closest(".menu-list-commercial-retailers")) {
45
+ setShowMenu(false);
46
+ document.removeEventListener("click", closeMenu, false);
47
+ }
48
+ },
49
+ className: "list-commercial-retailers"
50
+ }, /*#__PURE__*/React.createElement("img", {
51
+ src: _listCommercialRetailers.default,
52
+ alt: "button up icon"
53
+ }), showMenu && /*#__PURE__*/React.createElement("div", {
54
+ className: "menu-list-commercial-retailers"
55
+ }, retailersAvailable === null || retailersAvailable === void 0 ? void 0 : retailersAvailable.map(function (component, index) {
56
+ return /*#__PURE__*/React.createElement(_index.CheckBox, {
57
+ id: component.id,
58
+ label: component.name,
59
+ key: index + "-" + component.id
60
+ });
61
+ })));
62
+ };
63
+
64
+ exports.ListCommercialRetailers = ListCommercialRetailers;
@@ -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.button(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: transparent;\n border: 1px solid ", ";\n border-radius: 2px;\n padding: 3px;\n display: flex;\n align-items: center;\n cursor: pointer;\n position: relative;\n height: 30px;\n .menu-list-commercial-retailers {\n width: 540px;\n height: auto;\n border-radius: 7px;\n background-color: ", ";\n padding: 14px 14px 8px 20px;\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);\n position: absolute;\n top: calc(100% + 3px);\n right: calc(100% - 20px);\n display: flex;\n flex-wrap: wrap;\n z-index: 1;\n div {\n & + * {\n margin-left: 15px;\n }\n p {\n font-size: 11px;\n }\n }\n }\n"])), _variables.GlobalColors.magenta_s2, _variables.GlobalColors.s2);
19
+
20
+ exports.Container = Container;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.MenuCommercialRetailersDefault = void 0;
7
+
8
+ var _index = require("./index");
9
+
10
+ var _default = {
11
+ title: "Components/atoms/MenuCommercialRetailers",
12
+ component: _index.MenuCommercialRetailers
13
+ };
14
+ exports.default = _default;
15
+
16
+ var Template = function Template(args) {
17
+ return /*#__PURE__*/React.createElement(_index.MenuCommercialRetailers, args);
18
+ };
19
+
20
+ var MenuCommercialRetailersDefault = Template.bind({});
21
+ exports.MenuCommercialRetailersDefault = MenuCommercialRetailersDefault;
22
+ MenuCommercialRetailersDefault.args = {
23
+ editType: "3",
24
+ retailersAvailable: [{
25
+ id: 54,
26
+ name: "Construrama",
27
+ country: "México",
28
+ id_region: 1,
29
+ active: 1
30
+ }, {
31
+ id: 4,
32
+ name: "Walmart Super y Superama"
33
+ }, {
34
+ id: 6,
35
+ name: "HEB"
36
+ }]
37
+ };
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.MenuCommercialRetailers = void 0;
7
+
8
+ var _styles = require("./styles");
9
+
10
+ var _StatusTag = require("../StatusTag");
11
+
12
+ var _ListCommercialRetailers = require("../ListCommercialRetailers");
13
+
14
+ var MenuCommercialRetailers = function MenuCommercialRetailers(_ref) {
15
+ var editType = _ref.editType,
16
+ retailersAvailable = _ref.retailersAvailable;
17
+ return /*#__PURE__*/React.createElement(_styles.Container, null, /*#__PURE__*/React.createElement(_StatusTag.StatusTag, {
18
+ editType: editType,
19
+ ovalForm: true
20
+ }), /*#__PURE__*/React.createElement(_ListCommercialRetailers.ListCommercialRetailers, {
21
+ retailersAvailable: retailersAvailable
22
+ }));
23
+ };
24
+
25
+ exports.MenuCommercialRetailers = MenuCommercialRetailers;
@@ -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 display: flex;\n align-items: center;\n .status-version {\n & + * {\n margin-left: 5px;\n }\n }\n .list-commercial-retailers {\n border: 1px solid transparent;\n img {\n display: none;\n }\n &:hover {\n border: 1px solid ", ";\n img {\n display: block;\n }\n }\n }\n"])), _variables.GlobalColors.magenta_s2);
19
+
20
+ 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.MenuProductImageDefault = void 0;
9
+
10
+ var _index = require("./index");
11
+
12
+ var _menuProductImage = _interopRequireDefault(require("../../../assets/images/menuProductImage/menuProductImage.svg"));
13
+
14
+ var _default = {
15
+ title: "Components/atoms/MenuProductImage",
16
+ component: _index.MenuProductImage
17
+ };
18
+ exports.default = _default;
19
+
20
+ var Template = function Template(args) {
21
+ return /*#__PURE__*/React.createElement(_index.MenuProductImage, args);
22
+ };
23
+
24
+ var MenuProductImageDefault = Template.bind({});
25
+ exports.MenuProductImageDefault = MenuProductImageDefault;
26
+ MenuProductImageDefault.args = {
27
+ ProductImg: _menuProductImage.default
28
+ };
@@ -0,0 +1,88 @@
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.MenuProductImage = void 0;
9
+
10
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
11
+
12
+ var _styles = require("./styles");
13
+
14
+ var _menuProductImageButton = _interopRequireDefault(require("../../../assets/images/menuProductImage/menuProductImageButton.svg"));
15
+
16
+ var _react = require("react");
17
+
18
+ var _index = require("../LoadImageMenu/index");
19
+
20
+ var _listCommercialRetailers = _interopRequireDefault(require("../../../assets/images/listCommercialRetailers/listCommercialRetailers.svg"));
21
+
22
+ var MenuProductImage = function MenuProductImage(_ref) {
23
+ var ProductImg = _ref.ProductImg;
24
+
25
+ var _useState = (0, _react.useState)(false),
26
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
27
+ showMenu = _useState2[0],
28
+ setShowMenu = _useState2[1];
29
+
30
+ var closeMenu = function closeMenu(e) {
31
+ if (!e.target.closest(".menu-upload-product") && showMenu) {
32
+ document.removeEventListener("click", closeMenu, false);
33
+ setShowMenu(false);
34
+ }
35
+ };
36
+
37
+ (0, _react.useEffect)(function () {
38
+ if (showMenu) {
39
+ document.addEventListener("click", closeMenu, false);
40
+ }
41
+ }, [showMenu]);
42
+ return /*#__PURE__*/React.createElement(_styles.Container, {
43
+ className: "div-upload-image"
44
+ }, /*#__PURE__*/React.createElement("img", {
45
+ className: "profile-image",
46
+ src: ProductImg,
47
+ alt: "Product Image"
48
+ }), /*#__PURE__*/React.createElement("button", {
49
+ onClick: function onClick(event) {
50
+ if (!showMenu) {
51
+ setShowMenu(true);
52
+ } else if (showMenu && !event.target.closest(".menu-upload-product")) {
53
+ setShowMenu(false);
54
+ document.removeEventListener("click", closeMenu, false);
55
+ }
56
+ },
57
+ className: "upload-image-button " + (showMenu && "show-menu-upload-image")
58
+ }, /*#__PURE__*/React.createElement("img", {
59
+ src: showMenu ? _listCommercialRetailers.default : _menuProductImageButton.default,
60
+ alt: "Product Image Button"
61
+ })), showMenu && /*#__PURE__*/React.createElement("div", {
62
+ className: "menu-upload-product"
63
+ }, /*#__PURE__*/React.createElement(_index.LoadImageMenu, {
64
+ tipo: "Tipo de empaque ",
65
+ product: "Producto expuesto",
66
+ content: [{
67
+ label: "Enbalaje adicional - 0"
68
+ }, {
69
+ label: "En paquete - 1"
70
+ }, {
71
+ label: "Producto expuesto - 2"
72
+ }, {
73
+ label: "Embalaje multiforme - 3"
74
+ }, {
75
+ label: "Si no es una imagen / no corresponde - X"
76
+ }],
77
+ id: "menu-packaging-type"
78
+ }), /*#__PURE__*/React.createElement(_index.LoadImageMenu, {
79
+ tipo: "Tipo de imagen ",
80
+ product: "Render",
81
+ content: [{
82
+ label: "fotografía del producto"
83
+ }],
84
+ id: "menu-image-type"
85
+ })));
86
+ };
87
+
88
+ exports.MenuProductImage = MenuProductImage;
@@ -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 display: flex;\n justify-content: space-between;\n align-items: center;\n position: relative;\n .profile-image {\n width: 23px;\n height: 23px;\n & + * {\n margin-left: 8px;\n }\n }\n .upload-image-button {\n background: transparent;\n border: 1px solid transparent;\n border-radius: 2px;\n padding: 3px;\n display: flex;\n align-items: center;\n cursor: pointer;\n height: 30px;\n width: 15px;\n left: 100%;\n img {\n display: none;\n }\n &:hover {\n border: 1px solid ", ";\n img {\n display: block;\n }\n }\n &.show-menu-upload-image {\n border: 1px solid ", ";\n img {\n display: block;\n }\n }\n }\n .menu-upload-product {\n background: ", ";\n border: 1px solid ", ";\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);\n border-radius: 7px;\n width: 324px;\n padding: 8px 0px;\n position: absolute;\n right: 0%;\n z-index: 1;\n top: 30px;\n button {\n left: 0%;\n border-radius: 7px;\n span,\n .tipo {\n color: ", ";\n }\n .products {\n color: ", ";\n }\n }\n }\n"])), _variables.GlobalColors.s3, _variables.GlobalColors.magenta_s2, _variables.GlobalColors.s2, _variables.GlobalColors.s3, _variables.GlobalColors.s5, _variables.GlobalColors.s4);
19
+
20
+ exports.Container = Container;
@@ -39,33 +39,25 @@ VerticalSideMenuMainPageDefault.args = {
39
39
  menuoption: [{
40
40
  icon: _iconSpeedometer.default,
41
41
  path: "/Dashboard",
42
- title: "Dashborad"
42
+ title: "Dashboard"
43
+ }, {
44
+ icon: _iconGroup.default,
45
+ path: "/Products",
46
+ title: "Productos"
43
47
  }, {
44
48
  icon: _iconProduct.default,
45
- path: "/products",
46
- title: "Productos",
49
+ path: "/Orders",
50
+ title: "Proveedor",
47
51
  suboption: [{
48
- path: "/Dashboard",
49
- title: "General"
52
+ path: "/Orders",
53
+ title: "Ordenes"
50
54
  }, {
51
- path: "/AddProducts",
52
- title: "Agregar Producto"
55
+ path: "/Entregas",
56
+ title: "Entregas"
53
57
  }]
54
- }, {
55
- icon: _iconGroup.default,
56
- path: "/providers",
57
- title: "Proovedores"
58
- }, {
59
- icon: _iconLogo.default,
60
- path: "/ContentohProducts",
61
- title: "Content Oh!",
62
- suboption: {
63
- path: "/ContentohProducts",
64
- title: "Productos"
65
- }
66
58
  }, {
67
59
  icon: _iconTask.default,
68
- path: "/tasks/7",
60
+ path: "/tasks",
69
61
  title: "Tareas"
70
62
  }]
71
63
  };
@@ -17,27 +17,30 @@ var _iconLogoContentoh = _interopRequireDefault(require("../../../assets/images/
17
17
 
18
18
  var _iconLogo = _interopRequireDefault(require("../../../assets/images/verticalSideMenuMainPage/iconLogo.svg"));
19
19
 
20
- var _openMenu = _interopRequireDefault(require("../../../assets/images/verticalSideMenuMainPage/openMenu.svg"));
21
-
22
- var _closeMenu = _interopRequireDefault(require("../../../assets/images/verticalSideMenuMainPage/closeMenu.svg"));
23
-
24
20
  var _react = _interopRequireWildcard(require("react"));
25
21
 
22
+ var _reactRouterDom = require("react-router-dom");
23
+
26
24
  var _jsxRuntime = require("react/jsx-runtime");
27
25
 
28
26
  var VerticalSideMenuMainPage = function VerticalSideMenuMainPage(_ref) {
29
27
  var menuoption = _ref.menuoption;
30
28
 
31
- var _useState = (0, _react.useState)(""),
29
+ var _useState = (0, _react.useState)(),
32
30
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
33
31
  trueBar = _useState2[0],
34
32
  setTrueBar = _useState2[1];
35
33
 
36
- var sub;
37
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
34
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
38
35
  className: trueBar,
39
36
  bar: trueBar,
40
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
37
+ onMouseOver: function onMouseOver() {
38
+ return setTrueBar(true);
39
+ },
40
+ onMouseOut: function onMouseOut() {
41
+ return setTrueBar(false);
42
+ },
43
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
41
44
  className: "navbar-top",
42
45
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
43
46
  src: trueBar ? _iconLogoContentoh.default : _iconLogo.default,
@@ -45,28 +48,26 @@ var VerticalSideMenuMainPage = function VerticalSideMenuMainPage(_ref) {
45
48
  className: "logo"
46
49
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
47
50
  className: "option",
48
- children: menuoption.map(function (item) {
49
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
50
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
51
+ children: menuoption.map(function (item, index) {
52
+ var _item$suboption;
53
+
54
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
55
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("a", {
56
+ href: item.path,
51
57
  className: "option-link",
52
- exact: true,
53
- activeClassName: "active",
54
- to: item.path,
55
58
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
56
59
  src: item.icon,
57
- alt: item.title,
58
- width: "25px"
60
+ alt: item.title
59
61
  }), trueBar && /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
60
62
  children: item.title
61
63
  })]
62
- }), item.suboption === undefined ? "" : /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
63
- children: menuoption[1].suboption.map(function (subitem) {
64
+ }), item.suboption !== undefined && /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
65
+ children: item === null || item === void 0 ? void 0 : (_item$suboption = item.suboption) === null || _item$suboption === void 0 ? void 0 : _item$suboption.map(function (subitem) {
64
66
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
65
67
  className: "sub-option",
66
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
67
- exact: true,
68
- activeClassName: "active",
69
- to: subitem.path,
68
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
69
+ href: subitem.path,
70
+ className: "sub-option-link",
70
71
  children: trueBar && /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
71
72
  children: subitem.title
72
73
  })
@@ -74,21 +75,10 @@ var VerticalSideMenuMainPage = function VerticalSideMenuMainPage(_ref) {
74
75
  });
75
76
  })
76
77
  })]
77
- });
78
+ }, index);
78
79
  })
79
80
  })]
80
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
81
- className: "menu-bottom",
82
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
83
- src: trueBar ? _closeMenu.default : _openMenu.default,
84
- alt: "Open Menu",
85
- onClick: function onClick() {
86
- {
87
- trueBar ? setTrueBar("") : setTrueBar("actived");
88
- }
89
- }
90
- })
91
- })]
81
+ })
92
82
  });
93
83
  };
94
84
 
@@ -11,41 +11,41 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
11
11
 
12
12
  var _styledComponents = _interopRequireDefault(require("styled-components"));
13
13
 
14
- var _reactRouterDom = require("react-router-dom");
15
-
16
14
  var _templateObject;
17
15
 
18
- //styled(NavLink)
19
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: 100%;\n width: 58px;\n box-sizing: border-box;\n padding: 23px 10px 70px 10px;\n flex-direction: column;\n justify-content: space-between;\n overflow: auto;\n border-radius: 50px;\n background: linear-gradient(180deg, #e33aa9 0%, #3b1366 100%);\n scrollbar-width: none;\n display: flex;\n text-align: center;\n &.actived {\n width: 200px;\n padding: 23px 10px 15px 10px;\n border-radius: 20px;\n }\n .navbar-top {\n .logo {\n & + * {\n margin-top: ", "%;\n }\n }\n .option {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding-left: ", "px;\n div {\n height: ", "px;\n width: ", "px;\n display: flex;\n justify-content: ", ";\n border-radius: ", "px;\n align-items: center;\n font-family: \"Raleway\";\n font-style: normal;\n font-weight: 400;\n font-size: 18px;\n line-height: 21px;\n letter-spacing: -0.015em;\n color: #fafafa;\n text-decoration: none;\n &.option-link {\n cursor: pointer;\n margin-top: 12px;\n padding-left: ", "px;\n }\n p {\n cursor: pointer;\n }\n img {\n & + * {\n margin-left: 12px;\n }\n }\n }\n .option-link:hover {\n background: #e33aa9;\n }\n .sub-option {\n display: flex;\n flex-direction: column;\n padding-left: ", "px;\n height: auto;\n width: auto;\n div {\n display: flex;\n justify-content: flex-start;\n text-decoration: none;\n position: relative;\n font-size: 13px;\n border-left: 1px solid #f0eef2;\n border-radius: 0;\n color: #f0eef2;\n padding-top: 20px;\n padding-left: 12px;\n height: 25px;\n &::before {\n border-left: 1px solid #e33aa9;\n width: 10px;\n content: \"\";\n border-radius: 50%;\n height: 10px;\n background-color: white;\n position: absolute;\n left: ", "%;\n bottom: 1%;\n }\n }\n }\n }\n }\n .menu-bottom {\n display: flex;\n justify-content: ", ";\n cursor: pointer;\n }\n"])), function (_ref) {
16
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: 98%;\n box-sizing: border-box;\n padding: 23px 10px 70px 10px;\n flex-direction: column;\n justify-content: space-between;\n overflow: auto;\n width: ", "px;\n border-radius: ", "px;\n background: linear-gradient(180deg, #e33aa9 0%, #3b1366 100%);\n scrollbar-width: none;\n display: flex;\n text-align: center;\n transition: width 0.3s linear;\n margin: 10px 0 10px 20px;\n & + * {\n margin-left: 30px;\n }\n .navbar-top {\n transition: all 0.3s linear;\n .option {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n margin-top: ", "%;\n padding-left: ", "px;\n .active {\n background: #e33aa9;\n }\n & + div {\n margin-top: 5px;\n }\n a {\n height: ", "px;\n display: flex;\n justify-content: ", ";\n border-radius: ", "px;\n align-items: center;\n font-family: sans-serif;\n font-style: normal;\n font-weight: 400;\n font-size: 18px;\n line-height: 21px;\n letter-spacing: -0.015em;\n color: #fafafa;\n text-decoration: none;\n &.option-link {\n cursor: pointer;\n width: ", "px;\n margin: 5px 0;\n padding-left: ", "px;\n }\n p {\n cursor: pointer;\n margin: 0%;\n pointer-events: none;\n }\n img {\n width: 22px;\n & + * {\n margin-left: 12px;\n }\n }\n }\n .option-link:hover {\n background: #e33aa9;\n }\n .sub-option {\n display: flex;\n flex-direction: column;\n padding-left: ", "px;\n height: auto;\n width: auto;\n a {\n display: flex;\n justify-content: flex-start;\n text-decoration: none;\n position: relative;\n font-size: 13px;\n border-left: 1px solid #f0eef2;\n border-radius: 0;\n color: #f0eef2;\n padding-top: 14px;\n padding-left: 12px;\n height: 25px;\n &::before {\n border-left: 1px solid #e33aa9;\n width: 10px;\n content: \"\";\n border-radius: 50%;\n height: 10px;\n background-color: white;\n position: absolute;\n bottom: 0;\n left: ", "%;\n }\n &.active {\n background: none;\n &::before {\n background-color: #e33aa9;\n }\n }\n }\n }\n }\n }\n"])), function (_ref) {
20
17
  var bar = _ref.bar;
21
- return bar === "" ? 145 : 50;
18
+ return bar ? 210 : 58;
22
19
  }, function (_ref2) {
23
20
  var bar = _ref2.bar;
24
- return bar ? 5 : 0;
21
+ return bar ? 20 : 50;
25
22
  }, function (_ref3) {
26
23
  var bar = _ref3.bar;
27
- return bar ? 32 : 38;
24
+ return bar === "" ? 145 : 50;
28
25
  }, function (_ref4) {
29
26
  var bar = _ref4.bar;
30
- return bar ? 165 : 38;
27
+ return bar ? 5 : 0;
31
28
  }, function (_ref5) {
32
29
  var bar = _ref5.bar;
33
- return bar ? "flex-start" : "center";
30
+ return bar ? 32 : 38;
34
31
  }, function (_ref6) {
35
32
  var bar = _ref6.bar;
36
- return bar ? 18 : 100;
33
+ return bar ? "flex-start" : "center";
37
34
  }, function (_ref7) {
38
35
  var bar = _ref7.bar;
39
- return bar ? 15 : 0;
36
+ return bar ? 18 : 100;
40
37
  }, function (_ref8) {
41
38
  var bar = _ref8.bar;
42
- return bar ? 28 : 20;
39
+ return bar ? "160" : "38";
43
40
  }, function (_ref9) {
44
41
  var bar = _ref9.bar;
45
- return bar ? -4 : -16;
42
+ return bar ? 15 : 0;
46
43
  }, function (_ref10) {
47
44
  var bar = _ref10.bar;
48
- return bar ? "flex-end" : "center";
45
+ return bar ? 28 : 20;
46
+ }, function (_ref11) {
47
+ var bar = _ref11.bar;
48
+ return bar ? -4 : -34;
49
49
  });
50
50
 
51
51
  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;
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.2.20",
3
+ "version": "21.2.23",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -22,7 +22,10 @@ export const InputFormatter = ({
22
22
  const maxLength = maxChar ? maxChar : 999;
23
23
 
24
24
  const getValue = (value) => {
25
- let temp = value.replace(/\n/gm, "<br>").replace(/\&(nbsp;|amp;)/gm, " ");
25
+ let temp = value
26
+ .replace(/\n/gm, "<br>")
27
+ .replace(/\&nbsp;/gm, " ")
28
+ .replace(/\&amp;/gm, "&");
26
29
  return temp;
27
30
  };
28
31
 
@@ -37,7 +40,8 @@ export const InputFormatter = ({
37
40
  return value
38
41
  .replace(/<\/p><p>/gm, "\n")
39
42
  .replace(/<\/?br>|<\/?p>/gm, "")
40
- .replace(/\&(nbsp;|amp;)/gm, " ");
43
+ .replace(/\&nbsp;/gm, " ")
44
+ .replace(/\&amp;/gm, "&");
41
45
  };
42
46
 
43
47
  const onChange = (valueInput, delta, user, h) => {
@@ -49,7 +53,8 @@ export const InputFormatter = ({
49
53
  .replace(/<\/li>/gm, "\n")
50
54
  .replace(/<\/p><p>/gm, "\n")
51
55
  .replaceAll(/<\/?(?!\/?strong).*?>/gm, "")
52
- .replace(/\&(nbsp;|amp;)/gm, " ");
56
+ .replace(/\&nbsp;/gm, " ")
57
+ .replace(/\&amp;/gm, "&");
53
58
  setInputValue(valueInput);
54
59
  value = unformattedText;
55
60
  } else {
@@ -15,21 +15,26 @@ const Template = (args) => <VerticalSideMenuMainPage {...args} />;
15
15
  export const VerticalSideMenuMainPageDefault = Template.bind({});
16
16
 
17
17
  VerticalSideMenuMainPageDefault.args = {
18
- menuoption: [
19
- { icon: iconSpeedometer, path: "/Dashboard", title: "Dashborad" },
18
+ menuoption : [
19
+ { icon: iconSpeedometer, path: "/Dashboard", title: "Dashboard" },
20
20
  {
21
- icon: iconProduct,
22
- path: "/products",
21
+ icon: iconGroup,
22
+ path: "/Products",
23
23
  title: "Productos",
24
- suboption: [{ path: "/Dashboard", title: "General" },{ path: "/AddProducts", title: "Agregar Producto" }],
25
24
  },
26
- { icon: iconGroup, path: "/providers", title: "Proovedores" },
27
- {
28
- icon: iconLogo,
29
- path: "/ContentohProducts",
30
- title: "Content Oh!",
31
- suboption: { path: "/ContentohProducts", title: "Productos" },
25
+ {
26
+ icon: iconProduct,
27
+ path: "/Orders",
28
+ title: "Proveedor",
29
+ suboption: [
30
+ { path: "/Orders", title: "Ordenes" },
31
+ { path: "/Entregas", title: "Entregas" },
32
+ ],
33
+ },
34
+ {
35
+ icon: iconTask,
36
+ path: "/tasks",
37
+ title: "Tareas",
32
38
  },
33
- { icon: iconTask, path: "/tasks/7", title: "Tareas" },
34
- ],
39
+ ]
35
40
  };
@@ -1,15 +1,18 @@
1
1
  import { Container } from "./styles";
2
2
  import iconLogoContentoh from "../../../assets/images/verticalSideMenuMainPage/iconLogoContentoh.svg";
3
3
  import iconLogo from "../../../assets/images/verticalSideMenuMainPage/iconLogo.svg";
4
- import openMenu from "../../../assets/images/verticalSideMenuMainPage/openMenu.svg";
5
- import closeMenu from "../../../assets/images/verticalSideMenuMainPage/closeMenu.svg";
6
4
  import React, { useState } from "react";
5
+ import { NavLink } from "react-router-dom";
7
6
 
8
7
  export const VerticalSideMenuMainPage = ({ menuoption }) => {
9
- const [trueBar, setTrueBar] = useState("");
10
- let sub;
8
+ const [trueBar, setTrueBar] = useState();
11
9
  return (
12
- <Container className={trueBar} bar={trueBar}>
10
+ <Container
11
+ className={trueBar}
12
+ bar={trueBar}
13
+ onMouseOver={() => setTrueBar(true)}
14
+ onMouseOut={() => setTrueBar(false)}
15
+ >
13
16
  <div className="navbar-top">
14
17
  <img
15
18
  src={trueBar ? iconLogoContentoh : iconLogo}
@@ -17,45 +20,27 @@ export const VerticalSideMenuMainPage = ({ menuoption }) => {
17
20
  className="logo"
18
21
  ></img>
19
22
  <div className="option">
20
- {menuoption.map((item) => (
21
- <>
22
- <div
23
- className="option-link"
24
- exact
25
- activeClassName="active"
26
- to={item.path}
27
- >
28
- <img src={item.icon} alt={item.title} width={"25px"}></img>
23
+ {menuoption.map((item, index) => (
24
+ <div key={index}>
25
+ <a href={item.path} className="option-link">
26
+ <img src={item.icon} alt={item.title}></img>
29
27
  {trueBar && <p>{item.title}</p>}
30
- </div>
31
- {item.suboption === undefined ? (
32
- ""
33
- ) : (
28
+ </a>
29
+ {item.suboption !== undefined && (
34
30
  <>
35
- {menuoption[1].suboption.map((subitem) => (
31
+ {item?.suboption?.map((subitem) => (
36
32
  <div className="sub-option">
37
- <div exact activeClassName="active" to={subitem.path}>
33
+ <a href={subitem.path} className="sub-option-link">
38
34
  {trueBar && <p>{subitem.title}</p>}
39
- </div>
35
+ </a>
40
36
  </div>
41
37
  ))}
42
38
  </>
43
39
  )}
44
- </>
40
+ </div>
45
41
  ))}
46
42
  </div>
47
43
  </div>
48
- <div className="menu-bottom">
49
- <img
50
- src={trueBar ? closeMenu : openMenu}
51
- alt="Open Menu"
52
- onClick={() => {
53
- {
54
- trueBar ? setTrueBar("") : setTrueBar("actived");
55
- }
56
- }}
57
- ></img>
58
- </div>
59
44
  </Container>
60
45
  );
61
46
  };
@@ -1,43 +1,44 @@
1
1
  import styled from "styled-components";
2
- import { NavLink } from "react-router-dom";
3
- //styled(NavLink)
2
+
4
3
  export const Container = styled.div`
5
- height: 100%;
6
- width: 58px;
4
+ height: 98%;
7
5
  box-sizing: border-box;
8
6
  padding: 23px 10px 70px 10px;
9
7
  flex-direction: column;
10
8
  justify-content: space-between;
11
9
  overflow: auto;
12
- border-radius: 50px;
10
+ width: ${({ bar }) => (bar ? 210 : 58)}px;
11
+ border-radius: ${({ bar }) => (bar ? 20 : 50)}px;
13
12
  background: linear-gradient(180deg, #e33aa9 0%, #3b1366 100%);
14
13
  scrollbar-width: none;
15
14
  display: flex;
16
15
  text-align: center;
17
- &.actived {
18
- width: 200px;
19
- padding: 23px 10px 15px 10px;
20
- border-radius: 20px;
16
+ transition: width 0.3s linear;
17
+ margin: 10px 0 10px 20px;
18
+ & + * {
19
+ margin-left: 30px;
21
20
  }
22
21
  .navbar-top {
23
- .logo {
24
- & + * {
25
- margin-top: ${({ bar }) => (bar === "" ? 145 : 50)}%;
26
- }
27
- }
22
+ transition: all 0.3s linear;
28
23
  .option {
29
24
  display: flex;
30
25
  flex-direction: column;
31
26
  align-items: flex-start;
27
+ margin-top: ${({ bar }) => (bar === "" ? 145 : 50)}%;
32
28
  padding-left: ${({ bar }) => (bar ? 5 : 0)}px;
33
- div {
29
+ .active {
30
+ background: #e33aa9;
31
+ }
32
+ & + div {
33
+ margin-top: 5px;
34
+ }
35
+ a {
34
36
  height: ${({ bar }) => (bar ? 32 : 38)}px;
35
- width: ${({ bar }) => (bar ? 165 : 38)}px;
36
37
  display: flex;
37
38
  justify-content: ${({ bar }) => (bar ? "flex-start" : "center")};
38
39
  border-radius: ${({ bar }) => (bar ? 18 : 100)}px;
39
40
  align-items: center;
40
- font-family: "Raleway";
41
+ font-family: sans-serif;
41
42
  font-style: normal;
42
43
  font-weight: 400;
43
44
  font-size: 18px;
@@ -47,13 +48,17 @@ export const Container = styled.div`
47
48
  text-decoration: none;
48
49
  &.option-link {
49
50
  cursor: pointer;
50
- margin-top: 12px;
51
+ width: ${({ bar }) => (bar ? "160" : "38")}px;
52
+ margin: 5px 0;
51
53
  padding-left: ${({ bar }) => (bar ? 15 : 0)}px;
52
54
  }
53
55
  p {
54
56
  cursor: pointer;
57
+ margin: 0%;
58
+ pointer-events: none;
55
59
  }
56
60
  img {
61
+ width: 22px;
57
62
  & + * {
58
63
  margin-left: 12px;
59
64
  }
@@ -68,7 +73,7 @@ export const Container = styled.div`
68
73
  padding-left: ${({ bar }) => (bar ? 28 : 20)}px;
69
74
  height: auto;
70
75
  width: auto;
71
- div {
76
+ a {
72
77
  display: flex;
73
78
  justify-content: flex-start;
74
79
  text-decoration: none;
@@ -77,7 +82,7 @@ export const Container = styled.div`
77
82
  border-left: 1px solid #f0eef2;
78
83
  border-radius: 0;
79
84
  color: #f0eef2;
80
- padding-top: 20px;
85
+ padding-top: 14px;
81
86
  padding-left: 12px;
82
87
  height: 25px;
83
88
  &::before {
@@ -88,16 +93,17 @@ export const Container = styled.div`
88
93
  height: 10px;
89
94
  background-color: white;
90
95
  position: absolute;
91
- left: ${({ bar }) => (bar ? -4 : -16)}%;
92
- bottom: 1%;
96
+ bottom: 0;
97
+ left: ${({ bar }) => (bar ? -4 : -34)}%;
98
+ }
99
+ &.active {
100
+ background: none;
101
+ &::before {
102
+ background-color: #e33aa9;
103
+ }
93
104
  }
94
105
  }
95
106
  }
96
107
  }
97
108
  }
98
- .menu-bottom {
99
- display: flex;
100
- justify-content: ${({ bar }) => (bar ? "flex-end" : "center")};
101
- cursor: pointer;
102
- }
103
109
  `;