glib-web 4.4.1 → 4.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) 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/list_builders.rb +2 -1
  9. data/app/helpers/glib/json_ui/table_builders.rb +1 -0
  10. data/app/helpers/glib/json_ui/view_builder/fields.rb +11 -0
  11. data/app/helpers/glib/json_ui/view_builder/panels.rb +2 -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/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/submission_flow.json.jbuilder +0 -0
  23. data/app/views/json_ui/garage/forms/submission_flow_post.json.jbuilder +0 -0
  24. data/app/views/json_ui/garage/forms/submission_indicator.json.jbuilder +0 -0
  25. data/app/views/json_ui/garage/forms/submission_indicator_post.json.jbuilder +0 -0
  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/panels/tree.json.jbuilder +83 -47
  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/test_page/form.json.jbuilder +1 -1
  54. data/app/views/json_ui/garage/views/calendar_data.json.jbuilder +0 -0
  55. data/app/views/json_ui/garage/views/map_data.json.jbuilder +0 -0
  56. data/app/views/json_ui/garage/views/multimedia.json.jbuilder +0 -0
  57. data/app/views/layouts/json_ui/no_custom.html.erb +0 -0
  58. data/lib/generators/glib/install_generator.rb +0 -0
  59. data/lib/generators/templates/20191017062519_create_texts.rb +0 -0
  60. data/lib/generators/templates/20191024063257_add_scope_to_texts.rb +0 -0
  61. data/lib/generators/templates/20191112095018_add_lang_to_texts.rb +0 -0
  62. data/lib/generators/templates/20191126071051_create_active_storage_tables.active_storage.rb +0 -0
  63. data/lib/generators/templates/database.yml +0 -0
  64. data/lib/generators/templates/dynamic_text.rb +0 -0
  65. data/lib/glib/dynamic_text/config.rb +0 -0
  66. data/lib/glib/dynamic_text.rb +0 -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/value.rb +0 -0
  75. data/lib/glib/version.rb +0 -0
  76. metadata +2 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 324be9293b997d23666ea14d20515bb5e8aef6e7fa962f4cf1ccba6ade3d6d1e
4
- data.tar.gz: 0b4a0e7f36dfb0e6cbac8f83dbc904451d1c59e02d212b5a6c2af4bda8e8c092
3
+ metadata.gz: 7da379749ad7926e906360b7b5c9745f2b045d356a6243c288d604f6771ffdef
4
+ data.tar.gz: 232afbb6f1375f6051d479b9484078c8db4cf7542fa7d97978b1294220bb0c6d
5
5
  SHA512:
6
- metadata.gz: 752f7e4b42626d97625f169b933a9e44eb6d968a54c3adfc0945434e785a2d0ef03daf7708cd63f36cb28c6f6e235d3eb5e0cc491abd9ad10da3e377fcdeabd4
7
- data.tar.gz: 7b9d408aeff03b974f026a26c96128569d0976f2d5bd4745cebaa0c3877a652fc335dc03e62b2ab3949c7dbff53a922b8462243b2f4a1bcc83df19b29409c515
6
+ metadata.gz: 4c95fec35e27845b1dd69eae972056a6b65afdc8b26a50c3fb0732ca3bdbddc32d21c829bde0a7cf69e91d19de9c95b6842ca36d210c0ed217e0661edd396819
7
+ data.tar.gz: ab56beeee17a57e7fd37bb670a7135504694c003f52f033611c56faf325903623e25f6733e49755160c6f40ce7423412e9a58b42bd1a92e60280c42ba81a1073
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -84,9 +84,10 @@ module Glib
84
84
  class Standard < JsonUiElement
85
85
  string :id
86
86
  string :title
87
+ string :subtitle
87
88
  action :onClick
88
89
  hash :dropData
89
- hash :icon, required: [:name], optional: [:color]
90
+ hash :icon, required: [:name], optional: [:color, :size]
90
91
  array :rows
91
92
  end
92
93
  end
@@ -21,6 +21,7 @@ module Glib
21
21
  action :onClick
22
22
  array :colSpans
23
23
  array :colStyles
24
+ hash :dragData
24
25
  end
25
26
  end
26
27
 
@@ -197,6 +197,17 @@ class Glib::JsonUi::ViewBuilder
197
197
  hash :append, optional: [:icon]
198
198
 
199
199
  panels_builder :accessory, :header, :footer
200
+
201
+ def searchable(value)
202
+ @searchable = value
203
+ end
204
+
205
+ def created
206
+ super
207
+
208
+ @searchable = @searchable.nil? ? true : @searchable
209
+ json.set! 'searchable', @searchable
210
+ end
200
211
  end
201
212
 
202
213
  class ChipGroup < AbstractField
@@ -428,7 +428,8 @@ class Glib::JsonUi::ViewBuilder
428
428
  include Glib::JsonUi::Upload
429
429
 
430
430
  string :selected
431
- action :onDrop
431
+ action :onDropFile
432
+ action :onDropView
432
433
 
433
434
  def sections(blocks)
434
435
  json.sections do
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
@@ -1,5 +1,14 @@
1
1
  json.title 'Panels'
2
2
 
3
+ onDropFile = ->(action) do
4
+ action.files_upload directUploadUrl: glib_direct_uploads_url, onFinished: ->(saction) do
5
+ saction.http_post url: json_ui_garage_url(path: 'forms/generic_post_all')
6
+ end
7
+ end
8
+ onDropView = ->(action) do
9
+ action.http_post url: json_ui_garage_url(path: 'forms/generic_post_all')
10
+ end
11
+
3
12
  json_ui_page json do |page|
4
13
  render "#{@path_prefix}/nav_menu", json: json, page: page
5
14
 
@@ -7,64 +16,91 @@ json_ui_page json do |page|
7
16
  scroll.h2 text: 'Standard'
8
17
  scroll.spacer height: 4
9
18
 
10
- scroll.panels_tree selected: params[:selected] || 'arabian-1.mp3', width: 300, sections: [
11
- ->(section) do
12
- section.header childViews: ->(header) do
13
- header.h2 text: 'Music 🎶'
14
- end
19
+ scroll.panels_column md: { cols: 4 }, childViews: ->(col) do
20
+ scroll.panels_tree \
21
+ onDropFile: onDropFile,
22
+ onDropView: onDropView,
23
+ selected: params[:selected] || 'arabian-1.mp3',
24
+ width: 300,
25
+ sections: [
26
+ ->(section) do
27
+ section.header childViews: ->(header) do
28
+ header.h2 text: 'Music 🎶'
29
+ end
15
30
 
16
- section.rows builder: ->(template) do
17
- template.standard id: 'pop', title: 'Pop', rows: ['pop-1.mp3', 'pop-2.mp3', 'pop-3.mp3']
18
- template.standard id: 'arab', title: 'Arabian', rows: ['arabian-1.mp3', 'arabian-2.mp3', 'arabian-3.mp3']
19
- template.standard id: 'phonk', title: 'Phonk', rows: ['phonk1.mp3', 'phonk-2.mp3', { id: 'hard-phonk', title: 'Hard Phonk', rows: ['hard-phonk-1.mp3', 'hard-phonk-2.mp3'] }]
20
- end
21
- end,
22
- ->(section) do
23
- section.header childViews: ->(header) do
24
- header.h2 text: 'onClick windows/reload'
25
- end
31
+ section.rows builder: ->(template) do
32
+ template.standard \
33
+ id: 'pop',
34
+ title: 'Pop',
35
+ icon: { name: 'folder', size: 24, color: '#6e6e6e' },
36
+ onClick: ->(action) { action.windows_reload url: json_ui_garage_current_url(selected: 'pop') },
37
+ subtitle: params['selected'] == 'pop' ? 'Pop music is a genre of popular music that originated in its modern' : nil,
38
+ rows: ['pop-1.mp3', 'pop-2.mp3', 'pop-3.mp3']
39
+ template.standard \
40
+ id: 'arab',
41
+ title: 'Arabian',
42
+ icon: { name: 'folder', size: 24, color: '#6e6e6e' },
43
+ onClick: ->(action) { action.windows_reload url: json_ui_garage_current_url(selected: 'arab') },
44
+ subtitle: params['selected'] == 'arab' ? 'Arabic music is the music of the Arab world' : nil,
45
+ rows: ['arabian-1.mp3', 'arabian-2.mp3', 'arabian-3.mp3']
46
+ template.standard \
47
+ id: 'phonk',
48
+ title: 'Phonk',
49
+ onClick: ->(action) { action.windows_reload url: json_ui_garage_current_url(selected: 'phonk') },
50
+ icon: { name: 'folder', size: 24, color: '#6e6e6e' },
51
+ subtitle: params['selected'] == 'phonk' ? 'Phonk is a subgenre of hip hop and trap music' : nil,
52
+ rows: ['phonk1.mp3', 'phonk-2.mp3', { id: 'hard-phonk', title: 'Hard Phonk', rows: ['hard-phonk-1.mp3', 'hard-phonk-2.mp3'] }]
53
+ end
54
+ end,
55
+ ->(section) do
56
+ section.header childViews: ->(header) do
57
+ header.h2 text: 'Video 📹'
58
+ end
26
59
 
27
- section.rows builder: ->(template) do
28
- template.standard title: 'funny-video.mp4', id: 'fun', onClick: ->(action) { action.windows_reload url: json_ui_garage_current_url(selected: 'fun') }
29
- template.standard title: 'animal-planet.mp4', id: 'animal', onClick: ->(action) { action.windows_reload url: json_ui_garage_current_url(selected: 'animal') }
30
- template.standard title: 'wedding.mp4', id: 'wedding', onClick: ->(action) { action.windows_reload url: json_ui_garage_current_url(selected: 'wedding') }
60
+ section.rows builder: ->(template) do
61
+ template.standard title: 'funny-video.mp4', id: 'fun', onClick: ->(action) { action.windows_reload url: json_ui_garage_current_url(selected: 'fun') }
62
+ template.standard title: 'animal-planet.mp4', id: 'animal', onClick: ->(action) { action.windows_reload url: json_ui_garage_current_url(selected: 'animal') }
63
+ template.standard title: 'wedding.mp4', id: 'wedding', onClick: ->(action) { action.windows_reload url: json_ui_garage_current_url(selected: 'wedding') }
64
+ end
31
65
  end
32
- end
33
- ]
34
-
35
- scroll.spacer height: 8
36
- scroll.h2 text: 'Standard with drop functionality'
37
- scroll.spacer height: 4
38
-
39
- objects = [
40
- { id: 'folder', name: 'folder', icon: { name: 'folder', color: '#6e6e6e' }, rows: ['subfolder1', 'subfolder2'], dropData: { key: 'folder' } },
41
- { id: 'folder1', name: 'folder1', icon: { name: 'folder', color: '#6e6e6e' }, rows: ['subfolder1', 'subfolder2'] },
42
- { id: 'folder2', name: 'folder2', icon: { name: 'folder', color: '#6e6e6e' }, rows: ['subfolder1', 'subfolder2'] },
43
- ]
66
+ ]
67
+ end
44
68
 
45
69
  scroll.panels_column md: { cols: 6 }, childViews: ->(col) do
46
- col.panels_tree \
47
- selected: 'folder2',
48
- width: 300,
49
- onDrop: ->(action) do
50
- action.files_upload directUploadUrl: glib_direct_uploads_url, onFinished: ->(saction) do
51
- saction.http_post url: json_ui_garage_url(path: 'forms/generic_post_all')
70
+ col.h2 text: 'Drag me to folder!'
71
+ col.spacer height: 16
72
+ col.panels_table width: 'matchParent', sections: [
73
+ ->(section) do
74
+ section.header cellViews: ->(header) do
75
+ header.label text: 'Name'
76
+ header.label text: 'Size'
77
+ header.label text: 'Last modified'
52
78
  end
53
- end,
54
- sections: [
55
- ->(section) do
56
- section.header childViews: ->(header) do
57
- header.h2 text: 'Folder'
79
+
80
+ section.rows builder: ->(row) do
81
+ row.default dragData: { music: 'dads-fav-song.mp3' }, cellViews: ->(cell) do
82
+ cell.label text: 'dads-fav-song.mp3'
83
+ cell.label text: '3mb'
84
+ cell.label text: '2024/06/22'
58
85
  end
59
86
 
60
- section.rows objects: objects, builder: ->(row, item, index) do
61
- row.standard id: item[:id], title: item[:name], rows: item[:rows], dropData: item[:dropData], icon: item[:icon]
87
+ row.default dragData: { music: '1-hours-sound-of-rain-asmr.mp3' }, cellViews: ->(cell) do
88
+ cell.label text: '1-hours-sound-of-rain-asmr.mp3'
89
+ cell.label text: '15mb'
90
+ cell.label text: '2024/02/12'
62
91
  end
92
+
93
+ row.default dragData: { music: 'i-dont-know-the-name.mp3' }, cellViews: ->(cell) do
94
+ cell.label text: 'i-dont-know-the-name.mp3'
95
+ cell.label text: '10mb'
96
+ cell.label text: '2024/01/4'
97
+ end
98
+
63
99
  end
64
- ]
65
- end
100
+ end
101
+ ]
66
102
 
67
- scroll.panels_column md: { cols: 4 }, childViews: ->(col) do
103
+ col.spacer height: 8
68
104
  col.panels_ul childViews: ->(li) do
69
105
  li.label text: '🍌 Banana', dragData: { item: 'banana' }
70
106
  li.label text: '💣 Bomb', dragData: { item: 'bomb' }
File without changes
@@ -88,7 +88,7 @@ page.body childViews: ->(body) do
88
88
  end
89
89
  end
90
90
  form.hr width: 'matchParent'
91
- form.panels_vertical width: 'matchParent', id: 'ver', childViews: ->(ver) do
91
+ form.panels_responsive width: 'matchParent', id: 'ver', childViews: ->(ver) do
92
92
  form.fields_text width: 'matchParent', name: 'user[text]', id: 'text', value: 'John Doe', validation: validation.merge(format: { regex: /Doe\z/, message: 'Must end with Doe' })
93
93
  end
94
94
  form.panels_vertical width: 'matchParent', id: 'ver1', displayed: false, childViews: ->(ver) do
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.4.1
4
+ version: 4.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -380,8 +380,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
380
380
  - !ruby/object:Gem::Version
381
381
  version: '0'
382
382
  requirements: []
383
- rubyforge_project:
384
- rubygems_version: 2.7.6
383
+ rubygems_version: 3.4.6
385
384
  signing_key:
386
385
  specification_version: 4
387
386
  summary: ''