quasar-ui-danx 0.4.86 → 0.4.87

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/danx.es.js CHANGED
@@ -3098,7 +3098,7 @@ const _p = { class: "flex-grow" }, mp = {
3098
3098
  vt(() => {
3099
3099
  r.modelValue && (a.value = r.modelValue);
3100
3100
  }), o(() => {
3101
- a.value.some((f) => f.progress < 1) && n("uploading");
3101
+ a.value.some((f) => f.progress < 1) && n("uploading"), n("update:model-value", a.value);
3102
3102
  }), s(() => {
3103
3103
  n("update:model-value", a.value), n("complete");
3104
3104
  });
@@ -26506,41 +26506,44 @@ function sI(t) {
26506
26506
  });
26507
26507
  }
26508
26508
  function D9(t) {
26509
- const e = H([]), n = H(null), r = H(null), s = (d) => {
26510
- e.value = [...e.value, ...d.target.files], new Ga(d.target.files, t).prepare().onProgress(({ file: f }) => {
26511
- f && i(f);
26512
- }).onComplete(({ file: f, uploadedFile: _ }) => {
26513
- f && i(f, _);
26514
- }).onError(({ file: f, error: _ }) => {
26515
- console.error("Failed to upload", f, _), dt.error(`Failed to upload ${f.name}: ${_}`);
26509
+ const e = H([]), n = H(null), r = H(null), s = (f) => {
26510
+ e.value = [...e.value, ...f.target.files], i(), new Ga(f.target.files, t).prepare().onProgress(({ file: _ }) => {
26511
+ _ && o(_);
26512
+ }).onComplete(({ file: _, uploadedFile: p }) => {
26513
+ _ && o(_, p);
26514
+ }).onError(({ file: _, error: p }) => {
26515
+ console.error("Failed to upload", _, p), dt.error(`Failed to upload ${_.name}: ${p}`);
26516
26516
  }).onAllComplete(() => {
26517
26517
  n.value && n.value({
26518
26518
  file: e.value[0],
26519
26519
  uploadedFile: e.value[0]
26520
- }), r.value && r.value(e.value);
26520
+ }), i();
26521
26521
  }).upload();
26522
26522
  };
26523
- function i(d, f = null) {
26524
- const _ = e.value.findIndex((p) => p.id === d.id);
26525
- _ !== -1 && e.value.splice(_, 1, f || d), r.value && r.value(e.value);
26523
+ function i() {
26524
+ r.value && r.value(e.value);
26525
+ }
26526
+ function o(f, _ = null) {
26527
+ const p = e.value.findIndex((m) => m.id === f.id);
26528
+ p !== -1 && e.value.splice(p, 1, _ || f), i();
26526
26529
  }
26527
26530
  return {
26528
26531
  clearUploadedFiles: () => {
26529
- e.value = [], r.value && r.value(e.value), n.value && n.value({ file: null, uploadedFile: null });
26532
+ e.value = [], i(), n.value && n.value({ file: null, uploadedFile: null });
26530
26533
  },
26531
- onRemove: (d) => {
26532
- const f = e.value.findIndex((_) => _.id === d.id);
26533
- f !== -1 && e.value.splice(f, 1), r.value && r.value(e.value), n.value && n.value({ file: d, uploadedFile: d });
26534
+ onRemove: (f) => {
26535
+ const _ = e.value.findIndex((p) => p.id === f.id);
26536
+ _ !== -1 && e.value.splice(_, 1), i(), n.value && n.value({ file: f, uploadedFile: f });
26534
26537
  },
26535
- onComplete: (d) => {
26536
- n.value = d;
26538
+ onComplete: (f) => {
26539
+ n.value = f;
26537
26540
  },
26538
- onFilesChange: (d) => {
26539
- r.value = d;
26541
+ onFilesChange: (f) => {
26542
+ r.value = f;
26540
26543
  },
26541
- onDrop: (d) => {
26542
- var f;
26543
- s({ target: { files: (f = d.dataTransfer) == null ? void 0 : f.files } });
26544
+ onDrop: (f) => {
26545
+ var _;
26546
+ s({ target: { files: (_ = f.dataTransfer) == null ? void 0 : _.files } });
26544
26547
  },
26545
26548
  onFilesSelected: s,
26546
26549
  uploadedFiles: e
@@ -26781,7 +26784,7 @@ function lI(t, e = "") {
26781
26784
  function km(t, e = "") {
26782
26785
  return Object.entries(t).map(([n, r]) => typeof r == "object" ? km(r, `${e}${n}-`) : `--${e}${n}: ${r}`).join(";");
26783
26786
  }
26784
- const B9 = "0.4.86", R9 = {
26787
+ const B9 = "0.4.87", R9 = {
26785
26788
  version: B9
26786
26789
  }, { version: U9 } = R9;
26787
26790
  function aI() {