dropzone_input 1.3.0 → 2.0.2

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: 978606ea507f025893454aab0a70372440e4c6d8724c45e8b8882a0d9279c650
4
- data.tar.gz: 112f9ec11d62e984109d01f2c8c9f266bb2490a19add3dc07252ddb408f9bc06
3
+ metadata.gz: 6e8ade794de0c3590bfd95ee0943a77f0a49110fb26341c4461cc13d3b99cdde
4
+ data.tar.gz: 805ff882b64eae154e83d2e5f7574f7f7244d324cda0ccf9e2d3fde6989247a8
5
5
  SHA512:
6
- metadata.gz: 249e454be1bce83fb758b85a75bba173202e49b43ba92f2e33ee7c9fd9d1c6ff2288625a39ee55141927b35cc2d1c0d4ffc4716a3faabf6a3fd72f71b174de61
7
- data.tar.gz: 0fced6ac12b6257d9b5bd2a1a6ecf2b8cb0c0eceba80d08153bf7d5397e143c8b84e4304392dbd8ae2dfa8fa99b14b0470b56141d62f4ab94facfcfb399dd9f8
6
+ metadata.gz: 42f84f1db82d429508ae4ebfe994113ab131f644fd8cd9605b2048b5940fa5f9147bf5f691e5ad2da00547b567d5a47fedc6b2e82ab23972accfd2141c61167a
7
+ data.tar.gz: a1bd54993a75bb3623261674afb1ade1a1ed5776460bd337a6d1c3ab0b08afa3be9b4067684a7cf8d5033a763c2c161883dfa82b369e7c64dcb254971efbc05f
@@ -1,9 +1,11 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg enable-background="new 0 0 72 43.2" version="1.1" viewBox="0 0 72 43.2" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" class="inline-block w-16 mb-1">
3
- <style type="text/css">
4
- .st0{fill:none;stroke:#424443;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
5
- </style>
6
- <polyline class="st0" points="28.3 26.3 34.4 20.3 40.4 26.3 34.4 20.3 34.4 42.3"/>
7
- <path class="st0" d="m22.1 33c-6.6 0-11.9-5.3-11.9-11.9s5.4-11.9 11.9-11.9c2.4-4.9 7.4-8.3 13.3-8.3 7.6 0 13.9 5.8 14.7 13.2 0.7-0.1 1.3-0.2 2-0.2 5.3 0 9.5 4.3 9.5 9.5s-4.1 9.6-9.4 9.6h-5.6"/>
8
- </svg>
9
- <h1 class="text-xl text-gray-700">Upload</h1>
1
+ <div class="dz-message dz-default">
2
+ <?xml version="1.0" encoding="UTF-8"?>
3
+ <svg enable-background="new 0 0 72 43.2" version="1.1" viewBox="0 0 72 43.2" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" class="inline-block w-16 mb-1">
4
+ <style type="text/css">
5
+ .st0{fill:none;stroke:#424443;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
6
+ </style>
7
+ <polyline class="st0" points="28.3 26.3 34.4 20.3 40.4 26.3 34.4 20.3 34.4 42.3"/>
8
+ <path class="st0" d="m22.1 33c-6.6 0-11.9-5.3-11.9-11.9s5.4-11.9 11.9-11.9c2.4-4.9 7.4-8.3 13.3-8.3 7.6 0 13.9 5.8 14.7 13.2 0.7-0.1 1.3-0.2 2-0.2 5.3 0 9.5 4.3 9.5 9.5s-4.1 9.6-9.4 9.6h-5.6"/>
9
+ </svg>
10
+ <h1 class="text-xl text-gray-700">Upload</h1>
11
+ </div>
@@ -1,4 +1,2 @@
1
1
  <%= form.file_field field, direct_upload: true, data: { 'dropzone-target': 'input' } %>
2
- <div class="dz-default dz-message">
3
- <%= yield %>
4
- </div>
2
+ <%= yield %>
@@ -10,12 +10,10 @@ module DropzoneInput
10
10
 
11
11
  data = {
12
12
  controller: 'dropzone',
13
- dropzone_accepted_files: ActiveStorage.variable_content_types.join(',')
13
+ dropzone_accepted_files: options.delete(:accepted_files) || ActiveStorage.variable_content_types.join(',')
14
14
  }
15
15
  %i(
16
- max_files
17
- max_file_size
18
- max_thumbnail_file_size
16
+ croppable
19
17
  file_added_event
20
18
  file_drop_event
21
19
  file_drop_id
@@ -24,8 +22,13 @@ module DropzoneInput
24
22
  file_removed_event
25
23
  file_start_event
26
24
  file_success_event
25
+ max_file_size
26
+ max_files
27
+ max_thumbnail_file_size
27
28
  parallel_uploads
28
29
  queue_complete_event
30
+ thumbnail_height
31
+ thumbnail_width
29
32
  ).each do |key|
30
33
  data["dropzone_#{key}".to_sym] = options.delete(key) if options.key?(key)
31
34
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DropzoneInput
4
- VERSION = '1.3.0'
4
+ VERSION = '2.0.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dropzone_input
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trae Robrock
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-26 00:00:00.000000000 Z
11
+ date: 2021-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails