json_flit 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +7 -7
- data/demo/Gemfile +3 -0
- data/demo/Gemfile.lock +9 -6
- data/demo/app/controllers/welcome_controller.rb +1 -1
- data/demo/config/initializers/flit.rb +3 -0
- data/lib/json_flit/builder.rb +3 -13
- data/lib/json_flit/factory/align.rb +6 -0
- data/lib/json_flit/factory/app_bar.rb +6 -0
- data/lib/json_flit/factory/scaffold.rb +9 -3
- data/lib/json_flit/factory/stack.rb +6 -0
- data/lib/json_flit/version.rb +1 -1
- data/lib/json_flit.rb +1 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e0f59b86eaa2735a65d4ea7658e4ffc0a2ee08e1372c14f5f57587e8a0ff825
|
4
|
+
data.tar.gz: c2b866224561143ff7832a0afdfcb2bcbb939cdef1a8b6f6e722b05b68d8b354
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14913ce9ac796e7f21c9c0f4746cc0aa55e96d42db0cd53b14d5145e6663e7751c15335ab87e4ec5be7f65327b817a0321f75766ba9fcad7125e16ebdf7d4dee
|
7
|
+
data.tar.gz: f18f1e24b650d8cdc944162a6260ea440cdaa40fd3b8549bd4c482c9a2bc70cc642ba6e468d473c773cd94e60f73f1e915e4543ac1da238ead1886ffe7514f9a
|
data/Gemfile.lock
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
GIT
|
2
2
|
remote: https://github.com/afstanton/flit_view_components.git
|
3
|
-
revision:
|
3
|
+
revision: 59fbf8012421e595c94c75b322c588681753d7da
|
4
4
|
branch: main
|
5
5
|
specs:
|
6
|
-
flit_view_components (0.0.
|
7
|
-
view_component (~> 3.0.
|
6
|
+
flit_view_components (0.0.6)
|
7
|
+
view_component (~> 3.0.0rc5)
|
8
8
|
|
9
9
|
PATH
|
10
10
|
remote: .
|
11
11
|
specs:
|
12
|
-
json_flit (0.0.
|
12
|
+
json_flit (0.0.6)
|
13
13
|
flit_view_components
|
14
14
|
|
15
15
|
GEM
|
16
16
|
remote: https://rubygems.org/
|
17
17
|
specs:
|
18
|
-
activesupport (7.0.4.
|
18
|
+
activesupport (7.0.4.3)
|
19
19
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
20
20
|
i18n (>= 1.6, < 2)
|
21
21
|
minitest (>= 5.1)
|
@@ -64,7 +64,7 @@ GEM
|
|
64
64
|
tzinfo (2.0.6)
|
65
65
|
concurrent-ruby (~> 1.0)
|
66
66
|
unicode-display_width (2.4.2)
|
67
|
-
view_component (3.0.0.
|
67
|
+
view_component (3.0.0.rc5)
|
68
68
|
activesupport (>= 5.2.0, < 8.0)
|
69
69
|
concurrent-ruby (~> 1.0)
|
70
70
|
method_source (~> 1.0)
|
@@ -80,4 +80,4 @@ DEPENDENCIES
|
|
80
80
|
rubocop (~> 1.21)
|
81
81
|
|
82
82
|
BUNDLED WITH
|
83
|
-
2.4.
|
83
|
+
2.4.8
|
data/demo/Gemfile
CHANGED
@@ -52,6 +52,9 @@ gem "bootsnap", require: false
|
|
52
52
|
gem 'json_flit', path: '../'
|
53
53
|
gem 'flit_view_components', github: 'afstanton/flit_view_components', branch: 'main'
|
54
54
|
|
55
|
+
# By default, Flutter uses Material Design.
|
56
|
+
gem 'material_flit'
|
57
|
+
|
55
58
|
# For JSON
|
56
59
|
gem 'multi_json'
|
57
60
|
gem 'oj'
|
data/demo/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: 59fbf8012421e595c94c75b322c588681753d7da
|
4
4
|
branch: main
|
5
5
|
specs:
|
6
|
-
flit_view_components (0.0.
|
7
|
-
view_component (~> 3.0.
|
6
|
+
flit_view_components (0.0.6)
|
7
|
+
view_component (~> 3.0.0rc5)
|
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
|
@@ -108,6 +108,8 @@ GEM
|
|
108
108
|
net-pop
|
109
109
|
net-smtp
|
110
110
|
marcel (1.0.2)
|
111
|
+
material_flit (0.0.3)
|
112
|
+
flit_view_components
|
111
113
|
method_source (1.0.0)
|
112
114
|
mini_mime (1.1.2)
|
113
115
|
minitest (5.18.0)
|
@@ -178,7 +180,7 @@ GEM
|
|
178
180
|
railties (>= 6.0.0)
|
179
181
|
tzinfo (2.0.6)
|
180
182
|
concurrent-ruby (~> 1.0)
|
181
|
-
view_component (3.0.0.
|
183
|
+
view_component (3.0.0.rc5)
|
182
184
|
activesupport (>= 5.2.0, < 8.0)
|
183
185
|
concurrent-ruby (~> 1.0)
|
184
186
|
method_source (~> 1.0)
|
@@ -202,6 +204,7 @@ DEPENDENCIES
|
|
202
204
|
importmap-rails
|
203
205
|
jbuilder
|
204
206
|
json_flit!
|
207
|
+
material_flit
|
205
208
|
multi_json
|
206
209
|
oj
|
207
210
|
propshaft
|
@@ -219,4 +222,4 @@ RUBY VERSION
|
|
219
222
|
ruby 3.2.1p31
|
220
223
|
|
221
224
|
BUNDLED WITH
|
222
|
-
2.4.
|
225
|
+
2.4.8
|
data/lib/json_flit/builder.rb
CHANGED
@@ -6,21 +6,11 @@ module JsonFlit
|
|
6
6
|
@data = data
|
7
7
|
end
|
8
8
|
|
9
|
-
def build
|
10
|
-
builder = @registry.component(layout['type'])
|
11
|
-
component = builder.new(data: @data).build
|
12
|
-
if layout['children']
|
13
|
-
layout['children'].each do |child|
|
14
|
-
component.children << build(layout: child)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
if layout['child']
|
19
|
-
component.child = build(layout: layout['child'])
|
20
|
-
end
|
9
|
+
def build
|
10
|
+
builder = @registry.component(@layout['type'])
|
11
|
+
component = builder.new(registry: @registry, layout: @layout, data: @data).build
|
21
12
|
|
22
13
|
component
|
23
14
|
end
|
24
|
-
|
25
15
|
end
|
26
16
|
end
|
@@ -1,12 +1,18 @@
|
|
1
1
|
module JsonFlit
|
2
2
|
module Factory
|
3
3
|
class Scaffold
|
4
|
-
def initialize(data:)
|
5
|
-
|
4
|
+
def initialize(registry:, layout:, data:)
|
5
|
+
args = layout['args']
|
6
|
+
|
7
|
+
@app_bar = JsonFlit::Builder.new(registry: registry, layout: args['appBar'], data: data)
|
8
|
+
@body = JsonFlit::Builder.new(registry: registry, layout: args['body'], data: data)
|
6
9
|
end
|
7
10
|
|
8
11
|
def build
|
9
|
-
Flit::ScaffoldComponent.new(
|
12
|
+
Flit::ScaffoldComponent.new(
|
13
|
+
app_bar: @app_bar.build,
|
14
|
+
body: @body.build
|
15
|
+
)
|
10
16
|
end
|
11
17
|
end
|
12
18
|
end
|
data/lib/json_flit/version.rb
CHANGED
data/lib/json_flit.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json_flit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron F Stanton
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: flit_view_components
|
@@ -181,6 +181,7 @@ files:
|
|
181
181
|
- demo/config/initializers/assets.rb
|
182
182
|
- demo/config/initializers/content_security_policy.rb
|
183
183
|
- demo/config/initializers/filter_parameter_logging.rb
|
184
|
+
- demo/config/initializers/flit.rb
|
184
185
|
- demo/config/initializers/inflections.rb
|
185
186
|
- demo/config/initializers/permissions_policy.rb
|
186
187
|
- demo/config/locales/en.yml
|
@@ -332,7 +333,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
332
333
|
- !ruby/object:Gem::Version
|
333
334
|
version: '0'
|
334
335
|
requirements: []
|
335
|
-
rubygems_version: 3.4.
|
336
|
+
rubygems_version: 3.4.8
|
336
337
|
signing_key:
|
337
338
|
specification_version: 4
|
338
339
|
summary: Rails implementation of json_dynamic_widget
|