glib-web 6.10.2 → 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 (83) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/concerns/glib/auth/policy.rb +1 -5
  3. data/app/helpers/glib/json_ui/action_builder/bottom_banners.rb +0 -1
  4. data/app/helpers/glib/json_ui/action_builder/components.rb +1 -16
  5. data/app/helpers/glib/json_ui/action_builder/logics.rb +1 -2
  6. data/app/helpers/glib/json_ui/action_builder/snackbars.rb +0 -16
  7. data/app/helpers/glib/json_ui/response_helper.rb +0 -12
  8. data/app/helpers/glib/json_ui/view_builder/fields.rb +4 -86
  9. data/app/views/json_ui/garage/actions/_components.json.jbuilder +2 -2
  10. data/app/views/json_ui/garage/forms/bulk_edit_post.json.jbuilder +1 -1
  11. data/app/views/json_ui/garage/forms/checkboxes.json.jbuilder +3 -3
  12. data/app/views/json_ui/garage/forms/selects.json.jbuilder +5 -5
  13. data/app/views/json_ui/garage/forms/update_options.json.jbuilder +1 -1
  14. data/app/views/json_ui/garage/panels/flow.json.jbuilder +6 -6
  15. data/app/views/json_ui/garage/panels/horizontal.json.jbuilder +10 -10
  16. data/app/views/json_ui/garage/panels/responsive.json.jbuilder +10 -10
  17. data/app/views/json_ui/garage/panels/ul.json.jbuilder +2 -2
  18. data/app/views/json_ui/garage/panels/vertical.json.jbuilder +10 -10
  19. data/app/views/json_ui/garage/tables/bulk_edit.json.jbuilder +8 -8
  20. data/app/views/json_ui/garage/test_page/calendar.json.jbuilder +6 -6
  21. data/app/views/json_ui/garage/test_page/carousel.json.jbuilder +4 -4
  22. data/app/views/json_ui/garage/test_page/charts.json.jbuilder +4 -4
  23. data/app/views/json_ui/garage/test_page/column.json.jbuilder +3 -3
  24. data/app/views/json_ui/garage/test_page/components.json.jbuilder +7 -7
  25. data/app/views/json_ui/garage/test_page/custom.json.jbuilder +3 -3
  26. data/app/views/json_ui/garage/test_page/dialog.json.jbuilder +0 -21
  27. data/app/views/json_ui/garage/test_page/fields_creditCard.json.jbuilder +6 -6
  28. data/app/views/json_ui/garage/test_page/fields_date_time.json.jbuilder +8 -8
  29. data/app/views/json_ui/garage/test_page/fields_dynamicSelect.json.jbuilder +8 -8
  30. data/app/views/json_ui/garage/test_page/fields_location.json.jbuilder +6 -6
  31. data/app/views/json_ui/garage/test_page/fields_otp.json.jbuilder +8 -8
  32. data/app/views/json_ui/garage/test_page/fields_phone.json.jbuilder +9 -9
  33. data/app/views/json_ui/garage/test_page/fields_radio.json.jbuilder +4 -4
  34. data/app/views/json_ui/garage/test_page/fields_rating.json.jbuilder +10 -10
  35. data/app/views/json_ui/garage/test_page/fields_richText.json.jbuilder +10 -10
  36. data/app/views/json_ui/garage/test_page/fields_select.json.jbuilder +8 -8
  37. data/app/views/json_ui/garage/test_page/fields_sign.json.jbuilder +8 -56
  38. data/app/views/json_ui/garage/test_page/fields_stripeExternalAccount.json.jbuilder +6 -6
  39. data/app/views/json_ui/garage/test_page/fields_stripeToken.json.jbuilder +6 -6
  40. data/app/views/json_ui/garage/test_page/fields_text.json.jbuilder +5 -5
  41. data/app/views/json_ui/garage/test_page/fields_timer.json.jbuilder +6 -6
  42. data/app/views/json_ui/garage/test_page/flow.json.jbuilder +6 -6
  43. data/app/views/json_ui/garage/test_page/form.json.jbuilder +9 -9
  44. data/app/views/json_ui/garage/test_page/grid.json.jbuilder +4 -4
  45. data/app/views/json_ui/garage/test_page/horizontal.json.jbuilder +5 -5
  46. data/app/views/json_ui/garage/test_page/image.json.jbuilder +9 -9
  47. data/app/views/json_ui/garage/test_page/lifecycle.json.jbuilder +6 -6
  48. data/app/views/json_ui/garage/test_page/list.json.jbuilder +6 -6
  49. data/app/views/json_ui/garage/test_page/multimedia_docx.json.jbuilder +5 -5
  50. data/app/views/json_ui/garage/test_page/multimedia_video.json.jbuilder +6 -6
  51. data/app/views/json_ui/garage/test_page/pagination.json.jbuilder +6 -6
  52. data/app/views/json_ui/garage/test_page/panels_bulkEdit2.json.jbuilder +13 -13
  53. data/app/views/json_ui/garage/test_page/panels_bulkEdit3.json.jbuilder +1 -1
  54. data/app/views/json_ui/garage/test_page/progressCircle.json.jbuilder +8 -8
  55. data/app/views/json_ui/garage/test_page/responsive.json.jbuilder +4 -4
  56. data/app/views/json_ui/garage/test_page/scroll.json.jbuilder +5 -5
  57. data/app/views/json_ui/garage/test_page/split.json.jbuilder +1 -1
  58. data/app/views/json_ui/garage/test_page/table.json.jbuilder +5 -5
  59. data/app/views/json_ui/garage/test_page/timeline.json.jbuilder +5 -5
  60. data/app/views/json_ui/garage/test_page/ul.json.jbuilder +4 -4
  61. data/app/views/json_ui/garage/test_page/vertical.json.jbuilder +5 -5
  62. data/app/views/json_ui/garage/test_page/web.json.jbuilder +5 -5
  63. data/app/views/json_ui/garage/views/_expand_shrink_ex.json.jbuilder +4 -4
  64. data/app/views/json_ui/garage/views/controls.json.jbuilder +4 -4
  65. data/app/views/json_ui/garage/views/{components_set.json.jbuilder → logics_set.json.jbuilder} +2 -2
  66. data/lib/glib/engine.rb +0 -32
  67. data/lib/glib/json_crawler/router.rb +0 -24
  68. data/lib/glib/json_ui/config.rb +1 -1
  69. data/lib/glib/test/changed_files_rubocop.rb +55 -0
  70. data/lib/glib/test_helpers.rb +6 -9
  71. metadata +5 -35
  72. data/app/controllers/concerns/glib/auth/token_authenticatable.rb +0 -37
  73. data/app/controllers/glib/api_controller.rb +0 -52
  74. data/app/jobs/glib/purge_unattached_job.rb +0 -28
  75. data/app/models/concerns/glib/snapshot_v2.rb +0 -462
  76. data/app/models/glib/model.rb +0 -40
  77. data/app/models/glib/plain_model.rb +0 -23
  78. data/app/models/snapshot_blob_reference.rb +0 -20
  79. data/lib/generators/glib/snapshot_v2_generator.rb +0 -54
  80. data/lib/generators/templates/snapshot_v2/add_snapshot_v2_columns.rb +0 -18
  81. data/lib/generators/templates/snapshot_v2/create_snapshot_blob_references.rb +0 -10
  82. data/lib/glib/test/full_suite_rubocop.rb +0 -87
  83. data/lib/glib/test/rubocop_guards.rb +0 -42
@@ -57,7 +57,7 @@ page.body(
57
57
  onClick: ->(action) do
58
58
  action.runMultiple(
59
59
  childActions: ->(multiple) do
60
- multiple.components_set targetId: 'rating_main', data: { halfIncrements: nil, value: 4, color: 'primary', size: 24, readOnly: nil }
60
+ multiple.logics_set targetId: 'rating_main', data: { halfIncrements: nil, value: 4, color: 'primary', size: 24, readOnly: nil }
61
61
  multiple.logics_set targetId: 'rating_variant_status', data: { text: 'Variant: full increments (primary)' }
62
62
  end
63
63
  )
@@ -69,7 +69,7 @@ page.body(
69
69
  onClick: ->(action) do
70
70
  action.runMultiple(
71
71
  childActions: ->(multiple) do
72
- multiple.components_set targetId: 'rating_main', data: { halfIncrements: true, value: 3.5, color: 'secondary', size: 24, readOnly: nil }
72
+ multiple.logics_set targetId: 'rating_main', data: { halfIncrements: true, value: 3.5, color: 'secondary', size: 24, readOnly: nil }
73
73
  multiple.logics_set targetId: 'rating_variant_status', data: { text: 'Variant: half increments (secondary)' }
74
74
  end
75
75
  )
@@ -81,7 +81,7 @@ page.body(
81
81
  onClick: ->(action) do
82
82
  action.runMultiple(
83
83
  childActions: ->(multiple) do
84
- multiple.components_set targetId: 'rating_main', data: { size: 40, value: 4.5, halfIncrements: true, color: 'ternary', readOnly: nil }
84
+ multiple.logics_set targetId: 'rating_main', data: { size: 40, value: 4.5, halfIncrements: true, color: 'ternary', readOnly: nil }
85
85
  multiple.logics_set targetId: 'rating_variant_status', data: { text: 'Variant: large size (ternary)' }
86
86
  end
87
87
  )
@@ -93,7 +93,7 @@ page.body(
93
93
  onClick: ->(action) do
94
94
  action.runMultiple(
95
95
  childActions: ->(multiple) do
96
- multiple.components_set targetId: 'rating_main', data: { readOnly: true, value: 5 }
96
+ multiple.logics_set targetId: 'rating_main', data: { readOnly: true, value: 5 }
97
97
  multiple.logics_set targetId: 'rating_variant_status', data: { text: 'Variant: read-only' }
98
98
  end
99
99
  )
@@ -119,7 +119,7 @@ page.body(
119
119
  onClick: ->(action) do
120
120
  action.runMultiple(
121
121
  childActions: ->(multiple) do
122
- multiple.components_set targetId: 'rating_main', data: { value: 2, readOnly: nil }
122
+ multiple.logics_set targetId: 'rating_main', data: { value: 2, readOnly: nil }
123
123
  multiple.logics_set targetId: 'rating_status', data: { text: 'Status: set to 2' }
124
124
  end
125
125
  )
@@ -131,7 +131,7 @@ page.body(
131
131
  onClick: ->(action) do
132
132
  action.runMultiple(
133
133
  childActions: ->(multiple) do
134
- multiple.components_set targetId: 'rating_main', data: { value: 4.5, halfIncrements: true, readOnly: nil }
134
+ multiple.logics_set targetId: 'rating_main', data: { value: 4.5, halfIncrements: true, readOnly: nil }
135
135
  multiple.logics_set targetId: 'rating_status', data: { text: 'Status: set to 4.5' }
136
136
  end
137
137
  )
@@ -143,7 +143,7 @@ page.body(
143
143
  onClick: ->(action) do
144
144
  action.runMultiple(
145
145
  childActions: ->(multiple) do
146
- multiple.components_set targetId: 'rating_main', data: { value: '', readOnly: '' }
146
+ multiple.logics_set targetId: 'rating_main', data: { value: '', readOnly: '' }
147
147
  multiple.logics_set targetId: 'rating_status', data: { text: 'Status: cleared' }
148
148
  end
149
149
  )
@@ -165,21 +165,21 @@ page.body(
165
165
  flow.button(
166
166
  text: 'Disable rating',
167
167
  onClick: ->(action) do
168
- action.components_set targetId: 'rating_main', data: { disabled: true }
168
+ action.logics_set targetId: 'rating_main', data: { disabled: true }
169
169
  end
170
170
  )
171
171
  flow.spacer width: 8
172
172
  flow.button(
173
173
  text: 'Enable rating',
174
174
  onClick: ->(action) do
175
- action.components_set targetId: 'rating_main', data: { disabled: nil }
175
+ action.logics_set targetId: 'rating_main', data: { disabled: nil }
176
176
  end
177
177
  )
178
178
  flow.spacer width: 8
179
179
  flow.button(
180
180
  text: 'Small size',
181
181
  onClick: ->(action) do
182
- action.components_set targetId: 'rating_main', data: { size: 18 }
182
+ action.logics_set targetId: 'rating_main', data: { size: 18 }
183
183
  end
184
184
  )
185
185
  end
@@ -84,7 +84,7 @@ Try @mentioning a teammate here.
84
84
  onClick: ->(action) do
85
85
  action.runMultiple(
86
86
  childActions: ->(multiple) do
87
- multiple.components_set targetId: 'rich_text_main', data: { produce: 'markdown', accept: 'markdown' }
87
+ multiple.logics_set targetId: 'rich_text_main', data: { produce: 'markdown', accept: 'markdown' }
88
88
  multiple.logics_set targetId: 'rich_text_variant_status', data: { text: 'Variant: markdown output' }
89
89
  end
90
90
  )
@@ -96,7 +96,7 @@ Try @mentioning a teammate here.
96
96
  onClick: ->(action) do
97
97
  action.runMultiple(
98
98
  childActions: ->(multiple) do
99
- multiple.components_set targetId: 'rich_text_main', data: { produce: 'html', accept: 'html' }
99
+ multiple.logics_set targetId: 'rich_text_main', data: { produce: 'html', accept: 'html' }
100
100
  multiple.logics_set targetId: 'rich_text_variant_status', data: { text: 'Variant: HTML output' }
101
101
  end
102
102
  )
@@ -108,7 +108,7 @@ Try @mentioning a teammate here.
108
108
  onClick: ->(action) do
109
109
  action.runMultiple(
110
110
  childActions: ->(multiple) do
111
- multiple.components_set targetId: 'rich_text_main', data: { imageUploader: nil }
111
+ multiple.logics_set targetId: 'rich_text_main', data: { imageUploader: nil }
112
112
  multiple.logics_set targetId: 'rich_text_variant_status', data: { text: 'Variant: uploader removed' }
113
113
  end
114
114
  )
@@ -120,7 +120,7 @@ Try @mentioning a teammate here.
120
120
  onClick: ->(action) do
121
121
  action.runMultiple(
122
122
  childActions: ->(multiple) do
123
- multiple.components_set targetId: 'rich_text_main', data: { imageUploader: image_uploader }
123
+ multiple.logics_set targetId: 'rich_text_main', data: { imageUploader: image_uploader }
124
124
  multiple.logics_set targetId: 'rich_text_variant_status', data: { text: 'Variant: uploader restored' }
125
125
  end
126
126
  )
@@ -146,7 +146,7 @@ Try @mentioning a teammate here.
146
146
  # onClick: ->(action) do
147
147
  # action.runMultiple(
148
148
  # childActions: ->(multiple) do
149
- # multiple.components_set targetId: 'rich_text_main', data: { value: "# Quick update\n\n- Item one\n- Item two\n\nThanks!" }
149
+ # multiple.logics_set targetId: 'rich_text_main', data: { value: "# Quick update\n\n- Item one\n- Item two\n\nThanks!" }
150
150
  # multiple.logics_set targetId: 'rich_text_status', data: { text: 'Status: template inserted' }
151
151
  # end
152
152
  # )
@@ -158,7 +158,7 @@ Try @mentioning a teammate here.
158
158
  # # onClick: ->(action) do
159
159
  # # action.runMultiple(
160
160
  # # childActions: ->(multiple) do
161
- # # multiple.components_set targetId: 'rich_text_main', data: { value: '' }
161
+ # # multiple.logics_set targetId: 'rich_text_main', data: { value: '' }
162
162
  # # multiple.logics_set targetId: 'rich_text_status', data: { text: 'Status: cleared' }
163
163
  # # end
164
164
  # # )
@@ -180,28 +180,28 @@ Try @mentioning a teammate here.
180
180
  flow.button(
181
181
  text: 'Disable editor',
182
182
  onClick: ->(action) do
183
- action.components_set targetId: 'rich_text_main', data: { disabled: true }
183
+ action.logics_set targetId: 'rich_text_main', data: { disabled: true }
184
184
  end
185
185
  )
186
186
  flow.spacer width: 8
187
187
  flow.button(
188
188
  text: 'Enable editor',
189
189
  onClick: ->(action) do
190
- action.components_set targetId: 'rich_text_main', data: { disabled: nil }
190
+ action.logics_set targetId: 'rich_text_main', data: { disabled: nil }
191
191
  end
192
192
  )
193
193
  flow.spacer width: 8
194
194
  flow.button(
195
195
  text: 'Toggle debug',
196
196
  onClick: ->(action) do
197
- action.components_set targetId: 'rich_text_main', data: { debug: false }
197
+ action.logics_set targetId: 'rich_text_main', data: { debug: false }
198
198
  end
199
199
  )
200
200
  flow.spacer width: 8
201
201
  flow.button(
202
202
  text: 'Enable debug',
203
203
  onClick: ->(action) do
204
- action.components_set targetId: 'rich_text_main', data: { debug: true }
204
+ action.logics_set targetId: 'rich_text_main', data: { debug: true }
205
205
  end
206
206
  )
207
207
  end
@@ -89,7 +89,7 @@ page.body(
89
89
  flow.button(
90
90
  text: 'Use icon options',
91
91
  onClick: ->(action) do
92
- action.components_set(
92
+ action.logics_set(
93
93
  targetId: 'select_media',
94
94
  data: { options: icon_options, value: 'option1', multiple: nil, useChips: nil }
95
95
  )
@@ -99,7 +99,7 @@ page.body(
99
99
  flow.button(
100
100
  text: 'Use image options',
101
101
  onClick: ->(action) do
102
- action.components_set(
102
+ action.logics_set(
103
103
  targetId: 'select_media',
104
104
  data: { options: image_options, value: 'option2', multiple: nil, useChips: nil }
105
105
  )
@@ -109,7 +109,7 @@ page.body(
109
109
  flow.button(
110
110
  text: 'Text only',
111
111
  onClick: ->(action) do
112
- action.components_set(
112
+ action.logics_set(
113
113
  targetId: 'select_media',
114
114
  data: { options: base_options, value: 'option3', multiple: nil, useChips: nil }
115
115
  )
@@ -119,7 +119,7 @@ page.body(
119
119
  flow.button(
120
120
  text: 'Multiple + chips',
121
121
  onClick: ->(action) do
122
- action.components_set(
122
+ action.logics_set(
123
123
  targetId: 'select_media',
124
124
  data: { options: icon_options, value: %w[option1 option3], multiple: true, useChips: true, maxChipLines: 1, width: 250 }
125
125
  )
@@ -141,28 +141,28 @@ page.body(
141
141
  flow.button(
142
142
  text: 'Disable select',
143
143
  onClick: ->(action) do
144
- action.components_set targetId: 'select_media', data: { disabled: true }
144
+ action.logics_set targetId: 'select_media', data: { disabled: true }
145
145
  end
146
146
  )
147
147
  flow.spacer width: 8
148
148
  flow.button(
149
149
  text: 'Enable select',
150
150
  onClick: ->(action) do
151
- action.components_set targetId: 'select_media', data: { disabled: nil }
151
+ action.logics_set targetId: 'select_media', data: { disabled: nil }
152
152
  end
153
153
  )
154
154
  flow.spacer width: 8
155
155
  flow.button(
156
156
  text: 'Empty options',
157
157
  onClick: ->(action) do
158
- action.components_set targetId: 'select_media', data: { options: [], value: nil }
158
+ action.logics_set targetId: 'select_media', data: { options: [], value: nil }
159
159
  end
160
160
  )
161
161
  flow.spacer width: 8
162
162
  flow.button(
163
163
  text: 'Restore defaults',
164
164
  onClick: ->(action) do
165
- action.components_set(
165
+ action.logics_set(
166
166
  targetId: 'select_media',
167
167
  data: { options: icon_options, value: 'option1', disabled: nil, multiple: nil, useChips: nil }
168
168
  )
@@ -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