ui_bibz 4.0.0.beta9 → 4.0.0.beta10

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: c76a2d95cd0f178398298d2cdd0b01ed9c14e3a16ec135ec81447b2ecf40dfdf
4
- data.tar.gz: 1bcc88d47ad5512f9e1aac4b38aa869bf7c08d73f0f1c016aa4811ce099cdd9d
3
+ metadata.gz: '080015eb1e845c649a32a36071964c5fa4cd00577cb2c31b4b5aff4ab9e795d6'
4
+ data.tar.gz: 3be70d906cea6cc6b12edc2b1c3defdeda61409cfd7fcd41a320dfa18b8d03e6
5
5
  SHA512:
6
- metadata.gz: c8f9e6cfff1d7725acf80d5cc6d28521733bd7bb835de9761371f094373d31b3fe137e5b6db3082041c226986b2b9be8b38a765eccee3aa5d1af579db4d84849
7
- data.tar.gz: 9437dcf275c16c6baf5b9f3927a9d50377c6c6da717ad8117ad485b109dbcaf69cefaa35e2663a87e48d9cfe00c990c4a24937f81d3a2095fd4ea73f821716a6
6
+ metadata.gz: 130a6ff22a9787851316d8f7f4d0a9bda219f7fd6ad4ce99bf1e92e382aa1ca336160475e7dcdfdb9d2b64e25dab04d040775018229fbdb2631ff0bcd9bb92ee
7
+ data.tar.gz: 1ccca479b148dced9d5bd7cfa08152031fb786da9dda1b440b7398361cb9e2197277b0de59081cb00af9321b33c7f507d30c4a4a6cb9e05cd3345bd4c710c1ca
data/.gitignore CHANGED
@@ -45,3 +45,5 @@ coverage
45
45
 
46
46
  .DS_Store
47
47
  node_modules/
48
+ test/dummy/db/*.sqlite3-shm
49
+ test/dummy/db/*.sqlite3-wal
data/Gemfile CHANGED
@@ -16,6 +16,7 @@ group :development, :test do
16
16
  gem 'importmap-rails'
17
17
  gem 'minitest'
18
18
  gem 'overcommit'
19
+ gem 'propshaft'
19
20
  gem 'rubocop'
20
21
  gem 'rubocop-ast'
21
22
  gem 'rubocop-minitest'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ui_bibz (4.0.0.beta9)
4
+ ui_bibz (4.0.0.beta10)
5
5
  bootstrap-propshaft (~> 5.3.2.2)
6
6
  dartsass-rails
7
7
  rails (>= 7.1.0)
@@ -10,35 +10,35 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actioncable (7.1.2)
14
- actionpack (= 7.1.2)
15
- activesupport (= 7.1.2)
13
+ actioncable (7.1.3)
14
+ actionpack (= 7.1.3)
15
+ activesupport (= 7.1.3)
16
16
  nio4r (~> 2.0)
17
17
  websocket-driver (>= 0.6.1)
18
18
  zeitwerk (~> 2.6)
19
- actionmailbox (7.1.2)
20
- actionpack (= 7.1.2)
21
- activejob (= 7.1.2)
22
- activerecord (= 7.1.2)
23
- activestorage (= 7.1.2)
24
- activesupport (= 7.1.2)
19
+ actionmailbox (7.1.3)
20
+ actionpack (= 7.1.3)
21
+ activejob (= 7.1.3)
22
+ activerecord (= 7.1.3)
23
+ activestorage (= 7.1.3)
24
+ activesupport (= 7.1.3)
25
25
  mail (>= 2.7.1)
26
26
  net-imap
27
27
  net-pop
28
28
  net-smtp
29
- actionmailer (7.1.2)
30
- actionpack (= 7.1.2)
31
- actionview (= 7.1.2)
32
- activejob (= 7.1.2)
33
- activesupport (= 7.1.2)
29
+ actionmailer (7.1.3)
30
+ actionpack (= 7.1.3)
31
+ actionview (= 7.1.3)
32
+ activejob (= 7.1.3)
33
+ activesupport (= 7.1.3)
34
34
  mail (~> 2.5, >= 2.5.4)
35
35
  net-imap
36
36
  net-pop
37
37
  net-smtp
38
38
  rails-dom-testing (~> 2.2)
39
- actionpack (7.1.2)
40
- actionview (= 7.1.2)
41
- activesupport (= 7.1.2)
39
+ actionpack (7.1.3)
40
+ actionview (= 7.1.3)
41
+ activesupport (= 7.1.3)
42
42
  nokogiri (>= 1.8.5)
43
43
  racc
44
44
  rack (>= 2.2.4)
@@ -46,35 +46,35 @@ GEM
46
46
  rack-test (>= 0.6.3)
47
47
  rails-dom-testing (~> 2.2)
48
48
  rails-html-sanitizer (~> 1.6)
49
- actiontext (7.1.2)
50
- actionpack (= 7.1.2)
51
- activerecord (= 7.1.2)
52
- activestorage (= 7.1.2)
53
- activesupport (= 7.1.2)
49
+ actiontext (7.1.3)
50
+ actionpack (= 7.1.3)
51
+ activerecord (= 7.1.3)
52
+ activestorage (= 7.1.3)
53
+ activesupport (= 7.1.3)
54
54
  globalid (>= 0.6.0)
55
55
  nokogiri (>= 1.8.5)
56
- actionview (7.1.2)
57
- activesupport (= 7.1.2)
56
+ actionview (7.1.3)
57
+ activesupport (= 7.1.3)
58
58
  builder (~> 3.1)
59
59
  erubi (~> 1.11)
60
60
  rails-dom-testing (~> 2.2)
61
61
  rails-html-sanitizer (~> 1.6)
62
- activejob (7.1.2)
63
- activesupport (= 7.1.2)
62
+ activejob (7.1.3)
63
+ activesupport (= 7.1.3)
64
64
  globalid (>= 0.3.6)
65
- activemodel (7.1.2)
66
- activesupport (= 7.1.2)
67
- activerecord (7.1.2)
68
- activemodel (= 7.1.2)
69
- activesupport (= 7.1.2)
65
+ activemodel (7.1.3)
66
+ activesupport (= 7.1.3)
67
+ activerecord (7.1.3)
68
+ activemodel (= 7.1.3)
69
+ activesupport (= 7.1.3)
70
70
  timeout (>= 0.4.0)
71
- activestorage (7.1.2)
72
- actionpack (= 7.1.2)
73
- activejob (= 7.1.2)
74
- activerecord (= 7.1.2)
75
- activesupport (= 7.1.2)
71
+ activestorage (7.1.3)
72
+ actionpack (= 7.1.3)
73
+ activejob (= 7.1.3)
74
+ activerecord (= 7.1.3)
75
+ activesupport (= 7.1.3)
76
76
  marcel (~> 1.0)
77
- activesupport (7.1.2)
77
+ activesupport (7.1.3)
78
78
  base64
79
79
  bigdecimal
80
80
  concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -89,14 +89,14 @@ GEM
89
89
  execjs (~> 2)
90
90
  awesome_print (1.9.2)
91
91
  base64 (0.2.0)
92
- bigdecimal (3.1.5)
92
+ bigdecimal (3.1.6)
93
93
  bootstrap-propshaft (5.3.2.2)
94
94
  autoprefixer-rails (>= 9.1.0)
95
95
  popper_js (>= 2.11.8, < 3)
96
96
  builder (3.2.4)
97
97
  byebug (11.1.3)
98
- childprocess (4.1.0)
99
- concurrent-ruby (1.2.2)
98
+ childprocess (5.0.0)
99
+ concurrent-ruby (1.2.3)
100
100
  connection_pool (2.4.1)
101
101
  crass (1.0.6)
102
102
  dartsass-rails (0.5.0)
@@ -132,7 +132,7 @@ GEM
132
132
  activesupport (>= 6.0.0)
133
133
  railties (>= 6.0.0)
134
134
  iniparse (1.5.0)
135
- io-console (0.7.1)
135
+ io-console (0.7.2)
136
136
  irb (1.11.1)
137
137
  rdoc
138
138
  reline (>= 0.4.2)
@@ -148,7 +148,7 @@ GEM
148
148
  net-smtp
149
149
  marcel (1.0.2)
150
150
  mini_mime (1.1.5)
151
- minitest (5.21.1)
151
+ minitest (5.21.2)
152
152
  mutex_m (0.2.0)
153
153
  net-imap (0.4.9.1)
154
154
  date
@@ -164,21 +164,26 @@ GEM
164
164
  racc (~> 1.4)
165
165
  nokogiri (1.16.0-x86_64-linux)
166
166
  racc (~> 1.4)
167
- overcommit (0.61.0)
168
- childprocess (>= 0.6.3, < 5)
167
+ overcommit (0.62.0)
168
+ childprocess (>= 0.6.3, < 6)
169
169
  iniparse (~> 1.4)
170
170
  rexml (~> 3.2)
171
171
  parallel (1.24.0)
172
- parser (3.3.0.3)
172
+ parser (3.3.0.5)
173
173
  ast (~> 2.4.1)
174
174
  racc
175
175
  popper_js (2.11.8)
176
+ propshaft (0.8.0)
177
+ actionpack (>= 7.0.0)
178
+ activesupport (>= 7.0.0)
179
+ rack
180
+ railties (>= 7.0.0)
176
181
  psych (5.1.2)
177
182
  stringio
178
183
  puma (6.4.2)
179
184
  nio4r (~> 2.0)
180
185
  racc (1.7.3)
181
- rack (3.0.8)
186
+ rack (3.0.9)
182
187
  rack-session (2.0.0)
183
188
  rack (>= 3.0.0)
184
189
  rack-test (2.1.0)
@@ -186,20 +191,20 @@ GEM
186
191
  rackup (2.1.0)
187
192
  rack (>= 3)
188
193
  webrick (~> 1.8)
189
- rails (7.1.2)
190
- actioncable (= 7.1.2)
191
- actionmailbox (= 7.1.2)
192
- actionmailer (= 7.1.2)
193
- actionpack (= 7.1.2)
194
- actiontext (= 7.1.2)
195
- actionview (= 7.1.2)
196
- activejob (= 7.1.2)
197
- activemodel (= 7.1.2)
198
- activerecord (= 7.1.2)
199
- activestorage (= 7.1.2)
200
- activesupport (= 7.1.2)
194
+ rails (7.1.3)
195
+ actioncable (= 7.1.3)
196
+ actionmailbox (= 7.1.3)
197
+ actionmailer (= 7.1.3)
198
+ actionpack (= 7.1.3)
199
+ actiontext (= 7.1.3)
200
+ actionview (= 7.1.3)
201
+ activejob (= 7.1.3)
202
+ activemodel (= 7.1.3)
203
+ activerecord (= 7.1.3)
204
+ activestorage (= 7.1.3)
205
+ activesupport (= 7.1.3)
201
206
  bundler (>= 1.15.0)
202
- railties (= 7.1.2)
207
+ railties (= 7.1.3)
203
208
  rails-dom-testing (2.2.0)
204
209
  activesupport (>= 5.0.0)
205
210
  minitest
@@ -207,9 +212,9 @@ GEM
207
212
  rails-html-sanitizer (1.6.0)
208
213
  loofah (~> 2.21)
209
214
  nokogiri (~> 1.14)
210
- railties (7.1.2)
211
- actionpack (= 7.1.2)
212
- activesupport (= 7.1.2)
215
+ railties (7.1.3)
216
+ actionpack (= 7.1.3)
217
+ activesupport (= 7.1.3)
213
218
  irb
214
219
  rackup (>= 1.0.0)
215
220
  rake (>= 12.2)
@@ -223,7 +228,7 @@ GEM
223
228
  reline (0.4.2)
224
229
  io-console (~> 0.5)
225
230
  rexml (3.2.6)
226
- rubocop (1.60.0)
231
+ rubocop (1.60.2)
227
232
  json (~> 2.3)
228
233
  language_server-protocol (>= 3.17.0)
229
234
  parallel (~> 1.10)
@@ -236,7 +241,7 @@ GEM
236
241
  unicode-display_width (>= 2.4.0, < 3.0)
237
242
  rubocop-ast (1.30.0)
238
243
  parser (>= 3.2.1.0)
239
- rubocop-minitest (0.34.4)
244
+ rubocop-minitest (0.34.5)
240
245
  rubocop (>= 1.39, < 2.0)
241
246
  rubocop-ast (>= 1.30.0, < 2.0)
242
247
  rubocop-performance (1.20.2)
@@ -249,9 +254,9 @@ GEM
249
254
  rubocop-ast (>= 1.30.0, < 2.0)
250
255
  ruby-progressbar (1.13.0)
251
256
  ruby2_keywords (0.0.5)
252
- sass-embedded (1.69.7-x86_64-darwin)
257
+ sass-embedded (1.70.0-x86_64-darwin)
253
258
  google-protobuf (~> 3.25)
254
- sass-embedded (1.69.7-x86_64-linux-gnu)
259
+ sass-embedded (1.70.0-x86_64-linux-gnu)
255
260
  google-protobuf (~> 3.25)
256
261
  simple_form (5.3.0)
257
262
  actionpack (>= 5.2)
@@ -262,8 +267,8 @@ GEM
262
267
  simplecov_json_formatter (~> 0.1)
263
268
  simplecov-html (0.12.3)
264
269
  simplecov_json_formatter (0.1.4)
265
- sqlite3 (1.7.0-x86_64-darwin)
266
- sqlite3 (1.7.0-x86_64-linux)
270
+ sqlite3 (1.7.2-x86_64-darwin)
271
+ sqlite3 (1.7.2-x86_64-linux)
267
272
  stringio (3.1.0)
268
273
  temple (0.10.3)
269
274
  thor (1.3.0)
@@ -293,6 +298,7 @@ DEPENDENCIES
293
298
  importmap-rails
294
299
  minitest
295
300
  overcommit
301
+ propshaft
296
302
  puma
297
303
  rubocop
298
304
  rubocop-ast
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- Rails.application.config.assets.precompile += %w[bootstrap.min.js popper.js
4
- jquery-3.7.0.min.js bootstrap-multiselect.min.js jquery.multi-select.min.js
5
- forms.js interfaces.js tables.js forms/formula.js forms/input-connected.js forms/jquery.multi-select-extend.js controllers/combobox_controller.js debounce.js"]
3
+ # Rails.application.config.assets.precompile += %w[bootstrap.min.js popper.js
4
+ # jquery-3.7.0.min.js bootstrap-multiselect.min.js jquery.multi-select.min.js
5
+ # forms.js interfaces.js tables.js forms/formula.js forms/input-connected.js forms/jquery.multi-select-extend.js controllers/combobox_controller.js debounce.js"]
@@ -15,3 +15,7 @@ fr:
15
15
  show: 'Voir'
16
16
  delete: 'Supprimer'
17
17
  edit: 'Editer'
18
+ will_paginate:
19
+ page_entries_info:
20
+ multi_page: "Affichage %{from} - %{to} sur %{count}"
21
+ multi_page_html: "Affichage <b>%{from}&nbsp;-&nbsp;%{to}</b> sur <b>%{count}</b>"
@@ -3,12 +3,14 @@
3
3
  module UiBibz::Builders
4
4
  # Class to build html classes
5
5
  class DataHtmlOptionsBuilder
6
+ include ActionView::Helpers::SanitizeHelper
6
7
  attr_accessor :html_options
7
- attr_reader :options
8
+ attr_reader :options, :content
8
9
 
9
- def initialize(html_options, options)
10
- @html_options = html_options
10
+ def initialize(content, options, html_options)
11
+ @content = content
11
12
  @options = options
13
+ @html_options = html_options
12
14
 
13
15
  stimulus_data_html
14
16
  hotwire_data_html
@@ -99,7 +101,7 @@ module UiBibz::Builders
99
101
  when 'UiBibz::Ui::Core::Notifications::Tooltip'
100
102
  options[:tooltip]
101
103
  when 'TrueClass'
102
- tooltip_content = html_options.delete(:title) || (sanitize_text(content) if options[:text] == false)
104
+ tooltip_content = html_options.delete(:title) || (sanitize(content) if options[:text] == false)
103
105
  UiBibz::Ui::Core::Notifications::Tooltip.new(tooltip_content)
104
106
  else
105
107
  UiBibz::Ui::Core::Notifications::Tooltip.new(options[:tooltip])
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 = '4.0.0.beta9'
15
+ VERSION = '4.0.0.beta10'
16
16
  AUTHORS = ['Thooams'].freeze
17
17
  end
@@ -62,7 +62,7 @@ module UiBibz::Ui::Core
62
62
  @html_options = component_initialize_factory_method.html_options
63
63
  @options = component_initialize_factory_method.options
64
64
 
65
- @data_html_options_builder = UiBibz::Builders::DataHtmlOptionsBuilder.new(@html_options, @options)
65
+ @data_html_options_builder = UiBibz::Builders::DataHtmlOptionsBuilder.new(@content, @options, @html_options)
66
66
 
67
67
  init_options
68
68
  init_component_html_options
@@ -9,15 +9,19 @@ module UiBibz::Ui::Ux::Tables
9
9
 
10
10
  # header use i18n
11
11
  def header(column, name = nil)
12
- @column = column
13
- defaults = [
14
- header_name(name),
15
- translate_headers_by_defaults,
16
- translate_headers_by_defaults_active_record,
17
- translate_headers_by_active_record,
18
- default_header_name(name)
19
- ].compact
20
- @name = UiBibz::Utils::Internationalization.new(translate_headers_by_model, default: defaults).translate
12
+ @column = column
13
+ @name = name
14
+ if @name.nil?
15
+ defaults = [
16
+ header_name(name),
17
+ translate_headers_by_defaults,
18
+ translate_headers_by_defaults_active_record,
19
+ translate_headers_by_active_record,
20
+ default_header_name(name)
21
+ ].compact
22
+
23
+ @name = UiBibz::Utils::Internationalization.new(translate_headers_by_model, default: defaults).translate
24
+ end
21
25
  sortable? ? sortable_link : title
22
26
  end
23
27
 
data/ui_bibz.gemspec CHANGED
@@ -27,13 +27,11 @@ Gem::Specification.new do |s|
27
27
 
28
28
  # Rails gems
29
29
  s.add_dependency 'rails', '>= 7.1.0'
30
-
31
30
  # Switch to bootstrap 5.3.3 as soon as possible
32
31
  s.add_dependency 'bootstrap-propshaft', '~> 5.3.2.2'
33
-
34
32
  s.add_dependency 'dartsass-rails'
35
33
  s.add_dependency 'will_paginate'
36
- # Don't move factory_bot_rails to Gemfile because of bug
34
+ # Don't move factory_bot_rails to Gemfile else it will be loaded in test/dummy
37
35
  s.add_development_dependency 'factory_bot_rails', '~> 4.0' # rubocop:disable Gemspec/DevelopmentDependencies
38
36
 
39
37
  s.metadata['rubygems_mfa_required'] = 'true'
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: 4.0.0.beta9
4
+ version: 4.0.0.beta10
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: 2024-01-15 00:00:00.000000000 Z
11
+ date: 2024-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails