glib-web 0.0.23 → 0.1.0
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
- data/app/controllers/concerns/application/json/libs.rb +0 -0
- data/app/controllers/concerns/application/json/transformation.rb +0 -0
- data/app/controllers/concerns/application/json/ui.rb +0 -0
- data/app/controllers/concerns/application/json/validation.rb +0 -0
- data/app/controllers/glib/home_controller.rb +0 -0
- data/app/helpers/glib/json_ui/abstract_builder.rb +0 -0
- data/app/helpers/glib/json_ui/action_builder.rb +16 -0
- data/app/helpers/glib/json_ui/json_ui_helper.rb +0 -0
- data/app/helpers/glib/json_ui/list_builders.rb +24 -6
- data/app/helpers/glib/json_ui/menu_builder.rb +1 -1
- data/app/helpers/glib/json_ui/page_helper.rb +20 -3
- data/app/helpers/glib/json_ui/response_helper.rb +0 -0
- data/app/helpers/glib/json_ui/table_builders.rb +0 -0
- data/app/helpers/glib/json_ui/view_builder.rb +1 -0
- data/app/helpers/glib/json_ui/view_builder/fields.rb +0 -0
- data/app/helpers/glib/json_ui/view_builder/panels.rb +0 -0
- data/app/views/app/views/json_ui/vue/renderer.html.erb +0 -0
- data/app/views/json_ui/garage/_nav_menu.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/basic.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/basic_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/file_upload.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/floating_submit.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/generic_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/submit_indicator.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/submit_indicator_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/home/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/_infinite_scroll_section.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/infinite_scroll.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/templating.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/full_width_height.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/layout.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/nav_buttons.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/tab_bar.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/carousel.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/horizontal.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/split.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/vertical.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/basic.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/carousels.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/images.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/map_data.json.jbuilder +0 -0
- data/config/routes.rb +0 -0
- data/lib/glib-web.rb +0 -0
- data/lib/glib/engine.rb +0 -0
- data/lib/glib/json_crawler.rb +0 -0
- data/lib/glib/json_crawler/action_crawler.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/action_http.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/nav_initiate.rb +3 -4
- data/lib/glib/json_crawler/action_crawlers/windows_open.rb +0 -0
- data/lib/glib/json_crawler/http.rb +4 -1
- data/lib/glib/json_crawler/router.rb +0 -0
- data/lib/glib/value.rb +0 -0
- data/lib/glib/version.rb +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 2a53e5f3f6be6c7d47601f3a401ebbb9cdb2b8e0
|
|
4
|
+
data.tar.gz: e3ed2b12c3d9a19186864c35d5f771ce63dec2db
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 39369b0bc54cb5ec96d03658a3c50ebb72b5b7a12eab67100ce9cd4e8f540e1c8690d5ee6d09c00c9909cf0ec4bb3a9ffc60ab2c62757ef816aead626e09892c
|
|
7
|
+
data.tar.gz: 56bec0256c4beb322736880f35d7c0ba4fa800d95aaebe820b5be367e31466d356f9a5030401f789dd772ae2468e7fd5604bf2881f825eb3a46e0de38d1c2381
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -36,6 +36,7 @@ module Glib
|
|
|
36
36
|
string :url
|
|
37
37
|
end
|
|
38
38
|
|
|
39
|
+
# Consider renaming to ShowSnackbar
|
|
39
40
|
class Snackbar < Action
|
|
40
41
|
string :message
|
|
41
42
|
end
|
|
@@ -57,8 +58,12 @@ module Glib
|
|
|
57
58
|
string :url
|
|
58
59
|
end
|
|
59
60
|
|
|
61
|
+
class OpenWeb < Action
|
|
62
|
+
string :url
|
|
63
|
+
end
|
|
60
64
|
end
|
|
61
65
|
|
|
66
|
+
# Consider deprecating this. See Data
|
|
62
67
|
module Auth
|
|
63
68
|
class SaveCsrfToken < Action
|
|
64
69
|
string :token
|
|
@@ -66,6 +71,17 @@ module Glib
|
|
|
66
71
|
end
|
|
67
72
|
|
|
68
73
|
end
|
|
74
|
+
|
|
75
|
+
# FUTURE
|
|
76
|
+
module Data
|
|
77
|
+
class SaveCsrfToken < Action
|
|
78
|
+
string :token
|
|
79
|
+
action :onSave
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
class Clear < Action
|
|
83
|
+
end
|
|
84
|
+
end
|
|
69
85
|
|
|
70
86
|
module Http
|
|
71
87
|
class Post < Action
|
|
File without changes
|
|
@@ -28,6 +28,11 @@ module Glib
|
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
class Section < AbstractBuilder
|
|
31
|
+
def initialize json, page, template
|
|
32
|
+
super json, page
|
|
33
|
+
@template = template
|
|
34
|
+
end
|
|
35
|
+
|
|
31
36
|
def header(options = {})
|
|
32
37
|
json.header do
|
|
33
38
|
json.padding options[:padding]
|
|
@@ -38,15 +43,28 @@ module Glib
|
|
|
38
43
|
end
|
|
39
44
|
end
|
|
40
45
|
|
|
41
|
-
def rows(array = nil)
|
|
42
|
-
|
|
46
|
+
# def rows(array = nil)
|
|
47
|
+
# template = page.list_template_builder
|
|
48
|
+
# json.rows do
|
|
49
|
+
# if array
|
|
50
|
+
# array.each do |object|
|
|
51
|
+
# yield template, object
|
|
52
|
+
# end
|
|
53
|
+
# else
|
|
54
|
+
# yield template
|
|
55
|
+
# end
|
|
56
|
+
# end
|
|
57
|
+
# end
|
|
58
|
+
|
|
59
|
+
def rows(options = {})
|
|
60
|
+
block = options[:builder]
|
|
43
61
|
json.rows do
|
|
44
|
-
if
|
|
45
|
-
|
|
46
|
-
|
|
62
|
+
if (objects = options[:objects])
|
|
63
|
+
objects.each do |object|
|
|
64
|
+
block&.call @template, object
|
|
47
65
|
end
|
|
48
66
|
else
|
|
49
|
-
|
|
67
|
+
block&.call @template
|
|
50
68
|
end
|
|
51
69
|
end
|
|
52
70
|
end
|
|
@@ -7,7 +7,8 @@ module Glib
|
|
|
7
7
|
|
|
8
8
|
class Page
|
|
9
9
|
attr_reader :json, :context, :view_builder, :action_builder, :menu_builder
|
|
10
|
-
attr_reader :list_section_builder, :
|
|
10
|
+
attr_reader :list_section_builder, :drawer_content_builder
|
|
11
|
+
|
|
11
12
|
attr_reader :table_section_builder, :table_template_builder
|
|
12
13
|
|
|
13
14
|
# See Panels::Form
|
|
@@ -20,8 +21,10 @@ module Glib
|
|
|
20
21
|
@view_builder = ViewBuilder.new(json, self)
|
|
21
22
|
@action_builder = ActionBuilder.new(json, self)
|
|
22
23
|
@menu_builder = MenuBuilder.new(json, self)
|
|
23
|
-
|
|
24
|
-
@
|
|
24
|
+
|
|
25
|
+
@list_section_builder = ListBuilders::Section.new(json, self, ListBuilders::Template.new(json, self))
|
|
26
|
+
@drawer_content_builder = ListBuilders::Section.new(json, self, @menu_builder)
|
|
27
|
+
|
|
25
28
|
@table_section_builder = TableBuilders::Section.new(json, self)
|
|
26
29
|
@table_template_builder = TableBuilders::Template.new(json, self)
|
|
27
30
|
end
|
|
@@ -32,6 +35,20 @@ module Glib
|
|
|
32
35
|
end
|
|
33
36
|
end
|
|
34
37
|
|
|
38
|
+
def leftDrawer(options = {})
|
|
39
|
+
# json.leftDrawer do
|
|
40
|
+
# json.title options[:title]
|
|
41
|
+
# json.items do
|
|
42
|
+
# yield @menu_builder
|
|
43
|
+
# end
|
|
44
|
+
# end
|
|
45
|
+
|
|
46
|
+
json.leftDrawer do
|
|
47
|
+
options[:content]&.call drawer_content_builder
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
end
|
|
51
|
+
|
|
35
52
|
def header(options = {})
|
|
36
53
|
json.header do
|
|
37
54
|
json.padding options[:padding]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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-web.rb
CHANGED
|
File without changes
|
data/lib/glib/engine.rb
CHANGED
|
File without changes
|
data/lib/glib/json_crawler.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -3,10 +3,9 @@ module Glib
|
|
|
3
3
|
class NavInitiate < ActionCrawler
|
|
4
4
|
def initialize http, args, controller
|
|
5
5
|
@http = http
|
|
6
|
-
json = @http.get args['url'], controller
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
crawl json['leftDrawer']&.[]('items')
|
|
6
|
+
if (json = @http.get args['url'], controller) && (left_drawer = json['leftDrawer'])
|
|
7
|
+
crawl left_drawer['header']&.[]('childViews')
|
|
8
|
+
crawl left_drawer['rows']
|
|
10
9
|
end
|
|
11
10
|
end
|
|
12
11
|
end
|
|
File without changes
|
|
@@ -26,7 +26,10 @@ module Glib
|
|
|
26
26
|
'Client-Version' => user[:version],
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
# Allow repeating urls because excluding them makes the test results really hard to analyze.
|
|
30
|
+
# if history.include?(url)
|
|
31
|
+
|
|
32
|
+
if url.blank?
|
|
30
33
|
nil
|
|
31
34
|
else
|
|
32
35
|
@context.assert_match URI_REGEXP, url
|
|
File without changes
|
data/lib/glib/value.rb
CHANGED
|
File without changes
|
data/lib/glib/version.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
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ''
|
|
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
108
108
|
version: '0'
|
|
109
109
|
requirements: []
|
|
110
110
|
rubyforge_project:
|
|
111
|
-
rubygems_version: 2.
|
|
111
|
+
rubygems_version: 2.6.8
|
|
112
112
|
signing_key:
|
|
113
113
|
specification_version: 4
|
|
114
114
|
summary: ''
|