glib-web 0.10.2 → 0.10.5

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: 5eecf49fe5b82f03a92830d4b5f57c6a1359ce9115394839ad5a190d13e2024c
4
- data.tar.gz: 7aa1e5cba918a6ea2573755b924bbd3308116e86173c2d4cb64f45c2bc44dd7f
3
+ metadata.gz: 7b65d8a96fe8753ae52fe966e9974b69b33696a1ad162473f4aed36200cc81f2
4
+ data.tar.gz: 410528b0edc7b1e8f954679e8bbd37790ea578c4fd3623393c9f7249cd68b499
5
5
  SHA512:
6
- metadata.gz: '08963b76a01e60c7710291a681d05bb3ed09536056b7c6880208c09056ce2a40cd893ab682010c2346a8d3dcf76cdc055327152476db1d15171aa96a3cab95d9'
7
- data.tar.gz: 220489bb706160ad25d3ab2d7facc9dec739b89bfc42acc76bbdb4f42629868e5e2015563277b8b541009c1800cb9932996aae97af363d382d19db881a09c4da
6
+ metadata.gz: 1b023d8002d57bb6d8f3ce30444ba0bfc7212b168eb32dc2594ef3d7284f4ac118b99e3a44ada5e32e8209ac63ae0e0c83518214439deec4c148fbce7ded297c
7
+ data.tar.gz: 8281e93f757307c5d373fdaa6658fcb1a2a828fa8b80c6cf783b9a4ea228c5727331da444b00233587cf8b56bd19550ad1ac8a1101054c9ee18498fdaa252e76
@@ -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
@@ -206,6 +207,9 @@ class Glib::JsonUi::ViewBuilder
206
207
  hash :xsAndDown
207
208
 
208
209
  views :childViews
210
+ action :onClick
211
+
212
+ views :hoverViews
209
213
  end
210
214
 
211
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.2
4
+ version: 0.10.5
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