glib-web 4.6.0 → 4.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/concerns/glib/json/new_dynamic_text.rb +0 -0
  3. data/app/helpers/glib/app_feature_support_helper.rb +0 -0
  4. data/app/helpers/glib/dynamic_texts_helper.rb +0 -0
  5. data/app/helpers/glib/json_ui/action_builder/sheets.rb +0 -0
  6. data/app/helpers/glib/json_ui/analytics_helper.rb +0 -0
  7. data/app/helpers/glib/json_ui/generic_builders.rb +0 -0
  8. data/app/helpers/glib/json_ui/view_builder/fields.rb +6 -8
  9. data/app/helpers/glib/json_ui/view_builder.rb +2 -0
  10. data/app/models/glib/active_storage/attachment.rb +0 -0
  11. data/app/models/glib/active_storage/blob.rb +0 -0
  12. data/app/models/glib/dynamic_text_record.rb +0 -0
  13. data/app/models/glib/text.rb +0 -0
  14. data/app/validators/email_typo_validator.rb +0 -0
  15. data/app/validators/email_validator.rb +0 -0
  16. data/app/validators/url_validator.rb +0 -0
  17. data/app/views/json_ui/garage/actions/dialogs_oauth_post.json.jbuilder +0 -0
  18. data/app/views/json_ui/garage/forms/dynamic_select_data.json.jbuilder +0 -0
  19. data/app/views/json_ui/garage/forms/generic_post.json.jbuilder +0 -0
  20. data/app/views/json_ui/garage/forms/selects.json.jbuilder +2 -1
  21. data/app/views/json_ui/garage/forms/submission_flow.json.jbuilder +0 -0
  22. data/app/views/json_ui/garage/forms/submission_flow_post.json.jbuilder +0 -0
  23. data/app/views/json_ui/garage/forms/submission_indicator.json.jbuilder +0 -0
  24. data/app/views/json_ui/garage/forms/submission_indicator_post.json.jbuilder +0 -0
  25. data/app/views/json_ui/garage/forms/text_validation.json.jbuilder +14 -7
  26. data/app/views/json_ui/garage/home/blank.json.jbuilder +0 -0
  27. data/app/views/json_ui/garage/home/slow.json.jbuilder +0 -0
  28. data/app/views/json_ui/garage/lists/autoload_all.json.jbuilder +0 -0
  29. data/app/views/json_ui/garage/lists/autoload_as_needed.json.jbuilder +0 -0
  30. data/app/views/json_ui/garage/lists/chat_ui.json.jbuilder +0 -0
  31. data/app/views/json_ui/garage/lists/fab.json.jbuilder +0 -0
  32. data/app/views/json_ui/garage/notifications/web_socket.json.jbuilder +0 -0
  33. data/app/views/json_ui/garage/pages/custom_style_class.json.jbuilder +0 -0
  34. data/app/views/json_ui/garage/pages/full_width.json.jbuilder +0 -0
  35. data/app/views/json_ui/garage/pages/full_width_height.json.jbuilder +0 -0
  36. data/app/views/json_ui/garage/pages/layout.json.jbuilder +0 -0
  37. data/app/views/json_ui/garage/pages/loading_indicator.json.jbuilder +0 -0
  38. data/app/views/json_ui/garage/pages/nested_scroll.json.jbuilder +0 -0
  39. data/app/views/json_ui/garage/pages/redirect_onload.json.jbuilder +0 -0
  40. data/app/views/json_ui/garage/panels/_styled.json.jbuilder +0 -0
  41. data/app/views/json_ui/garage/panels/card.json.jbuilder +0 -0
  42. data/app/views/json_ui/garage/panels/custom.json.jbuilder +0 -0
  43. data/app/views/json_ui/garage/panels/outlined.json.jbuilder +0 -0
  44. data/app/views/json_ui/garage/services/dynamic_text.json.jbuilder +0 -0
  45. data/app/views/json_ui/garage/services/image.json.jbuilder +0 -0
  46. data/app/views/json_ui/garage/services/index.json.jbuilder +0 -0
  47. data/app/views/json_ui/garage/tables/_autoload_section.json.jbuilder +0 -0
  48. data/app/views/json_ui/garage/tables/autoload_all.json.jbuilder +0 -0
  49. data/app/views/json_ui/garage/tables/autoload_as_needed.json.jbuilder +0 -0
  50. data/app/views/json_ui/garage/tables/export_import.json.jbuilder +0 -0
  51. data/app/views/json_ui/garage/tables/index.json.jbuilder +0 -0
  52. data/app/views/json_ui/garage/views/calendar_data.json.jbuilder +0 -0
  53. data/app/views/json_ui/garage/views/images.json.jbuilder +8 -0
  54. data/app/views/json_ui/garage/views/map_data.json.jbuilder +0 -0
  55. data/app/views/json_ui/garage/views/multimedia.json.jbuilder +0 -0
  56. data/app/views/layouts/json_ui/no_custom.html.erb +0 -0
  57. data/lib/generators/glib/install_generator.rb +0 -0
  58. data/lib/generators/templates/20191017062519_create_texts.rb +0 -0
  59. data/lib/generators/templates/20191024063257_add_scope_to_texts.rb +0 -0
  60. data/lib/generators/templates/20191112095018_add_lang_to_texts.rb +0 -0
  61. data/lib/generators/templates/20191126071051_create_active_storage_tables.active_storage.rb +0 -0
  62. data/lib/generators/templates/database.yml +0 -0
  63. data/lib/generators/templates/dynamic_text.rb +0 -0
  64. data/lib/glib/dynamic_text/config.rb +0 -0
  65. data/lib/glib/dynamic_text.rb +0 -0
  66. data/lib/glib/integration_test.rb +9 -0
  67. data/lib/glib/json_crawler/action_crawler.rb +0 -0
  68. data/lib/glib/json_crawler/action_crawlers/action_http.rb +0 -0
  69. data/lib/glib/json_crawler/action_crawlers/dialogs_alert.rb +0 -0
  70. data/lib/glib/json_crawler/action_crawlers/menu.rb +0 -0
  71. data/lib/glib/json_crawler/action_crawlers/run_multiple.rb +0 -0
  72. data/lib/glib/json_crawler/action_crawlers/windows_open.rb +0 -0
  73. data/lib/glib/json_crawler/coverage.rb +0 -0
  74. data/lib/glib/test_helpers.rb +4 -1
  75. data/lib/glib/value.rb +0 -0
  76. data/lib/glib/version.rb +0 -0
  77. data/lib/glib-web.rb +1 -0
  78. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7da379749ad7926e906360b7b5c9745f2b045d356a6243c288d604f6771ffdef
4
- data.tar.gz: 232afbb6f1375f6051d479b9484078c8db4cf7542fa7d97978b1294220bb0c6d
3
+ metadata.gz: df493fd28bb7b0ab3a3e2c7ae79e407b6f5b0b5b349366c75729f351e4b36553
4
+ data.tar.gz: 1bbc544c5ba2c4cd077c92bbe527ef4e82685dcf82b276860484ec4691cc9640
5
5
  SHA512:
6
- metadata.gz: 4c95fec35e27845b1dd69eae972056a6b65afdc8b26a50c3fb0732ca3bdbddc32d21c829bde0a7cf69e91d19de9c95b6842ca36d210c0ed217e0661edd396819
7
- data.tar.gz: ab56beeee17a57e7fd37bb670a7135504694c003f52f033611c56faf325903623e25f6733e49755160c6f40ce7423412e9a58b42bd1a92e60280c42ba81a1073
6
+ metadata.gz: 6a9f5f652188581b59f5639bbcad5fe805a03c1094c9818d39c57dbfeb64cd9db8c0909df7006c81ca5e3815223a9141a462190d683761b57d95cd424a0b64bc
7
+ data.tar.gz: ad14b2561f8f8948430168cfd1551f0db4b8fbda6111dbc9b14db696eb05bf2f46d50c5460521267888109cb8cf9c0b0ebbf90e2779e6424318d171fe59b5a53
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -117,6 +117,7 @@ class Glib::JsonUi::ViewBuilder
117
117
  string :rightText
118
118
  action :onTypeStart
119
119
  action :onTypeEnd
120
+ bool :clearable
120
121
  end
121
122
 
122
123
  class Number < Text
@@ -197,6 +198,7 @@ class Glib::JsonUi::ViewBuilder
197
198
  hash :append, optional: [:icon]
198
199
 
199
200
  panels_builder :accessory, :header, :footer
201
+ bool :clearable
200
202
 
201
203
  def searchable(value)
202
204
  @searchable = value
@@ -218,7 +220,7 @@ class Glib::JsonUi::ViewBuilder
218
220
 
219
221
  class TimeZone < AbstractField
220
222
  include Glib::EnumHelper
221
-
223
+ bool :clearable
222
224
  # Override
223
225
  def created
224
226
  super
@@ -284,13 +286,6 @@ class Glib::JsonUi::ViewBuilder
284
286
  string :onIcon
285
287
  hash :image, required: [:url, :template], optional: [:width, :height]
286
288
  hash :icon, required: [:name, :template], optional: [:color, :size]
287
- # bool :featured
288
- # bool :thumbnail
289
- # hash :image
290
- # string :imageUrl
291
- # string :icon
292
- # string :iconColor
293
- # string :iconSize
294
289
 
295
290
  views :childViews
296
291
  end
@@ -422,6 +417,7 @@ class Glib::JsonUi::ViewBuilder
422
417
  date :min
423
418
  date :max
424
419
  string :type
420
+ bool :clearable
425
421
 
426
422
  # Override
427
423
  def value(value)
@@ -434,6 +430,7 @@ class Glib::JsonUi::ViewBuilder
434
430
  class Datetime < AbstractField
435
431
  date_time :min
436
432
  date_time :max
433
+ bool :clearable
437
434
  end
438
435
 
439
436
  class Location < AbstractField
@@ -459,6 +456,7 @@ class Glib::JsonUi::ViewBuilder
459
456
  class Phone < AbstractField
460
457
  string :defaultCountry
461
458
  bool :disableAutoDetect
459
+ bool :clearable
462
460
  end
463
461
 
464
462
  class CreditCard < AbstractField
@@ -175,6 +175,8 @@ module Glib
175
175
  string :url
176
176
  string :base64Data
177
177
  action :onClick
178
+ color :backgroundColor
179
+ hash :initials, required: [:text], optional: [:color]
178
180
  end
179
181
 
180
182
  class Icon < View
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -20,6 +20,7 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
20
20
  form.fields_select \
21
21
  name: 'user[city]',
22
22
  width: 'matchParent',
23
+ clearable: true,
23
24
  label: 'City1',
24
25
  placeholder: 'This is a placeholder',
25
26
  options: languages.map { |k, v| { value: k, text: v } },
@@ -147,7 +148,7 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
147
148
  form.spacer height: 6
148
149
  form.label text: 'The select field defaults to the device\'s time zone.'
149
150
  form.spacer height: 6
150
- form.fields_timeZone name: 'user[time_zone]', width: 'matchParent', label: 'Time Zone'
151
+ form.fields_timeZone name: 'user[time_zone]', width: 'matchParent', label: 'Time Zone', clearable: true
151
152
 
152
153
 
153
154
  form.button text: 'Submit', onClick: ->(action) { action.forms_submit }
@@ -20,26 +20,30 @@ page.form \
20
20
  form.fields_email \
21
21
  name: 'user[email]',
22
22
  width: 'matchParent',
23
- label: 'Email'
23
+ label: 'Email',
24
+ clearable: true
24
25
  form.spacer height: 8
25
26
 
26
27
  form.fields_url \
27
28
  name: 'user[url]',
28
29
  width: 'matchParent',
29
- label: 'URL'
30
+ label: 'URL',
31
+ clearable: true
30
32
  form.spacer height: 8
31
33
 
32
34
  form.fields_number \
33
35
  prop: :age,
34
36
  name: 'user[age]',
35
37
  width: 'matchParent',
36
- label: 'Age'
38
+ label: 'Age',
39
+ clearable: true
37
40
  form.spacer height: 8
38
41
 
39
42
  form.fields_phone \
40
43
  name: 'user[phone1]',
41
44
  width: 'matchParent',
42
- label: 'Phone field'
45
+ label: 'Phone field',
46
+ clearable: true
43
47
  form.spacer height: 8
44
48
 
45
49
  form.fields_phone \
@@ -55,7 +59,8 @@ page.form \
55
59
  width: 'matchParent',
56
60
  label: 'Password',
57
61
  hint: 'Should contain at least 6 characters',
58
- leftIcon: 'lock'
62
+ leftIcon: 'lock',
63
+ clearable: true
59
64
  form.spacer height: 8
60
65
 
61
66
  form.fields_textarea \
@@ -63,7 +68,8 @@ page.form \
63
68
  name: 'user[words]',
64
69
  width: 'matchParent',
65
70
  label: 'Textarea with maxLength',
66
- maxLength: 1000
71
+ maxLength: 1000,
72
+ clearable: true
67
73
  form.spacer height: 8
68
74
 
69
75
 
@@ -73,7 +79,8 @@ page.form \
73
79
  name: 'user[position]',
74
80
  width: 'matchParent',
75
81
  label: 'Position',
76
- options: options
82
+ options: options,
83
+ clearable: true
77
84
  form.spacer height: 8
78
85
 
79
86
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -7,6 +7,14 @@ render "#{@path_prefix}/nav_menu", json: json, page: page
7
7
  small_image_url = 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSGQpSWjtELISLBlmugOZ6wzl1JamYXQvbFeYywpfg3E8b8DrO0Kg&s'
8
8
 
9
9
  page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
10
+ scroll.h2 text: 'Avatar Text'
11
+ scroll.spacer height: 6
12
+ scroll.avatar \
13
+ url: glib_json_image_avatar_url,
14
+ tooltip: { text: 'This is a tooltip' },
15
+ backgroundColor: '#ddd',
16
+ initials: { text: 'JD', color: '#AAB396' }
17
+
10
18
  scroll.h2 text: 'Avatar'
11
19
  scroll.spacer height: 6
12
20
  scroll.avatar \
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,9 @@
1
+ module Glib
2
+ class IntegrationTest < ActionDispatch::IntegrationTest
3
+ HOST = 'www.localhost:3000'.freeze
4
+
5
+ setup do
6
+ host! HOST
7
+ end
8
+ end
9
+ end
File without changes
File without changes
File without changes
File without changes
@@ -21,7 +21,10 @@ module Glib
21
21
  end
22
22
 
23
23
  # See https://stackoverflow.com/questions/51583321/it-is-safe-to-use-lvh-me-instead-of-localhost-for-testing
24
- HOST = 'www.lvh.me:3000'
24
+ # HOST = 'www.lvh.me:3000'
25
+
26
+ # The best practice is to avoid using lvh.me due to security and performance concerns.
27
+ HOST = 'www.localhost:3000'
25
28
 
26
29
  # LOG_DIR = File.expand_path(
27
30
  # File.join(File.dirname(__FILE__), 'integration/json_ui_crawler_test_results')
data/lib/glib/value.rb CHANGED
File without changes
data/lib/glib/version.rb CHANGED
File without changes
data/lib/glib-web.rb CHANGED
@@ -5,6 +5,7 @@ require 'glib/json_crawler'
5
5
 
6
6
  require 'glib/dynamic_text'
7
7
  require 'glib/test_helpers'
8
+ require 'glib/integration_test'
8
9
 
9
10
  require 'glib/time_freezable_mailer'
10
11
  require 'glib/time_returning_mailer'
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: 4.6.0
4
+ version: 4.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -342,6 +342,7 @@ files:
342
342
  - lib/glib/dynamic_text.rb
343
343
  - lib/glib/dynamic_text/config.rb
344
344
  - lib/glib/engine.rb
345
+ - lib/glib/integration_test.rb
345
346
  - lib/glib/json_crawler.rb
346
347
  - lib/glib/json_crawler/action_crawler.rb
347
348
  - lib/glib/json_crawler/action_crawlers/action_http.rb
@@ -380,7 +381,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
380
381
  - !ruby/object:Gem::Version
381
382
  version: '0'
382
383
  requirements: []
383
- rubygems_version: 3.4.6
384
+ rubyforge_project:
385
+ rubygems_version: 2.7.6
384
386
  signing_key:
385
387
  specification_version: 4
386
388
  summary: ''