glib-web 0.11.16 → 0.12.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65e03cb325fe0731639826551be244fb295bb235ab6827e4060a1d5a4456dc40
4
- data.tar.gz: 4497dcb065e19ef1582364b808ea8e7e2c326bb627dbaa2b42f2e338034364c1
3
+ metadata.gz: a20bf4bf81faef33de6e6e2a1ba4d57035702ddcca2afcec4933178e13455d50
4
+ data.tar.gz: a5cd8f36138a6ee1fe6b45dbbaec2e0eb2cfbf355a42758b9e3397beb94ef28e
5
5
  SHA512:
6
- metadata.gz: ca511e3f5e906017cfbcc40ac66549d1643bb1adad4b9214dbc005d0843bab733379e155d1c74674c89efa2f286097e90e063ec2b413bafe39e238cf3fc43a1c
7
- data.tar.gz: 42396920cf99da0d9581537694c4aacc1c1e14137ec42beac92201bb47ebcb80c0b4c7dc653be62be421eea3982d4bac8b3e7768ad2569a67a32d5755aa599f3
6
+ metadata.gz: 99cb99a9f2a32824a1989e39794a25cd92a2fef306c1c5a3616d80f40bb192baf318da83074c43a4a8702a5976edf6d60c36e78b96c4144a0a4ed7e182d20290
7
+ data.tar.gz: 1f3c0eefee0d47f0ab7444fb5508e56fd6405fe47794f4bc1fefba27dc6908491d001a0932688a6473f4693b9aedb8c99333c3189a18bda3b1e1d109d2326eff
@@ -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
@@ -9,13 +9,11 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
9
9
 
10
10
  scroll.button text: 'Button', onClick: ->(action) do
11
11
  action.dialogs_alert message: 'Perform action'
12
- end, tour: { index: 0, key: 'quiz1', title: 'Tutorial Step 1', message: 'This is step 1 of the tutorial' }
13
- scroll.spacer height: 20
12
+ end
14
13
 
15
14
  scroll.button text: 'Buton with build-in classes', styleClasses: ['rounded', 'outlined', 'tile', 'depressed'], onClick: ->(action) do
16
15
  action.dialogs_alert message: 'Perform action'
17
- end, tour: { index: 1, key: 'quiz1', title: 'Tutorial Step 2', message: 'This is step 2 of the tutorial' }
18
- scroll.spacer height: 20
16
+ end
19
17
 
20
18
  scroll.button icon: 'info', text: 'Button with Icon and Tooltip', tooltip: { text: 'Tooltip text' }, onClick: ->(action) do
21
19
  action.dialogs_alert message: 'Perform action'
@@ -25,7 +23,7 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
25
23
  scroll.button \
26
24
  icon: 'info',
27
25
  styleClass: 'icon',
28
- tooltip: { text: 'Disabled Icon button with tooltip text and custom tooltip position', position: 'right'},
26
+ tooltip: { text: 'Disabled Icon button with tooltip text and custom tooltip position', position: 'right' },
29
27
  disabled: true
30
28
  scroll.spacer height: 20
31
29
 
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.16
4
+ version: 0.12.1
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