playbook_ui 14.11.1.pre.alpha.PBNTR7495495 → 14.11.1.pre.alpha.PLAY1720phonenumberinputformatAsYouType5377

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 (68) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/Components/CustomCell.tsx +2 -18
  3. data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +5 -27
  4. data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableBody.tsx +2 -17
  5. data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableHeader.tsx +1 -23
  6. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +0 -29
  7. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +4 -61
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +0 -1
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx +0 -1
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -5
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -6
  12. data/app/pb_kits/playbook/pb_button/button.html.erb +3 -2
  13. data/app/pb_kits/playbook/pb_checkbox/checkbox.html.erb +6 -1
  14. data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +6 -2
  15. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.md +1 -1
  16. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.html.erb +9 -3
  17. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +0 -1
  18. data/app/pb_kits/playbook/pb_dropdown/dropdown.html.erb +12 -7
  19. data/app/pb_kits/playbook/pb_dropdown/dropdown_container.html.erb +14 -9
  20. data/app/pb_kits/playbook/pb_dropdown/dropdown_option.html.erb +11 -6
  21. data/app/pb_kits/playbook/pb_dropdown/dropdown_trigger.html.erb +14 -8
  22. data/app/pb_kits/playbook/pb_list/item.html.erb +8 -30
  23. data/app/pb_kits/playbook/pb_list/item.rb +0 -7
  24. data/app/pb_kits/playbook/pb_list/list.html.erb +11 -31
  25. data/app/pb_kits/playbook/pb_list/list.rb +0 -4
  26. data/app/pb_kits/playbook/pb_selectable_list/selectable_list.html.erb +3 -17
  27. data/app/pb_kits/playbook/pb_selectable_list/selectable_list.rb +0 -3
  28. data/app/pb_kits/playbook/pb_selectable_list/selectable_list_item.html.erb +4 -11
  29. data/app/pb_kits/playbook/pb_selectable_list/selectable_list_item.rb +0 -3
  30. data/app/pb_kits/playbook/pb_table/_table.tsx +3 -2
  31. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_rails.md +2 -2
  32. data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -2
  33. data/app/pb_kits/playbook/pb_table/index.ts +34 -93
  34. data/app/pb_kits/playbook/pb_table/table.html.erb +1 -1
  35. data/app/pb_kits/playbook/pb_table/table.rb +2 -17
  36. data/app/pb_kits/playbook/pb_timeline/_timeline.scss +30 -30
  37. data/dist/chunks/_typeahead-DWVCHt1f.js +36 -0
  38. data/dist/chunks/_weekday_stacked-0vGR_2wj.js +45 -0
  39. data/dist/chunks/{lib-OFT985dg.js → lib-B7sgJtGS.js} +2 -2
  40. data/dist/chunks/{pb_form_validation-CrsXd1-Y.js → pb_form_validation-C5Cc0-1v.js} +1 -1
  41. data/dist/chunks/vendor.js +1 -1
  42. data/dist/playbook-doc.js +1 -1
  43. data/dist/playbook-rails-react-bindings.js +1 -1
  44. data/dist/playbook-rails.js +1 -1
  45. data/dist/playbook.css +1 -1
  46. data/lib/playbook/version.rb +1 -1
  47. metadata +6 -39
  48. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_no_subrows.jsx +0 -50
  49. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.jsx +0 -60
  50. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.md +0 -5
  51. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.jsx +0 -78
  52. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.md +0 -1
  53. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header.jsx +0 -53
  54. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header.md +0 -1
  55. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.jsx +0 -52
  56. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.md +0 -1
  57. data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_no_subrows.json +0 -42
  58. data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_with_id.json +0 -299
  59. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.md +0 -5
  60. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.html.erb +0 -38
  61. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.md +0 -3
  62. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns.html.erb +0 -74
  63. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns_rails.md +0 -3
  64. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns.html.erb +0 -74
  65. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns_rails.md +0 -3
  66. data/app/pb_kits/playbook/pb_table/utilities/addDataTitle.ts +0 -22
  67. data/dist/chunks/_typeahead-D_mMNEad.js +0 -36
  68. data/dist/chunks/_weekday_stacked-CGe59pJD.js +0 -45
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "14.11.1"
5
- VERSION = "14.11.1.pre.alpha.PBNTR7495495"
5
+ VERSION = "14.11.1.pre.alpha.PLAY1720phonenumberinputformatAsYouType5377"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.11.1.pre.alpha.PBNTR7495495
4
+ version: 14.11.1.pre.alpha.PLAY1720phonenumberinputformatAsYouType5377
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-01-22 00:00:00.000000000 Z
12
+ date: 2025-01-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -95,20 +95,6 @@ dependencies:
95
95
  - - "~>"
96
96
  - !ruby/object:Gem::Version
97
97
  version: 0.3.2
98
- - !ruby/object:Gem::Dependency
99
- name: brakeman
100
- requirement: !ruby/object:Gem::Requirement
101
- requirements:
102
- - - '='
103
- - !ruby/object:Gem::Version
104
- version: 7.0.0
105
- type: :development
106
- prerelease: false
107
- version_requirements: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - '='
110
- - !ruby/object:Gem::Version
111
- version: 7.0.0
112
98
  - !ruby/object:Gem::Dependency
113
99
  name: byebug
114
100
  requirement: !ruby/object:Gem::Requirement
@@ -302,21 +288,12 @@ files:
302
288
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading.md
303
289
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.jsx
304
290
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.md
305
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_no_subrows.jsx
306
291
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx
307
292
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.md
308
293
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx
309
294
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.md
310
295
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.jsx
311
296
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.md
312
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.jsx
313
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.md
314
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.jsx
315
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.md
316
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header.jsx
317
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header.md
318
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.jsx
319
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.md
320
297
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.jsx
321
298
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.md
322
299
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_control.jsx
@@ -331,8 +308,6 @@ files:
331
308
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md
332
309
  - app/pb_kits/playbook/pb_advanced_table/docs/_mock_data_inline_loading.js
333
310
  - app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data.json
334
- - app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_no_subrows.json
335
- - app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_with_id.json
336
311
  - app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_pagination_mock_data.json
337
312
  - app/pb_kits/playbook/pb_advanced_table/docs/example.yml
338
313
  - app/pb_kits/playbook/pb_advanced_table/docs/index.js
@@ -1157,11 +1132,8 @@ files:
1157
1132
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.jsx
1158
1133
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.md
1159
1134
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.html.erb
1160
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.md
1161
1135
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.jsx
1162
1136
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.md
1163
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.html.erb
1164
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.md
1165
1137
  - app/pb_kits/playbook/pb_draggable/docs/example.yml
1166
1138
  - app/pb_kits/playbook/pb_draggable/docs/index.js
1167
1139
  - app/pb_kits/playbook/pb_draggable/draggable.html.erb
@@ -2676,17 +2648,13 @@ files:
2676
2648
  - app/pb_kits/playbook/pb_table/docs/_table_sticky.html.erb
2677
2649
  - app/pb_kits/playbook/pb_table/docs/_table_sticky.jsx
2678
2650
  - app/pb_kits/playbook/pb_table/docs/_table_sticky.md
2679
- - app/pb_kits/playbook/pb_table/docs/_table_sticky_columns.html.erb
2680
2651
  - app/pb_kits/playbook/pb_table/docs/_table_sticky_columns.jsx
2681
- - app/pb_kits/playbook/pb_table/docs/_table_sticky_columns_rails.md
2682
2652
  - app/pb_kits/playbook/pb_table/docs/_table_sticky_columns_react.md
2683
2653
  - app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.html.erb
2684
2654
  - app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.jsx
2685
2655
  - app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_rails.md
2686
2656
  - app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_react.md
2687
- - app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns.html.erb
2688
2657
  - app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns.jsx
2689
- - app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns_rails.md
2690
2658
  - app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns_react.md
2691
2659
  - app/pb_kits/playbook/pb_table/docs/_table_striped.html.erb
2692
2660
  - app/pb_kits/playbook/pb_table/docs/_table_striped.jsx
@@ -2764,7 +2732,6 @@ files:
2764
2732
  - app/pb_kits/playbook/pb_table/table_header.rb
2765
2733
  - app/pb_kits/playbook/pb_table/table_row.html.erb
2766
2734
  - app/pb_kits/playbook/pb_table/table_row.rb
2767
- - app/pb_kits/playbook/pb_table/utilities/addDataTitle.ts
2768
2735
  - app/pb_kits/playbook/pb_text_input/_text_input.scss
2769
2736
  - app/pb_kits/playbook/pb_text_input/_text_input.tsx
2770
2737
  - app/pb_kits/playbook/pb_text_input/add_on.html.erb
@@ -3273,11 +3240,11 @@ files:
3273
3240
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3274
3241
  - app/pb_kits/playbook/utilities/text.ts
3275
3242
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3276
- - dist/chunks/_typeahead-D_mMNEad.js
3277
- - dist/chunks/_weekday_stacked-CGe59pJD.js
3243
+ - dist/chunks/_typeahead-DWVCHt1f.js
3244
+ - dist/chunks/_weekday_stacked-0vGR_2wj.js
3278
3245
  - dist/chunks/lazysizes-B7xYodB-.js
3279
- - dist/chunks/lib-OFT985dg.js
3280
- - dist/chunks/pb_form_validation-CrsXd1-Y.js
3246
+ - dist/chunks/lib-B7sgJtGS.js
3247
+ - dist/chunks/pb_form_validation-C5Cc0-1v.js
3281
3248
  - dist/chunks/vendor.js
3282
3249
  - dist/menu.yml
3283
3250
  - dist/playbook-doc.js
@@ -1,50 +0,0 @@
1
- import React from "react"
2
- import { AdvancedTable } from "playbook-ui"
3
- import MOCK_DATA from "./advanced_table_mock_data_no_subrows.json"
4
-
5
- const AdvancedTableNoSubrows = (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
- enableToggleExpansion="all"
43
- tableData={MOCK_DATA}
44
- {...props}
45
- />
46
- </div>
47
- )
48
- }
49
-
50
- export default AdvancedTableNoSubrows
@@ -1,60 +0,0 @@
1
- import React from "react"
2
- import { AdvancedTable } from "playbook-ui"
3
- import MOCK_DATA from "./advanced_table_mock_data_with_id.json"
4
-
5
- const AdvancedTableSelectableRows = (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
- onRowSelectionChange={(selectedRows) => console.log(selectedRows)}
48
- selectableRows
49
- tableData={MOCK_DATA}
50
-
51
- {...props}
52
- >
53
- <AdvancedTable.Header />
54
- <AdvancedTable.Body subRowHeaders={subRowHeaders}/>
55
- </AdvancedTable>
56
- </div>
57
- )
58
- }
59
-
60
- export default AdvancedTableSelectableRows
@@ -1,5 +0,0 @@
1
- `selectableRows` is a boolean prop that if present will add checkboxes to all rows that will allow for selecting rows.
2
-
3
- When a parent row is clicked, it will check all nested children rows, Children rows can be manually checked or unchecked as well.
4
-
5
- The `onRowSelectionChange` prop returns an array of ids of all Rows that have been selected. Open the console on this example and check and uncheck checkboxes to see this is action! __NOTE__: Each object within the `tableData`Array must contain a unique id in order to attach an id to all Rows for this to function.
@@ -1,78 +0,0 @@
1
- import React, {useState} from "react"
2
- import { AdvancedTable, CircleIconButton, Flex } from "playbook-ui"
3
- import MOCK_DATA from "./advanced_table_mock_data_no_subrows.json"
4
-
5
- const AdvancedTableSelectableRowsActions = (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 [selectedRows, setSelectedRows] = useState()
39
-
40
- const CustomActions = () => {
41
- const rowIds = selectedRows ? Object.keys(selectedRows) : [];
42
-
43
- return (
44
- <Flex>
45
- <CircleIconButton
46
- icon="file-csv"
47
- onClick={() =>
48
- alert(rowIds.length === 0 ? "No Selection Made" : `Row ids ${rowIds.join(", ")} will be exported!`)
49
- }
50
- variant="link"
51
- />
52
- <CircleIconButton
53
- icon="trash-alt"
54
- onClick={() =>
55
- alert(rowIds.length === 0 ? "No Selection Made" : `Row ids ${rowIds.join(", ")} will be deleted!`)
56
- }
57
- variant="link"
58
- />
59
- </Flex>
60
- );
61
- };
62
-
63
-
64
- return (
65
- <div>
66
- <AdvancedTable
67
- actions={<CustomActions/>}
68
- columnDefinitions={columnDefinitions}
69
- onRowSelectionChange={(selected) => setSelectedRows(selected)}
70
- selectableRows
71
- tableData={MOCK_DATA}
72
- {...props}
73
- />
74
- </div>
75
- )
76
- }
77
-
78
- export default AdvancedTableSelectableRowsActions
@@ -1 +0,0 @@
1
- Custom actions content can be rendered within the Actions Bar as shown in this doc example. The component passed to `actions` will be rendered on the right of the actionsBar. The `onRowSelectionChange` can then be used to attach the needed click events to those actions.
@@ -1,53 +0,0 @@
1
- import React from "react"
2
- import { AdvancedTable } from "playbook-ui"
3
- import MOCK_DATA from "./advanced_table_mock_data_no_subrows.json"
4
-
5
- const AdvancedTableSelectableRowsHeader = (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
-
39
- return (
40
- <div>
41
- <AdvancedTable
42
- columnDefinitions={columnDefinitions}
43
- onRowSelectionChange={(selectedRows) => console.log(selectedRows)}
44
- selectableRows
45
- showActionsBar={false}
46
- tableData={MOCK_DATA}
47
- {...props}
48
- />
49
- </div>
50
- )
51
- }
52
-
53
- export default AdvancedTableSelectableRowsHeader
@@ -1 +0,0 @@
1
- `showActionsBar` is an optional prop that renders the header at the top showing the row count. This is set to `true` by default but can be toggled off by setting it to `false`
@@ -1,52 +0,0 @@
1
- import React from "react"
2
- import { AdvancedTable } from "playbook-ui"
3
- import MOCK_DATA from "./advanced_table_mock_data_no_subrows.json"
4
-
5
- const AdvancedTableSelectableRowsNoSubrows = (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
-
39
- return (
40
- <div>
41
- <AdvancedTable
42
- columnDefinitions={columnDefinitions}
43
- onRowSelectionChange={(selectedRows) => console.log(selectedRows)}
44
- selectableRows
45
- tableData={MOCK_DATA}
46
- {...props}
47
- />
48
- </div>
49
- )
50
- }
51
-
52
- export default AdvancedTableSelectableRowsNoSubrows
@@ -1 +0,0 @@
1
- `selectableRows` can also be used with tables without nested row data.
@@ -1,42 +0,0 @@
1
- [
2
- {
3
- "year": "2021",
4
- "id": "1",
5
- "newEnrollments": "20",
6
- "scheduledMeetings": "10",
7
- "attendanceRate": "51%",
8
- "completedClasses": "3",
9
- "classCompletionRate": "33%",
10
- "graduatedStudents": "19"
11
- },
12
- {
13
- "year": "2022",
14
- "id": "8",
15
- "newEnrollments": "25",
16
- "scheduledMeetings": "17",
17
- "attendanceRate": "75%",
18
- "completedClasses": "5",
19
- "classCompletionRate": "45%",
20
- "graduatedStudents": "32"
21
- },
22
- {
23
- "year": "2023",
24
- "id": "15",
25
- "newEnrollments": "10",
26
- "scheduledMeetings": "15",
27
- "attendanceRate": "65%",
28
- "completedClasses": "4",
29
- "classCompletionRate": "49%",
30
- "graduatedStudents": "29"
31
- },
32
- {
33
- "year": "2024",
34
- "id": "14",
35
- "newEnrollments": "15",
36
- "scheduledMeetings": "34",
37
- "attendanceRate": "32%",
38
- "completedClasses": "6",
39
- "classCompletionRate": "67%",
40
- "graduatedStudents": "65"
41
- }
42
- ]