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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55234cd5c8312bb328c5548bd848fc063f3c06ae53cf0920c5eae8ca63df2e2c
4
- data.tar.gz: 12848022bd01b16bc0c4c5d00f8400776282f235c7d7ca27cf78a806cc2943d7
3
+ metadata.gz: 4478c527333a0c33571e2bb5a369b6b9f4622c5057ae708fcfb4d1dc98f62aeb
4
+ data.tar.gz: 7db80ccd1b21fcf28f74b85f37e31b09d86a977aec1ca46f3d05006d8af63628
5
5
  SHA512:
6
- metadata.gz: caab98f20585d7df92baa51d5a150c91280e289943cf2eea9ad7a31718e6d86ac4926273cc11eb3bc52e9b7a1aa789c7022dbd23ff7ebb8ec74e133daa5276cd
7
- data.tar.gz: cc6866cedf7a79c282df902bac683594f95fab9941d031ee9bf3d3be38e1cea660809fc82a372d3e90fef9864c581c8c7c3e3bcc426c267453115cd05ff9094a
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.beta18)
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.2)
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 (11.1.3)
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.4-x86_64-darwin)
168
+ nokogiri (1.18.6-x86_64-darwin)
169
169
  racc (~> 1.4)
170
- nokogiri (1.18.4-x86_64-linux-gnu)
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.1)
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.12.0)
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.38.1)
252
- parser (>= 3.3.1.0)
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.85.1-x86_64-darwin)
269
- google-protobuf (~> 4.29)
270
- sass-embedded (1.85.1-x86_64-linux-gnu)
271
- google-protobuf (~> 4.29)
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.5)
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
@@ -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.beta18'
15
+ VERSION = '4.0.0.beta20'
16
16
  AUTHORS = ['Thooams'].freeze
17
17
  end
@@ -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::Component
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
 
@@ -55,6 +55,10 @@ module UiBibz::Ui::Core::Navigations
55
55
  opts
56
56
  end
57
57
 
58
+ def component_html_data
59
+ @data_html_options_builder.add 'confirm', value: options[:confirm]
60
+ end
61
+
58
62
  def collapse
59
63
  {
60
64
  role: 'button',
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.beta18
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-15 00:00:00.000000000 Z
11
+ date: 2025-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootstrap