glib-web 4.10.3 → 4.10.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) 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/abstract_builder.rb +20 -0
  6. data/app/helpers/glib/json_ui/action_builder/components.rb +5 -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/fields.rb +1 -1
  11. data/app/helpers/glib/json_ui/view_builder/panels.rb +3 -1
  12. data/app/models/glib/active_storage/attachment.rb +0 -0
  13. data/app/models/glib/active_storage/blob.rb +0 -0
  14. data/app/models/glib/dynamic_text_record.rb +0 -0
  15. data/app/models/glib/text.rb +0 -0
  16. data/app/validators/email_typo_validator.rb +0 -0
  17. data/app/validators/email_validator.rb +0 -0
  18. data/app/validators/url_validator.rb +0 -0
  19. data/app/views/json_ui/garage/actions/dialogs_oauth_post.json.jbuilder +0 -0
  20. data/app/views/json_ui/garage/forms/bulk_edit_post.json.jbuilder +0 -0
  21. data/app/views/json_ui/garage/forms/bulk_edit_post2.json.jbuilder +5 -12
  22. data/app/views/json_ui/garage/forms/conditional_value.json.jbuilder +2 -2
  23. data/app/views/json_ui/garage/forms/dirty_prompt.json.jbuilder +7 -2
  24. data/app/views/json_ui/garage/forms/dynamic_select_data.json.jbuilder +0 -0
  25. data/app/views/json_ui/garage/forms/generic_post.json.jbuilder +0 -0
  26. data/app/views/json_ui/garage/forms/submission_flow.json.jbuilder +0 -0
  27. data/app/views/json_ui/garage/forms/submission_flow_post.json.jbuilder +0 -0
  28. data/app/views/json_ui/garage/forms/submission_indicator.json.jbuilder +0 -0
  29. data/app/views/json_ui/garage/forms/submission_indicator_post.json.jbuilder +0 -0
  30. data/app/views/json_ui/garage/home/blank.json.jbuilder +0 -0
  31. data/app/views/json_ui/garage/home/slow.json.jbuilder +0 -0
  32. data/app/views/json_ui/garage/lists/autoload_all.json.jbuilder +0 -0
  33. data/app/views/json_ui/garage/lists/autoload_as_needed.json.jbuilder +0 -0
  34. data/app/views/json_ui/garage/lists/chat_ui.json.jbuilder +0 -0
  35. data/app/views/json_ui/garage/lists/fab.json.jbuilder +0 -0
  36. data/app/views/json_ui/garage/notifications/web_socket.json.jbuilder +0 -0
  37. data/app/views/json_ui/garage/pages/custom_style_class.json.jbuilder +0 -0
  38. data/app/views/json_ui/garage/pages/full_width.json.jbuilder +0 -0
  39. data/app/views/json_ui/garage/pages/full_width_height.json.jbuilder +0 -0
  40. data/app/views/json_ui/garage/pages/layout.json.jbuilder +0 -0
  41. data/app/views/json_ui/garage/pages/loading_indicator.json.jbuilder +0 -0
  42. data/app/views/json_ui/garage/pages/nested_scroll.json.jbuilder +0 -0
  43. data/app/views/json_ui/garage/pages/redirect_onload.json.jbuilder +0 -0
  44. data/app/views/json_ui/garage/panels/_styled.json.jbuilder +0 -0
  45. data/app/views/json_ui/garage/panels/card.json.jbuilder +0 -0
  46. data/app/views/json_ui/garage/panels/custom.json.jbuilder +0 -0
  47. data/app/views/json_ui/garage/panels/outlined.json.jbuilder +0 -0
  48. data/app/views/json_ui/garage/services/dynamic_text.json.jbuilder +0 -0
  49. data/app/views/json_ui/garage/services/image.json.jbuilder +0 -0
  50. data/app/views/json_ui/garage/services/index.json.jbuilder +0 -0
  51. data/app/views/json_ui/garage/tables/_autoload_section.json.jbuilder +0 -0
  52. data/app/views/json_ui/garage/tables/autoload_all.json.jbuilder +0 -0
  53. data/app/views/json_ui/garage/tables/autoload_as_needed.json.jbuilder +0 -0
  54. data/app/views/json_ui/garage/tables/bulk_edit.json.jbuilder +12 -18
  55. data/app/views/json_ui/garage/tables/export_import.json.jbuilder +0 -0
  56. data/app/views/json_ui/garage/tables/index.json.jbuilder +0 -0
  57. data/app/views/json_ui/garage/test_page/form.json.jbuilder +9 -8
  58. data/app/views/json_ui/garage/views/calendar_data.json.jbuilder +0 -0
  59. data/app/views/json_ui/garage/views/map_data.json.jbuilder +0 -0
  60. data/app/views/json_ui/garage/views/multimedia.json.jbuilder +0 -0
  61. data/app/views/layouts/json_ui/no_custom.html.erb +0 -0
  62. data/app/views/layouts/json_ui/renderer.html.erb +0 -1
  63. data/lib/generators/glib/install_generator.rb +0 -0
  64. data/lib/generators/templates/20191017062519_create_texts.rb +0 -0
  65. data/lib/generators/templates/20191024063257_add_scope_to_texts.rb +0 -0
  66. data/lib/generators/templates/20191112095018_add_lang_to_texts.rb +0 -0
  67. data/lib/generators/templates/20191126071051_create_active_storage_tables.active_storage.rb +0 -0
  68. data/lib/generators/templates/database.yml +0 -0
  69. data/lib/generators/templates/dynamic_text.rb +0 -0
  70. data/lib/glib/dynamic_text/config.rb +0 -0
  71. data/lib/glib/dynamic_text.rb +0 -0
  72. data/lib/glib/json_crawler/action_crawler.rb +0 -0
  73. data/lib/glib/json_crawler/action_crawlers/action_http.rb +0 -0
  74. data/lib/glib/json_crawler/action_crawlers/dialogs_alert.rb +0 -0
  75. data/lib/glib/json_crawler/action_crawlers/dialogs_close.rb +0 -0
  76. data/lib/glib/json_crawler/action_crawlers/menu.rb +0 -0
  77. data/lib/glib/json_crawler/action_crawlers/run_multiple.rb +0 -0
  78. data/lib/glib/json_crawler/action_crawlers/windows_open.rb +0 -0
  79. data/lib/glib/json_crawler/coverage.rb +0 -0
  80. data/lib/glib/value.rb +0 -0
  81. data/lib/glib/version.rb +0 -0
  82. metadata +16 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 840b2cb71ab488fdfff13806866763bd9e73c22c7cab85cff48a093643f7d898
4
- data.tar.gz: 1a513b44d185b802b61b54f1053246b5308e38f536fb4cef32a1123695b7ab3d
3
+ metadata.gz: 0711a808828a6946ba4ec082755d8180a8437241b09c775ec674e4c1cb64388b
4
+ data.tar.gz: 40b1bda454b973e258b2bf2dd5621515e0f4ef00ce32013f212ccd6603af3c45
5
5
  SHA512:
6
- metadata.gz: 0c48d7a4a27523b0ada18199e771f028879ce44a8587513416b46885cbf6fb1a695c64a0e3e30facf049cea0039c313e4cd8a0d7f8551dc744b6ecccb54a533a
7
- data.tar.gz: a7717b61cd9e9ba90aeec57991fca3e39c387eaabf175d9d6585973a034198af5231562d72abe85844bb0f668f0088dfd5d63611b158a9a911f05ffb95b32d3c
6
+ metadata.gz: d2a75a8f46b4acda54a0fdc37feb8fee6fadac5b342ff016412b16565d0cf9c4e7e77d26e4b4640f5a83df105f24f3bda48c4bca644ec80c7c411fc341ac9321
7
+ data.tar.gz: 9554b47291f05a584dca44b56bc174986a820567e50e48a14007693818d48b7730101fcf2642c179b620e9bfba01f7a5a5a584b93cf7953a5fe663af1218970e
File without changes
File without changes
@@ -339,8 +339,28 @@ module Glib
339
339
  end
340
340
 
341
341
  def to_color(value)
342
+ known_colors = [
343
+ 'primary',
344
+ 'secondary',
345
+ 'tertiary',
346
+ 'error',
347
+ 'warning',
348
+ 'info',
349
+ 'success',
350
+ 'thin-primary',
351
+ 'thin-secondary',
352
+ 'black',
353
+ 'white',
354
+ 'grey',
355
+ 'soft-grey',
356
+ 'highlight'
357
+ ]
342
358
  value = value&.to_s
343
359
 
360
+ if known_colors.include?(value)
361
+ return value
362
+ end
363
+
344
364
  if value
345
365
  if !Rails.env.production?
346
366
  if !value.match(/^#([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/i)
@@ -1,5 +1,10 @@
1
1
  class Glib::JsonUi::ActionBuilder
2
2
  module Components
3
+ class Method < Action
4
+ string :name
5
+ hash :parameter
6
+ end
7
+
3
8
  class Find < Action
4
9
  string :targetId
5
10
  action :onFind
File without changes
File without changes
File without changes
@@ -222,7 +222,7 @@ class Glib::JsonUi::ViewBuilder
222
222
  end
223
223
 
224
224
  class ChipGroup < AbstractField
225
- string :color
225
+ color :color
226
226
  array :options
227
227
  bool :multiple
228
228
  end
@@ -377,6 +377,8 @@ class Glib::JsonUi::ViewBuilder
377
377
  action :onCellChange
378
378
  string :paramNameForFormData
379
379
  action :onRowSelected
380
+ action :onSubmitStart
381
+ action :onSubmitEnd
380
382
 
381
383
  # Experimental
382
384
  panels_builder :accessory, :header, :footer
@@ -504,7 +506,7 @@ class Glib::JsonUi::ViewBuilder
504
506
 
505
507
  views :childViews
506
508
 
507
- required :innerPadding
509
+ # required :innerPadding
508
510
  end
509
511
 
510
512
  class Carousel < View
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,15 +1,8 @@
1
1
  sleep 0.1
2
- status_cell = params[:user]['statusCompId']
2
+ row_id = params[:user]['rowId']
3
+ # status = [:saved, :failed][rand(0..1)]
4
+ status = :saved
5
+
3
6
  json_ui_response json do |action|
4
- action.components_set \
5
- targetId: status_cell,
6
- data: {
7
- styleClasses: ['success'],
8
- material: {
9
- name: 'verified'
10
- },
11
- tooltip: {
12
- text: 'Saved'
13
- }
14
- }
7
+ action.components_method targetId: 'bulkEdit', name: 'updateRow', parameter: { rowId: row_id, status: status }
15
8
  end
@@ -13,7 +13,7 @@ page.form \
13
13
  form.label text: 'End date will be adjusted automatically when start date changes'
14
14
  form.spacer height: 6
15
15
  form.fields_date name: 'user[date_start]', width: 'matchParent', label: 'Start Date', min: '2010-01-01', max: '2012-01-01', value: '2010-02-01', onChangeAndLoad: ->(action) do
16
- action.logics_set targetId: 'date1', conditionalData: { value: { "+": [{ "var": 'user[date_start]' }, 24 * 3600] } }
16
+ action.logics_set targetId: 'date1', conditionalData: { value: { "sum_date": [{ "var": 'user[date_start]' }, { value: 24 * 3600, format: 'date' }] } }
17
17
  end
18
18
  form.fields_date id: 'date1', name: 'user[date_end]', width: 'matchParent', label: 'End Date', min: '2010-01-01', max: '2012-01-01'
19
19
 
@@ -22,7 +22,7 @@ page.form \
22
22
  form.label text: 'End date/time will be adjusted automatically when start date/time changes'
23
23
  form.spacer height: 6
24
24
  form.fields_datetime name: 'user[datetime_start]', width: 'matchParent', label: 'Start Date', min: '2010-01-01', max: '2012-01-01', value: '2010-02-01T01:00', onChangeAndLoad: ->(action) do
25
- action.logics_set targetId: 'date2', conditionalData: { value: { "+": [{ "var": 'user[datetime_start]' }, 3600] } }
25
+ action.logics_set targetId: 'date2', conditionalData: { value: { "sum_date": [{ "var": 'user[datetime_start]' }, { value: 3600, format: 'datetime-local' }] } }
26
26
  end
27
27
  form.fields_datetime id: 'date2', name: 'user[datetime_end]', width: 'matchParent', label: 'End Date', min: '2010-01-01', max: '2012-01-01'
28
28
 
@@ -46,9 +46,14 @@ page.form \
46
46
  group.fields_radio value: 'F', label: 'Female'
47
47
  end
48
48
 
49
- form.h3 text: 'Rich text'
49
+ form.h3 text: 'Check group'
50
50
  form.spacer height: 14
51
- form.fields_richText name: 'user[richtext]', width: 'matchParent', value: 'lorem ipsum dumet...'
51
+ form.fields_check name: 'user[check][]', checkValue: 'choice1', label: 'choice1', value: 'choice2'
52
+ form.fields_check name: 'user[check][]', checkValue: 'choice2', label: 'choice2'
53
+ form.fields_check name: 'user[check][]', checkValue: 'choice2', label: 'choice3', value: 'choice2'
54
+
55
+ form.h3 text: 'Rich text'
56
+ form.fields_richText name: 'user[richtext]', value: 'Lorem ipsum dumet...'
52
57
 
53
58
  form.spacer height: 24
54
59
  form.panels_split width: 'matchParent', content: ->(split) do
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -32,9 +32,6 @@ page.scroll childViews: ->(scroll) do
32
32
  # end
33
33
 
34
34
  options = [{ text: 'yes', value: 'yes' }, { text: 'no', value: 'no' }]
35
- # scroll.button id: 'btn-action', text: 'verify', onClick: ->(action) do
36
- # action.windows_reload url: json_ui_garage_current_url(icon: 'verified')
37
- # end
38
35
  scroll.button displayed: false, id: 'submit_top', text: 'submit', onClick: ->(action) do
39
36
  action.forms_submit targetId: 'bulkEdit'
40
37
  end
@@ -74,22 +71,19 @@ page.scroll childViews: ->(scroll) do
74
71
  multiple.components_set targetId: 'submit_top', data: { displayed: true }
75
72
  multiple.components_set targetId: 'submit_bottom', data: { displayed: true }
76
73
  end
74
+ end,
75
+ onSubmitStart: ->(action) do
76
+ action.runMultiple childActions: ->(multiple) do
77
+ multiple.components_set targetId: 'submit_top', data: { disabled: true }
78
+ multiple.components_set targetId: 'submit_bottom', data: { disabled: true }
79
+ end
80
+ end,
81
+ onSubmitEnd: ->(action) do
82
+ action.runMultiple childActions: ->(multiple) do
83
+ multiple.components_set targetId: 'submit_top', data: { disabled: false }
84
+ multiple.components_set targetId: 'submit_bottom', data: { disabled: false }
85
+ end
77
86
  end
78
- # onRowSelected: ->(action) do
79
- # action.snackbars_alert
80
- # end
81
- # dataRows: [
82
- # { rowId: 1, columns: [{ material: { name: params[:icon] || 'preview' }, value: 'preview' }, { value: 1 }, { value: 30 }, { value: 33 }, { value: 'yes' }] },
83
- # { rowId: 2, columns: [{ material: { name: params[:icon] || 'preview' }, value: 'preview' }, { value: 2 }, { value: 34 }, { value: 35 }, { value: 'no' }] },
84
- # { rowId: 3, columns: [{ material: { name: params[:icon] || 'preview' }, value: 'preview' }, { value: 1 }, { value: 30 }, { value: 33 }, { value: 'yes' }] },
85
- # { rowId: 4, columns: [{ material: { name: params[:icon] || 'preview' }, value: 'preview' }, { value: 2 }, { value: 34 }, { value: 35 }, { value: 'no' }] },
86
- # { rowId: 5, columns: [{ material: { name: params[:icon] || 'preview' }, value: 'preview' }, { value: 1 }, { value: 30 }, { value: 33 }, { value: 'yes' }] },
87
- # { rowId: 6, columns: [{ material: { name: params[:icon] || 'preview' }, value: 'preview' }, { value: 2 }, { value: 34 }, { value: 35 }, { value: 'no' }] },
88
- # { rowId: 7, columns: [{ material: { name: params[:icon] || 'preview' }, value: 'preview' }, { value: 1 }, { value: 30 }, { value: 33 }, { value: 'yes' }] },
89
- # { rowId: 8, columns: [{ material: { name: params[:icon] || 'preview' }, value: 'preview' }, { value: 2 }, { value: 34 }, { value: 35 }, { value: 'no' }] },
90
- # { rowId: 9, columns: [{ material: { name: params[:icon] || 'preview' }, value: 'preview' }, { value: 1 }, { value: 30 }, { value: 33 }, { value: 'yes' }] },
91
- # { rowId: 10, columns: [{ material: { name: params[:icon] || 'preview' }, value: 'preview' }, { value: 2 }, { value: 34 }, { value: 35 }, { value: 'no' }] }
92
- # ]
93
87
  end
94
88
  scroll.button displayed: false, id: 'submit_bottom', text: 'submit', onClick: ->(action) do
95
89
  action.forms_submit targetId: 'bulkEdit'
File without changes
@@ -17,15 +17,16 @@ page.body childViews: ->(body) do
17
17
  action.runMultiple childActions: ->(saction) do
18
18
  saction.components_set targetId: 'textarea', data: { value: 'The quick brown fox jumps over the lazy dog' }
19
19
  new_options = [{ text: 'Option99', value: 'option99' }]
20
- ['select', 'chip_group'].each do |id|
21
- saction.components_set targetId: id, data: { options: new_options, value: ['option99'] }
22
- end
20
+
21
+ saction.components_set targetId: 'select', data: { options: new_options, value: 'option99' }
22
+
23
+ saction.components_set targetId: 'chip_group', data: { options: new_options, value: 0 }
23
24
  end
24
25
  end
25
26
  hori.spacer width: 4
26
- # hori.button text: 'logics/set', onClick: ->(action) do
27
- # action.logics_set targetId: 'date', conditionalData: { value: { "+": [{ "var": ['user[date]'] }, 60 * 60 * 24 * 3] } }
28
- # end
27
+ hori.button text: 'logics/set', onClick: ->(action) do
28
+ action.logics_set targetId: 'date', conditionalData: { value: { "sum_date": [{ "var": ['user[date]'] }, { value: 60 * 60 * 24 * 3, format: 'date' }] } }
29
+ end
29
30
  hori.spacer width: 4
30
31
  hori.button text: 'components/replace', onClick: ->(action) do
31
32
  action.runMultiple childActions: ->(saction) do
@@ -73,8 +74,8 @@ page.body childViews: ->(body) do
73
74
  validation = { required: { message: 'Required' } }
74
75
  options = ['option1', 'option2', 'option3', 'option4'].map { |option| { 'text'=> option.humanize, 'value' => option } }
75
76
 
76
- # form.fields_date width: 'matchParent', name: 'user[date]', id: 'date', value: Date.new(2024, 7, 24), validation: validation
77
- # form.hr width: 'matchParent'
77
+ form.fields_date width: 'matchParent', name: 'user[date]', id: 'date', value: Date.new(2024, 7, 24), validation: validation
78
+ form.hr width: 'matchParent'
78
79
  form.fields_select clearable: true, multiple: true, width: 'matchParent', name: 'user[select][]', id: 'select', options: options, value: ['option1', 'option2'], validation: validation
79
80
  form.hr width: 'matchParent'
80
81
  form.panels_flow innerPadding: { bottom: 0 }, width: 'matchParent', id: 'select1', childViews: ->(flow) do
File without changes
@@ -9,7 +9,6 @@
9
9
  <%= csrf_meta_tags %>
10
10
 
11
11
  <%= vite_javascript_tag 'vue_renderer', defer: true %>
12
- <%= vite_stylesheet_tag 'vue_renderer' %>
13
12
  <%# TODO: Remove this, for dev only %>
14
13
  <%# <script src="https://cdn.tailwindcss.com"></script> %>
15
14
  <link href="//fonts.googleapis.com/css?family=Material+Icons" rel="stylesheet" />
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.10.3
4
+ version: 4.10.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '3.11'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  description:
84
98
  email: ''
85
99
  executables: []
@@ -389,8 +403,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
389
403
  - !ruby/object:Gem::Version
390
404
  version: '0'
391
405
  requirements: []
392
- rubyforge_project:
393
- rubygems_version: 2.7.6
406
+ rubygems_version: 3.4.6
394
407
  signing_key:
395
408
  specification_version: 4
396
409
  summary: ''