glib-web 0.0.5 → 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.
Files changed (41) hide show
  1. checksums.yaml +5 -5
  2. metadata +3 -42
  3. data/app/controllers/concerns/.keep +0 -0
  4. data/app/controllers/concerns/application/json/libs.rb +0 -26
  5. data/app/controllers/concerns/application/json/transformation.rb +0 -11
  6. data/app/controllers/concerns/application/json/ui.rb +0 -61
  7. data/app/controllers/concerns/application/json/validation.rb +0 -13
  8. data/app/controllers/home_controller.rb +0 -20
  9. data/app/helpers/glib/web/json_ui_helper.rb +0 -58
  10. data/app/views/_nav_menu.json.jbuilder +0 -84
  11. data/app/views/actions/index.json.jbuilder +0 -25
  12. data/app/views/app/views/json_ui/vue/renderer.html.slim +0 -24
  13. data/app/views/forms/basic.json.jbuilder +0 -53
  14. data/app/views/forms/basic_post.json.jbuilder +0 -10
  15. data/app/views/forms/file_upload.json.jbuilder +0 -38
  16. data/app/views/forms/floating_submit.json.jbuilder +0 -48
  17. data/app/views/forms/generic_post.json.jbuilder +0 -6
  18. data/app/views/forms/index.json.jbuilder +0 -43
  19. data/app/views/forms/submit_indicator.json.jbuilder +0 -32
  20. data/app/views/forms/submit_indicator_post.json.jbuilder +0 -12
  21. data/app/views/home/index.json.jbuilder +0 -61
  22. data/app/views/lists/_infinite_scroll_section.json.jbuilder +0 -10
  23. data/app/views/lists/index.json.jbuilder +0 -25
  24. data/app/views/lists/infinite_scroll.json.jbuilder +0 -27
  25. data/app/views/lists/templating.json.jbuilder +0 -45
  26. data/app/views/pages/full_width_height.json.jbuilder +0 -39
  27. data/app/views/pages/index.json.jbuilder +0 -35
  28. data/app/views/pages/layout.json.jbuilder +0 -35
  29. data/app/views/pages/nav_buttons.json.jbuilder +0 -32
  30. data/app/views/panels/horizontal.json.jbuilder +0 -213
  31. data/app/views/panels/index.json.jbuilder +0 -34
  32. data/app/views/panels/split.json.jbuilder +0 -360
  33. data/app/views/panels/vertical.json.jbuilder +0 -94
  34. data/app/views/views/basic.json.jbuilder +0 -21
  35. data/app/views/views/carousels.json.jbuilder +0 -100
  36. data/app/views/views/images.json.jbuilder +0 -56
  37. data/app/views/views/index.json.jbuilder +0 -34
  38. data/config/routes.rb +0 -4
  39. data/lib/glib/engine.rb +0 -7
  40. data/lib/glib/version.rb +0 -5
  41. data/lib/glib-web.rb +0 -2
@@ -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,38 +0,0 @@
1
- json.title 'Forms'
2
-
3
- render './nav_menu', json: json
4
-
5
- options = {
6
- url: json_ui_garage_url(path: 'forms/generic_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/file-v1'
13
- json.name 'user[photo]'
14
- json.width 'matchParent'
15
- json.label 'Photo'
16
-
17
- json.value 'VALUE_OF_THE_PREVIOUS_IMAGE_WHICH_IS_USEFUL_WHEN_UPDATING_EXISTING_MODEL'
18
-
19
- json.accepts "image/*"
20
- # json.s3_bucket 'BUCKET_NAME'
21
- # json.s3_path_prefix 'uploads/images'
22
- json.s3_direct_upload_url rails_direct_uploads_path
23
-
24
- # This is for security so we don't have to reveal key/secret in the json api
25
- # json.s3_signature_url 'URL_TO_OUR_SERVER_TO_GET_GENERATED_SIGNATURE'
26
-
27
- json.file_size_limit 5000 # 5 MB
28
- json.file_size_limit_alert_text 'Too big!'
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
- 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,6 +0,0 @@
1
- sleep 0.5
2
-
3
- json.onResponse do
4
- json.action 'dialogs/alert-v1'
5
- json.message 'Success!'
6
- end
@@ -1,43 +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 json_ui_garage_url(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 json_ui_garage_url(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 json_ui_garage_url(path: 'forms/floating_submit')
31
- end
32
- end
33
-
34
- json.child! do
35
- json.template 'thumbnail-v1'
36
- json.title 'File Upload'
37
- json.onClick do
38
- json.action 'windows/open-v1'
39
- json.url json_ui_garage_url(path: 'forms/file_upload')
40
- end
41
- end
42
- end
43
- 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,61 +0,0 @@
1
- json.title 'Components'
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 'Pages'
10
- json.onClick do
11
- json.action 'windows/open-v1'
12
- json.url json_ui_garage_url(path: 'pages/index')
13
- end
14
- end
15
-
16
- json.child! do
17
- json.template 'thumbnail-v1'
18
- json.title 'Lists'
19
- json.onClick do
20
- json.action 'windows/open-v1'
21
- json.url json_ui_garage_url(path: 'lists/index')
22
- end
23
- end
24
-
25
- json.child! do
26
- json.template 'thumbnail-v1'
27
- json.title 'Forms'
28
- json.onClick do
29
- json.action 'windows/open-v1'
30
- json.url json_ui_garage_url(path: 'forms/index')
31
- end
32
- end
33
-
34
- json.child! do
35
- json.template 'thumbnail-v1'
36
- json.title 'Panels'
37
- json.onClick do
38
- json.action 'windows/open-v1'
39
- json.url json_ui_garage_url(path: 'panels/index')
40
- end
41
- end
42
-
43
- json.child! do
44
- json.template 'thumbnail-v1'
45
- json.title 'Views'
46
- json.onClick do
47
- json.action 'windows/open-v1'
48
- json.url json_ui_garage_url(path: 'views/index')
49
- end
50
- end
51
-
52
- json.child! do
53
- json.template 'thumbnail-v1'
54
- json.title 'Actions'
55
- json.onClick do
56
- json.action 'windows/open-v1'
57
- json.url json_ui_garage_url(path: 'actions/index')
58
- end
59
- end
60
- end
61
- end
@@ -1,10 +0,0 @@
1
- json.rows do
2
- batch_count = 30
3
- batch_count.times do |i|
4
- index = page * batch_count + i
5
- json.child! do
6
- json.template 'thumbnail-v1'
7
- json.title "Item #{index}"
8
- end
9
- end
10
- 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 json_ui_garage_url(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 json_ui_garage_url(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 json_ui_garage_url(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 json_ui_garage_url(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 json_ui_garage_url(path: 'pages/full_width_height')
31
- end
32
- end
33
-
34
- end
35
- end