@sarafapp/iron_core 1.0.35 → 1.0.36
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 +1739 -1059
- package/dist/IronCore.umd.cjs +17 -2
- package/dist/src/baseTable/generator/SelectableTableGenerator.d.ts +14 -0
- package/dist/src/baseTable/generator/TableCellComponentRegistry.d.ts +7 -0
- package/dist/src/baseTable/generator/TableConfig.d.ts +6 -0
- package/dist/src/baseTable/generator/TableGenerator.d.ts +36 -0
- package/dist/src/baseTable/generator/TableSource.d.ts +24 -0
- package/dist/src/baseTable/index.d.ts +7 -0
- package/dist/src/baseTable/moduleConnection/generator/GColumn.d.ts +2 -0
- package/dist/src/baseTable/moduleConnection/generator/GTable.d.ts +2 -0
- package/package.json +4 -2
package/dist/IronCore.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { toRaw as
|
|
3
|
-
import { JsonConvert as
|
|
4
|
-
import { defineStore as
|
|
5
|
-
var
|
|
6
|
-
const
|
|
1
|
+
import O from "dayjs";
|
|
2
|
+
import { toRaw as He, reactive as st, ref as C, watch as yt, computed as w, onBeforeUnmount as St } from "vue";
|
|
3
|
+
import { JsonConvert as wt, JsonProperty as U, JsonObject as ke } from "json2typescript";
|
|
4
|
+
import { defineStore as nt } from "pinia";
|
|
5
|
+
var xe = /* @__PURE__ */ ((t) => (t.BankCard = "####-####-####-####", t.Iban = "##-####-####-####-####-####-##", t))(xe || {}), se = /* @__PURE__ */ ((t) => (t.FullDate = "YYYY/M/D HH:mm", t.SimpleDate = "YYYY/M/D", t.CompactGregorianDate = "YYYYMMDD", t.ShortJalaliDate = "YYMM", t.JustHour = "HH:mm:ss", t))(se || {});
|
|
6
|
+
const It = [
|
|
7
7
|
{
|
|
8
8
|
62198619: {
|
|
9
9
|
persian: "بلو",
|
|
@@ -250,7 +250,7 @@ const st = [
|
|
|
250
250
|
english: "agriculture"
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
|
-
],
|
|
253
|
+
], bt = [
|
|
254
254
|
{
|
|
255
255
|
"010": {
|
|
256
256
|
persian: "بانک مرکزی",
|
|
@@ -414,345 +414,345 @@ const st = [
|
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
];
|
|
417
|
-
var
|
|
418
|
-
function
|
|
417
|
+
var Rt = /* @__PURE__ */ ((t) => (t.Normal = "YYYY-MM-DD", t.ContainsHour = "YYYY-MM-DD HH:mm", t.OnlyHour = "HH:mm", t))(Rt || {});
|
|
418
|
+
function De(t) {
|
|
419
419
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
420
420
|
}
|
|
421
|
-
var
|
|
422
|
-
function
|
|
423
|
-
return
|
|
424
|
-
(function(
|
|
425
|
-
t.exports =
|
|
426
|
-
})(
|
|
427
|
-
return function(
|
|
428
|
-
|
|
429
|
-
var
|
|
430
|
-
return this.$utils().u(
|
|
421
|
+
var pe = { exports: {} }, At = pe.exports, ze;
|
|
422
|
+
function Dt() {
|
|
423
|
+
return ze || (ze = 1, function(t, e) {
|
|
424
|
+
(function(r, s) {
|
|
425
|
+
t.exports = s();
|
|
426
|
+
})(At, function() {
|
|
427
|
+
return function(r, s) {
|
|
428
|
+
s.prototype.weekday = function(n) {
|
|
429
|
+
var i = this.$locale().weekStart || 0, a = this.$W, l = (a < i ? a + 7 : a) - i;
|
|
430
|
+
return this.$utils().u(n) ? l : this.subtract(l, "day").add(n, "day");
|
|
431
431
|
};
|
|
432
432
|
};
|
|
433
433
|
});
|
|
434
|
-
}(
|
|
435
|
-
}
|
|
436
|
-
var
|
|
437
|
-
const
|
|
438
|
-
var
|
|
439
|
-
function
|
|
440
|
-
return
|
|
441
|
-
(function(
|
|
442
|
-
t.exports =
|
|
443
|
-
})(
|
|
444
|
-
var
|
|
445
|
-
return function(
|
|
446
|
-
var
|
|
447
|
-
|
|
448
|
-
if (
|
|
449
|
-
var
|
|
434
|
+
}(pe)), pe.exports;
|
|
435
|
+
}
|
|
436
|
+
var _t = Dt();
|
|
437
|
+
const Ct = /* @__PURE__ */ De(_t);
|
|
438
|
+
var ve = { exports: {} }, Mt = ve.exports, Ge;
|
|
439
|
+
function Et() {
|
|
440
|
+
return Ge || (Ge = 1, function(t, e) {
|
|
441
|
+
(function(r, s) {
|
|
442
|
+
t.exports = s();
|
|
443
|
+
})(Mt, function() {
|
|
444
|
+
var r = "week", s = "year";
|
|
445
|
+
return function(n, i, a) {
|
|
446
|
+
var l = i.prototype;
|
|
447
|
+
l.week = function(o) {
|
|
448
|
+
if (o === void 0 && (o = null), o !== null) return this.add(7 * (o - this.week()), "day");
|
|
449
|
+
var u = this.$locale().yearStart || 1;
|
|
450
450
|
if (this.month() === 11 && this.date() > 25) {
|
|
451
|
-
var f =
|
|
452
|
-
if (f.isBefore(
|
|
451
|
+
var f = a(this).startOf(s).add(1, s).date(u), d = a(this).endOf(r);
|
|
452
|
+
if (f.isBefore(d)) return 1;
|
|
453
453
|
}
|
|
454
|
-
var v =
|
|
455
|
-
return
|
|
456
|
-
},
|
|
457
|
-
return
|
|
454
|
+
var v = a(this).startOf(s).date(u).startOf(r).subtract(1, "millisecond"), m = this.diff(v, r, !0);
|
|
455
|
+
return m < 0 ? a(this).startOf("week").week() : Math.ceil(m);
|
|
456
|
+
}, l.weeks = function(o) {
|
|
457
|
+
return o === void 0 && (o = null), this.week(o);
|
|
458
458
|
};
|
|
459
459
|
};
|
|
460
460
|
});
|
|
461
|
-
}(
|
|
462
|
-
}
|
|
463
|
-
var
|
|
464
|
-
const
|
|
465
|
-
var
|
|
466
|
-
function
|
|
467
|
-
return
|
|
468
|
-
(function(
|
|
469
|
-
t.exports =
|
|
470
|
-
})(
|
|
471
|
-
return function(
|
|
472
|
-
|
|
473
|
-
var
|
|
474
|
-
return
|
|
461
|
+
}(ve)), ve.exports;
|
|
462
|
+
}
|
|
463
|
+
var xt = Et();
|
|
464
|
+
const Ot = /* @__PURE__ */ De(xt);
|
|
465
|
+
var ge = { exports: {} }, Lt = ge.exports, Je;
|
|
466
|
+
function Tt() {
|
|
467
|
+
return Je || (Je = 1, function(t, e) {
|
|
468
|
+
(function(r, s) {
|
|
469
|
+
t.exports = s();
|
|
470
|
+
})(Lt, function() {
|
|
471
|
+
return function(r, s) {
|
|
472
|
+
s.prototype.weekYear = function() {
|
|
473
|
+
var n = this.month(), i = this.week(), a = this.year();
|
|
474
|
+
return i === 1 && n === 11 ? a + 1 : n === 0 && i >= 52 ? a - 1 : a;
|
|
475
475
|
};
|
|
476
476
|
};
|
|
477
477
|
});
|
|
478
|
-
}(
|
|
479
|
-
}
|
|
480
|
-
var
|
|
481
|
-
const
|
|
482
|
-
var
|
|
483
|
-
function
|
|
484
|
-
return
|
|
485
|
-
(function(
|
|
486
|
-
t.exports =
|
|
487
|
-
})(
|
|
488
|
-
function
|
|
489
|
-
return
|
|
478
|
+
}(ge)), ge.exports;
|
|
479
|
+
}
|
|
480
|
+
var Pt = Tt();
|
|
481
|
+
const kt = /* @__PURE__ */ De(Pt);
|
|
482
|
+
var me = { exports: {} }, $t = me.exports, We;
|
|
483
|
+
function Vt() {
|
|
484
|
+
return We || (We = 1, function(t, e) {
|
|
485
|
+
(function(r, s) {
|
|
486
|
+
t.exports = s(O);
|
|
487
|
+
})($t, function(r) {
|
|
488
|
+
function s(a) {
|
|
489
|
+
return a && typeof a == "object" && "default" in a ? a : { default: a };
|
|
490
490
|
}
|
|
491
|
-
var
|
|
492
|
-
return
|
|
491
|
+
var n = s(r), i = { name: "fa", weekdays: "یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"), weekdaysShort: "یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"), weekdaysMin: "ی_د_س_چ_پ_ج_ش".split("_"), weekStart: 6, months: "ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"), monthsShort: "ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"), ordinal: function(a) {
|
|
492
|
+
return a;
|
|
493
493
|
}, 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 سال" } };
|
|
494
|
-
return
|
|
494
|
+
return n.default.locale(i, null, !0), i;
|
|
495
495
|
});
|
|
496
|
-
}(
|
|
496
|
+
}(me)), me.exports;
|
|
497
497
|
}
|
|
498
|
-
var
|
|
499
|
-
const
|
|
500
|
-
function
|
|
501
|
-
return
|
|
498
|
+
var Nt = Vt();
|
|
499
|
+
const Ft = /* @__PURE__ */ De(Nt);
|
|
500
|
+
function ce(t, e) {
|
|
501
|
+
return jt(t) || Yt(t, e) || Bt();
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function jt(t) {
|
|
504
504
|
if (Array.isArray(t)) return t;
|
|
505
505
|
}
|
|
506
|
-
function
|
|
507
|
-
var
|
|
506
|
+
function Yt(t, e) {
|
|
507
|
+
var r = [], s = !0, n = !1, i = void 0;
|
|
508
508
|
try {
|
|
509
|
-
for (var
|
|
509
|
+
for (var a = t[Symbol.iterator](), l; !(s = (l = a.next()).done) && (r.push(l.value), !(e && r.length === e)); s = !0)
|
|
510
510
|
;
|
|
511
|
-
} catch (
|
|
512
|
-
|
|
511
|
+
} catch (o) {
|
|
512
|
+
n = !0, i = o;
|
|
513
513
|
} finally {
|
|
514
514
|
try {
|
|
515
|
-
!
|
|
515
|
+
!s && a.return != null && a.return();
|
|
516
516
|
} finally {
|
|
517
|
-
if (
|
|
517
|
+
if (n) throw i;
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
|
-
return
|
|
520
|
+
return r;
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function Bt() {
|
|
523
523
|
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
524
524
|
}
|
|
525
|
-
function
|
|
525
|
+
function it(t, e, r) {
|
|
526
526
|
e <= 2 && (t -= 1, e += 12);
|
|
527
|
-
var
|
|
528
|
-
return
|
|
527
|
+
var s = Math.floor(t / 100), n = 2 - s + Math.floor(s / 4), i = Math.floor(365.25 * (t + 4716)) + Math.floor(30.6001 * (e + 1)) + r + n - 1524.5;
|
|
528
|
+
return i;
|
|
529
529
|
}
|
|
530
|
-
function
|
|
530
|
+
function Ut(t) {
|
|
531
531
|
t = t + 0.5;
|
|
532
|
-
var e = Math.floor(t),
|
|
532
|
+
var e = Math.floor(t), r = t - e, s = e;
|
|
533
533
|
if (e >= 2299161) {
|
|
534
|
-
var
|
|
535
|
-
|
|
534
|
+
var n = Math.floor((e - 186721625e-2) / 36524.25);
|
|
535
|
+
s = e + 1 + n - Math.floor(n / 4);
|
|
536
536
|
}
|
|
537
|
-
var
|
|
538
|
-
return
|
|
537
|
+
var i = s + 1524, a = Math.floor((i - 122.1) / 365.25), l = Math.floor(365.25 * a), o = Math.floor((i - l) / 30.6001), u = i - l - Math.floor(30.6001 * o) + r, f = o < 14 ? o - 1 : o - 13, d = f > 2 ? a - 4716 : a - 4715;
|
|
538
|
+
return zt(d, f, u);
|
|
539
539
|
}
|
|
540
|
-
function
|
|
540
|
+
function qt(t) {
|
|
541
541
|
t = t + 0.5;
|
|
542
|
-
var e = Math.floor(t),
|
|
542
|
+
var e = Math.floor(t), r = t - e, s = e;
|
|
543
543
|
if (e >= 2299161) {
|
|
544
|
-
var
|
|
545
|
-
|
|
544
|
+
var n = Math.floor((e - 186721625e-2) / 36524.25);
|
|
545
|
+
s = e + 1 + n - Math.floor(n / 4);
|
|
546
546
|
}
|
|
547
|
-
var
|
|
548
|
-
return [Math.floor(
|
|
547
|
+
var i = s + 1524, a = Math.floor((i - 122.1) / 365.25), l = Math.floor(365.25 * a), o = Math.floor((i - l) / 30.6001), u = i - l - Math.floor(30.6001 * o) + r, f = o < 14 ? o - 1 : o - 13, d = f > 2 ? a - 4716 : a - 4715;
|
|
548
|
+
return [Math.floor(d), Math.floor(f), Math.floor(u)];
|
|
549
549
|
}
|
|
550
|
-
function
|
|
551
|
-
var
|
|
552
|
-
function
|
|
553
|
-
return Math.floor(
|
|
550
|
+
function Ht(t, e, r) {
|
|
551
|
+
var s = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], n = [31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29];
|
|
552
|
+
function i(m, b) {
|
|
553
|
+
return Math.floor(m / b);
|
|
554
554
|
}
|
|
555
555
|
t -= 979;
|
|
556
|
-
for (var
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
var
|
|
560
|
-
|
|
556
|
+
for (var a = 365 * t + i(t, 33) * 8 + i(t % 33 + 3, 4), l = 0; l < e - 1; ++l)
|
|
557
|
+
a += n[l];
|
|
558
|
+
a += r - 1;
|
|
559
|
+
var o = a + 79, u = 1600 + 400 * i(o, 146097);
|
|
560
|
+
o = o % 146097;
|
|
561
561
|
var f = !0;
|
|
562
|
-
for (
|
|
563
|
-
|
|
564
|
-
var
|
|
565
|
-
return
|
|
566
|
-
}
|
|
567
|
-
function
|
|
568
|
-
var
|
|
569
|
-
function
|
|
570
|
-
return Math.floor(
|
|
571
|
-
}
|
|
572
|
-
for (var
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
var
|
|
576
|
-
|
|
577
|
-
var
|
|
578
|
-
|
|
579
|
-
for (var
|
|
580
|
-
|
|
581
|
-
var
|
|
582
|
-
return [
|
|
583
|
-
}
|
|
584
|
-
var
|
|
585
|
-
J: function(e,
|
|
586
|
-
return
|
|
587
|
-
},
|
|
588
|
-
G: function(e,
|
|
589
|
-
return
|
|
590
|
-
}
|
|
591
|
-
},
|
|
562
|
+
for (o >= 36525 && (o--, u += 100 * i(o, 36524), o = o % 36524, o >= 365 ? o++ : f = !1), u += 4 * i(o, 1461), o %= 1461, o >= 366 && (f = !1, o--, u += i(o, 365), o = o % 365), l = 0; o >= s[l] + (l == 1 && f); l++)
|
|
563
|
+
o -= s[l] + (l == 1 && f);
|
|
564
|
+
var d = l + 1, v = o + 1;
|
|
565
|
+
return it(u, d, v);
|
|
566
|
+
}
|
|
567
|
+
function zt(t, e, r) {
|
|
568
|
+
var s = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], n = [31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29];
|
|
569
|
+
function i(z, G) {
|
|
570
|
+
return Math.floor(z / G);
|
|
571
|
+
}
|
|
572
|
+
for (var a = t - 1600, l = e - 1, o = r - 1, u = 365 * a + i(a + 3, 4) - i(a + 99, 100) + i(a + 399, 400), f = 0; f < l; ++f)
|
|
573
|
+
u += s[f];
|
|
574
|
+
l > 1 && (t % 4 == 0 && t % 100 != 0 || t % 400 == 0) && u++, u += o;
|
|
575
|
+
var d = u - 79, v = i(d, 12053);
|
|
576
|
+
d %= 12053;
|
|
577
|
+
var m = 979 + 33 * v + 4 * i(d, 1461);
|
|
578
|
+
d %= 1461, d >= 366 && (m += i(d - 1, 365), d = (d - 1) % 365);
|
|
579
|
+
for (var b = 0; b < 11 && d >= n[b]; ++b)
|
|
580
|
+
d -= n[b];
|
|
581
|
+
var q = b + 1, H = d + 1;
|
|
582
|
+
return [m, q, H];
|
|
583
|
+
}
|
|
584
|
+
var he = {
|
|
585
|
+
J: function(e, r, s) {
|
|
586
|
+
return Ut(it(e, r, s));
|
|
587
|
+
},
|
|
588
|
+
G: function(e, r, s) {
|
|
589
|
+
return qt(Ht(e, r, s));
|
|
590
|
+
}
|
|
591
|
+
}, Gt = /^(\d{4})[-/]?(\d{1,2})[-/]?(\d{0,2})(.*)?$/, Jt = /\[.*?\]|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, Ee = "date", K = "day", k = "month", $ = "year", Ke = "week", Wt = "YYYY-MM-DDTHH:mm:ssZ", Kt = {
|
|
592
592
|
jmonths: "فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_")
|
|
593
|
-
},
|
|
594
|
-
var
|
|
595
|
-
return
|
|
596
|
-
},
|
|
593
|
+
}, Zt = function(t, e, r) {
|
|
594
|
+
var s = e.prototype, n = s.$utils(), i = function(h) {
|
|
595
|
+
return h.$C === "jalali";
|
|
596
|
+
}, a = n.prettyUnit || n.p, l = n.isUndefined || n.u, o = n.padStart || n.s, u = n.monthDiff || n.m, f = n.absFloor || n.a, d = function(h) {
|
|
597
597
|
return function() {
|
|
598
|
-
var
|
|
599
|
-
return
|
|
598
|
+
var p = h.bind(this).apply(void 0, arguments);
|
|
599
|
+
return p.$C = this.$C, p.isJalali() && p.InitJalali(), p;
|
|
600
600
|
};
|
|
601
601
|
};
|
|
602
|
-
|
|
603
|
-
var v =
|
|
604
|
-
|
|
605
|
-
return
|
|
606
|
-
},
|
|
607
|
-
var
|
|
608
|
-
return
|
|
609
|
-
},
|
|
610
|
-
return
|
|
611
|
-
},
|
|
612
|
-
var
|
|
613
|
-
return
|
|
614
|
-
locale:
|
|
615
|
-
utc:
|
|
616
|
-
calendar:
|
|
602
|
+
s.startOf = d(s.startOf), s.endOf = d(s.endOf), s.add = d(s.add), s.subtract = d(s.subtract), s.set = d(s.set);
|
|
603
|
+
var v = s.parse, m = s.init, b = s.startOf, q = s.$set, H = s.add, z = s.format, G = s.diff, _e = s.year, Ce = s.month, ae = s.date, Me = s.daysInMonth, te = s.toArray;
|
|
604
|
+
r.$C = "gregory", r.$fdow = 6, r.calendar = function(c) {
|
|
605
|
+
return r.$C = c, r;
|
|
606
|
+
}, s.calendar = function(c) {
|
|
607
|
+
var h = this.clone();
|
|
608
|
+
return h.$C = c, h.isJalali() && h.InitJalali(), h;
|
|
609
|
+
}, s.isJalali = function() {
|
|
610
|
+
return i(this);
|
|
611
|
+
}, r.en.jmonths = "Farvardin_Ordibehesht_Khordaad_Tir_Mordaad_Shahrivar_Mehr_Aabaan_Aazar_Dey_Bahman_Esfand".split("_"), r.locale("fa", Object.assign({}, Ft, {}, Kt), !0);
|
|
612
|
+
var J = function(h, p) {
|
|
613
|
+
return r(h, {
|
|
614
|
+
locale: p.$L,
|
|
615
|
+
utc: p.$u,
|
|
616
|
+
calendar: p.$C
|
|
617
617
|
});
|
|
618
618
|
};
|
|
619
|
-
|
|
620
|
-
var
|
|
621
|
-
|
|
622
|
-
},
|
|
623
|
-
var
|
|
624
|
-
if (this.$C =
|
|
625
|
-
var
|
|
626
|
-
|
|
627
|
-
}
|
|
628
|
-
return v.bind(this)(
|
|
629
|
-
},
|
|
630
|
-
var
|
|
631
|
-
this.$jy =
|
|
632
|
-
},
|
|
633
|
-
var
|
|
634
|
-
if (!
|
|
635
|
-
return
|
|
636
|
-
var
|
|
637
|
-
var
|
|
638
|
-
return (
|
|
639
|
-
},
|
|
640
|
-
switch (
|
|
619
|
+
s.init = function() {
|
|
620
|
+
var c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
621
|
+
m.bind(this)(c), this.isJalali() && this.InitJalali();
|
|
622
|
+
}, s.parse = function(c) {
|
|
623
|
+
var h;
|
|
624
|
+
if (this.$C = c.calendar || this.$C || r.$C, c.jalali && typeof c.date == "string" && /.*[^Z]$/i.test(c.date) && (h = c.date.match(Gt))) {
|
|
625
|
+
var p = he.G(parseInt(h[1], 10), parseInt(h[2], 10), parseInt(h[3] || 1, 10)), S = ce(p, 3), I = S[0], y = S[1], R = S[2];
|
|
626
|
+
c.date = "".concat(I, "-").concat(y, "-").concat(R).concat(h[4] || "");
|
|
627
|
+
}
|
|
628
|
+
return v.bind(this)(c);
|
|
629
|
+
}, s.InitJalali = function() {
|
|
630
|
+
var c = he.J(this.$y, this.$M + 1, this.$D), h = ce(c, 3), p = h[0], S = h[1], I = h[2];
|
|
631
|
+
this.$jy = p, this.$jM = S - 1, this.$jD = I;
|
|
632
|
+
}, s.startOf = function(c, h) {
|
|
633
|
+
var p = this;
|
|
634
|
+
if (!i(this))
|
|
635
|
+
return b.bind(this)(c, h);
|
|
636
|
+
var S = l(h) ? !0 : h, I = a(c), y = function(W, T) {
|
|
637
|
+
var E = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : p.$jy, le = he.G(E, T + 1, W), P = ce(le, 3), re = P[0], ue = P[1], mt = P[2], qe = J(new Date(re, ue - 1, mt), p);
|
|
638
|
+
return (S ? qe : qe.endOf(K)).$set("hour", 1);
|
|
639
|
+
}, R = (this.$W + (7 - r.$fdow)) % 7;
|
|
640
|
+
switch (I) {
|
|
641
|
+
case $:
|
|
642
|
+
return S ? y(1, 0) : y(0, 0, this.$jy + 1);
|
|
641
643
|
case k:
|
|
642
|
-
return
|
|
643
|
-
case
|
|
644
|
-
return
|
|
645
|
-
case $e:
|
|
646
|
-
return I ? y(this.$jD - b, this.$jM) : y(this.$jD + (6 - b), this.$jM);
|
|
644
|
+
return S ? y(1, this.$jM) : y(0, (this.$jM + 1) % 12, this.$jy + parseInt((this.$jM + 1) / 12, 10));
|
|
645
|
+
case Ke:
|
|
646
|
+
return S ? y(this.$jD - R, this.$jM) : y(this.$jD + (6 - R), this.$jM);
|
|
647
647
|
default:
|
|
648
|
-
return
|
|
649
|
-
}
|
|
650
|
-
},
|
|
651
|
-
var
|
|
652
|
-
if (!
|
|
653
|
-
return
|
|
654
|
-
var
|
|
655
|
-
var
|
|
656
|
-
return
|
|
648
|
+
return b.bind(this)(c, h);
|
|
649
|
+
}
|
|
650
|
+
}, s.$set = function(c, h) {
|
|
651
|
+
var p = this;
|
|
652
|
+
if (!i(this))
|
|
653
|
+
return q.bind(this)(c, h);
|
|
654
|
+
var S = a(c), I = function(R, oe) {
|
|
655
|
+
var W = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : p.$jy, T = he.G(W, oe + 1, R), E = ce(T, 3), le = E[0], P = E[1], re = E[2];
|
|
656
|
+
return p.$d.setFullYear(le), p.$d.setMonth(P - 1), p.$d.setDate(re), p;
|
|
657
657
|
};
|
|
658
|
-
switch (
|
|
659
|
-
case
|
|
660
|
-
case
|
|
661
|
-
|
|
662
|
-
break;
|
|
663
|
-
case E:
|
|
664
|
-
w(this.$jD, l);
|
|
658
|
+
switch (S) {
|
|
659
|
+
case Ee:
|
|
660
|
+
case K:
|
|
661
|
+
I(h, this.$jM);
|
|
665
662
|
break;
|
|
666
663
|
case k:
|
|
667
|
-
|
|
664
|
+
I(this.$jD, h);
|
|
665
|
+
break;
|
|
666
|
+
case $:
|
|
667
|
+
I(this.$jD, this.$jM, h);
|
|
668
668
|
break;
|
|
669
669
|
default:
|
|
670
|
-
return
|
|
670
|
+
return q.bind(this)(c, h);
|
|
671
671
|
}
|
|
672
672
|
return this.init(), this;
|
|
673
|
-
},
|
|
674
|
-
var
|
|
675
|
-
if (!
|
|
676
|
-
return
|
|
677
|
-
|
|
678
|
-
var
|
|
679
|
-
var
|
|
680
|
-
return
|
|
673
|
+
}, s.add = function(c, h) {
|
|
674
|
+
var p = this;
|
|
675
|
+
if (!i(this))
|
|
676
|
+
return H.bind(this)(c, h);
|
|
677
|
+
c = Number(c);
|
|
678
|
+
var S = h && (h.length === 1 || h === "ms") ? h : a(h), I = function(P, re) {
|
|
679
|
+
var ue = p.set(Ee, 1).set(P, re + c);
|
|
680
|
+
return ue.set(Ee, Math.min(p.$jD, ue.daysInMonth()));
|
|
681
681
|
};
|
|
682
|
-
if (["M",
|
|
683
|
-
var y = this.$jM +
|
|
684
|
-
return
|
|
685
|
-
}
|
|
686
|
-
if (["y",
|
|
687
|
-
return
|
|
688
|
-
if (["d",
|
|
689
|
-
var
|
|
690
|
-
return
|
|
691
|
-
}
|
|
692
|
-
if (["w",
|
|
693
|
-
var
|
|
694
|
-
return
|
|
695
|
-
}
|
|
696
|
-
return
|
|
697
|
-
},
|
|
698
|
-
var
|
|
699
|
-
if (!
|
|
700
|
-
return
|
|
701
|
-
var
|
|
702
|
-
return
|
|
703
|
-
if (
|
|
704
|
-
switch (
|
|
682
|
+
if (["M", k].indexOf(S) > -1) {
|
|
683
|
+
var y = this.$jM + c, R = y < 0 ? -Math.ceil(-y / 12) : Math.floor(y / 12), oe = this.$jD, W = this.set(K, 1).add(R, $).set(k, y - R * 12);
|
|
684
|
+
return W.set(K, Math.min(W.daysInMonth(), oe));
|
|
685
|
+
}
|
|
686
|
+
if (["y", $].indexOf(S) > -1)
|
|
687
|
+
return I($, this.$jy);
|
|
688
|
+
if (["d", K].indexOf(S) > -1) {
|
|
689
|
+
var T = new Date(this.$d);
|
|
690
|
+
return T.setDate(T.getDate() + c), J(T, this);
|
|
691
|
+
}
|
|
692
|
+
if (["w", Ke].indexOf(S) > -1) {
|
|
693
|
+
var E = new Date(this.$d);
|
|
694
|
+
return E.setDate(E.getDate() + c * 7), J(E, this);
|
|
695
|
+
}
|
|
696
|
+
return H.bind(this)(c, h);
|
|
697
|
+
}, s.format = function(c, h) {
|
|
698
|
+
var p = this;
|
|
699
|
+
if (!i(this))
|
|
700
|
+
return z.bind(this)(c, h);
|
|
701
|
+
var S = c || Wt, I = h || this.$locale(), y = I.jmonths;
|
|
702
|
+
return S.replace(Jt, function(R) {
|
|
703
|
+
if (R.indexOf("[") > -1) return R.replace(/\[|\]/g, "");
|
|
704
|
+
switch (R) {
|
|
705
705
|
case "YY":
|
|
706
|
-
return String(
|
|
706
|
+
return String(p.$jy).slice(-2);
|
|
707
707
|
case "YYYY":
|
|
708
|
-
return String(
|
|
708
|
+
return String(p.$jy);
|
|
709
709
|
case "M":
|
|
710
|
-
return String(
|
|
710
|
+
return String(p.$jM + 1);
|
|
711
711
|
case "MM":
|
|
712
|
-
return
|
|
712
|
+
return o(p.$jM + 1, 2, "0");
|
|
713
713
|
case "MMM":
|
|
714
|
-
return y[
|
|
714
|
+
return y[p.$jM].slice(0, 3);
|
|
715
715
|
case "MMMM":
|
|
716
|
-
return y[
|
|
716
|
+
return y[p.$jM];
|
|
717
717
|
case "D":
|
|
718
|
-
return String(
|
|
718
|
+
return String(p.$jD);
|
|
719
719
|
case "DD":
|
|
720
|
-
return
|
|
720
|
+
return o(p.$jD, 2, "0");
|
|
721
721
|
default:
|
|
722
|
-
return
|
|
722
|
+
return z.bind(p)(R, h);
|
|
723
723
|
}
|
|
724
724
|
});
|
|
725
|
-
},
|
|
726
|
-
if (!
|
|
727
|
-
return
|
|
728
|
-
var
|
|
729
|
-
switch (
|
|
730
|
-
case
|
|
725
|
+
}, s.diff = function(c, h, p) {
|
|
726
|
+
if (!i(this))
|
|
727
|
+
return G.bind(this)(c, h, p);
|
|
728
|
+
var S = a(h), I = r(c), y = u(this, I);
|
|
729
|
+
switch (S) {
|
|
730
|
+
case $:
|
|
731
731
|
y /= 12;
|
|
732
732
|
break;
|
|
733
|
-
case
|
|
733
|
+
case k:
|
|
734
734
|
break;
|
|
735
735
|
default:
|
|
736
|
-
return
|
|
737
|
-
}
|
|
738
|
-
return
|
|
739
|
-
},
|
|
740
|
-
return
|
|
741
|
-
},
|
|
742
|
-
return
|
|
743
|
-
},
|
|
744
|
-
return
|
|
745
|
-
},
|
|
746
|
-
return
|
|
747
|
-
},
|
|
748
|
-
return
|
|
749
|
-
},
|
|
750
|
-
return
|
|
751
|
-
}),
|
|
752
|
-
return
|
|
736
|
+
return G.bind(this)(c, h, p);
|
|
737
|
+
}
|
|
738
|
+
return p ? y : f(y);
|
|
739
|
+
}, s.$g = function(c, h, p) {
|
|
740
|
+
return l(c) ? this[h] : this.set(p, c);
|
|
741
|
+
}, s.year = function(c) {
|
|
742
|
+
return i(this) ? this.$g(c, "$jy", $) : _e.bind(this)(c);
|
|
743
|
+
}, s.month = function(c) {
|
|
744
|
+
return i(this) ? this.$g(c, "$jM", k) : Ce.bind(this)(c);
|
|
745
|
+
}, s.date = function(c) {
|
|
746
|
+
return i(this) ? this.$g(c, "$jD", K) : ae.bind(this)(c);
|
|
747
|
+
}, s.daysInMonth = function() {
|
|
748
|
+
return i(this) ? this.endOf(k).$jD : Me.bind(this)();
|
|
749
|
+
}, te && (s.toArray = function() {
|
|
750
|
+
return i(this) ? [this.$jy, this.$jM, this.$jD, this.$H, this.$m, this.$s, this.$ms] : te.bind(this)();
|
|
751
|
+
}), s.clone = function() {
|
|
752
|
+
return J(this.toDate(), this);
|
|
753
753
|
};
|
|
754
754
|
};
|
|
755
|
-
const
|
|
755
|
+
const Xt = {
|
|
756
756
|
ordinal(t) {
|
|
757
757
|
},
|
|
758
758
|
relativeTime: void 0,
|
|
@@ -774,20 +774,20 @@ const kt = {
|
|
|
774
774
|
LLLL: "dddd, D MMMM YYYY HH:mm"
|
|
775
775
|
}
|
|
776
776
|
};
|
|
777
|
-
function
|
|
778
|
-
|
|
777
|
+
function Qt() {
|
|
778
|
+
O.extend(Zt), O.calendar("jalali"), O.extend(Ct), O.extend(Ot), O.extend(kt), O.locale(Xt, {}, !0);
|
|
779
779
|
}
|
|
780
|
-
class
|
|
781
|
-
constructor(e,
|
|
782
|
-
this.start = e, this.end =
|
|
780
|
+
class Yr {
|
|
781
|
+
constructor(e, r) {
|
|
782
|
+
this.start = e, this.end = r;
|
|
783
783
|
}
|
|
784
784
|
}
|
|
785
|
-
class
|
|
786
|
-
constructor(e,
|
|
787
|
-
this.maxDate = e, this.minDate =
|
|
785
|
+
class Br {
|
|
786
|
+
constructor(e, r, s) {
|
|
787
|
+
this.maxDate = e, this.minDate = r, this.disabledDates = s;
|
|
788
788
|
}
|
|
789
789
|
}
|
|
790
|
-
class
|
|
790
|
+
class Z {
|
|
791
791
|
static standardToUnix(e) {
|
|
792
792
|
return Math.floor(new Date(e).getTime() / 1e3);
|
|
793
793
|
}
|
|
@@ -795,115 +795,115 @@ class G {
|
|
|
795
795
|
return new Date(e * 1e3).toString();
|
|
796
796
|
}
|
|
797
797
|
static getUnixEndOfDayInUnix(e) {
|
|
798
|
-
return
|
|
798
|
+
return O.unix(e).endOf("day").unix();
|
|
799
799
|
}
|
|
800
800
|
}
|
|
801
|
-
class
|
|
802
|
-
static isDateDisabled(e,
|
|
803
|
-
for (const
|
|
804
|
-
if (
|
|
805
|
-
return !!(e.maxDate &&
|
|
801
|
+
class ye {
|
|
802
|
+
static isDateDisabled(e, r) {
|
|
803
|
+
for (const s of e.disabledDates)
|
|
804
|
+
if (ye.areUnixesInSameDate(s, r.unix())) return !0;
|
|
805
|
+
return !!(e.maxDate && ye.isDateGraterOrSame(e.maxDate, r.unix()) || e.minDate && ye.isDateLowerOrSame(e.minDate, r.unix()));
|
|
806
806
|
}
|
|
807
|
-
static areUnixesInSameDate(e,
|
|
808
|
-
return
|
|
807
|
+
static areUnixesInSameDate(e, r) {
|
|
808
|
+
return Z.getUnixEndOfDayInUnix(e) === Z.getUnixEndOfDayInUnix(r);
|
|
809
809
|
}
|
|
810
|
-
static isDateGraterOrSame(e,
|
|
811
|
-
return
|
|
810
|
+
static isDateGraterOrSame(e, r) {
|
|
811
|
+
return Z.getUnixEndOfDayInUnix(r) >= Z.getUnixEndOfDayInUnix(e);
|
|
812
812
|
}
|
|
813
|
-
static isDateLowerOrSame(e,
|
|
814
|
-
return
|
|
813
|
+
static isDateLowerOrSame(e, r) {
|
|
814
|
+
return Z.getUnixEndOfDayInUnix(r) <= Z.getUnixEndOfDayInUnix(e);
|
|
815
815
|
}
|
|
816
816
|
}
|
|
817
|
-
|
|
818
|
-
class
|
|
819
|
-
static toCurrency(e,
|
|
820
|
-
return e.toLocaleString("en-US",
|
|
817
|
+
Qt();
|
|
818
|
+
class _ {
|
|
819
|
+
static toCurrency(e, r) {
|
|
820
|
+
return e.toLocaleString("en-US", r);
|
|
821
821
|
}
|
|
822
822
|
static toCurrencyWithDotSeparator(e) {
|
|
823
|
-
return
|
|
823
|
+
return _.toCurrency(e).replaceAll(",", ".");
|
|
824
824
|
}
|
|
825
|
-
static applyMask(e,
|
|
826
|
-
let
|
|
827
|
-
for (;
|
|
828
|
-
if (e[
|
|
829
|
-
if (
|
|
825
|
+
static applyMask(e, r) {
|
|
826
|
+
let s = "", n = 0, i = 0;
|
|
827
|
+
for (; n < e.length; ) {
|
|
828
|
+
if (e[n] === "#") {
|
|
829
|
+
if (i >= r.length)
|
|
830
830
|
throw new Error("Value length does not match the format.");
|
|
831
|
-
|
|
831
|
+
s += r[i], i++;
|
|
832
832
|
} else
|
|
833
|
-
|
|
834
|
-
|
|
833
|
+
s += e[n];
|
|
834
|
+
n++;
|
|
835
835
|
}
|
|
836
|
-
if (
|
|
836
|
+
if (i !== r.length)
|
|
837
837
|
throw new Error("Value length does not match the format.");
|
|
838
|
-
return
|
|
838
|
+
return s;
|
|
839
839
|
}
|
|
840
840
|
static applyBankCardMask(e) {
|
|
841
|
-
return
|
|
841
|
+
return _.applyMask(xe.BankCard, String(e));
|
|
842
842
|
}
|
|
843
843
|
static applyIbanMask(e) {
|
|
844
|
-
return
|
|
844
|
+
return _.applyMask(xe.Iban, String(e));
|
|
845
845
|
}
|
|
846
846
|
static toEnglishDigits(e) {
|
|
847
|
-
const
|
|
847
|
+
const r = ["۱", "۲", "۳", "۴", "۵", "۶", "۷", "۸", "۹", "۰"], s = ["١", "٢", "٣", "٤", "٥", "٦", "٧", "٨", "٩", "٠"], n = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"];
|
|
848
848
|
return e.split("").map(
|
|
849
|
-
(
|
|
849
|
+
(i) => n[r.indexOf(i)] || n[s.indexOf(i)] || i
|
|
850
850
|
).join("");
|
|
851
851
|
}
|
|
852
|
-
static mapUnixToDate(e,
|
|
853
|
-
return
|
|
852
|
+
static mapUnixToDate(e, r) {
|
|
853
|
+
return O(new Date(e)).subtract(1, "day").format(r);
|
|
854
854
|
}
|
|
855
855
|
}
|
|
856
|
-
var
|
|
857
|
-
class
|
|
858
|
-
static getBankImageBaseOnCardInfo(e,
|
|
859
|
-
return e === void 0 ? "/img/banks/shetab.png" :
|
|
856
|
+
var g = /* @__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))(g || {}), V = /* @__PURE__ */ ((t) => (t.Width = "width", t.Height = "height", t[t.DefaultWidth = 500] = "DefaultWidth", t[t.DefaultHeight = 350] = "DefaultHeight", t[t.MinimalAvailableSize = 0] = "MinimalAvailableSize", t))(V || {}), L = /* @__PURE__ */ ((t) => (t.ASC = "ASC", t.DESC = "DESC", t))(L || {}), er = /* @__PURE__ */ ((t) => (t.ASC = "ascend", t.DESC = "descend", t))(er || {}), $e = /* @__PURE__ */ ((t) => (t.Left = "left", t.Right = "right", t.Center = "center", t))($e || {}), Ve = /* @__PURE__ */ ((t) => (t.Text = "text", t))(Ve || {}), Ne = /* @__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))(Ne || {}), at = /* @__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))(at || {}), Fe = /* @__PURE__ */ ((t) => (t.FontFamily = "IRANSansX", t))(Fe || {}), ne = /* @__PURE__ */ ((t) => (t.Open = "open", t.Close = "close", t))(ne || {}), tr = /* @__PURE__ */ ((t) => (t[t.NotFound = 404] = "NotFound", t[t.Unauthorized = 401] = "Unauthorized", t[t.ServerError = 500] = "ServerError", t))(tr || {}), Se = /* @__PURE__ */ ((t) => (t[t.Invalid = 0] = "Invalid", t[t.Valid = 1] = "Valid", t))(Se || {}), B = /* @__PURE__ */ ((t) => (t.Theme = "theme", t.AccessList = "accessList", t.Token = "token", t.SSO_ACCESS_LIST = "ssoAccessList", t))(B || {}), Fe = /* @__PURE__ */ ((t) => (t.Light = "light", t.Dark = "dark", t))(Fe || {}), je = /* @__PURE__ */ ((t) => (t.Dialog = "dialog", t.Drawer = "drawer", t.Module = "module", t.Toast = "toast", t))(je || {}), rr = /* @__PURE__ */ ((t) => (t.USDT = "USDT", t))(rr || {});
|
|
857
|
+
class Q {
|
|
858
|
+
static getBankImageBaseOnCardInfo(e, r) {
|
|
859
|
+
return e === void 0 ? "/img/banks/shetab.png" : r === "IBAN" ? (e = _.toEnglishDigits(
|
|
860
860
|
e.replace(/IR/g, "").split(" ").join("")
|
|
861
|
-
), `/img/banks/${
|
|
861
|
+
), `/img/banks/${Q.iban(e).english}.png`) : (e = _.toEnglishDigits(
|
|
862
862
|
e.replace(/ /g, "")
|
|
863
|
-
), `/img/banks/${
|
|
863
|
+
), `/img/banks/${Q.card(e).english}.png`);
|
|
864
864
|
}
|
|
865
865
|
static card(e) {
|
|
866
|
-
const
|
|
867
|
-
if (e == null) return
|
|
866
|
+
const r = { persian: "نامشخص", english: "shetab" };
|
|
867
|
+
if (e == null) return r;
|
|
868
868
|
e = e.substring(0, 6);
|
|
869
869
|
try {
|
|
870
|
-
const
|
|
871
|
-
return
|
|
870
|
+
const s = It.find((n) => Object.keys(n)[0] === e);
|
|
871
|
+
return s === void 0 ? r : Object.values(s)[0];
|
|
872
872
|
} catch {
|
|
873
|
-
return
|
|
873
|
+
return r;
|
|
874
874
|
}
|
|
875
875
|
}
|
|
876
876
|
// Args: number -> string
|
|
877
877
|
// Returns: Object { persian: "string", english: "string" } || {}
|
|
878
878
|
static iban(e) {
|
|
879
|
-
const
|
|
880
|
-
if (e == null) return
|
|
879
|
+
const r = { persian: "نامشخص", english: "shetab" };
|
|
880
|
+
if (e == null) return r;
|
|
881
881
|
e = e.substring(2, 5);
|
|
882
882
|
try {
|
|
883
|
-
const
|
|
884
|
-
return
|
|
883
|
+
const s = bt.find((n) => Object.keys(n)[0] === e);
|
|
884
|
+
return s === void 0 ? r : Object.values(s)[0];
|
|
885
885
|
} catch {
|
|
886
|
-
return
|
|
886
|
+
return r;
|
|
887
887
|
}
|
|
888
888
|
}
|
|
889
889
|
static async copyValueToClipboard(e) {
|
|
890
890
|
await navigator.clipboard.writeText(String(e));
|
|
891
891
|
}
|
|
892
|
-
static downloadBlob(e,
|
|
893
|
-
const
|
|
894
|
-
|
|
892
|
+
static downloadBlob(e, r = Q.extractFileNameFromHeader(e)) {
|
|
893
|
+
const s = document.createElement("a");
|
|
894
|
+
s.href = URL.createObjectURL(e.data), s.download = r, s.dispatchEvent(
|
|
895
895
|
new MouseEvent("click", {
|
|
896
896
|
bubbles: !0,
|
|
897
897
|
cancelable: !0,
|
|
898
898
|
composed: !0
|
|
899
899
|
})
|
|
900
|
-
),
|
|
900
|
+
), s.remove();
|
|
901
901
|
}
|
|
902
902
|
static extractFileNameFromHeader(e) {
|
|
903
|
-
var
|
|
904
|
-
return ((
|
|
903
|
+
var s, n, i, a;
|
|
904
|
+
return ((a = (s = e.headers["content-disposition"]) == null ? void 0 : s.split("filename=")[1]) == null ? void 0 : a.slice(
|
|
905
905
|
1,
|
|
906
|
-
((
|
|
906
|
+
((i = (n = e.headers["content-disposition"]) == null ? void 0 : n.split("filename=")) == null ? void 0 : i[1].length) - 1
|
|
907
907
|
)) || "Saraf-File";
|
|
908
908
|
}
|
|
909
909
|
static removeSpacesFromString(e) {
|
|
@@ -912,63 +912,63 @@ class W {
|
|
|
912
912
|
""
|
|
913
913
|
);
|
|
914
914
|
}
|
|
915
|
-
static isArraySorted(e,
|
|
916
|
-
return e.every((
|
|
915
|
+
static isArraySorted(e, r = (n) => n, s = L.ASC) {
|
|
916
|
+
return e.every((n, i) => e.length - 1 === i ? !0 : s === L.ASC ? r(n) <= r(e[i + 1]) : r(n) >= r(e[i + 1]));
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
|
-
const
|
|
919
|
+
const F = class F {
|
|
920
920
|
constructor() {
|
|
921
921
|
this.availableAccesses = /* @__PURE__ */ new Set();
|
|
922
922
|
}
|
|
923
923
|
setAvailableAccesses(e) {
|
|
924
924
|
this.setAccessListToStorage(e);
|
|
925
|
-
for (const
|
|
926
|
-
this.availableAccesses.add(
|
|
925
|
+
for (const r of e)
|
|
926
|
+
this.availableAccesses.add(r);
|
|
927
927
|
}
|
|
928
928
|
setAccessListToStorage(e) {
|
|
929
|
-
localStorage.setItem(
|
|
929
|
+
localStorage.setItem(B.AccessList, JSON.stringify(e));
|
|
930
930
|
}
|
|
931
931
|
everyAccess(e) {
|
|
932
|
-
return e.every((
|
|
932
|
+
return e.every((r) => this.availableAccesses.has(r));
|
|
933
933
|
}
|
|
934
934
|
someAccess(e) {
|
|
935
|
-
return e.some((
|
|
935
|
+
return e.some((r) => this.availableAccesses.has(r));
|
|
936
936
|
}
|
|
937
937
|
clearAvailableAccesses() {
|
|
938
|
-
this.availableAccesses.clear(), localStorage.removeItem(
|
|
938
|
+
this.availableAccesses.clear(), localStorage.removeItem(B.AccessList);
|
|
939
939
|
}
|
|
940
940
|
initialize() {
|
|
941
|
-
const e = localStorage.getItem(
|
|
941
|
+
const e = localStorage.getItem(B.AccessList);
|
|
942
942
|
e !== null && this.setAvailableAccesses(JSON.parse(e));
|
|
943
943
|
}
|
|
944
944
|
static GetInstance() {
|
|
945
|
-
return
|
|
945
|
+
return F.Instance || (F.Instance = new F()), F.Instance;
|
|
946
946
|
}
|
|
947
947
|
};
|
|
948
|
-
|
|
949
|
-
let
|
|
950
|
-
class
|
|
948
|
+
F.Instance = null;
|
|
949
|
+
let ie = F;
|
|
950
|
+
class ot {
|
|
951
951
|
constructor() {
|
|
952
|
-
this.mounted = (e,
|
|
953
|
-
this.checkAccess(e,
|
|
954
|
-
}, this.updated = (e,
|
|
955
|
-
this.checkAccess(e,
|
|
956
|
-
}, this.checkAccess = (e,
|
|
957
|
-
this.hasAccess(
|
|
958
|
-
}, this.accessService =
|
|
952
|
+
this.mounted = (e, r) => {
|
|
953
|
+
this.checkAccess(e, r.value);
|
|
954
|
+
}, this.updated = (e, r) => {
|
|
955
|
+
this.checkAccess(e, r.value);
|
|
956
|
+
}, this.checkAccess = (e, r) => {
|
|
957
|
+
this.hasAccess(r) || e.remove();
|
|
958
|
+
}, this.accessService = ie.GetInstance();
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
|
-
class
|
|
961
|
+
class Ur extends ot {
|
|
962
962
|
hasAccess(e) {
|
|
963
963
|
return this.accessService.everyAccess(e);
|
|
964
964
|
}
|
|
965
965
|
}
|
|
966
|
-
class
|
|
966
|
+
class qr extends ot {
|
|
967
967
|
hasAccess(e) {
|
|
968
968
|
return this.accessService.someAccess(e);
|
|
969
969
|
}
|
|
970
970
|
}
|
|
971
|
-
const
|
|
971
|
+
const j = class j {
|
|
972
972
|
constructor() {
|
|
973
973
|
this._accessLevels = /* @__PURE__ */ new Map();
|
|
974
974
|
}
|
|
@@ -976,15 +976,15 @@ const P = class P {
|
|
|
976
976
|
this.setAccessLevelFromStorage();
|
|
977
977
|
}
|
|
978
978
|
setAccessLevels(e) {
|
|
979
|
-
for (const
|
|
980
|
-
this._accessLevels.set(
|
|
979
|
+
for (const r in e)
|
|
980
|
+
this._accessLevels.set(r, new Set(e[r]));
|
|
981
981
|
this.setAccessLevelsToStorage(e);
|
|
982
982
|
}
|
|
983
983
|
setAccessLevelsToStorage(e) {
|
|
984
|
-
localStorage.setItem(
|
|
984
|
+
localStorage.setItem(B.SSO_ACCESS_LIST, JSON.stringify(e));
|
|
985
985
|
}
|
|
986
986
|
getAccessLevelsFromStorage() {
|
|
987
|
-
let e = localStorage.getItem(
|
|
987
|
+
let e = localStorage.getItem(B.SSO_ACCESS_LIST);
|
|
988
988
|
return e !== null ? JSON.parse(e) : e;
|
|
989
989
|
}
|
|
990
990
|
getAccessLevelsOfScope(e) {
|
|
@@ -996,108 +996,108 @@ const P = class P {
|
|
|
996
996
|
const e = this.getAccessLevelsFromStorage();
|
|
997
997
|
e && this.setAccessLevels(e);
|
|
998
998
|
}
|
|
999
|
-
everyAccess(e,
|
|
1000
|
-
const
|
|
1001
|
-
return
|
|
999
|
+
everyAccess(e, r) {
|
|
1000
|
+
const s = this.getAccessLevelsOfScope(e);
|
|
1001
|
+
return s ? r.every((n) => s.has(n)) : !1;
|
|
1002
1002
|
}
|
|
1003
|
-
someAccess(e,
|
|
1004
|
-
const
|
|
1005
|
-
return
|
|
1003
|
+
someAccess(e, r) {
|
|
1004
|
+
const s = this.getAccessLevelsOfScope(e);
|
|
1005
|
+
return s ? r.some((n) => s.has(n)) : !1;
|
|
1006
1006
|
}
|
|
1007
1007
|
hasScope(e) {
|
|
1008
1008
|
return this._accessLevels.has(e);
|
|
1009
1009
|
}
|
|
1010
1010
|
clear() {
|
|
1011
|
-
localStorage.removeItem(
|
|
1011
|
+
localStorage.removeItem(B.SSO_ACCESS_LIST), this._accessLevels = /* @__PURE__ */ new Map();
|
|
1012
1012
|
}
|
|
1013
1013
|
static GetInstance() {
|
|
1014
|
-
return
|
|
1014
|
+
return j._instance || (j._instance = new j()), j._instance;
|
|
1015
1015
|
}
|
|
1016
1016
|
};
|
|
1017
|
-
|
|
1018
|
-
let
|
|
1019
|
-
class
|
|
1017
|
+
j._instance = null;
|
|
1018
|
+
let Oe = j;
|
|
1019
|
+
class lt {
|
|
1020
1020
|
constructor() {
|
|
1021
|
-
this._authorizationService =
|
|
1021
|
+
this._authorizationService = Oe.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);
|
|
1022
1022
|
}
|
|
1023
|
-
mounted(e,
|
|
1024
|
-
this.manageElement(e,
|
|
1023
|
+
mounted(e, r, s) {
|
|
1024
|
+
this.manageElement(e, r.arg, r.modifiers);
|
|
1025
1025
|
}
|
|
1026
|
-
updated(e,
|
|
1027
|
-
this.manageElement(e,
|
|
1026
|
+
updated(e, r, s) {
|
|
1027
|
+
this.manageElement(e, r.arg, r.modifiers);
|
|
1028
1028
|
}
|
|
1029
|
-
manageElement(e,
|
|
1030
|
-
if (!this._authorizationService.hasScope(
|
|
1029
|
+
manageElement(e, r, s) {
|
|
1030
|
+
if (!this._authorizationService.hasScope(r)) {
|
|
1031
1031
|
e.remove();
|
|
1032
1032
|
return;
|
|
1033
1033
|
}
|
|
1034
|
-
const
|
|
1035
|
-
this.hasAccess(
|
|
1034
|
+
const n = this.getAccessLevels(r, s);
|
|
1035
|
+
this.hasAccess(r, n) || e.remove();
|
|
1036
1036
|
}
|
|
1037
|
-
getAccessLevels(e,
|
|
1038
|
-
var
|
|
1039
|
-
let
|
|
1040
|
-
return
|
|
1037
|
+
getAccessLevels(e, r) {
|
|
1038
|
+
var n;
|
|
1039
|
+
let s = Object.keys(r);
|
|
1040
|
+
return s.length || (s = Array.from(((n = this._authorizationService.getAccessLevelsOfScope(e)) == null ? void 0 : n.values()) ?? [])), s;
|
|
1041
1041
|
}
|
|
1042
1042
|
}
|
|
1043
|
-
class
|
|
1044
|
-
hasAccess(e,
|
|
1045
|
-
return this._authorizationService.everyAccess(e,
|
|
1043
|
+
class Hr extends lt {
|
|
1044
|
+
hasAccess(e, r) {
|
|
1045
|
+
return this._authorizationService.everyAccess(e, r);
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
|
-
class
|
|
1049
|
-
hasAccess(e,
|
|
1050
|
-
return this._authorizationService.someAccess(e,
|
|
1048
|
+
class zr extends lt {
|
|
1049
|
+
hasAccess(e, r) {
|
|
1050
|
+
return this._authorizationService.someAccess(e, r);
|
|
1051
1051
|
}
|
|
1052
1052
|
}
|
|
1053
|
-
class
|
|
1053
|
+
class sr {
|
|
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, this.hasCustomValidationCheck = !1, this.shouldRemoveValidationMessageOnInteract = !1;
|
|
1056
1056
|
}
|
|
1057
1057
|
}
|
|
1058
|
-
function
|
|
1058
|
+
function Gr(t) {
|
|
1059
1059
|
return t === 1;
|
|
1060
1060
|
}
|
|
1061
|
-
function
|
|
1061
|
+
function Jr(t, e) {
|
|
1062
1062
|
return t - 1 === e;
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1064
|
+
function nr(t) {
|
|
1065
1065
|
return String(t).length === 0 || t === null || t === void 0;
|
|
1066
1066
|
}
|
|
1067
|
-
function
|
|
1067
|
+
function Wr(t) {
|
|
1068
1068
|
t();
|
|
1069
1069
|
}
|
|
1070
|
-
class
|
|
1071
|
-
constructor(e,
|
|
1072
|
-
this.initialData = null, this.data = new
|
|
1070
|
+
class Kr {
|
|
1071
|
+
constructor(e, r) {
|
|
1072
|
+
this.initialData = null, this.data = new sr(), this._validators = [], this._id = Math.random(), this.data.value = r, this.data.name = e, this.shouldRunValidation() && this.runValidation(!0);
|
|
1073
1073
|
}
|
|
1074
1074
|
shouldRunValidation() {
|
|
1075
|
-
return this.data.hasCustomValidationCheck ? !1 : this.data.isRequired ? !0 : !
|
|
1075
|
+
return this.data.hasCustomValidationCheck ? !1 : this.data.isRequired ? !0 : !nr(this.data.value);
|
|
1076
1076
|
}
|
|
1077
1077
|
async runValidation(e = !1) {
|
|
1078
|
-
for (const
|
|
1079
|
-
const
|
|
1080
|
-
if (
|
|
1081
|
-
this.setFormToInvalidState(e,
|
|
1078
|
+
for (const r of this._validators) {
|
|
1079
|
+
const s = await r.validate(this.data.value);
|
|
1080
|
+
if (s) {
|
|
1081
|
+
this.setFormToInvalidState(e, s);
|
|
1082
1082
|
return;
|
|
1083
1083
|
}
|
|
1084
1084
|
}
|
|
1085
1085
|
this.setFormToValidState();
|
|
1086
1086
|
}
|
|
1087
|
-
setFormToInvalidState(e,
|
|
1088
|
-
this.data.isValid = !1, (this.data.isChangeSensitive || e) && this.setNotValidMessage(
|
|
1087
|
+
setFormToInvalidState(e, r) {
|
|
1088
|
+
this.data.isValid = !1, (this.data.isChangeSensitive || e) && this.setNotValidMessage(r);
|
|
1089
1089
|
}
|
|
1090
1090
|
setFormToValidState() {
|
|
1091
1091
|
this.data.isValid = !0, this.setNotValidMessage("");
|
|
1092
1092
|
}
|
|
1093
1093
|
reset() {
|
|
1094
|
-
this.initialData ? this.data = structuredClone(
|
|
1094
|
+
this.initialData ? this.data = structuredClone(He(this.initialData)) : console.warn(
|
|
1095
1095
|
"The " + this.data.name + `input control has no initial data,
|
|
1096
1096
|
the initial data will be available after calling the [markAsInitial] method on this instance`
|
|
1097
1097
|
);
|
|
1098
1098
|
}
|
|
1099
1099
|
markAsInitial() {
|
|
1100
|
-
this.initialData = structuredClone(
|
|
1100
|
+
this.initialData = structuredClone(He(this.data));
|
|
1101
1101
|
}
|
|
1102
1102
|
setValidators(e) {
|
|
1103
1103
|
this._validators = e;
|
|
@@ -1179,7 +1179,7 @@ class us {
|
|
|
1179
1179
|
return this.data.value;
|
|
1180
1180
|
}
|
|
1181
1181
|
}
|
|
1182
|
-
class
|
|
1182
|
+
class Zr {
|
|
1183
1183
|
constructor(e) {
|
|
1184
1184
|
this._inputControl = e;
|
|
1185
1185
|
}
|
|
@@ -1214,19 +1214,19 @@ class hs {
|
|
|
1214
1214
|
return this._inputControl;
|
|
1215
1215
|
}
|
|
1216
1216
|
}
|
|
1217
|
-
class
|
|
1217
|
+
class Xr {
|
|
1218
1218
|
constructor() {
|
|
1219
|
-
this.mounted = (e,
|
|
1220
|
-
|
|
1219
|
+
this.mounted = (e, r) => {
|
|
1220
|
+
r.value && r.value.getIsBlurSensitive() && (e.addEventListener("click", this.handleFocus.bind(this, r.value)), e.addEventListener(
|
|
1221
1221
|
"blur",
|
|
1222
|
-
this.handleBlur.bind(this,
|
|
1222
|
+
this.handleBlur.bind(this, r.value),
|
|
1223
1223
|
!0
|
|
1224
1224
|
));
|
|
1225
|
-
}, this.beforeUnMount = (e,
|
|
1225
|
+
}, this.beforeUnMount = (e, r) => {
|
|
1226
1226
|
e.removeEventListener(
|
|
1227
1227
|
"blur",
|
|
1228
|
-
this.handleBlur.bind(this,
|
|
1229
|
-
), e.removeEventListener("click", this.handleFocus.bind(this,
|
|
1228
|
+
this.handleBlur.bind(this, r.value)
|
|
1229
|
+
), e.removeEventListener("click", this.handleFocus.bind(this, r.value));
|
|
1230
1230
|
};
|
|
1231
1231
|
}
|
|
1232
1232
|
handleBlur(e) {
|
|
@@ -1236,7 +1236,7 @@ class ds {
|
|
|
1236
1236
|
e.value || e.getIsEmptySensitive() || e.setNotValidMessage("");
|
|
1237
1237
|
}
|
|
1238
1238
|
}
|
|
1239
|
-
class
|
|
1239
|
+
class Qr {
|
|
1240
1240
|
constructor() {
|
|
1241
1241
|
this._inputControls = /* @__PURE__ */ new Map(), this._isValid = !1, this._id = Math.random();
|
|
1242
1242
|
}
|
|
@@ -1244,28 +1244,28 @@ class fs {
|
|
|
1244
1244
|
return Array.from(this._inputControls.values());
|
|
1245
1245
|
}
|
|
1246
1246
|
async runValidation(e) {
|
|
1247
|
-
let
|
|
1248
|
-
for (const
|
|
1249
|
-
if (e && await
|
|
1247
|
+
let r = !0;
|
|
1248
|
+
for (const s of this.getInputControlsAsArray())
|
|
1249
|
+
if (e && await s.runValidation(!0), !s.getIsValid() && (r = !1, !e)) {
|
|
1250
1250
|
this._isValid = !1;
|
|
1251
1251
|
return;
|
|
1252
1252
|
}
|
|
1253
|
-
this._isValid =
|
|
1253
|
+
this._isValid = r;
|
|
1254
1254
|
}
|
|
1255
1255
|
addInputControls(e) {
|
|
1256
|
-
for (const
|
|
1257
|
-
this._inputControls.set(
|
|
1256
|
+
for (const r of e)
|
|
1257
|
+
this._inputControls.set(r.getName(), r);
|
|
1258
1258
|
}
|
|
1259
1259
|
getInputControl(e) {
|
|
1260
|
-
const
|
|
1261
|
-
if (!
|
|
1260
|
+
const r = this._inputControls.get(e);
|
|
1261
|
+
if (!r)
|
|
1262
1262
|
throw new Error(`The provided input name (${e}}) has no controls.`);
|
|
1263
|
-
return
|
|
1263
|
+
return r;
|
|
1264
1264
|
}
|
|
1265
1265
|
resetControls(e) {
|
|
1266
|
-
for (const
|
|
1267
|
-
const
|
|
1268
|
-
|
|
1266
|
+
for (const r of e) {
|
|
1267
|
+
const s = this._inputControls.get(r);
|
|
1268
|
+
s ? s.reset() : console.warn(`Provided input name ${r} has no controllers in this form`);
|
|
1269
1269
|
}
|
|
1270
1270
|
}
|
|
1271
1271
|
resetAll() {
|
|
@@ -1274,8 +1274,8 @@ class fs {
|
|
|
1274
1274
|
}
|
|
1275
1275
|
createRequestBody() {
|
|
1276
1276
|
const e = {};
|
|
1277
|
-
for (const
|
|
1278
|
-
|
|
1277
|
+
for (const r of this.getInputControlsAsArray())
|
|
1278
|
+
r.getIsIncludeInRequestBody() && (e[r.getName()] = r.value);
|
|
1279
1279
|
return e;
|
|
1280
1280
|
}
|
|
1281
1281
|
setIsValid(e) {
|
|
@@ -1291,33 +1291,33 @@ class fs {
|
|
|
1291
1291
|
return this._id;
|
|
1292
1292
|
}
|
|
1293
1293
|
}
|
|
1294
|
-
function
|
|
1295
|
-
const
|
|
1296
|
-
|
|
1294
|
+
function es(t, e = !1) {
|
|
1295
|
+
const r = st(t), s = C(
|
|
1296
|
+
Se.Invalid
|
|
1297
1297
|
);
|
|
1298
|
-
return
|
|
1299
|
-
() =>
|
|
1298
|
+
return yt(
|
|
1299
|
+
() => r.getInputControlsAsArray(),
|
|
1300
1300
|
() => {
|
|
1301
|
-
e || (
|
|
1301
|
+
e || (r.runValidation(), r.getIsValid() ? s.value = Se.Valid : s.value = Se.Invalid);
|
|
1302
1302
|
},
|
|
1303
1303
|
{
|
|
1304
1304
|
immediate: !0,
|
|
1305
1305
|
deep: !0
|
|
1306
1306
|
}
|
|
1307
1307
|
), {
|
|
1308
|
-
reactiveForm:
|
|
1309
|
-
validationStatus:
|
|
1308
|
+
reactiveForm: r,
|
|
1309
|
+
validationStatus: s
|
|
1310
1310
|
};
|
|
1311
1311
|
}
|
|
1312
|
-
class
|
|
1312
|
+
class ut {
|
|
1313
1313
|
constructor(e) {
|
|
1314
1314
|
this.timerId = null, this.setupInterval = this.setupInterval.bind(this), this.schedule = e;
|
|
1315
1315
|
}
|
|
1316
1316
|
setupInterval(e) {
|
|
1317
|
-
const
|
|
1318
|
-
this.timerId = setTimeout(async function
|
|
1319
|
-
await
|
|
1320
|
-
|
|
1317
|
+
const r = this;
|
|
1318
|
+
this.timerId = setTimeout(async function s() {
|
|
1319
|
+
await r.schedule.runAction(), r.timerId = setTimeout(() => {
|
|
1320
|
+
s();
|
|
1321
1321
|
}, e);
|
|
1322
1322
|
}, e);
|
|
1323
1323
|
}
|
|
@@ -1325,64 +1325,64 @@ class ze {
|
|
|
1325
1325
|
this.timerId && clearInterval(this.timerId);
|
|
1326
1326
|
}
|
|
1327
1327
|
}
|
|
1328
|
-
const
|
|
1328
|
+
const ct = "150px", ht = 2, ts = {
|
|
1329
1329
|
path: "id",
|
|
1330
1330
|
key: "id",
|
|
1331
1331
|
title: "عملیات",
|
|
1332
|
-
colspan:
|
|
1333
|
-
width:
|
|
1334
|
-
cellType:
|
|
1335
|
-
align:
|
|
1336
|
-
headerType:
|
|
1332
|
+
colspan: ht,
|
|
1333
|
+
width: ct,
|
|
1334
|
+
cellType: Ne.ACTION,
|
|
1335
|
+
align: $e.Center,
|
|
1336
|
+
headerType: Ve.Text,
|
|
1337
1337
|
accessLevel: null
|
|
1338
|
-
},
|
|
1339
|
-
width:
|
|
1340
|
-
align:
|
|
1341
|
-
headerType:
|
|
1342
|
-
cellType:
|
|
1343
|
-
colspan:
|
|
1338
|
+
}, ir = {
|
|
1339
|
+
width: ct,
|
|
1340
|
+
align: $e.Center,
|
|
1341
|
+
headerType: Ve.Text,
|
|
1342
|
+
cellType: Ne.Text,
|
|
1343
|
+
colspan: ht
|
|
1344
1344
|
};
|
|
1345
|
-
class
|
|
1346
|
-
constructor(e,
|
|
1347
|
-
this.key = e, this.order =
|
|
1348
|
-
}
|
|
1349
|
-
}
|
|
1350
|
-
class
|
|
1351
|
-
aSort(e,
|
|
1352
|
-
return e.sort((
|
|
1353
|
-
const
|
|
1354
|
-
if (typeof
|
|
1355
|
-
return
|
|
1356
|
-
if (typeof
|
|
1357
|
-
return
|
|
1345
|
+
class Ye {
|
|
1346
|
+
constructor(e, r) {
|
|
1347
|
+
this.key = e, this.order = r;
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
class Ze {
|
|
1351
|
+
aSort(e, r) {
|
|
1352
|
+
return e.sort((s, n) => {
|
|
1353
|
+
const i = s[r] ?? s, a = n[r] ?? n;
|
|
1354
|
+
if (typeof i == "string" && typeof a == "string")
|
|
1355
|
+
return i.localeCompare(a);
|
|
1356
|
+
if (typeof i == "number" && typeof a == "number")
|
|
1357
|
+
return i - a;
|
|
1358
1358
|
throw new Error("Not supported data type");
|
|
1359
1359
|
});
|
|
1360
1360
|
}
|
|
1361
|
-
bSort(e,
|
|
1362
|
-
return e.sort((
|
|
1363
|
-
const
|
|
1364
|
-
if (typeof
|
|
1365
|
-
return
|
|
1366
|
-
if (typeof
|
|
1367
|
-
return
|
|
1361
|
+
bSort(e, r) {
|
|
1362
|
+
return e.sort((s, n) => {
|
|
1363
|
+
const i = s[r] ?? s, a = n[r] ?? n;
|
|
1364
|
+
if (typeof i == "string" && typeof a == "string")
|
|
1365
|
+
return a.localeCompare(i);
|
|
1366
|
+
if (typeof i == "number" && typeof a == "number")
|
|
1367
|
+
return a - i;
|
|
1368
1368
|
throw new Error("Not supported data type");
|
|
1369
1369
|
});
|
|
1370
1370
|
}
|
|
1371
1371
|
}
|
|
1372
|
-
class
|
|
1373
|
-
arrayOfObjectSort(e,
|
|
1374
|
-
return
|
|
1372
|
+
class rs {
|
|
1373
|
+
arrayOfObjectSort(e, r, s, n = new Ze()) {
|
|
1374
|
+
return s === L.ASC ? n.aSort(e, r) : n.bSort(e, r);
|
|
1375
1375
|
}
|
|
1376
|
-
arraySort(e,
|
|
1377
|
-
return
|
|
1376
|
+
arraySort(e, r, s = new Ze()) {
|
|
1377
|
+
return r === L.ASC ? s.aSort(e) : s.bSort(e);
|
|
1378
1378
|
}
|
|
1379
1379
|
}
|
|
1380
|
-
class
|
|
1380
|
+
class ar {
|
|
1381
1381
|
constructor(e) {
|
|
1382
|
-
this.currentPage = 1, this.currentPageSize = 20, this.currentSortDetail = new
|
|
1382
|
+
this.currentPage = 1, this.currentPageSize = 20, this.currentSortDetail = new Ye(
|
|
1383
1383
|
"id",
|
|
1384
|
-
|
|
1385
|
-
), this.loadedRows = [], this.headerSchema = [], this.service = e, this.accessService =
|
|
1384
|
+
L.DESC
|
|
1385
|
+
), this.loadedRows = [], this.headerSchema = [], this.service = e, this.accessService = ie.GetInstance();
|
|
1386
1386
|
}
|
|
1387
1387
|
addHeader(e) {
|
|
1388
1388
|
this.headerSchema.push(e);
|
|
@@ -1393,7 +1393,7 @@ class jt {
|
|
|
1393
1393
|
), await this.loadRows();
|
|
1394
1394
|
}
|
|
1395
1395
|
filterItemsBaseOnAccessLevel(e) {
|
|
1396
|
-
return e.filter((
|
|
1396
|
+
return e.filter((r) => r.hasAccess ? r.hasAccess() : !0);
|
|
1397
1397
|
}
|
|
1398
1398
|
async sort(e) {
|
|
1399
1399
|
this.shouldSendSortRequest(e) && (this.currentSortDetail = e, this.loadedRows = (await this.handleSort(this.currentSortDetail)).items);
|
|
@@ -1401,11 +1401,11 @@ class jt {
|
|
|
1401
1401
|
shouldSendSortRequest(e) {
|
|
1402
1402
|
return e.key !== this.currentSortDetail.key || e.order !== this.currentSortDetail.order;
|
|
1403
1403
|
}
|
|
1404
|
-
async paginate(e,
|
|
1405
|
-
this.shouldSendPaginationRequest(e,
|
|
1404
|
+
async paginate(e, r) {
|
|
1405
|
+
this.shouldSendPaginationRequest(e, r) && (this.currentPage = e, this.currentPageSize = r, this.loadedRows = (await this.handlePagination(this.currentPage, this.currentPageSize)).items);
|
|
1406
1406
|
}
|
|
1407
|
-
shouldSendPaginationRequest(e,
|
|
1408
|
-
return this.currentPage !== e || this.currentPageSize !==
|
|
1407
|
+
shouldSendPaginationRequest(e, r) {
|
|
1408
|
+
return this.currentPage !== e || this.currentPageSize !== r;
|
|
1409
1409
|
}
|
|
1410
1410
|
async loadRows() {
|
|
1411
1411
|
return this.loadedRows = (await this.service.fetchRows()).items, this.loadedRows;
|
|
@@ -1416,15 +1416,15 @@ class jt {
|
|
|
1416
1416
|
async handleSort(e) {
|
|
1417
1417
|
return await this.service.sort(e);
|
|
1418
1418
|
}
|
|
1419
|
-
async handlePagination(e,
|
|
1420
|
-
return await this.service.paginate(e,
|
|
1419
|
+
async handlePagination(e, r) {
|
|
1420
|
+
return await this.service.paginate(e, r);
|
|
1421
1421
|
}
|
|
1422
1422
|
getItemCountPerPage() {
|
|
1423
|
-
return
|
|
1423
|
+
return at.DEFAULT_ITEM_COUNT_PER_PAGE;
|
|
1424
1424
|
}
|
|
1425
1425
|
isLoading() {
|
|
1426
1426
|
const e = this.getLoadingStatuses();
|
|
1427
|
-
return e.has(
|
|
1427
|
+
return e.has(g.Search) || e.has(g.FetchList) || e.has(g.Sort) || e.has(g.FetchLastItems) || e.has(g.FetchPreviousItems);
|
|
1428
1428
|
}
|
|
1429
1429
|
getLoadingStatuses() {
|
|
1430
1430
|
return this.getData().loadingStatus;
|
|
@@ -1464,7 +1464,7 @@ class jt {
|
|
|
1464
1464
|
};
|
|
1465
1465
|
}
|
|
1466
1466
|
}
|
|
1467
|
-
class
|
|
1467
|
+
class x {
|
|
1468
1468
|
constructor(e) {
|
|
1469
1469
|
this.observers = [], this.next(e);
|
|
1470
1470
|
}
|
|
@@ -1472,7 +1472,7 @@ class Ut {
|
|
|
1472
1472
|
this.observers.push(e);
|
|
1473
1473
|
}
|
|
1474
1474
|
detach(e) {
|
|
1475
|
-
this.observers = this.observers.filter((
|
|
1475
|
+
this.observers = this.observers.filter((r) => r !== e);
|
|
1476
1476
|
}
|
|
1477
1477
|
notify() {
|
|
1478
1478
|
for (const e of this.observers)
|
|
@@ -1485,9 +1485,9 @@ class Ut {
|
|
|
1485
1485
|
return this._value;
|
|
1486
1486
|
}
|
|
1487
1487
|
}
|
|
1488
|
-
class
|
|
1488
|
+
class ss extends ar {
|
|
1489
1489
|
constructor(e) {
|
|
1490
|
-
super(e), this.selectedRows = new
|
|
1490
|
+
super(e), this.selectedRows = new x(/* @__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);
|
|
1491
1491
|
}
|
|
1492
1492
|
rowSelect(e) {
|
|
1493
1493
|
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()));
|
|
@@ -1502,8 +1502,8 @@ class gs extends jt {
|
|
|
1502
1502
|
isEveryRowSelected() {
|
|
1503
1503
|
return this.getSelectedRowsValue().size === this.currentPageSize || this.loadedRows.length === this.getSelectedRowsValue().size;
|
|
1504
1504
|
}
|
|
1505
|
-
async handlePagination(e,
|
|
1506
|
-
return this.clearAllSelectedItems(), await super.handlePagination(e,
|
|
1505
|
+
async handlePagination(e, r) {
|
|
1506
|
+
return this.clearAllSelectedItems(), await super.handlePagination(e, r);
|
|
1507
1507
|
}
|
|
1508
1508
|
async handleSort(e) {
|
|
1509
1509
|
return this.clearAllSelectedItems(), await super.handleSort(e);
|
|
@@ -1524,321 +1524,1012 @@ class gs extends jt {
|
|
|
1524
1524
|
return this.selectedRows.getValue();
|
|
1525
1525
|
}
|
|
1526
1526
|
}
|
|
1527
|
-
function
|
|
1527
|
+
function ns(t) {
|
|
1528
1528
|
return {
|
|
1529
|
-
...
|
|
1529
|
+
...ir,
|
|
1530
1530
|
...t
|
|
1531
1531
|
};
|
|
1532
1532
|
}
|
|
1533
|
-
function
|
|
1534
|
-
return function(
|
|
1535
|
-
|
|
1533
|
+
function is(t) {
|
|
1534
|
+
return function(r, s) {
|
|
1535
|
+
r.constructor.prototype.headers || (r.constructor.prototype.headers = []), r.constructor.prototype.headers.push({ path: s, ...t });
|
|
1536
1536
|
};
|
|
1537
1537
|
}
|
|
1538
|
-
function
|
|
1539
|
-
return function(
|
|
1540
|
-
async function
|
|
1541
|
-
return
|
|
1542
|
-
}
|
|
1543
|
-
function
|
|
1544
|
-
const
|
|
1545
|
-
for (const f of
|
|
1546
|
-
if (!f.isAvailable(
|
|
1547
|
-
const
|
|
1548
|
-
handler: f.handler.bind(
|
|
1538
|
+
function as(t) {
|
|
1539
|
+
return function(r) {
|
|
1540
|
+
async function s() {
|
|
1541
|
+
return r.prototype._table = this, r.prototype.headers;
|
|
1542
|
+
}
|
|
1543
|
+
function n(l) {
|
|
1544
|
+
const o = [], u = r.prototype.actions || [];
|
|
1545
|
+
for (const f of u) {
|
|
1546
|
+
if (!f.isAvailable(l)) continue;
|
|
1547
|
+
const d = {
|
|
1548
|
+
handler: f.handler.bind(l),
|
|
1549
1549
|
accessLevel: f.accessLevel,
|
|
1550
1550
|
actionName: f.actionName
|
|
1551
1551
|
};
|
|
1552
|
-
|
|
1552
|
+
o.push(d);
|
|
1553
1553
|
}
|
|
1554
|
-
return
|
|
1554
|
+
return o;
|
|
1555
1555
|
}
|
|
1556
|
-
async function
|
|
1557
|
-
|
|
1556
|
+
async function i(l) {
|
|
1557
|
+
r.prototype.rowClick && await r.prototype.rowClick.call(l);
|
|
1558
1558
|
}
|
|
1559
|
-
async function
|
|
1560
|
-
|
|
1559
|
+
async function a() {
|
|
1560
|
+
r.prototype.tableDestroy && await r.prototype.tableDestroy();
|
|
1561
1561
|
}
|
|
1562
|
-
t.prototype.loadHeader =
|
|
1562
|
+
t.prototype.loadHeader = s, t.prototype.getActions = n, t.prototype.handleClick = i, t.prototype.onDestroy = a;
|
|
1563
1563
|
};
|
|
1564
1564
|
}
|
|
1565
|
-
function
|
|
1566
|
-
return function(
|
|
1567
|
-
|
|
1565
|
+
function os(t) {
|
|
1566
|
+
return function(r, s, n) {
|
|
1567
|
+
r.constructor.prototype.actions || (r.constructor.prototype.actions = []), t.handler = n.value, r.constructor.prototype.actions.push(t);
|
|
1568
1568
|
};
|
|
1569
1569
|
}
|
|
1570
|
-
function
|
|
1571
|
-
return function(e,
|
|
1572
|
-
e.constructor.prototype.tableDestroy =
|
|
1570
|
+
function ls() {
|
|
1571
|
+
return function(e, r, s) {
|
|
1572
|
+
e.constructor.prototype.tableDestroy = s.value;
|
|
1573
1573
|
};
|
|
1574
1574
|
}
|
|
1575
|
-
function
|
|
1576
|
-
return function(e,
|
|
1577
|
-
e.constructor.prototype.rowClick =
|
|
1575
|
+
function us() {
|
|
1576
|
+
return function(e, r, s) {
|
|
1577
|
+
e.constructor.prototype.rowClick = s.value;
|
|
1578
1578
|
};
|
|
1579
1579
|
}
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
e
|
|
1580
|
+
class cs {
|
|
1581
|
+
constructor() {
|
|
1582
|
+
this.observers = [];
|
|
1583
|
+
}
|
|
1584
|
+
attach(e) {
|
|
1585
|
+
this.observers.push(e);
|
|
1586
|
+
}
|
|
1587
|
+
detach(e) {
|
|
1588
|
+
this.observers = this.observers.filter(
|
|
1589
|
+
(r) => r !== e
|
|
1590
|
+
);
|
|
1591
|
+
}
|
|
1592
|
+
notify() {
|
|
1593
|
+
for (const e of this.observers)
|
|
1594
|
+
e.update(this);
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
class or {
|
|
1598
|
+
constructor(e) {
|
|
1599
|
+
this.rows = new x([]), this.headerSchema = new x([]), this.currentPage = new x(
|
|
1600
|
+
1
|
|
1601
|
+
), this.currentPageSize = new x(20), this.currentSortDetail = new x(new Ye("id", L.DESC)), this.scrollDetail = new x(null), this.isExpandable = new x(!1), this.tableSource = e, this.accessService = ie.GetInstance();
|
|
1602
|
+
}
|
|
1603
|
+
async load() {
|
|
1604
|
+
this.rows.next(await this.tableSource.loadRows()), this.headerSchema.next(
|
|
1605
|
+
this.filterItemsBaseOnAccessLevel(
|
|
1606
|
+
await this.tableSource.loadHeaderSchema()
|
|
1607
|
+
)
|
|
1608
|
+
);
|
|
1609
|
+
}
|
|
1610
|
+
async paginate(e, r) {
|
|
1611
|
+
this.shouldSendPaginationRequest(e, r) && (this.currentPage.next(e), this.currentPageSize.next(r), this.rows.next(await this.tableSource.paginate(e, r)));
|
|
1612
|
+
}
|
|
1613
|
+
shouldSendPaginationRequest(e, r) {
|
|
1614
|
+
return this.currentPage.getValue() !== e || this.currentPageSize.getValue() !== r;
|
|
1615
|
+
}
|
|
1616
|
+
async sort(e) {
|
|
1617
|
+
this.shouldSendSortRequest(e) && (this.currentSortDetail.next(e), this.rows.next(await this.tableSource.sort(e)));
|
|
1618
|
+
}
|
|
1619
|
+
shouldSendSortRequest(e) {
|
|
1620
|
+
return e.key !== this.currentSortDetail.getValue().key || e.order !== this.currentSortDetail.getValue().order;
|
|
1621
|
+
}
|
|
1622
|
+
async handleClick(e) {
|
|
1623
|
+
this.tableSource.onRowClick && await this.tableSource.onRowClick();
|
|
1624
|
+
}
|
|
1625
|
+
async handleMetaClick(e) {
|
|
1626
|
+
this.tableSource.onRowMetaClick && await this.tableSource.onRowMetaClick;
|
|
1627
|
+
}
|
|
1628
|
+
async handleDoubleClick(e) {
|
|
1629
|
+
this.tableSource.onRowDoubleClick && await this.tableSource.onRowDoubleClick();
|
|
1630
|
+
}
|
|
1631
|
+
hasAnyAction() {
|
|
1632
|
+
for (const e of this.rows.getValue())
|
|
1633
|
+
if (this.getRowActions(e).length) return !0;
|
|
1634
|
+
return !1;
|
|
1635
|
+
}
|
|
1636
|
+
getRowActions(e) {
|
|
1637
|
+
return this.filterItemsBaseOnAccessLevel(
|
|
1638
|
+
this.tableSource.loadRowActions(e)
|
|
1639
|
+
);
|
|
1640
|
+
}
|
|
1641
|
+
loadSummarySchema() {
|
|
1642
|
+
return this.tableSource.loadSummarySchema ? this.tableSource.loadSummarySchema() : {
|
|
1643
|
+
summaryTitle: "",
|
|
1644
|
+
summaryItems: []
|
|
1645
|
+
};
|
|
1646
|
+
}
|
|
1647
|
+
filterItemsBaseOnAccessLevel(e) {
|
|
1648
|
+
return e.filter((r) => r.hasAccess ? r.hasAccess() : !0);
|
|
1649
|
+
}
|
|
1650
|
+
async onDestroy() {
|
|
1651
|
+
this.tableSource.onTableDestroy();
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
class hs extends or {
|
|
1655
|
+
constructor(e) {
|
|
1656
|
+
super(e), this.selectedRows = new x(
|
|
1657
|
+
/* @__PURE__ */ new Map()
|
|
1658
|
+
), this.selectRow = this.selectRow.bind(this), this.selectAll = this.selectAll.bind(this), this.isEveryRowSelected = this.isEveryRowSelected.bind(this), this.clearAllSelectedItems = this.clearAllSelectedItems.bind(this), this.getSelectedRowsAsArray = this.getSelectedRowsAsArray.bind(this), this.getSelectedRowIds = this.getSelectedRowIds.bind(this);
|
|
1659
|
+
}
|
|
1660
|
+
selectRow(e) {
|
|
1661
|
+
const r = this.getSelectedRows();
|
|
1662
|
+
r.has(e.id) ? (r.delete(e.id), this.selectedRows.next(this.selectedRows.getValue())) : (r.set(e.id, e), this.selectedRows.next(this.selectedRows.getValue()));
|
|
1663
|
+
}
|
|
1664
|
+
selectAll() {
|
|
1665
|
+
if (this.isEveryRowSelected())
|
|
1666
|
+
this.clearAllSelectedItems();
|
|
1667
|
+
else
|
|
1668
|
+
for (const e of this.rows.getValue())
|
|
1669
|
+
this.selectedRows.getValue().set(e.id, e), this.selectedRows.next(this.selectedRows.getValue());
|
|
1670
|
+
}
|
|
1671
|
+
isEveryRowSelected() {
|
|
1672
|
+
return this.getSelectedRows().size === this.currentPageSize.getValue() || this.rows.getValue().length === this.getSelectedRows().size;
|
|
1673
|
+
}
|
|
1674
|
+
clearAllSelectedItems() {
|
|
1675
|
+
this.getSelectedRows().clear(), this.selectedRows.next(this.selectedRows.getValue);
|
|
1676
|
+
}
|
|
1677
|
+
getSelectedRows() {
|
|
1678
|
+
return this.selectedRows.getValue();
|
|
1679
|
+
}
|
|
1680
|
+
getSelectedRowsAsArray() {
|
|
1681
|
+
return Array.from(this.selectedRows.getValue().values());
|
|
1682
|
+
}
|
|
1683
|
+
getSelectedRowIds() {
|
|
1684
|
+
return Array.from(this.selectedRows.getValue().keys());
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1687
|
+
var Le;
|
|
1688
|
+
(function(t) {
|
|
1689
|
+
t[t.Transient = 0] = "Transient", t[t.Singleton = 1] = "Singleton", t[t.ResolutionScoped = 2] = "ResolutionScoped", t[t.ContainerScoped = 3] = "ContainerScoped";
|
|
1690
|
+
})(Le || (Le = {}));
|
|
1691
|
+
const A = Le;
|
|
1692
|
+
/*! *****************************************************************************
|
|
1693
|
+
Copyright (c) Microsoft Corporation.
|
|
1694
|
+
|
|
1695
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
1696
|
+
purpose with or without fee is hereby granted.
|
|
1697
|
+
|
|
1698
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1699
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1700
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1701
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1702
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1703
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1704
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
1705
|
+
***************************************************************************** */
|
|
1706
|
+
var Te = function(t, e) {
|
|
1707
|
+
return Te = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, s) {
|
|
1708
|
+
r.__proto__ = s;
|
|
1709
|
+
} || function(r, s) {
|
|
1710
|
+
for (var n in s) s.hasOwnProperty(n) && (r[n] = s[n]);
|
|
1711
|
+
}, Te(t, e);
|
|
1712
|
+
};
|
|
1713
|
+
function Be(t, e) {
|
|
1714
|
+
Te(t, e);
|
|
1715
|
+
function r() {
|
|
1716
|
+
this.constructor = t;
|
|
1717
|
+
}
|
|
1718
|
+
t.prototype = e === null ? Object.create(e) : (r.prototype = e.prototype, new r());
|
|
1719
|
+
}
|
|
1720
|
+
function lr(t, e, r, s) {
|
|
1721
|
+
function n(i) {
|
|
1722
|
+
return i instanceof r ? i : new r(function(a) {
|
|
1723
|
+
a(i);
|
|
1724
|
+
});
|
|
1725
|
+
}
|
|
1726
|
+
return new (r || (r = Promise))(function(i, a) {
|
|
1727
|
+
function l(f) {
|
|
1728
|
+
try {
|
|
1729
|
+
u(s.next(f));
|
|
1730
|
+
} catch (d) {
|
|
1731
|
+
a(d);
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
function o(f) {
|
|
1735
|
+
try {
|
|
1736
|
+
u(s.throw(f));
|
|
1737
|
+
} catch (d) {
|
|
1738
|
+
a(d);
|
|
1739
|
+
}
|
|
1740
|
+
}
|
|
1741
|
+
function u(f) {
|
|
1742
|
+
f.done ? i(f.value) : n(f.value).then(l, o);
|
|
1743
|
+
}
|
|
1744
|
+
u((s = s.apply(t, [])).next());
|
|
1745
|
+
});
|
|
1746
|
+
}
|
|
1747
|
+
function ur(t, e) {
|
|
1748
|
+
var r = { label: 0, sent: function() {
|
|
1749
|
+
if (i[0] & 1) throw i[1];
|
|
1750
|
+
return i[1];
|
|
1751
|
+
}, trys: [], ops: [] }, s, n, i, a;
|
|
1752
|
+
return a = { next: l(0), throw: l(1), return: l(2) }, typeof Symbol == "function" && (a[Symbol.iterator] = function() {
|
|
1753
|
+
return this;
|
|
1754
|
+
}), a;
|
|
1755
|
+
function l(u) {
|
|
1756
|
+
return function(f) {
|
|
1757
|
+
return o([u, f]);
|
|
1758
|
+
};
|
|
1759
|
+
}
|
|
1760
|
+
function o(u) {
|
|
1761
|
+
if (s) throw new TypeError("Generator is already executing.");
|
|
1762
|
+
for (; r; ) try {
|
|
1763
|
+
if (s = 1, n && (i = u[0] & 2 ? n.return : u[0] ? n.throw || ((i = n.return) && i.call(n), 0) : n.next) && !(i = i.call(n, u[1])).done) return i;
|
|
1764
|
+
switch (n = 0, i && (u = [u[0] & 2, i.value]), u[0]) {
|
|
1765
|
+
case 0:
|
|
1766
|
+
case 1:
|
|
1767
|
+
i = u;
|
|
1768
|
+
break;
|
|
1769
|
+
case 4:
|
|
1770
|
+
return r.label++, { value: u[1], done: !1 };
|
|
1771
|
+
case 5:
|
|
1772
|
+
r.label++, n = u[1], u = [0];
|
|
1773
|
+
continue;
|
|
1774
|
+
case 7:
|
|
1775
|
+
u = r.ops.pop(), r.trys.pop();
|
|
1776
|
+
continue;
|
|
1777
|
+
default:
|
|
1778
|
+
if (i = r.trys, !(i = i.length > 0 && i[i.length - 1]) && (u[0] === 6 || u[0] === 2)) {
|
|
1779
|
+
r = 0;
|
|
1780
|
+
continue;
|
|
1781
|
+
}
|
|
1782
|
+
if (u[0] === 3 && (!i || u[1] > i[0] && u[1] < i[3])) {
|
|
1783
|
+
r.label = u[1];
|
|
1784
|
+
break;
|
|
1785
|
+
}
|
|
1786
|
+
if (u[0] === 6 && r.label < i[1]) {
|
|
1787
|
+
r.label = i[1], i = u;
|
|
1788
|
+
break;
|
|
1789
|
+
}
|
|
1790
|
+
if (i && r.label < i[2]) {
|
|
1791
|
+
r.label = i[2], r.ops.push(u);
|
|
1792
|
+
break;
|
|
1793
|
+
}
|
|
1794
|
+
i[2] && r.ops.pop(), r.trys.pop();
|
|
1795
|
+
continue;
|
|
1796
|
+
}
|
|
1797
|
+
u = e.call(t, r);
|
|
1798
|
+
} catch (f) {
|
|
1799
|
+
u = [6, f], n = 0;
|
|
1800
|
+
} finally {
|
|
1801
|
+
s = i = 0;
|
|
1802
|
+
}
|
|
1803
|
+
if (u[0] & 5) throw u[1];
|
|
1804
|
+
return { value: u[0] ? u[1] : void 0, done: !0 };
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
function de(t) {
|
|
1808
|
+
var e = typeof Symbol == "function" && Symbol.iterator, r = e && t[e], s = 0;
|
|
1809
|
+
if (r) return r.call(t);
|
|
1810
|
+
if (t && typeof t.length == "number") return {
|
|
1811
|
+
next: function() {
|
|
1812
|
+
return t && s >= t.length && (t = void 0), { value: t && t[s++], done: !t };
|
|
1813
|
+
}
|
|
1814
|
+
};
|
|
1815
|
+
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1816
|
+
}
|
|
1817
|
+
function be(t, e) {
|
|
1818
|
+
var r = typeof Symbol == "function" && t[Symbol.iterator];
|
|
1819
|
+
if (!r) return t;
|
|
1820
|
+
var s = r.call(t), n, i = [], a;
|
|
1821
|
+
try {
|
|
1822
|
+
for (; (e === void 0 || e-- > 0) && !(n = s.next()).done; ) i.push(n.value);
|
|
1823
|
+
} catch (l) {
|
|
1824
|
+
a = { error: l };
|
|
1825
|
+
} finally {
|
|
1826
|
+
try {
|
|
1827
|
+
n && !n.done && (r = s.return) && r.call(s);
|
|
1828
|
+
} finally {
|
|
1829
|
+
if (a) throw a.error;
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
return i;
|
|
1833
|
+
}
|
|
1834
|
+
function N() {
|
|
1835
|
+
for (var t = [], e = 0; e < arguments.length; e++)
|
|
1836
|
+
t = t.concat(be(arguments[e]));
|
|
1837
|
+
return t;
|
|
1838
|
+
}
|
|
1839
|
+
var cr = "injectionTokens";
|
|
1840
|
+
function hr(t) {
|
|
1841
|
+
var e = Reflect.getMetadata("design:paramtypes", t) || [], r = Reflect.getOwnMetadata(cr, t) || {};
|
|
1842
|
+
return Object.keys(r).forEach(function(s) {
|
|
1843
|
+
e[+s] = r[s];
|
|
1844
|
+
}), e;
|
|
1845
|
+
}
|
|
1846
|
+
function dt(t) {
|
|
1847
|
+
return !!t.useClass;
|
|
1848
|
+
}
|
|
1849
|
+
function Pe(t) {
|
|
1850
|
+
return !!t.useFactory;
|
|
1851
|
+
}
|
|
1852
|
+
var ft = function() {
|
|
1853
|
+
function t(e) {
|
|
1854
|
+
this.wrap = e, this.reflectMethods = [
|
|
1855
|
+
"get",
|
|
1856
|
+
"getPrototypeOf",
|
|
1857
|
+
"setPrototypeOf",
|
|
1858
|
+
"getOwnPropertyDescriptor",
|
|
1859
|
+
"defineProperty",
|
|
1860
|
+
"has",
|
|
1861
|
+
"set",
|
|
1862
|
+
"deleteProperty",
|
|
1863
|
+
"apply",
|
|
1864
|
+
"construct",
|
|
1865
|
+
"ownKeys"
|
|
1866
|
+
];
|
|
1867
|
+
}
|
|
1868
|
+
return t.prototype.createProxy = function(e) {
|
|
1869
|
+
var r = this, s = {}, n = !1, i, a = function() {
|
|
1870
|
+
return n || (i = e(r.wrap()), n = !0), i;
|
|
1871
|
+
};
|
|
1872
|
+
return new Proxy(s, this.createHandler(a));
|
|
1873
|
+
}, t.prototype.createHandler = function(e) {
|
|
1874
|
+
var r = {}, s = function(n) {
|
|
1875
|
+
r[n] = function() {
|
|
1876
|
+
for (var i = [], a = 0; a < arguments.length; a++)
|
|
1877
|
+
i[a] = arguments[a];
|
|
1878
|
+
i[0] = e();
|
|
1879
|
+
var l = Reflect[n];
|
|
1880
|
+
return l.apply(void 0, N(i));
|
|
1881
|
+
};
|
|
1882
|
+
};
|
|
1883
|
+
return this.reflectMethods.forEach(s), r;
|
|
1884
|
+
}, t;
|
|
1885
|
+
}();
|
|
1886
|
+
function X(t) {
|
|
1887
|
+
return typeof t == "string" || typeof t == "symbol";
|
|
1888
|
+
}
|
|
1889
|
+
function dr(t) {
|
|
1890
|
+
return typeof t == "object" && "token" in t && "multiple" in t;
|
|
1891
|
+
}
|
|
1892
|
+
function Xe(t) {
|
|
1893
|
+
return typeof t == "object" && "token" in t && "transform" in t;
|
|
1894
|
+
}
|
|
1895
|
+
function fr(t) {
|
|
1896
|
+
return typeof t == "function" || t instanceof ft;
|
|
1897
|
+
}
|
|
1898
|
+
function we(t) {
|
|
1899
|
+
return !!t.useToken;
|
|
1900
|
+
}
|
|
1901
|
+
function Ie(t) {
|
|
1902
|
+
return t.useValue != null;
|
|
1903
|
+
}
|
|
1904
|
+
function pr(t) {
|
|
1905
|
+
return dt(t) || Ie(t) || we(t) || Pe(t);
|
|
1906
|
+
}
|
|
1907
|
+
var Ue = function() {
|
|
1908
|
+
function t() {
|
|
1909
|
+
this._registryMap = /* @__PURE__ */ new Map();
|
|
1910
|
+
}
|
|
1911
|
+
return t.prototype.entries = function() {
|
|
1912
|
+
return this._registryMap.entries();
|
|
1913
|
+
}, t.prototype.getAll = function(e) {
|
|
1914
|
+
return this.ensure(e), this._registryMap.get(e);
|
|
1915
|
+
}, t.prototype.get = function(e) {
|
|
1916
|
+
this.ensure(e);
|
|
1917
|
+
var r = this._registryMap.get(e);
|
|
1918
|
+
return r[r.length - 1] || null;
|
|
1919
|
+
}, t.prototype.set = function(e, r) {
|
|
1920
|
+
this.ensure(e), this._registryMap.get(e).push(r);
|
|
1921
|
+
}, t.prototype.setAll = function(e, r) {
|
|
1922
|
+
this._registryMap.set(e, r);
|
|
1923
|
+
}, t.prototype.has = function(e) {
|
|
1924
|
+
return this.ensure(e), this._registryMap.get(e).length > 0;
|
|
1925
|
+
}, t.prototype.clear = function() {
|
|
1926
|
+
this._registryMap.clear();
|
|
1927
|
+
}, t.prototype.ensure = function(e) {
|
|
1928
|
+
this._registryMap.has(e) || this._registryMap.set(e, []);
|
|
1929
|
+
}, t;
|
|
1930
|
+
}(), vr = function(t) {
|
|
1931
|
+
Be(e, t);
|
|
1932
|
+
function e() {
|
|
1933
|
+
return t !== null && t.apply(this, arguments) || this;
|
|
1934
|
+
}
|
|
1935
|
+
return e;
|
|
1936
|
+
}(Ue), fe = /* @__PURE__ */ function() {
|
|
1937
|
+
function t() {
|
|
1938
|
+
this.scopedResolutions = /* @__PURE__ */ new Map();
|
|
1939
|
+
}
|
|
1940
|
+
return t;
|
|
1941
|
+
}();
|
|
1942
|
+
function gr(t, e) {
|
|
1943
|
+
if (t === null)
|
|
1944
|
+
return "at position #" + e;
|
|
1945
|
+
var r = t.split(",")[e].trim();
|
|
1946
|
+
return '"' + r + '" at position #' + e;
|
|
1947
|
+
}
|
|
1948
|
+
function mr(t, e, r) {
|
|
1949
|
+
return r === void 0 && (r = " "), N([t], e.message.split(`
|
|
1950
|
+
`).map(function(s) {
|
|
1951
|
+
return r + s;
|
|
1952
|
+
})).join(`
|
|
1953
|
+
`);
|
|
1954
|
+
}
|
|
1955
|
+
function yr(t, e, r) {
|
|
1956
|
+
var s = be(t.toString().match(/constructor\(([\w, ]+)\)/) || [], 2), n = s[1], i = n === void 0 ? null : n, a = gr(i, e);
|
|
1957
|
+
return mr("Cannot inject the dependency " + a + ' of "' + t.name + '" constructor. Reason:', r);
|
|
1958
|
+
}
|
|
1959
|
+
function Sr(t) {
|
|
1960
|
+
if (typeof t.dispose != "function")
|
|
1961
|
+
return !1;
|
|
1962
|
+
var e = t.dispose;
|
|
1963
|
+
return !(e.length > 0);
|
|
1964
|
+
}
|
|
1965
|
+
var wr = function(t) {
|
|
1966
|
+
Be(e, t);
|
|
1967
|
+
function e() {
|
|
1968
|
+
return t !== null && t.apply(this, arguments) || this;
|
|
1586
1969
|
}
|
|
1970
|
+
return e;
|
|
1971
|
+
}(Ue), Ir = function(t) {
|
|
1972
|
+
Be(e, t);
|
|
1973
|
+
function e() {
|
|
1974
|
+
return t !== null && t.apply(this, arguments) || this;
|
|
1975
|
+
}
|
|
1976
|
+
return e;
|
|
1977
|
+
}(Ue), br = /* @__PURE__ */ function() {
|
|
1978
|
+
function t() {
|
|
1979
|
+
this.preResolution = new wr(), this.postResolution = new Ir();
|
|
1980
|
+
}
|
|
1981
|
+
return t;
|
|
1982
|
+
}(), pt = /* @__PURE__ */ new Map(), Rr = function() {
|
|
1983
|
+
function t(e) {
|
|
1984
|
+
this.parent = e, this._registry = new vr(), this.interceptors = new br(), this.disposed = !1, this.disposables = /* @__PURE__ */ new Set();
|
|
1985
|
+
}
|
|
1986
|
+
return t.prototype.register = function(e, r, s) {
|
|
1987
|
+
s === void 0 && (s = { lifecycle: A.Transient }), this.ensureNotDisposed();
|
|
1988
|
+
var n;
|
|
1989
|
+
if (pr(r) ? n = r : n = { useClass: r }, we(n))
|
|
1990
|
+
for (var i = [e], a = n; a != null; ) {
|
|
1991
|
+
var l = a.useToken;
|
|
1992
|
+
if (i.includes(l))
|
|
1993
|
+
throw new Error("Token registration cycle detected! " + N(i, [l]).join(" -> "));
|
|
1994
|
+
i.push(l);
|
|
1995
|
+
var o = this._registry.get(l);
|
|
1996
|
+
o && we(o.provider) ? a = o.provider : a = null;
|
|
1997
|
+
}
|
|
1998
|
+
if ((s.lifecycle === A.Singleton || s.lifecycle == A.ContainerScoped || s.lifecycle == A.ResolutionScoped) && (Ie(n) || Pe(n)))
|
|
1999
|
+
throw new Error('Cannot use lifecycle "' + A[s.lifecycle] + '" with ValueProviders or FactoryProviders');
|
|
2000
|
+
return this._registry.set(e, { provider: n, options: s }), this;
|
|
2001
|
+
}, t.prototype.registerType = function(e, r) {
|
|
2002
|
+
return this.ensureNotDisposed(), X(r) ? this.register(e, {
|
|
2003
|
+
useToken: r
|
|
2004
|
+
}) : this.register(e, {
|
|
2005
|
+
useClass: r
|
|
2006
|
+
});
|
|
2007
|
+
}, t.prototype.registerInstance = function(e, r) {
|
|
2008
|
+
return this.ensureNotDisposed(), this.register(e, {
|
|
2009
|
+
useValue: r
|
|
2010
|
+
});
|
|
2011
|
+
}, t.prototype.registerSingleton = function(e, r) {
|
|
2012
|
+
if (this.ensureNotDisposed(), X(e)) {
|
|
2013
|
+
if (X(r))
|
|
2014
|
+
return this.register(e, {
|
|
2015
|
+
useToken: r
|
|
2016
|
+
}, { lifecycle: A.Singleton });
|
|
2017
|
+
if (r)
|
|
2018
|
+
return this.register(e, {
|
|
2019
|
+
useClass: r
|
|
2020
|
+
}, { lifecycle: A.Singleton });
|
|
2021
|
+
throw new Error('Cannot register a type name as a singleton without a "to" token');
|
|
2022
|
+
}
|
|
2023
|
+
var s = e;
|
|
2024
|
+
return r && !X(r) && (s = r), this.register(e, {
|
|
2025
|
+
useClass: s
|
|
2026
|
+
}, { lifecycle: A.Singleton });
|
|
2027
|
+
}, t.prototype.resolve = function(e, r, s) {
|
|
2028
|
+
r === void 0 && (r = new fe()), s === void 0 && (s = !1), this.ensureNotDisposed();
|
|
2029
|
+
var n = this.getRegistration(e);
|
|
2030
|
+
if (!n && X(e)) {
|
|
2031
|
+
if (s)
|
|
2032
|
+
return;
|
|
2033
|
+
throw new Error('Attempted to resolve unregistered dependency token: "' + e.toString() + '"');
|
|
2034
|
+
}
|
|
2035
|
+
if (this.executePreResolutionInterceptor(e, "Single"), n) {
|
|
2036
|
+
var i = this.resolveRegistration(n, r);
|
|
2037
|
+
return this.executePostResolutionInterceptor(e, i, "Single"), i;
|
|
2038
|
+
}
|
|
2039
|
+
if (fr(e)) {
|
|
2040
|
+
var i = this.construct(e, r);
|
|
2041
|
+
return this.executePostResolutionInterceptor(e, i, "Single"), i;
|
|
2042
|
+
}
|
|
2043
|
+
throw new Error("Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.");
|
|
2044
|
+
}, t.prototype.executePreResolutionInterceptor = function(e, r) {
|
|
2045
|
+
var s, n;
|
|
2046
|
+
if (this.interceptors.preResolution.has(e)) {
|
|
2047
|
+
var i = [];
|
|
2048
|
+
try {
|
|
2049
|
+
for (var a = de(this.interceptors.preResolution.getAll(e)), l = a.next(); !l.done; l = a.next()) {
|
|
2050
|
+
var o = l.value;
|
|
2051
|
+
o.options.frequency != "Once" && i.push(o), o.callback(e, r);
|
|
2052
|
+
}
|
|
2053
|
+
} catch (u) {
|
|
2054
|
+
s = { error: u };
|
|
2055
|
+
} finally {
|
|
2056
|
+
try {
|
|
2057
|
+
l && !l.done && (n = a.return) && n.call(a);
|
|
2058
|
+
} finally {
|
|
2059
|
+
if (s) throw s.error;
|
|
2060
|
+
}
|
|
2061
|
+
}
|
|
2062
|
+
this.interceptors.preResolution.setAll(e, i);
|
|
2063
|
+
}
|
|
2064
|
+
}, t.prototype.executePostResolutionInterceptor = function(e, r, s) {
|
|
2065
|
+
var n, i;
|
|
2066
|
+
if (this.interceptors.postResolution.has(e)) {
|
|
2067
|
+
var a = [];
|
|
2068
|
+
try {
|
|
2069
|
+
for (var l = de(this.interceptors.postResolution.getAll(e)), o = l.next(); !o.done; o = l.next()) {
|
|
2070
|
+
var u = o.value;
|
|
2071
|
+
u.options.frequency != "Once" && a.push(u), u.callback(e, r, s);
|
|
2072
|
+
}
|
|
2073
|
+
} catch (f) {
|
|
2074
|
+
n = { error: f };
|
|
2075
|
+
} finally {
|
|
2076
|
+
try {
|
|
2077
|
+
o && !o.done && (i = l.return) && i.call(l);
|
|
2078
|
+
} finally {
|
|
2079
|
+
if (n) throw n.error;
|
|
2080
|
+
}
|
|
2081
|
+
}
|
|
2082
|
+
this.interceptors.postResolution.setAll(e, a);
|
|
2083
|
+
}
|
|
2084
|
+
}, t.prototype.resolveRegistration = function(e, r) {
|
|
2085
|
+
if (this.ensureNotDisposed(), e.options.lifecycle === A.ResolutionScoped && r.scopedResolutions.has(e))
|
|
2086
|
+
return r.scopedResolutions.get(e);
|
|
2087
|
+
var s = e.options.lifecycle === A.Singleton, n = e.options.lifecycle === A.ContainerScoped, i = s || n, a;
|
|
2088
|
+
return Ie(e.provider) ? a = e.provider.useValue : we(e.provider) ? a = i ? e.instance || (e.instance = this.resolve(e.provider.useToken, r)) : this.resolve(e.provider.useToken, r) : dt(e.provider) ? a = i ? e.instance || (e.instance = this.construct(e.provider.useClass, r)) : this.construct(e.provider.useClass, r) : Pe(e.provider) ? a = e.provider.useFactory(this) : a = this.construct(e.provider, r), e.options.lifecycle === A.ResolutionScoped && r.scopedResolutions.set(e, a), a;
|
|
2089
|
+
}, t.prototype.resolveAll = function(e, r, s) {
|
|
2090
|
+
var n = this;
|
|
2091
|
+
r === void 0 && (r = new fe()), s === void 0 && (s = !1), this.ensureNotDisposed();
|
|
2092
|
+
var i = this.getAllRegistrations(e);
|
|
2093
|
+
if (!i && X(e)) {
|
|
2094
|
+
if (s)
|
|
2095
|
+
return [];
|
|
2096
|
+
throw new Error('Attempted to resolve unregistered dependency token: "' + e.toString() + '"');
|
|
2097
|
+
}
|
|
2098
|
+
if (this.executePreResolutionInterceptor(e, "All"), i) {
|
|
2099
|
+
var a = i.map(function(o) {
|
|
2100
|
+
return n.resolveRegistration(o, r);
|
|
2101
|
+
});
|
|
2102
|
+
return this.executePostResolutionInterceptor(e, a, "All"), a;
|
|
2103
|
+
}
|
|
2104
|
+
var l = [this.construct(e, r)];
|
|
2105
|
+
return this.executePostResolutionInterceptor(e, l, "All"), l;
|
|
2106
|
+
}, t.prototype.isRegistered = function(e, r) {
|
|
2107
|
+
return r === void 0 && (r = !1), this.ensureNotDisposed(), this._registry.has(e) || r && (this.parent || !1) && this.parent.isRegistered(e, !0);
|
|
2108
|
+
}, t.prototype.reset = function() {
|
|
2109
|
+
this.ensureNotDisposed(), this._registry.clear(), this.interceptors.preResolution.clear(), this.interceptors.postResolution.clear();
|
|
2110
|
+
}, t.prototype.clearInstances = function() {
|
|
2111
|
+
var e, r;
|
|
2112
|
+
this.ensureNotDisposed();
|
|
2113
|
+
try {
|
|
2114
|
+
for (var s = de(this._registry.entries()), n = s.next(); !n.done; n = s.next()) {
|
|
2115
|
+
var i = be(n.value, 2), a = i[0], l = i[1];
|
|
2116
|
+
this._registry.setAll(a, l.filter(function(o) {
|
|
2117
|
+
return !Ie(o.provider);
|
|
2118
|
+
}).map(function(o) {
|
|
2119
|
+
return o.instance = void 0, o;
|
|
2120
|
+
}));
|
|
2121
|
+
}
|
|
2122
|
+
} catch (o) {
|
|
2123
|
+
e = { error: o };
|
|
2124
|
+
} finally {
|
|
2125
|
+
try {
|
|
2126
|
+
n && !n.done && (r = s.return) && r.call(s);
|
|
2127
|
+
} finally {
|
|
2128
|
+
if (e) throw e.error;
|
|
2129
|
+
}
|
|
2130
|
+
}
|
|
2131
|
+
}, t.prototype.createChildContainer = function() {
|
|
2132
|
+
var e, r;
|
|
2133
|
+
this.ensureNotDisposed();
|
|
2134
|
+
var s = new t(this);
|
|
2135
|
+
try {
|
|
2136
|
+
for (var n = de(this._registry.entries()), i = n.next(); !i.done; i = n.next()) {
|
|
2137
|
+
var a = be(i.value, 2), l = a[0], o = a[1];
|
|
2138
|
+
o.some(function(u) {
|
|
2139
|
+
var f = u.options;
|
|
2140
|
+
return f.lifecycle === A.ContainerScoped;
|
|
2141
|
+
}) && s._registry.setAll(l, o.map(function(u) {
|
|
2142
|
+
return u.options.lifecycle === A.ContainerScoped ? {
|
|
2143
|
+
provider: u.provider,
|
|
2144
|
+
options: u.options
|
|
2145
|
+
} : u;
|
|
2146
|
+
}));
|
|
2147
|
+
}
|
|
2148
|
+
} catch (u) {
|
|
2149
|
+
e = { error: u };
|
|
2150
|
+
} finally {
|
|
2151
|
+
try {
|
|
2152
|
+
i && !i.done && (r = n.return) && r.call(n);
|
|
2153
|
+
} finally {
|
|
2154
|
+
if (e) throw e.error;
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
return s;
|
|
2158
|
+
}, t.prototype.beforeResolution = function(e, r, s) {
|
|
2159
|
+
s === void 0 && (s = { frequency: "Always" }), this.interceptors.preResolution.set(e, {
|
|
2160
|
+
callback: r,
|
|
2161
|
+
options: s
|
|
2162
|
+
});
|
|
2163
|
+
}, t.prototype.afterResolution = function(e, r, s) {
|
|
2164
|
+
s === void 0 && (s = { frequency: "Always" }), this.interceptors.postResolution.set(e, {
|
|
2165
|
+
callback: r,
|
|
2166
|
+
options: s
|
|
2167
|
+
});
|
|
2168
|
+
}, t.prototype.dispose = function() {
|
|
2169
|
+
return lr(this, void 0, void 0, function() {
|
|
2170
|
+
var e;
|
|
2171
|
+
return ur(this, function(r) {
|
|
2172
|
+
switch (r.label) {
|
|
2173
|
+
case 0:
|
|
2174
|
+
return this.disposed = !0, e = [], this.disposables.forEach(function(s) {
|
|
2175
|
+
var n = s.dispose();
|
|
2176
|
+
n && e.push(n);
|
|
2177
|
+
}), [4, Promise.all(e)];
|
|
2178
|
+
case 1:
|
|
2179
|
+
return r.sent(), [2];
|
|
2180
|
+
}
|
|
2181
|
+
});
|
|
2182
|
+
});
|
|
2183
|
+
}, t.prototype.getRegistration = function(e) {
|
|
2184
|
+
return this.isRegistered(e) ? this._registry.get(e) : this.parent ? this.parent.getRegistration(e) : null;
|
|
2185
|
+
}, t.prototype.getAllRegistrations = function(e) {
|
|
2186
|
+
return this.isRegistered(e) ? this._registry.getAll(e) : this.parent ? this.parent.getAllRegistrations(e) : null;
|
|
2187
|
+
}, t.prototype.construct = function(e, r) {
|
|
2188
|
+
var s = this;
|
|
2189
|
+
if (e instanceof ft)
|
|
2190
|
+
return e.createProxy(function(i) {
|
|
2191
|
+
return s.resolve(i, r);
|
|
2192
|
+
});
|
|
2193
|
+
var n = function() {
|
|
2194
|
+
var i = pt.get(e);
|
|
2195
|
+
if (!i || i.length === 0) {
|
|
2196
|
+
if (e.length === 0)
|
|
2197
|
+
return new e();
|
|
2198
|
+
throw new Error('TypeInfo not known for "' + e.name + '"');
|
|
2199
|
+
}
|
|
2200
|
+
var a = i.map(s.resolveParams(r, e));
|
|
2201
|
+
return new (e.bind.apply(e, N([void 0], a)))();
|
|
2202
|
+
}();
|
|
2203
|
+
return Sr(n) && this.disposables.add(n), n;
|
|
2204
|
+
}, t.prototype.resolveParams = function(e, r) {
|
|
2205
|
+
var s = this;
|
|
2206
|
+
return function(n, i) {
|
|
2207
|
+
var a, l, o;
|
|
2208
|
+
try {
|
|
2209
|
+
return dr(n) ? Xe(n) ? n.multiple ? (a = s.resolve(n.transform)).transform.apply(a, N([s.resolveAll(n.token, new fe(), n.isOptional)], n.transformArgs)) : (l = s.resolve(n.transform)).transform.apply(l, N([s.resolve(n.token, e, n.isOptional)], n.transformArgs)) : n.multiple ? s.resolveAll(n.token, new fe(), n.isOptional) : s.resolve(n.token, e, n.isOptional) : Xe(n) ? (o = s.resolve(n.transform, e)).transform.apply(o, N([s.resolve(n.token, e)], n.transformArgs)) : s.resolve(n, e);
|
|
2210
|
+
} catch (u) {
|
|
2211
|
+
throw new Error(yr(r, i, u));
|
|
2212
|
+
}
|
|
2213
|
+
};
|
|
2214
|
+
}, t.prototype.ensureNotDisposed = function() {
|
|
2215
|
+
if (this.disposed)
|
|
2216
|
+
throw new Error("This container has been disposed, you cannot interact with a disposed container");
|
|
2217
|
+
}, t;
|
|
2218
|
+
}(), Ar = new Rr();
|
|
2219
|
+
function Dr(t) {
|
|
2220
|
+
return function(e) {
|
|
2221
|
+
pt.set(e, hr(e));
|
|
2222
|
+
};
|
|
2223
|
+
}
|
|
2224
|
+
function _r() {
|
|
2225
|
+
return function(t) {
|
|
2226
|
+
Dr()(t), Ar.registerSingleton(t);
|
|
2227
|
+
};
|
|
2228
|
+
}
|
|
2229
|
+
if (typeof Reflect > "u" || !Reflect.getMetadata)
|
|
2230
|
+
throw new Error(`tsyringe requires a reflect polyfill. Please add 'import "reflect-metadata"' to the top of your entry point.`);
|
|
2231
|
+
var Cr = Object.getOwnPropertyDescriptor, Mr = (t, e, r, s) => {
|
|
2232
|
+
for (var n = s > 1 ? void 0 : s ? Cr(e, r) : e, i = t.length - 1, a; i >= 0; i--)
|
|
2233
|
+
(a = t[i]) && (n = a(n) || n);
|
|
2234
|
+
return n;
|
|
2235
|
+
};
|
|
2236
|
+
let Qe = class {
|
|
2237
|
+
setCellComponentRegistry(t) {
|
|
2238
|
+
this.cellComponentRegistry = t;
|
|
2239
|
+
}
|
|
2240
|
+
getCellComponentRegistry() {
|
|
2241
|
+
return this.cellComponentRegistry;
|
|
2242
|
+
}
|
|
2243
|
+
};
|
|
2244
|
+
Qe = Mr([
|
|
2245
|
+
_r()
|
|
2246
|
+
], Qe);
|
|
2247
|
+
class ds {
|
|
2248
|
+
constructor() {
|
|
2249
|
+
this.registeredComponents = /* @__PURE__ */ new Map();
|
|
2250
|
+
}
|
|
2251
|
+
initialize() {
|
|
2252
|
+
this.registerComponents();
|
|
2253
|
+
}
|
|
2254
|
+
getRegisteredComponents() {
|
|
2255
|
+
return this.registeredComponents;
|
|
2256
|
+
}
|
|
2257
|
+
}
|
|
2258
|
+
function fs(t) {
|
|
2259
|
+
return function(r, s) {
|
|
2260
|
+
r.constructor.prototype.headers || (r.constructor.prototype.headers = []), r.constructor.prototype.headers.push({ path: s, ...t });
|
|
2261
|
+
};
|
|
2262
|
+
}
|
|
2263
|
+
function ps(t) {
|
|
2264
|
+
return function(r) {
|
|
2265
|
+
async function s() {
|
|
2266
|
+
return r.prototype.headers || [];
|
|
2267
|
+
}
|
|
2268
|
+
t.loadHeaderSchema = s;
|
|
2269
|
+
};
|
|
2270
|
+
}
|
|
2271
|
+
function Er() {
|
|
2272
|
+
const t = C(
|
|
2273
|
+
/* @__PURE__ */ new Map()
|
|
2274
|
+
), e = C(0), r = C(null), s = w(() => Array.from(t.value.values()));
|
|
1587
2275
|
function n(v) {
|
|
1588
|
-
|
|
1589
|
-
i(g);
|
|
2276
|
+
e.value = v;
|
|
1590
2277
|
}
|
|
1591
2278
|
function i(v) {
|
|
2279
|
+
for (const m of v)
|
|
2280
|
+
a(m);
|
|
2281
|
+
}
|
|
2282
|
+
function a(v) {
|
|
1592
2283
|
t.value.set(v.id, v);
|
|
1593
2284
|
}
|
|
1594
|
-
function
|
|
1595
|
-
return
|
|
2285
|
+
function l(v) {
|
|
2286
|
+
return r.value = t.value.get(v) || null, r.value;
|
|
1596
2287
|
}
|
|
1597
|
-
function
|
|
1598
|
-
const
|
|
1599
|
-
return
|
|
2288
|
+
function o(v) {
|
|
2289
|
+
const m = l(v);
|
|
2290
|
+
return m && t.value.delete(v), !!m;
|
|
1600
2291
|
}
|
|
1601
|
-
function
|
|
2292
|
+
function u() {
|
|
1602
2293
|
t.value.clear();
|
|
1603
2294
|
}
|
|
1604
2295
|
function f(v) {
|
|
1605
|
-
|
|
2296
|
+
r.value = v;
|
|
1606
2297
|
}
|
|
1607
|
-
function
|
|
1608
|
-
|
|
2298
|
+
function d() {
|
|
2299
|
+
r.value = null;
|
|
1609
2300
|
}
|
|
1610
2301
|
return {
|
|
1611
|
-
itemsAsArray:
|
|
2302
|
+
itemsAsArray: s,
|
|
1612
2303
|
totalCount: e,
|
|
1613
|
-
currentItem:
|
|
1614
|
-
setTotalCount:
|
|
1615
|
-
addOrReplaceItems:
|
|
1616
|
-
getById:
|
|
1617
|
-
removeById:
|
|
1618
|
-
clearItems:
|
|
2304
|
+
currentItem: r,
|
|
2305
|
+
setTotalCount: n,
|
|
2306
|
+
addOrReplaceItems: i,
|
|
2307
|
+
getById: l,
|
|
2308
|
+
removeById: o,
|
|
2309
|
+
clearItems: u,
|
|
1619
2310
|
setCurrentItem: f,
|
|
1620
|
-
clearCurrentItem:
|
|
2311
|
+
clearCurrentItem: d
|
|
1621
2312
|
};
|
|
1622
2313
|
}
|
|
1623
|
-
class
|
|
2314
|
+
class xr {
|
|
1624
2315
|
constructor() {
|
|
1625
|
-
this.pageNumber = 1, this.itemCount = 20, this.sortDetail = new
|
|
2316
|
+
this.pageNumber = 1, this.itemCount = 20, this.sortDetail = new Ye("id", L.DESC), this.filters = [];
|
|
1626
2317
|
}
|
|
1627
2318
|
}
|
|
1628
|
-
class
|
|
1629
|
-
constructor(e,
|
|
1630
|
-
this.items = e, this.totalItems =
|
|
2319
|
+
class vs {
|
|
2320
|
+
constructor(e, r) {
|
|
2321
|
+
this.items = e, this.totalItems = r;
|
|
1631
2322
|
}
|
|
1632
2323
|
}
|
|
1633
|
-
class
|
|
1634
|
-
constructor(e,
|
|
1635
|
-
this.shouldKeepSync = e, this.intervalInMillisecond =
|
|
2324
|
+
class gs {
|
|
2325
|
+
constructor(e, r) {
|
|
2326
|
+
this.shouldKeepSync = e, this.intervalInMillisecond = r;
|
|
1636
2327
|
}
|
|
1637
2328
|
}
|
|
1638
|
-
const
|
|
1639
|
-
function
|
|
1640
|
-
const t =
|
|
2329
|
+
const et = new xr();
|
|
2330
|
+
function Or() {
|
|
2331
|
+
const t = C(structuredClone(et));
|
|
1641
2332
|
function e() {
|
|
1642
2333
|
t.value.pageNumber = t.value.pageNumber + 1;
|
|
1643
2334
|
}
|
|
1644
|
-
function
|
|
2335
|
+
function r() {
|
|
1645
2336
|
t.value.pageNumber = t.value.pageNumber - 1;
|
|
1646
2337
|
}
|
|
1647
|
-
function
|
|
1648
|
-
t.value.pageNumber =
|
|
2338
|
+
function s(d) {
|
|
2339
|
+
t.value.pageNumber = d;
|
|
1649
2340
|
}
|
|
1650
|
-
function
|
|
1651
|
-
t.value.itemCount =
|
|
2341
|
+
function n(d) {
|
|
2342
|
+
t.value.itemCount = d;
|
|
1652
2343
|
}
|
|
1653
|
-
function
|
|
1654
|
-
t.value.sortDetail.key =
|
|
2344
|
+
function i(d) {
|
|
2345
|
+
t.value.sortDetail.key = d.key, t.value.sortDetail.order = d.order;
|
|
1655
2346
|
}
|
|
1656
|
-
function
|
|
1657
|
-
for (const v in
|
|
1658
|
-
|
|
2347
|
+
function a(d) {
|
|
2348
|
+
for (const v in d)
|
|
2349
|
+
l(v, d[v]);
|
|
1659
2350
|
}
|
|
1660
|
-
function
|
|
1661
|
-
const
|
|
1662
|
-
(
|
|
2351
|
+
function l(d, v) {
|
|
2352
|
+
const m = t.value.filters.findIndex(
|
|
2353
|
+
(b) => b.key === d
|
|
1663
2354
|
);
|
|
1664
|
-
|
|
2355
|
+
m > -1 ? t.value.filters[m].value = v : t.value.filters.push({ key: d, value: v });
|
|
1665
2356
|
}
|
|
1666
|
-
function
|
|
2357
|
+
function o(d) {
|
|
1667
2358
|
let v = t.value.filters;
|
|
1668
|
-
v = v.filter((
|
|
2359
|
+
v = v.filter((m) => m.key !== d), t.value.filters = v;
|
|
1669
2360
|
}
|
|
1670
|
-
function
|
|
1671
|
-
const
|
|
2361
|
+
function u() {
|
|
2362
|
+
const d = {
|
|
1672
2363
|
page: t.value.pageNumber,
|
|
1673
2364
|
count: t.value.itemCount
|
|
1674
2365
|
};
|
|
1675
|
-
t.value.sortDetail && (
|
|
2366
|
+
t.value.sortDetail && (d.by = t.value.sortDetail.key, d.order = t.value.sortDetail.order);
|
|
1676
2367
|
for (const v of t.value.filters)
|
|
1677
2368
|
if (v.value)
|
|
1678
2369
|
if (typeof v.value == "string" || typeof v.value == "number")
|
|
1679
|
-
|
|
2370
|
+
d[v.key] = v.value;
|
|
1680
2371
|
else {
|
|
1681
|
-
const
|
|
1682
|
-
|
|
2372
|
+
const m = JSON.stringify(v.value);
|
|
2373
|
+
m !== "[]" && m !== "{}" && (d[v.key] = m);
|
|
1683
2374
|
}
|
|
1684
|
-
return
|
|
2375
|
+
return d;
|
|
1685
2376
|
}
|
|
1686
2377
|
function f() {
|
|
1687
|
-
t.value = structuredClone(
|
|
2378
|
+
t.value = structuredClone(et);
|
|
1688
2379
|
}
|
|
1689
2380
|
return {
|
|
1690
2381
|
params: t,
|
|
1691
2382
|
setNextPage: e,
|
|
1692
|
-
setPreventPage:
|
|
1693
|
-
setPageNumber:
|
|
1694
|
-
setItemCount:
|
|
1695
|
-
setSortDetail:
|
|
1696
|
-
setFilter:
|
|
1697
|
-
removeFilter:
|
|
1698
|
-
getRequestParams:
|
|
2383
|
+
setPreventPage: r,
|
|
2384
|
+
setPageNumber: s,
|
|
2385
|
+
setItemCount: n,
|
|
2386
|
+
setSortDetail: i,
|
|
2387
|
+
setFilter: l,
|
|
2388
|
+
removeFilter: o,
|
|
2389
|
+
getRequestParams: u,
|
|
1699
2390
|
clearParam: f,
|
|
1700
|
-
setFiltersBaseOnRequestBody:
|
|
2391
|
+
setFiltersBaseOnRequestBody: a
|
|
1701
2392
|
};
|
|
1702
2393
|
}
|
|
1703
|
-
function
|
|
1704
|
-
const t =
|
|
2394
|
+
function Lr() {
|
|
2395
|
+
const t = C(/* @__PURE__ */ new Set()), e = w(() => t.value.has(g.FetchList)), r = w(() => t.value.has(g.FetchItem)), s = w(() => t.value.has(g.FetchLastItems)), n = w(() => t.value.has(g.FetchPreviousItems)), i = w(() => t.value.has(g.Create)), a = w(() => t.value.has(g.Update)), l = w(() => t.value.has(g.Delete)), o = w(() => t.value.has(g.Search)), u = w(() => t.value.has(g.Sort));
|
|
1705
2396
|
function f(v) {
|
|
1706
2397
|
t.value.add(v);
|
|
1707
2398
|
}
|
|
1708
|
-
function
|
|
2399
|
+
function d(v) {
|
|
1709
2400
|
t.value.delete(v);
|
|
1710
2401
|
}
|
|
1711
2402
|
return {
|
|
1712
2403
|
loadingStatus: t,
|
|
1713
2404
|
isFetchingList: e,
|
|
1714
|
-
isFetchingItem:
|
|
1715
|
-
isFetchingLastItems:
|
|
1716
|
-
isFetchingPreviousItems:
|
|
1717
|
-
isCreating:
|
|
1718
|
-
isUpdating:
|
|
1719
|
-
isDeleting:
|
|
1720
|
-
isSearching:
|
|
1721
|
-
isSorting:
|
|
2405
|
+
isFetchingItem: r,
|
|
2406
|
+
isFetchingLastItems: s,
|
|
2407
|
+
isFetchingPreviousItems: n,
|
|
2408
|
+
isCreating: i,
|
|
2409
|
+
isUpdating: a,
|
|
2410
|
+
isDeleting: l,
|
|
2411
|
+
isSearching: o,
|
|
2412
|
+
isSorting: u,
|
|
1722
2413
|
setStatus: f,
|
|
1723
|
-
removeStatus:
|
|
2414
|
+
removeStatus: d
|
|
1724
2415
|
};
|
|
1725
2416
|
}
|
|
1726
|
-
function
|
|
1727
|
-
const e =
|
|
1728
|
-
runAction: async () =>
|
|
1729
|
-
}),
|
|
1730
|
-
const
|
|
1731
|
-
for (let y =
|
|
1732
|
-
|
|
1733
|
-
return
|
|
1734
|
-
}),
|
|
2417
|
+
function ms(t) {
|
|
2418
|
+
const e = Er(), r = Or(), s = Lr(), n = new ut({
|
|
2419
|
+
runAction: async () => d(g.AutoRefresh)
|
|
2420
|
+
}), i = w(() => {
|
|
2421
|
+
const c = r.params.value.pageNumber, h = r.params.value.itemCount, p = c * h - h, S = c * h - 1, I = [];
|
|
2422
|
+
for (let y = p; y <= S && e.itemsAsArray.value[y]; y++)
|
|
2423
|
+
I.push(e.itemsAsArray.value[y]);
|
|
2424
|
+
return I;
|
|
2425
|
+
}), a = w(() => ({
|
|
1735
2426
|
totalItems: e.totalCount.value,
|
|
1736
|
-
currentPage:
|
|
2427
|
+
currentPage: r.params.value.pageNumber,
|
|
1737
2428
|
rows: e.itemsAsArray.value,
|
|
1738
|
-
loadingStatus:
|
|
1739
|
-
currentPageItems:
|
|
1740
|
-
})),
|
|
1741
|
-
getData:
|
|
1742
|
-
sort:
|
|
1743
|
-
paginate:
|
|
1744
|
-
fetchRows:
|
|
1745
|
-
})),
|
|
1746
|
-
function
|
|
1747
|
-
return
|
|
1748
|
-
}
|
|
1749
|
-
async function f(
|
|
1750
|
-
const
|
|
1751
|
-
return e.clearItems(), e.addOrReplaceItems(
|
|
1752
|
-
}
|
|
1753
|
-
async function
|
|
1754
|
-
|
|
1755
|
-
const
|
|
1756
|
-
return
|
|
2429
|
+
loadingStatus: s.loadingStatus.value,
|
|
2430
|
+
currentPageItems: i.value
|
|
2431
|
+
})), l = w(() => ({
|
|
2432
|
+
getData: u,
|
|
2433
|
+
sort: te,
|
|
2434
|
+
paginate: ae,
|
|
2435
|
+
fetchRows: d
|
|
2436
|
+
})), o = w(() => t.getSyncDetail());
|
|
2437
|
+
function u() {
|
|
2438
|
+
return a.value;
|
|
2439
|
+
}
|
|
2440
|
+
async function f(c) {
|
|
2441
|
+
const h = await t.fetchList(c);
|
|
2442
|
+
return e.clearItems(), e.addOrReplaceItems(h.items), e.setTotalCount(h.totalItems), h;
|
|
2443
|
+
}
|
|
2444
|
+
async function d(c = g.FetchList) {
|
|
2445
|
+
s.setStatus(c);
|
|
2446
|
+
const h = await f(r.getRequestParams());
|
|
2447
|
+
return s.removeStatus(c), h;
|
|
1757
2448
|
}
|
|
1758
2449
|
async function v() {
|
|
1759
|
-
|
|
2450
|
+
m(), await d();
|
|
1760
2451
|
}
|
|
1761
|
-
function
|
|
1762
|
-
if (!
|
|
2452
|
+
function m() {
|
|
2453
|
+
if (!o.value.shouldKeepSync)
|
|
1763
2454
|
throw new Error("The provided repository does not support auto refresh");
|
|
1764
|
-
|
|
1765
|
-
}
|
|
1766
|
-
function
|
|
1767
|
-
|
|
1768
|
-
}
|
|
1769
|
-
async function
|
|
1770
|
-
|
|
1771
|
-
const
|
|
1772
|
-
return e.setCurrentItem(
|
|
1773
|
-
}
|
|
1774
|
-
async function
|
|
1775
|
-
|
|
1776
|
-
const
|
|
1777
|
-
return
|
|
1778
|
-
}
|
|
1779
|
-
async function
|
|
1780
|
-
|
|
1781
|
-
const
|
|
1782
|
-
return
|
|
1783
|
-
}
|
|
1784
|
-
async function
|
|
1785
|
-
return
|
|
1786
|
-
}
|
|
1787
|
-
async function
|
|
1788
|
-
|
|
1789
|
-
const
|
|
1790
|
-
return
|
|
1791
|
-
}
|
|
1792
|
-
async function
|
|
1793
|
-
|
|
1794
|
-
const
|
|
1795
|
-
return
|
|
1796
|
-
}
|
|
1797
|
-
async function
|
|
1798
|
-
|
|
1799
|
-
const
|
|
1800
|
-
return
|
|
1801
|
-
}
|
|
1802
|
-
async function
|
|
1803
|
-
|
|
1804
|
-
const
|
|
1805
|
-
return
|
|
1806
|
-
}
|
|
1807
|
-
async function
|
|
1808
|
-
|
|
1809
|
-
const
|
|
1810
|
-
return
|
|
1811
|
-
}
|
|
1812
|
-
async function
|
|
1813
|
-
return
|
|
1814
|
-
}
|
|
1815
|
-
return
|
|
1816
|
-
|
|
2455
|
+
n.setupInterval(o.value.intervalInMillisecond);
|
|
2456
|
+
}
|
|
2457
|
+
function b() {
|
|
2458
|
+
n.clearInterval();
|
|
2459
|
+
}
|
|
2460
|
+
async function q(c, h = !0) {
|
|
2461
|
+
s.setStatus(g.FetchItem), h && e.clearCurrentItem();
|
|
2462
|
+
const p = await t.fetchItemById(c);
|
|
2463
|
+
return e.setCurrentItem(p), s.removeStatus(g.FetchItem), p;
|
|
2464
|
+
}
|
|
2465
|
+
async function H(c) {
|
|
2466
|
+
s.setStatus(g.Create);
|
|
2467
|
+
const h = await t.createItem(c);
|
|
2468
|
+
return h && e.addOrReplaceItems([h]), s.removeStatus(g.Create), h;
|
|
2469
|
+
}
|
|
2470
|
+
async function z(c, h) {
|
|
2471
|
+
s.setStatus(g.Update);
|
|
2472
|
+
const p = await t.updateItem(c, h);
|
|
2473
|
+
return p && e.addOrReplaceItems([p]), s.removeStatus(g.Update), p;
|
|
2474
|
+
}
|
|
2475
|
+
async function G(c) {
|
|
2476
|
+
return s.setStatus(g.Delete), await t.deleteItem(c), s.removeStatus(g.Delete), e.removeById(c);
|
|
2477
|
+
}
|
|
2478
|
+
async function _e() {
|
|
2479
|
+
r.setNextPage(), s.setStatus(g.FetchLastItems);
|
|
2480
|
+
const c = await f(r.getRequestParams());
|
|
2481
|
+
return s.removeStatus(g.FetchLastItems), c;
|
|
2482
|
+
}
|
|
2483
|
+
async function Ce() {
|
|
2484
|
+
r.setPreventPage(), s.setStatus(g.FetchPreviousItems);
|
|
2485
|
+
const c = await f(r.getRequestParams());
|
|
2486
|
+
return s.removeStatus(g.FetchPreviousItems), c;
|
|
2487
|
+
}
|
|
2488
|
+
async function ae(c) {
|
|
2489
|
+
r.setPageNumber(c), s.setStatus(g.FetchList);
|
|
2490
|
+
const h = await f(r.getRequestParams());
|
|
2491
|
+
return s.removeStatus(g.FetchList), h;
|
|
2492
|
+
}
|
|
2493
|
+
async function Me(c) {
|
|
2494
|
+
r.setFilter("search", c), s.setStatus(g.Search), e.clearItems();
|
|
2495
|
+
const h = await f(r.getRequestParams());
|
|
2496
|
+
return s.removeStatus(g.Search), h;
|
|
2497
|
+
}
|
|
2498
|
+
async function te(c) {
|
|
2499
|
+
r.setSortDetail(c), s.setStatus(g.Sort), e.clearItems();
|
|
2500
|
+
const h = await f(r.getRequestParams());
|
|
2501
|
+
return s.removeStatus(g.Sort), h;
|
|
2502
|
+
}
|
|
2503
|
+
async function J() {
|
|
2504
|
+
return r.clearParam(), await d();
|
|
2505
|
+
}
|
|
2506
|
+
return St(() => {
|
|
2507
|
+
b();
|
|
1817
2508
|
}), {
|
|
1818
|
-
loadingStatusManager:
|
|
2509
|
+
loadingStatusManager: s,
|
|
1819
2510
|
dataManger: e,
|
|
1820
|
-
paramsManager:
|
|
1821
|
-
tableRenderingData:
|
|
1822
|
-
fetchList:
|
|
2511
|
+
paramsManager: r,
|
|
2512
|
+
tableRenderingData: a,
|
|
2513
|
+
fetchList: d,
|
|
1823
2514
|
fetchWithAutoRefresh: v,
|
|
1824
|
-
setupAutoRefresh:
|
|
1825
|
-
stopAutoRefresh:
|
|
1826
|
-
fetchItemById:
|
|
1827
|
-
createItem:
|
|
1828
|
-
updateItem:
|
|
1829
|
-
deleteItem:
|
|
1830
|
-
fetchLastItems:
|
|
1831
|
-
fetchPreviousItems:
|
|
1832
|
-
fetchItemsByPageNumber:
|
|
1833
|
-
search:
|
|
1834
|
-
sort:
|
|
1835
|
-
clearFilters:
|
|
1836
|
-
tableService:
|
|
1837
|
-
currentPageItems:
|
|
2515
|
+
setupAutoRefresh: m,
|
|
2516
|
+
stopAutoRefresh: b,
|
|
2517
|
+
fetchItemById: q,
|
|
2518
|
+
createItem: H,
|
|
2519
|
+
updateItem: z,
|
|
2520
|
+
deleteItem: G,
|
|
2521
|
+
fetchLastItems: _e,
|
|
2522
|
+
fetchPreviousItems: Ce,
|
|
2523
|
+
fetchItemsByPageNumber: ae,
|
|
2524
|
+
search: Me,
|
|
2525
|
+
sort: te,
|
|
2526
|
+
clearFilters: J,
|
|
2527
|
+
tableService: l,
|
|
2528
|
+
currentPageItems: i
|
|
1838
2529
|
};
|
|
1839
2530
|
}
|
|
1840
|
-
function
|
|
1841
|
-
const e =
|
|
2531
|
+
function ys(t) {
|
|
2532
|
+
const e = C(t), r = w(() => ({
|
|
1842
2533
|
getData() {
|
|
1843
2534
|
return {
|
|
1844
2535
|
totalItems: e.value.length,
|
|
@@ -1848,7 +2539,7 @@ function Cs(t) {
|
|
|
1848
2539
|
currentPage: 1
|
|
1849
2540
|
};
|
|
1850
2541
|
},
|
|
1851
|
-
async sort(
|
|
2542
|
+
async sort(s) {
|
|
1852
2543
|
return {
|
|
1853
2544
|
totalItems: e.value.length,
|
|
1854
2545
|
items: e.value
|
|
@@ -1860,7 +2551,7 @@ function Cs(t) {
|
|
|
1860
2551
|
items: e.value
|
|
1861
2552
|
};
|
|
1862
2553
|
},
|
|
1863
|
-
async paginate(
|
|
2554
|
+
async paginate(s, n) {
|
|
1864
2555
|
return {
|
|
1865
2556
|
totalItems: e.value.length,
|
|
1866
2557
|
items: e.value
|
|
@@ -1869,44 +2560,44 @@ function Cs(t) {
|
|
|
1869
2560
|
}));
|
|
1870
2561
|
return {
|
|
1871
2562
|
tableRows: e,
|
|
1872
|
-
staticTableService:
|
|
2563
|
+
staticTableService: r
|
|
1873
2564
|
};
|
|
1874
2565
|
}
|
|
1875
|
-
function
|
|
1876
|
-
const t =
|
|
1877
|
-
function a(f) {
|
|
1878
|
-
e.value = f;
|
|
1879
|
-
}
|
|
2566
|
+
function Ss() {
|
|
2567
|
+
const t = C(/* @__PURE__ */ new Map()), e = C(0), r = w(() => e.value), s = w(() => Array.from(t.value.values()));
|
|
1880
2568
|
function n(f) {
|
|
1881
|
-
|
|
1882
|
-
i(u);
|
|
2569
|
+
e.value = f;
|
|
1883
2570
|
}
|
|
1884
2571
|
function i(f) {
|
|
2572
|
+
for (const d of f)
|
|
2573
|
+
a(d);
|
|
2574
|
+
}
|
|
2575
|
+
function a(f) {
|
|
1885
2576
|
t.value.set(String(f.id), f);
|
|
1886
2577
|
}
|
|
1887
|
-
function
|
|
1888
|
-
const
|
|
1889
|
-
return t.value.delete(String(f)),
|
|
2578
|
+
function l(f) {
|
|
2579
|
+
const d = o(f);
|
|
2580
|
+
return t.value.delete(String(f)), d;
|
|
1890
2581
|
}
|
|
1891
|
-
function
|
|
2582
|
+
function o(f) {
|
|
1892
2583
|
return t.value.get(String(f)) || null;
|
|
1893
2584
|
}
|
|
1894
|
-
function
|
|
2585
|
+
function u() {
|
|
1895
2586
|
t.value.clear();
|
|
1896
2587
|
}
|
|
1897
2588
|
return {
|
|
1898
|
-
entityItemsAsArray:
|
|
1899
|
-
addOrReplaceItems:
|
|
1900
|
-
removeById:
|
|
1901
|
-
getItemById:
|
|
1902
|
-
clearItems:
|
|
1903
|
-
setTotalCount:
|
|
1904
|
-
getTotalCount:
|
|
2589
|
+
entityItemsAsArray: s,
|
|
2590
|
+
addOrReplaceItems: i,
|
|
2591
|
+
removeById: l,
|
|
2592
|
+
getItemById: o,
|
|
2593
|
+
clearItems: u,
|
|
2594
|
+
setTotalCount: n,
|
|
2595
|
+
getTotalCount: r
|
|
1905
2596
|
};
|
|
1906
2597
|
}
|
|
1907
|
-
class
|
|
1908
|
-
constructor(e,
|
|
1909
|
-
this.timerId = null, this.debounceTimeout =
|
|
2598
|
+
class ws {
|
|
2599
|
+
constructor(e, r = 500) {
|
|
2600
|
+
this.timerId = null, this.debounceTimeout = r, this.action = e;
|
|
1910
2601
|
}
|
|
1911
2602
|
runAction() {
|
|
1912
2603
|
this.cancelDebounce(), this.action.runImmediate(), this.timerId = setTimeout(() => {
|
|
@@ -1917,38 +2608,38 @@ class Ls {
|
|
|
1917
2608
|
this.timerId && clearTimeout(this.timerId);
|
|
1918
2609
|
}
|
|
1919
2610
|
}
|
|
1920
|
-
function
|
|
1921
|
-
return function(e,
|
|
1922
|
-
const
|
|
1923
|
-
|
|
2611
|
+
function Is(t) {
|
|
2612
|
+
return function(e, r, s) {
|
|
2613
|
+
const n = s.value;
|
|
2614
|
+
s.value = async function(...i) {
|
|
1924
2615
|
try {
|
|
1925
|
-
return await
|
|
1926
|
-
} catch (
|
|
1927
|
-
for (const
|
|
1928
|
-
await
|
|
2616
|
+
return await n.apply(this, i);
|
|
2617
|
+
} catch (a) {
|
|
2618
|
+
for (const l of t)
|
|
2619
|
+
await l.handleError(a);
|
|
1929
2620
|
}
|
|
1930
2621
|
};
|
|
1931
2622
|
};
|
|
1932
2623
|
}
|
|
1933
|
-
function
|
|
1934
|
-
return function(e,
|
|
1935
|
-
const
|
|
1936
|
-
|
|
2624
|
+
function bs(t) {
|
|
2625
|
+
return function(e, r, s) {
|
|
2626
|
+
const n = s.value;
|
|
2627
|
+
s.value = async function(...i) {
|
|
1937
2628
|
try {
|
|
1938
|
-
const
|
|
1939
|
-
for (const
|
|
1940
|
-
|
|
1941
|
-
return
|
|
1942
|
-
} catch (
|
|
1943
|
-
for (const
|
|
1944
|
-
|
|
2629
|
+
const a = await n.apply(this, i);
|
|
2630
|
+
for (const l of t)
|
|
2631
|
+
l.shouldResolveSuccess(a) && await l.handleSuccess(a);
|
|
2632
|
+
return a;
|
|
2633
|
+
} catch (a) {
|
|
2634
|
+
for (const l of t)
|
|
2635
|
+
l.shouldResolveFailure(a) && await l.handleFailure(a);
|
|
1945
2636
|
}
|
|
1946
2637
|
};
|
|
1947
2638
|
};
|
|
1948
2639
|
}
|
|
1949
|
-
class
|
|
1950
|
-
constructor(e,
|
|
1951
|
-
this.successMessageResolver = e, this.failureMessageResolver =
|
|
2640
|
+
class Rs {
|
|
2641
|
+
constructor(e, r, s = () => !0, n = () => !0) {
|
|
2642
|
+
this.successMessageResolver = e, this.failureMessageResolver = r, this.shouldResolveSuccess = s, this.shouldResolveFailure = n;
|
|
1952
2643
|
}
|
|
1953
2644
|
async handleSuccess(e) {
|
|
1954
2645
|
}
|
|
@@ -1959,24 +2650,24 @@ class Es {
|
|
|
1959
2650
|
async handleWarning() {
|
|
1960
2651
|
}
|
|
1961
2652
|
}
|
|
1962
|
-
const
|
|
2653
|
+
const D = class D {
|
|
1963
2654
|
constructor() {
|
|
1964
2655
|
}
|
|
1965
2656
|
static GetInstance() {
|
|
1966
|
-
return
|
|
2657
|
+
return D.instance || (D.instance = new D()), D.instance;
|
|
1967
2658
|
}
|
|
1968
|
-
static registerHandler(e,
|
|
1969
|
-
|
|
2659
|
+
static registerHandler(e, r) {
|
|
2660
|
+
D.handlers.set(e, r);
|
|
1970
2661
|
}
|
|
1971
2662
|
handle(e) {
|
|
1972
|
-
var
|
|
1973
|
-
const
|
|
1974
|
-
|
|
2663
|
+
var n;
|
|
2664
|
+
const r = ((n = e.response) == null ? void 0 : n.status) ?? 0, s = D.handlers.get(r);
|
|
2665
|
+
s && s.handleError(e);
|
|
1975
2666
|
}
|
|
1976
2667
|
};
|
|
1977
|
-
|
|
1978
|
-
let
|
|
1979
|
-
class
|
|
2668
|
+
D.handlers = /* @__PURE__ */ new Map(), D.instance = null;
|
|
2669
|
+
let tt = D;
|
|
2670
|
+
class As {
|
|
1980
2671
|
constructor(e) {
|
|
1981
2672
|
this.axiosInstance = e;
|
|
1982
2673
|
}
|
|
@@ -1991,19 +2682,19 @@ class ks {
|
|
|
1991
2682
|
}
|
|
1992
2683
|
attachRequestInterceptors(e) {
|
|
1993
2684
|
return this.axiosInstance.interceptors.request.use(
|
|
1994
|
-
(
|
|
1995
|
-
for (const
|
|
1996
|
-
|
|
1997
|
-
return
|
|
2685
|
+
(r) => {
|
|
2686
|
+
for (const s of e)
|
|
2687
|
+
s.intercept(r);
|
|
2688
|
+
return r;
|
|
1998
2689
|
},
|
|
1999
|
-
(
|
|
2690
|
+
(r) => Promise.reject(r)
|
|
2000
2691
|
), this;
|
|
2001
2692
|
}
|
|
2002
2693
|
attachResponseInterceptors(e) {
|
|
2003
2694
|
return this.axiosInstance.interceptors.response.use(
|
|
2004
|
-
(
|
|
2005
|
-
(
|
|
2006
|
-
throw e.handle(
|
|
2695
|
+
(r) => r,
|
|
2696
|
+
(r) => {
|
|
2697
|
+
throw e.handle(r), r;
|
|
2007
2698
|
}
|
|
2008
2699
|
), this;
|
|
2009
2700
|
}
|
|
@@ -2011,45 +2702,45 @@ class ks {
|
|
|
2011
2702
|
return this.axiosInstance;
|
|
2012
2703
|
}
|
|
2013
2704
|
}
|
|
2014
|
-
class
|
|
2705
|
+
class Ds {
|
|
2015
2706
|
constructor(e) {
|
|
2016
2707
|
this.axiosInstance = e;
|
|
2017
2708
|
}
|
|
2018
|
-
async get(e,
|
|
2709
|
+
async get(e, r) {
|
|
2019
2710
|
return await this.axiosInstance.get(
|
|
2020
2711
|
e,
|
|
2021
|
-
|
|
2712
|
+
r
|
|
2022
2713
|
);
|
|
2023
2714
|
}
|
|
2024
|
-
async post(e,
|
|
2715
|
+
async post(e, r, s) {
|
|
2025
2716
|
return await this.axiosInstance.post(
|
|
2026
2717
|
e,
|
|
2027
|
-
|
|
2028
|
-
|
|
2718
|
+
r,
|
|
2719
|
+
s
|
|
2029
2720
|
);
|
|
2030
2721
|
}
|
|
2031
|
-
async patch(e,
|
|
2722
|
+
async patch(e, r, s) {
|
|
2032
2723
|
return await this.axiosInstance.patch(
|
|
2033
2724
|
e,
|
|
2034
|
-
|
|
2035
|
-
|
|
2725
|
+
r,
|
|
2726
|
+
s
|
|
2036
2727
|
);
|
|
2037
2728
|
}
|
|
2038
|
-
async put(e,
|
|
2729
|
+
async put(e, r, s) {
|
|
2039
2730
|
return await this.axiosInstance.put(
|
|
2040
2731
|
e,
|
|
2041
|
-
|
|
2042
|
-
|
|
2732
|
+
r,
|
|
2733
|
+
s
|
|
2043
2734
|
);
|
|
2044
2735
|
}
|
|
2045
|
-
async delete(e,
|
|
2736
|
+
async delete(e, r) {
|
|
2046
2737
|
return await this.axiosInstance.delete(
|
|
2047
2738
|
e,
|
|
2048
|
-
|
|
2739
|
+
r
|
|
2049
2740
|
);
|
|
2050
2741
|
}
|
|
2051
2742
|
}
|
|
2052
|
-
class
|
|
2743
|
+
class _s {
|
|
2053
2744
|
constructor() {
|
|
2054
2745
|
this._initializer = [];
|
|
2055
2746
|
}
|
|
@@ -2061,110 +2752,93 @@ class $s {
|
|
|
2061
2752
|
e.initialize();
|
|
2062
2753
|
}
|
|
2063
2754
|
}
|
|
2064
|
-
const
|
|
2755
|
+
const Y = class Y {
|
|
2065
2756
|
constructor() {
|
|
2066
|
-
this.jsonConverter = new
|
|
2757
|
+
this.jsonConverter = new wt();
|
|
2067
2758
|
}
|
|
2068
|
-
serializeObject(e,
|
|
2069
|
-
return this.jsonConverter.serializeObject(e,
|
|
2759
|
+
serializeObject(e, r) {
|
|
2760
|
+
return this.jsonConverter.serializeObject(e, r);
|
|
2070
2761
|
}
|
|
2071
|
-
deserializeObject(e,
|
|
2072
|
-
return this.jsonConverter.deserializeObject(e,
|
|
2762
|
+
deserializeObject(e, r) {
|
|
2763
|
+
return this.jsonConverter.deserializeObject(e, r);
|
|
2073
2764
|
}
|
|
2074
|
-
deserializeArray(e,
|
|
2075
|
-
return this.jsonConverter.deserializeArray(e,
|
|
2765
|
+
deserializeArray(e, r) {
|
|
2766
|
+
return this.jsonConverter.deserializeArray(e, r);
|
|
2076
2767
|
}
|
|
2077
|
-
tryDeserialize(e,
|
|
2078
|
-
for (const
|
|
2768
|
+
tryDeserialize(e, r) {
|
|
2769
|
+
for (const s of r)
|
|
2079
2770
|
try {
|
|
2080
|
-
return this.deserializeObject(e,
|
|
2771
|
+
return this.deserializeObject(e, s);
|
|
2081
2772
|
} catch {
|
|
2082
2773
|
}
|
|
2083
2774
|
throw new Error("Unable to deserialize object");
|
|
2084
2775
|
}
|
|
2085
2776
|
static GetInstance() {
|
|
2086
|
-
return
|
|
2777
|
+
return Y.Instance || (Y.Instance = new Y()), Y.Instance;
|
|
2087
2778
|
}
|
|
2088
2779
|
};
|
|
2089
|
-
|
|
2090
|
-
let
|
|
2091
|
-
var
|
|
2092
|
-
class
|
|
2093
|
-
constructor(e,
|
|
2094
|
-
this.placement =
|
|
2780
|
+
Y.Instance = null;
|
|
2781
|
+
let rt = Y;
|
|
2782
|
+
var Tr = /* @__PURE__ */ ((t) => (t.Success = "success", t.Failure = "error", t.Info = "info", t.Warning = "warning", t))(Tr || {}), vt = /* @__PURE__ */ ((t) => (t.BottomLeft = "bottomLeft", t.TopLeft = "topLeft", t))(vt || {});
|
|
2783
|
+
class Cs {
|
|
2784
|
+
constructor(e, r, s) {
|
|
2785
|
+
this.placement = vt.BottomLeft, this.type = e, this.message = r, this.description = s;
|
|
2095
2786
|
}
|
|
2096
2787
|
}
|
|
2097
|
-
const
|
|
2098
|
-
const t =
|
|
2788
|
+
const Ms = nt(je.Dialog, () => {
|
|
2789
|
+
const t = st({
|
|
2099
2790
|
dialogComponent: null,
|
|
2100
|
-
width:
|
|
2101
|
-
height:
|
|
2791
|
+
width: V.DefaultWidth,
|
|
2792
|
+
height: V.DefaultHeight,
|
|
2102
2793
|
props: null,
|
|
2103
2794
|
header: ""
|
|
2104
|
-
}), e =
|
|
2105
|
-
function
|
|
2106
|
-
t.dialogComponent =
|
|
2795
|
+
}), e = w(() => !!t.dialogComponent), r = w(() => !!t.header);
|
|
2796
|
+
function s(o) {
|
|
2797
|
+
t.dialogComponent = o;
|
|
2107
2798
|
}
|
|
2108
|
-
function
|
|
2109
|
-
t.header =
|
|
2799
|
+
function n(o) {
|
|
2800
|
+
t.header = o;
|
|
2110
2801
|
}
|
|
2111
|
-
function
|
|
2802
|
+
function i(o) {
|
|
2112
2803
|
if (!e.value)
|
|
2113
2804
|
throw new Error("there is no dialog to set props on");
|
|
2114
|
-
t.props =
|
|
2805
|
+
t.props = o;
|
|
2115
2806
|
}
|
|
2116
|
-
function
|
|
2807
|
+
function a(o, u) {
|
|
2117
2808
|
if (!e.value)
|
|
2118
2809
|
throw new Error("there is no dialog to set size on");
|
|
2119
|
-
if (
|
|
2810
|
+
if (o < V.MinimalAvailableSize)
|
|
2120
2811
|
throw new Error("negative size not supported");
|
|
2121
|
-
|
|
2812
|
+
u === V.Width ? t.width = o : t.height = o;
|
|
2122
2813
|
}
|
|
2123
|
-
function
|
|
2124
|
-
t.props = null, t.height =
|
|
2814
|
+
function l() {
|
|
2815
|
+
t.props = null, t.height = V.DefaultHeight, t.width = V.DefaultWidth, t.header = "", t.dialogComponent = null;
|
|
2125
2816
|
}
|
|
2126
2817
|
return {
|
|
2127
2818
|
dialogData: t,
|
|
2128
|
-
openDialog:
|
|
2129
|
-
clearDialog:
|
|
2130
|
-
setSize:
|
|
2131
|
-
setDialogHeader:
|
|
2132
|
-
setProps:
|
|
2819
|
+
openDialog: s,
|
|
2820
|
+
clearDialog: l,
|
|
2821
|
+
setSize: a,
|
|
2822
|
+
setDialogHeader: n,
|
|
2823
|
+
setProps: i,
|
|
2133
2824
|
isDialogExists: e,
|
|
2134
|
-
hasDefaultHeader:
|
|
2825
|
+
hasDefaultHeader: r
|
|
2135
2826
|
};
|
|
2136
|
-
}),
|
|
2137
|
-
const t =
|
|
2138
|
-
function s() {
|
|
2139
|
-
t.value = ee.Close;
|
|
2140
|
-
}
|
|
2827
|
+
}), Es = nt(je.Drawer, () => {
|
|
2828
|
+
const t = C(ne.Close), e = w(() => t.value === ne.Open);
|
|
2141
2829
|
function r() {
|
|
2142
|
-
t.value =
|
|
2830
|
+
t.value = ne.Close;
|
|
2831
|
+
}
|
|
2832
|
+
function s() {
|
|
2833
|
+
t.value = ne.Open;
|
|
2143
2834
|
}
|
|
2144
2835
|
return {
|
|
2145
|
-
closeDrawer:
|
|
2146
|
-
openDrawer:
|
|
2836
|
+
closeDrawer: r,
|
|
2837
|
+
openDrawer: s,
|
|
2147
2838
|
isDrawerOpen: e
|
|
2148
2839
|
};
|
|
2149
2840
|
});
|
|
2150
|
-
class
|
|
2151
|
-
constructor() {
|
|
2152
|
-
this.observers = [];
|
|
2153
|
-
}
|
|
2154
|
-
attach(e) {
|
|
2155
|
-
this.observers.push(e);
|
|
2156
|
-
}
|
|
2157
|
-
detach(e) {
|
|
2158
|
-
this.observers = this.observers.filter(
|
|
2159
|
-
(s) => s !== e
|
|
2160
|
-
);
|
|
2161
|
-
}
|
|
2162
|
-
notify() {
|
|
2163
|
-
for (const e of this.observers)
|
|
2164
|
-
e.update(this);
|
|
2165
|
-
}
|
|
2166
|
-
}
|
|
2167
|
-
class Ns {
|
|
2841
|
+
class xs {
|
|
2168
2842
|
constructor(e) {
|
|
2169
2843
|
this.mapProcesses = /* @__PURE__ */ new Map(), this.processes = e, this.assignProcessManager();
|
|
2170
2844
|
}
|
|
@@ -2178,65 +2852,65 @@ class Ns {
|
|
|
2178
2852
|
await this.processes.execute();
|
|
2179
2853
|
}
|
|
2180
2854
|
async startFrom(e) {
|
|
2181
|
-
const
|
|
2182
|
-
if (!
|
|
2855
|
+
const r = this.mapProcesses.get(e);
|
|
2856
|
+
if (!r)
|
|
2183
2857
|
throw new Error(`Process ${e} not found`);
|
|
2184
|
-
await
|
|
2858
|
+
await r.execute();
|
|
2185
2859
|
}
|
|
2186
2860
|
}
|
|
2187
|
-
class
|
|
2188
|
-
constructor(e,
|
|
2189
|
-
this.next = null, this.name = e, this.next =
|
|
2861
|
+
class Os {
|
|
2862
|
+
constructor(e, r) {
|
|
2863
|
+
this.next = null, this.name = e, this.next = r;
|
|
2190
2864
|
}
|
|
2191
2865
|
addToManager(e) {
|
|
2192
2866
|
e.setProcessToMap(this), this.next && this.next.addToManager(e);
|
|
2193
2867
|
}
|
|
2194
2868
|
}
|
|
2195
|
-
class
|
|
2869
|
+
class Ls {
|
|
2196
2870
|
constructor() {
|
|
2197
2871
|
this.checkAccessibility = this.checkAccessibility.bind(this), this.isAccessible = this.isAccessible.bind(this), this.getDestinationRouteName = this.getDestinationRouteName.bind(this);
|
|
2198
2872
|
}
|
|
2199
|
-
async checkAccessibility(e,
|
|
2200
|
-
if (await this.isAccessible(e,
|
|
2201
|
-
|
|
2873
|
+
async checkAccessibility(e, r, s) {
|
|
2874
|
+
if (await this.isAccessible(e, r)) {
|
|
2875
|
+
s();
|
|
2202
2876
|
return;
|
|
2203
2877
|
}
|
|
2204
2878
|
if (await this.getDestinationRouteName()) {
|
|
2205
|
-
|
|
2879
|
+
s({ name: await this.getDestinationRouteName() });
|
|
2206
2880
|
return;
|
|
2207
2881
|
}
|
|
2208
|
-
if (await this.getDestinationRouteLocation(e,
|
|
2209
|
-
|
|
2882
|
+
if (await this.getDestinationRouteLocation(e, r)) {
|
|
2883
|
+
s(await this.getDestinationRouteLocation(e, r));
|
|
2210
2884
|
return;
|
|
2211
2885
|
}
|
|
2212
|
-
|
|
2886
|
+
s(!1);
|
|
2213
2887
|
}
|
|
2214
2888
|
async getDestinationRouteName() {
|
|
2215
2889
|
return "";
|
|
2216
2890
|
}
|
|
2217
|
-
async getDestinationRouteLocation(e,
|
|
2891
|
+
async getDestinationRouteLocation(e, r) {
|
|
2218
2892
|
return null;
|
|
2219
2893
|
}
|
|
2220
2894
|
}
|
|
2221
|
-
class
|
|
2222
|
-
constructor(e,
|
|
2223
|
-
this.scheduler = new
|
|
2895
|
+
class Ts {
|
|
2896
|
+
constructor(e, r, s) {
|
|
2897
|
+
this.scheduler = new ut({
|
|
2224
2898
|
runAction: async () => {
|
|
2225
2899
|
await this.fetchList();
|
|
2226
2900
|
}
|
|
2227
|
-
}), this.repository = e, this.crudDataManagement =
|
|
2901
|
+
}), this.repository = e, this.crudDataManagement = r, this.syncDetail = this.repository.getSyncDetail(), this.paramManager = s, this.syncListWithApi();
|
|
2228
2902
|
}
|
|
2229
2903
|
async fetchList() {
|
|
2230
2904
|
const e = await this.repository.fetchList(this.paramManager.getRequestParams());
|
|
2231
2905
|
return this.crudDataManagement.addOrReplaceItems(e.items), this.crudDataManagement.setTotalCount(e.totalItems), e;
|
|
2232
2906
|
}
|
|
2233
2907
|
async fetchItemById(e) {
|
|
2234
|
-
const
|
|
2235
|
-
return
|
|
2908
|
+
const r = await this.repository.fetchItemById(e);
|
|
2909
|
+
return r && this.crudDataManagement.addOrReplaceItems([r]), r;
|
|
2236
2910
|
}
|
|
2237
2911
|
async createItem(e) {
|
|
2238
|
-
const
|
|
2239
|
-
return
|
|
2912
|
+
const r = await this.repository.createItem(e);
|
|
2913
|
+
return r && !this.shouldRefreshListAfterCreate() && this.crudDataManagement.addOrReplaceItems([r]), r && this.shouldRefreshListAfterCreate() && await this.fetchList(), r;
|
|
2240
2914
|
}
|
|
2241
2915
|
shouldRefreshListAfterCreate() {
|
|
2242
2916
|
return !0;
|
|
@@ -2244,16 +2918,16 @@ class Bs {
|
|
|
2244
2918
|
async deleteItem(e) {
|
|
2245
2919
|
return await this.repository.deleteItem(e) ? this.crudDataManagement.removeById(e) : null;
|
|
2246
2920
|
}
|
|
2247
|
-
async updateItem(e,
|
|
2248
|
-
const
|
|
2249
|
-
return this.shouldRefreshListAfterUpdate() &&
|
|
2921
|
+
async updateItem(e, r) {
|
|
2922
|
+
const s = await this.repository.updateItem(e, r);
|
|
2923
|
+
return this.shouldRefreshListAfterUpdate() && s ? (await this.fetchList(), this.crudDataManagement.getItemById(e)) : s;
|
|
2250
2924
|
}
|
|
2251
2925
|
shouldRefreshListAfterUpdate() {
|
|
2252
2926
|
return !0;
|
|
2253
2927
|
}
|
|
2254
2928
|
async removeItem(e) {
|
|
2255
|
-
const
|
|
2256
|
-
return
|
|
2929
|
+
const r = await this.repository.deleteItem(e);
|
|
2930
|
+
return r && this.shouldRefreshListAfterDelete() && await this.fetchList(), r ? this.crudDataManagement.removeById(e) : null;
|
|
2257
2931
|
}
|
|
2258
2932
|
shouldRefreshListAfterDelete() {
|
|
2259
2933
|
return !1;
|
|
@@ -2268,37 +2942,37 @@ class Bs {
|
|
|
2268
2942
|
this.scheduler.clearInterval();
|
|
2269
2943
|
}
|
|
2270
2944
|
}
|
|
2271
|
-
class
|
|
2945
|
+
class Pr {
|
|
2272
2946
|
}
|
|
2273
|
-
class
|
|
2274
|
-
search(e,
|
|
2275
|
-
const
|
|
2276
|
-
e: for (const
|
|
2277
|
-
for (const
|
|
2278
|
-
if (
|
|
2279
|
-
|
|
2947
|
+
class Ps extends Pr {
|
|
2948
|
+
search(e, r, s) {
|
|
2949
|
+
const n = [];
|
|
2950
|
+
e: for (const i of e)
|
|
2951
|
+
for (const a of s(i))
|
|
2952
|
+
if (Q.removeSpacesFromString(String(a).toLowerCase()).indexOf(Q.removeSpacesFromString(String(r).toLowerCase())) > -1) {
|
|
2953
|
+
n.push(i);
|
|
2280
2954
|
continue e;
|
|
2281
2955
|
}
|
|
2282
|
-
return
|
|
2956
|
+
return n;
|
|
2283
2957
|
}
|
|
2284
2958
|
}
|
|
2285
|
-
var
|
|
2286
|
-
class
|
|
2959
|
+
var gt = /* @__PURE__ */ ((t) => (t.Hidden = "hidden", t.Visible = "visible", t))(gt || {});
|
|
2960
|
+
class ks {
|
|
2287
2961
|
constructor(e) {
|
|
2288
2962
|
this._visibilityControl = e, this.mangeVisibilityEvent();
|
|
2289
2963
|
}
|
|
2290
2964
|
mangeVisibilityEvent() {
|
|
2291
2965
|
document.addEventListener("visibilitychange", (e) => {
|
|
2292
|
-
document.visibilityState ===
|
|
2966
|
+
document.visibilityState === gt.Hidden ? this._visibilityControl.screenInvisible(e) : this._visibilityControl.screenVisible(e);
|
|
2293
2967
|
});
|
|
2294
2968
|
}
|
|
2295
2969
|
}
|
|
2296
|
-
var
|
|
2297
|
-
for (var
|
|
2298
|
-
(
|
|
2299
|
-
return
|
|
2970
|
+
var kr = Object.defineProperty, $r = Object.getOwnPropertyDescriptor, M = (t, e, r, s) => {
|
|
2971
|
+
for (var n = s > 1 ? void 0 : s ? $r(e, r) : e, i = t.length - 1, a; i >= 0; i--)
|
|
2972
|
+
(a = t[i]) && (n = (s ? a(e, r, n) : a(n)) || n);
|
|
2973
|
+
return s && n && kr(e, r, n), n;
|
|
2300
2974
|
};
|
|
2301
|
-
let
|
|
2975
|
+
let Re = class {
|
|
2302
2976
|
constructor() {
|
|
2303
2977
|
this.value = "", this.symbol = "";
|
|
2304
2978
|
}
|
|
@@ -2311,16 +2985,16 @@ let ve = class {
|
|
|
2311
2985
|
});
|
|
2312
2986
|
}
|
|
2313
2987
|
};
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
],
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
],
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
],
|
|
2323
|
-
let
|
|
2988
|
+
M([
|
|
2989
|
+
U("value", String, !0)
|
|
2990
|
+
], Re.prototype, "value", 2);
|
|
2991
|
+
M([
|
|
2992
|
+
U("symbol", String)
|
|
2993
|
+
], Re.prototype, "symbol", 2);
|
|
2994
|
+
Re = M([
|
|
2995
|
+
ke("Amount")
|
|
2996
|
+
], Re);
|
|
2997
|
+
let Ae = class {
|
|
2324
2998
|
getTable() {
|
|
2325
2999
|
const t = Object.getPrototypeOf(this)._table;
|
|
2326
3000
|
if (!t)
|
|
@@ -2330,54 +3004,54 @@ let me = class {
|
|
|
2330
3004
|
return t;
|
|
2331
3005
|
}
|
|
2332
3006
|
};
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
],
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
],
|
|
2339
|
-
let
|
|
3007
|
+
M([
|
|
3008
|
+
U("id", Object)
|
|
3009
|
+
], Ae.prototype, "id", 2);
|
|
3010
|
+
Ae = M([
|
|
3011
|
+
ke("BaseModel")
|
|
3012
|
+
], Ae);
|
|
3013
|
+
let ee = class extends Ae {
|
|
2340
3014
|
};
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
],
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
],
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
],
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
],
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
],
|
|
2356
|
-
class
|
|
2357
|
-
constructor(e,
|
|
2358
|
-
this.requestedDate = e, this.executedDate =
|
|
3015
|
+
M([
|
|
3016
|
+
U("symbol", String)
|
|
3017
|
+
], ee.prototype, "symbol", 2);
|
|
3018
|
+
M([
|
|
3019
|
+
U("enName", String)
|
|
3020
|
+
], ee.prototype, "enName", 2);
|
|
3021
|
+
M([
|
|
3022
|
+
U("faName", String)
|
|
3023
|
+
], ee.prototype, "faName", 2);
|
|
3024
|
+
M([
|
|
3025
|
+
U("image", String)
|
|
3026
|
+
], ee.prototype, "image", 2);
|
|
3027
|
+
ee = M([
|
|
3028
|
+
ke("MinifiedSymbolModel")
|
|
3029
|
+
], ee);
|
|
3030
|
+
class $s {
|
|
3031
|
+
constructor(e, r) {
|
|
3032
|
+
this.requestedDate = e, this.executedDate = r;
|
|
2359
3033
|
}
|
|
2360
3034
|
get requestedDateInJalali() {
|
|
2361
|
-
return
|
|
3035
|
+
return _.mapUnixToDate(this.requestedDate, se.SimpleDate);
|
|
2362
3036
|
}
|
|
2363
3037
|
get requestedTime() {
|
|
2364
|
-
return
|
|
3038
|
+
return _.mapUnixToDate(this.requestedDate, se.JustHour);
|
|
2365
3039
|
}
|
|
2366
3040
|
get executedDateInJalali() {
|
|
2367
|
-
return
|
|
3041
|
+
return _.mapUnixToDate(this.executedDate, se.SimpleDate);
|
|
2368
3042
|
}
|
|
2369
3043
|
get executedDateTime() {
|
|
2370
|
-
return
|
|
3044
|
+
return _.mapUnixToDate(this.executedDate, se.JustHour);
|
|
2371
3045
|
}
|
|
2372
3046
|
}
|
|
2373
|
-
class
|
|
2374
|
-
constructor(e,
|
|
2375
|
-
this.requestedAmount = e, this.executedAmount =
|
|
3047
|
+
class Vs {
|
|
3048
|
+
constructor(e, r) {
|
|
3049
|
+
this.requestedAmount = e, this.executedAmount = r;
|
|
2376
3050
|
}
|
|
2377
3051
|
}
|
|
2378
|
-
class
|
|
2379
|
-
constructor(e,
|
|
2380
|
-
this.symbolPrice = e, this.USDTPrice =
|
|
3052
|
+
class Ns {
|
|
3053
|
+
constructor(e, r, s, n, i) {
|
|
3054
|
+
this.symbolPrice = e, this.USDTPrice = r, this.symobl = s, this.symbolImage = n, this.USDTImage = i;
|
|
2381
3055
|
}
|
|
2382
3056
|
get truncatedSymbolPrice() {
|
|
2383
3057
|
return this.symbolPrice.toLocaleString("en-US", {
|
|
@@ -2390,111 +3064,117 @@ class Gs {
|
|
|
2390
3064
|
});
|
|
2391
3065
|
}
|
|
2392
3066
|
}
|
|
2393
|
-
class
|
|
2394
|
-
constructor(e,
|
|
2395
|
-
this.soldSymbol = e, this.buySymbol =
|
|
3067
|
+
class Fs {
|
|
3068
|
+
constructor(e, r) {
|
|
3069
|
+
this.soldSymbol = e, this.buySymbol = r;
|
|
2396
3070
|
}
|
|
2397
3071
|
}
|
|
2398
3072
|
export {
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
3073
|
+
tt as APIErrorHandlerRegistry,
|
|
3074
|
+
cs as AbstractSubject,
|
|
3075
|
+
ot as AccessControl,
|
|
3076
|
+
ie as AccessLevel,
|
|
3077
|
+
os as Action,
|
|
3078
|
+
Re as Amount,
|
|
3079
|
+
As as ApiBuilder,
|
|
3080
|
+
ne as ApplicationDrawerStatus,
|
|
3081
|
+
_s as ApplicationInitializer,
|
|
3082
|
+
Fe as ApplicationTheme,
|
|
3083
|
+
lt as AuthorizationDirective,
|
|
3084
|
+
Oe as AuthorizationService,
|
|
3085
|
+
Ae as BaseModel,
|
|
3086
|
+
ar as BaseTable,
|
|
3087
|
+
x as BehaviorSubject,
|
|
3088
|
+
Ne as CellType,
|
|
3089
|
+
Ps as ClientArraySearch,
|
|
3090
|
+
Pr as ClientSearch,
|
|
3091
|
+
is as Column,
|
|
3092
|
+
xe as CommonMaskFormats,
|
|
3093
|
+
Ts as CrudService,
|
|
3094
|
+
Z as DateConverter,
|
|
3095
|
+
Br as DateDisabledOptions,
|
|
3096
|
+
se as DateFormat,
|
|
3097
|
+
Rt as DateFormats,
|
|
3098
|
+
ye as DateTools,
|
|
3099
|
+
ws as DebounceService,
|
|
3100
|
+
V as DialogDimensions,
|
|
3101
|
+
Ur as EveryAccess,
|
|
3102
|
+
Hr as EveryLevelAuthorizationDirective,
|
|
3103
|
+
Rs as Feedback,
|
|
3104
|
+
vs as FetchListResponse,
|
|
3105
|
+
Qr as FormManager,
|
|
3106
|
+
Se as FormValidationStatus,
|
|
3107
|
+
_ as Formatter,
|
|
3108
|
+
fs as GColumn,
|
|
3109
|
+
ps as GTable,
|
|
3110
|
+
Is as HandleError,
|
|
3111
|
+
bs as HandleFeedback,
|
|
3112
|
+
Ve as HeaderType,
|
|
3113
|
+
Ds as HttpClient,
|
|
3114
|
+
Kr as InputControl,
|
|
3115
|
+
Zr as InputControlBuilder,
|
|
3116
|
+
sr as InputControlData,
|
|
3117
|
+
rt as JsonMapper,
|
|
3118
|
+
g as LoadingStatus,
|
|
3119
|
+
ee as MinifiedSymbolModel,
|
|
3120
|
+
xr as Params,
|
|
3121
|
+
Os as Process,
|
|
3122
|
+
xs as ProcessManager,
|
|
3123
|
+
Yr as RangeValue,
|
|
3124
|
+
Ls as RouteGuard,
|
|
3125
|
+
ut as Scheduler,
|
|
3126
|
+
ss as SelectableTable,
|
|
3127
|
+
hs as SelectableTableGenerator,
|
|
3128
|
+
Ze as SimpleSort,
|
|
3129
|
+
qr as SomeAccess,
|
|
3130
|
+
zr as SomeLevelsAuthorizationDirective,
|
|
3131
|
+
Ye as SortDetail,
|
|
3132
|
+
L as SortOrder,
|
|
3133
|
+
er as SortOrderTableHeader,
|
|
3134
|
+
rs as Sorter,
|
|
3135
|
+
tr as StatusCode,
|
|
3136
|
+
B as StorageKeys,
|
|
3137
|
+
je as StoreNames,
|
|
3138
|
+
Fs as SymbolInTrade,
|
|
3139
|
+
Ns as SymbolPriceInTrade,
|
|
3140
|
+
rr as Symbols,
|
|
3141
|
+
gs as SyncDetail,
|
|
3142
|
+
ts as TABLE_ACTION_COLUMN,
|
|
3143
|
+
ht as TABLE_COLUMN_DEFAULT_COLSPAN,
|
|
3144
|
+
ir as TABLE_COLUMN_DEFAULT_VALUES,
|
|
3145
|
+
ct as TABLE_COLUMN_DEFAULT_WIDTH,
|
|
3146
|
+
as as Table,
|
|
3147
|
+
ds as TableCellComponentRegistry,
|
|
3148
|
+
Qe as TableConfig,
|
|
3149
|
+
at as TableConstants,
|
|
3150
|
+
ls as TableDestroy,
|
|
3151
|
+
or as TableGenerator,
|
|
3152
|
+
$e as TableHeaderAlign,
|
|
3153
|
+
us as TableRowClick,
|
|
3154
|
+
vt as ToastLocation,
|
|
3155
|
+
Cs as ToastMessage,
|
|
3156
|
+
Tr as ToastType,
|
|
3157
|
+
Xr as TouchSensitiveControl,
|
|
3158
|
+
Vs as TradeAmount,
|
|
3159
|
+
$s as TradeDate,
|
|
3160
|
+
Q as Util,
|
|
3161
|
+
ks as VisibilityManager,
|
|
3162
|
+
gt as VisibilityState,
|
|
3163
|
+
It as cards,
|
|
3164
|
+
ns as generateHeader,
|
|
3165
|
+
bt as ibans,
|
|
3166
|
+
nr as isEmpty,
|
|
3167
|
+
Jr as isLastItem,
|
|
3168
|
+
Gr as isOnlyOneItem,
|
|
3169
|
+
Qt as setupJalaliDate,
|
|
3170
|
+
Wr as setupStore,
|
|
3171
|
+
Ss as useCrud,
|
|
3172
|
+
Er as useData,
|
|
3173
|
+
Ms as useDialogService,
|
|
3174
|
+
Es as useDrawerService,
|
|
3175
|
+
es as useForm,
|
|
3176
|
+
Lr as useLoadingStatus,
|
|
3177
|
+
Or as useParams,
|
|
3178
|
+
ms as useRepository,
|
|
3179
|
+
ys as useStaticTableService
|
|
2500
3180
|
};
|