@dile/ui 2.1.25 → 2.1.27
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.
|
@@ -2,8 +2,9 @@ import { LitElement, html, css } from 'lit';
|
|
|
2
2
|
import '../file-preview.js';
|
|
3
3
|
import '../../button/button.js';
|
|
4
4
|
import { messageStyles } from '../../input/src/message-styles.js';
|
|
5
|
+
import { DileEmmitChange } from '../../../mixins/form/index.js';
|
|
5
6
|
|
|
6
|
-
export class DileDropFile extends LitElement {
|
|
7
|
+
export class DileDropFile extends DileEmmitChange(LitElement) {
|
|
7
8
|
static styles = [
|
|
8
9
|
messageStyles,
|
|
9
10
|
css`
|
|
@@ -162,6 +163,7 @@ export class DileDropFile extends LitElement {
|
|
|
162
163
|
_processFile(files) {
|
|
163
164
|
if (files.length > 0) {
|
|
164
165
|
this.fileName = files[0].name;
|
|
166
|
+
this.emmitChange();
|
|
165
167
|
if(this._isValidExtension(this.fileName)) {
|
|
166
168
|
this.message = this.firstMessage || '';
|
|
167
169
|
this.errored = false;
|
|
@@ -204,6 +206,7 @@ export class DileDropFile extends LitElement {
|
|
|
204
206
|
clear() {
|
|
205
207
|
this.fileInput.value = "";
|
|
206
208
|
this.fileName = "";
|
|
209
|
+
this.emmitChange();
|
|
207
210
|
}
|
|
208
211
|
|
|
209
212
|
getFiles() {
|
|
@@ -213,6 +216,8 @@ export class DileDropFile extends LitElement {
|
|
|
213
216
|
get value() {
|
|
214
217
|
if(this.fileInput) {
|
|
215
218
|
return this.fileInput.files[0];
|
|
219
|
+
} else {
|
|
220
|
+
return '';
|
|
216
221
|
}
|
|
217
222
|
}
|
|
218
223
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dile/ui",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.27",
|
|
4
4
|
"description": "UI Core components from dile-components.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "252763ee699b898671883ea5c67f4207488ea472"
|
|
30
30
|
}
|