playbook_ui_docs 14.9.0.pre.rc.9 → 14.9.0.pre.rc.10
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/pb_advanced_table/docs/_advanced_table_beta.html.erb +1 -1
- 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_custom_cell_rails.html.erb +53 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell_rails.md +5 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -0
- 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: 63e1b8091f880d7ef84f28bb175bf20bb6608da88c91e586ca84dd62cf8a6ea5
|
4
|
+
data.tar.gz: 0f87d70daf0f4db3094ede1f93fc77a12d47ac013555e59c3bda95b2a624ede2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d997e43805db625ef8888706b5e4f66779927d2abded7fe7d7a4b0113fade5ba8a8c017ac68f28b2ed0aaa10d51965f1b88f45de9af6d36705a63f0956795a08
|
7
|
+
data.tar.gz: 629d8bfcaac4cada46b4ca5107dd49eabaaf2fceac1b39cecb250adcb8b752d3be002c34561e9ea21229a35ad96da74c7151bdc59e5911cf8194dc858cf7e7bd
|
@@ -55,5 +55,5 @@
|
|
55
55
|
|
56
56
|
<%= pb_rails("advanced_table", props: { table_data: @table_data, column_definitions: column_definitions }) do %>
|
57
57
|
<%= pb_rails("advanced_table/table_header", props: { column_definitions: column_definitions }) %>
|
58
|
-
<%= pb_rails("advanced_table/table_body", props: { id: "
|
58
|
+
<%= pb_rails("advanced_table/table_body", props: { id: "beta_sort", table_data: @table_data, column_definitions: column_definitions, subrow_headers: subrow_headers, enable_toggle_expansion: "all" }) %>
|
59
59
|
<% end %>
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<%
|
2
|
+
column_definitions = [
|
3
|
+
{
|
4
|
+
accessor: "year",
|
5
|
+
label: "Year",
|
6
|
+
cellAccessors: ["quarter", "month", "day"],
|
7
|
+
custom_renderer: ->(row, value) {
|
8
|
+
capture do
|
9
|
+
pb_rails("flex") do
|
10
|
+
pb_rails("title", props: { text: value, size: 4 }) +
|
11
|
+
pb_rails("badge", props: { dark: true, margin_left: "xxs", text: row[:newEnrollments].to_i > 20 ? "High" : "Low", variant: "neutral" })
|
12
|
+
end
|
13
|
+
end
|
14
|
+
}
|
15
|
+
},
|
16
|
+
{
|
17
|
+
accessor: "newEnrollments",
|
18
|
+
label: "New Enrollments",
|
19
|
+
custom_renderer: ->(row, value) { pb_rails("pill", props: { text: value, variant: "success" }) }
|
20
|
+
},
|
21
|
+
{
|
22
|
+
accessor: "scheduledMeetings",
|
23
|
+
label: "Scheduled Meetings",
|
24
|
+
custom_renderer: ->(row, value) { content_tag(:a, value, href: "#") }
|
25
|
+
},
|
26
|
+
{
|
27
|
+
accessor: "attendanceRate",
|
28
|
+
label: "Attendance Rate",
|
29
|
+
custom_renderer: ->(row, value) {
|
30
|
+
capture do
|
31
|
+
pb_rails("flex", props: { align_items: "end", orientation: "column" }) do
|
32
|
+
pb_rails("detail", props: { bold: true, color: "default", text: value }) +
|
33
|
+
pb_rails("caption", props: { size: "xs", text: row[:graduatedStudents] })
|
34
|
+
end
|
35
|
+
end
|
36
|
+
}
|
37
|
+
},
|
38
|
+
{
|
39
|
+
accessor: "completedClasses",
|
40
|
+
label: "Completed Classes",
|
41
|
+
},
|
42
|
+
{
|
43
|
+
accessor: "classCompletionRate",
|
44
|
+
label: "Class Completion Rate",
|
45
|
+
},
|
46
|
+
{
|
47
|
+
accessor: "graduatedStudents",
|
48
|
+
label: "Graduated Students",
|
49
|
+
}
|
50
|
+
]
|
51
|
+
%>
|
52
|
+
|
53
|
+
<%= pb_rails("advanced_table", props: { id: "custom_cell", table_data: @table_data, column_definitions: column_definitions }) %>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
The Advanced Table also allows for rendering custom components within individual Cells. To achieve this, you can make use of the optional `custom_renderer` item within each column_definitions. This function gives you access to the current Cell's value if you just want to use that with a custom Kit, but it also gives you access to the entire `row` object. The row object provides all data for the current row.
|
2
|
+
|
3
|
+
See [here](https://playbook.powerapp.cloud/kits/advanced_table/rails#column_definitions) for more indepth information on column_definitions are how to use them.
|
4
|
+
|
5
|
+
See [here](https://github.com/powerhome/playbook/tree/master/playbook/app/pb_kits/playbook/pb_advanced_table#readme) for the structure of the table_data used.
|
@@ -3,6 +3,7 @@ examples:
|
|
3
3
|
- advanced_table_beta: Default (Required Props)
|
4
4
|
- advanced_table_beta_subrow_headers: SubRow Headers
|
5
5
|
- advanced_table_beta_sort: Enable Sorting
|
6
|
+
- advanced_table_custom_cell_rails: Custom Components for Cells
|
6
7
|
|
7
8
|
react:
|
8
9
|
- advanced_table_default: Default (Required Props)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui_docs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 14.9.0.pre.rc.
|
4
|
+
version: 14.9.0.pre.rc.10
|
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: 2024-11-
|
12
|
+
date: 2024-11-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: playbook_ui
|
@@ -43,6 +43,8 @@ files:
|
|
43
43
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.md
|
44
44
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.jsx
|
45
45
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.md
|
46
|
+
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell_rails.html.erb
|
47
|
+
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell_rails.md
|
46
48
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.jsx
|
47
49
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.md
|
48
50
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expanded_control.jsx
|