playbook_ui_docs 14.21.2.pre.alpha.PLAY18938263 → 14.21.2.pre.alpha.PLAY21318324
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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling.jsx +64 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling.md +7 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.jsx +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions_rails.html.erb +3 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +2 -1
- data/dist/playbook-doc.js +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b0f462571bc1431ca67d5171d2b5a9838fd75e72ae1f0470f448ac6a35300d8
|
4
|
+
data.tar.gz: d3873969ab9a0d68461760af9fbb623c17d142d26cceee80989e12f70acb80a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 041f7782cfaf3f1729b85c9b8578aa11077b48219aafcabc952d3936b7283a622b1bcb61e789107b0a2fcafc94840bcd95d5e1d5035499364e68eeef0810b0e3
|
7
|
+
data.tar.gz: 214fec724537c6ea9cc16cff23d202ed2213145d562e747a18951e01381d71c74b388eb6e88d23365f13034a27dc5a705f49719f68147128916578de62e50034
|
@@ -51,7 +51,7 @@
|
|
51
51
|
]
|
52
52
|
%>
|
53
53
|
|
54
|
-
<%= pb_rails("advanced_table", props: { table_data: @table_data, column_definitions: column_definitions }) do %>
|
54
|
+
<%= pb_rails("advanced_table", props: { table_data: @table_data, column_definitions: column_definitions, id: "beta_sort" }) do %>
|
55
55
|
<%= pb_rails("advanced_table/table_header", props: { column_definitions: column_definitions }) %>
|
56
56
|
<%= pb_rails("advanced_table/table_body", props: { id: "beta_sort", table_data: @table_data, column_definitions: column_definitions, enable_toggle_expansion: "all" }) %>
|
57
57
|
<% end %>
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.html.erb
CHANGED
@@ -34,7 +34,7 @@
|
|
34
34
|
subrow_headers = ["Quarter", "Month", "Day"]
|
35
35
|
%>
|
36
36
|
|
37
|
-
<%= pb_rails("advanced_table", props: { table_data: @table_data, column_definitions: column_definitions }) do %>
|
37
|
+
<%= pb_rails("advanced_table", props: { table_data: @table_data, column_definitions: column_definitions, id: "test_table" }) do %>
|
38
38
|
<%= pb_rails("advanced_table/table_header", props: { column_definitions: column_definitions }) %>
|
39
39
|
<%= pb_rails("advanced_table/table_body", props: { id: "test_table", table_data: @table_data, column_definitions: column_definitions, subrow_headers: subrow_headers, enable_toggle_expansion: "all" }) %>
|
40
40
|
<% end %>
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.html.erb
CHANGED
@@ -55,4 +55,4 @@
|
|
55
55
|
},
|
56
56
|
] %>
|
57
57
|
|
58
|
-
<%= pb_rails("advanced_table", props: { id: "
|
58
|
+
<%= pb_rails("advanced_table", props: { id: "beta_table_with_color_headers", table_data: @table_data, column_definitions: column_definitions, column_group_border_color: "text_lt_default", table_props: { vertical_border: true } }) %>
|
@@ -30,4 +30,4 @@
|
|
30
30
|
}
|
31
31
|
] %>
|
32
32
|
|
33
|
-
<%= pb_rails("advanced_table", props: { id: "
|
33
|
+
<%= pb_rails("advanced_table", props: { id: "loading_table", table_data: @table_data, column_definitions: column_definitions, loading: true }) %>
|
@@ -0,0 +1,64 @@
|
|
1
|
+
import React from "react"
|
2
|
+
import AdvancedTable from '../_advanced_table'
|
3
|
+
import MOCK_DATA from "./advanced_table_mock_data_with_id.json"
|
4
|
+
import { colors } from "playbook-ui"
|
5
|
+
|
6
|
+
const AdvancedTableRowStyling = (props) => {
|
7
|
+
const columnDefinitions = [
|
8
|
+
{
|
9
|
+
accessor: "year",
|
10
|
+
label: "Year",
|
11
|
+
cellAccessors: ["quarter", "month", "day"],
|
12
|
+
},
|
13
|
+
{
|
14
|
+
accessor: "newEnrollments",
|
15
|
+
label: "New Enrollments",
|
16
|
+
},
|
17
|
+
{
|
18
|
+
accessor: "scheduledMeetings",
|
19
|
+
label: "Scheduled Meetings",
|
20
|
+
},
|
21
|
+
{
|
22
|
+
accessor: "attendanceRate",
|
23
|
+
label: "Attendance Rate",
|
24
|
+
},
|
25
|
+
{
|
26
|
+
accessor: "completedClasses",
|
27
|
+
label: "Completed Classes",
|
28
|
+
},
|
29
|
+
{
|
30
|
+
accessor: "classCompletionRate",
|
31
|
+
label: "Class Completion Rate",
|
32
|
+
},
|
33
|
+
{
|
34
|
+
accessor: "graduatedStudents",
|
35
|
+
label: "Graduated Students",
|
36
|
+
},
|
37
|
+
]
|
38
|
+
|
39
|
+
const rowStyling = [
|
40
|
+
{
|
41
|
+
rowId: "1",
|
42
|
+
backgroundColor: colors.warning,
|
43
|
+
},
|
44
|
+
{
|
45
|
+
rowId: "8",
|
46
|
+
backgroundColor: colors.category_1,
|
47
|
+
fontColor: colors.white,
|
48
|
+
expandButtonColor: colors.white,
|
49
|
+
},
|
50
|
+
];
|
51
|
+
|
52
|
+
return (
|
53
|
+
<div>
|
54
|
+
<AdvancedTable
|
55
|
+
columnDefinitions={columnDefinitions}
|
56
|
+
rowStyling={rowStyling}
|
57
|
+
tableData={MOCK_DATA}
|
58
|
+
{...props}
|
59
|
+
/>
|
60
|
+
</div>
|
61
|
+
)
|
62
|
+
}
|
63
|
+
|
64
|
+
export default AdvancedTableRowStyling
|
@@ -0,0 +1,7 @@
|
|
1
|
+
The `rowStyling` prop can be used in conjunction with row ids to control certain styling options on individual rows. Currently, `rowStyling` gives you 3 optional controls:
|
2
|
+
|
3
|
+
- `backgroundColor` : use this to control the background color of the row.
|
4
|
+
- `fontColor`: use this to control font color for each row if needed, for example if using a darker background color.
|
5
|
+
- `expandButtonColor`: use this to control the color of the expand icon if needed, for example if using a darker background color.
|
6
|
+
|
7
|
+
**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.
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.jsx
CHANGED
@@ -47,14 +47,14 @@ const CustomActions = () => {
|
|
47
47
|
<CircleIconButton
|
48
48
|
icon="file-csv"
|
49
49
|
onClick={() =>
|
50
|
-
alert(rowIds.length === 0 ? "No Selection Made" :
|
50
|
+
alert(rowIds.length === 0 ? "No Selection Made" : 'Row ids ' + rowIds.join(", ") + 'will be exported!')
|
51
51
|
}
|
52
52
|
variant="link"
|
53
53
|
/>
|
54
54
|
<CircleIconButton
|
55
55
|
icon="trash-alt"
|
56
56
|
onClick={() =>
|
57
|
-
alert(rowIds.length === 0 ? "No Selection Made" :
|
57
|
+
alert(rowIds.length === 0 ? "No Selection Made" : 'Row ids ' + rowIds.join(", ") + 'will be deleted!')
|
58
58
|
}
|
59
59
|
variant="link"
|
60
60
|
/>
|
@@ -88,10 +88,11 @@ actions = [
|
|
88
88
|
if (!selectedRowIds || selectedRowIds.length === 0) {
|
89
89
|
alert('No Selection Made');
|
90
90
|
} else {
|
91
|
+
const selectedRowsString = selectedRowIds.join(', ');
|
91
92
|
if (actionType === 'export') {
|
92
|
-
alert(
|
93
|
+
alert('Row ids ' + selectedRowsString + ' will be exported!');
|
93
94
|
} else if (actionType === 'delete') {
|
94
|
-
alert(
|
95
|
+
alert('Row ids ' + selectedRowsString + ' will be deleted!');
|
95
96
|
}
|
96
97
|
}
|
97
98
|
};
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.html.erb
CHANGED
@@ -30,4 +30,4 @@
|
|
30
30
|
}
|
31
31
|
] %>
|
32
32
|
|
33
|
-
<%= pb_rails("advanced_table", props: { id: "
|
33
|
+
<%= pb_rails("advanced_table", props: { id: "table_props_sticky_table", table_data: @table_data, column_definitions: column_definitions, max_height: "xs", table_props: { sticky: true }}) %>
|
@@ -59,5 +59,6 @@ examples:
|
|
59
59
|
- advanced_table_column_visibility_multi: Column Visibility Control with Multi-Header Columns
|
60
60
|
- advanced_table_pinned_rows: Pinned Rows
|
61
61
|
- advanced_table_scrollbar_none: Advanced Table Scrollbar None
|
62
|
+
- advanced_table_row_styling: Row Styling
|
62
63
|
- advanced_table_column_styling: Column Styling
|
63
64
|
- advanced_table_column_styling_column_headers: Column Styling with Multiple Headers
|
@@ -34,5 +34,6 @@ export { default as AdvancedTableColumnVisibilityMulti } from './_advanced_table
|
|
34
34
|
export { default as AdvancedTableColumnVisibilityWithState } from './_advanced_table_column_visibility_with_state.jsx'
|
35
35
|
export { default as AdvancedTablePinnedRows } from './_advanced_table_pinned_rows.jsx'
|
36
36
|
export { default as AdvancedTableScrollbarNone} from './_advanced_table_scrollbar_none.jsx'
|
37
|
+
export { default as AdvancedTableRowStyling } from './_advanced_table_row_styling.jsx'
|
37
38
|
export { default as AdvancedTableColumnStyling } from './_advanced_table_column_styling.jsx'
|
38
|
-
export { default as AdvancedTableColumnStylingColumnHeaders } from './_advanced_table_column_styling_column_headers.jsx'
|
39
|
+
export { default as AdvancedTableColumnStylingColumnHeaders } from './_advanced_table_column_styling_column_headers.jsx'
|