inertia-bootstrap-forms 2.1.11 → 2.1.13
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-B7Ml9UWw.js → index-BUI1upO5.js} +70 -69
- package/dist/{index-WqfEQqGr.js → index-D8G-rRkA.js} +1 -1
- package/dist/inertia-bootstrap-forms.es.js +1 -1
- package/dist/inertia-bootstrap-forms.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/AmountInput.vue +3 -3
- package/src/CheckboxToggle.vue +10 -2
|
@@ -132,6 +132,7 @@ const Sr = /* @__PURE__ */ be(wr, [["render", $r]]), M = (t, e) => {
|
|
|
132
132
|
required: Boolean,
|
|
133
133
|
disabled: Boolean,
|
|
134
134
|
readonly: Boolean,
|
|
135
|
+
inputClass: String,
|
|
135
136
|
placeholder: {
|
|
136
137
|
type: String,
|
|
137
138
|
default: "عدد را وارد کنید"
|
|
@@ -184,7 +185,7 @@ function kr(t, e, n, r, s, o) {
|
|
|
184
185
|
te($("input", {
|
|
185
186
|
name: t.name,
|
|
186
187
|
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.displayValue = l),
|
|
187
|
-
class: L([{ "is-invalid": t.form.errors[t.name] }
|
|
188
|
+
class: L(["form-control fanum", t.inputClass, { "is-invalid": t.form.errors[t.name] }]),
|
|
188
189
|
disabled: t.disabled || t.form.processing,
|
|
189
190
|
readonly: t.readonly,
|
|
190
191
|
placeholder: t.placeholder,
|
|
@@ -203,7 +204,7 @@ function kr(t, e, n, r, s, o) {
|
|
|
203
204
|
_: 3
|
|
204
205
|
});
|
|
205
206
|
}
|
|
206
|
-
const
|
|
207
|
+
const za = /* @__PURE__ */ M(Fr, [["render", kr]]), Ir = E({
|
|
207
208
|
props: {
|
|
208
209
|
name: {
|
|
209
210
|
type: String,
|
|
@@ -326,7 +327,7 @@ function Pr(t, e, n, r, s, o) {
|
|
|
326
327
|
]), 8, Nr)
|
|
327
328
|
]);
|
|
328
329
|
}
|
|
329
|
-
const
|
|
330
|
+
const Da = /* @__PURE__ */ M(Vr, [["render", Pr]]), zr = E({
|
|
330
331
|
emits: ["change"],
|
|
331
332
|
props: {
|
|
332
333
|
name: {
|
|
@@ -363,7 +364,7 @@ const za = /* @__PURE__ */ M(Vr, [["render", Pr]]), Dr = E({
|
|
|
363
364
|
}
|
|
364
365
|
}), { form: e };
|
|
365
366
|
}
|
|
366
|
-
}),
|
|
367
|
+
}), Dr = ["for"], Or = ["name", "id", "disabled", "type", "value"];
|
|
367
368
|
function Rr(t, e, n, r, s, o) {
|
|
368
369
|
var i, a;
|
|
369
370
|
return h(), g("label", {
|
|
@@ -384,9 +385,9 @@ function Rr(t, e, n, r, s, o) {
|
|
|
384
385
|
[yt, t.form[t.name]]
|
|
385
386
|
]),
|
|
386
387
|
O(t.$slots, "default")
|
|
387
|
-
], 10,
|
|
388
|
+
], 10, Dr);
|
|
388
389
|
}
|
|
389
|
-
const Oa = /* @__PURE__ */ M(
|
|
390
|
+
const Oa = /* @__PURE__ */ M(zr, [["render", Rr]]), Br = E({
|
|
390
391
|
props: {
|
|
391
392
|
name: {
|
|
392
393
|
type: String,
|
|
@@ -509,20 +510,20 @@ const Ra = /* @__PURE__ */ M(Br, [["render", qr]]), Hr = E({
|
|
|
509
510
|
}
|
|
510
511
|
}), Gr = ["for"], Wr = ["name", "id", "disabled", "type", "value"];
|
|
511
512
|
function Yr(t, e, n, r, s, o) {
|
|
512
|
-
var i, a, l
|
|
513
|
+
var i, a, l;
|
|
513
514
|
return h(), g("label", {
|
|
514
|
-
class: L(["form-check-toggle", { "form-check-toggle--active": (t.selectedValue || []).includes(t.value) }]),
|
|
515
|
+
class: L(["form-check-toggle", { "form-check-toggle--active": (t.selectedValue || []).includes(t.value), "is-invalid": (i = t.form) == null ? void 0 : i.errors[t.name] }]),
|
|
515
516
|
for: t.inputID
|
|
516
517
|
}, [
|
|
517
518
|
te($("input", {
|
|
518
|
-
name: t.name
|
|
519
|
+
name: t.name,
|
|
519
520
|
id: t.inputID,
|
|
520
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
521
|
-
class: L([{ "is-invalid": (
|
|
522
|
-
disabled: (
|
|
521
|
+
"onUpdate:modelValue": e[0] || (e[0] = (u) => t.modelValue = u),
|
|
522
|
+
class: L([{ "is-invalid": (a = t.form) == null ? void 0 : a.errors[t.name], "form-check-toggle--input-hide": t.hideInput }, "form-check-toggle--input form-check-input"]),
|
|
523
|
+
disabled: (l = t.form) == null ? void 0 : l.processing,
|
|
523
524
|
type: t.type,
|
|
524
525
|
value: t.value,
|
|
525
|
-
onChange: e[1] || (e[1] = (
|
|
526
|
+
onChange: e[1] || (e[1] = (u) => t.$emit("change", u))
|
|
526
527
|
}, null, 42, Wr), [
|
|
527
528
|
[yt, t.modelValue]
|
|
528
529
|
]),
|
|
@@ -1385,8 +1386,8 @@ function Ps(t, e, n, r, s, o) {
|
|
|
1385
1386
|
_: 3
|
|
1386
1387
|
});
|
|
1387
1388
|
}
|
|
1388
|
-
const
|
|
1389
|
-
components: { GroupControl: ys, QuantityInput:
|
|
1389
|
+
const zs = /* @__PURE__ */ M(As, [["render", Ps]]), Ds = E({
|
|
1390
|
+
components: { GroupControl: ys, QuantityInput: zs, InputGroup: _t, InputGroupText: bt, Dropdown: or, DropdownToggle: pr, DropdownMenu: dr },
|
|
1390
1391
|
props: {
|
|
1391
1392
|
name: {
|
|
1392
1393
|
type: String,
|
|
@@ -1498,7 +1499,7 @@ function Ls(t, e, n, r, s, o) {
|
|
|
1498
1499
|
], 2)
|
|
1499
1500
|
], 512);
|
|
1500
1501
|
}
|
|
1501
|
-
const Za = /* @__PURE__ */ M(
|
|
1502
|
+
const Za = /* @__PURE__ */ M(Ds, [["render", Ls]]), xs = E({
|
|
1502
1503
|
emits: ["update:modelValue", "search", "searching", "change", "selected"],
|
|
1503
1504
|
props: {
|
|
1504
1505
|
name: {
|
|
@@ -2436,7 +2437,7 @@ function Pt(t) {
|
|
|
2436
2437
|
};
|
|
2437
2438
|
}
|
|
2438
2439
|
function Ft(t, e, n, r, s, o, i, a, l, u) {
|
|
2439
|
-
var d, p, c, m, v, V, A, k, I, Y, f, _, w, U,
|
|
2440
|
+
var d, p, c, m, v, V, A, k, I, Y, f, _, w, U, z, H, ne, N = e.type;
|
|
2440
2441
|
if (e.constructor !== void 0) return null;
|
|
2441
2442
|
128 & n.__u && (l = !!(32 & n.__u), o = [a = e.__e = n.__e]), (d = C.__b) && d(e);
|
|
2442
2443
|
e: if (typeof N == "function") try {
|
|
@@ -2454,7 +2455,7 @@ function Ft(t, e, n, r, s, o, i, a, l, u) {
|
|
|
2454
2455
|
});
|
|
2455
2456
|
}
|
|
2456
2457
|
if (p.context = f, p.props = k, p.__P = t, p.__e = !1, w = C.__r, U = 0, I) {
|
|
2457
|
-
for (p.state = p.__s, p.__d = !1, w && w(e), d = p.render(p.props, p.state, p.context),
|
|
2458
|
+
for (p.state = p.__s, p.__d = !1, w && w(e), d = p.render(p.props, p.state, p.context), z = 0; z < p._sb.length; z++) p.__h.push(p._sb[z]);
|
|
2458
2459
|
p._sb = [];
|
|
2459
2460
|
} else do
|
|
2460
2461
|
p.__d = !1, w && w(e), d = p.render(p.props, p.state, p.context), p.state = p.__s;
|
|
@@ -2588,9 +2589,9 @@ function vn() {
|
|
|
2588
2589
|
for (var t, e, n = 0, r = "", s = arguments.length; n < s; n++) (t = arguments[n]) && (e = yn(t)) && (r && (r += " "), r += e);
|
|
2589
2590
|
return r;
|
|
2590
2591
|
}
|
|
2591
|
-
var ke, P, Je,
|
|
2592
|
+
var ke, P, Je, zt, st = 0, _n = [], D = C, Dt = D.__b, Ot = D.__r, Rt = D.diffed, Bt = D.__c, jt = D.unmount, Lt = D.__;
|
|
2592
2593
|
function kt(t, e) {
|
|
2593
|
-
|
|
2594
|
+
D.__h && D.__h(P, t, st || e), st = 0;
|
|
2594
2595
|
var n = P.__H || (P.__H = { __: [], __h: [] });
|
|
2595
2596
|
return t >= n.__.length && n.__.push({}), n.__[t];
|
|
2596
2597
|
}
|
|
@@ -2633,7 +2634,7 @@ function Ui(t, e, n) {
|
|
|
2633
2634
|
}
|
|
2634
2635
|
function bn(t, e) {
|
|
2635
2636
|
var n = kt(ke++, 3);
|
|
2636
|
-
!
|
|
2637
|
+
!D.__s && $n(n.__H, e) && (n.__ = t, n.u = e, P.__H.__h.push(n));
|
|
2637
2638
|
}
|
|
2638
2639
|
function wn(t, e) {
|
|
2639
2640
|
var n = kt(ke++, 7);
|
|
@@ -2643,26 +2644,26 @@ function Ai() {
|
|
|
2643
2644
|
for (var t; t = _n.shift(); ) if (t.__P && t.__H) try {
|
|
2644
2645
|
t.__H.__h.forEach(Be), t.__H.__h.forEach(it), t.__H.__h = [];
|
|
2645
2646
|
} catch (e) {
|
|
2646
|
-
t.__H.__h = [],
|
|
2647
|
+
t.__H.__h = [], D.__e(e, t.__v);
|
|
2647
2648
|
}
|
|
2648
2649
|
}
|
|
2649
|
-
|
|
2650
|
-
P = null,
|
|
2651
|
-
},
|
|
2650
|
+
D.__b = function(t) {
|
|
2651
|
+
P = null, Dt && Dt(t);
|
|
2652
|
+
}, D.__ = function(t, e) {
|
|
2652
2653
|
t && e.__k && e.__k.__m && (t.__m = e.__k.__m), Lt && Lt(t, e);
|
|
2653
|
-
},
|
|
2654
|
+
}, D.__r = function(t) {
|
|
2654
2655
|
Ot && Ot(t), ke = 0;
|
|
2655
2656
|
var e = (P = t.__c).__H;
|
|
2656
2657
|
e && (Je === P ? (e.__h = [], P.__h = [], e.__.forEach(function(n) {
|
|
2657
2658
|
n.__N && (n.__ = n.__N), n.u = n.__N = void 0;
|
|
2658
2659
|
})) : (e.__h.forEach(Be), e.__h.forEach(it), e.__h = [], ke = 0)), Je = P;
|
|
2659
|
-
},
|
|
2660
|
+
}, D.diffed = function(t) {
|
|
2660
2661
|
Rt && Rt(t);
|
|
2661
2662
|
var e = t.__c;
|
|
2662
|
-
e && e.__H && (e.__H.__h.length && (_n.push(e) !== 1 &&
|
|
2663
|
+
e && e.__H && (e.__H.__h.length && (_n.push(e) !== 1 && zt === D.requestAnimationFrame || ((zt = D.requestAnimationFrame) || Ni)(Ai)), e.__H.__.forEach(function(n) {
|
|
2663
2664
|
n.u && (n.__H = n.u), n.u = void 0;
|
|
2664
2665
|
})), Je = P = null;
|
|
2665
|
-
},
|
|
2666
|
+
}, D.__c = function(t, e) {
|
|
2666
2667
|
e.some(function(n) {
|
|
2667
2668
|
try {
|
|
2668
2669
|
n.__h.forEach(Be), n.__h = n.__h.filter(function(r) {
|
|
@@ -2671,10 +2672,10 @@ z.__b = function(t) {
|
|
|
2671
2672
|
} catch (r) {
|
|
2672
2673
|
e.some(function(s) {
|
|
2673
2674
|
s.__h && (s.__h = []);
|
|
2674
|
-
}), e = [],
|
|
2675
|
+
}), e = [], D.__e(r, n.__v);
|
|
2675
2676
|
}
|
|
2676
2677
|
}), Bt && Bt(t, e);
|
|
2677
|
-
},
|
|
2678
|
+
}, D.unmount = function(t) {
|
|
2678
2679
|
jt && jt(t);
|
|
2679
2680
|
var e, n = t.__c;
|
|
2680
2681
|
n && n.__H && (n.__H.__.forEach(function(r) {
|
|
@@ -2683,7 +2684,7 @@ z.__b = function(t) {
|
|
|
2683
2684
|
} catch (s) {
|
|
2684
2685
|
e = s;
|
|
2685
2686
|
}
|
|
2686
|
-
}), n.__H = void 0, e &&
|
|
2687
|
+
}), n.__H = void 0, e && D.__e(e, n.__v));
|
|
2687
2688
|
};
|
|
2688
2689
|
var xt = typeof requestAnimationFrame == "function";
|
|
2689
2690
|
function Ni(t) {
|
|
@@ -2766,7 +2767,7 @@ function Pi(t, e = {}) {
|
|
|
2766
2767
|
}
|
|
2767
2768
|
};
|
|
2768
2769
|
}
|
|
2769
|
-
function
|
|
2770
|
+
function zi(t) {
|
|
2770
2771
|
const { width: e, height: n, note: r, noClick: s, ctx: o } = t;
|
|
2771
2772
|
if (!o.uppy)
|
|
2772
2773
|
throw new Error("Dropzone must be used within a UppyContextProvider");
|
|
@@ -2785,7 +2786,7 @@ function Di(t) {
|
|
|
2785
2786
|
children: [S("div", { className: "uppy:flex uppy:flex-col uppy:items-center uppy:justify-center uppy:h-full uppy:space-y-3", children: S("p", { className: "uppy:text-gray-600", children: "Drop files here or click to add them" }) }), r ? S("div", { className: "uppy:text-sm uppy:text-gray-500", children: r }) : null]
|
|
2786
2787
|
})] });
|
|
2787
2788
|
}
|
|
2788
|
-
const
|
|
2789
|
+
const Di = [
|
|
2789
2790
|
"B",
|
|
2790
2791
|
"kB",
|
|
2791
2792
|
"MB",
|
|
@@ -2838,7 +2839,7 @@ function ji(t, e) {
|
|
|
2838
2839
|
space: !0,
|
|
2839
2840
|
...e
|
|
2840
2841
|
};
|
|
2841
|
-
const n = e.bits ? e.binary ? Bi : Ri : e.binary ? Oi :
|
|
2842
|
+
const n = e.bits ? e.binary ? Bi : Ri : e.binary ? Oi : Di, r = e.space ? " " : "";
|
|
2842
2843
|
if (e.signed && t === 0)
|
|
2843
2844
|
return ` 0${r}${n[0]}`;
|
|
2844
2845
|
const s = t < 0, o = s ? "-" : e.signed ? "+" : "";
|
|
@@ -2982,7 +2983,7 @@ const Gi = E({
|
|
|
2982
2983
|
setup(t) {
|
|
2983
2984
|
const e = G(null), n = Tn();
|
|
2984
2985
|
function r() {
|
|
2985
|
-
e.value && gn(St(
|
|
2986
|
+
e.value && gn(St(zi, {
|
|
2986
2987
|
...t,
|
|
2987
2988
|
ctx: n
|
|
2988
2989
|
}), e.value);
|
|
@@ -3231,7 +3232,7 @@ var ro = function(e) {
|
|
|
3231
3232
|
const s = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], o = Math.min(Math.floor(Math.log(r) / Math.log(1024)), s.length - 1), i = Number(r / 1024 ** o), a = s[o];
|
|
3232
3233
|
return `${i >= 10 || i % 1 === 0 ? Math.round(i) : i.toFixed(1)} ${a}`;
|
|
3233
3234
|
};
|
|
3234
|
-
const
|
|
3235
|
+
const ze = /* @__PURE__ */ Xe(ro);
|
|
3235
3236
|
function En(t, e) {
|
|
3236
3237
|
this.text = t = t || "", this.hasWild = ~t.indexOf("*"), this.separator = e, this.parts = t.split(e);
|
|
3237
3238
|
}
|
|
@@ -3306,8 +3307,8 @@ class po {
|
|
|
3306
3307
|
const o = [...e, ...n].reduce((i, a) => i + (a.size ?? 0), 0);
|
|
3307
3308
|
if (o > r)
|
|
3308
3309
|
throw new J(this.getI18n()("aggregateExceedsSize", {
|
|
3309
|
-
sizeAllowed:
|
|
3310
|
-
size:
|
|
3310
|
+
sizeAllowed: ze(r),
|
|
3311
|
+
size: ze(o)
|
|
3311
3312
|
}));
|
|
3312
3313
|
}
|
|
3313
3314
|
}
|
|
@@ -3321,12 +3322,12 @@ class po {
|
|
|
3321
3322
|
}
|
|
3322
3323
|
if (n && e.size != null && e.size > n)
|
|
3323
3324
|
throw new J(this.getI18n()("exceedsSize", {
|
|
3324
|
-
size:
|
|
3325
|
+
size: ze(n),
|
|
3325
3326
|
file: e.name ?? this.getI18n()("unnamed")
|
|
3326
3327
|
}), { file: e });
|
|
3327
3328
|
if (r && e.size != null && e.size < r)
|
|
3328
3329
|
throw new J(this.getI18n()("inferiorSize", {
|
|
3329
|
-
size:
|
|
3330
|
+
size: ze(r)
|
|
3330
3331
|
}), { file: e });
|
|
3331
3332
|
}
|
|
3332
3333
|
validate(e, n) {
|
|
@@ -3405,9 +3406,9 @@ function No(t) {
|
|
|
3405
3406
|
var s = Ao.call(t);
|
|
3406
3407
|
return r && (e ? t[we] = n : delete t[we]), s;
|
|
3407
3408
|
}
|
|
3408
|
-
var Po = No,
|
|
3409
|
+
var Po = No, zo = Object.prototype, Do = zo.toString;
|
|
3409
3410
|
function Oo(t) {
|
|
3410
|
-
return
|
|
3411
|
+
return Do.call(t);
|
|
3411
3412
|
}
|
|
3412
3413
|
var Ro = Oo, Xt = Un, Bo = Po, jo = Ro, Lo = "[object Null]", xo = "[object Undefined]", Zt = Xt ? Xt.toStringTag : void 0;
|
|
3413
3414
|
function qo(t) {
|
|
@@ -3444,19 +3445,19 @@ function pa(t, e, n) {
|
|
|
3444
3445
|
throw new TypeError(la);
|
|
3445
3446
|
e = Qt(e) || 0, aa(n) && (d = !!n.leading, p = "maxWait" in n, o = p ? ua(Qt(n.maxWait) || 0, e) : o, c = "trailing" in n ? !!n.trailing : c);
|
|
3446
3447
|
function m(w) {
|
|
3447
|
-
var U = r,
|
|
3448
|
-
return r = s = void 0, u = w, i = t.apply(
|
|
3448
|
+
var U = r, z = s;
|
|
3449
|
+
return r = s = void 0, u = w, i = t.apply(z, U), i;
|
|
3449
3450
|
}
|
|
3450
3451
|
function v(w) {
|
|
3451
3452
|
return u = w, a = setTimeout(k, e), d ? m(w) : i;
|
|
3452
3453
|
}
|
|
3453
3454
|
function V(w) {
|
|
3454
|
-
var U = w - l,
|
|
3455
|
-
return p ? da(H, o -
|
|
3455
|
+
var U = w - l, z = w - u, H = e - U;
|
|
3456
|
+
return p ? da(H, o - z) : H;
|
|
3456
3457
|
}
|
|
3457
3458
|
function A(w) {
|
|
3458
|
-
var U = w - l,
|
|
3459
|
-
return l === void 0 || U >= e || U < 0 || p &&
|
|
3459
|
+
var U = w - l, z = w - u;
|
|
3460
|
+
return l === void 0 || U >= e || U < 0 || p && z >= o;
|
|
3460
3461
|
}
|
|
3461
3462
|
function k() {
|
|
3462
3463
|
var w = et();
|
|
@@ -3624,13 +3625,13 @@ function Ia(t) {
|
|
|
3624
3625
|
const r = e[1].split(".", 2), s = parseInt(r[0], 10), o = parseInt(r[1], 10);
|
|
3625
3626
|
return s < 15 || s === 15 && o < 15063 || s > 18 || s === 18 && o >= 18218;
|
|
3626
3627
|
}
|
|
3627
|
-
const
|
|
3628
|
+
const De = {
|
|
3628
3629
|
totalProgress: 0,
|
|
3629
3630
|
allowNewUpload: !0,
|
|
3630
3631
|
error: null,
|
|
3631
3632
|
recoveredState: null
|
|
3632
3633
|
};
|
|
3633
|
-
var Z, K, Ce, le, fe, me, ue, y, oe, lt, Nn, Pn,
|
|
3634
|
+
var Z, K, Ce, le, fe, me, ue, y, oe, lt, Nn, Pn, zn, ut, dt, pt, ct, qe, ft, de, Dn, On, se, Ve, $e, Rn, mt, Se;
|
|
3634
3635
|
const He = class He {
|
|
3635
3636
|
/**
|
|
3636
3637
|
* Instantiate Uppy
|
|
@@ -3724,7 +3725,7 @@ const He = class He {
|
|
|
3724
3725
|
...e == null ? void 0 : e.restrictions
|
|
3725
3726
|
}
|
|
3726
3727
|
}, e != null && e.logger && e.debug ? this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.", "warning") : e != null && e.debug && (this.opts.logger = no), this.log(`Using Core v${He.VERSION}`), this.i18nInit(), this.store = this.opts.store, this.setState({
|
|
3727
|
-
...
|
|
3728
|
+
...De,
|
|
3728
3729
|
plugins: {},
|
|
3729
3730
|
files: {},
|
|
3730
3731
|
currentUploads: {},
|
|
@@ -3834,13 +3835,13 @@ const He = class He {
|
|
|
3834
3835
|
tus: void 0,
|
|
3835
3836
|
transloadit: void 0
|
|
3836
3837
|
};
|
|
3837
|
-
}), this.setState({ files: r, ...
|
|
3838
|
+
}), this.setState({ files: r, ...De });
|
|
3838
3839
|
}
|
|
3839
3840
|
clear() {
|
|
3840
3841
|
const { capabilities: e, currentUploads: n } = this.getState();
|
|
3841
3842
|
if (Object.keys(n).length > 0 && !e.individualCancellation)
|
|
3842
3843
|
throw new Error("The installed uploader plugin does not allow removing files during an upload.");
|
|
3843
|
-
this.setState({ ...
|
|
3844
|
+
this.setState({ ...De, files: {} });
|
|
3844
3845
|
}
|
|
3845
3846
|
addPreProcessor(e) {
|
|
3846
3847
|
b(this, fe).add(e);
|
|
@@ -4068,7 +4069,7 @@ const He = class He {
|
|
|
4068
4069
|
cancelAll() {
|
|
4069
4070
|
this.emit("cancel-all");
|
|
4070
4071
|
const { files: e } = this.getState(), n = Object.keys(e);
|
|
4071
|
-
n.length && this.removeFiles(n), this.setState(
|
|
4072
|
+
n.length && this.removeFiles(n), this.setState(De);
|
|
4072
4073
|
}
|
|
4073
4074
|
/**
|
|
4074
4075
|
* Retry a specific file that has errored.
|
|
@@ -4307,7 +4308,7 @@ Z = new WeakMap(), K = new WeakMap(), Ce = new WeakMap(), le = new WeakMap(), fe
|
|
|
4307
4308
|
}, /**
|
|
4308
4309
|
* Create a file state object based on user-provided `addFile()` options.
|
|
4309
4310
|
*/
|
|
4310
|
-
|
|
4311
|
+
zn = function(e) {
|
|
4311
4312
|
const n = e instanceof File ? {
|
|
4312
4313
|
name: e.name,
|
|
4313
4314
|
type: e.type,
|
|
@@ -4363,7 +4364,7 @@ ut = function() {
|
|
|
4363
4364
|
const s = [], o = [];
|
|
4364
4365
|
for (const i of e)
|
|
4365
4366
|
try {
|
|
4366
|
-
let a = F(this, y,
|
|
4367
|
+
let a = F(this, y, zn).call(this, i);
|
|
4367
4368
|
F(this, y, Pn).call(this, a);
|
|
4368
4369
|
const l = n[a.id], u = l == null ? void 0 : l.isGhost;
|
|
4369
4370
|
if (u && !a.isRemote) {
|
|
@@ -4428,12 +4429,12 @@ ut = function() {
|
|
|
4428
4429
|
});
|
|
4429
4430
|
return F(this, y, Se).call(this, r);
|
|
4430
4431
|
}, qe = new WeakMap(), ft = function() {
|
|
4431
|
-
const e = F(this, y,
|
|
4432
|
+
const e = F(this, y, Dn).call(this);
|
|
4432
4433
|
let n = null;
|
|
4433
4434
|
e != null && (n = Math.round(e * 100), n > 100 ? n = 100 : n < 0 && (n = 0)), this.emit("progress", n ?? 0), this.setState({
|
|
4434
4435
|
totalProgress: n ?? 0
|
|
4435
4436
|
});
|
|
4436
|
-
}, de = new WeakMap(),
|
|
4437
|
+
}, de = new WeakMap(), Dn = function() {
|
|
4437
4438
|
const n = this.getFiles().filter((l) => l.progress.uploadStarted || l.progress.preprocess || l.progress.postprocess);
|
|
4438
4439
|
if (n.length === 0)
|
|
4439
4440
|
return 0;
|
|
@@ -4727,9 +4728,9 @@ const Ea = {
|
|
|
4727
4728
|
}), i.value.on("error", (f) => {
|
|
4728
4729
|
r("error", f);
|
|
4729
4730
|
}), i.value.on("upload-error", (f, _, w) => {
|
|
4730
|
-
var
|
|
4731
|
+
var z;
|
|
4731
4732
|
u.value = Math.max(0, u.value - 1);
|
|
4732
|
-
const U = ((
|
|
4733
|
+
const U = ((z = JSON.parse(w.response)) == null ? void 0 : z.message) ?? _;
|
|
4733
4734
|
v(U), r("upload-error", f, _, w, U);
|
|
4734
4735
|
}), i.value.on("restriction-failed", (f, _) => {
|
|
4735
4736
|
v(_.message), r("restriction-failed", f, _);
|
|
@@ -4739,8 +4740,8 @@ const Ea = {
|
|
|
4739
4740
|
}, (f, _) => {
|
|
4740
4741
|
f === !0 && _ === !1 && m();
|
|
4741
4742
|
}), ye(() => {
|
|
4742
|
-
var f, _, w, U,
|
|
4743
|
-
n.useXHR && import("./index-
|
|
4743
|
+
var f, _, w, U, z, H, ne, N;
|
|
4744
|
+
n.useXHR && import("./index-D8G-rRkA.js").then((X) => {
|
|
4744
4745
|
const pe = X.default;
|
|
4745
4746
|
i.value.use(pe, {
|
|
4746
4747
|
method: "POST",
|
|
@@ -4750,7 +4751,7 @@ const Ea = {
|
|
|
4750
4751
|
},
|
|
4751
4752
|
...n.XHRConfig
|
|
4752
4753
|
});
|
|
4753
|
-
}), (_ = (f = i.value) == null ? void 0 : f.opts) != null && _.restrictions && (s.value = I(i.value.opts.restrictions)), o && ((H = (
|
|
4754
|
+
}), (_ = (f = i.value) == null ? void 0 : f.opts) != null && _.restrictions && (s.value = I(i.value.opts.restrictions)), o && ((H = (z = (U = (w = i.value) == null ? void 0 : w.opts) == null ? void 0 : U.locale) == null ? void 0 : z.strings) != null && H.dropzoneText) && ((N = (ne = o.value) == null ? void 0 : ne.querySelectorAll('[data-uppy-element="dropzone"]>div>div>p')) == null || N.forEach((X) => {
|
|
4754
4755
|
var pe, Et, Ct, Vt;
|
|
4755
4756
|
X.innerHTML = (Vt = (Ct = (Et = (pe = i.value) == null ? void 0 : pe.opts) == null ? void 0 : Et.locale) == null ? void 0 : Ct.strings) == null ? void 0 : Vt.dropzoneText;
|
|
4756
4757
|
}));
|
|
@@ -4782,7 +4783,7 @@ const Ea = {
|
|
|
4782
4783
|
allowedFileTypes: _,
|
|
4783
4784
|
maxFileSize: w,
|
|
4784
4785
|
minFileSize: U,
|
|
4785
|
-
maxNumberOfFiles:
|
|
4786
|
+
maxNumberOfFiles: z,
|
|
4786
4787
|
minNumberOfFiles: H,
|
|
4787
4788
|
maxTotalFileSize: ne
|
|
4788
4789
|
} = f, N = [];
|
|
@@ -4790,7 +4791,7 @@ const Ea = {
|
|
|
4790
4791
|
const X = _.map((pe) => pe.replace(".", "")).join("، ");
|
|
4791
4792
|
N.push(`فقط فایلهای ${X}`);
|
|
4792
4793
|
}
|
|
4793
|
-
return
|
|
4794
|
+
return z && z > 1 && N.push(`امکان انتخاب حداکثر ${z} فایل`), H && N.push(`حداقل ${H} فایل نیاز است`), w && N.push(`با حداکثر حجم ${k(w)} برای هر فایل`), U && N.push(`با حداقل حجم ${k(U)} برای هر فایل`), ne && N.push(`و مجموع حجم کل حداکثر ${k(ne)}`), N.length ? N.join("، ") + " مجاز است." : "";
|
|
4794
4795
|
}
|
|
4795
4796
|
return (f, _) => i.value ? (h(), g("div", {
|
|
4796
4797
|
key: 0,
|
|
@@ -4815,8 +4816,8 @@ const Ea = {
|
|
|
4815
4816
|
}
|
|
4816
4817
|
};
|
|
4817
4818
|
export {
|
|
4818
|
-
|
|
4819
|
-
|
|
4819
|
+
za as A,
|
|
4820
|
+
Da as C,
|
|
4820
4821
|
qa as E,
|
|
4821
4822
|
xa as F,
|
|
4822
4823
|
ys as G,
|
|
@@ -4824,7 +4825,7 @@ export {
|
|
|
4824
4825
|
Ya as M,
|
|
4825
4826
|
nl as O,
|
|
4826
4827
|
ja as P,
|
|
4827
|
-
|
|
4828
|
+
zs as Q,
|
|
4828
4829
|
il as R,
|
|
4829
4830
|
sl as S,
|
|
4830
4831
|
eo as T,
|
|
@@ -5,7 +5,7 @@ var et = (i) => {
|
|
|
5
5
|
var ct = (i, e, t) => e in i ? pt(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
6
6
|
var y = (i, e, t) => ct(i, typeof e != "symbol" ? e + "" : e, t), G = (i, e, t) => e.has(i) || et("Cannot " + t);
|
|
7
7
|
var r = (i, e, t) => (G(i, e, "read from private field"), t ? t.call(i) : e.get(i)), m = (i, e, t) => e.has(i) ? et("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), c = (i, e, t, s) => (G(i, e, "write to private field"), s ? s.call(i, t) : e.set(i, t), t), g = (i, e, t) => (G(i, e, "access private method"), t);
|
|
8
|
-
import { T as mt } from "./index-
|
|
8
|
+
import { T as mt } from "./index-BUI1upO5.js";
|
|
9
9
|
class K extends Error {
|
|
10
10
|
constructor(t, s = null) {
|
|
11
11
|
super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall.");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as n, C as s, a as p, b as u, c as e, _ as o, d as I, E as i, F as r, f as l, l as c, G as m, L as b, M as C, h as x, O as S, g as d, P as g, Q as h, R as k, k as P, S as T, j as F, i as y, m as A, n as E, o as L, e as M } from "./index-
|
|
1
|
+
import { A as n, C as s, a as p, b as u, c as e, _ as o, d as I, E as i, F as r, f as l, l as c, G as m, L as b, M as C, h as x, O as S, g as d, P as g, Q as h, R as k, k as P, S as T, j as F, i as y, m as A, n as E, o as L, e as M } from "./index-BUI1upO5.js";
|
|
2
2
|
export {
|
|
3
3
|
n as AmountInput,
|
|
4
4
|
s as CaptchaInput,
|