glib-web 3.28.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) 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 +0 -8
  6. data/app/helpers/glib/json_ui/action_builder/components.rb +0 -5
  7. data/app/helpers/glib/json_ui/action_builder/dialogs.rb +0 -23
  8. data/app/helpers/glib/json_ui/action_builder/logics.rb +11 -0
  9. data/app/helpers/glib/json_ui/action_builder/popovers.rb +0 -9
  10. data/app/helpers/glib/json_ui/action_builder/sheets.rb +0 -0
  11. data/app/helpers/glib/json_ui/action_builder/windows.rb +1 -5
  12. data/app/helpers/glib/json_ui/action_builder.rb +0 -24
  13. data/app/helpers/glib/json_ui/analytics_helper.rb +0 -0
  14. data/app/helpers/glib/json_ui/builder/mouse_events.rb +0 -7
  15. data/app/helpers/glib/json_ui/default.rb +4 -4
  16. data/app/helpers/glib/json_ui/generic_builders.rb +0 -0
  17. data/app/helpers/glib/json_ui/list_builders.rb +0 -3
  18. data/app/helpers/glib/json_ui/page_helper.rb +7 -1
  19. data/app/helpers/glib/json_ui/view_builder/fields.rb +7 -38
  20. data/app/helpers/glib/json_ui/view_builder/panels.rb +1 -0
  21. data/app/helpers/glib/json_ui/view_builder.rb +3 -14
  22. data/app/models/glib/active_storage/attachment.rb +0 -0
  23. data/app/models/glib/active_storage/blob.rb +0 -0
  24. data/app/models/glib/dynamic_text_record.rb +0 -0
  25. data/app/models/glib/text.rb +0 -0
  26. data/app/policies/glib/application_policy.rb +0 -6
  27. data/app/validators/email_typo_validator.rb +0 -0
  28. data/app/validators/email_validator.rb +0 -0
  29. data/app/validators/url_validator.rb +0 -0
  30. data/app/views/json_ui/garage/actions/_components.json.jbuilder +2 -6
  31. data/app/views/json_ui/garage/actions/_dialogs.json.jbuilder +0 -14
  32. data/app/views/json_ui/garage/actions/_reload.json.jbuilder +1 -1
  33. data/app/views/json_ui/garage/actions/dialogs_oauth_post.json.jbuilder +0 -0
  34. data/app/views/json_ui/garage/actions/partial_update.json.jbuilder +1 -1
  35. data/app/views/json_ui/garage/forms/_alert_post_data.json.jbuilder +1 -3
  36. data/app/views/json_ui/garage/forms/_partial_update_execute.json.jbuilder +1 -1
  37. data/app/views/json_ui/garage/forms/_read_more_text.json.jbuilder +27 -20
  38. data/app/views/json_ui/garage/forms/conditional_value.json.jbuilder +49 -68
  39. data/app/views/json_ui/garage/forms/dirty_prompt.json.jbuilder +0 -28
  40. data/app/views/json_ui/garage/forms/dynamic_select_data.json.jbuilder +0 -0
  41. data/app/views/json_ui/garage/forms/file_upload.json.jbuilder +1 -3
  42. data/app/views/json_ui/garage/forms/generic_post.json.jbuilder +0 -0
  43. data/app/views/json_ui/garage/forms/otp_field.json.jbuilder +11 -9
  44. data/app/views/json_ui/garage/forms/rich_text_preview.json.jbuilder +0 -1
  45. data/app/views/json_ui/garage/forms/selects.json.jbuilder +17 -24
  46. data/app/views/json_ui/garage/forms/show_hide.json.jbuilder +317 -271
  47. data/app/views/json_ui/garage/forms/submission_flow.json.jbuilder +0 -0
  48. data/app/views/json_ui/garage/forms/submission_flow_post.json.jbuilder +0 -0
  49. data/app/views/json_ui/garage/forms/submission_indicator.json.jbuilder +0 -0
  50. data/app/views/json_ui/garage/forms/submission_indicator_post.json.jbuilder +0 -0
  51. data/app/views/json_ui/garage/forms/timers.json.jbuilder +0 -90
  52. data/app/views/json_ui/garage/home/blank.json.jbuilder +0 -0
  53. data/app/views/json_ui/garage/home/slow.json.jbuilder +0 -0
  54. data/app/views/json_ui/garage/lists/autoload_all.json.jbuilder +0 -0
  55. data/app/views/json_ui/garage/lists/autoload_as_needed.json.jbuilder +0 -0
  56. data/app/views/json_ui/garage/lists/chat_ui.json.jbuilder +0 -0
  57. data/app/views/json_ui/garage/lists/fab.json.jbuilder +0 -0
  58. data/app/views/json_ui/garage/notifications/action_cable.json.jbuilder +3 -3
  59. data/app/views/json_ui/garage/notifications/web_socket.json.jbuilder +0 -0
  60. data/app/views/json_ui/garage/pages/custom_style_class.json.jbuilder +0 -0
  61. data/app/views/json_ui/garage/pages/full_width.json.jbuilder +0 -0
  62. data/app/views/json_ui/garage/pages/full_width_height.json.jbuilder +0 -0
  63. data/app/views/json_ui/garage/pages/layout.json.jbuilder +0 -0
  64. data/app/views/json_ui/garage/pages/lifecycle_hooks.json.jbuilder +4 -0
  65. data/app/views/json_ui/garage/pages/loading_indicator.json.jbuilder +0 -0
  66. data/app/views/json_ui/garage/pages/nested_scroll.json.jbuilder +0 -0
  67. data/app/views/json_ui/garage/pages/redirect_onload.json.jbuilder +0 -0
  68. data/app/views/json_ui/garage/panels/_styled.json.jbuilder +0 -0
  69. data/app/views/json_ui/garage/panels/card.json.jbuilder +0 -0
  70. data/app/views/json_ui/garage/panels/custom.json.jbuilder +0 -0
  71. data/app/views/json_ui/garage/panels/outlined.json.jbuilder +0 -0
  72. data/app/views/json_ui/garage/services/dynamic_text.json.jbuilder +0 -0
  73. data/app/views/json_ui/garage/services/image.json.jbuilder +0 -0
  74. data/app/views/json_ui/garage/services/index.json.jbuilder +0 -0
  75. data/app/views/json_ui/garage/tables/_autoload_section.json.jbuilder +0 -0
  76. data/app/views/json_ui/garage/tables/autoload_all.json.jbuilder +0 -0
  77. data/app/views/json_ui/garage/tables/autoload_as_needed.json.jbuilder +0 -0
  78. data/app/views/json_ui/garage/tables/export_import.json.jbuilder +0 -0
  79. data/app/views/json_ui/garage/tables/index.json.jbuilder +0 -0
  80. data/app/views/json_ui/garage/views/calendar_data.json.jbuilder +0 -0
  81. data/app/views/json_ui/garage/views/{components_update.json.jbuilder → components_replace.json.jbuilder} +6 -6
  82. data/app/views/json_ui/garage/views/controls.json.jbuilder +0 -32
  83. data/app/views/json_ui/garage/views/links.json.jbuilder +0 -0
  84. data/app/views/json_ui/garage/views/map_data.json.jbuilder +0 -0
  85. data/app/views/json_ui/garage/views/multimedia.json.jbuilder +0 -0
  86. data/app/views/layouts/json_ui/no_custom.html.erb +0 -0
  87. data/lib/generators/glib/install_generator.rb +0 -0
  88. data/lib/generators/templates/20191017062519_create_texts.rb +0 -0
  89. data/lib/generators/templates/20191024063257_add_scope_to_texts.rb +0 -0
  90. data/lib/generators/templates/20191112095018_add_lang_to_texts.rb +0 -0
  91. data/lib/generators/templates/20191126071051_create_active_storage_tables.active_storage.rb +0 -0
  92. data/lib/generators/templates/database.yml +0 -0
  93. data/lib/generators/templates/dynamic_text.rb +0 -0
  94. data/lib/glib/dynamic_text/config.rb +0 -0
  95. data/lib/glib/dynamic_text.rb +0 -0
  96. data/lib/glib/json_crawler/action_crawler.rb +0 -0
  97. data/lib/glib/json_crawler/action_crawlers/action_http.rb +0 -0
  98. data/lib/glib/json_crawler/action_crawlers/dialogs_alert.rb +0 -0
  99. data/lib/glib/json_crawler/action_crawlers/menu.rb +0 -0
  100. data/lib/glib/json_crawler/action_crawlers/run_multiple.rb +0 -0
  101. data/lib/glib/json_crawler/action_crawlers/windows_open.rb +0 -0
  102. data/lib/glib/json_crawler/coverage.rb +0 -0
  103. data/lib/glib/value.rb +0 -0
  104. data/lib/glib/version.rb +0 -0
  105. metadata +4 -4
@@ -3,9 +3,6 @@ json.title 'Forms'
3
3
  page = json_ui_page json
4
4
  render "#{@path_prefix}/nav_menu", json: json, page: page
5
5
 
6
- online_channel = 'OnlineChannel'
7
- first_user = User.first
8
- second_user = User.second
9
6
 
10
7
  page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', padding: glib_json_padding_body, childViews: ->(form) do
11
8
  form.spacer height: 20
@@ -26,8 +23,6 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
26
23
 
27
24
  form.spacer height: 6
28
25
  form.fields_timer name: 'user[days_timer2]', value: 10.seconds.from_now, styleClasses: ['days']
29
- form.spacer height: 6
30
- form.p text: '🏁 Finished!', showIf: { "<=": [{ "var": "user[days_timer2]" }, '0'] }
31
26
 
32
27
  form.spacer height: 20
33
28
  form.h2 text: 'Stop Watch (Forward)'
@@ -41,91 +36,6 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
41
36
  max: 20,
42
37
  forward: true
43
38
 
44
- form.spacer height: 20
45
- form.h2 text: 'Reset timer by ActionCable'
46
- online_participant1_config = {
47
- channel: online_channel,
48
- filterKey: first_user.id
49
- }
50
-
51
-
52
- form.fields_timer \
53
- width: 120,
54
- actionCable: online_participant1_config,
55
- name: 'user[online_timer1]',
56
- value: 3,
57
- min: 0
58
-
59
- form.label \
60
- text: 'Participant One is online',
61
- color: glib_color_success,
62
- showIf: {
63
- ">": [
64
- {
65
- "var": 'user[online_timer1]'
66
- },
67
- 0
68
- ]
69
- }
70
-
71
- form.label \
72
- text: 'Participant One is offline',
73
- color: glib_color_error,
74
- showIf: {
75
- "<=": [
76
- {
77
- "var": 'user[online_timer1]'
78
- },
79
- 0
80
- ]
81
- }
82
-
83
- form.spacer height: 10
84
- form.label text: 'Open Participant One', onClick: ->(action) do
85
- action.windows_openWeb url: json_ui_garage_url(path: 'forms/online_participant1')
86
- end
87
- form.spacer height: 20
88
-
89
- online_participant2_config = {
90
- channel: online_channel,
91
- filterKey: second_user.id
92
- }
93
- form.fields_timer \
94
- width: 120,
95
- actionCable: online_participant2_config,
96
- name: 'user[online_timer2]',
97
- value: 3,
98
- min: 0
99
-
100
- form.label \
101
- text: 'Participant Two is online',
102
- color: glib_color_success,
103
- showIf: {
104
- ">": [
105
- {
106
- "var": 'user[online_timer2]'
107
- },
108
- 0
109
- ]
110
- }
111
-
112
- form.label \
113
- text: 'Participant Two is offline',
114
- color: glib_color_error,
115
- showIf: {
116
- "<=": [
117
- {
118
- "var": 'user[online_timer2]'
119
- },
120
- 0
121
- ]
122
- }
123
-
124
- form.spacer height: 10
125
- form.label text: 'Open Participant Two', onClick: ->(action) do
126
- action.windows_openWeb url: json_ui_garage_url(path: 'forms/online_participant2')
127
- end
128
-
129
39
  form.spacer height: 40
130
40
  form.fields_submit text: 'Submit'
131
41
  end
File without changes
File without changes
File without changes
File without changes
@@ -19,17 +19,17 @@ if room.present?
19
19
  }
20
20
  ],
21
21
  onOpen: ->(action) do
22
- action.components_update targetId: 'label-1', views: ->(view) do
22
+ action.components_replace targetId: 'label-1', newView: ->(view) do
23
23
  view.p text: "Room ##{room.upcase}"
24
24
  end
25
25
  end,
26
26
  onClose: ->(action) do
27
- action.components_update targetId: 'label-1', views: ->(view) do
27
+ action.components_replace targetId: 'label-1', newView: ->(view) do
28
28
  view.p text: "Room ##{room.upcase} (OFF)"
29
29
  end
30
30
  end,
31
31
  onError: ->(action) do
32
- action.components_update targetId: 'label-1', views: ->(view) do
32
+ action.components_replace targetId: 'label-1', newView: ->(view) do
33
33
  view.p text: "Room ##{room.upcase} (ERROR)"
34
34
  end
35
35
  end
File without changes
@@ -8,6 +8,10 @@ page.on load: ->(action) do
8
8
  action.dialogs_alert message: 'This is an onLoad action'
9
9
  end
10
10
 
11
+ page.on unload: ->(action) do
12
+ action.dialogs_alert message: 'This is an onUnload action'
13
+ end
14
+
11
15
  page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
12
16
  scroll.label text: 'A dialog should appear automatically.'
13
17
  end
File without changes
File without changes
File without changes
@@ -30,7 +30,7 @@ page.body padding: glib_json_padding_body, childViews: ->(body) do
30
30
  hori.button text: 'change bgcolor', onClick: ->(action) do
31
31
  action.runMultiple childActions: ->(saction) do
32
32
  comp_ids.each do |id, method|
33
- saction.components_update targetId: id, views: ->(view) do
33
+ saction.components_replace targetId: id, newView: ->(view) do
34
34
  if id == 'pflow'
35
35
  view.public_send(method, { backgroundColor: '#00FFFF', innerPadding: { bottom: 0 } })
36
36
  else
@@ -43,23 +43,23 @@ page.body padding: glib_json_padding_body, childViews: ->(body) do
43
43
 
44
44
  hori.button text: 'change text (p & label)', onClick: ->(action) do
45
45
  action.runMultiple childActions: ->(saction) do
46
- saction.components_update targetId: 'paragraph', views: ->(view) do
46
+ saction.components_replace targetId: 'paragraph', newView: ->(view) do
47
47
  view.p text: 'changed!'
48
48
  end
49
- saction.components_update targetId: 'label', views: ->(view) do
49
+ saction.components_replace targetId: 'label', newView: ->(view) do
50
50
  view.label text: 'changed!'
51
51
  end
52
52
  end
53
53
  end
54
54
 
55
55
  hori.button text: 'Change fields text', onClick: ->(action) do
56
- action.components_update targetId: 'inp-text', views: ->(view) do
56
+ action.components_replace targetId: 'inp-text', newView: ->(view) do
57
57
  view.fields_text name: 'user[city]', value: 'Jakarta', placeholder: 'City', label: 'City'
58
58
  end
59
59
  end
60
60
 
61
61
  hori.button text: 'Change fields select', onClick: ->(action) do
62
- action.components_update targetId: 'inp-select', views: ->(view) do
62
+ action.components_replace targetId: 'inp-select', newView: ->(view) do
63
63
  view.fields_select options: cities + [{ text: 'Taipei', value: 'taipei' }]
64
64
  end
65
65
  end
@@ -71,7 +71,7 @@ page.body padding: glib_json_padding_body, childViews: ->(body) do
71
71
  hori.button text: 'Add child to panel', onClick: ->(action) do
72
72
  action.runMultiple childActions: ->(saction) do
73
73
  panels_ids.each do |id, method|
74
- saction.components_update targetId: id, views: ->(view) do
74
+ saction.components_replace targetId: id, newView: ->(view) do
75
75
  props = {
76
76
  childViews: ->(sview) do
77
77
  sview.label text: method
@@ -31,22 +31,6 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
31
31
 
32
32
  scroll.spacer height: 10
33
33
  scroll.button text: 'Button with dropdown', onClick: ->(action) do
34
- # action.popovers_open \
35
- # key: 'menu',
36
- # placement: 'left',
37
- # childViews: ->(view) do
38
- # view.panels_responsive styleClass: 'popover-menu', width: 200, childViews: ->(res) do
39
- # res.label text: 'Item 1', styleClass: 'popover-menu-item', onClick: ->(saction) do
40
- # saction.popovers_close key: 'menu'
41
- # end
42
- # res.label text: 'Item 2', styleClass: 'popover-menu-item', onClick: ->(saction) do
43
- # saction.popovers_close key: 'menu'
44
- # end
45
- # res.label text: 'Item 3', styleClass: 'popover-menu-item', onClick: ->(saction) do
46
- # saction.popovers_close key: 'menu'
47
- # end
48
- # end
49
- # end
50
34
 
51
35
  action.popovers_show \
52
36
  key: 'menu',
@@ -73,22 +57,6 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
73
57
  text: 'Button with tooltip and dropdown',
74
58
  tooltip: { text: 'Tooltip 1' },
75
59
  onClick: ->(action) do
76
- # action.popovers_open \
77
- # key: 'menu',
78
- # placement: 'bottom-start',
79
- # styleClass: 'popover-menu',
80
- # width: 200,
81
- # childViews: ->(res) do
82
- # res.label text: 'Item 1', styleClass: 'popover-menu-item', onClick: ->(saction) do
83
- # saction.popovers_close key: 'menu'
84
- # end
85
- # res.label text: 'Item 2', styleClass: 'popover-menu-item', onClick: ->(saction) do
86
- # saction.popovers_close key: 'menu'
87
- # end
88
- # res.label text: 'Item 3 with very very very very very long name', styleClass: 'popover-menu-item', onClick: ->(saction) do
89
- # saction.popovers_close key: 'menu'
90
- # end
91
- # end
92
60
 
93
61
  action.popovers_show \
94
62
  key: 'menu',
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: 3.28.0
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -103,6 +103,7 @@ files:
103
103
  - app/helpers/glib/json_ui/action_builder/global_states.rb
104
104
  - app/helpers/glib/json_ui/action_builder/http.rb
105
105
  - app/helpers/glib/json_ui/action_builder/iap.rb
106
+ - app/helpers/glib/json_ui/action_builder/logics.rb
106
107
  - app/helpers/glib/json_ui/action_builder/panels.rb
107
108
  - app/helpers/glib/json_ui/action_builder/popovers.rb
108
109
  - app/helpers/glib/json_ui/action_builder/sheets.rb
@@ -274,8 +275,8 @@ files:
274
275
  - app/views/json_ui/garage/views/banners.json.jbuilder
275
276
  - app/views/json_ui/garage/views/calendar_data.json.jbuilder
276
277
  - app/views/json_ui/garage/views/charts.json.jbuilder
278
+ - app/views/json_ui/garage/views/components_replace.json.jbuilder
277
279
  - app/views/json_ui/garage/views/components_set.json.jbuilder
278
- - app/views/json_ui/garage/views/components_update.json.jbuilder
279
280
  - app/views/json_ui/garage/views/controls.json.jbuilder
280
281
  - app/views/json_ui/garage/views/fields_focus.json.jbuilder
281
282
  - app/views/json_ui/garage/views/iap.json.jbuilder
@@ -351,8 +352,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
351
352
  - !ruby/object:Gem::Version
352
353
  version: '0'
353
354
  requirements: []
354
- rubyforge_project:
355
- rubygems_version: 2.7.6
355
+ rubygems_version: 3.4.6
356
356
  signing_key:
357
357
  specification_version: 4
358
358
  summary: ''