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.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/concerns/glib/auth/policy.rb +1 -5
  3. data/app/controllers/concerns/glib/json/libs.rb +0 -33
  4. data/app/helpers/glib/json_ui/action_builder/bottom_banners.rb +0 -1
  5. data/app/helpers/glib/json_ui/action_builder/components.rb +1 -16
  6. data/app/helpers/glib/json_ui/action_builder/logics.rb +1 -2
  7. data/app/helpers/glib/json_ui/action_builder/snackbars.rb +0 -16
  8. data/app/helpers/glib/json_ui/response_helper.rb +0 -12
  9. data/app/helpers/glib/json_ui/view_builder/fields.rb +4 -133
  10. data/app/helpers/glib/json_ui/view_builder/panels.rb +144 -8
  11. data/app/views/json_ui/garage/actions/_components.json.jbuilder +2 -2
  12. data/app/views/json_ui/garage/forms/bulk_edit_post.json.jbuilder +1 -1
  13. data/app/views/json_ui/garage/forms/checkboxes.json.jbuilder +3 -3
  14. data/app/views/json_ui/garage/forms/selects.json.jbuilder +5 -5
  15. data/app/views/json_ui/garage/forms/update_options.json.jbuilder +1 -1
  16. data/app/views/json_ui/garage/panels/flow.json.jbuilder +6 -6
  17. data/app/views/json_ui/garage/panels/horizontal.json.jbuilder +10 -10
  18. data/app/views/json_ui/garage/panels/responsive.json.jbuilder +10 -10
  19. data/app/views/json_ui/garage/panels/ul.json.jbuilder +2 -2
  20. data/app/views/json_ui/garage/panels/vertical.json.jbuilder +10 -10
  21. data/app/views/json_ui/garage/tables/bulk_edit.json.jbuilder +14 -14
  22. data/app/views/json_ui/garage/test_page/_header.json.jbuilder +1 -1
  23. data/app/views/json_ui/garage/test_page/calendar.json.jbuilder +6 -6
  24. data/app/views/json_ui/garage/test_page/carousel.json.jbuilder +4 -4
  25. data/app/views/json_ui/garage/test_page/charts.json.jbuilder +4 -4
  26. data/app/views/json_ui/garage/test_page/column.json.jbuilder +3 -3
  27. data/app/views/json_ui/garage/test_page/components.json.jbuilder +7 -7
  28. data/app/views/json_ui/garage/test_page/custom.json.jbuilder +3 -3
  29. data/app/views/json_ui/garage/test_page/dialog.json.jbuilder +0 -21
  30. data/app/views/json_ui/garage/test_page/fields_creditCard.json.jbuilder +6 -6
  31. data/app/views/json_ui/garage/test_page/fields_date_time.json.jbuilder +8 -8
  32. data/app/views/json_ui/garage/test_page/fields_dynamicSelect.json.jbuilder +8 -8
  33. data/app/views/json_ui/garage/test_page/fields_location.json.jbuilder +6 -6
  34. data/app/views/json_ui/garage/test_page/fields_otp.json.jbuilder +8 -8
  35. data/app/views/json_ui/garage/test_page/fields_phone.json.jbuilder +9 -9
  36. data/app/views/json_ui/garage/test_page/fields_radio.json.jbuilder +4 -4
  37. data/app/views/json_ui/garage/test_page/fields_rating.json.jbuilder +10 -10
  38. data/app/views/json_ui/garage/test_page/fields_richText.json.jbuilder +10 -10
  39. data/app/views/json_ui/garage/test_page/fields_select.json.jbuilder +8 -8
  40. data/app/views/json_ui/garage/test_page/fields_sign.json.jbuilder +8 -56
  41. data/app/views/json_ui/garage/test_page/fields_stripeExternalAccount.json.jbuilder +6 -6
  42. data/app/views/json_ui/garage/test_page/fields_stripeToken.json.jbuilder +6 -6
  43. data/app/views/json_ui/garage/test_page/fields_text.json.jbuilder +5 -5
  44. data/app/views/json_ui/garage/test_page/fields_timer.json.jbuilder +6 -6
  45. data/app/views/json_ui/garage/test_page/flow.json.jbuilder +6 -6
  46. data/app/views/json_ui/garage/test_page/form.json.jbuilder +9 -9
  47. data/app/views/json_ui/garage/test_page/grid.json.jbuilder +4 -4
  48. data/app/views/json_ui/garage/test_page/horizontal.json.jbuilder +5 -5
  49. data/app/views/json_ui/garage/test_page/image.json.jbuilder +9 -9
  50. data/app/views/json_ui/garage/test_page/lifecycle.json.jbuilder +6 -6
  51. data/app/views/json_ui/garage/test_page/list.json.jbuilder +6 -6
  52. data/app/views/json_ui/garage/test_page/multimedia_docx.json.jbuilder +5 -5
  53. data/app/views/json_ui/garage/test_page/multimedia_video.json.jbuilder +6 -6
  54. data/app/views/json_ui/garage/test_page/pagination.json.jbuilder +6 -6
  55. data/app/views/json_ui/garage/test_page/panels_bulkEdit2.json.jbuilder +244 -0
  56. data/app/views/json_ui/garage/test_page/panels_bulkEdit3.json.jbuilder +3 -3
  57. data/app/views/json_ui/garage/test_page/progressCircle.json.jbuilder +8 -8
  58. data/app/views/json_ui/garage/test_page/responsive.json.jbuilder +4 -4
  59. data/app/views/json_ui/garage/test_page/scroll.json.jbuilder +5 -5
  60. data/app/views/json_ui/garage/test_page/split.json.jbuilder +1 -1
  61. data/app/views/json_ui/garage/test_page/table.json.jbuilder +5 -5
  62. data/app/views/json_ui/garage/test_page/timeline.json.jbuilder +5 -5
  63. data/app/views/json_ui/garage/test_page/ul.json.jbuilder +4 -4
  64. data/app/views/json_ui/garage/test_page/vertical.json.jbuilder +5 -5
  65. data/app/views/json_ui/garage/test_page/web.json.jbuilder +5 -5
  66. data/app/views/json_ui/garage/views/_expand_shrink_ex.json.jbuilder +4 -4
  67. data/app/views/json_ui/garage/views/controls.json.jbuilder +4 -4
  68. data/app/views/json_ui/garage/views/{components_set.json.jbuilder → logics_set.json.jbuilder} +2 -2
  69. data/lib/glib/engine.rb +0 -32
  70. data/lib/glib/json_crawler/action_crawlers/forms_submit.rb +1 -1
  71. data/lib/glib/json_crawler/router.rb +0 -24
  72. data/lib/glib/json_ui/config.rb +1 -1
  73. data/lib/glib/test/changed_files_rubocop.rb +55 -0
  74. data/lib/glib/test_helpers.rb +7 -9
  75. data/lib/glib-web.rb +2 -4
  76. metadata +6 -37
  77. data/app/controllers/concerns/glib/auth/token_authenticatable.rb +0 -37
  78. data/app/controllers/glib/api_controller.rb +0 -52
  79. data/app/jobs/glib/purge_unattached_job.rb +0 -32
  80. data/app/models/concerns/glib/snapshot_v2.rb +0 -514
  81. data/app/models/glib/model.rb +0 -40
  82. data/app/models/glib/plain_model.rb +0 -23
  83. data/app/models/snapshot_blob_reference.rb +0 -20
  84. data/app/views/json_ui/garage/test_page/fields_change_trigger.json.jbuilder +0 -128
  85. data/lib/generators/glib/snapshot_v2_generator.rb +0 -54
  86. data/lib/generators/templates/snapshot_v2/add_snapshot_v2_columns.rb +0 -18
  87. data/lib/generators/templates/snapshot_v2/create_snapshot_blob_references.rb +0 -10
  88. data/lib/glib/purge_unattached/config.rb +0 -38
  89. data/lib/glib/test/full_suite_rubocop.rb +0 -87
  90. data/lib/glib/test/rubocop_guards.rb +0 -42
@@ -1,8 +1,5 @@
1
1
  json.title 'Test Page (Fields Sign)'
2
2
 
3
- # 60x20 ink stand-in used by the pre-filled examples.
4
- preview_data_uri = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAUCAYAAADRA14pAAAAoklEQVR4nO2XUQrAIAxDcwjvf9WNfQzG1NFqUt1mwL8a8hBtxfYzYXSAaC1glVJK2RohOXAJdCS4FNgCGw0tA7YAjQCXAHsBoqAPbzpwa3A19OkLpjkjsAL66gmWOTOo0gtvOJXe/VcP9JpH3DvmewBLkdeUKfaLD09xqSaid7bkqilrS57pKHJCYmWq9uFZQD2ZLLkeB49ZQO/qybX+w1/XDujJvn2bufeCAAAAAElFTkSuQmCC'
5
-
6
3
  page = json_ui_page json
7
4
 
8
5
  render 'json_ui/garage/test_page/header', json: json, page: page
@@ -28,11 +25,6 @@ page.body(
28
25
  form.fields_sign(
29
26
  id: 'signature_main',
30
27
  name: 'user[signature]',
31
- label: 'Your signature',
32
- # Single-param contract: the typed name is submitted through the
33
- # field's own param, so typedName carries only the input's
34
- # decoration and pre-filled value.
35
- typedName: { label: 'Type your full name', placeholder: 'Full name' },
36
28
  directUploadUrl: glib_direct_uploads_url,
37
29
  width: 320,
38
30
  height: 160,
@@ -55,21 +47,21 @@ page.body(
55
47
  flow.button(
56
48
  text: 'Large (480x220)',
57
49
  onClick: ->(action) do
58
- action.components_set targetId: 'signature_main', data: { width: 480, height: 220 }
50
+ action.logics_set targetId: 'signature_main', data: { width: 480, height: 220 }
59
51
  end
60
52
  )
61
53
  flow.spacer width: 8
62
54
  flow.button(
63
55
  text: 'Compact (260x120)',
64
56
  onClick: ->(action) do
65
- action.components_set targetId: 'signature_main', data: { width: 260, height: 120 }
57
+ action.logics_set targetId: 'signature_main', data: { width: 260, height: 120 }
66
58
  end
67
59
  )
68
60
  flow.spacer width: 8
69
61
  flow.button(
70
62
  text: 'Required',
71
63
  onClick: ->(action) do
72
- action.components_set targetId: 'signature_main',
64
+ action.logics_set targetId: 'signature_main',
73
65
  data: { validation: { required: { message: 'signature is required' } } }
74
66
  end
75
67
  )
@@ -77,21 +69,21 @@ page.body(
77
69
  flow.button(
78
70
  text: 'Optional',
79
71
  onClick: ->(action) do
80
- action.components_set targetId: 'signature_main', data: { validation: nil }
72
+ action.logics_set targetId: 'signature_main', data: { validation: nil }
81
73
  end
82
74
  )
83
75
  flow.spacer width: 8
84
76
  flow.button(
85
77
  text: 'Disable',
86
78
  onClick: ->(action) do
87
- action.components_set targetId: 'signature_main', data: { disabled: true }
79
+ action.logics_set targetId: 'signature_main', data: { disabled: true }
88
80
  end
89
81
  )
90
82
  flow.spacer width: 8
91
83
  flow.button(
92
84
  text: 'Enable',
93
85
  onClick: ->(action) do
94
- action.components_set targetId: 'signature_main', data: { disabled: nil }
86
+ action.logics_set targetId: 'signature_main', data: { disabled: nil }
95
87
  end
96
88
  )
97
89
  end
@@ -121,7 +113,7 @@ page.body(
121
113
  text: 'Clear value',
122
114
  onClick: ->(action) do
123
115
  action.runMultiple childActions: ->(multiple) do
124
- multiple.components_set targetId: 'signature_main', data: { value: '' }
116
+ multiple.logics_set targetId: 'signature_main', data: { value: nil }
125
117
  multiple.logics_set targetId: 'signature_status', data: { text: 'Status: cleared' }
126
118
  end
127
119
  end
@@ -145,7 +137,7 @@ page.body(
145
137
 
146
138
  form.h2 text: 'Edge/advanced'
147
139
  form.spacer height: 8
148
- form.label text: 'A small, draw-only slot (no typedName, so the dialog has no tabs).'
140
+ form.label text: 'Use a small canvas to test tighter layouts.'
149
141
  form.spacer height: 8
150
142
  form.fields_sign(
151
143
  id: 'signature_compact',
@@ -154,46 +146,6 @@ page.body(
154
146
  width: 220,
155
147
  height: 100
156
148
  )
157
-
158
- form.spacer height: 12
159
- form.hr width: 'matchParent'
160
- form.spacer height: 12
161
-
162
- form.h2 text: 'Pre-filled (re-edit)'
163
- form.spacer height: 8
164
- form.label text: 'A saved signature: value carries the signed id, fileUrl renders the preview.'
165
- form.spacer height: 8
166
- form.fields_sign(
167
- id: 'signature_prefilled',
168
- name: 'user[signature_prefilled]',
169
- # A stand-in for the signed id the Sign builder derives from
170
- # `prop:` on a re-edit (see Sign#determine_value).
171
- value: 'prefilled-signed-id',
172
- fileUrl: preview_data_uri,
173
- typedName: { label: 'Type your full name', placeholder: 'Full name' },
174
- directUploadUrl: glib_direct_uploads_url,
175
- width: 320,
176
- height: 160
177
- )
178
-
179
- form.spacer height: 12
180
- form.hr width: 'matchParent'
181
- form.spacer height: 12
182
-
183
- form.h2 text: 'Read-only (pre-filled)'
184
- form.spacer height: 8
185
- form.label text: 'A saved signature on a read-only field: the preview shows, the edit overlay does not.'
186
- form.spacer height: 8
187
- form.fields_sign(
188
- id: 'signature_readonly',
189
- name: 'user[signature_readonly]',
190
- value: 'readonly-signed-id',
191
- fileUrl: preview_data_uri,
192
- directUploadUrl: glib_direct_uploads_url,
193
- width: 320,
194
- height: 160,
195
- readOnly: true
196
- )
197
149
  end
198
150
  )
199
151
  end
@@ -60,7 +60,7 @@ page.body(
60
60
  # flow.button(
61
61
  # text: 'Individual (AU/AUD)',
62
62
  # onClick: ->(action) do
63
- # action.components_set(
63
+ # action.logics_set(
64
64
  # targetId: 'stripe_external_basic',
65
65
  # data: {
66
66
  # accountHolderName: 'John Doe',
@@ -75,7 +75,7 @@ page.body(
75
75
  # flow.button(
76
76
  # text: 'Company (US/USD)',
77
77
  # onClick: ->(action) do
78
- # action.components_set(
78
+ # action.logics_set(
79
79
  # targetId: 'stripe_external_basic',
80
80
  # data: {
81
81
  # accountHolderName: 'Acme Corp',
@@ -90,7 +90,7 @@ page.body(
90
90
  # flow.button(
91
91
  # text: 'Company (GB/GBP)',
92
92
  # onClick: ->(action) do
93
- # action.components_set(
93
+ # action.logics_set(
94
94
  # targetId: 'stripe_external_basic',
95
95
  # data: {
96
96
  # accountHolderName: 'London Ltd',
@@ -117,21 +117,21 @@ page.body(
117
117
  # flow.button(
118
118
  # text: 'Disable field',
119
119
  # onClick: ->(action) do
120
- # action.components_set targetId: 'stripe_external_basic', data: { disabled: true }
120
+ # action.logics_set targetId: 'stripe_external_basic', data: { disabled: true }
121
121
  # end
122
122
  # )
123
123
  # flow.spacer width: 8
124
124
  # flow.button(
125
125
  # text: 'Enable field',
126
126
  # onClick: ->(action) do
127
- # action.components_set targetId: 'stripe_external_basic', data: { disabled: nil }
127
+ # action.logics_set targetId: 'stripe_external_basic', data: { disabled: nil }
128
128
  # end
129
129
  # )
130
130
  # flow.spacer width: 8
131
131
  # flow.button(
132
132
  # text: 'Reset label',
133
133
  # onClick: ->(action) do
134
- # action.components_set targetId: 'stripe_external_basic', data: { label: 'Bank account' }
134
+ # action.logics_set targetId: 'stripe_external_basic', data: { label: 'Bank account' }
135
135
  # end
136
136
  # )
137
137
  # end
@@ -56,21 +56,21 @@ page.body(
56
56
  flow.button(
57
57
  text: 'Default style',
58
58
  onClick: ->(action) do
59
- action.components_set targetId: 'stripe_token_basic', data: { styleClass: nil, label: 'Card details', hint: nil }
59
+ action.logics_set targetId: 'stripe_token_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.components_set targetId: 'stripe_token_basic', data: { styleClass: 'outlined', label: 'Card details', hint: nil }
66
+ action.logics_set targetId: 'stripe_token_basic', data: { styleClass: 'outlined', label: 'Card details', hint: nil }
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.components_set targetId: 'stripe_token_basic', data: { styleClass: 'individual', label: 'Card details', hint: 'Personal card' }
73
+ action.logics_set targetId: 'stripe_token_basic', data: { styleClass: 'individual', label: 'Card details', hint: '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.components_set targetId: 'stripe_token_basic', data: { disabled: true }
92
+ # action.logics_set targetId: 'stripe_token_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.components_set targetId: 'stripe_token_basic', data: { disabled: nil }
99
+ # action.logics_set targetId: 'stripe_token_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.components_set targetId: 'stripe_token_basic', data: { hint: nil }
106
+ # action.logics_set targetId: 'stripe_token_basic', data: { hint: nil }
107
107
  # end
108
108
  # )
109
109
  # end
@@ -159,7 +159,7 @@ page.body(
159
159
  # ── Actions/events ────────────────────────────────────────────────
160
160
  form.h2 text: 'Actions/events'
161
161
  form.spacer height: 8
162
- form.label text: 'Buttons target the basic fields_text field (id: text_main) via components_set and fields_focus.'
162
+ form.label text: 'Buttons target the basic fields_text field (id: text_main) via logics_set and fields_focus.'
163
163
  form.spacer height: 8
164
164
  form.panels_flow(
165
165
  innerPadding: { bottom: 0 },
@@ -170,7 +170,7 @@ page.body(
170
170
  onClick: ->(action) do
171
171
  action.runMultiple(
172
172
  childActions: ->(multi) do
173
- multi.components_set targetId: 'text_main', data: { value: 'Hello world' }
173
+ multi.logics_set targetId: 'text_main', data: { value: 'Hello world' }
174
174
  multi.logics_set targetId: 'text_status', data: { text: 'Status: value set' }
175
175
  end
176
176
  )
@@ -182,7 +182,7 @@ page.body(
182
182
  onClick: ->(action) do
183
183
  action.runMultiple(
184
184
  childActions: ->(multi) do
185
- multi.components_set targetId: 'text_main', data: { value: '' }
185
+ multi.logics_set targetId: 'text_main', data: { value: '' }
186
186
  multi.logics_set targetId: 'text_status', data: { text: 'Status: cleared' }
187
187
  end
188
188
  )
@@ -227,14 +227,14 @@ page.body(
227
227
  flow.button(
228
228
  text: 'Disable',
229
229
  onClick: ->(action) do
230
- action.components_set targetId: 'text_disabled', data: { disabled: true }
230
+ action.logics_set targetId: 'text_disabled', data: { disabled: true }
231
231
  end
232
232
  )
233
233
  flow.spacer width: 8
234
234
  flow.button(
235
235
  text: 'Enable',
236
236
  onClick: ->(action) do
237
- action.components_set targetId: 'text_disabled', data: { disabled: nil }
237
+ action.logics_set targetId: 'text_disabled', data: { disabled: nil }
238
238
  end
239
239
  )
240
240
  end
@@ -75,14 +75,14 @@ page.body(
75
75
  flow.button(
76
76
  text: 'Set 2 minutes',
77
77
  onClick: ->(action) do
78
- action.components_set targetId: 'timer_basic', data: { value: 120 }
78
+ action.logics_set targetId: 'timer_basic', data: { value: 120 }
79
79
  end
80
80
  )
81
81
  flow.spacer width: 8
82
82
  flow.button(
83
83
  text: 'Set 45 seconds',
84
84
  onClick: ->(action) do
85
- action.components_set targetId: 'timer_basic', data: { value: 45 }
85
+ action.logics_set targetId: 'timer_basic', data: { value: 45 }
86
86
  end
87
87
  )
88
88
  flow.spacer width: 8
@@ -90,7 +90,7 @@ page.body(
90
90
  text: 'Swap to stopwatch',
91
91
  onClick: ->(action) do
92
92
  action.runMultiple childActions: ->(multiple) do
93
- multiple.components_set targetId: 'timer_basic', data: { value: 5, min: nil, max: 30, forward: true }
93
+ multiple.logics_set targetId: 'timer_basic', data: { value: 5, min: nil, max: 30, forward: true }
94
94
  multiple.logics_set targetId: 'timer_status', data: { text: 'Status: forward (max 30s)' }
95
95
  end
96
96
  end
@@ -122,21 +122,21 @@ page.body(
122
122
  flow.button(
123
123
  text: 'Set 2s (below min)',
124
124
  onClick: ->(action) do
125
- action.components_set targetId: 'timer_limits', data: { value: 2 }
125
+ action.logics_set targetId: 'timer_limits', data: { value: 2 }
126
126
  end
127
127
  )
128
128
  flow.spacer width: 8
129
129
  flow.button(
130
130
  text: 'Set 7s',
131
131
  onClick: ->(action) do
132
- action.components_set targetId: 'timer_limits', data: { value: 7 }
132
+ action.logics_set targetId: 'timer_limits', data: { value: 7 }
133
133
  end
134
134
  )
135
135
  flow.spacer width: 8
136
136
  flow.button(
137
137
  text: 'Set 15s (above max)',
138
138
  onClick: ->(action) do
139
- action.components_set targetId: 'timer_limits', data: { value: 15 }
139
+ action.logics_set targetId: 'timer_limits', data: { value: 15 }
140
140
  end
141
141
  )
142
142
  end
@@ -28,19 +28,19 @@ page.body childViews: ->(body) do
28
28
  res.spacer height: 8
29
29
  res.panels_flow innerPadding: { bottom: 0 }, childViews: ->(flow) do
30
30
  flow.button text: 'Tight gap', onClick: ->(action) do
31
- action.components_set targetId: 'flow_main', data: { innerPadding: { x: 2, y: 2 } }
31
+ action.logics_set targetId: 'flow_main', data: { innerPadding: { x: 2, y: 2 } }
32
32
  end
33
33
  flow.spacer width: 4
34
34
  flow.button text: 'Loose gap', onClick: ->(action) do
35
- action.components_set targetId: 'flow_main', data: { innerPadding: { x: 12, y: 12 } }
35
+ action.logics_set targetId: 'flow_main', data: { innerPadding: { x: 12, y: 12 } }
36
36
  end
37
37
  flow.spacer width: 4
38
38
  flow.button text: 'Align middle', onClick: ->(action) do
39
- action.components_set targetId: 'flow_main', data: { align: 'middle' }
39
+ action.logics_set targetId: 'flow_main', data: { align: 'middle' }
40
40
  end
41
41
  flow.spacer width: 4
42
42
  flow.button text: 'Align bottom', onClick: ->(action) do
43
- action.components_set targetId: 'flow_main', data: { align: 'bottom' }
43
+ action.logics_set targetId: 'flow_main', data: { align: 'bottom' }
44
44
  end
45
45
  end
46
46
 
@@ -52,9 +52,9 @@ page.body childViews: ->(body) do
52
52
  res.label id: 'flow_action_status', text: 'Hover status: idle'
53
53
  res.spacer height: 6
54
54
  res.panels_flow width: 200, innerPadding: { x: 6, y: 6 }, backgroundColor: '#e6e6e6', onMouseEnter: ->(action) do
55
- action.components_set targetId: 'flow_action_status', data: { text: 'Hover status: entered' }
55
+ action.logics_set targetId: 'flow_action_status', data: { text: 'Hover status: entered' }
56
56
  end, onMouseLeave: ->(action) do
57
- action.components_set targetId: 'flow_action_status', data: { text: 'Hover status: left' }
57
+ action.logics_set targetId: 'flow_action_status', data: { text: 'Hover status: left' }
58
58
  end, childViews: ->(flow) do
59
59
  flow.label text: 'Hover this panel'
60
60
  end
@@ -14,14 +14,14 @@ page.body childViews: ->(body) do
14
14
  method: 'post',
15
15
  childViews: ->(form) do
16
16
  form.panels_flow innerPadding: { bottom: 0 }, width: 'matchParent', childViews: ->(hori) do
17
- hori.button text: 'components/set', onClick: ->(action) do
17
+ hori.button text: 'logics/set', onClick: ->(action) do
18
18
  action.runMultiple childActions: ->(saction) do
19
- saction.components_set targetId: 'textarea', data: { value: 'The quick brown fox jumps over the lazy dog' }
19
+ saction.logics_set targetId: 'textarea', data: { value: 'The quick brown fox jumps over the lazy dog' }
20
20
  new_options = [{ text: 'Option99', value: 'option99' }]
21
21
 
22
- saction.components_set targetId: 'select', data: { options: new_options, value: 'option99' }
22
+ saction.logics_set targetId: 'select', data: { options: new_options, value: 'option99' }
23
23
 
24
- saction.components_set targetId: 'chip_group', data: { options: new_options, value: 0 }
24
+ saction.logics_set targetId: 'chip_group', data: { options: new_options, value: 0 }
25
25
  end
26
26
  end
27
27
  hori.spacer width: 4
@@ -48,22 +48,22 @@ page.body childViews: ->(body) do
48
48
  hori.button text: 'hide select', onClick: ->(action) do
49
49
  action.runMultiple childActions: ->(saction) do
50
50
  ['select', 'select1', 'select2', 'select3'].each do |id|
51
- saction.components_set targetId: id, data: { displayed: false }
51
+ saction.logics_set targetId: id, data: { displayed: false }
52
52
  end
53
53
  end
54
54
  end
55
55
  hori.spacer height: 4
56
56
  hori.button text: 'hide jack', onClick: ->(action) do
57
57
  action.runMultiple childActions: ->(saction) do
58
- saction.components_set targetId: 'ver', data: { displayed: true }
59
- saction.components_set targetId: 'ver1', data: { displayed: false }
58
+ saction.logics_set targetId: 'ver', data: { displayed: true }
59
+ saction.logics_set targetId: 'ver1', data: { displayed: false }
60
60
  end
61
61
  end
62
62
  hori.spacer height: 4
63
63
  hori.button text: 'show jack', onClick: ->(action) do
64
64
  action.runMultiple childActions: ->(saction) do
65
- saction.components_set targetId: 'ver', data: { displayed: false }
66
- saction.components_set targetId: 'ver1', data: { displayed: true }
65
+ saction.logics_set targetId: 'ver', data: { displayed: false }
66
+ saction.logics_set targetId: 'ver1', data: { displayed: true }
67
67
  end
68
68
  end
69
69
  end
@@ -30,11 +30,11 @@ 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: 'Small boxes', onClick: ->(action) do
33
- action.components_set targetId: 'grid_main', data: { boxMinWidth: 100, columnGap: 8, rowGap: 8 }
33
+ action.logics_set targetId: 'grid_main', data: { boxMinWidth: 100, columnGap: 8, rowGap: 8 }
34
34
  end
35
35
  flow.spacer width: 4
36
36
  flow.button text: 'Large boxes', onClick: ->(action) do
37
- action.components_set targetId: 'grid_main', data: { boxMinWidth: 180, columnGap: 16, rowGap: 16 }
37
+ action.logics_set targetId: 'grid_main', data: { boxMinWidth: 180, columnGap: 16, rowGap: 16 }
38
38
  end
39
39
  end
40
40
 
@@ -46,9 +46,9 @@ page.body childViews: ->(body) do
46
46
  res.label id: 'grid_action_status', text: 'Hover status: idle'
47
47
  res.spacer height: 6
48
48
  res.panels_grid width: 'matchParent', boxMinWidth: 120, columnGap: 8, rowGap: 8, onMouseEnter: ->(action) do
49
- action.components_set targetId: 'grid_action_status', data: { text: 'Hover status: entered' }
49
+ action.logics_set targetId: 'grid_action_status', data: { text: 'Hover status: entered' }
50
50
  end, onMouseLeave: ->(action) do
51
- action.components_set targetId: 'grid_action_status', data: { text: 'Hover status: left' }
51
+ action.logics_set targetId: 'grid_action_status', data: { text: 'Hover status: left' }
52
52
  end, childViews: ->(box) do
53
53
  (1..4).each do |index|
54
54
  box.panels_vertical height: 50, backgroundColor: '#e6e6e6', align: 'center', childViews: ->(panel) do
@@ -28,19 +28,19 @@ page.body childViews: ->(body) do
28
28
  res.spacer height: 8
29
29
  res.panels_flow innerPadding: { bottom: 0 }, childViews: ->(flow) do
30
30
  flow.button text: 'Fill equally', onClick: ->(action) do
31
- action.components_set targetId: 'horizontal_main', data: { width: 300, distribution: 'fillEqually' }
31
+ action.logics_set targetId: 'horizontal_main', data: { width: 300, distribution: 'fillEqually' }
32
32
  end
33
33
  flow.spacer width: 4
34
34
  flow.button text: 'Space equally', onClick: ->(action) do
35
- action.components_set targetId: 'horizontal_main', data: { width: 300, distribution: 'spaceEqually' }
35
+ action.logics_set targetId: 'horizontal_main', data: { width: 300, distribution: 'spaceEqually' }
36
36
  end
37
37
  flow.spacer width: 4
38
38
  flow.button text: 'Overlap 3', onClick: ->(action) do
39
- action.components_set targetId: 'horizontal_main', data: { distribution: 'overlap-3' }
39
+ action.logics_set targetId: 'horizontal_main', data: { distribution: 'overlap-3' }
40
40
  end
41
41
  flow.spacer width: 4
42
42
  flow.button text: 'Align middle', onClick: ->(action) do
43
- action.components_set targetId: 'horizontal_main', data: { align: 'middle' }
43
+ action.logics_set targetId: 'horizontal_main', data: { align: 'middle' }
44
44
  end
45
45
  end
46
46
 
@@ -52,7 +52,7 @@ page.body childViews: ->(body) do
52
52
  res.label id: 'horizontal_action_status', text: 'Click status: idle'
53
53
  res.spacer height: 6
54
54
  res.panels_horizontal width: 180, height: 60, align: 'middle', backgroundColor: '#e6e6e6', onClick: ->(action) do
55
- action.components_set targetId: 'horizontal_action_status', data: { text: 'Click status: clicked' }
55
+ action.logics_set targetId: 'horizontal_action_status', data: { text: 'Click status: clicked' }
56
56
  end, childViews: ->(panel) do
57
57
  panel.label text: 'Click panel'
58
58
  end
@@ -44,7 +44,7 @@ page.body(
44
44
  flow.button(
45
45
  text: 'Default',
46
46
  onClick: ->(action) do
47
- action.components_set(
47
+ action.logics_set(
48
48
  targetId: 'image_main',
49
49
  data: {
50
50
  width: 320,
@@ -61,7 +61,7 @@ page.body(
61
61
  flow.button(
62
62
  text: 'Crop square',
63
63
  onClick: ->(action) do
64
- action.components_set(
64
+ action.logics_set(
65
65
  targetId: 'image_main',
66
66
  data: { width: 160, height: 160, url: small_image_url, fit: :crop }
67
67
  )
@@ -71,7 +71,7 @@ page.body(
71
71
  flow.button(
72
72
  text: 'Full width',
73
73
  onClick: ->(action) do
74
- action.components_set(
74
+ action.logics_set(
75
75
  targetId: 'image_main',
76
76
  data: { width: 'matchParent', height: 220, url: glib_json_image_standard_url, fit: :clip }
77
77
  )
@@ -81,7 +81,7 @@ page.body(
81
81
  flow.button(
82
82
  text: 'Tall crop',
83
83
  onClick: ->(action) do
84
- action.components_set(
84
+ action.logics_set(
85
85
  targetId: 'image_main',
86
86
  data: { width: 200, height: 320, url: glib_json_image_standard_url, fit: :crop }
87
87
  )
@@ -91,7 +91,7 @@ page.body(
91
91
  flow.button(
92
92
  text: 'Height clip',
93
93
  onClick: ->(action) do
94
- action.components_set(
94
+ action.logics_set(
95
95
  targetId: 'image_main',
96
96
  data: { width: nil, height: 200, url: glib_json_image_standard_url, fit: :clip }
97
97
  )
@@ -101,7 +101,7 @@ page.body(
101
101
  flow.button(
102
102
  text: 'Height crop',
103
103
  onClick: ->(action) do
104
- action.components_set(
104
+ action.logics_set(
105
105
  targetId: 'image_main',
106
106
  data: { width: nil, height: 160, url: small_image_url, fit: :crop }
107
107
  )
@@ -123,7 +123,7 @@ page.body(
123
123
  flow.button(
124
124
  text: 'Show badge',
125
125
  onClick: ->(action) do
126
- action.components_set(
126
+ action.logics_set(
127
127
  targetId: 'image_main',
128
128
  data: { badge: { text: '3', backgroundColor: '#2B3A67' } }
129
129
  )
@@ -145,7 +145,7 @@ page.body(
145
145
  flow.button(
146
146
  text: 'Tiny thumbnail',
147
147
  onClick: ->(action) do
148
- action.components_set(
148
+ action.logics_set(
149
149
  targetId: 'image_main',
150
150
  data: { width: 64, height: 64, url: small_image_url, fit: :crop }
151
151
  )
@@ -155,7 +155,7 @@ page.body(
155
155
  flow.button(
156
156
  text: 'Restore size',
157
157
  onClick: ->(action) do
158
- action.components_set(
158
+ action.logics_set(
159
159
  targetId: 'image_main',
160
160
  data: { width: 320, height: 200, url: glib_json_image_standard_url, fit: :clip }
161
161
  )
@@ -23,10 +23,10 @@ page.body childViews: ->(body) do
23
23
  id: 'button',
24
24
  text: 'you should not see this',
25
25
  onLoad: ->(action) do
26
- action.components_set targetId: 'button', data: { text: 'onLoad' }
26
+ action.logics_set targetId: 'button', data: { text: 'onLoad' }
27
27
  end,
28
28
  onRerender: ->(action) do
29
- action.components_set targetId: 'button', data: { text: 'onRerender' }
29
+ action.logics_set targetId: 'button', data: { text: 'onRerender' }
30
30
  end
31
31
  res.spacer height: 8
32
32
  res.chip \
@@ -34,22 +34,22 @@ page.body childViews: ->(body) do
34
34
  text: 'hover me',
35
35
  tooltip: { text: 'you should not see this' },
36
36
  onLoad: ->(action) do
37
- action.components_set targetId: 'chip', data: { 'tooltip.text' => 'onLoad' }
37
+ action.logics_set targetId: 'chip', data: { 'tooltip.text' => 'onLoad' }
38
38
  end,
39
39
  onRerender: ->(action) do
40
- action.components_set targetId: 'chip', data: { 'tooltip.text' => 'onRerender' }
40
+ action.logics_set targetId: 'chip', data: { 'tooltip.text' => 'onRerender' }
41
41
  end
42
42
  res.spacer height: 8
43
43
  res.icon \
44
44
  id: 'icon',
45
45
  name: 'autorenew',
46
46
  onLoad: ->(action) do
47
- action.components_set targetId: 'icon', data: {
47
+ action.logics_set targetId: 'icon', data: {
48
48
  'material.name' => 'home'
49
49
  }
50
50
  end,
51
51
  onRerender: ->(action) do
52
- action.components_set targetId: 'icon', data: {
52
+ action.logics_set targetId: 'icon', data: {
53
53
  'material.name' => 'person'
54
54
  }
55
55
  end
@@ -37,28 +37,28 @@ page.body(
37
37
  flow.button(
38
38
  text: 'One column',
39
39
  onClick: ->(action) do
40
- action.components_set targetId: 'list_main', data: { responsiveCols: 1 }
40
+ action.logics_set targetId: 'list_main', data: { responsiveCols: 1 }
41
41
  end
42
42
  )
43
43
  flow.spacer width: 4
44
44
  flow.button(
45
45
  text: 'Three columns',
46
46
  onClick: ->(action) do
47
- action.components_set targetId: 'list_main', data: { responsiveCols: 3 }
47
+ action.logics_set targetId: 'list_main', data: { responsiveCols: 3 }
48
48
  end
49
49
  )
50
50
  flow.spacer width: 4
51
51
  flow.button(
52
52
  text: 'Card style',
53
53
  onClick: ->(action) do
54
- action.components_set targetId: 'list_main', data: { styleClasses: ['card'], padding: glib_json_padding_list }
54
+ action.logics_set targetId: 'list_main', data: { styleClasses: ['card'], padding: glib_json_padding_list }
55
55
  end
56
56
  )
57
57
  flow.spacer width: 4
58
58
  flow.button(
59
59
  text: 'Clear style',
60
60
  onClick: ->(action) do
61
- action.components_set targetId: 'list_main', data: { styleClasses: nil, padding: nil }
61
+ action.logics_set targetId: 'list_main', data: { styleClasses: nil, padding: nil }
62
62
  end
63
63
  )
64
64
  end
@@ -73,10 +73,10 @@ page.body(
73
73
  id: 'list_events',
74
74
  height: 180,
75
75
  onScrollToTop: ->(action) do
76
- action.components_set targetId: 'list_event_status', data: { text: 'Scroll events: top reached' }
76
+ action.logics_set targetId: 'list_event_status', data: { text: 'Scroll events: top reached' }
77
77
  end,
78
78
  onScrollToBottom: ->(action) do
79
- action.components_set targetId: 'list_event_status', data: { text: 'Scroll events: bottom reached' }
79
+ action.logics_set targetId: 'list_event_status', data: { text: 'Scroll events: bottom reached' }
80
80
  end,
81
81
  firstSection: ->(section) do
82
82
  section.rows(