@sarafapp/iron_core 1.0.17 → 1.0.19
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/IronCore.js +162 -161
- package/dist/IronCore.umd.cjs +2 -2
- package/dist/src/baseTable/index.d.ts +1 -0
- package/dist/src/constants/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/IronCore.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import L from "dayjs";
|
|
2
2
|
import { toRaw as xe, reactive as Ne, ref as M, watch as Qe, computed as I, onBeforeUnmount as et } from "vue";
|
|
3
3
|
import { JsonConvert as tt, JsonProperty as N, JsonObject as Ae } from "json2typescript";
|
|
4
|
-
import { defineStore as
|
|
4
|
+
import { defineStore as Ue } from "pinia";
|
|
5
5
|
var we = /* @__PURE__ */ ((t) => (t.BankCard = "####-####-####-####", t.Iban = "##-####-####-####-####-####-##", t))(we || {}), Q = /* @__PURE__ */ ((t) => (t.FullDate = "jYYYY/jM/jD HH:mm", t.SimpleDate = "jYYYY/jM/jD", t.CompactGregorianDate = "YYYYMMDD", t.ShortJalaliDate = "YYMM", t.JustHour = "HH:mm:ss", t))(Q || {});
|
|
6
6
|
const st = [
|
|
7
7
|
{
|
|
@@ -462,9 +462,9 @@ function ut() {
|
|
|
462
462
|
}
|
|
463
463
|
var ht = ut();
|
|
464
464
|
const dt = /* @__PURE__ */ pe(ht);
|
|
465
|
-
var ce = { exports: {} }, ft = ce.exports,
|
|
465
|
+
var ce = { exports: {} }, ft = ce.exports, Te;
|
|
466
466
|
function vt() {
|
|
467
|
-
return
|
|
467
|
+
return Te || (Te = 1, function(t, e) {
|
|
468
468
|
(function(s, r) {
|
|
469
469
|
t.exports = r();
|
|
470
470
|
})(ft, function() {
|
|
@@ -479,9 +479,9 @@ function vt() {
|
|
|
479
479
|
}
|
|
480
480
|
var mt = vt();
|
|
481
481
|
const pt = /* @__PURE__ */ pe(mt);
|
|
482
|
-
var ue = { exports: {} }, gt = ue.exports,
|
|
482
|
+
var ue = { exports: {} }, gt = ue.exports, ke;
|
|
483
483
|
function yt() {
|
|
484
|
-
return
|
|
484
|
+
return ke || (ke = 1, function(t, e) {
|
|
485
485
|
(function(s, r) {
|
|
486
486
|
t.exports = r(L);
|
|
487
487
|
})(gt, function(s) {
|
|
@@ -522,7 +522,7 @@ function Dt(t, e) {
|
|
|
522
522
|
function At() {
|
|
523
523
|
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
524
524
|
}
|
|
525
|
-
function
|
|
525
|
+
function Be(t, e, s) {
|
|
526
526
|
e <= 2 && (t -= 1, e += 12);
|
|
527
527
|
var r = Math.floor(t / 100), a = 2 - r + Math.floor(r / 4), n = Math.floor(365.25 * (t + 4716)) + Math.floor(30.6001 * (e + 1)) + s + a - 1524.5;
|
|
528
528
|
return n;
|
|
@@ -562,7 +562,7 @@ function Mt(t, e, s) {
|
|
|
562
562
|
for (c >= 36525 && (c--, p += 100 * n(c, 36524), c = c % 36524, c >= 365 ? c++ : f = !1), p += 4 * n(c, 1461), c %= 1461, c >= 366 && (f = !1, c--, p += n(c, 365), c = c % 365), h = 0; c >= r[h] + (h == 1 && f); h++)
|
|
563
563
|
c -= r[h] + (h == 1 && f);
|
|
564
564
|
var u = h + 1, v = c + 1;
|
|
565
|
-
return
|
|
565
|
+
return Be(p, u, v);
|
|
566
566
|
}
|
|
567
567
|
function Rt(t, e, s) {
|
|
568
568
|
var r = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], a = [31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29];
|
|
@@ -578,17 +578,17 @@ function Rt(t, e, s) {
|
|
|
578
578
|
u %= 1461, u >= 366 && (g += n(u - 1, 365), u = (u - 1) % 365);
|
|
579
579
|
for (var D = 0; D < 11 && u >= a[D]; ++D)
|
|
580
580
|
u -= a[D];
|
|
581
|
-
var
|
|
582
|
-
return [g,
|
|
581
|
+
var U = D + 1, B = u + 1;
|
|
582
|
+
return [g, U, B];
|
|
583
583
|
}
|
|
584
584
|
var ie = {
|
|
585
585
|
J: function(e, s, r) {
|
|
586
|
-
return _t(
|
|
586
|
+
return _t(Be(e, s, r));
|
|
587
587
|
},
|
|
588
588
|
G: function(e, s, r) {
|
|
589
589
|
return bt(Mt(e, s, r));
|
|
590
590
|
}
|
|
591
|
-
}, Ct = /^(\d{4})[-/]?(\d{1,2})[-/]?(\d{0,2})(.*)?$/, Lt = /\[.*?\]|jY{2,4}|jM{1,4}|jD{1,2}|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, Ie = "date", J = "day", O = "month",
|
|
591
|
+
}, Ct = /^(\d{4})[-/]?(\d{1,2})[-/]?(\d{0,2})(.*)?$/, Lt = /\[.*?\]|jY{2,4}|jM{1,4}|jD{1,2}|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, Ie = "date", J = "day", O = "month", T = "year", $e = "week", xt = "YYYY-MM-DDTHH:mm:ssZ", Et = {
|
|
592
592
|
jmonths: "فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_")
|
|
593
593
|
}, Ot = function(t, e, s) {
|
|
594
594
|
var r = e.prototype, a = r.$utils(), n = function(l) {
|
|
@@ -600,7 +600,7 @@ var ie = {
|
|
|
600
600
|
};
|
|
601
601
|
};
|
|
602
602
|
r.startOf = u(r.startOf), r.endOf = u(r.endOf), r.add = u(r.add), r.subtract = u(r.subtract), r.set = u(r.set);
|
|
603
|
-
var v = r.parse, g = r.init, D = r.startOf,
|
|
603
|
+
var v = r.parse, g = r.init, D = r.startOf, U = r.$set, B = r.add, V = r.format, H = r.diff, ge = r.year, ye = r.month, te = r.date, Se = r.daysInMonth, K = r.toArray;
|
|
604
604
|
s.$C = "gregory", s.$fdow = 6, s.calendar = function(o) {
|
|
605
605
|
return s.$C = o, s;
|
|
606
606
|
}, r.calendar = function(o) {
|
|
@@ -638,7 +638,7 @@ var ie = {
|
|
|
638
638
|
return (S ? Le : Le.endOf(J)).$set("hour", 1);
|
|
639
639
|
}, A = (this.$W + (7 - s.$fdow)) % 7;
|
|
640
640
|
switch (w) {
|
|
641
|
-
case
|
|
641
|
+
case T:
|
|
642
642
|
return S ? y(1, 0) : y(0, 0, this.$jy + 1);
|
|
643
643
|
case O:
|
|
644
644
|
return S ? y(1, this.$jM) : y(0, (this.$jM + 1) % 12, this.$jy + parseInt((this.$jM + 1) / 12, 10));
|
|
@@ -650,7 +650,7 @@ var ie = {
|
|
|
650
650
|
}, r.$set = function(o, l) {
|
|
651
651
|
var d = this;
|
|
652
652
|
if (!n(this))
|
|
653
|
-
return
|
|
653
|
+
return U.bind(this)(o, l);
|
|
654
654
|
var S = i(o), w = function(A, se) {
|
|
655
655
|
var z = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : d.$jy, x = ie.G(z, se + 1, A), C = ne(x, 3), re = C[0], E = C[1], X = C[2];
|
|
656
656
|
return d.$d.setFullYear(re), d.$d.setMonth(E - 1), d.$d.setDate(X), d;
|
|
@@ -663,28 +663,28 @@ var ie = {
|
|
|
663
663
|
case O:
|
|
664
664
|
w(this.$jD, l);
|
|
665
665
|
break;
|
|
666
|
-
case
|
|
666
|
+
case T:
|
|
667
667
|
w(this.$jD, this.$jM, l);
|
|
668
668
|
break;
|
|
669
669
|
default:
|
|
670
|
-
return
|
|
670
|
+
return U.bind(this)(o, l);
|
|
671
671
|
}
|
|
672
672
|
return this.init(), this;
|
|
673
673
|
}, r.add = function(o, l) {
|
|
674
674
|
var d = this;
|
|
675
675
|
if (!n(this))
|
|
676
|
-
return
|
|
676
|
+
return B.bind(this)(o, l);
|
|
677
677
|
o = Number(o);
|
|
678
678
|
var S = l && (l.length === 1 || l === "ms") ? l : i(l), w = function(E, X) {
|
|
679
679
|
var ae = d.set(Ie, 1).set(E, X + o);
|
|
680
680
|
return ae.set(Ie, Math.min(d.$jD, ae.daysInMonth()));
|
|
681
681
|
};
|
|
682
682
|
if (["M", O].indexOf(S) > -1) {
|
|
683
|
-
var y = this.$jM + o, A = y < 0 ? -Math.ceil(-y / 12) : Math.floor(y / 12), se = this.$jD, z = this.set(J, 1).add(A,
|
|
683
|
+
var y = this.$jM + o, A = y < 0 ? -Math.ceil(-y / 12) : Math.floor(y / 12), se = this.$jD, z = this.set(J, 1).add(A, T).set(O, y - A * 12);
|
|
684
684
|
return z.set(J, Math.min(z.daysInMonth(), se));
|
|
685
685
|
}
|
|
686
|
-
if (["y",
|
|
687
|
-
return w(
|
|
686
|
+
if (["y", T].indexOf(S) > -1)
|
|
687
|
+
return w(T, this.$jy);
|
|
688
688
|
if (["d", J].indexOf(S) > -1) {
|
|
689
689
|
var x = new Date(this.$d);
|
|
690
690
|
return x.setDate(x.getDate() + o), q(x, this);
|
|
@@ -693,7 +693,7 @@ var ie = {
|
|
|
693
693
|
var C = new Date(this.$d);
|
|
694
694
|
return C.setDate(C.getDate() + o * 7), q(C, this);
|
|
695
695
|
}
|
|
696
|
-
return
|
|
696
|
+
return B.bind(this)(o, l);
|
|
697
697
|
}, r.format = function(o, l) {
|
|
698
698
|
var d = this;
|
|
699
699
|
if (!n(this))
|
|
@@ -727,7 +727,7 @@ var ie = {
|
|
|
727
727
|
return H.bind(this)(o, l, d);
|
|
728
728
|
var S = i(l), w = s(o), y = p(this, w);
|
|
729
729
|
switch (S) {
|
|
730
|
-
case
|
|
730
|
+
case T:
|
|
731
731
|
y /= 12;
|
|
732
732
|
break;
|
|
733
733
|
case O:
|
|
@@ -739,7 +739,7 @@ var ie = {
|
|
|
739
739
|
}, r.$g = function(o, l, d) {
|
|
740
740
|
return h(o) ? this[l] : this.set(d, o);
|
|
741
741
|
}, r.year = function(o) {
|
|
742
|
-
return n(this) ? this.$g(o, "$jy",
|
|
742
|
+
return n(this) ? this.$g(o, "$jy", T) : ge.bind(this)(o);
|
|
743
743
|
}, r.month = function(o) {
|
|
744
744
|
return n(this) ? this.$g(o, "$jM", O) : ye.bind(this)(o);
|
|
745
745
|
}, r.date = function(o) {
|
|
@@ -752,7 +752,7 @@ var ie = {
|
|
|
752
752
|
return q(this.toDate(), this);
|
|
753
753
|
};
|
|
754
754
|
};
|
|
755
|
-
const
|
|
755
|
+
const Tt = {
|
|
756
756
|
ordinal(t) {
|
|
757
757
|
},
|
|
758
758
|
relativeTime: void 0,
|
|
@@ -774,15 +774,15 @@ const kt = {
|
|
|
774
774
|
LLLL: "dddd, D MMMM YYYY HH:mm"
|
|
775
775
|
}
|
|
776
776
|
};
|
|
777
|
-
function
|
|
778
|
-
L.extend(Ot), L.calendar("jalali"), L.extend(lt), L.extend(dt), L.extend(pt), L.locale(
|
|
777
|
+
function kt() {
|
|
778
|
+
L.extend(Ot), L.calendar("jalali"), L.extend(lt), L.extend(dt), L.extend(pt), L.locale(Tt, {}, !0);
|
|
779
779
|
}
|
|
780
|
-
class
|
|
780
|
+
class ts {
|
|
781
781
|
constructor(e, s) {
|
|
782
782
|
this.start = e, this.end = s;
|
|
783
783
|
}
|
|
784
784
|
}
|
|
785
|
-
class
|
|
785
|
+
class ss {
|
|
786
786
|
constructor(e, s, r) {
|
|
787
787
|
this.maxDate = e, this.minDate = s, this.disabledDates = r;
|
|
788
788
|
}
|
|
@@ -814,7 +814,7 @@ class he {
|
|
|
814
814
|
return G.getUnixEndOfDayInUnix(s) <= G.getUnixEndOfDayInUnix(e);
|
|
815
815
|
}
|
|
816
816
|
}
|
|
817
|
-
|
|
817
|
+
kt();
|
|
818
818
|
class b {
|
|
819
819
|
static toCurrency(e, s) {
|
|
820
820
|
return e.toLocaleString("en-US", s);
|
|
@@ -853,7 +853,7 @@ class b {
|
|
|
853
853
|
return L(new Date(e)).subtract(1, "day").format(s);
|
|
854
854
|
}
|
|
855
855
|
}
|
|
856
|
-
var m = /* @__PURE__ */ ((t) => (t.FetchList = "fetchList", t.AutoRefresh = "autoRefresh", t.FetchItem = "fetchItem", t.FetchLastItems = "fetchLastItems", t.FetchPreviousItems = "fetchPreviousItems", t.Create = "CREATE", t.Update = "UPDATE", t.Delete = "DELETE", t.Search = "SEARCH", t.Sort = "SORT", t.Success = "SUCCESS", t.Error = "ERROR", t.Idle = "IDLE", t))(m || {}),
|
|
856
|
+
var m = /* @__PURE__ */ ((t) => (t.FetchList = "fetchList", t.AutoRefresh = "autoRefresh", t.FetchItem = "fetchItem", t.FetchLastItems = "fetchLastItems", t.FetchPreviousItems = "fetchPreviousItems", t.Create = "CREATE", t.Update = "UPDATE", t.Delete = "DELETE", t.Search = "SEARCH", t.Sort = "SORT", t.Success = "SUCCESS", t.Error = "ERROR", t.Idle = "IDLE", t))(m || {}), k = /* @__PURE__ */ ((t) => (t.Width = "width", t.Height = "height", t[t.DefaultWidth = 500] = "DefaultWidth", t[t.DefaultHeight = 350] = "DefaultHeight", t[t.MinimalAvailableSize = 0] = "MinimalAvailableSize", t))(k || {}), Y = /* @__PURE__ */ ((t) => (t.ASC = "ASC", t.DESC = "DESC", t))(Y || {}), $t = /* @__PURE__ */ ((t) => (t.ASC = "ascend", t.DESC = "descend", t))($t || {}), _e = /* @__PURE__ */ ((t) => (t.Left = "left", t.Right = "right", t.Center = "center", t))(_e || {}), be = /* @__PURE__ */ ((t) => (t.Text = "text", t))(be || {}), Me = /* @__PURE__ */ ((t) => (t.Text = "text", t.ACTION = "action", t.Tag = "tag", t.Iban = "iban", t.BankCard = "bankCard", t.Symbol = "symbol", t.TradeDetail = "tradeDetail", t.SymbolPrice = "symbolPrice", t.TradeSymbol = "tradeSymbol", t.Price = "price", t.DynamicCurrencyPrice = "dynamicCurrencyPrice", t.TradeDate = "tradeDate", t.RequestResponseIdentity = "requestResponseIdentity", t.Image = "image", t))(Me || {}), Ve = /* @__PURE__ */ ((t) => (t[t.MINIMAL_LOADABLE_HEADER_COUNT = 0] = "MINIMAL_LOADABLE_HEADER_COUNT", t[t.DEFAULT_ITEM_COUNT_PER_PAGE = 20] = "DEFAULT_ITEM_COUNT_PER_PAGE", t.PAGINATION_POSITION = "bottomCenter", t))(Ve || {}), Re = /* @__PURE__ */ ((t) => (t.FontFamily = "IRANSansX", t))(Re || {}), ee = /* @__PURE__ */ ((t) => (t.Open = "open", t.Close = "close", t))(ee || {}), Pt = /* @__PURE__ */ ((t) => (t[t.NotFound = 404] = "NotFound", t[t.Unauthorized = 401] = "Unauthorized", t[t.ServerError = 500] = "ServerError", t))(Pt || {}), de = /* @__PURE__ */ ((t) => (t[t.Invalid = 0] = "Invalid", t[t.Valid = 1] = "Valid", t))(de || {}), j = /* @__PURE__ */ ((t) => (t.Theme = "theme", t.AccessList = "accessList", t.Token = "token", t.SSO_ACCESS_LIST = "ssoAccessList", t))(j || {}), Re = /* @__PURE__ */ ((t) => (t.Light = "light", t.Dark = "dark", t))(Re || {}), Ce = /* @__PURE__ */ ((t) => (t.Dialog = "dialog", t.Drawer = "drawer", t.Module = "module", t.Toast = "toast", t))(Ce || {}), Ft = /* @__PURE__ */ ((t) => (t.USDT = "USDT", t))(Ft || {});
|
|
857
857
|
class W {
|
|
858
858
|
static getBankImageBaseOnCardInfo(e, s) {
|
|
859
859
|
return e === void 0 ? "/img/banks/shetab.png" : s === "IBAN" ? (e = b.toEnglishDigits(
|
|
@@ -958,12 +958,12 @@ class He {
|
|
|
958
958
|
}, this.accessService = fe.GetInstance();
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
|
-
class
|
|
961
|
+
class rs extends He {
|
|
962
962
|
hasAccess(e) {
|
|
963
963
|
return this.accessService.everyAccess(e);
|
|
964
964
|
}
|
|
965
965
|
}
|
|
966
|
-
class
|
|
966
|
+
class as extends He {
|
|
967
967
|
hasAccess(e) {
|
|
968
968
|
return this.accessService.someAccess(e);
|
|
969
969
|
}
|
|
@@ -1040,39 +1040,39 @@ class qe {
|
|
|
1040
1040
|
return r.length || (r = Array.from(((a = this._authorizationService.getAccessLevelsOfScope(e)) == null ? void 0 : a.values()) ?? [])), r;
|
|
1041
1041
|
}
|
|
1042
1042
|
}
|
|
1043
|
-
class
|
|
1043
|
+
class ns extends qe {
|
|
1044
1044
|
hasAccess(e, s) {
|
|
1045
1045
|
return this._authorizationService.everyAccess(e, s);
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
|
-
class
|
|
1048
|
+
class is extends qe {
|
|
1049
1049
|
hasAccess(e, s) {
|
|
1050
1050
|
return this._authorizationService.someAccess(e, s);
|
|
1051
1051
|
}
|
|
1052
1052
|
}
|
|
1053
|
-
class
|
|
1053
|
+
class jt {
|
|
1054
1054
|
constructor() {
|
|
1055
1055
|
this.value = null, this.initialValue = null, this.name = "", this.isValid = !1, this.isBlurSensitive = !1, this.isRequired = !1, this.isIncludeInRequestBody = !0, this.isChangeSensitive = !1, this.notValidMessage = "", this.isEmptySensitive = !0;
|
|
1056
1056
|
}
|
|
1057
1057
|
}
|
|
1058
|
-
function
|
|
1058
|
+
function os(t) {
|
|
1059
1059
|
return t === 1;
|
|
1060
1060
|
}
|
|
1061
|
-
function
|
|
1061
|
+
function ls(t, e) {
|
|
1062
1062
|
return t - 1 === e;
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1064
|
+
function Yt(t) {
|
|
1065
1065
|
return String(t).length === 0 || t === null || t === void 0;
|
|
1066
1066
|
}
|
|
1067
|
-
function
|
|
1067
|
+
function cs(t) {
|
|
1068
1068
|
t();
|
|
1069
1069
|
}
|
|
1070
|
-
class
|
|
1070
|
+
class us {
|
|
1071
1071
|
constructor(e, s) {
|
|
1072
|
-
this.initialData = null, this.data = new
|
|
1072
|
+
this.initialData = null, this.data = new jt(), this._validators = [], this._id = Math.random(), this.data.value = s, this.data.name = e, this.shouldRunValidation() && this.runValidation(!0);
|
|
1073
1073
|
}
|
|
1074
1074
|
shouldRunValidation() {
|
|
1075
|
-
return this.data.isRequired ? !0 : !
|
|
1075
|
+
return this.data.isRequired ? !0 : !Yt(this.data.value);
|
|
1076
1076
|
}
|
|
1077
1077
|
runValidation(e = !1) {
|
|
1078
1078
|
for (const s of this._validators) {
|
|
@@ -1163,7 +1163,7 @@ class cs {
|
|
|
1163
1163
|
return this.data.value;
|
|
1164
1164
|
}
|
|
1165
1165
|
}
|
|
1166
|
-
class
|
|
1166
|
+
class hs {
|
|
1167
1167
|
constructor(e) {
|
|
1168
1168
|
this._inputControl = e;
|
|
1169
1169
|
}
|
|
@@ -1192,7 +1192,7 @@ class us {
|
|
|
1192
1192
|
return this._inputControl;
|
|
1193
1193
|
}
|
|
1194
1194
|
}
|
|
1195
|
-
class
|
|
1195
|
+
class ds {
|
|
1196
1196
|
constructor() {
|
|
1197
1197
|
this.mounted = (e, s) => {
|
|
1198
1198
|
s.value && s.value.getIsBlurSensitive() && (e.addEventListener("click", this.handleFocus.bind(this, s.value)), e.addEventListener(
|
|
@@ -1214,7 +1214,7 @@ class hs {
|
|
|
1214
1214
|
e.value || e.getIsEmptySensitive() || e.setNotValidMessage("");
|
|
1215
1215
|
}
|
|
1216
1216
|
}
|
|
1217
|
-
class
|
|
1217
|
+
class fs {
|
|
1218
1218
|
constructor() {
|
|
1219
1219
|
this._inputControls = /* @__PURE__ */ new Map(), this._isValid = !1, this._id = Math.random();
|
|
1220
1220
|
}
|
|
@@ -1268,7 +1268,7 @@ class ds {
|
|
|
1268
1268
|
return this._id;
|
|
1269
1269
|
}
|
|
1270
1270
|
}
|
|
1271
|
-
function
|
|
1271
|
+
function vs(t) {
|
|
1272
1272
|
const e = Ne(t), s = M(
|
|
1273
1273
|
de.Invalid
|
|
1274
1274
|
);
|
|
@@ -1302,7 +1302,7 @@ class ze {
|
|
|
1302
1302
|
this.timerId && clearInterval(this.timerId);
|
|
1303
1303
|
}
|
|
1304
1304
|
}
|
|
1305
|
-
const Je = "150px", Ge = 2,
|
|
1305
|
+
const Je = "150px", Ge = 2, ms = {
|
|
1306
1306
|
path: "id",
|
|
1307
1307
|
key: "id",
|
|
1308
1308
|
title: "عملیات",
|
|
@@ -1312,7 +1312,7 @@ const Je = "150px", Ge = 2, vs = {
|
|
|
1312
1312
|
align: _e.Center,
|
|
1313
1313
|
headerType: be.Text,
|
|
1314
1314
|
accessLevel: null
|
|
1315
|
-
},
|
|
1315
|
+
}, Nt = {
|
|
1316
1316
|
width: Je,
|
|
1317
1317
|
align: _e.Center,
|
|
1318
1318
|
headerType: be.Text,
|
|
@@ -1346,7 +1346,7 @@ class Pe {
|
|
|
1346
1346
|
});
|
|
1347
1347
|
}
|
|
1348
1348
|
}
|
|
1349
|
-
class
|
|
1349
|
+
class ps {
|
|
1350
1350
|
arrayOfObjectSort(e, s, r, a = new Pe()) {
|
|
1351
1351
|
return r === Y.ASC ? a.aSort(e, s) : a.bSort(e, s);
|
|
1352
1352
|
}
|
|
@@ -1354,7 +1354,7 @@ class ms {
|
|
|
1354
1354
|
return s === Y.ASC ? r.aSort(e) : r.bSort(e);
|
|
1355
1355
|
}
|
|
1356
1356
|
}
|
|
1357
|
-
class
|
|
1357
|
+
class Ut {
|
|
1358
1358
|
constructor(e) {
|
|
1359
1359
|
this.currentPage = 1, this.currentPageSize = 20, this.currentSortDetail = new We(
|
|
1360
1360
|
"id",
|
|
@@ -1462,7 +1462,7 @@ class Bt {
|
|
|
1462
1462
|
return this._value;
|
|
1463
1463
|
}
|
|
1464
1464
|
}
|
|
1465
|
-
class
|
|
1465
|
+
class gs extends Ut {
|
|
1466
1466
|
constructor(e) {
|
|
1467
1467
|
super(e), this.selectedRows = new Bt(/* @__PURE__ */ new Map()), this.rowSelect = this.rowSelect.bind(this), this.selectAll = this.selectAll.bind(this), this.isEveryRowSelected = this.isEveryRowSelected.bind(this), this.handlePagination = this.handlePagination.bind(this), this.clearAllSelectedItems = this.clearAllSelectedItems.bind(this), this.getSelectedRows = this.getSelectedRows.bind(this), this.getSelectedRowsAsArray = this.getSelectedRowsAsArray.bind(this), this.getSelectedRowIds = this.getSelectedRowIds.bind(this);
|
|
1468
1468
|
}
|
|
@@ -1501,18 +1501,18 @@ class ps extends Nt {
|
|
|
1501
1501
|
return this.selectedRows.getValue();
|
|
1502
1502
|
}
|
|
1503
1503
|
}
|
|
1504
|
-
function
|
|
1504
|
+
function ys(t) {
|
|
1505
1505
|
return {
|
|
1506
|
-
...
|
|
1506
|
+
...Nt,
|
|
1507
1507
|
...t
|
|
1508
1508
|
};
|
|
1509
1509
|
}
|
|
1510
|
-
function
|
|
1510
|
+
function Ss(t) {
|
|
1511
1511
|
return function(s, r) {
|
|
1512
1512
|
s.constructor.prototype.headers || (s.constructor.prototype.headers = []), s.constructor.prototype.headers.push({ path: r, ...t });
|
|
1513
1513
|
};
|
|
1514
1514
|
}
|
|
1515
|
-
function
|
|
1515
|
+
function Is(t) {
|
|
1516
1516
|
return function(s) {
|
|
1517
1517
|
async function r() {
|
|
1518
1518
|
return s.prototype._table = this, s.prototype.headers;
|
|
@@ -1539,22 +1539,22 @@ function Ss(t) {
|
|
|
1539
1539
|
t.prototype.loadHeader = r, t.prototype.getActions = a, t.prototype.handleClick = n, t.prototype.onDestroy = i;
|
|
1540
1540
|
};
|
|
1541
1541
|
}
|
|
1542
|
-
function
|
|
1542
|
+
function ws(t) {
|
|
1543
1543
|
return function(s, r, a) {
|
|
1544
1544
|
s.constructor.prototype.actions || (s.constructor.prototype.actions = []), t.handler = a.value, s.constructor.prototype.actions.push(t);
|
|
1545
1545
|
};
|
|
1546
1546
|
}
|
|
1547
|
-
function
|
|
1547
|
+
function Ds() {
|
|
1548
1548
|
return function(e, s, r) {
|
|
1549
1549
|
e.constructor.prototype.tableDestroy = r.value;
|
|
1550
1550
|
};
|
|
1551
1551
|
}
|
|
1552
|
-
function
|
|
1552
|
+
function As() {
|
|
1553
1553
|
return function(e, s, r) {
|
|
1554
1554
|
e.constructor.prototype.rowClick = r.value;
|
|
1555
1555
|
};
|
|
1556
1556
|
}
|
|
1557
|
-
function
|
|
1557
|
+
function Vt() {
|
|
1558
1558
|
const t = M(
|
|
1559
1559
|
/* @__PURE__ */ new Map()
|
|
1560
1560
|
), e = M(0), s = M(null), r = I(() => Array.from(t.value.values()));
|
|
@@ -1597,23 +1597,23 @@ function Ut() {
|
|
|
1597
1597
|
clearCurrentItem: u
|
|
1598
1598
|
};
|
|
1599
1599
|
}
|
|
1600
|
-
class
|
|
1600
|
+
class Ht {
|
|
1601
1601
|
constructor() {
|
|
1602
1602
|
this.pageNumber = 1, this.itemCount = 20, this.sortDetail = new We("id", Y.DESC), this.filters = [];
|
|
1603
1603
|
}
|
|
1604
1604
|
}
|
|
1605
|
-
class
|
|
1605
|
+
class _s {
|
|
1606
1606
|
constructor(e, s) {
|
|
1607
1607
|
this.items = e, this.totalItems = s;
|
|
1608
1608
|
}
|
|
1609
1609
|
}
|
|
1610
|
-
class
|
|
1610
|
+
class bs {
|
|
1611
1611
|
constructor(e, s) {
|
|
1612
1612
|
this.shouldKeepSync = e, this.intervalInMillisecond = s;
|
|
1613
1613
|
}
|
|
1614
1614
|
}
|
|
1615
|
-
const Fe = new
|
|
1616
|
-
function
|
|
1615
|
+
const Fe = new Ht();
|
|
1616
|
+
function qt() {
|
|
1617
1617
|
const t = M(structuredClone(Fe));
|
|
1618
1618
|
function e() {
|
|
1619
1619
|
t.value.pageNumber = t.value.pageNumber + 1;
|
|
@@ -1677,7 +1677,7 @@ function Ht() {
|
|
|
1677
1677
|
setFiltersBaseOnRequestBody: i
|
|
1678
1678
|
};
|
|
1679
1679
|
}
|
|
1680
|
-
function
|
|
1680
|
+
function zt() {
|
|
1681
1681
|
const t = M(/* @__PURE__ */ new Set()), e = I(() => t.value.has(m.FetchList)), s = I(() => t.value.has(m.FetchItem)), r = I(() => t.value.has(m.FetchLastItems)), a = I(() => t.value.has(m.FetchPreviousItems)), n = I(() => t.value.has(m.Create)), i = I(() => t.value.has(m.Update)), h = I(() => t.value.has(m.Delete)), c = I(() => t.value.has(m.Search)), p = I(() => t.value.has(m.Sort));
|
|
1682
1682
|
function f(v) {
|
|
1683
1683
|
t.value.add(v);
|
|
@@ -1700,8 +1700,8 @@ function qt() {
|
|
|
1700
1700
|
removeStatus: u
|
|
1701
1701
|
};
|
|
1702
1702
|
}
|
|
1703
|
-
function
|
|
1704
|
-
const e =
|
|
1703
|
+
function Ms(t) {
|
|
1704
|
+
const e = Vt(), s = qt(), r = zt(), a = new ze({
|
|
1705
1705
|
runAction: async () => u(m.AutoRefresh)
|
|
1706
1706
|
}), n = I(() => {
|
|
1707
1707
|
const o = s.params.value.pageNumber, l = s.params.value.itemCount, d = o * l - l, S = o * l - 1, w = [];
|
|
@@ -1743,12 +1743,12 @@ function bs(t) {
|
|
|
1743
1743
|
function D() {
|
|
1744
1744
|
a.clearInterval();
|
|
1745
1745
|
}
|
|
1746
|
-
async function
|
|
1746
|
+
async function U(o, l = !0) {
|
|
1747
1747
|
r.setStatus(m.FetchItem), l && e.clearCurrentItem();
|
|
1748
1748
|
const d = await t.fetchItemById(o);
|
|
1749
1749
|
return e.setCurrentItem(d), r.removeStatus(m.FetchItem), d;
|
|
1750
1750
|
}
|
|
1751
|
-
async function
|
|
1751
|
+
async function B(o) {
|
|
1752
1752
|
r.setStatus(m.Create);
|
|
1753
1753
|
const l = await t.createItem(o);
|
|
1754
1754
|
return l && e.addOrReplaceItems([l]), r.removeStatus(m.Create), l;
|
|
@@ -1800,8 +1800,8 @@ function bs(t) {
|
|
|
1800
1800
|
fetchWithAutoRefresh: v,
|
|
1801
1801
|
setupAutoRefresh: g,
|
|
1802
1802
|
stopAutoRefresh: D,
|
|
1803
|
-
fetchItemById:
|
|
1804
|
-
createItem:
|
|
1803
|
+
fetchItemById: U,
|
|
1804
|
+
createItem: B,
|
|
1805
1805
|
updateItem: V,
|
|
1806
1806
|
deleteItem: H,
|
|
1807
1807
|
fetchLastItems: ge,
|
|
@@ -1814,7 +1814,7 @@ function bs(t) {
|
|
|
1814
1814
|
currentPageItems: n
|
|
1815
1815
|
};
|
|
1816
1816
|
}
|
|
1817
|
-
function
|
|
1817
|
+
function Rs(t) {
|
|
1818
1818
|
const e = M(t), s = I(() => ({
|
|
1819
1819
|
getData() {
|
|
1820
1820
|
return {
|
|
@@ -1849,7 +1849,7 @@ function Ms(t) {
|
|
|
1849
1849
|
staticTableService: s
|
|
1850
1850
|
};
|
|
1851
1851
|
}
|
|
1852
|
-
function
|
|
1852
|
+
function Cs() {
|
|
1853
1853
|
const t = M(/* @__PURE__ */ new Map()), e = M(0), s = I(() => e.value), r = I(() => Array.from(t.value.values()));
|
|
1854
1854
|
function a(f) {
|
|
1855
1855
|
e.value = f;
|
|
@@ -1881,7 +1881,7 @@ function Rs() {
|
|
|
1881
1881
|
getTotalCount: s
|
|
1882
1882
|
};
|
|
1883
1883
|
}
|
|
1884
|
-
class
|
|
1884
|
+
class Ls {
|
|
1885
1885
|
constructor(e, s = 500) {
|
|
1886
1886
|
this.timerId = null, this.debounceTimeout = s, this.action = e;
|
|
1887
1887
|
}
|
|
@@ -1894,7 +1894,7 @@ class Cs {
|
|
|
1894
1894
|
this.timerId && clearTimeout(this.timerId);
|
|
1895
1895
|
}
|
|
1896
1896
|
}
|
|
1897
|
-
function
|
|
1897
|
+
function xs(t) {
|
|
1898
1898
|
return function(e, s, r) {
|
|
1899
1899
|
const a = r.value;
|
|
1900
1900
|
r.value = async function(...n) {
|
|
@@ -1907,7 +1907,7 @@ function Ls(t) {
|
|
|
1907
1907
|
};
|
|
1908
1908
|
};
|
|
1909
1909
|
}
|
|
1910
|
-
function
|
|
1910
|
+
function Es(t) {
|
|
1911
1911
|
return function(e, s, r) {
|
|
1912
1912
|
const a = r.value;
|
|
1913
1913
|
r.value = async function(...n) {
|
|
@@ -1923,7 +1923,7 @@ function xs(t) {
|
|
|
1923
1923
|
};
|
|
1924
1924
|
};
|
|
1925
1925
|
}
|
|
1926
|
-
class
|
|
1926
|
+
class Os {
|
|
1927
1927
|
constructor(e, s, r = () => !0, a = () => !0) {
|
|
1928
1928
|
this.successMessageResolver = e, this.failureMessageResolver = s, this.shouldResolveSuccess = r, this.shouldResolveFailure = a;
|
|
1929
1929
|
}
|
|
@@ -1953,7 +1953,7 @@ const _ = class _ {
|
|
|
1953
1953
|
};
|
|
1954
1954
|
_.handlers = /* @__PURE__ */ new Map(), _.instance = null;
|
|
1955
1955
|
let je = _;
|
|
1956
|
-
class
|
|
1956
|
+
class Ts {
|
|
1957
1957
|
constructor(e) {
|
|
1958
1958
|
this.axiosInstance = e;
|
|
1959
1959
|
}
|
|
@@ -2026,7 +2026,7 @@ class ks {
|
|
|
2026
2026
|
);
|
|
2027
2027
|
}
|
|
2028
2028
|
}
|
|
2029
|
-
class
|
|
2029
|
+
class $s {
|
|
2030
2030
|
constructor() {
|
|
2031
2031
|
this._initializer = [];
|
|
2032
2032
|
}
|
|
@@ -2065,17 +2065,17 @@ const F = class F {
|
|
|
2065
2065
|
};
|
|
2066
2066
|
F.Instance = null;
|
|
2067
2067
|
let Ye = F;
|
|
2068
|
-
var
|
|
2069
|
-
class
|
|
2068
|
+
var Jt = /* @__PURE__ */ ((t) => (t.Success = "success", t.Failure = "error", t.Info = "info", t.Warning = "warning", t))(Jt || {}), Ze = /* @__PURE__ */ ((t) => (t.BottomLeft = "bottomLeft", t.TopLeft = "topLeft", t))(Ze || {});
|
|
2069
|
+
class Ps {
|
|
2070
2070
|
constructor(e, s, r) {
|
|
2071
2071
|
this.placement = Ze.BottomLeft, this.type = e, this.message = s, this.description = r;
|
|
2072
2072
|
}
|
|
2073
2073
|
}
|
|
2074
|
-
const
|
|
2074
|
+
const Fs = Ue(Ce.Dialog, () => {
|
|
2075
2075
|
const t = Ne({
|
|
2076
2076
|
dialogComponent: null,
|
|
2077
|
-
width:
|
|
2078
|
-
height:
|
|
2077
|
+
width: k.DefaultWidth,
|
|
2078
|
+
height: k.DefaultHeight,
|
|
2079
2079
|
props: null,
|
|
2080
2080
|
header: ""
|
|
2081
2081
|
}), e = I(() => !!t.dialogComponent), s = I(() => !!t.header);
|
|
@@ -2093,12 +2093,12 @@ const Ps = Be(Ce.Dialog, () => {
|
|
|
2093
2093
|
function i(c, p) {
|
|
2094
2094
|
if (!e.value)
|
|
2095
2095
|
throw new Error("there is no dialog to set size on");
|
|
2096
|
-
if (c <
|
|
2096
|
+
if (c < k.MinimalAvailableSize)
|
|
2097
2097
|
throw new Error("negative size not supported");
|
|
2098
|
-
p ===
|
|
2098
|
+
p === k.Width ? t.width = c : t.height = c;
|
|
2099
2099
|
}
|
|
2100
2100
|
function h() {
|
|
2101
|
-
t.props = null, t.height =
|
|
2101
|
+
t.props = null, t.height = k.DefaultHeight, t.width = k.DefaultWidth, t.header = "", t.dialogComponent = null;
|
|
2102
2102
|
}
|
|
2103
2103
|
return {
|
|
2104
2104
|
dialogData: t,
|
|
@@ -2110,7 +2110,7 @@ const Ps = Be(Ce.Dialog, () => {
|
|
|
2110
2110
|
isDialogExists: e,
|
|
2111
2111
|
hasDefaultHeader: s
|
|
2112
2112
|
};
|
|
2113
|
-
}),
|
|
2113
|
+
}), js = Ue(Ce.Drawer, () => {
|
|
2114
2114
|
const t = M(ee.Close), e = I(() => t.value === ee.Open);
|
|
2115
2115
|
function s() {
|
|
2116
2116
|
t.value = ee.Close;
|
|
@@ -2124,7 +2124,7 @@ const Ps = Be(Ce.Dialog, () => {
|
|
|
2124
2124
|
isDrawerOpen: e
|
|
2125
2125
|
};
|
|
2126
2126
|
});
|
|
2127
|
-
class
|
|
2127
|
+
class Ys {
|
|
2128
2128
|
constructor() {
|
|
2129
2129
|
this.observers = [];
|
|
2130
2130
|
}
|
|
@@ -2141,7 +2141,7 @@ class js {
|
|
|
2141
2141
|
e.update(this);
|
|
2142
2142
|
}
|
|
2143
2143
|
}
|
|
2144
|
-
class
|
|
2144
|
+
class Ns {
|
|
2145
2145
|
constructor(e) {
|
|
2146
2146
|
this.mapProcesses = /* @__PURE__ */ new Map(), this.processes = e, this.assignProcessManager();
|
|
2147
2147
|
}
|
|
@@ -2161,7 +2161,7 @@ class Ys {
|
|
|
2161
2161
|
await s.execute();
|
|
2162
2162
|
}
|
|
2163
2163
|
}
|
|
2164
|
-
class
|
|
2164
|
+
class Us {
|
|
2165
2165
|
constructor(e, s) {
|
|
2166
2166
|
this.next = null, this.name = e, this.next = s;
|
|
2167
2167
|
}
|
|
@@ -2188,7 +2188,7 @@ class Bs {
|
|
|
2188
2188
|
return "";
|
|
2189
2189
|
}
|
|
2190
2190
|
}
|
|
2191
|
-
class
|
|
2191
|
+
class Vs {
|
|
2192
2192
|
constructor(e, s, r) {
|
|
2193
2193
|
this.scheduler = new ze({
|
|
2194
2194
|
runAction: async () => {
|
|
@@ -2238,9 +2238,9 @@ class Us {
|
|
|
2238
2238
|
this.scheduler.clearInterval();
|
|
2239
2239
|
}
|
|
2240
2240
|
}
|
|
2241
|
-
class
|
|
2241
|
+
class Gt {
|
|
2242
2242
|
}
|
|
2243
|
-
class
|
|
2243
|
+
class Hs extends Gt {
|
|
2244
2244
|
search(e, s, r) {
|
|
2245
2245
|
const a = [];
|
|
2246
2246
|
e: for (const n of e)
|
|
@@ -2253,7 +2253,7 @@ class Vs extends Jt {
|
|
|
2253
2253
|
}
|
|
2254
2254
|
}
|
|
2255
2255
|
var Ke = /* @__PURE__ */ ((t) => (t.Hidden = "hidden", t.Visible = "visible", t))(Ke || {});
|
|
2256
|
-
class
|
|
2256
|
+
class qs {
|
|
2257
2257
|
constructor(e) {
|
|
2258
2258
|
this._visibilityControl = e, this.mangeVisibilityEvent();
|
|
2259
2259
|
}
|
|
@@ -2263,10 +2263,10 @@ class Hs {
|
|
|
2263
2263
|
});
|
|
2264
2264
|
}
|
|
2265
2265
|
}
|
|
2266
|
-
var
|
|
2267
|
-
for (var a = r > 1 ? void 0 : r ?
|
|
2266
|
+
var Wt = Object.defineProperty, Zt = Object.getOwnPropertyDescriptor, R = (t, e, s, r) => {
|
|
2267
|
+
for (var a = r > 1 ? void 0 : r ? Zt(e, s) : e, n = t.length - 1, i; n >= 0; n--)
|
|
2268
2268
|
(i = t[n]) && (a = (r ? i(e, s, a) : i(a)) || a);
|
|
2269
|
-
return r && a &&
|
|
2269
|
+
return r && a && Wt(e, s, a), a;
|
|
2270
2270
|
};
|
|
2271
2271
|
let ve = class {
|
|
2272
2272
|
constructor() {
|
|
@@ -2323,7 +2323,7 @@ R([
|
|
|
2323
2323
|
Z = R([
|
|
2324
2324
|
Ae("MinifiedSymbolModel")
|
|
2325
2325
|
], Z);
|
|
2326
|
-
class
|
|
2326
|
+
class zs {
|
|
2327
2327
|
constructor(e, s) {
|
|
2328
2328
|
this.requestedDate = e, this.executedDate = s;
|
|
2329
2329
|
}
|
|
@@ -2340,12 +2340,12 @@ class qs {
|
|
|
2340
2340
|
return b.mapUnixToDate(this.executedDate, Q.JustHour);
|
|
2341
2341
|
}
|
|
2342
2342
|
}
|
|
2343
|
-
class
|
|
2343
|
+
class Js {
|
|
2344
2344
|
constructor(e, s) {
|
|
2345
2345
|
this.requestedAmount = e, this.executedAmount = s;
|
|
2346
2346
|
}
|
|
2347
2347
|
}
|
|
2348
|
-
class
|
|
2348
|
+
class Gs {
|
|
2349
2349
|
constructor(e, s, r, a, n) {
|
|
2350
2350
|
this.symbolPrice = e, this.USDTPrice = s, this.symobl = r, this.symbolImage = a, this.USDTImage = n;
|
|
2351
2351
|
}
|
|
@@ -2360,110 +2360,111 @@ class Js {
|
|
|
2360
2360
|
});
|
|
2361
2361
|
}
|
|
2362
2362
|
}
|
|
2363
|
-
class
|
|
2363
|
+
class Ws {
|
|
2364
2364
|
constructor(e, s) {
|
|
2365
2365
|
this.soldSymbol = e, this.buySymbol = s;
|
|
2366
2366
|
}
|
|
2367
2367
|
}
|
|
2368
2368
|
export {
|
|
2369
2369
|
je as APIErrorHandlerRegistry,
|
|
2370
|
-
|
|
2370
|
+
Ys as AbstractSubject,
|
|
2371
2371
|
He as AccessControl,
|
|
2372
2372
|
fe as AccessLevel,
|
|
2373
|
-
|
|
2373
|
+
ws as Action,
|
|
2374
2374
|
ve as Amount,
|
|
2375
|
-
|
|
2375
|
+
Ts as ApiBuilder,
|
|
2376
2376
|
ee as ApplicationDrawerStatus,
|
|
2377
|
-
|
|
2377
|
+
$s as ApplicationInitializer,
|
|
2378
2378
|
Re as ApplicationTheme,
|
|
2379
2379
|
qe as AuthorizationDirective,
|
|
2380
2380
|
De as AuthorizationService,
|
|
2381
2381
|
me as BaseModel,
|
|
2382
|
-
|
|
2382
|
+
Ut as BaseTable,
|
|
2383
2383
|
Bt as BehaviorSubject,
|
|
2384
2384
|
Me as CellType,
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2385
|
+
Hs as ClientArraySearch,
|
|
2386
|
+
Gt as ClientSearch,
|
|
2387
|
+
Ss as Column,
|
|
2388
2388
|
we as CommonMaskFormats,
|
|
2389
|
-
|
|
2389
|
+
Vs as CrudService,
|
|
2390
2390
|
G as DateConverter,
|
|
2391
|
-
|
|
2391
|
+
ss as DateDisabledOptions,
|
|
2392
2392
|
Q as DateFormat,
|
|
2393
2393
|
at as DateFormats,
|
|
2394
2394
|
he as DateTools,
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2395
|
+
Ls as DebounceService,
|
|
2396
|
+
k as DialogDimensions,
|
|
2397
|
+
rs as EveryAccess,
|
|
2398
|
+
ns as EveryLevelAuthorizationDirective,
|
|
2399
|
+
Os as Feedback,
|
|
2400
|
+
_s as FetchListResponse,
|
|
2401
|
+
fs as FormManager,
|
|
2402
2402
|
de as FormValidationStatus,
|
|
2403
2403
|
b as Formatter,
|
|
2404
|
-
|
|
2405
|
-
|
|
2404
|
+
xs as HandleError,
|
|
2405
|
+
Es as HandleFeedback,
|
|
2406
2406
|
be as HeaderType,
|
|
2407
2407
|
ks as HttpClient,
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2408
|
+
us as InputControl,
|
|
2409
|
+
hs as InputControlBuilder,
|
|
2410
|
+
jt as InputControlData,
|
|
2411
2411
|
Ye as JsonMapper,
|
|
2412
2412
|
m as LoadingStatus,
|
|
2413
2413
|
Z as MinifiedSymbolModel,
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2414
|
+
Ht as Params,
|
|
2415
|
+
Us as Process,
|
|
2416
|
+
Ns as ProcessManager,
|
|
2417
|
+
ts as RangeValue,
|
|
2418
2418
|
Bs as RouteGuard,
|
|
2419
2419
|
ze as Scheduler,
|
|
2420
|
-
|
|
2420
|
+
gs as SelectableTable,
|
|
2421
2421
|
Pe as SimpleSort,
|
|
2422
|
-
|
|
2423
|
-
|
|
2422
|
+
as as SomeAccess,
|
|
2423
|
+
is as SomeLevelsAuthorizationDirective,
|
|
2424
2424
|
We as SortDetail,
|
|
2425
2425
|
Y as SortOrder,
|
|
2426
2426
|
$t as SortOrderTableHeader,
|
|
2427
|
-
|
|
2427
|
+
ps as Sorter,
|
|
2428
2428
|
Pt as StatusCode,
|
|
2429
2429
|
j as StorageKeys,
|
|
2430
2430
|
Ce as StoreNames,
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2431
|
+
Ws as SymbolInTrade,
|
|
2432
|
+
Gs as SymbolPriceInTrade,
|
|
2433
|
+
Ft as Symbols,
|
|
2434
|
+
bs as SyncDetail,
|
|
2435
|
+
ms as TABLE_ACTION_COLUMN,
|
|
2435
2436
|
Ge as TABLE_COLUMN_DEFAULT_COLSPAN,
|
|
2436
|
-
|
|
2437
|
+
Nt as TABLE_COLUMN_DEFAULT_VALUES,
|
|
2437
2438
|
Je as TABLE_COLUMN_DEFAULT_WIDTH,
|
|
2438
|
-
|
|
2439
|
+
Is as Table,
|
|
2439
2440
|
Ve as TableConstants,
|
|
2440
|
-
|
|
2441
|
+
Ds as TableDestroy,
|
|
2441
2442
|
_e as TableHeaderAlign,
|
|
2442
|
-
|
|
2443
|
+
As as TableRowClick,
|
|
2443
2444
|
Ze as ToastLocation,
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2445
|
+
Ps as ToastMessage,
|
|
2446
|
+
Jt as ToastType,
|
|
2447
|
+
ds as TouchSensitiveControl,
|
|
2448
|
+
Js as TradeAmount,
|
|
2449
|
+
zs as TradeDate,
|
|
2449
2450
|
W as Util,
|
|
2450
|
-
|
|
2451
|
+
qs as VisibilityManager,
|
|
2451
2452
|
Ke as VisibilityState,
|
|
2452
2453
|
st as cards,
|
|
2453
|
-
|
|
2454
|
+
ys as generateHeader,
|
|
2454
2455
|
rt as ibans,
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2456
|
+
Yt as isEmpty,
|
|
2457
|
+
ls as isLastItem,
|
|
2458
|
+
os as isOnlyOneItem,
|
|
2459
|
+
kt as setupJalaliDate,
|
|
2460
|
+
cs as setupStore,
|
|
2461
|
+
Cs as useCrud,
|
|
2462
|
+
Vt as useData,
|
|
2463
|
+
Fs as useDialogService,
|
|
2464
|
+
js as useDrawerService,
|
|
2465
|
+
vs as useForm,
|
|
2466
|
+
zt as useLoadingStatus,
|
|
2467
|
+
qt as useParams,
|
|
2468
|
+
Ms as useRepository,
|
|
2469
|
+
Rs as useStaticTableService
|
|
2469
2470
|
};
|
package/dist/IronCore.umd.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(a,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("dayjs"),require("vue"),require("json2typescript"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","dayjs","vue","json2typescript","pinia"],_):(a=typeof globalThis<"u"?globalThis:a||self,_(a.IronCore={},a.dayjs,a.Vue,a.json2typescript,a.pinia))})(this,function(a,_,g,M,Fe){"use strict";var re=(t=>(t.BankCard="####-####-####-####",t.Iban="##-####-####-####-####-####-##",t))(re||{}),H=(t=>(t.FullDate="jYYYY/jM/jD HH:mm",t.SimpleDate="jYYYY/jM/jD",t.CompactGregorianDate="YYYYMMDD",t.ShortJalaliDate="YYMM",t.JustHour="HH:mm:ss",t))(H||{});const Be=[{62198619:{persian:"بلو",english:"blue"}},{603799:{persian:"بانک ملی ایران",english:"melli"}},{589210:{persian:"بانک سپه",english:"sepah"}},{627648:{persian:"بانک توسعه صادرات",english:"export-development"}},{627961:{persian:"بانک صنعت و معدن",english:"industry-mine"}},{603770:{persian:"بانک کشاورزی",english:"agriculture"}},{628023:{persian:"بانک مسکن",english:"housing"}},{627760:{persian:"پست بانک ایران",english:"post"}},{502908:{persian:"بانک توسعه تعاون",english:"development-cooperation"}},{627412:{persian:"بانک اقتصاد نوین",english:"eghtesad-novin"}},{622106:{persian:"بانک پارسیان",english:"parsian"}},{502229:{persian:"بانک پاسارگاد",english:"pasargad"}},{639599:{persian:"بانک قوامین",english:"ghavamin"}},{627488:{persian:"بانک کارآفرین",english:"karafarin"}},{621986:{persian:"بانک سامان",english:"saman"}},{639346:{persian:"بانک سینا",english:"sina"}},{639607:{persian:"بانک سرمایه",english:"sarmayeh"}},{504706:{persian:"بانک شهر",english:"shahr"}},{502806:{persian:"بانک شهر",english:"shahr"}},{502938:{persian:"بانک دی",english:"day"}},{603769:{persian:"بانک صادرات",english:"saderat"}},{610433:{persian:"بانک ملت",english:"mellat"}},{627353:{persian:"بانک تجارت",english:"tejarat"}},{585983:{persian:"بانک تجارت",english:"tejarat"}},{589463:{persian:"بانک رفاه",english:"refah"}},{627381:{persian:"بانک انصار",english:"ansar"}},{639370:{persian:"بانک مهر اقتصاد",english:"mehr-eqtesad"}},{505801:{persian:"موسسه اعتباری کوثر",english:"kosar"}},{606373:{persian:"بانک قرض الحسنه مهرایرانیان",english:"mehr"}},{186214:{persian:"بانک آینده",english:"ayandeh"}},{504172:{persian:"بانک قرض الحسنه رسالت",english:"resalat"}},{505416:{persian:"بانک گردشگری",english:"tourism"}},{505785:{persian:"بانک ایرانزمین",english:"iran-zamin"}},{505809:{persian:"بانک خاورمیانه",english:"middle-east"}},{585947:{persian:"بانک خاورمیانه",english:"middle-east"}},{604932:{persian:"بانک سپه",english:"sepah"}},{627961:{persian:"بانک صنعت و معدن",english:"industry-mine"}},{636214:{persian:"بانک آینده",english:"ayandeh"}},{636795:{persian:"بانک مرکزی",english:"markazi"}},{636949:{persian:"بانک حکمت ایرانیان",english:"hekmat-iranian"}},{639217:{persian:"بانک کشاورزی",english:"agriculture"}}],Ne=[{"010":{persian:"بانک مرکزی",english:"markazi"}},{"011":{persian:"بانک صنعت و معدن",english:"industry-mine"}},{"012":{persian:"بانک ملت",english:"mellat"}},{"013":{persian:"بانک رفاه",english:"refah"}},{"014":{persian:"بانک مسکن",english:"housing"}},{"015":{persian:"بانک سپه",english:"sepah"}},{"016":{persian:"بانک کشاورزی",english:"agriculture"}},{"017":{persian:"بانک ملّی ایران",english:"melli"}},{"018":{persian:"بانک تجارت",english:"tejarat"}},{"019":{persian:"بانک صادرات",english:"saderat"}},{"020":{persian:"بانک توسعه صادرات",english:"export-development"}},{"021":{persian:"پست بانک",english:"post"}},{"053":{persian:"بانک کارآفرین",english:"karafarin"}},{"054":{persian:"بانک پارسیان",english:"parsian"}},{"055":{persian:"بانک اقتصاد نوین",english:"eghtesad-novin"}},{"056":{persian:"بانک سامان",english:"saman"}},{"057":{persian:"بانک پاسارگاد",english:"pasargad"}},{"058":{persian:"بانک سرمایه",english:"sarmayeh"}},{"059":{persian:"بانک سینا",english:"sina"}},{"060":{persian:"بانک قرض الحسنه مهرایرانیان",english:"mehr"}},{"061":{persian:"بانک شهر",english:"shahr"}},{"062":{persian:"بانک آینده",english:"ayandeh"}},{"065":{persian:"بانک حکمت ایرانیان",english:"hekmat-iranian"}},{"066":{persian:"بانک دی",english:"day"}},{"069":{persian:"بانک ایران زمین",english:"iran-zamin"}},{"070":{persian:"بانک قرض الحسنه رسالت",english:"resalat"}},{"078":{persian:"بانک خاورمیانه",english:"middle-east"}}];var Ye=(t=>(t.Normal="YYYY-MM-DD",t.ContainsHour="YYYY-MM-DD HH:mm",t.OnlyHour="HH:mm",t))(Ye||{});function ae(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ie={exports:{}},lt=ie.exports,Ue;function ct(){return Ue||(Ue=1,function(t,e){(function(s,r){t.exports=r()})(lt,function(){return function(s,r){r.prototype.weekday=function(i){var n=this.$locale().weekStart||0,o=this.$W,d=(o<n?o+7:o)-n;return this.$utils().u(i)?d:this.subtract(d,"day").add(i,"day")}}})}(ie)),ie.exports}var ut=ct();const ht=ae(ut);var ne={exports:{}},dt=ne.exports,Ve;function ft(){return Ve||(Ve=1,function(t,e){(function(s,r){t.exports=r()})(dt,function(){var s="week",r="year";return function(i,n,o){var d=n.prototype;d.week=function(u){if(u===void 0&&(u=null),u!==null)return this.add(7*(u-this.week()),"day");var y=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var m=o(this).startOf(r).add(1,r).date(y),h=o(this).endOf(s);if(m.isBefore(h))return 1}var v=o(this).startOf(r).date(y).startOf(s).subtract(1,"millisecond"),S=this.diff(v,s,!0);return S<0?o(this).startOf("week").week():Math.ceil(S)},d.weeks=function(u){return u===void 0&&(u=null),this.week(u)}}})}(ne)),ne.exports}var mt=ft();const vt=ae(mt);var oe={exports:{}},gt=oe.exports,je;function pt(){return je||(je=1,function(t,e){(function(s,r){t.exports=r()})(gt,function(){return function(s,r){r.prototype.weekYear=function(){var i=this.month(),n=this.week(),o=this.year();return n===1&&i===11?o+1:i===0&&n>=52?o-1:o}}})}(oe)),oe.exports}var yt=pt();const St=ae(yt);var le={exports:{}},It=le.exports,He;function wt(){return He||(He=1,function(t,e){(function(s,r){t.exports=r(_)})(It,function(s){function r(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var i=r(s),n={name:"fa",weekdays:"یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"),weekdaysShort:"یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekStart:6,months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),ordinal:function(o){return o},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"}};return i.default.locale(n,null,!0),n})}(le)),le.exports}var Dt=wt();const At=ae(Dt);function ce(t,e){return bt(t)||_t(t,e)||Mt()}function bt(t){if(Array.isArray(t))return t}function _t(t,e){var s=[],r=!0,i=!1,n=void 0;try{for(var o=t[Symbol.iterator](),d;!(r=(d=o.next()).done)&&(s.push(d.value),!(e&&s.length===e));r=!0);}catch(u){i=!0,n=u}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw n}}return s}function Mt(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function qe(t,e,s){e<=2&&(t-=1,e+=12);var r=Math.floor(t/100),i=2-r+Math.floor(r/4),n=Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+s+i-1524.5;return n}function Ct(t){t=t+.5;var e=Math.floor(t),s=t-e,r=e;if(e>=2299161){var i=Math.floor((e-186721625e-2)/36524.25);r=e+1+i-Math.floor(i/4)}var n=r+1524,o=Math.floor((n-122.1)/365.25),d=Math.floor(365.25*o),u=Math.floor((n-d)/30.6001),y=n-d-Math.floor(30.6001*u)+s,m=u<14?u-1:u-13,h=m>2?o-4716:o-4715;return Tt(h,m,y)}function Lt(t){t=t+.5;var e=Math.floor(t),s=t-e,r=e;if(e>=2299161){var i=Math.floor((e-186721625e-2)/36524.25);r=e+1+i-Math.floor(i/4)}var n=r+1524,o=Math.floor((n-122.1)/365.25),d=Math.floor(365.25*o),u=Math.floor((n-d)/30.6001),y=n-d-Math.floor(30.6001*u)+s,m=u<14?u-1:u-13,h=m>2?o-4716:o-4715;return[Math.floor(h),Math.floor(m),Math.floor(y)]}function Rt(t,e,s){var r=[31,28,31,30,31,30,31,31,30,31,30,31],i=[31,31,31,31,31,31,30,30,30,30,30,29];function n(S,A){return Math.floor(S/A)}t-=979;for(var o=365*t+n(t,33)*8+n(t%33+3,4),d=0;d<e-1;++d)o+=i[d];o+=s-1;var u=o+79,y=1600+400*n(u,146097);u=u%146097;var m=!0;for(u>=36525&&(u--,y+=100*n(u,36524),u=u%36524,u>=365?u++:m=!1),y+=4*n(u,1461),u%=1461,u>=366&&(m=!1,u--,y+=n(u,365),u=u%365),d=0;u>=r[d]+(d==1&&m);d++)u-=r[d]+(d==1&&m);var h=d+1,v=u+1;return qe(y,h,v)}function Tt(t,e,s){var r=[31,28,31,30,31,30,31,31,30,31,30,31],i=[31,31,31,31,31,31,30,30,30,30,30,29];function n(W,x){return Math.floor(W/x)}for(var o=t-1600,d=e-1,u=s-1,y=365*o+n(o+3,4)-n(o+99,100)+n(o+399,400),m=0;m<d;++m)y+=r[m];d>1&&(t%4==0&&t%100!=0||t%400==0)&&y++,y+=u;var h=y-79,v=n(h,12053);h%=12053;var S=979+33*v+4*n(h,1461);h%=1461,h>=366&&(S+=n(h-1,365),h=(h-1)%365);for(var A=0;A<11&&h>=i[A];++A)h-=i[A];var J=A+1,G=h+1;return[S,J,G]}var ue={J:function(e,s,r){return Ct(qe(e,s,r))},G:function(e,s,r){return Lt(Rt(e,s,r))}},Et=/^(\d{4})[-/]?(\d{1,2})[-/]?(\d{0,2})(.*)?$/,Ot=/\[.*?\]|jY{2,4}|jM{1,4}|jD{1,2}|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,Ie="date",q="day",P="month",$="year",ze="week",kt="YYYY-MM-DDTHH:mm:ssZ",Pt={jmonths:"فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_")},$t=function(t,e,s){var r=e.prototype,i=r.$utils(),n=function(c){return c.$C==="jalali"},o=i.prettyUnit||i.p,d=i.isUndefined||i.u,u=i.padStart||i.s,y=i.monthDiff||i.m,m=i.absFloor||i.a,h=function(c){return function(){var f=c.bind(this).apply(void 0,arguments);return f.$C=this.$C,f.isJalali()&&f.InitJalali(),f}};r.startOf=h(r.startOf),r.endOf=h(r.endOf),r.add=h(r.add),r.subtract=h(r.subtract),r.set=h(r.set);var v=r.parse,S=r.init,A=r.startOf,J=r.$set,G=r.add,W=r.format,x=r.diff,ke=r.year,Pe=r.month,ge=r.date,$e=r.daysInMonth,te=r.toArray;s.$C="gregory",s.$fdow=6,s.calendar=function(l){return s.$C=l,s},r.calendar=function(l){var c=this.clone();return c.$C=l,c.isJalali()&&c.InitJalali(),c},r.isJalali=function(){return n(this)},s.en.jmonths="Farvardin_Ordibehesht_Khordaad_Tir_Mordaad_Shahrivar_Mehr_Aabaan_Aazar_Dey_Bahman_Esfand".split("_"),s.locale("fa",Object.assign({},At,{},Pt),!0);var K=function(c,f){return s(c,{locale:f.$L,utc:f.$u,calendar:f.$C})};r.init=function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};S.bind(this)(l),this.isJalali()&&this.InitJalali()},r.parse=function(l){var c;if(this.$C=l.calendar||this.$C||s.$C,l.jalali&&typeof l.date=="string"&&/.*[^Z]$/i.test(l.date)&&(c=l.date.match(Et))){var f=ue.G(parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3]||1,10)),w=ce(f,3),D=w[0],I=w[1],b=w[2];l.date="".concat(D,"-").concat(I,"-").concat(b).concat(c[4]||"")}return v.bind(this)(l)},r.InitJalali=function(){var l=ue.J(this.$y,this.$M+1,this.$D),c=ce(l,3),f=c[0],w=c[1],D=c[2];this.$jy=f,this.$jM=w-1,this.$jD=D},r.startOf=function(l,c){var f=this;if(!n(this))return A.bind(this)(l,c);var w=d(c)?!0:c,D=o(l),I=function(Z,V){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.$jy,ye=ue.G(T,V+1,Z),j=ce(ye,3),se=j[0],Se=j[1],Ps=j[2],ot=K(new Date(se,Se-1,Ps),f);return(w?ot:ot.endOf(q)).$set("hour",1)},b=(this.$W+(7-s.$fdow))%7;switch(D){case $:return w?I(1,0):I(0,0,this.$jy+1);case P:return w?I(1,this.$jM):I(0,(this.$jM+1)%12,this.$jy+parseInt((this.$jM+1)/12,10));case ze:return w?I(this.$jD-b,this.$jM):I(this.$jD+(6-b),this.$jM);default:return A.bind(this)(l,c)}},r.$set=function(l,c){var f=this;if(!n(this))return J.bind(this)(l,c);var w=o(l),D=function(b,pe){var Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.$jy,V=ue.G(Z,pe+1,b),T=ce(V,3),ye=T[0],j=T[1],se=T[2];return f.$d.setFullYear(ye),f.$d.setMonth(j-1),f.$d.setDate(se),f};switch(w){case Ie:case q:D(c,this.$jM);break;case P:D(this.$jD,c);break;case $:D(this.$jD,this.$jM,c);break;default:return J.bind(this)(l,c)}return this.init(),this},r.add=function(l,c){var f=this;if(!n(this))return G.bind(this)(l,c);l=Number(l);var w=c&&(c.length===1||c==="ms")?c:o(c),D=function(j,se){var Se=f.set(Ie,1).set(j,se+l);return Se.set(Ie,Math.min(f.$jD,Se.daysInMonth()))};if(["M",P].indexOf(w)>-1){var I=this.$jM+l,b=I<0?-Math.ceil(-I/12):Math.floor(I/12),pe=this.$jD,Z=this.set(q,1).add(b,$).set(P,I-b*12);return Z.set(q,Math.min(Z.daysInMonth(),pe))}if(["y",$].indexOf(w)>-1)return D($,this.$jy);if(["d",q].indexOf(w)>-1){var V=new Date(this.$d);return V.setDate(V.getDate()+l),K(V,this)}if(["w",ze].indexOf(w)>-1){var T=new Date(this.$d);return T.setDate(T.getDate()+l*7),K(T,this)}return G.bind(this)(l,c)},r.format=function(l,c){var f=this;if(!n(this))return W.bind(this)(l,c);var w=l||kt,D=c||this.$locale(),I=D.jmonths;return w.replace(Ot,function(b){if(b.indexOf("[")>-1)return b.replace(/\[|\]/g,"");switch(b){case"YY":return String(f.$jy).slice(-2);case"YYYY":return String(f.$jy);case"M":return String(f.$jM+1);case"MM":return u(f.$jM+1,2,"0");case"MMM":return I[f.$jM].slice(0,3);case"MMMM":return I[f.$jM];case"D":return String(f.$jD);case"DD":return u(f.$jD,2,"0");default:return W.bind(f)(b,c)}})},r.diff=function(l,c,f){if(!n(this))return x.bind(this)(l,c,f);var w=o(c),D=s(l),I=y(this,D);switch(w){case $:I/=12;break;case P:break;default:return x.bind(this)(l,c,f)}return f?I:m(I)},r.$g=function(l,c,f){return d(l)?this[c]:this.set(f,l)},r.year=function(l){return n(this)?this.$g(l,"$jy",$):ke.bind(this)(l)},r.month=function(l){return n(this)?this.$g(l,"$jM",P):Pe.bind(this)(l)},r.date=function(l){return n(this)?this.$g(l,"$jD",q):ge.bind(this)(l)},r.daysInMonth=function(){return n(this)?this.endOf(P).$jD:$e.bind(this)()},te&&(r.toArray=function(){return n(this)?[this.$jy,this.$jM,this.$jD,this.$H,this.$m,this.$s,this.$ms]:te.bind(this)()}),r.clone=function(){return K(this.toDate(),this)}};const Ft={ordinal(t){},relativeTime:void 0,name:"fa",weekdays:"یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"),weekdaysShort:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),months:"فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_"),monthsShort:"فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_"),weekStart:6,formats:{L:"YYYY/MM/DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"}};function Je(){_.extend($t),_.calendar("jalali"),_.extend(ht),_.extend(vt),_.extend(St),_.locale(Ft,{},!0)}class Bt{constructor(e,s){this.start=e,this.end=s}}class Nt{constructor(e,s,r){this.maxDate=e,this.minDate=s,this.disabledDates=r}}class F{static standardToUnix(e){return Math.floor(new Date(e).getTime()/1e3)}static unixToStandard(e){return new Date(e*1e3).toString()}static getUnixEndOfDayInUnix(e){return _.unix(e).endOf("day").unix()}}class X{static isDateDisabled(e,s){for(const r of e.disabledDates)if(X.areUnixesInSameDate(r,s.unix()))return!0;return!!(e.maxDate&&X.isDateGraterOrSame(e.maxDate,s.unix())||e.minDate&&X.isDateLowerOrSame(e.minDate,s.unix()))}static areUnixesInSameDate(e,s){return F.getUnixEndOfDayInUnix(e)===F.getUnixEndOfDayInUnix(s)}static isDateGraterOrSame(e,s){return F.getUnixEndOfDayInUnix(s)>=F.getUnixEndOfDayInUnix(e)}static isDateLowerOrSame(e,s){return F.getUnixEndOfDayInUnix(s)<=F.getUnixEndOfDayInUnix(e)}}Je();class C{static toCurrency(e,s){return e.toLocaleString("en-US",s)}static toCurrencyWithDotSeparator(e){return C.toCurrency(e).replaceAll(",",".")}static applyMask(e,s){let r="",i=0,n=0;for(;i<e.length;){if(e[i]==="#"){if(n>=s.length)throw new Error("Value length does not match the format.");r+=s[n],n++}else r+=e[i];i++}if(n!==s.length)throw new Error("Value length does not match the format.");return r}static applyBankCardMask(e){return C.applyMask(re.BankCard,String(e))}static applyIbanMask(e){return C.applyMask(re.Iban,String(e))}static toEnglishDigits(e){const s=["۱","۲","۳","۴","۵","۶","۷","۸","۹","۰"],r=["١","٢","٣","٤","٥","٦","٧","٨","٩","٠"],i=["1","2","3","4","5","6","7","8","9","0"];return e.split("").map(n=>i[s.indexOf(n)]||i[r.indexOf(n)]||n).join("")}static mapUnixToDate(e,s){return _(new Date(e)).subtract(1,"day").format(s)}}var p=(t=>(t.FetchList="fetchList",t.AutoRefresh="autoRefresh",t.FetchItem="fetchItem",t.FetchLastItems="fetchLastItems",t.FetchPreviousItems="fetchPreviousItems",t.Create="CREATE",t.Update="UPDATE",t.Delete="DELETE",t.Search="SEARCH",t.Sort="SORT",t.Success="SUCCESS",t.Error="ERROR",t.Idle="IDLE",t))(p||{}),E=(t=>(t.Width="width",t.Height="height",t[t.DefaultWidth=500]="DefaultWidth",t[t.DefaultHeight=350]="DefaultHeight",t[t.MinimalAvailableSize=0]="MinimalAvailableSize",t))(E||{}),O=(t=>(t.ASC="ASC",t.DESC="DESC",t))(O||{}),Ge=(t=>(t.ASC="ascend",t.DESC="descend",t))(Ge||{}),he=(t=>(t.Left="left",t.Right="right",t.Center="center",t))(he||{}),de=(t=>(t.Text="text",t))(de||{}),fe=(t=>(t.Text="text",t.ACTION="action",t.Tag="tag",t.Iban="iban",t.BankCard="bankCard",t.Symbol="symbol",t.TradeDetail="tradeDetail",t.SymbolPrice="symbolPrice",t.TradeSymbol="tradeSymbol",t.Price="price",t.DynamicCurrencyPrice="dynamicCurrencyPrice",t.TradeDate="tradeDate",t.RequestResponseIdentity="requestResponseIdentity",t.Image="image",t))(fe||{}),we=(t=>(t[t.MINIMAL_LOADABLE_HEADER_COUNT=0]="MINIMAL_LOADABLE_HEADER_COUNT",t[t.DEFAULT_ITEM_COUNT_PER_PAGE=20]="DEFAULT_ITEM_COUNT_PER_PAGE",t.PAGINATION_POSITION="bottomCenter",t))(we||{});a.ApplicationTheme=(t=>(t.FontFamily="IRANSansX",t))(a.ApplicationTheme||{});var z=(t=>(t.Open="open",t.Close="close",t))(z||{}),We=(t=>(t[t.NotFound=404]="NotFound",t[t.Unauthorized=401]="Unauthorized",t[t.ServerError=500]="ServerError",t))(We||{}),Q=(t=>(t[t.Invalid=0]="Invalid",t[t.Valid=1]="Valid",t))(Q||{}),k=(t=>(t.Theme="theme",t.AccessList="accessList",t.Token="token",t.SSO_ACCESS_LIST="ssoAccessList",t))(k||{});a.ApplicationTheme=(t=>(t.Light="light",t.Dark="dark",t))(a.ApplicationTheme||{});var me=(t=>(t.Dialog="dialog",t.Drawer="drawer",t.Module="module",t.Toast="toast",t))(me||{});class B{static getBankImageBaseOnCardInfo(e,s){return e===void 0?"/img/banks/shetab.png":s==="IBAN"?(e=C.toEnglishDigits(e.replace(/IR/g,"").split(" ").join("")),`/img/banks/${B.iban(e).english}.png`):(e=C.toEnglishDigits(e.replace(/ /g,"")),`/img/banks/${B.card(e).english}.png`)}static card(e){const s={persian:"نامشخص",english:"shetab"};if(e==null)return s;e=e.substring(0,6);try{const r=Be.find(i=>Object.keys(i)[0]===e);return r===void 0?s:Object.values(r)[0]}catch{return s}}static iban(e){const s={persian:"نامشخص",english:"shetab"};if(e==null)return s;e=e.substring(2,5);try{const r=Ne.find(i=>Object.keys(i)[0]===e);return r===void 0?s:Object.values(r)[0]}catch{return s}}static async copyValueToClipboard(e){await navigator.clipboard.writeText(String(e))}static downloadBlob(e,s=B.extractFileNameFromHeader(e)){const r=document.createElement("a");r.href=URL.createObjectURL(e.data),r.download=s,r.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!0})),r.remove()}static extractFileNameFromHeader(e){var r,i,n,o;return((o=(r=e.headers["content-disposition"])==null?void 0:r.split("filename=")[1])==null?void 0:o.slice(1,((n=(i=e.headers["content-disposition"])==null?void 0:i.split("filename="))==null?void 0:n[1].length)-1))||"Saraf-File"}static removeSpacesFromString(e){return e&&typeof e.normalize=="function"&&(e=e.normalize("NFC")),e.replace(/[\s\u00A0\u1680\u180E\u2000-\u200A\u200B-\u200D\u2060\uFEFF\u2028\u2029\u202F\u205F\u3000]+/g,"")}static isArraySorted(e,s=i=>i,r=O.ASC){return e.every((i,n)=>e.length-1===n?!0:r===O.ASC?s(i)<=s(e[n+1]):s(i)>=s(e[n+1]))}}const N=class N{constructor(){this.availableAccesses=new Set}setAvailableAccesses(e){this.setAccessListToStorage(e);for(const s of e)this.availableAccesses.add(s)}setAccessListToStorage(e){localStorage.setItem(k.AccessList,JSON.stringify(e))}everyAccess(e){return e.every(s=>this.availableAccesses.has(s))}someAccess(e){return e.some(s=>this.availableAccesses.has(s))}clearAvailableAccesses(){this.availableAccesses.clear(),localStorage.removeItem(k.AccessList)}initialize(){const e=localStorage.getItem(k.AccessList);e!==null&&this.setAvailableAccesses(JSON.parse(e))}static GetInstance(){return N.Instance||(N.Instance=new N),N.Instance}};N.Instance=null;let ee=N;class De{constructor(){this.mounted=(e,s)=>{this.checkAccess(e,s.value)},this.updated=(e,s)=>{this.checkAccess(e,s.value)},this.checkAccess=(e,s)=>{this.hasAccess(s)||e.remove()},this.accessService=ee.GetInstance()}}class Yt extends De{hasAccess(e){return this.accessService.everyAccess(e)}}class Ut extends De{hasAccess(e){return this.accessService.someAccess(e)}}const Y=class Y{constructor(){this._accessLevels=new Map}initialize(){this.setAccessLevelFromStorage()}setAccessLevels(e){for(const s in e)this._accessLevels.set(s,new Set(e[s]));this.setAccessLevelsToStorage(e)}setAccessLevelsToStorage(e){localStorage.setItem(k.SSO_ACCESS_LIST,JSON.stringify(e))}getAccessLevelsFromStorage(){let e=localStorage.getItem(k.SSO_ACCESS_LIST);return e!==null?JSON.parse(e):e}getAccessLevelsOfScope(e){if(this._accessLevels.has(e))return this._accessLevels.get(e);throw new Error(`The scope is not exists ${e}`)}setAccessLevelFromStorage(){const e=this.getAccessLevelsFromStorage();e&&this.setAccessLevels(e)}everyAccess(e,s){const r=this.getAccessLevelsOfScope(e);return r?s.every(i=>r.has(i)):!1}someAccess(e,s){const r=this.getAccessLevelsOfScope(e);return r?s.some(i=>r.has(i)):!1}hasScope(e){return this._accessLevels.has(e)}clear(){localStorage.removeItem(k.SSO_ACCESS_LIST),this._accessLevels=new Map}static GetInstance(){return Y._instance||(Y._instance=new Y),Y._instance}};Y._instance=null;let ve=Y;class Ae{constructor(){this._authorizationService=ve.GetInstance(),this.mounted=this.mounted.bind(this),this.updated=this.updated.bind(this),this.hasAccess=this.hasAccess.bind(this),this.manageElement=this.manageElement.bind(this)}mounted(e,s,r){this.manageElement(e,s.arg,s.modifiers)}updated(e,s,r){this.manageElement(e,s.arg,s.modifiers)}manageElement(e,s,r){if(!this._authorizationService.hasScope(s)){e.remove();return}const i=this.getAccessLevels(s,r);this.hasAccess(s,i)||e.remove()}getAccessLevels(e,s){var i;let r=Object.keys(s);return r.length||(r=Array.from(((i=this._authorizationService.getAccessLevelsOfScope(e))==null?void 0:i.values())??[])),r}}class Vt extends Ae{hasAccess(e,s){return this._authorizationService.everyAccess(e,s)}}class jt extends Ae{hasAccess(e,s){return this._authorizationService.someAccess(e,s)}}class xe{constructor(){this.value=null,this.initialValue=null,this.name="",this.isValid=!1,this.isBlurSensitive=!1,this.isRequired=!1,this.isIncludeInRequestBody=!0,this.isChangeSensitive=!1,this.notValidMessage="",this.isEmptySensitive=!0}}function Ht(t){return t===1}function qt(t,e){return t-1===e}function Ke(t){return String(t).length===0||t===null||t===void 0}function zt(t){t()}class Jt{constructor(e,s){this.initialData=null,this.data=new xe,this._validators=[],this._id=Math.random(),this.data.value=s,this.data.name=e,this.shouldRunValidation()&&this.runValidation(!0)}shouldRunValidation(){return this.data.isRequired?!0:!Ke(this.data.value)}runValidation(e=!1){for(const s of this._validators){const r=s.validate(this.data.value);if(r){this.setFormToInvalidState(e,r);return}}this.setFormToValidState()}setFormToInvalidState(e,s){this.data.isValid=!1,(this.data.isChangeSensitive||e)&&this.setNotValidMessage(s)}setFormToValidState(){this.data.isValid=!0,this.setNotValidMessage("")}reset(){this.initialData?this.data=structuredClone(g.toRaw(this.initialData)):console.warn("The "+this.data.name+`input control has no initial data,
|
|
2
|
-
the initial data will be available after calling the [markAsInitial] method on this instance`)}markAsInitial(){this.initialData=structuredClone(g.toRaw(this.data))}setValidators(e){this._validators=e}getChangeSensitive(){return this.data.isChangeSensitive}setChangeSensitive(e){this.data.isChangeSensitive=e}getIsBlurSensitive(){return this.data.isBlurSensitive}setIsBlurSensitive(e){this.data.isBlurSensitive=e}getIsRequired(){return this.data.isRequired}setIsRequired(e){this.data.isRequired=e}getIsValid(){return this.data.isValid}setIsValid(e){this.data.isValid=e}getIsIncludeInRequestBody(){return this.data.isIncludeInRequestBody}setIsIncludeInRequestBody(e){this.data.isIncludeInRequestBody=e}getNotValidMessage(){return this.data.notValidMessage}setNotValidMessage(e){this.data.notValidMessage=e}getName(){return this.data.name}setName(e){this.data.name=e}setId(e){this._id=e}getId(){return this._id}getIsEmptySensitive(){return this.data.isEmptySensitive}setIsEmptySensitive(e){this.data.isEmptySensitive=e}set value(e){this.data.value=e,this.shouldRunValidation()&&this.runValidation()}get value(){return this.data.value}}class Gt{constructor(e){this._inputControl=e}setValidators(e){return this._inputControl.setValidators(e),this}setChangeSensitive(){return this._inputControl.setChangeSensitive(!0),this}setRequired(){return this._inputControl.setIsRequired(!0),this}setValid(){return this._inputControl.setIsValid(!0),this}setBlurSensitive(){return this._inputControl.setIsBlurSensitive(!0),this}setId(e){return this._inputControl.setId(e),this}removeEmptySensitive(){return this._inputControl.setIsEmptySensitive(!1),this}build(){return this._inputControl}}class Wt{constructor(){this.mounted=(e,s)=>{s.value&&s.value.getIsBlurSensitive()&&(e.addEventListener("click",this.handleFocus.bind(this,s.value)),e.addEventListener("blur",this.handleBlur.bind(this,s.value),!0))},this.beforeUnMount=(e,s)=>{e.removeEventListener("blur",this.handleBlur.bind(this,s.value)),e.removeEventListener("click",this.handleFocus.bind(this,s.value))}}handleBlur(e){e.runValidation(!0)}handleFocus(e){e.value||e.getIsEmptySensitive()||e.setNotValidMessage("")}}class xt{constructor(){this._inputControls=new Map,this._isValid=!1,this._id=Math.random()}getInputControlsAsArray(){return Array.from(this._inputControls.values())}runValidation(){for(const e of this.getInputControlsAsArray())if(!e.getIsValid()){this._isValid=!1;return}this._isValid=!0}addInputControls(e){for(const s of e)this._inputControls.set(s.getName(),s)}getInputControl(e){const s=this._inputControls.get(e);if(!s)throw new Error(`The provided input name (${e}}) has no controls.`);return s}resetControls(e){for(const s of e){const r=this._inputControls.get(s);r?r.reset():console.warn(`Provided input name ${s} has no controllers in this form`)}}resetAll(){for(const e of this.getInputControlsAsArray())e.reset()}createRequestBody(){const e={};for(const s of this.getInputControlsAsArray())s.getIsIncludeInRequestBody()&&(e[s.getName()]=s.value);return e}setIsValid(e){this._isValid=e}getIsValid(){return this._isValid}setId(e){this._id=e}getId(){return this._id}}function Kt(t){const e=g.reactive(t),s=g.ref(Q.Invalid);return g.watch(()=>e.getInputControlsAsArray(),()=>{e.runValidation(),e.getIsValid()?s.value=Q.Valid:s.value=Q.Invalid},{immediate:!0,deep:!0}),{reactiveForm:e,validationStatus:s}}class be{constructor(e){this.timerId=null,this.setupInterval=this.setupInterval.bind(this),this.schedule=e}setupInterval(e){const s=this;this.timerId=setTimeout(async function r(){await s.schedule.runAction(),s.timerId=setTimeout(()=>{r()},e)},e)}clearInterval(){this.timerId&&clearInterval(this.timerId)}}const _e="150px",Me=2,Zt={path:"id",key:"id",title:"عملیات",colspan:Me,width:_e,cellType:fe.ACTION,align:he.Center,headerType:de.Text,accessLevel:null},Ze={width:_e,align:he.Center,headerType:de.Text,cellType:fe.Text,colspan:Me};class Ce{constructor(e,s){this.key=e,this.order=s}}class Le{aSort(e,s){return e.sort((r,i)=>{const n=r[s]??r,o=i[s]??i;if(typeof n=="string"&&typeof o=="string")return n.localeCompare(o);if(typeof n=="number"&&typeof o=="number")return n-o;throw new Error("Not supported data type")})}bSort(e,s){return e.sort((r,i)=>{const n=r[s]??r,o=i[s]??i;if(typeof n=="string"&&typeof o=="string")return o.localeCompare(n);if(typeof n=="number"&&typeof o=="number")return o-n;throw new Error("Not supported data type")})}}class Xt{arrayOfObjectSort(e,s,r,i=new Le){return r===O.ASC?i.aSort(e,s):i.bSort(e,s)}arraySort(e,s,r=new Le){return s===O.ASC?r.aSort(e):r.bSort(e)}}class Xe{constructor(e){this.currentPage=1,this.currentPageSize=20,this.currentSortDetail=new Ce("id",O.DESC),this.loadedRows=[],this.headerSchema=[],this.service=e,this.accessService=ee.GetInstance()}addHeader(e){this.headerSchema.push(e)}async load(){this.headerSchema=this.filterItemsBaseOnAccessLevel(await this.loadHeader()),await this.loadRows()}filterItemsBaseOnAccessLevel(e){return e.filter(s=>s.hasAccess?s.hasAccess():!0)}async sort(e){this.shouldSendSortRequest(e)&&(this.currentSortDetail=e,this.loadedRows=(await this.handleSort(this.currentSortDetail)).items)}shouldSendSortRequest(e){return e.key!==this.currentSortDetail.key||e.order!==this.currentSortDetail.order}async paginate(e,s){this.shouldSendPaginationRequest(e,s)&&(this.currentPage=e,this.currentPageSize=s,this.loadedRows=(await this.handlePagination(this.currentPage,this.currentPageSize)).items)}shouldSendPaginationRequest(e,s){return this.currentPage!==e||this.currentPageSize!==s}async loadRows(){return this.loadedRows=(await this.service.fetchRows()).items,this.loadedRows}getData(){return this.service.getData()}async handleSort(e){return await this.service.sort(e)}async handlePagination(e,s){return await this.service.paginate(e,s)}getItemCountPerPage(){return we.DEFAULT_ITEM_COUNT_PER_PAGE}isLoading(){const e=this.getLoadingStatuses();return e.has(p.Search)||e.has(p.FetchList)||e.has(p.Sort)||e.has(p.FetchLastItems)||e.has(p.FetchPreviousItems)}getLoadingStatuses(){return this.getData().loadingStatus}hasAnyAction(){for(const e of this.loadedRows)if(this.getAccessedActions(e).length)return!0;return!1}getAccessedActions(e){return this.filterItemsBaseOnAccessLevel(this.getActions(e))}getActions(e){return[]}getScrollDetail(){return null}isExpandable(){return!1}async handleClick(e){}async handleMetaClick(e){}async handleDoubleClick(e){}async onDestroy(){}async loadHeader(){throw new Error("No header provided for the table.")}loadSummarySchema(){return{summaryTitle:"",summaryItems:[]}}}class Qe{constructor(e){this.observers=[],this.next(e)}attach(e){this.observers.push(e)}detach(e){this.observers=this.observers.filter(s=>s!==e)}notify(){for(const e of this.observers)typeof e=="function"?e(this._value):e.update(this._value)}next(e){typeof e=="function"?this._value=e(this._value):this._value=e,this.notify()}getValue(){return this._value}}class Qt extends Xe{constructor(e){super(e),this.selectedRows=new Qe(new Map),this.rowSelect=this.rowSelect.bind(this),this.selectAll=this.selectAll.bind(this),this.isEveryRowSelected=this.isEveryRowSelected.bind(this),this.handlePagination=this.handlePagination.bind(this),this.clearAllSelectedItems=this.clearAllSelectedItems.bind(this),this.getSelectedRows=this.getSelectedRows.bind(this),this.getSelectedRowsAsArray=this.getSelectedRowsAsArray.bind(this),this.getSelectedRowIds=this.getSelectedRowIds.bind(this)}rowSelect(e){this.getSelectedRowsValue().has(e.id)?(this.getSelectedRowsValue().delete(e.id),this.selectedRows.next(this.selectedRows.getValue())):(this.selectedRows.getValue().set(e.id,e),this.selectedRows.next(this.selectedRows.getValue()))}selectAll(){if(this.isEveryRowSelected())this.clearAllSelectedItems();else for(const e of this.loadedRows)this.selectedRows.getValue().set(e.id,e),this.selectedRows.next(this.selectedRows.getValue())}isEveryRowSelected(){return this.getSelectedRowsValue().size===this.currentPageSize||this.loadedRows.length===this.getSelectedRowsValue().size}async handlePagination(e,s){return this.clearAllSelectedItems(),await super.handlePagination(e,s)}async handleSort(e){return this.clearAllSelectedItems(),await super.handleSort(e)}clearAllSelectedItems(){this.selectedRows.getValue().clear(),this.selectedRows.next(this.selectedRows.getValue())}getSelectedRows(){return this.selectedRows}getSelectedRowsAsArray(){return Array.from(this.selectedRows.getValue().values())}getSelectedRowIds(){return Array.from(this.selectedRows.getValue().keys())}getSelectedRowsValue(){return this.selectedRows.getValue()}}function es(t){return{...Ze,...t}}function ts(t){return function(s,r){s.constructor.prototype.headers||(s.constructor.prototype.headers=[]),s.constructor.prototype.headers.push({path:r,...t})}}function ss(t){return function(s){async function r(){return s.prototype._table=this,s.prototype.headers}function i(d){const u=[],y=s.prototype.actions||[];for(const m of y){if(!m.isAvailable(d))continue;const h={handler:m.handler.bind(d),accessLevel:m.accessLevel,actionName:m.actionName};u.push(h)}return u}async function n(d){s.prototype.rowClick&&await s.prototype.rowClick.call(d)}async function o(){s.prototype.tableDestroy&&await s.prototype.tableDestroy()}t.prototype.loadHeader=r,t.prototype.getActions=i,t.prototype.handleClick=n,t.prototype.onDestroy=o}}function rs(t){return function(s,r,i){s.constructor.prototype.actions||(s.constructor.prototype.actions=[]),t.handler=i.value,s.constructor.prototype.actions.push(t)}}function as(){return function(e,s,r){e.constructor.prototype.tableDestroy=r.value}}function is(){return function(e,s,r){e.constructor.prototype.rowClick=r.value}}function et(){const t=g.ref(new Map),e=g.ref(0),s=g.ref(null),r=g.computed(()=>Array.from(t.value.values()));function i(v){e.value=v}function n(v){for(const S of v)o(S)}function o(v){t.value.set(v.id,v)}function d(v){return s.value=t.value.get(v)||null,s.value}function u(v){const S=d(v);return S&&t.value.delete(v),!!S}function y(){t.value.clear()}function m(v){s.value=v}function h(){s.value=null}return{itemsAsArray:r,totalCount:e,currentItem:s,setTotalCount:i,addOrReplaceItems:n,getById:d,removeById:u,clearItems:y,setCurrentItem:m,clearCurrentItem:h}}class tt{constructor(){this.pageNumber=1,this.itemCount=20,this.sortDetail=new Ce("id",O.DESC),this.filters=[]}}class ns{constructor(e,s){this.items=e,this.totalItems=s}}class os{constructor(e,s){this.shouldKeepSync=e,this.intervalInMillisecond=s}}const st=new tt;function rt(){const t=g.ref(structuredClone(st));function e(){t.value.pageNumber=t.value.pageNumber+1}function s(){t.value.pageNumber=t.value.pageNumber-1}function r(h){t.value.pageNumber=h}function i(h){t.value.itemCount=h}function n(h){t.value.sortDetail.key=h.key,t.value.sortDetail.order=h.order}function o(h){for(const v in h)d(v,h[v])}function d(h,v){const S=t.value.filters.findIndex(A=>A.key===h);S>-1?t.value.filters[S].value=v:t.value.filters.push({key:h,value:v})}function u(h){let v=t.value.filters;v=v.filter(S=>S.key!==h),t.value.filters=v}function y(){const h={page:t.value.pageNumber,count:t.value.itemCount};t.value.sortDetail&&(h.by=t.value.sortDetail.key,h.order=t.value.sortDetail.order);for(const v of t.value.filters)if(v.value)if(typeof v.value=="string"||typeof v.value=="number")h[v.key]=v.value;else{const S=JSON.stringify(v.value);S!=="[]"&&S!=="{}"&&(h[v.key]=S)}return h}function m(){t.value=structuredClone(st)}return{params:t,setNextPage:e,setPreventPage:s,setPageNumber:r,setItemCount:i,setSortDetail:n,setFilter:d,removeFilter:u,getRequestParams:y,clearParam:m,setFiltersBaseOnRequestBody:o}}function at(){const t=g.ref(new Set),e=g.computed(()=>t.value.has(p.FetchList)),s=g.computed(()=>t.value.has(p.FetchItem)),r=g.computed(()=>t.value.has(p.FetchLastItems)),i=g.computed(()=>t.value.has(p.FetchPreviousItems)),n=g.computed(()=>t.value.has(p.Create)),o=g.computed(()=>t.value.has(p.Update)),d=g.computed(()=>t.value.has(p.Delete)),u=g.computed(()=>t.value.has(p.Search)),y=g.computed(()=>t.value.has(p.Sort));function m(v){t.value.add(v)}function h(v){t.value.delete(v)}return{loadingStatus:t,isFetchingList:e,isFetchingItem:s,isFetchingLastItems:r,isFetchingPreviousItems:i,isCreating:n,isUpdating:o,isDeleting:d,isSearching:u,isSorting:y,setStatus:m,removeStatus:h}}function ls(t){const e=et(),s=rt(),r=at(),i=new be({runAction:async()=>h(p.AutoRefresh)}),n=g.computed(()=>{const l=s.params.value.pageNumber,c=s.params.value.itemCount,f=l*c-c,w=l*c-1,D=[];for(let I=f;I<=w&&e.itemsAsArray.value[I];I++)D.push(e.itemsAsArray.value[I]);return D}),o=g.computed(()=>({totalItems:e.totalCount.value,currentPage:s.params.value.pageNumber,rows:e.itemsAsArray.value,loadingStatus:r.loadingStatus.value,currentPageItems:n.value})),d=g.computed(()=>({getData:y,sort:te,paginate:ge,fetchRows:h})),u=g.computed(()=>t.getSyncDetail());function y(){return o.value}async function m(l){const c=await t.fetchList(l);return e.clearItems(),e.addOrReplaceItems(c.items),e.setTotalCount(c.totalItems),c}async function h(l=p.FetchList){r.setStatus(l);const c=await m(s.getRequestParams());return r.removeStatus(l),c}async function v(){S(),await h()}function S(){if(!u.value.shouldKeepSync)throw new Error("The provided repository does not support auto refresh");i.setupInterval(u.value.intervalInMillisecond)}function A(){i.clearInterval()}async function J(l,c=!0){r.setStatus(p.FetchItem),c&&e.clearCurrentItem();const f=await t.fetchItemById(l);return e.setCurrentItem(f),r.removeStatus(p.FetchItem),f}async function G(l){r.setStatus(p.Create);const c=await t.createItem(l);return c&&e.addOrReplaceItems([c]),r.removeStatus(p.Create),c}async function W(l,c){r.setStatus(p.Update);const f=await t.updateItem(l,c);return f&&e.addOrReplaceItems([f]),r.removeStatus(p.Update),f}async function x(l){return r.setStatus(p.Delete),await t.deleteItem(l),r.removeStatus(p.Delete),e.removeById(l)}async function ke(){s.setNextPage(),r.setStatus(p.FetchLastItems);const l=await m(s.getRequestParams());return r.removeStatus(p.FetchLastItems),l}async function Pe(){s.setPreventPage(),r.setStatus(p.FetchPreviousItems);const l=await m(s.getRequestParams());return r.removeStatus(p.FetchPreviousItems),l}async function ge(l){s.setPageNumber(l),r.setStatus(p.FetchList);const c=await m(s.getRequestParams());return r.removeStatus(p.FetchList),c}async function $e(l){s.setFilter("search",l),r.setStatus(p.Search),e.clearItems();const c=await m(s.getRequestParams());return r.removeStatus(p.Search),c}async function te(l){s.setSortDetail(l),r.setStatus(p.Sort),e.clearItems();const c=await m(s.getRequestParams());return r.removeStatus(p.Sort),c}async function K(){return s.clearParam(),await h()}return g.onBeforeUnmount(()=>{A()}),{loadingStatusManager:r,dataManger:e,paramsManager:s,tableRenderingData:o,fetchList:h,fetchWithAutoRefresh:v,setupAutoRefresh:S,stopAutoRefresh:A,fetchItemById:J,createItem:G,updateItem:W,deleteItem:x,fetchLastItems:ke,fetchPreviousItems:Pe,fetchItemsByPageNumber:ge,search:$e,sort:te,clearFilters:K,tableService:d,currentPageItems:n}}function cs(t){const e=g.ref(t),s=g.computed(()=>({getData(){return{totalItems:e.value.length,currentPageItems:e.value,loadingStatus:new Set,rows:e.value,currentPage:1}},async sort(r){return{totalItems:e.value.length,items:e.value}},async fetchRows(){return{totalItems:e.value.length,items:e.value}},async paginate(r,i){return{totalItems:e.value.length,items:e.value}}}));return{tableRows:e,staticTableService:s}}function us(){const t=g.ref(new Map),e=g.ref(0),s=g.computed(()=>e.value),r=g.computed(()=>Array.from(t.value.values()));function i(m){e.value=m}function n(m){for(const h of m)o(h)}function o(m){t.value.set(String(m.id),m)}function d(m){const h=u(m);return t.value.delete(String(m)),h}function u(m){return t.value.get(String(m))||null}function y(){t.value.clear()}return{entityItemsAsArray:r,addOrReplaceItems:n,removeById:d,getItemById:u,clearItems:y,setTotalCount:i,getTotalCount:s}}class hs{constructor(e,s=500){this.timerId=null,this.debounceTimeout=s,this.action=e}runAction(){this.cancelDebounce(),this.action.runImmediate(),this.timerId=setTimeout(()=>{this.action.runDebounce()},this.debounceTimeout)}cancelDebounce(){this.timerId&&clearTimeout(this.timerId)}}function ds(t){return function(e,s,r){const i=r.value;r.value=async function(...n){try{return await i.apply(this,n)}catch(o){for(const d of t)await d.handleError(o)}}}}function fs(t){return function(e,s,r){const i=r.value;r.value=async function(...n){try{const o=await i.apply(this,n);for(const d of t)d.shouldResolveSuccess(o)&&await d.handleSuccess(o);return o}catch(o){for(const d of t)d.shouldResolveFailure(o)&&await d.handleFailure(o)}}}}class ms{constructor(e,s,r=()=>!0,i=()=>!0){this.successMessageResolver=e,this.failureMessageResolver=s,this.shouldResolveSuccess=r,this.shouldResolveFailure=i}async handleSuccess(e){}async handleFailure(e){}async handleInfo(){}async handleWarning(){}}const R=class R{constructor(){}static GetInstance(){return R.instance||(R.instance=new R),R.instance}static registerHandler(e,s){R.handlers.set(e,s)}handle(e){var i;const s=((i=e.response)==null?void 0:i.status)??0,r=R.handlers.get(s);r&&r.handleError(e)}};R.handlers=new Map,R.instance=null;let Re=R;class vs{constructor(e){this.axiosInstance=e}setBaseURL(e){return this.axiosInstance.defaults.baseURL=e,this}setTimeout(e){return this.axiosInstance.defaults.timeout=e,this}setHeaders(e){return this.axiosInstance.defaults.headers.common=e,this}attachRequestInterceptors(e){return this.axiosInstance.interceptors.request.use(s=>{for(const r of e)r.intercept(s);return s},s=>Promise.reject(s)),this}attachResponseInterceptors(e){return this.axiosInstance.interceptors.response.use(s=>s,s=>{throw e.handle(s),s}),this}build(){return this.axiosInstance}}class gs{constructor(e){this.axiosInstance=e}async get(e,s){return await this.axiosInstance.get(e,s)}async post(e,s,r){return await this.axiosInstance.post(e,s,r)}async patch(e,s,r){return await this.axiosInstance.patch(e,s,r)}async put(e,s,r){return await this.axiosInstance.put(e,s,r)}async delete(e,s){return await this.axiosInstance.delete(e,s)}}class ps{constructor(){this._initializer=[]}setupInitializers(e){this._initializer.push(...e)}initialize(){for(const e of this._initializer)e.initialize()}}const U=class U{constructor(){this.jsonConverter=new M.JsonConvert}serializeObject(e,s){return this.jsonConverter.serializeObject(e,s)}deserializeObject(e,s){return this.jsonConverter.deserializeObject(e,s)}deserializeArray(e,s){return this.jsonConverter.deserializeArray(e,s)}tryDeserialize(e,s){for(const r of s)try{return this.deserializeObject(e,r)}catch{}throw new Error("Unable to deserialize object")}static GetInstance(){return U.Instance||(U.Instance=new U),U.Instance}};U.Instance=null;let Te=U;var it=(t=>(t.Success="success",t.Failure="error",t.Info="info",t.Warning="warning",t))(it||{}),Ee=(t=>(t.BottomLeft="bottomLeft",t.TopLeft="topLeft",t))(Ee||{});class ys{constructor(e,s,r){this.placement=Ee.BottomLeft,this.type=e,this.message=s,this.description=r}}const Ss=Fe.defineStore(me.Dialog,()=>{const t=g.reactive({dialogComponent:null,width:E.DefaultWidth,height:E.DefaultHeight,props:null,header:""}),e=g.computed(()=>!!t.dialogComponent),s=g.computed(()=>!!t.header);function r(u){t.dialogComponent=u}function i(u){t.header=u}function n(u){if(!e.value)throw new Error("there is no dialog to set props on");t.props=u}function o(u,y){if(!e.value)throw new Error("there is no dialog to set size on");if(u<E.MinimalAvailableSize)throw new Error("negative size not supported");y===E.Width?t.width=u:t.height=u}function d(){t.props=null,t.height=E.DefaultHeight,t.width=E.DefaultWidth,t.header="",t.dialogComponent=null}return{dialogData:t,openDialog:r,clearDialog:d,setSize:o,setDialogHeader:i,setProps:n,isDialogExists:e,hasDefaultHeader:s}}),Is=Fe.defineStore(me.Drawer,()=>{const t=g.ref(z.Close),e=g.computed(()=>t.value===z.Open);function s(){t.value=z.Close}function r(){t.value=z.Open}return{closeDrawer:s,openDrawer:r,isDrawerOpen:e}});class ws{constructor(){this.observers=[]}attach(e){this.observers.push(e)}detach(e){this.observers=this.observers.filter(s=>s!==e)}notify(){for(const e of this.observers)e.update(this)}}class Ds{constructor(e){this.mapProcesses=new Map,this.processes=e,this.assignProcessManager()}assignProcessManager(){this.processes.addToManager(this)}setProcessToMap(e){this.mapProcesses.set(e.name,e)}async start(){await this.processes.execute()}async startFrom(e){const s=this.mapProcesses.get(e);if(!s)throw new Error(`Process ${e} not found`);await s.execute()}}class As{constructor(e,s){this.next=null,this.name=e,this.next=s}addToManager(e){e.setProcessToMap(this),this.next&&this.next.addToManager(e)}}class bs{constructor(){this.checkAccessibility=this.checkAccessibility.bind(this),this.isAccessible=this.isAccessible.bind(this),this.getDestinationRouteName=this.getDestinationRouteName.bind(this)}async checkAccessibility(e,s,r){if(await this.isAccessible(e,s)){r();return}if(await this.getDestinationRouteName()){r({name:await this.getDestinationRouteName()});return}r(!1)}async getDestinationRouteName(){return""}}class _s{constructor(e,s,r){this.scheduler=new be({runAction:async()=>{await this.fetchList()}}),this.repository=e,this.crudDataManagement=s,this.syncDetail=this.repository.getSyncDetail(),this.paramManager=r,this.syncListWithApi()}async fetchList(){const e=await this.repository.fetchList(this.paramManager.getRequestParams());return this.crudDataManagement.addOrReplaceItems(e.items),this.crudDataManagement.setTotalCount(e.totalItems),e}async fetchItemById(e){const s=await this.repository.fetchItemById(e);return s&&this.crudDataManagement.addOrReplaceItems([s]),s}async createItem(e){const s=await this.repository.createItem(e);return s&&!this.shouldRefreshListAfterCreate()&&this.crudDataManagement.addOrReplaceItems([s]),s&&this.shouldRefreshListAfterCreate()&&await this.fetchList(),s}shouldRefreshListAfterCreate(){return!0}async deleteItem(e){return await this.repository.deleteItem(e)?this.crudDataManagement.removeById(e):null}async updateItem(e,s){const r=await this.repository.updateItem(e,s);return this.shouldRefreshListAfterUpdate()&&r?(await this.fetchList(),this.crudDataManagement.getItemById(e)):r}shouldRefreshListAfterUpdate(){return!0}async removeItem(e){const s=await this.repository.deleteItem(e);return s&&this.shouldRefreshListAfterDelete()&&await this.fetchList(),s?this.crudDataManagement.removeById(e):null}shouldRefreshListAfterDelete(){return!1}syncListWithApi(){this.scheduler.clearInterval(),this.syncDetail.shouldKeepSync&&this.scheduler.setupInterval(this.syncDetail.intervalInMillisecond)}onDestroy(){this.crudDataManagement.clearItems(),this.clearInterval()}clearInterval(){this.scheduler.clearInterval()}}class nt{}class Ms extends nt{search(e,s,r){const i=[];e:for(const n of e)for(const o of r(n))if(B.removeSpacesFromString(String(o).toLowerCase()).indexOf(B.removeSpacesFromString(String(s).toLowerCase()))>-1){i.push(n);continue e}return i}}var Oe=(t=>(t.Hidden="hidden",t.Visible="visible",t))(Oe||{});class Cs{constructor(e){this._visibilityControl=e,this.mangeVisibilityEvent()}mangeVisibilityEvent(){document.addEventListener("visibilitychange",e=>{document.visibilityState===Oe.Hidden?this._visibilityControl.screenInvisible(e):this._visibilityControl.screenVisible(e)})}}var Ls=Object.defineProperty,Rs=Object.getOwnPropertyDescriptor,L=(t,e,s,r)=>{for(var i=r>1?void 0:r?Rs(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Ls(e,s,i),i};a.Amount=class{constructor(){this.value="",this.symbol=""}get tradeValueInNumber(){return Number(this.value)}get truncatedValue(){return this.tradeValueInNumber.toLocaleString("en-US",{maximumFractionDigits:8})}},L([M.JsonProperty("value",String,!0)],a.Amount.prototype,"value",2),L([M.JsonProperty("symbol",String)],a.Amount.prototype,"symbol",2),a.Amount=L([M.JsonObject("Amount")],a.Amount),a.BaseModel=class{getTable(){const e=Object.getPrototypeOf(this)._table;if(!e)throw new Error("No Table found for the model. are you sure decorated the model with @Table() ?");return e}},L([M.JsonProperty("id",Number)],a.BaseModel.prototype,"id",2),a.BaseModel=L([M.JsonObject("BaseModel")],a.BaseModel),a.MinifiedSymbolModel=class extends a.BaseModel{},L([M.JsonProperty("symbol",String)],a.MinifiedSymbolModel.prototype,"symbol",2),L([M.JsonProperty("enName",String)],a.MinifiedSymbolModel.prototype,"enName",2),L([M.JsonProperty("faName",String)],a.MinifiedSymbolModel.prototype,"faName",2),L([M.JsonProperty("image",String)],a.MinifiedSymbolModel.prototype,"image",2),a.MinifiedSymbolModel=L([M.JsonObject("MinifiedSymbolModel")],a.MinifiedSymbolModel);class Ts{constructor(e,s){this.requestedDate=e,this.executedDate=s}get requestedDateInJalali(){return C.mapUnixToDate(this.requestedDate,H.SimpleDate)}get requestedTime(){return C.mapUnixToDate(this.requestedDate,H.JustHour)}get executedDateInJalali(){return C.mapUnixToDate(this.executedDate,H.SimpleDate)}get executedDateTime(){return C.mapUnixToDate(this.executedDate,H.JustHour)}}class Es{constructor(e,s){this.requestedAmount=e,this.executedAmount=s}}class Os{constructor(e,s,r,i,n){this.symbolPrice=e,this.USDTPrice=s,this.symobl=r,this.symbolImage=i,this.USDTImage=n}get truncatedSymbolPrice(){return this.symbolPrice.toLocaleString("en-US",{maximumFractionDigits:8})}get truncatedUSDTPrice(){return this.USDTPrice.toLocaleString("en-US",{maximumFractionDigits:8})}}class ks{constructor(e,s){this.soldSymbol=e,this.buySymbol=s}}a.APIErrorHandlerRegistry=Re,a.AbstractSubject=ws,a.AccessControl=De,a.AccessLevel=ee,a.Action=rs,a.ApiBuilder=vs,a.ApplicationDrawerStatus=z,a.ApplicationInitializer=ps,a.AuthorizationDirective=Ae,a.AuthorizationService=ve,a.BaseTable=Xe,a.BehaviorSubject=Qe,a.CellType=fe,a.ClientArraySearch=Ms,a.ClientSearch=nt,a.Column=ts,a.CommonMaskFormats=re,a.CrudService=_s,a.DateConverter=F,a.DateDisabledOptions=Nt,a.DateFormat=H,a.DateFormats=Ye,a.DateTools=X,a.DebounceService=hs,a.DialogDimensions=E,a.EveryAccess=Yt,a.EveryLevelAuthorizationDirective=Vt,a.Feedback=ms,a.FetchListResponse=ns,a.FormManager=xt,a.FormValidationStatus=Q,a.Formatter=C,a.HandleError=ds,a.HandleFeedback=fs,a.HeaderType=de,a.HttpClient=gs,a.InputControl=Jt,a.InputControlBuilder=Gt,a.InputControlData=xe,a.JsonMapper=Te,a.LoadingStatus=p,a.Params=tt,a.Process=As,a.ProcessManager=Ds,a.RangeValue=Bt,a.RouteGuard=bs,a.Scheduler=be,a.SelectableTable=Qt,a.SimpleSort=Le,a.SomeAccess=Ut,a.SomeLevelsAuthorizationDirective=jt,a.SortDetail=Ce,a.SortOrder=O,a.SortOrderTableHeader=Ge,a.Sorter=Xt,a.StatusCode=We,a.StorageKeys=k,a.StoreNames=me,a.SymbolInTrade=ks,a.SymbolPriceInTrade=Os,a.SyncDetail=os,a.TABLE_ACTION_COLUMN=Zt,a.TABLE_COLUMN_DEFAULT_COLSPAN=Me,a.TABLE_COLUMN_DEFAULT_VALUES=Ze,a.TABLE_COLUMN_DEFAULT_WIDTH=_e,a.Table=ss,a.TableConstants=we,a.TableDestroy=as,a.TableHeaderAlign=he,a.TableRowClick=is,a.ToastLocation=Ee,a.ToastMessage=ys,a.ToastType=it,a.TouchSensitiveControl=Wt,a.TradeAmount=Es,a.TradeDate=Ts,a.Util=B,a.VisibilityManager=Cs,a.VisibilityState=Oe,a.cards=Be,a.generateHeader=es,a.ibans=Ne,a.isEmpty=Ke,a.isLastItem=qt,a.isOnlyOneItem=Ht,a.setupJalaliDate=Je,a.setupStore=zt,a.useCrud=us,a.useData=et,a.useDialogService=Ss,a.useDrawerService=Is,a.useForm=Kt,a.useLoadingStatus=at,a.useParams=rt,a.useRepository=ls,a.useStaticTableService=cs,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(a,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("dayjs"),require("vue"),require("json2typescript"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","dayjs","vue","json2typescript","pinia"],_):(a=typeof globalThis<"u"?globalThis:a||self,_(a.IronCore={},a.dayjs,a.Vue,a.json2typescript,a.pinia))})(this,function(a,_,g,M,Fe){"use strict";var re=(t=>(t.BankCard="####-####-####-####",t.Iban="##-####-####-####-####-####-##",t))(re||{}),H=(t=>(t.FullDate="jYYYY/jM/jD HH:mm",t.SimpleDate="jYYYY/jM/jD",t.CompactGregorianDate="YYYYMMDD",t.ShortJalaliDate="YYMM",t.JustHour="HH:mm:ss",t))(H||{});const Be=[{62198619:{persian:"بلو",english:"blue"}},{603799:{persian:"بانک ملی ایران",english:"melli"}},{589210:{persian:"بانک سپه",english:"sepah"}},{627648:{persian:"بانک توسعه صادرات",english:"export-development"}},{627961:{persian:"بانک صنعت و معدن",english:"industry-mine"}},{603770:{persian:"بانک کشاورزی",english:"agriculture"}},{628023:{persian:"بانک مسکن",english:"housing"}},{627760:{persian:"پست بانک ایران",english:"post"}},{502908:{persian:"بانک توسعه تعاون",english:"development-cooperation"}},{627412:{persian:"بانک اقتصاد نوین",english:"eghtesad-novin"}},{622106:{persian:"بانک پارسیان",english:"parsian"}},{502229:{persian:"بانک پاسارگاد",english:"pasargad"}},{639599:{persian:"بانک قوامین",english:"ghavamin"}},{627488:{persian:"بانک کارآفرین",english:"karafarin"}},{621986:{persian:"بانک سامان",english:"saman"}},{639346:{persian:"بانک سینا",english:"sina"}},{639607:{persian:"بانک سرمایه",english:"sarmayeh"}},{504706:{persian:"بانک شهر",english:"shahr"}},{502806:{persian:"بانک شهر",english:"shahr"}},{502938:{persian:"بانک دی",english:"day"}},{603769:{persian:"بانک صادرات",english:"saderat"}},{610433:{persian:"بانک ملت",english:"mellat"}},{627353:{persian:"بانک تجارت",english:"tejarat"}},{585983:{persian:"بانک تجارت",english:"tejarat"}},{589463:{persian:"بانک رفاه",english:"refah"}},{627381:{persian:"بانک انصار",english:"ansar"}},{639370:{persian:"بانک مهر اقتصاد",english:"mehr-eqtesad"}},{505801:{persian:"موسسه اعتباری کوثر",english:"kosar"}},{606373:{persian:"بانک قرض الحسنه مهرایرانیان",english:"mehr"}},{186214:{persian:"بانک آینده",english:"ayandeh"}},{504172:{persian:"بانک قرض الحسنه رسالت",english:"resalat"}},{505416:{persian:"بانک گردشگری",english:"tourism"}},{505785:{persian:"بانک ایرانزمین",english:"iran-zamin"}},{505809:{persian:"بانک خاورمیانه",english:"middle-east"}},{585947:{persian:"بانک خاورمیانه",english:"middle-east"}},{604932:{persian:"بانک سپه",english:"sepah"}},{627961:{persian:"بانک صنعت و معدن",english:"industry-mine"}},{636214:{persian:"بانک آینده",english:"ayandeh"}},{636795:{persian:"بانک مرکزی",english:"markazi"}},{636949:{persian:"بانک حکمت ایرانیان",english:"hekmat-iranian"}},{639217:{persian:"بانک کشاورزی",english:"agriculture"}}],Ne=[{"010":{persian:"بانک مرکزی",english:"markazi"}},{"011":{persian:"بانک صنعت و معدن",english:"industry-mine"}},{"012":{persian:"بانک ملت",english:"mellat"}},{"013":{persian:"بانک رفاه",english:"refah"}},{"014":{persian:"بانک مسکن",english:"housing"}},{"015":{persian:"بانک سپه",english:"sepah"}},{"016":{persian:"بانک کشاورزی",english:"agriculture"}},{"017":{persian:"بانک ملّی ایران",english:"melli"}},{"018":{persian:"بانک تجارت",english:"tejarat"}},{"019":{persian:"بانک صادرات",english:"saderat"}},{"020":{persian:"بانک توسعه صادرات",english:"export-development"}},{"021":{persian:"پست بانک",english:"post"}},{"053":{persian:"بانک کارآفرین",english:"karafarin"}},{"054":{persian:"بانک پارسیان",english:"parsian"}},{"055":{persian:"بانک اقتصاد نوین",english:"eghtesad-novin"}},{"056":{persian:"بانک سامان",english:"saman"}},{"057":{persian:"بانک پاسارگاد",english:"pasargad"}},{"058":{persian:"بانک سرمایه",english:"sarmayeh"}},{"059":{persian:"بانک سینا",english:"sina"}},{"060":{persian:"بانک قرض الحسنه مهرایرانیان",english:"mehr"}},{"061":{persian:"بانک شهر",english:"shahr"}},{"062":{persian:"بانک آینده",english:"ayandeh"}},{"065":{persian:"بانک حکمت ایرانیان",english:"hekmat-iranian"}},{"066":{persian:"بانک دی",english:"day"}},{"069":{persian:"بانک ایران زمین",english:"iran-zamin"}},{"070":{persian:"بانک قرض الحسنه رسالت",english:"resalat"}},{"078":{persian:"بانک خاورمیانه",english:"middle-east"}}];var Ue=(t=>(t.Normal="YYYY-MM-DD",t.ContainsHour="YYYY-MM-DD HH:mm",t.OnlyHour="HH:mm",t))(Ue||{});function ae(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ie={exports:{}},ct=ie.exports,Ye;function ut(){return Ye||(Ye=1,function(t,e){(function(s,r){t.exports=r()})(ct,function(){return function(s,r){r.prototype.weekday=function(i){var n=this.$locale().weekStart||0,o=this.$W,d=(o<n?o+7:o)-n;return this.$utils().u(i)?d:this.subtract(d,"day").add(i,"day")}}})}(ie)),ie.exports}var ht=ut();const dt=ae(ht);var ne={exports:{}},ft=ne.exports,Ve;function mt(){return Ve||(Ve=1,function(t,e){(function(s,r){t.exports=r()})(ft,function(){var s="week",r="year";return function(i,n,o){var d=n.prototype;d.week=function(u){if(u===void 0&&(u=null),u!==null)return this.add(7*(u-this.week()),"day");var y=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var m=o(this).startOf(r).add(1,r).date(y),h=o(this).endOf(s);if(m.isBefore(h))return 1}var v=o(this).startOf(r).date(y).startOf(s).subtract(1,"millisecond"),S=this.diff(v,s,!0);return S<0?o(this).startOf("week").week():Math.ceil(S)},d.weeks=function(u){return u===void 0&&(u=null),this.week(u)}}})}(ne)),ne.exports}var vt=mt();const gt=ae(vt);var oe={exports:{}},pt=oe.exports,je;function yt(){return je||(je=1,function(t,e){(function(s,r){t.exports=r()})(pt,function(){return function(s,r){r.prototype.weekYear=function(){var i=this.month(),n=this.week(),o=this.year();return n===1&&i===11?o+1:i===0&&n>=52?o-1:o}}})}(oe)),oe.exports}var St=yt();const It=ae(St);var le={exports:{}},Dt=le.exports,He;function wt(){return He||(He=1,function(t,e){(function(s,r){t.exports=r(_)})(Dt,function(s){function r(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var i=r(s),n={name:"fa",weekdays:"یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"),weekdaysShort:"یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekStart:6,months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),ordinal:function(o){return o},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"}};return i.default.locale(n,null,!0),n})}(le)),le.exports}var At=wt();const bt=ae(At);function ce(t,e){return _t(t)||Mt(t,e)||Ct()}function _t(t){if(Array.isArray(t))return t}function Mt(t,e){var s=[],r=!0,i=!1,n=void 0;try{for(var o=t[Symbol.iterator](),d;!(r=(d=o.next()).done)&&(s.push(d.value),!(e&&s.length===e));r=!0);}catch(u){i=!0,n=u}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw n}}return s}function Ct(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function qe(t,e,s){e<=2&&(t-=1,e+=12);var r=Math.floor(t/100),i=2-r+Math.floor(r/4),n=Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+s+i-1524.5;return n}function Lt(t){t=t+.5;var e=Math.floor(t),s=t-e,r=e;if(e>=2299161){var i=Math.floor((e-186721625e-2)/36524.25);r=e+1+i-Math.floor(i/4)}var n=r+1524,o=Math.floor((n-122.1)/365.25),d=Math.floor(365.25*o),u=Math.floor((n-d)/30.6001),y=n-d-Math.floor(30.6001*u)+s,m=u<14?u-1:u-13,h=m>2?o-4716:o-4715;return Et(h,m,y)}function Rt(t){t=t+.5;var e=Math.floor(t),s=t-e,r=e;if(e>=2299161){var i=Math.floor((e-186721625e-2)/36524.25);r=e+1+i-Math.floor(i/4)}var n=r+1524,o=Math.floor((n-122.1)/365.25),d=Math.floor(365.25*o),u=Math.floor((n-d)/30.6001),y=n-d-Math.floor(30.6001*u)+s,m=u<14?u-1:u-13,h=m>2?o-4716:o-4715;return[Math.floor(h),Math.floor(m),Math.floor(y)]}function Tt(t,e,s){var r=[31,28,31,30,31,30,31,31,30,31,30,31],i=[31,31,31,31,31,31,30,30,30,30,30,29];function n(S,A){return Math.floor(S/A)}t-=979;for(var o=365*t+n(t,33)*8+n(t%33+3,4),d=0;d<e-1;++d)o+=i[d];o+=s-1;var u=o+79,y=1600+400*n(u,146097);u=u%146097;var m=!0;for(u>=36525&&(u--,y+=100*n(u,36524),u=u%36524,u>=365?u++:m=!1),y+=4*n(u,1461),u%=1461,u>=366&&(m=!1,u--,y+=n(u,365),u=u%365),d=0;u>=r[d]+(d==1&&m);d++)u-=r[d]+(d==1&&m);var h=d+1,v=u+1;return qe(y,h,v)}function Et(t,e,s){var r=[31,28,31,30,31,30,31,31,30,31,30,31],i=[31,31,31,31,31,31,30,30,30,30,30,29];function n(W,x){return Math.floor(W/x)}for(var o=t-1600,d=e-1,u=s-1,y=365*o+n(o+3,4)-n(o+99,100)+n(o+399,400),m=0;m<d;++m)y+=r[m];d>1&&(t%4==0&&t%100!=0||t%400==0)&&y++,y+=u;var h=y-79,v=n(h,12053);h%=12053;var S=979+33*v+4*n(h,1461);h%=1461,h>=366&&(S+=n(h-1,365),h=(h-1)%365);for(var A=0;A<11&&h>=i[A];++A)h-=i[A];var J=A+1,G=h+1;return[S,J,G]}var ue={J:function(e,s,r){return Lt(qe(e,s,r))},G:function(e,s,r){return Rt(Tt(e,s,r))}},Ot=/^(\d{4})[-/]?(\d{1,2})[-/]?(\d{0,2})(.*)?$/,kt=/\[.*?\]|jY{2,4}|jM{1,4}|jD{1,2}|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,Ie="date",q="day",P="month",$="year",ze="week",Pt="YYYY-MM-DDTHH:mm:ssZ",$t={jmonths:"فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_")},Ft=function(t,e,s){var r=e.prototype,i=r.$utils(),n=function(c){return c.$C==="jalali"},o=i.prettyUnit||i.p,d=i.isUndefined||i.u,u=i.padStart||i.s,y=i.monthDiff||i.m,m=i.absFloor||i.a,h=function(c){return function(){var f=c.bind(this).apply(void 0,arguments);return f.$C=this.$C,f.isJalali()&&f.InitJalali(),f}};r.startOf=h(r.startOf),r.endOf=h(r.endOf),r.add=h(r.add),r.subtract=h(r.subtract),r.set=h(r.set);var v=r.parse,S=r.init,A=r.startOf,J=r.$set,G=r.add,W=r.format,x=r.diff,ke=r.year,Pe=r.month,ge=r.date,$e=r.daysInMonth,te=r.toArray;s.$C="gregory",s.$fdow=6,s.calendar=function(l){return s.$C=l,s},r.calendar=function(l){var c=this.clone();return c.$C=l,c.isJalali()&&c.InitJalali(),c},r.isJalali=function(){return n(this)},s.en.jmonths="Farvardin_Ordibehesht_Khordaad_Tir_Mordaad_Shahrivar_Mehr_Aabaan_Aazar_Dey_Bahman_Esfand".split("_"),s.locale("fa",Object.assign({},bt,{},$t),!0);var K=function(c,f){return s(c,{locale:f.$L,utc:f.$u,calendar:f.$C})};r.init=function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};S.bind(this)(l),this.isJalali()&&this.InitJalali()},r.parse=function(l){var c;if(this.$C=l.calendar||this.$C||s.$C,l.jalali&&typeof l.date=="string"&&/.*[^Z]$/i.test(l.date)&&(c=l.date.match(Ot))){var f=ue.G(parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3]||1,10)),D=ce(f,3),w=D[0],I=D[1],b=D[2];l.date="".concat(w,"-").concat(I,"-").concat(b).concat(c[4]||"")}return v.bind(this)(l)},r.InitJalali=function(){var l=ue.J(this.$y,this.$M+1,this.$D),c=ce(l,3),f=c[0],D=c[1],w=c[2];this.$jy=f,this.$jM=D-1,this.$jD=w},r.startOf=function(l,c){var f=this;if(!n(this))return A.bind(this)(l,c);var D=d(c)?!0:c,w=o(l),I=function(Z,V){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.$jy,ye=ue.G(T,V+1,Z),j=ce(ye,3),se=j[0],Se=j[1],$s=j[2],lt=K(new Date(se,Se-1,$s),f);return(D?lt:lt.endOf(q)).$set("hour",1)},b=(this.$W+(7-s.$fdow))%7;switch(w){case $:return D?I(1,0):I(0,0,this.$jy+1);case P:return D?I(1,this.$jM):I(0,(this.$jM+1)%12,this.$jy+parseInt((this.$jM+1)/12,10));case ze:return D?I(this.$jD-b,this.$jM):I(this.$jD+(6-b),this.$jM);default:return A.bind(this)(l,c)}},r.$set=function(l,c){var f=this;if(!n(this))return J.bind(this)(l,c);var D=o(l),w=function(b,pe){var Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.$jy,V=ue.G(Z,pe+1,b),T=ce(V,3),ye=T[0],j=T[1],se=T[2];return f.$d.setFullYear(ye),f.$d.setMonth(j-1),f.$d.setDate(se),f};switch(D){case Ie:case q:w(c,this.$jM);break;case P:w(this.$jD,c);break;case $:w(this.$jD,this.$jM,c);break;default:return J.bind(this)(l,c)}return this.init(),this},r.add=function(l,c){var f=this;if(!n(this))return G.bind(this)(l,c);l=Number(l);var D=c&&(c.length===1||c==="ms")?c:o(c),w=function(j,se){var Se=f.set(Ie,1).set(j,se+l);return Se.set(Ie,Math.min(f.$jD,Se.daysInMonth()))};if(["M",P].indexOf(D)>-1){var I=this.$jM+l,b=I<0?-Math.ceil(-I/12):Math.floor(I/12),pe=this.$jD,Z=this.set(q,1).add(b,$).set(P,I-b*12);return Z.set(q,Math.min(Z.daysInMonth(),pe))}if(["y",$].indexOf(D)>-1)return w($,this.$jy);if(["d",q].indexOf(D)>-1){var V=new Date(this.$d);return V.setDate(V.getDate()+l),K(V,this)}if(["w",ze].indexOf(D)>-1){var T=new Date(this.$d);return T.setDate(T.getDate()+l*7),K(T,this)}return G.bind(this)(l,c)},r.format=function(l,c){var f=this;if(!n(this))return W.bind(this)(l,c);var D=l||Pt,w=c||this.$locale(),I=w.jmonths;return D.replace(kt,function(b){if(b.indexOf("[")>-1)return b.replace(/\[|\]/g,"");switch(b){case"YY":return String(f.$jy).slice(-2);case"YYYY":return String(f.$jy);case"M":return String(f.$jM+1);case"MM":return u(f.$jM+1,2,"0");case"MMM":return I[f.$jM].slice(0,3);case"MMMM":return I[f.$jM];case"D":return String(f.$jD);case"DD":return u(f.$jD,2,"0");default:return W.bind(f)(b,c)}})},r.diff=function(l,c,f){if(!n(this))return x.bind(this)(l,c,f);var D=o(c),w=s(l),I=y(this,w);switch(D){case $:I/=12;break;case P:break;default:return x.bind(this)(l,c,f)}return f?I:m(I)},r.$g=function(l,c,f){return d(l)?this[c]:this.set(f,l)},r.year=function(l){return n(this)?this.$g(l,"$jy",$):ke.bind(this)(l)},r.month=function(l){return n(this)?this.$g(l,"$jM",P):Pe.bind(this)(l)},r.date=function(l){return n(this)?this.$g(l,"$jD",q):ge.bind(this)(l)},r.daysInMonth=function(){return n(this)?this.endOf(P).$jD:$e.bind(this)()},te&&(r.toArray=function(){return n(this)?[this.$jy,this.$jM,this.$jD,this.$H,this.$m,this.$s,this.$ms]:te.bind(this)()}),r.clone=function(){return K(this.toDate(),this)}};const Bt={ordinal(t){},relativeTime:void 0,name:"fa",weekdays:"یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"),weekdaysShort:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),months:"فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_"),monthsShort:"فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_"),weekStart:6,formats:{L:"YYYY/MM/DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"}};function Je(){_.extend(Ft),_.calendar("jalali"),_.extend(dt),_.extend(gt),_.extend(It),_.locale(Bt,{},!0)}class Nt{constructor(e,s){this.start=e,this.end=s}}class Ut{constructor(e,s,r){this.maxDate=e,this.minDate=s,this.disabledDates=r}}class F{static standardToUnix(e){return Math.floor(new Date(e).getTime()/1e3)}static unixToStandard(e){return new Date(e*1e3).toString()}static getUnixEndOfDayInUnix(e){return _.unix(e).endOf("day").unix()}}class X{static isDateDisabled(e,s){for(const r of e.disabledDates)if(X.areUnixesInSameDate(r,s.unix()))return!0;return!!(e.maxDate&&X.isDateGraterOrSame(e.maxDate,s.unix())||e.minDate&&X.isDateLowerOrSame(e.minDate,s.unix()))}static areUnixesInSameDate(e,s){return F.getUnixEndOfDayInUnix(e)===F.getUnixEndOfDayInUnix(s)}static isDateGraterOrSame(e,s){return F.getUnixEndOfDayInUnix(s)>=F.getUnixEndOfDayInUnix(e)}static isDateLowerOrSame(e,s){return F.getUnixEndOfDayInUnix(s)<=F.getUnixEndOfDayInUnix(e)}}Je();class C{static toCurrency(e,s){return e.toLocaleString("en-US",s)}static toCurrencyWithDotSeparator(e){return C.toCurrency(e).replaceAll(",",".")}static applyMask(e,s){let r="",i=0,n=0;for(;i<e.length;){if(e[i]==="#"){if(n>=s.length)throw new Error("Value length does not match the format.");r+=s[n],n++}else r+=e[i];i++}if(n!==s.length)throw new Error("Value length does not match the format.");return r}static applyBankCardMask(e){return C.applyMask(re.BankCard,String(e))}static applyIbanMask(e){return C.applyMask(re.Iban,String(e))}static toEnglishDigits(e){const s=["۱","۲","۳","۴","۵","۶","۷","۸","۹","۰"],r=["١","٢","٣","٤","٥","٦","٧","٨","٩","٠"],i=["1","2","3","4","5","6","7","8","9","0"];return e.split("").map(n=>i[s.indexOf(n)]||i[r.indexOf(n)]||n).join("")}static mapUnixToDate(e,s){return _(new Date(e)).subtract(1,"day").format(s)}}var p=(t=>(t.FetchList="fetchList",t.AutoRefresh="autoRefresh",t.FetchItem="fetchItem",t.FetchLastItems="fetchLastItems",t.FetchPreviousItems="fetchPreviousItems",t.Create="CREATE",t.Update="UPDATE",t.Delete="DELETE",t.Search="SEARCH",t.Sort="SORT",t.Success="SUCCESS",t.Error="ERROR",t.Idle="IDLE",t))(p||{}),E=(t=>(t.Width="width",t.Height="height",t[t.DefaultWidth=500]="DefaultWidth",t[t.DefaultHeight=350]="DefaultHeight",t[t.MinimalAvailableSize=0]="MinimalAvailableSize",t))(E||{}),O=(t=>(t.ASC="ASC",t.DESC="DESC",t))(O||{}),Ge=(t=>(t.ASC="ascend",t.DESC="descend",t))(Ge||{}),he=(t=>(t.Left="left",t.Right="right",t.Center="center",t))(he||{}),de=(t=>(t.Text="text",t))(de||{}),fe=(t=>(t.Text="text",t.ACTION="action",t.Tag="tag",t.Iban="iban",t.BankCard="bankCard",t.Symbol="symbol",t.TradeDetail="tradeDetail",t.SymbolPrice="symbolPrice",t.TradeSymbol="tradeSymbol",t.Price="price",t.DynamicCurrencyPrice="dynamicCurrencyPrice",t.TradeDate="tradeDate",t.RequestResponseIdentity="requestResponseIdentity",t.Image="image",t))(fe||{}),De=(t=>(t[t.MINIMAL_LOADABLE_HEADER_COUNT=0]="MINIMAL_LOADABLE_HEADER_COUNT",t[t.DEFAULT_ITEM_COUNT_PER_PAGE=20]="DEFAULT_ITEM_COUNT_PER_PAGE",t.PAGINATION_POSITION="bottomCenter",t))(De||{});a.ApplicationTheme=(t=>(t.FontFamily="IRANSansX",t))(a.ApplicationTheme||{});var z=(t=>(t.Open="open",t.Close="close",t))(z||{}),We=(t=>(t[t.NotFound=404]="NotFound",t[t.Unauthorized=401]="Unauthorized",t[t.ServerError=500]="ServerError",t))(We||{}),Q=(t=>(t[t.Invalid=0]="Invalid",t[t.Valid=1]="Valid",t))(Q||{}),k=(t=>(t.Theme="theme",t.AccessList="accessList",t.Token="token",t.SSO_ACCESS_LIST="ssoAccessList",t))(k||{});a.ApplicationTheme=(t=>(t.Light="light",t.Dark="dark",t))(a.ApplicationTheme||{});var me=(t=>(t.Dialog="dialog",t.Drawer="drawer",t.Module="module",t.Toast="toast",t))(me||{}),xe=(t=>(t.USDT="USDT",t))(xe||{});class B{static getBankImageBaseOnCardInfo(e,s){return e===void 0?"/img/banks/shetab.png":s==="IBAN"?(e=C.toEnglishDigits(e.replace(/IR/g,"").split(" ").join("")),`/img/banks/${B.iban(e).english}.png`):(e=C.toEnglishDigits(e.replace(/ /g,"")),`/img/banks/${B.card(e).english}.png`)}static card(e){const s={persian:"نامشخص",english:"shetab"};if(e==null)return s;e=e.substring(0,6);try{const r=Be.find(i=>Object.keys(i)[0]===e);return r===void 0?s:Object.values(r)[0]}catch{return s}}static iban(e){const s={persian:"نامشخص",english:"shetab"};if(e==null)return s;e=e.substring(2,5);try{const r=Ne.find(i=>Object.keys(i)[0]===e);return r===void 0?s:Object.values(r)[0]}catch{return s}}static async copyValueToClipboard(e){await navigator.clipboard.writeText(String(e))}static downloadBlob(e,s=B.extractFileNameFromHeader(e)){const r=document.createElement("a");r.href=URL.createObjectURL(e.data),r.download=s,r.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!0})),r.remove()}static extractFileNameFromHeader(e){var r,i,n,o;return((o=(r=e.headers["content-disposition"])==null?void 0:r.split("filename=")[1])==null?void 0:o.slice(1,((n=(i=e.headers["content-disposition"])==null?void 0:i.split("filename="))==null?void 0:n[1].length)-1))||"Saraf-File"}static removeSpacesFromString(e){return e&&typeof e.normalize=="function"&&(e=e.normalize("NFC")),e.replace(/[\s\u00A0\u1680\u180E\u2000-\u200A\u200B-\u200D\u2060\uFEFF\u2028\u2029\u202F\u205F\u3000]+/g,"")}static isArraySorted(e,s=i=>i,r=O.ASC){return e.every((i,n)=>e.length-1===n?!0:r===O.ASC?s(i)<=s(e[n+1]):s(i)>=s(e[n+1]))}}const N=class N{constructor(){this.availableAccesses=new Set}setAvailableAccesses(e){this.setAccessListToStorage(e);for(const s of e)this.availableAccesses.add(s)}setAccessListToStorage(e){localStorage.setItem(k.AccessList,JSON.stringify(e))}everyAccess(e){return e.every(s=>this.availableAccesses.has(s))}someAccess(e){return e.some(s=>this.availableAccesses.has(s))}clearAvailableAccesses(){this.availableAccesses.clear(),localStorage.removeItem(k.AccessList)}initialize(){const e=localStorage.getItem(k.AccessList);e!==null&&this.setAvailableAccesses(JSON.parse(e))}static GetInstance(){return N.Instance||(N.Instance=new N),N.Instance}};N.Instance=null;let ee=N;class we{constructor(){this.mounted=(e,s)=>{this.checkAccess(e,s.value)},this.updated=(e,s)=>{this.checkAccess(e,s.value)},this.checkAccess=(e,s)=>{this.hasAccess(s)||e.remove()},this.accessService=ee.GetInstance()}}class Yt extends we{hasAccess(e){return this.accessService.everyAccess(e)}}class Vt extends we{hasAccess(e){return this.accessService.someAccess(e)}}const U=class U{constructor(){this._accessLevels=new Map}initialize(){this.setAccessLevelFromStorage()}setAccessLevels(e){for(const s in e)this._accessLevels.set(s,new Set(e[s]));this.setAccessLevelsToStorage(e)}setAccessLevelsToStorage(e){localStorage.setItem(k.SSO_ACCESS_LIST,JSON.stringify(e))}getAccessLevelsFromStorage(){let e=localStorage.getItem(k.SSO_ACCESS_LIST);return e!==null?JSON.parse(e):e}getAccessLevelsOfScope(e){if(this._accessLevels.has(e))return this._accessLevels.get(e);throw new Error(`The scope is not exists ${e}`)}setAccessLevelFromStorage(){const e=this.getAccessLevelsFromStorage();e&&this.setAccessLevels(e)}everyAccess(e,s){const r=this.getAccessLevelsOfScope(e);return r?s.every(i=>r.has(i)):!1}someAccess(e,s){const r=this.getAccessLevelsOfScope(e);return r?s.some(i=>r.has(i)):!1}hasScope(e){return this._accessLevels.has(e)}clear(){localStorage.removeItem(k.SSO_ACCESS_LIST),this._accessLevels=new Map}static GetInstance(){return U._instance||(U._instance=new U),U._instance}};U._instance=null;let ve=U;class Ae{constructor(){this._authorizationService=ve.GetInstance(),this.mounted=this.mounted.bind(this),this.updated=this.updated.bind(this),this.hasAccess=this.hasAccess.bind(this),this.manageElement=this.manageElement.bind(this)}mounted(e,s,r){this.manageElement(e,s.arg,s.modifiers)}updated(e,s,r){this.manageElement(e,s.arg,s.modifiers)}manageElement(e,s,r){if(!this._authorizationService.hasScope(s)){e.remove();return}const i=this.getAccessLevels(s,r);this.hasAccess(s,i)||e.remove()}getAccessLevels(e,s){var i;let r=Object.keys(s);return r.length||(r=Array.from(((i=this._authorizationService.getAccessLevelsOfScope(e))==null?void 0:i.values())??[])),r}}class jt extends Ae{hasAccess(e,s){return this._authorizationService.everyAccess(e,s)}}class Ht extends Ae{hasAccess(e,s){return this._authorizationService.someAccess(e,s)}}class Ke{constructor(){this.value=null,this.initialValue=null,this.name="",this.isValid=!1,this.isBlurSensitive=!1,this.isRequired=!1,this.isIncludeInRequestBody=!0,this.isChangeSensitive=!1,this.notValidMessage="",this.isEmptySensitive=!0}}function qt(t){return t===1}function zt(t,e){return t-1===e}function Ze(t){return String(t).length===0||t===null||t===void 0}function Jt(t){t()}class Gt{constructor(e,s){this.initialData=null,this.data=new Ke,this._validators=[],this._id=Math.random(),this.data.value=s,this.data.name=e,this.shouldRunValidation()&&this.runValidation(!0)}shouldRunValidation(){return this.data.isRequired?!0:!Ze(this.data.value)}runValidation(e=!1){for(const s of this._validators){const r=s.validate(this.data.value);if(r){this.setFormToInvalidState(e,r);return}}this.setFormToValidState()}setFormToInvalidState(e,s){this.data.isValid=!1,(this.data.isChangeSensitive||e)&&this.setNotValidMessage(s)}setFormToValidState(){this.data.isValid=!0,this.setNotValidMessage("")}reset(){this.initialData?this.data=structuredClone(g.toRaw(this.initialData)):console.warn("The "+this.data.name+`input control has no initial data,
|
|
2
|
+
the initial data will be available after calling the [markAsInitial] method on this instance`)}markAsInitial(){this.initialData=structuredClone(g.toRaw(this.data))}setValidators(e){this._validators=e}getChangeSensitive(){return this.data.isChangeSensitive}setChangeSensitive(e){this.data.isChangeSensitive=e}getIsBlurSensitive(){return this.data.isBlurSensitive}setIsBlurSensitive(e){this.data.isBlurSensitive=e}getIsRequired(){return this.data.isRequired}setIsRequired(e){this.data.isRequired=e}getIsValid(){return this.data.isValid}setIsValid(e){this.data.isValid=e}getIsIncludeInRequestBody(){return this.data.isIncludeInRequestBody}setIsIncludeInRequestBody(e){this.data.isIncludeInRequestBody=e}getNotValidMessage(){return this.data.notValidMessage}setNotValidMessage(e){this.data.notValidMessage=e}getName(){return this.data.name}setName(e){this.data.name=e}setId(e){this._id=e}getId(){return this._id}getIsEmptySensitive(){return this.data.isEmptySensitive}setIsEmptySensitive(e){this.data.isEmptySensitive=e}set value(e){this.data.value=e,this.shouldRunValidation()&&this.runValidation()}get value(){return this.data.value}}class Wt{constructor(e){this._inputControl=e}setValidators(e){return this._inputControl.setValidators(e),this}setChangeSensitive(){return this._inputControl.setChangeSensitive(!0),this}setRequired(){return this._inputControl.setIsRequired(!0),this}setValid(){return this._inputControl.setIsValid(!0),this}setBlurSensitive(){return this._inputControl.setIsBlurSensitive(!0),this}setId(e){return this._inputControl.setId(e),this}removeEmptySensitive(){return this._inputControl.setIsEmptySensitive(!1),this}build(){return this._inputControl}}class xt{constructor(){this.mounted=(e,s)=>{s.value&&s.value.getIsBlurSensitive()&&(e.addEventListener("click",this.handleFocus.bind(this,s.value)),e.addEventListener("blur",this.handleBlur.bind(this,s.value),!0))},this.beforeUnMount=(e,s)=>{e.removeEventListener("blur",this.handleBlur.bind(this,s.value)),e.removeEventListener("click",this.handleFocus.bind(this,s.value))}}handleBlur(e){e.runValidation(!0)}handleFocus(e){e.value||e.getIsEmptySensitive()||e.setNotValidMessage("")}}class Kt{constructor(){this._inputControls=new Map,this._isValid=!1,this._id=Math.random()}getInputControlsAsArray(){return Array.from(this._inputControls.values())}runValidation(){for(const e of this.getInputControlsAsArray())if(!e.getIsValid()){this._isValid=!1;return}this._isValid=!0}addInputControls(e){for(const s of e)this._inputControls.set(s.getName(),s)}getInputControl(e){const s=this._inputControls.get(e);if(!s)throw new Error(`The provided input name (${e}}) has no controls.`);return s}resetControls(e){for(const s of e){const r=this._inputControls.get(s);r?r.reset():console.warn(`Provided input name ${s} has no controllers in this form`)}}resetAll(){for(const e of this.getInputControlsAsArray())e.reset()}createRequestBody(){const e={};for(const s of this.getInputControlsAsArray())s.getIsIncludeInRequestBody()&&(e[s.getName()]=s.value);return e}setIsValid(e){this._isValid=e}getIsValid(){return this._isValid}setId(e){this._id=e}getId(){return this._id}}function Zt(t){const e=g.reactive(t),s=g.ref(Q.Invalid);return g.watch(()=>e.getInputControlsAsArray(),()=>{e.runValidation(),e.getIsValid()?s.value=Q.Valid:s.value=Q.Invalid},{immediate:!0,deep:!0}),{reactiveForm:e,validationStatus:s}}class be{constructor(e){this.timerId=null,this.setupInterval=this.setupInterval.bind(this),this.schedule=e}setupInterval(e){const s=this;this.timerId=setTimeout(async function r(){await s.schedule.runAction(),s.timerId=setTimeout(()=>{r()},e)},e)}clearInterval(){this.timerId&&clearInterval(this.timerId)}}const _e="150px",Me=2,Xt={path:"id",key:"id",title:"عملیات",colspan:Me,width:_e,cellType:fe.ACTION,align:he.Center,headerType:de.Text,accessLevel:null},Xe={width:_e,align:he.Center,headerType:de.Text,cellType:fe.Text,colspan:Me};class Ce{constructor(e,s){this.key=e,this.order=s}}class Le{aSort(e,s){return e.sort((r,i)=>{const n=r[s]??r,o=i[s]??i;if(typeof n=="string"&&typeof o=="string")return n.localeCompare(o);if(typeof n=="number"&&typeof o=="number")return n-o;throw new Error("Not supported data type")})}bSort(e,s){return e.sort((r,i)=>{const n=r[s]??r,o=i[s]??i;if(typeof n=="string"&&typeof o=="string")return o.localeCompare(n);if(typeof n=="number"&&typeof o=="number")return o-n;throw new Error("Not supported data type")})}}class Qt{arrayOfObjectSort(e,s,r,i=new Le){return r===O.ASC?i.aSort(e,s):i.bSort(e,s)}arraySort(e,s,r=new Le){return s===O.ASC?r.aSort(e):r.bSort(e)}}class Qe{constructor(e){this.currentPage=1,this.currentPageSize=20,this.currentSortDetail=new Ce("id",O.DESC),this.loadedRows=[],this.headerSchema=[],this.service=e,this.accessService=ee.GetInstance()}addHeader(e){this.headerSchema.push(e)}async load(){this.headerSchema=this.filterItemsBaseOnAccessLevel(await this.loadHeader()),await this.loadRows()}filterItemsBaseOnAccessLevel(e){return e.filter(s=>s.hasAccess?s.hasAccess():!0)}async sort(e){this.shouldSendSortRequest(e)&&(this.currentSortDetail=e,this.loadedRows=(await this.handleSort(this.currentSortDetail)).items)}shouldSendSortRequest(e){return e.key!==this.currentSortDetail.key||e.order!==this.currentSortDetail.order}async paginate(e,s){this.shouldSendPaginationRequest(e,s)&&(this.currentPage=e,this.currentPageSize=s,this.loadedRows=(await this.handlePagination(this.currentPage,this.currentPageSize)).items)}shouldSendPaginationRequest(e,s){return this.currentPage!==e||this.currentPageSize!==s}async loadRows(){return this.loadedRows=(await this.service.fetchRows()).items,this.loadedRows}getData(){return this.service.getData()}async handleSort(e){return await this.service.sort(e)}async handlePagination(e,s){return await this.service.paginate(e,s)}getItemCountPerPage(){return De.DEFAULT_ITEM_COUNT_PER_PAGE}isLoading(){const e=this.getLoadingStatuses();return e.has(p.Search)||e.has(p.FetchList)||e.has(p.Sort)||e.has(p.FetchLastItems)||e.has(p.FetchPreviousItems)}getLoadingStatuses(){return this.getData().loadingStatus}hasAnyAction(){for(const e of this.loadedRows)if(this.getAccessedActions(e).length)return!0;return!1}getAccessedActions(e){return this.filterItemsBaseOnAccessLevel(this.getActions(e))}getActions(e){return[]}getScrollDetail(){return null}isExpandable(){return!1}async handleClick(e){}async handleMetaClick(e){}async handleDoubleClick(e){}async onDestroy(){}async loadHeader(){throw new Error("No header provided for the table.")}loadSummarySchema(){return{summaryTitle:"",summaryItems:[]}}}class et{constructor(e){this.observers=[],this.next(e)}attach(e){this.observers.push(e)}detach(e){this.observers=this.observers.filter(s=>s!==e)}notify(){for(const e of this.observers)typeof e=="function"?e(this._value):e.update(this._value)}next(e){typeof e=="function"?this._value=e(this._value):this._value=e,this.notify()}getValue(){return this._value}}class es extends Qe{constructor(e){super(e),this.selectedRows=new et(new Map),this.rowSelect=this.rowSelect.bind(this),this.selectAll=this.selectAll.bind(this),this.isEveryRowSelected=this.isEveryRowSelected.bind(this),this.handlePagination=this.handlePagination.bind(this),this.clearAllSelectedItems=this.clearAllSelectedItems.bind(this),this.getSelectedRows=this.getSelectedRows.bind(this),this.getSelectedRowsAsArray=this.getSelectedRowsAsArray.bind(this),this.getSelectedRowIds=this.getSelectedRowIds.bind(this)}rowSelect(e){this.getSelectedRowsValue().has(e.id)?(this.getSelectedRowsValue().delete(e.id),this.selectedRows.next(this.selectedRows.getValue())):(this.selectedRows.getValue().set(e.id,e),this.selectedRows.next(this.selectedRows.getValue()))}selectAll(){if(this.isEveryRowSelected())this.clearAllSelectedItems();else for(const e of this.loadedRows)this.selectedRows.getValue().set(e.id,e),this.selectedRows.next(this.selectedRows.getValue())}isEveryRowSelected(){return this.getSelectedRowsValue().size===this.currentPageSize||this.loadedRows.length===this.getSelectedRowsValue().size}async handlePagination(e,s){return this.clearAllSelectedItems(),await super.handlePagination(e,s)}async handleSort(e){return this.clearAllSelectedItems(),await super.handleSort(e)}clearAllSelectedItems(){this.selectedRows.getValue().clear(),this.selectedRows.next(this.selectedRows.getValue())}getSelectedRows(){return this.selectedRows}getSelectedRowsAsArray(){return Array.from(this.selectedRows.getValue().values())}getSelectedRowIds(){return Array.from(this.selectedRows.getValue().keys())}getSelectedRowsValue(){return this.selectedRows.getValue()}}function ts(t){return{...Xe,...t}}function ss(t){return function(s,r){s.constructor.prototype.headers||(s.constructor.prototype.headers=[]),s.constructor.prototype.headers.push({path:r,...t})}}function rs(t){return function(s){async function r(){return s.prototype._table=this,s.prototype.headers}function i(d){const u=[],y=s.prototype.actions||[];for(const m of y){if(!m.isAvailable(d))continue;const h={handler:m.handler.bind(d),accessLevel:m.accessLevel,actionName:m.actionName};u.push(h)}return u}async function n(d){s.prototype.rowClick&&await s.prototype.rowClick.call(d)}async function o(){s.prototype.tableDestroy&&await s.prototype.tableDestroy()}t.prototype.loadHeader=r,t.prototype.getActions=i,t.prototype.handleClick=n,t.prototype.onDestroy=o}}function as(t){return function(s,r,i){s.constructor.prototype.actions||(s.constructor.prototype.actions=[]),t.handler=i.value,s.constructor.prototype.actions.push(t)}}function is(){return function(e,s,r){e.constructor.prototype.tableDestroy=r.value}}function ns(){return function(e,s,r){e.constructor.prototype.rowClick=r.value}}function tt(){const t=g.ref(new Map),e=g.ref(0),s=g.ref(null),r=g.computed(()=>Array.from(t.value.values()));function i(v){e.value=v}function n(v){for(const S of v)o(S)}function o(v){t.value.set(v.id,v)}function d(v){return s.value=t.value.get(v)||null,s.value}function u(v){const S=d(v);return S&&t.value.delete(v),!!S}function y(){t.value.clear()}function m(v){s.value=v}function h(){s.value=null}return{itemsAsArray:r,totalCount:e,currentItem:s,setTotalCount:i,addOrReplaceItems:n,getById:d,removeById:u,clearItems:y,setCurrentItem:m,clearCurrentItem:h}}class st{constructor(){this.pageNumber=1,this.itemCount=20,this.sortDetail=new Ce("id",O.DESC),this.filters=[]}}class os{constructor(e,s){this.items=e,this.totalItems=s}}class ls{constructor(e,s){this.shouldKeepSync=e,this.intervalInMillisecond=s}}const rt=new st;function at(){const t=g.ref(structuredClone(rt));function e(){t.value.pageNumber=t.value.pageNumber+1}function s(){t.value.pageNumber=t.value.pageNumber-1}function r(h){t.value.pageNumber=h}function i(h){t.value.itemCount=h}function n(h){t.value.sortDetail.key=h.key,t.value.sortDetail.order=h.order}function o(h){for(const v in h)d(v,h[v])}function d(h,v){const S=t.value.filters.findIndex(A=>A.key===h);S>-1?t.value.filters[S].value=v:t.value.filters.push({key:h,value:v})}function u(h){let v=t.value.filters;v=v.filter(S=>S.key!==h),t.value.filters=v}function y(){const h={page:t.value.pageNumber,count:t.value.itemCount};t.value.sortDetail&&(h.by=t.value.sortDetail.key,h.order=t.value.sortDetail.order);for(const v of t.value.filters)if(v.value)if(typeof v.value=="string"||typeof v.value=="number")h[v.key]=v.value;else{const S=JSON.stringify(v.value);S!=="[]"&&S!=="{}"&&(h[v.key]=S)}return h}function m(){t.value=structuredClone(rt)}return{params:t,setNextPage:e,setPreventPage:s,setPageNumber:r,setItemCount:i,setSortDetail:n,setFilter:d,removeFilter:u,getRequestParams:y,clearParam:m,setFiltersBaseOnRequestBody:o}}function it(){const t=g.ref(new Set),e=g.computed(()=>t.value.has(p.FetchList)),s=g.computed(()=>t.value.has(p.FetchItem)),r=g.computed(()=>t.value.has(p.FetchLastItems)),i=g.computed(()=>t.value.has(p.FetchPreviousItems)),n=g.computed(()=>t.value.has(p.Create)),o=g.computed(()=>t.value.has(p.Update)),d=g.computed(()=>t.value.has(p.Delete)),u=g.computed(()=>t.value.has(p.Search)),y=g.computed(()=>t.value.has(p.Sort));function m(v){t.value.add(v)}function h(v){t.value.delete(v)}return{loadingStatus:t,isFetchingList:e,isFetchingItem:s,isFetchingLastItems:r,isFetchingPreviousItems:i,isCreating:n,isUpdating:o,isDeleting:d,isSearching:u,isSorting:y,setStatus:m,removeStatus:h}}function cs(t){const e=tt(),s=at(),r=it(),i=new be({runAction:async()=>h(p.AutoRefresh)}),n=g.computed(()=>{const l=s.params.value.pageNumber,c=s.params.value.itemCount,f=l*c-c,D=l*c-1,w=[];for(let I=f;I<=D&&e.itemsAsArray.value[I];I++)w.push(e.itemsAsArray.value[I]);return w}),o=g.computed(()=>({totalItems:e.totalCount.value,currentPage:s.params.value.pageNumber,rows:e.itemsAsArray.value,loadingStatus:r.loadingStatus.value,currentPageItems:n.value})),d=g.computed(()=>({getData:y,sort:te,paginate:ge,fetchRows:h})),u=g.computed(()=>t.getSyncDetail());function y(){return o.value}async function m(l){const c=await t.fetchList(l);return e.clearItems(),e.addOrReplaceItems(c.items),e.setTotalCount(c.totalItems),c}async function h(l=p.FetchList){r.setStatus(l);const c=await m(s.getRequestParams());return r.removeStatus(l),c}async function v(){S(),await h()}function S(){if(!u.value.shouldKeepSync)throw new Error("The provided repository does not support auto refresh");i.setupInterval(u.value.intervalInMillisecond)}function A(){i.clearInterval()}async function J(l,c=!0){r.setStatus(p.FetchItem),c&&e.clearCurrentItem();const f=await t.fetchItemById(l);return e.setCurrentItem(f),r.removeStatus(p.FetchItem),f}async function G(l){r.setStatus(p.Create);const c=await t.createItem(l);return c&&e.addOrReplaceItems([c]),r.removeStatus(p.Create),c}async function W(l,c){r.setStatus(p.Update);const f=await t.updateItem(l,c);return f&&e.addOrReplaceItems([f]),r.removeStatus(p.Update),f}async function x(l){return r.setStatus(p.Delete),await t.deleteItem(l),r.removeStatus(p.Delete),e.removeById(l)}async function ke(){s.setNextPage(),r.setStatus(p.FetchLastItems);const l=await m(s.getRequestParams());return r.removeStatus(p.FetchLastItems),l}async function Pe(){s.setPreventPage(),r.setStatus(p.FetchPreviousItems);const l=await m(s.getRequestParams());return r.removeStatus(p.FetchPreviousItems),l}async function ge(l){s.setPageNumber(l),r.setStatus(p.FetchList);const c=await m(s.getRequestParams());return r.removeStatus(p.FetchList),c}async function $e(l){s.setFilter("search",l),r.setStatus(p.Search),e.clearItems();const c=await m(s.getRequestParams());return r.removeStatus(p.Search),c}async function te(l){s.setSortDetail(l),r.setStatus(p.Sort),e.clearItems();const c=await m(s.getRequestParams());return r.removeStatus(p.Sort),c}async function K(){return s.clearParam(),await h()}return g.onBeforeUnmount(()=>{A()}),{loadingStatusManager:r,dataManger:e,paramsManager:s,tableRenderingData:o,fetchList:h,fetchWithAutoRefresh:v,setupAutoRefresh:S,stopAutoRefresh:A,fetchItemById:J,createItem:G,updateItem:W,deleteItem:x,fetchLastItems:ke,fetchPreviousItems:Pe,fetchItemsByPageNumber:ge,search:$e,sort:te,clearFilters:K,tableService:d,currentPageItems:n}}function us(t){const e=g.ref(t),s=g.computed(()=>({getData(){return{totalItems:e.value.length,currentPageItems:e.value,loadingStatus:new Set,rows:e.value,currentPage:1}},async sort(r){return{totalItems:e.value.length,items:e.value}},async fetchRows(){return{totalItems:e.value.length,items:e.value}},async paginate(r,i){return{totalItems:e.value.length,items:e.value}}}));return{tableRows:e,staticTableService:s}}function hs(){const t=g.ref(new Map),e=g.ref(0),s=g.computed(()=>e.value),r=g.computed(()=>Array.from(t.value.values()));function i(m){e.value=m}function n(m){for(const h of m)o(h)}function o(m){t.value.set(String(m.id),m)}function d(m){const h=u(m);return t.value.delete(String(m)),h}function u(m){return t.value.get(String(m))||null}function y(){t.value.clear()}return{entityItemsAsArray:r,addOrReplaceItems:n,removeById:d,getItemById:u,clearItems:y,setTotalCount:i,getTotalCount:s}}class ds{constructor(e,s=500){this.timerId=null,this.debounceTimeout=s,this.action=e}runAction(){this.cancelDebounce(),this.action.runImmediate(),this.timerId=setTimeout(()=>{this.action.runDebounce()},this.debounceTimeout)}cancelDebounce(){this.timerId&&clearTimeout(this.timerId)}}function fs(t){return function(e,s,r){const i=r.value;r.value=async function(...n){try{return await i.apply(this,n)}catch(o){for(const d of t)await d.handleError(o)}}}}function ms(t){return function(e,s,r){const i=r.value;r.value=async function(...n){try{const o=await i.apply(this,n);for(const d of t)d.shouldResolveSuccess(o)&&await d.handleSuccess(o);return o}catch(o){for(const d of t)d.shouldResolveFailure(o)&&await d.handleFailure(o)}}}}class vs{constructor(e,s,r=()=>!0,i=()=>!0){this.successMessageResolver=e,this.failureMessageResolver=s,this.shouldResolveSuccess=r,this.shouldResolveFailure=i}async handleSuccess(e){}async handleFailure(e){}async handleInfo(){}async handleWarning(){}}const R=class R{constructor(){}static GetInstance(){return R.instance||(R.instance=new R),R.instance}static registerHandler(e,s){R.handlers.set(e,s)}handle(e){var i;const s=((i=e.response)==null?void 0:i.status)??0,r=R.handlers.get(s);r&&r.handleError(e)}};R.handlers=new Map,R.instance=null;let Re=R;class gs{constructor(e){this.axiosInstance=e}setBaseURL(e){return this.axiosInstance.defaults.baseURL=e,this}setTimeout(e){return this.axiosInstance.defaults.timeout=e,this}setHeaders(e){return this.axiosInstance.defaults.headers.common=e,this}attachRequestInterceptors(e){return this.axiosInstance.interceptors.request.use(s=>{for(const r of e)r.intercept(s);return s},s=>Promise.reject(s)),this}attachResponseInterceptors(e){return this.axiosInstance.interceptors.response.use(s=>s,s=>{throw e.handle(s),s}),this}build(){return this.axiosInstance}}class ps{constructor(e){this.axiosInstance=e}async get(e,s){return await this.axiosInstance.get(e,s)}async post(e,s,r){return await this.axiosInstance.post(e,s,r)}async patch(e,s,r){return await this.axiosInstance.patch(e,s,r)}async put(e,s,r){return await this.axiosInstance.put(e,s,r)}async delete(e,s){return await this.axiosInstance.delete(e,s)}}class ys{constructor(){this._initializer=[]}setupInitializers(e){this._initializer.push(...e)}initialize(){for(const e of this._initializer)e.initialize()}}const Y=class Y{constructor(){this.jsonConverter=new M.JsonConvert}serializeObject(e,s){return this.jsonConverter.serializeObject(e,s)}deserializeObject(e,s){return this.jsonConverter.deserializeObject(e,s)}deserializeArray(e,s){return this.jsonConverter.deserializeArray(e,s)}tryDeserialize(e,s){for(const r of s)try{return this.deserializeObject(e,r)}catch{}throw new Error("Unable to deserialize object")}static GetInstance(){return Y.Instance||(Y.Instance=new Y),Y.Instance}};Y.Instance=null;let Te=Y;var nt=(t=>(t.Success="success",t.Failure="error",t.Info="info",t.Warning="warning",t))(nt||{}),Ee=(t=>(t.BottomLeft="bottomLeft",t.TopLeft="topLeft",t))(Ee||{});class Ss{constructor(e,s,r){this.placement=Ee.BottomLeft,this.type=e,this.message=s,this.description=r}}const Is=Fe.defineStore(me.Dialog,()=>{const t=g.reactive({dialogComponent:null,width:E.DefaultWidth,height:E.DefaultHeight,props:null,header:""}),e=g.computed(()=>!!t.dialogComponent),s=g.computed(()=>!!t.header);function r(u){t.dialogComponent=u}function i(u){t.header=u}function n(u){if(!e.value)throw new Error("there is no dialog to set props on");t.props=u}function o(u,y){if(!e.value)throw new Error("there is no dialog to set size on");if(u<E.MinimalAvailableSize)throw new Error("negative size not supported");y===E.Width?t.width=u:t.height=u}function d(){t.props=null,t.height=E.DefaultHeight,t.width=E.DefaultWidth,t.header="",t.dialogComponent=null}return{dialogData:t,openDialog:r,clearDialog:d,setSize:o,setDialogHeader:i,setProps:n,isDialogExists:e,hasDefaultHeader:s}}),Ds=Fe.defineStore(me.Drawer,()=>{const t=g.ref(z.Close),e=g.computed(()=>t.value===z.Open);function s(){t.value=z.Close}function r(){t.value=z.Open}return{closeDrawer:s,openDrawer:r,isDrawerOpen:e}});class ws{constructor(){this.observers=[]}attach(e){this.observers.push(e)}detach(e){this.observers=this.observers.filter(s=>s!==e)}notify(){for(const e of this.observers)e.update(this)}}class As{constructor(e){this.mapProcesses=new Map,this.processes=e,this.assignProcessManager()}assignProcessManager(){this.processes.addToManager(this)}setProcessToMap(e){this.mapProcesses.set(e.name,e)}async start(){await this.processes.execute()}async startFrom(e){const s=this.mapProcesses.get(e);if(!s)throw new Error(`Process ${e} not found`);await s.execute()}}class bs{constructor(e,s){this.next=null,this.name=e,this.next=s}addToManager(e){e.setProcessToMap(this),this.next&&this.next.addToManager(e)}}class _s{constructor(){this.checkAccessibility=this.checkAccessibility.bind(this),this.isAccessible=this.isAccessible.bind(this),this.getDestinationRouteName=this.getDestinationRouteName.bind(this)}async checkAccessibility(e,s,r){if(await this.isAccessible(e,s)){r();return}if(await this.getDestinationRouteName()){r({name:await this.getDestinationRouteName()});return}r(!1)}async getDestinationRouteName(){return""}}class Ms{constructor(e,s,r){this.scheduler=new be({runAction:async()=>{await this.fetchList()}}),this.repository=e,this.crudDataManagement=s,this.syncDetail=this.repository.getSyncDetail(),this.paramManager=r,this.syncListWithApi()}async fetchList(){const e=await this.repository.fetchList(this.paramManager.getRequestParams());return this.crudDataManagement.addOrReplaceItems(e.items),this.crudDataManagement.setTotalCount(e.totalItems),e}async fetchItemById(e){const s=await this.repository.fetchItemById(e);return s&&this.crudDataManagement.addOrReplaceItems([s]),s}async createItem(e){const s=await this.repository.createItem(e);return s&&!this.shouldRefreshListAfterCreate()&&this.crudDataManagement.addOrReplaceItems([s]),s&&this.shouldRefreshListAfterCreate()&&await this.fetchList(),s}shouldRefreshListAfterCreate(){return!0}async deleteItem(e){return await this.repository.deleteItem(e)?this.crudDataManagement.removeById(e):null}async updateItem(e,s){const r=await this.repository.updateItem(e,s);return this.shouldRefreshListAfterUpdate()&&r?(await this.fetchList(),this.crudDataManagement.getItemById(e)):r}shouldRefreshListAfterUpdate(){return!0}async removeItem(e){const s=await this.repository.deleteItem(e);return s&&this.shouldRefreshListAfterDelete()&&await this.fetchList(),s?this.crudDataManagement.removeById(e):null}shouldRefreshListAfterDelete(){return!1}syncListWithApi(){this.scheduler.clearInterval(),this.syncDetail.shouldKeepSync&&this.scheduler.setupInterval(this.syncDetail.intervalInMillisecond)}onDestroy(){this.crudDataManagement.clearItems(),this.clearInterval()}clearInterval(){this.scheduler.clearInterval()}}class ot{}class Cs extends ot{search(e,s,r){const i=[];e:for(const n of e)for(const o of r(n))if(B.removeSpacesFromString(String(o).toLowerCase()).indexOf(B.removeSpacesFromString(String(s).toLowerCase()))>-1){i.push(n);continue e}return i}}var Oe=(t=>(t.Hidden="hidden",t.Visible="visible",t))(Oe||{});class Ls{constructor(e){this._visibilityControl=e,this.mangeVisibilityEvent()}mangeVisibilityEvent(){document.addEventListener("visibilitychange",e=>{document.visibilityState===Oe.Hidden?this._visibilityControl.screenInvisible(e):this._visibilityControl.screenVisible(e)})}}var Rs=Object.defineProperty,Ts=Object.getOwnPropertyDescriptor,L=(t,e,s,r)=>{for(var i=r>1?void 0:r?Ts(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Rs(e,s,i),i};a.Amount=class{constructor(){this.value="",this.symbol=""}get tradeValueInNumber(){return Number(this.value)}get truncatedValue(){return this.tradeValueInNumber.toLocaleString("en-US",{maximumFractionDigits:8})}},L([M.JsonProperty("value",String,!0)],a.Amount.prototype,"value",2),L([M.JsonProperty("symbol",String)],a.Amount.prototype,"symbol",2),a.Amount=L([M.JsonObject("Amount")],a.Amount),a.BaseModel=class{getTable(){const e=Object.getPrototypeOf(this)._table;if(!e)throw new Error("No Table found for the model. are you sure decorated the model with @Table() ?");return e}},L([M.JsonProperty("id",Number)],a.BaseModel.prototype,"id",2),a.BaseModel=L([M.JsonObject("BaseModel")],a.BaseModel),a.MinifiedSymbolModel=class extends a.BaseModel{},L([M.JsonProperty("symbol",String)],a.MinifiedSymbolModel.prototype,"symbol",2),L([M.JsonProperty("enName",String)],a.MinifiedSymbolModel.prototype,"enName",2),L([M.JsonProperty("faName",String)],a.MinifiedSymbolModel.prototype,"faName",2),L([M.JsonProperty("image",String)],a.MinifiedSymbolModel.prototype,"image",2),a.MinifiedSymbolModel=L([M.JsonObject("MinifiedSymbolModel")],a.MinifiedSymbolModel);class Es{constructor(e,s){this.requestedDate=e,this.executedDate=s}get requestedDateInJalali(){return C.mapUnixToDate(this.requestedDate,H.SimpleDate)}get requestedTime(){return C.mapUnixToDate(this.requestedDate,H.JustHour)}get executedDateInJalali(){return C.mapUnixToDate(this.executedDate,H.SimpleDate)}get executedDateTime(){return C.mapUnixToDate(this.executedDate,H.JustHour)}}class Os{constructor(e,s){this.requestedAmount=e,this.executedAmount=s}}class ks{constructor(e,s,r,i,n){this.symbolPrice=e,this.USDTPrice=s,this.symobl=r,this.symbolImage=i,this.USDTImage=n}get truncatedSymbolPrice(){return this.symbolPrice.toLocaleString("en-US",{maximumFractionDigits:8})}get truncatedUSDTPrice(){return this.USDTPrice.toLocaleString("en-US",{maximumFractionDigits:8})}}class Ps{constructor(e,s){this.soldSymbol=e,this.buySymbol=s}}a.APIErrorHandlerRegistry=Re,a.AbstractSubject=ws,a.AccessControl=we,a.AccessLevel=ee,a.Action=as,a.ApiBuilder=gs,a.ApplicationDrawerStatus=z,a.ApplicationInitializer=ys,a.AuthorizationDirective=Ae,a.AuthorizationService=ve,a.BaseTable=Qe,a.BehaviorSubject=et,a.CellType=fe,a.ClientArraySearch=Cs,a.ClientSearch=ot,a.Column=ss,a.CommonMaskFormats=re,a.CrudService=Ms,a.DateConverter=F,a.DateDisabledOptions=Ut,a.DateFormat=H,a.DateFormats=Ue,a.DateTools=X,a.DebounceService=ds,a.DialogDimensions=E,a.EveryAccess=Yt,a.EveryLevelAuthorizationDirective=jt,a.Feedback=vs,a.FetchListResponse=os,a.FormManager=Kt,a.FormValidationStatus=Q,a.Formatter=C,a.HandleError=fs,a.HandleFeedback=ms,a.HeaderType=de,a.HttpClient=ps,a.InputControl=Gt,a.InputControlBuilder=Wt,a.InputControlData=Ke,a.JsonMapper=Te,a.LoadingStatus=p,a.Params=st,a.Process=bs,a.ProcessManager=As,a.RangeValue=Nt,a.RouteGuard=_s,a.Scheduler=be,a.SelectableTable=es,a.SimpleSort=Le,a.SomeAccess=Vt,a.SomeLevelsAuthorizationDirective=Ht,a.SortDetail=Ce,a.SortOrder=O,a.SortOrderTableHeader=Ge,a.Sorter=Qt,a.StatusCode=We,a.StorageKeys=k,a.StoreNames=me,a.SymbolInTrade=Ps,a.SymbolPriceInTrade=ks,a.Symbols=xe,a.SyncDetail=ls,a.TABLE_ACTION_COLUMN=Xt,a.TABLE_COLUMN_DEFAULT_COLSPAN=Me,a.TABLE_COLUMN_DEFAULT_VALUES=Xe,a.TABLE_COLUMN_DEFAULT_WIDTH=_e,a.Table=rs,a.TableConstants=De,a.TableDestroy=is,a.TableHeaderAlign=he,a.TableRowClick=ns,a.ToastLocation=Ee,a.ToastMessage=Ss,a.ToastType=nt,a.TouchSensitiveControl=xt,a.TradeAmount=Os,a.TradeDate=Es,a.Util=B,a.VisibilityManager=Ls,a.VisibilityState=Oe,a.cards=Be,a.generateHeader=ts,a.ibans=Ne,a.isEmpty=Ze,a.isLastItem=zt,a.isOnlyOneItem=qt,a.setupJalaliDate=Je,a.setupStore=Jt,a.useCrud=hs,a.useData=tt,a.useDialogService=Is,a.useDrawerService=Ds,a.useForm=Zt,a.useLoadingStatus=it,a.useParams=at,a.useRepository=cs,a.useStaticTableService=us,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -8,6 +8,7 @@ export { TABLE_ACTION_COLUMN, TABLE_COLUMN_DEFAULT_VALUES, TABLE_COLUMN_DEFAULT_
|
|
|
8
8
|
export { BaseTable } from './BaseTable';
|
|
9
9
|
export { SelectableTable } from './SelectableTable';
|
|
10
10
|
export { type TableHeaderSchema, type TableRenderingData, generateHeader, } from './TableHeaderSchema';
|
|
11
|
+
export { type TableSummaryItem, type TableSummarySchema, } from './TableSummarySchema';
|
|
11
12
|
export { Column } from './moduleConnection/Column';
|
|
12
13
|
export { Table } from './moduleConnection/Table';
|
|
13
14
|
export { Action } from './moduleConnection/Action';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { LoadingStatus, DialogDimensions, SortOrder, SortOrderTableHeader, TableHeaderAlign, HeaderType, CellType, TableConstants, ApplicationDrawerStatus, ToastType, ToastLocation, StatusCode, FormValidationStatus, StorageKeys, ApplicationTheme, StoreNames } from './Constants';
|
|
1
|
+
export { LoadingStatus, DialogDimensions, SortOrder, SortOrderTableHeader, TableHeaderAlign, HeaderType, CellType, TableConstants, ApplicationDrawerStatus, ToastType, ToastLocation, StatusCode, FormValidationStatus, StorageKeys, ApplicationTheme, StoreNames, Symbols, } from './Constants';
|