playbook_ui 13.16.0 → 13.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +14 -12
  3. data/app/pb_kits/playbook/index.js +2 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx +30 -0
  5. data/app/pb_kits/playbook/pb_advanced_table/Components/CustomCell.tsx +62 -0
  6. data/app/pb_kits/playbook/pb_advanced_table/Components/LoadingCell.tsx +5 -0
  7. data/app/pb_kits/playbook/pb_advanced_table/Components/SortIconButton.tsx +30 -0
  8. data/app/pb_kits/playbook/pb_advanced_table/Components/SubRowHeaderRow.tsx +61 -0
  9. data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +128 -0
  10. data/app/pb_kits/playbook/pb_advanced_table/Components/ToggleIconButton.tsx +28 -0
  11. data/app/pb_kits/playbook/pb_advanced_table/Context/AdvancedTableContext.tsx +5 -0
  12. data/app/pb_kits/playbook/pb_advanced_table/README.md +288 -0
  13. data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableBody.tsx +95 -0
  14. data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableHeader.tsx +51 -0
  15. data/app/pb_kits/playbook/pb_advanced_table/Utilities/BrowserCheck.tsx +5 -0
  16. data/app/pb_kits/playbook/pb_advanced_table/Utilities/ExpansionControlHelpers.tsx +63 -0
  17. data/app/pb_kits/playbook/pb_advanced_table/Utilities/IconHelpers.tsx +8 -0
  18. data/app/pb_kits/playbook/pb_advanced_table/Utilities/types.ts +8 -0
  19. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +98 -0
  20. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +245 -0
  21. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +56 -0
  22. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.jsx +49 -0
  23. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.md +13 -0
  24. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.jsx +57 -0
  25. data/app/pb_kits/playbook/pb_advanced_table/docs/_description.md +1 -0
  26. data/app/pb_kits/playbook/pb_advanced_table/docs/_mock_data.js +278 -0
  27. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +6 -0
  28. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +2 -0
  29. data/app/pb_kits/playbook/pb_advanced_table/scss_partials/_loading.scss +71 -0
  30. data/app/pb_kits/playbook/pb_advanced_table/scss_partials/_pseudo_states.scss +12 -0
  31. data/app/pb_kits/playbook/pb_flex/_flex.tsx +1 -1
  32. data/app/pb_kits/playbook/pb_label_value/_label_value.tsx +1 -1
  33. data/app/pb_kits/playbook/pb_layout/_layout.tsx +2 -1
  34. data/app/pb_kits/playbook/pb_layout/layout.test.js +8 -4
  35. data/app/pb_kits/playbook/pb_legend/_legend.tsx +6 -6
  36. data/app/pb_kits/playbook/pb_lightbox/Carousel/Slides.tsx +4 -4
  37. data/app/pb_kits/playbook/pb_lightbox/Carousel/Thumbnail.tsx +1 -1
  38. data/app/pb_kits/playbook/pb_lightbox/Carousel/index.tsx +3 -3
  39. data/app/pb_kits/playbook/pb_lightbox/Header/_lightbox_header.tsx +30 -22
  40. data/app/pb_kits/playbook/pb_lightbox/_lightbox.tsx +5 -5
  41. data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +4 -4
  42. data/app/pb_kits/playbook/pb_list/_list.tsx +15 -15
  43. data/app/pb_kits/playbook/pb_list/_list_item.tsx +1 -1
  44. data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +9 -9
  45. data/app/pb_kits/playbook/pb_map/_map.tsx +8 -8
  46. data/app/pb_kits/playbook/pb_map/_map_controls.tsx +15 -7
  47. data/app/pb_kits/playbook/pb_map/_map_custom_button.tsx +4 -2
  48. data/app/pb_kits/playbook/pb_message/_message.tsx +1 -1
  49. data/app/pb_kits/playbook/pb_message/_message_mention.tsx +6 -6
  50. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +46 -42
  51. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +20 -20
  52. data/app/pb_kits/playbook/pb_nav/_item.tsx +56 -47
  53. data/app/pb_kits/playbook/pb_nav/_nav.tsx +15 -15
  54. data/app/pb_kits/playbook/pb_table/_table.tsx +29 -29
  55. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +1 -1
  56. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +4 -2
  57. data/app/pb_kits/playbook/playbook-doc.js +2 -0
  58. data/app/pb_kits/playbook/utilities/globalProps.ts +1 -1
  59. data/dist/menu.yml +4 -1
  60. data/dist/playbook-rails.js +14 -6
  61. data/lib/playbook/version.rb +2 -2
  62. metadata +29 -2
@@ -0,0 +1,245 @@
1
+ import React, { useState, useEffect, useCallback } from "react";
2
+ import classnames from "classnames";
3
+ import { buildAriaProps, buildCss, buildDataProps } from "../utilities/props";
4
+ import { globalProps, GlobalProps } from "../utilities/globalProps";
5
+ import Table from "../pb_table/_table";
6
+ import {
7
+ createColumnHelper,
8
+ getCoreRowModel,
9
+ getExpandedRowModel,
10
+ getSortedRowModel,
11
+ Row,
12
+ useReactTable,
13
+ Getter,
14
+ } from "@tanstack/react-table";
15
+
16
+ import { updateExpandAndCollapseState } from "./Utilities/ExpansionControlHelpers";
17
+
18
+ import { CustomCell } from "./Components/CustomCell";
19
+ import AdvancedTableContext from "./Context/AdvancedTableContext";
20
+ import { TableHeader } from "./SubKits/TableHeader";
21
+ import { TableBody } from "./SubKits/TableBody";
22
+
23
+ import { DataType, ExpandedStateObject } from "./Utilities/types";
24
+
25
+ type AdvancedTableProps = {
26
+ aria?: { [key: string]: string };
27
+ children?: React.ReactNode | React.ReactNode[];
28
+ className?: string;
29
+ columnDefinitions: DataType[];
30
+ data?: { [key: string]: string };
31
+ enableToggleExpansion?: "all" | "header";
32
+ expandedControl?: DataType;
33
+ id?: string;
34
+ initialLoadingRowsCount?: number;
35
+ loading?: boolean | string;
36
+ onRowToggleClick?: (arg: Row<DataType>) => void;
37
+ onToggleExpansionClick?: (arg: Row<DataType>) => void;
38
+ sortControl?: DataType;
39
+ tableData: DataType[];
40
+ tableOptions?: DataType;
41
+ tableProps?: DataType;
42
+ toggleExpansionIcon?: string | string[];
43
+ } & GlobalProps;
44
+
45
+ const AdvancedTable = (props: AdvancedTableProps) => {
46
+ const {
47
+ aria = {},
48
+ children,
49
+ className,
50
+ columnDefinitions,
51
+ data = {},
52
+ enableToggleExpansion = "header",
53
+ expandedControl,
54
+ id,
55
+ initialLoadingRowsCount = 10,
56
+ loading,
57
+ onRowToggleClick,
58
+ onToggleExpansionClick,
59
+ sortControl,
60
+ tableData,
61
+ tableOptions,
62
+ tableProps,
63
+ toggleExpansionIcon = "arrows-from-line",
64
+ } = props;
65
+
66
+ const [loadingStateRowCount, setLoadingStateRowCount] = useState(
67
+ initialLoadingRowsCount
68
+ );
69
+
70
+ // Create a local state for expanded and setExpanded if expandedControl not used
71
+ const [localExpanded, setLocalExpanded] = useState({});
72
+
73
+ // Determine whether to use the prop or the local state
74
+ const expanded = expandedControl ? expandedControl.value : localExpanded;
75
+ const setExpanded = expandedControl
76
+ ? expandedControl.onChange
77
+ : setLocalExpanded;
78
+
79
+ const columnHelper = createColumnHelper<DataType>();
80
+
81
+ //Create cells for first columns
82
+ const createCellFunction = (cellAccessors: string[]) => {
83
+ const columnCells = ({
84
+ row,
85
+ getValue,
86
+ }: {
87
+ row: Row<DataType>;
88
+ getValue: Getter<string>;
89
+ }) => {
90
+ const rowData = row.original;
91
+
92
+ switch (row.depth) {
93
+ case 0: {
94
+ return (
95
+ <CustomCell
96
+ getValue={getValue}
97
+ onRowToggleClick={onRowToggleClick}
98
+ row={row}
99
+ />
100
+ );
101
+ }
102
+ default: {
103
+ // Handle other depths based on cellAccessors
104
+ const depthAccessor = cellAccessors[row.depth - 1]; // Adjust index for depth
105
+ const accessorValue = rowData[depthAccessor];
106
+ return accessorValue ? (
107
+ <CustomCell row={row}
108
+ value={accessorValue}
109
+ />
110
+ ) : (
111
+ "N/A"
112
+ );
113
+ }
114
+ }
115
+ };
116
+
117
+ return columnCells;
118
+ };
119
+
120
+ //Create column array in format needed by Tanstack
121
+ const columns =
122
+ columnDefinitions &&
123
+ columnDefinitions.map((column) => {
124
+ // Define the base column structure
125
+ const columnStructure = {
126
+ ...columnHelper.accessor(column.accessor, {
127
+ header: column.label,
128
+ }),
129
+ };
130
+ if (column.cellAccessors) {
131
+ columnStructure.cell = createCellFunction(column.cellAccessors);
132
+ }
133
+ return columnStructure;
134
+ });
135
+
136
+ //Syntax for sorting Array if we want to manage state ourselves
137
+ const sorting = [
138
+ {
139
+ id: columnDefinitions[0].accessor,
140
+ desc:
141
+ sortControl && sortControl.value !== null
142
+ ? !sortControl.value.desc
143
+ : false,
144
+ },
145
+ ];
146
+
147
+ const expandAndSortState = () => {
148
+ if (sortControl) {
149
+ return { state: { expanded, sorting } };
150
+ } else {
151
+ return { state: { expanded } };
152
+ }
153
+ };
154
+
155
+ //initialize table
156
+ const table = useReactTable({
157
+ data: loading ? Array(loadingStateRowCount).fill({}) : tableData,
158
+ columns,
159
+ onExpandedChange: setExpanded,
160
+ getSubRows: (row) => row.children,
161
+ getCoreRowModel: getCoreRowModel(),
162
+ getExpandedRowModel: getExpandedRowModel(),
163
+ getSortedRowModel: getSortedRowModel(),
164
+ enableSortingRemoval: false,
165
+ ...expandAndSortState(),
166
+ ...tableOptions,
167
+ });
168
+
169
+ const tableRows = table.getRowModel();
170
+
171
+ // Set table row count for loading state
172
+ const updateLoadingStateRowCount = useCallback(() => {
173
+ const rowsCount = table.getRowModel().rows.length;
174
+ if (rowsCount !== loadingStateRowCount && rowsCount !== 0) {
175
+ setLoadingStateRowCount(rowsCount);
176
+ }
177
+ }, [tableData, loadingStateRowCount]);
178
+
179
+ useEffect(() => {
180
+ if (!loading) {
181
+ updateLoadingStateRowCount();
182
+ }
183
+ }, [loading, updateLoadingStateRowCount]);
184
+
185
+ const handleExpandOrCollapse = (row: Row<DataType>) => {
186
+ onToggleExpansionClick && onToggleExpansionClick(row);
187
+
188
+ const expandedState = expanded as ExpandedStateObject;
189
+ const targetParent = row?.parentId;
190
+ return setExpanded(
191
+ updateExpandAndCollapseState(tableRows, expandedState, targetParent)
192
+ );
193
+ };
194
+
195
+ const ariaProps = buildAriaProps(aria);
196
+ const dataProps = buildDataProps(data);
197
+ const classes = classnames(
198
+ buildCss("pb_advanced_table"),
199
+ globalProps(props),
200
+ className
201
+ );
202
+
203
+ return (
204
+ <div {...ariaProps}
205
+ {...dataProps}
206
+ className={classes}
207
+ id={id}
208
+ >
209
+ <AdvancedTableContext.Provider
210
+ value={{
211
+ table,
212
+ handleExpandOrCollapse,
213
+ loading,
214
+ enableToggleExpansion,
215
+ toggleExpansionIcon,
216
+ setExpanded,
217
+ expanded,
218
+ sortControl,
219
+ }}
220
+ >
221
+ <Table
222
+ className={`${loading ? "content-loading" : ""}`}
223
+ dataTable
224
+ numberSpacing="tabular"
225
+ responsive="none"
226
+ {...tableProps}
227
+ >
228
+ {children ? (
229
+ children
230
+ ) : (
231
+ <>
232
+ <TableHeader />
233
+ <TableBody />
234
+ </>
235
+ )}
236
+ </Table>
237
+ </AdvancedTableContext.Provider>
238
+ </div>
239
+ );
240
+ };
241
+
242
+ AdvancedTable.Header = TableHeader;
243
+ AdvancedTable.Body = TableBody;
244
+
245
+ export default AdvancedTable;
@@ -0,0 +1,56 @@
1
+ import React from "react";
2
+ import { render, screen } from "../utilities/test-utils";
3
+
4
+ import { AdvancedTable } from "../";
5
+
6
+ const MOCK_DATA = [
7
+ {
8
+ year: "2021",
9
+ quarter: null,
10
+ month: null,
11
+ day: null,
12
+ newEnrollments: "20",
13
+ scheduledMeetings: "10",
14
+ children: [
15
+ {
16
+ year: "2011",
17
+ quarter: "Q1",
18
+ month: null,
19
+ day: null,
20
+ newEnrollments: "2",
21
+ scheduledMeetings: "35",
22
+ },
23
+ ],
24
+ },
25
+ ];
26
+
27
+ const columnDefinitions = [
28
+ {
29
+ accessor: "year",
30
+ label: "Year",
31
+ cellAccessors: ["quarter", "month", "day"],
32
+ },
33
+ {
34
+ accessor: "newEnrollments",
35
+ label: "New Enrollments",
36
+ },
37
+ {
38
+ accessor: "scheduledMeetings",
39
+ label: "Scheduled Meetings",
40
+ },
41
+ ];
42
+
43
+ const testId = "advanced_table";
44
+
45
+ test("generated scaffold test", () => {
46
+ render(
47
+ <AdvancedTable
48
+ columnDefinitions={columnDefinitions}
49
+ data={{ testid: testId }}
50
+ tableData={MOCK_DATA}
51
+ />
52
+ );
53
+
54
+ const kit = screen.getByTestId(testId);
55
+ expect(kit).toBeInTheDocument();
56
+ });
@@ -0,0 +1,49 @@
1
+ import React from "react";
2
+ import { AdvancedTable } from "../../";
3
+ import { MOCK_DATA } from "./_mock_data";
4
+
5
+ const AdvancedTableDefault = (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
+ return (
39
+ <div>
40
+ <AdvancedTable
41
+ columnDefinitions={columnDefinitions}
42
+ tableData={MOCK_DATA}
43
+ {...props}
44
+ />
45
+ </div>
46
+ );
47
+ };
48
+
49
+ export default AdvancedTableDefault;
@@ -0,0 +1,13 @@
1
+ The AdvancedTable kit takes the table data and automatically renders expandable subrows for nested items to any depth needed. In it's simplest form, the kit has two required props:
2
+
3
+ `tableData` is the data that the kit needs to consume to render the table. This data will take the structure of an array of objects where each object will be rendered as a row with the key/value pairs being the column values. If an object within that data has children, the kit will automatically create subRows with icon buttons on the parent rows to toggle the subRows open or closed. The toggleExpansionAll button in the first column header can also be used to toggle expansion for the top level parent rows. For a visual of the data structure needed for `tableData`, see [here](https://github.com/powerhome/playbook/blob/PBNTR-177-New-Advanced-Table-Kit/playbook/app/pb_kits/playbook/pb_advanced_table/README.md).
4
+
5
+
6
+ `columnDefinitions` maps to the columns prop on the Tanstack table. Column definitions are the single most important part of building a table as they are responsible for building the underlying data model that is used for all sorting, expansion, etc. `ColumnDefinitions` in the AdvancedTable kit is a array of objects as seen in the code snippet below. Each object within the array has two REQUIRED items:
7
+
8
+ - `accessor`: this is the key from your data for the value you want rendered in that column
9
+ - `label`: this is what will be rendered as the column header label
10
+
11
+ There is also one optional item that is only required if the table has nested data:
12
+
13
+ - `cellAccessors`: This is an array of strings that represent keys from your data object. This is only required for the first column in case of nested data. If you have nested data, the AdvancedTable needs to know what to render in that first column for nested items. This array represents the nested data in the order you want it rendered.
@@ -0,0 +1,57 @@
1
+ import React from "react";
2
+ import { AdvancedTable } from "../..";
3
+ import { MOCK_DATA } from "./_mock_data";
4
+
5
+ const AdvancedTableSort = (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 enableSorting />
51
+ <AdvancedTable.Body subRowHeaders={subRowHeaders} />
52
+ </AdvancedTable>
53
+ </div>
54
+ );
55
+ };
56
+
57
+ export default AdvancedTableSort;
@@ -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
+ ];