ui_bibz 4.0.0.beta18 → 4.0.0.beta20
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/Gemfile.lock +16 -14
- data/lib/ui_bibz/infos.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/buttons/button_link.rb +4 -0
- data/lib/ui_bibz/ui/core/forms/dropdowns/components/dropdown_dropdown.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/dropdowns/components/dropdown_link.rb +1 -18
- data/lib/ui_bibz/ui/core/forms/dropdowns/dropdown.rb +2 -2
- data/lib/ui_bibz/ui/core/navigations/link.rb +4 -0
- data/lib/ui_bibz.rb +2 -0
- data/test/ui/core/navigations/link_test.rb +7 -0
- 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: 4478c527333a0c33571e2bb5a369b6b9f4622c5057ae708fcfb4d1dc98f62aeb
|
4
|
+
data.tar.gz: 7db80ccd1b21fcf28f74b85f37e31b09d86a977aec1ca46f3d05006d8af63628
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0931e3fc8669051c63cb1e492a35e45b2d801228ac564b9789fc1198ea90bb70f69957fd983b07977c11e3e76799bad4de482e9f1abe70a725ac0936c8647ac2'
|
7
|
+
data.tar.gz: ba98ce76e7c0e02cde6cf6cb780449c979d9110d59eedb1c134f189ead1f1ae2422d41329392fa9221257c5769951a676af6b00d397fbd5566bef65946ffc503
|
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.beta20)
|
5
5
|
bootstrap (~> 5.3.3)
|
6
6
|
dartsass-rails
|
7
7
|
rails (>= 7.1.0)
|
@@ -81,7 +81,7 @@ GEM
|
|
81
81
|
securerandom (>= 0.3)
|
82
82
|
tzinfo (~> 2.0, >= 2.0.5)
|
83
83
|
uri (>= 0.13.1)
|
84
|
-
ast (2.4.
|
84
|
+
ast (2.4.3)
|
85
85
|
autoprefixer-rails (10.4.19.0)
|
86
86
|
execjs (~> 2)
|
87
87
|
awesome_print (1.9.2)
|
@@ -92,7 +92,7 @@ GEM
|
|
92
92
|
autoprefixer-rails (>= 9.1.0)
|
93
93
|
popper_js (>= 2.11.8, < 3)
|
94
94
|
builder (3.3.0)
|
95
|
-
byebug (
|
95
|
+
byebug (12.0.0)
|
96
96
|
childprocess (5.1.0)
|
97
97
|
logger (~> 1.5)
|
98
98
|
concurrent-ruby (1.3.5)
|
@@ -165,22 +165,23 @@ GEM
|
|
165
165
|
net-smtp (0.5.1)
|
166
166
|
net-protocol
|
167
167
|
nio4r (2.7.4)
|
168
|
-
nokogiri (1.18.
|
168
|
+
nokogiri (1.18.6-x86_64-darwin)
|
169
169
|
racc (~> 1.4)
|
170
|
-
nokogiri (1.18.
|
170
|
+
nokogiri (1.18.6-x86_64-linux-gnu)
|
171
171
|
racc (~> 1.4)
|
172
172
|
overcommit (0.67.1)
|
173
173
|
childprocess (>= 0.6.3, < 6)
|
174
174
|
iniparse (~> 1.4)
|
175
175
|
rexml (>= 3.3.9)
|
176
176
|
parallel (1.26.3)
|
177
|
-
parser (3.3.7.
|
177
|
+
parser (3.3.7.2)
|
178
178
|
ast (~> 2.4.1)
|
179
179
|
racc
|
180
180
|
popper_js (2.11.8)
|
181
181
|
pp (0.6.2)
|
182
182
|
prettyprint
|
183
183
|
prettyprint (0.2.0)
|
184
|
+
prism (1.4.0)
|
184
185
|
propshaft (1.1.0)
|
185
186
|
actionpack (>= 7.0.0)
|
186
187
|
activesupport (>= 7.0.0)
|
@@ -231,7 +232,7 @@ GEM
|
|
231
232
|
zeitwerk (~> 2.6)
|
232
233
|
rainbow (3.1.1)
|
233
234
|
rake (13.2.1)
|
234
|
-
rdoc (6.
|
235
|
+
rdoc (6.13.0)
|
235
236
|
psych (>= 4.0.0)
|
236
237
|
regexp_parser (2.10.0)
|
237
238
|
reline (0.6.0)
|
@@ -248,8 +249,9 @@ GEM
|
|
248
249
|
rubocop-ast (>= 1.38.0, < 2.0)
|
249
250
|
ruby-progressbar (~> 1.7)
|
250
251
|
unicode-display_width (>= 2.4.0, < 4.0)
|
251
|
-
rubocop-ast (1.
|
252
|
-
parser (>= 3.3.
|
252
|
+
rubocop-ast (1.43.0)
|
253
|
+
parser (>= 3.3.7.2)
|
254
|
+
prism (~> 1.4)
|
253
255
|
rubocop-minitest (0.37.1)
|
254
256
|
lint_roller (~> 1.1)
|
255
257
|
rubocop (>= 1.72.1, < 2.0)
|
@@ -265,10 +267,10 @@ GEM
|
|
265
267
|
rubocop (>= 1.72.1, < 2.0)
|
266
268
|
rubocop-ast (>= 1.38.0, < 2.0)
|
267
269
|
ruby-progressbar (1.13.0)
|
268
|
-
sass-embedded (1.
|
269
|
-
google-protobuf (~> 4.
|
270
|
-
sass-embedded (1.
|
271
|
-
google-protobuf (~> 4.
|
270
|
+
sass-embedded (1.86.0-x86_64-darwin)
|
271
|
+
google-protobuf (~> 4.30)
|
272
|
+
sass-embedded (1.86.0-x86_64-linux-gnu)
|
273
|
+
google-protobuf (~> 4.30)
|
272
274
|
securerandom (0.4.1)
|
273
275
|
simple_form (5.3.1)
|
274
276
|
actionpack (>= 5.2)
|
@@ -281,7 +283,7 @@ GEM
|
|
281
283
|
simplecov_json_formatter (0.1.4)
|
282
284
|
sqlite3 (2.6.0-x86_64-darwin)
|
283
285
|
sqlite3 (2.6.0-x86_64-linux-gnu)
|
284
|
-
stringio (3.1.
|
286
|
+
stringio (3.1.6)
|
285
287
|
temple (0.10.3)
|
286
288
|
thor (1.3.2)
|
287
289
|
tilt (2.6.0)
|
data/lib/ui_bibz/infos.rb
CHANGED
@@ -71,6 +71,10 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
71
71
|
options[:url] || "##{options[:collapse]}"
|
72
72
|
end
|
73
73
|
|
74
|
+
def component_html_data
|
75
|
+
@data_html_options_builder.add 'confirm', value: options[:confirm]
|
76
|
+
end
|
77
|
+
|
74
78
|
def component_html_options
|
75
79
|
super.merge({ role: :button })
|
76
80
|
end
|
@@ -94,7 +94,7 @@ module UiBibz::Ui::Core::Forms::Dropdowns::Components
|
|
94
94
|
end
|
95
95
|
|
96
96
|
def button_html
|
97
|
-
content_tag :a, button_content, { class: join_classes(state, 'dropdown-toggle'), role: 'button', 'data-bs-toggle' => 'dropdown', 'aria-expanded' => false, 'id' => id }
|
97
|
+
content_tag :a, button_content, { class: join_classes(state, 'dropdown-toggle', options.dig(:html_button, :class)), role: 'button', 'data-bs-toggle' => 'dropdown', 'aria-expanded' => false, 'id' => id }
|
98
98
|
end
|
99
99
|
|
100
100
|
def ul_html
|
@@ -40,30 +40,13 @@ module UiBibz::Ui::Core::Forms::Dropdowns::Components
|
|
40
40
|
# 'Home'
|
41
41
|
# end.render
|
42
42
|
#
|
43
|
-
class DropdownLink < UiBibz::Ui::Core::
|
43
|
+
class DropdownLink < UiBibz::Ui::Core::Navigations::Link
|
44
44
|
# See UiBibz::Ui::Core::Component.initialize
|
45
|
-
def initialize(...)
|
46
|
-
super
|
47
|
-
@html_options = @html_options.merge(link_html_options)
|
48
|
-
end
|
49
|
-
|
50
|
-
# Render html tag
|
51
|
-
def pre_render
|
52
|
-
link_to glyph_and_content_html, link_url, html_options
|
53
|
-
end
|
54
45
|
|
55
46
|
private
|
56
47
|
|
57
48
|
def component_html_classes
|
58
49
|
'dropdown-item'
|
59
50
|
end
|
60
|
-
|
61
|
-
def link_url
|
62
|
-
options[:url] || '#'
|
63
|
-
end
|
64
|
-
|
65
|
-
def link_html_options
|
66
|
-
@options[:link_html_options].nil? ? {} : @options[:link_html_options]
|
67
|
-
end
|
68
51
|
end
|
69
52
|
end
|
@@ -124,9 +124,9 @@ module UiBibz::Ui::Core::Forms::Dropdowns
|
|
124
124
|
def button_html
|
125
125
|
html_button = options[:html_button] || {}
|
126
126
|
if options[:tag] == :a
|
127
|
-
content_tag dropdown_tag, button_content, { class: join_classes('btn', button_status, state, size, 'dropdown-toggle'), role: 'button', 'data-bs-toggle' => 'dropdown', 'aria-expanded' => false, 'id' => id }.merge(html_button)
|
127
|
+
content_tag dropdown_tag, button_content, { class: join_classes('btn', button_status, state, size, 'dropdown-toggle', html_button.delete(:class)), role: 'button', 'data-bs-toggle' => 'dropdown', 'aria-expanded' => false, 'id' => id }.merge(html_button)
|
128
128
|
else
|
129
|
-
content_tag dropdown_tag, button_content, { class: join_classes('btn', button_status, state, size, 'dropdown-toggle'), type: 'button', 'data-bs-toggle' => 'dropdown', 'aria-expanded' => false, 'id' => id }.merge(html_button)
|
129
|
+
content_tag dropdown_tag, button_content, { class: join_classes('btn', button_status, state, size, 'dropdown-toggle', html_button.delete(:class)), type: 'button', 'data-bs-toggle' => 'dropdown', 'aria-expanded' => false, 'id' => id }.merge(html_button)
|
130
130
|
end
|
131
131
|
end
|
132
132
|
|
data/lib/ui_bibz.rb
CHANGED
@@ -231,6 +231,8 @@ module UiBibz
|
|
231
231
|
autoload :TableSearchField, 'ui_bibz/ui/ux/tables/table_search_field'
|
232
232
|
autoload :TablePagination, 'ui_bibz/ui/ux/tables/table_pagination'
|
233
233
|
autoload :TablePaginationPerPage, 'ui_bibz/ui/ux/tables/table_pagination_per_page'
|
234
|
+
autoload :Sortable, 'ui_bibz/ui/ux/tables/extensions/sortable'
|
235
|
+
autoload :Column, 'ui_bibz/ui/ux/tables/components/column'
|
234
236
|
end
|
235
237
|
|
236
238
|
module Containers
|
@@ -24,4 +24,11 @@ class LinkTest < ActionView::TestCase
|
|
24
24
|
|
25
25
|
assert_equal expected, actual
|
26
26
|
end
|
27
|
+
|
28
|
+
test 'confirm option' do
|
29
|
+
actual = ui_link 'My link', url: '#link', confirm: "Are you sure?"
|
30
|
+
expected = "<a data-confirm=\"Are you sure?\" href=\"#link\">My link</a>"
|
31
|
+
|
32
|
+
assert_equal expected, actual
|
33
|
+
end
|
27
34
|
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: 4.0.0.
|
4
|
+
version: 4.0.0.beta20
|
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-03-
|
11
|
+
date: 2025-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bootstrap
|