glib-web 0.4.20 → 0.4.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +5 -5
  2. data/app/controllers/concerns/glib/auth/policy.rb +0 -0
  3. data/app/controllers/concerns/glib/json/new_dynamic_text.rb +0 -0
  4. data/app/controllers/concerns/glib/json/traversal.rb +0 -0
  5. data/app/controllers/concerns/glib/json/ui.rb +3 -1
  6. data/app/controllers/glib/home_controller.rb +0 -0
  7. data/app/helpers/glib/dynamic_images_helper.rb +0 -0
  8. data/app/helpers/glib/dynamic_texts_helper.rb +0 -0
  9. data/app/helpers/glib/json_ui/abstract_builder.rb +71 -68
  10. data/app/helpers/glib/json_ui/action_builder.rb +0 -0
  11. data/app/helpers/glib/json_ui/list_builders.rb +3 -2
  12. data/app/helpers/glib/json_ui/menu_builder.rb +0 -0
  13. data/app/helpers/glib/json_ui/page_helper.rb +0 -0
  14. data/app/helpers/glib/json_ui/response_helper.rb +0 -0
  15. data/app/helpers/glib/json_ui/split_builders.rb +0 -0
  16. data/app/helpers/glib/json_ui/styling_helper.rb +0 -0
  17. data/app/helpers/glib/json_ui/table_builders.rb +0 -0
  18. data/app/helpers/glib/json_ui/view_builder.rb +0 -0
  19. data/app/helpers/glib/json_ui/view_builder/banners.rb +0 -0
  20. data/app/helpers/glib/json_ui/view_builder/fields.rb +14 -0
  21. data/app/helpers/glib/json_ui/view_builder/panels.rb +8 -8
  22. data/app/models/glib/active_storage/attachment.rb +0 -0
  23. data/app/models/glib/active_storage/blob.rb +0 -0
  24. data/app/models/glib/dynamic_text_record.rb +0 -0
  25. data/app/models/glib/text.rb +0 -0
  26. data/app/policies/glib/application_policy.rb +148 -148
  27. data/app/views/app/views/json_ui/vue/renderer.html.erb +4 -0
  28. data/app/views/json_ui/garage/_nav_menu.json.jbuilder +0 -0
  29. data/app/views/json_ui/garage/actions/index.json.jbuilder +0 -0
  30. data/app/views/json_ui/garage/forms/_alert_post_data.json.jbuilder +0 -0
  31. data/app/views/json_ui/garage/forms/basic.json.jbuilder +0 -0
  32. data/app/views/json_ui/garage/forms/basic_post.json.jbuilder +0 -0
  33. data/app/views/json_ui/garage/forms/checkboxes.json.jbuilder +0 -0
  34. data/app/views/json_ui/garage/forms/dynamic_group.json.jbuilder +33 -0
  35. data/app/views/json_ui/garage/forms/dynamic_select.json.jbuilder +0 -0
  36. data/app/views/json_ui/garage/forms/dynamic_select_data.json.jbuilder +0 -0
  37. data/app/views/json_ui/garage/forms/file_upload.json.jbuilder +2 -1
  38. data/app/views/json_ui/garage/forms/floating_submit.json.jbuilder +0 -0
  39. data/app/views/json_ui/garage/forms/generic_post.json.jbuilder +0 -0
  40. data/app/views/json_ui/garage/forms/get_request.json.jbuilder +0 -0
  41. data/app/views/json_ui/garage/forms/index.json.jbuilder +7 -4
  42. data/app/views/json_ui/garage/forms/pickers.json.jbuilder +0 -0
  43. data/app/views/json_ui/garage/forms/rich_text.json.jbuilder +0 -0
  44. data/app/views/json_ui/garage/forms/selects.json.jbuilder +0 -0
  45. data/app/views/json_ui/garage/forms/submission_flow.json.jbuilder +0 -0
  46. data/app/views/json_ui/garage/forms/submission_flow_post.json.jbuilder +0 -0
  47. data/app/views/json_ui/garage/forms/submission_indicator.json.jbuilder +0 -0
  48. data/app/views/json_ui/garage/forms/submission_indicator_post.json.jbuilder +0 -0
  49. data/app/views/json_ui/garage/forms/text_validation.json.jbuilder +5 -1
  50. data/app/views/json_ui/garage/home/blank.json.jbuilder +0 -0
  51. data/app/views/json_ui/garage/home/index.json.jbuilder +0 -0
  52. data/app/views/json_ui/garage/lists/_infinite_scroll_section.json.jbuilder +0 -0
  53. data/app/views/json_ui/garage/lists/edit_actions.json.jbuilder +0 -0
  54. data/app/views/json_ui/garage/lists/fab.json.jbuilder +0 -0
  55. data/app/views/json_ui/garage/lists/index.json.jbuilder +0 -0
  56. data/app/views/json_ui/garage/lists/infinite_scroll.json.jbuilder +0 -0
  57. data/app/views/json_ui/garage/lists/templating.json.jbuilder +9 -1
  58. data/app/views/json_ui/garage/pages/flat_centered.json.jbuilder +6 -6
  59. data/app/views/json_ui/garage/pages/full_width.json.jbuilder +7 -7
  60. data/app/views/json_ui/garage/pages/full_width_height.json.jbuilder +0 -0
  61. data/app/views/json_ui/garage/pages/index.json.jbuilder +0 -0
  62. data/app/views/json_ui/garage/pages/layout.json.jbuilder +0 -0
  63. data/app/views/json_ui/garage/pages/nav_buttons.json.jbuilder +0 -0
  64. data/app/views/json_ui/garage/pages/tab_bar.json.jbuilder +0 -0
  65. data/app/views/json_ui/garage/panels/card.json.jbuilder +11 -34
  66. data/app/views/json_ui/garage/panels/carousel.json.jbuilder +0 -0
  67. data/app/views/json_ui/garage/panels/custom.json.jbuilder +0 -0
  68. data/app/views/json_ui/garage/panels/horizontal.json.jbuilder +0 -0
  69. data/app/views/json_ui/garage/panels/index.json.jbuilder +21 -7
  70. data/app/views/json_ui/garage/panels/responsive.json.jbuilder +0 -0
  71. data/app/views/json_ui/garage/panels/split.json.jbuilder +0 -0
  72. data/app/views/json_ui/garage/panels/vertical.json.jbuilder +0 -0
  73. data/app/views/json_ui/garage/services/dynamic_text.json.jbuilder +0 -0
  74. data/app/views/json_ui/garage/services/image.json.jbuilder +0 -0
  75. data/app/views/json_ui/garage/services/index.json.jbuilder +0 -0
  76. data/app/views/json_ui/garage/tables/_autoload_section.json.jbuilder +0 -0
  77. data/app/views/json_ui/garage/tables/autoload_all.json.jbuilder +0 -0
  78. data/app/views/json_ui/garage/tables/export_import.json.jbuilder +0 -0
  79. data/app/views/json_ui/garage/tables/horizontal_scroll.json.jbuilder +0 -0
  80. data/app/views/json_ui/garage/tables/index.json.jbuilder +0 -0
  81. data/app/views/json_ui/garage/views/banners.json.jbuilder +0 -0
  82. data/app/views/json_ui/garage/views/calendar_data.json.jbuilder +0 -0
  83. data/app/views/json_ui/garage/views/carousels.json.jbuilder +0 -0
  84. data/app/views/json_ui/garage/views/charts.json.jbuilder +0 -0
  85. data/app/views/json_ui/garage/views/images.json.jbuilder +0 -0
  86. data/app/views/json_ui/garage/views/index.json.jbuilder +0 -0
  87. data/app/views/json_ui/garage/views/links.json.jbuilder +0 -0
  88. data/app/views/json_ui/garage/views/map_data.json.jbuilder +0 -0
  89. data/app/views/json_ui/garage/views/misc.json.jbuilder +0 -0
  90. data/app/views/json_ui/garage/views/texts.json.jbuilder +0 -0
  91. data/app/views/layouts/json_ui/renderer.html.erb +32 -0
  92. data/config/routes.rb +0 -0
  93. data/lib/generators/glib/install_generator.rb +0 -0
  94. data/lib/generators/templates/20191017062519_create_texts.rb +0 -0
  95. data/lib/generators/templates/20191024063257_add_scope_to_texts.rb +0 -0
  96. data/lib/generators/templates/20191112095018_add_lang_to_texts.rb +0 -0
  97. data/lib/generators/templates/20191126071051_create_active_storage_tables.active_storage.rb +0 -0
  98. data/lib/generators/templates/database.yml +0 -0
  99. data/lib/generators/templates/dynamic_text.rb +0 -0
  100. data/lib/glib-web.rb +0 -0
  101. data/lib/glib/dynamic_text.rb +0 -0
  102. data/lib/glib/dynamic_text/config.rb +0 -0
  103. data/lib/glib/engine.rb +0 -0
  104. data/lib/glib/json_crawler.rb +0 -0
  105. data/lib/glib/json_crawler/action_crawler.rb +0 -0
  106. data/lib/glib/json_crawler/action_crawlers/action_http.rb +0 -0
  107. data/lib/glib/json_crawler/action_crawlers/forms_submit.rb +0 -0
  108. data/lib/glib/json_crawler/action_crawlers/nav_initiate.rb +0 -0
  109. data/lib/glib/json_crawler/action_crawlers/windows_open.rb +0 -0
  110. data/lib/glib/json_crawler/http.rb +0 -0
  111. data/lib/glib/json_crawler/router.rb +0 -0
  112. data/lib/glib/value.rb +0 -0
  113. data/lib/glib/version.rb +0 -0
  114. metadata +4 -6
  115. data/app/controllers/concerns/application/json/libs.rb +0 -94
  116. data/app/controllers/concerns/application/json/transformation.rb +0 -11
  117. data/app/controllers/concerns/application/json/ui.rb +0 -66
  118. data/app/controllers/concerns/application/json/validation.rb +0 -13
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
@@ -0,0 +1,32 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+
4
+ <head>
5
+ <meta charset="utf-8" />
6
+ <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport" />
7
+
8
+ <title>App</title>
9
+ <%= csrf_meta_tags %>
10
+
11
+ <%= javascript_pack_tag 'vue_renderer', defer: true %>
12
+ <%#= javascript_include_tag 'vue_renderer_extras', defer: true %>
13
+
14
+ <%= stylesheet_pack_tag 'vue_renderer' %>
15
+
16
+ <link href="https://fonts.googleapis.com/css?family=Material+Icons" rel="stylesheet" />
17
+
18
+ <%= yield :head %>
19
+ </head>
20
+
21
+ <body>
22
+ <noscript>Please enable JavaScript to view this web site.</noscript>
23
+ <div id="app"></div>
24
+
25
+ <script>
26
+ var __page = <%= raw @__json_ui_orig_page%>;
27
+ </script>
28
+
29
+ <%= yield :footer %>
30
+ </body>
31
+
32
+ </html>
data/config/routes.rb CHANGED
File without changes
File without changes
File without changes
File without changes
data/lib/glib-web.rb CHANGED
File without changes
File without changes
File without changes
data/lib/glib/engine.rb CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
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.4.20
4
+ version: 0.4.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -64,10 +64,6 @@ executables: []
64
64
  extensions: []
65
65
  extra_rdoc_files: []
66
66
  files:
67
- - app/controllers/concerns/application/json/libs.rb
68
- - app/controllers/concerns/application/json/transformation.rb
69
- - app/controllers/concerns/application/json/ui.rb
70
- - app/controllers/concerns/application/json/validation.rb
71
67
  - app/controllers/concerns/glib/auth/policy.rb
72
68
  - app/controllers/concerns/glib/json/dynamic_text.rb
73
69
  - app/controllers/concerns/glib/json/libs.rb
@@ -105,6 +101,7 @@ files:
105
101
  - app/views/json_ui/garage/forms/basic.json.jbuilder
106
102
  - app/views/json_ui/garage/forms/basic_post.json.jbuilder
107
103
  - app/views/json_ui/garage/forms/checkboxes.json.jbuilder
104
+ - app/views/json_ui/garage/forms/dynamic_group.json.jbuilder
108
105
  - app/views/json_ui/garage/forms/dynamic_select.json.jbuilder
109
106
  - app/views/json_ui/garage/forms/dynamic_select_data.json.jbuilder
110
107
  - app/views/json_ui/garage/forms/file_upload.json.jbuilder
@@ -164,6 +161,7 @@ files:
164
161
  - app/views/json_ui/garage/views/markdowns.json.jbuilder
165
162
  - app/views/json_ui/garage/views/misc.json.jbuilder
166
163
  - app/views/json_ui/garage/views/texts.json.jbuilder
164
+ - app/views/layouts/json_ui/renderer.html.erb
167
165
  - config/routes.rb
168
166
  - lib/generators/glib/install_generator.rb
169
167
  - lib/generators/templates/20191017062519_create_texts.rb
@@ -205,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
205
203
  version: '0'
206
204
  requirements: []
207
205
  rubyforge_project:
208
- rubygems_version: 2.6.8
206
+ rubygems_version: 2.7.6
209
207
  signing_key:
210
208
  specification_version: 4
211
209
  summary: ''
@@ -1,94 +0,0 @@
1
- # # TODO: Deprecate
2
- # module Application::Json::Libs
3
- # extend ActiveSupport::Concern
4
-
5
- # included do
6
- # extend ClassMethods
7
-
8
- # helper_method :json_ui_app_bundle_id, :json_ui_app_build_version, :json_ui_app_device_os
9
- # helper_method :json_ui_app_is_android?, :json_ui_app_is_ios?, :json_ui_app_is_web?
10
- # end
11
-
12
- # def json_ui_app_bundle_id
13
- # @json_ui_app_bundle_id ||= request.headers['JsonUiApp-Bundle-Id']
14
- # end
15
-
16
- # def json_ui_app_build_version
17
- # @json_ui_app_build_version ||= request.headers['JsonUiApp-Build-Version']
18
- # @json_ui_app_build_version = params[:build_version] if @json_ui_app_build_version.nil? && Rails.env.development? # For easy testing
19
- # @json_ui_app_build_version
20
- # end
21
-
22
- # def json_ui_app_device_os
23
- # @json_ui_app_device_os ||= request.headers['JsonUiApp-Device-Os']
24
- # @json_ui_app_device_os = params[:device_os] if @json_ui_app_device_os.nil? && Rails.env.development? # For easy testing
25
- # @json_ui_app_device_os || 'web'
26
- # end
27
-
28
- # def json_ui_app_is_android?
29
- # json_ui_app_device_os == 'android'
30
- # end
31
-
32
- # def json_ui_app_is_ios?
33
- # json_ui_app_device_os == 'ios'
34
- # end
35
-
36
- # def json_ui_app_is_web?
37
- # json_ui_app_device_os == 'web'
38
- # end
39
-
40
-
41
-
42
- # module ClassMethods
43
-
44
- # def json_libs_init(options)
45
- # include Application::Json::Transformation
46
- # include Application::Json::Validation
47
- # include Application::Json::Ui
48
-
49
- # before_action :__json_ui_start
50
-
51
- # # Note that after_action gets executed in reverse
52
- # after_action do
53
- # __json_ui_commit(options)
54
- # end
55
- # after_action :__json_transformation_commit
56
- # after_action :__json_validate_perform
57
- # end
58
-
59
- # def json_libs_set_locale
60
- # before_action do
61
- # # Need to explicitly fallback to EN
62
- # I18n.locale = params[:_locale] || :en
63
- # rescue
64
- # I18n.locale = :en
65
- # end
66
- # end
67
-
68
- # def json_libs_force_json_ui
69
- # before_action do
70
- # if params[:_render] != 'v1'
71
- # redirect_to url_for(params.to_unsafe_h.merge(_render: 'v1'))
72
- # end
73
- # end
74
- # end
75
-
76
- # def json_libs_rescue_csrf
77
- # rescue_from ActionController::InvalidAuthenticityToken do |exception|
78
- # sign_out(:user)
79
-
80
- # respond_to do |format|
81
- # format.json do
82
- # render json: {
83
- # onResponse: {
84
- # action: 'windows/open-v1',
85
- # url: root_url
86
- # }
87
- # }
88
- # end
89
- # end
90
- # end
91
- # end
92
-
93
- # end
94
- # end
@@ -1,11 +0,0 @@
1
- # module Application::Json::Transformation
2
- # def json_transformation_start
3
- # if request.format == 'json'
4
- # @__transformed_json ||= JSON.parse(response.body) rescue nil
5
- # end
6
- # end
7
-
8
- # def __json_transformation_commit
9
- # response.body = @__transformed_json.to_json if @__transformed_json
10
- # end
11
- # end
@@ -1,66 +0,0 @@
1
- # module Application::Json::Ui
2
- # extend ActiveSupport::Concern
3
-
4
- # included do
5
- # rescue_from ActionController::UnknownFormat do |exception|
6
- # if json_ui_activated?
7
- # # Tell `__json_ui_start()` to avoid rendering this page while still retaining the `_render` param
8
- # # so that the page remains linking to other json_ui pages.
9
- # redirect_to url_for(format: nil, _skip_render: true)
10
- # else
11
- # raise exception
12
- # end
13
- # end
14
- # end
15
-
16
- # # Override
17
- # def form_authenticity_token(*args)
18
- # Rails.env.test? ? 'test_token' : super
19
- # end
20
-
21
- # # NOTE: Override default_url_options and call this method
22
- # def json_ui_url_options
23
- # options = {}
24
- # options[:_render] = params[:_render]
25
- # options[:_locale] = params[:_locale]
26
- # options[:format] = :json if request.format == :json
27
- # options
28
- # end
29
-
30
- # def json_ui_activated?
31
- # @__json_ui_activated
32
- # end
33
-
34
- # def __json_ui_start
35
- # @__json_ui_activated = false
36
- # @__json_ui_rendering = false
37
- # if params[:_render].present?
38
- # @__json_ui_activated = true
39
- # request.variant = :ui
40
-
41
- # if request.format.html? && params[:_skip_render] != 'true'
42
- # @__json_ui_rendering = true
43
- # request.format = 'json'
44
- # end
45
- # end
46
- # end
47
-
48
- # def __json_ui_commit(options)
49
- # if @__json_ui_rendering
50
- # if (hash = json_transformation_start).is_a?(Hash)
51
- # case params[:_render]
52
- # when 'v1'
53
- # __json_ui_vue(hash, options)
54
- # end
55
- # end
56
- # end
57
- # end
58
-
59
- # private
60
-
61
- # def __json_ui_vue(hash, options)
62
- # renderer_path = options[:renderer_path]
63
- # @__json_ui_orig_page = response.body
64
- # response.body = render_to_string(template: renderer_path, layout: false, content_type: 'text/html', locals: { page: hash, options: options })
65
- # end
66
- # end
@@ -1,13 +0,0 @@
1
- # module Application::Json::Validation
2
- # def __json_validate_perform
3
- # if Rails.env.development? && params[:_validate] == 'true'
4
- # if (hash = json_transformation_start).is_a?(Hash)
5
- # json_validate = JSONValidate.new(hash)
6
- # response_message = json_validate.valid?
7
- # hash[:_json] = {
8
- # validationErrors: response_message
9
- # }
10
- # end
11
- # end
12
- # end
13
- # end