avo 3.2.0 → 3.2.1

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.

@@ -1,11 +1,6 @@
1
1
  /* eslint-disable camelcase */
2
2
  import { StreamActions } from '@hotwired/turbo'
3
3
 
4
- StreamActions.close_modal = () => {
5
- document.querySelector('turbo_frame#actions_show').innerHTML = ''
6
- document.querySelector('turbo_frame#attach_modal').innerHTML = ''
7
- }
8
-
9
4
  // TODO: move these to the avo_filters gem
10
5
 
11
6
  StreamActions.close_filters_dropdown = () => {
@@ -21,8 +21,6 @@
21
21
  <% end %>
22
22
  <%= render Avo::AssetManager::JavascriptComponent.new asset_manager: Avo.asset_manager %>
23
23
  <%= render partial: 'avo/partials/head' %>
24
- <%= turbo_refreshes_with method: :morph, scroll: :preserve %>
25
- <%= content_for :head %>
26
24
  </head>
27
25
  <body class="bg-application os-mac">
28
26
  <div class="relative flex flex-1 w-full min-h-full" data-controller="sidebar" data-sidebar-open-value="<%= @sidebar_open %>">
data/avo.gemspec CHANGED
@@ -41,7 +41,7 @@ Gem::Specification.new do |spec|
41
41
  spec.add_dependency "httparty"
42
42
  spec.add_dependency "active_link_to"
43
43
  spec.add_dependency "view_component", ">= 3.7.0"
44
- spec.add_dependency "turbo-rails", "~> 2.0.0.pre.beta.1"
44
+ spec.add_dependency "turbo-rails"
45
45
  spec.add_dependency "turbo_power", ">= 0.6.0"
46
46
  spec.add_dependency "addressable"
47
47
  spec.add_dependency "meta-tags"
data/lib/avo/engine.rb CHANGED
@@ -1,5 +1,3 @@
1
- require "active_support/core_ext/module/attribute_accessors_per_thread"
2
-
3
1
  # requires all dependencies
4
2
  Gem.loaded_specs["avo"].dependencies.each do |d|
5
3
  case d.name
@@ -54,12 +54,16 @@ module Avo
54
54
  end
55
55
 
56
56
  def add_action_data_attributes(attributes, name, element)
57
+ return unless respond_to? :action
58
+
57
59
  if can_add_stimulus_attributes_for?(action, attributes, name, element)
58
60
  attributes.merge!(stimulus_attributes_for(action))
59
61
  end
60
62
  end
61
63
 
62
64
  def add_resource_data_attributes(attributes, name, element, view)
65
+ return unless respond_to? :resource
66
+
63
67
  if can_add_stimulus_attributes_for?(resource, attributes, name, element) && view.in?([:edit, :new])
64
68
  resource_stimulus_attributes = stimulus_attributes_for(resource)
65
69
 
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "3.2.0" unless const_defined?(:VERSION)
2
+ VERSION = "3.2.1" unless const_defined?(:VERSION)
3
3
  end