glib-web 0.5.16 → 0.5.22

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 (36) hide show
  1. checksums.yaml +5 -5
  2. data/app/controllers/concerns/glib/analytics/funnel.rb +60 -0
  3. data/app/controllers/concerns/glib/json/libs.rb +4 -4
  4. data/app/controllers/concerns/glib/json/traversal.rb +1 -0
  5. data/app/controllers/concerns/glib/json/ui.rb +16 -8
  6. data/app/controllers/glib/home_controller.rb +0 -0
  7. data/app/helpers/glib/json_ui/action_builder.rb +12 -0
  8. data/app/helpers/glib/json_ui/menu_builder.rb +48 -6
  9. data/app/helpers/glib/json_ui/page_helper.rb +21 -0
  10. data/app/helpers/glib/json_ui/response_helper.rb +0 -0
  11. data/app/helpers/glib/json_ui/view_builder.rb +36 -19
  12. data/app/helpers/glib/json_ui/view_builder/fields.rb +2 -0
  13. data/app/helpers/glib/json_ui/view_builder/panels.rb +1 -1
  14. data/app/views/json_ui/garage/_nav_menu.json.jbuilder +0 -1
  15. data/app/views/json_ui/garage/actions/_http.json.jbuilder +9 -3
  16. data/app/views/json_ui/garage/actions/index.json.jbuilder +0 -0
  17. data/app/views/json_ui/garage/forms/basic.json.jbuilder +2 -14
  18. data/app/views/json_ui/garage/forms/dynamic_group.json.jbuilder +31 -16
  19. data/app/views/json_ui/garage/forms/pickers.json.jbuilder +0 -0
  20. data/app/views/json_ui/garage/home/index.json.jbuilder +0 -0
  21. data/app/views/json_ui/garage/lists/chat_ui.json.jbuilder +112 -0
  22. data/app/views/json_ui/garage/lists/index.json.jbuilder +2 -2
  23. data/app/views/json_ui/garage/notifications/android_post.json.jbuilder +48 -0
  24. data/app/views/json_ui/garage/notifications/index.json.jbuilder +14 -0
  25. data/app/views/json_ui/garage/pages/nav_buttons.json.jbuilder +4 -16
  26. data/app/views/json_ui/garage/tables/_autoload_section.json.jbuilder +6 -2
  27. data/app/views/json_ui/garage/tables/autoload_all.json.jbuilder +2 -0
  28. data/app/views/json_ui/garage/tables/autoload_as_needed.json.jbuilder +13 -2
  29. data/app/views/json_ui/garage/tables/index.json.jbuilder +19 -20
  30. data/app/views/json_ui/garage/tables/layout.json.jbuilder +26 -28
  31. data/app/views/json_ui/garage/views/banners.json.jbuilder +18 -6
  32. data/app/views/json_ui/garage/views/icons.json.jbuilder +1439 -11
  33. data/app/views/json_ui/garage/views/index.json.jbuilder +6 -3
  34. data/app/views/layouts/json_ui/renderer.html.erb +7 -4
  35. metadata +5 -3
  36. data/app/views/json_ui/garage/lists/chat.json.jbuilder +0 -112
@@ -22,12 +22,15 @@ json_ui_page json do |page|
22
22
  template.thumbnail title: 'Banners', onClick: ->(action) do
23
23
  action.windows_open url: json_ui_garage_url(path: 'views/banners')
24
24
  end
25
- template.thumbnail title: 'Icons', onClick: ->(action) do
26
- action.windows_open url: json_ui_garage_url(path: 'views/icons')
27
- end
28
25
  template.thumbnail title: 'Misc', onClick: ->(action) do
29
26
  action.windows_open url: json_ui_garage_url(path: 'views/misc')
30
27
  end
28
+
29
+ if !Rails.env.test? # Avoid slowing down tests
30
+ template.thumbnail title: 'Icons', onClick: ->(action) do
31
+ action.windows_open url: json_ui_garage_url(path: 'views/icons')
32
+ end
33
+ end
31
34
  end
32
35
  end,
33
36
  ->(section) do
@@ -4,16 +4,19 @@
4
4
  <head>
5
5
  <meta charset="utf-8" />
6
6
  <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport" />
7
-
7
+
8
8
  <title>App</title>
9
9
  <%= csrf_meta_tags %>
10
-
10
+
11
11
  <%= javascript_pack_tag 'vue_renderer', defer: true %>
12
12
  <%#= javascript_include_tag 'vue_renderer_extras', defer: true %>
13
13
 
14
14
  <%= stylesheet_pack_tag 'vue_renderer' %>
15
15
 
16
- <link href="https://fonts.googleapis.com/css?family=Material+Icons" rel="stylesheet" />
16
+ <link href="//fonts.googleapis.com/css?family=Material+Icons" rel="stylesheet" />
17
+
18
+ <%# Without this, checkboxes and radio buttons will not display. %>
19
+ <link href="//cdn.materialdesignicons.com/2.1.99/css/materialdesignicons.min.css" rel="stylesheet" />
17
20
 
18
21
  <%= yield :head %>
19
22
  </head>
@@ -21,7 +24,7 @@
21
24
  <body>
22
25
  <noscript>Please enable JavaScript to view this web site.</noscript>
23
26
  <div id="app"></div>
24
-
27
+
25
28
  <script>
26
29
  var __page = <%= raw @__json_ui_orig_page%>;
27
30
  </script>
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.5.16
4
+ version: 0.5.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -64,6 +64,7 @@ executables: []
64
64
  extensions: []
65
65
  extra_rdoc_files: []
66
66
  files:
67
+ - app/controllers/concerns/glib/analytics/funnel.rb
67
68
  - app/controllers/concerns/glib/auth/policy.rb
68
69
  - app/controllers/concerns/glib/json/dynamic_text.rb
69
70
  - app/controllers/concerns/glib/json/libs.rb
@@ -145,11 +146,12 @@ files:
145
146
  - app/views/json_ui/garage/lists/_autoload_section.json.jbuilder
146
147
  - app/views/json_ui/garage/lists/autoload_all.json.jbuilder
147
148
  - app/views/json_ui/garage/lists/autoload_as_needed.json.jbuilder
148
- - app/views/json_ui/garage/lists/chat.json.jbuilder
149
+ - app/views/json_ui/garage/lists/chat_ui.json.jbuilder
149
150
  - app/views/json_ui/garage/lists/edit_actions.json.jbuilder
150
151
  - app/views/json_ui/garage/lists/fab.json.jbuilder
151
152
  - app/views/json_ui/garage/lists/index.json.jbuilder
152
153
  - app/views/json_ui/garage/lists/templating.json.jbuilder
154
+ - app/views/json_ui/garage/notifications/android_post.json.jbuilder
153
155
  - app/views/json_ui/garage/notifications/index.json.jbuilder
154
156
  - app/views/json_ui/garage/notifications/web_socket.json.jbuilder
155
157
  - app/views/json_ui/garage/pages/flat_centered.json.jbuilder
@@ -243,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
243
245
  version: '0'
244
246
  requirements: []
245
247
  rubyforge_project:
246
- rubygems_version: 2.6.8
248
+ rubygems_version: 2.7.6
247
249
  signing_key:
248
250
  specification_version: 4
249
251
  summary: ''
@@ -1,112 +0,0 @@
1
- json.title 'Lists'
2
-
3
- liked = params[:liked] == 'true'
4
-
5
- json_ui_page json do |page|
6
- render "#{@path_prefix}/nav_menu", json: json, page: page
7
-
8
- page.list firstSection: ->(section) do
9
- section.header padding: { top: 12, left: 16, right: 16, bottom: 12 }, childViews: ->(header) do
10
- header.h3 text: 'Chat with John Doe'
11
- end
12
-
13
- section.rows builder: ->(template) do
14
- # template.thumbnail title: "windows/reload (timestamp: #{DateTime.current.to_i}) -- #{liked}", onClick: ->(action) do
15
- # action.windows_reload
16
- # end, onLongPress: ->(action) do
17
- # action.sheets_select message: "Context Menu (#{DateTime.current.to_i})", buttons: ->(menu) do
18
- # if liked
19
- # menu.button text: 'Cancel 👍', onClick: ->(subaction) do
20
- # subaction.windows_reload url: json_ui_garage_url(path: 'lists/chat', liked: false)
21
- # end
22
- # else
23
- # menu.button text: 'Give 👍', onClick: ->(subaction) do
24
- # subaction.windows_reload url: json_ui_garage_url(path: 'lists/chat', liked: true)
25
- # end
26
- # end
27
- # end
28
- # end
29
-
30
- template.commentOutgoing subtitle: 'Hey!', subsubtitle: l(10.minutes.ago, format: :short), imageUrl: glib_json_image_standard_url, chips: ->(menu) do
31
- menu.button text: '😊 2', styleClass: 'info'
32
- end
33
-
34
- template.commentOutgoing subtitle: 'How are you?', subsubtitle: l(DateTime.current, format: :short)
35
-
36
- template.commentIncoming title: 'John Doe', subtitle: 'Very well', subsubtitle: l(7.minutes.ago, format: :short), imageUrl: glib_json_image_standard_url, chips: ->(menu) do
37
- menu.button text: "👍 #{liked ? 2 : 1}"
38
- end, onLongPress: ->(action) do
39
- action.sheets_select message: 'Context Menu', buttons: ->(menu) do
40
- if liked
41
- menu.button text: 'Cancel 👍', onClick: ->(subaction) do
42
- subaction.windows_reload url: json_ui_garage_url(path: 'lists/chat', liked: false)
43
- end
44
- else
45
- menu.button text: 'Give 👍', onClick: ->(subaction) do
46
- subaction.windows_reload url: json_ui_garage_url(path: 'lists/chat', liked: true)
47
- end
48
- end
49
- end
50
- end
51
- end
52
-
53
- section.footer padding: { top: 12, left: 16, right: 16, bottom: 12 }, childViews: ->(footer) do
54
- # footer.
55
-
56
- # json.ws({
57
- # "socket" => {
58
- # "endpoint" => "/socket/websocket",
59
- # "params" => {
60
- # vsn: '2.0.0',
61
- # token: 'TOKEN'
62
- # }
63
- # },
64
- # # "topic" => "room:30",
65
- # # "event" => "comments_updated",
66
- # "topic" => "links",
67
- # "events" => ["new_link_added"],
68
- # "header" => {
69
- # "user_id" => 2,
70
- # "prev_item_id" => nil,
71
- # "last_item_id" => nil
72
- # }
73
- # })
74
-
75
- # page.form url: json_ui_garage_url(path: 'forms/basic_post'), method: 'post', padding: glib_json_padding_body, paramNameForFormData: 'formData', onSubmit: ->(action) do
76
- # json.action "ws/push"
77
- # json.topic "links"
78
- # json.event "new_link"
79
- # json.payload({
80
- # "club_id": "2",
81
- # "room_id": "30",
82
- # "user_id": "2"
83
- # # title: "TITLE",
84
- # # url: "URL"
85
- # })
86
-
87
- # end, childViews: ->(form) do
88
- # form.spacer height: 14
89
- # form.label text: "Message: #{params[:message]}"
90
- # form.spacer height: 14
91
-
92
- # form.fields_text name: 'message[body]', width: 'matchParent', label: 'Message'
93
-
94
- # # TODO: Change this to radio for selecting alert vs reload response
95
- # form.fields_password name: 'user[password]', width: 'matchParent', label: 'Password'
96
-
97
- # form.fields_hidden name: 'baseUrl', width: 'matchParent', value: json_ui_garage_url(path: 'notifications/web_socket')
98
-
99
- # form.panels_split width: 'matchParent', content: ->(split) do
100
- # # split.left childViews: ->(left) do
101
- # # if params[:mode] == 'dialog'
102
- # # left.button styleClass: 'link', text: 'cancel', onClick: ->(action) { action.dialogs_close }
103
- # # end
104
- # # end
105
- # split.right childViews: ->(right) do
106
- # right.button text: 'Submit', onClick: ->(action) { action.forms_submit }
107
- # end
108
- # end
109
-
110
- end
111
- end
112
- end