activeadmin-tom_select 4.1.0 → 4.1.2

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.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.claude/commands/fix-tests.md +1 -1
  3. data/.github/workflows/ci.yml +13 -11
  4. data/.github/workflows/npm-publish.yml +3 -3
  5. data/.gitignore +1 -0
  6. data/.rubocop.yml +1 -1
  7. data/AGENTS.md +2 -2
  8. data/CHANGELOG.md +19 -1
  9. data/Gemfile.lock +85 -79
  10. data/README.md +20 -18
  11. data/activeadmin-tom_select.gemspec +3 -3
  12. data/docs/guide-update-your-app.md +198 -25
  13. data/docs/update-tom-select.md +322 -158
  14. data/gemfiles/rails_7.x_active_admin_4.x.gemfile.lock +11 -11
  15. data/gemfiles/rails_8.x_active_admin_4.x.gemfile.lock +66 -64
  16. data/lib/activeadmin/inputs/filters/searchable_select_input.rb +5 -12
  17. data/lib/activeadmin/inputs/filters/tom_select_input.rb +19 -0
  18. data/lib/activeadmin/inputs/searchable_select_input.rb +5 -11
  19. data/lib/activeadmin/inputs/tom_select_input.rb +16 -0
  20. data/lib/activeadmin/tom_select/engine.rb +3 -1
  21. data/lib/activeadmin/tom_select/option_collection.rb +1 -1
  22. data/lib/activeadmin/tom_select/resource_dsl_extension.rb +1 -1
  23. data/lib/activeadmin/tom_select/resource_extension.rb +1 -1
  24. data/lib/activeadmin/tom_select/select_input_extension.rb +39 -16
  25. data/lib/activeadmin/tom_select/version.rb +2 -2
  26. data/lib/activeadmin/tom_select.rb +3 -3
  27. data/lib/generators/active_admin/tom_select/install/install_generator.rb +5 -5
  28. data/npm-package/package-lock.json +2 -2
  29. data/npm-package/package.json +2 -2
  30. data/npm-package/src/index.js +1 -3
  31. data/npm-package/src/tom-select-tailwind.css +26 -20
  32. data/sonar-project.properties +14 -13
  33. data/spec/features/ajax_false_input_spec.rb +74 -0
  34. data/spec/features/end_to_end_spec.rb +33 -20
  35. data/spec/features/form_input_spec.rb +2 -2
  36. data/spec/features/inline_ajax_setting_spec.rb +1 -1
  37. data/spec/internal/Gemfile.lock +1 -1
  38. data/spec/internal/app/admin/articles.rb +28 -0
  39. data/spec/internal/app/admin/option_values.rb +6 -6
  40. data/spec/internal/app/admin/posts.rb +4 -4
  41. data/spec/internal/app/admin/test_ajax_false.rb +18 -0
  42. data/spec/internal/app/admin/variants.rb +2 -2
  43. data/spec/internal/app/assets/config/manifest.js +2 -1
  44. data/spec/internal/app/assets/stylesheets/active_admin.tailwind.css +1 -1
  45. data/spec/internal/app/assets/stylesheets/application.tailwind.css +0 -15
  46. data/spec/internal/app/javascript/active_admin.js +2 -4
  47. data/spec/internal/app/models/option_value.rb +8 -0
  48. data/spec/internal/db/schema.rb +3 -1
  49. data/spec/internal/db/seeds.rb +4 -7
  50. data/spec/internal/package-lock.json +3 -3
  51. data/spec/internal/package.json +1 -1
  52. data/spec/internal/yarn.lock +1 -1
  53. data/spec/support/reset_settings.rb +1 -1
  54. metadata +7 -2
@@ -1,36 +1,36 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- activeadmin-tom_select (4.1.0)
4
+ activeadmin-tom_select (4.1.2)
5
5
  activeadmin (>= 3.0, < 5)
6
6
  ransack (>= 1.8, < 5)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actioncable (8.0.2.1)
12
- actionpack (= 8.0.2.1)
13
- activesupport (= 8.0.2.1)
11
+ actioncable (8.0.3)
12
+ actionpack (= 8.0.3)
13
+ activesupport (= 8.0.3)
14
14
  nio4r (~> 2.0)
15
15
  websocket-driver (>= 0.6.1)
16
16
  zeitwerk (~> 2.6)
17
- actionmailbox (8.0.2.1)
18
- actionpack (= 8.0.2.1)
19
- activejob (= 8.0.2.1)
20
- activerecord (= 8.0.2.1)
21
- activestorage (= 8.0.2.1)
22
- activesupport (= 8.0.2.1)
17
+ actionmailbox (8.0.3)
18
+ actionpack (= 8.0.3)
19
+ activejob (= 8.0.3)
20
+ activerecord (= 8.0.3)
21
+ activestorage (= 8.0.3)
22
+ activesupport (= 8.0.3)
23
23
  mail (>= 2.8.0)
24
- actionmailer (8.0.2.1)
25
- actionpack (= 8.0.2.1)
26
- actionview (= 8.0.2.1)
27
- activejob (= 8.0.2.1)
28
- activesupport (= 8.0.2.1)
24
+ actionmailer (8.0.3)
25
+ actionpack (= 8.0.3)
26
+ actionview (= 8.0.3)
27
+ activejob (= 8.0.3)
28
+ activesupport (= 8.0.3)
29
29
  mail (>= 2.8.0)
30
30
  rails-dom-testing (~> 2.2)
31
- actionpack (8.0.2.1)
32
- actionview (= 8.0.2.1)
33
- activesupport (= 8.0.2.1)
31
+ actionpack (8.0.3)
32
+ actionview (= 8.0.3)
33
+ activesupport (= 8.0.3)
34
34
  nokogiri (>= 1.8.5)
35
35
  rack (>= 2.2.4)
36
36
  rack-session (>= 1.0.1)
@@ -38,15 +38,15 @@ GEM
38
38
  rails-dom-testing (~> 2.2)
39
39
  rails-html-sanitizer (~> 1.6)
40
40
  useragent (~> 0.16)
41
- actiontext (8.0.2.1)
42
- actionpack (= 8.0.2.1)
43
- activerecord (= 8.0.2.1)
44
- activestorage (= 8.0.2.1)
45
- activesupport (= 8.0.2.1)
41
+ actiontext (8.0.3)
42
+ actionpack (= 8.0.3)
43
+ activerecord (= 8.0.3)
44
+ activestorage (= 8.0.3)
45
+ activesupport (= 8.0.3)
46
46
  globalid (>= 0.6.0)
47
47
  nokogiri (>= 1.8.5)
48
- actionview (8.0.2.1)
49
- activesupport (= 8.0.2.1)
48
+ actionview (8.0.3)
49
+ activesupport (= 8.0.3)
50
50
  builder (~> 3.1)
51
51
  erubi (~> 1.11)
52
52
  rails-dom-testing (~> 2.2)
@@ -60,22 +60,22 @@ GEM
60
60
  kaminari (>= 1.2.1)
61
61
  railties (>= 7.0)
62
62
  ransack (>= 4.0)
63
- activejob (8.0.2.1)
64
- activesupport (= 8.0.2.1)
63
+ activejob (8.0.3)
64
+ activesupport (= 8.0.3)
65
65
  globalid (>= 0.3.6)
66
- activemodel (8.0.2.1)
67
- activesupport (= 8.0.2.1)
68
- activerecord (8.0.2.1)
69
- activemodel (= 8.0.2.1)
70
- activesupport (= 8.0.2.1)
66
+ activemodel (8.0.3)
67
+ activesupport (= 8.0.3)
68
+ activerecord (8.0.3)
69
+ activemodel (= 8.0.3)
70
+ activesupport (= 8.0.3)
71
71
  timeout (>= 0.4.0)
72
- activestorage (8.0.2.1)
73
- actionpack (= 8.0.2.1)
74
- activejob (= 8.0.2.1)
75
- activerecord (= 8.0.2.1)
76
- activesupport (= 8.0.2.1)
72
+ activestorage (8.0.3)
73
+ actionpack (= 8.0.3)
74
+ activejob (= 8.0.3)
75
+ activerecord (= 8.0.3)
76
+ activesupport (= 8.0.3)
77
77
  marcel (~> 1.0)
78
- activesupport (8.0.2.1)
78
+ activesupport (8.0.3)
79
79
  base64
80
80
  benchmark (>= 0.3)
81
81
  bigdecimal
@@ -142,7 +142,7 @@ GEM
142
142
  formtastic (5.0.0)
143
143
  actionpack (>= 6.0.0)
144
144
  formtastic_i18n (0.7.0)
145
- globalid (1.2.1)
145
+ globalid (1.3.0)
146
146
  activesupport (>= 6.1)
147
147
  has_scope (0.8.2)
148
148
  actionpack (>= 5.2)
@@ -159,7 +159,7 @@ GEM
159
159
  pp (>= 0.6.0)
160
160
  rdoc (>= 4.0.0)
161
161
  reline (>= 0.4.2)
162
- json (2.13.2)
162
+ json (2.15.0)
163
163
  kaminari (1.2.2)
164
164
  activesupport (>= 4.1.0)
165
165
  kaminari-actionview (= 1.2.2)
@@ -183,12 +183,12 @@ GEM
183
183
  net-imap
184
184
  net-pop
185
185
  net-smtp
186
- marcel (1.0.4)
186
+ marcel (1.1.0)
187
187
  matrix (0.4.3)
188
188
  mime-types (3.7.0)
189
189
  logger
190
190
  mime-types-data (~> 3.2025, >= 3.2025.0507)
191
- mime-types-data (3.2025.0909)
191
+ mime-types-data (3.2025.0924)
192
192
  mini_mime (1.1.5)
193
193
  minitest (5.25.5)
194
194
  net-imap (0.5.10)
@@ -215,7 +215,7 @@ GEM
215
215
  prettyprint
216
216
  prettyprint (0.2.0)
217
217
  prism (1.5.1)
218
- propshaft (1.2.1)
218
+ propshaft (1.3.1)
219
219
  actionpack (>= 7.0.0)
220
220
  activesupport (>= 7.0.0)
221
221
  rack
@@ -234,20 +234,20 @@ GEM
234
234
  rack (>= 1.3)
235
235
  rackup (2.2.1)
236
236
  rack (>= 3)
237
- rails (8.0.2.1)
238
- actioncable (= 8.0.2.1)
239
- actionmailbox (= 8.0.2.1)
240
- actionmailer (= 8.0.2.1)
241
- actionpack (= 8.0.2.1)
242
- actiontext (= 8.0.2.1)
243
- actionview (= 8.0.2.1)
244
- activejob (= 8.0.2.1)
245
- activemodel (= 8.0.2.1)
246
- activerecord (= 8.0.2.1)
247
- activestorage (= 8.0.2.1)
248
- activesupport (= 8.0.2.1)
237
+ rails (8.0.3)
238
+ actioncable (= 8.0.3)
239
+ actionmailbox (= 8.0.3)
240
+ actionmailer (= 8.0.3)
241
+ actionpack (= 8.0.3)
242
+ actiontext (= 8.0.3)
243
+ actionview (= 8.0.3)
244
+ activejob (= 8.0.3)
245
+ activemodel (= 8.0.3)
246
+ activerecord (= 8.0.3)
247
+ activestorage (= 8.0.3)
248
+ activesupport (= 8.0.3)
249
249
  bundler (>= 1.15.0)
250
- railties (= 8.0.2.1)
250
+ railties (= 8.0.3)
251
251
  rails-dom-testing (2.3.0)
252
252
  activesupport (>= 5.0.0)
253
253
  minitest
@@ -255,19 +255,20 @@ GEM
255
255
  rails-html-sanitizer (1.6.2)
256
256
  loofah (~> 2.21)
257
257
  nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
258
- railties (8.0.2.1)
259
- actionpack (= 8.0.2.1)
260
- activesupport (= 8.0.2.1)
258
+ railties (8.0.3)
259
+ actionpack (= 8.0.3)
260
+ activesupport (= 8.0.3)
261
261
  irb (~> 1.13)
262
262
  rackup (>= 1.0.0)
263
263
  rake (>= 12.2)
264
264
  thor (~> 1.0, >= 1.2.2)
265
+ tsort (>= 0.2)
265
266
  zeitwerk (~> 2.6)
266
267
  rainbow (3.1.1)
267
268
  rake (13.3.0)
268
- ransack (4.3.0)
269
- activerecord (>= 6.1.5)
270
- activesupport (>= 6.1.5)
269
+ ransack (4.4.1)
270
+ activerecord (>= 7.2)
271
+ activesupport (>= 7.2)
271
272
  i18n
272
273
  rdoc (6.14.2)
273
274
  erb
@@ -294,7 +295,7 @@ GEM
294
295
  rspec-expectations (~> 3.13)
295
296
  rspec-mocks (~> 3.13)
296
297
  rspec-support (~> 3.13)
297
- rspec-support (3.13.5)
298
+ rspec-support (3.13.6)
298
299
  rspec_junit_formatter (0.6.0)
299
300
  rspec-core (>= 2, < 4, != 2.12.0)
300
301
  rubocop (1.80.2)
@@ -322,10 +323,11 @@ GEM
322
323
  simplecov_json_formatter (~> 0.1)
323
324
  simplecov-html (0.13.2)
324
325
  simplecov_json_formatter (0.1.4)
325
- sqlite3 (2.7.3-x86_64-linux-gnu)
326
+ sqlite3 (2.7.4-x86_64-linux-gnu)
326
327
  stringio (3.1.7)
327
328
  thor (1.4.0)
328
329
  timeout (0.4.3)
330
+ tsort (0.2.0)
329
331
  tzinfo (2.0.6)
330
332
  concurrent-ruby (~> 1.0)
331
333
  unicode-display_width (3.2.0)
@@ -1,18 +1,11 @@
1
+ require 'activeadmin/inputs/filters/tom_select_input'
2
+
1
3
  module ActiveAdmin
2
4
  module Inputs
3
5
  module Filters
4
- # Searchable select input type for ActiveAdmin filters.
5
- #
6
- # @see ActiveAdmin::SearchableSelect::SelectInputExtension
7
- # SelectInputExtension for list of available options.
8
- class SearchableSelectInput < SelectInput
9
- include ActiveAdmin::SearchableSelect::SelectInputExtension
10
-
11
- # Override to remove the empty "Any" option since we're using
12
- # Tom Select's clear button plugin instead
13
- def input_options
14
- super.merge(include_blank: false)
15
- end
6
+ # Legacy alias for TomSelectInput - maintained for backward compatibility
7
+ # @deprecated Use TomSelectInput instead
8
+ class SearchableSelectInput < TomSelectInput
16
9
  end
17
10
  end
18
11
  end
@@ -0,0 +1,19 @@
1
+ module ActiveAdmin
2
+ module Inputs
3
+ module Filters
4
+ # Tom Select input type for ActiveAdmin filters.
5
+ #
6
+ # @see ActiveAdmin::TomSelect::SelectInputExtension
7
+ # SelectInputExtension for list of available options.
8
+ class TomSelectInput < SelectInput
9
+ include ActiveAdmin::TomSelect::SelectInputExtension
10
+
11
+ # Override to remove the empty "Any" option since we're using
12
+ # Tom Select's clear button plugin instead
13
+ def input_options
14
+ super.merge(include_blank: false)
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -1,16 +1,10 @@
1
+ require 'activeadmin/inputs/tom_select_input'
2
+
1
3
  module ActiveAdmin
2
4
  module Inputs
3
- # Searchable select input type for ActiveAdmin filters.
4
- #
5
- # @see ActiveAdmin::SearchableSelect::SelectInputExtension
6
- # SelectInputExtension for list of available options.
7
- class SearchableSelectInput < Formtastic::Inputs::SelectInput
8
- include ActiveAdmin::SearchableSelect::SelectInputExtension
9
-
10
- # Override to prevent adding empty options
11
- def input_options
12
- super.merge(include_blank: false)
13
- end
5
+ # Legacy alias for TomSelectInput - maintained for backward compatibility
6
+ # @deprecated Use TomSelectInput instead
7
+ class SearchableSelectInput < TomSelectInput
14
8
  end
15
9
  end
16
10
  end
@@ -0,0 +1,16 @@
1
+ module ActiveAdmin
2
+ module Inputs
3
+ # Tom Select input type for ActiveAdmin forms.
4
+ #
5
+ # @see ActiveAdmin::TomSelect::SelectInputExtension
6
+ # SelectInputExtension for list of available options.
7
+ class TomSelectInput < Formtastic::Inputs::SelectInput
8
+ include ActiveAdmin::TomSelect::SelectInputExtension
9
+
10
+ # Override to prevent adding empty options
11
+ def input_options
12
+ super.merge(include_blank: false)
13
+ end
14
+ end
15
+ end
16
+ end
@@ -1,13 +1,15 @@
1
1
  require 'active_admin'
2
2
 
3
3
  module ActiveAdmin
4
- module SearchableSelect
4
+ module TomSelect
5
5
  # @api private
6
6
  class Engine < ::Rails::Engine
7
7
  engine_name 'activeadmin_tom_select'
8
8
 
9
9
  initializer 'activeadmin_tom_select.setup' do
10
10
  ActiveSupport.on_load(:active_admin) do
11
+ require 'activeadmin/inputs/tom_select_input'
12
+ require 'activeadmin/inputs/filters/tom_select_input'
11
13
  require 'activeadmin/inputs/searchable_select_input'
12
14
  require 'activeadmin/inputs/filters/searchable_select_input'
13
15
  end
@@ -1,5 +1,5 @@
1
1
  module ActiveAdmin
2
- module SearchableSelect
2
+ module TomSelect
3
3
  # @api private
4
4
  class OptionCollection
5
5
  def initialize(name, options)
@@ -1,5 +1,5 @@
1
1
  module ActiveAdmin
2
- module SearchableSelect
2
+ module TomSelect
3
3
  # Mixin for ActiveAdmin resource DSL
4
4
  module ResourceDSLExtension
5
5
  # Define a collection action to serve options JSON data for
@@ -1,5 +1,5 @@
1
1
  module ActiveAdmin
2
- module SearchableSelect
2
+ module TomSelect
3
3
  # @api private
4
4
  module ResourceExtension
5
5
  def searchable_select_option_collections
@@ -1,5 +1,5 @@
1
1
  module ActiveAdmin
2
- module SearchableSelect
2
+ module TomSelect
3
3
  # Mixin for searchable select inputs.
4
4
  #
5
5
  # Supports the same options as inputs of type `:select`.
@@ -26,7 +26,7 @@ module ActiveAdmin
26
26
  #
27
27
  # If the `ajax` option is present, the `collection` option is
28
28
  # ignored.
29
- module SelectInputExtension
29
+ module SelectInputExtension # rubocop:disable Metrics/ModuleLength
30
30
  # @api private
31
31
  def to_html
32
32
  super
@@ -40,30 +40,53 @@ module ActiveAdmin
40
40
  # @api private
41
41
  def input_html_options
42
42
  super.tap do |options|
43
- options[:class] = [options[:class], 'searchable-select-input'].compact.join(' ')
44
- options['data-ajax-url'] = ajax_url if ajax? && !SearchableSelect.inline_ajax_options
45
- options['data-clearable'] = true if clearable?
43
+ add_css_class(options)
44
+ add_data_attributes(options)
46
45
  end
47
46
  end
48
47
 
49
48
  # @api private
49
+ # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength
50
+ # rubocop:disable Metrics/PerceivedComplexity
50
51
  def collection_from_options
51
- return super unless options[:ajax]
52
+ if ajax?
53
+ collection = if TomSelect.inline_ajax_options
54
+ all_options_collection
55
+ else
56
+ selected_value_collection
57
+ end
58
+
59
+ # Remove any empty/blank options since we use clear button instead
60
+ collection.reject { |item| item.first.to_s.strip.empty? && item.last.to_s.strip.empty? }
61
+ else
62
+ # When not using ajax, get the original collection
63
+ collection = super
64
+ # Add empty option at the beginning if not present to prevent auto-selection
65
+ if collection.present? && collection.none? { |item| item.last.to_s.strip.empty? }
66
+ [['', '']] + collection
67
+ else
68
+ collection
69
+ end
70
+ end
71
+ end
72
+ # rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength
73
+ # rubocop:enable Metrics/PerceivedComplexity
52
74
 
53
- collection = if SearchableSelect.inline_ajax_options
54
- all_options_collection
55
- else
56
- selected_value_collection
57
- end
75
+ private
58
76
 
59
- # Remove any empty/blank options since we use clear button instead
60
- collection.reject { |item| item.first.to_s.strip.empty? && item.last.to_s.strip.empty? }
77
+ def add_css_class(options)
78
+ css_class = self.class.name.demodulize.underscore.dasherize
79
+ options[:class] = [options[:class], css_class].compact.join(' ')
61
80
  end
62
81
 
63
- private
82
+ def add_data_attributes(options)
83
+ options['data-ajax-url'] = ajax_url if ajax? && !TomSelect.inline_ajax_options
84
+ options['data-clearable'] = true if clearable?
85
+ end
64
86
 
65
87
  def ajax?
66
- options[:ajax].present?
88
+ # Default to true unless explicitly set to false
89
+ options[:ajax] != false
67
90
  end
68
91
 
69
92
  def clearable?
@@ -72,7 +95,7 @@ module ActiveAdmin
72
95
  end
73
96
 
74
97
  def ajax_url
75
- return unless options[:ajax]
98
+ return unless ajax?
76
99
 
77
100
  [ajax_resource.route_collection_path(path_params),
78
101
  '/',
@@ -1,5 +1,5 @@
1
1
  module ActiveAdmin
2
- module SearchableSelect
3
- VERSION = '4.1.0'.freeze
2
+ module TomSelect
3
+ VERSION = '4.1.2'.freeze
4
4
  end
5
5
  end
@@ -5,12 +5,12 @@ require 'activeadmin/tom_select/resource_dsl_extension'
5
5
  require 'activeadmin/tom_select/select_input_extension'
6
6
  require 'activeadmin/tom_select/version'
7
7
 
8
- ActiveAdmin::Resource.include ActiveAdmin::SearchableSelect::ResourceExtension
9
- ActiveAdmin::ResourceDSL.include ActiveAdmin::SearchableSelect::ResourceDSLExtension
8
+ ActiveAdmin::Resource.include ActiveAdmin::TomSelect::ResourceExtension
9
+ ActiveAdmin::ResourceDSL.include ActiveAdmin::TomSelect::ResourceDSLExtension
10
10
 
11
11
  module ActiveAdmin
12
12
  # Global settings for searchable selects
13
- module SearchableSelect
13
+ module TomSelect
14
14
  # Statically render all options into searchable selects with
15
15
  # `ajax` option set to true. This can be used to ease ui driven
16
16
  # integration testing.
@@ -17,8 +17,8 @@ module ActiveAdmin
17
17
  def install_npm_package
18
18
  return unless options[:bundler] != 'importmap'
19
19
 
20
- say 'Installing @rocket-sensei/activeadmin-tom_select npm package...', :green
21
- run 'npm install @rocket-sensei/activeadmin-tom_select'
20
+ say 'Installing activeadmin-tom_select npm package...', :green
21
+ run 'npm install activeadmin-tom_select'
22
22
  end
23
23
 
24
24
  def setup_javascript
@@ -90,7 +90,7 @@ module ActiveAdmin
90
90
  <<~JS
91
91
 
92
92
  // ActiveAdmin Tom Select
93
- import '@rocket-sensei/activeadmin-tom_select';
93
+ import 'activeadmin-tom_select';
94
94
  JS
95
95
  end
96
96
  else
@@ -100,7 +100,7 @@ module ActiveAdmin
100
100
  import "@activeadmin/activeadmin";
101
101
 
102
102
  // ActiveAdmin Tom Select
103
- import '@rocket-sensei/activeadmin-tom_select';
103
+ import 'activeadmin-tom_select';
104
104
  JS
105
105
  end
106
106
  end
@@ -166,7 +166,7 @@ module ActiveAdmin
166
166
  <<~JS
167
167
 
168
168
  // ActiveAdmin Tom Select
169
- import '@rocket-sensei/activeadmin-tom_select';
169
+ import 'activeadmin-tom_select';
170
170
  JS
171
171
  end
172
172
  else
@@ -1,11 +1,11 @@
1
1
  {
2
- "name": "@rocket-sensei/activeadmin-tom_select",
2
+ "name": "activeadmin-tom_select",
3
3
  "version": "4.1.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
- "name": "@rocket-sensei/activeadmin-tom_select",
8
+ "name": "activeadmin-tom_select",
9
9
  "version": "4.1.0",
10
10
  "license": "MIT",
11
11
  "peerDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
- "name": "@rocket-sensei/activeadmin-tom_select",
3
- "version": "4.1.0",
2
+ "name": "activeadmin-tom_select",
3
+ "version": "4.1.2",
4
4
  "description": "Use Tom Select for searchable selects in Active Admin forms and filters.",
5
5
  "main": "src/index.js",
6
6
  "module": "src/index.js",
@@ -3,7 +3,7 @@
3
3
  import TomSelect from 'tom-select';
4
4
 
5
5
  const MODULE_NAME = 'ActiveAdmin Searchable Select';
6
- const SELECTOR = '.searchable-select-input';
6
+ const SELECTOR = '.searchable-select-input, .tom-select-input';
7
7
  const INITIALIZED_CLASS = 'tom-select-initialized';
8
8
 
9
9
  // Core initialization function
@@ -148,6 +148,4 @@ export function setupAutoInit() {
148
148
  initSearchableSelects(selects);
149
149
  }
150
150
  });
151
-
152
- console.log(`${MODULE_NAME} (Tom Select) initialized`);
153
151
  }