@ecodev/natural 41.0.0 → 41.1.1
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.
- package/bundles/ecodev-natural.umd.js +14 -2
- package/bundles/ecodev-natural.umd.js.map +1 -1
- package/ecodev-natural.metadata.json +1 -1
- package/esm2015/lib/modules/file/abstract-file.js +14 -4
- package/esm2015/lib/modules/file/file-drop.directive.js +4 -2
- package/fesm2015/ecodev-natural.js +14 -2
- package/fesm2015/ecodev-natural.js.map +1 -1
- package/lib/modules/file/abstract-file.d.ts +8 -1
- package/package.json +1 -1
|
@@ -8816,6 +8816,13 @@
|
|
|
8816
8816
|
* no effect.
|
|
8817
8817
|
*/
|
|
8818
8818
|
_this.selectable = false;
|
|
8819
|
+
/**
|
|
8820
|
+
* If true, the file selection will be broadcast through `NaturalFileService.filesChanged`.
|
|
8821
|
+
*
|
|
8822
|
+
* It is useful to set this to false if there is two upload on a page with different purpose
|
|
8823
|
+
* and the second upload should not be confused with the first one.
|
|
8824
|
+
*/
|
|
8825
|
+
_this.broadcast = true;
|
|
8819
8826
|
/**
|
|
8820
8827
|
* The single valid file that has been selected.
|
|
8821
8828
|
*
|
|
@@ -8909,7 +8916,9 @@
|
|
|
8909
8916
|
}
|
|
8910
8917
|
if (selection.valid.length || selection.invalid.length) {
|
|
8911
8918
|
this.filesChange.emit(selection);
|
|
8912
|
-
this.
|
|
8919
|
+
if (this.broadcast) {
|
|
8920
|
+
this.naturalFileService.filesChanged.next(selection);
|
|
8921
|
+
}
|
|
8913
8922
|
}
|
|
8914
8923
|
this.getFileElement().value = '';
|
|
8915
8924
|
};
|
|
@@ -8998,6 +9007,7 @@
|
|
|
8998
9007
|
maxSize: [{ type: i0.Input }],
|
|
8999
9008
|
fileSelectionDisabled: [{ type: i0.Input }],
|
|
9000
9009
|
selectable: [{ type: i0.Input }],
|
|
9010
|
+
broadcast: [{ type: i0.Input }],
|
|
9001
9011
|
fileChange: [{ type: i0.Output }],
|
|
9002
9012
|
filesChange: [{ type: i0.Output }],
|
|
9003
9013
|
onChange: [{ type: i0.HostListener, args: ['change', ['$event'],] }]
|
|
@@ -9082,7 +9092,9 @@
|
|
|
9082
9092
|
this.closeDrags();
|
|
9083
9093
|
};
|
|
9084
9094
|
NaturalFileDropDirective.prototype.hasObservers = function () {
|
|
9085
|
-
return this.fileChange.observed ||
|
|
9095
|
+
return (this.fileChange.observed ||
|
|
9096
|
+
this.filesChange.observed ||
|
|
9097
|
+
(this.broadcast && this.naturalFileService.filesChanged.observed));
|
|
9086
9098
|
};
|
|
9087
9099
|
return NaturalFileDropDirective;
|
|
9088
9100
|
}(NaturalAbstractFile));
|