glib-web 0.5.29 → 0.5.35

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7fbacc0893e8f36261c10fcfc5a1dd488d1170c10c4b901f14285a0c64212383
4
- data.tar.gz: 00ac950fdf253428ec4b3b1eac29d709c817949df290fb97b065b0adb24e0156
3
+ metadata.gz: 7ab027b2e06860edd4c9b20cee7936d370ef8ba92ebd15379ae6dbd8c20395de
4
+ data.tar.gz: 3d55b83d631e5c01e915cb4be80515c47e82314d8eb8ad38eb29d3e8e42785c9
5
5
  SHA512:
6
- metadata.gz: 01feace7ab2d3333382d4aed1ef15091fd827c9346270c9393d498330350f32f9559ebbdc577f8c1088eac659cec3c910b99de2b27b64f19810bcbc745049c8a
7
- data.tar.gz: c83f4a4d8414006746c70e8d692e788d0822ac19cc09964af687dfab1b07992205d69f5c82712fa8ff88c6adbf0b04ad815b40780bf4f0089bb32cc950a34e30
6
+ metadata.gz: 620795d7d88023f7f03a44991758a90a4fe7a3680ab09bbe4f37c3f6fc3cfdd24dba4bf09ba1ff134fdcf48325c51da8c142f8b72eb3cb35514717bb1c695c62
7
+ data.tar.gz: 51bd223aa3543323b3c2215a5a0258a25d3f52009e8e0c1b6b1865101e5180f3f43dff034016d974da39a45702e00e38cb34b4e10edce8afeed3f45c4e088e1e
@@ -74,6 +74,7 @@ module Glib
74
74
  string :clientSecret
75
75
  action :onSuccess
76
76
  action :onFailure
77
+ bool :setupOnly
77
78
  end
78
79
  end
79
80
 
@@ -27,6 +27,7 @@ module Glib
27
27
  end
28
28
 
29
29
  class Standard < AbstractTemplate
30
+ string :id
30
31
  string :title
31
32
  string :subtitle
32
33
  string :subsubtitle
@@ -90,11 +90,11 @@ module Glib
90
90
  builder
91
91
  end
92
92
 
93
- def rightNavButtons
94
- json.rightNavButtons do
95
- yield @menu_builder
96
- end
97
- end
93
+ # def rightNavButtons
94
+ # json.rightNavButtons do
95
+ # yield @menu_builder
96
+ # end
97
+ # end
98
98
 
99
99
  def template(template)
100
100
  json.template template
@@ -2,6 +2,7 @@ class Glib::JsonUi::ViewBuilder
2
2
  module Fields
3
3
 
4
4
  class AbstractField < View
5
+ bool :readOnly
5
6
  hash :validation
6
7
 
7
8
  def label(label)
@@ -68,7 +69,6 @@ class Glib::JsonUi::ViewBuilder
68
69
 
69
70
  class Text < AbstractField
70
71
  int :maxLength
71
- bool :readOnly
72
72
  end
73
73
 
74
74
  class Number < Text
@@ -130,7 +130,7 @@ class Glib::JsonUi::ViewBuilder
130
130
 
131
131
  class Select < AbstractField
132
132
  array :options
133
- bool :readOnly
133
+ # bool :readOnly
134
134
  bool :multiple, cache: true
135
135
  # bool :manualEntry
136
136
  hash :append
@@ -138,7 +138,7 @@ class Glib::JsonUi::ViewBuilder
138
138
 
139
139
  class Autocomplete < AbstractField
140
140
  array :options
141
- bool :readOnly
141
+ # bool :readOnly
142
142
  bool :multiple, cache: true
143
143
  # bool :manualEntry
144
144
  hash :append
@@ -164,11 +164,17 @@ class Glib::JsonUi::ViewBuilder
164
164
  # views :groupTemplateViews
165
165
  end
166
166
 
167
- class RadioGroup < View
168
- string :name
169
- string :value
167
+ class RadioGroup < AbstractField
168
+ # string :name
169
+ # string :value
170
170
  views :childViews
171
171
 
172
+ # Override
173
+ def value(value)
174
+ # Convert to string to make sure the value matches with Radio#value
175
+ @value = value.to_s if value != Glib::Value::DEFAULT
176
+ end
177
+
172
178
  string :iconOfBeforeSelected
173
179
  string :iconOfSelected
174
180
  string :iconOfAfterSelected
@@ -211,6 +217,7 @@ class Glib::JsonUi::ViewBuilder
211
217
  hash :latitudeField
212
218
  hash :longitudeField
213
219
  hash :zoomField
220
+ hash :autocompleteOptions
214
221
  end
215
222
 
216
223
  class StripeToken < AbstractField
@@ -35,6 +35,7 @@ json_ui_page json do |page|
35
35
  form.h2 text: 'Map'
36
36
  form.spacer height: 6
37
37
  form.fields_location name: 'user[address]', width: 'matchParent', label: 'Type an address', value: 'Sydney Harbour Bridge',
38
+ autocompleteOptions: { componentRestrictions: { country: 'au' }, types: ['(cities)'] },
38
39
  latitudeField: { view: 'fields/text', name: 'user[latitude]', label: 'Lat', value: -33.8523063, readOnly: true },
39
40
  longitudeField: { view: 'fields/text', name: 'user[longitude]', label: 'Long', value: 151.21078710000006, readOnly: true },
40
41
  zoomField: { view: 'fields/text', name: 'user[zoom]', label: 'Zoom' }
@@ -12,21 +12,22 @@ json_ui_page json do |page|
12
12
  form.spacer height: 14
13
13
  form.fields_textarea name: 'user[bio]', width: 'matchParent', label: 'Bio', placeholder: 'Enter your bio', styleClasses: ['outlined']
14
14
 
15
+ # form.spacer height: 14
16
+ # form.fields_stripeToken name: 'user[stripe_token_outlined]', width: 'matchParent', publicKey: 'pk_test_TYooMQauvdEDq54NiTphI7jx', styleClass: 'outlined'
17
+
18
+ # form.spacer height: 14
19
+ # form.fields_stripeToken name: 'user[stripe_token_individual]', width: 'matchParent', publicKey: 'pk_test_TYooMQauvdEDq54NiTphI7jx', styleClass: 'individual'
20
+
15
21
  form.spacer height: 14
16
- form.fields_stripeToken name: 'user[stripe_token_outlined]', width: 'matchParent', publicKey: 'pk_test_TYooMQauvdEDq54NiTphI7jx', styleClass: 'outlined'
22
+ form.fields_creditCard name: 'user[stripe_token_outlined]', width: 'matchParent', publicKey: 'pk_test_TYooMQauvdEDq54NiTphI7jx', styleClass: 'outlined'
17
23
 
18
24
  form.spacer height: 14
19
- form.fields_stripeToken name: 'user[stripe_token_individual]', width: 'matchParent', publicKey: 'pk_test_TYooMQauvdEDq54NiTphI7jx', styleClass: 'individual'
25
+ form.fields_creditCard name: 'user[stripe_token_individual]', width: 'matchParent', publicKey: 'pk_test_TYooMQauvdEDq54NiTphI7jx', styleClass: 'individual'
20
26
 
21
27
  form.spacer height: 14
22
28
  form.panels_split width: 'matchParent', content: ->(split) do
23
- # split.left childViews: ->(left) do
24
- # if params[:mode] == 'dialog'
25
- # left.button styleClass: 'link', text: 'cancel', onClick: ->(action) { action.dialogs_close }
26
- # end
27
- # end
28
29
  split.right childViews: ->(right) do
29
- right.button text: 'Submit', onClick: ->(action) { action.forms_submit }
30
+ right.fields_submit text: 'Submit'
30
31
  end
31
32
  end
32
33
 
@@ -24,7 +24,7 @@ json.phoenixSocket({
24
24
  })
25
25
 
26
26
  list_ws = { topic: 'rooms', events: ['comments_updated'] }
27
- page.list ws: list_ws, firstSection: ->(section) do
27
+ page.list phoenixSocket: list_ws, firstSection: ->(section) do
28
28
  section.header padding: { top: 12, left: 16, right: 16, bottom: 12 }, childViews: ->(header) do
29
29
  header.h3 text: 'Chat with John Doe'
30
30
  end
@@ -5,7 +5,7 @@ page = json_ui_page json
5
5
  render "#{@path_prefix}/nav_menu", json: json, page: page
6
6
 
7
7
  page.navBar backgroundColor: '#a8c4e3', color: '#ffffff', rightButtons: ->(menu) do
8
- menu.button icon: 'search', onClick: ->(action) do
8
+ menu.button icon: 'search', text: 'Search', onClick: ->(action) do
9
9
  action.dialogs_alert message: 'Perform some action'
10
10
  end
11
11
  menu.button icon: { name: 'star', badge: { text: '1', backgroundColor: '#ff0000' } }, onClick: ->(action) do
@@ -12,7 +12,7 @@ module Glib
12
12
  crawl json['body']&.[]('childViews')
13
13
  crawl json['footer']&.[]('childViews')
14
14
 
15
- json['rightNavButtons']&.each do |button|
15
+ json['rightButtons']&.each do |button|
16
16
  if button['buttons'].present?
17
17
  button['buttons'].each do |inner_button|
18
18
  click inner_button
@@ -82,7 +82,8 @@ module Glib
82
82
 
83
83
  def tear_down
84
84
  # NOTE: Experimental, to address issue where sometimes changes don't get saved.
85
- @logger.flush
85
+ # FINDING: Doesn't work
86
+ # @logger.flush
86
87
 
87
88
  @logger.close
88
89
  end
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.5.29
4
+ version: 0.5.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''