glib-web 4.2.0 → 4.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) 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/components.rb +7 -1
  6. data/app/helpers/glib/json_ui/action_builder/logics.rb +21 -0
  7. data/app/helpers/glib/json_ui/action_builder/sheets.rb +0 -0
  8. data/app/helpers/glib/json_ui/analytics_helper.rb +0 -0
  9. data/app/helpers/glib/json_ui/generic_builders.rb +0 -0
  10. data/app/helpers/glib/json_ui/view_builder/panels.rb +3 -0
  11. data/app/models/glib/active_storage/attachment.rb +0 -0
  12. data/app/models/glib/active_storage/blob.rb +0 -0
  13. data/app/models/glib/dynamic_text_record.rb +0 -0
  14. data/app/models/glib/text.rb +0 -0
  15. data/app/validators/email_typo_validator.rb +0 -0
  16. data/app/validators/email_validator.rb +0 -0
  17. data/app/validators/url_validator.rb +0 -0
  18. data/app/views/json_ui/garage/actions/dialogs_oauth_post.json.jbuilder +0 -0
  19. data/app/views/json_ui/garage/forms/dynamic_group.json.jbuilder +35 -13
  20. data/app/views/json_ui/garage/forms/dynamic_select_data.json.jbuilder +0 -0
  21. data/app/views/json_ui/garage/forms/generic_post.json.jbuilder +0 -0
  22. data/app/views/json_ui/garage/forms/selects.json.jbuilder +39 -5
  23. data/app/views/json_ui/garage/forms/submission_flow.json.jbuilder +0 -0
  24. data/app/views/json_ui/garage/forms/submission_flow_post.json.jbuilder +0 -0
  25. data/app/views/json_ui/garage/forms/submission_indicator.json.jbuilder +0 -0
  26. data/app/views/json_ui/garage/forms/submission_indicator_post.json.jbuilder +0 -0
  27. data/app/views/json_ui/garage/home/blank.json.jbuilder +0 -0
  28. data/app/views/json_ui/garage/home/slow.json.jbuilder +0 -0
  29. data/app/views/json_ui/garage/lists/autoload_all.json.jbuilder +0 -0
  30. data/app/views/json_ui/garage/lists/autoload_as_needed.json.jbuilder +0 -0
  31. data/app/views/json_ui/garage/lists/chat_ui.json.jbuilder +0 -0
  32. data/app/views/json_ui/garage/lists/fab.json.jbuilder +0 -0
  33. data/app/views/json_ui/garage/notifications/web_socket.json.jbuilder +0 -0
  34. data/app/views/json_ui/garage/pages/custom_style_class.json.jbuilder +0 -0
  35. data/app/views/json_ui/garage/pages/full_width.json.jbuilder +0 -0
  36. data/app/views/json_ui/garage/pages/full_width_height.json.jbuilder +0 -0
  37. data/app/views/json_ui/garage/pages/layout.json.jbuilder +0 -0
  38. data/app/views/json_ui/garage/pages/loading_indicator.json.jbuilder +0 -0
  39. data/app/views/json_ui/garage/pages/nested_scroll.json.jbuilder +0 -0
  40. data/app/views/json_ui/garage/pages/redirect_onload.json.jbuilder +0 -0
  41. data/app/views/json_ui/garage/panels/_styled.json.jbuilder +0 -0
  42. data/app/views/json_ui/garage/panels/card.json.jbuilder +0 -0
  43. data/app/views/json_ui/garage/panels/custom.json.jbuilder +0 -0
  44. data/app/views/json_ui/garage/panels/outlined.json.jbuilder +0 -0
  45. data/app/views/json_ui/garage/services/dynamic_text.json.jbuilder +0 -0
  46. data/app/views/json_ui/garage/services/image.json.jbuilder +0 -0
  47. data/app/views/json_ui/garage/services/index.json.jbuilder +0 -0
  48. data/app/views/json_ui/garage/tables/_autoload_section.json.jbuilder +0 -0
  49. data/app/views/json_ui/garage/tables/autoload_all.json.jbuilder +0 -0
  50. data/app/views/json_ui/garage/tables/autoload_as_needed.json.jbuilder +0 -0
  51. data/app/views/json_ui/garage/tables/export_import.json.jbuilder +0 -0
  52. data/app/views/json_ui/garage/tables/index.json.jbuilder +0 -0
  53. data/app/views/json_ui/garage/views/calendar_data.json.jbuilder +0 -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/json_crawler/action_crawler.rb +0 -0
  67. data/lib/glib/json_crawler/action_crawlers/action_http.rb +0 -0
  68. data/lib/glib/json_crawler/action_crawlers/dialogs_alert.rb +0 -0
  69. data/lib/glib/json_crawler/action_crawlers/menu.rb +0 -0
  70. data/lib/glib/json_crawler/action_crawlers/run_multiple.rb +0 -0
  71. data/lib/glib/json_crawler/action_crawlers/windows_open.rb +0 -0
  72. data/lib/glib/json_crawler/coverage.rb +0 -0
  73. data/lib/glib/value.rb +0 -0
  74. data/lib/glib/version.rb +0 -0
  75. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: faf0d291c51c0fa43711bc1e563a85693087ac7979784ef50144838227b36f51
4
- data.tar.gz: 99cb79b91991380f89387958d6f7378a5e9dd18db2517b3ee24888369e09d01a
3
+ metadata.gz: 414da1c14521998494a3274989ed77b5db19a4bea80d386aee773aefb3af390d
4
+ data.tar.gz: a1b803901c4c2da2c7dc618905c3b5d05c995dffc02cfd84f69be2826d0326af
5
5
  SHA512:
6
- metadata.gz: 0cc7697604c728d1999a4da910991c75e6a9750e9492e8c4489971c60e91f0b8233276a9b6b806737229e7b7950bf14609b89d04845d8b5ef0c6f25d966dd19e
7
- data.tar.gz: 925654476843e66088de357fe3c6f94b5f16411a8e6e70552dcb0c0199198dd607d519c117d079543d8678c86731f11beb9b28c5760548760d3a162445ad0a85
6
+ metadata.gz: 17ca569d203c3b13bcae9f666e04693e0dd0a38f31c785be4d9d62d405568db41532c1a5229ef5892d37a1e9d7f21047593798b396d8f3286584d88e5f9e5edf
7
+ data.tar.gz: b9a6f5a64dac552532c2152ce28d1db7365e8a32bd71a6d1547f2d712baa84975fa9a594227f0874d0cc8bde6d1f4bc03d23ac72bf8558a3d790ea287379c948
File without changes
File without changes
@@ -16,7 +16,7 @@ class Glib::JsonUi::ActionBuilder
16
16
  views :childViews
17
17
  end
18
18
 
19
- # Experimental. Can this be merged with `components_set` ?
19
+ # Consider deprecating this. See `components_set` example in app/views/json_ui/garage/forms/selects.json.jbuilder
20
20
  class Replace < Action
21
21
  string :targetId
22
22
  action :onReplace
@@ -32,6 +32,12 @@ class Glib::JsonUi::ActionBuilder
32
32
  string :targetId
33
33
  hash :data
34
34
  action :onSet
35
+
36
+ def dataBuilder(block)
37
+ json.data do
38
+ block.call(page.sview_builder)
39
+ end
40
+ end
35
41
  end
36
42
  end
37
43
  end
@@ -7,6 +7,27 @@ class Glib::JsonUi::ActionBuilder
7
7
  hash :data
8
8
  hash :variables
9
9
  action :onSet
10
+
11
+ def dataBuilder(block)
12
+ json.data do
13
+ block.call(page.sview_builder)
14
+ end
15
+ end
10
16
  end
17
+
18
+ # Under consideration, likely not a good idea.
19
+ # class Append < Action
20
+ # string :targetId
21
+ # hash :condition
22
+ # string :prop # Property name, e.g. rows, childViews
23
+ # array :data
24
+ # action :onAppend
25
+
26
+ # def dataBuilder(block)
27
+ # json.data do
28
+ # block.call(page.view_builder)
29
+ # end
30
+ # end
31
+ # end
11
32
  end
12
33
  end
File without changes
File without changes
File without changes
@@ -328,6 +328,9 @@ class Glib::JsonUi::ViewBuilder
328
328
  string :align
329
329
  action :onClick
330
330
  views :hoverViews
331
+
332
+ # Experimental
333
+ panels_builder :accessory, :header, :footer
331
334
  end
332
335
 
333
336
  class Column < View
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -27,20 +27,42 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
27
27
  template.spacer height: 10
28
28
  template.fields_text width: 'matchParent', name: 'question', label: 'Question', placeholder: 'Question'
29
29
 
30
- options = [ :rating, :yes_no ]
31
- template.fields_select \
32
- width: 'matchParent',
33
- name: 'type',
34
- label: 'Answer Type',
35
- placeholder: 'Answer Type',
36
- options: options.map { |o| { text: o.to_s.humanize, value: o } }
30
+ form.panels_responsive childViews: ->(column) do
31
+ options = [:rating, :yes_no]
32
+ template.fields_select \
33
+ width: 'matchParent',
34
+ name: 'type',
35
+ label: 'Answer Type',
36
+ placeholder: 'Answer Type',
37
+ options: options.map { |o| { text: o.to_s.humanize, value: o } },
38
+ onChange: ->(action) do
39
+ action.components_findClosest view: 'panels/responsive', onFind: ->(find) do
40
+ find.logics_set dataBuilder: ->(set) do
41
+ set.panels_responsive accessory: ->(accessory) do
42
+ accessory.footer childViews: ->(footer) do
43
+ # TODO: Is there a way to only show this if the selected option is "rating".
44
+ # I.e. `showIf: { "==": [{ "var": 'user[evaluation][{{index}}][type]' }, 'rating'] }`
45
+ footer.fields_check \
46
+ width: 'matchParent',
47
+ name: 'enabled',
48
+ label: 'Enable',
49
+ checkValue: '1'
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end, accessory: ->(accessory) do
56
+ accessory.footer childViews: ->(footer) do
57
+ end
58
+ end
37
59
 
38
- template.fields_check \
39
- width: 'matchParent',
40
- name: 'enabled',
41
- label: 'Enable',
42
- checkValue: '1',
43
- showIf: { "==": [{ "var": 'user[evaluation][{{index}}][type]' }, 'rating'] }
60
+ # template.fields_check \
61
+ # width: 'matchParent',
62
+ # name: 'enabled',
63
+ # label: 'Enable',
64
+ # checkValue: '1',
65
+ # showIf: { "==": [{ "var": 'user[evaluation][{{index}}][type]' }, 'rating'] }
44
66
 
45
67
  template.spacer height: 14
46
68
  end
@@ -15,14 +15,48 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
15
15
  'melbourne' => 'Melbourne',
16
16
  'sydney' => 'Sydney',
17
17
  }
18
+
19
+ form.panels_responsive childViews: ->(column) do
20
+ form.fields_select \
21
+ name: 'user[city]',
22
+ width: 'matchParent',
23
+ label: 'City1',
24
+ placeholder: 'This is a placeholder',
25
+ options: languages.map { |k, v| { value: k, text: v } },
26
+ value: 'canberra',
27
+ onChange: ->(action) do
28
+ action.components_findClosest view: 'panels/responsive', onFind: ->(find) do
29
+ # This is to demonstrate that `components_set` can be a more flexible version
30
+ # of `components_replace`.
31
+ find.components_set dataBuilder: ->(set) do
32
+ # Don't update the childViews, just update the footer
33
+ set.panels_responsive accessory: ->(accessory) do
34
+ accessory.footer childViews: ->(footer) do
35
+ footer.label text: 'New footer'
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end, accessory: ->(accessory) do
42
+ accessory.footer childViews: ->(footer) do
43
+ footer.label text: 'Original footer'
44
+ end
45
+ end
46
+
47
+ form.spacer height: 6
48
+
18
49
  form.fields_select \
19
- name: 'user[city]',
50
+ name: 'user[cities][]',
20
51
  width: 'matchParent',
21
- label: 'City1',
22
- placeholder: 'This is a placeholder',
52
+ label: 'Cities',
23
53
  options: languages.map { |k, v| { value: k, text: v } },
24
- value: 'canberra'
25
- form.fields_select name: 'user[cities][]', width: 'matchParent', label: 'Cities', options: languages.map { |k, v| { value: k, text: v } }, value: ['melbourne', 'sydney'], multiple: true
54
+ value: ['melbourne', 'sydney'],
55
+ multiple: true,
56
+ onChange: ->(action) do
57
+ # TODO: Fix needed. When closing this dialog, the dirty prompt appears.
58
+ action.dialogs_alert message: 'Options selected'
59
+ end
26
60
 
27
61
  form.spacer height: 20
28
62
  form.h2 text: 'Select fields with grouping'
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/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: 4.2.0
4
+ version: 4.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -368,7 +368,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
368
368
  - !ruby/object:Gem::Version
369
369
  version: '0'
370
370
  requirements: []
371
- rubygems_version: 3.4.6
371
+ rubyforge_project:
372
+ rubygems_version: 2.7.6
372
373
  signing_key:
373
374
  specification_version: 4
374
375
  summary: ''