avo 3.29.0 → 3.29.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ff86625a0129b2665d309e29ee6b0f5ad90feb33c0ff59d51bebce74b639687
4
- data.tar.gz: f634f37c244df609bfae9e339b480a1bbe34cc400e76618320e07f42983feccf
3
+ metadata.gz: f86cf659cddf676d34648a053c832654ce670b40a7bb67c191baf337d7d10bba
4
+ data.tar.gz: b2735bb819605098ccf7140d9f33f2aed09b534d42e84ec568dab42266a0500f
5
5
  SHA512:
6
- metadata.gz: 6d4cdab25e6cf1bc200643fcbe5d7319cc51db125226f0dd2c949b5d5bee5db01da0fa2e28763617a70abe73919417dc298fa6354289b08f8bb1761d566b1f03
7
- data.tar.gz: a74f2e0c891b284eb17d19eae8f2b2f111895b20e56adefecb7bc5f3b6d2da00b1516eb42d998d05113568a7a0d286e8d48e9f29169d716273a735084f8b0cad
6
+ metadata.gz: c32bd3bdc9a375977f08e0c1bcc59a8ceb0022d9f9e6f898a038246405714cbb961d6b24dcc1f40d33f244810f8c9cb27e20eb20f0f519f4ccad2e5145f32cec
7
+ data.tar.gz: f7e57d7fcf36745e12ed4d957ffbaaa41bd51f79e97d70066f287e0faa757c4ebc5f6b71c035247babff0bb4301a55700a68116d8e9a9c85a946a2e48ef03e49
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (3.29.0)
4
+ avo (3.29.1)
5
5
  actionview (>= 6.1)
6
6
  active_link_to
7
7
  activerecord (>= 6.1)
@@ -28,10 +28,22 @@ module Avo
28
28
  if authorized_to :delete
29
29
  attachment = ActiveStorage::Attachment.find(params[:attachment_id])
30
30
 
31
- flash[:notice] = if attachment.present?
32
- @destroyed = attachment.destroy
31
+ if attachment.present?
32
+ ActiveRecord::Base.transaction do
33
+ @destroyed = attachment
34
+ attachment.destroy!
35
+ @record.reload
36
+ unless @record.save
37
+ @destroyed = nil
38
+ raise ActiveRecord::Rollback
39
+ end
40
+ end
33
41
 
34
- t("avo.attachment_destroyed")
42
+ if @destroyed.present?
43
+ flash[:notice] = t("avo.attachment_destroyed")
44
+ else
45
+ flash[:error] = @record.errors.full_messages.join(", ")
46
+ end
35
47
  else
36
48
  t("avo.failed_to_find_attachment")
37
49
  end
@@ -241,7 +241,7 @@ export default class extends Controller {
241
241
  const url = URI()
242
242
 
243
243
  return url.segment([window.Avo.configuration.root_path, ...this.searchSegments()])
244
- .search(this.searchParams(encodeURIComponent(query)))
244
+ .search(this.searchParams(query))
245
245
  .toString()
246
246
  }
247
247
 
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "3.29.0" unless const_defined?(:VERSION)
2
+ VERSION = "3.29.1" unless const_defined?(:VERSION)
3
3
  end
@@ -1779,7 +1779,7 @@ span.flatpickr-weekday {
1779
1779
  }
1780
1780
  }
1781
1781
 
1782
- /*! @algolia/autocomplete-theme-classic 1.19.4 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
1782
+ /*! @algolia/autocomplete-theme-classic 1.19.5 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
1783
1783
 
1784
1784
  /* ----------------*/
1785
1785
 
@@ -2460,11 +2460,11 @@ body[data-theme=dark], body.dark {
2460
2460
  align-items: center;
2461
2461
  cursor: pointer;
2462
2462
  display: grid;
2463
- gap: calc((16 * 1 * 1px) / 2);
2464
- gap: calc(calc(16 * 1 * 1px) / 2);
2465
2463
  grid-gap: calc((16 * 1 * 1px) / 2);
2466
2464
  grid-gap: calc(calc(16 * 1 * 1px) / 2);
2467
2465
  grid-gap: var(--aa-spacing-half);
2466
+ gap: calc((16 * 1 * 1px) / 2);
2467
+ gap: calc(calc(16 * 1 * 1px) / 2);
2468
2468
  gap: var(--aa-spacing-half);
2469
2469
  grid-auto-flow: column;
2470
2470
  line-height: 1.25em;
@@ -2504,11 +2504,11 @@ body[data-theme=dark], body.dark {
2504
2504
 
2505
2505
  .aa-ItemContentBody {
2506
2506
  display: grid;
2507
- gap: calc(((16 * 1 * 1px) / 2) / 2);
2508
- gap: calc(calc(calc(16 * 1 * 1px) / 2) / 2);
2509
2507
  grid-gap: calc(((16 * 1 * 1px) / 2) / 2);
2510
2508
  grid-gap: calc(calc(calc(16 * 1 * 1px) / 2) / 2);
2511
2509
  grid-gap: calc(var(--aa-spacing-half) / 2);
2510
+ gap: calc(((16 * 1 * 1px) / 2) / 2);
2511
+ gap: calc(calc(calc(16 * 1 * 1px) / 2) / 2);
2512
2512
  gap: calc(var(--aa-spacing-half) / 2);
2513
2513
  }
2514
2514
 
@@ -2555,11 +2555,11 @@ body[data-theme=dark], body.dark {
2555
2555
  color: rgba(38, 38, 39, 1);
2556
2556
  color: rgba(var(--aa-text-color-rgb), var(--aa-text-color-alpha));
2557
2557
  display: grid;
2558
- gap: calc((16 * 1 * 1px) / 2);
2559
- gap: calc(calc(16 * 1 * 1px) / 2);
2560
2558
  grid-gap: calc((16 * 1 * 1px) / 2);
2561
2559
  grid-gap: calc(calc(16 * 1 * 1px) / 2);
2562
2560
  grid-gap: var(--aa-spacing-half);
2561
+ gap: calc((16 * 1 * 1px) / 2);
2562
+ gap: calc(calc(16 * 1 * 1px) / 2);
2563
2563
  gap: var(--aa-spacing-half);
2564
2564
  grid-auto-flow: column;
2565
2565
  justify-content: start;
@@ -2625,11 +2625,11 @@ body[data-theme=dark], body.dark {
2625
2625
  align-items: center;
2626
2626
  color: inherit;
2627
2627
  display: grid;
2628
- gap: calc(((16 * 1 * 1px) / 2) / 2);
2629
- gap: calc(calc(calc(16 * 1 * 1px) / 2) / 2);
2630
2628
  grid-gap: calc(((16 * 1 * 1px) / 2) / 2);
2631
2629
  grid-gap: calc(calc(calc(16 * 1 * 1px) / 2) / 2);
2632
2630
  grid-gap: calc(var(--aa-spacing-half) / 2);
2631
+ gap: calc(((16 * 1 * 1px) / 2) / 2);
2632
+ gap: calc(calc(calc(16 * 1 * 1px) / 2) / 2);
2633
2633
  gap: calc(var(--aa-spacing-half) / 2);
2634
2634
  grid-auto-flow: column;
2635
2635
  justify-content: space-between;