glib-web 0.5.29 → 0.5.35
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 +4 -4
- data/app/helpers/glib/json_ui/action_builder.rb +1 -0
- data/app/helpers/glib/json_ui/list_builders.rb +1 -0
- data/app/helpers/glib/json_ui/page_helper.rb +5 -5
- data/app/helpers/glib/json_ui/view_builder/fields.rb +13 -6
- data/app/views/json_ui/garage/forms/pickers.json.jbuilder +1 -0
- data/app/views/json_ui/garage/forms/styled_boxes.json.jbuilder +9 -8
- data/app/views/json_ui/garage/lists/chat_ui.json.jbuilder +1 -1
- data/app/views/json_ui/garage/pages/nav_buttons.json.jbuilder +1 -1
- data/lib/glib/json_crawler/action_crawlers/windows_open.rb +1 -1
- data/lib/glib/json_crawler/router.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ab027b2e06860edd4c9b20cee7936d370ef8ba92ebd15379ae6dbd8c20395de
|
4
|
+
data.tar.gz: 3d55b83d631e5c01e915cb4be80515c47e82314d8eb8ad38eb29d3e8e42785c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 620795d7d88023f7f03a44991758a90a4fe7a3680ab09bbe4f37c3f6fc3cfdd24dba4bf09ba1ff134fdcf48325c51da8c142f8b72eb3cb35514717bb1c695c62
|
7
|
+
data.tar.gz: 51bd223aa3543323b3c2215a5a0258a25d3f52009e8e0c1b6b1865101e5180f3f43dff034016d974da39a45702e00e38cb34b4e10edce8afeed3f45c4e088e1e
|
@@ -90,11 +90,11 @@ module Glib
|
|
90
90
|
builder
|
91
91
|
end
|
92
92
|
|
93
|
-
def rightNavButtons
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
end
|
93
|
+
# def rightNavButtons
|
94
|
+
# json.rightNavButtons do
|
95
|
+
# yield @menu_builder
|
96
|
+
# end
|
97
|
+
# end
|
98
98
|
|
99
99
|
def template(template)
|
100
100
|
json.template template
|
@@ -2,6 +2,7 @@ class Glib::JsonUi::ViewBuilder
|
|
2
2
|
module Fields
|
3
3
|
|
4
4
|
class AbstractField < View
|
5
|
+
bool :readOnly
|
5
6
|
hash :validation
|
6
7
|
|
7
8
|
def label(label)
|
@@ -68,7 +69,6 @@ class Glib::JsonUi::ViewBuilder
|
|
68
69
|
|
69
70
|
class Text < AbstractField
|
70
71
|
int :maxLength
|
71
|
-
bool :readOnly
|
72
72
|
end
|
73
73
|
|
74
74
|
class Number < Text
|
@@ -130,7 +130,7 @@ class Glib::JsonUi::ViewBuilder
|
|
130
130
|
|
131
131
|
class Select < AbstractField
|
132
132
|
array :options
|
133
|
-
bool :readOnly
|
133
|
+
# bool :readOnly
|
134
134
|
bool :multiple, cache: true
|
135
135
|
# bool :manualEntry
|
136
136
|
hash :append
|
@@ -138,7 +138,7 @@ class Glib::JsonUi::ViewBuilder
|
|
138
138
|
|
139
139
|
class Autocomplete < AbstractField
|
140
140
|
array :options
|
141
|
-
bool :readOnly
|
141
|
+
# bool :readOnly
|
142
142
|
bool :multiple, cache: true
|
143
143
|
# bool :manualEntry
|
144
144
|
hash :append
|
@@ -164,11 +164,17 @@ class Glib::JsonUi::ViewBuilder
|
|
164
164
|
# views :groupTemplateViews
|
165
165
|
end
|
166
166
|
|
167
|
-
class RadioGroup <
|
168
|
-
string :name
|
169
|
-
string :value
|
167
|
+
class RadioGroup < AbstractField
|
168
|
+
# string :name
|
169
|
+
# string :value
|
170
170
|
views :childViews
|
171
171
|
|
172
|
+
# Override
|
173
|
+
def value(value)
|
174
|
+
# Convert to string to make sure the value matches with Radio#value
|
175
|
+
@value = value.to_s if value != Glib::Value::DEFAULT
|
176
|
+
end
|
177
|
+
|
172
178
|
string :iconOfBeforeSelected
|
173
179
|
string :iconOfSelected
|
174
180
|
string :iconOfAfterSelected
|
@@ -211,6 +217,7 @@ class Glib::JsonUi::ViewBuilder
|
|
211
217
|
hash :latitudeField
|
212
218
|
hash :longitudeField
|
213
219
|
hash :zoomField
|
220
|
+
hash :autocompleteOptions
|
214
221
|
end
|
215
222
|
|
216
223
|
class StripeToken < AbstractField
|
@@ -35,6 +35,7 @@ json_ui_page json do |page|
|
|
35
35
|
form.h2 text: 'Map'
|
36
36
|
form.spacer height: 6
|
37
37
|
form.fields_location name: 'user[address]', width: 'matchParent', label: 'Type an address', value: 'Sydney Harbour Bridge',
|
38
|
+
autocompleteOptions: { componentRestrictions: { country: 'au' }, types: ['(cities)'] },
|
38
39
|
latitudeField: { view: 'fields/text', name: 'user[latitude]', label: 'Lat', value: -33.8523063, readOnly: true },
|
39
40
|
longitudeField: { view: 'fields/text', name: 'user[longitude]', label: 'Long', value: 151.21078710000006, readOnly: true },
|
40
41
|
zoomField: { view: 'fields/text', name: 'user[zoom]', label: 'Zoom' }
|
@@ -12,21 +12,22 @@ json_ui_page json do |page|
|
|
12
12
|
form.spacer height: 14
|
13
13
|
form.fields_textarea name: 'user[bio]', width: 'matchParent', label: 'Bio', placeholder: 'Enter your bio', styleClasses: ['outlined']
|
14
14
|
|
15
|
+
# form.spacer height: 14
|
16
|
+
# form.fields_stripeToken name: 'user[stripe_token_outlined]', width: 'matchParent', publicKey: 'pk_test_TYooMQauvdEDq54NiTphI7jx', styleClass: 'outlined'
|
17
|
+
|
18
|
+
# form.spacer height: 14
|
19
|
+
# form.fields_stripeToken name: 'user[stripe_token_individual]', width: 'matchParent', publicKey: 'pk_test_TYooMQauvdEDq54NiTphI7jx', styleClass: 'individual'
|
20
|
+
|
15
21
|
form.spacer height: 14
|
16
|
-
form.
|
22
|
+
form.fields_creditCard name: 'user[stripe_token_outlined]', width: 'matchParent', publicKey: 'pk_test_TYooMQauvdEDq54NiTphI7jx', styleClass: 'outlined'
|
17
23
|
|
18
24
|
form.spacer height: 14
|
19
|
-
form.
|
25
|
+
form.fields_creditCard name: 'user[stripe_token_individual]', width: 'matchParent', publicKey: 'pk_test_TYooMQauvdEDq54NiTphI7jx', styleClass: 'individual'
|
20
26
|
|
21
27
|
form.spacer height: 14
|
22
28
|
form.panels_split width: 'matchParent', content: ->(split) do
|
23
|
-
# split.left childViews: ->(left) do
|
24
|
-
# if params[:mode] == 'dialog'
|
25
|
-
# left.button styleClass: 'link', text: 'cancel', onClick: ->(action) { action.dialogs_close }
|
26
|
-
# end
|
27
|
-
# end
|
28
29
|
split.right childViews: ->(right) do
|
29
|
-
right.
|
30
|
+
right.fields_submit text: 'Submit'
|
30
31
|
end
|
31
32
|
end
|
32
33
|
|
@@ -24,7 +24,7 @@ json.phoenixSocket({
|
|
24
24
|
})
|
25
25
|
|
26
26
|
list_ws = { topic: 'rooms', events: ['comments_updated'] }
|
27
|
-
page.list
|
27
|
+
page.list phoenixSocket: list_ws, firstSection: ->(section) do
|
28
28
|
section.header padding: { top: 12, left: 16, right: 16, bottom: 12 }, childViews: ->(header) do
|
29
29
|
header.h3 text: 'Chat with John Doe'
|
30
30
|
end
|
@@ -5,7 +5,7 @@ page = json_ui_page json
|
|
5
5
|
render "#{@path_prefix}/nav_menu", json: json, page: page
|
6
6
|
|
7
7
|
page.navBar backgroundColor: '#a8c4e3', color: '#ffffff', rightButtons: ->(menu) do
|
8
|
-
menu.button icon: 'search', onClick: ->(action) do
|
8
|
+
menu.button icon: 'search', text: 'Search', onClick: ->(action) do
|
9
9
|
action.dialogs_alert message: 'Perform some action'
|
10
10
|
end
|
11
11
|
menu.button icon: { name: 'star', badge: { text: '1', backgroundColor: '#ff0000' } }, onClick: ->(action) do
|
@@ -12,7 +12,7 @@ module Glib
|
|
12
12
|
crawl json['body']&.[]('childViews')
|
13
13
|
crawl json['footer']&.[]('childViews')
|
14
14
|
|
15
|
-
json['
|
15
|
+
json['rightButtons']&.each do |button|
|
16
16
|
if button['buttons'].present?
|
17
17
|
button['buttons'].each do |inner_button|
|
18
18
|
click inner_button
|