glib-web 3.25.0 → 3.26.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/concerns/glib/json/new_dynamic_text.rb +0 -0
  3. data/app/controllers/glib/home_controller.rb +4 -0
  4. data/app/helpers/glib/app_feature_support_helper.rb +0 -0
  5. data/app/helpers/glib/dynamic_texts_helper.rb +0 -0
  6. data/app/helpers/glib/json_ui/action_builder/bottom_banners.rb +14 -0
  7. data/app/helpers/glib/json_ui/action_builder/global_states.rb +14 -0
  8. data/app/helpers/glib/json_ui/action_builder/sheets.rb +0 -0
  9. data/app/helpers/glib/json_ui/action_builder/windows.rb +0 -7
  10. data/app/helpers/glib/json_ui/analytics_helper.rb +0 -0
  11. data/app/helpers/glib/json_ui/generic_builders.rb +0 -0
  12. data/app/helpers/glib/json_ui/page_helper.rb +1 -0
  13. data/app/helpers/glib/json_ui/styling_helper.rb +0 -11
  14. data/app/helpers/glib/json_ui/view_builder/fields.rb +2 -0
  15. data/app/helpers/glib/json_ui/view_builder.rb +2 -1
  16. data/app/models/glib/active_storage/attachment.rb +0 -0
  17. data/app/models/glib/active_storage/blob.rb +0 -0
  18. data/app/models/glib/dynamic_text_record.rb +0 -0
  19. data/app/models/glib/text.rb +0 -0
  20. data/app/validators/email_typo_validator.rb +0 -0
  21. data/app/validators/email_validator.rb +0 -0
  22. data/app/validators/url_validator.rb +0 -0
  23. data/app/views/json_ui/garage/actions/_windows.json.jbuilder +4 -4
  24. data/app/views/json_ui/garage/actions/dialogs_oauth_post.json.jbuilder +0 -0
  25. data/app/views/json_ui/garage/forms/dynamic_select_data.json.jbuilder +0 -0
  26. data/app/views/json_ui/garage/forms/generic_post.json.jbuilder +0 -0
  27. data/app/views/json_ui/garage/forms/submission_flow.json.jbuilder +0 -0
  28. data/app/views/json_ui/garage/forms/submission_flow_post.json.jbuilder +0 -0
  29. data/app/views/json_ui/garage/forms/submission_indicator.json.jbuilder +0 -0
  30. data/app/views/json_ui/garage/forms/submission_indicator_post.json.jbuilder +0 -0
  31. data/app/views/json_ui/garage/home/blank.json.jbuilder +0 -0
  32. data/app/views/json_ui/garage/home/slow.json.jbuilder +0 -0
  33. data/app/views/json_ui/garage/lists/autoload_all.json.jbuilder +0 -0
  34. data/app/views/json_ui/garage/lists/autoload_as_needed.json.jbuilder +0 -0
  35. data/app/views/json_ui/garage/lists/chat_ui.json.jbuilder +0 -0
  36. data/app/views/json_ui/garage/lists/fab.json.jbuilder +0 -0
  37. data/app/views/json_ui/garage/multistep_form/step1.json.jbuilder +15 -0
  38. data/app/views/json_ui/garage/multistep_form/step2.json.jbuilder +13 -0
  39. data/app/views/json_ui/garage/notifications/web_socket.json.jbuilder +0 -0
  40. data/app/views/json_ui/garage/pages/custom_style_class.json.jbuilder +0 -0
  41. data/app/views/json_ui/garage/pages/full_width.json.jbuilder +0 -0
  42. data/app/views/json_ui/garage/pages/full_width_height.json.jbuilder +0 -0
  43. data/app/views/json_ui/garage/pages/layout.json.jbuilder +0 -0
  44. data/app/views/json_ui/garage/pages/lifecycle_hooks.json.jbuilder +0 -0
  45. data/app/views/json_ui/garage/pages/loading_indicator.json.jbuilder +0 -0
  46. data/app/views/json_ui/garage/pages/nested_scroll.json.jbuilder +0 -0
  47. data/app/views/json_ui/garage/pages/redirect_onload.json.jbuilder +0 -0
  48. data/app/views/json_ui/garage/panels/_styled.json.jbuilder +0 -0
  49. data/app/views/json_ui/garage/panels/card.json.jbuilder +0 -0
  50. data/app/views/json_ui/garage/panels/custom.json.jbuilder +0 -0
  51. data/app/views/json_ui/garage/panels/outlined.json.jbuilder +0 -0
  52. data/app/views/json_ui/garage/services/dynamic_text.json.jbuilder +0 -0
  53. data/app/views/json_ui/garage/services/image.json.jbuilder +0 -0
  54. data/app/views/json_ui/garage/services/index.json.jbuilder +0 -0
  55. data/app/views/json_ui/garage/tables/_autoload_section.json.jbuilder +0 -0
  56. data/app/views/json_ui/garage/tables/autoload_all.json.jbuilder +0 -0
  57. data/app/views/json_ui/garage/tables/autoload_as_needed.json.jbuilder +0 -0
  58. data/app/views/json_ui/garage/tables/export_import.json.jbuilder +0 -0
  59. data/app/views/json_ui/garage/tables/index.json.jbuilder +0 -0
  60. data/app/views/json_ui/garage/views/calendar_data.json.jbuilder +0 -0
  61. data/app/views/json_ui/garage/views/charts.json.jbuilder +25 -7
  62. data/app/views/json_ui/garage/views/links.json.jbuilder +0 -0
  63. data/app/views/json_ui/garage/views/map_data.json.jbuilder +0 -0
  64. data/app/views/json_ui/garage/views/multimedia.json.jbuilder +0 -0
  65. data/app/views/layouts/json_ui/no_custom.html.erb +0 -0
  66. data/lib/generators/glib/install_generator.rb +0 -0
  67. data/lib/generators/templates/20191017062519_create_texts.rb +0 -0
  68. data/lib/generators/templates/20191024063257_add_scope_to_texts.rb +0 -0
  69. data/lib/generators/templates/20191112095018_add_lang_to_texts.rb +0 -0
  70. data/lib/generators/templates/20191126071051_create_active_storage_tables.active_storage.rb +0 -0
  71. data/lib/generators/templates/database.yml +0 -0
  72. data/lib/generators/templates/dynamic_text.rb +0 -0
  73. data/lib/glib/dynamic_text/config.rb +0 -0
  74. data/lib/glib/dynamic_text.rb +0 -0
  75. data/lib/glib/json_crawler/action_crawler.rb +0 -0
  76. data/lib/glib/json_crawler/action_crawlers/action_http.rb +0 -0
  77. data/lib/glib/json_crawler/action_crawlers/dialogs_alert.rb +0 -0
  78. data/lib/glib/json_crawler/action_crawlers/menu.rb +0 -0
  79. data/lib/glib/json_crawler/action_crawlers/run_multiple.rb +0 -0
  80. data/lib/glib/json_crawler/action_crawlers/windows_open.rb +0 -0
  81. data/lib/glib/json_crawler/coverage.rb +0 -0
  82. data/lib/glib/value.rb +0 -0
  83. data/lib/glib/version.rb +0 -0
  84. metadata +6 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d2f5d2ae1abeb1b4204f3879a5561f0396f610ebc2805ff684ce1989b08041f5
4
- data.tar.gz: 2ceb705bdc581a4e4fcf1b3f70b9ace090fb4af8576995310f2ec46813c7c1eb
3
+ metadata.gz: a8ac2b87b2a72adbd5c302571faea43150d7058c0ff69a93c5a8f3331fc5ce44
4
+ data.tar.gz: cf37963271e6f7b2653a08b8433ede694de7e3c15c5ffcb8360d1809e7369fce
5
5
  SHA512:
6
- metadata.gz: 1f97d523b8eedd779e93c2cd54a27d5af356e4fc16287d141c0b3ec647596e7d0661713a2849c27b255684b2d7c8185a77f5a43bdcd625f15a621f86cacfa6dd
7
- data.tar.gz: a87a2e17a6763771cb606910f3ce9c3011bde9b8e6d935c7a44616a66713ccc4aabade5d0b849b2b1c6ac078308c24ebc32ddecf7bbeb99ef6984f991be5cdda
6
+ metadata.gz: de93f215305deef0bc19c5b199d5935c2fec9b37dfee551d4a957fa175587ff2ef1efc9cc0e3bfb705410c1efdc6e66156a6e4d10f06b8148028d40e470ff288
7
+ data.tar.gz: 17a11bab19832cad840d1a95f89adc8617819993c60d2dfd198fa779b06e36005e8ea9b677efa9b7d194384558640fa7539c15502cdf9937ecc8a5d24fd38556
@@ -31,6 +31,10 @@ module Glib
31
31
  .rounded-corner:hover:before {
32
32
  border-radius: 16px;
33
33
  }
34
+
35
+ .ma-2 {
36
+ margin: 8px;
37
+ }
34
38
  </style>
35
39
  eos
36
40
 
File without changes
File without changes
@@ -0,0 +1,14 @@
1
+ class Glib::JsonUi::ActionBuilder
2
+ module BottomBanners
3
+ class Open < Action
4
+ def newView(block)
5
+ json.newView do
6
+ block.call(page.sview_builder)
7
+ end
8
+ end
9
+ end
10
+
11
+ class Close < Action
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ class Glib::JsonUi::ActionBuilder
2
+ module GlobalStates
3
+ # Experimental
4
+ class Watch < Action
5
+ string :state
6
+ action :onChange
7
+ end
8
+
9
+ class Set < Action
10
+ string :state
11
+ hash :data
12
+ end
13
+ end
14
+ end
File without changes
@@ -30,13 +30,6 @@ class Glib::JsonUi::ActionBuilder
30
30
  required :fallbackUrl
31
31
  end
32
32
 
33
- class CloseWithOpen < Action
34
- string :url
35
- action :onOpen
36
-
37
- required :url
38
- end
39
-
40
33
  # Any component can listen to the refresh_state event and react appropriately.
41
34
  # E.g. Stripe credit card component can refresh its token to make sure it is not stale.
42
35
  class RefreshState < Action
File without changes
File without changes
@@ -106,6 +106,7 @@ module Glib
106
106
  json.directUploadUrl options[:directUploadUrl]
107
107
  json.url options[:url]
108
108
  json.inputName options[:inputName]
109
+ json.strategy options[:strategy]
109
110
  end
110
111
  end
111
112
 
@@ -50,17 +50,6 @@ module Glib
50
50
 
51
51
  ###
52
52
 
53
- ### Chart
54
-
55
- def glib_chart_tooltip_template(options)
56
- %{
57
- <div style="border: 1px solid gray; border-radius: 6px;">
58
- <div style="border-radius: 6px 6px 0 0; background-color: gray; padding: 4px; color: white;">#{options[:title]}</div>
59
- <div style="border-radius: 0 0 6px 6px; background-color: white; padding: 4px" color: black;>#{options[:content]}</div>
60
- </div>
61
- }
62
- end
63
-
64
53
  end
65
54
  end
66
55
  end
@@ -331,6 +331,8 @@ class Glib::JsonUi::ViewBuilder
331
331
  string :uploadTitle
332
332
  string :uploadFailedText # deprecated
333
333
  action :onFinishUpload
334
+ string :strategy # can be "delegate" or "dropUpload"
335
+ string :url # http post end point if you don't want to use onFinishUpload
334
336
 
335
337
  required :accepts, :directUploadUrl
336
338
 
@@ -329,10 +329,11 @@ module Glib
329
329
  string :inputName
330
330
  string :url
331
331
  string :directUploadUrl
332
- array :accepts
332
+ hash :accepts
333
333
  string :selected
334
334
  hash :items
335
335
  hash :dropData
336
+ string :strategy
336
337
  end
337
338
  end
338
339
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -9,16 +9,16 @@ section.rows builder: ->(template) do
9
9
  subaction.dialogs_alert message: 'Previous window closed'
10
10
  end
11
11
  end
12
- end
13
12
 
14
- section.rows builder: ->(template) do
15
13
  template.thumbnail title: 'windows/open', onClick: ->(action) do
16
14
  action.windows_open url: json_ui_garage_url(path: 'home/blank')
17
15
  end
18
- end
19
16
 
20
- section.rows builder: ->(template) do
21
17
  template.thumbnail title: 'windows/openWeb', onClick: ->(action) do
22
18
  action.windows_openWeb url: 'http://www.google.com'
23
19
  end
20
+
21
+ template.thumbnail title: 'multistep form', onClick: ->(action) do
22
+ action.windows_open url: json_ui_garage_url(path: 'multistep_form/step1')
23
+ end
24
24
  end
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,15 @@
1
+ json.title 'Multistep form'
2
+
3
+ page = json_ui_page json
4
+
5
+ render "#{@path_prefix}/nav_menu", json: json, page: page, top_nav: false
6
+
7
+ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
8
+ scroll.p text: 'Go to next page without pushing state to history'
9
+ scroll.spacer height: 4
10
+ scroll.markdown text: '`action.windows_reload url: url`'
11
+ scroll.spacer height: 8
12
+ scroll.button text: 'Next', onClick: ->(action) do
13
+ action.windows_reload url: json_ui_garage_url(path: 'multistep_form/step2')
14
+ end
15
+ end
@@ -0,0 +1,13 @@
1
+ json.title 'Multistep form'
2
+
3
+ page = json_ui_page json
4
+
5
+ render "#{@path_prefix}/nav_menu", json: json, page: page, top_nav: false
6
+
7
+ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
8
+ scroll.p text: 'Clicking browser back button will bring you to index page. Clicking button bellow will bring you to step 1'
9
+ scroll.spacer height: 8
10
+ scroll.button text: 'Back', onClick: ->(action) do
11
+ action.windows_reload url: json_ui_garage_url(path: 'multistep_form/step1')
12
+ end
13
+ end
File without changes
File without changes
File without changes
File without changes
@@ -75,15 +75,33 @@ else
75
75
  'Mar' => 70,
76
76
  'Apr' => 62,
77
77
  }
78
- prev = points['Jan']
79
78
 
79
+ prev = ''
80
+ json.points do
81
+ points.each do |k, v|
82
+ prev = points['Jan']
83
+ content = v >= prev ? "▲ #{v - prev}" : "▼ #{prev - v}"
84
+ json.child! do
85
+ json.x k
86
+ json.y v
87
+ json.tooltip do
88
+ json.childViews do
89
+ scroll.panels_responsive \
90
+ padding: { top: 8, right: 8, left: 8, bottom: 8 },
91
+ backgroundColor: '#EDE4E3',
92
+ styleClasses: ['rounded-corner'],
93
+ childViews: ->(sview) do
94
+ sview.label text: "Delta #{k}", color: '#6C6A61'
95
+ sview.spacer height: 4
96
+ sview.label text: content, color: '#6C6A61'
97
+ end
98
+ end
99
+ end
100
+ prev = k
101
+ end
102
+ end
103
+ end
80
104
 
81
- json.points points.map { |k, v|
82
- delta = prev - v
83
- tooltip = v < prev ? "<div>Delta</div><div>▼ #{delta}</div>" : "<div>Delta</div><div>▲ #{delta}</div>"
84
- prev = v
85
- { x: k, y: v, tooltip: glib_chart_tooltip_template(title: "Summary #{k}", content: tooltip) }
86
- }
87
105
  end
88
106
  ]
89
107
 
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/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: 3.25.0
4
+ version: 3.26.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -95,10 +95,12 @@ files:
95
95
  - app/helpers/glib/forms_helper.rb
96
96
  - app/helpers/glib/json_ui/abstract_builder.rb
97
97
  - app/helpers/glib/json_ui/action_builder.rb
98
+ - app/helpers/glib/json_ui/action_builder/bottom_banners.rb
98
99
  - app/helpers/glib/json_ui/action_builder/commands.rb
99
100
  - app/helpers/glib/json_ui/action_builder/components.rb
100
101
  - app/helpers/glib/json_ui/action_builder/dialogs.rb
101
102
  - app/helpers/glib/json_ui/action_builder/fields.rb
103
+ - app/helpers/glib/json_ui/action_builder/global_states.rb
102
104
  - app/helpers/glib/json_ui/action_builder/http.rb
103
105
  - app/helpers/glib/json_ui/action_builder/iap.rb
104
106
  - app/helpers/glib/json_ui/action_builder/panels.rb
@@ -221,6 +223,8 @@ files:
221
223
  - app/views/json_ui/garage/lists/index.json.jbuilder
222
224
  - app/views/json_ui/garage/lists/reordering.json.jbuilder
223
225
  - app/views/json_ui/garage/lists/templating.json.jbuilder
226
+ - app/views/json_ui/garage/multistep_form/step1.json.jbuilder
227
+ - app/views/json_ui/garage/multistep_form/step2.json.jbuilder
224
228
  - app/views/json_ui/garage/notifications/action_cable.json.jbuilder
225
229
  - app/views/json_ui/garage/notifications/android_post.json.jbuilder
226
230
  - app/views/json_ui/garage/notifications/index.json.jbuilder
@@ -346,8 +350,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
346
350
  - !ruby/object:Gem::Version
347
351
  version: '0'
348
352
  requirements: []
349
- rubyforge_project:
350
- rubygems_version: 2.7.6
353
+ rubygems_version: 3.4.6
351
354
  signing_key:
352
355
  specification_version: 4
353
356
  summary: ''