glib-web 0.11.0 → 0.11.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) 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/forms_helper.rb +0 -0
  6. data/app/helpers/glib/json_ui/action_builder/dialogs.rb +11 -5
  7. data/app/helpers/glib/json_ui/action_builder/http.rb +0 -0
  8. data/app/helpers/glib/json_ui/action_builder/sheets.rb +0 -0
  9. data/app/helpers/glib/json_ui/action_builder/snackbars.rb +0 -0
  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/table_builders.rb +0 -0
  13. data/app/helpers/glib/json_ui/view_builder/fields.rb +2 -2
  14. data/app/helpers/glib/urls_helper.rb +0 -0
  15. data/app/models/glib/active_storage/attachment.rb +0 -0
  16. data/app/models/glib/active_storage/blob.rb +0 -0
  17. data/app/models/glib/dynamic_text_record.rb +0 -0
  18. data/app/models/glib/text.rb +0 -0
  19. data/app/validators/email_typo_validator.rb +0 -0
  20. data/app/validators/email_validator.rb +0 -0
  21. data/app/validators/url_validator.rb +0 -0
  22. data/app/views/json_ui/garage/actions/_dialogs.json.jbuilder +12 -2
  23. data/app/views/json_ui/garage/actions/_http.json.jbuilder +0 -0
  24. data/app/views/json_ui/garage/actions/_panels.json.jbuilder +0 -0
  25. data/app/views/json_ui/garage/actions/_reload.json.jbuilder +0 -0
  26. data/app/views/json_ui/garage/actions/_sheets.json.jbuilder +0 -0
  27. data/app/views/json_ui/garage/actions/_snackbars.json.jbuilder +0 -0
  28. data/app/views/json_ui/garage/actions/dialogs_oauth_post.json.jbuilder +0 -0
  29. data/app/views/json_ui/garage/forms/basic.json.jbuilder +4 -2
  30. data/app/views/json_ui/garage/forms/basic_post.json.jbuilder +0 -0
  31. data/app/views/json_ui/garage/forms/dynamic_group.json.jbuilder +0 -0
  32. data/app/views/json_ui/garage/forms/dynamic_select_data.json.jbuilder +0 -0
  33. data/app/views/json_ui/garage/forms/floating_submit.json.jbuilder +0 -0
  34. data/app/views/json_ui/garage/forms/generic_post.json.jbuilder +0 -0
  35. data/app/views/json_ui/garage/forms/get_request.json.jbuilder +1 -1
  36. data/app/views/json_ui/garage/forms/submission_flow.json.jbuilder +0 -0
  37. data/app/views/json_ui/garage/forms/submission_flow_post.json.jbuilder +0 -0
  38. data/app/views/json_ui/garage/forms/submission_indicator.json.jbuilder +0 -0
  39. data/app/views/json_ui/garage/forms/submission_indicator_post.json.jbuilder +0 -0
  40. data/app/views/json_ui/garage/forms/submit_on_change.json.jbuilder +44 -2
  41. data/app/views/json_ui/garage/home/blank.json.jbuilder +0 -0
  42. data/app/views/json_ui/garage/home/slow.json.jbuilder +0 -0
  43. data/app/views/json_ui/garage/lists/autoload_all.json.jbuilder +0 -0
  44. data/app/views/json_ui/garage/lists/autoload_as_needed.json.jbuilder +0 -0
  45. data/app/views/json_ui/garage/lists/chat_ui.json.jbuilder +0 -0
  46. data/app/views/json_ui/garage/lists/fab.json.jbuilder +0 -0
  47. data/app/views/json_ui/garage/notifications/web_socket.json.jbuilder +0 -0
  48. data/app/views/json_ui/garage/pages/flat_centered.json.jbuilder +0 -0
  49. data/app/views/json_ui/garage/pages/full_width.json.jbuilder +0 -0
  50. data/app/views/json_ui/garage/pages/full_width_height.json.jbuilder +0 -0
  51. data/app/views/json_ui/garage/pages/index.json.jbuilder +0 -0
  52. data/app/views/json_ui/garage/pages/layout.json.jbuilder +0 -0
  53. data/app/views/json_ui/garage/pages/lifecycle_hooks.json.jbuilder +0 -0
  54. data/app/views/json_ui/garage/pages/loading_indicator.json.jbuilder +0 -0
  55. data/app/views/json_ui/garage/pages/nested_scroll.json.jbuilder +0 -0
  56. data/app/views/json_ui/garage/panels/_styled.json.jbuilder +0 -0
  57. data/app/views/json_ui/garage/panels/card.json.jbuilder +0 -0
  58. data/app/views/json_ui/garage/panels/custom.json.jbuilder +0 -0
  59. data/app/views/json_ui/garage/panels/outlined.json.jbuilder +0 -0
  60. data/app/views/json_ui/garage/panels/responsive.json.jbuilder +0 -0
  61. data/app/views/json_ui/garage/services/dynamic_text.json.jbuilder +0 -0
  62. data/app/views/json_ui/garage/services/image.json.jbuilder +0 -0
  63. data/app/views/json_ui/garage/services/index.json.jbuilder +0 -0
  64. data/app/views/json_ui/garage/tables/_autoload_section.json.jbuilder +0 -0
  65. data/app/views/json_ui/garage/tables/autoload_all.json.jbuilder +0 -0
  66. data/app/views/json_ui/garage/tables/autoload_as_needed.json.jbuilder +0 -0
  67. data/app/views/json_ui/garage/tables/export_import.json.jbuilder +0 -0
  68. data/app/views/json_ui/garage/tables/index.json.jbuilder +0 -0
  69. data/app/views/json_ui/garage/views/calendar_data.json.jbuilder +0 -0
  70. data/app/views/json_ui/garage/views/links.json.jbuilder +0 -0
  71. data/app/views/json_ui/garage/views/map_cluster_data.json.jbuilder +0 -0
  72. data/app/views/json_ui/garage/views/map_data.json.jbuilder +0 -0
  73. data/app/views/json_ui/garage/views/multimedia.json.jbuilder +0 -0
  74. data/config/routes.rb +0 -0
  75. data/lib/generators/glib/install_generator.rb +0 -0
  76. data/lib/generators/templates/20191017062519_create_texts.rb +0 -0
  77. data/lib/generators/templates/20191024063257_add_scope_to_texts.rb +0 -0
  78. data/lib/generators/templates/20191112095018_add_lang_to_texts.rb +0 -0
  79. data/lib/generators/templates/20191126071051_create_active_storage_tables.active_storage.rb +0 -0
  80. data/lib/generators/templates/database.yml +0 -0
  81. data/lib/generators/templates/dynamic_text.rb +0 -0
  82. data/lib/glib/crypt/utils.rb +0 -0
  83. data/lib/glib/crypt.rb +0 -0
  84. data/lib/glib/dynamic_text/config.rb +0 -0
  85. data/lib/glib/dynamic_text.rb +0 -0
  86. data/lib/glib/engine.rb +0 -0
  87. data/lib/glib/json_crawler/action_crawler.rb +0 -0
  88. data/lib/glib/json_crawler/action_crawlers/action_http.rb +0 -0
  89. data/lib/glib/json_crawler/action_crawlers/forms_submit.rb +0 -0
  90. data/lib/glib/json_crawler/action_crawlers/menu.rb +0 -0
  91. data/lib/glib/json_crawler/action_crawlers/nav_initiate.rb +0 -0
  92. data/lib/glib/json_crawler/action_crawlers/run_multiple.rb +0 -0
  93. data/lib/glib/json_crawler/action_crawlers/windows_open.rb +0 -0
  94. data/lib/glib/json_crawler/coverage.rb +0 -0
  95. data/lib/glib/json_crawler.rb +0 -0
  96. data/lib/glib/mailer_tester.rb +0 -0
  97. data/lib/glib/value.rb +0 -0
  98. data/lib/glib/version.rb +0 -0
  99. data/lib/glib-web.rb +0 -0
  100. data/lib/tasks/db.rake +0 -0
  101. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b752fcae7cc608d5890e82e1d8684ef0c00bcb825d4048384c39a8436b1a0960
4
- data.tar.gz: 27b120d2754f94a98733ade53e81208631fd30d0ee78c8122c295fe5fb171e55
3
+ metadata.gz: 9b101f8560396e7f8f7eb2bed21767dabca54753d886f4ddeb285e5d5c5a2650
4
+ data.tar.gz: eb691036c279090986d67035e7e71e49b014d7ec8042acfe8e3816cb0011736c
5
5
  SHA512:
6
- metadata.gz: 4d1970741807a9de81b871d4d88c3d7ffd20de6cf1a52f54e8e8d8c9de3fb121bf039c55b319218d08735b747f415bde933ec36fb9201f51d2bc6d075f5acec1
7
- data.tar.gz: bf8e5cb1620b44914a692ea142733ce1eab9eab8207f1392e10ee37b9efe616cc88cef5b854a771c7654363ee94d88225a61602784ff4cde902756a1b24858e4
6
+ metadata.gz: a3a007875e8305e326bd288c3883c26c64930084684b8020218893640abb3094bbcc4d0a5e85e471d607f63a81810bb0eeff45e69163c3e047bec5f3afc6918c
7
+ data.tar.gz: a987e2bb2b60798edd4c1485f290a29552457fb6f81f2e9175c739c5fe0fb0364251ff27093c811368d99f969984b6d93de3d30317d7a0596d9b1c9ef68d7f90
File without changes
File without changes
File without changes
@@ -6,11 +6,11 @@ class Glib::JsonUi::ActionBuilder
6
6
  action :onClose
7
7
  end
8
8
 
9
- class Show < Action
10
- string :body
11
- action :onLoad
12
- action :onClose
13
- end
9
+ # class Show < Action
10
+ # string :body
11
+ # action :onLoad
12
+ # action :onClose
13
+ # end
14
14
 
15
15
  # Deprecated in favour of `sheets/select`
16
16
  class Options < Action
@@ -25,6 +25,7 @@ class Glib::JsonUi::ActionBuilder
25
25
 
26
26
  class Show < Action
27
27
  panels_builder :content, :body
28
+ bool :showClose
28
29
 
29
30
  # Future plan
30
31
  # panels_builder :content, :body, :footer
@@ -35,6 +36,11 @@ class Glib::JsonUi::ActionBuilder
35
36
  bool :showClose
36
37
  end
37
38
 
39
+ class Reload < Action
40
+ string :url, cache: true
41
+ bool :showClose
42
+ end
43
+
38
44
  class Close < Action
39
45
  action :onClose
40
46
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -4,8 +4,9 @@ class Glib::JsonUi::ViewBuilder
4
4
  class AbstractField < View
5
5
  bool :readOnly
6
6
  hash :validation
7
- bool :submitOnChange
7
+ # bool :submitOnChange
8
8
  bool :disableDirtyCheck
9
+ action :onChange
9
10
 
10
11
  def label(label)
11
12
  @label = label
@@ -127,7 +128,6 @@ class Glib::JsonUi::ViewBuilder
127
128
  string :offIcon
128
129
  string :onLabel
129
130
 
130
-
131
131
  def value(value)
132
132
  @value = value if value != Glib::Value::DEFAULT
133
133
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -61,13 +61,23 @@ section.rows builder: ->(template) do
61
61
  "\n" +
62
62
  '~~Strikethrough~~' + "\n"
63
63
  template.thumbnail title: 'dialogs/show', onClick: ->(action) do
64
- action.dialogs_show content: ->(dialog) do
64
+ action.dialogs_show showClose: true, content: ->(dialog) do
65
65
  dialog.body padding: glib_json_padding_body, childViews: ->(body) do
66
66
  body.markdown text: markdown
67
67
 
68
68
  body.panels_split width: 'matchParent', content: ->(split) do
69
+ split.left childViews: ->(left) do
70
+ left.panels_horizontal height: 'matchParent', align: 'middle', childViews: ->(horizontal) do
71
+ horizontal.label text: 'Open current', onClick: ->(subaction) do
72
+ subaction.dialogs_reload url: json_ui_garage_url(path: 'forms/basic', mode: 'dialog')
73
+ end
74
+ end
75
+ end
76
+
69
77
  split.right childViews: ->(right) do
70
- right.button text: 'OK', onClick: ->(subaction) { subaction.dialogs_close }
78
+ right.button text: 'Open New', onClick: ->(subaction) do
79
+ subaction.dialogs_open url: json_ui_garage_url(path: 'forms/basic', mode: 'dialog')
80
+ end
71
81
  end
72
82
  end
73
83
  end
File without changes
@@ -9,8 +9,10 @@ page.form url: json_ui_garage_url(path: 'forms/basic_post'), method: 'post', pad
9
9
 
10
10
  form.panels_split width: 'matchParent', content: ->(split) do
11
11
  split.left childViews: ->(left) do
12
- if params[:mode] == 'dialog'
13
- left.button styleClass: 'link', text: 'cancel', onClick: ->(action) { action.dialogs_close }
12
+ left.panels_horizontal height: 'matchParent', align: 'middle', childViews: ->(horizontal) do
13
+ if params[:mode] == 'dialog'
14
+ horizontal.button styleClass: 'link', text: 'cancel', onClick: ->(action) { action.dialogs_close }
15
+ end
14
16
  end
15
17
  end
16
18
  split.right childViews: ->(right) do
@@ -13,7 +13,7 @@ page.form url: json_ui_garage_url(path: 'forms/get_request'), method: 'get', pad
13
13
  form.spacer height: 6
14
14
  form.label text: 'On the web, upon submit, URL needs to change on the browser'
15
15
  form.spacer height: 10
16
- form.fields_text name: 'user[name]', width: 'matchParent', label: 'Name'
16
+ form.fields_text name: 'user[name]', width: 'matchParent', label: 'Name', disableDirtyCheck: true
17
17
 
18
18
  # form.panels_split width: 'matchParent', rightViews: ->(split) do
19
19
  # split.button text: 'Submit', onClick: ->(action) { action.forms_submit }
@@ -17,12 +17,54 @@ page.scroll childViews: ->(scroll) do
17
17
  checkValue: '16+',
18
18
  uncheckValue: '0-16',
19
19
  label: 'I am over 16 (has default value)',
20
- submitOnChange: true
20
+ onChange: ->(action) do
21
+ action.forms_submit
22
+ end
23
+
21
24
  form.fields_check \
22
25
  name: 'user[employer]',
23
26
  checkValue: 1,
24
27
  label: 'I am an employer (no default value)',
25
- submitOnChange: true
28
+ onChange: ->(action) do
29
+ action.dialogs_alert message: 'The form will be submitted when the dialog is closed', onClose: ->(subaction) do
30
+ action.forms_submit
31
+ end
32
+ end
33
+
34
+ form.spacer height: 20
35
+ form.h2 text: 'Select Field'
36
+ options = ['male', 'female'].map { |i| { text: i.humanize, value: i } }
37
+ form.fields_select \
38
+ name: 'user[gender]',
39
+ width: 'matchParent',
40
+ label: 'Gender',
41
+ validation: { required: { message: 'Required' } },
42
+ options: options,
43
+ onChange: ->(action) do
44
+ action.snackbars_select message: 'Submit data?', buttons: ->(menu) do
45
+ menu.button text: 'Yes, submit', onClick: ->(subaction) do
46
+ action.forms_submit
47
+ end
48
+ end
49
+ end
50
+
51
+ form.spacer height: 20
52
+ form.h1 text: 'Radio Group'
53
+ form.fields_radioGroup \
54
+ name: 'user[seniority]',
55
+ value: 'show',
56
+ childViews: ->(group) do
57
+ group.fields_radio value: 'senior', label: 'Senior'
58
+ group.fields_radio value: 'junior', label: 'Junior'
59
+ end,
60
+ onChange: ->(action) do
61
+ action.sheets_select message: 'Submit data?', buttons: ->(menu) do
62
+ menu.button text: 'Yes, submit', onClick: ->(subaction) do
63
+ action.forms_submit
64
+ end
65
+ end
66
+ end
67
+
26
68
  end
27
69
 
28
70
  end
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
File without changes
File without changes
File without changes
File without changes
data/lib/glib/crypt.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
File without changes
data/lib/glib/value.rb CHANGED
File without changes
data/lib/glib/version.rb CHANGED
File without changes
data/lib/glib-web.rb CHANGED
File without changes
data/lib/tasks/db.rake 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.11.0
4
+ version: 0.11.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -296,7 +296,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
296
296
  - !ruby/object:Gem::Version
297
297
  version: '0'
298
298
  requirements: []
299
- rubygems_version: 3.1.4
299
+ rubyforge_project:
300
+ rubygems_version: 2.7.6
300
301
  signing_key:
301
302
  specification_version: 4
302
303
  summary: ''