playbook_ui 13.16.0.pre.alpha.PLAY11642006 → 13.16.0.pre.alpha.PLAY12002127
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/_playbook.scss +14 -12
- data/app/pb_kits/playbook/index.js +2 -1
- data/app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx +30 -0
- data/app/pb_kits/playbook/pb_advanced_table/Components/CustomCell.tsx +62 -0
- data/app/pb_kits/playbook/pb_advanced_table/Components/LoadingCell.tsx +5 -0
- data/app/pb_kits/playbook/pb_advanced_table/Components/SortIconButton.tsx +30 -0
- data/app/pb_kits/playbook/pb_advanced_table/Components/SubRowHeaderRow.tsx +61 -0
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +127 -0
- data/app/pb_kits/playbook/pb_advanced_table/Components/ToggleIconButton.tsx +28 -0
- data/app/pb_kits/playbook/pb_advanced_table/Context/AdvancedTableContext.tsx +5 -0
- data/app/pb_kits/playbook/pb_advanced_table/README.md +288 -0
- data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableBody.tsx +95 -0
- data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableHeader.tsx +51 -0
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/BrowserCheck.tsx +5 -0
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/ExpansionControlHelpers.tsx +63 -0
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/IconHelpers.tsx +8 -0
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/types.ts +8 -0
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +98 -0
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +246 -0
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +56 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.jsx +52 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.jsx +49 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.md +18 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expanded_control.jsx +59 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expanded_control.md +18 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.jsx +60 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.jsx +52 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.md +5 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_control.jsx +63 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_control.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx +57 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx +61 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +55 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_description.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_mock_data.js +278 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +12 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +9 -0
- data/app/pb_kits/playbook/pb_advanced_table/scss_partials/_loading.scss +72 -0
- data/app/pb_kits/playbook/pb_advanced_table/scss_partials/_pseudo_states.scss +12 -0
- data/app/pb_kits/playbook/pb_flex/_flex.tsx +1 -1
- data/app/pb_kits/playbook/pb_icon/_icon.tsx +17 -29
- data/app/pb_kits/playbook/pb_icon/docs/_icon_custom.html.erb +11 -5
- data/app/pb_kits/playbook/pb_icon/docs/_icon_custom.jsx +18 -44
- data/app/pb_kits/playbook/pb_icon/docs/_icon_custom.md +12 -7
- data/app/pb_kits/playbook/pb_icon/icon.html.erb +4 -6
- data/app/pb_kits/playbook/pb_icon/icon.rb +10 -10
- data/app/pb_kits/playbook/pb_label_value/_label_value.tsx +1 -1
- data/app/pb_kits/playbook/pb_layout/_layout.tsx +2 -1
- data/app/pb_kits/playbook/pb_layout/layout.test.js +8 -4
- data/app/pb_kits/playbook/pb_legend/_legend.tsx +6 -6
- data/app/pb_kits/playbook/pb_lightbox/Carousel/Slides.tsx +4 -4
- data/app/pb_kits/playbook/pb_lightbox/Carousel/Thumbnail.tsx +1 -1
- data/app/pb_kits/playbook/pb_lightbox/Carousel/index.tsx +3 -3
- data/app/pb_kits/playbook/pb_lightbox/Header/_lightbox_header.tsx +30 -22
- data/app/pb_kits/playbook/pb_lightbox/_lightbox.tsx +5 -5
- data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +4 -4
- data/app/pb_kits/playbook/pb_list/_list.tsx +15 -15
- data/app/pb_kits/playbook/pb_list/_list_item.tsx +1 -1
- data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +9 -9
- data/app/pb_kits/playbook/pb_map/_map.tsx +8 -8
- data/app/pb_kits/playbook/pb_map/_map_controls.tsx +15 -7
- data/app/pb_kits/playbook/pb_map/_map_custom_button.tsx +4 -2
- data/app/pb_kits/playbook/pb_message/_message.tsx +1 -1
- data/app/pb_kits/playbook/pb_message/_message_mention.tsx +6 -6
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +46 -42
- data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +20 -20
- data/app/pb_kits/playbook/pb_nav/_item.tsx +56 -47
- data/app/pb_kits/playbook/pb_nav/_nav.tsx +15 -15
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.html.erb +5 -7
- data/app/pb_kits/playbook/pb_popover/_popover.tsx +12 -14
- data/app/pb_kits/playbook/pb_popover/docs/_popover_actionable_content.html.erb +30 -0
- data/app/pb_kits/playbook/pb_popover/docs/_popover_actionable_content.jsx +57 -0
- data/app/pb_kits/playbook/pb_popover/docs/example.yml +2 -1
- data/app/pb_kits/playbook/pb_popover/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_table/_table.tsx +29 -29
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +1 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +4 -2
- data/app/pb_kits/playbook/playbook-doc.js +2 -0
- data/app/pb_kits/playbook/utilities/globalProps.ts +1 -1
- data/dist/menu.yml +4 -1
- data/dist/playbook-rails.js +14 -6
- data/lib/playbook/version.rb +1 -1
- metadata +46 -2
@@ -0,0 +1,3 @@
|
|
1
|
+
`sortControl` is an optional prop that can be used to gain greater control over the sort state of the Advanced Table. Tanstack handles sort itself, however it does provide for a way to handle the state manually if needed. Usecases for this include needing to store the sort state so it persists on page reload, set an initial sort state, etc.
|
2
|
+
|
3
|
+
The sort state must be an object with a single key/value pair, with the key being "desc" and the value being a boolean. The default for sort directino is `desc: true`.
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { AdvancedTable } from "../..";
|
3
|
+
import { MOCK_DATA } from "./_mock_data";
|
4
|
+
|
5
|
+
const AdvancedTableSubrowHeaders = (props) => {
|
6
|
+
const columnDefinitions = [
|
7
|
+
{
|
8
|
+
accessor: "year",
|
9
|
+
label: "Year",
|
10
|
+
cellAccessors: ["quarter", "month", "day"],
|
11
|
+
},
|
12
|
+
{
|
13
|
+
accessor: "newEnrollments",
|
14
|
+
label: "New Enrollments",
|
15
|
+
},
|
16
|
+
{
|
17
|
+
accessor: "scheduledMeetings",
|
18
|
+
label: "Scheduled Meetings",
|
19
|
+
},
|
20
|
+
{
|
21
|
+
accessor: "attendanceRate",
|
22
|
+
label: "Attendance Rate",
|
23
|
+
},
|
24
|
+
{
|
25
|
+
accessor: "completedClasses",
|
26
|
+
label: "Completed Classes",
|
27
|
+
},
|
28
|
+
{
|
29
|
+
accessor: "classCompletionRate",
|
30
|
+
label: "Class Completion Rate",
|
31
|
+
},
|
32
|
+
{
|
33
|
+
accessor: "graduatedStudents",
|
34
|
+
label: "Graduated Students",
|
35
|
+
},
|
36
|
+
];
|
37
|
+
|
38
|
+
//Render the subRow header rows
|
39
|
+
const subRowHeaders = ["Quarter", "Month", "Day"]
|
40
|
+
|
41
|
+
|
42
|
+
return (
|
43
|
+
<div>
|
44
|
+
<AdvancedTable
|
45
|
+
columnDefinitions={columnDefinitions}
|
46
|
+
enableToggleExpansion="all"
|
47
|
+
tableData={MOCK_DATA}
|
48
|
+
{...props}
|
49
|
+
>
|
50
|
+
<AdvancedTable.Header />
|
51
|
+
<AdvancedTable.Body subRowHeaders={subRowHeaders}/>
|
52
|
+
</AdvancedTable>
|
53
|
+
</div>
|
54
|
+
);
|
55
|
+
};
|
56
|
+
|
57
|
+
export default AdvancedTableSubrowHeaders;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
`subRowHeaders` is an optional prop that if present will add header rows at each level of the nested data. The prop takes an array of strings, each string being the text for each header row. The array of strings must be in the order in which they need to be rendered in the UI according to depth.
|
2
|
+
|
3
|
+
`enableToggleExpansion` is an additional optional prop that can be used in conjunction with the subRowHeaders prop. `enableToggleExpansion` is a string that can be 'all' or 'header". If set to 'all', the toggle exapansion button will appear in the table header as well as in the subRow headers. If set to 'header' button will only appear in header and NOT in subRow headers. This is set to 'headeer' by default.
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { AdvancedTable } from "../../";
|
3
|
+
import { MOCK_DATA } from "./_mock_data";
|
4
|
+
|
5
|
+
const AdvancedTableTableOptions = (props) => {
|
6
|
+
const columnDefinitions = [
|
7
|
+
{
|
8
|
+
accessor: "year",
|
9
|
+
label: "Year",
|
10
|
+
cellAccessors: ["quarter", "month", "day"],
|
11
|
+
},
|
12
|
+
{
|
13
|
+
accessor: "newEnrollments",
|
14
|
+
label: "New Enrollments",
|
15
|
+
},
|
16
|
+
{
|
17
|
+
accessor: "scheduledMeetings",
|
18
|
+
label: "Scheduled Meetings",
|
19
|
+
},
|
20
|
+
{
|
21
|
+
accessor: "attendanceRate",
|
22
|
+
label: "Attendance Rate",
|
23
|
+
},
|
24
|
+
{
|
25
|
+
accessor: "completedClasses",
|
26
|
+
label: "Completed Classes",
|
27
|
+
},
|
28
|
+
{
|
29
|
+
accessor: "classCompletionRate",
|
30
|
+
label: "Class Completion Rate",
|
31
|
+
},
|
32
|
+
{
|
33
|
+
accessor: "graduatedStudents",
|
34
|
+
label: "Graduated Students",
|
35
|
+
},
|
36
|
+
];
|
37
|
+
|
38
|
+
const tableOptions = {
|
39
|
+
initialState: {
|
40
|
+
sorting: [
|
41
|
+
{
|
42
|
+
id: "year",
|
43
|
+
desc: true,
|
44
|
+
},
|
45
|
+
],
|
46
|
+
},
|
47
|
+
}
|
48
|
+
|
49
|
+
return (
|
50
|
+
<div>
|
51
|
+
<AdvancedTable
|
52
|
+
columnDefinitions={columnDefinitions}
|
53
|
+
tableData={MOCK_DATA}
|
54
|
+
tableOptions={tableOptions}
|
55
|
+
{...props}
|
56
|
+
/>
|
57
|
+
</div>
|
58
|
+
);
|
59
|
+
};
|
60
|
+
|
61
|
+
export default AdvancedTableTableOptions;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
The Tanstack table consumes the useReactTable hook to create the table. This hook takes an object that can contain any of the functions that the Tanstack table provides. The advancedTable's optional `tableOptions` can be used to pass tanstack options to the kit.
|
2
|
+
|
3
|
+
In the above example, we are using the initialState option provided by tanstack that takes sort as one of it's values. Setting it to true for the first column is reversing the sort order on first render of the table. For a complete list of possible options and hoe to use them, see [here](https://tanstack.com/table/v8/docs/api/core/table#usereacttable--createsolidtable--usevuetable--createsveltetable)
|
@@ -0,0 +1,55 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { AdvancedTable } from "../../";
|
3
|
+
import { MOCK_DATA } from "./_mock_data";
|
4
|
+
|
5
|
+
const AdvancedTableTableProps = (props) => {
|
6
|
+
const columnDefinitions = [
|
7
|
+
{
|
8
|
+
accessor: "year",
|
9
|
+
label: "Year",
|
10
|
+
cellAccessors: ["quarter", "month", "day"],
|
11
|
+
},
|
12
|
+
{
|
13
|
+
accessor: "newEnrollments",
|
14
|
+
label: "New Enrollments",
|
15
|
+
},
|
16
|
+
{
|
17
|
+
accessor: "scheduledMeetings",
|
18
|
+
label: "Scheduled Meetings",
|
19
|
+
},
|
20
|
+
{
|
21
|
+
accessor: "attendanceRate",
|
22
|
+
label: "Attendance Rate",
|
23
|
+
},
|
24
|
+
{
|
25
|
+
accessor: "completedClasses",
|
26
|
+
label: "Completed Classes",
|
27
|
+
},
|
28
|
+
{
|
29
|
+
accessor: "classCompletionRate",
|
30
|
+
label: "Class Completion Rate",
|
31
|
+
},
|
32
|
+
{
|
33
|
+
accessor: "graduatedStudents",
|
34
|
+
label: "Graduated Students",
|
35
|
+
},
|
36
|
+
];
|
37
|
+
|
38
|
+
const tableProps = {
|
39
|
+
container: false,
|
40
|
+
sticky: true
|
41
|
+
}
|
42
|
+
|
43
|
+
return (
|
44
|
+
<div>
|
45
|
+
<AdvancedTable
|
46
|
+
columnDefinitions={columnDefinitions}
|
47
|
+
tableData={MOCK_DATA}
|
48
|
+
tableProps={tableProps}
|
49
|
+
{...props}
|
50
|
+
/>
|
51
|
+
</div>
|
52
|
+
);
|
53
|
+
};
|
54
|
+
|
55
|
+
export default AdvancedTableTableProps;
|
@@ -0,0 +1 @@
|
|
1
|
+
This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table/react) under the hood which comes with it's own set of props. If you want to apply certain Table props to that underlying kit, you can do so by using the optional `tableProps` prop. This prop must be an object that contains valid Table props. For a full list of Table props, see [here](https://playbook.powerapp.cloud/kits/table/react).
|
@@ -0,0 +1 @@
|
|
1
|
+
The AdvancedTable kit uses the [Tanstack Table v8](https://tanstack.com/table/v8/docs/introduction) under the hood to render advanced tables that allow for complex, nested data structures with expansion and sort options.
|
@@ -0,0 +1,278 @@
|
|
1
|
+
export const MOCK_DATA = [
|
2
|
+
{
|
3
|
+
year: "2021",
|
4
|
+
quarter: null,
|
5
|
+
month: null,
|
6
|
+
day: null,
|
7
|
+
newEnrollments: "20",
|
8
|
+
scheduledMeetings: "10",
|
9
|
+
attendanceRate: "51%",
|
10
|
+
completedClasses: "3",
|
11
|
+
classCompletionRate: "33%",
|
12
|
+
graduatedStudents: "19",
|
13
|
+
children: [
|
14
|
+
{
|
15
|
+
year: "2021",
|
16
|
+
quarter: "Q1",
|
17
|
+
month: null,
|
18
|
+
day: null,
|
19
|
+
newEnrollments: "2",
|
20
|
+
scheduledMeetings: "35",
|
21
|
+
attendanceRate: "32%",
|
22
|
+
completedClasses: "15",
|
23
|
+
classCompletionRate: "52%",
|
24
|
+
graduatedStudents: "36",
|
25
|
+
children: [
|
26
|
+
{
|
27
|
+
year: "2021",
|
28
|
+
quarter: "Q1",
|
29
|
+
month: "January",
|
30
|
+
day: null,
|
31
|
+
newEnrollments: "16",
|
32
|
+
scheduledMeetings: "20",
|
33
|
+
attendanceRate: "11%",
|
34
|
+
completedClasses: "13",
|
35
|
+
classCompletionRate: "47%",
|
36
|
+
graduatedStudents: "28",
|
37
|
+
children: [
|
38
|
+
{
|
39
|
+
year: "2021",
|
40
|
+
quarter: "Q1",
|
41
|
+
month: "January",
|
42
|
+
day: "10",
|
43
|
+
newEnrollments: "34",
|
44
|
+
scheduledMeetings: "28",
|
45
|
+
attendanceRate: "97%",
|
46
|
+
completedClasses: "20",
|
47
|
+
classCompletionRate: "15%",
|
48
|
+
graduatedStudents: "17",
|
49
|
+
},
|
50
|
+
{
|
51
|
+
year: "2021",
|
52
|
+
quarter: "Q1",
|
53
|
+
month: "January",
|
54
|
+
day: "20",
|
55
|
+
newEnrollments: "43",
|
56
|
+
scheduledMeetings: "23",
|
57
|
+
attendanceRate: "66%",
|
58
|
+
completedClasses: "26",
|
59
|
+
classCompletionRate: "47%",
|
60
|
+
graduatedStudents: "9",
|
61
|
+
},
|
62
|
+
],
|
63
|
+
},
|
64
|
+
{
|
65
|
+
year: "2021",
|
66
|
+
quarter: "Q1",
|
67
|
+
month: "February",
|
68
|
+
day: null,
|
69
|
+
newEnrollments: "20",
|
70
|
+
scheduledMeetings: "41",
|
71
|
+
attendanceRate: "95%",
|
72
|
+
completedClasses: "26",
|
73
|
+
classCompletionRate: "83%",
|
74
|
+
graduatedStudents: "43",
|
75
|
+
children: [
|
76
|
+
{
|
77
|
+
year: "2011",
|
78
|
+
quarter: "Q1",
|
79
|
+
month: "February",
|
80
|
+
day: "15",
|
81
|
+
newEnrollments: "19",
|
82
|
+
scheduledMeetings: "35",
|
83
|
+
attendanceRate: "69%",
|
84
|
+
completedClasses: "8",
|
85
|
+
classCompletionRate: "75%",
|
86
|
+
graduatedStudents: "23",
|
87
|
+
},
|
88
|
+
],
|
89
|
+
},
|
90
|
+
],
|
91
|
+
},
|
92
|
+
],
|
93
|
+
},
|
94
|
+
{
|
95
|
+
year: "2022",
|
96
|
+
quarter: null,
|
97
|
+
month: null,
|
98
|
+
day: null,
|
99
|
+
newEnrollments: "25",
|
100
|
+
scheduledMeetings: "17",
|
101
|
+
attendanceRate: "75%",
|
102
|
+
completedClasses: "5",
|
103
|
+
classCompletionRate: "45%",
|
104
|
+
graduatedStudents: "32",
|
105
|
+
children: [
|
106
|
+
{
|
107
|
+
year: "2022",
|
108
|
+
quarter: "Q1",
|
109
|
+
month: null,
|
110
|
+
day: null,
|
111
|
+
newEnrollments: "2",
|
112
|
+
scheduledMeetings: "35",
|
113
|
+
attendanceRate: "32%",
|
114
|
+
completedClasses: "15",
|
115
|
+
classCompletionRate: "52%",
|
116
|
+
graduatedStudents: "36",
|
117
|
+
children: [
|
118
|
+
{
|
119
|
+
year: "2022",
|
120
|
+
quarter: "Q1",
|
121
|
+
month: "January",
|
122
|
+
day: null,
|
123
|
+
newEnrollments: "16",
|
124
|
+
scheduledMeetings: "20",
|
125
|
+
attendanceRate: "11%",
|
126
|
+
completedClasses: "13",
|
127
|
+
classCompletionRate: "47%",
|
128
|
+
graduatedStudents: "28",
|
129
|
+
children: [
|
130
|
+
{
|
131
|
+
year: "2022",
|
132
|
+
quarter: "Q1",
|
133
|
+
month: "January",
|
134
|
+
day: "15",
|
135
|
+
newEnrollments: "34",
|
136
|
+
scheduledMeetings: "28",
|
137
|
+
attendanceRate: "97%",
|
138
|
+
completedClasses: "20",
|
139
|
+
classCompletionRate: "15%",
|
140
|
+
graduatedStudents: "17",
|
141
|
+
},
|
142
|
+
{
|
143
|
+
year: "2022",
|
144
|
+
quarter: "Q1",
|
145
|
+
month: "January",
|
146
|
+
day: "25",
|
147
|
+
newEnrollments: "43",
|
148
|
+
scheduledMeetings: "23",
|
149
|
+
attendanceRate: "66%",
|
150
|
+
completedClasses: "26",
|
151
|
+
classCompletionRate: "47%",
|
152
|
+
graduatedStudents: "9",
|
153
|
+
},
|
154
|
+
],
|
155
|
+
},
|
156
|
+
{
|
157
|
+
year: "2022",
|
158
|
+
quarter: "Q1",
|
159
|
+
month: "May",
|
160
|
+
day: null,
|
161
|
+
newEnrollments: "20",
|
162
|
+
scheduledMeetings: "41",
|
163
|
+
attendanceRate: "95%",
|
164
|
+
completedClasses: "26",
|
165
|
+
classCompletionRate: "83%",
|
166
|
+
graduatedStudents: "43",
|
167
|
+
children: [
|
168
|
+
{
|
169
|
+
year: "2011",
|
170
|
+
quarter: "Q1",
|
171
|
+
month: "May",
|
172
|
+
day: "2",
|
173
|
+
newEnrollments: "19",
|
174
|
+
scheduledMeetings: "35",
|
175
|
+
attendanceRate: "69%",
|
176
|
+
completedClasses: "8",
|
177
|
+
classCompletionRate: "75%",
|
178
|
+
graduatedStudents: "23",
|
179
|
+
},
|
180
|
+
],
|
181
|
+
},
|
182
|
+
],
|
183
|
+
},
|
184
|
+
],
|
185
|
+
},
|
186
|
+
{
|
187
|
+
year: "2023",
|
188
|
+
quarter: null,
|
189
|
+
month: null,
|
190
|
+
day: null,
|
191
|
+
newEnrollments: "10",
|
192
|
+
scheduledMeetings: "15",
|
193
|
+
attendanceRate: "65%",
|
194
|
+
completedClasses: "4",
|
195
|
+
classCompletionRate: "49%",
|
196
|
+
graduatedStudents: "29",
|
197
|
+
children: [
|
198
|
+
{
|
199
|
+
year: "2023",
|
200
|
+
quarter: "Q1",
|
201
|
+
month: null,
|
202
|
+
day: null,
|
203
|
+
newEnrollments: "2",
|
204
|
+
scheduledMeetings: "35",
|
205
|
+
attendanceRate: "32%",
|
206
|
+
completedClasses: "15",
|
207
|
+
classCompletionRate: "52%",
|
208
|
+
graduatedStudents: "36",
|
209
|
+
children: [
|
210
|
+
{
|
211
|
+
year: "2023",
|
212
|
+
quarter: "Q1",
|
213
|
+
month: "March",
|
214
|
+
day: null,
|
215
|
+
newEnrollments: "16",
|
216
|
+
scheduledMeetings: "20",
|
217
|
+
attendanceRate: "11%",
|
218
|
+
completedClasses: "13",
|
219
|
+
classCompletionRate: "47%",
|
220
|
+
graduatedStudents: "28",
|
221
|
+
children: [
|
222
|
+
{
|
223
|
+
year: "2023",
|
224
|
+
quarter: "Q1",
|
225
|
+
month: "March",
|
226
|
+
day: "10",
|
227
|
+
newEnrollments: "34",
|
228
|
+
scheduledMeetings: "28",
|
229
|
+
attendanceRate: "97%",
|
230
|
+
completedClasses: "20",
|
231
|
+
classCompletionRate: "15%",
|
232
|
+
graduatedStudents: "17",
|
233
|
+
},
|
234
|
+
{
|
235
|
+
year: "2023",
|
236
|
+
quarter: "Q1",
|
237
|
+
month: "March",
|
238
|
+
day: "11",
|
239
|
+
newEnrollments: "43",
|
240
|
+
scheduledMeetings: "23",
|
241
|
+
attendanceRate: "66%",
|
242
|
+
completedClasses: "26",
|
243
|
+
classCompletionRate: "47%",
|
244
|
+
graduatedStudents: "9",
|
245
|
+
},
|
246
|
+
],
|
247
|
+
},
|
248
|
+
{
|
249
|
+
year: "2023",
|
250
|
+
quarter: "Q1",
|
251
|
+
month: "April",
|
252
|
+
day: null,
|
253
|
+
newEnrollments: "20",
|
254
|
+
scheduledMeetings: "41",
|
255
|
+
attendanceRate: "95%",
|
256
|
+
completedClasses: "26",
|
257
|
+
classCompletionRate: "83%",
|
258
|
+
graduatedStudents: "43",
|
259
|
+
children: [
|
260
|
+
{
|
261
|
+
year: "2023",
|
262
|
+
quarter: "Q1",
|
263
|
+
month: "April",
|
264
|
+
day: "15",
|
265
|
+
newEnrollments: "19",
|
266
|
+
scheduledMeetings: "35",
|
267
|
+
attendanceRate: "69%",
|
268
|
+
completedClasses: "8",
|
269
|
+
classCompletionRate: "75%",
|
270
|
+
graduatedStudents: "23",
|
271
|
+
},
|
272
|
+
],
|
273
|
+
},
|
274
|
+
],
|
275
|
+
},
|
276
|
+
],
|
277
|
+
},
|
278
|
+
];
|
@@ -0,0 +1,12 @@
|
|
1
|
+
examples:
|
2
|
+
react:
|
3
|
+
- advanced_table_default: Default (Required Props)
|
4
|
+
- advanced_table_loading: Loading State
|
5
|
+
- advanced_table_sort: enable Sorting
|
6
|
+
- advanced_table_sort_control: Sort Control
|
7
|
+
- advanced_table_expanded_control: Expanded Control
|
8
|
+
- advanced_table_subrow_headers: SubRow Headers
|
9
|
+
- advanced_table_collapsible_trail: Collapsible Trail
|
10
|
+
- advanced_table_table_options: Table Options
|
11
|
+
- advanced_table_table_props: Table Props
|
12
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export { default as AdvancedTableDefault } from './_advanced_table_default.jsx'
|
2
|
+
export { default as AdvancedTableSort } from './_advanced_table_sort.jsx'
|
3
|
+
export { default as AdvancedTableSortControl } from './_advanced_table_sort_control.jsx'
|
4
|
+
export { default as AdvancedTableLoading } from './_advanced_table_loading.jsx'
|
5
|
+
export { default as AdvancedTableExpandedControl } from './_advanced_table_expanded_control.jsx'
|
6
|
+
export { default as AdvancedTableSubrowHeaders } from './_advanced_table_subrow_headers.jsx'
|
7
|
+
export { default as AdvancedTableCollapsibleTrail } from './_advanced_table_collapsible_trail.jsx'
|
8
|
+
export { default as AdvancedTableTableOptions } from './_advanced_table_table_options.jsx'
|
9
|
+
export { default as AdvancedTableTableProps } from './_advanced_table_table_props.jsx'
|
@@ -0,0 +1,72 @@
|
|
1
|
+
|
2
|
+
//animation scss
|
3
|
+
@keyframes wave {
|
4
|
+
0% {
|
5
|
+
background-position: -468px 0;
|
6
|
+
}
|
7
|
+
100% {
|
8
|
+
background-position: 468px 0;
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
.content-loading {
|
13
|
+
pointer-events: none;
|
14
|
+
p,
|
15
|
+
.pb_body_kit_light,
|
16
|
+
.loading-toggle-icon,
|
17
|
+
.pb_caption_kit_md,
|
18
|
+
h4,
|
19
|
+
.loading-cell {
|
20
|
+
position: relative;
|
21
|
+
color: rgba($white, 0) !important;
|
22
|
+
background: rgba($white, 0) !important;
|
23
|
+
border: 0 !important;
|
24
|
+
&::after {
|
25
|
+
content: "";
|
26
|
+
position: absolute;
|
27
|
+
top: $space-xxs;
|
28
|
+
left: 0;
|
29
|
+
width: 100%;
|
30
|
+
height: calc(100% - #{$space-xxs * 2});
|
31
|
+
display: block;
|
32
|
+
border-radius: $border-rad-light;
|
33
|
+
animation-duration: 1.5s;
|
34
|
+
animation-fill-mode: forwards;
|
35
|
+
animation-iteration-count: infinite;
|
36
|
+
animation-name: wave;
|
37
|
+
animation-timing-function: linear;
|
38
|
+
background: $silver;
|
39
|
+
background-color: $silver;
|
40
|
+
background-image: linear-gradient(
|
41
|
+
to left,
|
42
|
+
$silver 0%,
|
43
|
+
lighten($silver, 1%) 50%,
|
44
|
+
lighten($silver, 1%) 60%,
|
45
|
+
$silver 80%,
|
46
|
+
$silver 100%
|
47
|
+
);
|
48
|
+
background-repeat: no-repeat;
|
49
|
+
background-size: 800px 104px;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
.loading-cell {
|
54
|
+
height: $space_sm + 4;
|
55
|
+
}
|
56
|
+
|
57
|
+
.loading-toggle-icon {
|
58
|
+
width: $space_sm - 3;
|
59
|
+
height: $space_sm - 4;
|
60
|
+
margin-right: $space_xxs;
|
61
|
+
margin-bottom: $space_xxs + 2;
|
62
|
+
&::after {
|
63
|
+
height: $space_sm - 4;
|
64
|
+
border-radius: $border_radius_rounded;
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
svg,
|
69
|
+
img {
|
70
|
+
visibility: hidden;
|
71
|
+
}
|
72
|
+
}
|
@@ -10,7 +10,7 @@ type FlexProps = {
|
|
10
10
|
data?: GenericObject,
|
11
11
|
horizontal?: "left" | "center" | "right" | "stretch" | "none",
|
12
12
|
justify?: "start" | "center" | "end" | "around" | "between" | "evenly" | "none",
|
13
|
-
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
13
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void) | ((arg?: unknown) => void)},
|
14
14
|
id?: string,
|
15
15
|
inline?: boolean,
|
16
16
|
orientation?: "row" | "column",
|