avo 2.43.0 → 2.45.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of avo might be problematic. Click here for more details.

Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -0
  3. data/Gemfile.lock +5 -1
  4. data/app/components/avo/index/resource_table_component.html.erb +2 -2
  5. data/app/components/avo/index/resource_table_component.rb +16 -0
  6. data/app/components/avo/paginator_component.html.erb +29 -40
  7. data/app/components/avo/paginator_component.rb +18 -0
  8. data/app/components/avo/views/resource_edit_component.html.erb +6 -4
  9. data/app/controllers/avo/actions_controller.rb +8 -10
  10. data/app/controllers/avo/application_controller.rb +0 -1
  11. data/app/controllers/avo/associations_controller.rb +1 -1
  12. data/app/controllers/avo/base_controller.rb +8 -9
  13. data/app/javascript/js/application.js +3 -0
  14. data/app/javascript/js/controllers/action_controller.js +2 -2
  15. data/app/views/avo/actions/show.html.erb +1 -2
  16. data/app/views/avo/partials/_flash_alerts.turbo_stream.erb +1 -1
  17. data/avo.gemspec +1 -0
  18. data/config/i18n-tasks.yml +1 -1
  19. data/config/initializers/pagy.rb +2 -0
  20. data/lib/avo/base_action.rb +17 -31
  21. data/lib/avo/base_resource.rb +1 -0
  22. data/lib/avo/concerns/pagination.rb +53 -0
  23. data/lib/avo/fields/base_field.rb +13 -7
  24. data/lib/avo/version.rb +1 -1
  25. data/lib/generators/avo/templates/locales/avo.ar.yml +5 -5
  26. data/lib/generators/avo/templates/locales/avo.en.yml +2 -0
  27. data/lib/generators/avo/templates/locales/avo.es.yml +126 -0
  28. data/lib/generators/avo/templates/locales/avo.fr.yml +2 -0
  29. data/lib/generators/avo/templates/locales/avo.nb.yml +2 -0
  30. data/lib/generators/avo/templates/locales/avo.nn.yml +2 -0
  31. data/lib/generators/avo/templates/locales/avo.pt-BR.yml +2 -0
  32. data/lib/generators/avo/templates/locales/avo.pt.yml +2 -0
  33. data/lib/generators/avo/templates/locales/avo.ro.yml +2 -0
  34. data/lib/generators/avo/templates/locales/avo.tr.yml +2 -0
  35. data/public/avo-assets/avo.base.js +176 -176
  36. data/public/avo-assets/avo.base.js.map +3 -3
  37. metadata +18 -4
  38. data/app/controllers/avo/team_users_controller.rb +0 -4
  39. data/lib/avo/action_model.rb +0 -20
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.43.0
4
+ version: 2.45.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Marin
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-10-24 00:00:00.000000000 Z
12
+ date: 2023-11-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -123,6 +123,20 @@ dependencies:
123
123
  - - ">="
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: turbo_power
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - "~>"
131
+ - !ruby/object:Gem::Version
132
+ version: 0.5.0
133
+ type: :runtime
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - "~>"
138
+ - !ruby/object:Gem::Version
139
+ version: 0.5.0
126
140
  - !ruby/object:Gem::Dependency
127
141
  name: addressable
128
142
  requirement: !ruby/object:Gem::Requirement
@@ -1607,7 +1621,6 @@ files:
1607
1621
  - app/controllers/avo/reorder_controller.rb
1608
1622
  - app/controllers/avo/resources_controller.rb
1609
1623
  - app/controllers/avo/search_controller.rb
1610
- - app/controllers/avo/team_users_controller.rb
1611
1624
  - app/helpers/avo/application_helper.rb
1612
1625
  - app/helpers/avo/resources_helper.rb
1613
1626
  - app/helpers/avo/url_helpers.rb
@@ -1724,7 +1737,6 @@ files:
1724
1737
  - config/spring.rb
1725
1738
  - db/factories.rb
1726
1739
  - lib/avo.rb
1727
- - lib/avo/action_model.rb
1728
1740
  - lib/avo/app.rb
1729
1741
  - lib/avo/base_action.rb
1730
1742
  - lib/avo/base_card.rb
@@ -1741,6 +1753,7 @@ files:
1741
1753
  - lib/avo/concerns/has_stimulus_controllers.rb
1742
1754
  - lib/avo/concerns/is_resource_item.rb
1743
1755
  - lib/avo/concerns/model_class_constantized.rb
1756
+ - lib/avo/concerns/pagination.rb
1744
1757
  - lib/avo/concerns/policy_helpers.rb
1745
1758
  - lib/avo/concerns/visible_in_dashboard.rb
1746
1759
  - lib/avo/concerns/visible_items.rb
@@ -1913,6 +1926,7 @@ files:
1913
1926
  - lib/generators/avo/templates/js/avo.custom.js
1914
1927
  - lib/generators/avo/templates/locales/avo.ar.yml
1915
1928
  - lib/generators/avo/templates/locales/avo.en.yml
1929
+ - lib/generators/avo/templates/locales/avo.es.yml
1916
1930
  - lib/generators/avo/templates/locales/avo.fr.yml
1917
1931
  - lib/generators/avo/templates/locales/avo.nb.yml
1918
1932
  - lib/generators/avo/templates/locales/avo.nn.yml
@@ -1,4 +0,0 @@
1
- # This controller has been generated to enable Rails' resource routes.
2
- # You shouldn't need to modify it in order to use Avo.
3
- class Avo::TeamUsersController < Avo::ResourcesController
4
- end
@@ -1,20 +0,0 @@
1
- module Avo
2
- class ActionModel
3
- include ActiveModel::Model
4
-
5
- # This class augments a model the action form declaration.
6
- def initialize(attributes = {})
7
- set_attr_accessors attributes
8
-
9
- super(attributes)
10
- end
11
-
12
- private
13
-
14
- def set_attr_accessors(attributes)
15
- attributes.each do |k, v|
16
- self.class.class_eval { attr_accessor k }
17
- end
18
- end
19
- end
20
- end