ui_bibz 4.0.0.beta7 → 4.0.0.beta9
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/.overcommit.yml +0 -3
- data/.rubocop.yml +1 -4
- data/.ruby-version +1 -1
- data/Gemfile.lock +51 -66
- data/app/assets/config/ui_bibz.js +1 -0
- data/app/assets/stylesheets/sass/containers/_panel.scss +5 -5
- data/app/assets/stylesheets/ui_bibz.sass +16 -16
- data/lib/ui_bibz/concerns/models/searchable.rb +3 -3
- data/lib/ui_bibz/helpers/utils_helper.rb +2 -2
- data/lib/ui_bibz/infos.rb +2 -2
- data/lib/ui_bibz/inputs/ui_bibz_form/ui_bibz_form_builder.rb +8 -8
- data/lib/ui_bibz/ui/core/forms/buttons/button.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/dropdowns/split_dropdown.rb +1 -1
- data/lib/ui_bibz/ui/core/lists/components/list.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/tab_group.rb +1 -1
- data/lib/ui_bibz/ui/core/notifications/toast.rb +3 -3
- data/lib/ui_bibz/ui/ux/tables/table.rb +1 -1
- data/lib/ui_bibz/ui/ux/tables/table_pagination.rb +0 -2
- data/lib/ui_bibz/ui/ux/tables/table_pagination_per_page.rb +15 -7
- data/lib/ui_bibz/ui/ux/tables/table_search_field.rb +1 -1
- data/lib/ui_bibz.rb +0 -1
- data/test/ui/ux/tables/table_test.rb +1 -1
- data/ui_bibz.gemspec +6 -7
- data/vendor/assets/fonts/fontawesome/fa-brands-400.ttf +0 -0
- data/vendor/assets/fonts/fontawesome/fa-brands-400.woff2 +0 -0
- data/vendor/assets/fonts/fontawesome/fa-regular-400.ttf +0 -0
- data/vendor/assets/fonts/fontawesome/fa-regular-400.woff2 +0 -0
- data/vendor/assets/fonts/fontawesome/fa-solid-900.ttf +0 -0
- data/vendor/assets/fonts/fontawesome/fa-solid-900.woff2 +0 -0
- data/vendor/assets/fonts/fontawesome/fa-v4compatibility.ttf +0 -0
- data/vendor/assets/fonts/fontawesome/fa-v4compatibility.woff2 +0 -0
- data/vendor/assets/javascripts/fontawesome/all.js +308 -259
- data/vendor/assets/javascripts/fontawesome/all.min.js +2 -2
- data/vendor/assets/javascripts/fontawesome/brands.js +93 -68
- data/vendor/assets/javascripts/fontawesome/brands.min.js +2 -2
- data/vendor/assets/javascripts/fontawesome/conflict-detection.js +44 -36
- data/vendor/assets/javascripts/fontawesome/conflict-detection.min.js +2 -2
- data/vendor/assets/javascripts/fontawesome/fontawesome.js +49 -41
- data/vendor/assets/javascripts/fontawesome/fontawesome.min.js +2 -2
- data/vendor/assets/javascripts/fontawesome/regular.js +59 -51
- data/vendor/assets/javascripts/fontawesome/regular.min.js +2 -2
- data/vendor/assets/javascripts/fontawesome/solid.js +110 -102
- data/vendor/assets/javascripts/fontawesome/solid.min.js +2 -2
- data/vendor/assets/javascripts/fontawesome/v4-shims.js +44 -36
- data/vendor/assets/javascripts/fontawesome/v4-shims.min.js +2 -2
- data/vendor/assets/stylesheets/fontawesome/_mixins.scss +1 -1
- data/vendor/assets/stylesheets/fontawesome/_variables.scss +34 -2
- data/vendor/assets/stylesheets/fontawesome/brands.scss +1 -1
- data/vendor/assets/stylesheets/fontawesome/fontawesome.scss +1 -1
- data/vendor/assets/stylesheets/fontawesome/regular.scss +1 -1
- data/vendor/assets/stylesheets/fontawesome/solid.scss +3 -3
- data/vendor/assets/stylesheets/fontawesome/v4-shims.scss +1 -1
- metadata +11 -39
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c76a2d95cd0f178398298d2cdd0b01ed9c14e3a16ec135ec81447b2ecf40dfdf
|
|
4
|
+
data.tar.gz: 1bcc88d47ad5512f9e1aac4b38aa869bf7c08d73f0f1c016aa4811ce099cdd9d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c8f9e6cfff1d7725acf80d5cc6d28521733bd7bb835de9761371f094373d31b3fe137e5b6db3082041c226986b2b9be8b38a765eccee3aa5d1af579db4d84849
|
|
7
|
+
data.tar.gz: 9437dcf275c16c6baf5b9f3927a9d50377c6c6da717ad8117ad485b109dbcaf69cefaa35e2663a87e48d9cfe00c990c4a24937f81d3a2095fd4ea73f821716a6
|
data/.overcommit.yml
CHANGED
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
ruby-3.
|
|
1
|
+
ruby-3.3.0
|
data/Gemfile.lock
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
ui_bibz (4.0.0.
|
|
5
|
-
bootstrap (~> 5.3.
|
|
6
|
-
dartsass-
|
|
4
|
+
ui_bibz (4.0.0.beta9)
|
|
5
|
+
bootstrap-propshaft (~> 5.3.2.2)
|
|
6
|
+
dartsass-rails
|
|
7
7
|
rails (>= 7.1.0)
|
|
8
|
-
|
|
9
|
-
will_paginate (~> 3.3.0)
|
|
10
|
-
will_paginate-bootstrap4
|
|
8
|
+
will_paginate
|
|
11
9
|
|
|
12
10
|
GEM
|
|
13
11
|
remote: https://rubygems.org/
|
|
@@ -87,12 +85,12 @@ GEM
|
|
|
87
85
|
mutex_m
|
|
88
86
|
tzinfo (~> 2.0)
|
|
89
87
|
ast (2.4.2)
|
|
90
|
-
autoprefixer-rails (10.4.
|
|
88
|
+
autoprefixer-rails (10.4.16.0)
|
|
91
89
|
execjs (~> 2)
|
|
92
90
|
awesome_print (1.9.2)
|
|
93
91
|
base64 (0.2.0)
|
|
94
|
-
bigdecimal (3.1.
|
|
95
|
-
bootstrap (5.3.2)
|
|
92
|
+
bigdecimal (3.1.5)
|
|
93
|
+
bootstrap-propshaft (5.3.2.2)
|
|
96
94
|
autoprefixer-rails (>= 9.1.0)
|
|
97
95
|
popper_js (>= 2.11.8, < 3)
|
|
98
96
|
builder (3.2.4)
|
|
@@ -101,14 +99,9 @@ GEM
|
|
|
101
99
|
concurrent-ruby (1.2.2)
|
|
102
100
|
connection_pool (2.4.1)
|
|
103
101
|
crass (1.0.6)
|
|
104
|
-
dartsass-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
dartsass-ruby (~> 3.0)
|
|
108
|
-
railties (>= 4.0.0)
|
|
109
|
-
sprockets (> 3.0)
|
|
110
|
-
sprockets-rails
|
|
111
|
-
tilt
|
|
102
|
+
dartsass-rails (0.5.0)
|
|
103
|
+
railties (>= 6.0.0)
|
|
104
|
+
sass-embedded (~> 1.63)
|
|
112
105
|
date (3.3.4)
|
|
113
106
|
docile (1.4.0)
|
|
114
107
|
drb (2.2.0)
|
|
@@ -122,9 +115,8 @@ GEM
|
|
|
122
115
|
railties (>= 3.0.0)
|
|
123
116
|
globalid (1.2.1)
|
|
124
117
|
activesupport (>= 6.1)
|
|
125
|
-
google-protobuf (3.25.
|
|
126
|
-
|
|
127
|
-
haml (6.2.3)
|
|
118
|
+
google-protobuf (3.25.2)
|
|
119
|
+
haml (6.3.0)
|
|
128
120
|
temple (>= 0.8.2)
|
|
129
121
|
thor
|
|
130
122
|
tilt
|
|
@@ -135,16 +127,16 @@ GEM
|
|
|
135
127
|
railties (>= 5.1)
|
|
136
128
|
i18n (1.14.1)
|
|
137
129
|
concurrent-ruby (~> 1.0)
|
|
138
|
-
importmap-rails (
|
|
130
|
+
importmap-rails (2.0.1)
|
|
139
131
|
actionpack (>= 6.0.0)
|
|
140
132
|
activesupport (>= 6.0.0)
|
|
141
133
|
railties (>= 6.0.0)
|
|
142
134
|
iniparse (1.5.0)
|
|
143
|
-
io-console (0.
|
|
144
|
-
irb (1.
|
|
135
|
+
io-console (0.7.1)
|
|
136
|
+
irb (1.11.1)
|
|
145
137
|
rdoc
|
|
146
|
-
reline (>= 0.
|
|
147
|
-
json (2.
|
|
138
|
+
reline (>= 0.4.2)
|
|
139
|
+
json (2.7.1)
|
|
148
140
|
language_server-protocol (3.17.0.3)
|
|
149
141
|
loofah (2.22.0)
|
|
150
142
|
crass (~> 1.0.2)
|
|
@@ -156,34 +148,34 @@ GEM
|
|
|
156
148
|
net-smtp
|
|
157
149
|
marcel (1.0.2)
|
|
158
150
|
mini_mime (1.1.5)
|
|
159
|
-
minitest (5.
|
|
151
|
+
minitest (5.21.1)
|
|
160
152
|
mutex_m (0.2.0)
|
|
161
|
-
net-imap (0.4.
|
|
153
|
+
net-imap (0.4.9.1)
|
|
162
154
|
date
|
|
163
155
|
net-protocol
|
|
164
156
|
net-pop (0.1.2)
|
|
165
157
|
net-protocol
|
|
166
158
|
net-protocol (0.2.2)
|
|
167
159
|
timeout
|
|
168
|
-
net-smtp (0.4.0)
|
|
160
|
+
net-smtp (0.4.0.1)
|
|
169
161
|
net-protocol
|
|
170
|
-
nio4r (2.
|
|
171
|
-
nokogiri (1.
|
|
162
|
+
nio4r (2.7.0)
|
|
163
|
+
nokogiri (1.16.0-x86_64-darwin)
|
|
172
164
|
racc (~> 1.4)
|
|
173
|
-
nokogiri (1.
|
|
165
|
+
nokogiri (1.16.0-x86_64-linux)
|
|
174
166
|
racc (~> 1.4)
|
|
175
|
-
overcommit (0.
|
|
167
|
+
overcommit (0.61.0)
|
|
176
168
|
childprocess (>= 0.6.3, < 5)
|
|
177
169
|
iniparse (~> 1.4)
|
|
178
170
|
rexml (~> 3.2)
|
|
179
|
-
parallel (1.
|
|
180
|
-
parser (3.
|
|
171
|
+
parallel (1.24.0)
|
|
172
|
+
parser (3.3.0.3)
|
|
181
173
|
ast (~> 2.4.1)
|
|
182
174
|
racc
|
|
183
175
|
popper_js (2.11.8)
|
|
184
|
-
psych (5.1.
|
|
176
|
+
psych (5.1.2)
|
|
185
177
|
stringio
|
|
186
|
-
puma (6.4.
|
|
178
|
+
puma (6.4.2)
|
|
187
179
|
nio4r (~> 2.0)
|
|
188
180
|
racc (1.7.3)
|
|
189
181
|
rack (3.0.8)
|
|
@@ -225,40 +217,42 @@ GEM
|
|
|
225
217
|
zeitwerk (~> 2.6)
|
|
226
218
|
rainbow (3.1.1)
|
|
227
219
|
rake (13.1.0)
|
|
228
|
-
rdoc (6.6.
|
|
220
|
+
rdoc (6.6.2)
|
|
229
221
|
psych (>= 4.0.0)
|
|
230
|
-
regexp_parser (2.
|
|
231
|
-
reline (0.4.
|
|
222
|
+
regexp_parser (2.9.0)
|
|
223
|
+
reline (0.4.2)
|
|
232
224
|
io-console (~> 0.5)
|
|
233
225
|
rexml (3.2.6)
|
|
234
|
-
rubocop (1.
|
|
226
|
+
rubocop (1.60.0)
|
|
235
227
|
json (~> 2.3)
|
|
236
228
|
language_server-protocol (>= 3.17.0)
|
|
237
229
|
parallel (~> 1.10)
|
|
238
|
-
parser (>= 3.
|
|
230
|
+
parser (>= 3.3.0.2)
|
|
239
231
|
rainbow (>= 2.2.2, < 4.0)
|
|
240
232
|
regexp_parser (>= 1.8, < 3.0)
|
|
241
233
|
rexml (>= 3.2.5, < 4.0)
|
|
242
|
-
rubocop-ast (>= 1.
|
|
234
|
+
rubocop-ast (>= 1.30.0, < 2.0)
|
|
243
235
|
ruby-progressbar (~> 1.7)
|
|
244
236
|
unicode-display_width (>= 2.4.0, < 3.0)
|
|
245
237
|
rubocop-ast (1.30.0)
|
|
246
238
|
parser (>= 3.2.1.0)
|
|
247
|
-
rubocop-minitest (0.
|
|
239
|
+
rubocop-minitest (0.34.4)
|
|
248
240
|
rubocop (>= 1.39, < 2.0)
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
rubocop
|
|
252
|
-
|
|
241
|
+
rubocop-ast (>= 1.30.0, < 2.0)
|
|
242
|
+
rubocop-performance (1.20.2)
|
|
243
|
+
rubocop (>= 1.48.1, < 2.0)
|
|
244
|
+
rubocop-ast (>= 1.30.0, < 2.0)
|
|
245
|
+
rubocop-rails (2.23.1)
|
|
253
246
|
activesupport (>= 4.2.0)
|
|
254
247
|
rack (>= 1.1)
|
|
255
248
|
rubocop (>= 1.33.0, < 2.0)
|
|
249
|
+
rubocop-ast (>= 1.30.0, < 2.0)
|
|
256
250
|
ruby-progressbar (1.13.0)
|
|
257
251
|
ruby2_keywords (0.0.5)
|
|
258
|
-
sass-embedded (1.
|
|
259
|
-
google-protobuf (~> 3.
|
|
260
|
-
sass-embedded (1.
|
|
261
|
-
google-protobuf (~> 3.
|
|
252
|
+
sass-embedded (1.69.7-x86_64-darwin)
|
|
253
|
+
google-protobuf (~> 3.25)
|
|
254
|
+
sass-embedded (1.69.7-x86_64-linux-gnu)
|
|
255
|
+
google-protobuf (~> 3.25)
|
|
262
256
|
simple_form (5.3.0)
|
|
263
257
|
actionpack (>= 5.2)
|
|
264
258
|
activemodel (>= 5.2)
|
|
@@ -268,16 +262,9 @@ GEM
|
|
|
268
262
|
simplecov_json_formatter (~> 0.1)
|
|
269
263
|
simplecov-html (0.12.3)
|
|
270
264
|
simplecov_json_formatter (0.1.4)
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
sprockets-rails (3.4.2)
|
|
275
|
-
actionpack (>= 5.2)
|
|
276
|
-
activesupport (>= 5.2)
|
|
277
|
-
sprockets (>= 3.0.0)
|
|
278
|
-
sqlite3 (1.6.8-x86_64-darwin)
|
|
279
|
-
sqlite3 (1.6.8-x86_64-linux)
|
|
280
|
-
stringio (3.0.9)
|
|
265
|
+
sqlite3 (1.7.0-x86_64-darwin)
|
|
266
|
+
sqlite3 (1.7.0-x86_64-linux)
|
|
267
|
+
stringio (3.1.0)
|
|
281
268
|
temple (0.10.3)
|
|
282
269
|
thor (1.3.0)
|
|
283
270
|
tilt (2.3.0)
|
|
@@ -289,15 +276,13 @@ GEM
|
|
|
289
276
|
websocket-driver (0.7.6)
|
|
290
277
|
websocket-extensions (>= 0.1.0)
|
|
291
278
|
websocket-extensions (0.1.5)
|
|
292
|
-
|
|
293
|
-
will_paginate (3.3.1)
|
|
294
|
-
will_paginate-bootstrap4 (0.2.2)
|
|
295
|
-
will_paginate (~> 3.0, >= 3.0.0)
|
|
279
|
+
will_paginate (4.0.0)
|
|
296
280
|
yard (0.9.34)
|
|
297
281
|
zeitwerk (2.6.12)
|
|
298
282
|
|
|
299
283
|
PLATFORMS
|
|
300
284
|
x86_64-darwin-22
|
|
285
|
+
x86_64-darwin-23
|
|
301
286
|
x86_64-linux
|
|
302
287
|
|
|
303
288
|
DEPENDENCIES
|
|
@@ -321,4 +306,4 @@ DEPENDENCIES
|
|
|
321
306
|
yard
|
|
322
307
|
|
|
323
308
|
BUNDLED WITH
|
|
324
|
-
2.
|
|
309
|
+
2.5.3
|
|
@@ -10,7 +10,7 @@ $panel-bg: $card-bg;
|
|
|
10
10
|
|
|
11
11
|
$panel-img-overlay-padding: 1.25rem !default;
|
|
12
12
|
|
|
13
|
-
$panel-group-margin: $panel-spacer/2 !default;
|
|
13
|
+
$panel-group-margin: calc($panel-spacer/2) !default;
|
|
14
14
|
$panel-deck-margin: $panel-group-margin !default;
|
|
15
15
|
|
|
16
16
|
$panel-columns-count: 3 !default;
|
|
@@ -80,7 +80,7 @@ $panel-columns-margin: $panel-spacer-y !default;
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
.panel-subtitle {
|
|
83
|
-
margin-top: -($panel-spacer-y / 2);
|
|
83
|
+
margin-top: -(calc($panel-spacer-y / 2));
|
|
84
84
|
margin-bottom: 0;
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -151,15 +151,15 @@ $panel-columns-margin: $panel-spacer-y !default;
|
|
|
151
151
|
//
|
|
152
152
|
|
|
153
153
|
.panel-header-tabs {
|
|
154
|
-
margin-right: -calc($panel-spacer-x / 2);
|
|
154
|
+
margin-right: -(calc($panel-spacer-x / 2));
|
|
155
155
|
margin-bottom: -$panel-spacer-y;
|
|
156
156
|
margin-left: 0;
|
|
157
157
|
border-bottom: 0;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
.panel-header-pills {
|
|
161
|
-
margin-right: -calc($panel-spacer-x / 2);
|
|
162
|
-
margin-left: -calc($panel-spacer-x / 2);
|
|
161
|
+
margin-right: -(calc($panel-spacer-x / 2));
|
|
162
|
+
margin-left: -(calc($panel-spacer-x / 2));
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
// panel image
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
// libraries
|
|
2
|
-
@import bootstrap
|
|
2
|
+
@import 'bootstrap'
|
|
3
3
|
$fa-font-path: 'fontawesome'
|
|
4
|
-
@import fontawesome/fontawesome
|
|
5
|
-
@import fontawesome/solid
|
|
6
|
-
@import fontawesome/brands
|
|
7
|
-
@import multi-select
|
|
8
|
-
@import bootstrap-multiselect
|
|
9
|
-
@import bootstrap-markdown.min
|
|
10
|
-
@import bootstrap-switch.min
|
|
11
|
-
@import bootstrap-datepicker3.min
|
|
4
|
+
@import 'fontawesome/fontawesome'
|
|
5
|
+
@import 'fontawesome/solid'
|
|
6
|
+
@import 'fontawesome/brands'
|
|
7
|
+
@import 'multi-select'
|
|
8
|
+
@import 'bootstrap-multiselect'
|
|
9
|
+
@import 'bootstrap-markdown.min'
|
|
10
|
+
@import 'bootstrap-switch.min'
|
|
11
|
+
@import 'bootstrap-datepicker3.min'
|
|
12
12
|
|
|
13
13
|
$states_colors: $theme-colors
|
|
14
14
|
|
|
15
15
|
// Components
|
|
16
|
-
@import sass/
|
|
17
|
-
@import sass/
|
|
18
|
-
@import sass/
|
|
19
|
-
@import sass/
|
|
20
|
-
@import sass/
|
|
21
|
-
@import sass/
|
|
22
|
-
@import sass/
|
|
16
|
+
@import 'sass/boxes'
|
|
17
|
+
@import 'sass/containers'
|
|
18
|
+
@import 'sass/fixes'
|
|
19
|
+
@import 'sass/forms'
|
|
20
|
+
@import 'sass/navigations'
|
|
21
|
+
@import 'sass/notifications'
|
|
22
|
+
@import 'sass/tables'
|
|
23
23
|
|
|
24
24
|
// Other section
|
|
25
25
|
.ui-bibz-clear
|
|
@@ -133,20 +133,20 @@ module UiBibz::Concerns::Models::Searchable
|
|
|
133
133
|
if attribute == :as
|
|
134
134
|
attribute.each_value do |value|
|
|
135
135
|
sql_subquery << "lower(CAST(#{value} AS TEXT)) LIKE :#{value}_#{i}"
|
|
136
|
-
sql_attributes = sql_attributes.merge({ "#{value}_#{i}"
|
|
136
|
+
sql_attributes = sql_attributes.merge({ "#{value}_#{i}": "%#{pattern}%" })
|
|
137
137
|
end
|
|
138
138
|
else
|
|
139
139
|
key_name = attribute.keys.first.to_s.pluralize
|
|
140
140
|
attribute.each_value do |value|
|
|
141
141
|
Array(value).each do |val|
|
|
142
142
|
sql_subquery << "lower(CAST(#{key_name}.#{val} AS TEXT)) LIKE :#{key_name}_#{val}_#{i}"
|
|
143
|
-
sql_attributes = sql_attributes.merge({ "#{key_name}_#{val}_#{i}"
|
|
143
|
+
sql_attributes = sql_attributes.merge({ "#{key_name}_#{val}_#{i}": "%#{pattern}%" })
|
|
144
144
|
end
|
|
145
145
|
end
|
|
146
146
|
end
|
|
147
147
|
else
|
|
148
148
|
sql_subquery << "lower(CAST(#{table_name}.#{attribute} AS TEXT)) LIKE :#{attribute}_#{i}"
|
|
149
|
-
sql_attributes = sql_attributes.merge({ "#{attribute}_#{i}"
|
|
149
|
+
sql_attributes = sql_attributes.merge({ "#{attribute}_#{i}": "%#{pattern}%" })
|
|
150
150
|
end
|
|
151
151
|
end
|
|
152
152
|
sql_query << "(#{sql_subquery.join(' OR ')})"
|
|
@@ -7,9 +7,9 @@ module UiBibz::Helpers::UtilsHelper
|
|
|
7
7
|
UiBibz::Utils::Internationalization.new(translation, options).translate
|
|
8
8
|
end
|
|
9
9
|
|
|
10
|
-
def ui_form_for(object, *args, &)
|
|
10
|
+
def ui_form_for(object, *args, &block)
|
|
11
11
|
options = args.extract_options!
|
|
12
|
-
simple_form_for(object, *(args << new_options(options)), &)
|
|
12
|
+
simple_form_for(object, *(args << new_options(options)), &block)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
private
|
data/lib/ui_bibz/infos.rb
CHANGED
|
@@ -7,11 +7,11 @@ module UiBibz
|
|
|
7
7
|
DESCRIPTION = "A Rails Interface Framework using Bootstrap #{BOOTSTRAP_VERSION}.".freeze
|
|
8
8
|
SUMMARY = "Ui Bibz is an Ui Framework that allows you to build an interface very quickly and simply using Bootstrap #{BOOTSTRAP_VERSION}.".freeze
|
|
9
9
|
LICENSE = 'MIT'
|
|
10
|
-
FONTAWESOME_VERSION = '6.
|
|
10
|
+
FONTAWESOME_VERSION = '6.5.1'
|
|
11
11
|
HOMEPAGE = 'https://hummel.link/ui-bibz/'
|
|
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.
|
|
15
|
+
VERSION = '4.0.0.beta9'
|
|
16
16
|
AUTHORS = ['Thooams'].freeze
|
|
17
17
|
end
|
|
@@ -9,13 +9,13 @@ module UiBibzForm
|
|
|
9
9
|
|
|
10
10
|
attr_accessor :output_buffer
|
|
11
11
|
|
|
12
|
-
def ui_surround_field(content = nil, opts = nil, html_options = nil, &)
|
|
12
|
+
def ui_surround_field(content = nil, opts = nil, html_options = nil, &block)
|
|
13
13
|
content = (options || {}).merge(content || {})
|
|
14
14
|
content = content.merge(template: @template, form: self)
|
|
15
15
|
|
|
16
16
|
input_classes = UiBibz::Builders::HtmlClassesBuilder.join_classes('form-group', 'surround_field', options[:input_html].try(:[], :class))
|
|
17
17
|
wrapper_html = (options[:input_html] || {}).merge({ class: input_classes })
|
|
18
|
-
surround_field = UiBibz::Ui::Core::Forms::Surrounds::SurroundField.new(content, opts, html_options).tap(&)
|
|
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
21
|
wrapper_classes = UiBibz::Builders::HtmlClassesBuilder.join_classes(('has-error' if errors_text.present?), wrapper_html.try(:[], :class))
|
|
@@ -31,17 +31,17 @@ module UiBibzForm
|
|
|
31
31
|
end
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
-
def ui_button_group(content = nil, opts = nil, html_options = nil, &)
|
|
35
|
-
ui_component_group_by(UiBibz::Ui::Core::Forms::Buttons::ButtonGroup, content, opts, html_options, &)
|
|
34
|
+
def ui_button_group(content = nil, opts = nil, html_options = nil, &block)
|
|
35
|
+
ui_component_group_by(UiBibz::Ui::Core::Forms::Buttons::ButtonGroup, content, opts, html_options, &block)
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
-
def ui_choice_group(content = nil, opts = nil, html_options = nil, &)
|
|
39
|
-
ui_component_group_by(UiBibz::Ui::Core::Forms::Choices::ChoiceGroup, content, opts, html_options, &)
|
|
38
|
+
def ui_choice_group(content = nil, opts = nil, html_options = nil, &block)
|
|
39
|
+
ui_component_group_by(UiBibz::Ui::Core::Forms::Choices::ChoiceGroup, content, opts, html_options, &block)
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
private
|
|
43
43
|
|
|
44
|
-
def ui_component_group_by(component_class, content = nil, opts = nil, html_options = nil, &)
|
|
44
|
+
def ui_component_group_by(component_class, content = nil, opts = nil, html_options = nil, &block)
|
|
45
45
|
content = (options || {}).merge(content || {})
|
|
46
46
|
content = content.merge(template: @template, form: self)
|
|
47
47
|
|
|
@@ -50,7 +50,7 @@ module UiBibzForm
|
|
|
50
50
|
|
|
51
51
|
content_tag :div, wrapper_html do
|
|
52
52
|
concat content_tag(:label, content[:label]) unless content[:label].nil?
|
|
53
|
-
concat component_class.new(content, opts, html_options).tap(&).render
|
|
53
|
+
concat component_class.new(content, opts, html_options).tap(&block).render
|
|
54
54
|
end
|
|
55
55
|
end
|
|
56
56
|
end
|
|
@@ -118,7 +118,7 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
|
118
118
|
UiBibz::Ui::Core::Notifications::Badge.new(options[:badge].delete(:content), options[:badge]).render
|
|
119
119
|
|
|
120
120
|
else
|
|
121
|
-
UiBibz::Ui::Core::Notifications::Badge.new(options[:badge], status:
|
|
121
|
+
UiBibz::Ui::Core::Notifications::Badge.new(options[:badge], status: options[:status] || :secondary).render
|
|
122
122
|
end
|
|
123
123
|
end
|
|
124
124
|
|
|
@@ -94,7 +94,7 @@ module UiBibz::Ui::Core::Forms::Dropdowns
|
|
|
94
94
|
end
|
|
95
95
|
|
|
96
96
|
def dropdown_html_options
|
|
97
|
-
opts =
|
|
97
|
+
opts = options[:html_button] || {}
|
|
98
98
|
opts = opts.merge(href: options[:url]) if options[:tag] == :a
|
|
99
99
|
opts.merge(class: join_classes('btn', button_status, state, size, options[:html_button].try(:[], :class)))
|
|
100
100
|
end
|
|
@@ -135,7 +135,7 @@ module UiBibz::Ui::Core::Lists::Components
|
|
|
135
135
|
UiBibz::Ui::Core::Notifications::Badge.new(options[:badge].delete(:content), options[:badge]).render
|
|
136
136
|
|
|
137
137
|
else
|
|
138
|
-
UiBibz::Ui::Core::Notifications::Badge.new(options[:badge], type: :pill, status:
|
|
138
|
+
UiBibz::Ui::Core::Notifications::Badge.new(options[:badge], type: :pill, status: options[:status] || :secondary).render
|
|
139
139
|
end
|
|
140
140
|
end
|
|
141
141
|
end
|
|
@@ -75,14 +75,14 @@ module UiBibz::Ui::Core::Notifications
|
|
|
75
75
|
end
|
|
76
76
|
|
|
77
77
|
# Add Body which is a component
|
|
78
|
-
def body(content = nil, options = nil, html_options = nil, &)
|
|
78
|
+
def body(content = nil, options = nil, html_options = nil, &block)
|
|
79
79
|
@body = if @header.nil?
|
|
80
80
|
content_tag :div, class: 'd-flex' do
|
|
81
|
-
concat UiBibz::Ui::Core::Notifications::Components::ToastBody.new(content, options, html_options, &).render
|
|
81
|
+
concat UiBibz::Ui::Core::Notifications::Components::ToastBody.new(content, options, html_options, &block).render
|
|
82
82
|
concat close_html if (options || {})[:closable]
|
|
83
83
|
end
|
|
84
84
|
else
|
|
85
|
-
UiBibz::Ui::Core::Notifications::Components::ToastBody.new(content, options, html_options, &).render
|
|
85
|
+
UiBibz::Ui::Core::Notifications::Components::ToastBody.new(content, options, html_options, &block).render
|
|
86
86
|
end
|
|
87
87
|
end
|
|
88
88
|
|
|
@@ -151,7 +151,7 @@ module UiBibz::Ui::Ux::Tables
|
|
|
151
151
|
def table_html
|
|
152
152
|
content_tag(:table, html_options) do
|
|
153
153
|
ths = cols.collect do |col|
|
|
154
|
-
content_tag(:th, sort.header(col), class: col.class) unless col.hidden?
|
|
154
|
+
content_tag(:th, sort.header(col, col.name), class: col.class) unless col.hidden?
|
|
155
155
|
end
|
|
156
156
|
|
|
157
157
|
ths = action.header ths
|
|
@@ -55,19 +55,27 @@ module UiBibz::Ui::Ux::Tables
|
|
|
55
55
|
|
|
56
56
|
def per_page_html
|
|
57
57
|
content_tag :div, class: 'table-pagination-per-page' do
|
|
58
|
-
concat
|
|
59
|
-
|
|
58
|
+
concat(
|
|
59
|
+
content_tag(:span, class: 'table-pagination-per-page-label') do
|
|
60
|
+
concat results_count_html
|
|
61
|
+
concat UiBibz::Utils::Internationalization.new('ui_bibz.table.pagination.per_page', default: 'Per page: ').translate
|
|
62
|
+
end
|
|
63
|
+
)
|
|
60
64
|
concat select_tag('per_page', options_for_select([5, 10, 20, 30, 50, 100, 200, 500], store.per_page), class: 'form-select')
|
|
61
65
|
end
|
|
62
66
|
end
|
|
63
67
|
|
|
64
68
|
def per_page_html_in_wrap
|
|
65
69
|
content_tag :div, class: 'table-pagination-per-page' do
|
|
66
|
-
concat
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
concat(
|
|
71
|
+
content_tag(:span, class: 'table-pagination-per-page-label') do
|
|
72
|
+
concat results_count_html
|
|
73
|
+
concat UiBibz::Utils::Internationalization.new('ui_bibz.table.pagination.per_page', default: 'Per page: ').translate
|
|
74
|
+
store.parameters.with_indifferent_access.reject { |k, v| default_parameters?(k) || v.blank? }.each do |k, v|
|
|
75
|
+
concat tag(:input, type: 'hidden', name: k, value: v)
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
)
|
|
71
79
|
concat select_tag('per_page', options_for_select([5, 10, 20, 30, 50, 100, 200, 500], store.per_page), class: 'form-select')
|
|
72
80
|
concat tag(:input, type: 'hidden', name: 'store_id', value: store.id) unless store.id.nil? # If there is more 1 table in html page
|
|
73
81
|
end
|
|
@@ -93,7 +93,7 @@ module UiBibz::Ui::Ux::Tables
|
|
|
93
93
|
end
|
|
94
94
|
|
|
95
95
|
def underscorize_hash(attr)
|
|
96
|
-
attr.is_a?(Hash) ? "#{attr.keys.first}_#{attr.values.first}"
|
|
96
|
+
attr.is_a?(Hash) ? :"#{attr.keys.first}_#{attr.values.first}" : attr
|
|
97
97
|
end
|
|
98
98
|
|
|
99
99
|
def default_parameters?(key)
|
data/lib/ui_bibz.rb
CHANGED
|
@@ -66,7 +66,7 @@ class TableTest < ActionView::TestCase
|
|
|
66
66
|
options = { paginable: true }
|
|
67
67
|
pagination = UiBibz::Ui::Ux::Tables::Paginable.new(@store, options)
|
|
68
68
|
actual = pagination.render if pagination.paginable?
|
|
69
|
-
expected = "<div><nav class=\"pagination\"><ul class=\"pagination\" role=\"group\"><li class=\"previous page-item disabled\"><span class=\"page-link\">«</span></li> <li class=\"page-item active\"><span class=\"page-link\">1</span></li> <li class=\"page-item\"><a class=\"page-link\" rel=\"next\" href=\"/users?direction=asc&page=2&search=Name+fr&sort=users.name_fr&store_id=users\">2</a></li> <li class=\"page-item\"><a class=\"page-link\" href=\"/users?direction=asc&page=3&search=Name+fr&sort=users.name_fr&store_id=users\">3</a></li> <li class=\"page-item\"><a class=\"page-link\" href=\"/users?direction=asc&page=4&search=Name+fr&sort=users.name_fr&store_id=users\">4</a></li> <li class=\"page-item\"><a class=\"page-link\" href=\"/users?direction=asc&page=5&search=Name+fr&sort=users.name_fr&store_id=users\">5</a></li> <li class=\"page-item disabled\"><i class=\"page-link\">…</i></li> <li class=\"page-item\"><a class=\"page-link\" href=\"/users?direction=asc&page=12&search=Name+fr&sort=users.name_fr&store_id=users\">12</a></li> <li class=\"page-item\"><a class=\"page-link\" href=\"/users?direction=asc&page=13&search=Name+fr&sort=users.name_fr&store_id=users\">13</a></li> <li class=\"next page-item\"><a class=\"page-link\" rel=\"next\" href=\"/users?direction=asc&page=2&search=Name+fr&sort=users.name_fr&store_id=users\">»</a></li></ul></nav><form action=\"/users\" accept-charset=\"UTF-8\" method=\"get\"><div class=\"table-pagination-per-page\">Displaying User <b>1 - 2</b> of <b>25</b> in total | Per page: <input type=\"hidden\" name=\"sort\" value=\"users.name_fr\" /><input type=\"hidden\" name=\"direction\" value=\"asc\" /><input type=\"hidden\" name=\"per_page\" value=\"2\" /><input type=\"hidden\" name=\"only_path\" value=\"true\"
|
|
69
|
+
expected = "<div><nav class=\"pagination\"><ul class=\"pagination\" role=\"group\"><li class=\"previous page-item disabled\"><span class=\"page-link\">«</span></li> <li class=\"page-item active\"><span class=\"page-link\">1</span></li> <li class=\"page-item\"><a class=\"page-link\" rel=\"next\" href=\"/users?direction=asc&page=2&search=Name+fr&sort=users.name_fr&store_id=users\">2</a></li> <li class=\"page-item\"><a class=\"page-link\" href=\"/users?direction=asc&page=3&search=Name+fr&sort=users.name_fr&store_id=users\">3</a></li> <li class=\"page-item\"><a class=\"page-link\" href=\"/users?direction=asc&page=4&search=Name+fr&sort=users.name_fr&store_id=users\">4</a></li> <li class=\"page-item\"><a class=\"page-link\" href=\"/users?direction=asc&page=5&search=Name+fr&sort=users.name_fr&store_id=users\">5</a></li> <li class=\"page-item disabled\"><i class=\"page-link\">…</i></li> <li class=\"page-item\"><a class=\"page-link\" href=\"/users?direction=asc&page=12&search=Name+fr&sort=users.name_fr&store_id=users\">12</a></li> <li class=\"page-item\"><a class=\"page-link\" href=\"/users?direction=asc&page=13&search=Name+fr&sort=users.name_fr&store_id=users\">13</a></li> <li class=\"next page-item\"><a class=\"page-link\" rel=\"next\" href=\"/users?direction=asc&page=2&search=Name+fr&sort=users.name_fr&store_id=users\">»</a></li></ul></nav><form action=\"/users\" accept-charset=\"UTF-8\" method=\"get\"><div class=\"table-pagination-per-page\"><span class=\"table-pagination-per-page-label\">Displaying User <b>1 - 2</b> of <b>25</b> in total | Per page: <input type=\"hidden\" name=\"sort\" value=\"users.name_fr\" /><input type=\"hidden\" name=\"direction\" value=\"asc\" /><input type=\"hidden\" name=\"per_page\" value=\"2\" /><input type=\"hidden\" name=\"only_path\" value=\"true\" /></span><select name=\"per_page\" id=\"per_page\" class=\"form-select\"><option value=\"5\">5</option>
|
|
70
70
|
<option value=\"10\">10</option>
|
|
71
71
|
<option value=\"20\">20</option>
|
|
72
72
|
<option value=\"30\">30</option>
|
data/ui_bibz.gemspec
CHANGED
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
|
19
19
|
s.description = UiBibz::DESCRIPTION
|
|
20
20
|
s.license = UiBibz::LICENSE
|
|
21
21
|
|
|
22
|
-
s.required_ruby_version = '>= 3.
|
|
22
|
+
s.required_ruby_version = '>= 3.3.0'
|
|
23
23
|
|
|
24
24
|
s.files = `git ls-files`.split
|
|
25
25
|
s.executables = `git ls-files -- bin/*`.split.map { |f| File.basename(f) }
|
|
@@ -28,12 +28,11 @@ Gem::Specification.new do |s|
|
|
|
28
28
|
# Rails gems
|
|
29
29
|
s.add_dependency 'rails', '>= 7.1.0'
|
|
30
30
|
|
|
31
|
-
#
|
|
32
|
-
s.add_dependency 'bootstrap', '~> 5.3.
|
|
33
|
-
|
|
34
|
-
s.add_dependency '
|
|
35
|
-
s.add_dependency 'will_paginate
|
|
36
|
-
s.add_dependency 'will-paginate-i18n'
|
|
31
|
+
# Switch to bootstrap 5.3.3 as soon as possible
|
|
32
|
+
s.add_dependency 'bootstrap-propshaft', '~> 5.3.2.2'
|
|
33
|
+
|
|
34
|
+
s.add_dependency 'dartsass-rails'
|
|
35
|
+
s.add_dependency 'will_paginate'
|
|
37
36
|
# Don't move factory_bot_rails to Gemfile because of bug
|
|
38
37
|
s.add_development_dependency 'factory_bot_rails', '~> 4.0' # rubocop:disable Gemspec/DevelopmentDependencies
|
|
39
38
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|