bt-core-app 1.4.85 → 1.4.87

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 +76 -77
  2. package/package.json +1 -1
@@ -3,7 +3,6 @@ import { watchArray as Or, useStorage as Zt, useEventListener as me, toValue as
3
3
  import { defineStore as pr } from "pinia";
4
4
  import { DateTime as he } from "luxon";
5
5
  import { useRouter as Mr, useRoute as et } from "vue-router";
6
- import "vuetify/styles";
7
6
  function Ot(e) {
8
7
  return (e || "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx").replace(/[xy]/g, pt);
9
8
  }
@@ -111,10 +110,10 @@ function Be(e, t) {
111
110
  while (S.startsWith("/"));
112
111
  return `${l}/${S}`;
113
112
  }
114
- function Jn(e) {
113
+ function Zn(e) {
115
114
  return e == null || !Array.isArray(e) ? e : [...new Set(e.map((t) => t))];
116
115
  }
117
- function jn(e = "blitzItExtensionExists") {
116
+ function Jn(e = "blitzItExtensionExists") {
118
117
  try {
119
118
  var t = document.getElementById(e);
120
119
  return t != null;
@@ -122,7 +121,7 @@ function jn(e = "blitzItExtensionExists") {
122
121
  return console.log(sn(l)), !1;
123
122
  }
124
123
  }
125
- function Kn(e, t) {
124
+ function jn(e, t) {
126
125
  return [
127
126
  { lat: e.lat - t, lng: e.lng + t },
128
127
  { lat: e.lat - t, lng: e.lng - t },
@@ -130,7 +129,7 @@ function Kn(e, t) {
130
129
  { lat: e.lat + t, lng: e.lng + t }
131
130
  ];
132
131
  }
133
- function Qn(e, t) {
132
+ function Kn(e, t) {
134
133
  return [
135
134
  { lat: e.lat - t * 2, lng: e.lng + t },
136
135
  { lat: e.lat - t * 2, lng: e.lng - t },
@@ -138,7 +137,7 @@ function Qn(e, t) {
138
137
  { lat: e.lat, lng: e.lng + t }
139
138
  ];
140
139
  }
141
- function Xn(e, t) {
140
+ function Qn(e, t) {
142
141
  return [
143
142
  { lat: e.lat, lng: e.lng + t },
144
143
  { lat: e.lat, lng: e.lng - t },
@@ -146,7 +145,7 @@ function Xn(e, t) {
146
145
  { lat: e.lat + t * 2, lng: e.lng + t }
147
146
  ];
148
147
  }
149
- function On(e) {
148
+ function Xn(e) {
150
149
  var t = rt(e, !0);
151
150
  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(" ", "");
152
151
  }
@@ -158,13 +157,13 @@ function rt(e, t = !1) {
158
157
  var l = "";
159
158
  return e.addressLineOne != null && !t && (l = e.addressLineOne + " "), e.streetNumber != null && (l = l + e.streetNumber + " "), e.streetName != null && (l = l + e.streetName + ", "), e.suburb != null && (l = l + e.suburb + " "), e.state != null && (l = l + e.state + " "), e.postcode != null && (l = l + e.postcode), l;
160
159
  }
161
- function pn(e, t, l) {
160
+ function On(e, t, l) {
162
161
  if (e) {
163
162
  var S = new Image();
164
163
  S.onload = t, S.onerror = l, S.src = e;
165
164
  }
166
165
  }
167
- async function ea(e, t = !0) {
166
+ async function pn(e, t = !0) {
168
167
  return new Promise((l, S) => {
169
168
  e == null && S("no url given");
170
169
  var s = new Image();
@@ -181,7 +180,7 @@ async function ea(e, t = !0) {
181
180
  function tn(e) {
182
181
  return e && e.replace(/([A-Z])/g, " $1").replace(/^./, (t) => t.toUpperCase());
183
182
  }
184
- function ra(e) {
183
+ function ea(e) {
185
184
  if (e != null && typeof e == "object")
186
185
  for (var t in e)
187
186
  /^[A-Z]/.test(t) && Object.hasOwnProperty.call(e, t) && (e[t.charAt(0).toLowerCase() + t.substring(1)] = e[t], delete e[t]);
@@ -200,25 +199,25 @@ const Ye = [
200
199
  { value: 7, short: "sat", values: ["sat", "saturday"] },
201
200
  { value: 0, short: "always", values: ["always", null, void 0] }
202
201
  ];
203
- function ta(e) {
202
+ function ra(e) {
204
203
  if (e == null)
205
204
  return 0;
206
205
  const t = e.replaceAll(" ", "").split(",").map((S) => S.toLowerCase()), l = Ye.filter((S) => S.values.some((s) => t.some((g) => s == g))).map((S) => S.value);
207
206
  return l.length == 0 ? 8 : Math.min(...l);
208
207
  }
209
- function na(e) {
208
+ function ta(e) {
210
209
  return e == null ? e : e.toLowerCase().replaceAll(" ", "").split(",").map((t) => {
211
210
  let l = Ye.find((S) => S.values.some((s) => s == t));
212
211
  return l != null ? l.short : "";
213
212
  }).filter((t) => t != null && t.length > 0).toString();
214
213
  }
215
- function aa(e, t) {
214
+ function na(e, t) {
216
215
  if (e == null || t == null)
217
216
  return !0;
218
217
  const l = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()), S = t.replaceAll(" ", "").toLowerCase(), s = Ye.find((g) => g.values.some((x) => x == S));
219
218
  return s != null && l.some((g) => g == s.short || s.values.some((x) => x == g));
220
219
  }
221
- function la(e, t) {
220
+ function aa(e, t) {
222
221
  if (t == null)
223
222
  return e;
224
223
  let l = e ?? "";
@@ -226,13 +225,13 @@ function la(e, t) {
226
225
  let S = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((s) => Ye.find((g) => g.values.some((x) => x == s))).filter((s) => s != null).sort(Ue.firstBy((s) => (s == null ? void 0 : s.value) ?? 0)).map((s) => s == null ? void 0 : s.short))].toString();
227
226
  return S.length > 0 ? S : void 0;
228
227
  }
229
- function ua(e, t) {
228
+ function la(e, t) {
230
229
  if (t == null || e == null)
231
230
  return e;
232
231
  let l = e ?? "", S = t.replaceAll(" ", "").toLowerCase(), s = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((g) => Ye.find((x) => x.values.some((P) => P == g && P != S))).filter((g) => g != null).sort(Ue.firstBy((g) => (g == null ? void 0 : g.value) ?? 0)).map((g) => g == null ? void 0 : g.short))].toString();
233
232
  return s.length > 0 ? s : void 0;
234
233
  }
235
- function ia(e, t) {
234
+ function ua(e, t) {
236
235
  return e != null && Array.isArray(e) && e.length == t;
237
236
  }
238
237
  function _e(e, t = 0) {
@@ -241,13 +240,13 @@ function _e(e, t = 0) {
241
240
  function an(e) {
242
241
  return e == "0001-01-01T00:00:00Z";
243
242
  }
244
- function ca() {
243
+ function ia() {
245
244
  return (/* @__PURE__ */ new Date("0001-01-01T00:00:00Z")).getTime();
246
245
  }
247
246
  function ln() {
248
247
  return "0001-01-01T00:00:00Z";
249
248
  }
250
- function fa(e, t) {
249
+ function ca(e, t) {
251
250
  let l = "1", S = 0;
252
251
  if (S < t)
253
252
  do
@@ -256,7 +255,7 @@ function fa(e, t) {
256
255
  let s = Number.parseInt(l);
257
256
  return Math.round(e * s) / s;
258
257
  }
259
- function sa(e, t) {
258
+ function fa(e, t) {
260
259
  let l = e ?? "";
261
260
  return t != null && (un(l, t) ? l = l.split(",").filter((S) => S != t).toString() : l != null ? l = `${l},${t}` : l = t), l != null && l.length > 0 ? l : null;
262
261
  }
@@ -295,7 +294,7 @@ function tt(e, t = (l) => l) {
295
294
  return _e(g) && S.push(...g), S;
296
295
  }, [])] : [];
297
296
  }
298
- function oa(e) {
297
+ function sa(e) {
299
298
  const t = e.split(","), l = t[0].indexOf("base64") >= 0 ? atob(t[1]) : decodeURI(t[1]), S = t[0].split(":")[1].split(";")[0], s = new Uint8Array(l.length);
300
299
  for (let g = 0; g < l.length; g++)
301
300
  s[g] = l.charCodeAt(g);
@@ -331,10 +330,10 @@ function dn(e, t, l) {
331
330
  }
332
331
  return !1;
333
332
  }
334
- function da(e) {
333
+ function oa(e) {
335
334
  return e != null ? e.replaceAll(" ", "").toLowerCase() : null;
336
335
  }
337
- function ha(e = 2e3) {
336
+ function da(e = 2e3) {
338
337
  return new Promise((t) => {
339
338
  setTimeout(() => t(), e);
340
339
  });
@@ -1823,7 +1822,7 @@ function gn(e) {
1823
1822
  const l = ue[t] ?? ue.development;
1824
1823
  return e == null ? l.data ?? "" : l.other[e] ?? l.data ?? "";
1825
1824
  }
1826
- function ma() {
1825
+ function ha() {
1827
1826
  return ue;
1828
1827
  }
1829
1828
  function yn(e) {
@@ -1837,7 +1836,7 @@ function ve() {
1837
1836
  const e = lt();
1838
1837
  return (Oe == null || Oe.config.name != e) && (Oe = at.createInstance({ name: e })), Oe;
1839
1838
  }
1840
- function va() {
1839
+ function ma() {
1841
1840
  async function e(s) {
1842
1841
  const g = ve();
1843
1842
  (await g.keys()).filter((_) => _.startsWith(s)).forEach((_) => {
@@ -1861,7 +1860,7 @@ function va() {
1861
1860
  };
1862
1861
  }
1863
1862
  let er;
1864
- function ga(e) {
1863
+ function va(e) {
1865
1864
  return er(e)();
1866
1865
  }
1867
1866
  function Le(e) {
@@ -3042,10 +3041,10 @@ const mr = {
3042
3041
  warning: "#FB8C00"
3043
3042
  };
3044
3043
  let Dr;
3045
- function ya() {
3044
+ function ga() {
3046
3045
  return Dr;
3047
3046
  }
3048
- function wa(e) {
3047
+ function ya(e) {
3049
3048
  const t = localStorage.getItem("cosmetics");
3050
3049
  let l;
3051
3050
  return t != null && t.length > 0 && (l = JSON.parse(t)), l ?? (l = {}), l.dark ?? (l.dark = e == null ? void 0 : e.dark), l.light ?? (l.light = e == null ? void 0 : e.light), l.theme ?? (l.theme = e == null ? void 0 : e.defaultTheme), {
@@ -3126,7 +3125,7 @@ function Pn(e) {
3126
3125
  undoTemporaryColor: $
3127
3126
  }, Dr;
3128
3127
  }
3129
- const ba = {
3128
+ const wa = {
3130
3129
  canExportCSV: !1
3131
3130
  };
3132
3131
  function Nn() {
@@ -3183,7 +3182,7 @@ function Nn() {
3183
3182
  };
3184
3183
  }
3185
3184
  let xr;
3186
- function Sa() {
3185
+ function ba() {
3187
3186
  return xr;
3188
3187
  }
3189
3188
  function Mn(e) {
@@ -3228,7 +3227,7 @@ function Mn(e) {
3228
3227
  }, xr;
3229
3228
  }
3230
3229
  let Tr;
3231
- function Aa() {
3230
+ function Sa() {
3232
3231
  return Tr;
3233
3232
  }
3234
3233
  function Ln(e) {
@@ -3340,7 +3339,7 @@ function Ln(e) {
3340
3339
  }, Tr;
3341
3340
  }
3342
3341
  var Rn = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
3343
- function Ea(e) {
3342
+ function Aa(e) {
3344
3343
  function t(l) {
3345
3344
  var s;
3346
3345
  const S = l.matched.slice().reverse().find((g) => g.meta && g.meta.title);
@@ -3357,7 +3356,7 @@ function Ea(e) {
3357
3356
  };
3358
3357
  }
3359
3358
  let _r;
3360
- function Ia() {
3359
+ function Ea() {
3361
3360
  return _r;
3362
3361
  }
3363
3362
  function Un(e) {
@@ -3510,7 +3509,7 @@ function Bn(e, t) {
3510
3509
  restartTracker: x
3511
3510
  };
3512
3511
  }
3513
- function Da(e, t) {
3512
+ function Ia(e, t) {
3514
3513
  var ae;
3515
3514
  const {
3516
3515
  // useBladeSrc = true,
@@ -3748,7 +3747,7 @@ function $n(e) {
3748
3747
  updateNavigationProperties: d
3749
3748
  }, Cr;
3750
3749
  }
3751
- function xa(e, t, l) {
3750
+ function Da(e, t, l) {
3752
3751
  var qe, He;
3753
3752
  const S = Nn(), s = it(), g = Mr(), x = et(), { bladeData: P } = Cn({}), _ = e.useBladeSrc ?? !0, N = e.useRouteSrc ?? !0, $ = e.nav ?? e.bladeName ?? e.itemBladeName ?? "basic", d = e.storeMode ?? ((qe = s.findItem($)) == null ? void 0 : qe.storeMode), h = e.storageMode ?? ((He = s.findItem($)) == null ? void 0 : He.storageMode), u = K(e.customFilters) ?? [], r = z([]), y = te(() => Kt([
3754
3753
  ...u.filter((U) => U.name != null).map((U) => U.name),
@@ -4017,7 +4016,7 @@ function Fn(e) {
4017
4016
  useRoutes: e == null ? void 0 : e.useRoutes
4018
4017
  }, Ge;
4019
4018
  }
4020
- function Ta() {
4019
+ function xa() {
4021
4020
  const e = Mr(), t = it(), l = In();
4022
4021
  let S = e.getRoutes();
4023
4022
  return {
@@ -4052,7 +4051,7 @@ function Ta() {
4052
4051
  };
4053
4052
  }
4054
4053
  let Pr;
4055
- function _a(e) {
4054
+ function Ta(e) {
4056
4055
  return Pr.usePresets(e);
4057
4056
  }
4058
4057
  function kn(e) {
@@ -4069,7 +4068,7 @@ function kn(e) {
4069
4068
  let Zr, Jr, jr, Kr = !1;
4070
4069
  const wr = z(!1), br = z(!1), Qr = z(), pe = z();
4071
4070
  let Nr;
4072
- function Ca() {
4071
+ function _a() {
4073
4072
  return Nr;
4074
4073
  }
4075
4074
  function Gn() {
@@ -4102,11 +4101,11 @@ function Gn() {
4102
4101
  updateApp: g
4103
4102
  }, Nr;
4104
4103
  }
4105
- function Pa(e) {
4104
+ function Ca(e) {
4106
4105
  const t = [];
4107
4106
  return (e == null ? void 0 : e.required) == !0 && t.push((l) => !!l || "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((l) => !!l || "Password is required"), t.push((l) => l != null && l.length > 9 || "Password must be 10 or more characters"), t.push((l) => /^(.*[a-z].*)$/.test(l) || "Password must contain a lowercase letter"), t.push((l) => /^(.*[A-Z].*)$/.test(l) || "Password must contain an uppercase letter"), t.push((l) => /^(.*\d.*)$/.test(l) || "Password must contain a number")), (e == null ? void 0 : e.forEmail) == !0 && (t.push((l) => !!l || "Email is required"), t.push((l) => hn(l) || "Email must be valid")), t;
4108
4107
  }
4109
- function Na(e) {
4108
+ function Pa(e) {
4110
4109
  return {
4111
4110
  install(t, l) {
4112
4111
  var _;
@@ -4133,18 +4132,18 @@ function Na(e) {
4133
4132
  };
4134
4133
  }
4135
4134
  export {
4136
- oa as DataURIToBlob,
4137
- la as addWeekday,
4135
+ sa as DataURIToBlob,
4136
+ aa as addWeekday,
4138
4137
  Be as appendUrl,
4139
4138
  nn as capitalizeWords,
4140
- pn as checkImage,
4139
+ On as checkImage,
4141
4140
  fn as containsSearch,
4142
- aa as containsWeekday,
4141
+ na as containsWeekday,
4143
4142
  Lr as copyDeep,
4144
4143
  cn as copyItemByAlphabet,
4145
4144
  En as createApi,
4146
4145
  Dn as createAuth,
4147
- Na as createCore,
4146
+ Pa as createCore,
4148
4147
  Pn as createCosmetics,
4149
4148
  Mn as createDates,
4150
4149
  Ln as createDemo,
@@ -4158,33 +4157,33 @@ export {
4158
4157
  yn as createUrl,
4159
4158
  qr as createWholeLastUpdateStoreDefinition,
4160
4159
  un as csvContains,
4161
- ba as csvDefaults,
4160
+ wa as csvDefaults,
4162
4161
  tt as deepSelect,
4163
- Jn as distinct,
4164
- jn as extensionExists,
4162
+ Zn as distinct,
4163
+ Jn as extensionExists,
4165
4164
  sn as extractErrorDescription,
4166
4165
  tn as fromCamelCase,
4167
- Kn as getAreaAround,
4168
- Qn as getAreaToLeft,
4169
- Xn as getAreaToRight,
4170
- On as getGoogleMapsLocationLine,
4171
- ea as getImageData,
4166
+ jn as getAreaAround,
4167
+ Kn as getAreaToLeft,
4168
+ Qn as getAreaToRight,
4169
+ Xn as getGoogleMapsLocationLine,
4170
+ pn as getImageData,
4172
4171
  rt as getLocationLine,
4173
- ca as getMinDate,
4172
+ ia as getMinDate,
4174
4173
  ln as getMinDateString,
4175
4174
  on as getRandomColor,
4176
4175
  dn as hasSearch,
4177
- ia as isArrayOfLength,
4176
+ ua as isArrayOfLength,
4178
4177
  _e as isLengthyArray,
4179
4178
  an as isMinDate,
4180
4179
  Sr as nestedValue,
4181
- ua as removeWeekday,
4182
- fa as roundTo,
4180
+ la as removeWeekday,
4181
+ ca as roundTo,
4183
4182
  mn as singularize,
4184
- ra as toCamelCase,
4185
- da as toCompareString,
4186
- sa as toggleCSV,
4187
- ha as twiddleThumbs,
4183
+ ea as toCamelCase,
4184
+ oa as toCompareString,
4185
+ fa as toggleCSV,
4186
+ da as twiddleThumbs,
4188
4187
  ut as useActions,
4189
4188
  en as useActionsTracker,
4190
4189
  Er as useApi,
@@ -4192,32 +4191,32 @@ export {
4192
4191
  Wr as useAuthUrl,
4193
4192
  Cn as useBlade,
4194
4193
  Nn as useCSV,
4195
- ya as useCosmetics,
4194
+ ga as useCosmetics,
4196
4195
  gn as useDataUrl,
4197
- Sa as useDates,
4196
+ ba as useDates,
4198
4197
  lt as useDbName,
4199
- Aa as useDemo,
4200
- Ea as useDocumentMeta,
4198
+ Sa as useDemo,
4199
+ Aa as useDocumentMeta,
4201
4200
  xn as useDraggable,
4202
- Ia as useFilters,
4201
+ Ea as useFilters,
4203
4202
  Ot as useId,
4204
- Da as useItem,
4205
- xa as useList,
4206
- va as useLocalCache,
4207
- wa as useLocalCosmetics,
4203
+ Ia as useItem,
4204
+ Da as useList,
4205
+ ma as useLocalCache,
4206
+ ya as useLocalCosmetics,
4208
4207
  ve as useLocalDb,
4209
- Ta as useMenu,
4208
+ xa as useMenu,
4210
4209
  it as useNavigation,
4211
- Ca as usePWA,
4212
- _a as usePresets,
4210
+ _a as usePWA,
4211
+ Ta as usePresets,
4213
4212
  _n as useResizable,
4214
- Pa as useRules,
4215
- ga as useStore,
4213
+ Ca as useRules,
4214
+ va as useStore,
4216
4215
  Le as useStoreDefinition,
4217
4216
  Bn as useTracker,
4218
- ma as useUrls,
4217
+ ha as useUrls,
4219
4218
  hn as validEmail,
4220
4219
  Ye as weekdayPairs,
4221
- na as weekdayShortName,
4222
- ta as weekdayValue
4220
+ ta as weekdayShortName,
4221
+ ra as weekdayValue
4223
4222
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bt-core-app",
3
- "version": "1.4.85",
3
+ "version": "1.4.87",
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": {