bt-core-app 1.4.109 → 1.4.110
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/bt-core-app.js +298 -298
- package/package.json +1 -1
package/dist/bt-core-app.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ref as z, shallowRef as
|
|
1
|
+
import { ref as z, shallowRef as Le, computed as ee, toValue as J, watch as Te, toRef as Yt, onMounted as Xr } from "vue";
|
|
2
2
|
import { watchArray as Or, useStorage as Zt, useEventListener as me, toValue as Ee, useParentElement as Jt, useResizeObserver as jt, useArrayUnique as Kt, useArrayDifference as Gr, watchDebounced as Qt, tryOnMounted as Xt } from "@vueuse/core";
|
|
3
3
|
import { defineStore as pr } from "pinia";
|
|
4
4
|
import { DateTime as he } from "luxon";
|
|
5
|
-
import { useRouter as
|
|
5
|
+
import { useRouter as Mr, useRoute as et } from "vue-router";
|
|
6
6
|
function Ot(e) {
|
|
7
7
|
return (e || "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx").replace(/[xy]/g, pt);
|
|
8
8
|
}
|
|
@@ -11,7 +11,7 @@ function pt(e) {
|
|
|
11
11
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
12
12
|
}
|
|
13
13
|
function en(e) {
|
|
14
|
-
const t = z([]), l =
|
|
14
|
+
const t = z([]), l = Le(), A = Le(), s = Le(), g = ee(() => l.value != null);
|
|
15
15
|
function I(d) {
|
|
16
16
|
t.value = t.value.filter((h) => h.id != d);
|
|
17
17
|
}
|
|
@@ -25,7 +25,7 @@ function en(e) {
|
|
|
25
25
|
function _(d) {
|
|
26
26
|
d != null && (A.value = d.toString());
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function N() {
|
|
29
29
|
A.value = void 0;
|
|
30
30
|
}
|
|
31
31
|
async function $(d, h) {
|
|
@@ -53,7 +53,7 @@ function en(e) {
|
|
|
53
53
|
actionErrorMsg: A,
|
|
54
54
|
actionLoadingMsg: l,
|
|
55
55
|
actionCompleteMsg: s,
|
|
56
|
-
clearErrors:
|
|
56
|
+
clearErrors: N,
|
|
57
57
|
doAction: $,
|
|
58
58
|
isLoading: g,
|
|
59
59
|
logError: _
|
|
@@ -78,11 +78,11 @@ var Re = function() {
|
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
if (s.length === 1) {
|
|
81
|
-
var C = s, _ = g.ignoreCase ? t : e,
|
|
81
|
+
var C = s, _ = g.ignoreCase ? t : e, N = g.cmp || function(d, h) {
|
|
82
82
|
return d < h ? -1 : d > h ? 1 : 0;
|
|
83
83
|
};
|
|
84
84
|
s = function(d, h) {
|
|
85
|
-
return
|
|
85
|
+
return N(_(C(d)), _(C(h)));
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
const $ = { "-1": "", desc: "" };
|
|
@@ -91,8 +91,8 @@ var Re = function() {
|
|
|
91
91
|
} : s;
|
|
92
92
|
}
|
|
93
93
|
function A(s, g) {
|
|
94
|
-
var I = typeof this == "function" && !this.firstBy ? this : !1, C = l(s, g), _ = I ? function(
|
|
95
|
-
return I(
|
|
94
|
+
var I = typeof this == "function" && !this.firstBy ? this : !1, C = l(s, g), _ = I ? function(N, $) {
|
|
95
|
+
return I(N, $) || C(N, $);
|
|
96
96
|
} : C;
|
|
97
97
|
return _.thenBy = A, _;
|
|
98
98
|
}
|
|
@@ -267,12 +267,12 @@ function un(e, t) {
|
|
|
267
267
|
var l = e.split(","), A = t.split(",");
|
|
268
268
|
return l.some((s) => A.some((g) => g == s));
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function Lr(e) {
|
|
271
271
|
if (!e)
|
|
272
272
|
return e;
|
|
273
273
|
let t, l = Array.isArray(e) ? [] : {};
|
|
274
274
|
for (const A in e)
|
|
275
|
-
t = e[A], l[A] = typeof t == "object" ?
|
|
275
|
+
t = e[A], l[A] = typeof t == "object" ? Lr(t) : t;
|
|
276
276
|
return l;
|
|
277
277
|
}
|
|
278
278
|
function cn(e) {
|
|
@@ -369,24 +369,24 @@ var nt = { exports: {} };
|
|
|
369
369
|
e.exports = l();
|
|
370
370
|
})(function() {
|
|
371
371
|
return function l(A, s, g) {
|
|
372
|
-
function I(
|
|
373
|
-
if (!s[
|
|
374
|
-
if (!A[
|
|
372
|
+
function I(N, $) {
|
|
373
|
+
if (!s[N]) {
|
|
374
|
+
if (!A[N]) {
|
|
375
375
|
var d = typeof Oe == "function" && Oe;
|
|
376
376
|
if (!$ && d)
|
|
377
|
-
return d(
|
|
377
|
+
return d(N, !0);
|
|
378
378
|
if (C)
|
|
379
|
-
return C(
|
|
380
|
-
var h = new Error("Cannot find module '" +
|
|
379
|
+
return C(N, !0);
|
|
380
|
+
var h = new Error("Cannot find module '" + N + "'");
|
|
381
381
|
throw h.code = "MODULE_NOT_FOUND", h;
|
|
382
382
|
}
|
|
383
|
-
var u = s[
|
|
384
|
-
A[
|
|
385
|
-
var b = A[
|
|
383
|
+
var u = s[N] = { exports: {} };
|
|
384
|
+
A[N][0].call(u.exports, function(r) {
|
|
385
|
+
var b = A[N][1][r];
|
|
386
386
|
return I(b || r);
|
|
387
387
|
}, u, u.exports, l, A, s, g);
|
|
388
388
|
}
|
|
389
|
-
return s[
|
|
389
|
+
return s[N].exports;
|
|
390
390
|
}
|
|
391
391
|
for (var C = typeof Oe == "function" && Oe, _ = 0; _ < g.length; _++)
|
|
392
392
|
I(g[_]);
|
|
@@ -395,8 +395,8 @@ var nt = { exports: {} };
|
|
|
395
395
|
(function(g) {
|
|
396
396
|
var I = g.MutationObserver || g.WebKitMutationObserver, C;
|
|
397
397
|
if (I) {
|
|
398
|
-
var _ = 0,
|
|
399
|
-
|
|
398
|
+
var _ = 0, N = new I(r), $ = g.document.createTextNode("");
|
|
399
|
+
N.observe($, {
|
|
400
400
|
characterData: !0
|
|
401
401
|
}), C = function() {
|
|
402
402
|
$.data = _ = ++_ % 2;
|
|
@@ -434,7 +434,7 @@ var nt = { exports: {} };
|
|
|
434
434
|
var g = l(1);
|
|
435
435
|
function I() {
|
|
436
436
|
}
|
|
437
|
-
var C = {}, _ = ["REJECTED"],
|
|
437
|
+
var C = {}, _ = ["REJECTED"], N = ["FULFILLED"], $ = ["PENDING"];
|
|
438
438
|
A.exports = d;
|
|
439
439
|
function d(E) {
|
|
440
440
|
if (typeof E != "function")
|
|
@@ -444,12 +444,12 @@ var nt = { exports: {} };
|
|
|
444
444
|
d.prototype.catch = function(E) {
|
|
445
445
|
return this.then(null, E);
|
|
446
446
|
}, d.prototype.then = function(E, T) {
|
|
447
|
-
if (typeof E != "function" && this.state ===
|
|
447
|
+
if (typeof E != "function" && this.state === N || typeof T != "function" && this.state === _)
|
|
448
448
|
return this;
|
|
449
449
|
var x = new this.constructor(I);
|
|
450
450
|
if (this.state !== $) {
|
|
451
|
-
var
|
|
452
|
-
u(x,
|
|
451
|
+
var M = this.state === N ? E : T;
|
|
452
|
+
u(x, M, this.outcome);
|
|
453
453
|
} else
|
|
454
454
|
this.queue.push(new h(x, E, T));
|
|
455
455
|
return x;
|
|
@@ -468,31 +468,31 @@ var nt = { exports: {} };
|
|
|
468
468
|
};
|
|
469
469
|
function u(E, T, x) {
|
|
470
470
|
g(function() {
|
|
471
|
-
var
|
|
471
|
+
var M;
|
|
472
472
|
try {
|
|
473
|
-
|
|
473
|
+
M = T(x);
|
|
474
474
|
} catch (f) {
|
|
475
475
|
return C.reject(E, f);
|
|
476
476
|
}
|
|
477
|
-
|
|
477
|
+
M === E ? C.reject(E, new TypeError("Cannot resolve promise with itself")) : C.resolve(E, M);
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
480
|
C.resolve = function(E, T) {
|
|
481
481
|
var x = D(r, T);
|
|
482
482
|
if (x.status === "error")
|
|
483
483
|
return C.reject(E, x.value);
|
|
484
|
-
var
|
|
485
|
-
if (
|
|
486
|
-
b(E,
|
|
484
|
+
var M = x.value;
|
|
485
|
+
if (M)
|
|
486
|
+
b(E, M);
|
|
487
487
|
else {
|
|
488
|
-
E.state =
|
|
488
|
+
E.state = N, E.outcome = T;
|
|
489
489
|
for (var f = -1, w = E.queue.length; ++f < w; )
|
|
490
490
|
E.queue[f].callFulfilled(T);
|
|
491
491
|
}
|
|
492
492
|
return E;
|
|
493
493
|
}, C.reject = function(E, T) {
|
|
494
494
|
E.state = _, E.outcome = T;
|
|
495
|
-
for (var x = -1,
|
|
495
|
+
for (var x = -1, M = E.queue.length; ++x < M; )
|
|
496
496
|
E.queue[x].callRejected(T);
|
|
497
497
|
return E;
|
|
498
498
|
};
|
|
@@ -505,24 +505,24 @@ var nt = { exports: {} };
|
|
|
505
505
|
}
|
|
506
506
|
function b(E, T) {
|
|
507
507
|
var x = !1;
|
|
508
|
-
function
|
|
508
|
+
function M(X) {
|
|
509
509
|
x || (x = !0, C.reject(E, X));
|
|
510
510
|
}
|
|
511
511
|
function f(X) {
|
|
512
512
|
x || (x = !0, C.resolve(E, X));
|
|
513
513
|
}
|
|
514
514
|
function w() {
|
|
515
|
-
T(f,
|
|
515
|
+
T(f, M);
|
|
516
516
|
}
|
|
517
517
|
var j = D(w);
|
|
518
|
-
j.status === "error" &&
|
|
518
|
+
j.status === "error" && M(j.value);
|
|
519
519
|
}
|
|
520
520
|
function D(E, T) {
|
|
521
521
|
var x = {};
|
|
522
522
|
try {
|
|
523
523
|
x.value = E(T), x.status = "success";
|
|
524
|
-
} catch (
|
|
525
|
-
x.status = "error", x.value =
|
|
524
|
+
} catch (M) {
|
|
525
|
+
x.status = "error", x.value = M;
|
|
526
526
|
}
|
|
527
527
|
return x;
|
|
528
528
|
}
|
|
@@ -540,7 +540,7 @@ var nt = { exports: {} };
|
|
|
540
540
|
var T = this;
|
|
541
541
|
if (Object.prototype.toString.call(E) !== "[object Array]")
|
|
542
542
|
return this.reject(new TypeError("must be an array"));
|
|
543
|
-
var x = E.length,
|
|
543
|
+
var x = E.length, M = !1;
|
|
544
544
|
if (!x)
|
|
545
545
|
return this.resolve([]);
|
|
546
546
|
for (var f = new Array(x), w = 0, j = -1, X = new this(I); ++j < x; )
|
|
@@ -548,19 +548,19 @@ var nt = { exports: {} };
|
|
|
548
548
|
return X;
|
|
549
549
|
function re(ue, be) {
|
|
550
550
|
T.resolve(ue).then(G, function(Y) {
|
|
551
|
-
|
|
551
|
+
M || (M = !0, C.reject(X, Y));
|
|
552
552
|
});
|
|
553
553
|
function G(Y) {
|
|
554
|
-
f[be] = Y, ++w === x && !
|
|
554
|
+
f[be] = Y, ++w === x && !M && (M = !0, C.resolve(X, f));
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
|
-
d.race =
|
|
559
|
-
function
|
|
558
|
+
d.race = L;
|
|
559
|
+
function L(E) {
|
|
560
560
|
var T = this;
|
|
561
561
|
if (Object.prototype.toString.call(E) !== "[object Array]")
|
|
562
562
|
return this.reject(new TypeError("must be an array"));
|
|
563
|
-
var x = E.length,
|
|
563
|
+
var x = E.length, M = !1;
|
|
564
564
|
if (!x)
|
|
565
565
|
return this.resolve([]);
|
|
566
566
|
for (var f = -1, w = new this(I); ++f < x; )
|
|
@@ -568,9 +568,9 @@ var nt = { exports: {} };
|
|
|
568
568
|
return w;
|
|
569
569
|
function j(X) {
|
|
570
570
|
T.resolve(X).then(function(re) {
|
|
571
|
-
|
|
571
|
+
M || (M = !0, C.resolve(w, re));
|
|
572
572
|
}, function(re) {
|
|
573
|
-
|
|
573
|
+
M || (M = !0, C.reject(w, re));
|
|
574
574
|
});
|
|
575
575
|
}
|
|
576
576
|
}
|
|
@@ -605,7 +605,7 @@ var nt = { exports: {} };
|
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
607
|
var _ = C();
|
|
608
|
-
function
|
|
608
|
+
function N() {
|
|
609
609
|
try {
|
|
610
610
|
if (!_ || !_.open)
|
|
611
611
|
return !1;
|
|
@@ -650,7 +650,7 @@ var nt = { exports: {} };
|
|
|
650
650
|
if (arguments.length && typeof arguments[arguments.length - 1] == "function")
|
|
651
651
|
return arguments[arguments.length - 1];
|
|
652
652
|
}
|
|
653
|
-
var D = "local-forage-detect-blob-support", c = void 0, y = {}, S = Object.prototype.toString,
|
|
653
|
+
var D = "local-forage-detect-blob-support", c = void 0, y = {}, S = Object.prototype.toString, L = "readonly", E = "readwrite";
|
|
654
654
|
function T(n) {
|
|
655
655
|
for (var i = n.length, a = new ArrayBuffer(i), m = new Uint8Array(a), v = 0; v < i; v++)
|
|
656
656
|
m[v] = n.charCodeAt(v);
|
|
@@ -669,7 +669,7 @@ var nt = { exports: {} };
|
|
|
669
669
|
return !1;
|
|
670
670
|
});
|
|
671
671
|
}
|
|
672
|
-
function
|
|
672
|
+
function M(n) {
|
|
673
673
|
return typeof c == "boolean" ? d.resolve(c) : x(n).then(function(i) {
|
|
674
674
|
return c = i, c;
|
|
675
675
|
});
|
|
@@ -850,7 +850,7 @@ var nt = { exports: {} };
|
|
|
850
850
|
n = r(n);
|
|
851
851
|
var m = new d(function(v, o) {
|
|
852
852
|
a.ready().then(function() {
|
|
853
|
-
W(a._dbInfo,
|
|
853
|
+
W(a._dbInfo, L, function(P, R) {
|
|
854
854
|
if (P)
|
|
855
855
|
return o(P);
|
|
856
856
|
try {
|
|
@@ -872,7 +872,7 @@ var nt = { exports: {} };
|
|
|
872
872
|
function ge(n, i) {
|
|
873
873
|
var a = this, m = new d(function(v, o) {
|
|
874
874
|
a.ready().then(function() {
|
|
875
|
-
W(a._dbInfo,
|
|
875
|
+
W(a._dbInfo, L, function(P, R) {
|
|
876
876
|
if (P)
|
|
877
877
|
return o(P);
|
|
878
878
|
try {
|
|
@@ -903,7 +903,7 @@ var nt = { exports: {} };
|
|
|
903
903
|
var v = new d(function(o, P) {
|
|
904
904
|
var R;
|
|
905
905
|
m.ready().then(function() {
|
|
906
|
-
return R = m._dbInfo, S.call(i) === "[object Blob]" ?
|
|
906
|
+
return R = m._dbInfo, S.call(i) === "[object Blob]" ? M(R.db).then(function(B) {
|
|
907
907
|
return B ? i : G(i);
|
|
908
908
|
}) : i;
|
|
909
909
|
}).then(function(B) {
|
|
@@ -979,7 +979,7 @@ var nt = { exports: {} };
|
|
|
979
979
|
function tr(n) {
|
|
980
980
|
var i = this, a = new d(function(m, v) {
|
|
981
981
|
i.ready().then(function() {
|
|
982
|
-
W(i._dbInfo,
|
|
982
|
+
W(i._dbInfo, L, function(o, P) {
|
|
983
983
|
if (o)
|
|
984
984
|
return v(o);
|
|
985
985
|
try {
|
|
@@ -1004,7 +1004,7 @@ var nt = { exports: {} };
|
|
|
1004
1004
|
return;
|
|
1005
1005
|
}
|
|
1006
1006
|
a.ready().then(function() {
|
|
1007
|
-
W(a._dbInfo,
|
|
1007
|
+
W(a._dbInfo, L, function(P, R) {
|
|
1008
1008
|
if (P)
|
|
1009
1009
|
return o(P);
|
|
1010
1010
|
try {
|
|
@@ -1030,7 +1030,7 @@ var nt = { exports: {} };
|
|
|
1030
1030
|
function Ce(n) {
|
|
1031
1031
|
var i = this, a = new d(function(m, v) {
|
|
1032
1032
|
i.ready().then(function() {
|
|
1033
|
-
W(i._dbInfo,
|
|
1033
|
+
W(i._dbInfo, L, function(o, P) {
|
|
1034
1034
|
if (o)
|
|
1035
1035
|
return v(o);
|
|
1036
1036
|
try {
|
|
@@ -1139,7 +1139,7 @@ var nt = { exports: {} };
|
|
|
1139
1139
|
var lr = {
|
|
1140
1140
|
_driver: "asyncStorage",
|
|
1141
1141
|
_initStorage: ce,
|
|
1142
|
-
_support:
|
|
1142
|
+
_support: N(),
|
|
1143
1143
|
iterate: ge,
|
|
1144
1144
|
getItem: se,
|
|
1145
1145
|
setItem: Be,
|
|
@@ -1168,7 +1168,7 @@ var nt = { exports: {} };
|
|
|
1168
1168
|
a += Se[i[m] >> 2], a += Se[(i[m] & 3) << 4 | i[m + 1] >> 4], a += Se[(i[m + 1] & 15) << 2 | i[m + 2] >> 6], a += Se[i[m + 2] & 63];
|
|
1169
1169
|
return i.length % 3 === 2 ? a = a.substring(0, a.length - 1) + "=" : i.length % 3 === 1 && (a = a.substring(0, a.length - 2) + "=="), a;
|
|
1170
1170
|
}
|
|
1171
|
-
function
|
|
1171
|
+
function Ne(n, i) {
|
|
1172
1172
|
var a = "";
|
|
1173
1173
|
if (n && (a = De.call(n)), n && (a === "[object ArrayBuffer]" || n.buffer && De.call(n.buffer) === "[object ArrayBuffer]")) {
|
|
1174
1174
|
var m, v = ke;
|
|
@@ -1223,7 +1223,7 @@ var nt = { exports: {} };
|
|
|
1223
1223
|
}
|
|
1224
1224
|
}
|
|
1225
1225
|
var cr = {
|
|
1226
|
-
serialize:
|
|
1226
|
+
serialize: Ne,
|
|
1227
1227
|
deserialize: ct,
|
|
1228
1228
|
stringToBuffer: Ae,
|
|
1229
1229
|
bufferToString: oe
|
|
@@ -1566,13 +1566,13 @@ var nt = { exports: {} };
|
|
|
1566
1566
|
});
|
|
1567
1567
|
return h(a, n), a;
|
|
1568
1568
|
}
|
|
1569
|
-
function
|
|
1569
|
+
function Nt(n) {
|
|
1570
1570
|
var i = this, a = i.keys().then(function(m) {
|
|
1571
1571
|
return m.length;
|
|
1572
1572
|
});
|
|
1573
1573
|
return h(a, n), a;
|
|
1574
1574
|
}
|
|
1575
|
-
function
|
|
1575
|
+
function Mt(n, i) {
|
|
1576
1576
|
var a = this;
|
|
1577
1577
|
n = r(n);
|
|
1578
1578
|
var m = a.ready().then(function() {
|
|
@@ -1581,7 +1581,7 @@ var nt = { exports: {} };
|
|
|
1581
1581
|
});
|
|
1582
1582
|
return h(m, i), m;
|
|
1583
1583
|
}
|
|
1584
|
-
function
|
|
1584
|
+
function Lt(n, i, a) {
|
|
1585
1585
|
var m = this;
|
|
1586
1586
|
n = r(n);
|
|
1587
1587
|
var v = m.ready().then(function() {
|
|
@@ -1624,10 +1624,10 @@ var nt = { exports: {} };
|
|
|
1624
1624
|
_support: At(),
|
|
1625
1625
|
iterate: _t,
|
|
1626
1626
|
getItem: Tt,
|
|
1627
|
-
setItem:
|
|
1628
|
-
removeItem:
|
|
1627
|
+
setItem: Lt,
|
|
1628
|
+
removeItem: Mt,
|
|
1629
1629
|
clear: xt,
|
|
1630
|
-
length:
|
|
1630
|
+
length: Nt,
|
|
1631
1631
|
key: Ct,
|
|
1632
1632
|
keys: Pt,
|
|
1633
1633
|
dropInstance: Rt
|
|
@@ -1863,7 +1863,7 @@ let rr;
|
|
|
1863
1863
|
function va(e) {
|
|
1864
1864
|
return rr(e)();
|
|
1865
1865
|
}
|
|
1866
|
-
function
|
|
1866
|
+
function Me(e) {
|
|
1867
1867
|
return rr(e);
|
|
1868
1868
|
}
|
|
1869
1869
|
function wn(e) {
|
|
@@ -1924,7 +1924,7 @@ function An(e) {
|
|
|
1924
1924
|
return l.value[b];
|
|
1925
1925
|
try {
|
|
1926
1926
|
let c = A.value[b];
|
|
1927
|
-
c == null && (c = new Promise(async (S,
|
|
1927
|
+
c == null && (c = new Promise(async (S, L) => {
|
|
1928
1928
|
var E;
|
|
1929
1929
|
try {
|
|
1930
1930
|
const T = await ((E = e.api) == null ? void 0 : E.getAll(r)), x = {
|
|
@@ -1935,7 +1935,7 @@ function An(e) {
|
|
|
1935
1935
|
};
|
|
1936
1936
|
s == !0 && await ve().setItem(b, x), S(x);
|
|
1937
1937
|
} catch (T) {
|
|
1938
|
-
|
|
1938
|
+
L(T);
|
|
1939
1939
|
} finally {
|
|
1940
1940
|
delete A.value[b];
|
|
1941
1941
|
}
|
|
@@ -1965,15 +1965,15 @@ function An(e) {
|
|
|
1965
1965
|
return l.value[b];
|
|
1966
1966
|
try {
|
|
1967
1967
|
let y = A.value[b];
|
|
1968
|
-
y == null && (y = new Promise(async (
|
|
1968
|
+
y == null && (y = new Promise(async (L, E) => {
|
|
1969
1969
|
var T;
|
|
1970
1970
|
try {
|
|
1971
1971
|
let x = await ((T = e.api) == null ? void 0 : T.get(r));
|
|
1972
|
-
const
|
|
1972
|
+
const M = {
|
|
1973
1973
|
meta: { storedOn: t.toString() },
|
|
1974
1974
|
data: x == null ? void 0 : x.data
|
|
1975
1975
|
};
|
|
1976
|
-
s == !0 && await ve().setItem(b,
|
|
1976
|
+
s == !0 && await ve().setItem(b, M), L(M);
|
|
1977
1977
|
} catch (x) {
|
|
1978
1978
|
E(x);
|
|
1979
1979
|
} finally {
|
|
@@ -1986,7 +1986,7 @@ function An(e) {
|
|
|
1986
1986
|
throw y;
|
|
1987
1987
|
}
|
|
1988
1988
|
}
|
|
1989
|
-
async function
|
|
1989
|
+
async function N(r) {
|
|
1990
1990
|
var c;
|
|
1991
1991
|
r.additionalUrl ?? (r.additionalUrl = "/patch"), g(r);
|
|
1992
1992
|
const b = I(r);
|
|
@@ -2005,14 +2005,14 @@ function An(e) {
|
|
|
2005
2005
|
meta: { storedOn: t.toString() },
|
|
2006
2006
|
data: { ...(c = l.value[b]) == null ? void 0 : c.data, ...D }
|
|
2007
2007
|
};
|
|
2008
|
-
return l.value[b] = y, s == !0 && await ve().setItem(b, y), D.id != null && D.rowVersion != null && Object.entries(l.value).forEach((
|
|
2009
|
-
const E =
|
|
2008
|
+
return l.value[b] = y, s == !0 && await ve().setItem(b, y), D.id != null && D.rowVersion != null && Object.entries(l.value).forEach((L) => {
|
|
2009
|
+
const E = L[1].data;
|
|
2010
2010
|
if (E != null)
|
|
2011
2011
|
if (Array.isArray(E))
|
|
2012
2012
|
for (let T = 0; T < E.length; T++)
|
|
2013
2013
|
E[T].id == D.id && E.splice(T, 1, y.data);
|
|
2014
2014
|
else
|
|
2015
|
-
E.id == D.id && (l.value[
|
|
2015
|
+
E.id == D.id && (l.value[L[0]] = y);
|
|
2016
2016
|
}), y.data;
|
|
2017
2017
|
}
|
|
2018
2018
|
return D;
|
|
@@ -2054,11 +2054,11 @@ function An(e) {
|
|
|
2054
2054
|
delete l.value[b];
|
|
2055
2055
|
const D = ((c = r.data) == null ? void 0 : c.id) ?? r.id;
|
|
2056
2056
|
D != null && Object.entries(l.value).forEach((S) => {
|
|
2057
|
-
const
|
|
2058
|
-
if (
|
|
2059
|
-
if (Array.isArray(
|
|
2060
|
-
for (let E = 0; E <
|
|
2061
|
-
|
|
2057
|
+
const L = S[1].data;
|
|
2058
|
+
if (L != null)
|
|
2059
|
+
if (Array.isArray(L))
|
|
2060
|
+
for (let E = 0; E < L.length; E++)
|
|
2061
|
+
L[E].id == D && L.splice(E, 1);
|
|
2062
2062
|
else
|
|
2063
2063
|
delete l.value[S[0]];
|
|
2064
2064
|
}), s == !0 && await ve().removeItem(b);
|
|
@@ -2076,7 +2076,7 @@ function An(e) {
|
|
|
2076
2076
|
deleteItem: d,
|
|
2077
2077
|
get: _,
|
|
2078
2078
|
getAll: C,
|
|
2079
|
-
patch:
|
|
2079
|
+
patch: N,
|
|
2080
2080
|
post: $,
|
|
2081
2081
|
restore: h,
|
|
2082
2082
|
searchMemory: l,
|
|
@@ -2094,7 +2094,7 @@ function qr(e) {
|
|
|
2094
2094
|
var c;
|
|
2095
2095
|
return `${e.storeName}_${((c = e.auth) == null ? void 0 : c.credentials.value.userID) ?? "no-user-id"}`;
|
|
2096
2096
|
}
|
|
2097
|
-
async function
|
|
2097
|
+
async function N() {
|
|
2098
2098
|
if (console.log("trying save"), C == !0) {
|
|
2099
2099
|
console.log("saving");
|
|
2100
2100
|
const c = {
|
|
@@ -2105,7 +2105,7 @@ function qr(e) {
|
|
|
2105
2105
|
};
|
|
2106
2106
|
console.log(c);
|
|
2107
2107
|
try {
|
|
2108
|
-
await ve().setItem(_(), c);
|
|
2108
|
+
await ve().setItem(_(), JSON.parse(JSON.stringify(c)));
|
|
2109
2109
|
} catch (y) {
|
|
2110
2110
|
console.log("sav err"), console.log(y);
|
|
2111
2111
|
} finally {
|
|
@@ -2115,7 +2115,7 @@ function qr(e) {
|
|
|
2115
2115
|
}
|
|
2116
2116
|
function $(c) {
|
|
2117
2117
|
const y = _();
|
|
2118
|
-
return I.value[y] || (I.value[y] = new Promise(async (S,
|
|
2118
|
+
return I.value[y] || (I.value[y] = new Promise(async (S, L) => {
|
|
2119
2119
|
var E;
|
|
2120
2120
|
try {
|
|
2121
2121
|
let T = await ((E = e.api) == null ? void 0 : E.getAll({
|
|
@@ -2125,23 +2125,23 @@ function qr(e) {
|
|
|
2125
2125
|
lastUpdate: g.value.lastUpdate ?? ln()
|
|
2126
2126
|
}
|
|
2127
2127
|
}));
|
|
2128
|
-
console.log("res"), console.log(T), T == null ?
|
|
2128
|
+
console.log("res"), console.log(T), T == null ? L(T) : (t.value ?? (t.value = []), T.data.forEach((x) => {
|
|
2129
2129
|
var f, w;
|
|
2130
|
-
const
|
|
2131
|
-
|
|
2130
|
+
const M = t.value.findIndex((j) => j.id == x.id);
|
|
2131
|
+
M >= 0 ? (f = t.value) == null || f.splice(M, 1, x) : (w = t.value) == null || w.push(x);
|
|
2132
2132
|
}), l.value = t.value.length, g.value = {
|
|
2133
2133
|
lastUpdate: he.utc().toString(),
|
|
2134
2134
|
storedOn: A.toString()
|
|
2135
|
-
}, await
|
|
2135
|
+
}, await N(), S(T));
|
|
2136
2136
|
} catch (T) {
|
|
2137
|
-
|
|
2137
|
+
L(T);
|
|
2138
2138
|
} finally {
|
|
2139
2139
|
delete I.value[y];
|
|
2140
2140
|
}
|
|
2141
2141
|
})), I.value[y];
|
|
2142
2142
|
}
|
|
2143
2143
|
async function d(c) {
|
|
2144
|
-
var T, x,
|
|
2144
|
+
var T, x, M, f;
|
|
2145
2145
|
const y = _(), S = c.refresh;
|
|
2146
2146
|
if (console.log("getting all from"), console.log(y), !S && t.value != null)
|
|
2147
2147
|
return console.log("not refresh and ditems not null"), {
|
|
@@ -2161,15 +2161,15 @@ function qr(e) {
|
|
|
2161
2161
|
}
|
|
2162
2162
|
if (e.api == null)
|
|
2163
2163
|
return console.log("no api"), {
|
|
2164
|
-
count: (
|
|
2164
|
+
count: (M = t.value) == null ? void 0 : M.length,
|
|
2165
2165
|
data: t.value ?? [],
|
|
2166
2166
|
filters: s.value
|
|
2167
2167
|
};
|
|
2168
2168
|
console.log("setting dataitems"), t.value ?? (t.value = []);
|
|
2169
2169
|
try {
|
|
2170
2170
|
console.log("create refresh promise");
|
|
2171
|
-
var
|
|
2172
|
-
console.log(
|
|
2171
|
+
var L = await $(c);
|
|
2172
|
+
console.log(L);
|
|
2173
2173
|
var E = {
|
|
2174
2174
|
count: (f = t.value) == null ? void 0 : f.length,
|
|
2175
2175
|
data: t.value ?? [],
|
|
@@ -2182,17 +2182,17 @@ function qr(e) {
|
|
|
2182
2182
|
}
|
|
2183
2183
|
}
|
|
2184
2184
|
async function h(c) {
|
|
2185
|
-
var E, T, x,
|
|
2185
|
+
var E, T, x, M;
|
|
2186
2186
|
const y = _(), S = c.id ?? ((E = c.data) == null ? void 0 : E.id);
|
|
2187
2187
|
if (S == null)
|
|
2188
2188
|
throw new Error("no id provided");
|
|
2189
|
-
let
|
|
2190
|
-
if (!
|
|
2189
|
+
let L = c.refresh;
|
|
2190
|
+
if (!L && t.value != null) {
|
|
2191
2191
|
const f = t.value.find((w) => w.id == S);
|
|
2192
2192
|
if (f != null)
|
|
2193
2193
|
return { data: f };
|
|
2194
2194
|
}
|
|
2195
|
-
if (!
|
|
2195
|
+
if (!L && C == !0) {
|
|
2196
2196
|
const f = await ve().getItem(y);
|
|
2197
2197
|
if (f != null && parseFloat(f.meta.storedOn) > A - 12) {
|
|
2198
2198
|
t.value = f.data, l.value = f.data.length, s.value = f.filters ?? [], g.value = f.meta;
|
|
@@ -2207,14 +2207,14 @@ function qr(e) {
|
|
|
2207
2207
|
};
|
|
2208
2208
|
t.value ?? (t.value = []);
|
|
2209
2209
|
try {
|
|
2210
|
-
return await $(c), { data: (
|
|
2210
|
+
return await $(c), { data: (M = t.value) == null ? void 0 : M.find((f) => f.id == c.id) };
|
|
2211
2211
|
} catch (f) {
|
|
2212
2212
|
let w = f;
|
|
2213
2213
|
throw new Error(w.message ?? "Problem");
|
|
2214
2214
|
}
|
|
2215
2215
|
}
|
|
2216
2216
|
async function u(c) {
|
|
2217
|
-
var S,
|
|
2217
|
+
var S, L, E;
|
|
2218
2218
|
c.additionalUrl ?? (c.additionalUrl = "/patch");
|
|
2219
2219
|
let y;
|
|
2220
2220
|
if (e.api != null)
|
|
@@ -2229,12 +2229,12 @@ function qr(e) {
|
|
|
2229
2229
|
y = c.data;
|
|
2230
2230
|
if (y != null) {
|
|
2231
2231
|
let T = (S = t.value) == null ? void 0 : S.findIndex((x) => x.id == y.id);
|
|
2232
|
-
T != null && T >= 0 && (t.value ?? (t.value = []), (
|
|
2232
|
+
T != null && T >= 0 && (t.value ?? (t.value = []), (L = t.value) == null || L.splice(T, 1, y), await N());
|
|
2233
2233
|
}
|
|
2234
2234
|
return (E = t.value) == null ? void 0 : E.find((T) => T.id == (c.id ?? c.data.id));
|
|
2235
2235
|
}
|
|
2236
2236
|
async function r(c) {
|
|
2237
|
-
var S,
|
|
2237
|
+
var S, L;
|
|
2238
2238
|
c.additionalUrl ?? (c.additionalUrl = "/post");
|
|
2239
2239
|
let y;
|
|
2240
2240
|
if (e.api != null)
|
|
@@ -2247,10 +2247,10 @@ function qr(e) {
|
|
|
2247
2247
|
}
|
|
2248
2248
|
else
|
|
2249
2249
|
y = c.data;
|
|
2250
|
-
return y != null && (t.value ?? (t.value = []), (S = t.value) == null || S.unshift(y), l.value += 1, await
|
|
2250
|
+
return y != null && (t.value ?? (t.value = []), (S = t.value) == null || S.unshift(y), l.value += 1, await N()), (L = t.value) == null ? void 0 : L.find((E) => E.id == (c.id ?? c.data.id));
|
|
2251
2251
|
}
|
|
2252
2252
|
async function b(c) {
|
|
2253
|
-
var S,
|
|
2253
|
+
var S, L;
|
|
2254
2254
|
if (c.additionalUrl ?? (c.additionalUrl = "/delete"), e.api != null)
|
|
2255
2255
|
try {
|
|
2256
2256
|
let E = await e.api.deleteItem(c);
|
|
@@ -2263,7 +2263,7 @@ function qr(e) {
|
|
|
2263
2263
|
const y = c.id ?? c.data.id;
|
|
2264
2264
|
if (y != null) {
|
|
2265
2265
|
let E = (S = t.value) == null ? void 0 : S.findIndex((T) => T.id == y);
|
|
2266
|
-
E != null && E >= 0 && (t.value ?? (t.value = []), (
|
|
2266
|
+
E != null && E >= 0 && (t.value ?? (t.value = []), (L = t.value) == null || L.splice(E, 1), await N());
|
|
2267
2267
|
}
|
|
2268
2268
|
}
|
|
2269
2269
|
async function D(c) {
|
|
@@ -2272,14 +2272,14 @@ function qr(e) {
|
|
|
2272
2272
|
try {
|
|
2273
2273
|
await e.api.patch(c);
|
|
2274
2274
|
} catch (S) {
|
|
2275
|
-
let
|
|
2276
|
-
throw new Error(
|
|
2275
|
+
let L = S;
|
|
2276
|
+
throw new Error(L.message ?? "Patch Problem");
|
|
2277
2277
|
}
|
|
2278
2278
|
try {
|
|
2279
2279
|
c.additionalUrl = "/getAll", await $(c);
|
|
2280
2280
|
} catch (S) {
|
|
2281
|
-
let
|
|
2282
|
-
throw new Error(
|
|
2281
|
+
let L = S;
|
|
2282
|
+
throw new Error(L.message ?? "Problem");
|
|
2283
2283
|
}
|
|
2284
2284
|
return (y = t.value) == null ? void 0 : y.find((S) => S.id == (c.id ?? c.data.id));
|
|
2285
2285
|
}
|
|
@@ -2344,22 +2344,22 @@ function En(e) {
|
|
|
2344
2344
|
name: "Unauthorized",
|
|
2345
2345
|
message: S.statusText
|
|
2346
2346
|
};
|
|
2347
|
-
let
|
|
2348
|
-
throw new Error(
|
|
2347
|
+
let L = await S.text();
|
|
2348
|
+
throw new Error(L ?? S.statusText ?? "Get error");
|
|
2349
2349
|
}
|
|
2350
2350
|
if (D)
|
|
2351
2351
|
return await S.text();
|
|
2352
2352
|
if (b)
|
|
2353
2353
|
return await S.json();
|
|
2354
2354
|
throw new Error();
|
|
2355
|
-
} catch (
|
|
2356
|
-
const E = `${(S == null ? void 0 : S.status) ?? ""} ${(S == null ? void 0 : S.statusText) ?? ""} ${
|
|
2355
|
+
} catch (L) {
|
|
2356
|
+
const E = `${(S == null ? void 0 : S.status) ?? ""} ${(S == null ? void 0 : S.statusText) ?? ""} ${L.message}`;
|
|
2357
2357
|
if (!r)
|
|
2358
2358
|
return;
|
|
2359
|
-
throw
|
|
2359
|
+
throw L.code == 401 ? L : new Error(E);
|
|
2360
2360
|
}
|
|
2361
2361
|
}
|
|
2362
|
-
async function
|
|
2362
|
+
async function N(u) {
|
|
2363
2363
|
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, b = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, D = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
2364
2364
|
let c = u.finalUrl, y = u.headers;
|
|
2365
2365
|
if (c == null && (c = A(u)), u.overrideHeaders !== !0 && (y = t(u)), s != null && s.isDemoing.value)
|
|
@@ -2379,19 +2379,19 @@ function En(e) {
|
|
|
2379
2379
|
name: "Unauthorized",
|
|
2380
2380
|
message: S.statusText
|
|
2381
2381
|
};
|
|
2382
|
-
let
|
|
2383
|
-
throw new Error(
|
|
2382
|
+
let L = await S.text();
|
|
2383
|
+
throw new Error(L ?? S.statusText ?? "Get all error");
|
|
2384
2384
|
}
|
|
2385
2385
|
if (D)
|
|
2386
2386
|
return await S.text();
|
|
2387
2387
|
if (b)
|
|
2388
2388
|
return await S.json();
|
|
2389
2389
|
throw new Error();
|
|
2390
|
-
} catch (
|
|
2391
|
-
const E = `${(S == null ? void 0 : S.status) ?? ""} ${(S == null ? void 0 : S.statusText) ?? ""} ${
|
|
2390
|
+
} catch (L) {
|
|
2391
|
+
const E = `${(S == null ? void 0 : S.status) ?? ""} ${(S == null ? void 0 : S.statusText) ?? ""} ${L.message}`;
|
|
2392
2392
|
if (!r)
|
|
2393
2393
|
return;
|
|
2394
|
-
throw
|
|
2394
|
+
throw L.code == 401 ? L : new Error(E);
|
|
2395
2395
|
}
|
|
2396
2396
|
}
|
|
2397
2397
|
async function $(u) {
|
|
@@ -2415,19 +2415,19 @@ function En(e) {
|
|
|
2415
2415
|
name: "Unauthorized",
|
|
2416
2416
|
message: S.statusText
|
|
2417
2417
|
};
|
|
2418
|
-
let
|
|
2419
|
-
throw new Error(
|
|
2418
|
+
let L = await S.text();
|
|
2419
|
+
throw new Error(L ?? S.statusText ?? "Post error!");
|
|
2420
2420
|
}
|
|
2421
2421
|
if (D)
|
|
2422
2422
|
return await S.text();
|
|
2423
2423
|
if (b)
|
|
2424
2424
|
return await S.json();
|
|
2425
2425
|
throw new Error();
|
|
2426
|
-
} catch (
|
|
2426
|
+
} catch (L) {
|
|
2427
2427
|
if (S.status == 200 || !r)
|
|
2428
2428
|
return;
|
|
2429
|
-
const E = `${(S == null ? void 0 : S.status) ?? ""} ${(S == null ? void 0 : S.statusText) ?? ""} ${
|
|
2430
|
-
throw
|
|
2429
|
+
const E = `${(S == null ? void 0 : S.status) ?? ""} ${(S == null ? void 0 : S.statusText) ?? ""} ${L.message}`;
|
|
2430
|
+
throw L.code == 401 ? L : new Error(E);
|
|
2431
2431
|
}
|
|
2432
2432
|
}
|
|
2433
2433
|
async function d(u) {
|
|
@@ -2451,19 +2451,19 @@ function En(e) {
|
|
|
2451
2451
|
name: "Unauthorized",
|
|
2452
2452
|
message: S.statusText
|
|
2453
2453
|
};
|
|
2454
|
-
let
|
|
2455
|
-
throw new Error(
|
|
2454
|
+
let L = await S.text();
|
|
2455
|
+
throw new Error(L ?? S.statusText ?? "Patch error!");
|
|
2456
2456
|
}
|
|
2457
2457
|
if (D)
|
|
2458
2458
|
return await S.text();
|
|
2459
2459
|
if (b)
|
|
2460
2460
|
return await S.json();
|
|
2461
2461
|
throw new Error();
|
|
2462
|
-
} catch (
|
|
2462
|
+
} catch (L) {
|
|
2463
2463
|
if (S.status == 200 || !r)
|
|
2464
2464
|
return;
|
|
2465
|
-
const E = `${(S == null ? void 0 : S.status) ?? ""} ${(S == null ? void 0 : S.statusText) ?? ""} ${
|
|
2466
|
-
throw
|
|
2465
|
+
const E = `${(S == null ? void 0 : S.status) ?? ""} ${(S == null ? void 0 : S.statusText) ?? ""} ${L.message}`;
|
|
2466
|
+
throw L.code == 401 ? L : new Error(E);
|
|
2467
2467
|
}
|
|
2468
2468
|
}
|
|
2469
2469
|
async function h(u) {
|
|
@@ -2500,7 +2500,7 @@ function En(e) {
|
|
|
2500
2500
|
buildUrl: A,
|
|
2501
2501
|
deleteItem: h,
|
|
2502
2502
|
get: _,
|
|
2503
|
-
getAll:
|
|
2503
|
+
getAll: N,
|
|
2504
2504
|
patch: d,
|
|
2505
2505
|
post: $
|
|
2506
2506
|
}, Ar;
|
|
@@ -2511,12 +2511,12 @@ function ut(e) {
|
|
|
2511
2511
|
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to delete this item?" : void 0);
|
|
2512
2512
|
let b = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2513
2513
|
const D = (e == null ? void 0 : e.items) ?? [];
|
|
2514
|
-
return b == null && r.nav != null && (b =
|
|
2514
|
+
return b == null && r.nav != null && (b = Me({ nav: r.nav })), b != null ? r.onDeleteAsync ?? (r.onDeleteAsync = () => b().deleteItem(r)) : r.onDeleteAsync ?? (r.onDeleteAsync = () => {
|
|
2515
2515
|
var S;
|
|
2516
2516
|
const c = r.id ?? ((S = r.data) == null ? void 0 : S.id);
|
|
2517
2517
|
if (c == null)
|
|
2518
2518
|
return Promise.resolve("No id found in delete action");
|
|
2519
|
-
const y = D.findIndex((
|
|
2519
|
+
const y = D.findIndex((L) => L.id == c);
|
|
2520
2520
|
return y >= 0 && D.splice(y, 1), Promise.resolve(void 0);
|
|
2521
2521
|
}), g(async () => {
|
|
2522
2522
|
let c;
|
|
@@ -2534,7 +2534,7 @@ function ut(e) {
|
|
|
2534
2534
|
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to get this item?" : void 0);
|
|
2535
2535
|
let b = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2536
2536
|
const D = (e == null ? void 0 : e.items) ?? [];
|
|
2537
|
-
return b == null && r.nav != null && (b =
|
|
2537
|
+
return b == null && r.nav != null && (b = Me({ nav: r.nav })), b != null ? r.onGetAsync ?? (r.onGetAsync = async () => (await b().get(r)).data) : r.onGetAsync ?? (r.onGetAsync = () => {
|
|
2538
2538
|
var y;
|
|
2539
2539
|
const c = r.id ?? ((y = r.data) == null ? void 0 : y.id);
|
|
2540
2540
|
return c == null ? Promise.resolve(void 0) : Promise.resolve(D.find((S) => S.id == c));
|
|
@@ -2550,11 +2550,11 @@ function ut(e) {
|
|
|
2550
2550
|
throwError: r.throwError ?? (e == null ? void 0 : e.throwError)
|
|
2551
2551
|
});
|
|
2552
2552
|
}
|
|
2553
|
-
function
|
|
2553
|
+
function N(r) {
|
|
2554
2554
|
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to get these items?" : void 0);
|
|
2555
2555
|
let b = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2556
2556
|
const D = (e == null ? void 0 : e.items) ?? [];
|
|
2557
|
-
return b == null && r.nav != null && (b =
|
|
2557
|
+
return b == null && r.nav != null && (b = Me({ nav: r.nav })), b != null ? r.onGetAsync ?? (r.onGetAsync = () => b().getAll(r)) : r.onGetAsync ?? (r.onGetAsync = () => Promise.resolve(D)), g(async () => {
|
|
2558
2558
|
let c;
|
|
2559
2559
|
return r.onGetAsync != null && (c = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (c = await r.onGetSuccessAsync(c, r)), c;
|
|
2560
2560
|
}, {
|
|
@@ -2569,7 +2569,7 @@ function ut(e) {
|
|
|
2569
2569
|
function $(r) {
|
|
2570
2570
|
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to restore this item?" : void 0);
|
|
2571
2571
|
let b = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2572
|
-
return b == null && r.nav != null && (b =
|
|
2572
|
+
return b == null && r.nav != null && (b = Me({ nav: r.nav })), b != null && (r.onRestoreAsync ?? (r.onRestoreAsync = () => b().restore(r))), g(async () => {
|
|
2573
2573
|
let D, c;
|
|
2574
2574
|
return r.onCanRestoreAsync != null && (D = await r.onCanRestoreAsync(r.data)), D == null && r.onRestoreAsync != null && (c = await r.onRestoreAsync(r.data)), c != null && r.onRestoreSuccessAsync != null && await r.onRestoreSuccessAsync(c), I(D), c;
|
|
2575
2575
|
}, {
|
|
@@ -2585,7 +2585,7 @@ function ut(e) {
|
|
|
2585
2585
|
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to save this item?" : void 0);
|
|
2586
2586
|
let b = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2587
2587
|
const D = (e == null ? void 0 : e.items) ?? [];
|
|
2588
|
-
return r.onGetSaveAsync ?? (r.onGetSaveAsync = (c) => c), r.onCanSaveAsync ?? (r.onCanSaveAsync = () => Promise.resolve(void 0)), b == null && r.nav != null && (b =
|
|
2588
|
+
return r.onGetSaveAsync ?? (r.onGetSaveAsync = (c) => c), r.onCanSaveAsync ?? (r.onCanSaveAsync = () => Promise.resolve(void 0)), b == null && r.nav != null && (b = Me({ nav: r.nav })), b != null ? r.onSaveAsync ?? (r.onSaveAsync = async () => {
|
|
2589
2589
|
var c;
|
|
2590
2590
|
return r.mode ?? (r.mode = ((c = r.data) == null ? void 0 : c.id) == null ? "new" : "edit"), r.mode == "new" ? await b().post(r) : await b().patch(r);
|
|
2591
2591
|
}) : r.onSaveAsync ?? (r.onSaveAsync = (c) => {
|
|
@@ -2625,7 +2625,7 @@ function ut(e) {
|
|
|
2625
2625
|
clearErrors: A,
|
|
2626
2626
|
deleteItem: C,
|
|
2627
2627
|
doAction: g,
|
|
2628
|
-
getAllItems:
|
|
2628
|
+
getAllItems: N,
|
|
2629
2629
|
getItem: _,
|
|
2630
2630
|
isLoading: s,
|
|
2631
2631
|
logError: I,
|
|
@@ -2649,29 +2649,29 @@ function Dn(e) {
|
|
|
2649
2649
|
function g(x) {
|
|
2650
2650
|
if (x == null)
|
|
2651
2651
|
return !0;
|
|
2652
|
-
var
|
|
2653
|
-
if (
|
|
2652
|
+
var M = e.getAuthItem != null ? e.getAuthItem(x) : null;
|
|
2653
|
+
if (M == null)
|
|
2654
2654
|
return !1;
|
|
2655
|
-
if (
|
|
2655
|
+
if (M.requiresAuth === !1)
|
|
2656
2656
|
return !0;
|
|
2657
2657
|
const f = J(s);
|
|
2658
|
-
if (f.isSuspended &&
|
|
2658
|
+
if (f.isSuspended && M.ignoreSuspension !== !0)
|
|
2659
2659
|
return !1;
|
|
2660
2660
|
if (f.isGlobalAdmin)
|
|
2661
2661
|
return !0;
|
|
2662
|
-
if (
|
|
2663
|
-
for (var w = 0; w <
|
|
2664
|
-
if (!I(
|
|
2662
|
+
if (M.permissions != null) {
|
|
2663
|
+
for (var w = 0; w < M.permissions.length; w++)
|
|
2664
|
+
if (!I(M.permissions[w]))
|
|
2665
2665
|
return !1;
|
|
2666
2666
|
}
|
|
2667
2667
|
return !0;
|
|
2668
2668
|
}
|
|
2669
2669
|
function I(x) {
|
|
2670
|
-
const
|
|
2671
|
-
if (
|
|
2672
|
-
for (var f = 0; f <
|
|
2673
|
-
var w =
|
|
2674
|
-
if (
|
|
2670
|
+
const M = J(s);
|
|
2671
|
+
if (M.userPermissions != null)
|
|
2672
|
+
for (var f = 0; f < M.userPermissions.length; f++) {
|
|
2673
|
+
var w = M.userPermissions[f].split(".");
|
|
2674
|
+
if (M.userPermissions[f] == "everything.edit" || x == w[0] && w.length > 1 && w[1] == "edit")
|
|
2675
2675
|
return !0;
|
|
2676
2676
|
}
|
|
2677
2677
|
return !1;
|
|
@@ -2679,53 +2679,53 @@ function Dn(e) {
|
|
|
2679
2679
|
function C(x) {
|
|
2680
2680
|
if (x == null)
|
|
2681
2681
|
return !0;
|
|
2682
|
-
var
|
|
2683
|
-
if (
|
|
2682
|
+
var M = e.getAuthItem != null ? e.getAuthItem(x) : null;
|
|
2683
|
+
if (M == null)
|
|
2684
2684
|
return !1;
|
|
2685
|
-
if (
|
|
2685
|
+
if (M.requiresAuth === !1)
|
|
2686
2686
|
return !0;
|
|
2687
2687
|
const f = J(s);
|
|
2688
|
-
if (f.isSuspended &&
|
|
2688
|
+
if (f.isSuspended && M.ignoreSuspension !== !0)
|
|
2689
2689
|
return !1;
|
|
2690
2690
|
if (f.isGlobalAdmin)
|
|
2691
2691
|
return !0;
|
|
2692
|
-
if (
|
|
2693
|
-
for (var w = 0; w <
|
|
2694
|
-
if (!_(
|
|
2692
|
+
if (M.permissions != null) {
|
|
2693
|
+
for (var w = 0; w < M.permissions.length; w++)
|
|
2694
|
+
if (!_(M.permissions[w]))
|
|
2695
2695
|
return !1;
|
|
2696
2696
|
}
|
|
2697
2697
|
return !0;
|
|
2698
2698
|
}
|
|
2699
2699
|
function _(x) {
|
|
2700
|
-
const
|
|
2701
|
-
if (
|
|
2702
|
-
for (var f = 0; f <
|
|
2703
|
-
var w =
|
|
2704
|
-
if (x == w[0] || x == "everything" ||
|
|
2700
|
+
const M = J(s);
|
|
2701
|
+
if (M.userPermissions != null)
|
|
2702
|
+
for (var f = 0; f < M.userPermissions.length; f++) {
|
|
2703
|
+
var w = M.userPermissions[f].split(".");
|
|
2704
|
+
if (x == w[0] || x == "everything" || M.userPermissions[f] == "everything.view" || M.userPermissions[f] == "everything.edit")
|
|
2705
2705
|
return !0;
|
|
2706
2706
|
}
|
|
2707
2707
|
return !1;
|
|
2708
2708
|
}
|
|
2709
|
-
function
|
|
2709
|
+
function N(x, M, f) {
|
|
2710
2710
|
let w = !0;
|
|
2711
|
-
return J(s).isGlobalAdmin ? !0 : (
|
|
2711
|
+
return J(s).isGlobalAdmin ? !0 : (M != null && M.length > 0 && M.forEach((X) => {
|
|
2712
2712
|
f == "edit" ? I(X) || (w = !1) : _(X) || (w = !1);
|
|
2713
2713
|
}), x != null && x.length > 0 && (x.some((X) => u(X)) || (w = !1)), w);
|
|
2714
2714
|
}
|
|
2715
|
-
function $(x,
|
|
2715
|
+
function $(x, M = !1) {
|
|
2716
2716
|
var f = e.getAuthItem != null ? e.getAuthItem(x) : null;
|
|
2717
2717
|
let w = !1;
|
|
2718
2718
|
if (f == null)
|
|
2719
2719
|
return !1;
|
|
2720
|
-
let j = f.subscriptions ?? [], X = f.permissions ?? [], re =
|
|
2721
|
-
return re || !
|
|
2720
|
+
let j = f.subscriptions ?? [], X = f.permissions ?? [], re = N(j, X, "view");
|
|
2721
|
+
return re || !M || !_e(f.children) ? re : ((f == null ? void 0 : f.children) != null && f.children.forEach((ue) => {
|
|
2722
2722
|
$(ue, !0) && (w = !0);
|
|
2723
2723
|
}), w);
|
|
2724
2724
|
}
|
|
2725
2725
|
function d(x) {
|
|
2726
|
-
return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (
|
|
2726
|
+
return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (M, f) => {
|
|
2727
2727
|
const w = Ue(Wr(), `authorize?response_type=code&client_id=${e.oauthClientID}&redirect_uri=${window.location.origin}/authentication&state=${f}`);
|
|
2728
|
-
return
|
|
2728
|
+
return M ? `${w}&redirect_path=${M}` : w;
|
|
2729
2729
|
}), e.getAuthorizeUrl != null ? e.getAuthorizeUrl(x, l.value) ?? "" : "";
|
|
2730
2730
|
}
|
|
2731
2731
|
function h(x) {
|
|
@@ -2733,12 +2733,12 @@ function Dn(e) {
|
|
|
2733
2733
|
return x == null ? 0 : ((f = (e.subscriptionOptions ?? []).find((w) => w.code == x)) == null ? void 0 : f.value) ?? 0;
|
|
2734
2734
|
}
|
|
2735
2735
|
function u(x) {
|
|
2736
|
-
const
|
|
2737
|
-
if (
|
|
2736
|
+
const M = J(s);
|
|
2737
|
+
if (M.subscriptionCode == null)
|
|
2738
2738
|
return !1;
|
|
2739
|
-
if (
|
|
2739
|
+
if (M.subscriptionCode == x)
|
|
2740
2740
|
return !0;
|
|
2741
|
-
const f = h(x), w = h(
|
|
2741
|
+
const f = h(x), w = h(M.subscriptionCode);
|
|
2742
2742
|
return f <= w;
|
|
2743
2743
|
}
|
|
2744
2744
|
function r(x) {
|
|
@@ -2749,16 +2749,16 @@ function Dn(e) {
|
|
|
2749
2749
|
);
|
|
2750
2750
|
return JSON.parse(w);
|
|
2751
2751
|
}
|
|
2752
|
-
function b(x,
|
|
2753
|
-
s.value = void 0,
|
|
2752
|
+
function b(x, M) {
|
|
2753
|
+
s.value = void 0, L(), x != null && M != null && M.currentRoute.value.path != x && M.push({ path: x });
|
|
2754
2754
|
}
|
|
2755
2755
|
function D(x) {
|
|
2756
2756
|
var f;
|
|
2757
2757
|
J(s).isLoggedIn || ((f = e.demo) == null || f.endDemo(), T() && (b(), window.location.href = d(x)));
|
|
2758
2758
|
}
|
|
2759
|
-
async function c(x,
|
|
2759
|
+
async function c(x, M) {
|
|
2760
2760
|
return e.getToken ?? (e.getToken = async () => {
|
|
2761
|
-
let f = x, w =
|
|
2761
|
+
let f = x, w = M, j = e.oauthGrantType ?? "authorization_token", X = e.oauthClientID ?? "";
|
|
2762
2762
|
if (f == null || w == null)
|
|
2763
2763
|
throw new Error("Code and State required in OAuth token process");
|
|
2764
2764
|
if (w != l.value)
|
|
@@ -2772,20 +2772,20 @@ function Dn(e) {
|
|
|
2772
2772
|
data: ue
|
|
2773
2773
|
});
|
|
2774
2774
|
y(G.access_token);
|
|
2775
|
-
}), await e.getToken(x,
|
|
2775
|
+
}), await e.getToken(x, M);
|
|
2776
2776
|
}
|
|
2777
2777
|
function y(x) {
|
|
2778
2778
|
if (x != null && (e.demo == null || !e.demo.isDemoing.value)) {
|
|
2779
|
-
const
|
|
2780
|
-
S(
|
|
2779
|
+
const M = r(x);
|
|
2780
|
+
S(M, x), e.processTokenPayload != null && e.processTokenPayload(s, M);
|
|
2781
2781
|
}
|
|
2782
2782
|
}
|
|
2783
|
-
function S(x,
|
|
2783
|
+
function S(x, M) {
|
|
2784
2784
|
var w;
|
|
2785
2785
|
const f = s.value;
|
|
2786
|
-
f.expiresOn = x.ExpiresOn, f.isGlobalAdmin = x.IsGlobalAdmin == "True", f.isLoggedIn = !0, f.permissions = x.Permissions, f.subscriptionCode = x.Subscription, f.timeZone ?? (f.timeZone = e.defaultTimeZone ?? hr), f.token =
|
|
2786
|
+
f.expiresOn = x.ExpiresOn, f.isGlobalAdmin = x.IsGlobalAdmin == "True", f.isLoggedIn = !0, f.permissions = x.Permissions, f.subscriptionCode = x.Subscription, f.timeZone ?? (f.timeZone = e.defaultTimeZone ?? hr), f.token = M, f.userID = x.UserLoginID, f.userPermissions = ((w = x.Permissions) == null ? void 0 : w.split(",")) ?? [];
|
|
2787
2787
|
}
|
|
2788
|
-
function
|
|
2788
|
+
function L() {
|
|
2789
2789
|
var x;
|
|
2790
2790
|
s.value ?? (s.value = {}), (x = s.value).timeZone ?? (x.timeZone = e.defaultTimeZone ?? hr);
|
|
2791
2791
|
}
|
|
@@ -2797,17 +2797,17 @@ function Dn(e) {
|
|
|
2797
2797
|
const x = J(s);
|
|
2798
2798
|
if (x == null || x.expiresOn == null)
|
|
2799
2799
|
return !0;
|
|
2800
|
-
const
|
|
2801
|
-
return
|
|
2800
|
+
const M = he.fromFormat(x.expiresOn, t), f = he.utc();
|
|
2801
|
+
return M <= f;
|
|
2802
2802
|
}
|
|
2803
|
-
return
|
|
2803
|
+
return L(), Ir = {
|
|
2804
2804
|
authState: l,
|
|
2805
2805
|
canEdit: g,
|
|
2806
2806
|
canEditPermit: I,
|
|
2807
2807
|
canView: C,
|
|
2808
2808
|
canViewPermit: _,
|
|
2809
2809
|
credentials: s,
|
|
2810
|
-
doShow:
|
|
2810
|
+
doShow: N,
|
|
2811
2811
|
doShowByNav: $,
|
|
2812
2812
|
getAuthorizeUrl: d,
|
|
2813
2813
|
getToken: c,
|
|
@@ -2826,61 +2826,61 @@ function xn(e, t, l = {}) {
|
|
|
2826
2826
|
stopPropagation: s = !1,
|
|
2827
2827
|
axis: g = "both"
|
|
2828
2828
|
} = l, I = { capture: l.capture ?? !0 };
|
|
2829
|
-
let C = { x: 0, y: 0 }, _ = { x: 0, y: 0 },
|
|
2830
|
-
function u(
|
|
2831
|
-
J(A) &&
|
|
2829
|
+
let C = { x: 0, y: 0 }, _ = { x: 0, y: 0 }, N = { x: 0, y: 0 }, $ = [], d = [], h = z(!1);
|
|
2830
|
+
function u(L) {
|
|
2831
|
+
J(A) && L.preventDefault(), J(s) && L.stopPropagation();
|
|
2832
2832
|
}
|
|
2833
|
-
function r(
|
|
2833
|
+
function r(L) {
|
|
2834
2834
|
var f;
|
|
2835
2835
|
const E = J(e);
|
|
2836
2836
|
if (!E)
|
|
2837
2837
|
return;
|
|
2838
|
-
const T = E.$el,
|
|
2839
|
-
|
|
2838
|
+
const T = E.$el, M = L.type === "touchstart" && L.touches.length > 0 ? L.touches[0] : L;
|
|
2839
|
+
N = { x: M.clientX, y: M.clientY }, _ = {
|
|
2840
2840
|
x: T.offsetLeft,
|
|
2841
2841
|
y: T.offsetTop
|
|
2842
2842
|
}, C = {
|
|
2843
2843
|
x: T.offsetLeft,
|
|
2844
2844
|
y: T.offsetTop
|
|
2845
|
-
}, ((f = l.onStart) == null ? void 0 : f.call(l,
|
|
2845
|
+
}, ((f = l.onStart) == null ? void 0 : f.call(l, N, L)) !== !1 && (d.push(me("mousemove", b)), d.push(me("touchmove", b)), d.push(me("mouseup", D)), d.push(me("touchend", D)), u(L));
|
|
2846
2846
|
}
|
|
2847
|
-
function b(
|
|
2847
|
+
function b(L) {
|
|
2848
2848
|
var w;
|
|
2849
|
-
if (!
|
|
2849
|
+
if (!N || !J(e))
|
|
2850
2850
|
return;
|
|
2851
|
-
const x =
|
|
2852
|
-
let
|
|
2853
|
-
(g === "x" || g === "both") && (C.x = _.x +
|
|
2851
|
+
const x = L.type === "touchmove" && L.touches.length > 0 ? L.touches[0] : L;
|
|
2852
|
+
let M = x.clientX - N.x, f = x.clientY - N.y;
|
|
2853
|
+
(g === "x" || g === "both") && (C.x = _.x + M), (g === "y" || g === "both") && (C.y = _.y + f), (w = l.onMove) == null || w.call(l, C, L), u(L), c(C);
|
|
2854
2854
|
}
|
|
2855
|
-
function D(
|
|
2855
|
+
function D(L) {
|
|
2856
2856
|
var E;
|
|
2857
2857
|
document.documentElement.style.cursor = "", d.forEach((T) => {
|
|
2858
2858
|
T();
|
|
2859
|
-
}), d.length = 0, (E = l.onEnd) == null || E.call(l, C,
|
|
2859
|
+
}), d.length = 0, (E = l.onEnd) == null || E.call(l, C, L), u(L);
|
|
2860
2860
|
}
|
|
2861
|
-
function c(
|
|
2861
|
+
function c(L) {
|
|
2862
2862
|
const E = J(e);
|
|
2863
2863
|
if (!E)
|
|
2864
2864
|
return;
|
|
2865
2865
|
const T = E.$el;
|
|
2866
|
-
T.style.left = `${
|
|
2866
|
+
T.style.left = `${L.x}px`, T.style.top = `${L.y}px`;
|
|
2867
2867
|
}
|
|
2868
2868
|
function y() {
|
|
2869
2869
|
if (J(h))
|
|
2870
2870
|
return;
|
|
2871
|
-
const
|
|
2872
|
-
if (!
|
|
2871
|
+
const L = J(t);
|
|
2872
|
+
if (!L)
|
|
2873
2873
|
return;
|
|
2874
|
-
const E =
|
|
2874
|
+
const E = L.$el;
|
|
2875
2875
|
E.style.cursor = "move", $.push(me(E, "mousedown", r, I)), $.push(me(E, "touchstart", r, I)), h.value = !0;
|
|
2876
2876
|
}
|
|
2877
2877
|
function S() {
|
|
2878
2878
|
if (!J(h))
|
|
2879
2879
|
return;
|
|
2880
|
-
const
|
|
2881
|
-
if (!
|
|
2880
|
+
const L = J(t);
|
|
2881
|
+
if (!L)
|
|
2882
2882
|
return;
|
|
2883
|
-
const E =
|
|
2883
|
+
const E = L.$el;
|
|
2884
2884
|
E.style.cursor = "", $.forEach((T) => {
|
|
2885
2885
|
T();
|
|
2886
2886
|
}), $.length = 0, h.value = !1;
|
|
@@ -2893,13 +2893,13 @@ function xn(e, t, l = {}) {
|
|
|
2893
2893
|
}
|
|
2894
2894
|
const Tn = ["t", "r", "b", "l", "tr", "br", "bl", "tl"];
|
|
2895
2895
|
function _n(e, t = {}) {
|
|
2896
|
-
let l, A = t.handleWidth ?? 12, s = t.handleZIndex ?? 100, g = t.minWidth ?? 0, I = t.maxWidth ?? Number.MAX_SAFE_INTEGER, C = t.minHeight ?? 0, _ = t.maxHeight ?? Number.MAX_SAFE_INTEGER,
|
|
2896
|
+
let l, A = t.handleWidth ?? 12, s = t.handleZIndex ?? 100, g = t.minWidth ?? 0, I = t.maxWidth ?? Number.MAX_SAFE_INTEGER, C = t.minHeight ?? 0, _ = t.maxHeight ?? Number.MAX_SAFE_INTEGER, N = t.preventDefault ?? !1, $ = t.stopPropagation ?? !1, d, h = [];
|
|
2897
2897
|
const u = z(!1);
|
|
2898
2898
|
let r = [], b = [];
|
|
2899
2899
|
const D = z(!1), c = z({ x: 0, y: 0 });
|
|
2900
2900
|
let y = { left: 0, top: 0, height: 0, width: 0, position: "absolute" }, S = {};
|
|
2901
|
-
function
|
|
2902
|
-
Ee(
|
|
2901
|
+
function L(G) {
|
|
2902
|
+
Ee(N) && G.preventDefault(), Ee($) && G.stopPropagation();
|
|
2903
2903
|
}
|
|
2904
2904
|
function E(G, Y) {
|
|
2905
2905
|
h = Y.map(x), h.forEach((H) => G.$el.appendChild(H));
|
|
@@ -2911,7 +2911,7 @@ function _n(e, t = {}) {
|
|
|
2911
2911
|
const Y = A + "px", H = -A / 2 + "px", ie = s + 1, Z = document.createElement("div");
|
|
2912
2912
|
return Z.dataset.handle = G, Z.style.position = "absolute", Z.style.touchAction = "none", Z.style.userSelect = "none", Z.style.zIndex = (G.length === 1 ? s : ie).toString(), Z.style.cursor = j(G), G.includes("t") && (Z.style.top = H, Z.style.height = Y, G === "t" && (Z.style.left = "0", Z.style.width = "100%")), G.includes("b") && (Z.style.bottom = H, Z.style.height = Y, G === "b" && (Z.style.left = "0", Z.style.width = "100%")), G.includes("r") && (Z.style.right = H, Z.style.width = Y, G === "r" && (Z.style.top = "0", Z.style.height = "100%")), G.includes("l") && (Z.style.left = H, Z.style.width = Y, G === "l" && (Z.style.top = "0", Z.style.height = "100%")), Z;
|
|
2913
2913
|
}
|
|
2914
|
-
function
|
|
2914
|
+
function M(G) {
|
|
2915
2915
|
var ne;
|
|
2916
2916
|
if (!h.some((ce) => ce == G.target))
|
|
2917
2917
|
return;
|
|
@@ -2924,10 +2924,10 @@ function _n(e, t = {}) {
|
|
|
2924
2924
|
top: H.offsetTop,
|
|
2925
2925
|
height: parseInt(window.getComputedStyle(H).getPropertyValue("height")),
|
|
2926
2926
|
width: parseInt(window.getComputedStyle(H).getPropertyValue("width"))
|
|
2927
|
-
}, S =
|
|
2927
|
+
}, S = Lr(y), ((ne = t.onStart) == null ? void 0 : ne.call(t, c.value, G)) === !1)
|
|
2928
2928
|
return;
|
|
2929
2929
|
let W = G.target;
|
|
2930
|
-
document.documentElement.style.cursor = j(W.dataset.handle), d = W.dataset.handle, b.push(me("mousemove", f)), b.push(me("mouseup", w)), b.push(me("touchmove", f)), b.push(me("touchend", w)),
|
|
2930
|
+
document.documentElement.style.cursor = j(W.dataset.handle), d = W.dataset.handle, b.push(me("mousemove", f)), b.push(me("mouseup", w)), b.push(me("touchmove", f)), b.push(me("touchend", w)), L(G);
|
|
2931
2931
|
}
|
|
2932
2932
|
function f(G) {
|
|
2933
2933
|
const Y = Ee(e);
|
|
@@ -2952,7 +2952,7 @@ function _n(e, t = {}) {
|
|
|
2952
2952
|
const se = Math.min(I, Math.max(g, (ce.width ?? 0) + W));
|
|
2953
2953
|
S.width = se;
|
|
2954
2954
|
}
|
|
2955
|
-
H.dispatchEvent(new CustomEvent("resize")),
|
|
2955
|
+
H.dispatchEvent(new CustomEvent("resize")), L(G), re(S);
|
|
2956
2956
|
}
|
|
2957
2957
|
function w() {
|
|
2958
2958
|
document.documentElement.style.cursor = "", d = null, b.forEach((G) => {
|
|
@@ -3026,7 +3026,7 @@ function _n(e, t = {}) {
|
|
|
3026
3026
|
if (D.value)
|
|
3027
3027
|
return;
|
|
3028
3028
|
const H = Ee(e);
|
|
3029
|
-
H && (E(H, G ?? Tn), X(Y), r.push(me(H.$el, "mousedown",
|
|
3029
|
+
H && (E(H, G ?? Tn), X(Y), r.push(me(H.$el, "mousedown", M)), r.push(me(H.$el, "touchstart", M)), D.value = !0, l = Y);
|
|
3030
3030
|
}
|
|
3031
3031
|
function be(G) {
|
|
3032
3032
|
if (!D.value)
|
|
@@ -3043,13 +3043,13 @@ function _n(e, t = {}) {
|
|
|
3043
3043
|
};
|
|
3044
3044
|
}
|
|
3045
3045
|
function Cn(e) {
|
|
3046
|
-
const t = (e == null ? void 0 : e.blade) ?? z(null), l = (e == null ? void 0 : e.handle) ?? z(null), A = z(!1), s = (e == null ? void 0 : e.mobileBreakpoint) ?? 500, g = z((e == null ? void 0 : e.defaultVariant) ?? "page"), I = z({}), { turnResizingOff: C, turnResizingOn: _ } = _n(t), { turnDraggableOff:
|
|
3046
|
+
const t = (e == null ? void 0 : e.blade) ?? z(null), l = (e == null ? void 0 : e.handle) ?? z(null), A = z(!1), s = (e == null ? void 0 : e.mobileBreakpoint) ?? 500, g = z((e == null ? void 0 : e.defaultVariant) ?? "page"), I = z({}), { turnResizingOff: C, turnResizingOn: _ } = _n(t), { turnDraggableOff: N, turnDraggableOn: $ } = xn(t, l);
|
|
3047
3047
|
jt(t, (h) => {
|
|
3048
3048
|
const u = h[0], { width: r } = u.contentRect;
|
|
3049
3049
|
A.value = r < s;
|
|
3050
3050
|
});
|
|
3051
3051
|
function d(h) {
|
|
3052
|
-
|
|
3052
|
+
N(), h == "page" ? C(h) : h == "blade" ? _(["l", "r"], h) : h == "freestyle" ? (C(), _(void 0, h), $()) : h == "inline" && C();
|
|
3053
3053
|
}
|
|
3054
3054
|
return d(g.value), Te(g, (h) => d(h)), {
|
|
3055
3055
|
isMobile: A,
|
|
@@ -3137,7 +3137,7 @@ function Pn(e) {
|
|
|
3137
3137
|
function _() {
|
|
3138
3138
|
t.value.drawerStick = !t.value.drawerStick;
|
|
3139
3139
|
}
|
|
3140
|
-
function
|
|
3140
|
+
function N() {
|
|
3141
3141
|
t.value.theme = t.value.theme == "dark" ? "light" : "dark", l != null && (l.global.name.value = t.value.theme);
|
|
3142
3142
|
}
|
|
3143
3143
|
function $() {
|
|
@@ -3155,14 +3155,14 @@ function Pn(e) {
|
|
|
3155
3155
|
setTemporaryColor: I,
|
|
3156
3156
|
toggleDrawer: C,
|
|
3157
3157
|
toggleDrawerStick: _,
|
|
3158
|
-
toggleLightDark:
|
|
3158
|
+
toggleLightDark: N,
|
|
3159
3159
|
undoTemporaryColor: $
|
|
3160
3160
|
}, Dr;
|
|
3161
3161
|
}
|
|
3162
3162
|
const wa = {
|
|
3163
3163
|
canExportCSV: !1
|
|
3164
3164
|
};
|
|
3165
|
-
function
|
|
3165
|
+
function Nn() {
|
|
3166
3166
|
function e(t) {
|
|
3167
3167
|
const {
|
|
3168
3168
|
items: l,
|
|
@@ -3181,15 +3181,15 @@ function Mn() {
|
|
|
3181
3181
|
var C = [];
|
|
3182
3182
|
for (let D = 0; D < l.length; D++) {
|
|
3183
3183
|
const c = l[D];
|
|
3184
|
-
var _ = {},
|
|
3184
|
+
var _ = {}, N = [];
|
|
3185
3185
|
for (let y = 0; y < I.length; y++) {
|
|
3186
3186
|
const S = I[y];
|
|
3187
3187
|
var $ = null;
|
|
3188
3188
|
typeof S.value == "function" ? $ = S.value(c) : typeof S.value == "string" && ($ = Sr(c, S.value)), S.itemText != null ? _[S.header] = Sr($, S.itemText) : _[S.header] = $;
|
|
3189
3189
|
}
|
|
3190
|
-
C.push(_), _e(
|
|
3190
|
+
C.push(_), _e(N) && N.forEach((y) => {
|
|
3191
3191
|
C.push(y);
|
|
3192
|
-
}),
|
|
3192
|
+
}), N = [];
|
|
3193
3193
|
}
|
|
3194
3194
|
var d = [];
|
|
3195
3195
|
if (d.push(I.map((D) => D.header).toString()), C.forEach((D) => {
|
|
@@ -3219,7 +3219,7 @@ let xr;
|
|
|
3219
3219
|
function ba() {
|
|
3220
3220
|
return xr;
|
|
3221
3221
|
}
|
|
3222
|
-
function
|
|
3222
|
+
function Mn(e) {
|
|
3223
3223
|
const t = e.getUTC ?? he.utc;
|
|
3224
3224
|
function l() {
|
|
3225
3225
|
return s().startOf("day").toUTC().toString() ?? "";
|
|
@@ -3227,28 +3227,28 @@ function Ln(e) {
|
|
|
3227
3227
|
function A() {
|
|
3228
3228
|
return s().startOf("day").plus({ day: 1 }).toUTC().toString() ?? "";
|
|
3229
3229
|
}
|
|
3230
|
-
function s(_,
|
|
3231
|
-
return _ == null ? t().setZone(e.getTimeZone()) :
|
|
3230
|
+
function s(_, N) {
|
|
3231
|
+
return _ == null ? t().setZone(e.getTimeZone()) : N ? he.fromFormat(_, N, { zone: e.getTimeZone() }) : he.fromISO(_, { zone: e.getTimeZone() });
|
|
3232
3232
|
}
|
|
3233
|
-
function g(_,
|
|
3233
|
+
function g(_, N, $) {
|
|
3234
3234
|
if (_ == null) {
|
|
3235
3235
|
const h = t().setZone(e.getTimeZone());
|
|
3236
|
-
return
|
|
3236
|
+
return N ? h.toFormat(N) : h.toString();
|
|
3237
3237
|
}
|
|
3238
3238
|
if (_ == "Invalid DateTime")
|
|
3239
3239
|
return "";
|
|
3240
3240
|
const d = $ ? he.fromFormat(_, $, { zone: e.getTimeZone() }) : he.fromISO(_, { zone: e.getTimeZone() });
|
|
3241
|
-
return
|
|
3241
|
+
return N ? d.toFormat(N) : d == null ? void 0 : d.toString();
|
|
3242
3242
|
}
|
|
3243
|
-
function I(_,
|
|
3244
|
-
return _ == null ? t() :
|
|
3243
|
+
function I(_, N) {
|
|
3244
|
+
return _ == null ? t() : N ? he.fromFormat(_, N) : he.fromISO(_);
|
|
3245
3245
|
}
|
|
3246
|
-
function C(_,
|
|
3246
|
+
function C(_, N, $) {
|
|
3247
3247
|
if (_ == null)
|
|
3248
|
-
return
|
|
3248
|
+
return N ? t().toFormat(N) : t().toString();
|
|
3249
3249
|
{
|
|
3250
3250
|
const d = $ ? he.fromFormat(_, $) : he.fromISO(_);
|
|
3251
|
-
return
|
|
3251
|
+
return N ? d.toFormat(N) : d.toString();
|
|
3252
3252
|
}
|
|
3253
3253
|
}
|
|
3254
3254
|
return xr = {
|
|
@@ -3264,7 +3264,7 @@ let Tr;
|
|
|
3264
3264
|
function Sa() {
|
|
3265
3265
|
return Tr;
|
|
3266
3266
|
}
|
|
3267
|
-
function
|
|
3267
|
+
function Ln(e) {
|
|
3268
3268
|
const t = z(!1), l = (e == null ? void 0 : e.apis) ?? [];
|
|
3269
3269
|
function A() {
|
|
3270
3270
|
t.value = !0;
|
|
@@ -3324,7 +3324,7 @@ function Nn(e) {
|
|
|
3324
3324
|
});
|
|
3325
3325
|
});
|
|
3326
3326
|
}
|
|
3327
|
-
function
|
|
3327
|
+
function N(d) {
|
|
3328
3328
|
var r, b;
|
|
3329
3329
|
if (l == null)
|
|
3330
3330
|
throw new Error("no demo data available for this api");
|
|
@@ -3368,7 +3368,7 @@ function Nn(e) {
|
|
|
3368
3368
|
deleteItem: I,
|
|
3369
3369
|
get: C,
|
|
3370
3370
|
getAll: _,
|
|
3371
|
-
post:
|
|
3371
|
+
post: N,
|
|
3372
3372
|
patch: $
|
|
3373
3373
|
}, Tr;
|
|
3374
3374
|
}
|
|
@@ -3430,7 +3430,7 @@ function Un(e) {
|
|
|
3430
3430
|
function _(f, w) {
|
|
3431
3431
|
return t(f, "ccc dd LLL @ hh:mm a", w);
|
|
3432
3432
|
}
|
|
3433
|
-
function
|
|
3433
|
+
function N(f) {
|
|
3434
3434
|
return new Intl.NumberFormat().format(f);
|
|
3435
3435
|
}
|
|
3436
3436
|
function $(f) {
|
|
@@ -3475,7 +3475,7 @@ function Un(e) {
|
|
|
3475
3475
|
function S(f, w) {
|
|
3476
3476
|
return t(f, "dd LLL yyyy", w);
|
|
3477
3477
|
}
|
|
3478
|
-
function
|
|
3478
|
+
function L(f, w) {
|
|
3479
3479
|
return t(f, "dd LLL yyyy hh:mm a", w);
|
|
3480
3480
|
}
|
|
3481
3481
|
function E(f, w) {
|
|
@@ -3492,7 +3492,7 @@ function Un(e) {
|
|
|
3492
3492
|
toDayOfWeek: I,
|
|
3493
3493
|
toDayShortDate: C,
|
|
3494
3494
|
toDayShortDateAndTime: _,
|
|
3495
|
-
toDisplayNumber:
|
|
3495
|
+
toDisplayNumber: N,
|
|
3496
3496
|
toDisplayNumberOver: $,
|
|
3497
3497
|
toDisplayNumberSigned: d,
|
|
3498
3498
|
toFormat: h,
|
|
@@ -3503,11 +3503,11 @@ function Un(e) {
|
|
|
3503
3503
|
toPercent: c,
|
|
3504
3504
|
toPrettyCSV: y,
|
|
3505
3505
|
toShortDate: S,
|
|
3506
|
-
toShortDateAndTime:
|
|
3506
|
+
toShortDateAndTime: L,
|
|
3507
3507
|
toTime: E,
|
|
3508
3508
|
toTimeOfDay: T
|
|
3509
3509
|
};
|
|
3510
|
-
function
|
|
3510
|
+
function M(f) {
|
|
3511
3511
|
if (f != null) {
|
|
3512
3512
|
let w = f;
|
|
3513
3513
|
if (w != null && x[w] != null)
|
|
@@ -3516,7 +3516,7 @@ function Un(e) {
|
|
|
3516
3516
|
return (w) => w;
|
|
3517
3517
|
}
|
|
3518
3518
|
return _r = {
|
|
3519
|
-
findFilter:
|
|
3519
|
+
findFilter: M,
|
|
3520
3520
|
...x
|
|
3521
3521
|
}, _r;
|
|
3522
3522
|
}
|
|
@@ -3527,9 +3527,9 @@ function Bn(e, t) {
|
|
|
3527
3527
|
l.value = g(C) != s;
|
|
3528
3528
|
}, { deep: !0 });
|
|
3529
3529
|
function g(C) {
|
|
3530
|
-
const _ =
|
|
3531
|
-
return t != null && (t.propsToIgnore != null ? t.propsToIgnore.forEach((
|
|
3532
|
-
delete _[
|
|
3530
|
+
const _ = Lr(C);
|
|
3531
|
+
return t != null && (t.propsToIgnore != null ? t.propsToIgnore.forEach((N) => {
|
|
3532
|
+
delete _[N];
|
|
3533
3533
|
}) : t.propsToTrack != null && Object.keys(C).forEach(($) => {
|
|
3534
3534
|
t.propsToTrack.some((d) => d == $) || delete _[$];
|
|
3535
3535
|
})), JSON.stringify(_);
|
|
@@ -3548,19 +3548,19 @@ function Ia(e, t) {
|
|
|
3548
3548
|
const {
|
|
3549
3549
|
// useBladeSrc = true,
|
|
3550
3550
|
useRouteSrc: l = !0
|
|
3551
|
-
} = t ?? {}, A = e.storeMode ?? (t == null ? void 0 : t.storeMode), s = e.storageMode ?? (t == null ? void 0 : t.storageMode), g = e.nav ?? e.bladeName ?? "basic", I =
|
|
3551
|
+
} = t ?? {}, A = e.storeMode ?? (t == null ? void 0 : t.storeMode), s = e.storageMode ?? (t == null ? void 0 : t.storageMode), g = e.nav ?? e.bladeName ?? "basic", I = Mr(), C = et(), _ = J(e.proxyQueryKey), N = ee(() => {
|
|
3552
3552
|
var W;
|
|
3553
3553
|
return J(e.proxyID) ?? (_ != null ? (W = C == null ? void 0 : C.query) == null ? void 0 : W[_] : void 0);
|
|
3554
3554
|
}), $ = z(void 0), { actionErrorMsg: d, actionLoadingMsg: h, deleteItem: u, getItem: r, getAllItems: b, restoreItem: D, saveItem: c } = ut({
|
|
3555
3555
|
nav: g,
|
|
3556
3556
|
onError: e.onError ?? (t == null ? void 0 : t.onError),
|
|
3557
|
-
proxyID:
|
|
3558
|
-
store:
|
|
3557
|
+
proxyID: N.value,
|
|
3558
|
+
store: Me({
|
|
3559
3559
|
storeMode: A,
|
|
3560
3560
|
storageMode: s,
|
|
3561
3561
|
nav: g
|
|
3562
3562
|
})
|
|
3563
|
-
}), y = ee(() => e.errorMsg ?? d.value), S = ee(() => e.loadingMsg ?? h.value),
|
|
3563
|
+
}), y = ee(() => e.errorMsg ?? d.value), S = ee(() => e.loadingMsg ?? h.value), L = ee(() => S.value != null), E = z(e.itemID ?? (l ? (Z = C == null ? void 0 : C.params) == null ? void 0 : Z.id : void 0)), T = z(E.value == "new" ? "new" : e.startEditing ? "edit" : "view"), x = Le(!1), M = ee(() => {
|
|
3564
3564
|
let W = e.params != null ? { ...e.params } : {};
|
|
3565
3565
|
return e.includeDetails != null && (W.includeDetails = e.includeDetails), W;
|
|
3566
3566
|
}), f = ee(() => {
|
|
@@ -3631,8 +3631,8 @@ function Ia(e, t) {
|
|
|
3631
3631
|
additionalUrl: e.additionalUrl,
|
|
3632
3632
|
id: E.value,
|
|
3633
3633
|
nav: g,
|
|
3634
|
-
proxyID:
|
|
3635
|
-
params:
|
|
3634
|
+
proxyID: N.value,
|
|
3635
|
+
params: M.value,
|
|
3636
3636
|
//props.params,
|
|
3637
3637
|
// ...(useBladeSrc ? bladeData.value : {}),
|
|
3638
3638
|
refresh: (W == null ? void 0 : W.deepRefresh) ?? !1,
|
|
@@ -3664,7 +3664,7 @@ function Ia(e, t) {
|
|
|
3664
3664
|
onGetSaveAsync: ge,
|
|
3665
3665
|
onSaveAsync: Be,
|
|
3666
3666
|
onSaveSuccessAsync: $e,
|
|
3667
|
-
proxyID:
|
|
3667
|
+
proxyID: N.value,
|
|
3668
3668
|
// ...params.getOptions(),
|
|
3669
3669
|
// ...(useBladeSrc ? bladeData.value : {}),
|
|
3670
3670
|
mode: T.value
|
|
@@ -3689,7 +3689,7 @@ function Ia(e, t) {
|
|
|
3689
3689
|
isDeletable: f,
|
|
3690
3690
|
isEditing: ee(() => T.value == "new" || T.value == "edit"),
|
|
3691
3691
|
isEditable: w,
|
|
3692
|
-
isLoading:
|
|
3692
|
+
isLoading: L,
|
|
3693
3693
|
isNew: ee(() => T.value == "new"),
|
|
3694
3694
|
isRestorable: j,
|
|
3695
3695
|
isSaveable: X,
|
|
@@ -3748,7 +3748,7 @@ function $n(e) {
|
|
|
3748
3748
|
let r = gn(u.microservice ?? "default") ?? "";
|
|
3749
3749
|
return u.path != null && (r = Ue(r, u.path)), r != null && r.endsWith("/") && (r = r.slice(0, r.length - 1)), r;
|
|
3750
3750
|
}
|
|
3751
|
-
function
|
|
3751
|
+
function N(h) {
|
|
3752
3752
|
const u = C(h);
|
|
3753
3753
|
if ((u == null ? void 0 : u.singleName) != null)
|
|
3754
3754
|
return u.singleName;
|
|
@@ -3781,27 +3781,27 @@ function $n(e) {
|
|
|
3781
3781
|
findItem: C,
|
|
3782
3782
|
findStoreName: $,
|
|
3783
3783
|
findPath: _,
|
|
3784
|
-
findSingleDisplay:
|
|
3784
|
+
findSingleDisplay: N,
|
|
3785
3785
|
updateNavigationProperties: d
|
|
3786
3786
|
}, Cr;
|
|
3787
3787
|
}
|
|
3788
3788
|
function Da(e, t, l) {
|
|
3789
3789
|
var He, Ve;
|
|
3790
|
-
const A =
|
|
3790
|
+
const A = Nn(), s = it(), g = Mr(), I = et(), { bladeData: C } = Cn({}), _ = e.useBladeSrc ?? !0, N = e.useRouteSrc ?? !0, $ = e.nav ?? e.bladeName ?? e.itemBladeName ?? "basic", d = e.storeMode ?? ((He = s.findItem($)) == null ? void 0 : He.storeMode), h = e.storageMode ?? ((Ve = s.findItem($)) == null ? void 0 : Ve.storageMode), u = J(e.customFilters) ?? [], r = z([]), b = ee(() => Kt([
|
|
3791
3791
|
...u.filter((U) => U.name != null).map((U) => U.name),
|
|
3792
3792
|
...e.defaultFilters ?? [],
|
|
3793
3793
|
...r.value
|
|
3794
3794
|
]).value), D = z((e.defaultFilters ?? []).map((U) => b.value.indexOf(U)));
|
|
3795
3795
|
let c = z([...D.value]);
|
|
3796
|
-
const y = ee(() => Gr(c, D).value.length > 0 || Gr(D, c).value.length > 0), S = z(
|
|
3797
|
-
function
|
|
3796
|
+
const y = ee(() => Gr(c, D).value.length > 0 || Gr(D, c).value.length > 0), S = z(L());
|
|
3797
|
+
function L() {
|
|
3798
3798
|
var U, Q;
|
|
3799
3799
|
if (_) {
|
|
3800
3800
|
const V = (U = C.value) == null ? void 0 : U.page;
|
|
3801
3801
|
if (V != null)
|
|
3802
3802
|
return Number.parseInt(V);
|
|
3803
3803
|
}
|
|
3804
|
-
if (
|
|
3804
|
+
if (N) {
|
|
3805
3805
|
const V = (Q = I == null ? void 0 : I.query) == null ? void 0 : Q.page;
|
|
3806
3806
|
if (V != null)
|
|
3807
3807
|
return Number.parseInt(typeof V == "string" ? V : V.toString());
|
|
@@ -3815,7 +3815,7 @@ function Da(e, t, l) {
|
|
|
3815
3815
|
if (V != null)
|
|
3816
3816
|
return V;
|
|
3817
3817
|
}
|
|
3818
|
-
if (
|
|
3818
|
+
if (N) {
|
|
3819
3819
|
const V = (Q = I == null ? void 0 : I.query) == null ? void 0 : Q.query;
|
|
3820
3820
|
if (V != null)
|
|
3821
3821
|
return V;
|
|
@@ -3829,27 +3829,27 @@ function Da(e, t, l) {
|
|
|
3829
3829
|
if (V != null)
|
|
3830
3830
|
return V;
|
|
3831
3831
|
}
|
|
3832
|
-
if (
|
|
3832
|
+
if (N) {
|
|
3833
3833
|
const V = (Q = I == null ? void 0 : I.query) == null ? void 0 : Q.search;
|
|
3834
3834
|
if (V != null)
|
|
3835
3835
|
return V;
|
|
3836
3836
|
}
|
|
3837
3837
|
}
|
|
3838
|
-
const
|
|
3838
|
+
const M = z(J(e.startShowingInactive) ?? !1), f = ee(() => [
|
|
3839
3839
|
...e.searchProps ?? [],
|
|
3840
3840
|
...(e.headers ?? []).filter((U) => U.searchable != null && U.value != null).map((U) => U.value ?? "")
|
|
3841
|
-
]), w = z([]), j =
|
|
3841
|
+
]), w = z([]), j = Le([]), X = z([]);
|
|
3842
3842
|
let re;
|
|
3843
3843
|
const { actionErrorMsg: ue, actionLoadingMsg: be, deleteItem: G, doAction: Y, getItem: H, getAllItems: ie, restoreItem: Z } = ut({
|
|
3844
3844
|
nav: $,
|
|
3845
3845
|
onError: e.onError ?? (l == null ? void 0 : l.onError),
|
|
3846
3846
|
proxyID: E.value,
|
|
3847
|
-
store:
|
|
3847
|
+
store: Me({
|
|
3848
3848
|
storeMode: d,
|
|
3849
3849
|
storageMode: h,
|
|
3850
3850
|
nav: $
|
|
3851
3851
|
})
|
|
3852
|
-
}), W = ee(() => e.errorMsg ?? ue.value), ne = ee(() => e.loadingMsg ?? be.value), ce = ee(() => ne.value != null), se =
|
|
3852
|
+
}), W = ee(() => e.errorMsg ?? ue.value), ne = ee(() => e.loadingMsg ?? be.value), ce = ee(() => ne.value != null), se = Le(!1), ge = Le(e.showSearch ?? !0), Be = z(0), $e = ee(() => {
|
|
3853
3853
|
let U, Q = [];
|
|
3854
3854
|
D.value.forEach((O) => {
|
|
3855
3855
|
const de = b.value[O], ye = u.find((De) => De.name == de);
|
|
@@ -3860,8 +3860,8 @@ function Da(e, t, l) {
|
|
|
3860
3860
|
}), Fe = ee(() => {
|
|
3861
3861
|
var Q;
|
|
3862
3862
|
let U = e.params != null ? { ...e.params } : {};
|
|
3863
|
-
return e.useServerPagination && e.itemsPerPage != null && (U.includeCount = !0, U.takeAmount = e.itemsPerPage, U.takeFrom = (S.value - 1) * e.itemsPerPage), $e.value != null && (U = { ...U, ...$e.value }),
|
|
3864
|
-
}), tr = ee(() => (U) => e.onCanDelete != null ? e.onCanDelete(U) : !(U != null && U.isInactive === !0)), nr = ee(() => (U) =>
|
|
3863
|
+
return e.useServerPagination && e.itemsPerPage != null && (U.includeCount = !0, U.takeAmount = e.itemsPerPage, U.takeFrom = (S.value - 1) * e.itemsPerPage), $e.value != null && (U = { ...U, ...$e.value }), M.value && (U.includeInactive = !0), _e(e.selectProps) && (U.properties = (Q = e.selectProps) == null ? void 0 : Q.toString()), T.value != null && (U.searchString = T.value), U;
|
|
3864
|
+
}), tr = ee(() => (U) => e.onCanDelete != null ? e.onCanDelete(U) : !(U != null && U.isInactive === !0)), nr = ee(() => (U) => M.value ? e.onCanRestore != null ? e.onCanRestore(U) : (U == null ? void 0 : U.isInactive) === !0 : !1), Ce = ee(() => X.value.filter((U) => !U.hide)), ar = ee(() => {
|
|
3865
3865
|
let U = new Array();
|
|
3866
3866
|
return Ce.value.filter((V) => V.sublevel != null).forEach((V) => {
|
|
3867
3867
|
let O = U.find((de) => de.position == V.sublevel);
|
|
@@ -3895,14 +3895,14 @@ function Da(e, t, l) {
|
|
|
3895
3895
|
if (De != null) {
|
|
3896
3896
|
let Ae = w.value.findIndex((oe) => oe.id == De);
|
|
3897
3897
|
if (Ae > -1 && w.value.splice(Ae, 1), e.items != null) {
|
|
3898
|
-
let oe = e.items.findIndex((
|
|
3898
|
+
let oe = e.items.findIndex((Ne) => Ne.id == De);
|
|
3899
3899
|
oe > -1 && e.items.splice(oe, 1);
|
|
3900
3900
|
}
|
|
3901
3901
|
} else {
|
|
3902
3902
|
let Ae = w.value.findIndex((oe) => oe === O);
|
|
3903
3903
|
if (Ae == -1 && (Ae = w.value.findIndex((oe) => oe == O)), Ae > -1 && w.value.splice(Ae, 1), e.items != null) {
|
|
3904
|
-
let oe = e.items.findIndex((
|
|
3905
|
-
oe == -1 && (oe = e.items.findIndex((
|
|
3904
|
+
let oe = e.items.findIndex((Ne) => Ne === O);
|
|
3905
|
+
oe == -1 && (oe = e.items.findIndex((Ne) => Ne == O)), oe > -1 && e.items.splice(oe, 1);
|
|
3906
3906
|
}
|
|
3907
3907
|
}
|
|
3908
3908
|
};
|
|
@@ -4004,7 +4004,7 @@ function Da(e, t, l) {
|
|
|
4004
4004
|
}
|
|
4005
4005
|
return qe(), Qt([T], () => {
|
|
4006
4006
|
Pe();
|
|
4007
|
-
}, { debounce: 500, maxWait: 500 }), Te([
|
|
4007
|
+
}, { debounce: 500, maxWait: 500 }), Te([M, S], async () => {
|
|
4008
4008
|
await Ie();
|
|
4009
4009
|
}), Te([W, () => e.errorMsg], ([U, Q]) => {
|
|
4010
4010
|
se.value = U != null || Q != null;
|
|
@@ -4038,7 +4038,7 @@ function Da(e, t, l) {
|
|
|
4038
4038
|
selectItem: je,
|
|
4039
4039
|
// serverFilters,
|
|
4040
4040
|
showError: se,
|
|
4041
|
-
showInactive:
|
|
4041
|
+
showInactive: M,
|
|
4042
4042
|
showSearch: ge,
|
|
4043
4043
|
subtitleOptions: ar,
|
|
4044
4044
|
tableHeaders: Ce,
|
|
@@ -4057,7 +4057,7 @@ function Fn(e) {
|
|
|
4057
4057
|
}, We;
|
|
4058
4058
|
}
|
|
4059
4059
|
function xa() {
|
|
4060
|
-
const e =
|
|
4060
|
+
const e = Mr(), t = it(), l = In();
|
|
4061
4061
|
let A = e.getRoutes();
|
|
4062
4062
|
return {
|
|
4063
4063
|
...We,
|
|
@@ -4067,20 +4067,20 @@ function xa() {
|
|
|
4067
4067
|
const s = [];
|
|
4068
4068
|
return A.forEach((I) => {
|
|
4069
4069
|
var d;
|
|
4070
|
-
const C = We.groupOptions.value.find((h) => h.displayName == I.meta.menuGroup), _ = t.findItem(I.meta.nav),
|
|
4071
|
-
let $ = s.find((h) => h.displayName ==
|
|
4070
|
+
const C = We.groupOptions.value.find((h) => h.displayName == I.meta.menuGroup), _ = t.findItem(I.meta.nav), N = I.meta;
|
|
4071
|
+
let $ = s.find((h) => h.displayName == N.menuGroup);
|
|
4072
4072
|
$ == null && ($ = {
|
|
4073
|
-
displayName:
|
|
4074
|
-
icon: (C == null ? void 0 : C.icon) ?? (
|
|
4073
|
+
displayName: N.menuGroup,
|
|
4074
|
+
icon: (C == null ? void 0 : C.icon) ?? (N == null ? void 0 : N.icon) ?? (_ == null ? void 0 : _.icon),
|
|
4075
4075
|
isGroup: !0,
|
|
4076
4076
|
items: []
|
|
4077
4077
|
}, s.push($)), (d = $.items) == null || d.push({
|
|
4078
|
-
displayName: (
|
|
4079
|
-
icon: (
|
|
4080
|
-
permissions: (
|
|
4081
|
-
requiresAuth: (
|
|
4082
|
-
subscriptions: (
|
|
4083
|
-
subFilters: (
|
|
4078
|
+
displayName: (N == null ? void 0 : N.displayName) ?? t.findDisplay(_ ?? void 0),
|
|
4079
|
+
icon: (N == null ? void 0 : N.icon) ?? t.findIcon(_ ?? void 0),
|
|
4080
|
+
permissions: (N == null ? void 0 : N.permissions) ?? (_ == null ? void 0 : _.permissions) ?? [],
|
|
4081
|
+
requiresAuth: (N == null ? void 0 : N.requiresAuth) !== !1,
|
|
4082
|
+
subscriptions: (N == null ? void 0 : N.subscriptions) ?? (_ == null ? void 0 : _.subscriptions) ?? [],
|
|
4083
|
+
subFilters: (N == null ? void 0 : N.subFilters) ?? (_ == null ? void 0 : _.subFilters) ?? [],
|
|
4084
4084
|
routeName: I.name
|
|
4085
4085
|
});
|
|
4086
4086
|
}), s.forEach((I) => {
|
|
@@ -4107,9 +4107,9 @@ function kn(e) {
|
|
|
4107
4107
|
}
|
|
4108
4108
|
let Zr, Jr, jr, Kr = !1;
|
|
4109
4109
|
const wr = z(!1), br = z(!1), Qr = z(), er = z();
|
|
4110
|
-
let
|
|
4110
|
+
let Nr;
|
|
4111
4111
|
function _a() {
|
|
4112
|
-
return
|
|
4112
|
+
return Nr;
|
|
4113
4113
|
}
|
|
4114
4114
|
function Gn() {
|
|
4115
4115
|
function e(I) {
|
|
@@ -4133,13 +4133,13 @@ function Gn() {
|
|
|
4133
4133
|
}
|
|
4134
4134
|
return Xt(() => {
|
|
4135
4135
|
Zr == null && (Zr = document.addEventListener("swUpdated", e, { once: !0 })), Jr == null && (Jr = navigator.serviceWorker.addEventListener("controllerchange", t)), jr == null && (jr = window.addEventListener("beforeinstallprompt", s));
|
|
4136
|
-
}),
|
|
4136
|
+
}), Nr = {
|
|
4137
4137
|
canInstallApp: wr,
|
|
4138
4138
|
canUpdateApp: br,
|
|
4139
4139
|
installApp: l,
|
|
4140
4140
|
isInstalled: A,
|
|
4141
4141
|
updateApp: g
|
|
4142
|
-
},
|
|
4142
|
+
}, Nr;
|
|
4143
4143
|
}
|
|
4144
4144
|
function Ca(e) {
|
|
4145
4145
|
const t = [];
|
|
@@ -4150,7 +4150,7 @@ function Pa(e) {
|
|
|
4150
4150
|
install(t, l) {
|
|
4151
4151
|
var _;
|
|
4152
4152
|
console.log(t), e.vuetifyInstance ?? (e.vuetifyInstance = l.vuetifyInstance), yn(e.urls), Pn(e);
|
|
4153
|
-
const A =
|
|
4153
|
+
const A = Ln(), s = $n(e);
|
|
4154
4154
|
kn(e), (_ = e.auth).demo ?? (_.demo = A), e.auth.getAuthItem = s.findItem;
|
|
4155
4155
|
const g = Dn(e.auth);
|
|
4156
4156
|
Fn(e.menu);
|
|
@@ -4158,7 +4158,7 @@ function Pa(e) {
|
|
|
4158
4158
|
auth: g,
|
|
4159
4159
|
findPath: s.findPath,
|
|
4160
4160
|
useBearerToken: !0
|
|
4161
|
-
}), C =
|
|
4161
|
+
}), C = Mn({
|
|
4162
4162
|
getTimeZone: () => g.timeZone.value
|
|
4163
4163
|
});
|
|
4164
4164
|
Un({
|
|
@@ -4179,14 +4179,14 @@ export {
|
|
|
4179
4179
|
On as checkImage,
|
|
4180
4180
|
fn as containsSearch,
|
|
4181
4181
|
na as containsWeekday,
|
|
4182
|
-
|
|
4182
|
+
Lr as copyDeep,
|
|
4183
4183
|
cn as copyItemByAlphabet,
|
|
4184
4184
|
En as createApi,
|
|
4185
4185
|
Dn as createAuth,
|
|
4186
4186
|
Pa as createCore,
|
|
4187
4187
|
Pn as createCosmetics,
|
|
4188
|
-
|
|
4189
|
-
|
|
4188
|
+
Mn as createDates,
|
|
4189
|
+
Ln as createDemo,
|
|
4190
4190
|
Un as createFilters,
|
|
4191
4191
|
Fn as createMenu,
|
|
4192
4192
|
$n as createNavigation,
|
|
@@ -4230,7 +4230,7 @@ export {
|
|
|
4230
4230
|
In as useAuth,
|
|
4231
4231
|
Wr as useAuthUrl,
|
|
4232
4232
|
Cn as useBlade,
|
|
4233
|
-
|
|
4233
|
+
Nn as useCSV,
|
|
4234
4234
|
ga as useCosmetics,
|
|
4235
4235
|
gn as useDataUrl,
|
|
4236
4236
|
ba as useDates,
|
|
@@ -4252,7 +4252,7 @@ export {
|
|
|
4252
4252
|
_n as useResizable,
|
|
4253
4253
|
Ca as useRules,
|
|
4254
4254
|
va as useStore,
|
|
4255
|
-
|
|
4255
|
+
Me as useStoreDefinition,
|
|
4256
4256
|
Bn as useTracker,
|
|
4257
4257
|
ha as useUrls,
|
|
4258
4258
|
hn as validEmail,
|