glib-web 2.6.3 → 3.0.0.pre.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/concerns/glib/json/libs.rb +0 -18
  3. data/app/controllers/concerns/glib/json/new_dynamic_text.rb +0 -0
  4. data/app/controllers/glib/home_controller.rb +1 -1
  5. data/app/helpers/glib/app_feature_support_helper.rb +0 -0
  6. data/app/helpers/glib/dynamic_texts_helper.rb +0 -0
  7. data/app/helpers/glib/forms_helper.rb +0 -0
  8. data/app/helpers/glib/json_ui/action_builder/dialogs.rb +0 -3
  9. data/app/helpers/glib/json_ui/action_builder/http.rb +0 -1
  10. data/app/helpers/glib/json_ui/action_builder/sheets.rb +0 -0
  11. data/app/helpers/glib/json_ui/action_builder/tours.rb +0 -3
  12. data/app/helpers/glib/json_ui/analytics_helper.rb +0 -0
  13. data/app/helpers/glib/json_ui/generic_builders.rb +0 -0
  14. data/app/helpers/glib/json_ui/list_builders.rb +4 -2
  15. data/app/helpers/glib/json_ui/table_builders.rb +0 -0
  16. data/app/helpers/glib/json_ui/view_builder/fields.rb +1 -5
  17. data/app/helpers/glib/json_ui/view_builder/panels.rb +0 -2
  18. data/app/helpers/glib/json_ui/view_builder.rb +1 -0
  19. data/app/helpers/glib/urls_helper.rb +0 -0
  20. data/app/models/glib/active_storage/attachment.rb +0 -0
  21. data/app/models/glib/active_storage/blob.rb +0 -0
  22. data/app/models/glib/dynamic_text_record.rb +0 -0
  23. data/app/models/glib/text.rb +0 -0
  24. data/app/validators/email_typo_validator.rb +0 -0
  25. data/app/validators/email_validator.rb +0 -0
  26. data/app/validators/url_validator.rb +0 -0
  27. data/app/views/json_ui/garage/actions/_panels.json.jbuilder +0 -0
  28. data/app/views/json_ui/garage/actions/_reload.json.jbuilder +0 -0
  29. data/app/views/json_ui/garage/actions/_sheets.json.jbuilder +0 -0
  30. data/app/views/json_ui/garage/actions/dialogs_oauth_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/otp_field.json.jbuilder +4 -7
  36. data/app/views/json_ui/garage/forms/selects.json.jbuilder +1 -7
  37. data/app/views/json_ui/garage/forms/submission_flow.json.jbuilder +0 -0
  38. data/app/views/json_ui/garage/forms/submission_flow_post.json.jbuilder +0 -0
  39. data/app/views/json_ui/garage/forms/submission_indicator.json.jbuilder +0 -0
  40. data/app/views/json_ui/garage/forms/submission_indicator_post.json.jbuilder +0 -0
  41. data/app/views/json_ui/garage/forms/submit_on_change.json.jbuilder +2 -37
  42. data/app/views/json_ui/garage/home/blank.json.jbuilder +0 -0
  43. data/app/views/json_ui/garage/home/slow.json.jbuilder +0 -0
  44. data/app/views/json_ui/garage/lists/_autoload_section.json.jbuilder +3 -1
  45. data/app/views/json_ui/garage/lists/autoload_all.json.jbuilder +0 -0
  46. data/app/views/json_ui/garage/lists/autoload_as_needed.json.jbuilder +0 -0
  47. data/app/views/json_ui/garage/lists/chat_ui.json.jbuilder +0 -0
  48. data/app/views/json_ui/garage/lists/fab.json.jbuilder +0 -0
  49. data/app/views/json_ui/garage/lists/reordering.json.jbuilder +1 -7
  50. data/app/views/json_ui/garage/lists/templating.json.jbuilder +0 -16
  51. data/app/views/json_ui/garage/notifications/web_socket.json.jbuilder +0 -0
  52. data/app/views/json_ui/garage/pages/custom_style_class.json.jbuilder +0 -0
  53. data/app/views/json_ui/garage/pages/full_width.json.jbuilder +0 -0
  54. data/app/views/json_ui/garage/pages/full_width_height.json.jbuilder +0 -0
  55. data/app/views/json_ui/garage/pages/index.json.jbuilder +0 -0
  56. data/app/views/json_ui/garage/pages/layout.json.jbuilder +0 -0
  57. data/app/views/json_ui/garage/pages/lifecycle_hooks.json.jbuilder +0 -0
  58. data/app/views/json_ui/garage/pages/loading_indicator.json.jbuilder +0 -0
  59. data/app/views/json_ui/garage/pages/nested_scroll.json.jbuilder +0 -0
  60. data/app/views/json_ui/garage/pages/redirect_onload.json.jbuilder +0 -0
  61. data/app/views/json_ui/garage/pages/tab_bar.json.jbuilder +71 -63
  62. data/app/views/json_ui/garage/panels/_styled.json.jbuilder +0 -0
  63. data/app/views/json_ui/garage/panels/_timeline_content.json.jbuilder +1 -0
  64. data/app/views/json_ui/garage/panels/card.json.jbuilder +0 -0
  65. data/app/views/json_ui/garage/panels/custom.json.jbuilder +0 -0
  66. data/app/views/json_ui/garage/panels/horizontal.json.jbuilder +7 -24
  67. data/app/views/json_ui/garage/panels/outlined.json.jbuilder +0 -0
  68. data/app/views/json_ui/garage/panels/split.json.jbuilder +1 -1
  69. data/app/views/json_ui/garage/panels/ul.json.jbuilder +3 -6
  70. data/app/views/json_ui/garage/services/dynamic_text.json.jbuilder +0 -0
  71. data/app/views/json_ui/garage/services/image.json.jbuilder +0 -0
  72. data/app/views/json_ui/garage/services/index.json.jbuilder +0 -0
  73. data/app/views/json_ui/garage/tables/_autoload_section.json.jbuilder +0 -0
  74. data/app/views/json_ui/garage/tables/autoload_all.json.jbuilder +0 -0
  75. data/app/views/json_ui/garage/tables/autoload_as_needed.json.jbuilder +0 -0
  76. data/app/views/json_ui/garage/tables/export_import.json.jbuilder +0 -0
  77. data/app/views/json_ui/garage/tables/index.json.jbuilder +0 -0
  78. data/app/views/json_ui/garage/views/calendar_data.json.jbuilder +0 -0
  79. data/app/views/json_ui/garage/views/links.json.jbuilder +0 -0
  80. data/app/views/json_ui/garage/views/map_data.json.jbuilder +0 -0
  81. data/app/views/json_ui/garage/views/multimedia.json.jbuilder +0 -0
  82. data/app/views/layouts/json_ui/renderer.html.erb +8 -16
  83. data/config/routes.rb +0 -0
  84. data/lib/generators/glib/install_generator.rb +0 -0
  85. data/lib/generators/templates/20191017062519_create_texts.rb +0 -0
  86. data/lib/generators/templates/20191024063257_add_scope_to_texts.rb +0 -0
  87. data/lib/generators/templates/20191112095018_add_lang_to_texts.rb +0 -0
  88. data/lib/generators/templates/20191126071051_create_active_storage_tables.active_storage.rb +0 -0
  89. data/lib/generators/templates/database.yml +0 -0
  90. data/lib/generators/templates/dynamic_text.rb +0 -0
  91. data/lib/glib/crypt/utils.rb +0 -0
  92. data/lib/glib/crypt.rb +0 -0
  93. data/lib/glib/dynamic_text/config.rb +0 -0
  94. data/lib/glib/dynamic_text.rb +0 -0
  95. data/lib/glib/engine.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/forms_submit.rb +0 -0
  100. data/lib/glib/json_crawler/action_crawlers/menu.rb +0 -0
  101. data/lib/glib/json_crawler/action_crawlers/run_multiple.rb +0 -0
  102. data/lib/glib/json_crawler/action_crawlers/windows_open.rb +0 -0
  103. data/lib/glib/json_crawler/coverage.rb +0 -0
  104. data/lib/glib/json_crawler.rb +0 -0
  105. data/lib/glib/mailer_tester.rb +0 -0
  106. data/lib/glib/value.rb +0 -0
  107. data/lib/glib/version.rb +0 -0
  108. data/lib/glib-web.rb +0 -0
  109. data/lib/tasks/db.rake +0 -0
  110. metadata +4 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a241900fe69f859a9d7fb8505cb6cbbd19039b6eb7a5981a4232a0edff12846b
4
- data.tar.gz: b07483bdaa3c5b28db364af08ae9da29547ca239a544d4b6fecd0917c8552b90
3
+ metadata.gz: 36c7ef52875565dc8845937e540ad4bb859c2c1d8c2413a6eb2610e02011cc42
4
+ data.tar.gz: f7bc7fedc31848d543ba0e79404d293a611cdbbcb20573a37645d28e81fba19a
5
5
  SHA512:
6
- metadata.gz: 89baa1f405ecc6a94a0b027d5dc5b7a142c0850e036a791ec87e1328e0a844c2384604fd307ea2965477edfb3e83e42740c3cfa4f008325ea95ba406e673156c
7
- data.tar.gz: fdb78f8e7df61cb16e8259a502b6168efaa525227712b25c52e9d63c59b24aef1925d699a84a3f05ec5f31259842d0f138084126cc14a2f325318cb5864fcc25
6
+ metadata.gz: 47910b5b21257d0d2902ff536ff2c1cb13e8154ee1bc2a919f66b1dc1ade9a7aedd967a1abc1d9deef2f7286ac0720db6bda4adb33d44ea0cea2af3de94738a2
7
+ data.tar.gz: 0fd5393e2bec762bd4b05d46f825ba168a31454ccc7d6100d286f706cebb2a40ef6eba9662651dbb389074375e973b9b15ae58d74d481a72a7b61e39c83df8c1
@@ -36,24 +36,6 @@ module Glib::Json::Libs
36
36
  json_ui_app_device_os == 'web'
37
37
  end
38
38
 
39
- def json_ui_etag
40
- template = "#{controller_name}/#{action_name}"
41
-
42
- # 1) It's necessary to pass in the template explicitly because of the switching between JSON
43
- # and HTML rendering.
44
- #
45
- # 2) When a model is not provided, two pages the use the same template (e.g. `projects#show`)
46
- # will produce the exact same ETAG, even though their content might be different. Presumably
47
- # this is because the ETAG is calculated based on the static template as opposed to the
48
- # generated output.
49
- #
50
- # However, this is not a problem because the browser will still treat these pages as
51
- # separate because they have different URLs (e.g. `projects/1` vs `projects/2`), meaning
52
- # that it will not accidentally use the cache from a different URL even though the ETAG
53
- # is exactly the same.
54
- fresh_when nil, template: template
55
- end
56
-
57
39
  def json_ui_render(template, args = {})
58
40
  JSON.parse(render_to_string(template, locals: args))
59
41
  end
@@ -24,7 +24,7 @@ module Glib
24
24
  }
25
25
 
26
26
  /* Make sure the hover highlight effect also has rounded corners */
27
- .rounded-corner:hover:before {
27
+ .rounded-corner:hover:after {
28
28
  border-radius: 16px;
29
29
  }
30
30
  </style>
File without changes
File without changes
File without changes
@@ -1,7 +1,6 @@
1
1
  class Glib::JsonUi::ActionBuilder
2
2
  module Dialogs
3
3
  class Alert < Action
4
- string :title
5
4
  string :message
6
5
  action :onLoad
7
6
  action :onClose
@@ -29,7 +28,6 @@ class Glib::JsonUi::ActionBuilder
29
28
  bool :showClose
30
29
  string :fullscreen # mobile, always
31
30
  length :width
32
- bool :closeOnBlur
33
31
 
34
32
  # def initialize(json, page)
35
33
  # @json = json
@@ -46,7 +44,6 @@ class Glib::JsonUi::ActionBuilder
46
44
  bool :showClose
47
45
  string :fullscreen
48
46
  length :width
49
- length :height
50
47
  end
51
48
 
52
49
  class Reload < Action
@@ -2,7 +2,6 @@ class Glib::JsonUi::ActionBuilder
2
2
  module Http
3
3
  class AbstractHttp < Action
4
4
  string :url, cache: true
5
- bool :silent
6
5
 
7
6
  def formData(hash)
8
7
  form_data = {}
File without changes
@@ -9,8 +9,5 @@ class Glib::JsonUi::ActionBuilder
9
9
  array :steps
10
10
  int :startFrom
11
11
  end
12
-
13
- class Stop < Action
14
- end
15
12
  end
16
13
  end
File without changes
File without changes
@@ -37,7 +37,7 @@ module Glib
37
37
  action :onLongPress
38
38
  icon :icon
39
39
  bool :avatar
40
- # action :onReorder
40
+ action :onReorder
41
41
  string :paramNameForFormData
42
42
  string :paramNameForNewAbsoluteIndex
43
43
  string :paramNameForNewSectionIndex
@@ -46,7 +46,9 @@ module Glib
46
46
  string :id # Deprecated
47
47
  string :paramNameForNewIndex # Deprecated
48
48
 
49
- panels_builder :accessory, :header, :body, :footer
49
+ # # NOTE: Experimental. Still deciding whether this needs to be a full blown panel or
50
+ # # an array of badges (with relevant properties, e.g. text, color, etc)
51
+ # views :accessoryViews
50
52
  end
51
53
 
52
54
  class Featured < Standard
File without changes
@@ -3,7 +3,6 @@ class Glib::JsonUi::ViewBuilder
3
3
 
4
4
  class AbstractField < View
5
5
  bool :readOnly
6
- bool :disabled
7
6
  hash :validation
8
7
  bool :disableDirtyCheck
9
8
  action :onChange
@@ -77,7 +76,6 @@ class Glib::JsonUi::ViewBuilder
77
76
  class Text < AbstractField
78
77
  int :maxLength
79
78
  icon :leftIcon
80
- icon :rightIcon
81
79
  string :leftText
82
80
  string :rightText
83
81
  action :onTypeStart
@@ -116,7 +114,6 @@ class Glib::JsonUi::ViewBuilder
116
114
  class Submit < AbstractField
117
115
  string :text
118
116
  color :color
119
- icon :icon
120
117
  end
121
118
 
122
119
  class CheckGroup < AbstractField
@@ -304,8 +301,7 @@ class Glib::JsonUi::ViewBuilder
304
301
  end
305
302
 
306
303
  class Otp < AbstractField
307
- int :length
308
- string :type
304
+ int :lengths
309
305
  end
310
306
 
311
307
  class Rating < AbstractField
@@ -140,7 +140,6 @@ class Glib::JsonUi::ViewBuilder
140
140
  action :onScrollToBottom
141
141
 
142
142
  int :responsiveCols
143
- hash :dragSupport
144
143
 
145
144
  def firstSection(block)
146
145
  json.sections [1] do
@@ -243,7 +242,6 @@ class Glib::JsonUi::ViewBuilder
243
242
  string :distribution
244
243
  string :align
245
244
  action :onClick
246
- hash :dragSupport
247
245
  end
248
246
 
249
247
  class Flow < View
@@ -243,6 +243,7 @@ module Glib
243
243
 
244
244
  class TabBar < View
245
245
  int :height
246
+ int :activeIndex
246
247
  color :color
247
248
 
248
249
  def buttons(block)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -14,24 +14,21 @@ page.form \
14
14
  form.spacer height: 6
15
15
  form.fields_otp \
16
16
  name: 'user[otp_summary1]',
17
- length: 7,
18
- type: 'text'
17
+ lengths: 7
19
18
 
20
19
  form.spacer height: 20
21
- form.h2 text: 'OTP Custom Length and input type number'
20
+ form.h2 text: 'OTP Custom Length'
22
21
  form.spacer height: 6
23
22
  form.fields_otp \
24
23
  name: 'user[otp_summary2]',
25
- length: 3,
26
- type: 'number'
24
+ lengths: 3
27
25
 
28
26
  form.spacer height: 20
29
27
  form.h2 text: 'OTP with Long Field'
30
28
  form.spacer height: 6
31
29
  form.fields_otp \
32
30
  name: 'user[otp_summary3]',
33
- length: 20,
34
- type: 'text'
31
+ lengths: 20
35
32
 
36
33
  form.spacer height: 20
37
34
  form.fields_submit text: 'Submit'
@@ -15,13 +15,7 @@ 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
- form.fields_select \
19
- name: 'user[city]',
20
- width: 'matchParent',
21
- label: 'City1',
22
- placeholder: 'This is a placeholder',
23
- options: languages.map { |k, v| { value: k, text: v } },
24
- value: 'canberra'
18
+ form.fields_select name: 'user[city]', width: 'matchParent', label: 'City', options: languages.map { |k, v| { value: k, text: v } }, value: 'canberra'
25
19
  form.fields_select name: 'user[cities][]', width: 'matchParent', label: 'Cities', options: languages.map { |k, v| { value: k, text: v } }, value: ['melbourne', 'sydney'], multiple: true
26
20
 
27
21
  form.spacer height: 20
@@ -17,11 +17,8 @@ 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
- paramNameForFormData: 'message',
21
20
  onChange: ->(action) do
22
- action.dialogs_alert title: 'Submit data?', onClose: ->(subaction) do
23
- action.forms_submit
24
- end
21
+ action.forms_submit
25
22
  end
26
23
 
27
24
  form.fields_check \
@@ -46,7 +43,7 @@ page.scroll childViews: ->(scroll) do
46
43
  onChange: ->(action) do
47
44
  action.snackbars_select message: 'Submit data?', buttons: ->(menu) do
48
45
  menu.button text: 'Yes, submit', onClick: ->(subaction) do
49
- subaction.forms_submit
46
+ action.forms_submit
50
47
  end
51
48
  end
52
49
  end
@@ -60,7 +57,6 @@ page.scroll childViews: ->(scroll) do
60
57
  group.fields_radio value: 'senior', label: 'Senior'
61
58
  group.fields_radio value: 'junior', label: 'Junior'
62
59
  end,
63
- paramNameForFormData: 'message',
64
60
  onChange: ->(action) do
65
61
  action.sheets_select message: 'Submit data?', buttons: ->(menu) do
66
62
  menu.button text: 'Yes, submit', onClick: ->(subaction) do
@@ -82,20 +78,6 @@ page.scroll childViews: ->(scroll) do
82
78
  end
83
79
  end
84
80
 
85
-
86
- form.spacer height: 20
87
- form.h2 text: 'Textarea'
88
- form.fields_textarea \
89
- name: 'user[bio]',
90
- width: 'matchParent',
91
- onChange: ->(action) do
92
- action.sheets_select message: 'Submit data?', buttons: ->(menu) do
93
- menu.button text: 'Yes, submit', onClick: ->(subaction) do
94
- action.forms_submit
95
- end
96
- end
97
- end
98
-
99
81
  form.spacer height: 20
100
82
  form.h2 text: 'Text (Asynchronous)'
101
83
  form.fields_text \
@@ -104,23 +86,6 @@ page.scroll childViews: ->(scroll) do
104
86
  onChange: ->(action) do
105
87
  action.http_post url: json_ui_garage_url(path: 'forms/generic_post')
106
88
  end
107
-
108
- form.spacer height: 20
109
- rules = { fileType: 'image', maxFileSize: 5000, fileTypeErrorText: 'Invalid!', maxFileSizeErrorText: 'Too big!' }
110
- form.fields_file \
111
- name: 'user[photo][]',
112
- width: 'matchParent',
113
- label: 'Avatar',
114
- accepts: rules,
115
- directUploadUrl: rails_direct_uploads_url,
116
- placeholderView: { type: 'avatar', width: 100, height: 100, url: 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxMREBUREhAWFhUWGBcVFRgXFxUVFxcWGRUWFxYVFRUYHSggGB0lHRgVITEhJSkrLi4uGB8zODMtNygtLisBCgoKBQUFDgUFDisZExkrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrK//AABEIAOMA3gMBIgACEQEDEQH/xAAbAAEAAgMBAQAAAAAAAAAAAAAABgcBAwQFAv/EAEAQAAECAwMKAwYEBAYDAAAAAAEAAgMRIQQSMQUGIjJBUWFxgZEHE6FCUnKxwdEUI2LwM4KSskNzg6LC4WOz8f/EABQBAQAAAAAAAAAAAAAAAAAAAAD/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwC6XuvCQRj7okcUe27UYoxt4TOKDDG3Knkjm3jeGCMdeoeaOcWmQwQZe6/Qc0a+6Lpx+6PbcqOSNbeF44oMMbcqeSOZeN4YIx1+h5oXEG6MEGXuv0HNGuui6cf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SAJOx7+qD4iWbce60uYRiF0MBGth3qskkmYw/exByIustacBPlRa3QW4TIPGvyQaEW91nl7QWPw53hBpRbhZydo7p5FZFwQaUXSYDRiSshu1rRLf8APFBoZDJwC2CEAZEzO4LbEde1T9FgESkdb67KoPqJo1HKWxfIZe0lhgIq7DujgSZtw7eiA11+hptQvu6P7qsvIOrj2ojSAJOx7+qAW3KiuxAy9pfuiwwEa2HeqOBJmMO3OiAHX6Gm1C65QV2rLzPVx7IwgUdj3QfVp1eqWfVREGqy49PskfW7IiDZasOv3WYGr3REGuy49FiPrdkRBstWHX7rMHV7rKINVlx6LEXX7IiDZasBzWYOp3+qyiDVZcTyWIuv2+iIg2WrAc1mHqdD9URB8WXEr5fr9R9ERBttOr1Sz6vdZRBpsuPT7JH1uyIg2WrDqswdTuiINdlxPJYtOt0REH//2Q==' },
117
- onChange: ->(action) do
118
- action.sheets_select message: 'Submit data?', buttons: ->(menu) do
119
- menu.button text: 'Yes, submit', onClick: ->(subaction) do
120
- action.forms_submit
121
- end
122
- end
123
- end
124
89
  end
125
90
 
126
91
  end
File without changes
File without changes
@@ -11,7 +11,9 @@ section.rows builder: ->(row) do
11
11
  array.each do |i|
12
12
  index = page_index * batch_count + i
13
13
  if local_assigns[:reorder]
14
- row.thumbnail title: "Item #{index}"
14
+ row.thumbnail title: "Item #{index}", onReorder: ->(action) do
15
+ action.dialogs_notification title: "Item #{index}"
16
+ end, paramNameForFormData: 'message', paramNameForNewIndex: 'new_index'
15
17
  else
16
18
  row.thumbnail title: "Item #{index}", subtitle: "Sub Item #{index}", subsubtitle: "Sub Sub Item #{index}"
17
19
  end
File without changes
File without changes
@@ -30,11 +30,5 @@ else
30
30
  end
31
31
  render 'json_ui/garage/lists/autoload_section', page: page, page_index: page_index, reorder: true
32
32
  end
33
- ], dragSupport: {
34
- onDrop: {
35
- action: 'dialogs/alert'
36
- },
37
- paramNameForFormData: 'message',
38
- paramNameForNewIndex: 'new_index'
39
- }
33
+ ]
40
34
  end
@@ -11,22 +11,6 @@ json_ui_page json do |page|
11
11
  section.rows builder: ->(template) do
12
12
  template.thumbnail title: 'Click me', onClick: ->(action) do
13
13
  action.windows_open url: json_ui_garage_url(path: 'home/blank')
14
- end,
15
- accessory: ->(accessory) do
16
- accessory.header \
17
- width: 'matchParent',
18
- backgroundColor: '#b3bac2',
19
- padding: { top: 10, bottom: 10, left: 10, right: 10 },
20
- childViews: ->(bottom) do
21
- bottom.label text: 'Custom row header'
22
- end
23
- accessory.footer \
24
- width: 'matchParent',
25
- backgroundColor: '#b3bac2',
26
- padding: { top: 10, bottom: 10, left: 10, right: 10 },
27
- childViews: ->(bottom) do
28
- bottom.label text: 'Custom row footer'
29
- end
30
14
  end
31
15
  template.thumbnail title: 'Item with icon and subtitle', subtitle: 'Item subtitle', icon: 'facebook'
32
16
  template.thumbnail title: 'Item with chips', chips: ->(menu) do
File without changes
File without changes
@@ -6,42 +6,44 @@ json_ui_page json do |page|
6
6
  page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
7
7
  scroll.panels_column lg: { cols: 8 }, childViews: ->(column) do
8
8
  column.h2 text: 'Tab Bar with Badge'
9
- column.tabBar buttons: ->(menu) do
10
- badges = [
11
- {
12
- text: nil,
13
- backgroundColor: nil
14
- },
15
- {
16
- text: 8,
17
- backgroundColor: '#272551'
18
- },
19
- {
20
- text: '⭐⭐⭐',
21
- backgroundColor: '#008000'
22
- }
23
- ]
24
- {
25
- 'FIRST' => 'home',
26
- 'SECOND' => 'schedule',
27
- 'THIRD' => 'analytics'
28
- }.each_with_index do |(text, icon), index|
29
- menu.button \
30
- icon: icon,
31
- text: text,
32
- badge: badges[index],
33
- disabled: params[:tab].to_i == index,
34
- onClick: ->(action) do
35
- action.windows_reload \
36
- url: json_ui_garage_url(
37
- path: 'pages/tab_bar',
38
- tab: index,
39
- tab_2: params[:tab_2],
40
- tab_3: params[:tab_3]
41
- )
9
+ column.tabBar \
10
+ activeIndex: params[:tab].to_i,
11
+ buttons: ->(menu) do
12
+ badges = [
13
+ {
14
+ text: nil,
15
+ backgroundColor: nil
16
+ },
17
+ {
18
+ text: 8,
19
+ backgroundColor: '#272551'
20
+ },
21
+ {
22
+ text: '⭐⭐⭐',
23
+ backgroundColor: '#008000'
24
+ }
25
+ ]
26
+ {
27
+ 'FIRST' => 'home',
28
+ 'SECOND' => 'schedule',
29
+ 'THIRD' => 'analytics'
30
+ }.each_with_index do |(text, icon), index|
31
+ menu.button \
32
+ icon: icon,
33
+ text: text,
34
+ badge: badges[index],
35
+ disabled: params[:tab].to_i == index,
36
+ onClick: ->(action) do
37
+ action.windows_reload \
38
+ url: json_ui_garage_url(
39
+ path: 'pages/tab_bar',
40
+ tab: index,
41
+ tab_2: params[:tab_2],
42
+ tab_3: params[:tab_3]
43
+ )
44
+ end
42
45
  end
43
- end
44
- end
46
+ end
45
47
  column.spacer height: 10
46
48
 
47
49
  column.label text: "Tab index #{params[:tab].to_i} selected"
@@ -55,22 +57,25 @@ json_ui_page json do |page|
55
57
 
56
58
  scroll.panels_column lg: { cols: 8 }, childViews: ->(column) do
57
59
  column.h2 text: "Tab Bar with 'full-width-divider'"
58
- column.tabBar styleClass: 'full-width-divider', buttons: ->(menu) do
59
- 5.times do |index|
60
- menu.button \
61
- text: "Tab #{index}",
62
- disabled: params[:tab_2].to_i == index,
63
- onClick: ->(action) do
64
- action.windows_reload \
65
- url: json_ui_garage_url(
66
- path: 'pages/tab_bar',
67
- tab: params[:tab],
68
- tab_2: index,
69
- tab_3: params[:tab_3]
70
- )
60
+ column.tabBar \
61
+ activeIndex: params[:tab_2].to_i,
62
+ styleClass: 'full-width-divider',
63
+ buttons: ->(menu) do
64
+ 5.times do |index|
65
+ menu.button \
66
+ text: "Tab #{index}",
67
+ disabled: params[:tab_2].to_i == index,
68
+ onClick: ->(action) do
69
+ action.windows_reload \
70
+ url: json_ui_garage_url(
71
+ path: 'pages/tab_bar',
72
+ tab: params[:tab],
73
+ tab_2: index,
74
+ tab_3: params[:tab_3]
75
+ )
76
+ end
71
77
  end
72
78
  end
73
- end
74
79
  column.spacer height: 10
75
80
 
76
81
  column.label text: "Tab-2 index #{params[:tab_2].to_i} selected"
@@ -79,22 +84,25 @@ json_ui_page json do |page|
79
84
 
80
85
  scroll.panels_column lg: { cols: 8 }, childViews: ->(column) do
81
86
  column.h2 text: "Tab Bar 'with no-grow'"
82
- column.tabBar styleClass: 'no-grow', buttons: ->(menu) do
83
- 5.times do |index|
84
- menu.button \
85
- text: "Tab #{index}",
86
- disabled: params[:tab_3].to_i == index,
87
- onClick: ->(action) do
88
- action.windows_reload \
89
- url: json_ui_garage_url(
90
- path: 'pages/tab_bar',
91
- tab: params[:tab],
92
- tab_2: params[:tab_2],
93
- tab_3: index
94
- )
87
+ column.tabBar \
88
+ activeIndex: params[:tab_3].to_i,
89
+ styleClass: 'no-grow',
90
+ buttons: ->(menu) do
91
+ 5.times do |index|
92
+ menu.button \
93
+ text: "Tab #{index}",
94
+ disabled: params[:tab_3].to_i == index,
95
+ onClick: ->(action) do
96
+ action.windows_reload \
97
+ url: json_ui_garage_url(
98
+ path: 'pages/tab_bar',
99
+ tab: params[:tab],
100
+ tab_2: params[:tab_2],
101
+ tab_3: index
102
+ )
103
+ end
95
104
  end
96
105
  end
97
- end
98
106
  column.spacer height: 10
99
107
 
100
108
  column.label text: "Tab-3 index #{params[:tab_3].to_i} selected"
@@ -1,6 +1,7 @@
1
1
  progress = params[:progress]&.to_i&.between?(0, 5) ? params[:progress].to_i : 0
2
2
 
3
3
  tview.panels_responsive \
4
+ width: 400,
4
5
  childViews: ->(res) do
5
6
  res.panels_column sm: { cols: 11 }, childViews: ->(subcolumn) do
6
7
  subcolumn.panels_column sm: { cols: 2, padding: { right: 10 } }, childViews: ->(inner_column) do
File without changes
File without changes
@@ -119,30 +119,13 @@ json_ui_page json do |page|
119
119
 
120
120
  scroll.spacer height: 20
121
121
  scroll.h1 text: 'Label combo (with onClick)'
122
- scroll.panels_horizontal \
123
- padding: { left: 20, right: 20, top: 10, bottom: 10 },
124
- styleClasses: ['rounded-corner'],
125
- backgroundColor: '#b3bac2',
126
- childViews: ->(panel) do
127
- panel.label text: 'Label 1'
128
- panel.label backgroundColor: '#ffffff', text: 'Label 2'
129
- panel.label text: 'Label 3'
130
- end, onClick: ->(action) do
131
- action.windows_open url: json_ui_garage_url(path: 'home/blank')
132
- end
133
-
134
- scroll.spacer height: 20
135
- scroll.h1 text: 'Drag-and-drop support'
136
- scroll.panels_horizontal backgroundColor: '#b3bac2', width: 300, distribution: 'spaceEqually', childViews: ->(panel) do
137
- panel.button id: 'button1', text: '1'
138
- panel.button id: 'button2', text: '2'
139
- panel.button id: 'button3', text: '3'
140
- end, dragSupport: {
141
- onDrop: {
142
- action: 'dialogs/alert',
143
- },
144
- paramNameForFormData: 'message'
145
- }
122
+ scroll.panels_horizontal childViews: ->(panel) do
123
+ panel.label backgroundColor: '#b3bac2', text: 'Label 1'
124
+ panel.label text: 'Label 2'
125
+ panel.label backgroundColor: '#b3bac2', text: 'Label 3'
126
+ end, onClick: ->(action) do
127
+ action.windows_open url: json_ui_garage_url(path: 'home/blank')
128
+ end
146
129
 
147
130
  scroll.label text: "\n"
148
131
  end
@@ -72,7 +72,7 @@ json_ui_page json do |page|
72
72
  left.button text: '1'
73
73
  end
74
74
  content.center childViews: ->(center) do
75
- center.label text: 'a very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very long text'
75
+ center.label text: 'a very very very very very very very very very very very very very very very very very very very very very very very very very very very very long text'
76
76
  end
77
77
  content.right childViews: ->(right) do
78
78
  right.button text: '2'
@@ -26,7 +26,7 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
26
26
  end
27
27
 
28
28
  scroll.spacer height: 14
29
- scroll.h2 text: 'Breadcrumbs (experimental)'
29
+ scroll.h2 text: 'Breadcrumbs'
30
30
  scroll.spacer height: 6
31
31
  scroll.panels_ul \
32
32
  width: 'matchParent',
@@ -37,11 +37,8 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
37
37
  ul.button text: 'Level 1', styleClass: 'link', onClick: ->(action) do
38
38
  action.windows_open url: json_ui_garage_url(path: 'home/blank')
39
39
  end
40
-
41
- ul.button icon: 'keyboard_arrow_down', text: 'Level 2', styleClass: 'link', childButtons: ->(menu) do
42
- menu.button text: 'Dropdown item 1'
43
- menu.button text: 'Dropdown item 2'
44
- menu.button text: 'Dropdown item 3'
40
+ ul.button text: 'Level 2', styleClass: 'link', onClick: ->(action) do
41
+ action.windows_open url: json_ui_garage_url(path: 'home/blank')
45
42
  end
46
43
  ul.label text: 'Level 3'
47
44
  end
File without changes
File without changes
@@ -8,34 +8,26 @@
8
8
  <title>App</title>
9
9
  <%= csrf_meta_tags %>
10
10
 
11
- <%= javascript_pack_tag 'vue_renderer', defer: true %>
11
+ <%= vite_javascript_tag 'vue_renderer', defer: true %>
12
12
  <%#= javascript_include_tag 'vue_renderer_extras', defer: true %>
13
13
 
14
- <%= stylesheet_pack_tag 'vue_renderer' %>
14
+ <%= vite_stylesheet_tag 'vue_renderer' %>
15
15
 
16
16
  <link href="//fonts.googleapis.com/css?family=Material+Icons" rel="stylesheet" />
17
-
18
- <%# Without this, checkboxes and radio buttons will not display. %>
19
- <link href="//cdn.materialdesignicons.com/2.1.99/css/materialdesignicons.min.css" rel="stylesheet" />
20
-
21
- <%= yield :head %>
22
-
23
- <% if @__glib_head_code %>
24
- <%= @__glib_head_code.html_safe %>
25
- <% end %>
17
+ <%# Without this, checkboxes and radio buttons will not display. %>
18
+ <link href="//cdn.materialdesignicons.com/2.1.99/css/materialdesignicons.min.css" rel="stylesheet" />
19
+ <%= yield :head %>
20
+ <% if @__glib_head_code %>
21
+ <%= @__glib_head_code.html_safe %>
22
+ <% end %>
26
23
  </head>
27
-
28
24
  <body>
29
25
  <%= yield :header %>
30
-
31
26
  <noscript>Please enable JavaScript to view this web site.</noscript>
32
27
  <div id="app"></div>
33
-
34
28
  <script>
35
29
  var __page = <%= raw @__json_ui_orig_page%>;
36
30
  </script>
37
-
38
31
  <%= yield :footer %>
39
32
  </body>
40
-
41
33
  </html>
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: 2.6.3
4
+ version: 3.0.0.pre.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -309,12 +309,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
309
309
  version: '0'
310
310
  required_rubygems_version: !ruby/object:Gem::Requirement
311
311
  requirements:
312
- - - ">="
312
+ - - ">"
313
313
  - !ruby/object:Gem::Version
314
- version: '0'
314
+ version: 1.3.1
315
315
  requirements: []
316
- rubyforge_project:
317
- rubygems_version: 2.7.6
316
+ rubygems_version: 3.1.4
318
317
  signing_key:
319
318
  specification_version: 4
320
319
  summary: ''