playbook_ui 12.26.1.pre.alpha.railsmultilevelimprovements842 → 12.26.1
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_multi_level_select/_multi_level_select.tsx +125 -134
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.html.erb +17 -17
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.jsx +4 -7
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.md +2 -2
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_return_all_selected.html.erb +16 -19
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_return_all_selected.jsx +2 -2
- data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.html.erb +3 -7
- data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.rb +0 -6
- data/dist/playbook-rails.js +1 -1
- data/lib/playbook/forms/builder.rb +0 -1
- data/lib/playbook/version.rb +2 -2
- metadata +7 -9
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_form.html.erb +0 -72
- data/lib/playbook/forms/builder/multi_level_select_field.rb +0 -12
@@ -1,75 +1,72 @@
|
|
1
1
|
<% treeData = [{
|
2
2
|
label: "Power Home Remodeling",
|
3
3
|
value: "Power Home Remodeling",
|
4
|
-
id: "
|
4
|
+
id: "powerhome1",
|
5
5
|
expanded: true,
|
6
|
+
|
6
7
|
children: [
|
7
8
|
{
|
8
9
|
label: "People",
|
9
10
|
value: "People",
|
10
|
-
id: "
|
11
|
+
id: "people1",
|
11
12
|
children: [
|
12
13
|
{
|
13
14
|
label: "Talent Acquisition",
|
14
15
|
value: "Talent Acquisition",
|
15
|
-
id: "
|
16
|
+
id: "talent1",
|
16
17
|
},
|
17
18
|
{
|
18
19
|
label: "Business Affairs",
|
19
20
|
value: "Business Affairs",
|
20
|
-
id: "
|
21
|
+
id: "business1",
|
21
22
|
children: [
|
22
23
|
{
|
23
24
|
label: "Initiatives",
|
24
25
|
value: "Initiatives",
|
25
|
-
id: "
|
26
|
+
id: "initiative1",
|
26
27
|
},
|
27
28
|
{
|
28
29
|
label: "Learning & Development",
|
29
30
|
value: "Learning & Development",
|
30
|
-
id: "
|
31
|
+
id: "development1",
|
31
32
|
},
|
32
33
|
],
|
33
34
|
},
|
34
35
|
{
|
35
36
|
label: "People Experience",
|
36
37
|
value: "People Experience",
|
37
|
-
id: "
|
38
|
+
id: "experience1",
|
38
39
|
},
|
39
40
|
],
|
40
41
|
},
|
41
42
|
{
|
42
43
|
label: "Contact Center",
|
43
44
|
value: "Contact Center",
|
44
|
-
id: "
|
45
|
+
id: "contact1",
|
45
46
|
children: [
|
46
47
|
{
|
47
48
|
label: "Appointment Management",
|
48
49
|
value: "Appointment Management",
|
49
|
-
id: "
|
50
|
+
id: "appointment1",
|
50
51
|
},
|
51
52
|
{
|
52
53
|
label: "Customer Service",
|
53
54
|
value: "Customer Service",
|
54
|
-
id: "
|
55
|
+
id: "customer1",
|
55
56
|
},
|
56
57
|
{
|
57
58
|
label: "Energy",
|
58
59
|
value: "Energy",
|
59
|
-
id: "
|
60
|
+
id: "energy1",
|
60
61
|
},
|
61
62
|
],
|
62
63
|
},
|
63
64
|
],
|
64
|
-
}] %>
|
65
|
-
|
66
|
-
|
65
|
+
}] %>
|
67
66
|
|
68
67
|
|
69
68
|
<%= pb_rails("multi_level_select", props: {
|
70
|
-
id: "multi-level-select
|
71
|
-
|
72
|
-
tree_data: treeData,
|
69
|
+
id: "parent-persistence-multi-level-select",
|
70
|
+
tree_data:treeData,
|
73
71
|
return_all_selected: true
|
74
|
-
}) %>
|
75
|
-
|
72
|
+
}) %>
|
data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_return_all_selected.jsx
CHANGED
@@ -72,9 +72,9 @@ const MultiLevelSelectReturnAllSelected = (props) => {
|
|
72
72
|
return (
|
73
73
|
<div>
|
74
74
|
<MultiLevelSelect
|
75
|
-
id="
|
75
|
+
id="multiselect-parent-persistence"
|
76
76
|
onSelect={(selectedNodes) =>
|
77
|
-
console.log("Selected Items
|
77
|
+
console.log("Selected Items", selectedNodes)
|
78
78
|
}
|
79
79
|
returnAllSelected
|
80
80
|
treeData={treeData}
|
@@ -1,7 +1,3 @@
|
|
1
|
-
<%=
|
2
|
-
|
3
|
-
|
4
|
-
id: object.id,
|
5
|
-
class: object.classname) do %>
|
6
|
-
<%= react_component("MultiLevelSelect", object.multi_level_select_options) %>
|
7
|
-
<% end %>
|
1
|
+
<div id="pb_data_wrapper_<%= object.id %>" data-tree="">
|
2
|
+
<%= react_component("MultiLevelSelect", object.multi_level_select_options ) %>
|
3
|
+
</div>
|
@@ -3,14 +3,10 @@
|
|
3
3
|
module Playbook
|
4
4
|
module PbMultiLevelSelect
|
5
5
|
class MultiLevelSelect < Playbook::KitBase
|
6
|
-
prop :id
|
7
|
-
prop :name
|
8
6
|
prop :tree_data, type: Playbook::Props::Array,
|
9
7
|
default: []
|
10
8
|
prop :return_all_selected, type: Playbook::Props::Boolean,
|
11
9
|
default: false
|
12
|
-
prop :return_complete_data, type: Playbook::Props::Boolean,
|
13
|
-
default: false
|
14
10
|
|
15
11
|
def classname
|
16
12
|
generate_classname("pb_multi_level_select")
|
@@ -19,10 +15,8 @@ module Playbook
|
|
19
15
|
def multi_level_select_options
|
20
16
|
{
|
21
17
|
id: id,
|
22
|
-
name: name,
|
23
18
|
treeData: tree_data,
|
24
19
|
returnAllSelected: return_all_selected,
|
25
|
-
returnCompleteData: return_complete_data,
|
26
20
|
}
|
27
21
|
end
|
28
22
|
end
|