dropzone_input 0.0.4 → 1.1.1

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: 3aad2e21d224f5046976ef28959064cb931e13274bb77eaf5dc7f094fb2aa747
4
- data.tar.gz: 1d8b01bf680a2cbf17df2e3e2a443fbf14ee66c1f1f6d90f6ab4727307854b65
3
+ metadata.gz: 0a282646878001432fa9f7ea3f9ef9845b681e47d4f365bdf5f7dea4ce6d2775
4
+ data.tar.gz: b8ccddf7ef9ca778d1f3e8f85977fa4d4b1ce20571b51f850cd056b0b05ca00c
5
5
  SHA512:
6
- metadata.gz: 40139f31563d50ec13f38987183ec0ee730468f2f9d55eda7eb8fcf9babb362f5f6e611e5e0dec3f0d704c486f549bad7450fe5d5cc1d7392bed6676365dd78a
7
- data.tar.gz: 438bfd72b65d9efe651c6ab2c6d6a96c16127ffeccadb392e6cd29dadde049a28828c66a0ed2138c4ca816bdecce3cd7fcc8408ff6828c9c96830779e7e2e3a3
6
+ metadata.gz: 236de3ec694675c8bb83b8c6f634cb41fb0427522a244dc0f65049e43f4545668bf36159c2be1fb57661815f892738c540996216eeb3bb2198d9a111d4e49ca1
7
+ data.tar.gz: f9546fbb10ae5eaec063d6818551ddd6e8c91f139f13ad3e208cff1e27ef71fe4d0712f8e345e2b2e38dfd80f9b0d231a7e6108cf00fae8518091da0182fdacd
data/README.md CHANGED
@@ -6,6 +6,7 @@ A Rails helper and Stimulus Controller that makes adding dropzone to a Rails for
6
6
  <%= form_with(model: User.new) do |form| %>
7
7
  <%= dropzone form, :image,
8
8
  file_success_event: 'USER_FILE_UPLOADED',
9
+ file_progress_event: 'USER_FILE_PROGRESS',
9
10
  queue_complete_event: 'USER_FILE_UPLOAD_DONE' %>
10
11
  <% end %>
11
12
  ```
@@ -1,4 +1,4 @@
1
- <%= form.file_field field, direct_upload: true, data: { target: 'dropzone.input' } %>
1
+ <%= form.file_field field, direct_upload: true, data: { 'dropzone-target': 'input' } %>
2
2
  <div class="dz-default dz-message">
3
3
  <%= yield %>
4
4
  </div>
@@ -12,7 +12,18 @@ module DropzoneInput
12
12
  controller: 'dropzone',
13
13
  dropzone_accepted_files: ActiveStorage.variable_content_types.join(',')
14
14
  }
15
- %i( max_files max_file_size file_drop_event file_success_event queue_complete_event file_drop_id file_drop_over_id ).each do |key|
15
+ %i(
16
+ max_files
17
+ max_file_size
18
+ file_added_event
19
+ file_removed_event
20
+ file_drop_event
21
+ file_progress_event
22
+ file_success_event
23
+ queue_complete_event
24
+ file_drop_id
25
+ file_drop_over_id
26
+ ).each do |key|
16
27
  data["dropzone_#{key}".to_sym] = options.delete(key) if options.key?(key)
17
28
  end
18
29
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DropzoneInput
4
- VERSION = '0.0.4'
4
+ VERSION = '1.1.1'
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: 0.0.4
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trae Robrock
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-07 00:00:00.000000000 Z
11
+ date: 2021-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails