formue-crud 0.0.34 → 0.0.35
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/formue-crud.js +80 -80
- package/dist/formue-crud.umd.cjs +8 -8
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/formue-crud.js
CHANGED
@@ -39,14 +39,14 @@ var jr = { exports: {} };
|
|
39
39
|
jr.exports;
|
40
40
|
(function(h, e) {
|
41
41
|
(function() {
|
42
|
-
var t, i = "4.17.21", r = 200, o = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", a = "Expected a function", u = "Invalid `variable` option passed into `_.template`", d = "__lodash_hash_undefined__", f = 500, m = "__lodash_placeholder__", w = 1, v = 2, C = 4, M = 1, D = 2, P = 1, S = 2, G = 4, X = 8, z = 16,
|
42
|
+
var t, i = "4.17.21", r = 200, o = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", a = "Expected a function", u = "Invalid `variable` option passed into `_.template`", d = "__lodash_hash_undefined__", f = 500, m = "__lodash_placeholder__", w = 1, v = 2, C = 4, M = 1, D = 2, P = 1, S = 2, G = 4, X = 8, z = 16, W = 32, le = 64, N = 128, H = 256, ce = 512, Be = 30, Et = "...", Z = 800, tt = 16, it = 1, Si = 2, qt = 3, ui = 1 / 0, Xt = 9007199254740991, Ed = 17976931348623157e292, jn = 0 / 0, xt = 4294967295, xd = xt - 1, _d = xt >>> 1, Rd = [
|
43
43
|
["ary", N],
|
44
44
|
["bind", P],
|
45
45
|
["bindKey", S],
|
46
46
|
["curry", X],
|
47
47
|
["curryRight", z],
|
48
48
|
["flip", ce],
|
49
|
-
["partial",
|
49
|
+
["partial", W],
|
50
50
|
["partialRight", le],
|
51
51
|
["rearg", H]
|
52
52
|
], Li = "[object Arguments]", Kn = "[object Array]", Td = "[object AsyncFunction]", an = "[object Boolean]", ln = "[object Date]", Md = "[object DOMException]", qn = "[object Error]", Xn = "[object Function]", pa = "[object GeneratorFunction]", pt = "[object Map]", hn = "[object Number]", Sd = "[object Null]", Dt = "[object Object]", ma = "[object Promise]", Ld = "[object Proxy]", un = "[object RegExp]", mt = "[object Set]", dn = "[object String]", Yn = "[object Symbol]", kd = "[object Undefined]", cn = "[object WeakMap]", Ad = "[object WeakSet]", fn = "[object ArrayBuffer]", ki = "[object DataView]", ss = "[object Float32Array]", os = "[object Float64Array]", as = "[object Int8Array]", ls = "[object Int16Array]", hs = "[object Int32Array]", us = "[object Uint8Array]", ds = "[object Uint8ClampedArray]", cs = "[object Uint16Array]", fs = "[object Uint32Array]", Dd = /\b__p \+= '';/g, Fd = /\b(__p \+=) '' \+/g, Pd = /(__e\(.*?\)|\b__t\)) \+\n'';/g, ga = /&(?:amp|lt|gt|quot|#39);/g, ba = /[&<>"']/g, Od = RegExp(ga.source), zd = RegExp(ba.source), Hd = /<%-([\s\S]+?)%>/g, Id = /<%([\s\S]+?)%>/g, va = /<%=([\s\S]+?)%>/g, Bd = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Nd = /^\w*$/, Wd = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ps = /[\\^$.*+?()[\]{}|]/g, Vd = RegExp(ps.source), ms = /^\s+/, Gd = /\s/, $d = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, Ud = /\{\n\/\* \[wrapped with (.+)\] \*/, jd = /,? & /, Kd = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, qd = /[()=,{}\[\]\/\s]/, Xd = /\\(\\)?/g, Yd = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, wa = /\w*$/, Jd = /^[-+]0x[0-9a-f]+$/i, Zd = /^0b[01]+$/i, Qd = /^\[object .+?Constructor\]$/, ec = /^0o[0-7]+$/i, tc = /^(?:0|[1-9]\d*)$/, ic = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, Jn = /($^)/, nc = /['\n\r\u2028\u2029\\]/g, Zn = "\\ud800-\\udfff", rc = "\\u0300-\\u036f", sc = "\\ufe20-\\ufe2f", oc = "\\u20d0-\\u20ff", ya = rc + sc + oc, Ca = "\\u2700-\\u27bf", Ea = "a-z\\xdf-\\xf6\\xf8-\\xff", ac = "\\xac\\xb1\\xd7\\xf7", lc = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", hc = "\\u2000-\\u206f", uc = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", xa = "A-Z\\xc0-\\xd6\\xd8-\\xde", _a = "\\ufe0e\\ufe0f", Ra = ac + lc + hc + uc, gs = "['’]", dc = "[" + Zn + "]", Ta = "[" + Ra + "]", Qn = "[" + ya + "]", Ma = "\\d+", cc = "[" + Ca + "]", Sa = "[" + Ea + "]", La = "[^" + Zn + Ra + Ma + Ca + Ea + xa + "]", bs = "\\ud83c[\\udffb-\\udfff]", fc = "(?:" + Qn + "|" + bs + ")", ka = "[^" + Zn + "]", vs = "(?:\\ud83c[\\udde6-\\uddff]){2}", ws = "[\\ud800-\\udbff][\\udc00-\\udfff]", Ai = "[" + xa + "]", Aa = "\\u200d", Da = "(?:" + Sa + "|" + La + ")", pc = "(?:" + Ai + "|" + La + ")", Fa = "(?:" + gs + "(?:d|ll|m|re|s|t|ve))?", Pa = "(?:" + gs + "(?:D|LL|M|RE|S|T|VE))?", Oa = fc + "?", za = "[" + _a + "]?", mc = "(?:" + Aa + "(?:" + [ka, vs, ws].join("|") + ")" + za + Oa + ")*", gc = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", bc = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", Ha = za + Oa + mc, vc = "(?:" + [cc, vs, ws].join("|") + ")" + Ha, wc = "(?:" + [ka + Qn + "?", Qn, vs, ws, dc].join("|") + ")", yc = RegExp(gs, "g"), Cc = RegExp(Qn, "g"), ys = RegExp(bs + "(?=" + bs + ")|" + wc + Ha, "g"), Ec = RegExp([
|
@@ -1681,7 +1681,7 @@ jr.exports;
|
|
1681
1681
|
for (c = y ? c : l; ++c < l; ) {
|
1682
1682
|
b = s[c];
|
1683
1683
|
var E = Sr(b), _ = E == "wrapper" ? ro(b) : t;
|
1684
|
-
_ && lo(_[0]) && _[1] == (N | X |
|
1684
|
+
_ && lo(_[0]) && _[1] == (N | X | W | H) && !_[4].length && _[9] == 1 ? y = y[Sr(_[0])].apply(y, _[3]) : y = b.length == 1 && lo(b) ? y[E]() : y.thru(b);
|
1685
1685
|
}
|
1686
1686
|
return function() {
|
1687
1687
|
var k = arguments, A = k[0];
|
@@ -1779,7 +1779,7 @@ jr.exports;
|
|
1779
1779
|
}
|
1780
1780
|
function ql(n, s, l, c, p, b, y, E, _, k) {
|
1781
1781
|
var A = s & X, F = A ? y : t, O = A ? t : y, B = A ? b : t, U = A ? t : b;
|
1782
|
-
s |= A ?
|
1782
|
+
s |= A ? W : le, s &= ~(A ? le : W), s & G || (s &= ~(P | S));
|
1783
1783
|
var te = [
|
1784
1784
|
n,
|
1785
1785
|
s,
|
@@ -1818,7 +1818,7 @@ jr.exports;
|
|
1818
1818
|
if (!_ && typeof n != "function")
|
1819
1819
|
throw new st(a);
|
1820
1820
|
var k = c ? c.length : 0;
|
1821
|
-
if (k || (s &= ~(
|
1821
|
+
if (k || (s &= ~(W | le), c = p = t), y = y === t ? y : _e(ee(y), 0), E = E === t ? E : ee(E), k -= p ? p.length : 0, s & le) {
|
1822
1822
|
var A = c, F = p;
|
1823
1823
|
c = p = t;
|
1824
1824
|
}
|
@@ -1837,7 +1837,7 @@ jr.exports;
|
|
1837
1837
|
if (O && Xp(B, O), n = B[0], s = B[1], l = B[2], c = B[3], p = B[4], E = B[9] = B[9] === t ? _ ? 0 : n.length : _e(B[9] - k, 0), !E && s & (X | z) && (s &= ~(X | z)), !s || s == P)
|
1838
1838
|
var U = Ap(n, s, l);
|
1839
1839
|
else
|
1840
|
-
s == X || s == z ? U = Dp(n, s, E) : (s ==
|
1840
|
+
s == X || s == z ? U = Dp(n, s, E) : (s == W || s == (P | W)) && !p.length ? U = Fp(n, s, l, c) : U = _r.apply(t, B);
|
1841
1841
|
var te = O ? Ll : oh;
|
1842
1842
|
return ah(te(U, B), n, s);
|
1843
1843
|
}
|
@@ -2730,14 +2730,14 @@ jr.exports;
|
|
2730
2730
|
var c = P;
|
2731
2731
|
if (l.length) {
|
2732
2732
|
var p = Zt(l, Vi(po));
|
2733
|
-
c |=
|
2733
|
+
c |= W;
|
2734
2734
|
}
|
2735
2735
|
return zt(n, c, s, l, p);
|
2736
2736
|
}), Eh = ie(function(n, s, l) {
|
2737
2737
|
var c = P | S;
|
2738
2738
|
if (l.length) {
|
2739
2739
|
var p = Zt(l, Vi(Eh));
|
2740
|
-
c |=
|
2740
|
+
c |= W;
|
2741
2741
|
}
|
2742
2742
|
return zt(s, c, n, l, p);
|
2743
2743
|
});
|
@@ -2850,7 +2850,7 @@ jr.exports;
|
|
2850
2850
|
});
|
2851
2851
|
}), mo = ie(function(n, s) {
|
2852
2852
|
var l = Zt(s, Vi(mo));
|
2853
|
-
return zt(n,
|
2853
|
+
return zt(n, W, t, s, l);
|
2854
2854
|
}), Th = ie(function(n, s) {
|
2855
2855
|
var l = Zt(s, Vi(Th));
|
2856
2856
|
return zt(n, le, t, s, l);
|
@@ -3702,8 +3702,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
3702
3702
|
di ? ((di.exports = Oi)._ = Oi, Cs._ = Oi) : Se._ = Oi;
|
3703
3703
|
}).call(Ln);
|
3704
3704
|
})(jr, jr.exports);
|
3705
|
-
var
|
3706
|
-
const Go = (h) =>
|
3705
|
+
var V = jr.exports;
|
3706
|
+
const Go = (h) => V.upperFirst(V.camelCase(h));
|
3707
3707
|
var Ew = function() {
|
3708
3708
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
3709
3709
|
return !1;
|
@@ -4109,10 +4109,10 @@ var jo = Jw, ou = jo.custom, au = Fu(ou) ? ou : null, ay = function h(e, t, i, r
|
|
4109
4109
|
return e.inspect();
|
4110
4110
|
}
|
4111
4111
|
if (by(e)) {
|
4112
|
-
var
|
4112
|
+
var W = [];
|
4113
4113
|
return Zh && Zh.call(e, function(tt, it) {
|
4114
|
-
|
4115
|
-
}), hu("Map", Xr.call(e),
|
4114
|
+
W.push(v(it, e, !0) + " => " + v(tt, e));
|
4115
|
+
}), hu("Map", Xr.call(e), W, w);
|
4116
4116
|
}
|
4117
4117
|
if (yy(e)) {
|
4118
4118
|
var le = [];
|
@@ -4575,9 +4575,9 @@ var aa = na, sn = qw, Ty = ay, My = aa("%TypeError%"), Wr = aa("%WeakMap%", !0),
|
|
4575
4575
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" || typeof e == "bigint";
|
4576
4576
|
}, zo = {}, tC = function h(e, t, i, r, o, a, u, d, f, m, w, v, C, M, D, P) {
|
4577
4577
|
for (var S = e, G = P, X = 0, z = !1; (G = G.get(zo)) !== void 0 && !z; ) {
|
4578
|
-
var
|
4579
|
-
if (X += 1, typeof
|
4580
|
-
if (
|
4578
|
+
var W = G.get(e);
|
4579
|
+
if (X += 1, typeof W < "u") {
|
4580
|
+
if (W === X)
|
4581
4581
|
throw new RangeError("Cyclic object value");
|
4582
4582
|
z = !0;
|
4583
4583
|
}
|
@@ -4817,7 +4817,7 @@ function vC(h) {
|
|
4817
4817
|
let e = [];
|
4818
4818
|
function t(i) {
|
4819
4819
|
for (let r in i)
|
4820
|
-
typeof i[r] == "object" && i[r] !== null && (!["schema", "columns"].includes(r) && !
|
4820
|
+
typeof i[r] == "object" && i[r] !== null && (!["schema", "columns"].includes(r) && !V.has(i[r], "schema") && V.get(i[r], "type") != "group" ? (V.has(i[r], "placeholder") || (i[r].placeholder = V.get(i[r], "title")), i[r].field = r, e.push(i[r])) : t(i[r]));
|
4821
4821
|
}
|
4822
4822
|
return t(h), e;
|
4823
4823
|
}
|
@@ -4843,19 +4843,19 @@ const { event: Vt } = et, wC = (h = "myStore") => Ru(h, {
|
|
4843
4843
|
}),
|
4844
4844
|
getters: {
|
4845
4845
|
getItems(e) {
|
4846
|
-
return (t) =>
|
4846
|
+
return (t) => V.get(e.items, t, []);
|
4847
4847
|
},
|
4848
4848
|
getPaginations(e) {
|
4849
|
-
return (t) =>
|
4849
|
+
return (t) => V.get(e.paginations, t, []);
|
4850
4850
|
},
|
4851
4851
|
mainItems(e) {
|
4852
|
-
return
|
4852
|
+
return V.get(e.items, e.mainKey, []);
|
4853
4853
|
},
|
4854
4854
|
mainPagination(e) {
|
4855
4855
|
return this.getPaginations(e.mainKey);
|
4856
4856
|
},
|
4857
4857
|
mainRoute(e) {
|
4858
|
-
return
|
4858
|
+
return V.get(e.routes, e.mainKey, "");
|
4859
4859
|
},
|
4860
4860
|
flatFields(e) {
|
4861
4861
|
let t = vC(e.fields);
|
@@ -4914,7 +4914,7 @@ const { event: Vt } = et, wC = (h = "myStore") => Ru(h, {
|
|
4914
4914
|
total: 0,
|
4915
4915
|
currentPage: 0,
|
4916
4916
|
lastPage: 0
|
4917
|
-
}), this.paginations[t].total =
|
4917
|
+
}), this.paginations[t].total = V.get(e, "total"), this.paginations[t].currentPage = V.get(e, "current_page"), this.paginations[t].lastPage = V.get(e, "last_page");
|
4918
4918
|
},
|
4919
4919
|
paginate(e) {
|
4920
4920
|
this.isFiltering ? this.getWithFilter(e) : this.loadItems(this.mainKey, e);
|
@@ -4924,11 +4924,11 @@ const { event: Vt } = et, wC = (h = "myStore") => Ru(h, {
|
|
4924
4924
|
},
|
4925
4925
|
loadItemsPlus(e = this.mainKey, t = 1, i = "", r = () => {
|
4926
4926
|
}, o = !0) {
|
4927
|
-
let a =
|
4927
|
+
let a = V.get(this.routes, e, "").indexOf("?") > -1 ? "&page=" : "?page=";
|
4928
4928
|
this.loadings[e] = !0;
|
4929
|
-
const u =
|
4929
|
+
const u = V.get(this.routes, e, "") + a + t + "&" + i;
|
4930
4930
|
St.get(u).then((d) => {
|
4931
|
-
if (d =
|
4931
|
+
if (d = V.get(d, "data", {}), Array.isArray(this.items[e]) || (this.items[e] = []), o)
|
4932
4932
|
for (const f of d.data)
|
4933
4933
|
this.items[e].push(f);
|
4934
4934
|
else
|
@@ -4948,11 +4948,11 @@ const { event: Vt } = et, wC = (h = "myStore") => Ru(h, {
|
|
4948
4948
|
return bC.stringify({ filters: e, sort: this.sorts }, { encodeValuesOnly: !0 });
|
4949
4949
|
},
|
4950
4950
|
async loadItems(e = this.mainKey, t = 1) {
|
4951
|
-
let i =
|
4951
|
+
let i = V.get(this.routes, e, "").indexOf("?") > -1 ? "&page=" : "?page=";
|
4952
4952
|
i += t, this.searchParam && (i += "&search=" + this.searchParam), this.loadings[e] = !0, this.loadings.mainLoading = e === this.mainKey;
|
4953
|
-
const r =
|
4953
|
+
const r = V.get(this.routes, e, "") + i + "&" + this.convertToFilterForm();
|
4954
4954
|
return St.get(r).then((o) => {
|
4955
|
-
o =
|
4955
|
+
o = V.get(o, "data", {}), this.items[e] = V.get(o, "data"), this.setPagination(o, e);
|
4956
4956
|
}).finally(() => {
|
4957
4957
|
this.loadings[e] = !1, this.loadings.mainLoading = !1;
|
4958
4958
|
});
|
@@ -4977,7 +4977,7 @@ const { event: Vt } = et, wC = (h = "myStore") => Ru(h, {
|
|
4977
4977
|
itemPerPage: t,
|
4978
4978
|
filters: this.filters
|
4979
4979
|
}).then((r) => {
|
4980
|
-
r =
|
4980
|
+
r = V.get(r, "data", {}), this.items[this.mainKey] = r.data, this.setPagination(r, this.mainKey);
|
4981
4981
|
}).finally(() => {
|
4982
4982
|
this.loadings.filter = !1;
|
4983
4983
|
});
|
@@ -4989,7 +4989,7 @@ const { event: Vt } = et, wC = (h = "myStore") => Ru(h, {
|
|
4989
4989
|
this.reloadData(), Vt("alert", { text: "با موفقیت ثبت شد", color: "green" }), Vt("handleDialogForm", !1);
|
4990
4990
|
}).catch((r) => {
|
4991
4991
|
Vt("alert", {
|
4992
|
-
text:
|
4992
|
+
text: V.get(r, "response.message"),
|
4993
4993
|
color: "red"
|
4994
4994
|
});
|
4995
4995
|
}).finally(() => {
|
@@ -5002,7 +5002,7 @@ const { event: Vt } = et, wC = (h = "myStore") => Ru(h, {
|
|
5002
5002
|
this.reloadData(), Vt("alert", { text: "با موفقیت ویرایش شد", color: "green" }), Vt("handleDialogForm", !1);
|
5003
5003
|
}).catch((r) => {
|
5004
5004
|
Vt("alert", {
|
5005
|
-
text:
|
5005
|
+
text: V.get(r, "response.message"),
|
5006
5006
|
color: "red"
|
5007
5007
|
});
|
5008
5008
|
}).finally(() => {
|
@@ -5020,7 +5020,7 @@ const { event: Vt } = et, wC = (h = "myStore") => Ru(h, {
|
|
5020
5020
|
}), Vt("handleDeleteDialog", !1), this.removeData(e), this.reloadData();
|
5021
5021
|
}).catch((o) => {
|
5022
5022
|
Vt("alert", {
|
5023
|
-
text:
|
5023
|
+
text: V.get(o, "response.data.message"),
|
5024
5024
|
color: "red"
|
5025
5025
|
});
|
5026
5026
|
}).finally(() => {
|
@@ -5032,7 +5032,7 @@ const { event: Vt } = et, wC = (h = "myStore") => Ru(h, {
|
|
5032
5032
|
}), yC = (h) => wC(h)(), CC = (h) => ({
|
5033
5033
|
onChange: (...e) => {
|
5034
5034
|
const t = e[2].form$.el$(h);
|
5035
|
-
t.clear(), t.updateItems();
|
5035
|
+
"clear" in t && t.clear(), "updateItems" in t && t.updateItems();
|
5036
5036
|
}
|
5037
5037
|
}), EC = (h = {}) => ({
|
5038
5038
|
search: !0,
|
@@ -5042,7 +5042,7 @@ const { event: Vt } = et, wC = (h = "myStore") => Ru(h, {
|
|
5042
5042
|
object: !0,
|
5043
5043
|
filterResults: !1,
|
5044
5044
|
native: !1,
|
5045
|
-
formatter: (e) =>
|
5045
|
+
formatter: (e) => V.get(e.getValue(), V.get(h, "labelProp")),
|
5046
5046
|
...h
|
5047
5047
|
}), xC = (h = {}) => ({
|
5048
5048
|
search: !0,
|
@@ -5050,7 +5050,7 @@ const { event: Vt } = et, wC = (h = "myStore") => Ru(h, {
|
|
5050
5050
|
type: "select",
|
5051
5051
|
object: !0,
|
5052
5052
|
native: !1,
|
5053
|
-
formatter: (e) =>
|
5053
|
+
formatter: (e) => V.get(e.getValue(), V.get(h, "labelProp"), e.getValue()),
|
5054
5054
|
...h
|
5055
5055
|
}), _C = (h = {}) => ({
|
5056
5056
|
search: !0,
|
@@ -5060,7 +5060,7 @@ const { event: Vt } = et, wC = (h = "myStore") => Ru(h, {
|
|
5060
5060
|
object: !0,
|
5061
5061
|
filterResults: !1,
|
5062
5062
|
native: !1,
|
5063
|
-
formatter: (e) =>
|
5063
|
+
formatter: (e) => V.get(e.getValue(), V.get(h, "labelProp")),
|
5064
5064
|
...h
|
5065
5065
|
}), Wu = (h = {}) => ({
|
5066
5066
|
search: !0,
|
@@ -5071,7 +5071,7 @@ const { event: Vt } = et, wC = (h = "myStore") => Ru(h, {
|
|
5071
5071
|
filterResults: !1,
|
5072
5072
|
hideSelected: !0,
|
5073
5073
|
native: !1,
|
5074
|
-
formatter: (e) =>
|
5074
|
+
formatter: (e) => V.get(e.getValue(), V.get(h, "labelProp")),
|
5075
5075
|
...h
|
5076
5076
|
}), Vu = (h = {}) => ({
|
5077
5077
|
type: "date",
|
@@ -5093,7 +5093,7 @@ function cu(h, e) {
|
|
5093
5093
|
continue;
|
5094
5094
|
i = !0;
|
5095
5095
|
let a = TC(o), u = r;
|
5096
|
-
|
5096
|
+
V.has(o, "valueProp") && (u += "." + V.get(o, "valueProp", "")), t[a] = V.get(h, u);
|
5097
5097
|
}
|
5098
5098
|
return i ? t : h;
|
5099
5099
|
}
|
@@ -5130,7 +5130,7 @@ function LC(h) {
|
|
5130
5130
|
"init" in e && e.init();
|
5131
5131
|
}
|
5132
5132
|
const kC = (h) => {
|
5133
|
-
const e =
|
5133
|
+
const e = V.get(Gu, h);
|
5134
5134
|
return e ? fw(e) : "";
|
5135
5135
|
}, AC = (h) => ({ url: e, key: t, foreignKey: i, dataKey: r } = {
|
5136
5136
|
url: !1,
|
@@ -5146,11 +5146,11 @@ const kC = (h) => {
|
|
5146
5146
|
};
|
5147
5147
|
typeof route == "string" && (t = d(u)), (u.match(/\{(.*?)\}/g) || []).forEach((v) => {
|
5148
5148
|
const C = v.replace(/[{}]/g, "");
|
5149
|
-
u = u.replace(v,
|
5149
|
+
u = u.replace(v, V.get(h.form, C, ""));
|
5150
5150
|
});
|
5151
5151
|
const m = u.includes("?") ? "&" : "?", w = await St.get(u + m + "search=" + (a || ""));
|
5152
|
-
return
|
5153
|
-
}, DC = (h, e) => h({ getRegisterField: kC, axios: St, get: AC(e), getSafe:
|
5152
|
+
return V.get(w, "data.data", []);
|
5153
|
+
}, DC = (h, e) => h({ getRegisterField: kC, axios: St, get: AC(e), getSafe: V.get, useFields: RC }), FC = (h) => {
|
5154
5154
|
Gu = h;
|
5155
5155
|
};
|
5156
5156
|
function PC({ fields: h, hiddenActions: e, options: t, route: i }) {
|
@@ -5250,12 +5250,12 @@ const OC = {
|
|
5250
5250
|
}),
|
5251
5251
|
getters: {
|
5252
5252
|
currentLang(h) {
|
5253
|
-
return
|
5253
|
+
return V.get(h.langs, h.lang, "fa");
|
5254
5254
|
}
|
5255
5255
|
},
|
5256
5256
|
actions: {
|
5257
5257
|
translate(h) {
|
5258
|
-
return
|
5258
|
+
return V.get(this.currentLang, h, h);
|
5259
5259
|
}
|
5260
5260
|
}
|
5261
5261
|
});
|
@@ -7278,8 +7278,8 @@ function YC(h, e, t) {
|
|
7278
7278
|
var C = [], M = [], D = {}, P = { s: { c: 0, r: 0 }, e: { c: h[0] ? h[0].columns.reduce((S, G) => S + (G && G.width ? G.width : 1), 0) : 0, r: h.length } };
|
7279
7279
|
return h.forEach((S, G) => {
|
7280
7280
|
var X = [];
|
7281
|
-
S.columns.forEach(function(z,
|
7282
|
-
z ? (X.push(!(z.value instanceof Date) && typeof z.value == "object" ? JSON.stringify(z.value) : z.value), (z.width > 1 || z.height > -1) && (z.height > 1 || z.width > 1) && M.push({ s: { r: G, c:
|
7281
|
+
S.columns.forEach(function(z, W) {
|
7282
|
+
z ? (X.push(!(z.value instanceof Date) && typeof z.value == "object" ? JSON.stringify(z.value) : z.value), (z.width > 1 || z.height > -1) && (z.height > 1 || z.width > 1) && M.push({ s: { r: G, c: W }, e: { r: G + z.height - 1, c: W + z.width - 1 } })) : X.push("");
|
7283
7283
|
}), C.push(X);
|
7284
7284
|
}), XLSX.utils.sheet_add_aoa(D, C), D["!ref"] = XLSX.utils.encode_range(P), M.length && (D["!merges"] = M), D;
|
7285
7285
|
}
|
@@ -13648,16 +13648,16 @@ class fE extends rs {
|
|
13648
13648
|
//////////////////////////////////////
|
13649
13649
|
//full virtual render
|
13650
13650
|
_virtualRenderFill(e, t, i) {
|
13651
|
-
var r = this.tableElement, o = this.elementVertical, a = 0, u = 0, d = 0, f = 0, m = 0, w = 0, v = this.rows(), C = v.length, M = 0, D, P, S = [], G = 0, X = 0, z = this.table.rowManager.fixedHeight,
|
13651
|
+
var r = this.tableElement, o = this.elementVertical, a = 0, u = 0, d = 0, f = 0, m = 0, w = 0, v = this.rows(), C = v.length, M = 0, D, P, S = [], G = 0, X = 0, z = this.table.rowManager.fixedHeight, W = this.elementVertical.clientHeight, le = this.table.options.rowHeight, N = !0;
|
13652
13652
|
if (e = e || 0, i = i || 0, !e)
|
13653
13653
|
this.clear();
|
13654
13654
|
else {
|
13655
13655
|
for (; r.firstChild; )
|
13656
13656
|
r.removeChild(r.firstChild);
|
13657
|
-
f = (C - e + 1) * this.vDomRowHeight, f <
|
13657
|
+
f = (C - e + 1) * this.vDomRowHeight, f < W && (e -= Math.ceil((W - f) / this.vDomRowHeight), e < 0 && (e = 0)), a = Math.min(Math.max(Math.floor(this.vDomWindowBuffer / this.vDomRowHeight), this.vDomWindowMinMarginRows), e), e -= a;
|
13658
13658
|
}
|
13659
13659
|
if (C && ve.elVisible(this.elementVertical)) {
|
13660
|
-
for (this.vDomTop = e, this.vDomBottom = e - 1, z || this.table.options.maxHeight ? (le && (X =
|
13660
|
+
for (this.vDomTop = e, this.vDomBottom = e - 1, z || this.table.options.maxHeight ? (le && (X = W / le + this.vDomWindowBuffer / le), X = Math.max(this.vDomWindowMinTotalRows, Math.ceil(X))) : X = C; (X == C || u <= W + this.vDomWindowBuffer || G < this.vDomWindowMinTotalRows) && this.vDomBottom < C - 1; ) {
|
13661
13661
|
for (S = [], P = document.createDocumentFragment(), w = 0; w < X && this.vDomBottom < C - 1; )
|
13662
13662
|
M = this.vDomBottom + 1, D = v[M], this.styleRow(D, M), D.initialize(!1, !0), !D.heightInitialized && !this.table.options.rowHeight && D.clearCellHeight(), P.appendChild(D.getElement()), S.push(D), this.vDomBottom++, w++;
|
13663
13663
|
if (!S.length)
|
@@ -13668,9 +13668,9 @@ class fE extends rs {
|
|
13668
13668
|
H.heightInitialized || H.setCellHeight();
|
13669
13669
|
}), S.forEach((H) => {
|
13670
13670
|
d = H.getHeight(), G < a ? m += d : u += d, d > this.vDomWindowBuffer && (this.vDomWindowBuffer = d * 2), G++;
|
13671
|
-
}), N = this.table.rowManager.adjustTableSize(),
|
13671
|
+
}), N = this.table.rowManager.adjustTableSize(), W = this.elementVertical.clientHeight, N && (z || this.table.options.maxHeight) && (le = u / G, X = Math.max(this.vDomWindowMinTotalRows, Math.ceil(W / le + this.vDomWindowBuffer / le)));
|
13672
13672
|
}
|
13673
|
-
e ? (this.vDomTopPad = t ? this.vDomRowHeight * this.vDomTop + i : this.scrollTop - m, this.vDomBottomPad = this.vDomBottom == C - 1 ? 0 : Math.max(this.vDomScrollHeight - this.vDomTopPad - u - m, 0)) : (this.vDomTopPad = 0, this.vDomRowHeight = Math.floor((u + m) / G), this.vDomBottomPad = this.vDomRowHeight * (C - this.vDomBottom - 1), this.vDomScrollHeight = m + u + this.vDomBottomPad -
|
13673
|
+
e ? (this.vDomTopPad = t ? this.vDomRowHeight * this.vDomTop + i : this.scrollTop - m, this.vDomBottomPad = this.vDomBottom == C - 1 ? 0 : Math.max(this.vDomScrollHeight - this.vDomTopPad - u - m, 0)) : (this.vDomTopPad = 0, this.vDomRowHeight = Math.floor((u + m) / G), this.vDomBottomPad = this.vDomRowHeight * (C - this.vDomBottom - 1), this.vDomScrollHeight = m + u + this.vDomBottomPad - W), r.style.paddingTop = this.vDomTopPad + "px", r.style.paddingBottom = this.vDomBottomPad + "px", t && (this.scrollTop = this.vDomTopPad + m + i - (this.elementVertical.scrollWidth > this.elementVertical.clientWidth ? this.elementVertical.offsetHeight - W : 0)), this.scrollTop = Math.min(this.scrollTop, this.elementVertical.scrollHeight - W), this.elementVertical.scrollWidth > this.elementVertical.clientWidth && t && (this.scrollTop += this.elementVertical.offsetHeight - W), this.vDomScrollPosTop = this.scrollTop, this.vDomScrollPosBottom = this.scrollTop, o.scrollTop = this.scrollTop, this.dispatch("render-virtual-fill");
|
13674
13674
|
}
|
13675
13675
|
}
|
13676
13676
|
_addTopRow(e, t) {
|
@@ -14546,7 +14546,7 @@ function _E(h, e) {
|
|
14546
14546
|
return typeof M == "string" ? M.indexOf("%") > -1 ? D = t / 100 * parseInt(M) : D = parseInt(M) : D = M, D;
|
14547
14547
|
}
|
14548
14548
|
function C(M, D, P, S) {
|
14549
|
-
var G = [], X = 0, z = 0,
|
14549
|
+
var G = [], X = 0, z = 0, W = 0, le = o, N = 0, H = 0, ce = [];
|
14550
14550
|
function Be(Z) {
|
14551
14551
|
return P * (Z.column.definition.widthGrow || 1);
|
14552
14552
|
}
|
@@ -14558,7 +14558,7 @@ function _E(h, e) {
|
|
14558
14558
|
Z.column.minWidth >= it ? G.push(Z) : Z.column.maxWidth && Z.column.maxWidth < it ? (Z.width = Z.column.maxWidth, D -= Z.column.maxWidth, le -= S ? Z.column.definition.widthShrink || 1 : Z.column.definition.widthGrow || 1, le && (P = Math.floor(D / le))) : (ce.push(Z), H += S ? Z.column.definition.widthShrink || 1 : Z.column.definition.widthGrow || 1);
|
14559
14559
|
}), G.length ? (G.forEach(function(Z) {
|
14560
14560
|
X += S ? Z.width - Z.column.minWidth : Z.column.minWidth, Z.width = Z.column.minWidth;
|
14561
|
-
}), z = D - X,
|
14561
|
+
}), z = D - X, W = H ? Math.floor(z / H) : z, N = C(ce, z, W, S)) : (N = H ? D - Math.floor(D / H) * H : D, ce.forEach(function(Z) {
|
14562
14562
|
Z.width = S ? Et(Z) : Be(Z);
|
14563
14563
|
})), N;
|
14564
14564
|
}
|
@@ -15682,7 +15682,7 @@ function S1(h, e, t, i = {}) {
|
|
15682
15682
|
() => X(C.value),
|
15683
15683
|
{ flush: r, deep: o, eventFilter: w }
|
15684
15684
|
);
|
15685
|
-
return m && a && (zn(m, "storage", le), zn(m, yu,
|
15685
|
+
return m && a && (zn(m, "storage", le), zn(m, yu, W)), le(), C;
|
15686
15686
|
function X(N) {
|
15687
15687
|
try {
|
15688
15688
|
if (N == null)
|
@@ -15712,7 +15712,7 @@ function S1(h, e, t, i = {}) {
|
|
15712
15712
|
} else
|
15713
15713
|
return typeof H != "string" ? H : P.read(H);
|
15714
15714
|
}
|
15715
|
-
function
|
15715
|
+
function W(N) {
|
15716
15716
|
le(N.detail);
|
15717
15717
|
}
|
15718
15718
|
function le(N) {
|
@@ -15852,7 +15852,7 @@ const Ct = (h) => (Zr("data-v-9eed8c8f"), h = h(), Qr(), h), A1 = { class: "fc-h
|
|
15852
15852
|
function f() {
|
15853
15853
|
d.value = !0, t.loadItems().finally(() => d.value = !1);
|
15854
15854
|
}
|
15855
|
-
const m =
|
15855
|
+
const m = V.debounce(f, 600);
|
15856
15856
|
return (w, v) => (K(), Y("div", A1, [
|
15857
15857
|
R("div", D1, [
|
15858
15858
|
R("button", Gt(w.props, {
|
@@ -16036,7 +16036,7 @@ const Ct = (h) => (Zr("data-v-9eed8c8f"), h = h(), Qr(), h), A1 = { class: "fc-h
|
|
16036
16036
|
SelectFilter: wx,
|
16037
16037
|
DateFilter: yx
|
16038
16038
|
};
|
16039
|
-
const on = (h) => (Zr("data-v-
|
16039
|
+
const on = (h) => (Zr("data-v-f90907f7"), h = h(), Qr(), h), Ex = { class: "border-muted-200 dark:border-muted-700 dark:bg-muted-800 relative mb-4 w-full rounded-lg border bg-white p-6 transition-all duration-300" }, xx = { class: "flex flex-col ml-1 border-[rgba(0,0,0,.1)] pb-4" }, _x = { class: "flex flex-row justify-between mb-4 items-center" }, Rx = { class: "font-heading text-base font-semibold leading-tight text-muted-800 dark:text-white" }, Tx = { class: "flex items-center" }, Mx = { class: "z-[1]" }, Sx = { class: "fc-drop-down-content" }, Lx = {
|
16040
16040
|
key: 0,
|
16041
16041
|
class: "p-2 text-center"
|
16042
16042
|
}, kx = ["onClick"], Ax = { class: "text-muted-400 font-sans text-sm" }, Dx = /* @__PURE__ */ on(() => /* @__PURE__ */ R("svg", {
|
@@ -16121,11 +16121,11 @@ const on = (h) => (Zr("data-v-f613bad0"), h = h(), Qr(), h), Ex = { class: "bord
|
|
16121
16121
|
function f(z) {
|
16122
16122
|
if (!z)
|
16123
16123
|
return !1;
|
16124
|
-
const
|
16124
|
+
const W = {
|
16125
16125
|
text: "TextFilter",
|
16126
16126
|
date: "DateFilter",
|
16127
16127
|
select: "SelectFilter"
|
16128
|
-
}, le =
|
16128
|
+
}, le = V.get(W, z.type), N = V.get(Cx, le);
|
16129
16129
|
return typeof N == "function" ? N(z) : !1;
|
16130
16130
|
}
|
16131
16131
|
const m = {
|
@@ -16140,13 +16140,13 @@ const on = (h) => (Zr("data-v-f613bad0"), h = h(), Qr(), h), Ex = { class: "bord
|
|
16140
16140
|
search: !0,
|
16141
16141
|
trackBy: ["title"],
|
16142
16142
|
columns: 2,
|
16143
|
-
onChange(z,
|
16143
|
+
onChange(z, W, le) {
|
16144
16144
|
const N = f(z) || [];
|
16145
16145
|
for (const H in r.value)
|
16146
16146
|
H !== "field" && delete r.value[H];
|
16147
16147
|
w.value = { ...m, ...N }, Bo(() => {
|
16148
16148
|
const H = le.form$.el$("value");
|
16149
|
-
|
16149
|
+
"clear" in H && H.clear(), "updateItems" in H && H.updateItems();
|
16150
16150
|
});
|
16151
16151
|
}
|
16152
16152
|
}
|
@@ -16158,18 +16158,18 @@ const on = (h) => (Zr("data-v-f613bad0"), h = h(), Qr(), h), Ex = { class: "bord
|
|
16158
16158
|
return S1(z, {}, localStorage, { mergeDefaults: !0 });
|
16159
16159
|
}
|
16160
16160
|
function C() {
|
16161
|
-
e.filters.push(
|
16161
|
+
e.filters.push(V.cloneDeep(r.value)), r.value = {};
|
16162
16162
|
}
|
16163
16163
|
function M() {
|
16164
16164
|
t !== -1 && e.filters.splice(t, 1, r.value), i.value = !1, r.value = {};
|
16165
16165
|
}
|
16166
|
-
function D(z,
|
16167
|
-
i.value = !0, t =
|
16166
|
+
function D(z, W) {
|
16167
|
+
i.value = !0, t = W, r.value = z, Bo(() => {
|
16168
16168
|
r.value.op = z.op, r.value.value = z.value;
|
16169
16169
|
});
|
16170
16170
|
}
|
16171
16171
|
function P(z) {
|
16172
|
-
e.filters = e.filters.filter((
|
16172
|
+
e.filters = e.filters.filter((W) => W !== z);
|
16173
16173
|
}
|
16174
16174
|
function S() {
|
16175
16175
|
e.filters = [], e.loadItems();
|
@@ -16182,7 +16182,7 @@ const on = (h) => (Zr("data-v-f613bad0"), h = h(), Qr(), h), Ex = { class: "bord
|
|
16182
16182
|
function X() {
|
16183
16183
|
e.loadItems();
|
16184
16184
|
}
|
16185
|
-
return (z,
|
16185
|
+
return (z, W) => {
|
16186
16186
|
const le = Vo("v-menu"), N = Vo("Vueform");
|
16187
16187
|
return Dn((K(), Y("div", {
|
16188
16188
|
class: ct(["accordion-content", { hide: q(e).panel !== "filters" }])
|
@@ -16220,7 +16220,7 @@ const on = (h) => (Zr("data-v-f613bad0"), h = h(), Qr(), h), Ex = { class: "bord
|
|
16220
16220
|
R("div", Fx, [
|
16221
16221
|
Ue(N, {
|
16222
16222
|
modelValue: r.value,
|
16223
|
-
"onUpdate:modelValue":
|
16223
|
+
"onUpdate:modelValue": W[0] || (W[0] = (H) => r.value = H),
|
16224
16224
|
schema: w.value,
|
16225
16225
|
sync: !0,
|
16226
16226
|
class: "w-[100%] justify-between ml-4",
|
@@ -16264,7 +16264,7 @@ const on = (h) => (Zr("data-v-f613bad0"), h = h(), Qr(), h), Ex = { class: "bord
|
|
16264
16264
|
class: "flex px-3 font-sans transition-shadow duration-300 py-1 text-[0.75rem] cursor-pointer rounded-full bg-primary-100 text-primary-500 border-primary-100 dark:border-primary-500 dark:text-primary-500 border dark:bg-transparent",
|
16265
16265
|
onClick: (Be) => D(H, ce)
|
16266
16266
|
}, [
|
16267
|
-
R("span", jx, ue(q(
|
16267
|
+
R("span", jx, ue(q(V.get)(H, "field.title")), 1),
|
16268
16268
|
R("button", {
|
16269
16269
|
class: "text-white font-bold rounded px-1 hover:bg-primary-500 hover:text-black-500",
|
16270
16270
|
onClick: Br((Be) => P(H), ["stop"])
|
@@ -16279,20 +16279,20 @@ const on = (h) => (Zr("data-v-f613bad0"), h = h(), Qr(), h), Ex = { class: "bord
|
|
16279
16279
|
]),
|
16280
16280
|
R("div", Jx, [
|
16281
16281
|
R("button", {
|
16282
|
-
onClick:
|
16282
|
+
onClick: W[1] || (W[1] = (H) => q(e).panel = ""),
|
16283
16283
|
class: "is-button text-muted-500 rounded hover:text-red-500 !underline focus-within:!outline-none"
|
16284
16284
|
}, ue(z.$fcTr("cancel")), 1),
|
16285
16285
|
R("div", Zx, [
|
16286
16286
|
R("div", Qx, [
|
16287
16287
|
R("button", {
|
16288
|
-
onClick:
|
16288
|
+
onClick: W[5] || (W[5] = Br((H) => Object.keys(q(e).filters).length !== 0 ? G() : "", ["self"])),
|
16289
16289
|
class: ct([{
|
16290
16290
|
"!bg-muted-100 dark:!bg-muted-700 ltr:pr-1": o.value,
|
16291
16291
|
" focus:outline-none !cursor-not-allowed": Object.keys(q(e).filters).length === 0
|
16292
16292
|
}, "transitionX-inp is-button rounded is-button-default"])
|
16293
16293
|
}, [
|
16294
16294
|
R("span", {
|
16295
|
-
onClick:
|
16295
|
+
onClick: W[2] || (W[2] = Br((H) => Object.keys(q(e).filters).length !== 0 ? G() : "", ["self"])),
|
16296
16296
|
class: ct({
|
16297
16297
|
" bg-green-500 px-2 py-1 rounded text-muted-50": o.value,
|
16298
16298
|
" focus:outline-none !cursor-not-allowed": Object.keys(q(e).filters).length === 0
|
@@ -16305,7 +16305,7 @@ const on = (h) => (Zr("data-v-f613bad0"), h = h(), Qr(), h), Ex = { class: "bord
|
|
16305
16305
|
])
|
16306
16306
|
}, [
|
16307
16307
|
Dn(R("input", {
|
16308
|
-
"onUpdate:modelValue":
|
16308
|
+
"onUpdate:modelValue": W[3] || (W[3] = (H) => a.value = H),
|
16309
16309
|
class: ct(["fc-focus py-1 rounded px-2 dark:bg-muted-800", o.value ? " border border-1" : "flex "]),
|
16310
16310
|
placeholder: z.$fcTr("filter_save_placeholder"),
|
16311
16311
|
ref_key: "filterNameInp",
|
@@ -16315,7 +16315,7 @@ const on = (h) => (Zr("data-v-f613bad0"), h = h(), Qr(), h), Ex = { class: "bord
|
|
16315
16315
|
]),
|
16316
16316
|
R("span", {
|
16317
16317
|
class: "px-2",
|
16318
|
-
onClick:
|
16318
|
+
onClick: W[4] || (W[4] = (H) => o.value = !1)
|
16319
16319
|
}, i_)
|
16320
16320
|
], 2)
|
16321
16321
|
], 2),
|
@@ -16332,14 +16332,14 @@ const on = (h) => (Zr("data-v-f613bad0"), h = h(), Qr(), h), Ex = { class: "bord
|
|
16332
16332
|
]);
|
16333
16333
|
};
|
16334
16334
|
}
|
16335
|
-
}, r_ = /* @__PURE__ */ Un(n_, [["__scopeId", "data-v-
|
16335
|
+
}, r_ = /* @__PURE__ */ Un(n_, [["__scopeId", "data-v-f90907f7"]]);
|
16336
16336
|
function s_(h, e) {
|
16337
|
-
return Array.isArray(h) ?
|
16337
|
+
return Array.isArray(h) ? V.every(h, (t) => V.isType(t, e)) : !1;
|
16338
16338
|
}
|
16339
16339
|
const o_ = (h, e) => {
|
16340
|
-
const t =
|
16341
|
-
return s_(e, "object") ? e.map((r) =>
|
16342
|
-
}, Cd = (h, e) =>
|
16340
|
+
const t = V.get(h, "field"), i = V.get(h, "valueProp");
|
16341
|
+
return s_(e, "object") ? e.map((r) => V.get(r, i)) : V.get(e, t);
|
16342
|
+
}, Cd = (h, e) => V.get(e, h.field), a_ = {
|
16343
16343
|
select: o_,
|
16344
16344
|
text: Cd
|
16345
16345
|
}, l_ = (h, e) => {
|
@@ -16566,7 +16566,7 @@ const G_ = {
|
|
16566
16566
|
const j_ = ({ headers: h, baseURL: e } = { headers: [], baseURL: "" }) => {
|
16567
16567
|
St.defaults.baseURL = e;
|
16568
16568
|
for (const t in h)
|
16569
|
-
|
16569
|
+
V.set(St.defaults.headers, t, h[t]);
|
16570
16570
|
}, Z_ = (h, { fields: e, axiosConfig: t, dir: i } = { fields: {}, axiosConfig: {}, dir: "rtl" }) => {
|
16571
16571
|
j_(t);
|
16572
16572
|
const r = In();
|