avo 2.42.2 → 2.43.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 (30) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/app/components/avo/fields/belongs_to_field/edit_component.html.erb +118 -96
  4. data/app/components/avo/fields/belongs_to_field/edit_component.rb +11 -0
  5. data/app/components/avo/fields/tags_field/edit_component.html.erb +1 -0
  6. data/app/components/avo/modal_component.html.erb +17 -10
  7. data/app/components/avo/modal_component.rb +21 -0
  8. data/app/components/avo/panel_component.html.erb +2 -2
  9. data/app/components/avo/referrer_params_component.html.erb +1 -0
  10. data/app/components/avo/views/resource_edit_component.html.erb +11 -6
  11. data/app/components/avo/views/resource_edit_component.rb +11 -1
  12. data/app/controllers/avo/actions_controller.rb +1 -1
  13. data/app/controllers/avo/base_controller.rb +11 -2
  14. data/app/helpers/avo/application_helper.rb +4 -0
  15. data/app/javascript/js/controllers/fields/reload_belongs_to_field_controller.js +51 -0
  16. data/app/javascript/js/controllers/fields/tags_field_controller.js +2 -1
  17. data/app/javascript/js/controllers.js +2 -0
  18. data/app/views/avo/actions/show.html.erb +2 -0
  19. data/app/views/avo/base/_new_via_belongs_to.html.erb +12 -0
  20. data/app/views/avo/base/close_modal_and_reload_field.turbo_stream.erb +8 -0
  21. data/app/views/avo/base/create_fail_action.turbo_stream.erb +13 -0
  22. data/app/views/avo/partials/_flash_alerts.turbo_stream.erb +3 -0
  23. data/lib/avo/fields/tags_field.rb +2 -0
  24. data/lib/avo/licensing/h_q.rb +4 -2
  25. data/lib/avo/version.rb +1 -1
  26. data/public/avo-assets/avo.base.css +20 -8
  27. data/public/avo-assets/avo.base.js +84 -84
  28. data/public/avo-assets/avo.base.js.map +3 -3
  29. metadata +7 -3
  30. data/app/views/avo/actions/keep_modal_open.turbo_stream.erb +0 -5
@@ -0,0 +1,3 @@
1
+ <%= turbo_stream.append "alerts" do %>
2
+ <%= render Avo::FlashAlertsComponent.new flashes: flash %>
3
+ <% end %>
@@ -5,6 +5,7 @@ module Avo
5
5
  attr_reader :close_on_select
6
6
  attr_reader :delimiters
7
7
  attr_reader :enforce_suggestions
8
+ attr_reader :suggestions_max_items
8
9
  attr_reader :mode
9
10
 
10
11
  def initialize(id, **args, &block)
@@ -16,6 +17,7 @@ module Avo
16
17
  add_array_prop args, :disallowed
17
18
  add_array_prop args, :delimiters, [","]
18
19
  add_array_prop args, :suggestions
20
+ add_string_prop args, :suggestions_max_items
19
21
  add_string_prop args, :mode, nil
20
22
  add_string_prop args, :fetch_values_from
21
23
  add_string_prop args, :fetch_labels
@@ -109,8 +109,10 @@ module Avo
109
109
  cache_store: Avo::App.cache_store&.class&.to_s,
110
110
  **config_metadata
111
111
  }
112
- rescue
113
- {}
112
+ rescue => e
113
+ {
114
+ error: e.message
115
+ }
114
116
  end
115
117
 
116
118
  def cached_response
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "2.42.2" unless const_defined?(:VERSION)
2
+ VERSION = "2.43.0" unless const_defined?(:VERSION)
3
3
  end
@@ -6856,6 +6856,10 @@ trix-toolbar .trix-button-group:not(:first-child){
6856
6856
  max-height:100%
6857
6857
  }
6858
6858
 
6859
+ .max-h-11\/12{
6860
+ max-height:91.666667%
6861
+ }
6862
+
6859
6863
  .min-h-24{
6860
6864
  min-height:6rem
6861
6865
  }
@@ -7646,6 +7650,10 @@ trix-toolbar .trix-button-group:not(:first-child){
7646
7650
  background-color:rgb(246 246 247 / var(--tw-bg-opacity))
7647
7651
  }
7648
7652
 
7653
+ .bg-application{
7654
+ background-color:rgb(var(--color-application-background))
7655
+ }
7656
+
7649
7657
  .bg-orange-700{
7650
7658
  --tw-bg-opacity:1;
7651
7659
  background-color:rgb(194 65 12 / var(--tw-bg-opacity))
@@ -7661,10 +7669,6 @@ trix-toolbar .trix-button-group:not(:first-child){
7661
7669
  background-color:rgb(21 128 61 / var(--tw-bg-opacity))
7662
7670
  }
7663
7671
 
7664
- .bg-application{
7665
- background-color:rgb(var(--color-application-background))
7666
- }
7667
-
7668
7672
  .bg-red-400{
7669
7673
  --tw-bg-opacity:1;
7670
7674
  background-color:rgb(248 113 113 / var(--tw-bg-opacity))
@@ -7853,6 +7857,14 @@ trix-toolbar .trix-button-group:not(:first-child){
7853
7857
  padding-bottom:2rem
7854
7858
  }
7855
7859
 
7860
+ .pt-4{
7861
+ padding-top:1rem
7862
+ }
7863
+
7864
+ .pb-8{
7865
+ padding-bottom:2rem
7866
+ }
7867
+
7856
7868
  .pb-6{
7857
7869
  padding-bottom:1.5rem
7858
7870
  }
@@ -7881,10 +7893,6 @@ trix-toolbar .trix-button-group:not(:first-child){
7881
7893
  padding-top:0px
7882
7894
  }
7883
7895
 
7884
- .pt-4{
7885
- padding-top:1rem
7886
- }
7887
-
7888
7896
  .pb-4{
7889
7897
  padding-bottom:1rem
7890
7898
  }
@@ -9786,6 +9794,10 @@ trix-editor {
9786
9794
  width:50%
9787
9795
  }
9788
9796
 
9797
+ .lg\:w-3\/4{
9798
+ width:75%
9799
+ }
9800
+
9789
9801
  .lg\:grid-cols-3{
9790
9802
  grid-template-columns:repeat(3, minmax(0, 1fr))
9791
9803
  }