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
@@ -2,74 +2,115 @@ json.title 'Test Page (List)'
2
2
 
3
3
  page = json_ui_page json
4
4
 
5
- page.body childViews: ->(body) do
6
- render 'json_ui/garage/test_page/header', view: body
7
-
8
- body.panels_responsive padding: glib_json_padding_body, childViews: ->(res) do
9
- res.h2 text: 'Overview'
10
- res.p text: 'List panels render rows using templates and support pagination, drag, and edit modes.'
11
-
12
- res.spacer height: 12
13
- res.hr width: 'matchParent'
14
-
15
- res.h2 text: 'Basic'
16
- res.spacer height: 8
17
- res.panels_list id: 'list_main', firstSection: ->(section) do
18
- section.rows builder: ->(template) do
19
- template.standard title: 'Alpha', subtitle: 'Basic list row'
20
- template.standard title: 'Bravo', subtitle: 'Basic list row'
21
- template.standard title: 'Charlie', subtitle: 'Basic list row'
22
- end
23
- end
24
-
25
- res.spacer height: 12
26
- res.hr width: 'matchParent'
27
-
28
- res.h2 text: 'Variants and Props'
29
- res.spacer height: 8
30
- res.panels_flow innerPadding: { bottom: 0 }, childViews: ->(flow) do
31
- flow.button text: 'One column', onClick: ->(action) do
32
- action.components_set targetId: 'list_main', data: { responsiveCols: 1 }
33
- end
34
- flow.spacer width: 4
35
- flow.button text: 'Three columns', onClick: ->(action) do
36
- action.components_set targetId: 'list_main', data: { responsiveCols: 3 }
5
+ page.body(
6
+ childViews: ->(body) do
7
+ render 'json_ui/garage/test_page/header', view: body
8
+ body.panels_responsive(
9
+ padding: glib_json_padding_body,
10
+ childViews: ->(res) do
11
+ res.h2 text: 'Overview'
12
+ res.p text: 'List panels render rows using templates and support pagination, drag, and edit modes.'
13
+ res.spacer height: 12
14
+ res.hr width: 'matchParent'
15
+ res.h2 text: 'Basic'
16
+ res.spacer height: 8
17
+ res.panels_list(
18
+ id: 'list_main',
19
+ firstSection: ->(section) do
20
+ section.rows(
21
+ builder: ->(template) do
22
+ template.standard title: 'Alpha', subtitle: 'Basic list row'
23
+ template.standard title: 'Bravo', subtitle: 'Basic list row'
24
+ template.standard title: 'Charlie', subtitle: 'Basic list row'
25
+ end
26
+ )
27
+ end
28
+ )
29
+ res.spacer height: 12
30
+ res.hr width: 'matchParent'
31
+ res.h2 text: 'Variants and Props'
32
+ res.spacer height: 8
33
+ res.panels_flow(
34
+ innerPadding: { bottom: 0 },
35
+ childViews: ->(flow) do
36
+ flow.button(
37
+ text: 'One column',
38
+ onClick: ->(action) do
39
+ action.components_set targetId: 'list_main', data: { responsiveCols: 1 }
40
+ end
41
+ )
42
+ flow.spacer width: 4
43
+ flow.button(
44
+ text: 'Three columns',
45
+ onClick: ->(action) do
46
+ action.components_set targetId: 'list_main', data: { responsiveCols: 3 }
47
+ end
48
+ )
49
+ flow.spacer width: 4
50
+ flow.button(
51
+ text: 'Card style',
52
+ onClick: ->(action) do
53
+ action.components_set targetId: 'list_main', data: { styleClasses: ['card'], padding: glib_json_padding_list }
54
+ end
55
+ )
56
+ flow.spacer width: 4
57
+ flow.button(
58
+ text: 'Clear style',
59
+ onClick: ->(action) do
60
+ action.components_set targetId: 'list_main', data: { styleClasses: nil, padding: nil }
61
+ end
62
+ )
63
+ end
64
+ )
65
+ res.spacer height: 12
66
+ res.hr width: 'matchParent'
67
+ res.h2 text: 'Actions and Events'
68
+ res.spacer height: 8
69
+ res.label id: 'list_event_status', text: 'Scroll events: idle'
70
+ res.spacer height: 6
71
+ res.panels_list(
72
+ id: 'list_events',
73
+ height: 180,
74
+ onScrollToTop: ->(action) do
75
+ action.components_set targetId: 'list_event_status', data: { text: 'Scroll events: top reached' }
76
+ end,
77
+ onScrollToBottom: ->(action) do
78
+ action.components_set targetId: 'list_event_status', data: { text: 'Scroll events: bottom reached' }
79
+ end,
80
+ firstSection: ->(section) do
81
+ section.rows(
82
+ builder: ->(template) do
83
+ (1..12).each do |index|
84
+ template.standard title: "Row #{index}", subtitle: 'Scroll to trigger events'
85
+ end
86
+ end
87
+ )
88
+ end
89
+ )
90
+ res.spacer height: 12
91
+ res.hr width: 'matchParent'
92
+ res.h2 text: 'Autoload'
93
+ res.spacer height: 8
94
+ res.label text: 'Scroll to load more rows (asNeeded).'
95
+ res.spacer height: 8
96
+ res.panels_list(
97
+ id: 'list_autoload',
98
+ height: 220,
99
+ nextPage: {
100
+ url: json_ui_garage_url(path: 'lists/autoload_as_needed', page: 1, section_only: 'v1'),
101
+ autoload: 'asNeeded'
102
+ },
103
+ firstSection: ->(section) do
104
+ render 'json_ui/garage/lists/autoload_section', page: page, page_index: 0
105
+ end
106
+ )
107
+ res.spacer height: 12
108
+ res.hr width: 'matchParent'
109
+ res.h2 text: 'Edge and Advanced'
110
+ res.spacer height: 8
111
+ res.label text: 'Empty list (sections: [])'
112
+ res.panels_list sections: []
37
113
  end
38
- flow.spacer width: 4
39
- flow.button text: 'Card style', onClick: ->(action) do
40
- action.components_set targetId: 'list_main', data: { styleClasses: ['card'], padding: glib_json_padding_list }
41
- end
42
- flow.spacer width: 4
43
- flow.button text: 'Clear style', onClick: ->(action) do
44
- action.components_set targetId: 'list_main', data: { styleClasses: nil, padding: nil }
45
- end
46
- end
47
-
48
- res.spacer height: 12
49
- res.hr width: 'matchParent'
50
-
51
- res.h2 text: 'Actions and Events'
52
- res.spacer height: 8
53
- res.label id: 'list_event_status', text: 'Scroll events: idle'
54
- res.spacer height: 6
55
- res.panels_list id: 'list_events', height: 180, onScrollToTop: ->(action) do
56
- action.components_set targetId: 'list_event_status', data: { text: 'Scroll events: top reached' }
57
- end, onScrollToBottom: ->(action) do
58
- action.components_set targetId: 'list_event_status', data: { text: 'Scroll events: bottom reached' }
59
- end, firstSection: ->(section) do
60
- section.rows builder: ->(template) do
61
- (1..12).each do |index|
62
- template.standard title: "Row #{index}", subtitle: 'Scroll to trigger events'
63
- end
64
- end
65
- end
66
-
67
- res.spacer height: 12
68
- res.hr width: 'matchParent'
69
-
70
- res.h2 text: 'Edge and Advanced'
71
- res.spacer height: 8
72
- res.label text: 'Empty list (sections: [])'
73
- res.panels_list sections: []
114
+ )
74
115
  end
75
- end
116
+ )
@@ -0,0 +1,240 @@
1
+ json.title 'Test Page (Panels Bulk Edit 2)'
2
+
3
+ page = json_ui_page json
4
+
5
+ options = [{ text: 'yes', value: 'yes' }, { text: 'no', value: 'no' }]
6
+ source_options = ['Generators', 'Power Station', 'Solar Panels'].map do |source|
7
+ { text: source, value: source }
8
+ end
9
+
10
+ default_headers = [
11
+ { text: 'Month', id: 'month', importable: true, tooltip: { text: 'Month', placement: 'top' } },
12
+ { text: 'Electricity usage', id: 'electricity_usage', importable: true },
13
+ { text: 'Gas usage', id: 'gas_usage', importable: true },
14
+ { text: 'Sources', id: 'sources', importable: true },
15
+ { text: 'Compliant', id: 'compliant', importable: true }
16
+ ]
17
+
18
+ default_cells = [
19
+ ->(view) do
20
+ view.fields_number width: 'matchParent'
21
+ end,
22
+ ->(view) do
23
+ view.fields_number width: 'matchParent'
24
+ end,
25
+ ->(view) do
26
+ view.fields_number width: 'matchParent'
27
+ end,
28
+ ->(view) do
29
+ view.fields_select width: 'matchParent', options: source_options, multiple: true
30
+ end,
31
+ ->(view) do
32
+ view.fields_select width: 'matchParent', options: options
33
+ end
34
+ ]
35
+
36
+ [
37
+ { text: 'Month', id: 'month', importable: true },
38
+ { text: 'Usage (kWh)', id: 'electricity_usage', importable: true },
39
+ { text: 'Usage (Therms)', id: 'gas_usage', importable: true }
40
+ ]
41
+
42
+ [
43
+ ->(view) do
44
+ view.fields_number width: 120
45
+ end,
46
+ ->(view) do
47
+ view.fields_number width: 140
48
+ end,
49
+ ->(view) do
50
+ view.fields_number width: 140
51
+ end
52
+ ]
53
+
54
+ import_settings = { submitUrl: json_ui_garage_url(path: 'forms/bulk_edit_post2'), paramName: 'user' }
55
+
56
+ page.body(
57
+ childViews: ->(body) do
58
+ render 'json_ui/garage/test_page/header', view: body
59
+ body.panels_responsive(
60
+ padding: glib_json_padding_body,
61
+ childViews: ->(res) do
62
+ res.h2 text: 'Overview'
63
+ res.p text: 'panels_bulkEdit2 renders an editable grid with import-backed rows and bulk submission events.'
64
+ res.spacer height: 12
65
+ res.hr width: 'matchParent'
66
+ res.h2 text: 'Basic example'
67
+ res.spacer height: 8
68
+ res.panels_horizontal(
69
+ align: 'middle',
70
+ childViews: ->(horizontal) do
71
+ horizontal.label text: 'Loaded: '
72
+ horizontal.label id: 'bulk_edit_loaded_count', text: '0'
73
+ horizontal.spacer width: 12
74
+ horizontal.label text: 'Selected: '
75
+ horizontal.label id: 'bulk_edit_selected_count', text: '0'
76
+ horizontal.spacer width: 12
77
+ horizontal.chip id: 'bulk_edit_succeeded_count', styleClass: 'success', text: 'Uploaded: 0', displayed: false
78
+ end
79
+ )
80
+ res.spacer height: 8
81
+ res.panels_bulkEdit2(
82
+ id: 'bulk_edit_main',
83
+ width: 'matchParent',
84
+ paramNameForRowId: 'row_id',
85
+ import: import_settings,
86
+ viewHeaders: default_headers,
87
+ viewCells: default_cells,
88
+ onCellChange: ->(action) do
89
+ action.snackbars_alert debug: true, paramName: 'message', fieldName: 'row'
90
+ end,
91
+ onSubmitStart: ->(action) do
92
+ action.runMultiple(
93
+ childActions: ->(multiple) do
94
+ multiple.components_set targetId: 'bulk_edit_submit_top', data: { disabled: true }
95
+ multiple.components_set targetId: 'bulk_edit_submit_bottom', data: { disabled: true }
96
+ multiple.components_set targetId: 'bulk_edit_cancel', data: { displayed: true }
97
+ end
98
+ )
99
+ end,
100
+ onSubmitEnd: ->(action) do
101
+ action.runMultiple(
102
+ childActions: ->(multiple) do
103
+ multiple.components_set targetId: 'bulk_edit_submit_top', data: { disabled: false }
104
+ multiple.components_set targetId: 'bulk_edit_submit_bottom', data: { disabled: false }
105
+ multiple.components_set targetId: 'bulk_edit_cancel', data: { displayed: false }
106
+ end
107
+ )
108
+ end,
109
+ onRowsLoad: ->(action) do
110
+ action.runMultiple(
111
+ debug: true,
112
+ fieldName: 'data',
113
+ childActions: ->(multiple) do
114
+ multiple.logics_set(
115
+ targetId: 'bulk_edit_loaded_count',
116
+ debug: true,
117
+ paramName: 'variables',
118
+ fieldName: 'data',
119
+ conditionalData: {
120
+ text: { "count": [{ "var": 'data.loadedRows' }] }
121
+ }
122
+ )
123
+ multiple.components_set targetId: 'bulk_edit_submit_top', data: { displayed: true }
124
+ multiple.components_set targetId: 'bulk_edit_submit_bottom', data: { displayed: true }
125
+ end
126
+ )
127
+ end,
128
+ onRowsSelect: ->(action) do
129
+ action.logics_set(
130
+ targetId: 'bulk_edit_selected_count',
131
+ debug: true,
132
+ paramName: 'variables',
133
+ fieldName: 'data',
134
+ conditionalData: {
135
+ text: { "count": [{ "var": 'data.selectedRows' }] }
136
+ }
137
+ )
138
+ end,
139
+ onRowsSucceed: ->(action) do
140
+ action.logics_set(
141
+ targetId: 'bulk_edit_succeeded_count',
142
+ debug: true,
143
+ paramName: 'variables',
144
+ fieldName: 'data',
145
+ conditionalData: {
146
+ text: {
147
+ "printf": [
148
+ 'Uploaded: {0}',
149
+ { "count": [{ "var": 'data.succeededRows' }] }
150
+ ]
151
+ },
152
+ displayed: true
153
+ }
154
+ )
155
+ end
156
+ )
157
+ res.spacer height: 12
158
+ res.panels_flow(
159
+ innerPadding: { bottom: 0 },
160
+ childViews: ->(flow) do
161
+ flow.button(
162
+ id: 'bulk_edit_submit_top',
163
+ text: 'Submit (top)',
164
+ displayed: false,
165
+ onClick: ->(action) do
166
+ action.forms_submit targetId: 'bulk_edit_main'
167
+ end
168
+ )
169
+ flow.spacer width: 8
170
+ flow.button(
171
+ id: 'bulk_edit_submit_bottom',
172
+ text: 'Submit (bottom)',
173
+ displayed: false,
174
+ onClick: ->(action) do
175
+ action.forms_submit targetId: 'bulk_edit_main'
176
+ end
177
+ )
178
+ flow.spacer width: 8
179
+ flow.button(
180
+ id: 'bulk_edit_cancel',
181
+ text: 'Cancel import',
182
+ displayed: false,
183
+ onClick: ->(action) do
184
+ action.components_invoke targetId: 'bulk_edit_main', name: 'cancelImport'
185
+ end
186
+ )
187
+ end
188
+ )
189
+ res.spacer height: 12
190
+ res.hr width: 'matchParent'
191
+ # res.h2 text: 'Variants/props'
192
+ # res.spacer height: 8
193
+ # res.panels_flow innerPadding: { bottom: 0 }, childViews: ->(flow) do
194
+ # flow.button text: 'Default columns', onClick: ->(action) do
195
+ # action.components_set targetId: 'bulk_edit_main', data: { viewHeaders: default_headers, viewCells: default_cells }
196
+ # end
197
+ # flow.spacer width: 8
198
+ # flow.button text: 'Compact columns', onClick: ->(action) do
199
+ # action.components_set targetId: 'bulk_edit_main', data: { viewHeaders: compact_headers, viewCells: compact_cells }
200
+ # end
201
+ # flow.spacer width: 8
202
+ # flow.button text: 'Reset counts', onClick: ->(action) do
203
+ # action.runMultiple childActions: ->(multiple) do
204
+ # multiple.components_set targetId: 'bulk_edit_loaded_count', data: { text: '0' }
205
+ # multiple.components_set targetId: 'bulk_edit_selected_count', data: { text: '0' }
206
+ # multiple.components_set targetId: 'bulk_edit_succeeded_count', data: { text: 'Uploaded: 0', displayed: false }
207
+ # end
208
+ # end
209
+ # end
210
+ # res.spacer height: 12
211
+ # res.hr width: 'matchParent'
212
+ res.h2 text: 'Actions/events'
213
+ res.spacer height: 8
214
+ res.panels_flow(
215
+ innerPadding: { bottom: 0 },
216
+ childViews: ->(flow) do
217
+ flow.button(
218
+ text: 'Submit (forms_submit)',
219
+ onClick: ->(action) do
220
+ action.forms_submit targetId: 'bulk_edit_main'
221
+ end
222
+ )
223
+ flow.spacer width: 8
224
+ flow.button(
225
+ text: 'Cancel import (invoke)',
226
+ onClick: ->(action) do
227
+ action.components_invoke targetId: 'bulk_edit_main', name: 'cancelImport'
228
+ end
229
+ )
230
+ end
231
+ )
232
+ res.spacer height: 12
233
+ res.hr width: 'matchParent'
234
+ res.h2 text: 'Edge/advanced'
235
+ res.spacer height: 8
236
+ res.label text: 'Swap to compact headers then try editing rows before submitting.'
237
+ end
238
+ )
239
+ end
240
+ )
@@ -81,8 +81,12 @@ page.body(
81
81
  res.button(
82
82
  text: 'popovers/close menu',
83
83
  onClick: ->(action) do
84
- action.popovers_close key: 'popover_menu'
85
- action.logics_set targetId: 'popovers_status', data: { text: 'Status: closed' }
84
+ action.runMultiple(
85
+ childActions: ->(multi) do
86
+ multi.popovers_close key: 'popover_menu'
87
+ multi.logics_set targetId: 'popovers_status', data: { text: 'Status: closed' }
88
+ end
89
+ )
86
90
  end
87
91
  )
88
92
 
@@ -32,38 +32,41 @@ page.body(
32
32
  res.h2 text: 'Variants and props'
33
33
  res.label text: 'Adjust value, size, and stroke width.'
34
34
  res.spacer height: 8
35
- res.panels_flow innerPadding: { bottom: 0 }, childViews: ->(flow) do
36
- flow.button(
37
- text: '35% default',
38
- onClick: ->(action) do
39
- action.components_set(
40
- targetId: 'progress_circle_main',
41
- data: { value: 35, size: 160, width: 16, color: '#4B56D2', half: nil, text: nil }
42
- )
43
- end
44
- )
45
- flow.spacer width: 6
46
- flow.button(
47
- text: '65%',
48
- onClick: ->(action) do
49
- action.components_set targetId: 'progress_circle_main', data: { value: 65 }
50
- end
51
- )
52
- flow.spacer width: 6
53
- flow.button(
54
- text: 'Thick stroke',
55
- onClick: ->(action) do
56
- action.components_set targetId: 'progress_circle_main', data: { width: 28 }
57
- end
58
- )
59
- flow.spacer width: 6
60
- flow.button(
61
- text: 'Small size',
62
- onClick: ->(action) do
63
- action.components_set targetId: 'progress_circle_main', data: { size: 110 }
64
- end
65
- )
66
- end
35
+ res.panels_flow(
36
+ innerPadding: { bottom: 0 },
37
+ childViews: ->(flow) do
38
+ flow.button(
39
+ text: '35% default',
40
+ onClick: ->(action) do
41
+ action.components_set(
42
+ targetId: 'progress_circle_main',
43
+ data: { value: 35, size: 160, width: 16, color: '#4B56D2', half: nil, text: nil }
44
+ )
45
+ end
46
+ )
47
+ flow.spacer width: 6
48
+ flow.button(
49
+ text: '65%',
50
+ onClick: ->(action) do
51
+ action.components_set targetId: 'progress_circle_main', data: { value: 65 }
52
+ end
53
+ )
54
+ flow.spacer width: 6
55
+ flow.button(
56
+ text: 'Thick stroke',
57
+ onClick: ->(action) do
58
+ action.components_set targetId: 'progress_circle_main', data: { width: 28 }
59
+ end
60
+ )
61
+ flow.spacer width: 6
62
+ flow.button(
63
+ text: 'Small size',
64
+ onClick: ->(action) do
65
+ action.components_set targetId: 'progress_circle_main', data: { size: 110 }
66
+ end
67
+ )
68
+ end
69
+ )
67
70
 
68
71
  res.spacer height: 12
69
72
  res.hr width: 'matchParent'
@@ -72,24 +75,27 @@ page.body(
72
75
  res.h2 text: 'Actions and events'
73
76
  res.label text: 'Swap color and label to confirm metadata rendering.'
74
77
  res.spacer height: 8
75
- res.panels_flow innerPadding: { bottom: 0 }, childViews: ->(flow) do
76
- flow.button(
77
- text: 'Half circle + label',
78
- onClick: ->(action) do
79
- action.components_set(
80
- targetId: 'progress_circle_main',
81
- data: { value: 80, half: true, text: 'Section A', color: '#9E0A0A', width: 22 }
82
- )
83
- end
84
- )
85
- flow.spacer width: 6
86
- flow.button(
87
- text: 'Accent color',
88
- onClick: ->(action) do
89
- action.components_set targetId: 'progress_circle_main', data: { color: '#F9C80E', half: nil, text: nil }
90
- end
91
- )
92
- end
78
+ res.panels_flow(
79
+ innerPadding: { bottom: 0 },
80
+ childViews: ->(flow) do
81
+ flow.button(
82
+ text: 'Half circle + label',
83
+ onClick: ->(action) do
84
+ action.components_set(
85
+ targetId: 'progress_circle_main',
86
+ data: { value: 80, half: true, text: 'Section A', color: '#9E0A0A', width: 22 }
87
+ )
88
+ end
89
+ )
90
+ flow.spacer width: 6
91
+ flow.button(
92
+ text: 'Accent color',
93
+ onClick: ->(action) do
94
+ action.components_set targetId: 'progress_circle_main', data: { color: '#F9C80E', half: nil, text: nil }
95
+ end
96
+ )
97
+ end
98
+ )
93
99
 
94
100
  res.spacer height: 12
95
101
  res.hr width: 'matchParent'
@@ -98,21 +104,24 @@ page.body(
98
104
  res.h2 text: 'Edge and advanced'
99
105
  res.label text: 'Confirm 0% and 100% values render correctly.'
100
106
  res.spacer height: 8
101
- res.panels_flow innerPadding: { bottom: 0 }, childViews: ->(flow) do
102
- flow.button(
103
- text: '0%',
104
- onClick: ->(action) do
105
- action.components_set targetId: 'progress_circle_main', data: { value: 0, half: nil, text: nil }
106
- end
107
- )
108
- flow.spacer width: 6
109
- flow.button(
110
- text: '100%',
111
- onClick: ->(action) do
112
- action.components_set targetId: 'progress_circle_main', data: { value: 100, half: nil, text: nil }
113
- end
114
- )
115
- end
107
+ res.panels_flow(
108
+ innerPadding: { bottom: 0 },
109
+ childViews: ->(flow) do
110
+ flow.button(
111
+ text: '0%',
112
+ onClick: ->(action) do
113
+ action.components_set targetId: 'progress_circle_main', data: { value: '0', half: nil, text: nil }
114
+ end
115
+ )
116
+ flow.spacer width: 6
117
+ flow.button(
118
+ text: '100%',
119
+ onClick: ->(action) do
120
+ action.components_set targetId: 'progress_circle_main', data: { value: 100, half: nil, text: nil }
121
+ end
122
+ )
123
+ end
124
+ )
116
125
  end
117
126
  )
118
127
  end