mario-core 2.5.2 → 2.5.6

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.
@@ -1,7 +1,7 @@
1
1
  import 'bootstrap/dist/css/bootstrap.min.css';
2
2
  import React, { useState, useCallback, useEffect, Suspense, useMemo, memo, Fragment, forwardRef, useImperativeHandle, useRef } from 'react';
3
- import { Input, Form, FormGroup, Label, Col, Row, Dropdown, DropdownToggle, DropdownMenu, NavLink, DropdownItem, Button, Alert, Pagination, PaginationItem, PaginationLink, Table, Modal, ModalHeader, ModalBody, ModalFooter, CustomInput, Nav, NavItem, TabContent, TabPane, Card, CardImg, CardBody, CardTitle, CardHeader, CardText } from 'reactstrap';
4
- import { Link, useHistory, useLocation, Switch, Route, Prompt, useParams } from 'react-router-dom';
3
+ import { Input, Row, Col, Form, FormGroup, Label, Dropdown, DropdownToggle, DropdownMenu, NavLink, DropdownItem, Button, Alert, Pagination, PaginationItem, PaginationLink, Table, Modal, ModalHeader, ModalBody, ModalFooter, CustomInput, Nav, NavItem, TabContent, TabPane, Card, CardImg, CardBody, CardTitle, CardHeader, CardText } from 'reactstrap';
4
+ import { useHistory, Link, useLocation, Switch, Route, Prompt, useParams } from 'react-router-dom';
5
5
  import { Formik } from 'formik';
6
6
  import { object, string, boolean, number, array } from 'yup';
7
7
  import { useDispatch, useSelector } from 'react-redux';
@@ -43,7 +43,7 @@ function _catch(body, recover) {
43
43
  return result;
44
44
  }
45
45
 
46
- var styles = {"notification-count":"_2sew7","text-introduction":"_3OgWF","btn-trans-border":"_r9cAh","contact":"_NszFe","learn-more":"_MDjzH","title-quote":"_1Swkw","descriptions-quote":"_gi8vj","descriptions-icon":"_3SOdX","block-login":"_wWIyO","title-login":"_3nuns","title-forgot-password":"_21qb6","btn-close":"_NhW9l","btn-login":"_3IL10","return-to-login":"_Ce3Kg","recover-account":"_2t6d9","forgot-password":"_2oh2a","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-forgot-password":"_2TucC","block-reset-password":"_23Sua","block-forgot-pass":"_3CWP6","page-not-login":"_3Wmco","content-quote":"_13Rk0","home-page":"_o6HKW","login":"_F-hjL","c-main":"_39l0X","container-fluid":"_1BMwK","input-file-label":"_1XNpH","delete-avatar-button":"_1z5h9","header-logo":"_Gewcf","sidebar-logo":"_1hXpy","nav-mobile":"_1qjbW","filter-media-file":"_1I62C","div":"_3cLcM","dropdown-menu":"_1krbH","header-avatar":"_RQaHE","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","hide-in-mobile":"_1INnO","hide-in-tablet":"_2uvkV","hide-in-desktop":"_2LIqK","control-input":"_2Zz97","custom-control":"_3-yp5"};
46
+ var styles = {"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","c-main":"_39l0X","container-fluid":"_1BMwK","input-file-label":"_1XNpH","delete-avatar-button":"_1z5h9","header-logo":"_Gewcf","sidebar-logo":"_1hXpy","nav-mobile":"_1qjbW","filter-media-file":"_1I62C","div":"_3cLcM","dropdown-menu":"_1krbH","header-avatar":"_RQaHE","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","hide-in-mobile":"_1INnO","block-form":"_2e7fZ","hide-in-desktop":"_2LIqK","control-input":"_2Zz97","custom-control":"_3-yp5"};
47
47
 
48
48
  var style = {
49
49
  fontSize: "0.85rem"
@@ -57,14 +57,6 @@ var ErrorHandler = function ErrorHandler(_ref) {
57
57
  }, text);
58
58
  };
59
59
 
60
- var CloseBlock = function CloseBlock(_ref) {
61
- var to = _ref.to;
62
- return React.createElement(Link, {
63
- to: to,
64
- className: "" + styles["btn-close"]
65
- }, "\xD7");
66
- };
67
-
68
60
  var containerStyle = {
69
61
  height: "40px",
70
62
  backgroundColor: "#f7f9fc",
@@ -90,7 +82,7 @@ var PasswordInput = function PasswordInput(_ref) {
90
82
  className: "d-flex align-items-center w-100",
91
83
  style: containerStyle
92
84
  }, React.createElement(Input, {
93
- className: "border border-0 password-input",
85
+ className: "border password-input",
94
86
  style: inputStyle,
95
87
  type: isShowPassword ? "text" : "password",
96
88
  name: "password",
@@ -215,7 +207,7 @@ var CHAT_CHANNEL = "chat-channel";
215
207
  var NOTIFICATION_CHANNEL = "NOTIFICATION_CHANNEL";
216
208
  var NEW_NOTIFICATION = "NEW_NOTIFICATION";
217
209
  var DEFAULT_IMAGE_URL = "https://tleliteracy.com/wp-content/uploads/2017/02/default-avatar.png";
218
- var EMOTIONS = ["Excited", "Happy", "Satisfied", "Bored", "Nervous", "Stressed", "Tired", "Sad", "Mad", "Sick"];
210
+ var EMOTIONS = ["Unwell", "Mad", "Stressed", "Easygoing", "Proud", "Inspired"];
219
211
  var TAB_COLORS = {
220
212
  reflect: "#c08497",
221
213
  goal: "#00979b"
@@ -330,8 +322,8 @@ var defaultInfo = {
330
322
  captcha: "",
331
323
  rememberMe: false
332
324
  };
333
- var HOMEPAGE_TEACHER = "/home";
334
- var HOMEPAGE_STUDENT = "/studenthome";
325
+ var HOMEPAGE_TEACHER = "/my-one-to-one/up-coming";
326
+ var HOMEPAGE_STUDENT = "/my-one-to-one/up-coming";
335
327
  var HOMEPAGE_ADMIN = "/admin/dashboard";
336
328
  var HOMEPAGE_PARENT = "/parent";
337
329
  var HOMEPAGE_DISTRICT = "/admin/schools";
@@ -499,30 +491,32 @@ var BlockLogin = function BlockLogin(_ref) {
499
491
  setFieldValue = formikProps.setFieldValue;
500
492
  var emailError = touched.email && errors.email;
501
493
  var passwordError = touched.password && errors.password;
502
- return React.createElement(Form, {
494
+ return React.createElement(Row, {
495
+ className: "" + styles["box-login"]
496
+ }, React.createElement(Col, {
497
+ className: "p-0"
498
+ }, React.createElement(Form, {
503
499
  className: "" + styles["block-login"],
504
500
  onSubmit: handleSubmit
505
- }, React.createElement(CloseBlock, {
506
- to: "/"
507
- }), React.createElement("p", {
501
+ }, React.createElement("div", {
502
+ className: "" + styles["block-form"]
503
+ }, React.createElement("p", {
508
504
  className: "" + styles["title-login"]
509
- }, "Login"), React.createElement(FormGroup, {
505
+ }, "Sign in"), React.createElement("p", {
506
+ className: "recover-account"
507
+ }, "Lorem ipsum dolor sit amet, consectetur adipiscing elit."), React.createElement(FormGroup, {
510
508
  className: "" + styles["form-user-name"]
511
- }, React.createElement(Label, {
512
- "for": "userName"
513
- }, "user name"), React.createElement(Input, {
509
+ }, React.createElement(Input, {
514
510
  type: "text",
515
511
  name: "email",
516
- placeholder: "User name",
512
+ placeholder: "Email",
517
513
  value: values.email,
518
514
  onChange: handleChange,
519
515
  onBlur: handleBlur("email"),
520
516
  required: true
521
517
  }), emailError && React.createElement(ErrorHandler, {
522
518
  text: errors.email
523
- })), React.createElement(FormGroup, null, React.createElement(Label, {
524
- "for": "password"
525
- }, "Password"), React.createElement(PasswordInput, {
519
+ })), React.createElement(FormGroup, null, React.createElement(PasswordInput, {
526
520
  isShowPassword: isShowPassword,
527
521
  togglePasswordVisible: togglePasswordVisible,
528
522
  onChange: function onChange(e) {
@@ -533,19 +527,24 @@ var BlockLogin = function BlockLogin(_ref) {
533
527
  })), React.createElement(FormGroup, null, React.createElement(GoogleReCaptcha, {
534
528
  action: "login",
535
529
  onVerify: handleVerify
536
- })), React.createElement(Col, null, React.createElement("button", {
530
+ })), React.createElement(Col, {
531
+ className: "p-0 mt-5"
532
+ }, React.createElement("button", {
537
533
  className: "" + styles["btn-login"],
538
534
  type: "submit"
539
- }, "Login")), React.createElement("div", {
540
- className: "d-flex justify-content-center"
535
+ }, "LOGIN")), React.createElement("div", {
536
+ className: "d-flex justify-content-end"
541
537
  }, React.createElement(Link, {
542
538
  to: "/forgot-password",
543
- className: "" + styles["forgot-password"]
544
- }, "Forgot password or username?")), React.createElement("p", {
545
- className: "" + styles["term-and-conditions"]
546
- }, "Check out our ", React.createElement("a", {
547
- href: ""
548
- }, "Terms and Conditions")));
539
+ className: "" + styles["link-to-login"]
540
+ }, "Forgot password ?"))))), React.createElement(Col, {
541
+ lg: 4,
542
+ md: 4,
543
+ className: "" + styles["img-box"]
544
+ }, React.createElement("img", {
545
+ src: "/images/img-login.png",
546
+ className: "" + styles["img-login"]
547
+ })));
549
548
  });
550
549
  };
551
550
 
@@ -735,16 +734,18 @@ var BlockForgetPassword = function BlockForgetPassword() {
735
734
  values = formikProps.values,
736
735
  touched = formikProps.touched,
737
736
  errors = formikProps.errors;
738
- return React.createElement("div", {
739
- className: styles["block-forgot-password"] + " " + styles["block-login"] + " d-flex flex-column align-items-center"
737
+ return React.createElement(Row, {
738
+ className: "" + styles["box-login"]
739
+ }, React.createElement(Col, {
740
+ className: "p-0"
740
741
  }, React.createElement("div", {
741
- className: "w-100"
742
- }, React.createElement(CloseBlock, {
743
- to: "/"
744
- })), React.createElement("p", {
745
- className: styles["title-login"] + " " + styles["title-forgot-password"]
742
+ className: "" + styles["block-login"]
743
+ }, React.createElement("div", {
744
+ className: "" + styles["block-form"]
745
+ }, React.createElement("p", {
746
+ className: styles["title-login"] + " "
746
747
  }, "Forgot password"), React.createElement("p", {
747
- className: "" + styles["recover-account"]
748
+ className: styles["recover-account"] + " mb-5"
748
749
  }, "Enter email to recover your account"), React.createElement("div", {
749
750
  className: "w-100"
750
751
  }, React.createElement(Label, {
@@ -761,28 +762,29 @@ var BlockForgetPassword = function BlockForgetPassword() {
761
762
  })), React.createElement(GoogleReCaptcha, {
762
763
  action: "forgetPass",
763
764
  onVerify: handleVerify
764
- }), React.createElement(Col, null, React.createElement("button", {
765
- className: styles["btn-login"] + " mt-4",
765
+ }), React.createElement(Col, {
766
+ className: "p-0"
767
+ }, React.createElement("button", {
768
+ className: styles["btn-login"] + " mt-5",
766
769
  onClick: function onClick() {
767
770
  return handleSubmit();
768
771
  }
769
772
  }, "Continue")), React.createElement("p", {
770
- className: styles[""] + " w-100 d-flex justify-content-center align-items-end flex-grow-1"
773
+ className: "d-flex justify-content-end"
771
774
  }, React.createElement(Link, {
772
775
  to: "/login",
773
- className: styles[""] + " " + styles["return-to-login"]
774
- }, "Return to login")));
776
+ className: "" + styles["link-to-login"]
777
+ }, "Return to login"))))), React.createElement(Col, {
778
+ lg: 4,
779
+ md: 4,
780
+ className: "" + styles["img-box"]
781
+ }, React.createElement("img", {
782
+ src: "/images/img-login.png",
783
+ className: "" + styles["img-login"]
784
+ })));
775
785
  });
776
786
  };
777
787
 
778
- var CloseButton = function CloseButton(_ref) {
779
- var toggle = _ref.toggle;
780
- return React.createElement("a", {
781
- onClick: toggle,
782
- className: "" + styles["btn-close"]
783
- }, "\xD7");
784
- };
785
-
786
788
  var initialValues$1 = {
787
789
  token: "",
788
790
  password: "",
@@ -808,12 +810,6 @@ var BlockResetPassword = function BlockResetPassword() {
808
810
  isShowReTypePassword = _useForgotPassword.isShowReTypePassword,
809
811
  setIsShowReTypePassword = _useForgotPassword.setIsShowReTypePassword;
810
812
 
811
- var history = useHistory();
812
-
813
- var close = function close() {
814
- history.push("/login");
815
- };
816
-
817
813
  useEffect(function () {
818
814
  checkResetTokenRequest(token);
819
815
  }, []);
@@ -832,15 +828,15 @@ var BlockResetPassword = function BlockResetPassword() {
832
828
  useEffect(function () {
833
829
  setFieldValue("token", token);
834
830
  }, []);
835
- return React.createElement("div", {
836
- className: styles["block-login"] + " " + styles["block-reset-password"] + " d-flex flex-column align-items-center"
831
+ return React.createElement(Row, {
832
+ className: "" + styles["box-login"]
833
+ }, React.createElement(Col, {
834
+ className: "p-0"
837
835
  }, React.createElement("div", {
838
- className: "w-100"
839
- }, React.createElement(CloseButton, {
840
- toggle: function toggle() {
841
- return close();
842
- }
843
- })), React.createElement("p", {
836
+ className: "" + styles["block-login"]
837
+ }, React.createElement("div", {
838
+ className: "" + styles["block-form"]
839
+ }, React.createElement("p", {
844
840
  className: "" + styles["title-login"]
845
841
  }, "Reset Password"), React.createElement("div", {
846
842
  className: "w-100"
@@ -869,20 +865,29 @@ var BlockResetPassword = function BlockResetPassword() {
869
865
  }), touched.reEnterPassword && errors.reEnterPassword && React.createElement(ErrorHandler, {
870
866
  text: errors.reEnterPassword
871
867
  })) : React.createElement(React.Fragment, null, React.createElement("p", {
872
- className: "w-100 text-center"
868
+ className: styles["recover-account"] + " mb-5"
873
869
  }, "Invalid reset password link"), React.createElement("p", {
874
870
  className: "w-100"
875
- }, "It may have been accessed before or expired or you have just tried to reset another account's password"))), validLink && React.createElement(Col, null, React.createElement("button", {
871
+ }, "It may have been accessed before or expired or you have just tried to reset another account's password"))), validLink && React.createElement(Col, {
872
+ className: "p-0"
873
+ }, React.createElement("button", {
876
874
  className: styles["btn-login"] + " mt-4",
877
875
  onClick: function onClick() {
878
876
  return handleSubmit();
879
877
  }
880
878
  }, "Confirm")), React.createElement("p", {
881
- className: "w-100 d-flex justify-content-center align-items-end flex-grow-1"
879
+ className: "d-flex justify-content-end"
882
880
  }, React.createElement(Link, {
883
881
  to: "/login",
884
- className: "" + styles["return-to-login"]
885
- }, "Return to login")));
882
+ className: "" + styles["link-to-login"]
883
+ }, "Return to login"))))), React.createElement(Col, {
884
+ lg: 4,
885
+ md: 4,
886
+ className: "" + styles["img-box"]
887
+ }, React.createElement("img", {
888
+ src: "/images/img-login.png",
889
+ className: "" + styles["img-login"]
890
+ })));
886
891
  });
887
892
  };
888
893
 
@@ -965,8 +970,8 @@ function _createForOfIteratorHelperLoose(o, allowArrayLike) {
965
970
  return it.next.bind(it);
966
971
  }
967
972
 
968
- var HOMEPAGE_TEACHER$1 = "/home";
969
- var HOMEPAGE_STUDENT$1 = "/studenthome";
973
+ var HOMEPAGE_TEACHER$1 = "/my-one-to-one/up-coming";
974
+ var HOMEPAGE_STUDENT$1 = "/my-one-to-one/up-coming";
970
975
  var HOMEPAGE_ADMIN$1 = "/admin/dashboard";
971
976
  var HOMEPAGE_PARENT$1 = "/parent";
972
977
  var HOMEPAGE_DISTRICT$1 = "/admin/schools";
@@ -1056,12 +1061,6 @@ var BlockTwoFactorLogin = function BlockTwoFactorLogin() {
1056
1061
  var _useLoginTwoFactor = useLoginTwoFactor(),
1057
1062
  userLoginTwoFactor = _useLoginTwoFactor.userLoginTwoFactor;
1058
1063
 
1059
- var history = useHistory();
1060
-
1061
- var close = function close() {
1062
- history.push("/login");
1063
- };
1064
-
1065
1064
  return React.createElement(Formik, {
1066
1065
  initialValues: _extends({}, initialValues$2, {
1067
1066
  id: id
@@ -1078,21 +1077,19 @@ var BlockTwoFactorLogin = function BlockTwoFactorLogin() {
1078
1077
  handleSubmit = formikProps.handleSubmit,
1079
1078
  touched = formikProps.touched,
1080
1079
  errors = formikProps.errors;
1081
- return React.createElement("div", {
1082
- className: styles["block-login"] + " " + styles["block-reset-password"] + " d-flex flex-column align-items-center"
1080
+ return React.createElement(Row, {
1081
+ className: "" + styles["box-login"]
1082
+ }, React.createElement(Col, {
1083
+ className: "p-0"
1083
1084
  }, React.createElement("div", {
1084
- className: "w-100"
1085
- }, React.createElement(CloseButton, {
1086
- toggle: function toggle() {
1087
- return close();
1088
- }
1089
- })), React.createElement("p", {
1085
+ className: "" + styles["block-login"]
1086
+ }, React.createElement("div", {
1087
+ className: "" + styles["block-form"]
1088
+ }, React.createElement("p", {
1090
1089
  className: "" + styles["title-login"]
1091
1090
  }, "Additional Verification"), React.createElement("p", {
1092
- className: "text-small text-secondary"
1093
- }, React.createElement("i", null, "Check your email to get Additional Verification. This code will be expired in 5 minutes")), React.createElement("div", {
1094
- className: "w-100"
1095
- }, React.createElement(FormGroup, null, React.createElement(Label, null, "Additional Verification"), React.createElement(Input, {
1091
+ className: "recover-account"
1092
+ }, "Check your email to get Additional Verification. This code will be expired in 5 minutes"), React.createElement("div", null, React.createElement(FormGroup, null, React.createElement(Label, null, "Additional Verification"), React.createElement(Input, {
1096
1093
  name: "twoFactorCode",
1097
1094
  value: values.twoFactorCode,
1098
1095
  onChange: handleChange
@@ -1108,17 +1105,26 @@ var BlockTwoFactorLogin = function BlockTwoFactorLogin() {
1108
1105
  }), React.createElement(Label, {
1109
1106
  "for": "rememberMe",
1110
1107
  className: "" + styles["remember"]
1111
- }, "Remember my browser & IP"))), React.createElement(Col, null, React.createElement("button", {
1112
- className: styles["btn-login"] + " mt-4",
1108
+ }, "Remember my browser & IP"))), React.createElement(Col, {
1109
+ className: "p-0 mt-5"
1110
+ }, React.createElement("button", {
1111
+ className: styles["btn-login"] + " ",
1113
1112
  onClick: function onClick() {
1114
1113
  return handleSubmit();
1115
1114
  }
1116
1115
  }, "Confirm")), React.createElement("p", {
1117
- className: "w-100 d-flex justify-content-center align-items-end flex-grow-1"
1116
+ className: "d-flex justify-content-end"
1118
1117
  }, React.createElement(Link, {
1119
1118
  to: "/login",
1120
- className: "" + styles["return-to-login"]
1121
- }, "Return to login")));
1119
+ className: "" + styles["link-to-login"]
1120
+ }, "Return to login"))))), React.createElement(Col, {
1121
+ lg: 4,
1122
+ md: 4,
1123
+ className: "" + styles["img-box"]
1124
+ }, React.createElement("img", {
1125
+ src: "/images/img-login.png",
1126
+ className: "" + styles["img-login"]
1127
+ })));
1122
1128
  });
1123
1129
  };
1124
1130
 
@@ -1146,10 +1152,10 @@ var Login = function Login(props) {
1146
1152
  }, React.createElement(Row, {
1147
1153
  className: "h-100"
1148
1154
  }, React.createElement(Col, {
1149
- lg: 6,
1155
+ lg: 12,
1150
1156
  md: 12,
1151
1157
  xs: 12,
1152
- className: "offset-lg-6 d-flex justify-content-center h-100 align-items-center"
1158
+ className: "d-flex justify-content-center h-100 align-items-center"
1153
1159
  }, React.createElement(GoogleReCaptchaProvider, {
1154
1160
  useRecaptchaNet: true,
1155
1161
  reCaptchaKey: GOOGLE_RECAPTCHA_KEY,
@@ -1248,7 +1254,7 @@ var Dashboard = function Dashboard() {
1248
1254
  !!user ? document.title = DASHBOARD_TITLE : document.title = ROOT_TITLE;
1249
1255
  }, [user]);
1250
1256
  return React.createElement("div", {
1251
- className: "" + styles["login"]
1257
+ className: styles["login"] + " " + styles["red-background"]
1252
1258
  }, React.createElement(Row, null, React.createElement(Col, {
1253
1259
  className: styles["nav-home"] + " d-flex w-100"
1254
1260
  }, React.createElement("a", {