glib-web 4.42.4 → 4.43.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.
Files changed (23) hide show
  1. checksums.yaml +4 -4
  2. data/app/helpers/glib/json_ui/action_builder/browsers.rb +10 -0
  3. data/app/views/json_ui/garage/forms/selects.json.jbuilder +240 -174
  4. data/app/views/json_ui/garage/tables/bulk_edit.json.jbuilder +0 -24
  5. data/app/views/json_ui/garage/test_page/_header.json.jbuilder +25 -15
  6. data/app/views/json_ui/garage/test_page/auth.json.jbuilder +113 -0
  7. data/app/views/json_ui/garage/test_page/browsers.json.jbuilder +44 -0
  8. data/app/views/json_ui/garage/test_page/commands.json.jbuilder +30 -0
  9. data/app/views/json_ui/garage/test_page/cookies.json.jbuilder +12 -4
  10. data/app/views/json_ui/garage/test_page/fields.json.jbuilder +160 -0
  11. data/app/views/json_ui/garage/test_page/fields_dynamicSelect.json.jbuilder +177 -0
  12. data/app/views/json_ui/garage/test_page/fields_select.json.jbuilder +152 -0
  13. data/app/views/json_ui/garage/test_page/fields_sign.json.jbuilder +153 -0
  14. data/app/views/json_ui/garage/test_page/fields_timer.json.jbuilder +148 -0
  15. data/app/views/json_ui/garage/test_page/fields_upload.json.jbuilder +129 -0
  16. data/app/views/json_ui/garage/test_page/forms.json.jbuilder +6 -2
  17. data/app/views/json_ui/garage/test_page/list.json.jbuilder +110 -69
  18. data/app/views/json_ui/garage/test_page/panels_bulkEdit2.json.jbuilder +240 -0
  19. data/app/views/json_ui/garage/test_page/popovers.json.jbuilder +6 -2
  20. data/app/views/json_ui/garage/test_page/progressCircle.json.jbuilder +74 -65
  21. data/app/views/json_ui/garage/test_page/table.json.jbuilder +157 -88
  22. metadata +9 -2
  23. data/app/views/json_ui/garage/test_page/file_upload_new.json.jbuilder +0 -158
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e4d49f706b77adbcd7fc2be3ba19d573f5978179b69a3bfce27649836bed34d
4
- data.tar.gz: 8e510297698b4a4b8c3a9b9fbff58b4778a7e92891658228605fd687961848f8
3
+ metadata.gz: db591bcb286cb6cbc0b6f8d036dc33632bfabe83e5b066f7dc0e24de9267cd37
4
+ data.tar.gz: 84fd46bb7f734f1d66548b885bf129dc716d8fd575fee606d4272e0e5d39140c
5
5
  SHA512:
6
- metadata.gz: 6e844e7a9998e98b1591ccded851eb8377fccfe5724176f19581b20d537c5936d8aa441cb136263273fcb1878cf52f7a79b91ed3100db3fcf886e7edfbdb7967
7
- data.tar.gz: c6c6c0f0d2b7c40b436c6f8129b98324726558933ce88b9d83b7bc12e015896c7953f59f2c6e79acb61d9e83585571c916336499a084e6b5bb385da393ef5c38
6
+ metadata.gz: bb3a999815d9c8e5f09c3fd76e66199e961fb232b02e115471aee887ede2e86e427464a89fa34a1674f9eb8fa8bbe9bf1a40ba0659934eab355824a897cf954e
7
+ data.tar.gz: bb9d26d2660054524bc578f1ba39a238a1c4eea5522dc553fb5803ff47f88b3955abfcb32a128d3d816c42c522c86e4c7f9f54529ceb2cc7d34102fcf4b553d0
@@ -8,5 +8,15 @@ class Glib::JsonUi::ActionBuilder
8
8
  class DetectTimezone < Action
9
9
  action :onDetect
10
10
  end
11
+
12
+ class SetLocation < Action
13
+ string :url
14
+ action :onSet
15
+ bool :replace, cache: true
16
+
17
+ def created
18
+ replace(true) unless instance_variable_defined?(:@replace)
19
+ end
20
+ end
11
21
  end
12
22
  end
@@ -4,71 +4,87 @@ page = json_ui_page json
4
4
 
5
5
  render "#{@path_prefix}/nav_menu", json: json, page: page
6
6
 
7
- page.form id: 'form', url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', padding: glib_json_padding_body, childViews: ->(form) do
8
-
9
- form.spacer height: 20
10
- form.h2 text: 'Basic select fields'
11
- form.spacer height: 6
12
- languages = {
7
+ page.form(
8
+ id: '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
+ form.spacer height: 20
14
+ form.h2 text: 'Basic select fields'
15
+ form.spacer height: 6
16
+ languages = {
13
17
  'brisbane' => 'Brisbane',
14
18
  'canberra' => 'Canberra',
15
19
  'melbourne' => 'Melbourne',
16
20
  'sydney' => 'Sydney',
17
- }
18
-
19
- form.panels_responsive childViews: ->(column) do
20
- options = languages.map do |k, v|
21
- { value: k, text: v }
22
- end
23
- column.fields_select \
24
- name: 'user[city]',
25
- width: 'matchParent',
26
- clearable: true,
27
- label: 'City1',
28
- placeholder: 'This is a placeholder',
29
- options: options,
30
- value: 'canberra',
31
- disabled: true,
32
- leftIcon: { name: 'info', styleClasses: ['success'] },
33
- onChange: ->(action) do
34
- action.components_findClosest view: 'panels/responsive', onFind: ->(find) do
35
- # This is to demonstrate that `components_set` can be a more flexible version
36
- # of `components_replace`.
37
- find.components_set dataBuilder: ->(set) do
38
- # Don't update the childViews, just update the footer
39
- set.panels_responsive accessory: ->(accessory) do
40
- accessory.footer childViews: ->(footer) do
41
- footer.label text: 'New footer'
21
+ }
22
+ form.panels_responsive(
23
+ childViews: ->(column) do
24
+ options = languages.map do |k, v|
25
+ { value: k, text: v }
26
+ end
27
+ column.fields_select(
28
+ name: 'user[city]',
29
+ width: 'matchParent',
30
+ clearable: true,
31
+ label: 'City1',
32
+ placeholder: 'This is a placeholder',
33
+ options: options,
34
+ value: 'canberra',
35
+ disabled: true,
36
+ leftIcon: { name: 'info', styleClasses: ['success'] },
37
+ onChange: ->(action) do
38
+ action.components_findClosest(
39
+ view: 'panels/responsive',
40
+ onFind: ->(find) do
41
+ # This is to demonstrate that `components_set` can be a more flexible version
42
+ # of `components_replace`.
43
+ find.components_set(
44
+ dataBuilder: ->(set) do
45
+ # Don't update the childViews, just update the footer
46
+ set.panels_responsive(
47
+ accessory: ->(accessory) do
48
+ accessory.footer(
49
+ childViews: ->(footer) do
50
+ footer.label text: 'New footer'
51
+ end
52
+ )
53
+ end
54
+ )
55
+ end
56
+ )
42
57
  end
43
- end
58
+ )
44
59
  end
45
- end
60
+ )
61
+ end,
62
+ accessory: ->(accessory) do
63
+ accessory.footer(
64
+ childViews: ->(footer) do
65
+ footer.label text: 'Original footer'
66
+ end
67
+ )
46
68
  end
47
- end, accessory: ->(accessory) do
48
- accessory.footer childViews: ->(footer) do
49
- footer.label text: 'Original footer'
50
- end
51
- end
52
-
53
- form.spacer height: 6
54
-
55
- options = languages.map { |k, v| { value: k, text: v } }
56
- options << { value: 'none_of_above', text: 'None of the above' }
57
- form.fields_select \
58
- valueForDisableAll: 'none_of_above',
69
+ )
70
+ form.spacer height: 6
71
+ options = languages.map { |k, v| { value: k, text: v } }
72
+ options << { value: 'none_of_above', text: 'None of the above' }
73
+ form.fields_select(
74
+ valueForDisableAll: 'none_of_above',
59
75
  name: 'user[cities][]',
60
76
  width: 'matchParent',
61
77
  label: 'Cities',
62
78
  options: options,
63
79
  value: ['melbourne', 'sydney'],
64
80
  multiple: true,
65
- onChange: ->(action) do
81
+ onChange: ->(action) do
66
82
  action.dialogs_alert message: 'Options selected'
67
83
  end
68
-
69
- form.spacer height: 6
70
- form.fields_select \
71
- valueForDisableAll: 'none_of_above',
84
+ )
85
+ form.spacer height: 6
86
+ form.fields_select(
87
+ valueForDisableAll: 'none_of_above',
72
88
  prependSelectAll: true,
73
89
  name: 'user[cities2][]',
74
90
  width: 'matchParent',
@@ -76,143 +92,193 @@ page.form id: 'form', url: json_ui_garage_url(path: 'forms/generic_post'), metho
76
92
  options: options[0..-2],
77
93
  value: ['melbourne', 'sydney'],
78
94
  multiple: true
79
-
80
- form.spacer height: 20
81
- form.h2 text: 'Select fields with grouping'
82
- form.spacer height: 6
83
- form.label text: 'Applicable to select fields with many options'
84
- form.spacer height: 6
85
-
86
- languages = {
95
+ )
96
+ form.spacer height: 20
97
+ form.h2 text: 'Select fields with grouping'
98
+ form.spacer height: 6
99
+ form.label text: 'Applicable to select fields with many options'
100
+ form.spacer height: 6
101
+ languages = {
87
102
  'East Asia' => {
88
- 'cn' => 'Chinese',
89
- 'jp' => 'Japanese',
90
- 'kr' => 'Korean',
103
+ 'cn' => 'Chinese',
104
+ 'jp' => 'Japanese',
105
+ 'kr' => 'Korean',
91
106
  },
92
107
  'Middle East' => {
93
- 'sa' => 'Arabic',
94
- 'in' => 'Hindi',
108
+ 'sa' => 'Arabic',
109
+ 'in' => 'Hindi',
95
110
  },
96
111
  'Europe' => {
97
- 'an' => 'Dutch',
98
- 'en' => 'English',
99
- 'fr' => 'French',
100
- 'de' => 'German',
101
- 'it' => 'Italian',
102
- 'pt' => 'Portuguese',
103
- 'es' => 'Spanish',
112
+ 'an' => 'Dutch',
113
+ 'en' => 'English',
114
+ 'fr' => 'French',
115
+ 'de' => 'German',
116
+ 'it' => 'Italian',
117
+ 'pt' => 'Portuguese',
118
+ 'es' => 'Spanish',
104
119
  },
105
120
  'Eastern Europe' => {
106
- 'ru' => 'Russian',
121
+ 'ru' => 'Russian',
107
122
  }
108
- }
109
- options = []
110
- languages.each do |group, sub|
111
- options << { type: 'label', text: group }
112
- options.concat(sub.map { |k, v| { value: k, text: v, subtitle: 'Country', imageUrl: "https://flagsapi.com/#{k.upcase}/flat/24.png" } })
113
- options << { type: 'divider' }
114
- end
115
-
116
- form.fields_select \
117
- name: 'user[language]',
118
- width: 'matchParent',
119
- label: 'Primary Language',
120
- options: options,
121
- value: 'an',
122
- accessory: ->(accessory) do
123
- accessory.header padding: { x: 16, y: 10 }, childViews: ->(header) do
124
- header.label text: 'Header'
125
- end
126
- accessory.footer styleClass: 'select-footer', padding: { x: 16, y: 10 }, childViews: ->(footer) do
127
- footer.h3 text: 'Footer'
128
- # footer.spacer height: 4
129
- footer.p styleClass: 'select-footer-paragraph', text: %(
130
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Tortor consequat id porta nibh venenatis cras sed. Amet consectetur adipiscing elit duis tristique sollicitudin nibh. Proin sagittis nisl rhoncus mattis rhoncus urna neque viverra justo. Velit egestas dui id ornare arcu odio. Pretium nibh ipsum consequat nisl vel pretium. Bibendum at varius vel pharetra. Leo duis ut diam quam nulla porttitor massa id. Consectetur libero id faucibus nisl tincidunt eget nullam non. Eu facilisis sed odio morbi quis. Eu volutpat odio facilisis mauris sit amet massa vitae tortor. Sed odio morbi quis commodo odio aenean sed. Sit amet justo donec enim diam. Ullamcorper a lacus vestibulum sed arcu non odio euismod.
123
+ }
124
+ options = []
125
+ languages.each do |group, sub|
126
+ options << { type: 'label', text: group }
127
+ options.concat(sub.map { |k, v| { value: k, text: v, subtitle: 'Country', imageUrl: "https://flagsapi.com/#{k.upcase}/flat/24.png" } })
128
+ options << { type: 'divider' }
129
+ end
130
+ form.fields_select(
131
+ name: 'user[language]',
132
+ width: 'matchParent',
133
+ label: 'Primary Language',
134
+ options: options,
135
+ value: 'an',
136
+ accessory: ->(accessory) do
137
+ accessory.header(
138
+ padding: { x: 16, y: 10 },
139
+ childViews: ->(header) do
140
+ header.label text: 'Header'
141
+ end
131
142
  )
132
- footer.spacer height: 14
133
- footer.label text: 'Click me', onClick: ->(action) do
134
- action.components_findClosest view: 'fields/select', onFind: ->(subaction) do
135
- subaction.components_set data: { value: 'pt' }, onSet: ->(subsubaction) do
136
- subsubaction.fields_blur
137
- end
143
+ accessory.footer(
144
+ styleClass: 'select-footer',
145
+ padding: { x: 16, y: 10 },
146
+ childViews: ->(footer) do
147
+ footer.h3 text: 'Footer'
148
+ # footer.spacer height: 4
149
+ footer.p(
150
+ styleClass: 'select-footer-paragraph',
151
+ text: %(
152
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Tortor consequat id porta nibh venenatis cras sed. Amet consectetur adipiscing elit duis tristique sollicitudin nibh. Proin sagittis nisl rhoncus mattis rhoncus urna neque viverra justo. Velit egestas dui id ornare arcu odio. Pretium nibh ipsum consequat nisl vel pretium. Bibendum at varius vel pharetra. Leo duis ut diam quam nulla porttitor massa id. Consectetur libero id faucibus nisl tincidunt eget nullam non. Eu facilisis sed odio morbi quis. Eu volutpat odio facilisis mauris sit amet massa vitae tortor. Sed odio morbi quis commodo odio aenean sed. Sit amet justo donec enim diam. Ullamcorper a lacus vestibulum sed arcu non odio euismod.
153
+ )
154
+ )
155
+ footer.spacer height: 14
156
+ footer.label(
157
+ text: 'Click me',
158
+ onClick: ->(action) do
159
+ action.components_findClosest(
160
+ view: 'fields/select',
161
+ onFind: ->(subaction) do
162
+ subaction.components_set(
163
+ data: { value: 'pt' },
164
+ onSet: ->(subsubaction) do
165
+ subsubaction.fields_blur
166
+ end
167
+ )
168
+ end
169
+ )
170
+ end
171
+ )
138
172
  end
139
- end
173
+ )
140
174
  end
141
- end
142
-
143
- form.fields_select \
144
- id: 'lang',
145
- name: 'user[languages][]',
146
- width: 'matchParent',
147
- label: 'Primary Language',
148
- options: options,
149
- value: ['jp', 'de'],
150
- accessory: ->(view) do
151
- view.footer padding: { x: 16, y: 10 }, width: 'matchParent', styleClass: 'sticky-footer', childViews: ->(footer) do
152
- footer.panels_flow width: 'matchParent', styleClass: 'justify-end', childViews: ->(hori) do
153
- hori.label text: 'Reset', styleClass: 'text-primary', onClick: ->(action) do
154
- action.components_set targetId: 'lang', data: { value: [] }
155
- end
156
- hori.spacer width: 16
157
- hori.label text: 'Apply', styleClass: 'text-primary', onClick: ->(action) do
158
- action.forms_submit targetId: 'form'
159
- end
175
+ )
176
+ form.fields_select(
177
+ id: 'lang',
178
+ name: 'user[languages][]',
179
+ width: 'matchParent',
180
+ label: 'Primary Language',
181
+ options: options,
182
+ value: ['jp', 'de'],
183
+ accessory: ->(view) do
184
+ view.footer(
185
+ padding: { x: 16, y: 10 },
186
+ width: 'matchParent',
187
+ styleClass: 'sticky-footer',
188
+ childViews: ->(footer) do
189
+ footer.panels_flow(
190
+ width: 'matchParent',
191
+ styleClass: 'justify-end',
192
+ childViews: ->(hori) do
193
+ hori.label(
194
+ text: 'Reset',
195
+ styleClass: 'text-primary',
196
+ onClick: ->(action) do
197
+ action.components_set targetId: 'lang', data: { value: [] }
198
+ end
199
+ )
200
+ hori.spacer width: 16
201
+ hori.label(
202
+ text: 'Apply',
203
+ styleClass: 'text-primary',
204
+ onClick: ->(action) do
205
+ action.forms_submit targetId: 'form'
206
+ end
207
+ )
208
+ end
209
+ )
160
210
  end
161
- end
211
+ )
162
212
  end,
163
- multiple: true
164
-
165
- form.spacer height: 6
166
- form.label text: 'Options from http/get'
167
- form.spacer height: 6
168
-
169
- form.fields_select \
170
- name: 'user[animal_or_plant]',
171
- width: 'matchParent',
172
- label: 'Animal or Plant',
173
- options: [{ icon: { name: 'pets' }, text: 'Animal', value: 'animal' }, { icon: { name: 'forest' }, text: 'Plant', value: 'plant' }],
174
- value: 'animal',
175
- onChangeAndLoad: ->(action) do
176
- action.http_get url: json_ui_garage_url(path: 'forms/update_options')
177
- end
178
-
179
- form.fields_select \
180
- id: 'options',
181
- name: 'user[choose_animal_or_plant]',
182
- width: 'matchParent',
183
- label: 'Choose',
184
- options: []
185
-
186
- form.spacer height: 20
187
- form.h2 text: 'Select fields with empty values'
188
- form.spacer height: 6
189
- form.label text: 'It is not recommended to use nil because when the value gets submitted, it is not distinguishable from an empty string.'
190
- form.spacer height: 6
191
- languages = {
213
+ multiple: true
214
+ )
215
+ form.spacer height: 6
216
+ form.label text: 'Options from http/get'
217
+ form.spacer height: 6
218
+ form.fields_select(
219
+ name: 'user[animal_or_plant]',
220
+ width: 'matchParent',
221
+ label: 'Animal or Plant',
222
+ options: [{ icon: { name: 'pets' }, text: 'Animal', value: 'animal' }, { icon: { name: 'forest' }, text: 'Plant', value: 'plant' }],
223
+ value: 'animal',
224
+ onChangeAndLoad: ->(action) do
225
+ action.http_get url: json_ui_garage_url(path: 'forms/update_options')
226
+ end
227
+ )
228
+ form.fields_select(
229
+ id: 'options',
230
+ name: 'user[choose_animal_or_plant]',
231
+ width: 'matchParent',
232
+ label: 'Choose',
233
+ options: []
234
+ )
235
+ form.spacer height: 20
236
+ form.h2 text: 'Select fields with empty values'
237
+ form.spacer height: 6
238
+ form.label text: 'It is not recommended to use nil because when the value gets submitted, it is not distinguishable from an empty string.'
239
+ form.spacer height: 6
240
+ languages = {
192
241
  nil => 'Nil',
193
242
  '' => 'Unspecified',
194
243
  'specified' => 'Specified',
195
- }
196
- form.fields_select name: 'user[empty_default]', width: 'matchParent', label: 'Unspecified Default', options: languages.map { |k, v| { value: k, text: v } }, value: ''
197
- form.fields_select name: 'user[nil_default]', width: 'matchParent', label: 'Nil Default', options: languages.map { |k, v| { value: k, text: v } }
198
- form.fields_select name: 'user[mixed_default][]', width: 'matchParent', label: 'Mixed Default', options: languages.map { |k, v| { value: k, text: v } }, value: ['', 'specified', nil], multiple: true
199
-
200
- form.spacer height: 20
201
- form.h2 text: 'Timezone selection'
202
- form.spacer height: 6
203
- form.label text: 'The select field defaults to the device\'s time zone.'
204
- form.spacer height: 6
205
- form.fields_timeZone name: 'user[time_zone]', width: 'matchParent', label: 'Time Zone', clearable: true
206
- form.spacer height: 6
207
- form.fields_timeZone \
208
- name: 'user[new_time_zone]',
209
- width: 'matchParent',
210
- label: 'Time Zone',
211
- clearable: true,
212
- value: 'America/Chicago'
213
- # value: 'Australia/Melbourne'
214
-
215
-
216
- form.button text: 'Submit', onClick: ->(action) { action.forms_submit }
217
-
218
- end
244
+ }
245
+ form.fields_select name: 'user[empty_default]', width: 'matchParent', label: 'Unspecified Default', options: languages.map { |k, v| { value: k, text: v } }, value: ''
246
+ form.fields_select name: 'user[nil_default]', width: 'matchParent', label: 'Nil Default', options: languages.map { |k, v| { value: k, text: v } }
247
+ form.fields_select name: 'user[mixed_default][]', width: 'matchParent', label: 'Mixed Default', options: languages.map { |k, v| { value: k, text: v } }, value: ['', 'specified', nil], multiple: true
248
+ form.spacer height: 20
249
+ form.h2 text: 'Timezone selection'
250
+ form.spacer height: 6
251
+ form.label text: 'The select field defaults to the device\'s time zone.'
252
+ form.spacer height: 6
253
+ form.fields_timeZone name: 'user[time_zone]', width: 'matchParent', label: 'Time Zone', clearable: true
254
+ form.spacer height: 6
255
+ form.fields_timeZone(
256
+ name: 'user[new_time_zone]',
257
+ width: 'matchParent',
258
+ label: 'Time Zone',
259
+ clearable: true,
260
+ value: 'America/Chicago'
261
+ )
262
+ # value: 'Australia/Melbourne'
263
+ form.spacer height: 20
264
+ form.h2 text: 'Update spec.options'
265
+ form.spacer height: 6
266
+ spec_options = ['alpha', 'beta', 'gamma'].map { |v| { text: v.humanize, value: v } }
267
+ spec_options_alt = ['delta', 'epsilon', 'zeta'].map { |v| { text: v.humanize, value: v } }
268
+ form.fields_select(
269
+ id: 'spec_options_select',
270
+ name: 'user[spec_options]',
271
+ width: 'matchParent',
272
+ label: 'Spec options select',
273
+ options: spec_options,
274
+ value: 'alpha'
275
+ )
276
+ form.button(
277
+ text: 'Swap spec options',
278
+ onClick: ->(action) do
279
+ action.components_set targetId: 'spec_options_select', data: { 'spec.options' => spec_options_alt }
280
+ end
281
+ )
282
+ form.button text: 'Submit', onClick: ->(action) { action.forms_submit }
283
+ end
284
+ )
@@ -6,30 +6,6 @@ render "#{@path_prefix}/nav_menu", json: json, page: page
6
6
  # submit_button_id = 'save_button_top'
7
7
 
8
8
  page.scroll childViews: ->(scroll) do
9
- # scroll.panels_bulkEdit \
10
- # import: { submitUrl: json_ui_garage_url(path: 'forms/bulk_edit_post'), paramName: 'user' },
11
- # statusViewIdPrefix: 'row_status_',
12
- # firstSection: ->(section) do
13
- # section.header cellViews: ->(header) do
14
- # header.label text: 'month'
15
- # header.label text: 'electricity_usage'
16
- # header.label text: 'gas_usage'
17
- # end
18
- # end,
19
- # accessory: ->(accessory) do
20
- # accessory.header childViews: ->(header) do
21
- # header.button \
22
- # text: 'Save',
23
- # id: submit_button_id,
24
- # displayed: false,
25
- # onClick: ->(action) do
26
- # action.forms_submit
27
- # end
28
- # end
29
- # end,
30
- # onLoadRows: ->(action) do
31
- # action.components_set targetId: submit_button_id, data: { displayed: true }
32
- # end
33
9
 
34
10
  options = [{ text: 'yes', value: 'yes' }, { text: 'no', value: 'no' }]
35
11
  source_options = ['Generators', 'Power Station', 'Solar Panels'].map do |o|
@@ -1,10 +1,12 @@
1
1
  nav_groups = {
2
2
  'Actions' => [
3
3
  'browsers',
4
+ 'auth',
4
5
  'commands',
5
6
  'components',
6
7
  'cookies',
7
8
  'dialog',
9
+ 'fields',
8
10
  'forms',
9
11
  'http',
10
12
  'lifecycle',
@@ -22,7 +24,11 @@ nav_groups = {
22
24
  'Forms' => [
23
25
  'auto_validate',
24
26
  'dirty_state',
25
- 'file_upload_new',
27
+ 'fields_select',
28
+ 'fields_dynamicSelect',
29
+ 'fields_sign',
30
+ 'fields_timer',
31
+ 'fields_upload',
26
32
  'form',
27
33
  'form_dynamic',
28
34
  'multiupload',
@@ -39,6 +45,7 @@ nav_groups = {
39
45
  'flow',
40
46
  'grid',
41
47
  'horizontal',
48
+ 'panels_bulkEdit2',
42
49
  'pagination',
43
50
  'responsive',
44
51
  'scroll',
@@ -67,25 +74,28 @@ view.panels_vertical(
67
74
  width: 'matchParent',
68
75
  childViews: ->(res) do
69
76
  nav_groups.each_with_index do |(group_name, items), group_index|
70
- res.panels_flow innerPadding: { bottom: 0 }, childViews: ->(flow) do
71
- flow.label text: "#{group_name}:"
72
- flow.spacer width: 6
73
- items.each_with_index do |nav, index|
74
- nav_path = "test_page/#{nav}"
75
- is_current = current_path == nav_path
76
- if index != 0
77
- flow.spacer width: 8
78
- end
79
- label_options = {
77
+ res.panels_flow(
78
+ innerPadding: { bottom: 0 },
79
+ childViews: ->(flow) do
80
+ flow.label text: "#{group_name}:"
81
+ flow.spacer width: 6
82
+ items.each_with_index do |nav, index|
83
+ nav_path = "test_page/#{nav}"
84
+ is_current = current_path == nav_path
85
+ if index != 0
86
+ flow.spacer width: 8
87
+ end
88
+ label_options = {
80
89
  text: nav,
81
90
  onClick: ->(action) do
82
91
  action.windows_open url: json_ui_garage_url(path: nav_path)
83
92
  end
84
- }
85
- label_options[:styleClass] = 'font-weight-bold' if is_current
86
- flow.label(**label_options)
93
+ }
94
+ label_options[:styleClass] = 'font-weight-bold' if is_current
95
+ flow.label(**label_options)
96
+ end
87
97
  end
88
- end
98
+ )
89
99
  res.spacer height: 4 if group_index < nav_groups.size - 1
90
100
  end
91
101
  end