glib-web 3.6.0 → 3.8.0

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: fb43826d17e6dc30db2f4f307000f73678c62b339d9a41e244199f88265ff7b0
4
- data.tar.gz: c19e63fe08d46d1d76e97c751c9b0875841c2dc8c9a0f71c9bcd2278fc89d00c
3
+ metadata.gz: cf2fd0a2fb456ec43544ac78429614c92a9a8d9200e0f9f142c7ff4cb39d8e4a
4
+ data.tar.gz: 2bb68116d48ae777d99aa60f4f5ac6354a7197c893efd5ea84e138d52077bf34
5
5
  SHA512:
6
- metadata.gz: d43ffb4cd37a2678ca1747e0213ee9293c81315be6b688c6f1518f835f4341952619c41ba802c430766c2566c5d589cc36123d5b5a2f3903e37e991a2e3b2991
7
- data.tar.gz: d18ad9a9ec3c27e9964345c640fdcaf8cbea2b58934a012d91a2699088139e39d9a34ccb21d0f37fb5811f20e48de7eee4773533acaca817840052c931ea7138
6
+ metadata.gz: cb3239869961fcae2d0bf36193b0cdb58d48fa1224dc8cc19f93954cbe0579679392f8f59e9d5fd3055836f0895fe3cf294b857a5d7991e926a429f5393f2b5c
7
+ data.tar.gz: 0a9b08633f1ceb5213c8a719c816e6fef23e0ff7305ae2aafd0e07bb43aab32f591f639ee77856253cf0ed311fffdf2c19f1bf56cca0d8b65be395428ee4f1a5
@@ -37,6 +37,10 @@ class Glib::JsonUi::ViewBuilder
37
37
  class Line < View
38
38
  include Series
39
39
  array :colors
40
+ string :prefix
41
+ string :suffix
42
+ int :min
43
+ int :max
40
44
  # idea for the future
41
45
  # hash :nextPage
42
46
  end
@@ -46,17 +50,29 @@ class Glib::JsonUi::ViewBuilder
46
50
 
47
51
  bool :stacked
48
52
  array :colors
53
+ string :prefix
54
+ string :suffix
55
+ int :min
56
+ int :max
49
57
  end
50
58
 
51
59
  class Pie < View
52
60
  include Series
53
61
  array :colors
62
+ string :prefix
63
+ string :suffix
64
+ int :min
65
+ int :max
54
66
 
55
67
  end
56
68
 
57
69
  class Area < View
58
70
  include Series
59
71
  array :colors
72
+ string :prefix
73
+ string :suffix
74
+ int :min
75
+ int :max
60
76
  end
61
77
 
62
78
  end
@@ -42,6 +42,7 @@ module Glib
42
42
  singleton_array :styleClass, :styleClasses
43
43
  hash :showIf
44
44
  hash :valueIf
45
+ hash :loadIf
45
46
  hash :analytics
46
47
  # hash :tooltip
47
48
  array :extensions
@@ -15,5 +15,5 @@ page.form options.merge(childViews: ->(form) do
15
15
  form.fields_text name: "user[field#{i}]", width: 'matchParent', label: "Field#{i}"
16
16
  end
17
17
  form.button text: 'Submit', onClick: ->(action) { action.forms_submit }
18
- form.fab icon: 'send', onClick: ->(action) { action.forms_submit }
18
+ form.fab icon: 'send', styleClasses: ['primary', 'icon'], onClick: ->(action) { action.forms_submit }
19
19
  end)
@@ -186,6 +186,80 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
186
186
  end
187
187
  end
188
188
 
189
+ form.spacer height: 20
190
+ form.h1 text: 'Show/hide without send data'
191
+ form.fields_check name: 'user[loadif1]', label: 'Show one field', checkValue: 'true', uncheckValue: 'false', value: 'true'
192
+ form.spacer height: 4
193
+ form.fields_text \
194
+ name: 'user[loadif_target1]', value: 'This field should not be submitted when it is hidden',
195
+ width: 'matchParent',
196
+ loadIf: {
197
+ "==": [
198
+ {
199
+ "var": 'user[loadif1]'
200
+ },
201
+ 'true'
202
+ ]
203
+ }
204
+
205
+ form.spacer height: 8
206
+ form.fields_check name: 'user[loadif2]', label: 'Show & hide many field', checkValue: 'true', uncheckValue: 'false', value: 'false'
207
+ form.spacer height: 4
208
+ form.panels_responsive \
209
+ width: 'matchParent',
210
+ loadIf: {
211
+ "==": [
212
+ {
213
+ "var": 'user[loadif2]'
214
+ },
215
+ 'true'
216
+ ]
217
+ },
218
+ childViews: ->(res) do
219
+ form.fields_text name: 'user[loadif_target2]', width: 'matchParent', value: 'Value 1'
220
+ form.spacer height: 4
221
+ form.fields_textarea name: 'user[loadif_target3]', width: 'matchParent', value: 'Value 2'
222
+ form.spacer height: 4
223
+ end
224
+
225
+ form.panels_responsive \
226
+ width: 'matchParent',
227
+ loadIf: {
228
+ "==": [
229
+ {
230
+ "var": 'user[loadif2]'
231
+ },
232
+ 'false'
233
+ ]
234
+ },
235
+ childViews: ->(res) do
236
+ form.fields_richText name: 'user[loadIf_target4]', width: 'matchParent', value: 'Value 3'
237
+ form.spacer height: 4
238
+ form.fields_radioGroup name: 'user[loadIf_target5]', width: 'matchParent', value: 'choice_1', childViews: ->(group) do
239
+ group.fields_radio label: 'Choice 1', value: 'choice_1'
240
+ group.fields_radio label: 'Choice 2', value: 'choice_2'
241
+ group.fields_radio label: 'Choice 3', value: 'choice_3'
242
+ end
243
+ end
244
+
245
+ form.spacer height: 8
246
+ form.fields_check name: 'user[loadif3]', label: 'Show target nested panels', checkValue: 'true', uncheckValue: 'false', value: 'false'
247
+
248
+ form.panels_responsive \
249
+ loadIf: { "==": [{ "var": 'user[loadif3]' }, 'true'] },
250
+ styleClass: 'border-2',
251
+ width: 'matchParent',
252
+ padding: { top: 8, right: 8, bottom: 8, left: 8 },
253
+ childViews: ->(res) do
254
+ res.panels_responsive \
255
+ styleClass: 'border-2',
256
+ width: 'matchParent',
257
+ padding: { top: 8, right: 8, bottom: 8, left: 8 },
258
+ childViews: ->(sres) do
259
+ sres.fields_text name: 'user[loadif_target6]', width: 'matchParent', value: 'Value 4'
260
+ end
261
+ end
262
+
189
263
  form.spacer height: 20
190
264
  form.fields_submit text: 'Submit'
191
265
 
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.6.0
4
+ version: 3.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -318,7 +318,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
318
318
  - !ruby/object:Gem::Version
319
319
  version: '0'
320
320
  requirements: []
321
- rubygems_version: 3.1.4
321
+ rubygems_version: 3.1.6
322
322
  signing_key:
323
323
  specification_version: 4
324
324
  summary: ''