glib-web 0.0.17 → 0.0.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +5 -5
  2. data/app/controllers/concerns/application/json/libs.rb +0 -0
  3. data/app/controllers/concerns/application/json/transformation.rb +0 -0
  4. data/app/controllers/concerns/application/json/ui.rb +0 -0
  5. data/app/controllers/concerns/application/json/validation.rb +0 -0
  6. data/app/controllers/glib/home_controller.rb +0 -0
  7. data/app/helpers/glib/json_ui/abstract_builder.rb +0 -0
  8. data/app/helpers/glib/json_ui/action_builder.rb +5 -0
  9. data/app/helpers/glib/json_ui/json_ui_helper.rb +0 -0
  10. data/app/helpers/glib/json_ui/list_builders.rb +4 -2
  11. data/app/helpers/glib/json_ui/menu_builder.rb +0 -0
  12. data/app/helpers/glib/json_ui/page_helper.rb +0 -0
  13. data/app/helpers/glib/json_ui/response_helper.rb +0 -0
  14. data/app/helpers/glib/json_ui/table_builders.rb +0 -0
  15. data/app/helpers/glib/json_ui/view_builder/fields.rb +10 -4
  16. data/app/helpers/glib/json_ui/view_builder/panels.rb +0 -0
  17. data/app/helpers/glib/json_ui/view_builder.rb +0 -0
  18. data/app/views/app/views/json_ui/vue/renderer.html.erb +0 -0
  19. data/app/views/json_ui/garage/_nav_menu.json.jbuilder +0 -0
  20. data/app/views/json_ui/garage/actions/index.json.jbuilder +4 -0
  21. data/app/views/json_ui/garage/forms/basic.json.jbuilder +0 -0
  22. data/app/views/json_ui/garage/forms/basic_post.json.jbuilder +0 -0
  23. data/app/views/json_ui/garage/forms/file_upload.json.jbuilder +0 -0
  24. data/app/views/json_ui/garage/forms/floating_submit.json.jbuilder +0 -0
  25. data/app/views/json_ui/garage/forms/generic_post.json.jbuilder +0 -0
  26. data/app/views/json_ui/garage/forms/index.json.jbuilder +0 -0
  27. data/app/views/json_ui/garage/forms/submit_indicator.json.jbuilder +0 -0
  28. data/app/views/json_ui/garage/forms/submit_indicator_post.json.jbuilder +0 -0
  29. data/app/views/json_ui/garage/home/index.json.jbuilder +0 -0
  30. data/app/views/json_ui/garage/lists/_infinite_scroll_section.json.jbuilder +0 -0
  31. data/app/views/json_ui/garage/lists/index.json.jbuilder +0 -0
  32. data/app/views/json_ui/garage/lists/infinite_scroll.json.jbuilder +0 -0
  33. data/app/views/json_ui/garage/lists/templating.json.jbuilder +0 -0
  34. data/app/views/json_ui/garage/pages/full_width_height.json.jbuilder +0 -0
  35. data/app/views/json_ui/garage/pages/index.json.jbuilder +1 -1
  36. data/app/views/json_ui/garage/pages/layout.json.jbuilder +0 -0
  37. data/app/views/json_ui/garage/pages/nav_buttons.json.jbuilder +0 -0
  38. data/app/views/json_ui/garage/pages/tab_bar.json.jbuilder +6 -1
  39. data/app/views/json_ui/garage/panels/carousel.json.jbuilder +0 -0
  40. data/app/views/json_ui/garage/panels/horizontal.json.jbuilder +0 -0
  41. data/app/views/json_ui/garage/panels/index.json.jbuilder +0 -0
  42. data/app/views/json_ui/garage/panels/split.json.jbuilder +0 -0
  43. data/app/views/json_ui/garage/panels/vertical.json.jbuilder +0 -0
  44. data/app/views/json_ui/garage/views/basic.json.jbuilder +0 -0
  45. data/app/views/json_ui/garage/views/carousels.json.jbuilder +0 -0
  46. data/app/views/json_ui/garage/views/images.json.jbuilder +0 -0
  47. data/app/views/json_ui/garage/views/index.json.jbuilder +0 -0
  48. data/config/routes.rb +0 -0
  49. data/lib/glib/engine.rb +0 -0
  50. data/lib/glib/version.rb +0 -0
  51. data/lib/glib-web.rb +0 -0
  52. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 37f5a86cf199902c86ae1b37bb44dda7cdfebdb7b61d88727e31f4d52f769163
4
- data.tar.gz: 268f40aba50e2502dfcbb2ba5f73177c3cc1c54aa88a2b13e64ca12395e0a454
2
+ SHA1:
3
+ metadata.gz: fe9f19c7e6a69778875274741060852647f87e8b
4
+ data.tar.gz: 395f49b7078ed33023036ec7daff9f24909c9427
5
5
  SHA512:
6
- metadata.gz: d1e36aaeaa72a7a3c9085a1a9f023024bbc548746c402094e019b46c07a1d82f57528b062e63d0363cd33495479bcca673211d67aff3864f6611e5eaaadeb48c
7
- data.tar.gz: 850d283a24a5bdf9c1acab29c59399ee9275d683a7081339303185749f21e5f39bca7a38e4f3115c7f7cf631b9f1054ef330fe5b70efa620075040fe686e3460
6
+ metadata.gz: 18b4c219dd6619b6a4130c88f28e836bf71e840e24ac51485d089179697147d1ddde6f2b5a8c5d24e12122bfd444b506f20a4e008bf283ca0df5999777d1c768
7
+ data.tar.gz: ea2598093f771f7e5e46caa371b87f185d38200c39d2175b8d7aa83b59d1ed96b3a97778b7ec8142dfbb8aa89498f050311afb01de2ac7553a8b4d27cff1d895
File without changes
File without changes
File without changes
File without changes
@@ -35,6 +35,11 @@ module Glib
35
35
  class Open < Action
36
36
  string :url
37
37
  end
38
+
39
+ class Snackbar < Action
40
+ string :message
41
+ end
42
+
38
43
  end
39
44
 
40
45
  module Forms
File without changes
@@ -32,7 +32,8 @@ module Glib
32
32
  json.header do
33
33
  json.padding options[:padding]
34
34
  json.childViews do
35
- yield page.view_builder
35
+ options[:childViews]&.call page.view_builder
36
+ # yield page.view_builder
36
37
  end
37
38
  end
38
39
  end
@@ -54,7 +55,8 @@ module Glib
54
55
  json.footer do
55
56
  json.padding options[:padding]
56
57
  json.childViews do
57
- yield page.view_builder
58
+ options[:childViews]&.call page.view_builder
59
+ # yield page.view_builder
58
60
  end
59
61
  end
60
62
  end
File without changes
File without changes
File without changes
File without changes
@@ -1,14 +1,20 @@
1
+ module Glib
2
+ class DEFAULT
3
+ end
4
+ end
5
+
1
6
  class Glib::JsonUi::ViewBuilder
2
7
  module Fields
8
+
3
9
  class AbstractField < View
4
10
  string :label
5
11
 
6
12
  def name(name)
7
- @name = name
13
+ @name = name if name != Glib::DEFAULT
8
14
  end
9
15
 
10
16
  def value(value)
11
- @value = value
17
+ @value = value if value != Glib::DEFAULT
12
18
  end
13
19
 
14
20
  def prop(prop)
@@ -43,8 +49,7 @@ class Glib::JsonUi::ViewBuilder
43
49
  class Check < Text
44
50
  end
45
51
 
46
- # TODO: use camel case (i.e. textArea). We want to use the same naming with html as much as possible but we shouldn't just blindly
47
- # use the same capitalization because that will introduce inconsistencies.
52
+ # This doesn't use camel case because some terms have become single words (e.g. snackbar)
48
53
  class Textarea < Text
49
54
  bool :readOnly
50
55
  end
@@ -75,5 +80,6 @@ class Glib::JsonUi::ViewBuilder
75
80
  string :value
76
81
  int :file_size_limit
77
82
  end
83
+
78
84
  end
79
85
  end
File without changes
File without changes
File without changes
File without changes
@@ -34,6 +34,10 @@ json_ui_page json do |page|
34
34
  action.dialogs_open url: json_ui_garage_url(path: 'forms/basic')
35
35
  end
36
36
 
37
+ row.thumbnail title: 'dialogs/snackbar (TODO)', onClick: ->(action) do
38
+ action.dialogs_snackbar message: 'This is a snackbar'
39
+ end
40
+
37
41
  end
38
42
 
39
43
  end
File without changes
File without changes
File without changes
File without changes
@@ -50,7 +50,7 @@ json_ui_page json do |page|
50
50
  action.windows_open url: json_ui_garage_url(path: 'pages/full_width_height')
51
51
  end
52
52
 
53
- row.thumbnail title: 'Tab Bar (TODO: fix tab selection)', onClick: ->(action) do
53
+ row.thumbnail title: 'Tab Bar', onClick: ->(action) do
54
54
  action.windows_open url: json_ui_garage_url(path: 'pages/tab_bar')
55
55
  end
56
56
  end
File without changes
@@ -3,7 +3,7 @@ json.title 'Pages'
3
3
  render "#{@path_prefix}/nav_menu", json: json
4
4
 
5
5
  json_ui_page json do |page|
6
- page.header padding: {top: 12, left: 20, right: 20, bottom: 12}, childViews: ->(header) do
6
+ page.header childViews: ->(header) do
7
7
  json.child! do
8
8
  json.view 'tabBar-v1'
9
9
  json.width 'matchParent'
@@ -34,4 +34,9 @@ json_ui_page json do |page|
34
34
  end
35
35
  end
36
36
  end
37
+
38
+ page.scroll padding: {top: 12, left: 20, right: 20, bottom: 12}, childViews: ->(scroll) do
39
+ scroll.label text: "Tab index #{params[:tab]} selected"
40
+ end
41
+
37
42
  end
File without changes
File without changes
File without changes
File without changes
File without changes
data/config/routes.rb CHANGED
File without changes
data/lib/glib/engine.rb CHANGED
File without changes
data/lib/glib/version.rb CHANGED
File without changes
data/lib/glib-web.rb CHANGED
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glib-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -99,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  version: '0'
100
100
  requirements: []
101
101
  rubyforge_project:
102
- rubygems_version: 2.7.6
102
+ rubygems_version: 2.6.8
103
103
  signing_key:
104
104
  specification_version: 4
105
105
  summary: ''