mario-core 2.9.157-level → 2.9.158-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.
- package/dist/containers/User/components/FilterPopover.d.ts +20 -0
- package/dist/containers/User/components/HeaderCell.d.ts +17 -0
- package/dist/containers/User/components/TableHeader.d.ts +10 -0
- package/dist/containers/User/constants/constants.d.ts +19 -0
- package/dist/containers/User/constants/types.d.ts +58 -0
- package/dist/containers/User/hooks/useClickOutside.d.ts +2 -0
- package/dist/containers/User/hooks/useExportUsersCsv.d.ts +5 -0
- package/dist/containers/User/hooks/useFilterPopover.d.ts +31 -0
- package/dist/containers/User/hooks/useTableHeader.d.ts +15 -0
- package/dist/containers/User/hooks/useUserList.d.ts +3 -2
- package/dist/containers/User/hooks/userFilters.d.ts +8 -0
- package/dist/index.css +38 -0
- package/dist/index.js +699 -41
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +702 -44
- package/dist/index.modern.js.map +1 -1
- package/dist/services/userService.d.ts +3 -1
- package/package.json +1 -1
|
@@ -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,";
|
|
@@ -1,5 +1,23 @@
|
|
|
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
|
+
};
|
|
1
17
|
export declare type RosterStudent = {
|
|
2
18
|
sourcedId: string;
|
|
19
|
+
username: string;
|
|
20
|
+
status: string;
|
|
3
21
|
givenName: string;
|
|
4
22
|
middleName: string;
|
|
5
23
|
familyName: string;
|
|
@@ -11,3 +29,43 @@ export declare type Option = {
|
|
|
11
29
|
label: string;
|
|
12
30
|
value: string;
|
|
13
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,31 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FilterOption, SearchBy, UserFilter, UserOrder } from "../constants/types";
|
|
3
|
+
interface Props {
|
|
4
|
+
filters?: UserFilter;
|
|
5
|
+
sortBy: UserOrder;
|
|
6
|
+
searchBy?: SearchBy;
|
|
7
|
+
users: any[];
|
|
8
|
+
defaultOptions?: FilterOption[];
|
|
9
|
+
selectedOptions?: string[];
|
|
10
|
+
onOptionsChange?: (value?: string[], searchBy?: SearchBy) => void;
|
|
11
|
+
onSearch?: (search: string, searchBy: SearchBy) => void;
|
|
12
|
+
onClose?: () => void;
|
|
13
|
+
onFilter?: () => void;
|
|
14
|
+
onChangeFilters?: (filter: UserFilter) => void;
|
|
15
|
+
getOption?: (user: any, t?: any) => FilterOption;
|
|
16
|
+
}
|
|
17
|
+
declare const useFilterPopover: (props: Props) => {
|
|
18
|
+
ref: import("react").RefObject<HTMLDivElement>;
|
|
19
|
+
options: any;
|
|
20
|
+
sOptions: string[] | undefined;
|
|
21
|
+
isAscending: boolean;
|
|
22
|
+
isDescending: boolean;
|
|
23
|
+
filteredOptions: FilterOption[];
|
|
24
|
+
handleSearch: (e: any) => void;
|
|
25
|
+
handleApplyFilter: () => void;
|
|
26
|
+
handleOptionSelected: (e?: any) => void;
|
|
27
|
+
handleOptionSelectedAll: (e?: any) => void;
|
|
28
|
+
handleSortDesc: () => void;
|
|
29
|
+
handleSortAsc: () => void;
|
|
30
|
+
};
|
|
31
|
+
export default useFilterPopover;
|
|
@@ -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;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
declare const useUserList: () => {
|
|
2
2
|
userList: any;
|
|
3
3
|
totalItems: any;
|
|
4
|
-
filters: import("
|
|
4
|
+
filters: import("../constants/types").UserFilter;
|
|
5
5
|
queryName: string | null;
|
|
6
|
-
|
|
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;
|
|
@@ -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;
|
package/dist/index.css
CHANGED
|
@@ -535,6 +535,44 @@
|
|
|
535
535
|
background-color: #f1faff;
|
|
536
536
|
color: #009ef7; }
|
|
537
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
|
+
|
|
538
576
|
@media (max-width: 575px) {
|
|
539
577
|
._1INnO {
|
|
540
578
|
display: none; }
|