bt-core-app 1.4.7 → 1.4.9

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.
@@ -543,15 +543,15 @@ function Ce(e, t) {
543
543
  while (l.startsWith("/"));
544
544
  return `${a}/${l}`;
545
545
  }
546
- function pa(e = "blitzItExtensionExists") {
546
+ function eu(e = "blitzItExtensionExists") {
547
547
  try {
548
548
  var t = document.getElementById(e);
549
549
  return t != null;
550
550
  } catch (a) {
551
- return console.log(ma(a)), !1;
551
+ return console.log(va(a)), !1;
552
552
  }
553
553
  }
554
- function eu(e, t) {
554
+ function ru(e, t) {
555
555
  return [
556
556
  { lat: e.lat - t, lng: e.lng + t },
557
557
  { lat: e.lat - t, lng: e.lng - t },
@@ -559,7 +559,7 @@ function eu(e, t) {
559
559
  { lat: e.lat + t, lng: e.lng + t }
560
560
  ];
561
561
  }
562
- function ru(e, t) {
562
+ function tu(e, t) {
563
563
  return [
564
564
  { lat: e.lat - t * 2, lng: e.lng + t },
565
565
  { lat: e.lat - t * 2, lng: e.lng - t },
@@ -567,7 +567,7 @@ function ru(e, t) {
567
567
  { lat: e.lat, lng: e.lng + t }
568
568
  ];
569
569
  }
570
- function tu(e, t) {
570
+ function nu(e, t) {
571
571
  return [
572
572
  { lat: e.lat, lng: e.lng + t },
573
573
  { lat: e.lat, lng: e.lng - t },
@@ -575,7 +575,7 @@ function tu(e, t) {
575
575
  { lat: e.lat + t * 2, lng: e.lng + t }
576
576
  ];
577
577
  }
578
- function nu(e) {
578
+ function au(e) {
579
579
  var t = Rt(e, !0);
580
580
  return t = t.toLowerCase(), t = t.replace(" victoria ", "vic"), t = t.replace(" queensland ", "qld"), t = t.replace(" new south wales ", "nsw"), t = t.replace(" northern territory ", "nt"), t = t.replace(" western australia ", "wa"), t = t.replace(" tasmania ", "tas"), t = t.replace(" south australia ", "sa"), t = t.replace(" australian captial territory ", "act"), t = t.replace(" & ", " and "), t = t.replace(" road", " rd"), t = t.replace(" street", " st"), t = t.replace(" lane", " ln"), t = t.replace(" alley", " aly"), t = t.replace(" arcade", " arc"), t = t.replace(" boulevard", " blvd"), t = t.replace(" court", " ct"), t = t.replace(" cove", " cv"), t = t.replace(" highway", " hwy"), t.replaceAll(" ", "");
581
581
  }
@@ -587,13 +587,13 @@ function Rt(e, t = !1) {
587
587
  var a = "";
588
588
  return e.addressLineOne != null && !t && (a = e.addressLineOne + " "), e.streetNumber != null && (a = a + e.streetNumber + " "), e.streetName != null && (a = a + e.streetName + ", "), e.suburb != null && (a = a + e.suburb + " "), e.state != null && (a = a + e.state + " "), e.postcode != null && (a = a + e.postcode), a;
589
589
  }
590
- function au(e, t, a) {
590
+ function uu(e, t, a) {
591
591
  if (e) {
592
592
  var l = new Image();
593
593
  l.onload = t, l.onerror = a, l.src = e;
594
594
  }
595
595
  }
596
- async function uu(e, t = !0) {
596
+ async function lu(e, t = !0) {
597
597
  return new Promise((a, l) => {
598
598
  e == null && l("no url given");
599
599
  var s = new Image();
@@ -610,13 +610,13 @@ async function uu(e, t = !0) {
610
610
  function ia(e) {
611
611
  return e && e.replace(/([A-Z])/g, " $1").replace(/^./, (t) => t.toUpperCase());
612
612
  }
613
- function lu(e) {
613
+ function cu(e) {
614
614
  if (e != null && typeof e == "object")
615
615
  for (var t in e)
616
616
  /^[A-Z]/.test(t) && Object.hasOwnProperty.call(e, t) && (e[t.charAt(0).toLowerCase() + t.substring(1)] = e[t], delete e[t]);
617
617
  return e;
618
618
  }
619
- function cu(e) {
619
+ function fa(e) {
620
620
  return e == null ? e : e.replace(/\w\S*/g, (t) => t.replace(/^\w/, (a) => a.toUpperCase()));
621
621
  }
622
622
  const Ye = [
@@ -667,13 +667,13 @@ function du(e, t) {
667
667
  function Fe(e, t = 0) {
668
668
  return e != null && Array.isArray(e) && e.length > t;
669
669
  }
670
- function fa(e) {
670
+ function sa(e) {
671
671
  return e == "0001-01-01T00:00:00Z";
672
672
  }
673
673
  function mu() {
674
674
  return (/* @__PURE__ */ new Date("0001-01-01T00:00:00Z")).getTime();
675
675
  }
676
- function sa() {
676
+ function oa() {
677
677
  return "0001-01-01T00:00:00Z";
678
678
  }
679
679
  function vu(e, t) {
@@ -687,9 +687,9 @@ function vu(e, t) {
687
687
  }
688
688
  function gu(e, t) {
689
689
  let a = e ?? "";
690
- return t != null && (oa(a, t) ? a = a.split(",").filter((l) => l != t).toString() : a != null ? a = `${a},${t}` : a = t), a != null && a.length > 0 ? a : null;
690
+ return t != null && (ha(a, t) ? a = a.split(",").filter((l) => l != t).toString() : a != null ? a = `${a},${t}` : a = t), a != null && a.length > 0 ? a : null;
691
691
  }
692
- function oa(e, t) {
692
+ function ha(e, t) {
693
693
  if (e == null || e.length == 0)
694
694
  return !1;
695
695
  if (!t)
@@ -705,13 +705,13 @@ function Qr(e) {
705
705
  t = e[l], a[l] = typeof t == "object" ? Qr(t) : t;
706
706
  return a;
707
707
  }
708
- function ha(e) {
708
+ function da(e) {
709
709
  return e && Object.keys(e).sort().reduce(function(t, a) {
710
710
  let l = e[a];
711
- return t[a] = typeof l == "object" && l !== null ? ha(l) : l, t;
711
+ return t[a] = typeof l == "object" && l !== null ? da(l) : l, t;
712
712
  }, Array.isArray(e) ? [] : {});
713
713
  }
714
- function da(e, t) {
714
+ function ma(e, t) {
715
715
  return t == null ? !0 : e == null ? !1 : e.toLowerCase().includes(t.toLowerCase());
716
716
  }
717
717
  function Ut(e, t = (a) => a) {
@@ -730,7 +730,7 @@ function yu(e) {
730
730
  s[o] = a.charCodeAt(o);
731
731
  return new Blob([s], { type: l });
732
732
  }
733
- function ma(e) {
733
+ function va(e) {
734
734
  var t = "";
735
735
  if (e) {
736
736
  if (e.message && (t = e.message), e.response && e.response.data) {
@@ -743,11 +743,11 @@ function ma(e) {
743
743
  }
744
744
  return "hmmm no error was supplied";
745
745
  }
746
- function va() {
746
+ function ga() {
747
747
  const e = "#" + Math.floor(Math.random() * 16777215).toString(16);
748
- return e.length !== 7 ? va() : e;
748
+ return e.length !== 7 ? ga() : e;
749
749
  }
750
- function ga(e, t, a) {
750
+ function ya(e, t, a) {
751
751
  if (t == null)
752
752
  return !0;
753
753
  if (e == null || a == null)
@@ -755,7 +755,7 @@ function ga(e, t, a) {
755
755
  for (let s = 0; s < a.length; s++) {
756
756
  const o = a[s];
757
757
  var l = Rr(e, o);
758
- if (l != null && typeof l == "string" && da(l, t))
758
+ if (l != null && typeof l == "string" && ma(l, t))
759
759
  return !0;
760
760
  }
761
761
  return !1;
@@ -778,14 +778,14 @@ function Rr(e, t) {
778
778
  return null;
779
779
  return s;
780
780
  }
781
- function ya(e) {
781
+ function wa(e) {
782
782
  return e ? /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(e) : !1;
783
783
  }
784
784
  let Ur;
785
- function wa() {
785
+ function ba() {
786
786
  return Ur;
787
787
  }
788
- function ba(e) {
788
+ function Ea(e) {
789
789
  const t = (e == null ? void 0 : e.buildHeaders) ?? A, a = (e == null ? void 0 : e.buildQuery) ?? s, l = (e == null ? void 0 : e.buildUrl) ?? o;
790
790
  function s(c) {
791
791
  let h = new URLSearchParams();
@@ -948,14 +948,14 @@ var mt;
948
948
  })(mt || (mt = {}));
949
949
  Symbol(process.env.NODE_ENV !== "production" ? "router view location matched" : "");
950
950
  Symbol(process.env.NODE_ENV !== "production" ? "router view depth" : "");
951
- const Ea = Symbol(process.env.NODE_ENV !== "production" ? "router" : ""), Sa = Symbol(process.env.NODE_ENV !== "production" ? "route location" : "");
951
+ const Sa = Symbol(process.env.NODE_ENV !== "production" ? "router" : ""), _a = Symbol(process.env.NODE_ENV !== "production" ? "route location" : "");
952
952
  Symbol(process.env.NODE_ENV !== "production" ? "router view location" : "");
953
953
  function Bt() {
954
- return fr(Ea);
955
- }
956
- function _a() {
957
954
  return fr(Sa);
958
955
  }
956
+ function Aa() {
957
+ return fr(_a);
958
+ }
959
959
  var Xr = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
960
960
  let ye;
961
961
  function $t() {
@@ -966,7 +966,7 @@ function vt() {
966
966
  const e = Xr.NODE_ENV;
967
967
  return ye == null ? "" : (ye[e] ?? ye.development).auth ?? "";
968
968
  }
969
- function Aa(e) {
969
+ function Da(e) {
970
970
  const t = Xr.NODE_ENV;
971
971
  if (ye == null)
972
972
  return "";
@@ -976,14 +976,14 @@ function Aa(e) {
976
976
  function Eu() {
977
977
  return ye;
978
978
  }
979
- function Da(e) {
979
+ function Ia(e) {
980
980
  return ye = e, ye;
981
981
  }
982
982
  let pe = "Australia/Melbourne", Br;
983
983
  function Su() {
984
984
  return Br;
985
985
  }
986
- function Ia(e) {
986
+ function xa(e) {
987
987
  const t = e.expiryTokenFormat ?? "d/MM/yyyy h:mm:ss a", a = Mr("auth-credentials-state", Math.random().toString(36).substring(4, 19) + Math.random().toString(12).substring(1, 11)), l = Mr("auth-credentials", {});
988
988
  function s(m) {
989
989
  if (m == null)
@@ -1109,7 +1109,7 @@ function Ia(e) {
1109
1109
  e.getTokenUrl ?? (e.getTokenUrl = () => Ce(vt(), "token")), J = e.getTokenUrl(g, `${window.location.origin}/authentication`, C, G);
1110
1110
  const ee = {};
1111
1111
  ee.grant_type = C, ee.code = g, ee.redirect_uri = `${window.location.origin}/authentication`, ee.client_id = G;
1112
- const W = await wa().post({
1112
+ const W = await ba().post({
1113
1113
  additionalUrl: J,
1114
1114
  data: ee
1115
1115
  });
@@ -1165,16 +1165,16 @@ function Ia(e) {
1165
1165
  tryLogin: _
1166
1166
  }, Br;
1167
1167
  }
1168
- function xa(e, t) {
1168
+ function Na(e, t) {
1169
1169
  const a = ir();
1170
1170
  if (!a)
1171
1171
  throw new Error(`[Vuetify] ${e} ${t || "must be called from inside a setup function"}`);
1172
1172
  return a;
1173
1173
  }
1174
- const Na = Symbol.for("vuetify:theme");
1175
- function Ta() {
1176
- xa("useTheme");
1177
- const e = fr(Na, null);
1174
+ const Ta = Symbol.for("vuetify:theme");
1175
+ function Ca() {
1176
+ Na("useTheme");
1177
+ const e = fr(Ta, null);
1178
1178
  if (!e)
1179
1179
  throw new Error("Could not find Vuetify theme injection");
1180
1180
  return e;
@@ -1198,7 +1198,7 @@ const $r = {
1198
1198
  };
1199
1199
  let Ge = {}, ie;
1200
1200
  function _u() {
1201
- const e = Ta();
1201
+ const e = Ca();
1202
1202
  function t() {
1203
1203
  e.global.name.value = ie.value.theme;
1204
1204
  let N = e.themes.value.dark.colors, L = ie.value.dark;
@@ -1257,7 +1257,7 @@ function _u() {
1257
1257
  undoTemporaryColor: S
1258
1258
  };
1259
1259
  }
1260
- function Ca(e) {
1260
+ function Pa(e) {
1261
1261
  ie = Mr("cosmetics", {
1262
1262
  theme: e.defaultTheme ?? "light",
1263
1263
  light: e.defaultLightTheme ?? $r,
@@ -1269,7 +1269,7 @@ function Ca(e) {
1269
1269
  const Au = {
1270
1270
  canExportCSV: !1
1271
1271
  };
1272
- function Pa() {
1272
+ function La() {
1273
1273
  function e(t, a, l = "csvData.csv") {
1274
1274
  if (!Fe(t))
1275
1275
  return;
@@ -1319,7 +1319,7 @@ let kr;
1319
1319
  function Du() {
1320
1320
  return kr;
1321
1321
  }
1322
- function La(e) {
1322
+ function Ma(e) {
1323
1323
  function t() {
1324
1324
  var S;
1325
1325
  return ((S = l()) == null ? void 0 : S.startOf("day").toUTC().toString()) ?? "";
@@ -1365,7 +1365,7 @@ let Vr;
1365
1365
  function Iu() {
1366
1366
  return Vr;
1367
1367
  }
1368
- function Ma() {
1368
+ function Ra() {
1369
1369
  const e = Y(!1);
1370
1370
  function t() {
1371
1371
  }
@@ -1377,7 +1377,7 @@ function Ma() {
1377
1377
  startDemo: t
1378
1378
  }, Vr;
1379
1379
  }
1380
- var Ra = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
1380
+ var Ua = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
1381
1381
  function xu(e) {
1382
1382
  function t(a) {
1383
1383
  var s;
@@ -1385,7 +1385,7 @@ function xu(e) {
1385
1385
  if (l)
1386
1386
  document.title = l.meta.title;
1387
1387
  else {
1388
- const o = Ra.NODE_ENV;
1388
+ const o = Ua.NODE_ENV;
1389
1389
  let A = "";
1390
1390
  o == "development" ? A = "BWeb Dev" : o == "staging" ? A = "BlitzIt Sandpit" : A = "BlitzIt Web | Cloud-Based Wholesale Logistics Platform", ((s = e == null ? void 0 : e.demo) == null ? void 0 : s.isDemoing.value) == !0 && (A = `Training: ${A}`), document.title = A;
1391
1391
  }
@@ -1469,9 +1469,9 @@ let Wr;
1469
1469
  function Tu() {
1470
1470
  return Wr;
1471
1471
  }
1472
- function Ua(e) {
1472
+ function Ba(e) {
1473
1473
  function t(g, f, C) {
1474
- return g ? fa(g) ? C ?? "" : e.dates.tzString(g, f) : C ?? g ?? "";
1474
+ return g ? sa(g) ? C ?? "" : e.dates.tzString(g, f) : C ?? g ?? "";
1475
1475
  }
1476
1476
  function a(g) {
1477
1477
  if (!g)
@@ -3046,8 +3046,8 @@ var Ft = { exports: {} };
3046
3046
  }, { 3: 3 }] }, {}, [4])(4);
3047
3047
  });
3048
3048
  })(Ft);
3049
- var Ba = Ft.exports;
3050
- const kt = /* @__PURE__ */ ca(Ba);
3049
+ var $a = Ft.exports;
3050
+ const kt = /* @__PURE__ */ ca($a);
3051
3051
  let rr = null;
3052
3052
  kt.config({
3053
3053
  name: $t()
@@ -3079,7 +3079,7 @@ function Cu() {
3079
3079
  saveAsync: l
3080
3080
  };
3081
3081
  }
3082
- var $a = !1;
3082
+ var Fa = !1;
3083
3083
  function tr(e, t, a) {
3084
3084
  return Array.isArray(e) ? (e.length = Math.max(e.length, t), e.splice(t, 1, a), a) : (e[t] = a, a);
3085
3085
  }
@@ -3096,7 +3096,7 @@ function Dr(e, t) {
3096
3096
  * @license MIT
3097
3097
  */
3098
3098
  let qe;
3099
- const lr = (e) => qe = e, Fa = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
3099
+ const lr = (e) => qe = e, ka = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
3100
3100
  /* istanbul ignore next */
3101
3101
  Symbol()
3102
3102
  );
@@ -3133,7 +3133,7 @@ function $e(e, ...t) {
3133
3133
  a(...t);
3134
3134
  });
3135
3135
  }
3136
- const ka = (e) => e();
3136
+ const Va = (e) => e();
3137
3137
  function jr(e, t) {
3138
3138
  e instanceof Map && t instanceof Map && t.forEach((a, l) => e.set(l, a)), e instanceof Set && t instanceof Set && t.forEach(e.add, e);
3139
3139
  for (const a in t) {
@@ -3144,12 +3144,12 @@ function jr(e, t) {
3144
3144
  }
3145
3145
  return e;
3146
3146
  }
3147
- const Va = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
3147
+ const Wa = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
3148
3148
  /* istanbul ignore next */
3149
3149
  Symbol()
3150
3150
  );
3151
- function Wa(e) {
3152
- return !Pe(e) || !e.hasOwnProperty(Va);
3151
+ function ja(e) {
3152
+ return !Pe(e) || !e.hasOwnProperty(Wa);
3153
3153
  }
3154
3154
  const { assign: ge } = Object;
3155
3155
  function yt(e) {
@@ -3181,7 +3181,7 @@ function Gr(e, t, a = {}, l, s, o) {
3181
3181
  deep: !0
3182
3182
  // flush: 'post',
3183
3183
  };
3184
- process.env.NODE_ENV !== "production" && !$a && (N.onTrigger = (f) => {
3184
+ process.env.NODE_ENV !== "production" && !Fa && (N.onTrigger = (f) => {
3185
3185
  L ? h = f : L == !1 && !m._hotUpdating && (Array.isArray(h) ? h.push(f) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
3186
3186
  });
3187
3187
  let L, R, b = [], c = [], h;
@@ -3280,11 +3280,11 @@ function Gr(e, t, a = {}, l, s, o) {
3280
3280
  // setupStore
3281
3281
  ) : P);
3282
3282
  l._s.set(e, m);
3283
- const g = (l._a && l._a.runWithContext || ka)(() => l._e.run(() => (A = Rn()).run(t)));
3283
+ const g = (l._a && l._a.runWithContext || Va)(() => l._e.run(() => (A = Rn()).run(t)));
3284
3284
  for (const f in g) {
3285
3285
  const C = g[f];
3286
3286
  if (ze(C) && !yt(C) || Yr(C))
3287
- process.env.NODE_ENV !== "production" && s ? tr(x.value, f, ar(g, f)) : o || (r && Wa(C) && (ze(C) ? C.value = r[f] : jr(C, r[f])), l.state.value[e][f] = C), process.env.NODE_ENV !== "production" && _.state.push(f);
3287
+ process.env.NODE_ENV !== "production" && s ? tr(x.value, f, ar(g, f)) : o || (r && ja(C) && (ze(C) ? C.value = r[f] : jr(C, r[f])), l.state.value[e][f] = C), process.env.NODE_ENV !== "production" && _.state.push(f);
3288
3288
  else if (typeof C == "function") {
3289
3289
  const G = process.env.NODE_ENV !== "production" && s ? C : U(f, C);
3290
3290
  g[f] = G, process.env.NODE_ENV !== "production" && (_.actions[f] = C), S.actions[f] = C;
@@ -3374,7 +3374,7 @@ function jt(e, t, a) {
3374
3374
  const L = Ln();
3375
3375
  if (S = // in test mode, ignore the argument provided as we can always retrieve a
3376
3376
  // pinia instance with getActivePinia()
3377
- (process.env.NODE_ENV === "test" && qe && qe._testing ? null : S) || (L ? fr(Fa, null) : null), S && lr(S), process.env.NODE_ENV !== "production" && !qe)
3377
+ (process.env.NODE_ENV === "test" && qe && qe._testing ? null : S) || (L ? fr(ka, null) : null), S && lr(S), process.env.NODE_ENV !== "production" && !qe)
3378
3378
  throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
3379
3379
  See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
3380
3380
  This will fail in production.`);
@@ -3400,16 +3400,16 @@ let cr;
3400
3400
  function Pu(e) {
3401
3401
  return cr(e)();
3402
3402
  }
3403
- function ja(e) {
3403
+ function Ga(e) {
3404
3404
  return cr(e);
3405
3405
  }
3406
- function Ga(e) {
3407
- return cr = (t) => qa({
3406
+ function qa(e) {
3407
+ return cr = (t) => Ha({
3408
3408
  ...e,
3409
3409
  ...t
3410
3410
  }), cr;
3411
3411
  }
3412
- function qa(e) {
3412
+ function Ha(e) {
3413
3413
  if (e.storeMode == "whole-last-updated") {
3414
3414
  if (e.api == null)
3415
3415
  throw new Error("Must supply an api object to use store");
@@ -3419,9 +3419,9 @@ function qa(e) {
3419
3419
  throw new Error("Must supply an api object to use store");
3420
3420
  return bt(e);
3421
3421
  } else
3422
- return za(e);
3422
+ return Za(e);
3423
3423
  }
3424
- const Ha = (e) => {
3424
+ const za = (e) => {
3425
3425
  let t = K(e.url) ?? void 0;
3426
3426
  if (e.additionalUrl != null && (t == null ? t = e.additionalUrl : t = Ce(t, e.additionalUrl)), e.id != null && (t != null && t.includes("{id}") ? t = t.replaceAll("{id}", e.id) : t = Ce(t, e.id)), e.params != null) {
3427
3427
  t ?? (t = "");
@@ -3432,10 +3432,10 @@ const Ha = (e) => {
3432
3432
  }
3433
3433
  return e.finalUrl = t, e.finalUrl ?? "";
3434
3434
  };
3435
- function za(e) {
3435
+ function Za(e) {
3436
3436
  return jt(e.storeName, () => {
3437
3437
  var h;
3438
- const t = fe.utc().toSeconds() / 86400, a = Y({}), l = Y({}), s = e.storageMode == "local-cache", o = e.buildUrl ?? ((h = e.api) == null ? void 0 : h.buildUrl) ?? Ha;
3438
+ const t = fe.utc().toSeconds() / 86400, a = Y({}), l = Y({}), s = e.storageMode == "local-cache", o = e.buildUrl ?? ((h = e.api) == null ? void 0 : h.buildUrl) ?? za;
3439
3439
  function A(r) {
3440
3440
  var x, E;
3441
3441
  return `${e.storeName}_${((x = e.auth) == null ? void 0 : x.credentials.value.userID) ?? "no-user-id"}_${r.id ?? ((E = r.data) == null ? void 0 : E.id) ?? "no-item-id"}`;
@@ -3623,7 +3623,7 @@ function bt(e) {
3623
3623
  additionalUrl: "/getAll",
3624
3624
  nav: y.nav,
3625
3625
  params: {
3626
- lastUpdate: ((_ = o.value) == null ? void 0 : _.lastUpdate) ?? sa()
3626
+ lastUpdate: ((_ = o.value) == null ? void 0 : _.lastUpdate) ?? oa()
3627
3627
  }
3628
3628
  }));
3629
3629
  m == null ? U(m) : (t.value ?? (t.value = []), m.data.forEach((D) => {
@@ -3783,7 +3783,7 @@ function bt(e) {
3783
3783
  }
3784
3784
  function Lu(e, t, a) {
3785
3785
  var Re;
3786
- const l = e.storeMode ?? (a == null ? void 0 : a.storeMode) ?? "session", s = e.storageMode ?? (a == null ? void 0 : a.storageMode) ?? "local-cache", o = e.nav ?? e.nav ?? "basic", A = Pa(), S = Bt(), N = _a(), L = Y(1), R = K(e.customFilters) ?? [], b = Y([]);
3786
+ const l = e.storeMode ?? (a == null ? void 0 : a.storeMode) ?? "session", s = e.storageMode ?? (a == null ? void 0 : a.storageMode) ?? "local-cache", o = e.nav ?? e.nav ?? "basic", A = La(), S = Bt(), N = Aa(), L = Y(1), R = K(e.customFilters) ?? [], b = Y([]);
3787
3787
  let c = Y(new Array());
3788
3788
  const h = le(() => Jn([
3789
3789
  ...R.filter((j) => j.name != null).map((j) => j.name),
@@ -3800,7 +3800,7 @@ function Lu(e, t, a) {
3800
3800
  const { actionErrorMsg: C, actionLoadingMsg: G, deleteItem: J, doAction: ee, getItem: we, getAllItems: W, restoreItem: H } = la({
3801
3801
  nav: e.nav ?? e.bladeName ?? e.itemBladeName,
3802
3802
  proxyID: y.value,
3803
- store: ja({
3803
+ store: Ga({
3804
3804
  storeMode: l,
3805
3805
  storageMode: s,
3806
3806
  storeName: o
@@ -3883,7 +3883,7 @@ function Lu(e, t, a) {
3883
3883
  let j = K(m);
3884
3884
  if (j = e.onFilter ? e.onFilter(j) : j, B.value != null && B.value.length > 0) {
3885
3885
  let te = [...P.value];
3886
- e.itemText && te.push(e.itemText), Fe(te) && (j = j.filter((Q) => ga(Q, B.value, te)));
3886
+ e.itemText && te.push(e.itemText), Fe(te) && (j = j.filter((Q) => ya(Q, B.value, te)));
3887
3887
  }
3888
3888
  D.value = j;
3889
3889
  }
@@ -3992,8 +3992,18 @@ let Nr = null, qr;
3992
3992
  function Mu() {
3993
3993
  return qr;
3994
3994
  }
3995
- function Za(e) {
3996
- const t = e.defaultCacheExpiryHours ?? 7, a = e.navItems ?? [];
3995
+ function Ya(e) {
3996
+ const t = e.defaultCacheExpiryHours ?? 7;
3997
+ e.getDisplayName ?? (e.getDisplayName = (c) => {
3998
+ if (c.displayName != null)
3999
+ return c.displayName;
4000
+ if (c.name != null)
4001
+ return fa(c.name.replaceAll("-", " "));
4002
+ });
4003
+ const a = (e.navItems ?? []).map((c) => ({
4004
+ displayName: c.displayName ?? e.getDisplayName(c),
4005
+ ...c
4006
+ }));
3997
4007
  function l(c) {
3998
4008
  var h;
3999
4009
  return (h = S(c)) == null ? void 0 : h.archiveName;
@@ -4020,7 +4030,7 @@ function Za(e) {
4020
4030
  const h = S(c);
4021
4031
  if (h == null)
4022
4032
  return;
4023
- let r = Aa(h.microservice ?? "default") ?? "";
4033
+ let r = Da(h.microservice ?? "default") ?? "";
4024
4034
  return h.path != null && (r = Ce(r, h.path)), r != null && r.endsWith("/") && (r = r.slice(0, r.length - 1)), r;
4025
4035
  }
4026
4036
  function L(c) {
@@ -4064,7 +4074,7 @@ let Hr;
4064
4074
  function Ru(e) {
4065
4075
  return Hr.usePresets(e);
4066
4076
  }
4067
- function Ya(e) {
4077
+ function Ja(e) {
4068
4078
  function t(a) {
4069
4079
  if (!a)
4070
4080
  return {};
@@ -4081,7 +4091,7 @@ let zr;
4081
4091
  function Uu() {
4082
4092
  return zr;
4083
4093
  }
4084
- function Ja() {
4094
+ function Ka() {
4085
4095
  function e(A) {
4086
4096
  nr.value = A.detail, Cr.value = !0;
4087
4097
  }
@@ -4111,7 +4121,7 @@ function Ja() {
4111
4121
  updateApp: o
4112
4122
  }, zr;
4113
4123
  }
4114
- const Ka = ["t", "r", "b", "l", "tr", "br", "bl", "tl"];
4124
+ const Qa = ["t", "r", "b", "l", "tr", "br", "bl", "tl"];
4115
4125
  function Bu(e, t = {}) {
4116
4126
  let a, l = t.handleWidth ?? 12, s = t.handleZIndex ?? 100, o = t.minWidth ?? 0, A = t.maxWidth ?? Number.MAX_SAFE_INTEGER, S = t.minHeight ?? 0, N = t.maxHeight ?? Number.MAX_SAFE_INTEGER, L = t.preventDefault ?? !1, R = t.stopPropagation ?? !1, b, c = [];
4117
4127
  const h = Y(!1);
@@ -4246,7 +4256,7 @@ function Bu(e, t = {}) {
4246
4256
  if (E.value)
4247
4257
  return;
4248
4258
  const V = ae(e);
4249
- V && (_(V, W ?? Ka), G(H), r.push(he(V.$el, "mousedown", D)), r.push(he(V.$el, "touchstart", D)), E.value = !0, a = H);
4259
+ V && (_(V, W ?? Qa), G(H), r.push(he(V.$el, "mousedown", D)), r.push(he(V.$el, "touchstart", D)), E.value = !0, a = H);
4250
4260
  }
4251
4261
  function we(W) {
4252
4262
  if (!E.value)
@@ -4264,7 +4274,7 @@ function Bu(e, t = {}) {
4264
4274
  }
4265
4275
  function $u(e) {
4266
4276
  const t = [];
4267
- return (e == null ? void 0 : e.required) == !0 && t.push((a) => !!a || "Field is required"), (e == null ? void 0 : e.otherRules) != null && (Array.isArray(e == null ? void 0 : e.otherRules) ? t.push(...e.otherRules) : t.push(e.otherRules)), (e == null ? void 0 : e.forPassword) == !0 && (t.push((a) => !!a || "Password is required"), t.push((a) => a != null && a.length > 9 || "Password must be 10 or more characters"), t.push((a) => /^(.*[a-z].*)$/.test(a) || "Password must contain a lowercase letter"), t.push((a) => /^(.*[A-Z].*)$/.test(a) || "Password must contain an uppercase letter"), t.push((a) => /^(.*\d.*)$/.test(a) || "Password must contain a number")), (e == null ? void 0 : e.forEmail) == !0 && (t.push((a) => !!a || "Email is required"), t.push((a) => ya(a) || "Email must be valid")), t;
4277
+ return (e == null ? void 0 : e.required) == !0 && t.push((a) => !!a || "Field is required"), (e == null ? void 0 : e.otherRules) != null && (Array.isArray(e == null ? void 0 : e.otherRules) ? t.push(...e.otherRules) : t.push(e.otherRules)), (e == null ? void 0 : e.forPassword) == !0 && (t.push((a) => !!a || "Password is required"), t.push((a) => a != null && a.length > 9 || "Password must be 10 or more characters"), t.push((a) => /^(.*[a-z].*)$/.test(a) || "Password must contain a lowercase letter"), t.push((a) => /^(.*[A-Z].*)$/.test(a) || "Password must contain an uppercase letter"), t.push((a) => /^(.*\d.*)$/.test(a) || "Password must contain a number")), (e == null ? void 0 : e.forEmail) == !0 && (t.push((a) => !!a || "Email is required"), t.push((a) => wa(a) || "Email must be valid")), t;
4268
4278
  }
4269
4279
  function Fu(e, t) {
4270
4280
  const a = Y(!1), l = ar(e);
@@ -4293,22 +4303,22 @@ function ku(e) {
4293
4303
  return {
4294
4304
  install() {
4295
4305
  var A;
4296
- Ca(e);
4297
- const t = Ma(), a = Za(e);
4298
- Ya(e), (A = e.auth).demo ?? (A.demo = t), e.auth.getAuthItem = a.findItem;
4299
- const l = Ia(e.auth), s = ba({
4306
+ Pa(e);
4307
+ const t = Ra(), a = Ya(e);
4308
+ Ja(e), (A = e.auth).demo ?? (A.demo = t), e.auth.getAuthItem = a.findItem;
4309
+ const l = xa(e.auth), s = Ea({
4300
4310
  auth: l,
4301
4311
  findPath: a.findPath,
4302
4312
  useBearerToken: !0
4303
- }), o = La({
4313
+ }), o = Ma({
4304
4314
  getTimeZone: l.getTimeZone
4305
4315
  });
4306
- Ua({
4316
+ Ba({
4307
4317
  dates: o
4308
- }), Ja(), Ga({
4318
+ }), Ka(), qa({
4309
4319
  api: s,
4310
4320
  auth: l
4311
- }), Da(e.urls);
4321
+ }), Ia(e.urls);
4312
4322
  }
4313
4323
  };
4314
4324
  }
@@ -4316,61 +4326,61 @@ export {
4316
4326
  yu as DataURIToBlob,
4317
4327
  ou as addWeekday,
4318
4328
  Ce as appendUrl,
4319
- cu as capitalizeWords,
4320
- au as checkImage,
4321
- da as containsSearch,
4329
+ fa as capitalizeWords,
4330
+ uu as checkImage,
4331
+ ma as containsSearch,
4322
4332
  su as containsWeekday,
4323
4333
  Qr as copyDeep,
4324
- ha as copyItemByAlphabet,
4325
- ba as createApi,
4326
- Ia as createAuth,
4334
+ da as copyItemByAlphabet,
4335
+ Ea as createApi,
4336
+ xa as createAuth,
4327
4337
  ku as createCore,
4328
- Ca as createCosmetics,
4329
- La as createDates,
4330
- Ma as createDemo,
4331
- Ua as createFilters,
4332
- Za as createNavigation,
4333
- Ja as createPWA,
4334
- Ya as createPresets,
4335
- za as createSessionStoreDefinition,
4336
- Ga as createStoreBuilder,
4337
- qa as createStoreDefinition,
4338
- Da as createUrl,
4338
+ Pa as createCosmetics,
4339
+ Ma as createDates,
4340
+ Ra as createDemo,
4341
+ Ba as createFilters,
4342
+ Ya as createNavigation,
4343
+ Ka as createPWA,
4344
+ Ja as createPresets,
4345
+ Za as createSessionStoreDefinition,
4346
+ qa as createStoreBuilder,
4347
+ Ha as createStoreDefinition,
4348
+ Ia as createUrl,
4339
4349
  bt as createWholeLastUpdateStoreDefinition,
4340
- oa as csvContains,
4350
+ ha as csvContains,
4341
4351
  Au as csvDefaults,
4342
4352
  Ut as deepSelect,
4343
- pa as extensionExists,
4344
- ma as extractErrorDescription,
4353
+ eu as extensionExists,
4354
+ va as extractErrorDescription,
4345
4355
  ia as fromCamelCase,
4346
- eu as getAreaAround,
4347
- ru as getAreaToLeft,
4348
- tu as getAreaToRight,
4349
- nu as getGoogleMapsLocationLine,
4350
- uu as getImageData,
4356
+ ru as getAreaAround,
4357
+ tu as getAreaToLeft,
4358
+ nu as getAreaToRight,
4359
+ au as getGoogleMapsLocationLine,
4360
+ lu as getImageData,
4351
4361
  Rt as getLocationLine,
4352
4362
  mu as getMinDate,
4353
- sa as getMinDateString,
4354
- va as getRandomColor,
4355
- ga as hasSearch,
4363
+ oa as getMinDateString,
4364
+ ga as getRandomColor,
4365
+ ya as hasSearch,
4356
4366
  du as isArrayOfLength,
4357
4367
  Fe as isLengthyArray,
4358
- fa as isMinDate,
4368
+ sa as isMinDate,
4359
4369
  Rr as nestedValue,
4360
4370
  hu as removeWeekday,
4361
4371
  vu as roundTo,
4362
- lu as toCamelCase,
4372
+ cu as toCamelCase,
4363
4373
  wu as toCompareString,
4364
4374
  gu as toggleCSV,
4365
4375
  bu as twiddleThumbs,
4366
4376
  la as useActions,
4367
4377
  ua as useActionsTracker,
4368
- wa as useApi,
4378
+ ba as useApi,
4369
4379
  Su as useAuth,
4370
4380
  vt as useAuthUrl,
4371
- Pa as useCSV,
4381
+ La as useCSV,
4372
4382
  _u as useCosmetics,
4373
- Aa as useDataUrl,
4383
+ Da as useDataUrl,
4374
4384
  Du as useDates,
4375
4385
  $t as useDbName,
4376
4386
  Iu as useDemo,
@@ -4387,10 +4397,10 @@ export {
4387
4397
  Bu as useResizable,
4388
4398
  $u as useRules,
4389
4399
  Pu as useStore,
4390
- ja as useStoreDefinition,
4400
+ Ga as useStoreDefinition,
4391
4401
  Fu as useTracker,
4392
4402
  Eu as useUrls,
4393
- ya as validEmail,
4403
+ wa as validEmail,
4394
4404
  Ye as weekdayPairs,
4395
4405
  fu as weekdayShortName,
4396
4406
  iu as weekdayValue
package/dist/index.d.ts CHANGED
@@ -1139,6 +1139,7 @@ export declare function useNavigation(): BTNavigation;
1139
1139
 
1140
1140
  export declare interface UseNavigationOptions {
1141
1141
  defaultCacheExpiryHours?: number;
1142
+ getDisplayName?: (navItem: NavigationItem) => string | undefined;
1142
1143
  navItems?: NavigationItem[];
1143
1144
  }
1144
1145
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bt-core-app",
3
- "version": "1.4.7",
3
+ "version": "1.4.9",
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": {
@@ -11,7 +11,16 @@
11
11
  "main": "./dist/bt-core-app.js",
12
12
  "module": "./dist/bt-core-app.js",
13
13
  "exports": {
14
- ".": "./dist/bt-core-app.js",
14
+ ".": {
15
+ "import": {
16
+ "types": "./dist/index.d.ts",
17
+ "default": "./dist/bt-core-app.js"
18
+ },
19
+ "require": {
20
+ "types": "./dist/index.d.ts",
21
+ "default": "./dist/bt-core-app.js"
22
+ }
23
+ },
15
24
  "./package.json": "./package.json"
16
25
  },
17
26
  "files": [