glib-web 0.9.0 → 0.10.1
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/view_builder/fields.rb +1 -0
- data/app/helpers/glib/json_ui/view_builder/panels.rb +1 -0
- data/app/views/json_ui/garage/forms/disable_dirty_prompt.json.jbuilder +4 -2
- data/app/views/json_ui/garage/forms/timers.json.jbuilder +11 -0
- data/app/views/json_ui/garage/lists/_autoload_section.json.jbuilder +5 -1
- data/app/views/json_ui/garage/lists/autoload_as_needed_on_top_scroll.json.jbuilder +1 -1
- data/app/views/json_ui/garage/panels/grid.json.jbuilder +1 -0
- data/app/views/json_ui/garage/panels/horizontal.json.jbuilder +12 -10
- data/app/views/json_ui/garage/panels/index.json.jbuilder +5 -6
- data/app/views/json_ui/garage/panels/responsive.json.jbuilder +22 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93e60051e19b27eb2db0c8549ec9a5d2e8dc5dd03d7782d83c826d9c6c9e31e7
|
4
|
+
data.tar.gz: 2be6e2fb00f66d11184d8b85f605ee7feee7741b869f190bddc6033e07b6ac7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8cbfaf0ab710058e1cead2451126aa5ce6a72cd8d9a281f0cc055b21c545040916df6357de8d8d8fbfd0dcf5c3aa4acb4bf3a082e8bfe4d6ac82bff18db92d6
|
7
|
+
data.tar.gz: efb8048473299b95ab0c53e432c2401edf546d6e0cb325ebed8ac19ea55f918a8c613599eccb65dd33225ab515b2805eebbbbfda83a8878d7605bc638564640c
|
@@ -1,5 +1,5 @@
|
|
1
1
|
json.title 'Forms'
|
2
|
-
json.disableDirtyPrompt true
|
2
|
+
# json.disableDirtyPrompt true
|
3
3
|
|
4
4
|
data = params[:user] || {}
|
5
5
|
|
@@ -17,7 +17,9 @@ page.form \
|
|
17
17
|
form.spacer height: 14
|
18
18
|
form.h3 text: "Hello #{ data[:name] }"
|
19
19
|
form.spacer height: 4
|
20
|
-
form.fields_text name: 'user[
|
20
|
+
form.fields_text name: 'user[dirty_check_enabled]', width: 'matchParent', label: 'Dirty check enabled'
|
21
|
+
form.spacer height: 14
|
22
|
+
form.fields_text name: 'user[dirty_check_disabled]', width: 'matchParent', label: 'Dirty check disabled', disableDirtyCheck: true
|
21
23
|
|
22
24
|
form.panels_split width: 'matchParent', content: ->(split) do
|
23
25
|
split.right childViews: ->(right) do
|
@@ -19,6 +19,16 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
|
|
19
19
|
value: 60,
|
20
20
|
min: 30
|
21
21
|
|
22
|
+
form.spacer height: 20
|
23
|
+
form.h4 text: 'Days'
|
24
|
+
form.spacer height: 6
|
25
|
+
form.fields_timer name: 'user[days_timer1]', value: 1.days.from_now, styleClasses: ['days']
|
26
|
+
|
27
|
+
form.spacer height: 6
|
28
|
+
form.fields_timer name: 'user[days_timer2]', value: 10.seconds.from_now, styleClasses: ['days']
|
29
|
+
form.spacer height: 6
|
30
|
+
form.p text: '🏁 Finished!', showIf: { "<=": [{ "var": "user[days_timer2]" }, '0'] }
|
31
|
+
|
22
32
|
form.spacer height: 20
|
23
33
|
form.h2 text: 'Stop Watch (Forward)'
|
24
34
|
form.spacer height: 6
|
@@ -38,6 +48,7 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
|
|
38
48
|
filterKey: first_user.id
|
39
49
|
}
|
40
50
|
|
51
|
+
|
41
52
|
form.fields_timer \
|
42
53
|
width: 120,
|
43
54
|
actionCable: online_participant1_config,
|
@@ -4,7 +4,11 @@ sleep 1
|
|
4
4
|
section = page.list_section_builder
|
5
5
|
section.rows builder: ->(row) do
|
6
6
|
batch_count = 30
|
7
|
-
batch_count
|
7
|
+
array = (0..(batch_count - 1)).to_a
|
8
|
+
if local_assigns[:reverse]
|
9
|
+
array = array.reverse
|
10
|
+
end
|
11
|
+
array.each do |i|
|
8
12
|
index = page_index * batch_count + i
|
9
13
|
if local_assigns[:reorder]
|
10
14
|
row.thumbnail title: "Item #{index}", onReorder: ->(action) do
|
@@ -29,7 +29,7 @@ else
|
|
29
29
|
render "#{@path_prefix}/nav_menu", json: json, page: page
|
30
30
|
|
31
31
|
page.list prevPage: next_page, firstSection: ->(section) do
|
32
|
-
render 'json_ui/garage/lists/autoload_section', page: page, page_index: page_index
|
32
|
+
render 'json_ui/garage/lists/autoload_section', page: page, page_index: page_index, reverse: true
|
33
33
|
end, onScrollToBottom: ->(action) do
|
34
34
|
action.snackbars_alert message: 'Scrolled to Bottom'
|
35
35
|
end, onScrollToTop: ->(action) do
|
@@ -15,6 +15,7 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
15
15
|
box.label text: 'Box', width: 'matchParent', backgroundColor: '#ddd'
|
16
16
|
box.label text: 'Box', width: 'matchParent', backgroundColor: '#ddd'
|
17
17
|
end
|
18
|
+
|
18
19
|
scroll.spacer height: 16
|
19
20
|
scroll.h2 text: 'Responsive grid box with image'
|
20
21
|
scroll.spacer height: 8
|
@@ -11,7 +11,7 @@ json_ui_page json do |page|
|
|
11
11
|
panel.button text: '3'
|
12
12
|
end
|
13
13
|
|
14
|
-
scroll.
|
14
|
+
scroll.spacer height: 20
|
15
15
|
scroll.h1 text: 'Equal filling'
|
16
16
|
scroll.panels_horizontal backgroundColor: '#b3bac2', width: 300, distribution: 'fillEqually', childViews: ->(panel) do
|
17
17
|
panel.button text: '1'
|
@@ -19,7 +19,7 @@ json_ui_page json do |page|
|
|
19
19
|
panel.button text: '3', height: 70
|
20
20
|
end
|
21
21
|
|
22
|
-
scroll.
|
22
|
+
scroll.spacer height: 20
|
23
23
|
scroll.h1 text: 'Equal spacing'
|
24
24
|
scroll.panels_horizontal backgroundColor: '#b3bac2', width: 300, distribution: 'spaceEqually', childViews: ->(panel) do
|
25
25
|
panel.button text: '1'
|
@@ -27,7 +27,7 @@ json_ui_page json do |page|
|
|
27
27
|
panel.button text: '3'
|
28
28
|
end
|
29
29
|
|
30
|
-
scroll.
|
30
|
+
scroll.spacer height: 20
|
31
31
|
scroll.h1 text: 'Overlaps (negative spacing)'
|
32
32
|
scroll.markdown text: 'Uses Material Design spacings: https://vuetifyjs.com/en/styles/spacing/#how-it-works'
|
33
33
|
scroll.panels_horizontal width: 'matchParent', distribution: 'overlap-1', childViews: ->(panel) do
|
@@ -56,7 +56,7 @@ json_ui_page json do |page|
|
|
56
56
|
panel.button text: '3'
|
57
57
|
end
|
58
58
|
|
59
|
-
scroll.
|
59
|
+
scroll.spacer height: 20
|
60
60
|
scroll.h1 text: 'Vertical panel combo'
|
61
61
|
scroll.panels_horizontal distribution: 'spaceEqually', childViews: ->(panel) do
|
62
62
|
panel.button text: '1'
|
@@ -67,7 +67,7 @@ json_ui_page json do |page|
|
|
67
67
|
panel.button text: '3'
|
68
68
|
end
|
69
69
|
|
70
|
-
scroll.
|
70
|
+
scroll.spacer height: 20
|
71
71
|
scroll.h1 text: 'Vertical panel combo (equal filling)'
|
72
72
|
scroll.panels_horizontal width: 'matchParent', distribution: 'fillEqually', childViews: ->(panel) do
|
73
73
|
panel.button text: '1'
|
@@ -78,7 +78,7 @@ json_ui_page json do |page|
|
|
78
78
|
panel.button text: '3'
|
79
79
|
end
|
80
80
|
|
81
|
-
scroll.
|
81
|
+
scroll.spacer height: 20
|
82
82
|
scroll.h1 text: 'Vertical panel combo (equal spacing)'
|
83
83
|
scroll.panels_horizontal width: 'matchParent', distribution: 'spaceEqually', childViews: ->(panel) do
|
84
84
|
panel.button text: '1'
|
@@ -89,7 +89,7 @@ json_ui_page json do |page|
|
|
89
89
|
panel.button text: '3'
|
90
90
|
end
|
91
91
|
|
92
|
-
scroll.
|
92
|
+
scroll.spacer height: 20
|
93
93
|
scroll.h1 text: 'Spacers'
|
94
94
|
scroll.panels_horizontal width: 'matchParent', childViews: ->(panel) do
|
95
95
|
panel.button text: '1'
|
@@ -99,7 +99,7 @@ json_ui_page json do |page|
|
|
99
99
|
panel.button text: '3'
|
100
100
|
end
|
101
101
|
|
102
|
-
scroll.
|
102
|
+
scroll.spacer height: 20
|
103
103
|
scroll.h1 text: 'Alignments'
|
104
104
|
scroll.panels_horizontal align: 'top', childViews: ->(panel) do
|
105
105
|
panel.button height: 50, text: 'Button'
|
@@ -117,12 +117,14 @@ json_ui_page json do |page|
|
|
117
117
|
panel.label text: 'bottom'
|
118
118
|
end
|
119
119
|
|
120
|
-
scroll.
|
121
|
-
scroll.h1 text: 'Label combo'
|
120
|
+
scroll.spacer height: 20
|
121
|
+
scroll.h1 text: 'Label combo (with onClick)'
|
122
122
|
scroll.panels_horizontal childViews: ->(panel) do
|
123
123
|
panel.label backgroundColor: '#b3bac2', text: 'Label 1'
|
124
124
|
panel.label text: 'Label 2'
|
125
125
|
panel.label backgroundColor: '#b3bac2', text: 'Label 3'
|
126
|
+
end, onClick: ->(action) do
|
127
|
+
action.windows_open url: json_ui_garage_url(path: 'home/blank')
|
126
128
|
end
|
127
129
|
|
128
130
|
scroll.label text: "\n"
|
@@ -30,11 +30,6 @@ json_ui_page json do |page|
|
|
30
30
|
template.thumbnail title: 'Unordered List', subtitle: 'Bullet points similar to HTML\'s <ul> tag', onClick: ->(action) do
|
31
31
|
action.windows_open url: json_ui_garage_url(path: 'panels/ul')
|
32
32
|
end
|
33
|
-
template.thumbnail title: 'Grid', subtitle: 'Arrage child component in grid like', onClick: ->(action) do
|
34
|
-
action.windows_open url: json_ui_garage_url(path: 'panels/grid')
|
35
|
-
end
|
36
|
-
|
37
|
-
|
38
33
|
end
|
39
34
|
end, ->(section) do
|
40
35
|
section.header padding: glib_json_padding_list, childViews: ->(header) do
|
@@ -123,10 +118,14 @@ json_ui_page json do |page|
|
|
123
118
|
end
|
124
119
|
end, ->(section) do
|
125
120
|
section.header padding: glib_json_padding_list, childViews: ->(header) do
|
126
|
-
header.h2 text: '
|
121
|
+
header.h2 text: 'Experimental'
|
127
122
|
end
|
128
123
|
|
129
124
|
section.rows builder: ->(template) do
|
125
|
+
template.thumbnail title: 'Grid', subtitle: 'Arrage child component in grid like', onClick: ->(action) do
|
126
|
+
action.windows_open url: json_ui_garage_url(path: 'panels/grid')
|
127
|
+
end
|
128
|
+
|
130
129
|
template.thumbnail title: 'Dynamic Group', onClick: ->(action) do
|
131
130
|
# TODO
|
132
131
|
end
|
@@ -93,6 +93,28 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
93
93
|
action.windows_open url: json_ui_garage_url(path: 'home/blank')
|
94
94
|
end
|
95
95
|
|
96
|
+
scroll.spacer height: 16
|
97
|
+
scroll.h2 text: 'With grid-like functionality'
|
98
|
+
scroll.spacer height: 8
|
99
|
+
scroll.panels_responsive \
|
100
|
+
width: 'matchParent',
|
101
|
+
padding: { top: 0, right: 10, bottom: 0, left: 10 },
|
102
|
+
childViews: ->(responsive) do
|
103
|
+
small_image_url = 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSGQpSWjtELISLBlmugOZ6wzl1JamYXQvbFeYywpfg3E8b8DrO0Kg&s'
|
104
|
+
|
105
|
+
6.times do |_cell_index|
|
106
|
+
responsive.panels_column \
|
107
|
+
padding: { top: 5, right: 5, bottom: 5, left: 5 },
|
108
|
+
xl: { cols: 3 },
|
109
|
+
lg: { cols: 4 },
|
110
|
+
md: { cols: 6 },
|
111
|
+
backgroundColor: '#c3cad2',
|
112
|
+
childViews: ->(column) do
|
113
|
+
column.image width: 'matchParent', url: small_image_url
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
96
118
|
scroll.spacer height: 20
|
97
119
|
|
98
120
|
end
|