glib-web 5.0.0 → 5.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7f82cbe6244860401184fb219b90a22f66839abbb8c0348fe324d5662491ff53
4
- data.tar.gz: 94f1678aaf84f214ab0fa9d4f913a3e2df19a6b0eacb54c8967201a26abe2569
3
+ metadata.gz: bf55f8e828ad48e18227bfeb9940e268090705f7dfeec2b180a1b7d858108f9b
4
+ data.tar.gz: 6aa26bf19c388341ec451e523910818871df09673bb5f816f6021e09a26a0cbc
5
5
  SHA512:
6
- metadata.gz: 5c097c0f55e226e9960f13da37912392729a8f7acbfc2b314b18b146e340be7747aa61d7a58fdc13b1dcd77e00e1f157e0fee8f6dea6f1265d8bfe4389939b27
7
- data.tar.gz: 3442a41bf7b197ce9c6a0bebd2cbe95bff08d0e97f3db65e70e5e0264bcdf6056b6942bbbdc531e4c028a6a93cdce724cfc69d1590fcb54e5ae9e973bad3f2ba
6
+ metadata.gz: 29f3fb45d898e5855420695e3c6c564cfaee9631506faf3d9e05d71ee6d549aa9be842d58127e998333396026cc2e68f27788c2877a394197b8b763e6b7f42b4
7
+ data.tar.gz: 390ab4fab4e75f3327dfab76e46b3f5868105d4ff0701873e9db9a91ef77fa8d1b92764652e45f806b0f3634438fff4541c34f4e827bad33c004479d47c73e7d
@@ -1,6 +1,6 @@
1
1
  module Glib
2
2
  module FormatHelper
3
- require 'redcarpet/render_strip'
3
+ require 'redcarpet'
4
4
 
5
5
  class CustomRenderer < Redcarpet::Render::XHTML
6
6
  def strikethrough(text)
@@ -2,55 +2,63 @@ json.title 'Test Page (Custom)'
2
2
 
3
3
  page = json_ui_page json
4
4
 
5
- page.body childViews: ->(body) do
6
- render 'json_ui/garage/test_page/header', view: body
7
-
8
- body.panels_responsive padding: glib_json_padding_body, childViews: ->(res) do
9
- res.h2 text: 'Overview'
10
- res.p text: 'Custom panels render a predefined template with custom data payloads.'
11
-
12
- data_primary = { imageUrl: glib_json_image_standard_url, title: 'Primary', subtitle: 'Thumbnail template' }
13
- data_alt = { imageUrl: glib_json_image_standard_url, title: 'Alternate', subtitle: 'Alternate data payload' }
14
-
15
- res.spacer height: 12
16
- res.hr width: 'matchParent'
17
-
18
- res.h2 text: 'Basic'
19
- res.spacer height: 8
20
- res.panels_custom id: 'custom_main', template: 'thumbnail', width: 'matchParent', backgroundColor: '#fafafa', data: data_primary
21
-
22
- res.spacer height: 12
23
- res.hr width: 'matchParent'
24
-
25
- res.h2 text: 'Variants and Props'
26
- res.spacer height: 8
27
- res.panels_flow innerPadding: { bottom: 0 }, childViews: ->(flow) do
28
- flow.button text: 'Primary data', onClick: ->(action) do
29
- action.components_set targetId: 'custom_main', data: { data: data_primary }
5
+ page.body(
6
+ childViews: ->(body) do
7
+ render 'json_ui/garage/test_page/header', view: body
8
+ body.panels_responsive(
9
+ padding: glib_json_padding_body,
10
+ childViews: ->(res) do
11
+ res.h2 text: 'Overview'
12
+ res.p text: 'Custom panels render a predefined template with custom data payloads.'
13
+ data_primary = { imageUrl: glib_json_image_standard_url, title: 'Primary', subtitle: 'Thumbnail template' }
14
+ data_alt = { imageUrl: glib_json_image_standard_url, title: 'Alternate', subtitle: 'Alternate data payload' }
15
+ res.spacer height: 12
16
+ res.hr width: 'matchParent'
17
+ res.h2 text: 'Basic'
18
+ res.spacer height: 8
19
+ res.panels_custom id: 'custom_main', template: 'thumbnail', width: 'matchParent', backgroundColor: '#fafafa', data: data_primary
20
+ res.spacer height: 12
21
+ res.hr width: 'matchParent'
22
+ res.h2 text: 'Variants and Props'
23
+ res.spacer height: 8
24
+ res.panels_flow(
25
+ innerPadding: { bottom: 0 },
26
+ childViews: ->(flow) do
27
+ flow.button(
28
+ text: 'Primary data',
29
+ onClick: ->(action) do
30
+ action.components_set targetId: 'custom_main', data: { data: data_primary }
31
+ end
32
+ )
33
+ flow.spacer width: 4
34
+ flow.button(
35
+ text: 'Alternate data',
36
+ onClick: ->(action) do
37
+ action.components_set targetId: 'custom_main', data: { data: data_alt }
38
+ end
39
+ )
40
+ end
41
+ )
42
+ res.spacer height: 12
43
+ res.hr width: 'matchParent'
44
+ res.h2 text: 'Actions and Events'
45
+ res.spacer height: 8
46
+ res.label id: 'custom_action_status', text: 'Action status: idle'
47
+ res.spacer height: 6
48
+ res.panels_custom(
49
+ template: 'thumbnail',
50
+ data: data_primary,
51
+ onClick: ->(action) do
52
+ action.components_set targetId: 'custom_action_status', data: { text: 'Action status: clicked' }
53
+ end
54
+ )
55
+ res.spacer height: 12
56
+ res.hr width: 'matchParent'
57
+ res.h2 text: 'Edge and Advanced'
58
+ res.spacer height: 8
59
+ res.label text: 'Non-existent template'
60
+ res.panels_custom template: 'nonExistentTemplate'
30
61
  end
31
- flow.spacer width: 4
32
- flow.button text: 'Alternate data', onClick: ->(action) do
33
- action.components_set targetId: 'custom_main', data: { data: data_alt }
34
- end
35
- end
36
-
37
- res.spacer height: 12
38
- res.hr width: 'matchParent'
39
-
40
- res.h2 text: 'Actions and Events'
41
- res.spacer height: 8
42
- res.label id: 'custom_action_status', text: 'Action status: idle'
43
- res.spacer height: 6
44
- res.panels_custom template: 'thumbnail', data: data_primary, onClick: ->(action) do
45
- action.components_set targetId: 'custom_action_status', data: { text: 'Action status: clicked' }
46
- end
47
-
48
- res.spacer height: 12
49
- res.hr width: 'matchParent'
50
-
51
- res.h2 text: 'Edge and Advanced'
52
- res.spacer height: 8
53
- res.label text: 'Non-existent template'
54
- res.panels_custom template: 'nonExistentTemplate'
62
+ )
55
63
  end
56
- end
64
+ )
@@ -19,6 +19,59 @@ page.body(
19
19
  res.spacer height: 12
20
20
  res.hr width: 'matchParent'
21
21
  res.spacer height: 12
22
+ res.h2 text: 'Inside dialog'
23
+ res.spacer height: 8
24
+ res.button(
25
+ text: 'open dialog with popover',
26
+ onClick: ->(action) do
27
+ action.dialogs_show(
28
+ content: ->(dialog) do
29
+ dialog.body(
30
+ padding: glib_json_padding_body,
31
+ childViews: ->(dbody) do
32
+ dbody.label id: 'dialog_popover_target', text: 'Dialog anchor'
33
+ dbody.spacer height: 8
34
+ dbody.button(
35
+ text: 'show popover',
36
+ onClick: ->(daction) do
37
+ daction.popovers_show(
38
+ key: 'popover_in_dialog',
39
+ placement: 'top-start',
40
+ targetId: 'dialog_popover_target',
41
+ content: ->(pdialog) do
42
+ pdialog.body(
43
+ padding: glib_json_padding_body,
44
+ childViews: ->(pbody) do
45
+ pbody.label text: 'Popover inside dialog'
46
+ pbody.spacer height: 8
47
+ pbody.button(
48
+ text: 'close popover',
49
+ onClick: ->(paction) do
50
+ paction.popovers_close key: 'popover_in_dialog'
51
+ end
52
+ )
53
+ end
54
+ )
55
+ end
56
+ )
57
+ end
58
+ )
59
+ dbody.spacer height: 8
60
+ dbody.button(
61
+ text: 'close dialog',
62
+ onClick: ->(daction) do
63
+ daction.dialogs_close
64
+ end
65
+ )
66
+ end
67
+ )
68
+ end
69
+ )
70
+ end
71
+ )
72
+ res.spacer height: 16
73
+ res.hr width: 'matchParent'
74
+ res.spacer height: 16
22
75
 
23
76
  res.h2 text: 'Basic example'
24
77
  res.spacer height: 8
@@ -27,23 +80,40 @@ page.body(
27
80
  res.button(
28
81
  text: 'popovers/show menu',
29
82
  onClick: ->(action) do
30
- action.popovers_show \
83
+ action.popovers_show(
31
84
  key: 'popover_menu',
32
85
  placement: 'bottom-start',
33
86
  targetId: 'popover_target',
34
87
  content: ->(dialog) do
35
- dialog.body styleClass: 'popover-menu', padding: glib_json_padding_body, childViews: ->(menu) do
36
- menu.label text: 'Item 1', styleClass: 'popover-menu-item', onClick: ->(subaction) do
37
- subaction.popovers_close key: 'popover_menu'
38
- end
39
- menu.label text: 'Item 2', styleClass: 'popover-menu-item', onClick: ->(subaction) do
40
- subaction.popovers_close key: 'popover_menu'
41
- end
42
- menu.label text: 'Item 3', styleClass: 'popover-menu-item', onClick: ->(subaction) do
43
- subaction.popovers_close key: 'popover_menu'
88
+ dialog.body(
89
+ styleClass: 'popover-menu',
90
+ padding: glib_json_padding_body,
91
+ childViews: ->(menu) do
92
+ menu.label(
93
+ text: 'Item 1',
94
+ styleClass: 'popover-menu-item',
95
+ onClick: ->(subaction) do
96
+ subaction.popovers_close key: 'popover_menu'
97
+ end
98
+ )
99
+ menu.label(
100
+ text: 'Item 2',
101
+ styleClass: 'popover-menu-item',
102
+ onClick: ->(subaction) do
103
+ subaction.popovers_close key: 'popover_menu'
104
+ end
105
+ )
106
+ menu.label(
107
+ text: 'Item 3',
108
+ styleClass: 'popover-menu-item',
109
+ onClick: ->(subaction) do
110
+ subaction.popovers_close key: 'popover_menu'
111
+ end
112
+ )
44
113
  end
45
- end
114
+ )
46
115
  end
116
+ )
47
117
  end
48
118
  )
49
119
 
@@ -63,10 +133,11 @@ page.body(
63
133
  res.button(
64
134
  text: 'popovers/open (updateExisting)',
65
135
  onClick: ->(action) do
66
- action.popovers_open \
136
+ action.popovers_open(
67
137
  url: json_ui_garage_url(path: 'views/popovers_open', key: 'server_popover'),
68
138
  key: 'server_popover',
69
139
  updateExisting: true
140
+ )
70
141
  end
71
142
  )
72
143
 
@@ -99,15 +170,19 @@ page.body(
99
170
  res.button(
100
171
  text: 'popovers/show (top-end)',
101
172
  onClick: ->(action) do
102
- action.popovers_show \
173
+ action.popovers_show(
103
174
  key: 'popover_note',
104
175
  placement: 'top-end',
105
176
  targetId: 'popover_target',
106
177
  content: ->(dialog) do
107
- dialog.body padding: glib_json_padding_body, childViews: ->(menu) do
108
- menu.label text: 'Pinned note'
109
- end
178
+ dialog.body(
179
+ padding: glib_json_padding_body,
180
+ childViews: ->(menu) do
181
+ menu.label text: 'Pinned note'
182
+ end
183
+ )
110
184
  end
185
+ )
111
186
  end
112
187
  )
113
188
  end
metadata CHANGED
@@ -1,11 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glib-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
10
  date: 2019-10-04 00:00:00.000000000 Z
@@ -16,14 +15,14 @@ dependencies:
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: 8.0.0
18
+ version: '8.0'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - "~>"
25
24
  - !ruby/object:Gem::Version
26
- version: 8.0.0
25
+ version: '8.0'
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: pundit
29
28
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +57,14 @@ dependencies:
58
57
  requirements:
59
58
  - - "~>"
60
59
  - !ruby/object:Gem::Version
61
- version: 8.0.0
60
+ version: '8.0'
62
61
  type: :runtime
63
62
  prerelease: false
64
63
  version_requirements: !ruby/object:Gem::Requirement
65
64
  requirements:
66
65
  - - "~>"
67
66
  - !ruby/object:Gem::Version
68
- version: 8.0.0
67
+ version: '8.0'
69
68
  - !ruby/object:Gem::Dependency
70
69
  name: js_regex
71
70
  requirement: !ruby/object:Gem::Requirement
@@ -108,6 +107,20 @@ dependencies:
108
107
  - - ">="
109
108
  - !ruby/object:Gem::Version
110
109
  version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: redcarpet
112
+ requirement: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ type: :runtime
118
+ prerelease: false
119
+ version_requirements: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
111
124
  - !ruby/object:Gem::Dependency
112
125
  name: rubocop
113
126
  requirement: !ruby/object:Gem::Requirement
@@ -136,7 +149,6 @@ dependencies:
136
149
  - - ">="
137
150
  - !ruby/object:Gem::Version
138
151
  version: '0'
139
- description:
140
152
  email: ''
141
153
  executables: []
142
154
  extensions: []
@@ -516,10 +528,8 @@ files:
516
528
  - lib/glib/version.rb
517
529
  - lib/tasks/db.rake
518
530
  - lib/tasks/docs.rake
519
- homepage:
520
531
  licenses: []
521
532
  metadata: {}
522
- post_install_message:
523
533
  rdoc_options: []
524
534
  require_paths:
525
535
  - lib
@@ -534,8 +544,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
534
544
  - !ruby/object:Gem::Version
535
545
  version: '0'
536
546
  requirements: []
537
- rubygems_version: 3.4.6
538
- signing_key:
547
+ rubygems_version: 4.0.6
539
548
  specification_version: 4
540
549
  summary: ''
541
550
  test_files: []