ui_bibz 3.0.7 → 3.0.11

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: '09075fad5e0a57ae7e47b66cb1e9d84d9e208674216317117fc4cbd74002ec83'
4
- data.tar.gz: 717b8ed5d3cfe6bdfa003d2db3e240427e2b96a494f8d422e085d0563e60d09c
3
+ metadata.gz: f5337e14b3b5be637323fc3daee3a8631e9d16eabf12fd2e467f87c3005ca447
4
+ data.tar.gz: 8f30eab7ca72300d8832d0a415dc5375da20021685e58dac6a4449d2de7f316c
5
5
  SHA512:
6
- metadata.gz: 756bb32c729a77d6de316ed2279745e0bc22e3c75e0f9f4e7c8c8d560d60f2c938fb445c84922c46536b3c4c49b151db1f45bb4155668f2418acdbc864f5c46f
7
- data.tar.gz: d6e66096bb51fa27ae70f6f3c4a0715bff947df9c1fd9ef07c5f2193e1251a5d037467be677fabf4e1a6c2a1f9a7d5b8dceca8c974833627ecfae10e22745e8e
6
+ metadata.gz: 65c8c8f10e142f1a94653f779471f9ea86909b7334413c2a532c18e6f9750736f891ec6fbeb710bca0370ad861d40cacb2bd30f365abcda8ba042a9f2bdcedf3
7
+ data.tar.gz: 960429942f530afe95b51a1a7af8cb586089552e3fc6bd40b940f21df38e463dd8db8daf7613f6343cdcb7e048936dae2ca3d9ee9829e3adcdf3de665aa73032
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ui_bibz (3.0.7)
4
+ ui_bibz (3.0.11)
5
5
  will-paginate-i18n
6
6
  will_paginate (~> 3.3.0)
7
7
  will_paginate-bootstrap4
@@ -83,7 +83,7 @@ GEM
83
83
  factory_bot_rails (4.11.1)
84
84
  factory_bot (~> 4.11.1)
85
85
  railties (>= 3.0.0)
86
- globalid (0.5.2)
86
+ globalid (1.0.0)
87
87
  activesupport (>= 5.0)
88
88
  haml (5.2.2)
89
89
  temple (>= 0.8.0)
@@ -99,7 +99,7 @@ GEM
99
99
  haml (>= 4.0, < 6)
100
100
  nokogiri (>= 1.6.0)
101
101
  ruby_parser (~> 3.5)
102
- i18n (1.8.10)
102
+ i18n (1.8.11)
103
103
  concurrent-ruby (~> 1.0)
104
104
  iniparse (1.5.0)
105
105
  jquery-rails (4.4.0)
@@ -125,9 +125,9 @@ GEM
125
125
  iniparse (~> 1.4)
126
126
  rexml (~> 3.2)
127
127
  parallel (1.21.0)
128
- parser (3.0.2.0)
128
+ parser (3.0.3.1)
129
129
  ast (~> 2.4.1)
130
- racc (1.5.2)
130
+ racc (1.6.0)
131
131
  rack (2.2.3)
132
132
  rack-test (1.1.0)
133
133
  rack (>= 1.0, < 3)
@@ -159,9 +159,9 @@ GEM
159
159
  thor (~> 1.0)
160
160
  rainbow (3.0.0)
161
161
  rake (13.0.6)
162
- regexp_parser (2.1.1)
162
+ regexp_parser (2.2.0)
163
163
  rexml (3.2.5)
164
- rubocop (1.22.1)
164
+ rubocop (1.23.0)
165
165
  parallel (~> 1.10)
166
166
  parser (>= 3.0.0.0)
167
167
  rainbow (>= 2.2.2, < 4.0)
@@ -170,11 +170,11 @@ GEM
170
170
  rubocop-ast (>= 1.12.0, < 2.0)
171
171
  ruby-progressbar (~> 1.7)
172
172
  unicode-display_width (>= 1.4.0, < 3.0)
173
- rubocop-ast (1.12.0)
173
+ rubocop-ast (1.14.0)
174
174
  parser (>= 3.0.1.1)
175
- rubocop-minitest (0.15.2)
175
+ rubocop-minitest (0.17.0)
176
176
  rubocop (>= 0.90, < 2.0)
177
- rubocop-performance (1.11.5)
177
+ rubocop-performance (1.12.0)
178
178
  rubocop (>= 1.7.0, < 2.0)
179
179
  rubocop-ast (>= 0.4.0)
180
180
  rubocop-rails (2.12.4)
@@ -182,9 +182,9 @@ GEM
182
182
  rack (>= 1.1)
183
183
  rubocop (>= 1.7.0, < 2.0)
184
184
  ruby-progressbar (1.11.0)
185
- ruby_parser (3.17.0)
186
- sexp_processor (~> 4.15, >= 4.15.1)
187
- sexp_processor (4.15.3)
185
+ ruby_parser (3.18.1)
186
+ sexp_processor (~> 4.16)
187
+ sexp_processor (4.16.0)
188
188
  simple_form (5.1.0)
189
189
  actionpack (>= 5.2)
190
190
  activemodel (>= 5.2)
@@ -197,9 +197,9 @@ GEM
197
197
  sprockets (4.0.2)
198
198
  concurrent-ruby (~> 1.0)
199
199
  rack (> 1, < 3)
200
- sprockets-rails (3.2.2)
201
- actionpack (>= 4.0)
202
- activesupport (>= 4.0)
200
+ sprockets-rails (3.4.1)
201
+ actionpack (>= 5.2)
202
+ activesupport (>= 5.2)
203
203
  sprockets (>= 3.0.0)
204
204
  sqlite3 (1.4.2)
205
205
  temple (0.8.2)
@@ -208,6 +208,7 @@ GEM
208
208
  tzinfo (2.0.4)
209
209
  concurrent-ruby (~> 1.0)
210
210
  unicode-display_width (2.1.0)
211
+ webrick (1.7.0)
211
212
  websocket-driver (0.7.5)
212
213
  websocket-extensions (>= 0.1.0)
213
214
  websocket-extensions (0.1.5)
@@ -215,8 +216,9 @@ GEM
215
216
  will_paginate (3.3.1)
216
217
  will_paginate-bootstrap4 (0.2.2)
217
218
  will_paginate (~> 3.0, >= 3.0.0)
218
- yard (0.9.26)
219
- zeitwerk (2.4.2)
219
+ yard (0.9.27)
220
+ webrick (~> 1.7.0)
221
+ zeitwerk (2.5.1)
220
222
 
221
223
  PLATFORMS
222
224
  ruby
@@ -82,7 +82,7 @@ module UiBibz::Concerns::Models::Searchable
82
82
 
83
83
  def self.generate_default_sql(sql)
84
84
  if sorting?
85
- sql.paginate(page: @tmp_params[:page], per_page: @tmp_params[:per_page])
85
+ sql.reorder('').paginate(page: @tmp_params[:page], per_page: @tmp_params[:per_page])
86
86
  else
87
87
  sql.reorder(order_sql).paginate(page: @tmp_params[:page], per_page: @tmp_params[:per_page])
88
88
  end
@@ -134,8 +134,10 @@ module UiBibz::Concerns::Models::Searchable
134
134
  else
135
135
  key_name = attribute.keys.first.to_s.pluralize
136
136
  attribute.each_value do |value|
137
- sql_subquery << "lower(CAST(#{key_name}.#{value} AS TEXT)) LIKE :#{key_name}_#{value}_#{i}"
138
- sql_attributes = sql_attributes.merge({ "#{key_name}_#{value}_#{i}".to_sym => "%#{pattern}%" })
137
+ Array(value).each do |val|
138
+ sql_subquery << "lower(CAST(#{key_name}.#{val} AS TEXT)) LIKE :#{key_name}_#{val}_#{i}"
139
+ sql_attributes = sql_attributes.merge({ "#{key_name}_#{val}_#{i}".to_sym => "%#{pattern}%" })
140
+ end
139
141
  end
140
142
  end
141
143
  else
@@ -150,7 +152,7 @@ module UiBibz::Concerns::Models::Searchable
150
152
  end
151
153
 
152
154
  def self.order_sql
153
- sorting? ? "#{table_name}.id asc" : "#{@tmp_params[:sort]} #{@tmp_params[:direction]}"
155
+ sorting? ? '' : "#{@tmp_params[:sort]} #{@tmp_params[:direction]}"
154
156
  end
155
157
 
156
158
  def self.search_sort_paginate
data/lib/ui_bibz/infos.rb CHANGED
@@ -12,6 +12,6 @@ module UiBibz
12
12
  REPO = 'git+https://github.com/thooams/ui_bibz.git'
13
13
  EMAIL = 'thomas@hummel.link'
14
14
  AUTHOR = 'Thooams [Thomas HUMMEL]'
15
- VERSION = '3.0.7'
15
+ VERSION = '3.0.11'
16
16
  AUTHORS = ['Thooams'].freeze
17
17
  end
@@ -69,9 +69,9 @@ module UiBibz::Ui::Core::Forms::Selects
69
69
  def component_html_options
70
70
  super.merge({
71
71
  multiple: options[:multiple],
72
- disabled: options[:state] == :disabled,
73
- include_blank: false,
74
- prompt: false
72
+ disabled: options[:state] == :disabled
73
+ # include_blank: false,
74
+ # prompt: false
75
75
  })
76
76
  end
77
77
 
@@ -2,7 +2,9 @@
2
2
 
3
3
  module UiBibz::Ui::Ux::Tables
4
4
  class Column < UiBibz::Ui::Core::Component
5
- attr_accessor :hidden, :link, :name, :input_options, :class, :as, :data_index, :date_format, :sort, :format, :count, :custom_sort, :parent, :id, :progress_options
5
+ attr_accessor :hidden, :link, :name, :input_options, :class, :as, :data_index,
6
+ :date_format, :sort, :format, :count, :custom_sort, :parent, :id, :progress_options,
7
+ :sortable
6
8
 
7
9
  def initialize(content = nil, options = nil, html_options = nil, &block)
8
10
  super
@@ -20,6 +22,7 @@ module UiBibz::Ui::Ux::Tables
20
22
  @format = @options[:format]
21
23
  @class = @options[:class]
22
24
  @hidden = @options[:hidden]
25
+ @sortable = @options[:sortable]
23
26
  @input_options = @options[:input_options]
24
27
  @progress_options = @options[:progress_options] || {}
25
28
  end
@@ -75,7 +75,13 @@ module UiBibz::Ui::Ux::Tables
75
75
  end
76
76
 
77
77
  def sortable?
78
- @options[:sortable].nil? ? true : @options[:sortable]
78
+ if !@column.sortable.nil?
79
+ @column.sortable
80
+ elsif !@options[:sortable].nil?
81
+ @options[:sortable]
82
+ else
83
+ true
84
+ end
79
85
  end
80
86
 
81
87
  def title
data/ui_bibz.gemspec CHANGED
@@ -48,4 +48,7 @@ Gem::Specification.new do |s|
48
48
  s.add_development_dependency 'simple_form'
49
49
  s.add_development_dependency 'sqlite3'
50
50
  s.add_development_dependency 'yard'
51
+ s.metadata = {
52
+ 'rubygems_mfa_required' => 'true'
53
+ }
51
54
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ui_bibz
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.7
4
+ version: 3.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thooams [Thomas HUMMEL]
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-18 00:00:00.000000000 Z
11
+ date: 2021-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -662,7 +662,8 @@ files:
662
662
  homepage: https://hummel.link/ui-bibz/
663
663
  licenses:
664
664
  - MIT
665
- metadata: {}
665
+ metadata:
666
+ rubygems_mfa_required: 'true'
666
667
  post_install_message:
667
668
  rdoc_options: []
668
669
  require_paths: