activeadmin 4.0.0.beta10 → 4.0.0.beta11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/UPGRADING.md +2 -2
- data/app/controllers/active_admin/resource_controller/decorators.rb +1 -1
- data/app/helpers/active_admin/display_helper.rb +2 -2
- data/config/importmap.rb +1 -1
- data/lib/active_admin/version.rb +1 -1
- data/lib/active_admin/views/components/attributes_table.rb +2 -1
- data/lib/active_admin/views/components/paginated_collection.rb +4 -1
- data/plugin.js +1 -1
- 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: df061ca5e8da419454b4e71fac6d1f1a5c0d10ac2bb134a9ed42d1e939605189
|
4
|
+
data.tar.gz: 6bf6a2af2771226c400200da710d1b21d91e22415ca724df6f2417c30edd85dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d75f067eb76806efc510ea3050a6c3b4394e2e731a01b6e6ba07169c3bdabd4620f338e6646e3558c99f830db2767cf4023492fb02294e9c78853dd4d114f7d0
|
7
|
+
data.tar.gz: 194fd87159da440d9d45b81a54edbd52051322f8dab8f09b95762c9883907c48da255a5b67f2af452e2ad8265a859f135f917385ca7431a888aaaf306747fffb
|
data/UPGRADING.md
CHANGED
@@ -8,14 +8,14 @@ ActiveAdmin v4 uses TailwindCSS. It has **mobile web, dark mode and RTL support*
|
|
8
8
|
|
9
9
|
These instructions assume the `cssbundling-rails` and `importmap-rails` gems are already installed and you have run their install commands in your app. If you haven't done so, please do before continuing.
|
10
10
|
|
11
|
-
Update your `Gemfile` with `gem "activeadmin", "4.0.0.
|
11
|
+
Update your `Gemfile` with `gem "activeadmin", "4.0.0.beta11"` and then run `gem install activeadmin --pre`.
|
12
12
|
|
13
13
|
Now, run `rails generate active_admin:assets` to replace the old assets with the new files.
|
14
14
|
|
15
15
|
Then add the npm package and update the `build:css` script.
|
16
16
|
|
17
17
|
```
|
18
|
-
yarn add @activeadmin/activeadmin@4.0.0-
|
18
|
+
yarn add @activeadmin/activeadmin@4.0.0-beta11
|
19
19
|
npm pkg set scripts.build:css="tailwindcss -i ./app/assets/stylesheets/active_admin.css -o ./app/assets/builds/active_admin.css --minify -c tailwind-active_admin.config.js"
|
20
20
|
```
|
21
21
|
|
@@ -61,7 +61,7 @@ module ActiveAdmin
|
|
61
61
|
def self.wrap!(parent, name)
|
62
62
|
::Class.new parent do
|
63
63
|
delegate :reorder, :page, :current_page, :total_pages, :limit_value,
|
64
|
-
:total_count, :
|
64
|
+
:total_count, :offset, :to_key, :group_values,
|
65
65
|
:except, :find_each, :ransack, to: :object
|
66
66
|
|
67
67
|
define_singleton_method(:name) { name }
|
@@ -108,8 +108,8 @@ module ActiveAdmin
|
|
108
108
|
when TrueClass, FalseClass
|
109
109
|
true
|
110
110
|
else
|
111
|
-
if resource.class.respond_to? :
|
112
|
-
|
111
|
+
if resource.class.respond_to? :attribute_types
|
112
|
+
resource.class.attribute_types[attr.to_s].is_a?(ActiveModel::Type::Boolean)
|
113
113
|
end
|
114
114
|
end
|
115
115
|
end
|
data/config/importmap.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
pin "flowbite", preload: true # downloaded from https://cdnjs.cloudflare.com/ajax/libs/flowbite/2.2.1/flowbite.min.js
|
3
|
-
pin "@rails/ujs", to: "rails_ujs_esm.js", preload: true # downloaded from https://cdn.jsdelivr.net/npm/@rails/ujs@7.1.
|
3
|
+
pin "@rails/ujs", to: "rails_ujs_esm.js", preload: true # downloaded from https://cdn.jsdelivr.net/npm/@rails/ujs@7.1.400/+esm
|
4
4
|
pin "active_admin", to: "active_admin.js", preload: true
|
5
5
|
pin_all_from File.expand_path("../app/javascript/active_admin", __dir__), under: "active_admin", preload: true
|
data/lib/active_admin/version.rb
CHANGED
@@ -23,6 +23,7 @@ module ActiveAdmin
|
|
23
23
|
|
24
24
|
def row(*args, &block)
|
25
25
|
title = args[0]
|
26
|
+
data = args[1] || args[0]
|
26
27
|
options = args.extract_options!
|
27
28
|
options["data-row"] = title.to_s.parameterize(separator: "_") if title.present?
|
28
29
|
|
@@ -32,7 +33,7 @@ module ActiveAdmin
|
|
32
33
|
end
|
33
34
|
@collection.each do |record|
|
34
35
|
td do
|
35
|
-
content_for(record, block ||
|
36
|
+
content_for(record, block || data)
|
36
37
|
end
|
37
38
|
end
|
38
39
|
end
|
@@ -102,7 +102,10 @@ module ActiveAdmin
|
|
102
102
|
# you pass in the :total_pages option. We issue a query to determine
|
103
103
|
# if there is another page or not, but the limit/offset make this
|
104
104
|
# query fast.
|
105
|
-
|
105
|
+
offset_scope = @collection.offset(@collection.current_page * @collection.limit_value)
|
106
|
+
# Support array collections. Kaminari::PaginatableArray does not respond to except
|
107
|
+
offset_scope = offset_scope.except(:select, :order) if offset_scope.respond_to?(:except)
|
108
|
+
offset = offset_scope.limit(1).count
|
106
109
|
options[:total_pages] = @collection.current_page + offset
|
107
110
|
options[:right] = 0
|
108
111
|
end
|
data/plugin.js
CHANGED
@@ -312,7 +312,7 @@ module.exports = plugin(
|
|
312
312
|
'[type=radio]': {
|
313
313
|
'@apply w-4 h-4 border-gray-300 focus:ring-2 focus:ring-blue-300 dark:focus:ring-blue-600 dark:focus:bg-blue-600 dark:bg-gray-700 dark:border-gray-600': {}
|
314
314
|
},
|
315
|
-
[['[type=date]', '[type=email]', '[type=number]', '[type=password]', '[type=tel]', '[type=text]', '[type=time]', '[type=url]', 'select', 'textarea']]: {
|
315
|
+
[['[type=datetime-local]', '[type=month]', '[type=week]', '[type=search]', '[type=date]', '[type=email]', '[type=number]', '[type=password]', '[type=tel]', '[type=text]', '[type=time]', '[type=url]', 'select', 'textarea']]: {
|
316
316
|
'@apply bg-gray-50 border border-gray-300 text-gray-900 rounded-md focus:ring-blue-500 focus:border-blue-500 w-full dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500': {}
|
317
317
|
},
|
318
318
|
'a': {
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeadmin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.
|
4
|
+
version: 4.0.0.beta11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charles Maresh
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
|
-
date: 2024-08-
|
18
|
+
date: 2024-08-31 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: arbre
|