@umbraco-ui/uui-file-dropzone 1.0.0-rc.1 → 1.0.0

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.
@@ -19,7 +19,7 @@
19
19
  },
20
20
  {
21
21
  "name": "label",
22
- "description": "Label to be used for aria-label and eventually as visual label",
22
+ "description": "Label to be used for aria-label and potentially as visual label for some components",
23
23
  "type": "string"
24
24
  }
25
25
  ],
@@ -46,7 +46,7 @@
46
46
  {
47
47
  "name": "label",
48
48
  "attribute": "label",
49
- "description": "Label to be used for aria-label and eventually as visual label",
49
+ "description": "Label to be used for aria-label and potentially as visual label for some components",
50
50
  "type": "string"
51
51
  }
52
52
  ],
package/lib/index.js CHANGED
@@ -62,7 +62,11 @@ let UUIFileDropzoneElement = class extends LabelMixin("", LitElement) {
62
62
  fileEntries.push(entry);
63
63
  } else if (entry.isDirectory) {
64
64
  fileEntries.push(entry);
65
- queue.push(...await this._readAllDirectoryEntries(entry.createReader()));
65
+ queue.push(
66
+ ...await this._readAllDirectoryEntries(
67
+ entry.createReader()
68
+ )
69
+ );
66
70
  }
67
71
  }
68
72
  } else {
@@ -72,7 +76,11 @@ let UUIFileDropzoneElement = class extends LabelMixin("", LitElement) {
72
76
  fileEntries.push(entry);
73
77
  } else if (entry.isDirectory) {
74
78
  fileEntries.push(entry);
75
- queue.push(...await this._readAllDirectoryEntries(entry.createReader()));
79
+ queue.push(
80
+ ...await this._readAllDirectoryEntries(
81
+ entry.createReader()
82
+ )
83
+ );
76
84
  }
77
85
  }
78
86
  }
@@ -97,7 +105,9 @@ let UUIFileDropzoneElement = class extends LabelMixin("", LitElement) {
97
105
  }
98
106
  }
99
107
  async _getFile(fileEntry) {
100
- return await new Promise((resolve, reject) => fileEntry.file(resolve, reject));
108
+ return await new Promise(
109
+ (resolve, reject) => fileEntry.file(resolve, reject)
110
+ );
101
111
  }
102
112
  async _isAccepted(acceptList, wildcards, entry) {
103
113
  const file = await this._getFile(entry);
@@ -124,9 +134,11 @@ let UUIFileDropzoneElement = class extends LabelMixin("", LitElement) {
124
134
  if (this.multiple === false && result.length > 0) {
125
135
  result = [result[0]];
126
136
  }
127
- this.dispatchEvent(new UUIFileDropzoneEvent(UUIFileDropzoneEvent.FILE_CHANGE, {
128
- detail: { files: result }
129
- }));
137
+ this.dispatchEvent(
138
+ new UUIFileDropzoneEvent(UUIFileDropzoneEvent.FILE_CHANGE, {
139
+ detail: { files: result }
140
+ })
141
+ );
130
142
  }
131
143
  }
132
144
  _onDragOver(e) {
@@ -142,9 +154,11 @@ let UUIFileDropzoneElement = class extends LabelMixin("", LitElement) {
142
154
  }
143
155
  _onFileInputChange() {
144
156
  const files = this._input.files ? Array.from(this._input.files) : [];
145
- this.dispatchEvent(new UUIFileDropzoneEvent(UUIFileDropzoneEvent.FILE_CHANGE, {
146
- detail: { files }
147
- }));
157
+ this.dispatchEvent(
158
+ new UUIFileDropzoneEvent(UUIFileDropzoneEvent.FILE_CHANGE, {
159
+ detail: { files }
160
+ })
161
+ );
148
162
  }
149
163
  render() {
150
164
  return html`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umbraco-ui/uui-file-dropzone",
3
- "version": "1.0.0-rc.1",
3
+ "version": "1.0.0",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "Umbraco",
@@ -30,8 +30,8 @@
30
30
  "custom-elements.json"
31
31
  ],
32
32
  "dependencies": {
33
- "@umbraco-ui/uui-base": "1.0.0-rc.1",
34
- "@umbraco-ui/uui-symbol-file-dropzone": "1.0.0-rc.1"
33
+ "@umbraco-ui/uui-base": "1.0.0",
34
+ "@umbraco-ui/uui-symbol-file-dropzone": "1.0.0"
35
35
  },
36
36
  "scripts": {
37
37
  "build": "npm run analyze && tsc --build --force && rollup -c rollup.config.js",
@@ -42,5 +42,5 @@
42
42
  "access": "public"
43
43
  },
44
44
  "homepage": "https://uui.umbraco.com/?path=/story/uui-file-dropzone",
45
- "gitHead": "127e036dbafa18cc37027591d6548a4cb4700d33"
45
+ "gitHead": "ffb9cef00262b9f36177adcca9675b4893c0045e"
46
46
  }