glib-web 0.10.3 → 0.10.6

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: b24a999dc06556dbf2cfe1969675746a31642903ba8f4e95e1ce2606556b38e1
4
- data.tar.gz: 6ad9e3ac2da39cf5894697ff884152ac4fdb103201c70e36715f23efdc2c6c2b
3
+ metadata.gz: e989354f12f872a087c5445de7659d77e56cdee74003e91a10ac1c315cbda14c
4
+ data.tar.gz: bee7f747d8503615e79bcc9835aeb64a933487ba07c0ae56d2b4e051345382ff
5
5
  SHA512:
6
- metadata.gz: 357113c196d36950b895864615443ab18745f3cab7328644eb4f6db2b4611a5a9249006d9b0b00c74a06671dda3e3e26003b5e315e8ddcf871c96ac99b171320
7
- data.tar.gz: a66073991cea977ca5467cda7a2064085f69e13cc8ca3a2de6734001e9c737ffb13ea9adec4c00fa4c36373f059490f5505396032c136ccacf82cc235883fdb1
6
+ metadata.gz: 3a2da9449cb1f4f9e23194ae55ec0fd3ec276e9f5b4abb91852b1340b14354fb5e5691d14803b3a9f3135e1ee61a5b073c4c2ff1d93069767b260c69f0ea2d75
7
+ data.tar.gz: fdc4bbcf0df6f6ce9b6ba0843b953dab52fc1753c5b8abf8b1ecb3d2d2a2a21241024a1c72a5fbc10aa0edaffb527fa9c4d33c9e35ea87ba960a34a4d13b3bf8
@@ -34,5 +34,8 @@ class Glib::JsonUi::ActionBuilder
34
34
  # E.g. Stripe credit card component can refresh its token to make sure it is not stale.
35
35
  class RefreshState < Action
36
36
  end
37
+
38
+ class Print < Action
39
+ end
37
40
  end
38
41
  end
@@ -184,6 +184,7 @@ class Glib::JsonUi::ViewBuilder
184
184
  views :childViews
185
185
  string :align
186
186
  action :onClick
187
+ views :hoverViews
187
188
  end
188
189
 
189
190
  class Column < View
@@ -207,6 +208,8 @@ class Glib::JsonUi::ViewBuilder
207
208
 
208
209
  views :childViews
209
210
  action :onClick
211
+
212
+ views :hoverViews
210
213
  end
211
214
 
212
215
  class Vertical < View
@@ -32,6 +32,35 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
32
32
  ]
33
33
  }
34
34
 
35
+ form.spacer height: 20
36
+ form.h2 text: 'Check/uncheck All'
37
+ form.spacer height: 6
38
+ form.fields_check name: 'user[check_all]', label: 'All', checkValue: true
39
+ form.fields_check name: 'user[check1]', label: 'Check 1', checkValue: true, valueIf: {
40
+ "==": [
41
+ {
42
+ "var": 'user[check_all]'
43
+ },
44
+ true
45
+ ]
46
+ }
47
+ form.fields_check name: 'user[check2]', label: 'Check 2', checkValue: true, valueIf: {
48
+ "==": [
49
+ {
50
+ "var": 'user[check_all]'
51
+ },
52
+ true
53
+ ]
54
+ }
55
+ form.fields_check name: 'user[check3]', label: 'Check 3', checkValue: true, valueIf: {
56
+ "==": [
57
+ {
58
+ "var": 'user[check_all]'
59
+ },
60
+ true
61
+ ]
62
+ }
63
+
35
64
  form.spacer height: 20
36
65
  form.fields_submit text: 'Submit'
37
66
  form.spacer height: 40
@@ -0,0 +1,17 @@
1
+ text = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
2
+ value =''
3
+ i.times { value += text}
4
+ hover.panels_responsive padding: {top: 24, right: 24, bottom: 24, left: 24 }, childViews: ->(responsive) do
5
+ responsive.avatar url: glib_json_image_avatar_url
6
+
7
+ responsive.spacer height: 8
8
+ responsive.hr color: '#F5F5F5'
9
+ responsive.spacer height: 8
10
+
11
+ responsive.h2 text: 'Hover View'
12
+ responsive.p text:value
13
+ responsive.spacer height: 24
14
+ responsive.button text:'Button', onClick:->(action) do
15
+ action.dialogs_alert message: 'Clicked'
16
+ end
17
+ end
@@ -0,0 +1,36 @@
1
+ bucket = 'itinerarybuilder-demo'
2
+
3
+ json.title 'Hover'
4
+
5
+ page = json_ui_page json
6
+ render "#{@path_prefix}/nav_menu", json: json, page: page
7
+
8
+ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
9
+ scroll.h1 text: 'Hover Views'
10
+ scroll.p text: 'A popover made with panels_responsive that will be triggered when hovering on its parent'
11
+ scroll.spacer height: 48
12
+
13
+ i = 1
14
+ scroll.h2 text: 'Responsive'
15
+ scroll.panels_responsive padding: { top: 48, right: 24, bottom: 48, left: 24 }, styleClasses: ['card'], childViews: ->(column) do
16
+ column.h2 text: "Item #{i}"
17
+ column.p text: "Hover view with #{i} sentence(s)"
18
+ end, hoverViews: ->(hover) do
19
+ render 'json_ui/garage/panels/hover_views_content', hover: hover, i: i
20
+ end, onClick: ->(action) do
21
+ action.windows_reload
22
+ end
23
+ scroll.spacer height: 48
24
+
25
+ scroll.h2 text: 'Columns'
26
+ 9.times do |i|
27
+ scroll.panels_column lg: { cols: 4 }, padding: { top: 48, right: 24, bottom: 48, left: 24 }, styleClasses: ['card'], childViews: ->(column) do
28
+ column.h2 text: "Item #{i}"
29
+ column.p text: "Hover view with #{i} sentence(s)"
30
+ end, hoverViews: ->(hover) do
31
+ render 'json_ui/garage/panels/hover_views_content', hover: hover, i: i
32
+ end, onClick: ->(action) do
33
+ action.windows_reload
34
+ end
35
+ end
36
+ end
@@ -84,6 +84,9 @@ json_ui_page json do |page|
84
84
  template.thumbnail title: 'Column', subtitle: 'Adds control over layout inside a responsive panel', onClick: ->(action) do
85
85
  action.windows_open url: json_ui_garage_url(path: 'panels/responsive')
86
86
  end
87
+ template.thumbnail title: 'Hover', subtitle: 'Popover triggered by hover', onClick: ->(action) do
88
+ action.windows_open url: json_ui_garage_url(path: 'panels/hover')
89
+ end
87
90
  end
88
91
  end, ->(section) do
89
92
  section.header padding: glib_json_padding_list, childViews: ->(header) do
@@ -97,7 +100,6 @@ json_ui_page json do |page|
97
100
  template.thumbnail title: 'Web', onClick: ->(action) do
98
101
  action.windows_open url: json_ui_garage_url(path: 'panels/web')
99
102
  end
100
-
101
103
  end
102
104
  end, ->(section) do
103
105
  section.header padding: glib_json_padding_list, childViews: ->(header) do
@@ -79,7 +79,7 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
79
79
  scroll.spacer height: 20
80
80
 
81
81
  scroll.panels_column width: 'matchParent', childViews: ->(col) do
82
- col.panels_vertical childViews: ->(v) do
82
+ col.panels_vertical width: 200, childViews: ->(v) do
83
83
  v.shareButton \
84
84
  network: 'facebook',
85
85
  url: 'https://www.talentbasket.com/jobs',
@@ -95,6 +95,7 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
95
95
  text: 'LinkedIn'
96
96
 
97
97
  v.shareButton \
98
+ width: 'matchParent',
98
99
  network: 'whatsapp',
99
100
  url: 'https://www.talentbasket.com/jobs',
100
101
  title: 'TalentBasket internship',
@@ -102,6 +103,7 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
102
103
  text: 'WhatsApp'
103
104
 
104
105
  v.shareButton \
106
+ width: 'matchParent',
105
107
  network: 'telegram',
106
108
  url: 'https://www.talentbasket.com/jobs',
107
109
  title: 'TalentBasket internship',
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.10.3
4
+ version: 0.10.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -199,6 +199,7 @@ files:
199
199
  - app/views/json_ui/garage/pages/nav_buttons.json.jbuilder
200
200
  - app/views/json_ui/garage/pages/nested_scroll.json.jbuilder
201
201
  - app/views/json_ui/garage/pages/tab_bar.json.jbuilder
202
+ - app/views/json_ui/garage/panels/_hover_views_content.json.jbuilder
202
203
  - app/views/json_ui/garage/panels/_styled.json.jbuilder
203
204
  - app/views/json_ui/garage/panels/card.json.jbuilder
204
205
  - app/views/json_ui/garage/panels/carousel.json.jbuilder
@@ -206,6 +207,7 @@ files:
206
207
  - app/views/json_ui/garage/panels/flow.json.jbuilder
207
208
  - app/views/json_ui/garage/panels/grid.json.jbuilder
208
209
  - app/views/json_ui/garage/panels/horizontal.json.jbuilder
210
+ - app/views/json_ui/garage/panels/hover.json.jbuilder
209
211
  - app/views/json_ui/garage/panels/index.json.jbuilder
210
212
  - app/views/json_ui/garage/panels/outlined.json.jbuilder
211
213
  - app/views/json_ui/garage/panels/responsive.json.jbuilder