playbook_ui_docs 14.11.0.pre.rc.17 → 14.11.1.pre.alpha.PBNTR718simiplifieddraggablereact5392
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_table_props.html.erb +33 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.html.erb +38 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.md +3 -0
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_menu_list.jsx +2 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.jsx +4 -2
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_custom_options.jsx +5 -5
- data/dist/playbook-doc.js +1 -1
- metadata +10 -6
- /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_table_props.md → _advanced_table_table_props_react.md} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e96bc42deed9388524a0a5c1a41ef96911a304f2e7692d97266357e94866fdbd
|
4
|
+
data.tar.gz: e182c50c8356cf1be0adbefb603382a9763e99ff269a3f85954ceabcafccc2ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 560bac8610c0293dcd2b7c3e32ba10d80357f0b2fd33d1ae44590701e54af3b140c88b3bcb1241999c60463100af6dc0bc999e6ca5df9c67423a05555c1d3a38
|
7
|
+
data.tar.gz: 7355125f9f7fff71965410e0413e52d91c855535d2215edf6958234f11761c57ba0779c62c90ab17d205eb496a21479ed18467bec7dfd676070d32c73139fadb
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<% column_definitions = [
|
2
|
+
{
|
3
|
+
accessor: "year",
|
4
|
+
label: "Year",
|
5
|
+
cellAccessors: ["quarter", "month", "day"],
|
6
|
+
},
|
7
|
+
{
|
8
|
+
accessor: "newEnrollments",
|
9
|
+
label: "New Enrollments",
|
10
|
+
},
|
11
|
+
{
|
12
|
+
accessor: "scheduledMeetings",
|
13
|
+
label: "Scheduled Meetings",
|
14
|
+
},
|
15
|
+
{
|
16
|
+
accessor: "attendanceRate",
|
17
|
+
label: "Attendance Rate",
|
18
|
+
},
|
19
|
+
{
|
20
|
+
accessor: "completedClasses",
|
21
|
+
label: "Completed Classes",
|
22
|
+
},
|
23
|
+
{
|
24
|
+
accessor: "classCompletionRate",
|
25
|
+
label: "Class Completion Rate",
|
26
|
+
},
|
27
|
+
{
|
28
|
+
accessor: "graduatedStudents",
|
29
|
+
label: "Graduated Students",
|
30
|
+
}
|
31
|
+
] %>
|
32
|
+
|
33
|
+
<%= pb_rails("advanced_table", props: { id: "table_props_table", table_data: @table_data, column_definitions: column_definitions, table_props: { container: false, sticky: true }}) %>
|
@@ -0,0 +1 @@
|
|
1
|
+
This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table) 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 `table_props` 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).
|
@@ -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_collapsible_trail_rails: Collapsible Trail
|
6
|
+
- advanced_table_table_props: Table Props
|
6
7
|
- advanced_table_beta_sort: Enable Sorting
|
7
8
|
- advanced_table_custom_cell_rails: Custom Components for Cells
|
8
9
|
- advanced_table_column_headers: Multi-Header Columns
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<%= pb_rails("selectable_list",
|
2
|
+
props: {
|
3
|
+
enable_drag: true,
|
4
|
+
variant: "radio",
|
5
|
+
items: [
|
6
|
+
{ drag_id: "41",
|
7
|
+
text: "Task 1",
|
8
|
+
input_options: {
|
9
|
+
value: "1",
|
10
|
+
name: "radio-name",
|
11
|
+
}
|
12
|
+
},
|
13
|
+
{ drag_id: "42",
|
14
|
+
text: "Task 2",
|
15
|
+
checked: true,
|
16
|
+
input_options: {
|
17
|
+
value: "2",
|
18
|
+
name: "radio-name",
|
19
|
+
}
|
20
|
+
},
|
21
|
+
{ drag_id: "43",
|
22
|
+
text: "Task 3",
|
23
|
+
input_options: {
|
24
|
+
value: "3",
|
25
|
+
name: "radio-name",
|
26
|
+
}
|
27
|
+
},
|
28
|
+
{ drag_id: "44",
|
29
|
+
text: "Task 4",
|
30
|
+
input_options: {
|
31
|
+
value: "4",
|
32
|
+
name: "radio-name",
|
33
|
+
}
|
34
|
+
}
|
35
|
+
]
|
36
|
+
}
|
37
|
+
)
|
38
|
+
%>
|
@@ -0,0 +1,3 @@
|
|
1
|
+
For a simplified version of the Draggable API for the SelectableList kit, you can do the following:
|
2
|
+
|
3
|
+
The SelectableList kit is optimized to work with the draggable kit. To enable drag, use the `enable_drag` prop on SelectableList kit AND `drag_id` prop within the SelectableList kit prop. An additional optional boolean prop (set to true by default) of `drag_handle` is also available on SelectableList kit to show the drag handle icon.
|
@@ -45,8 +45,7 @@ const promiseOptions = (inputValue) =>
|
|
45
45
|
|
46
46
|
const TypeaheadWithPillsAsync = (props) => {
|
47
47
|
const [users, setUsers] = useState([])
|
48
|
-
|
49
|
-
const formatValue = (users) => formatUsers(users)
|
48
|
+
|
50
49
|
const formatUsers = (users) => {
|
51
50
|
const results = () => (users.map((user) => {
|
52
51
|
if (Object.keys(user)[0] === 'name' || Object.keys(user)[1] === 'id'){
|
@@ -58,6 +57,9 @@ const TypeaheadWithPillsAsync = (props) => {
|
|
58
57
|
return results()
|
59
58
|
}
|
60
59
|
|
60
|
+
const handleOnChange = (value) => setUsers(formatUsers(value))
|
61
|
+
const formatValue = (users) => formatUsers(users)
|
62
|
+
|
61
63
|
return (
|
62
64
|
<>
|
63
65
|
{users && users.length > 0 && (
|
@@ -83,13 +83,13 @@ const TypeaheadWithPillsAsyncCustomOptions = (props) => {
|
|
83
83
|
onChange={handleOnChange}
|
84
84
|
onMultiValueClick={handleOnMultiValueClick}
|
85
85
|
placeholder="type the name of a Github user"
|
86
|
-
valueComponent={(
|
86
|
+
valueComponent={({imageUrl, label, territory, type}) => (
|
87
87
|
<User
|
88
88
|
avatar
|
89
|
-
avatarUrl={
|
90
|
-
name={
|
91
|
-
territory={
|
92
|
-
title={
|
89
|
+
avatarUrl={imageUrl}
|
90
|
+
name={label}
|
91
|
+
territory={territory}
|
92
|
+
title={type}
|
93
93
|
/>
|
94
94
|
)}
|
95
95
|
{...props}
|