pg_rails 7.6.13 → 7.6.14

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: 1a6345fa67885d94755da1e6580568551967375c593ee249893c8f1a7e5a5daf
4
- data.tar.gz: fed8f1f29879be46bdb5e11d1a5fbcad6ce2106e0db2c693c61f0b34f3494357
3
+ metadata.gz: aa1826517f886fd0a5fd3ea458411cd600181118fd4494563f6fbe78e32d65c9
4
+ data.tar.gz: d0d832af6e4c1912a3edf1f3a65fefcb36541773e65d681a1697e75d96ad85a7
5
5
  SHA512:
6
- metadata.gz: fb9a2f91d0fc73ecbb721f91bfe73b856d3e0b2325f80721e0915a21e9cba9d6cf9d0162c7eb7d753e8ee775b54e1cfbbb6e9bf65d128885fea8ce9fd571a90b
7
- data.tar.gz: d5b71bc1b0954484fe5fc8cf40244d90c461f0063f58e9eb0d5ef50e3507b88510a1d762f777d0374bb3decba7c8463f005db332a93dbfb23335233a957ef003
6
+ metadata.gz: 672e3fe48b7a305c61ab0e2eb5cbf218dc0e56fcfbd23a0faec4c5dc655a08b01170a98ce280781b14e1a3547538afc69d48d95756090348c4544dd69835364c
7
+ data.tar.gz: a648588c54f6e1f72265c511164b2109120f8813423f9c9d9d428f87441e90aaf8835953e906ab041a20378d744ef9b7651d7dde30087cd630c87a45561f3d18
@@ -3,7 +3,7 @@ class InlineEditComponent < InlineComponent
3
3
  @wrapper_mappings = {
4
4
  string: :inline_form_grow,
5
5
  pg_associable: :inline_form_control,
6
- date: :inline_form_control_autosubmit,
6
+ date: :inline_form_control,
7
7
  datetime: :inline_form_control,
8
8
  time: :inline_multi_select,
9
9
  select: :inline_form_select
@@ -2,6 +2,7 @@ import './config'
2
2
  import './channels'
3
3
  import './controllers'
4
4
  import './elements'
5
+ import { flashMessage } from './utils/utils'
5
6
 
6
7
  import { Turbo } from '@hotwired/turbo-rails'
7
8
 
@@ -31,6 +32,14 @@ document.addEventListener('trix-before-initialize', (ev) => {
31
32
  Trix.config.lang.urlPlaceholder = 'Ingresá una URL'
32
33
  })
33
34
 
35
+ window.addEventListener('trix-file-accept', function (event) {
36
+ const maxFileSize = 1024 * 1024 * 10 // 10MB
37
+ if (event.file.size > maxFileSize) {
38
+ event.preventDefault()
39
+ flashMessage('Lo siento mucho pero el tamaño máximo por archivo es de 10MB', 'warning')
40
+ }
41
+ })
42
+
34
43
  document.addEventListener('pg:record-created', (ev) => {
35
44
  Turbo.visit(window.location)
36
45
  setTimeout(() => {
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgRails
4
- VERSION = '7.6.13'
4
+ VERSION = '7.6.14'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.6.13
4
+ version: 7.6.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martín Rosso