glib-web 0.5.90 → 0.5.94
Sign up to get free protection for your applications and to get access to all the features.
- 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 +2 -0
- 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} +1 -2
- 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: bf0645de0de3f3b975e5d4ac6d7334e7f04343af59f24197e2b5c25abff24d64
|
4
|
+
data.tar.gz: eca8bf174b02e480ff616e7da1918225097e06f54985e28c8051005faf7911d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31cc51adb4a0f77c58c0d37713f7f286ca8ff69410c1ecf4a18040c1ea58ad193be72c557ae4e32a73b2a47e45f57e214627a15115b97fd5d35d74fb3530f50f
|
7
|
+
data.tar.gz: f42f4173e1faa5eddb83332bdeef89e97d51f38462f8f4db64fa2ec95d3b49434f5a9d4aa4327b8a94b7ef30021e969fbac262e1f9d9e9508e37f42fa59360ed
|
@@ -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
|
@@ -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
|
|
@@ -24,5 +24,4 @@ else
|
|
24
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.94
|
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
|