chrv-components 1.10.44 → 1.10.46
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.
|
@@ -1934,8 +1934,10 @@ class ChrFileInputComponent extends ChrBaseInputComponent {
|
|
|
1934
1934
|
this.errors = null;
|
|
1935
1935
|
this.files = [];
|
|
1936
1936
|
this.onFileChange = (event) => {
|
|
1937
|
+
console.log(`[FileInput] (change) -> `, event);
|
|
1937
1938
|
this.files = [];
|
|
1938
1939
|
const files = event.target.files;
|
|
1940
|
+
console.log(`[FileInput] (change): target -> `, files);
|
|
1939
1941
|
const filesAsync = [];
|
|
1940
1942
|
if (files.length <= 0) {
|
|
1941
1943
|
this.valueDisplay = '';
|
|
@@ -1954,8 +1956,8 @@ class ChrFileInputComponent extends ChrBaseInputComponent {
|
|
|
1954
1956
|
const fil = file;
|
|
1955
1957
|
const indexOfExtension = file?.file?.name.lastIndexOf('.');
|
|
1956
1958
|
const [name, extension] = [
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
+
fil.name.slice(0, indexOfExtension),
|
|
1960
|
+
fil.name.slice(indexOfExtension + 1),
|
|
1959
1961
|
];
|
|
1960
1962
|
obs = of({
|
|
1961
1963
|
progress: 100,
|
|
@@ -1963,6 +1965,7 @@ class ChrFileInputComponent extends ChrBaseInputComponent {
|
|
|
1963
1965
|
data: null,
|
|
1964
1966
|
extension: extension,
|
|
1965
1967
|
name: name,
|
|
1968
|
+
file: fil,
|
|
1966
1969
|
url: window.URL.createObjectURL(fil),
|
|
1967
1970
|
},
|
|
1968
1971
|
});
|