avo 2.47.0 → 2.48.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38ab852dd9e98b8a3096344f2fd4e3145e937a2cbbef3524adea0fb7339c6949
4
- data.tar.gz: 5140ed4d3a7075d2ed3c539ea87134026b43eba770d0615ad3ffb1694ed9dc77
3
+ metadata.gz: 63a1e190de1ea81343c769a8896e64c91aab1024084dc04d3b8ed1ce96e55233
4
+ data.tar.gz: cd447a81f2d123f536fe500ee57c6cd1396df2e5615ae4b8f1d3dfa944ff8214
5
5
  SHA512:
6
- metadata.gz: 149111feccf530c8da825b8367632a04bb35960e6d9ec3f95c5b2379abcff11a6e1e6e75661c506c9211af56ac4416fe54fb08f0ca9dd849ae934d3e54fa7628
7
- data.tar.gz: 5016d7212fa9dac1aa76868e1fa0bd84930e27c4f5e800892c14bc96c1bf5876aca88357bfd77c1a7995300b3aba75dabce0d6d97eafb09090af49e1676e9862
6
+ metadata.gz: 83f2e5618a4fd689d5619d0c390bf41bae93e73b74b75d30b2cfddc2091eb7770a76704df7a251897910c886d25fefd97e5c4e0de179cb2ac2b93f3a3886855c
7
+ data.tar.gz: 30ed29798e3563143acf57eb594c915fdaac080b082bf02fb5a72c4073b3eed53256773b17987f17e0cb0a26bc3e257ee77ea45aaed92ac9d3c5e2b10843b8ca
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (2.47.0)
4
+ avo (2.48.0)
5
5
  actionview (>= 6.0)
6
6
  active_link_to
7
7
  activerecord (>= 6.0)
@@ -82,6 +82,12 @@ class Avo::FieldWrapperComponent < ViewComponent::Base
82
82
  **@data
83
83
  }
84
84
 
85
+ # Fetch the data attributes off the html option
86
+ wrapper_data_attributes = @field.get_html :data, view: view, element: :wrapper
87
+ if wrapper_data_attributes.present?
88
+ attributes.merge! wrapper_data_attributes
89
+ end
90
+
85
91
  # Add the built-in stimulus integration data tags.
86
92
  if @resource.present?
87
93
  add_stimulus_attributes_for(@resource, attributes)
@@ -91,12 +97,6 @@ class Avo::FieldWrapperComponent < ViewComponent::Base
91
97
  add_stimulus_attributes_for(@action, attributes)
92
98
  end
93
99
 
94
- # Fetch the data attributes off the html option
95
- wrapper_data_attributes = @field.get_html :data, view: view, element: :wrapper
96
- if wrapper_data_attributes.present?
97
- attributes.merge! wrapper_data_attributes
98
- end
99
-
100
100
  attributes
101
101
  end
102
102
 
@@ -1,6 +1,6 @@
1
1
  <div id="<%= dom_id file %>" class="relative min-h-full max-w-full flex-1 flex flex-col justify-between space-y-2">
2
2
  <% if file.present? %>
3
- <div class="flex h-full">
3
+ <div class="flex flex-col h-full">
4
4
  <% if file.representable? && is_image? %>
5
5
  <%= image_tag helpers.main_app.url_for(file), class: "rounded-lg max-w-full #{@extra_classes}" %>
6
6
  <% elsif is_audio? %>
@@ -1,5 +1,6 @@
1
1
  <%= @form.hidden_field @field.id,
2
2
  class: @field.get_html(:classes, view: view, element: :input),
3
3
  data: @field.get_html(:data, view: view, element: :input),
4
- style: @field.get_html(:style, view: view, element: :input)
4
+ style: @field.get_html(:style, view: view, element: :input),
5
+ value: @field.value
5
6
  %>
@@ -32,16 +32,12 @@ module Avo
32
32
  private
33
33
 
34
34
  def encryption_key
35
- secret_key_base[0..31]
35
+ Rails.application.secret_key_base[0..31]
36
36
  rescue
37
37
  # This will fail the decryption process.
38
38
  # It's here only to keep Avo from crashing
39
39
  SecureRandom.random_bytes(32)
40
40
  end
41
-
42
- def secret_key_base
43
- ENV["SECRET_KEY_BASE"] || Rails.application.credentials.secret_key_base || Rails.application.secrets.secret_key_base
44
- end
45
41
  end
46
42
  end
47
43
  end
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "2.47.0" unless const_defined?(:VERSION)
2
+ VERSION = "2.48.0" 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.47.0
4
+ version: 2.48.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: 2024-01-18 00:00:00.000000000 Z
12
+ date: 2024-02-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord