polaris_view_components 0.10.0 → 0.10.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6559d19f7338ce9195fa1903e58f14596006d813bbc30599061bce4c00d49c9d
|
4
|
+
data.tar.gz: 61223fea9beddaa96b4762b8b7dc00cf42051a462e92bab25733d6f35b232ae2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ad6e0a1dc0f3f491e6beeae7dc4c6c72a8a077ec0b6f6c4cc04e95723761aa93181d663ef9f9f52945d5fad3be40a9d3a3b7e3f64504f9e347925b733841fb5
|
7
|
+
data.tar.gz: 4b5b661dbd74e991dde7e7386f33b65caeaac53839b0c3c0d3951acb30f5179d1d007d97a08c058024c7e1a4e72d56fba8ba0d0a12729b885ebecf458a4116b3
|
data/README.md
CHANGED
@@ -34,11 +34,12 @@ export default class extends Controller {
|
|
34
34
|
}
|
35
35
|
|
36
36
|
files = []
|
37
|
-
acceptedFiles = []
|
38
37
|
rejectedFiles = []
|
39
38
|
_dragging = false
|
40
39
|
dragTargets = []
|
41
40
|
previewRendered = false
|
41
|
+
|
42
|
+
_acceptedFiles = []
|
42
43
|
_size = 'large'
|
43
44
|
|
44
45
|
connect () {
|
@@ -448,6 +449,20 @@ export default class extends Controller {
|
|
448
449
|
|
449
450
|
this.element.classList.add(this.getSizeClass(val))
|
450
451
|
}
|
452
|
+
|
453
|
+
get acceptedFiles () {
|
454
|
+
return this._acceptedFiles
|
455
|
+
}
|
456
|
+
|
457
|
+
set acceptedFiles (val) {
|
458
|
+
this._acceptedFiles = val
|
459
|
+
|
460
|
+
const list = new DataTransfer()
|
461
|
+
|
462
|
+
val.forEach(file => list.items.add(file))
|
463
|
+
|
464
|
+
this.inputTarget.files = list.files
|
465
|
+
}
|
451
466
|
}
|
452
467
|
|
453
468
|
export function fileAccepted (file, accept) {
|
@@ -361,11 +361,11 @@ class Dropzone extends Controller {
|
|
361
361
|
size: String
|
362
362
|
};
|
363
363
|
files=[];
|
364
|
-
acceptedFiles=[];
|
365
364
|
rejectedFiles=[];
|
366
365
|
_dragging=false;
|
367
366
|
dragTargets=[];
|
368
367
|
previewRendered=false;
|
368
|
+
_acceptedFiles=[];
|
369
369
|
_size="large";
|
370
370
|
connect() {
|
371
371
|
document.body.addEventListener("click", this.onExternalTriggerClick);
|
@@ -684,6 +684,15 @@ class Dropzone extends Controller {
|
|
684
684
|
sizeClassesToRemove.forEach((className => this.element.classList.remove(className)));
|
685
685
|
this.element.classList.add(this.getSizeClass(val));
|
686
686
|
}
|
687
|
+
get acceptedFiles() {
|
688
|
+
return this._acceptedFiles;
|
689
|
+
}
|
690
|
+
set acceptedFiles(val) {
|
691
|
+
this._acceptedFiles = val;
|
692
|
+
const list = new DataTransfer;
|
693
|
+
val.forEach((file => list.items.add(file)));
|
694
|
+
this.inputTarget.files = list.files;
|
695
|
+
}
|
687
696
|
}
|
688
697
|
|
689
698
|
function fileAccepted(file, accept) {
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polaris_view_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Gamble
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-06-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|