glib-web 6.12.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/helpers/glib/json_ui/action_builder/bottom_banners.rb +0 -1
- data/app/helpers/glib/json_ui/action_builder/components.rb +1 -16
- data/app/helpers/glib/json_ui/action_builder/logics.rb +1 -2
- data/app/helpers/glib/json_ui/action_builder/snackbars.rb +0 -16
- data/app/helpers/glib/json_ui/response_helper.rb +0 -12
- data/app/views/json_ui/garage/actions/_components.json.jbuilder +2 -2
- data/app/views/json_ui/garage/forms/bulk_edit_post.json.jbuilder +1 -1
- data/app/views/json_ui/garage/forms/checkboxes.json.jbuilder +3 -3
- data/app/views/json_ui/garage/forms/selects.json.jbuilder +5 -5
- data/app/views/json_ui/garage/forms/update_options.json.jbuilder +1 -1
- data/app/views/json_ui/garage/panels/flow.json.jbuilder +6 -6
- data/app/views/json_ui/garage/panels/horizontal.json.jbuilder +10 -10
- data/app/views/json_ui/garage/panels/responsive.json.jbuilder +10 -10
- data/app/views/json_ui/garage/panels/ul.json.jbuilder +2 -2
- data/app/views/json_ui/garage/panels/vertical.json.jbuilder +10 -10
- data/app/views/json_ui/garage/tables/bulk_edit.json.jbuilder +8 -8
- data/app/views/json_ui/garage/test_page/calendar.json.jbuilder +6 -6
- data/app/views/json_ui/garage/test_page/carousel.json.jbuilder +4 -4
- data/app/views/json_ui/garage/test_page/charts.json.jbuilder +4 -4
- data/app/views/json_ui/garage/test_page/column.json.jbuilder +3 -3
- data/app/views/json_ui/garage/test_page/components.json.jbuilder +7 -7
- data/app/views/json_ui/garage/test_page/custom.json.jbuilder +3 -3
- data/app/views/json_ui/garage/test_page/fields_creditCard.json.jbuilder +6 -6
- data/app/views/json_ui/garage/test_page/fields_date_time.json.jbuilder +8 -8
- data/app/views/json_ui/garage/test_page/fields_dynamicSelect.json.jbuilder +8 -8
- data/app/views/json_ui/garage/test_page/fields_location.json.jbuilder +6 -6
- data/app/views/json_ui/garage/test_page/fields_otp.json.jbuilder +8 -8
- data/app/views/json_ui/garage/test_page/fields_phone.json.jbuilder +9 -9
- data/app/views/json_ui/garage/test_page/fields_radio.json.jbuilder +4 -4
- data/app/views/json_ui/garage/test_page/fields_rating.json.jbuilder +10 -10
- data/app/views/json_ui/garage/test_page/fields_richText.json.jbuilder +10 -10
- data/app/views/json_ui/garage/test_page/fields_select.json.jbuilder +8 -8
- data/app/views/json_ui/garage/test_page/fields_sign.json.jbuilder +7 -7
- data/app/views/json_ui/garage/test_page/fields_stripeExternalAccount.json.jbuilder +6 -6
- data/app/views/json_ui/garage/test_page/fields_stripeToken.json.jbuilder +6 -6
- data/app/views/json_ui/garage/test_page/fields_text.json.jbuilder +5 -5
- data/app/views/json_ui/garage/test_page/fields_timer.json.jbuilder +6 -6
- data/app/views/json_ui/garage/test_page/flow.json.jbuilder +6 -6
- data/app/views/json_ui/garage/test_page/form.json.jbuilder +9 -9
- data/app/views/json_ui/garage/test_page/grid.json.jbuilder +4 -4
- data/app/views/json_ui/garage/test_page/horizontal.json.jbuilder +5 -5
- data/app/views/json_ui/garage/test_page/image.json.jbuilder +9 -9
- data/app/views/json_ui/garage/test_page/lifecycle.json.jbuilder +6 -6
- data/app/views/json_ui/garage/test_page/list.json.jbuilder +6 -6
- data/app/views/json_ui/garage/test_page/multimedia_docx.json.jbuilder +5 -5
- data/app/views/json_ui/garage/test_page/multimedia_video.json.jbuilder +6 -6
- data/app/views/json_ui/garage/test_page/pagination.json.jbuilder +6 -6
- data/app/views/json_ui/garage/test_page/panels_bulkEdit3.json.jbuilder +1 -1
- data/app/views/json_ui/garage/test_page/progressCircle.json.jbuilder +8 -8
- data/app/views/json_ui/garage/test_page/responsive.json.jbuilder +4 -4
- data/app/views/json_ui/garage/test_page/scroll.json.jbuilder +5 -5
- data/app/views/json_ui/garage/test_page/split.json.jbuilder +1 -1
- data/app/views/json_ui/garage/test_page/table.json.jbuilder +5 -5
- data/app/views/json_ui/garage/test_page/timeline.json.jbuilder +5 -5
- data/app/views/json_ui/garage/test_page/ul.json.jbuilder +4 -4
- data/app/views/json_ui/garage/test_page/vertical.json.jbuilder +5 -5
- data/app/views/json_ui/garage/test_page/web.json.jbuilder +5 -5
- data/app/views/json_ui/garage/views/_expand_shrink_ex.json.jbuilder +4 -4
- data/app/views/json_ui/garage/views/controls.json.jbuilder +4 -4
- data/app/views/json_ui/garage/views/{components_set.json.jbuilder → logics_set.json.jbuilder} +2 -2
- data/lib/glib/json_crawler/router.rb +0 -24
- data/lib/glib/json_ui/config.rb +1 -1
- metadata +4 -9
|
@@ -42,7 +42,7 @@ page.body(
|
|
|
42
42
|
flow.button(
|
|
43
43
|
text: 'Sample',
|
|
44
44
|
onClick: ->(action) do
|
|
45
|
-
action.
|
|
45
|
+
action.logics_set(
|
|
46
46
|
targetId: 'multimedia_docx_main',
|
|
47
47
|
data: { url: sample_url }
|
|
48
48
|
)
|
|
@@ -52,7 +52,7 @@ page.body(
|
|
|
52
52
|
flow.button(
|
|
53
53
|
text: 'Reload same',
|
|
54
54
|
onClick: ->(action) do
|
|
55
|
-
action.
|
|
55
|
+
action.logics_set(
|
|
56
56
|
targetId: 'multimedia_docx_main',
|
|
57
57
|
data: { url: alt_url }
|
|
58
58
|
)
|
|
@@ -71,7 +71,7 @@ page.body(
|
|
|
71
71
|
flow.button(
|
|
72
72
|
text: 'No URL',
|
|
73
73
|
onClick: ->(action) do
|
|
74
|
-
action.
|
|
74
|
+
action.logics_set(
|
|
75
75
|
targetId: 'multimedia_docx_main',
|
|
76
76
|
data: { url: nil }
|
|
77
77
|
)
|
|
@@ -81,7 +81,7 @@ page.body(
|
|
|
81
81
|
flow.button(
|
|
82
82
|
text: 'Broken URL',
|
|
83
83
|
onClick: ->(action) do
|
|
84
|
-
action.
|
|
84
|
+
action.logics_set(
|
|
85
85
|
targetId: 'multimedia_docx_main',
|
|
86
86
|
data: { url: missing_url }
|
|
87
87
|
)
|
|
@@ -91,7 +91,7 @@ page.body(
|
|
|
91
91
|
flow.button(
|
|
92
92
|
text: 'Custom messages',
|
|
93
93
|
onClick: ->(action) do
|
|
94
|
-
action.
|
|
94
|
+
action.logics_set(
|
|
95
95
|
targetId: 'multimedia_docx_main',
|
|
96
96
|
data: {
|
|
97
97
|
url: missing_url,
|
|
@@ -36,7 +36,7 @@ page.body(
|
|
|
36
36
|
flow.button(
|
|
37
37
|
text: 'Default size',
|
|
38
38
|
onClick: ->(action) do
|
|
39
|
-
action.
|
|
39
|
+
action.logics_set(
|
|
40
40
|
targetId: 'multimedia_video_main',
|
|
41
41
|
data: {
|
|
42
42
|
width: 560,
|
|
@@ -50,7 +50,7 @@ page.body(
|
|
|
50
50
|
flow.button(
|
|
51
51
|
text: 'Short URL',
|
|
52
52
|
onClick: ->(action) do
|
|
53
|
-
action.
|
|
53
|
+
action.logics_set(
|
|
54
54
|
targetId: 'multimedia_video_main',
|
|
55
55
|
data: { url: 'https://youtu.be/ATnpEOo3GJA' }
|
|
56
56
|
)
|
|
@@ -60,7 +60,7 @@ page.body(
|
|
|
60
60
|
flow.button(
|
|
61
61
|
text: 'Match parent',
|
|
62
62
|
onClick: ->(action) do
|
|
63
|
-
action.
|
|
63
|
+
action.logics_set(
|
|
64
64
|
targetId: 'multimedia_video_main',
|
|
65
65
|
data: { width: 'matchParent', height: 240 }
|
|
66
66
|
)
|
|
@@ -70,7 +70,7 @@ page.body(
|
|
|
70
70
|
flow.button(
|
|
71
71
|
text: 'Compact',
|
|
72
72
|
onClick: ->(action) do
|
|
73
|
-
action.
|
|
73
|
+
action.logics_set(
|
|
74
74
|
targetId: 'multimedia_video_main',
|
|
75
75
|
data: { width: 360, height: 200 }
|
|
76
76
|
)
|
|
@@ -96,7 +96,7 @@ page.body(
|
|
|
96
96
|
flow.button(
|
|
97
97
|
text: 'Wide 16:9',
|
|
98
98
|
onClick: ->(action) do
|
|
99
|
-
action.
|
|
99
|
+
action.logics_set(
|
|
100
100
|
targetId: 'multimedia_video_main',
|
|
101
101
|
data: { width: 640, height: 360 }
|
|
102
102
|
)
|
|
@@ -106,7 +106,7 @@ page.body(
|
|
|
106
106
|
flow.button(
|
|
107
107
|
text: 'Tall',
|
|
108
108
|
onClick: ->(action) do
|
|
109
|
-
action.
|
|
109
|
+
action.logics_set(
|
|
110
110
|
targetId: 'multimedia_video_main',
|
|
111
111
|
data: { width: 360, height: 480 }
|
|
112
112
|
)
|
|
@@ -16,7 +16,7 @@ page.body childViews: ->(body) do
|
|
|
16
16
|
res.h2 text: 'Basic'
|
|
17
17
|
res.spacer height: 8
|
|
18
18
|
res.panels_pagination id: 'pagination_main', length: 10, value: 1, onChange: ->(action) do
|
|
19
|
-
action.
|
|
19
|
+
action.logics_set targetId: 'pagination_status', data: { text: 'Page changed' }
|
|
20
20
|
end
|
|
21
21
|
res.label id: 'pagination_status', text: 'Page status: idle'
|
|
22
22
|
|
|
@@ -27,19 +27,19 @@ page.body childViews: ->(body) do
|
|
|
27
27
|
res.spacer height: 8
|
|
28
28
|
res.panels_flow innerPadding: { bottom: 0 }, childViews: ->(flow) do
|
|
29
29
|
flow.button text: 'Page 1', onClick: ->(action) do
|
|
30
|
-
action.
|
|
30
|
+
action.logics_set targetId: 'pagination_main', data: { value: 1 }
|
|
31
31
|
end
|
|
32
32
|
flow.spacer width: 4
|
|
33
33
|
flow.button text: 'Page 5', onClick: ->(action) do
|
|
34
|
-
action.
|
|
34
|
+
action.logics_set targetId: 'pagination_main', data: { value: 5 }
|
|
35
35
|
end
|
|
36
36
|
flow.spacer width: 4
|
|
37
37
|
flow.button text: 'Show 3', onClick: ->(action) do
|
|
38
|
-
action.
|
|
38
|
+
action.logics_set targetId: 'pagination_main', data: { totalVisible: 3 }
|
|
39
39
|
end
|
|
40
40
|
flow.spacer width: 4
|
|
41
41
|
flow.button text: 'Show 7', onClick: ->(action) do
|
|
42
|
-
action.
|
|
42
|
+
action.logics_set targetId: 'pagination_main', data: { totalVisible: 7 }
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
45
|
|
|
@@ -51,7 +51,7 @@ page.body childViews: ->(body) do
|
|
|
51
51
|
res.label id: 'pagination_action_status', text: 'Change status: idle'
|
|
52
52
|
res.spacer height: 6
|
|
53
53
|
res.panels_pagination length: 4, value: 1, onChange: ->(action) do
|
|
54
|
-
action.
|
|
54
|
+
action.logics_set targetId: 'pagination_action_status', data: { text: 'Change status: changed' }
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
res.spacer height: 12
|
|
@@ -236,7 +236,7 @@ page.body(
|
|
|
236
236
|
action.runMultiple(
|
|
237
237
|
fieldName: 'data',
|
|
238
238
|
childActions: ->(multiple) do
|
|
239
|
-
multiple.
|
|
239
|
+
multiple.logics_set targetId: 'bulk_edit3_skipped_counter', data: { displayed: true }
|
|
240
240
|
multiple.logics_set(
|
|
241
241
|
targetId: 'bulk_edit3_skipped_count',
|
|
242
242
|
paramName: 'variables',
|
|
@@ -39,7 +39,7 @@ page.body(
|
|
|
39
39
|
flow.button(
|
|
40
40
|
text: '35% default',
|
|
41
41
|
onClick: ->(action) do
|
|
42
|
-
action.
|
|
42
|
+
action.logics_set(
|
|
43
43
|
targetId: 'progress_circle_main',
|
|
44
44
|
data: { value: 35, size: 160, width: 16, color: '#4B56D2', half: nil, text: nil }
|
|
45
45
|
)
|
|
@@ -49,21 +49,21 @@ page.body(
|
|
|
49
49
|
flow.button(
|
|
50
50
|
text: '65%',
|
|
51
51
|
onClick: ->(action) do
|
|
52
|
-
action.
|
|
52
|
+
action.logics_set targetId: 'progress_circle_main', data: { value: 65 }
|
|
53
53
|
end
|
|
54
54
|
)
|
|
55
55
|
flow.spacer width: 6
|
|
56
56
|
flow.button(
|
|
57
57
|
text: 'Thick stroke',
|
|
58
58
|
onClick: ->(action) do
|
|
59
|
-
action.
|
|
59
|
+
action.logics_set targetId: 'progress_circle_main', data: { width: 28 }
|
|
60
60
|
end
|
|
61
61
|
)
|
|
62
62
|
flow.spacer width: 6
|
|
63
63
|
flow.button(
|
|
64
64
|
text: 'Small size',
|
|
65
65
|
onClick: ->(action) do
|
|
66
|
-
action.
|
|
66
|
+
action.logics_set targetId: 'progress_circle_main', data: { size: 110 }
|
|
67
67
|
end
|
|
68
68
|
)
|
|
69
69
|
end
|
|
@@ -82,7 +82,7 @@ page.body(
|
|
|
82
82
|
flow.button(
|
|
83
83
|
text: 'Half circle + label',
|
|
84
84
|
onClick: ->(action) do
|
|
85
|
-
action.
|
|
85
|
+
action.logics_set(
|
|
86
86
|
targetId: 'progress_circle_main',
|
|
87
87
|
data: { value: 80, half: true, text: 'Section A', color: '#9E0A0A', width: 22 }
|
|
88
88
|
)
|
|
@@ -92,7 +92,7 @@ page.body(
|
|
|
92
92
|
flow.button(
|
|
93
93
|
text: 'Accent color',
|
|
94
94
|
onClick: ->(action) do
|
|
95
|
-
action.
|
|
95
|
+
action.logics_set targetId: 'progress_circle_main', data: { color: '#F9C80E', half: nil, text: nil }
|
|
96
96
|
end
|
|
97
97
|
)
|
|
98
98
|
end
|
|
@@ -111,14 +111,14 @@ page.body(
|
|
|
111
111
|
flow.button(
|
|
112
112
|
text: '0%',
|
|
113
113
|
onClick: ->(action) do
|
|
114
|
-
action.
|
|
114
|
+
action.logics_set targetId: 'progress_circle_main', data: { value: '0', half: nil, text: nil }
|
|
115
115
|
end
|
|
116
116
|
)
|
|
117
117
|
flow.spacer width: 6
|
|
118
118
|
flow.button(
|
|
119
119
|
text: '100%',
|
|
120
120
|
onClick: ->(action) do
|
|
121
|
-
action.
|
|
121
|
+
action.logics_set targetId: 'progress_circle_main', data: { value: 100, half: nil, text: nil }
|
|
122
122
|
end
|
|
123
123
|
)
|
|
124
124
|
end
|
|
@@ -32,21 +32,21 @@ page.body(
|
|
|
32
32
|
flow.button(
|
|
33
33
|
text: 'Align left',
|
|
34
34
|
onClick: ->(action) do
|
|
35
|
-
action.
|
|
35
|
+
action.logics_set targetId: 'responsive_main', data: { align: 'left' }
|
|
36
36
|
end
|
|
37
37
|
)
|
|
38
38
|
flow.spacer width: 4
|
|
39
39
|
flow.button(
|
|
40
40
|
text: 'Align center',
|
|
41
41
|
onClick: ->(action) do
|
|
42
|
-
action.
|
|
42
|
+
action.logics_set targetId: 'responsive_main', data: { align: 'center' }
|
|
43
43
|
end
|
|
44
44
|
)
|
|
45
45
|
flow.spacer width: 4
|
|
46
46
|
flow.button(
|
|
47
47
|
text: 'Align right',
|
|
48
48
|
onClick: ->(action) do
|
|
49
|
-
action.
|
|
49
|
+
action.logics_set targetId: 'responsive_main', data: { align: 'right' }
|
|
50
50
|
end
|
|
51
51
|
)
|
|
52
52
|
end
|
|
@@ -59,7 +59,7 @@ page.body(
|
|
|
59
59
|
res.spacer height: 6
|
|
60
60
|
res.panels_responsive(
|
|
61
61
|
onClick: ->(action) do
|
|
62
|
-
action.
|
|
62
|
+
action.logics_set targetId: 'responsive_action_status', data: { text: 'Click status: clicked' }
|
|
63
63
|
end,
|
|
64
64
|
styleClasses: ['card'],
|
|
65
65
|
padding: { all: 12 },
|
|
@@ -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: 'Short', onClick: ->(action) do
|
|
31
|
-
action.
|
|
31
|
+
action.logics_set targetId: 'scroll_main', data: { height: 120 }
|
|
32
32
|
end
|
|
33
33
|
flow.spacer width: 4
|
|
34
34
|
flow.button text: 'Tall', onClick: ->(action) do
|
|
35
|
-
action.
|
|
35
|
+
action.logics_set targetId: 'scroll_main', data: { height: 240 }
|
|
36
36
|
end
|
|
37
37
|
flow.spacer width: 4
|
|
38
38
|
flow.button text: 'Add padding', onClick: ->(action) do
|
|
39
|
-
action.
|
|
39
|
+
action.logics_set targetId: 'scroll_main', data: { padding: { all: 12 } }
|
|
40
40
|
end
|
|
41
41
|
flow.spacer width: 4
|
|
42
42
|
flow.button text: 'Clear padding', onClick: ->(action) do
|
|
43
|
-
action.
|
|
43
|
+
action.logics_set targetId: 'scroll_main', data: { padding: nil }
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
46
|
|
|
@@ -52,7 +52,7 @@ page.body childViews: ->(body) do
|
|
|
52
52
|
res.label id: 'scroll_status', text: 'Scroll status: idle'
|
|
53
53
|
res.spacer height: 6
|
|
54
54
|
res.panels_scroll height: 120, onLoad: ->(action) do
|
|
55
|
-
action.
|
|
55
|
+
action.logics_set targetId: 'scroll_status', data: { text: 'Scroll status: loaded' }
|
|
56
56
|
end, childViews: ->(scroll) do
|
|
57
57
|
(1..8).each do |index|
|
|
58
58
|
scroll.label text: "Load item #{index}"
|
|
@@ -50,7 +50,7 @@ page.body(
|
|
|
50
50
|
left.button(
|
|
51
51
|
text: 'Update status',
|
|
52
52
|
onClick: ->(action) do
|
|
53
|
-
action.
|
|
53
|
+
action.logics_set targetId: 'split_action_status', data: { text: 'Action status: clicked' }
|
|
54
54
|
end
|
|
55
55
|
)
|
|
56
56
|
end
|
|
@@ -53,21 +53,21 @@ page.body(
|
|
|
53
53
|
flow.button(
|
|
54
54
|
text: 'Compact style',
|
|
55
55
|
onClick: ->(action) do
|
|
56
|
-
action.
|
|
56
|
+
action.logics_set targetId: 'table_main', data: { styleClass: 'table--compact' }
|
|
57
57
|
end
|
|
58
58
|
)
|
|
59
59
|
flow.spacer width: 4
|
|
60
60
|
flow.button(
|
|
61
61
|
text: 'Striped style',
|
|
62
62
|
onClick: ->(action) do
|
|
63
|
-
action.
|
|
63
|
+
action.logics_set targetId: 'table_main', data: { styleClass: 'table--striped' }
|
|
64
64
|
end
|
|
65
65
|
)
|
|
66
66
|
flow.spacer width: 4
|
|
67
67
|
flow.button(
|
|
68
68
|
text: 'Clear style',
|
|
69
69
|
onClick: ->(action) do
|
|
70
|
-
action.
|
|
70
|
+
action.logics_set targetId: 'table_main', data: { styleClass: nil }
|
|
71
71
|
end
|
|
72
72
|
)
|
|
73
73
|
end
|
|
@@ -85,10 +85,10 @@ page.body(
|
|
|
85
85
|
scroll.panels_table(
|
|
86
86
|
height: 'matchParent',
|
|
87
87
|
onScrollToTop: ->(action) do
|
|
88
|
-
action.
|
|
88
|
+
action.logics_set targetId: 'table_event_status', data: { text: 'Scroll events: top reached' }
|
|
89
89
|
end,
|
|
90
90
|
onScrollToBottom: ->(action) do
|
|
91
|
-
action.
|
|
91
|
+
action.logics_set targetId: 'table_event_status', data: { text: 'Scroll events: bottom reached' }
|
|
92
92
|
end,
|
|
93
93
|
sections: [
|
|
94
94
|
->(section) do
|
|
@@ -44,25 +44,25 @@ page.body(
|
|
|
44
44
|
flow.button(
|
|
45
45
|
text: 'Vertical',
|
|
46
46
|
onClick: ->(action) do
|
|
47
|
-
action.
|
|
47
|
+
action.logics_set targetId: 'timeline_main', data: { direction: 'vertical', side: 'start', truncateLine: nil }
|
|
48
48
|
end
|
|
49
49
|
)
|
|
50
50
|
flow.spacer width: 4
|
|
51
51
|
flow.button(
|
|
52
52
|
text: 'Horizontal',
|
|
53
53
|
onClick: ->(action) do
|
|
54
|
-
action.
|
|
54
|
+
action.logics_set targetId: 'timeline_main', data: { direction: 'horizontal', side: 'end', truncateLine: nil }
|
|
55
55
|
end
|
|
56
56
|
)
|
|
57
57
|
flow.spacer width: 4
|
|
58
58
|
# flow.button text: 'Outlined dots', onClick: ->(action) do
|
|
59
|
-
# action.
|
|
59
|
+
# action.logics_set targetId: 'timeline_main', data: { events: outline_events }
|
|
60
60
|
# end
|
|
61
61
|
# flow.spacer width: 4
|
|
62
62
|
flow.button(
|
|
63
63
|
text: 'Truncate both',
|
|
64
64
|
onClick: ->(action) do
|
|
65
|
-
action.
|
|
65
|
+
action.logics_set targetId: 'timeline_main', data: { truncateLine: 'both' }
|
|
66
66
|
end
|
|
67
67
|
)
|
|
68
68
|
end
|
|
@@ -80,7 +80,7 @@ page.body(
|
|
|
80
80
|
timeline.label(
|
|
81
81
|
text: step,
|
|
82
82
|
onClick: ->(action) do
|
|
83
|
-
action.
|
|
83
|
+
action.logics_set targetId: 'timeline_action_status', data: { text: "Clicked: #{step}" }
|
|
84
84
|
end
|
|
85
85
|
)
|
|
86
86
|
end
|
|
@@ -28,11 +28,11 @@ 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: 'Card style', onClick: ->(action) do
|
|
31
|
-
action.
|
|
31
|
+
action.logics_set targetId: 'ul_main', data: { styleClasses: ['card'], padding: { all: 10 } }
|
|
32
32
|
end
|
|
33
33
|
flow.spacer width: 4
|
|
34
34
|
flow.button text: 'Clear style', onClick: ->(action) do
|
|
35
|
-
action.
|
|
35
|
+
action.logics_set targetId: 'ul_main', data: { styleClasses: nil, padding: nil }
|
|
36
36
|
end
|
|
37
37
|
end
|
|
38
38
|
|
|
@@ -44,9 +44,9 @@ page.body childViews: ->(body) do
|
|
|
44
44
|
res.label id: 'ul_action_status', text: 'Hover status: idle'
|
|
45
45
|
res.spacer height: 6
|
|
46
46
|
res.panels_ul onMouseEnter: ->(action) do
|
|
47
|
-
action.
|
|
47
|
+
action.logics_set targetId: 'ul_action_status', data: { text: 'Hover status: entered' }
|
|
48
48
|
end, onMouseLeave: ->(action) do
|
|
49
|
-
action.
|
|
49
|
+
action.logics_set targetId: 'ul_action_status', data: { text: 'Hover status: left' }
|
|
50
50
|
end, childViews: ->(li) do
|
|
51
51
|
li.label text: 'Hover this list'
|
|
52
52
|
li.label text: 'Second item'
|
|
@@ -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.
|
|
31
|
+
action.logics_set targetId: 'vertical_main', data: { height: 180, distribution: 'fillEqually' }
|
|
32
32
|
end
|
|
33
33
|
flow.spacer width: 4
|
|
34
34
|
flow.button text: 'Space equally', onClick: ->(action) do
|
|
35
|
-
action.
|
|
35
|
+
action.logics_set targetId: 'vertical_main', data: { height: 180, distribution: 'spaceEqually' }
|
|
36
36
|
end
|
|
37
37
|
flow.spacer width: 4
|
|
38
38
|
flow.button text: 'Align center', onClick: ->(action) do
|
|
39
|
-
action.
|
|
39
|
+
action.logics_set targetId: 'vertical_main', data: { align: 'center' }
|
|
40
40
|
end
|
|
41
41
|
flow.spacer width: 4
|
|
42
42
|
flow.button text: 'Align right', onClick: ->(action) do
|
|
43
|
-
action.
|
|
43
|
+
action.logics_set targetId: 'vertical_main', data: { align: 'right' }
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
46
|
|
|
@@ -52,7 +52,7 @@ page.body childViews: ->(body) do
|
|
|
52
52
|
res.label id: 'vertical_action_status', text: 'Click status: idle'
|
|
53
53
|
res.spacer height: 6
|
|
54
54
|
res.panels_vertical width: 160, height: 60, align: 'center', backgroundColor: '#e6e6e6', onClick: ->(action) do
|
|
55
|
-
action.
|
|
55
|
+
action.logics_set targetId: 'vertical_action_status', data: { text: 'Click status: clicked' }
|
|
56
56
|
end, childViews: ->(panel) do
|
|
57
57
|
panel.label text: 'Click panel'
|
|
58
58
|
end
|
|
@@ -27,19 +27,19 @@ page.body childViews: ->(body) do
|
|
|
27
27
|
res.spacer height: 8
|
|
28
28
|
res.panels_flow innerPadding: { bottom: 0 }, childViews: ->(flow) do
|
|
29
29
|
flow.button text: 'PDF', onClick: ->(action) do
|
|
30
|
-
action.
|
|
30
|
+
action.logics_set targetId: 'web_main', data: { url: url_primary }
|
|
31
31
|
end
|
|
32
32
|
flow.spacer width: 4
|
|
33
33
|
flow.button text: 'Example.com', onClick: ->(action) do
|
|
34
|
-
action.
|
|
34
|
+
action.logics_set targetId: 'web_main', data: { url: url_alt }
|
|
35
35
|
end
|
|
36
36
|
flow.spacer width: 4
|
|
37
37
|
flow.button text: 'Short height', onClick: ->(action) do
|
|
38
|
-
action.
|
|
38
|
+
action.logics_set targetId: 'web_main', data: { height: 180 }
|
|
39
39
|
end
|
|
40
40
|
flow.spacer width: 4
|
|
41
41
|
flow.button text: 'Tall height', onClick: ->(action) do
|
|
42
|
-
action.
|
|
42
|
+
action.logics_set targetId: 'web_main', data: { height: 360 }
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
45
|
|
|
@@ -51,7 +51,7 @@ page.body childViews: ->(body) do
|
|
|
51
51
|
res.label id: 'web_action_status', text: 'Load status: idle'
|
|
52
52
|
res.spacer height: 6
|
|
53
53
|
res.panels_web width: 'matchParent', height: 200, url: url_alt, onLoad: ->(action) do
|
|
54
|
-
action.
|
|
54
|
+
action.logics_set targetId: 'web_action_status', data: { text: 'Load status: loaded' }
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
res.spacer height: 12
|
|
@@ -6,8 +6,8 @@ view.panels_responsive width: 'matchParent', childViews: ->(res) do
|
|
|
6
6
|
flow.label text: title
|
|
7
7
|
flow.icon name: 'arrow_drop_down', size: 20, onClick: ->(action) do
|
|
8
8
|
action.runMultiple childActions: ->(saction) do
|
|
9
|
-
saction.
|
|
10
|
-
saction.
|
|
9
|
+
saction.logics_set targetId: "#{id}-expand", data: { displayed: true }
|
|
10
|
+
saction.logics_set targetId: "#{id}-shrink", data: { displayed: false }
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
end
|
|
@@ -18,8 +18,8 @@ view.panels_responsive width: 'matchParent', childViews: ->(res) do
|
|
|
18
18
|
flow.label text: title
|
|
19
19
|
flow.icon name: 'arrow_drop_up', size: 20, onClick: ->(action) do
|
|
20
20
|
action.runMultiple childActions: ->(saction) do
|
|
21
|
-
saction.
|
|
22
|
-
saction.
|
|
21
|
+
saction.logics_set targetId: "#{id}-shrink", data: { displayed: true }
|
|
22
|
+
saction.logics_set targetId: "#{id}-expand", data: { displayed: false }
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
end
|
|
@@ -112,8 +112,8 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
|
112
112
|
id: 'default',
|
|
113
113
|
onMouseEnter: ->(action) {
|
|
114
114
|
action.runMultiple childActions: ->(saction) do
|
|
115
|
-
saction.
|
|
116
|
-
saction.
|
|
115
|
+
saction.logics_set targetId: 'default', data: { displayed: false }
|
|
116
|
+
saction.logics_set targetId: 'hovered', data: { displayed: true }
|
|
117
117
|
end
|
|
118
118
|
}
|
|
119
119
|
scroll.button \
|
|
@@ -122,8 +122,8 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
|
122
122
|
displayed: false,
|
|
123
123
|
onMouseLeave: ->(action) {
|
|
124
124
|
action.runMultiple childActions: ->(saction) do
|
|
125
|
-
saction.
|
|
126
|
-
saction.
|
|
125
|
+
saction.logics_set targetId: 'default', data: { displayed: true }
|
|
126
|
+
saction.logics_set targetId: 'hovered', data: { displayed: false }
|
|
127
127
|
end
|
|
128
128
|
}, onClick: ->(action) do
|
|
129
129
|
action.dialogs_alert message: 'Perform action'
|
data/app/views/json_ui/garage/views/{components_set.json.jbuilder → logics_set.json.jbuilder}
RENAMED
|
@@ -9,7 +9,7 @@ page.body padding: glib_json_padding_body, childViews: ->(body) do
|
|
|
9
9
|
res.label id: 'label', text: 'Hello world!'
|
|
10
10
|
res.spacer height: 8
|
|
11
11
|
res.button text: 'set', onClick: ->(action) do
|
|
12
|
-
action.
|
|
12
|
+
action.logics_set targetId: 'label', data: { text: 'Hello too!' }, onSet: ->(saction) do
|
|
13
13
|
saction.snackbars_alert styleClasses: ['success'], message: 'Changed!'
|
|
14
14
|
end
|
|
15
15
|
end
|
|
@@ -23,7 +23,7 @@ page.body padding: glib_json_padding_body, childViews: ->(body) do
|
|
|
23
23
|
form.spacer height: 8
|
|
24
24
|
form.panels_horizontal childViews: ->(hori) do
|
|
25
25
|
hori.button text: 'set', onClick: ->(action) do
|
|
26
|
-
action.
|
|
26
|
+
action.logics_set targetId: 'ftext', data: { name: 'user[city]', value: 'Taipei', label: 'City', placeholder: 'City' }
|
|
27
27
|
end
|
|
28
28
|
hori.spacer width: 4
|
|
29
29
|
hori.fields_submit text: 'submit'
|
|
@@ -3,7 +3,6 @@ require 'damerau-levenshtein'
|
|
|
3
3
|
module Glib
|
|
4
4
|
module JsonCrawler
|
|
5
5
|
class Router
|
|
6
|
-
attr_reader :read_only_actions # deprecated
|
|
7
6
|
attr_reader :logger, :last_log, :deferred_actions
|
|
8
7
|
attr_reader :http_actions
|
|
9
8
|
attr_accessor :host, :skip_similar_page
|
|
@@ -55,7 +54,6 @@ module Glib
|
|
|
55
54
|
@depth = -1
|
|
56
55
|
@logger = ''
|
|
57
56
|
@visitor = Glib::Json::Traversal::Visitor.new(crawler_test: true)
|
|
58
|
-
@read_only_actions = Set.new
|
|
59
57
|
@http_actions = Set.new
|
|
60
58
|
# default rails's development host
|
|
61
59
|
@host ||= 'localhost:3000'
|
|
@@ -94,7 +92,6 @@ module Glib
|
|
|
94
92
|
end
|
|
95
93
|
end
|
|
96
94
|
|
|
97
|
-
# @read_only_actions.replace(@read_only_actions.sort_by { |e| e[1].to_s })
|
|
98
95
|
end
|
|
99
96
|
|
|
100
97
|
def process_action(http, spec)
|
|
@@ -116,14 +113,12 @@ module Glib
|
|
|
116
113
|
# of the word, not a separator), so the normalized name missed this
|
|
117
114
|
# branch and the crawl logged the entry without ever executing it.
|
|
118
115
|
when 'initiate/navigation'
|
|
119
|
-
# @read_only_actions.add([action, params['url']])
|
|
120
116
|
http_actions.add([action, params['url']])
|
|
121
117
|
JsonCrawler::NavInitiate.new(http, params, action)
|
|
122
118
|
when 'runMultiple'
|
|
123
119
|
JsonCrawler::RunMultiple.new(http, params, action)
|
|
124
120
|
when 'windows/open', 'dialogs/open', 'windows/reload', 'windows/openWeb'
|
|
125
121
|
if allowed?(params['url'])
|
|
126
|
-
# @read_only_actions.add([action, params['url']])
|
|
127
122
|
http_actions.add([action, params['url']])
|
|
128
123
|
JsonCrawler::WindowsOpen.new(http, params, action)
|
|
129
124
|
else
|
|
@@ -168,7 +163,6 @@ module Glib
|
|
|
168
163
|
].include?(
|
|
169
164
|
action
|
|
170
165
|
)
|
|
171
|
-
# @read_only_actions.add([action, params['url']])
|
|
172
166
|
http_actions.add([action, params['url']])
|
|
173
167
|
end
|
|
174
168
|
self.log action, params['url']
|
|
@@ -181,24 +175,6 @@ module Glib
|
|
|
181
175
|
@visitor.forms.last
|
|
182
176
|
end
|
|
183
177
|
|
|
184
|
-
# deprecated
|
|
185
|
-
# def follow(http, target_routers)
|
|
186
|
-
# if !target_routers.is_a?(Array)
|
|
187
|
-
# target_routers = [target_routers]
|
|
188
|
-
# end
|
|
189
|
-
|
|
190
|
-
# target_actions = Set.new
|
|
191
|
-
# target_routers.each do |router|
|
|
192
|
-
# target_actions += router.read_only_actions
|
|
193
|
-
# end
|
|
194
|
-
|
|
195
|
-
# @depth += 1
|
|
196
|
-
# target_actions.each do |crawler_action|
|
|
197
|
-
# action, url = crawler_action
|
|
198
|
-
# http.get(url, action, {})
|
|
199
|
-
# end
|
|
200
|
-
# end
|
|
201
|
-
|
|
202
178
|
def follow_v2(http, crawler_actions)
|
|
203
179
|
@depth += 1
|
|
204
180
|
crawler_actions.each do |crawler_action|
|
data/lib/glib/json_ui/config.rb
CHANGED
|
@@ -19,7 +19,7 @@ module Glib
|
|
|
19
19
|
|
|
20
20
|
# The shipped default. Stays '/' until the next major version, when it
|
|
21
21
|
# becomes '_'. Apps opt in early via `Config.name_separator = '_'`.
|
|
22
|
-
DEFAULT_NAME_SEPARATOR = '
|
|
22
|
+
DEFAULT_NAME_SEPARATOR = '_'
|
|
23
23
|
|
|
24
24
|
@@name_separator = DEFAULT_NAME_SEPARATOR
|
|
25
25
|
|