glib-web 6.12.0 → 7.0.0.beta1
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 +4 -4
- data/app/controllers/concerns/glib/auth/policy.rb +1 -5
- data/app/controllers/concerns/glib/json/libs.rb +0 -33
- data/app/helpers/glib/json_ui/action_builder/bottom_banners.rb +0 -1
- data/app/helpers/glib/json_ui/action_builder/components.rb +1 -16
- data/app/helpers/glib/json_ui/action_builder/logics.rb +1 -2
- data/app/helpers/glib/json_ui/action_builder/snackbars.rb +0 -16
- data/app/helpers/glib/json_ui/response_helper.rb +0 -12
- data/app/helpers/glib/json_ui/view_builder/fields.rb +4 -133
- data/app/helpers/glib/json_ui/view_builder/panels.rb +144 -8
- data/app/views/json_ui/garage/actions/_components.json.jbuilder +2 -2
- data/app/views/json_ui/garage/forms/bulk_edit_post.json.jbuilder +1 -1
- data/app/views/json_ui/garage/forms/checkboxes.json.jbuilder +3 -3
- data/app/views/json_ui/garage/forms/selects.json.jbuilder +5 -5
- data/app/views/json_ui/garage/forms/update_options.json.jbuilder +1 -1
- data/app/views/json_ui/garage/panels/flow.json.jbuilder +6 -6
- data/app/views/json_ui/garage/panels/horizontal.json.jbuilder +10 -10
- data/app/views/json_ui/garage/panels/responsive.json.jbuilder +10 -10
- data/app/views/json_ui/garage/panels/ul.json.jbuilder +2 -2
- data/app/views/json_ui/garage/panels/vertical.json.jbuilder +10 -10
- data/app/views/json_ui/garage/tables/bulk_edit.json.jbuilder +14 -14
- data/app/views/json_ui/garage/test_page/_header.json.jbuilder +1 -1
- data/app/views/json_ui/garage/test_page/calendar.json.jbuilder +6 -6
- data/app/views/json_ui/garage/test_page/carousel.json.jbuilder +4 -4
- data/app/views/json_ui/garage/test_page/charts.json.jbuilder +4 -4
- data/app/views/json_ui/garage/test_page/column.json.jbuilder +3 -3
- data/app/views/json_ui/garage/test_page/components.json.jbuilder +7 -7
- data/app/views/json_ui/garage/test_page/custom.json.jbuilder +3 -3
- data/app/views/json_ui/garage/test_page/dialog.json.jbuilder +0 -21
- data/app/views/json_ui/garage/test_page/fields_creditCard.json.jbuilder +6 -6
- data/app/views/json_ui/garage/test_page/fields_date_time.json.jbuilder +8 -8
- data/app/views/json_ui/garage/test_page/fields_dynamicSelect.json.jbuilder +8 -8
- data/app/views/json_ui/garage/test_page/fields_location.json.jbuilder +6 -6
- data/app/views/json_ui/garage/test_page/fields_otp.json.jbuilder +8 -8
- data/app/views/json_ui/garage/test_page/fields_phone.json.jbuilder +9 -9
- data/app/views/json_ui/garage/test_page/fields_radio.json.jbuilder +4 -4
- data/app/views/json_ui/garage/test_page/fields_rating.json.jbuilder +10 -10
- data/app/views/json_ui/garage/test_page/fields_richText.json.jbuilder +10 -10
- data/app/views/json_ui/garage/test_page/fields_select.json.jbuilder +8 -8
- data/app/views/json_ui/garage/test_page/fields_sign.json.jbuilder +8 -56
- data/app/views/json_ui/garage/test_page/fields_stripeExternalAccount.json.jbuilder +6 -6
- data/app/views/json_ui/garage/test_page/fields_stripeToken.json.jbuilder +6 -6
- data/app/views/json_ui/garage/test_page/fields_text.json.jbuilder +5 -5
- data/app/views/json_ui/garage/test_page/fields_timer.json.jbuilder +6 -6
- data/app/views/json_ui/garage/test_page/flow.json.jbuilder +6 -6
- data/app/views/json_ui/garage/test_page/form.json.jbuilder +9 -9
- data/app/views/json_ui/garage/test_page/grid.json.jbuilder +4 -4
- data/app/views/json_ui/garage/test_page/horizontal.json.jbuilder +5 -5
- data/app/views/json_ui/garage/test_page/image.json.jbuilder +9 -9
- data/app/views/json_ui/garage/test_page/lifecycle.json.jbuilder +6 -6
- data/app/views/json_ui/garage/test_page/list.json.jbuilder +6 -6
- data/app/views/json_ui/garage/test_page/multimedia_docx.json.jbuilder +5 -5
- data/app/views/json_ui/garage/test_page/multimedia_video.json.jbuilder +6 -6
- data/app/views/json_ui/garage/test_page/pagination.json.jbuilder +6 -6
- data/app/views/json_ui/garage/test_page/panels_bulkEdit2.json.jbuilder +244 -0
- data/app/views/json_ui/garage/test_page/panels_bulkEdit3.json.jbuilder +3 -3
- data/app/views/json_ui/garage/test_page/progressCircle.json.jbuilder +8 -8
- data/app/views/json_ui/garage/test_page/responsive.json.jbuilder +4 -4
- data/app/views/json_ui/garage/test_page/scroll.json.jbuilder +5 -5
- data/app/views/json_ui/garage/test_page/split.json.jbuilder +1 -1
- data/app/views/json_ui/garage/test_page/table.json.jbuilder +5 -5
- data/app/views/json_ui/garage/test_page/timeline.json.jbuilder +5 -5
- data/app/views/json_ui/garage/test_page/ul.json.jbuilder +4 -4
- data/app/views/json_ui/garage/test_page/vertical.json.jbuilder +5 -5
- data/app/views/json_ui/garage/test_page/web.json.jbuilder +5 -5
- data/app/views/json_ui/garage/views/_expand_shrink_ex.json.jbuilder +4 -4
- data/app/views/json_ui/garage/views/controls.json.jbuilder +4 -4
- data/app/views/json_ui/garage/views/{components_set.json.jbuilder → logics_set.json.jbuilder} +2 -2
- data/lib/glib/engine.rb +0 -32
- data/lib/glib/json_crawler/action_crawlers/forms_submit.rb +1 -1
- data/lib/glib/json_crawler/router.rb +0 -24
- data/lib/glib/json_ui/config.rb +1 -1
- data/lib/glib/test/changed_files_rubocop.rb +55 -0
- data/lib/glib/test_helpers.rb +7 -9
- data/lib/glib-web.rb +2 -4
- metadata +6 -37
- data/app/controllers/concerns/glib/auth/token_authenticatable.rb +0 -37
- data/app/controllers/glib/api_controller.rb +0 -52
- data/app/jobs/glib/purge_unattached_job.rb +0 -32
- data/app/models/concerns/glib/snapshot_v2.rb +0 -514
- data/app/models/glib/model.rb +0 -40
- data/app/models/glib/plain_model.rb +0 -23
- data/app/models/snapshot_blob_reference.rb +0 -20
- data/app/views/json_ui/garage/test_page/fields_change_trigger.json.jbuilder +0 -128
- data/lib/generators/glib/snapshot_v2_generator.rb +0 -54
- data/lib/generators/templates/snapshot_v2/add_snapshot_v2_columns.rb +0 -18
- data/lib/generators/templates/snapshot_v2/create_snapshot_blob_references.rb +0 -10
- data/lib/glib/purge_unattached/config.rb +0 -38
- data/lib/glib/test/full_suite_rubocop.rb +0 -87
- data/lib/glib/test/rubocop_guards.rb +0 -42
|
@@ -9,10 +9,10 @@ json_ui_page json do |page|
|
|
|
9
9
|
panel.button text: '1'
|
|
10
10
|
end
|
|
11
11
|
scroll.button text: 'show', onClick: ->(action) do
|
|
12
|
-
action.
|
|
12
|
+
action.logics_set targetId: 'hor1', data: { displayed: true }
|
|
13
13
|
end
|
|
14
14
|
scroll.button text: 'hide', onClick: ->(action) do
|
|
15
|
-
action.
|
|
15
|
+
action.logics_set targetId: 'hor1', data: { displayed: false }
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
scroll.label text: "\n"
|
|
@@ -170,8 +170,8 @@ json_ui_page json do |page|
|
|
|
170
170
|
backgroundColor: '#b3bac2',
|
|
171
171
|
onMouseEnter: ->(action) {
|
|
172
172
|
action.runMultiple childActions: ->(saction) do
|
|
173
|
-
saction.
|
|
174
|
-
saction.
|
|
173
|
+
saction.logics_set targetId: 'default1', data: { displayed: false }
|
|
174
|
+
saction.logics_set targetId: 'hovered1', data: { displayed: true }
|
|
175
175
|
end
|
|
176
176
|
}, childViews: ->(panel) do
|
|
177
177
|
panel.label text: 'Hover me'
|
|
@@ -183,8 +183,8 @@ json_ui_page json do |page|
|
|
|
183
183
|
backgroundColor: '#b3bac2',
|
|
184
184
|
onMouseLeave: ->(action) {
|
|
185
185
|
action.runMultiple childActions: ->(saction) do
|
|
186
|
-
saction.
|
|
187
|
-
saction.
|
|
186
|
+
saction.logics_set targetId: 'default1', data: { displayed: true }
|
|
187
|
+
saction.logics_set targetId: 'hovered1', data: { displayed: false }
|
|
188
188
|
end
|
|
189
189
|
}, childViews: ->(panel) do
|
|
190
190
|
panel.label text: 'Hover active'
|
|
@@ -198,8 +198,8 @@ json_ui_page json do |page|
|
|
|
198
198
|
backgroundColor: '#b3bac2',
|
|
199
199
|
onMouseEnter: ->(action) {
|
|
200
200
|
action.runMultiple childActions: ->(saction) do
|
|
201
|
-
saction.
|
|
202
|
-
saction.
|
|
201
|
+
saction.logics_set targetId: 'default2', data: { displayed: false }
|
|
202
|
+
saction.logics_set targetId: 'hovered2', data: { displayed: true }
|
|
203
203
|
end
|
|
204
204
|
}, childViews: ->(panel) do
|
|
205
205
|
panel.label text: 'Hover me'
|
|
@@ -211,8 +211,8 @@ json_ui_page json do |page|
|
|
|
211
211
|
backgroundColor: '#b3bac2',
|
|
212
212
|
onMouseLeave: ->(action) {
|
|
213
213
|
action.runMultiple childActions: ->(saction) do
|
|
214
|
-
saction.
|
|
215
|
-
saction.
|
|
214
|
+
saction.logics_set targetId: 'default2', data: { displayed: true }
|
|
215
|
+
saction.logics_set targetId: 'hovered2', data: { displayed: false }
|
|
216
216
|
end
|
|
217
217
|
}, childViews: ->(panel) do
|
|
218
218
|
panel.label text: 'Click me'
|
|
@@ -10,10 +10,10 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
|
10
10
|
panel.button text: '2'
|
|
11
11
|
end
|
|
12
12
|
scroll.button text: 'show', onClick: ->(action) do
|
|
13
|
-
action.
|
|
13
|
+
action.logics_set targetId: 'res1', data: { displayed: true }
|
|
14
14
|
end
|
|
15
15
|
scroll.button text: 'hide', onClick: ->(action) do
|
|
16
|
-
action.
|
|
16
|
+
action.logics_set targetId: 'res1', data: { displayed: false }
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
scroll.h1 text: 'Panels Columns'
|
|
@@ -167,8 +167,8 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
|
167
167
|
backgroundColor: '#c3cad2',
|
|
168
168
|
onMouseEnter: ->(action) {
|
|
169
169
|
action.runMultiple childActions: ->(saction) do
|
|
170
|
-
saction.
|
|
171
|
-
saction.
|
|
170
|
+
saction.logics_set targetId: 'default1', data: { displayed: false }
|
|
171
|
+
saction.logics_set targetId: 'hovered1', data: { displayed: true }
|
|
172
172
|
end
|
|
173
173
|
}, childViews: ->(panel) do
|
|
174
174
|
panel.label text: 'Hover me'
|
|
@@ -180,8 +180,8 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
|
180
180
|
backgroundColor: '#c3cad2',
|
|
181
181
|
onMouseLeave: ->(action) {
|
|
182
182
|
action.runMultiple childActions: ->(saction) do
|
|
183
|
-
saction.
|
|
184
|
-
saction.
|
|
183
|
+
saction.logics_set targetId: 'default1', data: { displayed: true }
|
|
184
|
+
saction.logics_set targetId: 'hovered1', data: { displayed: false }
|
|
185
185
|
end
|
|
186
186
|
}, childViews: ->(panel) do
|
|
187
187
|
panel.label text: 'Hover active'
|
|
@@ -196,8 +196,8 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
|
196
196
|
backgroundColor: '#c3cad2',
|
|
197
197
|
onMouseEnter: ->(action) {
|
|
198
198
|
action.runMultiple childActions: ->(saction) do
|
|
199
|
-
saction.
|
|
200
|
-
saction.
|
|
199
|
+
saction.logics_set targetId: 'default2', data: { displayed: false }
|
|
200
|
+
saction.logics_set targetId: 'hovered2', data: { displayed: true }
|
|
201
201
|
end
|
|
202
202
|
}, childViews: ->(panel) do
|
|
203
203
|
panel.label text: 'Hover me'
|
|
@@ -209,8 +209,8 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
|
209
209
|
backgroundColor: '#c3cad2',
|
|
210
210
|
onMouseLeave: ->(action) {
|
|
211
211
|
action.runMultiple childActions: ->(saction) do
|
|
212
|
-
saction.
|
|
213
|
-
saction.
|
|
212
|
+
saction.logics_set targetId: 'default2', data: { displayed: true }
|
|
213
|
+
saction.logics_set targetId: 'hovered2', data: { displayed: false }
|
|
214
214
|
end
|
|
215
215
|
}, childViews: ->(panel) do
|
|
216
216
|
panel.label text: 'Click me'
|
|
@@ -11,10 +11,10 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
|
11
11
|
li.label text: 'text2'
|
|
12
12
|
end
|
|
13
13
|
scroll.button text: 'show', onClick: ->(action) do
|
|
14
|
-
action.
|
|
14
|
+
action.logics_set targetId: 'ul', data: { displayed: true }
|
|
15
15
|
end
|
|
16
16
|
scroll.button text: 'hide', onClick: ->(action) do
|
|
17
|
-
action.
|
|
17
|
+
action.logics_set targetId: 'ul', data: { displayed: false }
|
|
18
18
|
end
|
|
19
19
|
scroll.spacer height: 14
|
|
20
20
|
scroll.h2 text: 'Standard Usage'
|
|
@@ -10,10 +10,10 @@ json_ui_page json do |page|
|
|
|
10
10
|
panel.button text: 'Button1'
|
|
11
11
|
end
|
|
12
12
|
scroll.button text: 'show', onClick: ->(action) do
|
|
13
|
-
action.
|
|
13
|
+
action.logics_set targetId: 'vert1', data: { displayed: true }
|
|
14
14
|
end
|
|
15
15
|
scroll.button text: 'hide', onClick: ->(action) do
|
|
16
|
-
action.
|
|
16
|
+
action.logics_set targetId: 'vert1', data: { displayed: false }
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
scroll.label text: "\n"
|
|
@@ -71,16 +71,16 @@ json_ui_page json do |page|
|
|
|
71
71
|
scroll.h1 text: 'Changed when Hover'
|
|
72
72
|
scroll.panels_vertical id: 'default1', width: 100, height: 100, backgroundColor: '#b3bac2', align: 'center', onMouseEnter: ->(action) {
|
|
73
73
|
action.runMultiple childActions: ->(saction) do
|
|
74
|
-
saction.
|
|
75
|
-
saction.
|
|
74
|
+
saction.logics_set targetId: 'default1', data: { displayed: false }
|
|
75
|
+
saction.logics_set targetId: 'hovered1', data: { displayed: true }
|
|
76
76
|
end
|
|
77
77
|
}, childViews: ->(panel) do
|
|
78
78
|
panel.label text: 'Hover me'
|
|
79
79
|
end
|
|
80
80
|
scroll.panels_vertical id: 'hovered1', displayed: false, width: 100, height: 100, backgroundColor: '#b3bac2', align: 'center', onMouseLeave: ->(action) {
|
|
81
81
|
action.runMultiple childActions: ->(saction) do
|
|
82
|
-
saction.
|
|
83
|
-
saction.
|
|
82
|
+
saction.logics_set targetId: 'default1', data: { displayed: true }
|
|
83
|
+
saction.logics_set targetId: 'hovered1', data: { displayed: false }
|
|
84
84
|
end
|
|
85
85
|
}, childViews: ->(panel) do
|
|
86
86
|
panel.label text: 'Hover active'
|
|
@@ -90,16 +90,16 @@ json_ui_page json do |page|
|
|
|
90
90
|
scroll.h1 text: 'Changed when Hover (with onClick)'
|
|
91
91
|
scroll.panels_vertical id: 'default2', width: 100, height: 100, backgroundColor: '#b3bac2', align: 'center', onMouseEnter: ->(action) {
|
|
92
92
|
action.runMultiple childActions: ->(saction) do
|
|
93
|
-
saction.
|
|
94
|
-
saction.
|
|
93
|
+
saction.logics_set targetId: 'default2', data: { displayed: false }
|
|
94
|
+
saction.logics_set targetId: 'hovered2', data: { displayed: true }
|
|
95
95
|
end
|
|
96
96
|
}, childViews: ->(panel) do
|
|
97
97
|
panel.label text: 'Hover me'
|
|
98
98
|
end
|
|
99
99
|
scroll.panels_vertical id: 'hovered2', displayed: false, width: 100, height: 100, backgroundColor: '#b3bac2', align: 'center', onMouseLeave: ->(action) {
|
|
100
100
|
action.runMultiple childActions: ->(saction) do
|
|
101
|
-
saction.
|
|
102
|
-
saction.
|
|
101
|
+
saction.logics_set targetId: 'default2', data: { displayed: true }
|
|
102
|
+
saction.logics_set targetId: 'hovered2', data: { displayed: false }
|
|
103
103
|
end
|
|
104
104
|
}, childViews: ->(panel) do
|
|
105
105
|
panel.label text: 'Click me'
|
|
@@ -37,17 +37,17 @@ page.scroll childViews: ->(scroll) do
|
|
|
37
37
|
displayed: false
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
-
wres.
|
|
40
|
+
wres.panels_bulkEdit2 \
|
|
41
41
|
id: 'import_table',
|
|
42
42
|
width: 'matchParent',
|
|
43
43
|
paramNameForRowId: 'row_id',
|
|
44
44
|
import: { submitUrl: json_ui_garage_url(path: 'forms/bulk_edit_post2'), paramName: 'user' },
|
|
45
45
|
viewHeaders: [
|
|
46
|
-
{ text: 'Month', id: 'month', tooltip: { text: 'Month', placement: 'top' } },
|
|
47
|
-
{ text: 'Electricity usage', id: 'electricity_usage' },
|
|
48
|
-
{ text: 'Gas usage', id: 'gas_usage' },
|
|
49
|
-
{ text: 'Sources', id: 'sources' },
|
|
50
|
-
{ text: 'Compliant', id: 'compliant' }
|
|
46
|
+
{ text: 'Month', id: 'month', importable: true, tooltip: { text: 'Month', placement: 'top' } },
|
|
47
|
+
{ text: 'Electricity usage', id: 'electricity_usage', importable: true },
|
|
48
|
+
{ text: 'Gas usage', id: 'gas_usage', importable: true },
|
|
49
|
+
{ text: 'Sources', id: 'sources', importable: true },
|
|
50
|
+
{ text: 'Compliant', id: 'compliant', importable: true }
|
|
51
51
|
],
|
|
52
52
|
viewCells: [
|
|
53
53
|
->(view) do
|
|
@@ -72,16 +72,16 @@ page.scroll childViews: ->(scroll) do
|
|
|
72
72
|
end,
|
|
73
73
|
onSubmitStart: ->(action) do
|
|
74
74
|
action.runMultiple childActions: ->(multiple) do
|
|
75
|
-
multiple.
|
|
76
|
-
multiple.
|
|
77
|
-
multiple.
|
|
75
|
+
multiple.logics_set targetId: 'submit_top', data: { disabled: true }
|
|
76
|
+
multiple.logics_set targetId: 'submit_bottom', data: { disabled: true }
|
|
77
|
+
multiple.logics_set targetId: 'cancel_button', data: { displayed: true }
|
|
78
78
|
end
|
|
79
79
|
end,
|
|
80
80
|
onSubmitEnd: ->(action) do
|
|
81
81
|
action.runMultiple childActions: ->(multiple) do
|
|
82
|
-
multiple.
|
|
83
|
-
multiple.
|
|
84
|
-
multiple.
|
|
82
|
+
multiple.logics_set targetId: 'submit_top', data: { disabled: false }
|
|
83
|
+
multiple.logics_set targetId: 'submit_bottom', data: { disabled: false }
|
|
84
|
+
multiple.logics_set targetId: 'cancel_button', data: { displayed: false }
|
|
85
85
|
end
|
|
86
86
|
end,
|
|
87
87
|
onRowsLoad: ->(action) do
|
|
@@ -94,8 +94,8 @@ page.scroll childViews: ->(scroll) do
|
|
|
94
94
|
conditionalData: {
|
|
95
95
|
text: { "count": [{ "var": 'data.loadedRows' }] }
|
|
96
96
|
}
|
|
97
|
-
multiple.
|
|
98
|
-
multiple.
|
|
97
|
+
multiple.logics_set targetId: 'submit_top', data: { displayed: true }
|
|
98
|
+
multiple.logics_set targetId: 'submit_bottom', data: { displayed: true }
|
|
99
99
|
end
|
|
100
100
|
end,
|
|
101
101
|
onRowsSelect: ->(action) do
|
|
@@ -37,7 +37,6 @@ nav_groups = {
|
|
|
37
37
|
'fields_stripeExternalAccount',
|
|
38
38
|
'fields_creditCard',
|
|
39
39
|
'fields_timer',
|
|
40
|
-
'fields_change_trigger',
|
|
41
40
|
'fields_upload',
|
|
42
41
|
'fields_url_fragment',
|
|
43
42
|
'fields_captcha',
|
|
@@ -56,6 +55,7 @@ nav_groups = {
|
|
|
56
55
|
'flow',
|
|
57
56
|
'grid',
|
|
58
57
|
'horizontal',
|
|
58
|
+
'panels_bulkEdit2',
|
|
59
59
|
'pagination',
|
|
60
60
|
'responsive',
|
|
61
61
|
'scroll',
|
|
@@ -36,7 +36,7 @@ page.body(
|
|
|
36
36
|
flow.button(
|
|
37
37
|
text: 'Default size',
|
|
38
38
|
onClick: ->(action) do
|
|
39
|
-
action.
|
|
39
|
+
action.logics_set(
|
|
40
40
|
targetId: 'calendar_main',
|
|
41
41
|
data: {
|
|
42
42
|
height: 420,
|
|
@@ -50,21 +50,21 @@ page.body(
|
|
|
50
50
|
flow.button(
|
|
51
51
|
text: 'Compact',
|
|
52
52
|
onClick: ->(action) do
|
|
53
|
-
action.
|
|
53
|
+
action.logics_set targetId: 'calendar_main', data: { height: 320 }
|
|
54
54
|
end
|
|
55
55
|
)
|
|
56
56
|
flow.spacer width: 6
|
|
57
57
|
flow.button(
|
|
58
58
|
text: 'Tall',
|
|
59
59
|
onClick: ->(action) do
|
|
60
|
-
action.
|
|
60
|
+
action.logics_set targetId: 'calendar_main', data: { height: 560 }
|
|
61
61
|
end
|
|
62
62
|
)
|
|
63
63
|
flow.spacer width: 6
|
|
64
64
|
flow.button(
|
|
65
65
|
text: 'Fixed width',
|
|
66
66
|
onClick: ->(action) do
|
|
67
|
-
action.
|
|
67
|
+
action.logics_set targetId: 'calendar_main', data: { width: 720 }
|
|
68
68
|
end
|
|
69
69
|
)
|
|
70
70
|
end
|
|
@@ -87,7 +87,7 @@ page.body(
|
|
|
87
87
|
flow.button(
|
|
88
88
|
text: 'Empty data',
|
|
89
89
|
onClick: ->(action) do
|
|
90
|
-
action.
|
|
90
|
+
action.logics_set(
|
|
91
91
|
targetId: 'calendar_main',
|
|
92
92
|
data: { dataUrl: json_ui_garage_url(path: 'test_page/calendar_empty_data') }
|
|
93
93
|
)
|
|
@@ -97,7 +97,7 @@ page.body(
|
|
|
97
97
|
flow.button(
|
|
98
98
|
text: 'Restore data',
|
|
99
99
|
onClick: ->(action) do
|
|
100
|
-
action.
|
|
100
|
+
action.logics_set(
|
|
101
101
|
targetId: 'calendar_main',
|
|
102
102
|
data: { dataUrl: json_ui_garage_url(path: 'views/calendar_data') }
|
|
103
103
|
)
|
|
@@ -30,15 +30,15 @@ page.body childViews: ->(body) do
|
|
|
30
30
|
res.spacer height: 8
|
|
31
31
|
res.panels_flow innerPadding: { bottom: 0 }, childViews: ->(flow) do
|
|
32
32
|
flow.button text: 'Fill equally', onClick: ->(action) do
|
|
33
|
-
action.
|
|
33
|
+
action.logics_set targetId: 'carousel_main', data: { distribution: 'fillEqually' }
|
|
34
34
|
end
|
|
35
35
|
flow.spacer width: 4
|
|
36
36
|
flow.button text: 'Space equally', onClick: ->(action) do
|
|
37
|
-
action.
|
|
37
|
+
action.logics_set targetId: 'carousel_main', data: { distribution: 'spaceEqually' }
|
|
38
38
|
end
|
|
39
39
|
flow.spacer width: 4
|
|
40
40
|
flow.button text: 'Clear distribution', onClick: ->(action) do
|
|
41
|
-
action.
|
|
41
|
+
action.logics_set targetId: 'carousel_main', data: { distribution: nil }
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
44
|
|
|
@@ -53,7 +53,7 @@ page.body childViews: ->(body) do
|
|
|
53
53
|
['A', 'B', 'C'].each do |label|
|
|
54
54
|
carousel.panels_vertical width: 120, height: 60, backgroundColor: '#e6e6e6', align: 'center', childViews: ->(panel) do
|
|
55
55
|
panel.button text: "Pick #{label}", onClick: ->(action) do
|
|
56
|
-
action.
|
|
56
|
+
action.logics_set targetId: 'carousel_action_status', data: { text: "Action status: #{label}" }
|
|
57
57
|
end
|
|
58
58
|
end
|
|
59
59
|
end
|
|
@@ -86,7 +86,7 @@ page.body childViews: ->(body) do
|
|
|
86
86
|
# flow.button(
|
|
87
87
|
# text: 'Revenue vs Orders',
|
|
88
88
|
# onClick: ->(action) do
|
|
89
|
-
# action.
|
|
89
|
+
# action.logics_set(
|
|
90
90
|
# targetId: 'charts_preview',
|
|
91
91
|
# data: {
|
|
92
92
|
# dataSeries: line_series_revenue,
|
|
@@ -102,7 +102,7 @@ page.body childViews: ->(body) do
|
|
|
102
102
|
# flow.button(
|
|
103
103
|
# text: 'Sessions (single)',
|
|
104
104
|
# onClick: ->(action) do
|
|
105
|
-
# action.
|
|
105
|
+
# action.logics_set(
|
|
106
106
|
# targetId: 'charts_preview',
|
|
107
107
|
# data: {
|
|
108
108
|
# dataSeries: line_series_sessions,
|
|
@@ -117,7 +117,7 @@ page.body childViews: ->(body) do
|
|
|
117
117
|
# flow.button(
|
|
118
118
|
# text: 'Churn trend',
|
|
119
119
|
# onClick: ->(action) do
|
|
120
|
-
# action.
|
|
120
|
+
# action.logics_set(
|
|
121
121
|
# targetId: 'charts_preview',
|
|
122
122
|
# data: {
|
|
123
123
|
# dataSeries: line_series_churn,
|
|
@@ -132,7 +132,7 @@ page.body childViews: ->(body) do
|
|
|
132
132
|
# flow.button(
|
|
133
133
|
# text: 'Clear data',
|
|
134
134
|
# onClick: ->(action) do
|
|
135
|
-
# action.
|
|
135
|
+
# action.logics_set(
|
|
136
136
|
# targetId: 'charts_preview',
|
|
137
137
|
# data: { dataSeries: [] }
|
|
138
138
|
# )
|
|
@@ -59,14 +59,14 @@ page.body(
|
|
|
59
59
|
flow.button(
|
|
60
60
|
text: 'Add padding',
|
|
61
61
|
onClick: ->(action) do
|
|
62
|
-
action.
|
|
62
|
+
action.logics_set targetId: 'column_main', data: { padding: { all: 12 } }
|
|
63
63
|
end
|
|
64
64
|
)
|
|
65
65
|
flow.spacer width: 4
|
|
66
66
|
flow.button(
|
|
67
67
|
text: 'Clear padding',
|
|
68
68
|
onClick: ->(action) do
|
|
69
|
-
action.
|
|
69
|
+
action.logics_set targetId: 'column_main', data: { padding: nil }
|
|
70
70
|
end
|
|
71
71
|
)
|
|
72
72
|
end
|
|
@@ -83,7 +83,7 @@ page.body(
|
|
|
83
83
|
grid.panels_column(
|
|
84
84
|
lg: { cols: 12 },
|
|
85
85
|
onClick: ->(action) do
|
|
86
|
-
action.
|
|
86
|
+
action.logics_set targetId: 'column_action_status', data: { text: 'Click status: clicked' }
|
|
87
87
|
end,
|
|
88
88
|
styleClasses: ['card'],
|
|
89
89
|
padding: { all: 8 },
|
|
@@ -16,7 +16,7 @@ page.body(
|
|
|
16
16
|
res.spacer height: 12
|
|
17
17
|
|
|
18
18
|
res.h2 text: 'Overview'
|
|
19
|
-
res.label text: 'Use
|
|
19
|
+
res.label text: 'Use logics/set to mutate an existing view or components/replace to swap it entirely.'
|
|
20
20
|
res.spacer height: 12
|
|
21
21
|
res.hr width: 'matchParent'
|
|
22
22
|
res.spacer height: 12
|
|
@@ -26,9 +26,9 @@ page.body(
|
|
|
26
26
|
res.label id: 'components_basic', text: 'Label text: default'
|
|
27
27
|
res.spacer height: 8
|
|
28
28
|
res.button(
|
|
29
|
-
text: '
|
|
29
|
+
text: 'logics/set text',
|
|
30
30
|
onClick: ->(action) do
|
|
31
|
-
action.
|
|
31
|
+
action.logics_set targetId: 'components_basic', data: { text: 'Label text: updated' }
|
|
32
32
|
end
|
|
33
33
|
)
|
|
34
34
|
|
|
@@ -45,14 +45,14 @@ page.body(
|
|
|
45
45
|
flow.button(
|
|
46
46
|
text: 'Hide',
|
|
47
47
|
onClick: ->(action) do
|
|
48
|
-
action.
|
|
48
|
+
action.logics_set targetId: 'components_basic', data: { displayed: false }
|
|
49
49
|
end
|
|
50
50
|
)
|
|
51
51
|
flow.spacer width: 8
|
|
52
52
|
flow.button(
|
|
53
53
|
text: 'Show',
|
|
54
54
|
onClick: ->(action) do
|
|
55
|
-
action.
|
|
55
|
+
action.logics_set targetId: 'components_basic', data: { displayed: true }
|
|
56
56
|
end
|
|
57
57
|
)
|
|
58
58
|
end
|
|
@@ -67,9 +67,9 @@ page.body(
|
|
|
67
67
|
res.label id: 'components_status', text: 'Status: idle'
|
|
68
68
|
res.spacer height: 8
|
|
69
69
|
res.button(
|
|
70
|
-
text: '
|
|
70
|
+
text: 'logics/set (with onSet)',
|
|
71
71
|
onClick: ->(action) do
|
|
72
|
-
action.
|
|
72
|
+
action.logics_set(
|
|
73
73
|
targetId: 'components_basic',
|
|
74
74
|
data: { text: 'Label text: updated again' },
|
|
75
75
|
onSet: ->(subaction) do
|
|
@@ -28,14 +28,14 @@ page.body(
|
|
|
28
28
|
flow.button(
|
|
29
29
|
text: 'Primary data',
|
|
30
30
|
onClick: ->(action) do
|
|
31
|
-
action.
|
|
31
|
+
action.logics_set targetId: 'custom_main', data: { data: data_primary }
|
|
32
32
|
end
|
|
33
33
|
)
|
|
34
34
|
flow.spacer width: 4
|
|
35
35
|
flow.button(
|
|
36
36
|
text: 'Alternate data',
|
|
37
37
|
onClick: ->(action) do
|
|
38
|
-
action.
|
|
38
|
+
action.logics_set targetId: 'custom_main', data: { data: data_alt }
|
|
39
39
|
end
|
|
40
40
|
)
|
|
41
41
|
end
|
|
@@ -50,7 +50,7 @@ page.body(
|
|
|
50
50
|
template: 'thumbnail',
|
|
51
51
|
data: data_primary,
|
|
52
52
|
onClick: ->(action) do
|
|
53
|
-
action.
|
|
53
|
+
action.logics_set targetId: 'custom_action_status', data: { text: 'Action status: clicked' }
|
|
54
54
|
end
|
|
55
55
|
)
|
|
56
56
|
res.spacer height: 12
|
|
@@ -89,27 +89,6 @@ page.body(
|
|
|
89
89
|
end
|
|
90
90
|
)
|
|
91
91
|
res.spacer height: 4
|
|
92
|
-
res.button(
|
|
93
|
-
text: 'Dialog alert onClose',
|
|
94
|
-
onClick: ->(action) do
|
|
95
|
-
action.dialogs_alert(
|
|
96
|
-
message: 'Close me',
|
|
97
|
-
onClose: ->(subaction) do
|
|
98
|
-
subaction.dialogs_show(
|
|
99
|
-
content: ->(dialog) do
|
|
100
|
-
dialog.body(
|
|
101
|
-
padding: glib_json_padding_body,
|
|
102
|
-
childViews: ->(sbody) do
|
|
103
|
-
sbody.h1 text: 'onClose fired'
|
|
104
|
-
end
|
|
105
|
-
)
|
|
106
|
-
end
|
|
107
|
-
)
|
|
108
|
-
end
|
|
109
|
-
)
|
|
110
|
-
end
|
|
111
|
-
)
|
|
112
|
-
res.spacer height: 4
|
|
113
92
|
res.button(
|
|
114
93
|
text: 'Dialog notification',
|
|
115
94
|
onClick: ->(action) do
|
|
@@ -56,21 +56,21 @@ page.body(
|
|
|
56
56
|
# flow.button(
|
|
57
57
|
# text: 'Default',
|
|
58
58
|
# onClick: ->(action) do
|
|
59
|
-
# action.
|
|
59
|
+
# action.logics_set targetId: 'credit_card_basic', data: { styleClass: nil, label: 'Card details', hint: nil }
|
|
60
60
|
# end
|
|
61
61
|
# )
|
|
62
62
|
# flow.spacer width: 8
|
|
63
63
|
# flow.button(
|
|
64
64
|
# text: 'Outlined',
|
|
65
65
|
# onClick: ->(action) do
|
|
66
|
-
# action.
|
|
66
|
+
# action.logics_set targetId: 'credit_card_basic', data: { styleClass: 'outlined', label: 'Outlined card' }
|
|
67
67
|
# end
|
|
68
68
|
# )
|
|
69
69
|
# flow.spacer width: 8
|
|
70
70
|
# flow.button(
|
|
71
71
|
# text: 'Individual',
|
|
72
72
|
# onClick: ->(action) do
|
|
73
|
-
# action.
|
|
73
|
+
# action.logics_set targetId: 'credit_card_basic', data: { styleClass: 'individual', label: 'Personal card', hint: 'Use a personal card' }
|
|
74
74
|
# end
|
|
75
75
|
# )
|
|
76
76
|
# end
|
|
@@ -89,21 +89,21 @@ page.body(
|
|
|
89
89
|
# flow.button(
|
|
90
90
|
# text: 'Disable field',
|
|
91
91
|
# onClick: ->(action) do
|
|
92
|
-
# action.
|
|
92
|
+
# action.logics_set targetId: 'credit_card_basic', data: { disabled: true }
|
|
93
93
|
# end
|
|
94
94
|
# )
|
|
95
95
|
# flow.spacer width: 8
|
|
96
96
|
# flow.button(
|
|
97
97
|
# text: 'Enable field',
|
|
98
98
|
# onClick: ->(action) do
|
|
99
|
-
# action.
|
|
99
|
+
# action.logics_set targetId: 'credit_card_basic', data: { disabled: nil }
|
|
100
100
|
# end
|
|
101
101
|
# )
|
|
102
102
|
# flow.spacer width: 8
|
|
103
103
|
# flow.button(
|
|
104
104
|
# text: 'Clear hint',
|
|
105
105
|
# onClick: ->(action) do
|
|
106
|
-
# action.
|
|
106
|
+
# action.logics_set targetId: 'credit_card_basic', data: { hint: nil }
|
|
107
107
|
# end
|
|
108
108
|
# )
|
|
109
109
|
# end
|
|
@@ -103,7 +103,7 @@ page.body(
|
|
|
103
103
|
onClick: ->(action) do
|
|
104
104
|
action.runMultiple(
|
|
105
105
|
childActions: ->(multiple) do
|
|
106
|
-
multiple.
|
|
106
|
+
multiple.logics_set targetId: 'date_basic', data: { value: (Date.current + 7.days).strftime('%Y-%m-%d') }
|
|
107
107
|
multiple.logics_set targetId: 'date_status', data: { text: 'Date set to +1 week' }
|
|
108
108
|
end
|
|
109
109
|
)
|
|
@@ -115,7 +115,7 @@ page.body(
|
|
|
115
115
|
onClick: ->(action) do
|
|
116
116
|
action.runMultiple(
|
|
117
117
|
childActions: ->(multiple) do
|
|
118
|
-
multiple.
|
|
118
|
+
multiple.logics_set targetId: 'date_basic', data: { value: '' }
|
|
119
119
|
multiple.logics_set targetId: 'date_status', data: { text: 'Date cleared' }
|
|
120
120
|
end
|
|
121
121
|
)
|
|
@@ -127,7 +127,7 @@ page.body(
|
|
|
127
127
|
onClick: ->(action) do
|
|
128
128
|
action.runMultiple(
|
|
129
129
|
childActions: ->(multiple) do
|
|
130
|
-
multiple.
|
|
130
|
+
multiple.logics_set targetId: 'datetime_basic', data: { value: '2024-12-12T18:45' }
|
|
131
131
|
multiple.logics_set targetId: 'datetime_status', data: { text: 'Datetime set to evening' }
|
|
132
132
|
end
|
|
133
133
|
)
|
|
@@ -139,7 +139,7 @@ page.body(
|
|
|
139
139
|
onClick: ->(action) do
|
|
140
140
|
action.runMultiple(
|
|
141
141
|
childActions: ->(multiple) do
|
|
142
|
-
multiple.
|
|
142
|
+
multiple.logics_set targetId: 'datetime_basic', data: { value: '' }
|
|
143
143
|
multiple.logics_set targetId: 'datetime_status', data: { text: 'Datetime cleared' }
|
|
144
144
|
end
|
|
145
145
|
)
|
|
@@ -180,28 +180,28 @@ page.body(
|
|
|
180
180
|
flow.button(
|
|
181
181
|
text: 'Disable date',
|
|
182
182
|
onClick: ->(action) do
|
|
183
|
-
action.
|
|
183
|
+
action.logics_set targetId: 'date_basic', data: { disabled: true }
|
|
184
184
|
end
|
|
185
185
|
)
|
|
186
186
|
flow.spacer width: 8
|
|
187
187
|
flow.button(
|
|
188
188
|
text: 'Enable date',
|
|
189
189
|
onClick: ->(action) do
|
|
190
|
-
action.
|
|
190
|
+
action.logics_set targetId: 'date_basic', data: { disabled: nil }
|
|
191
191
|
end
|
|
192
192
|
)
|
|
193
193
|
flow.spacer width: 8
|
|
194
194
|
flow.button(
|
|
195
195
|
text: 'Use text template',
|
|
196
196
|
onClick: ->(action) do
|
|
197
|
-
action.
|
|
197
|
+
action.logics_set targetId: 'datetime_plain', data: { template: { type: 'text' } }
|
|
198
198
|
end
|
|
199
199
|
)
|
|
200
200
|
flow.spacer width: 8
|
|
201
201
|
flow.button(
|
|
202
202
|
text: 'Restore plain template',
|
|
203
203
|
onClick: ->(action) do
|
|
204
|
-
action.
|
|
204
|
+
action.logics_set targetId: 'datetime_plain', data: { template: { type: 'plain' } }
|
|
205
205
|
end
|
|
206
206
|
)
|
|
207
207
|
flow.spacer width: 8
|