glib-web 6.9.3 → 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 (75) hide show
  1. checksums.yaml +4 -4
  2. data/app/helpers/glib/json_ui/action_builder/bottom_banners.rb +0 -1
  3. data/app/helpers/glib/json_ui/action_builder/components.rb +1 -16
  4. data/app/helpers/glib/json_ui/action_builder/logics.rb +1 -2
  5. data/app/helpers/glib/json_ui/action_builder/snackbars.rb +0 -16
  6. data/app/helpers/glib/json_ui/response_helper.rb +0 -12
  7. data/app/views/json_ui/garage/actions/_components.json.jbuilder +2 -2
  8. data/app/views/json_ui/garage/forms/bulk_edit_post.json.jbuilder +1 -1
  9. data/app/views/json_ui/garage/forms/checkboxes.json.jbuilder +3 -3
  10. data/app/views/json_ui/garage/forms/selects.json.jbuilder +5 -5
  11. data/app/views/json_ui/garage/forms/update_options.json.jbuilder +1 -1
  12. data/app/views/json_ui/garage/panels/flow.json.jbuilder +6 -6
  13. data/app/views/json_ui/garage/panels/horizontal.json.jbuilder +10 -10
  14. data/app/views/json_ui/garage/panels/responsive.json.jbuilder +10 -10
  15. data/app/views/json_ui/garage/panels/ul.json.jbuilder +2 -2
  16. data/app/views/json_ui/garage/panels/vertical.json.jbuilder +10 -10
  17. data/app/views/json_ui/garage/tables/bulk_edit.json.jbuilder +8 -8
  18. data/app/views/json_ui/garage/test_page/calendar.json.jbuilder +6 -6
  19. data/app/views/json_ui/garage/test_page/carousel.json.jbuilder +4 -4
  20. data/app/views/json_ui/garage/test_page/charts.json.jbuilder +4 -4
  21. data/app/views/json_ui/garage/test_page/column.json.jbuilder +3 -3
  22. data/app/views/json_ui/garage/test_page/components.json.jbuilder +7 -7
  23. data/app/views/json_ui/garage/test_page/custom.json.jbuilder +3 -3
  24. data/app/views/json_ui/garage/test_page/dialog.json.jbuilder +0 -21
  25. data/app/views/json_ui/garage/test_page/fields_creditCard.json.jbuilder +6 -6
  26. data/app/views/json_ui/garage/test_page/fields_date_time.json.jbuilder +8 -8
  27. data/app/views/json_ui/garage/test_page/fields_dynamicSelect.json.jbuilder +8 -8
  28. data/app/views/json_ui/garage/test_page/fields_location.json.jbuilder +6 -6
  29. data/app/views/json_ui/garage/test_page/fields_otp.json.jbuilder +8 -8
  30. data/app/views/json_ui/garage/test_page/fields_phone.json.jbuilder +9 -9
  31. data/app/views/json_ui/garage/test_page/fields_radio.json.jbuilder +4 -4
  32. data/app/views/json_ui/garage/test_page/fields_rating.json.jbuilder +10 -10
  33. data/app/views/json_ui/garage/test_page/fields_richText.json.jbuilder +10 -10
  34. data/app/views/json_ui/garage/test_page/fields_select.json.jbuilder +8 -8
  35. data/app/views/json_ui/garage/test_page/fields_sign.json.jbuilder +7 -7
  36. data/app/views/json_ui/garage/test_page/fields_stripeExternalAccount.json.jbuilder +6 -6
  37. data/app/views/json_ui/garage/test_page/fields_stripeToken.json.jbuilder +6 -6
  38. data/app/views/json_ui/garage/test_page/fields_text.json.jbuilder +5 -5
  39. data/app/views/json_ui/garage/test_page/fields_timer.json.jbuilder +6 -6
  40. data/app/views/json_ui/garage/test_page/flow.json.jbuilder +6 -6
  41. data/app/views/json_ui/garage/test_page/form.json.jbuilder +9 -9
  42. data/app/views/json_ui/garage/test_page/grid.json.jbuilder +4 -4
  43. data/app/views/json_ui/garage/test_page/horizontal.json.jbuilder +5 -5
  44. data/app/views/json_ui/garage/test_page/image.json.jbuilder +9 -9
  45. data/app/views/json_ui/garage/test_page/lifecycle.json.jbuilder +6 -6
  46. data/app/views/json_ui/garage/test_page/list.json.jbuilder +6 -6
  47. data/app/views/json_ui/garage/test_page/multimedia_docx.json.jbuilder +5 -5
  48. data/app/views/json_ui/garage/test_page/multimedia_video.json.jbuilder +6 -6
  49. data/app/views/json_ui/garage/test_page/pagination.json.jbuilder +6 -6
  50. data/app/views/json_ui/garage/test_page/panels_bulkEdit2.json.jbuilder +13 -13
  51. data/app/views/json_ui/garage/test_page/panels_bulkEdit3.json.jbuilder +1 -1
  52. data/app/views/json_ui/garage/test_page/progressCircle.json.jbuilder +8 -8
  53. data/app/views/json_ui/garage/test_page/responsive.json.jbuilder +4 -4
  54. data/app/views/json_ui/garage/test_page/scroll.json.jbuilder +5 -5
  55. data/app/views/json_ui/garage/test_page/split.json.jbuilder +1 -1
  56. data/app/views/json_ui/garage/test_page/table.json.jbuilder +5 -5
  57. data/app/views/json_ui/garage/test_page/timeline.json.jbuilder +5 -5
  58. data/app/views/json_ui/garage/test_page/ul.json.jbuilder +4 -4
  59. data/app/views/json_ui/garage/test_page/vertical.json.jbuilder +5 -5
  60. data/app/views/json_ui/garage/test_page/web.json.jbuilder +5 -5
  61. data/app/views/json_ui/garage/views/_expand_shrink_ex.json.jbuilder +4 -4
  62. data/app/views/json_ui/garage/views/controls.json.jbuilder +4 -4
  63. data/app/views/json_ui/garage/views/{components_set.json.jbuilder → logics_set.json.jbuilder} +2 -2
  64. data/lib/glib/engine.rb +0 -32
  65. data/lib/glib/json_crawler/router.rb +0 -24
  66. data/lib/glib/json_ui/config.rb +1 -1
  67. metadata +4 -31
  68. data/app/jobs/glib/purge_unattached_job.rb +0 -28
  69. data/app/models/concerns/glib/snapshot_v2.rb +0 -462
  70. data/app/models/glib/model.rb +0 -40
  71. data/app/models/glib/plain_model.rb +0 -23
  72. data/app/models/snapshot_blob_reference.rb +0 -20
  73. data/lib/generators/glib/snapshot_v2_generator.rb +0 -54
  74. data/lib/generators/templates/snapshot_v2/add_snapshot_v2_columns.rb +0 -18
  75. data/lib/generators/templates/snapshot_v2/create_snapshot_blob_references.rb +0 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be34b6a047f58554b81fa3f72658076bcdefc2e06ec5b9d34f64a48208307ad2
4
- data.tar.gz: b9daa421b06c9d995534d88ff8a7cc11024ca59291f67ceaaae4d96c7d2e7bed
3
+ metadata.gz: 38b655bd80465e224c8ed56c8e63694af4786e89a4028da3915737bf8ac96120
4
+ data.tar.gz: 6baa89e800c1223673fe1d9bbad61694e6a59c46123f42faff344d819e143dbf
5
5
  SHA512:
6
- metadata.gz: 64e8c8220a4e59a60f6909f389dc7a1c2c0ed3e9086eb3ed4c6e8df979cdf2c87e8620dc79b75bb48eab574733a31f2787ad7bb4d281f4890e7d3feb592aab08
7
- data.tar.gz: 8331b3ed70b4c3dd56dab59a9fcfaf9e59ef4fde9a1daf7c61a728598585685c7a0700ef4ebe9200bd9080dcd039d61d99358a4e623b3e739e47649dc83d704d
6
+ metadata.gz: 30a1adca1ba187b2f23ff52f54b41259742e15582abf95404b07b658e6eb4a408e2a236b8ffe7b4b45459e7ad3abfb9f8017e8701887fe5b4f5028d045834d23
7
+ data.tar.gz: c4645773a9b5aea3d3b3ba0aea2e24c609e09b45bc7b4904b76bad3af3dd486ed9b4b1b38dba4b956da4620656127462970a1b73c960c231a21da42685fd6f71
@@ -1,4 +1,3 @@
1
- # deprecated
2
1
  class Glib::JsonUi::ActionBuilder
3
2
  module BottomBanners
4
3
  class Open < Action
@@ -25,7 +25,7 @@ class Glib::JsonUi::ActionBuilder
25
25
  views :childViews
26
26
  end
27
27
 
28
- # Consider deprecating this. See `components_set` example in app/views/json_ui/garage/forms/selects.json.jbuilder
28
+ # Consider deprecating this. See `logics_set` example in app/views/json_ui/garage/forms/selects.json.jbuilder
29
29
  class Replace < Action
30
30
  string :targetId
31
31
  action :onReplace
@@ -37,20 +37,5 @@ class Glib::JsonUi::ActionBuilder
37
37
  end
38
38
  end
39
39
 
40
- # Deprecated: use `logics_set` instead. `logics_set` is a superset of this
41
- # action (same `targetId`/`data`/`onSet`/`skipOnChange`, plus
42
- # `conditionalData`, `targetIds`, `variables` and `cacheData`).
43
- class Set < Action
44
- string :targetId
45
- hash :data
46
- action :onSet
47
- bool :skipOnChange
48
-
49
- def dataBuilder(block)
50
- json.data do
51
- block.call(page.sview_builder)
52
- end
53
- end
54
- end
55
40
  end
56
41
  end
@@ -1,7 +1,6 @@
1
1
  class Glib::JsonUi::ActionBuilder
2
2
  module Logics
3
- # The canonical setter action. Prefer this over the deprecated
4
- # `components_set`: it supports plain static `data` as well as
3
+ # The canonical setter action. It supports plain static `data` as well as
5
4
  # `conditionalData` (JsonLogic), `targetIds`, `variables` and `cacheData`.
6
5
  class Set < Action
7
6
  string :targetId
@@ -7,31 +7,15 @@ class Glib::JsonUi::ActionBuilder
7
7
  int :timeout
8
8
  action :onClose
9
9
 
10
- string :verticalPosition # Deprecated
11
- string :horizontalPosition # Deprecated
12
-
13
10
  string :location
14
11
  singleton_array :styleClass, :styleClasses
15
12
  end
16
13
 
17
- # class Confirm < Action
18
- # string :message
19
- # action :onConfirm
20
- # action :onCancel
21
-
22
- # string :verticalPosition
23
- # string :horizontalPosition
24
- # singleton_array :styleClass, :styleClasses
25
- # end
26
-
27
14
  class Select < Action
28
15
  string :message
29
16
  int :timeout
30
17
  action :onClose
31
18
 
32
- string :verticalPosition # Deprecated
33
- string :horizontalPosition # Deprecated
34
-
35
19
  string :location
36
20
  singleton_array :styleClass, :styleClasses
37
21
 
@@ -10,18 +10,6 @@ module Glib
10
10
  end
11
11
  end
12
12
 
13
- # Deprecated
14
- def json_ui_response_with_view(json)
15
- json.analytics do
16
- json.disabled true
17
- end
18
-
19
- json.onResponse do
20
- response = Glib::JsonUi::PageHelper::Page.new(json, self)
21
- yield response.action_builder
22
- end
23
- end
24
-
25
13
  class Response
26
14
  attr_reader :action_builder
27
15
 
@@ -8,7 +8,7 @@ section.rows builder: ->(template) do
8
8
  action.windows_open url: json_ui_garage_url(path: 'views/components_replace')
9
9
  end
10
10
 
11
- template.thumbnail title: 'components/set', onClick: ->(action) do
12
- action.windows_open url: json_ui_garage_url(path: 'views/components_set')
11
+ template.thumbnail title: 'logics/set', onClick: ->(action) do
12
+ action.windows_open url: json_ui_garage_url(path: 'views/logics_set')
13
13
  end
14
14
  end
@@ -5,7 +5,7 @@ json_ui_response json do |action|
5
5
  status_view_id = "row_status_#{params[:_index]}"
6
6
  # TODO: This doesn't work. It should update the status icon to indicate that the
7
7
  # import is successful.
8
- multiple.components_set \
8
+ multiple.logics_set \
9
9
  targetId: status_view_id,
10
10
  data: {
11
11
  color: 'success',
@@ -109,13 +109,13 @@ page.scroll childViews: ->(scroll) do
109
109
  childViews: ->(group) do
110
110
  group.panels_flow id: 'flow', xs: { gap: { all: 8 } }, backgroundColor: 'grey', width: 'matchParent', childViews: ->(flow) do
111
111
  flow.fields_check checkValue: '1', label: 'Choice 1', onChange: ->(action) do
112
- action.components_set targetId: 'flow', data: { backgroundColor: '#ff0000' }
112
+ action.logics_set targetId: 'flow', data: { backgroundColor: '#ff0000' }
113
113
  end
114
114
  flow.fields_check checkValue: '2', label: 'Choice 2', onChange: ->(action) do
115
- action.components_set targetId: 'flow', data: { backgroundColor: '#00ff00' }
115
+ action.logics_set targetId: 'flow', data: { backgroundColor: '#00ff00' }
116
116
  end
117
117
  flow.fields_check checkValue: '3', label: 'Choice 3', onChange: ->(action) do
118
- action.components_set targetId: 'flow', data: { backgroundColor: '#0000ff' }
118
+ action.logics_set targetId: 'flow', data: { backgroundColor: '#0000ff' }
119
119
  end
120
120
  end
121
121
  end
@@ -38,9 +38,9 @@ page.form(
38
38
  action.components_findClosest(
39
39
  view: 'panels/responsive',
40
40
  onFind: ->(find) do
41
- # This is to demonstrate that `components_set` can be a more flexible version
41
+ # This is to demonstrate that `logics_set` can be a more flexible version
42
42
  # of `components_replace`.
43
- find.components_set(
43
+ find.logics_set(
44
44
  dataBuilder: ->(set) do
45
45
  # Don't update the childViews, just update the footer
46
46
  set.panels_responsive(
@@ -159,7 +159,7 @@ page.form(
159
159
  action.components_findClosest(
160
160
  view: 'fields/select',
161
161
  onFind: ->(subaction) do
162
- subaction.components_set(
162
+ subaction.logics_set(
163
163
  data: { value: 'pt' },
164
164
  onSet: ->(subsubaction) do
165
165
  subsubaction.fields_blur
@@ -194,7 +194,7 @@ page.form(
194
194
  text: 'Reset',
195
195
  styleClass: 'text-primary',
196
196
  onClick: ->(action) do
197
- action.components_set targetId: 'lang', data: { value: [] }
197
+ action.logics_set targetId: 'lang', data: { value: [] }
198
198
  end
199
199
  )
200
200
  hori.spacer width: 16
@@ -276,7 +276,7 @@ page.form(
276
276
  form.button(
277
277
  text: 'Swap spec options',
278
278
  onClick: ->(action) do
279
- action.components_set targetId: 'spec_options_select', data: { 'spec.options' => spec_options_alt }
279
+ action.logics_set targetId: 'spec_options_select', data: { 'spec.options' => spec_options_alt }
280
280
  end
281
281
  )
282
282
  form.button text: 'Submit', onClick: ->(action) { action.forms_submit }
@@ -7,7 +7,7 @@ options = {
7
7
  }[value]
8
8
 
9
9
  json_ui_response json do |action|
10
- action.components_set targetId: 'options', data: {
10
+ action.logics_set targetId: 'options', data: {
11
11
  options: options
12
12
  }
13
13
  end
@@ -17,10 +17,10 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
17
17
  panel.button text: '3'
18
18
  end
19
19
  scroll.button text: 'show', onClick: ->(action) do
20
- action.components_set targetId: 'flow1', data: { displayed: true }
20
+ action.logics_set targetId: 'flow1', data: { displayed: true }
21
21
  end
22
22
  scroll.button text: 'hide', onClick: ->(action) do
23
- action.components_set targetId: 'flow1', data: { displayed: false }
23
+ action.logics_set targetId: 'flow1', data: { displayed: false }
24
24
  end
25
25
 
26
26
  scroll.h1 text: 'Basic'
@@ -86,8 +86,8 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
86
86
  backgroundColor: '#b3bac2',
87
87
  onMouseEnter: ->(action) {
88
88
  action.runMultiple childActions: ->(saction) do
89
- saction.components_set targetId: 'default1', data: { displayed: false }
90
- saction.components_set targetId: 'hovered1', data: { displayed: true }
89
+ saction.logics_set targetId: 'default1', data: { displayed: false }
90
+ saction.logics_set targetId: 'hovered1', data: { displayed: true }
91
91
  end
92
92
  }, childViews: ->(panel) do
93
93
  panel.label text: 'Hover me'
@@ -99,8 +99,8 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
99
99
  backgroundColor: '#b3bac2',
100
100
  onMouseLeave: ->(action) {
101
101
  action.runMultiple childActions: ->(saction) do
102
- saction.components_set targetId: 'default1', data: { displayed: true }
103
- saction.components_set targetId: 'hovered1', data: { displayed: false }
102
+ saction.logics_set targetId: 'default1', data: { displayed: true }
103
+ saction.logics_set targetId: 'hovered1', data: { displayed: false }
104
104
  end
105
105
  }, childViews: ->(panel) do
106
106
  panel.label text: 'Hover active'
@@ -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.components_set targetId: 'hor1', data: { displayed: true }
12
+ action.logics_set targetId: 'hor1', data: { displayed: true }
13
13
  end
14
14
  scroll.button text: 'hide', onClick: ->(action) do
15
- action.components_set targetId: 'hor1', data: { displayed: false }
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.components_set targetId: 'default1', data: { displayed: false }
174
- saction.components_set targetId: 'hovered1', data: { displayed: true }
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.components_set targetId: 'default1', data: { displayed: true }
187
- saction.components_set targetId: 'hovered1', data: { displayed: false }
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.components_set targetId: 'default2', data: { displayed: false }
202
- saction.components_set targetId: 'hovered2', data: { displayed: true }
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.components_set targetId: 'default2', data: { displayed: true }
215
- saction.components_set targetId: 'hovered2', data: { displayed: false }
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.components_set targetId: 'res1', data: { displayed: true }
13
+ action.logics_set targetId: 'res1', data: { displayed: true }
14
14
  end
15
15
  scroll.button text: 'hide', onClick: ->(action) do
16
- action.components_set targetId: 'res1', data: { displayed: false }
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.components_set targetId: 'default1', data: { displayed: false }
171
- saction.components_set targetId: 'hovered1', data: { displayed: true }
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.components_set targetId: 'default1', data: { displayed: true }
184
- saction.components_set targetId: 'hovered1', data: { displayed: false }
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.components_set targetId: 'default2', data: { displayed: false }
200
- saction.components_set targetId: 'hovered2', data: { displayed: true }
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.components_set targetId: 'default2', data: { displayed: true }
213
- saction.components_set targetId: 'hovered2', data: { displayed: false }
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.components_set targetId: 'ul', data: { displayed: true }
14
+ action.logics_set targetId: 'ul', data: { displayed: true }
15
15
  end
16
16
  scroll.button text: 'hide', onClick: ->(action) do
17
- action.components_set targetId: 'ul', data: { displayed: false }
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.components_set targetId: 'vert1', data: { displayed: true }
13
+ action.logics_set targetId: 'vert1', data: { displayed: true }
14
14
  end
15
15
  scroll.button text: 'hide', onClick: ->(action) do
16
- action.components_set targetId: 'vert1', data: { displayed: false }
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.components_set targetId: 'default1', data: { displayed: false }
75
- saction.components_set targetId: 'hovered1', data: { displayed: true }
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.components_set targetId: 'default1', data: { displayed: true }
83
- saction.components_set targetId: 'hovered1', data: { displayed: false }
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.components_set targetId: 'default2', data: { displayed: false }
94
- saction.components_set targetId: 'hovered2', data: { displayed: true }
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.components_set targetId: 'default2', data: { displayed: true }
102
- saction.components_set targetId: 'hovered2', data: { displayed: false }
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'
@@ -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.components_set targetId: 'submit_top', data: { disabled: true }
76
- multiple.components_set targetId: 'submit_bottom', data: { disabled: true }
77
- multiple.components_set targetId: 'cancel_button', data: { displayed: true }
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.components_set targetId: 'submit_top', data: { disabled: false }
83
- multiple.components_set targetId: 'submit_bottom', data: { disabled: false }
84
- multiple.components_set targetId: 'cancel_button', data: { displayed: false }
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.components_set targetId: 'submit_top', data: { displayed: true }
98
- multiple.components_set targetId: 'submit_bottom', data: { displayed: true }
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
@@ -36,7 +36,7 @@ page.body(
36
36
  flow.button(
37
37
  text: 'Default size',
38
38
  onClick: ->(action) do
39
- action.components_set(
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.components_set targetId: 'calendar_main', data: { height: 320 }
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.components_set targetId: 'calendar_main', data: { height: 560 }
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.components_set targetId: 'calendar_main', data: { width: 720 }
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.components_set(
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.components_set(
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.components_set targetId: 'carousel_main', data: { distribution: 'fillEqually' }
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.components_set targetId: 'carousel_main', data: { distribution: 'spaceEqually' }
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.components_set targetId: 'carousel_main', data: { distribution: nil }
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.components_set targetId: 'carousel_action_status', data: { text: "Action status: #{label}" }
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.components_set(
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.components_set(
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.components_set(
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.components_set(
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.components_set targetId: 'column_main', data: { padding: { all: 12 } }
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.components_set targetId: 'column_main', data: { padding: nil }
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.components_set targetId: 'column_action_status', data: { text: 'Click status: clicked' }
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 components/set to mutate an existing view or components/replace to swap it entirely.'
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: 'components/set text',
29
+ text: 'logics/set text',
30
30
  onClick: ->(action) do
31
- action.components_set targetId: 'components_basic', data: { text: 'Label text: updated' }
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.components_set targetId: 'components_basic', data: { displayed: false }
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.components_set targetId: 'components_basic', data: { displayed: true }
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: 'components/set (with onSet)',
70
+ text: 'logics/set (with onSet)',
71
71
  onClick: ->(action) do
72
- action.components_set(
72
+ action.logics_set(
73
73
  targetId: 'components_basic',
74
74
  data: { text: 'Label text: updated again' },
75
75
  onSet: ->(subaction) do