bt-core-app 1.4.102 → 1.4.103
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 +92 -92
- package/package.json +1 -1
package/dist/bt-core-app.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as z, shallowRef as Ne, computed as ee, toValue as
|
|
1
|
+
import { ref as z, shallowRef as Ne, computed as ee, toValue as Q, 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";
|
|
@@ -840,8 +840,8 @@ var nt = { exports: {} };
|
|
|
840
840
|
}).then(function(k) {
|
|
841
841
|
a.db = v.db = k, c._dbInfo = a;
|
|
842
842
|
for (var q = 0; q < F.length; q++) {
|
|
843
|
-
var
|
|
844
|
-
|
|
843
|
+
var j = F[q];
|
|
844
|
+
j !== c && (j._dbInfo.db = a.db, j._dbInfo.version = a.version);
|
|
845
845
|
}
|
|
846
846
|
});
|
|
847
847
|
}
|
|
@@ -880,9 +880,9 @@ var nt = { exports: {} };
|
|
|
880
880
|
F.onsuccess = function() {
|
|
881
881
|
var q = F.result;
|
|
882
882
|
if (q) {
|
|
883
|
-
var
|
|
884
|
-
H(
|
|
885
|
-
var p = n(
|
|
883
|
+
var j = q.value;
|
|
884
|
+
H(j) && (j = Y(j));
|
|
885
|
+
var p = n(j, q.key, k++);
|
|
886
886
|
p !== void 0 ? v(p) : q.continue();
|
|
887
887
|
} else
|
|
888
888
|
v();
|
|
@@ -913,11 +913,11 @@ var nt = { exports: {} };
|
|
|
913
913
|
try {
|
|
914
914
|
var q = k.objectStore(m._dbInfo.storeName);
|
|
915
915
|
B === null && (B = void 0);
|
|
916
|
-
var
|
|
916
|
+
var j = q.put(B, n);
|
|
917
917
|
k.oncomplete = function() {
|
|
918
918
|
B === void 0 && (B = null), o(B);
|
|
919
919
|
}, k.onabort = k.onerror = function() {
|
|
920
|
-
var p =
|
|
920
|
+
var p = j.error ? j.error : j.transaction.error;
|
|
921
921
|
P(p);
|
|
922
922
|
};
|
|
923
923
|
} catch (p) {
|
|
@@ -1075,8 +1075,8 @@ var nt = { exports: {} };
|
|
|
1075
1075
|
var F = E[n.name], k = F.forages;
|
|
1076
1076
|
R.close();
|
|
1077
1077
|
for (var q = 0; q < k.length; q++) {
|
|
1078
|
-
var
|
|
1079
|
-
|
|
1078
|
+
var j = k[q];
|
|
1079
|
+
j._dbInfo.db = null, j._dbInfo.version = B;
|
|
1080
1080
|
}
|
|
1081
1081
|
var p = new d(function(te, fe) {
|
|
1082
1082
|
var ae = _.open(n.name, B);
|
|
@@ -1110,7 +1110,7 @@ var nt = { exports: {} };
|
|
|
1110
1110
|
var q = F[k];
|
|
1111
1111
|
q._dbInfo.db = null;
|
|
1112
1112
|
}
|
|
1113
|
-
var
|
|
1113
|
+
var j = new d(function(p, te) {
|
|
1114
1114
|
var fe = _.deleteDatabase(n.name);
|
|
1115
1115
|
fe.onerror = function() {
|
|
1116
1116
|
var ae = fe.result;
|
|
@@ -1122,7 +1122,7 @@ var nt = { exports: {} };
|
|
|
1122
1122
|
ae && ae.close(), p(ae);
|
|
1123
1123
|
};
|
|
1124
1124
|
});
|
|
1125
|
-
return
|
|
1125
|
+
return j.then(function(p) {
|
|
1126
1126
|
B.db = p;
|
|
1127
1127
|
for (var te = 0; te < F.length; te++) {
|
|
1128
1128
|
var fe = F[te];
|
|
@@ -1153,7 +1153,7 @@ var nt = { exports: {} };
|
|
|
1153
1153
|
function ur() {
|
|
1154
1154
|
return typeof openDatabase == "function";
|
|
1155
1155
|
}
|
|
1156
|
-
var Se = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", ir = "~~local_forage_type~", Je = /^~~local_forage_type~([^~]+)~/, ke = "__lfsc__:", Pe = ke.length, qe = "arbf", Ie = "blob", je = "si08", Ke = "ui08", He = "uic8", Ve = "si16", U = "si32",
|
|
1156
|
+
var Se = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", ir = "~~local_forage_type~", Je = /^~~local_forage_type~([^~]+)~/, ke = "__lfsc__:", Pe = ke.length, qe = "arbf", Ie = "blob", je = "si08", Ke = "ui08", He = "uic8", Ve = "si16", U = "si32", K = "ur16", V = "ui32", O = "fl32", de = "fl64", ye = Pe + qe.length, De = Object.prototype.toString;
|
|
1157
1157
|
function Ae(n) {
|
|
1158
1158
|
var c = n.length * 0.75, a = n.length, m, v = 0, o, P, R, B;
|
|
1159
1159
|
n[n.length - 1] === "=" && (c--, n[n.length - 2] === "=" && c--);
|
|
@@ -1172,7 +1172,7 @@ var nt = { exports: {} };
|
|
|
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;
|
|
1175
|
-
n instanceof ArrayBuffer ? (m = n, v += qe) : (m = n.buffer, a === "[object Int8Array]" ? v += je : a === "[object Uint8Array]" ? v += Ke : a === "[object Uint8ClampedArray]" ? v += He : a === "[object Int16Array]" ? v += Ve : a === "[object Uint16Array]" ? v +=
|
|
1175
|
+
n instanceof ArrayBuffer ? (m = n, v += qe) : (m = n.buffer, a === "[object Int8Array]" ? v += je : a === "[object Uint8Array]" ? v += Ke : a === "[object Uint8ClampedArray]" ? v += He : a === "[object Int16Array]" ? v += Ve : a === "[object Uint16Array]" ? v += K : a === "[object Int32Array]" ? v += U : a === "[object Uint32Array]" ? v += V : a === "[object Float32Array]" ? v += O : a === "[object Float64Array]" ? v += de : c(new Error("Failed to get type for BinaryArray"))), c(v + oe(m));
|
|
1176
1176
|
} else if (a === "[object Blob]") {
|
|
1177
1177
|
var o = new FileReader();
|
|
1178
1178
|
o.onload = function() {
|
|
@@ -1208,7 +1208,7 @@ var nt = { exports: {} };
|
|
|
1208
1208
|
return new Uint8ClampedArray(o);
|
|
1209
1209
|
case Ve:
|
|
1210
1210
|
return new Int16Array(o);
|
|
1211
|
-
case
|
|
1211
|
+
case K:
|
|
1212
1212
|
return new Uint16Array(o);
|
|
1213
1213
|
case U:
|
|
1214
1214
|
return new Int32Array(o);
|
|
@@ -1287,9 +1287,9 @@ var nt = { exports: {} };
|
|
|
1287
1287
|
var P = a._dbInfo;
|
|
1288
1288
|
P.db.transaction(function(R) {
|
|
1289
1289
|
xe(R, P, "SELECT * FROM " + P.storeName, [], function(B, F) {
|
|
1290
|
-
for (var k = F.rows, q = k.length,
|
|
1291
|
-
var p = k.item(
|
|
1292
|
-
if (te && (te = P.serializer.deserialize(te)), te = n(te, p.key,
|
|
1290
|
+
for (var k = F.rows, q = k.length, j = 0; j < q; j++) {
|
|
1291
|
+
var p = k.item(j), te = p.value;
|
|
1292
|
+
if (te && (te = P.serializer.deserialize(te)), te = n(te, p.key, j + 1), te !== void 0) {
|
|
1293
1293
|
v(te);
|
|
1294
1294
|
return;
|
|
1295
1295
|
}
|
|
@@ -1311,19 +1311,19 @@ var nt = { exports: {} };
|
|
|
1311
1311
|
c === void 0 && (c = null);
|
|
1312
1312
|
var B = c, F = v._dbInfo;
|
|
1313
1313
|
F.serializer.serialize(c, function(k, q) {
|
|
1314
|
-
q ? R(q) : F.db.transaction(function(
|
|
1315
|
-
xe(
|
|
1314
|
+
q ? R(q) : F.db.transaction(function(j) {
|
|
1315
|
+
xe(j, F, "INSERT OR REPLACE INTO " + F.storeName + " (key, value) VALUES (?, ?)", [n, k], function() {
|
|
1316
1316
|
P(B);
|
|
1317
1317
|
}, function(p, te) {
|
|
1318
1318
|
R(te);
|
|
1319
1319
|
});
|
|
1320
|
-
}, function(
|
|
1321
|
-
if (
|
|
1320
|
+
}, function(j) {
|
|
1321
|
+
if (j.code === j.QUOTA_ERR) {
|
|
1322
1322
|
if (m > 0) {
|
|
1323
1323
|
P(Ur.apply(v, [n, B, a, m - 1]));
|
|
1324
1324
|
return;
|
|
1325
1325
|
}
|
|
1326
|
-
R(
|
|
1326
|
+
R(j);
|
|
1327
1327
|
}
|
|
1328
1328
|
});
|
|
1329
1329
|
});
|
|
@@ -1456,7 +1456,7 @@ var nt = { exports: {} };
|
|
|
1456
1456
|
});
|
|
1457
1457
|
});
|
|
1458
1458
|
}
|
|
1459
|
-
for (var k = [], q = 0,
|
|
1459
|
+
for (var k = [], q = 0, j = o.storeNames.length; q < j; q++)
|
|
1460
1460
|
k.push(F(o.storeNames[q]));
|
|
1461
1461
|
d.all(k).then(function() {
|
|
1462
1462
|
P();
|
|
@@ -1704,7 +1704,7 @@ var nt = { exports: {} };
|
|
|
1704
1704
|
R(F);
|
|
1705
1705
|
return;
|
|
1706
1706
|
}
|
|
1707
|
-
for (var k = fr.concat("_initStorage"), q = 0,
|
|
1707
|
+
for (var k = fr.concat("_initStorage"), q = 0, j = k.length; q < j; q++) {
|
|
1708
1708
|
var p = k[q], te = !$t(Qe, p);
|
|
1709
1709
|
if ((te || a[p]) && typeof a[p] != "function") {
|
|
1710
1710
|
R(F);
|
|
@@ -1757,11 +1757,11 @@ var nt = { exports: {} };
|
|
|
1757
1757
|
}
|
|
1758
1758
|
function F(q) {
|
|
1759
1759
|
return function() {
|
|
1760
|
-
var
|
|
1760
|
+
var j = 0;
|
|
1761
1761
|
function p() {
|
|
1762
|
-
for (;
|
|
1763
|
-
var te = q[
|
|
1764
|
-
return
|
|
1762
|
+
for (; j < q.length; ) {
|
|
1763
|
+
var te = q[j];
|
|
1764
|
+
return j++, o._dbInfo = null, o._ready = null, o.getDriver(te).then(B).catch(p);
|
|
1765
1765
|
}
|
|
1766
1766
|
R();
|
|
1767
1767
|
var fe = new Error("No available storage method found.");
|
|
@@ -1775,8 +1775,8 @@ var nt = { exports: {} };
|
|
|
1775
1775
|
}) : d.resolve();
|
|
1776
1776
|
return this._driverSet = k.then(function() {
|
|
1777
1777
|
var q = P[0];
|
|
1778
|
-
return o._dbInfo = null, o._ready = null, o.getDriver(q).then(function(
|
|
1779
|
-
o._driver =
|
|
1778
|
+
return o._dbInfo = null, o._ready = null, o.getDriver(q).then(function(j) {
|
|
1779
|
+
o._driver = j._driver, R(), o._wrapLibraryMethodsWithReady(), o._initDriver = F(P);
|
|
1780
1780
|
});
|
|
1781
1781
|
}).catch(function() {
|
|
1782
1782
|
R();
|
|
@@ -1890,7 +1890,7 @@ function bn(e) {
|
|
|
1890
1890
|
return An(t);
|
|
1891
1891
|
}
|
|
1892
1892
|
const Sn = (e) => {
|
|
1893
|
-
let t =
|
|
1893
|
+
let t = Q(e.url) ?? void 0;
|
|
1894
1894
|
if (e.additionalUrl != null && (t == null ? t = e.additionalUrl : t = Ue(t, e.additionalUrl)), e.id != null && (t != null && t.includes("{id}") ? t = t.replaceAll("{id}", e.id) : t = Ue(t, e.id)), e.params != null) {
|
|
1895
1895
|
t ?? (t = "");
|
|
1896
1896
|
let l = new URLSearchParams();
|
|
@@ -2097,9 +2097,9 @@ function qr(e) {
|
|
|
2097
2097
|
if (console.log("trying save"), C == !0) {
|
|
2098
2098
|
console.log("saving");
|
|
2099
2099
|
var i = {
|
|
2100
|
-
meta:
|
|
2101
|
-
data:
|
|
2102
|
-
count:
|
|
2100
|
+
// meta: toValue(meta),
|
|
2101
|
+
// data: toValue(dataItems),
|
|
2102
|
+
// count: toValue(count),
|
|
2103
2103
|
filters: []
|
|
2104
2104
|
};
|
|
2105
2105
|
console.log(i);
|
|
@@ -2315,7 +2315,7 @@ function En(e) {
|
|
|
2315
2315
|
}), r.toString();
|
|
2316
2316
|
}
|
|
2317
2317
|
function I(u) {
|
|
2318
|
-
let r =
|
|
2318
|
+
let r = Q(u.url) ?? void 0, w = Q(u.id);
|
|
2319
2319
|
return r == null && (e == null ? void 0 : e.findPath) != null && (r = e.findPath(u.nav)), u.additionalUrl != null && (r == null ? r = u.additionalUrl : r = Ue(r, u.additionalUrl)), w != null && (r != null && r.includes("{id}") ? r = r.replaceAll("{id}", w) : r = Ue(r, w)), u.params != null && (r = `${r}?${l(u.params)}`), u.finalUrl = r, u.finalUrl ?? "";
|
|
2320
2320
|
}
|
|
2321
2321
|
function C(u) {
|
|
@@ -2653,7 +2653,7 @@ function Dn(e) {
|
|
|
2653
2653
|
return !1;
|
|
2654
2654
|
if (L.requiresAuth === !1)
|
|
2655
2655
|
return !0;
|
|
2656
|
-
const f =
|
|
2656
|
+
const f = Q(s);
|
|
2657
2657
|
if (f.isSuspended && L.ignoreSuspension !== !0)
|
|
2658
2658
|
return !1;
|
|
2659
2659
|
if (f.isGlobalAdmin)
|
|
@@ -2666,7 +2666,7 @@ function Dn(e) {
|
|
|
2666
2666
|
return !0;
|
|
2667
2667
|
}
|
|
2668
2668
|
function I(x) {
|
|
2669
|
-
const L =
|
|
2669
|
+
const L = Q(s);
|
|
2670
2670
|
if (L.userPermissions != null)
|
|
2671
2671
|
for (var f = 0; f < L.userPermissions.length; f++) {
|
|
2672
2672
|
var y = L.userPermissions[f].split(".");
|
|
@@ -2683,7 +2683,7 @@ function Dn(e) {
|
|
|
2683
2683
|
return !1;
|
|
2684
2684
|
if (L.requiresAuth === !1)
|
|
2685
2685
|
return !0;
|
|
2686
|
-
const f =
|
|
2686
|
+
const f = Q(s);
|
|
2687
2687
|
if (f.isSuspended && L.ignoreSuspension !== !0)
|
|
2688
2688
|
return !1;
|
|
2689
2689
|
if (f.isGlobalAdmin)
|
|
@@ -2696,7 +2696,7 @@ function Dn(e) {
|
|
|
2696
2696
|
return !0;
|
|
2697
2697
|
}
|
|
2698
2698
|
function _(x) {
|
|
2699
|
-
const L =
|
|
2699
|
+
const L = Q(s);
|
|
2700
2700
|
if (L.userPermissions != null)
|
|
2701
2701
|
for (var f = 0; f < L.userPermissions.length; f++) {
|
|
2702
2702
|
var y = L.userPermissions[f].split(".");
|
|
@@ -2707,7 +2707,7 @@ function Dn(e) {
|
|
|
2707
2707
|
}
|
|
2708
2708
|
function M(x, L, f) {
|
|
2709
2709
|
let y = !0;
|
|
2710
|
-
return
|
|
2710
|
+
return Q(s).isGlobalAdmin ? !0 : (L != null && L.length > 0 && L.forEach((X) => {
|
|
2711
2711
|
f == "edit" ? I(X) || (y = !1) : _(X) || (y = !1);
|
|
2712
2712
|
}), x != null && x.length > 0 && (x.some((X) => u(X)) || (y = !1)), y);
|
|
2713
2713
|
}
|
|
@@ -2732,7 +2732,7 @@ function Dn(e) {
|
|
|
2732
2732
|
return x == null ? 0 : ((f = (e.subscriptionOptions ?? []).find((y) => y.code == x)) == null ? void 0 : f.value) ?? 0;
|
|
2733
2733
|
}
|
|
2734
2734
|
function u(x) {
|
|
2735
|
-
const L =
|
|
2735
|
+
const L = Q(s);
|
|
2736
2736
|
if (L.subscriptionCode == null)
|
|
2737
2737
|
return !1;
|
|
2738
2738
|
if (L.subscriptionCode == x)
|
|
@@ -2753,7 +2753,7 @@ function Dn(e) {
|
|
|
2753
2753
|
}
|
|
2754
2754
|
function D(x) {
|
|
2755
2755
|
var f;
|
|
2756
|
-
|
|
2756
|
+
Q(s).isLoggedIn || ((f = e.demo) == null || f.endDemo(), T() && (w(), window.location.href = d(x)));
|
|
2757
2757
|
}
|
|
2758
2758
|
async function i(x, L) {
|
|
2759
2759
|
return e.getToken ?? (e.getToken = async () => {
|
|
@@ -2789,11 +2789,11 @@ function Dn(e) {
|
|
|
2789
2789
|
s.value ?? (s.value = {}), (x = s.value).timeZone ?? (x.timeZone = e.defaultTimeZone ?? hr);
|
|
2790
2790
|
}
|
|
2791
2791
|
function S() {
|
|
2792
|
-
const x =
|
|
2792
|
+
const x = Q(s);
|
|
2793
2793
|
return x.isLoggedIn && T() && (w(), window.location.href = d()), x.isLoggedIn;
|
|
2794
2794
|
}
|
|
2795
2795
|
function T() {
|
|
2796
|
-
const x =
|
|
2796
|
+
const x = Q(s);
|
|
2797
2797
|
if (x == null || x.expiresOn == null)
|
|
2798
2798
|
return !0;
|
|
2799
2799
|
const L = he.fromFormat(x.expiresOn, t), f = he.utc();
|
|
@@ -2827,11 +2827,11 @@ function xn(e, t, l = {}) {
|
|
|
2827
2827
|
} = l, I = { capture: l.capture ?? !0 };
|
|
2828
2828
|
let C = { x: 0, y: 0 }, _ = { x: 0, y: 0 }, M = { x: 0, y: 0 }, $ = [], d = [], h = z(!1);
|
|
2829
2829
|
function u(N) {
|
|
2830
|
-
|
|
2830
|
+
Q(A) && N.preventDefault(), Q(s) && N.stopPropagation();
|
|
2831
2831
|
}
|
|
2832
2832
|
function r(N) {
|
|
2833
2833
|
var f;
|
|
2834
|
-
const S =
|
|
2834
|
+
const S = Q(e);
|
|
2835
2835
|
if (!S)
|
|
2836
2836
|
return;
|
|
2837
2837
|
const T = S.$el, L = N.type === "touchstart" && N.touches.length > 0 ? N.touches[0] : N;
|
|
@@ -2845,7 +2845,7 @@ function xn(e, t, l = {}) {
|
|
|
2845
2845
|
}
|
|
2846
2846
|
function w(N) {
|
|
2847
2847
|
var y;
|
|
2848
|
-
if (!M || !
|
|
2848
|
+
if (!M || !Q(e))
|
|
2849
2849
|
return;
|
|
2850
2850
|
const x = N.type === "touchmove" && N.touches.length > 0 ? N.touches[0] : N;
|
|
2851
2851
|
let L = x.clientX - M.x, f = x.clientY - M.y;
|
|
@@ -2858,25 +2858,25 @@ function xn(e, t, l = {}) {
|
|
|
2858
2858
|
}), d.length = 0, (S = l.onEnd) == null || S.call(l, C, N), u(N);
|
|
2859
2859
|
}
|
|
2860
2860
|
function i(N) {
|
|
2861
|
-
const S =
|
|
2861
|
+
const S = Q(e);
|
|
2862
2862
|
if (!S)
|
|
2863
2863
|
return;
|
|
2864
2864
|
const T = S.$el;
|
|
2865
2865
|
T.style.left = `${N.x}px`, T.style.top = `${N.y}px`;
|
|
2866
2866
|
}
|
|
2867
2867
|
function E() {
|
|
2868
|
-
if (
|
|
2868
|
+
if (Q(h))
|
|
2869
2869
|
return;
|
|
2870
|
-
const N =
|
|
2870
|
+
const N = Q(t);
|
|
2871
2871
|
if (!N)
|
|
2872
2872
|
return;
|
|
2873
2873
|
const S = N.$el;
|
|
2874
2874
|
S.style.cursor = "move", $.push(me(S, "mousedown", r, I)), $.push(me(S, "touchstart", r, I)), h.value = !0;
|
|
2875
2875
|
}
|
|
2876
2876
|
function b() {
|
|
2877
|
-
if (!
|
|
2877
|
+
if (!Q(h))
|
|
2878
2878
|
return;
|
|
2879
|
-
const N =
|
|
2879
|
+
const N = Q(t);
|
|
2880
2880
|
if (!N)
|
|
2881
2881
|
return;
|
|
2882
2882
|
const S = N.$el;
|
|
@@ -3521,7 +3521,7 @@ function Un(e) {
|
|
|
3521
3521
|
}
|
|
3522
3522
|
function Bn(e, t) {
|
|
3523
3523
|
const l = z(!1), A = Yt(e);
|
|
3524
|
-
let s = g(
|
|
3524
|
+
let s = g(Q(e));
|
|
3525
3525
|
(t == null ? void 0 : t.useTracker) !== !1 && Te(A, (C) => {
|
|
3526
3526
|
l.value = g(C) != s;
|
|
3527
3527
|
}, { deep: !0 });
|
|
@@ -3534,7 +3534,7 @@ function Bn(e, t) {
|
|
|
3534
3534
|
})), JSON.stringify(_);
|
|
3535
3535
|
}
|
|
3536
3536
|
function I() {
|
|
3537
|
-
s = g(
|
|
3537
|
+
s = g(Q(A)), l.value = !1;
|
|
3538
3538
|
}
|
|
3539
3539
|
return {
|
|
3540
3540
|
asyncItem: A,
|
|
@@ -3547,9 +3547,9 @@ function Ia(e, t) {
|
|
|
3547
3547
|
const {
|
|
3548
3548
|
// useBladeSrc = true,
|
|
3549
3549
|
useRouteSrc: l = !0
|
|
3550
|
-
} = 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 = Lr(), C = et(), _ =
|
|
3550
|
+
} = 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 = Lr(), C = et(), _ = Q(e.proxyQueryKey), M = ee(() => {
|
|
3551
3551
|
var W;
|
|
3552
|
-
return
|
|
3552
|
+
return Q(e.proxyID) ?? (_ != null ? (W = C == null ? void 0 : C.query) == null ? void 0 : W[_] : void 0);
|
|
3553
3553
|
}), $ = z(void 0), { actionErrorMsg: d, actionLoadingMsg: h, deleteItem: u, getItem: r, getAllItems: w, restoreItem: D, saveItem: i } = ut({
|
|
3554
3554
|
nav: g,
|
|
3555
3555
|
onError: e.onError ?? (t == null ? void 0 : t.onError),
|
|
@@ -3565,20 +3565,20 @@ function Ia(e, t) {
|
|
|
3565
3565
|
}), f = ee(() => {
|
|
3566
3566
|
if (T.value == "new")
|
|
3567
3567
|
return !1;
|
|
3568
|
-
const W =
|
|
3568
|
+
const W = Q($);
|
|
3569
3569
|
return e.onCanDelete != null ? e.onCanDelete(W) : (W == null ? void 0 : W.isInactive) !== !0;
|
|
3570
3570
|
}), y = ee(() => {
|
|
3571
3571
|
if (T.value == "new")
|
|
3572
3572
|
return !1;
|
|
3573
|
-
const W =
|
|
3573
|
+
const W = Q($);
|
|
3574
3574
|
return e.onCanEdit != null ? e.onCanEdit(W) : !0;
|
|
3575
3575
|
}), J = ee(() => {
|
|
3576
3576
|
if (T.value == "new")
|
|
3577
3577
|
return !1;
|
|
3578
|
-
const W =
|
|
3578
|
+
const W = Q($);
|
|
3579
3579
|
return e.onCanRestore != null ? e.onCanRestore(W) : (W == null ? void 0 : W.isInactive) === !0;
|
|
3580
3580
|
}), X = ee(() => {
|
|
3581
|
-
const W =
|
|
3581
|
+
const W = Q($);
|
|
3582
3582
|
return e.onCanSave != null ? e.onCanSave(W) : !0;
|
|
3583
3583
|
}), { isChanged: re, restartTracker: ue } = Bn($, {
|
|
3584
3584
|
useTracker: e.trackChanges,
|
|
@@ -3670,7 +3670,7 @@ function Ia(e, t) {
|
|
|
3670
3670
|
});
|
|
3671
3671
|
}
|
|
3672
3672
|
function ie() {
|
|
3673
|
-
const W =
|
|
3673
|
+
const W = Q(T);
|
|
3674
3674
|
!W || W == "view" ? T.value = "edit" : W == "edit" && (T.value = "view");
|
|
3675
3675
|
}
|
|
3676
3676
|
return Te(E, (W) => {
|
|
@@ -3786,7 +3786,7 @@ function $n(e) {
|
|
|
3786
3786
|
}
|
|
3787
3787
|
function Da(e, t, l) {
|
|
3788
3788
|
var He, Ve;
|
|
3789
|
-
const A = Mn(), s = it(), g = Lr(), I = et(), { bladeData: C } = Cn({}), _ = e.useBladeSrc ?? !0, M = 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 =
|
|
3789
|
+
const A = Mn(), s = it(), g = Lr(), I = et(), { bladeData: C } = Cn({}), _ = e.useBladeSrc ?? !0, M = 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 = Q(e.customFilters) ?? [], r = z([]), w = ee(() => Kt([
|
|
3790
3790
|
...u.filter((U) => U.name != null).map((U) => U.name),
|
|
3791
3791
|
...e.defaultFilters ?? [],
|
|
3792
3792
|
...r.value
|
|
@@ -3794,47 +3794,47 @@ function Da(e, t, l) {
|
|
|
3794
3794
|
let i = z([...D.value]);
|
|
3795
3795
|
const E = ee(() => Gr(i, D).value.length > 0 || Gr(D, i).value.length > 0), b = z(N());
|
|
3796
3796
|
function N() {
|
|
3797
|
-
var U,
|
|
3797
|
+
var U, K;
|
|
3798
3798
|
if (_) {
|
|
3799
3799
|
const V = (U = C.value) == null ? void 0 : U.page;
|
|
3800
3800
|
if (V != null)
|
|
3801
3801
|
return Number.parseInt(V);
|
|
3802
3802
|
}
|
|
3803
3803
|
if (M) {
|
|
3804
|
-
const V = (
|
|
3804
|
+
const V = (K = I == null ? void 0 : I.query) == null ? void 0 : K.page;
|
|
3805
3805
|
if (V != null)
|
|
3806
3806
|
return Number.parseInt(typeof V == "string" ? V : V.toString());
|
|
3807
3807
|
}
|
|
3808
3808
|
return 1;
|
|
3809
3809
|
}
|
|
3810
3810
|
const S = ee(() => {
|
|
3811
|
-
var U,
|
|
3811
|
+
var U, K;
|
|
3812
3812
|
if (_) {
|
|
3813
3813
|
const V = (U = C.value) == null ? void 0 : U.proxyID;
|
|
3814
3814
|
if (V != null)
|
|
3815
3815
|
return V;
|
|
3816
3816
|
}
|
|
3817
3817
|
if (M) {
|
|
3818
|
-
const V = (
|
|
3818
|
+
const V = (K = I == null ? void 0 : I.query) == null ? void 0 : K.query;
|
|
3819
3819
|
if (V != null)
|
|
3820
3820
|
return V;
|
|
3821
3821
|
}
|
|
3822
3822
|
return e.proxyID;
|
|
3823
3823
|
}), T = z(x());
|
|
3824
3824
|
function x() {
|
|
3825
|
-
var U,
|
|
3825
|
+
var U, K;
|
|
3826
3826
|
if (_) {
|
|
3827
3827
|
const V = (U = C.value) == null ? void 0 : U.search;
|
|
3828
3828
|
if (V != null)
|
|
3829
3829
|
return V;
|
|
3830
3830
|
}
|
|
3831
3831
|
if (M) {
|
|
3832
|
-
const V = (
|
|
3832
|
+
const V = (K = I == null ? void 0 : I.query) == null ? void 0 : K.search;
|
|
3833
3833
|
if (V != null)
|
|
3834
3834
|
return V;
|
|
3835
3835
|
}
|
|
3836
3836
|
}
|
|
3837
|
-
const L = z(
|
|
3837
|
+
const L = z(Q(e.startShowingInactive) ?? !1), f = ee(() => [
|
|
3838
3838
|
...e.searchProps ?? [],
|
|
3839
3839
|
...(e.headers ?? []).filter((U) => U.searchable != null && U.value != null).map((U) => U.value ?? "")
|
|
3840
3840
|
]), y = z([]), J = Ne([]), X = z([]);
|
|
@@ -3849,17 +3849,17 @@ function Da(e, t, l) {
|
|
|
3849
3849
|
nav: $
|
|
3850
3850
|
})
|
|
3851
3851
|
}), W = ee(() => e.errorMsg ?? ue.value), ne = ee(() => e.loadingMsg ?? be.value), ce = ee(() => ne.value != null), se = Ne(!1), ge = Ne(e.showSearch ?? !0), Be = z(0), $e = ee(() => {
|
|
3852
|
-
let U,
|
|
3852
|
+
let U, K = [];
|
|
3853
3853
|
D.value.forEach((O) => {
|
|
3854
3854
|
const de = w.value[O], ye = u.find((De) => De.name == de);
|
|
3855
|
-
ye != null ? U = U != null ? `${U}ANDALSO${ye.filterFunction()}` : ye.filterFunction() :
|
|
3855
|
+
ye != null ? U = U != null ? `${U}ANDALSO${ye.filterFunction()}` : ye.filterFunction() : K.push(de);
|
|
3856
3856
|
});
|
|
3857
3857
|
const V = {};
|
|
3858
|
-
return _e(
|
|
3858
|
+
return _e(K) && (V.filterBy = K.toString()), U != null && (V.query = U), V;
|
|
3859
3859
|
}), Fe = ee(() => {
|
|
3860
|
-
var
|
|
3860
|
+
var K;
|
|
3861
3861
|
let U = e.params != null ? { ...e.params } : {};
|
|
3862
|
-
return e.useServerPagination && e.itemsPerPage != null && (U.includeCount = !0, U.takeAmount = e.itemsPerPage, U.takeFrom = (b.value - 1) * e.itemsPerPage), $e.value != null && (U = { ...U, ...$e.value }), L.value && (U.includeInactive = !0), _e(e.selectProps) && (U.properties = (
|
|
3862
|
+
return e.useServerPagination && e.itemsPerPage != null && (U.includeCount = !0, U.takeAmount = e.itemsPerPage, U.takeFrom = (b.value - 1) * e.itemsPerPage), $e.value != null && (U = { ...U, ...$e.value }), L.value && (U.includeInactive = !0), _e(e.selectProps) && (U.properties = (K = e.selectProps) == null ? void 0 : K.toString()), T.value != null && (U.searchString = T.value), U;
|
|
3863
3863
|
}), tr = ee(() => (U) => e.onCanDelete != null ? e.onCanDelete(U) : !(U != null && U.isInactive === !0)), nr = ee(() => (U) => L.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(() => {
|
|
3864
3864
|
let U = new Array();
|
|
3865
3865
|
return Ce.value.filter((V) => V.sublevel != null).forEach((V) => {
|
|
@@ -3875,22 +3875,22 @@ function Da(e, t, l) {
|
|
|
3875
3875
|
}), ur = ee(() => Ce.value.filter((U) => U.nav != null && U.itemText != null || U.textFilter != null || U.display != null || U.bool != null));
|
|
3876
3876
|
function Se(U) {
|
|
3877
3877
|
if (e.itemBladeName != null) {
|
|
3878
|
-
let
|
|
3878
|
+
let K = {
|
|
3879
3879
|
bladeName: e.itemBladeName,
|
|
3880
3880
|
id: "new",
|
|
3881
3881
|
nav: $
|
|
3882
3882
|
};
|
|
3883
3883
|
U == "page" && g.push({
|
|
3884
|
-
name:
|
|
3884
|
+
name: K.bladeName,
|
|
3885
3885
|
params: { id: "new" }
|
|
3886
3886
|
});
|
|
3887
3887
|
}
|
|
3888
3888
|
}
|
|
3889
3889
|
function ir(U) {
|
|
3890
3890
|
const {
|
|
3891
|
-
additionalUrl:
|
|
3891
|
+
additionalUrl: K,
|
|
3892
3892
|
onDeleteAsync: V
|
|
3893
|
-
} = { ...e }, O =
|
|
3893
|
+
} = { ...e }, O = Q(U), de = O.id, ye = (De) => {
|
|
3894
3894
|
if (De != null) {
|
|
3895
3895
|
let Ae = y.value.findIndex((oe) => oe.id == De);
|
|
3896
3896
|
if (Ae > -1 && y.value.splice(Ae, 1), e.items != null) {
|
|
@@ -3906,7 +3906,7 @@ function Da(e, t, l) {
|
|
|
3906
3906
|
}
|
|
3907
3907
|
};
|
|
3908
3908
|
e.localOnly == !0 || $ == null ? ye(de) : G({
|
|
3909
|
-
additionalUrl:
|
|
3909
|
+
additionalUrl: K,
|
|
3910
3910
|
data: O,
|
|
3911
3911
|
nav: $,
|
|
3912
3912
|
onCanDeleteAsync: e.onCanDeleteAsync,
|
|
@@ -3919,7 +3919,7 @@ function Da(e, t, l) {
|
|
|
3919
3919
|
}
|
|
3920
3920
|
function Je(U) {
|
|
3921
3921
|
Z({
|
|
3922
|
-
data:
|
|
3922
|
+
data: Q(U),
|
|
3923
3923
|
additionalUrl: e.additionalUrl,
|
|
3924
3924
|
nav: $,
|
|
3925
3925
|
onCanRestoreAsync: e.onCanRestoreAsync,
|
|
@@ -3935,10 +3935,10 @@ function Da(e, t, l) {
|
|
|
3935
3935
|
}, { loadingMsg: "Exporting to CSV" });
|
|
3936
3936
|
}
|
|
3937
3937
|
function Pe() {
|
|
3938
|
-
let U =
|
|
3938
|
+
let U = Q(y);
|
|
3939
3939
|
if (U = e.onFilter ? e.onFilter(U) : U, T.value != null && T.value.length > 0) {
|
|
3940
|
-
let
|
|
3941
|
-
e.itemText &&
|
|
3940
|
+
let K = [...f.value];
|
|
3941
|
+
e.itemText && K.push(e.itemText), _e(K) && (U = U.filter((V) => dn(V, T.value, K)));
|
|
3942
3942
|
}
|
|
3943
3943
|
J.value = U;
|
|
3944
3944
|
}
|
|
@@ -3951,7 +3951,7 @@ function Da(e, t, l) {
|
|
|
3951
3951
|
y.value = e.onGetSuccessAsync != null ? await e.onGetSuccessAsync(e.items) : e.items;
|
|
3952
3952
|
return;
|
|
3953
3953
|
}
|
|
3954
|
-
const
|
|
3954
|
+
const K = {
|
|
3955
3955
|
additionalUrl: e.additionalUrl,
|
|
3956
3956
|
id: e.itemID,
|
|
3957
3957
|
nav: $,
|
|
@@ -3966,10 +3966,10 @@ function Da(e, t, l) {
|
|
|
3966
3966
|
onGetSuccessAsync: e.onGetSuccessAsync
|
|
3967
3967
|
};
|
|
3968
3968
|
if (e.isSingle === !0)
|
|
3969
|
-
|
|
3969
|
+
K.id === "new" ? y.value = [] : y.value = await H(K);
|
|
3970
3970
|
else {
|
|
3971
3971
|
let V = await ie({
|
|
3972
|
-
...
|
|
3972
|
+
...K,
|
|
3973
3973
|
onGetSuccessAsync: async (O, de) => {
|
|
3974
3974
|
console.log("get suc"), console.log(O);
|
|
3975
3975
|
let ye = O == null ? void 0 : O.data;
|
|
@@ -3980,8 +3980,8 @@ function Da(e, t, l) {
|
|
|
3980
3980
|
}
|
|
3981
3981
|
Pe();
|
|
3982
3982
|
}
|
|
3983
|
-
function je(U,
|
|
3984
|
-
const V =
|
|
3983
|
+
function je(U, K) {
|
|
3984
|
+
const V = Q(U);
|
|
3985
3985
|
if (V != null && V === re && e.canUnselect ? re = null : re = V, e.canSelect == !0 && (e.onCanSelectItem == null || e.onCanSelectItem(V)))
|
|
3986
3986
|
if (e.onSelectItem != null)
|
|
3987
3987
|
e.onSelectItem(re);
|
|
@@ -3991,7 +3991,7 @@ function Da(e, t, l) {
|
|
|
3991
3991
|
id: V.id,
|
|
3992
3992
|
nav: $
|
|
3993
3993
|
};
|
|
3994
|
-
|
|
3994
|
+
K == "page" && g.push({
|
|
3995
3995
|
name: O.bladeName,
|
|
3996
3996
|
params: { id: O.id }
|
|
3997
3997
|
});
|
|
@@ -4005,8 +4005,8 @@ function Da(e, t, l) {
|
|
|
4005
4005
|
Pe();
|
|
4006
4006
|
}, { debounce: 500, maxWait: 500 }), Te([L, b], async () => {
|
|
4007
4007
|
await Ie();
|
|
4008
|
-
}), Te([W, () => e.errorMsg], ([U,
|
|
4009
|
-
se.value = U != null ||
|
|
4008
|
+
}), Te([W, () => e.errorMsg], ([U, K]) => {
|
|
4009
|
+
se.value = U != null || K != null;
|
|
4010
4010
|
}), Te(() => e.refreshToggle, () => {
|
|
4011
4011
|
Ie({ deepRefresh: !0 });
|
|
4012
4012
|
}), Or([y, () => e.items], () => {
|
package/package.json
CHANGED