playbook_ui 13.7.0.pre.alpha.play845allkitsbytypes1234 → 13.7.0.pre.alpha.play978makehighchartsadevdependencypoc1223
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dist/menu.yml +110 -235
- data/dist/playbook-rails.js +7 -7
- data/lib/playbook/pb_doc_helper.rb +15 -40
- data/lib/playbook/version.rb +1 -1
- metadata +2 -2
@@ -27,58 +27,33 @@ module Playbook
|
|
27
27
|
|
28
28
|
# Deal with lists of kits, used in Playbook doc and Externally
|
29
29
|
# rubocop:disable Style/StringConcatenation
|
30
|
-
def pb_kits(type: "rails", limit_examples: false, dark_mode: false)
|
30
|
+
def pb_kits(type: "rails", limit_examples: false, dark_mode: false, method: get_kits)
|
31
31
|
display_kits = []
|
32
|
-
kits =
|
32
|
+
kits = method
|
33
33
|
kits.each do |kit|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
34
|
+
if kit.is_a?(Hash)
|
35
|
+
nav_hash_array(kit).each do |sub_kit|
|
36
|
+
display_kits << render_pb_doc_kit(sub_kit, type, limit_examples, false, dark_mode)
|
37
|
+
end
|
38
|
+
else
|
39
|
+
display_kits << render_pb_doc_kit(kit, type, limit_examples, false, dark_mode)
|
39
40
|
end
|
40
41
|
end
|
41
42
|
raw("<div class='pb--docItem'>" + display_kits.join("</div><div class='pb--docItem'>") + "</div>")
|
42
43
|
end
|
43
44
|
# rubocop:enable Style/StringConcatenation
|
44
45
|
|
45
|
-
|
46
|
+
# rubocop:disable Naming/AccessorMethodName
|
47
|
+
def get_kits
|
46
48
|
menu = YAML.load_file(Playbook::Engine.root.join("dist/menu.yml"))
|
47
|
-
menu["kits"]
|
49
|
+
menu["kits"]
|
48
50
|
end
|
49
51
|
|
50
|
-
def
|
51
|
-
menu = YAML.load_file(
|
52
|
-
|
53
|
-
|
54
|
-
# Loop over each type (rails, react, swift, etc.)
|
55
|
-
menu["kits"].each do |_type, kits|
|
56
|
-
kits.each do |kit|
|
57
|
-
case kit
|
58
|
-
when Hash
|
59
|
-
kit_name = kit.keys.first
|
60
|
-
existing_kit = all_kits.find { |k| k.is_a?(Hash) && k.keys.first == kit_name }
|
61
|
-
|
62
|
-
if existing_kit
|
63
|
-
existing_kit[kit_name] += kit[kit_name] unless kit[kit_name].nil?
|
64
|
-
existing_kit[kit_name].uniq!
|
65
|
-
existing_kit[kit_name].sort!
|
66
|
-
else
|
67
|
-
all_kits << { kit_name => kit[kit_name] }
|
68
|
-
end
|
69
|
-
when String
|
70
|
-
all_kits << kit unless all_kits.include?(kit)
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
# Sort the top-level entries
|
76
|
-
all_kits.sort_by! do |kit|
|
77
|
-
kit.is_a?(Hash) ? kit.keys.first : kit
|
78
|
-
end
|
79
|
-
|
80
|
-
all_kits
|
52
|
+
def get_kits_pb_website
|
53
|
+
menu = YAML.load_file(Rails.root.join("config/menu.yml"))
|
54
|
+
menu["kits"]
|
81
55
|
end
|
56
|
+
# rubocop:enable Naming/AccessorMethodName
|
82
57
|
|
83
58
|
# rubocop:disable Style/OptionalBooleanParameter
|
84
59
|
def render_pb_doc_kit(kit, type, limit_examples, code = true, dark_mode = false)
|
data/lib/playbook/version.rb
CHANGED
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: 13.7.0.pre.alpha.
|
4
|
+
version: 13.7.0.pre.alpha.play978makehighchartsadevdependencypoc1223
|
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: 2023-09-
|
12
|
+
date: 2023-09-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|