glib-web 0.0.3 → 0.0.4
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 +5 -5
- metadata +3 -41
- data/app/controllers/concerns/.keep +0 -0
- data/app/controllers/concerns/application/json/libs.rb +0 -26
- data/app/controllers/concerns/application/json/transformation.rb +0 -11
- data/app/controllers/concerns/application/json/ui.rb +0 -61
- data/app/controllers/concerns/application/json/validation.rb +0 -13
- data/app/controllers/home_controller.rb +0 -11
- data/app/helpers/glib/web/json_ui_helper.rb +0 -58
- data/app/views/_nav_menu.json.jbuilder +0 -84
- data/app/views/actions/index.json.jbuilder +0 -25
- data/app/views/app/views/json_ui/vue/renderer.html.slim +0 -24
- data/app/views/forms/basic.json.jbuilder +0 -53
- data/app/views/forms/basic_post.json.jbuilder +0 -10
- data/app/views/forms/floating_submit.json.jbuilder +0 -48
- data/app/views/forms/generic_post.json.jbuilder +0 -6
- data/app/views/forms/index.json.jbuilder +0 -34
- data/app/views/forms/submit_indicator.json.jbuilder +0 -32
- data/app/views/forms/submit_indicator_post.json.jbuilder +0 -12
- data/app/views/home/index.json.jbuilder +0 -92
- data/app/views/lists/_infinite_scroll_section.json.jbuilder +0 -10
- data/app/views/lists/index.json.jbuilder +0 -25
- data/app/views/lists/infinite_scroll.json.jbuilder +0 -27
- data/app/views/lists/templating.json.jbuilder +0 -45
- data/app/views/pages/full_width_height.json.jbuilder +0 -39
- data/app/views/pages/index.json.jbuilder +0 -35
- data/app/views/pages/layout.json.jbuilder +0 -35
- data/app/views/pages/nav_buttons.json.jbuilder +0 -32
- data/app/views/panels/horizontal.json.jbuilder +0 -213
- data/app/views/panels/index.json.jbuilder +0 -34
- data/app/views/panels/split.json.jbuilder +0 -360
- data/app/views/panels/vertical.json.jbuilder +0 -94
- data/app/views/views/basic.json.jbuilder +0 -21
- data/app/views/views/carousels.json.jbuilder +0 -100
- data/app/views/views/images.json.jbuilder +0 -48
- data/app/views/views/index.json.jbuilder +0 -34
- data/config/routes.rb +0 -4
- data/lib/glib-web.rb +0 -2
- data/lib/glib/engine.rb +0 -7
- data/lib/glib/version.rb +0 -5
@@ -1,10 +0,0 @@
|
|
1
|
-
name, email, password = params.require(:user).values_at(:name, :email, :password)
|
2
|
-
json.onResponse do
|
3
|
-
if name.present? && email.present? && password.present?
|
4
|
-
json.action 'dialogs/alert-v1'
|
5
|
-
json.message "Submitted information: #{name}, #{email}, #{password}"
|
6
|
-
else
|
7
|
-
json.action 'dialogs/alert-v1'
|
8
|
-
json.message 'Please enter all required information'
|
9
|
-
end
|
10
|
-
end
|
@@ -1,48 +0,0 @@
|
|
1
|
-
json.title 'Forms'
|
2
|
-
|
3
|
-
render './nav_menu', json: json
|
4
|
-
|
5
|
-
footer = Jbuilder.new do |json|
|
6
|
-
json.padding(top: 12, left: 20, right: 80, bottom: 12)
|
7
|
-
json.backgroundColor '#b3bac2'
|
8
|
-
json.subviews do
|
9
|
-
json.child! do
|
10
|
-
json.view 'label-v1'
|
11
|
-
json.text 'Demonstrates the use Floating Action Button on a form with footer'
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
options = {
|
17
|
-
url: json_ui_garage_url(path: 'forms/generic_post'),
|
18
|
-
method: 'post',
|
19
|
-
padding: { top: 12, left: 20, right: 20, bottom: 12 }
|
20
|
-
}
|
21
|
-
json_body_with_form json, nil, footer, options do
|
22
|
-
30.times do |i|
|
23
|
-
json.child! do
|
24
|
-
json.view 'fields/text-v1'
|
25
|
-
json.name "user[field#{i}]"
|
26
|
-
json.width 'matchParent'
|
27
|
-
json.label "Field#{i}"
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
json.child! do
|
32
|
-
json.view 'button-v1'
|
33
|
-
json.text 'Submit'
|
34
|
-
json.onClick do
|
35
|
-
json.action 'forms/submit-v1'
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
json.child! do
|
40
|
-
json.view 'fab-v1'
|
41
|
-
json.icon do
|
42
|
-
json.materialName 'send'
|
43
|
-
end
|
44
|
-
json.onClick do
|
45
|
-
json.action 'forms/submit-v1'
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
@@ -1,34 +0,0 @@
|
|
1
|
-
json.title 'Forms'
|
2
|
-
|
3
|
-
render './nav_menu', json: json
|
4
|
-
|
5
|
-
json_body_with_list json do
|
6
|
-
json.rows do
|
7
|
-
json.child! do
|
8
|
-
json.template 'thumbnail-v1'
|
9
|
-
json.title 'Basic'
|
10
|
-
json.onClick do
|
11
|
-
json.action 'windows/open-v1'
|
12
|
-
json.url Glib::Web::Engine.routes.url_helpers.json_ui_garage_path(_render: 'v1', path: 'forms/basic')
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
json.child! do
|
17
|
-
json.template 'thumbnail-v1'
|
18
|
-
json.title 'Submit Indicator'
|
19
|
-
json.onClick do
|
20
|
-
json.action 'windows/open-v1'
|
21
|
-
json.url Glib::Web::Engine.routes.url_helpers.json_ui_garage_path(_render: 'v1', path: 'forms/submit_indicator')
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
json.child! do
|
26
|
-
json.template 'thumbnail-v1'
|
27
|
-
json.title 'Floating Submit'
|
28
|
-
json.onClick do
|
29
|
-
json.action 'windows/open-v1'
|
30
|
-
json.url Glib::Web::Engine.routes.url_helpers.json_ui_garage_path(_render: 'v1', path: 'forms/floating_submit')
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
json.title 'Forms'
|
2
|
-
|
3
|
-
render './nav_menu', json: json
|
4
|
-
|
5
|
-
options = {
|
6
|
-
url: json_ui_garage_url(path: 'forms/submit_indicator_post'),
|
7
|
-
method: 'post',
|
8
|
-
padding: { top: 12, left: 20, right: 20, bottom: 12 }
|
9
|
-
}
|
10
|
-
json_body_with_form json, nil, nil, options do
|
11
|
-
json.child! do
|
12
|
-
json.view 'fields/text-v1'
|
13
|
-
json.name 'user[name]'
|
14
|
-
json.width 'matchParent'
|
15
|
-
json.label 'Name'
|
16
|
-
end
|
17
|
-
|
18
|
-
json.child! do
|
19
|
-
json.view 'panels/split-v1'
|
20
|
-
json.width 'matchParent'
|
21
|
-
|
22
|
-
json.content do
|
23
|
-
json.right do
|
24
|
-
json.view 'button-v1'
|
25
|
-
json.text 'Submit'
|
26
|
-
json.onClick do
|
27
|
-
json.action 'forms/submit-v1'
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
sleep 2
|
2
|
-
|
3
|
-
name = params.require(:user)[:name]
|
4
|
-
json.onResponse do
|
5
|
-
if name.present?
|
6
|
-
json.action 'dialogs/alert-v1'
|
7
|
-
json.message "Submitted information: #{name}"
|
8
|
-
else
|
9
|
-
json.action 'dialogs/alert-v1'
|
10
|
-
json.message 'Please enter all required information'
|
11
|
-
end
|
12
|
-
end
|
@@ -1,92 +0,0 @@
|
|
1
|
-
json.title 'Components'
|
2
|
-
|
3
|
-
render './nav_menu', json: json
|
4
|
-
|
5
|
-
search_mode = !params[:name].nil?
|
6
|
-
|
7
|
-
json.rightNavButtons do
|
8
|
-
json.child! do
|
9
|
-
json.icon do
|
10
|
-
json.materialName 'search'
|
11
|
-
end
|
12
|
-
json.onClick do
|
13
|
-
json.action 'dialogs/open-v1'
|
14
|
-
# json.url merchants_url(name: search_mode ? nil : '')
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
json_body_with_list json do
|
20
|
-
# json.header do
|
21
|
-
# json.subviews do
|
22
|
-
# json.child! do
|
23
|
-
# json.view 'label-v1'
|
24
|
-
# json.text 'TODO: Implement search'
|
25
|
-
# end
|
26
|
-
#
|
27
|
-
# json.child! do
|
28
|
-
# json.view 'map-v1'
|
29
|
-
# json.latitude 13.4837
|
30
|
-
# json.longitude 144.7917
|
31
|
-
# json.zoom 11
|
32
|
-
# json.height '250px'
|
33
|
-
# end
|
34
|
-
# end
|
35
|
-
# end
|
36
|
-
|
37
|
-
json.rows do
|
38
|
-
json.child! do
|
39
|
-
json.template 'thumbnail-v1'
|
40
|
-
json.title 'Pages'
|
41
|
-
json.onClick do
|
42
|
-
json.action 'windows/open-v1'
|
43
|
-
json.url Glib::Web::Engine.routes.url_helpers.json_ui_garage_path(path: 'pages/index')
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
json.child! do
|
48
|
-
json.template 'thumbnail-v1'
|
49
|
-
json.title 'Lists'
|
50
|
-
json.onClick do
|
51
|
-
json.action 'windows/open-v1'
|
52
|
-
json.url Glib::Web::Engine.routes.url_helpers.json_ui_garage_path(path: 'lists/index')
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
json.child! do
|
57
|
-
json.template 'thumbnail-v1'
|
58
|
-
json.title 'Forms'
|
59
|
-
json.onClick do
|
60
|
-
json.action 'windows/open-v1'
|
61
|
-
json.url Glib::Web::Engine.routes.url_helpers.json_ui_garage_path(path: 'forms/index')
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
json.child! do
|
66
|
-
json.template 'thumbnail-v1'
|
67
|
-
json.title 'Panels'
|
68
|
-
json.onClick do
|
69
|
-
json.action 'windows/open-v1'
|
70
|
-
json.url Glib::Web::Engine.routes.url_helpers.json_ui_garage_path(path: 'panels/index')
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
json.child! do
|
75
|
-
json.template 'thumbnail-v1'
|
76
|
-
json.title 'Views'
|
77
|
-
json.onClick do
|
78
|
-
json.action 'windows/open-v1'
|
79
|
-
json.url Glib::Web::Engine.routes.url_helpers.json_ui_garage_path(path: 'views/index')
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
83
|
-
json.child! do
|
84
|
-
json.template 'thumbnail-v1'
|
85
|
-
json.title 'Actions'
|
86
|
-
json.onClick do
|
87
|
-
json.action 'windows/open-v1'
|
88
|
-
json.url Glib::Web::Engine.routes.url_helpers.json_ui_garage_path(path: 'actions/index')
|
89
|
-
end
|
90
|
-
end
|
91
|
-
end
|
92
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
json.title 'Forms'
|
2
|
-
|
3
|
-
render './nav_menu', json: json
|
4
|
-
|
5
|
-
json_body_with_list json do
|
6
|
-
json.rows do
|
7
|
-
json.child! do
|
8
|
-
json.template 'thumbnail-v1'
|
9
|
-
json.title 'Templating'
|
10
|
-
json.onClick do
|
11
|
-
json.action 'windows/open-v1'
|
12
|
-
json.url Glib::Web::Engine.routes.url_helpers.json_ui_garage_path(_render: 'v1', path: 'lists/templating')
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
json.child! do
|
17
|
-
json.template 'thumbnail-v1'
|
18
|
-
json.title 'Infinite Scroll'
|
19
|
-
json.onClick do
|
20
|
-
json.action 'windows/open-v1'
|
21
|
-
json.url Glib::Web::Engine.routes.url_helpers.json_ui_garage_path(_render: 'v1', path: 'lists/infinite_scroll')
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
|
2
|
-
page = params[:page].to_i
|
3
|
-
nextPage = {
|
4
|
-
url: json_ui_garage_url(path: 'lists/infinite_scroll', page: page + 1, section_only: 'v1'),
|
5
|
-
autoLoad: true
|
6
|
-
}
|
7
|
-
|
8
|
-
# TODO: Cater
|
9
|
-
# - for SEO: one URL for a standalone page and one URL for pagination only
|
10
|
-
# - for generic approach, e.g. excluding nav_menu when there is no change
|
11
|
-
if params[:section_only].present?
|
12
|
-
json.nextPage nextPage
|
13
|
-
json.sections do
|
14
|
-
json.child! do
|
15
|
-
render 'json_ui/garage/lists/infinite_scroll_section', json: json, page: page
|
16
|
-
end
|
17
|
-
end
|
18
|
-
else
|
19
|
-
json.title 'Lists'
|
20
|
-
|
21
|
-
render './nav_menu', json: json
|
22
|
-
|
23
|
-
options = { nextPage: nextPage }
|
24
|
-
json_body_with_list json, nil, nil, options do
|
25
|
-
render 'json_ui/garage/lists/infinite_scroll_section', json: json, page: page
|
26
|
-
end
|
27
|
-
end
|
@@ -1,45 +0,0 @@
|
|
1
|
-
json.title 'Lists'
|
2
|
-
|
3
|
-
render './nav_menu', json: json
|
4
|
-
|
5
|
-
json_body_with_list json do
|
6
|
-
json.header do
|
7
|
-
json.subviews do
|
8
|
-
json.child! do
|
9
|
-
json.view 'label-v1'
|
10
|
-
json.text 'Section Header'
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
json.rows do
|
16
|
-
json.child! do
|
17
|
-
json.template 'thumbnail-v1'
|
18
|
-
json.title 'Click me'
|
19
|
-
json.onClick do
|
20
|
-
json.action 'dialogs/alert-v1'
|
21
|
-
json.message 'Perform action'
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
json.child! do
|
26
|
-
json.template 'thumbnail-v1'
|
27
|
-
json.title 'Item with subtitle'
|
28
|
-
json.subtitle 'Item subtitle'
|
29
|
-
end
|
30
|
-
|
31
|
-
json.child! do
|
32
|
-
json.template 'thumbnail-v1'
|
33
|
-
json.title 'Item with thumbnail image'
|
34
|
-
json.subtitle 'Item subtitle'
|
35
|
-
json.imageUrl @sample_image_url
|
36
|
-
end
|
37
|
-
|
38
|
-
json.child! do
|
39
|
-
json.template 'featured-v1'
|
40
|
-
json.title 'Featured with featured image'
|
41
|
-
json.subtitle 'Item subtitle'
|
42
|
-
json.imageUrl @sample_image_url
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
@@ -1,39 +0,0 @@
|
|
1
|
-
json.title 'Pages'
|
2
|
-
|
3
|
-
render './nav_menu', json: json
|
4
|
-
|
5
|
-
json.header do
|
6
|
-
json.padding(left: 20, right: 20, top: 5, bottom: 5)
|
7
|
-
json.backgroundColor '#b3bac2'
|
8
|
-
json.subviews do
|
9
|
-
json.child! do
|
10
|
-
json.view 'h1-v1'
|
11
|
-
json.text 'Header'
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
json.content do
|
17
|
-
json.height 'matchParent'
|
18
|
-
json.padding(top: 15, left: 20, right: 20, bottom: 15)
|
19
|
-
json.subviews do
|
20
|
-
json.child! do
|
21
|
-
json.view 'button-v1'
|
22
|
-
json.width 'matchParent'
|
23
|
-
json.height 'matchParent'
|
24
|
-
json.text 'Full Width/Height'
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
json.footer do
|
30
|
-
json.height 80
|
31
|
-
json.padding(left: 20, right: 20, top: 5, bottom: 5)
|
32
|
-
json.backgroundColor '#b3bac2'
|
33
|
-
json.subviews do
|
34
|
-
json.child! do
|
35
|
-
json.view 'h1-v1'
|
36
|
-
json.text 'Footer'
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
json.title 'Pages'
|
2
|
-
|
3
|
-
render './nav_menu', json: json
|
4
|
-
|
5
|
-
json_body_with_list json do
|
6
|
-
json.rows do
|
7
|
-
json.child! do
|
8
|
-
json.template 'thumbnail-v1'
|
9
|
-
json.title 'Nav Buttons'
|
10
|
-
json.onClick do
|
11
|
-
json.action 'windows/open-v1'
|
12
|
-
json.url Glib::Web::Engine.routes.url_helpers.json_ui_garage_path(_render: 'v1', path: 'pages/nav_buttons')
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
json.child! do
|
17
|
-
json.template 'thumbnail-v1'
|
18
|
-
json.title 'Hamburger Layout'
|
19
|
-
json.onClick do
|
20
|
-
json.action 'windows/open-v1'
|
21
|
-
json.url Glib::Web::Engine.routes.url_helpers.json_ui_garage_path(_render: 'v1', path: 'pages/layout')
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
json.child! do
|
26
|
-
json.template 'thumbnail-v1'
|
27
|
-
json.title 'Full Width/Height'
|
28
|
-
json.onClick do
|
29
|
-
json.action 'windows/open-v1'
|
30
|
-
json.url Glib::Web::Engine.routes.url_helpers.json_ui_garage_path(_render: 'v1', path: 'pages/full_width_height')
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
end
|
35
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
json.title 'Pages'
|
2
|
-
|
3
|
-
render './nav_menu', json: json
|
4
|
-
|
5
|
-
header = Jbuilder.new do |json|
|
6
|
-
json.padding(top: 12, left: 20, right: 20, bottom: 12)
|
7
|
-
json.backgroundColor '#b3bac2'
|
8
|
-
json.subviews do
|
9
|
-
json.child! do
|
10
|
-
json.view 'h1-v1'
|
11
|
-
json.text 'Header'
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
footer = Jbuilder.new do |json|
|
17
|
-
json.padding(top: 12, left: 20, right: 20, bottom: 12)
|
18
|
-
json.backgroundColor '#b3bac2'
|
19
|
-
json.subviews do
|
20
|
-
json.child! do
|
21
|
-
json.view 'h1-v1'
|
22
|
-
json.text 'Footer'
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
options = {padding: {top: 20, left: 20, right: 20, bottom: 20}}
|
28
|
-
json_body_with_scroll json, header, footer, options do
|
29
|
-
(1..100).each do |index|
|
30
|
-
json.child! do
|
31
|
-
json.view 'label-v1'
|
32
|
-
json.text 'Content'
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|