genus-ui 1.45.3 → 1.45.4
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/dist/index.es.js +11 -4
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -11423,10 +11423,17 @@ let St = class extends Q {
|
|
|
11423
11423
|
constructor() {
|
|
11424
11424
|
super(...arguments), this.buttonText = "", this.svgIconSrc = "", this.specificFileTypes = "", this.withoutIcon = !1, this.withoutButtonText = !1, this.getInputValue = () => {
|
|
11425
11425
|
let i = [];
|
|
11426
|
-
|
|
11427
|
-
|
|
11428
|
-
|
|
11429
|
-
|
|
11426
|
+
if (this._fileInput.files) {
|
|
11427
|
+
let t = Array.from(this._fileInput.files);
|
|
11428
|
+
for (let e of t)
|
|
11429
|
+
i.push(
|
|
11430
|
+
{
|
|
11431
|
+
fileName: e == null ? void 0 : e.name,
|
|
11432
|
+
fileSize: (e == null ? void 0 : e.size) / 1024 >= 1024 ? `${((e == null ? void 0 : e.size) / 1024 / 1024).toFixed(1)} MB` : `${((e == null ? void 0 : e.size) / 1024).toFixed(1)} KB`
|
|
11433
|
+
}
|
|
11434
|
+
);
|
|
11435
|
+
}
|
|
11436
|
+
this.dispatchEvent(new CustomEvent("selected", { detail: i }));
|
|
11430
11437
|
}, this.renderInputControl = () => {
|
|
11431
11438
|
let i;
|
|
11432
11439
|
return this.withoutIcon ? i = k`
|
package/dist/index.umd.js
CHANGED
|
@@ -1627,7 +1627,7 @@
|
|
|
1627
1627
|
.upload-label:hover { cursor: pointer; }
|
|
1628
1628
|
`,Mf=b.css`
|
|
1629
1629
|
input[type='file'] { display: none; }
|
|
1630
|
-
`;var wf=Object.defineProperty,vf=Object.getOwnPropertyDescriptor,qt=(i,t,e,s)=>{for(var n=s>1?void 0:s?vf(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&wf(t,e,n),n};M.GenusFileUpload=class extends b.LitElement{constructor(){super(...arguments),this.buttonText="",this.svgIconSrc="",this.specificFileTypes="",this.withoutIcon=!1,this.withoutButtonText=!1,this.getInputValue=()=>{let t=[];this._fileInput.files
|
|
1630
|
+
`;var wf=Object.defineProperty,vf=Object.getOwnPropertyDescriptor,qt=(i,t,e,s)=>{for(var n=s>1?void 0:s?vf(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&wf(t,e,n),n};M.GenusFileUpload=class extends b.LitElement{constructor(){super(...arguments),this.buttonText="",this.svgIconSrc="",this.specificFileTypes="",this.withoutIcon=!1,this.withoutButtonText=!1,this.getInputValue=()=>{let t=[];if(this._fileInput.files){let e=Array.from(this._fileInput.files);for(let s of e)t.push({fileName:s==null?void 0:s.name,fileSize:(s==null?void 0:s.size)/1024>=1024?`${((s==null?void 0:s.size)/1024/1024).toFixed(1)} MB`:`${((s==null?void 0:s.size)/1024).toFixed(1)} KB`})}this.dispatchEvent(new CustomEvent("selected",{detail:t}))},this.renderInputControl=()=>{let t;return this.withoutIcon?t=b.html`
|
|
1631
1631
|
<input type='file' id='file-input' accept='${this.specificFileTypes}' @change='${this.getInputValue}' multiple />
|
|
1632
1632
|
<label class='upload-label upload-label--without-icon' for='file-input'>
|
|
1633
1633
|
<span class='button-text'>${this.buttonText}</span>
|