mario-core 2.9.158-survey → 2.9.159-level

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 (28) hide show
  1. package/dist/components/Buttons/SyncButton.d.ts +8 -0
  2. package/dist/components/Buttons/SyncButtonIcon.d.ts +7 -0
  3. package/dist/containers/User/components/FilterPopover.d.ts +20 -0
  4. package/dist/containers/User/components/HeaderCell.d.ts +17 -0
  5. package/dist/containers/User/components/TableHeader.d.ts +10 -0
  6. package/dist/containers/User/constants/constants.d.ts +19 -0
  7. package/dist/containers/User/constants/types.d.ts +71 -0
  8. package/dist/containers/User/hooks/useClickOutside.d.ts +2 -0
  9. package/dist/containers/User/hooks/useExportUsersCsv.d.ts +5 -0
  10. package/dist/containers/User/hooks/useFilterPopover.d.ts +35 -0
  11. package/dist/containers/User/hooks/useStudentSelector.d.ts +8 -0
  12. package/dist/containers/User/hooks/useTableHeader.d.ts +15 -0
  13. package/dist/containers/User/hooks/useUserDetail.d.ts +1 -0
  14. package/dist/containers/User/hooks/useUserList.d.ts +5 -2
  15. package/dist/containers/User/hooks/userFilters.d.ts +8 -0
  16. package/dist/containers/User/views/RosterStudentSelector.d.ts +7 -0
  17. package/dist/index.css +51 -1
  18. package/dist/index.js +3053 -1530
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.modern.js +3058 -1535
  21. package/dist/index.modern.js.map +1 -1
  22. package/dist/layouts/TheLayoutAdmin.d.ts +4 -0
  23. package/dist/services/userService.d.ts +10 -1
  24. package/dist/types/Filter.d.ts +6 -0
  25. package/package.json +101 -101
  26. package/dist/containers/Login/constant/type.d.ts +0 -5
  27. package/dist/containers/Login/views/ModelSelectRole.d.ts +0 -4
  28. package/dist/utils/amplitude.d.ts +0 -1
@@ -0,0 +1,8 @@
1
+ import React, { FC } from "react";
2
+ interface Props {
3
+ onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
4
+ className?: string;
5
+ text: string;
6
+ }
7
+ declare const SyncButtonIcon: FC<Props>;
8
+ export default SyncButtonIcon;
@@ -0,0 +1,7 @@
1
+ import React, { FC } from "react";
2
+ interface Props {
3
+ onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
4
+ className?: string;
5
+ }
6
+ declare const SyncButtonIcon: FC<Props>;
7
+ export default SyncButtonIcon;
@@ -0,0 +1,20 @@
1
+ import { FC } from "react";
2
+ import { PopoverProps } from "reactstrap";
3
+ import { FilterOption, SearchBy, UserFilter, UserOrder } from "../constants/types";
4
+ interface Props extends PopoverProps {
5
+ filters?: UserFilter;
6
+ sortBy: UserOrder;
7
+ searchBy?: SearchBy;
8
+ searchString?: string;
9
+ users: any[];
10
+ defaultOptions?: FilterOption[];
11
+ selectedOptions?: string[];
12
+ onOptionsChange?: (value?: string[], searchBy?: SearchBy) => void;
13
+ onSearch?: (search: string, searchBy: SearchBy) => void;
14
+ onClose?: () => void;
15
+ onFilter?: () => void;
16
+ onChangeFilters?: (filter: UserFilter) => void;
17
+ getOption?: (user: any, t?: any) => FilterOption;
18
+ }
19
+ declare const FilterPopover: FC<Props>;
20
+ export default FilterPopover;
@@ -0,0 +1,17 @@
1
+ import { FC } from "react";
2
+ import { SearchBy, UserColumn, UserFilter } from "../constants/types";
3
+ interface Props {
4
+ data: UserColumn;
5
+ popoverId?: string;
6
+ filters?: UserFilter;
7
+ searchString?: string;
8
+ users: any[];
9
+ selectedOptions?: string[];
10
+ onOptionsChange?: (value?: string[], searchBy?: SearchBy) => void;
11
+ onSearch?: (search: string, searchBy: SearchBy) => void;
12
+ onOpenFilter?: (id: string) => void;
13
+ onClose?: () => void;
14
+ onChangeFilters?: (filter: UserFilter) => void;
15
+ }
16
+ declare const HeaderCell: FC<Props>;
17
+ export default HeaderCell;
@@ -0,0 +1,10 @@
1
+ import { FC } from "react";
2
+ import { UserColumn, UserFilter } from "../constants/types";
3
+ interface Props {
4
+ headers: UserColumn[];
5
+ filters: UserFilter;
6
+ fullName?: string;
7
+ onChangeFilters?: (filter: UserFilter) => void;
8
+ }
9
+ declare const TableHeader: FC<Props>;
10
+ export default TableHeader;
@@ -0,0 +1,19 @@
1
+ import { UserColumn, UserFilter, UserOrder } from "./types";
2
+ export declare const userOrders: {
3
+ 0: string;
4
+ 1: string;
5
+ 2: string;
6
+ 3: string;
7
+ 4: string;
8
+ 5: string;
9
+ 6: string;
10
+ 7: string;
11
+ };
12
+ export declare const UserColumns: UserColumn[];
13
+ export declare const DEFAULT_PAGE_SIZE: {
14
+ label: string;
15
+ value: number;
16
+ };
17
+ export declare const DEFAULT_FILTER: UserFilter;
18
+ export declare const DEFAULT_FILTER_POPOVER: UserFilter;
19
+ export declare const CSV_PREFIX = "data:text/csv;charset=utf-8,";
@@ -0,0 +1,71 @@
1
+ export declare type User = {
2
+ id: string;
3
+ firstName: string;
4
+ lastName: string;
5
+ firstInitial: string;
6
+ email: string;
7
+ phoneNumber: string;
8
+ roles: string[];
9
+ dateOfBirth: string;
10
+ createTime: string;
11
+ isActive: boolean;
12
+ profileImageFileName: string;
13
+ fullName: string;
14
+ sourcedId: string;
15
+ rosterUser: RosterStudent;
16
+ };
17
+ export declare type RosterStudent = {
18
+ sourcedId: string;
19
+ username: string;
20
+ status: string;
21
+ givenName: string;
22
+ middleName: string;
23
+ familyName: string;
24
+ email: string;
25
+ grades: string;
26
+ role: string;
27
+ };
28
+ export declare type Option = {
29
+ label: string;
30
+ value: string;
31
+ };
32
+ export declare type UserFilter = {
33
+ currentPage?: number;
34
+ pageSize?: number;
35
+ searchString?: string;
36
+ isDescending?: boolean;
37
+ sortBy?: UserOrder;
38
+ searchBy?: SearchBy;
39
+ searchStringBy?: string;
40
+ searchByStrings?: string[];
41
+ };
42
+ export declare type UserColumn = {
43
+ name: string;
44
+ sortBy?: UserOrder;
45
+ className?: string;
46
+ searchBy?: SearchBy;
47
+ getOption?: (user: any, t?: any) => FilterOption;
48
+ options?: FilterOption[];
49
+ };
50
+ export declare type FilterOption = {
51
+ label: string;
52
+ value: string;
53
+ };
54
+ export declare enum UserOrder {
55
+ Id = 0,
56
+ Name = 1,
57
+ Email = 2,
58
+ Age = 3,
59
+ Role = 4,
60
+ Status = 5,
61
+ CreatedAt = 6,
62
+ RosterUser = 7
63
+ }
64
+ export declare enum SearchBy {
65
+ Id = 0,
66
+ Name = 1,
67
+ Email = 2,
68
+ Role = 3,
69
+ RosterUser = 4,
70
+ Status = 5
71
+ }
@@ -0,0 +1,2 @@
1
+ declare const useClickOutside: (wrapperRef: any, onClickOutside?: (() => void) | undefined) => void;
2
+ export default useClickOutside;
@@ -0,0 +1,5 @@
1
+ import { UserFilter } from "../constants/types";
2
+ declare const useExportUsersCsv: () => {
3
+ exportUsers: (filters: UserFilter) => Promise<void>;
4
+ };
5
+ export default useExportUsersCsv;
@@ -0,0 +1,35 @@
1
+ /// <reference types="react" />
2
+ import { FilterOption, SearchBy, UserFilter, UserOrder } from "../constants/types";
3
+ import { PopoverProps } from "reactstrap";
4
+ interface Props extends PopoverProps {
5
+ filters?: UserFilter;
6
+ sortBy: UserOrder;
7
+ searchString?: string;
8
+ searchBy?: SearchBy;
9
+ users: any[];
10
+ defaultOptions?: FilterOption[];
11
+ selectedOptions?: string[];
12
+ onOptionsChange?: (value?: string[], searchBy?: SearchBy) => void;
13
+ onSearch?: (search: string, searchBy: SearchBy) => void;
14
+ onClose?: () => void;
15
+ onFilter?: () => void;
16
+ onChangeFilters?: (filter: UserFilter) => void;
17
+ getOption?: (user: any, t?: any) => FilterOption;
18
+ }
19
+ declare const useFilterPopover: (props: Props) => {
20
+ ref: import("react").RefObject<HTMLDivElement>;
21
+ options: any;
22
+ sOptions: string[] | undefined;
23
+ isAscending: boolean;
24
+ isDescending: boolean;
25
+ filteredOptions: FilterOption[];
26
+ searchKey: string;
27
+ handleSearch: () => void;
28
+ handleApplyFilter: () => void;
29
+ handleOptionSelected: (e?: any) => void;
30
+ handleOptionSelectedAll: (e?: any) => void;
31
+ handleSortDesc: () => void;
32
+ handleSortAsc: () => void;
33
+ handleChangeSearchKey: (e: any) => void;
34
+ };
35
+ export default useFilterPopover;
@@ -0,0 +1,8 @@
1
+ import { Option } from "../constants/types";
2
+ declare const useStudentSelector: (value?: string | undefined) => {
3
+ students: Option[];
4
+ isLoading: boolean;
5
+ student: Option | undefined;
6
+ handleInputChange: (value: string) => void;
7
+ };
8
+ export default useStudentSelector;
@@ -0,0 +1,15 @@
1
+ import { SearchBy, UserFilter } from "../constants/types";
2
+ interface Props {
3
+ filters: UserFilter;
4
+ onChangeFilters?: (filter: UserFilter) => void;
5
+ }
6
+ declare const useTableHeader: (props: Props) => {
7
+ popoverFilters: UserFilter;
8
+ popoverId: string | undefined;
9
+ users: any[];
10
+ handleFilterIcon: (id: string) => void;
11
+ handleCloseFilter: () => void;
12
+ handleSearch: (search: string, searchBy: SearchBy) => void;
13
+ handleChangeFilters: (value?: string[] | undefined, searchBy?: SearchBy | undefined) => void;
14
+ };
15
+ export default useTableHeader;
@@ -8,6 +8,7 @@ declare type UserDetail = {
8
8
  roles: string[];
9
9
  isActive: boolean;
10
10
  profileImageFileName: string;
11
+ sourcedId?: string;
11
12
  };
12
13
  declare const useUserDetail: (id?: string | undefined) => {
13
14
  userDetail: UserDetail;
@@ -1,12 +1,15 @@
1
1
  declare const useUserList: () => {
2
2
  userList: any;
3
3
  totalItems: any;
4
- filters: import("../../..").Filter;
4
+ filters: import("../constants/types").UserFilter;
5
5
  queryName: string | null;
6
- getData: (fullName?: string | undefined) => Promise<void>;
6
+ fullName: string;
7
+ getData: () => Promise<void>;
7
8
  removeData: (id: string) => void;
8
9
  changeFilters: (updatedFilters: any) => void;
9
10
  reDirectDetailPage: (id?: number | undefined) => void;
10
11
  swicthUser: (id: string) => Promise<void>;
12
+ handleSyncRosterStudents: () => Promise<void>;
13
+ rosterUserInfo: (record: any) => string;
11
14
  };
12
15
  export default useUserList;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { UserFilter } from "../constants/types";
3
+ declare const useFilters: () => {
4
+ filters: UserFilter;
5
+ setFilters: import("react").Dispatch<import("react").SetStateAction<UserFilter>>;
6
+ changeFilters: (updatedFilters: any) => void;
7
+ };
8
+ export default useFilters;
@@ -0,0 +1,7 @@
1
+ import { FC } from "react";
2
+ interface Props {
3
+ onChange: (e: any) => void;
4
+ value?: string;
5
+ }
6
+ declare const RosterStudentSelector: FC<Props>;
7
+ export default RosterStudentSelector;
package/dist/index.css CHANGED
@@ -294,7 +294,19 @@
294
294
  ._jOY7o {
295
295
  background-size: cover;
296
296
  opacity: 0;
297
- animation: _wnn2_ 20s step-start infinite 0s; }
297
+ -webkit-animation: _wnn2_ 20s step-start infinite 0s;
298
+ animation: _wnn2_ 20s step-start infinite 0s; }
299
+
300
+ @-webkit-keyframes _wnn2_ {
301
+ 0% {
302
+ opacity: 0;
303
+ background-image: url("/images/landing-page.jpg"); }
304
+ 50% {
305
+ opacity: 1;
306
+ background-image: url("/images/landing-page2.jpg"); }
307
+ 100% {
308
+ opacity: 2;
309
+ background-image: url("/images/landing-page3.jpg"); } }
298
310
 
299
311
  @keyframes _wnn2_ {
300
312
  0% {
@@ -523,6 +535,44 @@
523
535
  background-color: #f1faff;
524
536
  color: #009ef7; }
525
537
 
538
+ ._1ocBa {
539
+ cursor: pointer;
540
+ font-weight: 500; }
541
+ ._18NhM, ._1ocBa:hover {
542
+ color: #316cd9; }
543
+ ._1ocBa svg {
544
+ width: 16px;
545
+ height: 16px; }
546
+
547
+ ._2bquW {
548
+ top: 50%;
549
+ transform: translateY(-50%);
550
+ left: 12px;
551
+ font-size: 14px; }
552
+
553
+ ._3A4G4 {
554
+ padding-left: 28px !important; }
555
+
556
+ ._1MsEW {
557
+ max-height: 200px;
558
+ overflow-y: auto;
559
+ border-radius: 8px; }
560
+ ._1MsEW input {
561
+ margin-bottom: 5px; }
562
+
563
+ ._2rTzM {
564
+ border-radius: 4px;
565
+ background: #ffff; }
566
+
567
+ ._18y0w {
568
+ padding: 6px 12px 6px 0px;
569
+ border-radius: 0 4px 4px 0;
570
+ color: #fff; }
571
+
572
+ ._3cZAT {
573
+ padding: 5px 8px 7px 6px;
574
+ border-radius: 4px 0 0 4px; }
575
+
526
576
  @media (max-width: 575px) {
527
577
  ._1INnO {
528
578
  display: none; }