ui_bibz 4.0.0.beta20 → 4.0.0.beta21
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/.rubocop.yml +7 -5
- data/Gemfile.lock +27 -31
- data/lib/ui_bibz/infos.rb +1 -1
- data/lib/ui_bibz/inputs/ui_bibz_form/ui_bibz_form_builder.rb +2 -2
- data/lib/ui_bibz/ui/core/forms/choices/choice_group.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/surrounds/surround_field.rb +1 -1
- data/lib/ui_bibz/ui/core/notifications/progress_bar.rb +1 -1
- data/lib/ui_bibz/ui/ux/tables/components/actions.rb +1 -1
- data/lib/ui_bibz/ui/ux/tables/components/as.rb +2 -0
- data/lib/ui_bibz/ui/ux/tables/components/column.rb +2 -1
- 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: a4cb50c5c79d9e893d861d7245501442920e614e1dd92163e4987cfdab24136f
|
4
|
+
data.tar.gz: 573b3dea48e44fbc2f99ff3ac1e54f76d79fd23460af00d3cceebb5368342111
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f47132d8c1c8e911b8eac29dbc0ec39cf69b5278ee18722a379295a5c378d387f18da2ea6f83dd6b8b2dd75aefe9cb93cb22facf3270677d0177c8d16155308e
|
7
|
+
data.tar.gz: a355f8c9c4e5cc16fe015fd1dc054fafe63a7ecda701d669ae2c2606e6df3682fed0022466e67c9b3d962657321a21947d15b12c0a39048df4a4592ba2f60dfe
|
data/.rubocop.yml
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
require:
|
2
2
|
- rubocop-ast
|
3
|
+
|
4
|
+
plugins:
|
3
5
|
- rubocop-performance
|
4
|
-
- rubocop-rails
|
5
6
|
- rubocop-minitest
|
7
|
+
- rubocop-rails
|
6
8
|
|
7
9
|
Layout/LineLength:
|
8
10
|
Enabled: false
|
@@ -13,24 +15,24 @@ AllCops:
|
|
13
15
|
Lint/UselessAssignment:
|
14
16
|
Enabled: true
|
15
17
|
Exclude:
|
16
|
-
-
|
18
|
+
- "test/ui/ux/tables/table_test.rb"
|
17
19
|
|
18
20
|
Style/AsciiComments:
|
19
21
|
Enabled: true
|
20
22
|
Exclude:
|
21
|
-
-
|
23
|
+
- "test/**/**/**/**/*"
|
22
24
|
|
23
25
|
Metrics/ClassLength:
|
24
26
|
Enabled: false
|
25
27
|
|
26
28
|
Style/FormatString:
|
27
29
|
Exclude:
|
28
|
-
-
|
30
|
+
- "config/initializers/will_paginate.rb"
|
29
31
|
|
30
32
|
Style/StringLiterals:
|
31
33
|
Enabled: true
|
32
34
|
Exclude:
|
33
|
-
-
|
35
|
+
- "test/**/**/**/**/*"
|
34
36
|
|
35
37
|
Style/ClassAndModuleChildren:
|
36
38
|
Enabled: false
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ui_bibz (4.0.0.
|
4
|
+
ui_bibz (4.0.0.beta21)
|
5
5
|
bootstrap (~> 5.3.3)
|
6
6
|
dartsass-rails
|
7
7
|
rails (>= 7.1.0)
|
@@ -82,21 +82,18 @@ GEM
|
|
82
82
|
tzinfo (~> 2.0, >= 2.0.5)
|
83
83
|
uri (>= 0.13.1)
|
84
84
|
ast (2.4.3)
|
85
|
-
autoprefixer-rails (10.4.19.0)
|
86
|
-
execjs (~> 2)
|
87
85
|
awesome_print (1.9.2)
|
88
86
|
base64 (0.2.0)
|
89
87
|
benchmark (0.4.0)
|
90
88
|
bigdecimal (3.1.9)
|
91
|
-
bootstrap (5.3.
|
92
|
-
autoprefixer-rails (>= 9.1.0)
|
89
|
+
bootstrap (5.3.5)
|
93
90
|
popper_js (>= 2.11.8, < 3)
|
94
91
|
builder (3.3.0)
|
95
92
|
byebug (12.0.0)
|
96
93
|
childprocess (5.1.0)
|
97
94
|
logger (~> 1.5)
|
98
95
|
concurrent-ruby (1.3.5)
|
99
|
-
connection_pool (2.5.
|
96
|
+
connection_pool (2.5.2)
|
100
97
|
crass (1.0.6)
|
101
98
|
dartsass-rails (0.5.1)
|
102
99
|
railties (>= 6.0.0)
|
@@ -105,7 +102,6 @@ GEM
|
|
105
102
|
docile (1.4.1)
|
106
103
|
drb (2.2.1)
|
107
104
|
erubi (1.13.1)
|
108
|
-
execjs (2.10.0)
|
109
105
|
factory_bot (4.11.1)
|
110
106
|
activesupport (>= 3.0.0)
|
111
107
|
factory_bot_rails (4.11.1)
|
@@ -113,10 +109,10 @@ GEM
|
|
113
109
|
railties (>= 3.0.0)
|
114
110
|
globalid (1.2.1)
|
115
111
|
activesupport (>= 6.1)
|
116
|
-
google-protobuf (4.30.
|
112
|
+
google-protobuf (4.30.2-x86_64-darwin)
|
117
113
|
bigdecimal
|
118
114
|
rake (>= 13)
|
119
|
-
google-protobuf (4.30.
|
115
|
+
google-protobuf (4.30.2-x86_64-linux)
|
120
116
|
bigdecimal
|
121
117
|
rake (>= 13)
|
122
118
|
haml (6.3.0)
|
@@ -136,14 +132,14 @@ GEM
|
|
136
132
|
railties (>= 6.0.0)
|
137
133
|
iniparse (1.5.0)
|
138
134
|
io-console (0.8.0)
|
139
|
-
irb (1.15.
|
135
|
+
irb (1.15.2)
|
140
136
|
pp (>= 0.6.0)
|
141
137
|
rdoc (>= 4.0.0)
|
142
138
|
reline (>= 0.4.2)
|
143
139
|
json (2.10.2)
|
144
140
|
language_server-protocol (3.17.0.4)
|
145
141
|
lint_roller (1.1.0)
|
146
|
-
logger (1.
|
142
|
+
logger (1.7.0)
|
147
143
|
loofah (2.24.0)
|
148
144
|
crass (~> 1.0.2)
|
149
145
|
nokogiri (>= 1.12.0)
|
@@ -155,7 +151,7 @@ GEM
|
|
155
151
|
marcel (1.0.4)
|
156
152
|
mini_mime (1.1.5)
|
157
153
|
minitest (5.25.5)
|
158
|
-
net-imap (0.5.
|
154
|
+
net-imap (0.5.7)
|
159
155
|
date
|
160
156
|
net-protocol
|
161
157
|
net-pop (0.1.2)
|
@@ -165,16 +161,16 @@ GEM
|
|
165
161
|
net-smtp (0.5.1)
|
166
162
|
net-protocol
|
167
163
|
nio4r (2.7.4)
|
168
|
-
nokogiri (1.18.
|
164
|
+
nokogiri (1.18.8-x86_64-darwin)
|
169
165
|
racc (~> 1.4)
|
170
|
-
nokogiri (1.18.
|
166
|
+
nokogiri (1.18.8-x86_64-linux-gnu)
|
171
167
|
racc (~> 1.4)
|
172
168
|
overcommit (0.67.1)
|
173
169
|
childprocess (>= 0.6.3, < 6)
|
174
170
|
iniparse (~> 1.4)
|
175
171
|
rexml (>= 3.3.9)
|
176
|
-
parallel (1.
|
177
|
-
parser (3.3.
|
172
|
+
parallel (1.27.0)
|
173
|
+
parser (3.3.8.0)
|
178
174
|
ast (~> 2.4.1)
|
179
175
|
racc
|
180
176
|
popper_js (2.11.8)
|
@@ -193,7 +189,7 @@ GEM
|
|
193
189
|
puma (6.6.0)
|
194
190
|
nio4r (~> 2.0)
|
195
191
|
racc (1.8.1)
|
196
|
-
rack (3.1.
|
192
|
+
rack (3.1.13)
|
197
193
|
rack-session (2.1.0)
|
198
194
|
base64 (>= 0.1.0)
|
199
195
|
rack (>= 3.0.0)
|
@@ -232,13 +228,13 @@ GEM
|
|
232
228
|
zeitwerk (~> 2.6)
|
233
229
|
rainbow (3.1.1)
|
234
230
|
rake (13.2.1)
|
235
|
-
rdoc (6.13.
|
231
|
+
rdoc (6.13.1)
|
236
232
|
psych (>= 4.0.0)
|
237
233
|
regexp_parser (2.10.0)
|
238
|
-
reline (0.6.
|
234
|
+
reline (0.6.1)
|
239
235
|
io-console (~> 0.5)
|
240
236
|
rexml (3.4.1)
|
241
|
-
rubocop (1.
|
237
|
+
rubocop (1.75.3)
|
242
238
|
json (~> 2.3)
|
243
239
|
language_server-protocol (~> 3.17.0.2)
|
244
240
|
lint_roller (~> 1.1.0)
|
@@ -246,30 +242,30 @@ GEM
|
|
246
242
|
parser (>= 3.3.0.2)
|
247
243
|
rainbow (>= 2.2.2, < 4.0)
|
248
244
|
regexp_parser (>= 2.9.3, < 3.0)
|
249
|
-
rubocop-ast (>= 1.
|
245
|
+
rubocop-ast (>= 1.44.0, < 2.0)
|
250
246
|
ruby-progressbar (~> 1.7)
|
251
247
|
unicode-display_width (>= 2.4.0, < 4.0)
|
252
|
-
rubocop-ast (1.
|
248
|
+
rubocop-ast (1.44.1)
|
253
249
|
parser (>= 3.3.7.2)
|
254
250
|
prism (~> 1.4)
|
255
|
-
rubocop-minitest (0.
|
251
|
+
rubocop-minitest (0.38.0)
|
256
252
|
lint_roller (~> 1.1)
|
257
|
-
rubocop (>= 1.
|
253
|
+
rubocop (>= 1.75.0, < 2.0)
|
258
254
|
rubocop-ast (>= 1.38.0, < 2.0)
|
259
|
-
rubocop-performance (1.
|
255
|
+
rubocop-performance (1.25.0)
|
260
256
|
lint_roller (~> 1.1)
|
261
|
-
rubocop (>= 1.
|
257
|
+
rubocop (>= 1.75.0, < 2.0)
|
262
258
|
rubocop-ast (>= 1.38.0, < 2.0)
|
263
|
-
rubocop-rails (2.
|
259
|
+
rubocop-rails (2.31.0)
|
264
260
|
activesupport (>= 4.2.0)
|
265
261
|
lint_roller (~> 1.1)
|
266
262
|
rack (>= 1.1)
|
267
|
-
rubocop (>= 1.
|
263
|
+
rubocop (>= 1.75.0, < 2.0)
|
268
264
|
rubocop-ast (>= 1.38.0, < 2.0)
|
269
265
|
ruby-progressbar (1.13.0)
|
270
|
-
sass-embedded (1.
|
266
|
+
sass-embedded (1.87.0-x86_64-darwin)
|
271
267
|
google-protobuf (~> 4.30)
|
272
|
-
sass-embedded (1.
|
268
|
+
sass-embedded (1.87.0-x86_64-linux-gnu)
|
273
269
|
google-protobuf (~> 4.30)
|
274
270
|
securerandom (0.4.1)
|
275
271
|
simple_form (5.3.1)
|
@@ -283,7 +279,7 @@ GEM
|
|
283
279
|
simplecov_json_formatter (0.1.4)
|
284
280
|
sqlite3 (2.6.0-x86_64-darwin)
|
285
281
|
sqlite3 (2.6.0-x86_64-linux-gnu)
|
286
|
-
stringio (3.1.
|
282
|
+
stringio (3.1.7)
|
287
283
|
temple (0.10.3)
|
288
284
|
thor (1.3.2)
|
289
285
|
tilt (2.6.0)
|
data/lib/ui_bibz/infos.rb
CHANGED
@@ -18,8 +18,8 @@ module UiBibzForm
|
|
18
18
|
surround_field = UiBibz::Ui::Core::Forms::Surrounds::SurroundField.new(content, opts, html_options).tap(&block)
|
19
19
|
errors_text = surround_field.errors.flatten.to_sentence
|
20
20
|
required = surround_field.required_fields.any?(true)
|
21
|
-
wrapper_classes = UiBibz::Builders::HtmlClassesBuilder.join_classes(
|
22
|
-
label_classes = UiBibz::Builders::HtmlClassesBuilder.join_classes(
|
21
|
+
wrapper_classes = UiBibz::Builders::HtmlClassesBuilder.join_classes(errors_text.present? ? 'has-error' : nil, wrapper_html.try(:[], :class))
|
22
|
+
label_classes = UiBibz::Builders::HtmlClassesBuilder.join_classes(required ? 'required' : nil, 'control-label')
|
23
23
|
abbr_html = content_tag('abbr', I18n.t(:'simple_form.required.mark', default: '*'), title: I18n.t(:'simple_form.required.text', default: 'required')) if required
|
24
24
|
|
25
25
|
wrapper_html[:class] = wrapper_classes
|
@@ -79,7 +79,7 @@ module UiBibz::Ui::Core::Forms::Choices
|
|
79
79
|
@items << @options[:form].input(attribute_name, new_options, &)
|
80
80
|
obj = @options[:form].object
|
81
81
|
@errors << obj.errors[attribute_name] unless obj.errors[attribute_name].empty?
|
82
|
-
@required_fields <<
|
82
|
+
@required_fields << obj._validators[attribute_name].try(:first).instance_of?(::ActiveRecord::Validations::PresenceValidator)
|
83
83
|
end
|
84
84
|
|
85
85
|
private
|
@@ -72,7 +72,7 @@ module UiBibz::Ui::Core::Forms::Surrounds
|
|
72
72
|
@items << @options[:form].input(attribute_name, options.merge({ label: false, wrapper: false, error: false }), &)
|
73
73
|
obj = @options[:form].object
|
74
74
|
@errors << obj.errors[attribute_name] unless obj.errors[attribute_name].empty?
|
75
|
-
@required_fields <<
|
75
|
+
@required_fields << obj._validators[attribute_name].try(:first).instance_of?(::ActiveRecord::Validations::PresenceValidator)
|
76
76
|
end
|
77
77
|
|
78
78
|
def glyph(content = nil, options = {}, html_options = nil, &)
|
@@ -97,7 +97,7 @@ module UiBibz::Ui::Core::Notifications
|
|
97
97
|
stacked_colors.map.with_index do |color, i|
|
98
98
|
if percentages[0, i].sum <= content.to_f
|
99
99
|
if content.to_f.between?(percentages[0, i].sum, percentages[0, i + 1].sum)
|
100
|
-
UiBibz::Ui::Core::Notifications::Components::Bar.new(
|
100
|
+
UiBibz::Ui::Core::Notifications::Components::Bar.new(content.to_f * percentages[i] / 100, min: 0, striped: options[:striped], animated: options[:animated], max: 100, status: color).render
|
101
101
|
else
|
102
102
|
UiBibz::Ui::Core::Notifications::Components::Bar.new(percentages[i], min: 0, striped: options[:striped], animated: options[:animated], max: 100, status: color).render
|
103
103
|
end
|
@@ -53,7 +53,7 @@ module UiBibz::Ui::Ux::Tables
|
|
53
53
|
[
|
54
54
|
UiBibz::Ui::Core::Forms::Dropdowns::Components::DropdownLink.new(show_name, url: { controller: @store.actions_controller, action: 'show' }.merge({ @store.id_key => @store.id_key }), glyph: 'eye').render,
|
55
55
|
UiBibz::Ui::Core::Forms::Dropdowns::Components::DropdownLink.new(edit_name, url: { controller: @store.actions_controller, action: 'edit' }.merge({ @store.id_key => @store.id_key }), glyph: 'edit').render,
|
56
|
-
UiBibz::Ui::Core::Forms::Dropdowns::Components::DropdownLink.new(delete_name, { glyph: 'trash', url: { controller: @store.actions_controller, action: 'destroy' }.merge({ @store.id_key => @store.id_key }), link_html_options: { data: {
|
56
|
+
UiBibz::Ui::Core::Forms::Dropdowns::Components::DropdownLink.new(delete_name, { glyph: 'trash', url: { controller: @store.actions_controller, action: 'destroy' }.merge({ @store.id_key => @store.id_key }), link_html_options: { data: { turbo_confirm: 'Are you sure?', turbo_method: :delete } } }).render
|
57
57
|
]
|
58
58
|
end
|
59
59
|
|
@@ -20,6 +20,8 @@ module UiBibz::Ui::Ux::Tables
|
|
20
20
|
when :input
|
21
21
|
inp_options = (@col.input_options || {}).merge({ label: false })
|
22
22
|
@form.input @col.data_index, inp_options
|
23
|
+
when :association
|
24
|
+
@record.send(@col.data_index).send(@col.association_attribute)
|
23
25
|
end
|
24
26
|
end
|
25
27
|
|
@@ -4,7 +4,7 @@ module UiBibz::Ui::Ux::Tables
|
|
4
4
|
class Column < UiBibz::Ui::Core::Component
|
5
5
|
attr_accessor :hidden, :link, :name, :input_options, :class, :as, :data_index,
|
6
6
|
:date_format, :sort, :format, :count, :custom_sort, :parent, :id, :progress_options,
|
7
|
-
:sortable
|
7
|
+
:sortable, :association_attribute
|
8
8
|
|
9
9
|
def initialize(content = nil, options = nil, html_options = nil, &)
|
10
10
|
super
|
@@ -24,6 +24,7 @@ module UiBibz::Ui::Ux::Tables
|
|
24
24
|
@hidden = @options[:hidden]
|
25
25
|
@sortable = @options[:sortable]
|
26
26
|
@input_options = @options[:input_options]
|
27
|
+
@association_attribute = @options[:association_attribute]
|
27
28
|
@progress_options = @options[:progress_options] || {}
|
28
29
|
end
|
29
30
|
|
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.
|
4
|
+
version: 4.0.0.beta21
|
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: 2025-
|
11
|
+
date: 2025-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bootstrap
|