glib-web 0.5.89 → 0.5.93
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/view_builder/fields.rb +3 -1
- data/app/helpers/glib/json_ui/view_builder/panels.rb +3 -1
- data/app/helpers/glib/json_ui/view_builder.rb +4 -1
- data/app/models/concerns/glib/soft_deletable.rb +5 -0
- data/app/views/json_ui/garage/_nav_menu.json.jbuilder +3 -1
- data/app/views/json_ui/garage/forms/pickers.json.jbuilder +9 -1
- data/app/views/json_ui/garage/lists/{autoload_as_needed_float_columns.json.jbuilder → autoload_as_needed_responsive_columns.json.jbuilder} +2 -3
- data/app/views/json_ui/garage/lists/index.json.jbuilder +2 -2
- data/app/views/json_ui/garage/panels/flow.json.jbuilder +2 -2
- data/app/views/json_ui/garage/panels/horizontal.json.jbuilder +10 -0
- data/app/views/json_ui/garage/panels/split.json.jbuilder +1 -1
- data/app/views/json_ui/garage/views/controls.json.jbuilder +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e237f4f116aaaa24e860e0a14884ca5613ce0b012d65db797a54c6b2c036a46b
|
4
|
+
data.tar.gz: e7205204632d4bf98c51f29e641ce0517b3d49881a27cb4724c72b395fceab8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f54dce3792f8dde903370975ddae9bfc7c8926e8164077fdbaf27be6c1c8a529e2925578c96cd9705a4fa1d48cac9ca6c99df005dbbc43be387d487238e1fe0
|
7
|
+
data.tar.gz: 9b4d8a1ac3efd39876a5360149e90d40eb391d638b7056c19063a2af97e3b6aa20c6f61b194c22af34128e2693a1ccc73ffd5ffd1cfa6a1a7a98bccefe85b76f
|
@@ -241,9 +241,11 @@ class Glib::JsonUi::ViewBuilder
|
|
241
241
|
class Date < AbstractField
|
242
242
|
date :min
|
243
243
|
date :max
|
244
|
-
|
244
|
+
string :type
|
245
|
+
|
245
246
|
# Override
|
246
247
|
def value(value)
|
248
|
+
value = "#{value}-01" if value.is_a?(String) && value&.length == 7 # yyyy-mm
|
247
249
|
super(value&.to_date)
|
248
250
|
end
|
249
251
|
end
|
@@ -119,7 +119,7 @@ class Glib::JsonUi::ViewBuilder
|
|
119
119
|
action :onScrollToTop
|
120
120
|
action :onScrollToBottom
|
121
121
|
|
122
|
-
int :
|
122
|
+
int :responsiveCols
|
123
123
|
|
124
124
|
def firstSection(block)
|
125
125
|
json.sections [1] do
|
@@ -218,6 +218,8 @@ class Glib::JsonUi::ViewBuilder
|
|
218
218
|
class Flow < View
|
219
219
|
hash :innerPadding
|
220
220
|
views :childViews
|
221
|
+
|
222
|
+
required :innerPadding
|
221
223
|
end
|
222
224
|
|
223
225
|
class Carousel < View
|
@@ -75,7 +75,7 @@ module Glib
|
|
75
75
|
|
76
76
|
### View definitions
|
77
77
|
|
78
|
-
class AbstractText < View
|
78
|
+
class AbstractText < View
|
79
79
|
string :textAlign
|
80
80
|
text :text
|
81
81
|
color :color
|
@@ -197,6 +197,9 @@ module Glib
|
|
197
197
|
class Chip < View
|
198
198
|
string :text
|
199
199
|
action :onClick
|
200
|
+
|
201
|
+
string :badgeContent
|
202
|
+
color :badgeColor
|
200
203
|
end
|
201
204
|
|
202
205
|
class Calendar < View
|
@@ -1,3 +1,8 @@
|
|
1
|
+
# To use this, simply:
|
2
|
+
# - Include the module
|
3
|
+
# - Add this migration: `add_column :model, :deleted_at, :datetime, null: true`
|
4
|
+
#
|
5
|
+
# After that, any call to `destroy` will automatically be a soft-deletion.
|
1
6
|
module Glib
|
2
7
|
module SoftDeletable
|
3
8
|
extend ActiveSupport::Concern
|
@@ -56,7 +56,9 @@ if local_assigns[:top_nav] || json_ui_app_is_web?
|
|
56
56
|
action.windows_reload
|
57
57
|
end
|
58
58
|
|
59
|
-
|
59
|
+
# Consider deprecating icon badge
|
60
|
+
# menu.button icon: { name: 'zoom_in', badge: '!' }, text: 'Diagnostics', onClick: ->(action) do
|
61
|
+
menu.button icon: 'zoom_in', text: 'Diagnostics', badgeContent: '!', onClick: ->(action) do
|
60
62
|
action.dialogs_alert message: %{
|
61
63
|
Bundle ID: #{json_ui_app_bundle_id || '<unknown>'}
|
62
64
|
App Version: #{json_ui_app_build_version || '<unknown>'}
|
@@ -47,7 +47,7 @@ page.form \
|
|
47
47
|
width: 'matchParent',
|
48
48
|
label: 'Date',
|
49
49
|
min: '2010-01-01',
|
50
|
-
max: '
|
50
|
+
max: '2010-01-15',
|
51
51
|
value: '2010-02-01'
|
52
52
|
form.fields_datetime \
|
53
53
|
name: 'user[date_time]',
|
@@ -56,6 +56,14 @@ page.form \
|
|
56
56
|
min: '2018-06-09T00:00',
|
57
57
|
max: '2018-06-17T00:00',
|
58
58
|
value: '2018-06-15T19:30'
|
59
|
+
form.fields_date \
|
60
|
+
name: 'user[month]',
|
61
|
+
width: 'matchParent',
|
62
|
+
label: 'Month',
|
63
|
+
type: 'month',
|
64
|
+
min: '2021-01-01',
|
65
|
+
max: '2021-03-01',
|
66
|
+
value: '2021-11'
|
59
67
|
|
60
68
|
form.spacer height: 20
|
61
69
|
form.h2 text: 'Country'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
page_index = params[:page].to_i
|
3
3
|
next_page = {
|
4
|
-
url: json_ui_garage_url(path: 'lists/
|
4
|
+
url: json_ui_garage_url(path: 'lists/autoload_as_needed_responsive_columns', page: page_index + 1, section_only: 'v1'),
|
5
5
|
autoload: 'asNeeded'
|
6
6
|
}
|
7
7
|
|
@@ -21,8 +21,7 @@ else
|
|
21
21
|
|
22
22
|
render "#{@path_prefix}/nav_menu", json: json, page: page
|
23
23
|
|
24
|
-
page.list nextPage: next_page,
|
24
|
+
page.list nextPage: next_page, responsiveCols: params[:responsiveCols] || 2, firstSection: ->(section) do
|
25
25
|
render 'json_ui/garage/lists/autoload_section', page: page, page_index: page_index
|
26
26
|
end
|
27
|
-
|
28
27
|
end
|
@@ -29,8 +29,8 @@ json_ui_page json do |page|
|
|
29
29
|
template.thumbnail title: 'Autoload All', onClick: ->(action) do
|
30
30
|
action.windows_open url: json_ui_garage_url(path: 'lists/autoload_all')
|
31
31
|
end
|
32
|
-
template.thumbnail title: 'Autoload as Needed with
|
33
|
-
action.windows_open url: json_ui_garage_url(path: 'lists/
|
32
|
+
template.thumbnail title: 'Autoload as Needed with Responsive Columns', onClick: ->(action) do
|
33
|
+
action.windows_open url: json_ui_garage_url(path: 'lists/autoload_as_needed_responsive_columns')
|
34
34
|
end
|
35
35
|
template.thumbnail title: 'Reordering', onClick: ->(action) do
|
36
36
|
action.windows_open url: json_ui_garage_url(path: 'lists/reordering')
|
@@ -5,7 +5,7 @@ render "#{@path_prefix}/nav_menu", json: json, page: page
|
|
5
5
|
|
6
6
|
page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
7
7
|
scroll.h1 text: 'Basic'
|
8
|
-
scroll.panels_flow width: 300, backgroundColor: '#b3bac2', childViews: ->(panel) do
|
8
|
+
scroll.panels_flow width: 300, innerPadding: { top: 0 }, backgroundColor: '#b3bac2', childViews: ->(panel) do
|
9
9
|
panel.button text: '1'
|
10
10
|
panel.button text: '2'
|
11
11
|
panel.button text: '3'
|
@@ -17,7 +17,7 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
17
17
|
|
18
18
|
scroll.label text: "\n"
|
19
19
|
scroll.h1 text: 'Spacers'
|
20
|
-
scroll.panels_flow width: 300, backgroundColor: '#b3bac2', childViews: ->(panel) do
|
20
|
+
scroll.panels_flow width: 300, innerPadding: { top: 0 }, backgroundColor: '#b3bac2', childViews: ->(panel) do
|
21
21
|
panel.button text: '1'
|
22
22
|
panel.spacer width: 30
|
23
23
|
panel.button text: '2'
|
@@ -87,5 +87,15 @@ json_ui_page json do |page|
|
|
87
87
|
panel.spacer width: 10
|
88
88
|
panel.label text: 'bottom'
|
89
89
|
end
|
90
|
+
|
91
|
+
scroll.label text: "\n"
|
92
|
+
scroll.h1 text: 'Label combo'
|
93
|
+
scroll.panels_horizontal childViews: ->(panel) do
|
94
|
+
panel.label backgroundColor: '#b3bac2', text: 'Label 1'
|
95
|
+
panel.label text: 'Label 2'
|
96
|
+
panel.label backgroundColor: '#b3bac2', text: 'Label 3'
|
97
|
+
end
|
98
|
+
|
99
|
+
scroll.label text: "\n"
|
90
100
|
end
|
91
101
|
end
|
@@ -104,7 +104,7 @@ json_ui_page json do |page|
|
|
104
104
|
left.button text: 'L'
|
105
105
|
end
|
106
106
|
content.center childViews: ->(center) do
|
107
|
-
center.panels_flow width: 'matchParent', backgroundColor: '#b3bac2', childViews: ->(h) do
|
107
|
+
center.panels_flow width: 'matchParent', innerPadding: { top: 0 }, backgroundColor: '#b3bac2', childViews: ->(h) do
|
108
108
|
(1..20).each do |index|
|
109
109
|
h.button text: index
|
110
110
|
end
|
@@ -13,11 +13,13 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
13
13
|
scroll.spacer height: 20
|
14
14
|
scroll.h2 text: 'Chip'
|
15
15
|
scroll.spacer height: 6
|
16
|
-
scroll.chip styleClass: 'success', text: '
|
16
|
+
scroll.chip styleClass: 'success', text: 'Success'
|
17
17
|
scroll.spacer height: 6
|
18
|
-
scroll.chip text: '
|
18
|
+
scroll.chip text: 'With Action', onClick: ->(action) do
|
19
19
|
action.dialogs_alert message: 'Perform action'
|
20
20
|
end
|
21
|
+
scroll.spacer height: 6
|
22
|
+
scroll.chip text: 'With Badge', badgeContent: '99'
|
21
23
|
|
22
24
|
scroll.spacer height: 20
|
23
25
|
scroll.h2 text: 'Switch'
|
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.5.
|
4
|
+
version: 0.5.93
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
@@ -170,7 +170,7 @@ files:
|
|
170
170
|
- app/views/json_ui/garage/lists/_autoload_section.json.jbuilder
|
171
171
|
- app/views/json_ui/garage/lists/autoload_all.json.jbuilder
|
172
172
|
- app/views/json_ui/garage/lists/autoload_as_needed.json.jbuilder
|
173
|
-
- app/views/json_ui/garage/lists/
|
173
|
+
- app/views/json_ui/garage/lists/autoload_as_needed_responsive_columns.json.jbuilder
|
174
174
|
- app/views/json_ui/garage/lists/chat_ui.json.jbuilder
|
175
175
|
- app/views/json_ui/garage/lists/edit_actions.json.jbuilder
|
176
176
|
- app/views/json_ui/garage/lists/fab.json.jbuilder
|