glib-web 0.11.14 → 0.12.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c601a7500143869b7353159bd2e884fe76226ca424a5f5453a3a4b366a041461
4
- data.tar.gz: 32abfcfa586909fd761cb1cd744b665b5df44215f24c28d50a870c0f74fd6725
3
+ metadata.gz: c9e8ad5262dacc2b2f55f185f074bbfe36593c84bd46c4e030159bc47c554574
4
+ data.tar.gz: 5fd52c45a8f244f9607c460901f61c22bd8cc902c7fa7b0f261483df432153a0
5
5
  SHA512:
6
- metadata.gz: 7214acff9c321a08ebed504a4d78874a60609c5d71b4435d997e58987247c2da3c74aef1464da1d5ed9d24c27f2f0491d23f2a35cb1b07284b7606139e7363a1
7
- data.tar.gz: 44cdb69292131f9575731a2a3f7c4c6b3eab7fb390f2e26a82f6768c06ac05485fa996cc437ec7bf4552a701ed585a0fde0f487720c893e6c647e98be45ecad9
6
+ metadata.gz: 19a24fb0ea35460a5b5b83b352540387450048190f9ce656b30a903bc043c63a35ccd14f9614497cadac28783bdcb11e586258c3fc9874c7041e7f4e0210cc27
7
+ data.tar.gz: 0e98e1612ceca151ddfd294c10dbecb8a8858e8b07db331f0bc3907ba0e2ac870e29ecb09eeefea9f09f5c1c9aec9515aae11d863c31242a71566fc272a704d8
@@ -0,0 +1,10 @@
1
+ class Glib::JsonUi::ActionBuilder
2
+ module Tours
3
+
4
+ class Start < Action
5
+ hash :options
6
+ array :steps
7
+ int :startFrom
8
+ end
9
+ end
10
+ end
@@ -34,7 +34,6 @@ module Glib
34
34
  hash :valueIf
35
35
  hash :analytics
36
36
  hash :tooltip
37
- hash :tour
38
37
  array :extensions
39
38
 
40
39
 
@@ -1,5 +1,5 @@
1
1
  section.header padding: glib_json_padding_list, childViews: ->(header) do
2
- header.h3 text: 'Commands'
2
+ header.h3 id: 'commands', text: 'Commands'
3
3
  end
4
4
 
5
5
  section.rows builder: ->(template) do
@@ -1,6 +1,6 @@
1
1
 
2
2
  section.header padding: glib_json_padding_list, childViews: ->(header) do
3
- header.h3 text: 'HTTP'
3
+ header.h3 id: 'http', text: 'HTTP'
4
4
  end
5
5
 
6
6
  section.rows builder: ->(template) do
@@ -0,0 +1,37 @@
1
+ section.header padding: glib_json_padding_list, childViews: ->(header) do
2
+ header.h3 id: 'tours', text: 'Tours'
3
+ end
4
+
5
+ section.rows builder: ->(template) do
6
+ template.thumbnail title: 'tours/start', onClick: ->(action) do
7
+ action.tours_start options: { allowClose: false }, startFrom: 0, steps: [
8
+ {
9
+ element: '#http',
10
+ popover: {
11
+ className: 'popover-class',
12
+ title: 'This is http action',
13
+ description: 'Click highlighted element to continue',
14
+ showButtons: false
15
+ },
16
+ customBehavior: 'clickToNext'
17
+ },
18
+ {
19
+ element: '#commands',
20
+ popover: {
21
+ className: 'popover-class',
22
+ title: 'This is commands action',
23
+ description: 'Click next',
24
+ showButtons: true
25
+ }
26
+ },
27
+ {
28
+ element: '#tours',
29
+ popover: {
30
+ className: 'popover-class',
31
+ title: 'You are here!',
32
+ description: 'Finish'
33
+ }
34
+ }
35
+ ]
36
+ end
37
+ end
@@ -22,5 +22,7 @@ page.list sections: [
22
22
  render "#{@path_prefix}/actions/http", section: section
23
23
  end, ->(section) do
24
24
  render "#{@path_prefix}/actions/commands", section: section
25
+ end, ->(section) do
26
+ render "#{@path_prefix}/actions/tours", section: section
25
27
  end
26
28
  ]
@@ -4,74 +4,93 @@ page = json_ui_page json
4
4
  render "#{@path_prefix}/nav_menu", json: json, page: page
5
5
 
6
6
  page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
7
+ scroll.h1 text: 'Panels Columns'
7
8
  scroll.label text: 'Shrink the browser\'s width to see how the column panels are rearranged. On mobile screens, they are always arranged vertically'
9
+ scroll.spacer height: 8
10
+ scroll.markdown text: 'Read more about column grids: https://vuetifyjs.com/en/components/grids/'
11
+ scroll.spacer height: 16
8
12
 
9
- scroll.spacer height: 20
10
- scroll.h2 text: 'With 12 columns'
11
- scroll.spacer height: 6
12
- scroll.panels_responsive width: 'matchParent', childViews: ->(horizontal) do
13
- horizontal.panels_column lg: { cols: 8 }, backgroundColor: '#c3cad2', childViews: ->(column) do
14
- column.button text: '1'
15
- end
16
- horizontal.panels_column lg: { cols: 4 }, backgroundColor: '#b3bac2', childViews: ->(column) do
17
- column.button text: '2'
13
+ scroll.hr color: '#F5F5F5', width: 'matchParent'
14
+ scroll.spacer height: 32
15
+ scroll.h2 text: 'XS (Small to large mobile views)'
16
+ scroll.spacer height: 16
17
+ scroll.panels_responsive width: 'matchParent', childViews: ->(res) do
18
+ 12.times do |index|
19
+ res.panels_column xs: { cols: 1 }, styleClasses: ['card'], childViews: ->(col) do
20
+ col.p text: "Col #{index + 1}"
21
+ end
18
22
  end
19
23
  end
20
24
 
21
- scroll.spacer height: 20
22
- scroll.h2 text: 'With more than 12 columns'
23
- scroll.spacer height: 6
24
- scroll.panels_responsive width: 'matchParent', childViews: ->(horizontal) do
25
- horizontal.panels_column lg: { cols: 4 }, backgroundColor: '#c3cad2', childViews: ->(column) do
26
- column.button text: '1'
27
- end
28
- horizontal.panels_column lg: { cols: 4 }, backgroundColor: '#b3bac2', childViews: ->(column) do
29
- column.button text: '2'
25
+ scroll.hr color: '#F5F5F5', width: 'matchParent'
26
+ scroll.spacer height: 32
27
+ scroll.h2 text: 'SM (Small to medium tablet views)'
28
+ scroll.spacer height: 16
29
+ scroll.panels_responsive width: 'matchParent', childViews: ->(res) do
30
+ 12.times do |index|
31
+ res.panels_column sm: { cols: 1 }, styleClasses: ['card'], childViews: ->(col) do
32
+ col.p text: "Col #{index + 1}"
33
+ end
30
34
  end
31
- horizontal.panels_column lg: { cols: 4 }, backgroundColor: '#c3cad2', childViews: ->(column) do
32
- column.button text: '3'
35
+ end
36
+
37
+ scroll.spacer height: 32
38
+ scroll.hr color: '#F5F5F5', width: 'matchParent'
39
+ scroll.spacer height: 32
40
+ scroll.h2 text: 'MD (Medium or tablet views)'
41
+ scroll.spacer height: 16
42
+ scroll.panels_responsive width: 'matchParent', childViews: ->(res) do
43
+ 12.times do |index|
44
+ res.panels_column md: { cols: 1 }, styleClasses: ['card'], childViews: ->(col) do
45
+ col.p text: "Col #{index + 1}"
46
+ end
33
47
  end
34
- horizontal.panels_column lg: { cols: 4 }, backgroundColor: '#b3bac2', childViews: ->(column) do
35
- column.button text: '4'
48
+ end
49
+
50
+ scroll.spacer height: 32
51
+ scroll.hr color: '#F5F5F5', width: 'matchParent'
52
+ scroll.spacer height: 32
53
+ scroll.h2 text: 'LG (Large Desktop views)'
54
+ scroll.spacer height: 16
55
+ scroll.panels_responsive width: 'matchParent', childViews: ->(res) do
56
+ 12.times do |index|
57
+ res.panels_column sm: { cols: 1 }, styleClasses: ['card'], childViews: ->(col) do
58
+ col.p text: "Col #{index + 1}"
59
+ end
36
60
  end
37
- horizontal.panels_column lg: { cols: 4 }, backgroundColor: '#c3cad2', childViews: ->(column) do
38
- column.button text: '5'
61
+ end
62
+
63
+
64
+ scroll.spacer height: 32
65
+ scroll.h4 text: 'With more than 12 columns'
66
+ scroll.spacer height: 8
67
+ scroll.panels_responsive width: 'matchParent', childViews: ->(res) do
68
+ 18.times do |index|
69
+ res.panels_column sm: { cols: 1 }, styleClasses: ['card'], childViews: ->(col) do
70
+ col.p text: "Col #{index + 1}"
71
+ end
39
72
  end
40
73
  end
41
74
 
42
- scroll.spacer height: 20
43
- scroll.h2 text: 'With responsive paddings'
44
- scroll.spacer height: 6
45
- scroll.panels_responsive width: 'matchParent', childViews: ->(horizontal) do
46
- horizontal.panels_column lg: { cols: 8, padding: { right: 20 } }, childViews: ->(column) do
75
+ scroll.spacer height: 32
76
+ scroll.h4 text: 'With responsive paddings'
77
+ scroll.spacer height: 8
78
+ scroll.panels_responsive width: 'matchParent', childViews: ->(res) do
79
+ res.panels_column lg: { cols: 8, padding: { right: 20 } }, childViews: ->(column) do
47
80
  column.button width: 'matchParent', text: '1'
48
81
  end
49
- horizontal.panels_column lg: { cols: 4 }, childViews: ->(column) do
82
+ res.panels_column lg: { cols: 4 }, childViews: ->(column) do
50
83
  column.button width: 'matchParent', text: '2'
51
84
  end
52
85
  end
53
86
 
54
- scroll.spacer height: 20
55
- scroll.h2 text: 'With mixed components'
56
- scroll.spacer height: 6
87
+ scroll.spacer height: 32
88
+ scroll.h4 text: 'With mixed components'
89
+ scroll.spacer height: 8
57
90
  scroll.panels_responsive width: 'matchParent', align: 'center', childViews: ->(responsive) do
58
91
  responsive.h4 text: 'Heading'
59
-
60
92
  responsive.label text: 'Label'
61
93
 
62
- # responsive.spacer height: 10
63
- # responsive.image url: glib_json_image_standard_url, width: 100, height: 100
64
-
65
- # responsive.spacer height: 10
66
- # responsive.image url: glib_json_image_standard_url
67
-
68
- # responsive.panels_column lg: { cols: 8, padding: { right: 20 } }, childViews: ->(column) do
69
- # column.button width: 'matchParent', text: '1'
70
- # end
71
- # responsive.panels_column lg: { cols: 4 }, childViews: ->(column) do
72
- # column.button width: 'matchParent', text: '2'
73
- # end
74
-
75
94
  responsive.panels_column lg: { cols: 8 }, backgroundColor: '#c3cad2', childViews: ->(column) do
76
95
  column.button text: '1'
77
96
  end
@@ -83,9 +102,9 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
83
102
  responsive.button text: 'Button'
84
103
  end
85
104
 
86
- scroll.spacer height: 20
87
- scroll.h2 text: 'With onClick'
88
- scroll.spacer height: 6
105
+ scroll.spacer height: 32
106
+ scroll.h4 text: 'With onClick'
107
+ scroll.spacer height: 8
89
108
  scroll.panels_responsive backgroundColor: '#c3cad2', padding: { left: 20, right: 20, top: 10, bottom: 10 }, childViews: ->(responsive) do
90
109
  responsive.h4 text: 'Heading'
91
110
  responsive.label text: 'Label'
@@ -94,7 +113,7 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
94
113
  end
95
114
 
96
115
  scroll.spacer height: 16
97
- scroll.h2 text: 'With grid-like functionality'
116
+ scroll.h4 text: 'With grid-like functionality'
98
117
  scroll.spacer height: 8
99
118
  scroll.panels_responsive \
100
119
  width: 'matchParent',
@@ -115,6 +134,5 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
115
134
  end
116
135
  end
117
136
 
118
- scroll.spacer height: 20
119
-
137
+ scroll.spacer height: 32
120
138
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glib-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.14
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -98,6 +98,7 @@ files:
98
98
  - app/helpers/glib/json_ui/action_builder/panels.rb
99
99
  - app/helpers/glib/json_ui/action_builder/sheets.rb
100
100
  - app/helpers/glib/json_ui/action_builder/snackbars.rb
101
+ - app/helpers/glib/json_ui/action_builder/tours.rb
101
102
  - app/helpers/glib/json_ui/action_builder/windows.rb
102
103
  - app/helpers/glib/json_ui/analytics_helper.rb
103
104
  - app/helpers/glib/json_ui/dynamic_field_builders.rb
@@ -136,6 +137,7 @@ files:
136
137
  - app/views/json_ui/garage/actions/_sheets.json.jbuilder
137
138
  - app/views/json_ui/garage/actions/_snackbars.json.jbuilder
138
139
  - app/views/json_ui/garage/actions/_timeouts.json.jbuilder
140
+ - app/views/json_ui/garage/actions/_tours.json.jbuilder
139
141
  - app/views/json_ui/garage/actions/_windows.json.jbuilder
140
142
  - app/views/json_ui/garage/actions/dialogs_oauth_post.json.jbuilder
141
143
  - app/views/json_ui/garage/actions/index.json.jbuilder