playbook_ui 13.9.0.pre.alpha.play845allkitsbytypes1260 → 13.9.0.pre.alpha.play845allkitsbytypes1262

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e47bda24af6edbc23255faea9e74418ea82ec02ecafbcce245aca51ead067eb8
4
- data.tar.gz: 7a6417c7fded6d9f5117ed28bcb7207a7d9d286611140aa9d82db0879f91cec6
3
+ metadata.gz: f4efefad3fac932098f8436a5ba32e7949aa5aaa5bb9aef4d876ad35ddec3f25
4
+ data.tar.gz: 456d83d00606bee916bce37e4a358985db6c234200e6e71465204b4317f18ba3
5
5
  SHA512:
6
- metadata.gz: 0a40703a2cbcc0e1fc98ee91a0ba73d219ce1f8172975022c722c3ca425d005a8a05bd3f7290c3bf558a036a53b82a32ea89bad388e5338af9424c66c4ff07ce
7
- data.tar.gz: f0275c462194c5c2db72f027a0e7347cf423e72e50e1004b6e65fe2b10962b993c3cc88e534e87a4ebeee7778f20abace8b3c2ec42e8dcfbdabd1e5512f0ce24
6
+ metadata.gz: e1c9517925cac47db7868497da8792b01b7acd6542b6ee9b2aef3880241acc1f62efc356fe47e6f3a72d6f1e4f102dbeb827782ea84fc48b93b99a0d07034a94
7
+ data.tar.gz: 9a0df5e8ec261a2d26ec5a6686529c8e5f7688b739e5cf751350567e531782645b47507bb7a4734f9fe2bc09526fb633dbb7009f0cd17a434f20e48bdce2c2ba
@@ -36,6 +36,8 @@ module Playbook
36
36
  end
37
37
 
38
38
  def get_kits(type = "rails")
39
+ return [] if type == "swift"
40
+
39
41
  kits = YAML.load_file(Playbook::Engine.root.join("dist/menu.yml")) || []
40
42
 
41
43
  # Filter kits that have at least one component compatible with the type
@@ -69,26 +71,23 @@ module Playbook
69
71
  component_content = ""
70
72
 
71
73
  # Check if parent_kit is not nil
72
- # Check if type is not "swift"
73
- if parent_kit && type != "swift"
74
- # Filter components based on the specified type
75
- components = parent_kit["components"].select { |component| component["platforms"].include?(type) }
76
-
77
- # If it's a parent with components, accumulate the UI content for child components
78
- if components.any?
79
- component_content = components.map do |component|
80
- component_name = component["name"]
81
- title = pb_doc_render_clickable_title(component_name, type) # Use component_name for the title
82
-
83
- # Render the component UI content with the same styles/tags as the parent
84
- component_ui = raw("<div class='pb--docItem-ui'>
74
+ # Filter components based on the specified type
75
+ components = parent_kit["components"].select { |component| component["platforms"].include?(type) }
76
+
77
+ # If it's a parent with components, accumulate the UI content for child components
78
+ if components.any?
79
+ component_content = components.map do |component|
80
+ component_name = component["name"]
81
+ title = pb_doc_render_clickable_title(component_name, type) # Use component_name for the title
82
+
83
+ # Render the component UI content with the same styles/tags as the parent
84
+ component_ui = raw("<div class='pb--docItem-ui'>
85
85
  #{pb_kit(kit: component_name, type: type, show_code: code, limit_examples: limit_examples, dark_mode: dark_mode)}
86
86
  </div>")
87
87
 
88
- # Combine the component name and component UI content
89
- "#{title}#{component_ui}"
90
- end.join.to_s
91
- end
88
+ # Combine the component name and component UI content
89
+ "#{title}#{component_ui}"
90
+ end.join.to_s
92
91
  end
93
92
 
94
93
  # Return the component_content
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "13.9.0"
5
- VERSION = "13.9.0.pre.alpha.play845allkitsbytypes1260"
5
+ VERSION = "13.9.0.pre.alpha.play845allkitsbytypes1262"
6
6
  end
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.9.0.pre.alpha.play845allkitsbytypes1260
4
+ version: 13.9.0.pre.alpha.play845allkitsbytypes1262
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX