madmin 2.2.0 → 2.3.0

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: 78993e05ef332c22e397e3c82e700613fa23cdb51b471f03f1b99eb5afbda30c
4
- data.tar.gz: bd8983cc682bf888fcc728abd59926b3a06f9eabc44042a87146cd6b356cee85
3
+ metadata.gz: be08056b4e98ff2b31be64068d8924dc33260b76647b843a17c905dc4198ec94
4
+ data.tar.gz: bdd1c308779acf8dc855ebf32d726079b672f02b4081fb8a5141ee60d9a8e19e
5
5
  SHA512:
6
- metadata.gz: af2d4bba734ce8debf047ff1fedbe8364cf416ea9e349f8c218582ae5e6f8480ce79f6ab2edff648608ab57bec550dcabf67ee1d1b304801552e89a45ae73390
7
- data.tar.gz: ce73fc961adc7b6b06967c532a4220401e9f32112eea71933cacce0ab5c89262e331e07e97744b851038ff0590736298be10085c5c02cd7fcf4701e5ae4668ec
6
+ metadata.gz: 472e125873965dd582d35c4b589c60911149c8ed3fbabe8490c260df6a59e776086fa5c7b9fbebcc851505981ea8711318b36bda278d5aa219d08a37069fd0eb
7
+ data.tar.gz: 39acf214eb89d62137951e2ce7085f08eecd4c3aa805c76a18917d6b5408a9b8e0c8bbd38c3aaa35545bde046986cb318f74fa1b51d1b70140293c325bc99309
@@ -1,4 +1,3 @@
1
1
  import "@hotwired/turbo-rails"
2
- import "trix"
3
2
  import "@rails/actiontext"
4
3
  import "controllers"
@@ -1,5 +1,8 @@
1
1
  <%= javascript_importmap_tags "application", importmap: Madmin.importmap %>
2
2
 
3
+ <%= tag.script 'import "trix"'.html_safe, type: "module" if defined?(::Trix) %>
4
+ <%= tag.script 'import "lexxy"'.html_safe, type: "module" if defined?(::Lexxy) %>
5
+
3
6
  <%= stylesheet_link_tag *Madmin.stylesheets, "data-turbo-track": "reload" %>
4
7
  <%= stylesheet_link_tag "https://unpkg.com/flatpickr/dist/flatpickr.min.css", "data-turbo-track": "reload" %>
5
8
  <%= stylesheet_link_tag "https://unpkg.com/tom-select/dist/css/tom-select.min.css", "data-turbo-track": "reload" %>
data/config/importmap.rb CHANGED
@@ -2,9 +2,14 @@ pin "application", to: "madmin/application.js", preload: true
2
2
  pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true
3
3
  pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true
4
4
  pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true
5
- pin "trix"
6
5
  pin "@rails/actiontext", to: "actiontext.esm.js"
6
+ pin "@rails/activestorage", to: "activestorage.esm.js"
7
+
8
+ pin "trix" if defined?(::Trix)
9
+ pin "lexxy", to: "lexxy.js" if defined?(::Lexxy)
10
+
7
11
  pin_all_from Madmin::Engine.root.join("app/javascript/madmin/controllers"), under: "controllers", to: "madmin/controllers"
12
+ pin_all_from Rails.root.join("app/javascript/madmin/controllers"), under: "controllers", to: "madmin/controllers"
8
13
 
9
14
  pin "tom-select", to: "https://ga.jspm.io/npm:tom-select@2.4.1/dist/js/tom-select.complete.js"
10
15
  pin "tailwindcss-stimulus-components", to: "https://ga.jspm.io/npm:tailwindcss-stimulus-components@6.1.2/dist/tailwindcss-stimulus-components.module.js"
data/lib/madmin/engine.rb CHANGED
@@ -8,6 +8,12 @@ module Madmin
8
8
  app.config.eager_load_paths << app.root.join("app/madmin/resources")
9
9
  app.config.eager_load_paths << app.root.join("app/madmin/fields")
10
10
  Madmin.resource_locations << Rails.root.join("app/madmin/resources/")
11
+
12
+ Rails::Engine.subclasses.each do |engine|
13
+ app.config.eager_load_paths << engine.root.join("app/madmin/resources")
14
+ app.config.eager_load_paths << engine.root.join("app/madmin/fields")
15
+ Madmin.resource_locations << engine.root.join("app/madmin/resources/")
16
+ end
11
17
  end
12
18
 
13
19
  config.to_prepare do
@@ -26,6 +32,8 @@ module Madmin
26
32
  else
27
33
  "madmin/application"
28
34
  end
35
+
36
+ Madmin.stylesheets << "lexxy" if defined?(::Lexxy)
29
37
  end
30
38
  end
31
39
 
data/lib/madmin/search.rb CHANGED
@@ -50,7 +50,7 @@ module Madmin
50
50
  end
51
51
 
52
52
  def query_table_name(attr)
53
- ::ActiveRecord::Base.connection.quote_column_name(@scoped_resource.table_name)
53
+ ::ActiveRecord::Base.connection.quote_table_name(@scoped_resource.table_name)
54
54
  end
55
55
 
56
56
  def column_to_query(attr)
@@ -1,3 +1,3 @@
1
1
  module Madmin
2
- VERSION = "2.2.0"
2
+ VERSION = "2.3.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: madmin
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Oliver
@@ -257,7 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
257
257
  - !ruby/object:Gem::Version
258
258
  version: '0'
259
259
  requirements: []
260
- rubygems_version: 3.7.2
260
+ rubygems_version: 4.0.2
261
261
  specification_version: 4
262
262
  summary: A modern admin for Ruby on Rails apps
263
263
  test_files: []