mario-core 3.0.2-admin → 3.0.4-admin

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.
@@ -3,7 +3,7 @@ import i18n from 'i18next';
3
3
  import { initReactI18next, useTranslation } from 'react-i18next';
4
4
  export { I18nextProvider, useTranslation } from 'react-i18next';
5
5
  import React, { useState, useCallback, useEffect, forwardRef, useRef, Suspense, useMemo, memo, Fragment, useImperativeHandle } from 'react';
6
- import { Input, Modal, ModalHeader, ModalBody, ModalFooter, Button, Row, Col, Form, FormGroup, Label, Dropdown, DropdownToggle, DropdownMenu, NavLink, DropdownItem, Alert, Pagination, PaginationItem, PaginationLink, Table, CustomInput, Nav, NavItem, TabContent, TabPane, Card, CardImg, CardBody, CardTitle, CardHeader, CardText } from 'reactstrap';
6
+ import { Input, Modal, ModalHeader, ModalBody, ModalFooter, Button, Row, Col, Form, FormGroup, Label, Navbar, NavbarBrand, Collapse, Nav, NavItem, NavLink, Dropdown, DropdownToggle, DropdownMenu, DropdownItem, Alert, Pagination, PaginationItem, PaginationLink, Table, CustomInput, TabContent, TabPane, Card, CardImg, CardBody, CardTitle, CardHeader, CardText } from 'reactstrap';
7
7
  import { useHistory, Link, useLocation, Switch, Route, Prompt, useParams } from 'react-router-dom';
8
8
  import { Formik } from 'formik';
9
9
  import { object, string, boolean, number, array } from 'yup';
@@ -14,6 +14,7 @@ import amplitude from 'amplitude-js';
14
14
  import { useGoogleReCaptcha, GoogleReCaptcha, GoogleReCaptchaProvider } from 'react-google-recaptcha-v3';
15
15
  import GoogleLogin from 'react-google-login';
16
16
  import Select from 'react-select';
17
+ import { GiHamburgerMenu } from 'react-icons/gi';
17
18
  import { CSidebar, CSidebarBrand, CSidebarNav, CCreateElement, CSidebarNavDivider, CSidebarNavDropdown, CSidebarNavItem, CSidebarNavTitle, CSidebarFooter, CHeader, CHeaderBrand, CHeaderNav, CContainer } from '@coreui/react';
18
19
  import { CgMenuRight } from 'react-icons/cg';
19
20
  import { RiLogoutBoxRLine } from 'react-icons/ri';
@@ -1994,7 +1995,7 @@ function _catch(body, recover) {
1994
1995
  return result;
1995
1996
  }
1996
1997
 
1997
- var styles = {"btn-login-google":"_2HqmH","notification-count":"_2sew7","text-introduction":"_3OgWF","btn-trans-border":"_r9cAh","contact":"_NszFe","learn-more":"_MDjzH","title-quote":"_1Swkw","descriptions-quote":"_gi8vj","descriptions-icon":"_3SOdX","box-login":"_38Lo1","block-verification":"_1OzGy","block-login":"_wWIyO","title-login":"_3nuns","title-forgot-password":"_21qb6","btn-close":"_NhW9l","btn-login":"_3IL10","return-to-login":"_Ce3Kg","recover-account":"_2t6d9","link-to-login":"_3bDsd","remember":"_11FZt","term-and-conditions":"_3LXoI","descriptions-forgot-pass":"_PMcjT","content-icon":"_2rZY6","title-icon":"_y9lM2","nav-home":"_1TT1q","box-introduction":"_32V6L","icon":"_20YJX","form-user-name":"_39BJD","checkbox-remember":"_2K9b2","block-reset-password":"_23Sua","block-forgot-pass":"_3CWP6","page-not-login":"_3Wmco","content-quote":"_13Rk0","home-page":"_o6HKW","red-background":"_jOY7o","login":"_F-hjL","img-box":"_2v-L_","img-login":"_3ncTL","img-login-rectangle":"_2kOvJ","c-main":"_39l0X","container-fluid":"_1BMwK","input-file-label":"_1XNpH","delete-avatar-button":"_1z5h9","header-logo":"_Gewcf","box-sidebar":"_2vcmv","sidebar-logo":"_1hXpy","sidebar-nav-links":"_3vb3s","c-active":"_36jSM","sidebar-nav-links-hover":"_DNrus","box-sidebar-header":"_3NEZj","box-logout":"_1wUDG","sidebar-btn-minimized":"_1S7Px","sidebar-logout":"_2P85D","nav-mobile":"_1qjbW","filter-media-file":"_1I62C","div":"_3cLcM","dropdown-menu":"_1krbH","header-avatar":"_RQaHE","dropdown-menu-flag":"_XK8oS","dropdown-content":"_3ys4W","dropdown-change":"_ToOW_","item-address":"_3sQlR","item-logout":"_3bqSM","title-address":"_1jgSI","img-avatar":"_35Ttz","item-contact":"_1wc7o","logout":"_1_9tV","content-text":"_3S4f2","dropdown-content-language":"_3ajui","dropdown-item-language":"_3Y_y4","dropdown-item-language-active":"_CzNMi","hide-in-mobile":"_1INnO","hide-in-desktop":"_2LIqK","control-input":"_2Zz97","custom-control":"_3-yp5"};
1998
+ var styles = {"btn-login-google":"_2HqmH","notification-count":"_2sew7","text-introduction":"_3OgWF","btn-trans-border":"_r9cAh","contact":"_NszFe","learn-more":"_MDjzH","title-quote":"_1Swkw","descriptions-quote":"_gi8vj","box-login":"_38Lo1","block-verification":"_1OzGy","block-login":"_wWIyO","title-login":"_3nuns","title-forgot-password":"_21qb6","btn-close":"_NhW9l","btn-login":"_3IL10","digital-privacy-icon":"_141p1","return-to-login":"_Ce3Kg","recover-account":"_2t6d9","link-to-login":"_3bDsd","remember":"_11FZt","term-and-conditions":"_3LXoI","descriptions-forgot-pass":"_PMcjT","content-icon":"_2rZY6","descriptions-icon":"_3SOdX","title-icon":"_y9lM2","nav-home":"_1TT1q","box-introduction":"_32V6L","icon":"_20YJX","form-user-name":"_39BJD","checkbox-remember":"_2K9b2","block-reset-password":"_23Sua","block-forgot-pass":"_3CWP6","page-not-login":"_3Wmco","content-quote":"_13Rk0","home-page":"_o6HKW","red-background":"_jOY7o","imageAnimation":"_wnn2_","login":"_F-hjL","login-content":"_149oA","logo-home":"_24U3W","img-box":"_2v-L_","img-login":"_3ncTL","img-login-rectangle":"_2kOvJ","c-main":"_39l0X","container-fluid":"_1BMwK","input-file-label":"_1XNpH","delete-avatar-button":"_1z5h9","header-logo":"_Gewcf","box-sidebar":"_2vcmv","sidebar-logo":"_1hXpy","sidebar-nav-links":"_3vb3s","c-active":"_36jSM","sidebar-nav-links-hover":"_DNrus","box-sidebar-header":"_3NEZj","box-logout":"_1wUDG","sidebar-btn-minimized":"_1S7Px","sidebar-logout":"_2P85D","nav-mobile":"_1qjbW","filter-media-file":"_1I62C","div":"_3cLcM","dropdown-menu":"_1krbH","header-avatar":"_RQaHE","dropdown-menu-flag":"_XK8oS","dropdown-content":"_3ys4W","dropdown-change":"_ToOW_","item-address":"_3sQlR","item-logout":"_3bqSM","title-address":"_1jgSI","img-avatar":"_35Ttz","item-contact":"_1wc7o","logout":"_1_9tV","content-text":"_3S4f2","dropdown-content-language":"_3ajui","dropdown-item-language":"_3Y_y4","dropdown-item-language-active":"_CzNMi","hide-in-mobile":"_1INnO","hamburger-menu":"_2yRc8","box-content-home-page":"_ABUIP","collapse-box":"_WX97m","hide-in-desktop":"_2LIqK","control-input":"_2Zz97","custom-control":"_3-yp5"};
1998
1999
 
1999
2000
  var style = {
2000
2001
  fontSize: "0.85rem"
@@ -3376,55 +3377,45 @@ var Login = function Login(props) {
3376
3377
  }), isForgotPassword && React.createElement(BlockForgetPassword, null)), isResetPassword && React.createElement(BlockResetPassword, null))));
3377
3378
  };
3378
3379
 
3379
- var QuoteContent = function QuoteContent(_ref) {
3380
- var descriptions = _ref.descriptions;
3380
+ var QuoteContent = function QuoteContent() {
3381
3381
  return React.createElement("div", {
3382
3382
  className: "" + styles["content-quote"]
3383
- }, React.createElement(Row, null, React.createElement(Col, {
3384
- md: 5,
3385
- className: "" + styles["title-quote"]
3386
- }, React.createElement("p", null, "Powerful"), React.createElement("p", null, "Personalized"), React.createElement("p", null, "Learning")), React.createElement(Col, {
3387
- md: 7,
3388
- className: styles["descriptions-quote"] + " d-flex align-items-center"
3389
- }, React.createElement("p", null, descriptions))));
3383
+ }, React.createElement("div", {
3384
+ className: styles["title-quote"] + " d-block"
3385
+ }, React.createElement("p", null, "Powerful"), React.createElement("p", null, "Personalized"), React.createElement("p", null, "Learning")), React.createElement("div", {
3386
+ className: styles["descriptions-quote"] + " d-block"
3387
+ }, React.createElement("p", null, "Focus on what matters most to you and"), React.createElement("p", null, "and make learning meaningful.")));
3390
3388
  };
3391
3389
 
3392
3390
  var IconContent = function IconContent(_ref) {
3393
3391
  var srcIcon = _ref.srcIcon,
3394
3392
  content = _ref.content;
3395
- return React.createElement(Row, {
3393
+ return React.createElement("div", {
3394
+ key: content,
3396
3395
  className: "" + styles["content-icon"]
3397
- }, React.createElement(Col, {
3398
- md: 4,
3396
+ }, React.createElement("div", {
3399
3397
  className: "" + styles["title-icon"]
3400
3398
  }, React.createElement("img", {
3401
3399
  src: srcIcon,
3402
3400
  alt: "icon"
3403
- })), React.createElement(Col, {
3404
- md: 8,
3405
- className: styles["descriptions-icon"] + " d-flex align-items-center"
3406
- }, React.createElement("p", null, content)));
3401
+ })), React.createElement("div", {
3402
+ className: "" + styles["descriptions-icon"],
3403
+ dangerouslySetInnerHTML: {
3404
+ __html: content
3405
+ }
3406
+ }));
3407
3407
  };
3408
3408
 
3409
- var data = {
3410
- quote: {
3411
- title: "Powerful Personalized Learning",
3412
- description: "Focus on what matters most to you and make learning meaningful."
3413
- },
3414
- contents: [{
3415
- scrIcon: "/images/177_2_Finance.svg",
3416
- content: "Understand yourself better through helpful feedback."
3417
- }, {
3418
- scrIcon: "/images/177_9_Brain.svg",
3419
- content: "Create, explore, and share exciting personalized learning journeys."
3420
- }, {
3421
- scrIcon: "/images/177_6_Goal.svg",
3422
- content: "Set, monitor, and achieve your goals."
3423
- }, {
3424
- scrIcon: "/images/177_8_Space.svg",
3425
- content: "Empower parents to become part of the learning process."
3426
- }]
3427
- };
3409
+ var contents = [{
3410
+ scrIcon: "/images/ChatsTeardrop.svg",
3411
+ content: "<p>Understand yourself better through <span>helpful feedback</span>.</p>"
3412
+ }, {
3413
+ scrIcon: "/images/Student.svg",
3414
+ content: "<p>Create, explore, and share exciting <span>personalized</span> learning journeys.</p>"
3415
+ }, {
3416
+ scrIcon: "/images/Confetti.svg",
3417
+ content: "<p>Set, monitor, and achieve <span>your goals</span>.</p>"
3418
+ }];
3428
3419
 
3429
3420
  var ContentHomePage = function ContentHomePage(_ref) {
3430
3421
  _objectDestructuringEmpty(_ref);
@@ -3433,26 +3424,15 @@ var ContentHomePage = function ContentHomePage(_ref) {
3433
3424
  className: "" + styles["page-not-login"]
3434
3425
  }, React.createElement(Col, {
3435
3426
  md: 12
3436
- }, React.createElement(QuoteContent, {
3437
- descriptions: data.quote.description
3438
- })), data.contents.map(function (content, index) {
3439
- return React.createElement(Col, {
3440
- md: 6,
3441
- key: index
3442
- }, React.createElement(IconContent, {
3427
+ }, React.createElement(QuoteContent, null)), React.createElement(Col, {
3428
+ md: 12,
3429
+ className: styles["box-content-home-page"] + " d-flex align-items-center"
3430
+ }, contents.map(function (content) {
3431
+ return React.createElement(IconContent, {
3443
3432
  srcIcon: content.scrIcon,
3444
3433
  content: content.content
3445
- }));
3446
- }), React.createElement(Col, {
3447
- md: 12,
3448
- className: styles["student-image"] + " d-flex justify-content-end mt-5"
3449
- }, React.createElement("a", {
3450
- href: "https://cert.privo.com/#/companies/marioFrameworkLlc",
3451
- target: "blank"
3452
- }, React.createElement(IconContent, {
3453
- srcIcon: "/images/STUDENT.png",
3454
- content: ""
3455
- }))));
3434
+ });
3435
+ })));
3456
3436
  };
3457
3437
 
3458
3438
  var HOME_ADMIN = "/admin/user";
@@ -3462,39 +3442,74 @@ var DASHBOARD_TITLE = "Dashboard";
3462
3442
  var ROOT_TITLE = "Mario Framework";
3463
3443
 
3464
3444
  var Dashboard = function Dashboard() {
3445
+ var _useState = useState(false),
3446
+ isOpen = _useState[0],
3447
+ setIsOpen = _useState[1];
3448
+
3465
3449
  var user = useSelector(function (state) {
3466
3450
  return state.common.user;
3467
3451
  });
3452
+
3453
+ var toggle = function toggle() {
3454
+ return setIsOpen(!isOpen);
3455
+ };
3456
+
3468
3457
  useEffect(function () {
3469
3458
  !!user ? document.title = DASHBOARD_TITLE : document.title = ROOT_TITLE;
3470
3459
  }, [user]);
3471
3460
  return React.createElement("div", {
3472
3461
  className: styles["login"] + " " + styles["red-background"]
3473
- }, React.createElement(Row, null, React.createElement(Col, {
3474
- className: styles["nav-home"] + " d-flex w-100"
3475
- }, React.createElement("a", {
3476
- className: styles["learn-more"] + " align-self-lg-center",
3477
- href: "/privacy-policy",
3462
+ }, React.createElement("div", {
3463
+ className: "" + styles["login-content"]
3464
+ }, React.createElement(Navbar, {
3465
+ light: true,
3466
+ expand: "md"
3467
+ }, React.createElement(NavbarBrand, {
3468
+ href: "/",
3469
+ className: "" + styles["logo-home"]
3470
+ }, React.createElement("img", {
3471
+ src: "/images/logo-v2.svg",
3472
+ alt: "mario"
3473
+ })), React.createElement(GiHamburgerMenu, {
3474
+ onClick: toggle,
3475
+ className: styles["hide-in-desktop"] + " " + styles["hamburger-menu"]
3476
+ }), React.createElement(Collapse, {
3477
+ isOpen: isOpen,
3478
+ navbar: true,
3479
+ className: "" + styles["collapse-box"]
3480
+ }, React.createElement(Nav, {
3481
+ className: styles["nav-home"] + " d-md-flex w-100 justify-content-center mr-auto",
3482
+ navbar: true
3483
+ }, React.createElement(NavItem, null, React.createElement(NavLink, {
3484
+ className: styles["learn-more"] + " align-self-md-center",
3485
+ href: "https://marioframework.com/software",
3478
3486
  target: "blank"
3479
- }, "Privacy Policy"), React.createElement(Link, {
3480
- className: styles["contact"] + " align-self-lg-center",
3487
+ }, "Learn More")), React.createElement(NavItem, null, React.createElement(Link, {
3488
+ className: styles["contact"] + " align-self-md-center",
3481
3489
  to: "/contact"
3482
- }, "Contact"), React.createElement("a", {
3483
- className: styles["learn-more"] + " align-self-lg-center",
3484
- href: "https://marioframework.com/software",
3490
+ }, "Contact")), React.createElement(NavItem, null, React.createElement(NavLink, {
3491
+ className: styles["learn-more"] + " align-self-md-center",
3492
+ href: "/privacy-policy",
3485
3493
  target: "blank"
3486
- }, "Learn More"), user ? React.createElement(Link, {
3494
+ }, "Privacy Policy"))), React.createElement("div", {
3495
+ className: styles["hide-in-mobile"] + " d-flex justify-content-end"
3496
+ }, user ? React.createElement(Link, {
3487
3497
  to: user.roles.includes("Admin") ? HOME_ADMIN : user.roles.includes("Teacher") ? HOME_TEACHER : HOME_STUDENT,
3488
3498
  className: "" + styles["btn-trans-border"]
3489
3499
  }, "Dashboard") : React.createElement(Link, {
3490
3500
  to: "/login",
3491
3501
  className: "" + styles["btn-trans-border"]
3492
- }, "Login"))), React.createElement(Row, {
3493
- className: styles["hide-in-mobile"] + " " + styles["hide-in-tablet"]
3494
- }, React.createElement(Col, {
3495
- md: 6,
3496
- className: "offset-6 d-flex justify-content-center"
3497
- }, React.createElement(ContentHomePage, null))));
3502
+ }, "Login")))), React.createElement("div", {
3503
+ className: ""
3504
+ }, React.createElement(ContentHomePage, null)), React.createElement("div", {
3505
+ className: "" + styles["digital-privacy-icon"]
3506
+ }, React.createElement("a", {
3507
+ href: "https://cert.privo.com/#/companies/marioFrameworkLlc",
3508
+ target: "blank"
3509
+ }, React.createElement("img", {
3510
+ src: "/images/STUDENT.png",
3511
+ alt: "icon"
3512
+ })))));
3498
3513
  };
3499
3514
 
3500
3515
  var Images = {