dropzone_input 0.0.3 → 1.1.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: f43ed683613903787253cbbb2fc33a367d136827bc81142507c41715259f5380
4
- data.tar.gz: d3e584083ca1732c7096d9196e47f52590156ddfedb9b9c72652ea20937c3d4b
3
+ metadata.gz: d83641a86dd18a194a90b002504d169c38da2684dae57882813c18ed164b2990
4
+ data.tar.gz: 203c6b2c856338ebc98351a1aa9cedf64f44aa627c40a1c1338b17e0350e1f55
5
5
  SHA512:
6
- metadata.gz: 6a6816c083c814a246d0790c63fb88d7bf10e19819a5a2dbd71d212ed78efc6c28fa3475f10ce727898bc09452ff3bacde266036ab791a739d722ce2ddf2e679
7
- data.tar.gz: 2fb0b976b24d7d2b7d9b076e7d3fd5058f12510dd0be8d4c820bd0201eff39c44bef87e7992c72fc77ec58f0b11cbc45e325e2768ba8122834d2fa15838042ea
6
+ metadata.gz: 8a127a97b395f960a65746fb99fb35f56c8defa5bf146b77bd45ac31f6feda6c81ac2f23b74ba5356c8d8ac4fbc09bf90df237341125193c4f90af18780e8c44
7
+ data.tar.gz: 0061e32027beb7347e0e133f45992a8c45578e4b87d94d73d99bd4ba6228eb07ec79910c66ab73f4f14541f03c0fe41b2035cb064a0e2e3d3553bcb65d6d443a
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_success_event queue_complete_event ).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.3'
4
+ VERSION = '1.1.0'
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.3
4
+ version: 1.1.0
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-10-30 00:00:00.000000000 Z
11
+ date: 2021-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails