avo 2.15.2 → 2.15.3

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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: afff2c325122eaf769499aac7aec03ba806717a5d17666765c2ce063536bf665
4
- data.tar.gz: 56f28ef14b94dc3636481a96494632c0b3d2362e9158fe94d91af0b3972f40cf
3
+ metadata.gz: 68cfd9efb2f52f774b347c404afe6b68e8e0e21102500e234184a11a4b8dd104
4
+ data.tar.gz: b8f9fc9d7a24fc30a453f0643aeae48c2e4bb9ecce27b59679e246bd55054fa3
5
5
  SHA512:
6
- metadata.gz: e6091db813153b5cd5a16a13da7c4ca3fe033967f4c78c39e81c027d99848d6d6cc81b5d57f2ad07c914cce6ec960e57918f7ba711f22e0e4ac3acaa35557c8f
7
- data.tar.gz: 000e61a2068531bf1ace9deeecdf9b58f300ad26453d7b86996cb610d0bcebb79c92b9707aec0f9a54612c9d98a4ff8556a2ac28649980d5a8b265823e566f7e
6
+ metadata.gz: c80aedbf84f25b6b53e99d51c6ba3e603eaa619e9963ae988b4f76469f3f14c92e9e5f8045234bb7746cbed3008b9656d598effc0d49c742665acbbd4d35390a
7
+ data.tar.gz: c116b5296b79976867bd3f3342d334d355e7a5acb012b5bbb7e2965b65d98794f08b6f747d07e1598b144ff78c5c1fcfcf0e978ab681166ea67ca8a86abf9b4c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (2.15.2)
4
+ avo (2.15.3)
5
5
  active_link_to
6
6
  addressable
7
7
  breadcrumbs_on_rails
@@ -38,7 +38,7 @@
38
38
  </div>
39
39
  </div>
40
40
  <div class="w-full place-self-end">
41
- <%= render(Avo::Index::ResourceControlsComponent.new(resource: @resource, reflection: @reflection, parent_model: @parent_model, view_type: :grid)) %>
41
+ <%= render(Avo::Index::ResourceControlsComponent.new(resource: @resource, reflection: @reflection, parent_model: @parent_model, parent_resource: @parent_resource, view_type: :grid)) %>
42
42
  </div>
43
43
  </div>
44
44
  </div>
@@ -3,11 +3,12 @@
3
3
  class Avo::Index::GridItemComponent < ViewComponent::Base
4
4
  include Avo::ResourcesHelper
5
5
 
6
- def initialize(resource: nil, reflection: nil, parent_model: nil)
6
+ def initialize(resource: nil, reflection: nil, parent_model: nil, parent_resource: nil)
7
7
  @resource = resource
8
8
  @reflection = reflection
9
9
  @grid_fields = resource.get_grid_fields
10
10
  @parent_model = parent_model
11
+ @parent_resource = parent_resource
11
12
  end
12
13
 
13
14
  private
@@ -3,7 +3,7 @@
3
3
  data-selected-resources-name="<%= @resource.model_key %>" data-selected-resources="[]">
4
4
  <% @resources.each_with_index do |resource, index| %>
5
5
  <% cache_if Avo.configuration.cache_resources_on_index_view, resource.cache_hash(@parent_model) do %>
6
- <%= render(Avo::Index::GridItemComponent.new(resource: resource, reflection: @reflection, parent_model: @parent_model)) %>
6
+ <%= render(Avo::Index::GridItemComponent.new(resource: resource, reflection: @reflection, parent_model: @parent_model, parent_resource: @parent_resource)) %>
7
7
  <% end %>
8
8
  <% end %>
9
9
  </div>
@@ -1,10 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Avo::Index::ResourceGridComponent < ViewComponent::Base
4
- def initialize(resources: nil, resource: nil, reflection: nil, parent_model: nil)
4
+ def initialize(resources: nil, resource: nil, reflection: nil, parent_model: nil, parent_resource: @parent_resource)
5
5
  @resources = resources
6
6
  @resource = resource
7
7
  @reflection = reflection
8
8
  @parent_model = parent_model
9
+ @parent_resource = parent_resource
9
10
  end
10
11
  end
@@ -65,7 +65,7 @@
65
65
  <% end %>
66
66
  <% end %>
67
67
  <% if view_type.to_sym == :grid %>
68
- <%= render Avo::Index::ResourceGridComponent.new(resources: @resources, resource: @resource, reflection: @reflection, parent_model: @parent_model) %>
68
+ <%= render Avo::Index::ResourceGridComponent.new(resources: @resources, resource: @resource, reflection: @reflection, parent_model: @parent_model, parent_resource: @parent_resource) %>
69
69
  <div class="mt-6">
70
70
  <%= render Avo::PaginatorComponent.new pagy: @pagy, turbo_frame: @turbo_frame || 'none', index_params: @index_params, resource: @resource, parent_model: @parent_model, discreet_pagination: field&.discreet_pagination %>
71
71
  </div>
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "2.15.2" unless const_defined?(:VERSION)
2
+ VERSION = "2.15.3" unless const_defined?(:VERSION)
3
3
  end
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.15.2
4
+ version: 2.15.3
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: 2022-09-14 00:00:00.000000000 Z
12
+ date: 2022-09-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails