glib-web 3.19.3 → 3.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7d54630cdd25d883da692e88f98d775f50718d1b0f9edb5ce1bef914044883a
|
4
|
+
data.tar.gz: a1c732849861960b1822ba8ae7ff72d237e0206c7e90780b3f3e36a9ca0cdae0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88f51b200e02d93754093488d74ccaae5a21cc2deb8ad80801bb21db2a3353301b209de2163a50200a0568867650ca5e24a2c467d4e127464ba504f9dcbbab7c
|
7
|
+
data.tar.gz: b5dbf27b9c38e17d22d359f5845704fc5ac6a11ab612fd2feebee2d9271ef38d241824dcf21c8776039cfc3070b8ab8816825f1bdf781bfe9d001b28ac0ca9c8
|
@@ -185,6 +185,11 @@ class Glib::JsonUi::ViewBuilder
|
|
185
185
|
panels_builder :accessory, :header, :footer
|
186
186
|
end
|
187
187
|
|
188
|
+
class ChipGroup < AbstractField
|
189
|
+
array :options
|
190
|
+
bool :multiple
|
191
|
+
end
|
192
|
+
|
188
193
|
class TimeZone < AbstractField
|
189
194
|
include Glib::EnumHelper
|
190
195
|
|
@@ -0,0 +1,27 @@
|
|
1
|
+
json.title 'Forms'
|
2
|
+
|
3
|
+
page = json_ui_page json
|
4
|
+
render "#{@path_prefix}/nav_menu", json: json, page: page
|
5
|
+
|
6
|
+
options = [{ text: 'Option 1', value: 'option_1' }, { text: 'Option 2', value: 'option_2' }, { text: 'Option 3', value: 'option_3' }, { text: 'Option 4', value: 'option_4' }]
|
7
|
+
|
8
|
+
page.form \
|
9
|
+
url: json_ui_garage_url(path: 'forms/generic_post'),
|
10
|
+
method: 'post',
|
11
|
+
padding: glib_json_padding_body,
|
12
|
+
childViews: ->(form) do
|
13
|
+
|
14
|
+
form.spacer height: 20
|
15
|
+
|
16
|
+
form.h2 text: 'Simple'
|
17
|
+
form.fields_chipGroup name: 'user[chip_group1]', options: options, value: ['option_2']
|
18
|
+
|
19
|
+
form.h2 text: 'Multiple'
|
20
|
+
form.fields_chipGroup multiple: true, name: 'user[chip_group2][]', options: options, value: ['option_3', 'option_1']
|
21
|
+
|
22
|
+
form.h2 text: 'onChange'
|
23
|
+
form.fields_chipGroup name: 'user[chip_group3]', options: options, value: ['option_4'], onChange: ->(action) { action.snackbars_alert message: 'change!' }
|
24
|
+
|
25
|
+
form.spacer height: 20
|
26
|
+
form.fields_submit text: 'Submit'
|
27
|
+
end
|
@@ -87,6 +87,9 @@ page.list sections: [
|
|
87
87
|
template.thumbnail title: 'OTP Field', onClick: ->(action) do
|
88
88
|
action.windows_open url: json_ui_garage_url(path: 'forms/otp_field')
|
89
89
|
end
|
90
|
+
template.thumbnail title: 'Chip group', onClick: ->(action) do
|
91
|
+
action.windows_open url: json_ui_garage_url(path: 'forms/chip_group')
|
92
|
+
end
|
90
93
|
end
|
91
94
|
end, ->(section) do
|
92
95
|
section.header padding: glib_json_padding_list, childViews: ->(header) do
|
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.
|
4
|
+
version: 3.20.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
@@ -160,6 +160,7 @@ files:
|
|
160
160
|
- app/views/json_ui/garage/forms/basic.json.jbuilder
|
161
161
|
- app/views/json_ui/garage/forms/basic_post.json.jbuilder
|
162
162
|
- app/views/json_ui/garage/forms/checkboxes.json.jbuilder
|
163
|
+
- app/views/json_ui/garage/forms/chip_group.json.jbuilder
|
163
164
|
- app/views/json_ui/garage/forms/conditional_value.json.jbuilder
|
164
165
|
- app/views/json_ui/garage/forms/dialogs_close.json.jbuilder
|
165
166
|
- app/views/json_ui/garage/forms/dialogs_update.json.jbuilder
|