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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8fc9ee6c403041c43bccde2dadd3405bdb6ac55a454d2a6f9a8a55bf2bd40b9
4
- data.tar.gz: 9c358c5c79ea5004aa1eb6479b01d4775204ac0f6df90f6ea105c5eb25edf435
3
+ metadata.gz: bf0645de0de3f3b975e5d4ac6d7334e7f04343af59f24197e2b5c25abff24d64
4
+ data.tar.gz: eca8bf174b02e480ff616e7da1918225097e06f54985e28c8051005faf7911d2
5
5
  SHA512:
6
- metadata.gz: 3a0a476f8028c0bf90f18b0d0f3753195549041237049c4f3d19e66f4e97b57c8ab1369d573432913c899661114685e030d56e0ecc8b5041efb6f6a2050259e4
7
- data.tar.gz: 5a06ca066065d7d5ef96cf4e7333527a002296e89665cc2c9fe91f8db8f586e8031514b0374c871f53d1a937697c38aa7230f0419af696bf3a547a3fade97eaa
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
@@ -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
- menu.button icon: { name: 'zoom_in', badge: '!' }, text: 'Diagnostics', onClick: ->(action) do
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: '2012-01-01',
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/autoload_as_needed_float_columns', page: page_index + 1, section_only: 'v1'),
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 Float Columns', onClick: ->(action) do
33
- action.windows_open url: json_ui_garage_url(path: 'lists/autoload_as_needed_float_columns')
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: 'pending'
16
+ scroll.chip styleClass: 'success', text: 'Success'
17
17
  scroll.spacer height: 6
18
- scroll.chip text: 'Skills', onClick: ->(action) do
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.90
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/autoload_as_needed_float_columns.json.jbuilder
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