ui_bibz 3.0.3 → 3.0.4

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: 381fe687b6f870e28180cb109cba31516bda4bffd2337434e51d6f41f42e849c
4
- data.tar.gz: 237ae1863d6fb0c7f8bbc04b76a332f8a6f35886e4956c4606b78da39bfbacc0
3
+ metadata.gz: 2d1035c2c040919bc8d95ea88c10a9ec9d193ad0a065a2051d4bb50859f6f790
4
+ data.tar.gz: d6d98df20222b1b34dbf14cd8ef0d0ccdc9d1273b719ea91ba6f182a85d8958f
5
5
  SHA512:
6
- metadata.gz: b80564e26c0feb5283edded6dcbe44e762122270df77b2bc32e122c904ac5ae740ce456cadb03e0ae29987de28f886d381b921094fd8111a35f8993fe46a957b
7
- data.tar.gz: ebe6b69f108fa97985127a144e3f8c53a9d610c05880e83c1bc81eb3784cb6fa2075c2d56afe21892602a1f164463f1b62762cc296e79309019feec056ad3041
6
+ metadata.gz: a673392058615c477d62b5b5cc9db1f5c5a7fef1fd8d37e00553c33dedd198e6f32b7b318f55b3cb7dec88c05c444442a158b93e80320f5d3eb17feeb8cd3d17
7
+ data.tar.gz: acc63ee66aab8fa6a185e57bb2f67700781c0616e3a2ada4279a1c122aaa7a35c25ae84c95d16e79bf372e1f311bc40f1adbc4956878be0e509800eac6b993b4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ui_bibz (3.0.3)
4
+ ui_bibz (3.0.4)
5
5
  will-paginate-i18n
6
6
  will_paginate (~> 3.3.0)
7
7
  will_paginate-bootstrap4
@@ -9,60 +9,60 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actioncable (6.1.4)
13
- actionpack (= 6.1.4)
14
- activesupport (= 6.1.4)
12
+ actioncable (6.1.4.1)
13
+ actionpack (= 6.1.4.1)
14
+ activesupport (= 6.1.4.1)
15
15
  nio4r (~> 2.0)
16
16
  websocket-driver (>= 0.6.1)
17
- actionmailbox (6.1.4)
18
- actionpack (= 6.1.4)
19
- activejob (= 6.1.4)
20
- activerecord (= 6.1.4)
21
- activestorage (= 6.1.4)
22
- activesupport (= 6.1.4)
17
+ actionmailbox (6.1.4.1)
18
+ actionpack (= 6.1.4.1)
19
+ activejob (= 6.1.4.1)
20
+ activerecord (= 6.1.4.1)
21
+ activestorage (= 6.1.4.1)
22
+ activesupport (= 6.1.4.1)
23
23
  mail (>= 2.7.1)
24
- actionmailer (6.1.4)
25
- actionpack (= 6.1.4)
26
- actionview (= 6.1.4)
27
- activejob (= 6.1.4)
28
- activesupport (= 6.1.4)
24
+ actionmailer (6.1.4.1)
25
+ actionpack (= 6.1.4.1)
26
+ actionview (= 6.1.4.1)
27
+ activejob (= 6.1.4.1)
28
+ activesupport (= 6.1.4.1)
29
29
  mail (~> 2.5, >= 2.5.4)
30
30
  rails-dom-testing (~> 2.0)
31
- actionpack (6.1.4)
32
- actionview (= 6.1.4)
33
- activesupport (= 6.1.4)
31
+ actionpack (6.1.4.1)
32
+ actionview (= 6.1.4.1)
33
+ activesupport (= 6.1.4.1)
34
34
  rack (~> 2.0, >= 2.0.9)
35
35
  rack-test (>= 0.6.3)
36
36
  rails-dom-testing (~> 2.0)
37
37
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
38
- actiontext (6.1.4)
39
- actionpack (= 6.1.4)
40
- activerecord (= 6.1.4)
41
- activestorage (= 6.1.4)
42
- activesupport (= 6.1.4)
38
+ actiontext (6.1.4.1)
39
+ actionpack (= 6.1.4.1)
40
+ activerecord (= 6.1.4.1)
41
+ activestorage (= 6.1.4.1)
42
+ activesupport (= 6.1.4.1)
43
43
  nokogiri (>= 1.8.5)
44
- actionview (6.1.4)
45
- activesupport (= 6.1.4)
44
+ actionview (6.1.4.1)
45
+ activesupport (= 6.1.4.1)
46
46
  builder (~> 3.1)
47
47
  erubi (~> 1.4)
48
48
  rails-dom-testing (~> 2.0)
49
49
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
50
- activejob (6.1.4)
51
- activesupport (= 6.1.4)
50
+ activejob (6.1.4.1)
51
+ activesupport (= 6.1.4.1)
52
52
  globalid (>= 0.3.6)
53
- activemodel (6.1.4)
54
- activesupport (= 6.1.4)
55
- activerecord (6.1.4)
56
- activemodel (= 6.1.4)
57
- activesupport (= 6.1.4)
58
- activestorage (6.1.4)
59
- actionpack (= 6.1.4)
60
- activejob (= 6.1.4)
61
- activerecord (= 6.1.4)
62
- activesupport (= 6.1.4)
53
+ activemodel (6.1.4.1)
54
+ activesupport (= 6.1.4.1)
55
+ activerecord (6.1.4.1)
56
+ activemodel (= 6.1.4.1)
57
+ activesupport (= 6.1.4.1)
58
+ activestorage (6.1.4.1)
59
+ actionpack (= 6.1.4.1)
60
+ activejob (= 6.1.4.1)
61
+ activerecord (= 6.1.4.1)
62
+ activesupport (= 6.1.4.1)
63
63
  marcel (~> 1.0.0)
64
64
  mini_mime (>= 1.1.0)
65
- activesupport (6.1.4)
65
+ activesupport (6.1.4.1)
66
66
  concurrent-ruby (~> 1.0, >= 1.0.2)
67
67
  i18n (>= 1.6, < 2)
68
68
  minitest (>= 5.1)
@@ -113,7 +113,7 @@ GEM
113
113
  mini_mime (>= 0.1.1)
114
114
  marcel (1.0.1)
115
115
  method_source (1.0.0)
116
- mini_mime (1.1.0)
116
+ mini_mime (1.1.1)
117
117
  mini_portile2 (2.6.1)
118
118
  minitest (5.14.4)
119
119
  nio4r (2.5.8)
@@ -131,29 +131,29 @@ GEM
131
131
  rack (2.2.3)
132
132
  rack-test (1.1.0)
133
133
  rack (>= 1.0, < 3)
134
- rails (6.1.4)
135
- actioncable (= 6.1.4)
136
- actionmailbox (= 6.1.4)
137
- actionmailer (= 6.1.4)
138
- actionpack (= 6.1.4)
139
- actiontext (= 6.1.4)
140
- actionview (= 6.1.4)
141
- activejob (= 6.1.4)
142
- activemodel (= 6.1.4)
143
- activerecord (= 6.1.4)
144
- activestorage (= 6.1.4)
145
- activesupport (= 6.1.4)
134
+ rails (6.1.4.1)
135
+ actioncable (= 6.1.4.1)
136
+ actionmailbox (= 6.1.4.1)
137
+ actionmailer (= 6.1.4.1)
138
+ actionpack (= 6.1.4.1)
139
+ actiontext (= 6.1.4.1)
140
+ actionview (= 6.1.4.1)
141
+ activejob (= 6.1.4.1)
142
+ activemodel (= 6.1.4.1)
143
+ activerecord (= 6.1.4.1)
144
+ activestorage (= 6.1.4.1)
145
+ activesupport (= 6.1.4.1)
146
146
  bundler (>= 1.15.0)
147
- railties (= 6.1.4)
147
+ railties (= 6.1.4.1)
148
148
  sprockets-rails (>= 2.0.0)
149
149
  rails-dom-testing (2.0.3)
150
150
  activesupport (>= 4.2.0)
151
151
  nokogiri (>= 1.6)
152
152
  rails-html-sanitizer (1.4.1)
153
153
  loofah (~> 2.3)
154
- railties (6.1.4)
155
- actionpack (= 6.1.4)
156
- activesupport (= 6.1.4)
154
+ railties (6.1.4.1)
155
+ actionpack (= 6.1.4.1)
156
+ activesupport (= 6.1.4.1)
157
157
  method_source
158
158
  rake (>= 0.13)
159
159
  thor (~> 1.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 = '3.0.3'
15
+ VERSION = '3.0.4'
16
16
  AUTHORS = ['Thooams'].freeze
17
17
  end
@@ -102,6 +102,7 @@ module UiBibz::Ui::Core::Forms::Selects
102
102
 
103
103
  def searchable
104
104
  add_html_data('enable_filtering') if options[:searchable]
105
+ add_html_data('fuzzy_search') if options[:searchable] == :fuzzy
105
106
  end
106
107
 
107
108
  def n_selected_text
@@ -12,6 +12,15 @@ class DropdownSelectFieldTest < ActionView::TestCase
12
12
  assert_equal expected, actual
13
13
  end
14
14
 
15
+ test 'Dropdown Select Field with fuzzy search' do
16
+ options = options_for_select(Array.new(2) { |i| "option #{i}" })
17
+ actual = UiBibz::Ui::Core::Forms::Selects::DropdownSelectField.new('example', option_tags: options, searchable: :fuzzy).render
18
+ expected = "<select name=\"example\" id=\"example\" data-enable-filtering=\"true\" data-fuzzy-search=\"true\" data-dropdown-classes=\"dropdown\" class=\"btn-secondary multi-select-field\"><option value=\"option 0\">option 0</option>
19
+ <option value=\"option 1\">option 1</option></select>"
20
+
21
+ assert_equal expected, actual
22
+ end
23
+
15
24
  test 'Dropdown Select Field data html options' do
16
25
  grouped_options = { 'North America' => [['United statuss', 'US'], 'Canada'], 'Europe' => %w[Denmark Germany France] }
17
26
  actual = UiBibz::Ui::Core::Forms::Selects::DropdownSelectField.new('example', { multiple: true, option_tags: grouped_options_for_select(grouped_options), clickable_opt_group: true, collapsible_opt_group: true, searchable: true, non_selected_text: 'test', select_all_options: true, number_displayed: 2, status: :danger, n_selected_text: "items selected" }).render
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: 3.0.3
4
+ version: 3.0.4
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: 2021-08-19 00:00:00.000000000 Z
11
+ date: 2021-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails