bt-core-app 1.4.100 → 1.4.102

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.
Files changed (2) hide show
  1. package/dist/bt-core-app.js +100 -93
  2. package/package.json +1 -1
@@ -1,4 +1,4 @@
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";
1
+ import { ref as z, shallowRef as Ne, 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";
@@ -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 j = F[q];
844
- j !== c && (j._dbInfo.db = a.db, j._dbInfo.version = a.version);
843
+ var K = F[q];
844
+ K !== c && (K._dbInfo.db = a.db, K._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 j = q.value;
884
- H(j) && (j = Y(j));
885
- var p = n(j, q.key, k++);
883
+ var K = q.value;
884
+ H(K) && (K = Y(K));
885
+ var p = n(K, 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 j = q.put(B, n);
916
+ var K = 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 = j.error ? j.error : j.transaction.error;
920
+ var p = K.error ? K.error : K.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 j = k[q];
1079
- j._dbInfo.db = null, j._dbInfo.version = B;
1078
+ var K = k[q];
1079
+ K._dbInfo.db = null, K._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 j = new d(function(p, te) {
1113
+ var K = 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 j.then(function(p) {
1125
+ return K.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", K = "ur16", V = "ui32", O = "fl32", de = "fl64", ye = Pe + qe.length, De = Object.prototype.toString;
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", Q = "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 += 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));
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 += Q : 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 K:
1211
+ case Q:
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, 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) {
1290
+ for (var k = F.rows, q = k.length, K = 0; K < q; K++) {
1291
+ var p = k.item(K), te = p.value;
1292
+ if (te && (te = P.serializer.deserialize(te)), te = n(te, p.key, K + 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(j) {
1315
- xe(j, F, "INSERT OR REPLACE INTO " + F.storeName + " (key, value) VALUES (?, ?)", [n, k], function() {
1314
+ q ? R(q) : F.db.transaction(function(K) {
1315
+ xe(K, 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(j) {
1321
- if (j.code === j.QUOTA_ERR) {
1320
+ }, function(K) {
1321
+ if (K.code === K.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(j);
1326
+ R(K);
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, j = o.storeNames.length; q < j; q++)
1459
+ for (var k = [], q = 0, K = o.storeNames.length; q < K; 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, j = k.length; q < j; q++) {
1707
+ for (var k = fr.concat("_initStorage"), q = 0, K = k.length; q < K; 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 j = 0;
1760
+ var K = 0;
1761
1761
  function p() {
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);
1762
+ for (; K < q.length; ) {
1763
+ var te = q[K];
1764
+ return K++, 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(j) {
1779
- o._driver = j._driver, R(), o._wrapLibraryMethodsWithReady(), o._initDriver = F(P);
1778
+ return o._dbInfo = null, o._ready = null, o.getDriver(q).then(function(K) {
1779
+ o._driver = K._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 = Q(e.url) ?? void 0;
1893
+ let t = j(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,12 +2097,19 @@ function qr(e) {
2097
2097
  if (console.log("trying save"), C == !0) {
2098
2098
  console.log("saving");
2099
2099
  var i = {
2100
- meta: g.value,
2101
- data: t.value,
2102
- count: l.value,
2100
+ meta: j(g),
2101
+ data: j(t),
2102
+ count: j(l),
2103
2103
  filters: []
2104
2104
  };
2105
- console.log(i), await ve().setItem(_(), i);
2105
+ console.log(i);
2106
+ try {
2107
+ await ve().setItem(_(), i);
2108
+ } catch (E) {
2109
+ console.log("sav err"), console.log(E);
2110
+ } finally {
2111
+ console.log("done");
2112
+ }
2106
2113
  }
2107
2114
  }
2108
2115
  function $(i) {
@@ -2308,7 +2315,7 @@ function En(e) {
2308
2315
  }), r.toString();
2309
2316
  }
2310
2317
  function I(u) {
2311
- let r = Q(u.url) ?? void 0, w = Q(u.id);
2318
+ let r = j(u.url) ?? void 0, w = j(u.id);
2312
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 ?? "";
2313
2320
  }
2314
2321
  function C(u) {
@@ -2646,7 +2653,7 @@ function Dn(e) {
2646
2653
  return !1;
2647
2654
  if (L.requiresAuth === !1)
2648
2655
  return !0;
2649
- const f = Q(s);
2656
+ const f = j(s);
2650
2657
  if (f.isSuspended && L.ignoreSuspension !== !0)
2651
2658
  return !1;
2652
2659
  if (f.isGlobalAdmin)
@@ -2659,7 +2666,7 @@ function Dn(e) {
2659
2666
  return !0;
2660
2667
  }
2661
2668
  function I(x) {
2662
- const L = Q(s);
2669
+ const L = j(s);
2663
2670
  if (L.userPermissions != null)
2664
2671
  for (var f = 0; f < L.userPermissions.length; f++) {
2665
2672
  var y = L.userPermissions[f].split(".");
@@ -2676,7 +2683,7 @@ function Dn(e) {
2676
2683
  return !1;
2677
2684
  if (L.requiresAuth === !1)
2678
2685
  return !0;
2679
- const f = Q(s);
2686
+ const f = j(s);
2680
2687
  if (f.isSuspended && L.ignoreSuspension !== !0)
2681
2688
  return !1;
2682
2689
  if (f.isGlobalAdmin)
@@ -2689,7 +2696,7 @@ function Dn(e) {
2689
2696
  return !0;
2690
2697
  }
2691
2698
  function _(x) {
2692
- const L = Q(s);
2699
+ const L = j(s);
2693
2700
  if (L.userPermissions != null)
2694
2701
  for (var f = 0; f < L.userPermissions.length; f++) {
2695
2702
  var y = L.userPermissions[f].split(".");
@@ -2700,7 +2707,7 @@ function Dn(e) {
2700
2707
  }
2701
2708
  function M(x, L, f) {
2702
2709
  let y = !0;
2703
- return Q(s).isGlobalAdmin ? !0 : (L != null && L.length > 0 && L.forEach((X) => {
2710
+ return j(s).isGlobalAdmin ? !0 : (L != null && L.length > 0 && L.forEach((X) => {
2704
2711
  f == "edit" ? I(X) || (y = !1) : _(X) || (y = !1);
2705
2712
  }), x != null && x.length > 0 && (x.some((X) => u(X)) || (y = !1)), y);
2706
2713
  }
@@ -2725,7 +2732,7 @@ function Dn(e) {
2725
2732
  return x == null ? 0 : ((f = (e.subscriptionOptions ?? []).find((y) => y.code == x)) == null ? void 0 : f.value) ?? 0;
2726
2733
  }
2727
2734
  function u(x) {
2728
- const L = Q(s);
2735
+ const L = j(s);
2729
2736
  if (L.subscriptionCode == null)
2730
2737
  return !1;
2731
2738
  if (L.subscriptionCode == x)
@@ -2746,7 +2753,7 @@ function Dn(e) {
2746
2753
  }
2747
2754
  function D(x) {
2748
2755
  var f;
2749
- Q(s).isLoggedIn || ((f = e.demo) == null || f.endDemo(), T() && (w(), window.location.href = d(x)));
2756
+ j(s).isLoggedIn || ((f = e.demo) == null || f.endDemo(), T() && (w(), window.location.href = d(x)));
2750
2757
  }
2751
2758
  async function i(x, L) {
2752
2759
  return e.getToken ?? (e.getToken = async () => {
@@ -2782,11 +2789,11 @@ function Dn(e) {
2782
2789
  s.value ?? (s.value = {}), (x = s.value).timeZone ?? (x.timeZone = e.defaultTimeZone ?? hr);
2783
2790
  }
2784
2791
  function S() {
2785
- const x = Q(s);
2792
+ const x = j(s);
2786
2793
  return x.isLoggedIn && T() && (w(), window.location.href = d()), x.isLoggedIn;
2787
2794
  }
2788
2795
  function T() {
2789
- const x = Q(s);
2796
+ const x = j(s);
2790
2797
  if (x == null || x.expiresOn == null)
2791
2798
  return !0;
2792
2799
  const L = he.fromFormat(x.expiresOn, t), f = he.utc();
@@ -2820,11 +2827,11 @@ function xn(e, t, l = {}) {
2820
2827
  } = l, I = { capture: l.capture ?? !0 };
2821
2828
  let C = { x: 0, y: 0 }, _ = { x: 0, y: 0 }, M = { x: 0, y: 0 }, $ = [], d = [], h = z(!1);
2822
2829
  function u(N) {
2823
- Q(A) && N.preventDefault(), Q(s) && N.stopPropagation();
2830
+ j(A) && N.preventDefault(), j(s) && N.stopPropagation();
2824
2831
  }
2825
2832
  function r(N) {
2826
2833
  var f;
2827
- const S = Q(e);
2834
+ const S = j(e);
2828
2835
  if (!S)
2829
2836
  return;
2830
2837
  const T = S.$el, L = N.type === "touchstart" && N.touches.length > 0 ? N.touches[0] : N;
@@ -2838,7 +2845,7 @@ function xn(e, t, l = {}) {
2838
2845
  }
2839
2846
  function w(N) {
2840
2847
  var y;
2841
- if (!M || !Q(e))
2848
+ if (!M || !j(e))
2842
2849
  return;
2843
2850
  const x = N.type === "touchmove" && N.touches.length > 0 ? N.touches[0] : N;
2844
2851
  let L = x.clientX - M.x, f = x.clientY - M.y;
@@ -2851,25 +2858,25 @@ function xn(e, t, l = {}) {
2851
2858
  }), d.length = 0, (S = l.onEnd) == null || S.call(l, C, N), u(N);
2852
2859
  }
2853
2860
  function i(N) {
2854
- const S = Q(e);
2861
+ const S = j(e);
2855
2862
  if (!S)
2856
2863
  return;
2857
2864
  const T = S.$el;
2858
2865
  T.style.left = `${N.x}px`, T.style.top = `${N.y}px`;
2859
2866
  }
2860
2867
  function E() {
2861
- if (Q(h))
2868
+ if (j(h))
2862
2869
  return;
2863
- const N = Q(t);
2870
+ const N = j(t);
2864
2871
  if (!N)
2865
2872
  return;
2866
2873
  const S = N.$el;
2867
2874
  S.style.cursor = "move", $.push(me(S, "mousedown", r, I)), $.push(me(S, "touchstart", r, I)), h.value = !0;
2868
2875
  }
2869
2876
  function b() {
2870
- if (!Q(h))
2877
+ if (!j(h))
2871
2878
  return;
2872
- const N = Q(t);
2879
+ const N = j(t);
2873
2880
  if (!N)
2874
2881
  return;
2875
2882
  const S = N.$el;
@@ -3514,7 +3521,7 @@ function Un(e) {
3514
3521
  }
3515
3522
  function Bn(e, t) {
3516
3523
  const l = z(!1), A = Yt(e);
3517
- let s = g(Q(e));
3524
+ let s = g(j(e));
3518
3525
  (t == null ? void 0 : t.useTracker) !== !1 && Te(A, (C) => {
3519
3526
  l.value = g(C) != s;
3520
3527
  }, { deep: !0 });
@@ -3527,7 +3534,7 @@ function Bn(e, t) {
3527
3534
  })), JSON.stringify(_);
3528
3535
  }
3529
3536
  function I() {
3530
- s = g(Q(A)), l.value = !1;
3537
+ s = g(j(A)), l.value = !1;
3531
3538
  }
3532
3539
  return {
3533
3540
  asyncItem: A,
@@ -3540,9 +3547,9 @@ function Ia(e, t) {
3540
3547
  const {
3541
3548
  // useBladeSrc = true,
3542
3549
  useRouteSrc: l = !0
3543
- } = 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(() => {
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(), _ = j(e.proxyQueryKey), M = ee(() => {
3544
3551
  var W;
3545
- return Q(e.proxyID) ?? (_ != null ? (W = C == null ? void 0 : C.query) == null ? void 0 : W[_] : void 0);
3552
+ return j(e.proxyID) ?? (_ != null ? (W = C == null ? void 0 : C.query) == null ? void 0 : W[_] : void 0);
3546
3553
  }), $ = z(void 0), { actionErrorMsg: d, actionLoadingMsg: h, deleteItem: u, getItem: r, getAllItems: w, restoreItem: D, saveItem: i } = ut({
3547
3554
  nav: g,
3548
3555
  onError: e.onError ?? (t == null ? void 0 : t.onError),
@@ -3558,20 +3565,20 @@ function Ia(e, t) {
3558
3565
  }), f = ee(() => {
3559
3566
  if (T.value == "new")
3560
3567
  return !1;
3561
- const W = Q($);
3568
+ const W = j($);
3562
3569
  return e.onCanDelete != null ? e.onCanDelete(W) : (W == null ? void 0 : W.isInactive) !== !0;
3563
3570
  }), y = ee(() => {
3564
3571
  if (T.value == "new")
3565
3572
  return !1;
3566
- const W = Q($);
3573
+ const W = j($);
3567
3574
  return e.onCanEdit != null ? e.onCanEdit(W) : !0;
3568
3575
  }), J = ee(() => {
3569
3576
  if (T.value == "new")
3570
3577
  return !1;
3571
- const W = Q($);
3578
+ const W = j($);
3572
3579
  return e.onCanRestore != null ? e.onCanRestore(W) : (W == null ? void 0 : W.isInactive) === !0;
3573
3580
  }), X = ee(() => {
3574
- const W = Q($);
3581
+ const W = j($);
3575
3582
  return e.onCanSave != null ? e.onCanSave(W) : !0;
3576
3583
  }), { isChanged: re, restartTracker: ue } = Bn($, {
3577
3584
  useTracker: e.trackChanges,
@@ -3663,7 +3670,7 @@ function Ia(e, t) {
3663
3670
  });
3664
3671
  }
3665
3672
  function ie() {
3666
- const W = Q(T);
3673
+ const W = j(T);
3667
3674
  !W || W == "view" ? T.value = "edit" : W == "edit" && (T.value = "view");
3668
3675
  }
3669
3676
  return Te(E, (W) => {
@@ -3779,7 +3786,7 @@ function $n(e) {
3779
3786
  }
3780
3787
  function Da(e, t, l) {
3781
3788
  var He, Ve;
3782
- 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([
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 = j(e.customFilters) ?? [], r = z([]), w = ee(() => Kt([
3783
3790
  ...u.filter((U) => U.name != null).map((U) => U.name),
3784
3791
  ...e.defaultFilters ?? [],
3785
3792
  ...r.value
@@ -3787,47 +3794,47 @@ function Da(e, t, l) {
3787
3794
  let i = z([...D.value]);
3788
3795
  const E = ee(() => Gr(i, D).value.length > 0 || Gr(D, i).value.length > 0), b = z(N());
3789
3796
  function N() {
3790
- var U, K;
3797
+ var U, Q;
3791
3798
  if (_) {
3792
3799
  const V = (U = C.value) == null ? void 0 : U.page;
3793
3800
  if (V != null)
3794
3801
  return Number.parseInt(V);
3795
3802
  }
3796
3803
  if (M) {
3797
- const V = (K = I == null ? void 0 : I.query) == null ? void 0 : K.page;
3804
+ const V = (Q = I == null ? void 0 : I.query) == null ? void 0 : Q.page;
3798
3805
  if (V != null)
3799
3806
  return Number.parseInt(typeof V == "string" ? V : V.toString());
3800
3807
  }
3801
3808
  return 1;
3802
3809
  }
3803
3810
  const S = ee(() => {
3804
- var U, K;
3811
+ var U, Q;
3805
3812
  if (_) {
3806
3813
  const V = (U = C.value) == null ? void 0 : U.proxyID;
3807
3814
  if (V != null)
3808
3815
  return V;
3809
3816
  }
3810
3817
  if (M) {
3811
- const V = (K = I == null ? void 0 : I.query) == null ? void 0 : K.query;
3818
+ const V = (Q = I == null ? void 0 : I.query) == null ? void 0 : Q.query;
3812
3819
  if (V != null)
3813
3820
  return V;
3814
3821
  }
3815
3822
  return e.proxyID;
3816
3823
  }), T = z(x());
3817
3824
  function x() {
3818
- var U, K;
3825
+ var U, Q;
3819
3826
  if (_) {
3820
3827
  const V = (U = C.value) == null ? void 0 : U.search;
3821
3828
  if (V != null)
3822
3829
  return V;
3823
3830
  }
3824
3831
  if (M) {
3825
- const V = (K = I == null ? void 0 : I.query) == null ? void 0 : K.search;
3832
+ const V = (Q = I == null ? void 0 : I.query) == null ? void 0 : Q.search;
3826
3833
  if (V != null)
3827
3834
  return V;
3828
3835
  }
3829
3836
  }
3830
- const L = z(Q(e.startShowingInactive) ?? !1), f = ee(() => [
3837
+ const L = z(j(e.startShowingInactive) ?? !1), f = ee(() => [
3831
3838
  ...e.searchProps ?? [],
3832
3839
  ...(e.headers ?? []).filter((U) => U.searchable != null && U.value != null).map((U) => U.value ?? "")
3833
3840
  ]), y = z([]), J = Ne([]), X = z([]);
@@ -3842,17 +3849,17 @@ function Da(e, t, l) {
3842
3849
  nav: $
3843
3850
  })
3844
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(() => {
3845
- let U, K = [];
3852
+ let U, Q = [];
3846
3853
  D.value.forEach((O) => {
3847
3854
  const de = w.value[O], ye = u.find((De) => De.name == de);
3848
- ye != null ? U = U != null ? `${U}ANDALSO${ye.filterFunction()}` : ye.filterFunction() : K.push(de);
3855
+ ye != null ? U = U != null ? `${U}ANDALSO${ye.filterFunction()}` : ye.filterFunction() : Q.push(de);
3849
3856
  });
3850
3857
  const V = {};
3851
- return _e(K) && (V.filterBy = K.toString()), U != null && (V.query = U), V;
3858
+ return _e(Q) && (V.filterBy = Q.toString()), U != null && (V.query = U), V;
3852
3859
  }), Fe = ee(() => {
3853
- var K;
3860
+ var Q;
3854
3861
  let U = e.params != null ? { ...e.params } : {};
3855
- 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;
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 = (Q = e.selectProps) == null ? void 0 : Q.toString()), T.value != null && (U.searchString = T.value), U;
3856
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(() => {
3857
3864
  let U = new Array();
3858
3865
  return Ce.value.filter((V) => V.sublevel != null).forEach((V) => {
@@ -3868,22 +3875,22 @@ function Da(e, t, l) {
3868
3875
  }), ur = ee(() => Ce.value.filter((U) => U.nav != null && U.itemText != null || U.textFilter != null || U.display != null || U.bool != null));
3869
3876
  function Se(U) {
3870
3877
  if (e.itemBladeName != null) {
3871
- let K = {
3878
+ let Q = {
3872
3879
  bladeName: e.itemBladeName,
3873
3880
  id: "new",
3874
3881
  nav: $
3875
3882
  };
3876
3883
  U == "page" && g.push({
3877
- name: K.bladeName,
3884
+ name: Q.bladeName,
3878
3885
  params: { id: "new" }
3879
3886
  });
3880
3887
  }
3881
3888
  }
3882
3889
  function ir(U) {
3883
3890
  const {
3884
- additionalUrl: K,
3891
+ additionalUrl: Q,
3885
3892
  onDeleteAsync: V
3886
- } = { ...e }, O = Q(U), de = O.id, ye = (De) => {
3893
+ } = { ...e }, O = j(U), de = O.id, ye = (De) => {
3887
3894
  if (De != null) {
3888
3895
  let Ae = y.value.findIndex((oe) => oe.id == De);
3889
3896
  if (Ae > -1 && y.value.splice(Ae, 1), e.items != null) {
@@ -3899,7 +3906,7 @@ function Da(e, t, l) {
3899
3906
  }
3900
3907
  };
3901
3908
  e.localOnly == !0 || $ == null ? ye(de) : G({
3902
- additionalUrl: K,
3909
+ additionalUrl: Q,
3903
3910
  data: O,
3904
3911
  nav: $,
3905
3912
  onCanDeleteAsync: e.onCanDeleteAsync,
@@ -3912,7 +3919,7 @@ function Da(e, t, l) {
3912
3919
  }
3913
3920
  function Je(U) {
3914
3921
  Z({
3915
- data: Q(U),
3922
+ data: j(U),
3916
3923
  additionalUrl: e.additionalUrl,
3917
3924
  nav: $,
3918
3925
  onCanRestoreAsync: e.onCanRestoreAsync,
@@ -3928,10 +3935,10 @@ function Da(e, t, l) {
3928
3935
  }, { loadingMsg: "Exporting to CSV" });
3929
3936
  }
3930
3937
  function Pe() {
3931
- let U = Q(y);
3938
+ let U = j(y);
3932
3939
  if (U = e.onFilter ? e.onFilter(U) : U, T.value != null && T.value.length > 0) {
3933
- let K = [...f.value];
3934
- e.itemText && K.push(e.itemText), _e(K) && (U = U.filter((V) => dn(V, T.value, K)));
3940
+ let Q = [...f.value];
3941
+ e.itemText && Q.push(e.itemText), _e(Q) && (U = U.filter((V) => dn(V, T.value, Q)));
3935
3942
  }
3936
3943
  J.value = U;
3937
3944
  }
@@ -3944,7 +3951,7 @@ function Da(e, t, l) {
3944
3951
  y.value = e.onGetSuccessAsync != null ? await e.onGetSuccessAsync(e.items) : e.items;
3945
3952
  return;
3946
3953
  }
3947
- const K = {
3954
+ const Q = {
3948
3955
  additionalUrl: e.additionalUrl,
3949
3956
  id: e.itemID,
3950
3957
  nav: $,
@@ -3959,10 +3966,10 @@ function Da(e, t, l) {
3959
3966
  onGetSuccessAsync: e.onGetSuccessAsync
3960
3967
  };
3961
3968
  if (e.isSingle === !0)
3962
- K.id === "new" ? y.value = [] : y.value = await H(K);
3969
+ Q.id === "new" ? y.value = [] : y.value = await H(Q);
3963
3970
  else {
3964
3971
  let V = await ie({
3965
- ...K,
3972
+ ...Q,
3966
3973
  onGetSuccessAsync: async (O, de) => {
3967
3974
  console.log("get suc"), console.log(O);
3968
3975
  let ye = O == null ? void 0 : O.data;
@@ -3973,8 +3980,8 @@ function Da(e, t, l) {
3973
3980
  }
3974
3981
  Pe();
3975
3982
  }
3976
- function je(U, K) {
3977
- const V = Q(U);
3983
+ function je(U, Q) {
3984
+ const V = j(U);
3978
3985
  if (V != null && V === re && e.canUnselect ? re = null : re = V, e.canSelect == !0 && (e.onCanSelectItem == null || e.onCanSelectItem(V)))
3979
3986
  if (e.onSelectItem != null)
3980
3987
  e.onSelectItem(re);
@@ -3984,7 +3991,7 @@ function Da(e, t, l) {
3984
3991
  id: V.id,
3985
3992
  nav: $
3986
3993
  };
3987
- K == "page" && g.push({
3994
+ Q == "page" && g.push({
3988
3995
  name: O.bladeName,
3989
3996
  params: { id: O.id }
3990
3997
  });
@@ -3998,8 +4005,8 @@ function Da(e, t, l) {
3998
4005
  Pe();
3999
4006
  }, { debounce: 500, maxWait: 500 }), Te([L, b], async () => {
4000
4007
  await Ie();
4001
- }), Te([W, () => e.errorMsg], ([U, K]) => {
4002
- se.value = U != null || K != null;
4008
+ }), Te([W, () => e.errorMsg], ([U, Q]) => {
4009
+ se.value = U != null || Q != null;
4003
4010
  }), Te(() => e.refreshToggle, () => {
4004
4011
  Ie({ deepRefresh: !0 });
4005
4012
  }), Or([y, () => e.items], () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bt-core-app",
3
- "version": "1.4.100",
3
+ "version": "1.4.102",
4
4
  "description": "Core app tools for some basic features like navigation, authentication, server apis, and cosmetics",
5
5
  "homepage": "https://github.com/BlitzItTech/bt-core",
6
6
  "bugs": {