json_flit 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/demo/Gemfile +1 -1
- data/demo/Gemfile.lock +9 -5
- data/demo/app/controllers/welcome_controller.rb +4 -0
- data/demo/app/views/welcome/show.html.erb +2 -0
- data/lib/json_flit/builder.rb +16 -0
- data/lib/json_flit/factory/align.rb +13 -0
- data/lib/json_flit/factory/animated_align.rb +7 -0
- data/lib/json_flit/factory/animated_container.rb +7 -0
- data/lib/json_flit/factory/animated_cross_fade.rb +7 -0
- data/lib/json_flit/factory/animated_default_text_style.rb +7 -0
- data/lib/json_flit/factory/animated_opacity.rb +7 -0
- data/lib/json_flit/factory/animated_padding.rb +7 -0
- data/lib/json_flit/factory/animated_physical_model.rb +7 -0
- data/lib/json_flit/factory/animated_positioned.rb +7 -0
- data/lib/json_flit/factory/animated_positioned_directional.rb +7 -0
- data/lib/json_flit/factory/animated_size.rb +7 -0
- data/lib/json_flit/factory/animated_switcher.rb +7 -0
- data/lib/json_flit/factory/animated_theme.rb +7 -0
- data/lib/json_flit/factory/app_bar.rb +13 -0
- data/lib/json_flit/factory/aspect_ratio.rb +7 -0
- data/lib/json_flit/factory/asset_image.rb +7 -0
- data/lib/json_flit/factory/base.rb +7 -0
- data/lib/json_flit/factory/baseline.rb +7 -0
- data/lib/json_flit/factory/button_bar.rb +7 -0
- data/lib/json_flit/factory/card.rb +7 -0
- data/lib/json_flit/factory/center.rb +7 -0
- data/lib/json_flit/factory/checkbox.rb +7 -0
- data/lib/json_flit/factory/circular_progress_indicator.rb +7 -0
- data/lib/json_flit/factory/clip_oval.rb +7 -0
- data/lib/json_flit/factory/clip_path.rb +7 -0
- data/lib/json_flit/factory/clip_rect.rb +7 -0
- data/lib/json_flit/factory/clip_rrect.rb +7 -0
- data/lib/json_flit/factory/column.rb +7 -0
- data/lib/json_flit/factory/comment.rb +7 -0
- data/lib/json_flit/factory/conditional.rb +7 -0
- data/lib/json_flit/factory/container.rb +7 -0
- data/lib/json_flit/factory/cupertino_switch.rb +7 -0
- data/lib/json_flit/factory/custom_scroll_view.rb +7 -0
- data/lib/json_flit/factory/directionality.rb +7 -0
- data/lib/json_flit/factory/dropdown_button_form_field.rb +7 -0
- data/lib/json_flit/factory/dynamic.rb +7 -0
- data/lib/json_flit/factory/elevated_button.rb +7 -0
- data/lib/json_flit/factory/expanded.rb +7 -0
- data/lib/json_flit/factory/fitted_box.rb +7 -0
- data/lib/json_flit/factory/flexible.rb +7 -0
- data/lib/json_flit/factory/floating_action_button.rb +7 -0
- data/lib/json_flit/factory/form.rb +7 -0
- data/lib/json_flit/factory/fractional_translation.rb +7 -0
- data/lib/json_flit/factory/fractionally_sized.rb +7 -0
- data/lib/json_flit/factory/gesture_detector.rb +7 -0
- data/lib/json_flit/factory/grid_view.rb +7 -0
- data/lib/json_flit/factory/hero.rb +7 -0
- data/lib/json_flit/factory/icon.rb +7 -0
- data/lib/json_flit/factory/icon_button.rb +7 -0
- data/lib/json_flit/factory/ignore_pointer.rb +7 -0
- data/lib/json_flit/factory/indexed_stack.rb +7 -0
- data/lib/json_flit/factory/ink_well.rb +7 -0
- data/lib/json_flit/factory/input_error.rb +7 -0
- data/lib/json_flit/factory/interactive_viewer.rb +7 -0
- data/lib/json_flit/factory/intrinisic_height.rb +7 -0
- data/lib/json_flit/factory/intrinisic_width.rb +7 -0
- data/lib/json_flit/factory/limited_box.rb +7 -0
- data/lib/json_flit/factory/linear_progress_indicator.rb +7 -0
- data/lib/json_flit/factory/list_tile.rb +7 -0
- data/lib/json_flit/factory/list_view.rb +7 -0
- data/lib/json_flit/factory/material.rb +7 -0
- data/lib/json_flit/factory/memory_image.rb +7 -0
- data/lib/json_flit/factory/network_image.rb +7 -0
- data/lib/json_flit/factory/offstage.rb +7 -0
- data/lib/json_flit/factory/opacity.rb +7 -0
- data/lib/json_flit/factory/outlined_button.rb +7 -0
- data/lib/json_flit/factory/overflow_box.rb +7 -0
- data/lib/json_flit/factory/padding.rb +7 -0
- data/lib/json_flit/factory/placeholder.rb +7 -0
- data/lib/json_flit/factory/popup_menu_button.rb +7 -0
- data/lib/json_flit/factory/positioned.rb +7 -0
- data/lib/json_flit/factory/primary_scroll_container.rb +7 -0
- data/lib/json_flit/factory/radio.rb +7 -0
- data/lib/json_flit/factory/rich_text.rb +7 -0
- data/lib/json_flit/factory/row.rb +7 -0
- data/lib/json_flit/factory/safe_area.rb +7 -0
- data/lib/json_flit/factory/save_context.rb +7 -0
- data/lib/json_flit/factory/scaffold.rb +19 -0
- data/lib/json_flit/factory/scroll_configuration.rb +7 -0
- data/lib/json_flit/factory/scrollbar.rb +7 -0
- data/lib/json_flit/factory/set_default_value.rb +7 -0
- data/lib/json_flit/factory/set_scroll_container.rb +7 -0
- data/lib/json_flit/factory/set_value.rb +7 -0
- data/lib/json_flit/factory/single_child_scroll_view.rb +7 -0
- data/lib/json_flit/factory/sized_box.rb +7 -0
- data/lib/json_flit/factory/sliver_grid.rb +7 -0
- data/lib/json_flit/factory/sliver_list.rb +7 -0
- data/lib/json_flit/factory/sliver_padding.rb +7 -0
- data/lib/json_flit/factory/sliver_to_box_adapter.rb +7 -0
- data/lib/json_flit/factory/stack.rb +13 -0
- data/lib/json_flit/factory/switch.rb +7 -0
- data/lib/json_flit/factory/text.rb +7 -0
- data/lib/json_flit/factory/text_button.rb +7 -0
- data/lib/json_flit/factory/text_form_field.rb +7 -0
- data/lib/json_flit/factory/theme.rb +7 -0
- data/lib/json_flit/factory/tooltip.rb +7 -0
- data/lib/json_flit/factory/tween_animation.rb +7 -0
- data/lib/json_flit/factory/wrap.rb +7 -0
- data/lib/json_flit/registry.rb +98 -98
- data/lib/json_flit/version.rb +1 -1
- data/lib/json_flit.rb +4 -0
- metadata +101 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f247d3ee90e1d34dcaa86d5b4d85897f68183818dcc9c2a33d67f64839eb2a4
|
4
|
+
data.tar.gz: af0cde9d821362eb4f76af57f7f40e8b65d9c4bb7f47628b49c08dd416f784df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dde17f78b6f0d509926a5a1821b65fa5ce104683840faab9a58f5228e75c49885478fdd4d6fa1150faa4aefc9ba1bfa9298b70bd63cd4852def6a238cb6427dc
|
7
|
+
data.tar.gz: bc7e2be78c08d7cf8e18627fd4e9c57c5a7e6df0e6e205cf1426000e42679aa3c154bbeadeb1ffa49e558c1ea9a36a2c365bc56516729f747874a80e3562de4c
|
data/Gemfile.lock
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
GIT
|
2
2
|
remote: https://github.com/afstanton/flit_view_components.git
|
3
|
-
revision:
|
3
|
+
revision: 533df306b6e848e350ee99463726e8c9f1ed19b8
|
4
4
|
branch: main
|
5
5
|
specs:
|
6
|
-
flit_view_components (0.0.
|
6
|
+
flit_view_components (0.0.3)
|
7
7
|
view_component (~> 3.0.0rc3)
|
8
8
|
|
9
9
|
PATH
|
10
10
|
remote: .
|
11
11
|
specs:
|
12
|
-
json_flit (0.0.
|
12
|
+
json_flit (0.0.5)
|
13
13
|
flit_view_components
|
14
14
|
|
15
15
|
GEM
|
data/demo/Gemfile
CHANGED
@@ -49,7 +49,7 @@ gem "bootsnap", require: false
|
|
49
49
|
# gem "image_processing", "~> 1.2"
|
50
50
|
|
51
51
|
# The whole point of this demo app is to test this gem
|
52
|
-
gem 'json_flit'
|
52
|
+
gem 'json_flit', path: '../'
|
53
53
|
gem 'flit_view_components', github: 'afstanton/flit_view_components', branch: 'main'
|
54
54
|
|
55
55
|
# For JSON
|
data/demo/Gemfile.lock
CHANGED
@@ -1,11 +1,17 @@
|
|
1
1
|
GIT
|
2
2
|
remote: https://github.com/afstanton/flit_view_components.git
|
3
|
-
revision:
|
3
|
+
revision: 533df306b6e848e350ee99463726e8c9f1ed19b8
|
4
4
|
branch: main
|
5
5
|
specs:
|
6
|
-
flit_view_components (0.0.
|
6
|
+
flit_view_components (0.0.3)
|
7
7
|
view_component (~> 3.0.0rc3)
|
8
8
|
|
9
|
+
PATH
|
10
|
+
remote: ..
|
11
|
+
specs:
|
12
|
+
json_flit (0.0.4)
|
13
|
+
flit_view_components
|
14
|
+
|
9
15
|
GEM
|
10
16
|
remote: https://rubygems.org/
|
11
17
|
specs:
|
@@ -93,8 +99,6 @@ GEM
|
|
93
99
|
jbuilder (2.11.5)
|
94
100
|
actionview (>= 5.0.0)
|
95
101
|
activesupport (>= 5.0.0)
|
96
|
-
json_flit (0.0.2)
|
97
|
-
flit_view_components
|
98
102
|
loofah (2.19.1)
|
99
103
|
crass (~> 1.0.2)
|
100
104
|
nokogiri (>= 1.5.9)
|
@@ -197,7 +201,7 @@ DEPENDENCIES
|
|
197
201
|
flit_view_components!
|
198
202
|
importmap-rails
|
199
203
|
jbuilder
|
200
|
-
json_flit
|
204
|
+
json_flit!
|
201
205
|
multi_json
|
202
206
|
oj
|
203
207
|
propshaft
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module JsonFlit
|
2
|
+
class Builder
|
3
|
+
def initialize(registry:, layout:, data:)
|
4
|
+
@registry = registry
|
5
|
+
@layout = layout
|
6
|
+
@data = data
|
7
|
+
end
|
8
|
+
|
9
|
+
def build
|
10
|
+
builder = @registry.component(@layout['type'])
|
11
|
+
component = builder.new(registry: @registry, layout: @layout, data: @data).build
|
12
|
+
|
13
|
+
component
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|