avo 1.22.4 → 1.23.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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 472b0c4d748a2cc35c595170f3abd2c83e8ef62ea2f41ec15ba2fac1b4fba4eb
4
- data.tar.gz: 28de6b788064fb476e80234f058e192dae5bc1866bb544c7db197a53adf801dd
3
+ metadata.gz: 93ddc5b52a7eb149886833f2eda8dcf69e5cfa29af5d357f57dfbc3b6e03800e
4
+ data.tar.gz: 44050a09443ff49550f7d9e3c22c3a4b03eea83f9c0d3a08bbc4a97d5084a355
5
5
  SHA512:
6
- metadata.gz: a89890b81a8d26b13f7ace5e3854b21b503bf7ae3e61c08e4ba0a52257b4644cb29f3c8a03789726aa9e4479b2a0c5f334163536198f8685f9df516539191467
7
- data.tar.gz: 14402ad63c9918b69789dd0161124a06f74829f400138ff8cf972a36df7ac677b9d62319355b26f6a8da9db38c686d28728431a4d6c81ab3202e7df3c4779df3
6
+ metadata.gz: 346e58ffb98b4b60576282f43a766f6e9e388dcf83041dffc8b1f9c1e81292271869e2f356df92471afa77e51eff5945f127a236e2adc1c41a24ccb6847d2a5f
7
+ data.tar.gz: 5dbeae53b1d1179117f035c1bc2b806c9f88064f5af9c9c1498fbd6fe24107d96a67c02345f437f2cd73789de4935932c97f52730142e970808a68e49c5e2aa0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (1.22.4)
4
+ avo (1.23.0)
5
5
  active_link_to
6
6
  addressable
7
7
  breadcrumbs_on_rails
data/README.md CHANGED
@@ -73,3 +73,9 @@ Please read the [UPGRADE_GUIDE.MD](https://docs.avohq.io/1.0/upgrade.html)
73
73
 
74
74
 
75
75
  ![Alt](https://repobeats.axiom.co/api/embed/1481a6a259064f02a7936470d12a50802a9c98a4.svg "Repobeats analytics image")
76
+
77
+ # Shoutouts
78
+
79
+ [Get a box of waffles and some of the best app monitoring from Appsignal](https://appsignal.com/r/93dbe69bfb) 🧇
80
+
81
+ [Get $100 in credits from Digital Ocean](https://www.digitalocean.com/?refcode=efc1fe881d74&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge) 💸
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::AlertComponent < ViewComponent::Base
4
+ attr_reader :type
5
+ attr_reader :message
6
+
7
+ def initialize(type, message)
8
+ @type = type
9
+ @message = message
10
+ end
11
+ end
@@ -0,0 +1,3 @@
1
+ <% helpers.flash.each do |type, message| %>
2
+ <%= render Avo::AlertComponent.new type.to_sym, message %>
3
+ <% end %>
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::AlertsComponent < ViewComponent::Base
4
+
5
+ end
@@ -3,7 +3,7 @@
3
3
  # When rendering the frames the flashed content gets lost.
4
4
  # By including the alerts partial, the stimulus will pick them up and display them to the user.
5
5
  %>
6
- <%= render partial: 'avo/partials/alerts' if flash.present? && name.present? %>
6
+ <%= render Avo::AlertsComponent.new if helpers.flash.present? && name.present? %>
7
7
 
8
- <%= yield %>
8
+ <%= content %>
9
9
  <% if name.present? %></turbo-frame><% end %>
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::TurboFrameWrapperComponent < ViewComponent::Base
4
+ attr_reader :name
5
+
6
+ def initialize(name = nil)
7
+ @name = name
8
+ end
9
+ end
@@ -21,7 +21,7 @@ module Avo
21
21
  end
22
22
 
23
23
  def turbo_frame_wrap(name, &block)
24
- render layout: "avo/partials/turbo_frame_wrap", locals: {name: name} do
24
+ render Avo::TurboFrameWrapperComponent.new name do
25
25
  capture(&block)
26
26
  end
27
27
  end
@@ -51,7 +51,7 @@
51
51
  <%= turbo_frame_tag 'destroy_attachment_form' %>
52
52
 
53
53
  <%= turbo_frame_tag 'alerts' do %>
54
- <%= render partial: 'avo/partials/alerts' %>
54
+ <%= render Avo::AlertsComponent.new %>
55
55
  <% end %>
56
56
  </div>
57
57
 
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "1.22.4"
2
+ VERSION = "1.23.0"
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: 1.22.4
4
+ version: 1.23.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: 2022-02-24 00:00:00.000000000 Z
12
+ date: 2022-02-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -271,6 +271,10 @@ files:
271
271
  - app/assets/svgs/x-circle-sm.svg
272
272
  - app/assets/svgs/x-circle.svg
273
273
  - app/assets/svgs/x.svg
274
+ - app/components/avo/alert_component.html.erb
275
+ - app/components/avo/alert_component.rb
276
+ - app/components/avo/alerts_component.html.erb
277
+ - app/components/avo/alerts_component.rb
274
278
  - app/components/avo/edit/field_wrapper_component.html.erb
275
279
  - app/components/avo/edit/field_wrapper_component.rb
276
280
  - app/components/avo/fields/badge_field/index_component.html.erb
@@ -457,6 +461,8 @@ files:
457
461
  - app/components/avo/resource_component.rb
458
462
  - app/components/avo/show/field_wrapper_component.html.erb
459
463
  - app/components/avo/show/field_wrapper_component.rb
464
+ - app/components/avo/turbo_frame_wrapper_component.html.erb
465
+ - app/components/avo/turbo_frame_wrapper_component.rb
460
466
  - app/components/avo/views/resource_edit_component.html.erb
461
467
  - app/components/avo/views/resource_edit_component.rb
462
468
  - app/components/avo/views/resource_index_component.html.erb
@@ -530,8 +536,6 @@ files:
530
536
  - app/views/avo/home/index.html.erb
531
537
  - app/views/avo/partials/_a_button.html.erb
532
538
  - app/views/avo/partials/_a_link.html.erb
533
- - app/views/avo/partials/_alert.html.erb
534
- - app/views/avo/partials/_alerts.html.erb
535
539
  - app/views/avo/partials/_custom_tools_alert.html.erb
536
540
  - app/views/avo/partials/_empty_state.html.erb
537
541
  - app/views/avo/partials/_failed_state.html.erb
@@ -547,7 +551,6 @@ files:
547
551
  - app/views/avo/partials/_scripts.html.erb
548
552
  - app/views/avo/partials/_sortable_component.html.erb
549
553
  - app/views/avo/partials/_table_header.html.erb
550
- - app/views/avo/partials/_turbo_frame_wrap.html.erb
551
554
  - app/views/avo/partials/_view_toggle_button.html.erb
552
555
  - app/views/avo/relations/new.html.erb
553
556
  - app/views/avo/sidebar/_license_warning.html.erb
@@ -1,3 +0,0 @@
1
- <% flash.each do |type, message| %>
2
- <%= render partial: 'avo/partials/alert', locals: {type: type.to_sym, message: message} %>
3
- <% end %>