bt-core-app 1.4.78 → 1.4.80

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.
@@ -111,10 +111,10 @@ function Ue(e, t) {
111
111
  while (S.startsWith("/"));
112
112
  return `${a}/${S}`;
113
113
  }
114
- function aa(e) {
114
+ function na(e) {
115
115
  return e == null || !Array.isArray(e) ? e : [...new Set(e.map((t) => t))];
116
116
  }
117
- function la(e = "blitzItExtensionExists") {
117
+ function aa(e = "blitzItExtensionExists") {
118
118
  try {
119
119
  var t = document.getElementById(e);
120
120
  return t != null;
@@ -122,7 +122,7 @@ function la(e = "blitzItExtensionExists") {
122
122
  return console.log(Sn(a)), !1;
123
123
  }
124
124
  }
125
- function ua(e, t) {
125
+ function la(e, t) {
126
126
  return [
127
127
  { lat: e.lat - t, lng: e.lng + t },
128
128
  { lat: e.lat - t, lng: e.lng - t },
@@ -130,7 +130,7 @@ function ua(e, t) {
130
130
  { lat: e.lat + t, lng: e.lng + t }
131
131
  ];
132
132
  }
133
- function ia(e, t) {
133
+ function ua(e, t) {
134
134
  return [
135
135
  { lat: e.lat - t * 2, lng: e.lng + t },
136
136
  { lat: e.lat - t * 2, lng: e.lng - t },
@@ -138,7 +138,7 @@ function ia(e, t) {
138
138
  { lat: e.lat, lng: e.lng + t }
139
139
  ];
140
140
  }
141
- function ca(e, t) {
141
+ function ia(e, t) {
142
142
  return [
143
143
  { lat: e.lat, lng: e.lng + t },
144
144
  { lat: e.lat, lng: e.lng - t },
@@ -146,7 +146,7 @@ function ca(e, t) {
146
146
  { lat: e.lat + t * 2, lng: e.lng + t }
147
147
  ];
148
148
  }
149
- function fa(e) {
149
+ function ca(e) {
150
150
  var t = nt(e, !0);
151
151
  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
152
  }
@@ -158,13 +158,13 @@ function nt(e, t = !1) {
158
158
  var a = "";
159
159
  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;
160
160
  }
161
- function sa(e, t, a) {
161
+ function fa(e, t, a) {
162
162
  if (e) {
163
163
  var S = new Image();
164
164
  S.onload = t, S.onerror = a, S.src = e;
165
165
  }
166
166
  }
167
- async function oa(e, t = !0) {
167
+ async function sa(e, t = !0) {
168
168
  return new Promise((a, S) => {
169
169
  e == null && S("no url given");
170
170
  var f = new Image();
@@ -181,7 +181,7 @@ async function oa(e, t = !0) {
181
181
  function mn(e) {
182
182
  return e && e.replace(/([A-Z])/g, " $1").replace(/^./, (t) => t.toUpperCase());
183
183
  }
184
- function da(e) {
184
+ function oa(e) {
185
185
  if (e != null && typeof e == "object")
186
186
  for (var t in e)
187
187
  /^[A-Z]/.test(t) && Object.hasOwnProperty.call(e, t) && (e[t.charAt(0).toLowerCase() + t.substring(1)] = e[t], delete e[t]);
@@ -200,25 +200,25 @@ const Ye = [
200
200
  { value: 7, short: "sat", values: ["sat", "saturday"] },
201
201
  { value: 0, short: "always", values: ["always", null, void 0] }
202
202
  ];
203
- function ma(e) {
203
+ function da(e) {
204
204
  if (e == null)
205
205
  return 0;
206
206
  const t = e.replaceAll(" ", "").split(",").map((S) => S.toLowerCase()), a = Ye.filter((S) => S.values.some((f) => t.some((g) => f == g))).map((S) => S.value);
207
207
  return a.length == 0 ? 8 : Math.min(...a);
208
208
  }
209
- function ha(e) {
209
+ function ma(e) {
210
210
  return e == null ? e : e.toLowerCase().replaceAll(" ", "").split(",").map((t) => {
211
211
  let a = Ye.find((S) => S.values.some((f) => f == t));
212
212
  return a != null ? a.short : "";
213
213
  }).filter((t) => t != null && t.length > 0).toString();
214
214
  }
215
- function va(e, t) {
215
+ function ha(e, t) {
216
216
  if (e == null || t == null)
217
217
  return !0;
218
218
  const a = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()), S = t.replaceAll(" ", "").toLowerCase(), f = Ye.find((g) => g.values.some((D) => D == S));
219
219
  return f != null && a.some((g) => g == f.short || f.values.some((D) => D == g));
220
220
  }
221
- function ga(e, t) {
221
+ function va(e, t) {
222
222
  if (t == null)
223
223
  return e;
224
224
  let a = e ?? "";
@@ -226,13 +226,13 @@ function ga(e, t) {
226
226
  let S = [...new Set(a.replaceAll(" ", "").toLowerCase().split(",").map((f) => Ye.find((g) => g.values.some((D) => D == f))).filter((f) => f != null).sort(Be.firstBy((f) => (f == null ? void 0 : f.value) ?? 0)).map((f) => f == null ? void 0 : f.short))].toString();
227
227
  return S.length > 0 ? S : void 0;
228
228
  }
229
- function ya(e, t) {
229
+ function ga(e, t) {
230
230
  if (t == null || e == null)
231
231
  return e;
232
232
  let a = e ?? "", S = t.replaceAll(" ", "").toLowerCase(), f = [...new Set(a.replaceAll(" ", "").toLowerCase().split(",").map((g) => Ye.find((D) => D.values.some((C) => C == g && C != S))).filter((g) => g != null).sort(Be.firstBy((g) => (g == null ? void 0 : g.value) ?? 0)).map((g) => g == null ? void 0 : g.short))].toString();
233
233
  return f.length > 0 ? f : void 0;
234
234
  }
235
- function wa(e, t) {
235
+ function ya(e, t) {
236
236
  return e != null && Array.isArray(e) && e.length == t;
237
237
  }
238
238
  function _e(e, t = 0) {
@@ -241,13 +241,13 @@ function _e(e, t = 0) {
241
241
  function vn(e) {
242
242
  return e == "0001-01-01T00:00:00Z";
243
243
  }
244
- function ba() {
244
+ function wa() {
245
245
  return (/* @__PURE__ */ new Date("0001-01-01T00:00:00Z")).getTime();
246
246
  }
247
247
  function gn() {
248
248
  return "0001-01-01T00:00:00Z";
249
249
  }
250
- function Sa(e, t) {
250
+ function ba(e, t) {
251
251
  let a = "1", S = 0;
252
252
  if (S < t)
253
253
  do
@@ -256,7 +256,7 @@ function Sa(e, t) {
256
256
  let f = Number.parseInt(a);
257
257
  return Math.round(e * f) / f;
258
258
  }
259
- function Aa(e, t) {
259
+ function Sa(e, t) {
260
260
  let a = e ?? "";
261
261
  return t != null && (yn(a, t) ? a = a.split(",").filter((S) => S != t).toString() : a != null ? a = `${a},${t}` : a = t), a != null && a.length > 0 ? a : null;
262
262
  }
@@ -295,7 +295,7 @@ function at(e, t = (a) => a) {
295
295
  return _e(g) && S.push(...g), S;
296
296
  }, [])] : [];
297
297
  }
298
- function Ea(e) {
298
+ function Aa(e) {
299
299
  const t = e.split(","), a = t[0].indexOf("base64") >= 0 ? atob(t[1]) : decodeURI(t[1]), S = t[0].split(":")[1].split(";")[0], f = new Uint8Array(a.length);
300
300
  for (let g = 0; g < a.length; g++)
301
301
  f[g] = a.charCodeAt(g);
@@ -331,10 +331,10 @@ function En(e, t, a) {
331
331
  }
332
332
  return !1;
333
333
  }
334
- function Ia(e) {
334
+ function Ea(e) {
335
335
  return e != null ? e.replaceAll(" ", "").toLowerCase() : null;
336
336
  }
337
- function Da(e = 2e3) {
337
+ function Ia(e = 2e3) {
338
338
  return new Promise((t) => {
339
339
  setTimeout(() => t(), e);
340
340
  });
@@ -1823,7 +1823,7 @@ function Tn(e) {
1823
1823
  const a = ue[t] ?? ue.development;
1824
1824
  return e == null ? a.data ?? "" : a.other[e] ?? a.data ?? "";
1825
1825
  }
1826
- function xa() {
1826
+ function Da() {
1827
1827
  return ue;
1828
1828
  }
1829
1829
  function _n(e) {
@@ -1837,7 +1837,7 @@ function ve() {
1837
1837
  const e = it();
1838
1838
  return (er == null || er.config.name != e) && (er = ut.createInstance({ name: e })), er;
1839
1839
  }
1840
- function Ta() {
1840
+ function xa() {
1841
1841
  async function e(f) {
1842
1842
  const g = ve();
1843
1843
  (await g.keys()).filter((_) => _.startsWith(f)).forEach((_) => {
@@ -1861,7 +1861,7 @@ function Ta() {
1861
1861
  };
1862
1862
  }
1863
1863
  let tr;
1864
- function _a(e) {
1864
+ function Ta(e) {
1865
1865
  return tr(e)();
1866
1866
  }
1867
1867
  function Le(e) {
@@ -3042,10 +3042,10 @@ const gr = {
3042
3042
  warning: "#FB8C00"
3043
3043
  };
3044
3044
  let Tr;
3045
- function Ca() {
3045
+ function _a() {
3046
3046
  return Tr;
3047
3047
  }
3048
- function Pa(e) {
3048
+ function Ca(e) {
3049
3049
  const t = localStorage.getItem("cosmetics");
3050
3050
  let a;
3051
3051
  return t != null && t.length > 0 && (a = JSON.parse(t)), a ?? (a = {}), a.dark ?? (a.dark = e == null ? void 0 : e.dark), a.light ?? (a.light = e == null ? void 0 : e.light), a.theme ?? (a.theme = e == null ? void 0 : e.defaultTheme), {
@@ -3126,7 +3126,7 @@ function Gn(e) {
3126
3126
  undoTemporaryColor: U
3127
3127
  }, Tr;
3128
3128
  }
3129
- const Ma = {
3129
+ const Pa = {
3130
3130
  canExportCSV: !1
3131
3131
  };
3132
3132
  function Wn() {
@@ -3183,7 +3183,7 @@ function Wn() {
3183
3183
  };
3184
3184
  }
3185
3185
  let _r;
3186
- function Na() {
3186
+ function Ma() {
3187
3187
  return _r;
3188
3188
  }
3189
3189
  function qn(e) {
@@ -3228,7 +3228,7 @@ function qn(e) {
3228
3228
  }, _r;
3229
3229
  }
3230
3230
  let Cr;
3231
- function La() {
3231
+ function Na() {
3232
3232
  return Cr;
3233
3233
  }
3234
3234
  function Vn(e) {
@@ -3340,7 +3340,7 @@ function Vn(e) {
3340
3340
  }, Cr;
3341
3341
  }
3342
3342
  var Hn = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
3343
- function Ra(e) {
3343
+ function La(e) {
3344
3344
  function t(a) {
3345
3345
  var f;
3346
3346
  const S = a.matched.slice().reverse().find((g) => g.meta && g.meta.title);
@@ -3357,7 +3357,7 @@ function Ra(e) {
3357
3357
  };
3358
3358
  }
3359
3359
  let Pr;
3360
- function Ba() {
3360
+ function Ra() {
3361
3361
  return Pr;
3362
3362
  }
3363
3363
  function zn(e) {
@@ -3510,7 +3510,7 @@ function Yn(e, t) {
3510
3510
  restartTracker: D
3511
3511
  };
3512
3512
  }
3513
- function Ua(e, t) {
3513
+ function Ba(e, t) {
3514
3514
  var ae;
3515
3515
  const {
3516
3516
  // useBladeSrc = true,
@@ -3748,7 +3748,7 @@ function Zn(e) {
3748
3748
  updateNavigationProperties: d
3749
3749
  }, Mr;
3750
3750
  }
3751
- function $a(e, t, a) {
3751
+ function Ua(e, t, a) {
3752
3752
  var qe, Ve;
3753
3753
  const S = Wn(), f = ft(), g = Rr(), D = tt(), { bladeData: C } = kn({}), _ = e.useBladeSrc ?? !0, M = e.useRouteSrc ?? !0, U = e.nav ?? e.bladeName ?? e.itemBladeName ?? "basic", d = e.storeMode ?? ((qe = f.findItem(U)) == null ? void 0 : qe.storeMode), m = e.storageMode ?? ((Ve = f.findItem(U)) == null ? void 0 : Ve.storageMode), u = K(e.customFilters) ?? [], r = z([]), y = O(() => nn([
3754
3754
  ...u.filter((B) => B.name != null).map((B) => B.name),
@@ -4017,7 +4017,7 @@ function Jn(e) {
4017
4017
  useRoutes: e == null ? void 0 : e.useRoutes
4018
4018
  }, Ge;
4019
4019
  }
4020
- function Fa() {
4020
+ function $a() {
4021
4021
  const e = Rr(), t = ft(), a = Rn();
4022
4022
  let S = e.getRoutes();
4023
4023
  return {
@@ -4052,7 +4052,7 @@ function Fa() {
4052
4052
  };
4053
4053
  }
4054
4054
  let Nr;
4055
- function ka(e) {
4055
+ function Fa(e) {
4056
4056
  return Nr.usePresets(e);
4057
4057
  }
4058
4058
  function jn(e) {
@@ -4069,7 +4069,7 @@ function jn(e) {
4069
4069
  let jr, Kr, Qr, Xr = !1;
4070
4070
  const Sr = z(!1), Ar = z(!1), Or = z(), rr = z();
4071
4071
  let Lr;
4072
- function Ga() {
4072
+ function ka() {
4073
4073
  return Lr;
4074
4074
  }
4075
4075
  function Kn() {
@@ -4102,11 +4102,37 @@ function Kn() {
4102
4102
  updateApp: g
4103
4103
  }, Lr;
4104
4104
  }
4105
- function Wa(e) {
4105
+ function Ga(e) {
4106
4106
  const t = [];
4107
4107
  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) => In(a) || "Email must be valid")), t;
4108
4108
  }
4109
- const Qn = /* @__PURE__ */ jt({
4109
+ function Wa(e) {
4110
+ return {
4111
+ install(t, a) {
4112
+ var _;
4113
+ console.log(t), e.vuetifyInstance ?? (e.vuetifyInstance = a.vuetifyInstance), _n(e.urls), Gn(e);
4114
+ const S = Vn(), f = Zn(e);
4115
+ jn(e), (_ = e.auth).demo ?? (_.demo = S), e.auth.getAuthItem = f.findItem;
4116
+ const g = Bn(e.auth);
4117
+ Jn(e.menu);
4118
+ const D = Ln({
4119
+ auth: g,
4120
+ findPath: f.findPath,
4121
+ useBearerToken: !0
4122
+ }), C = qn({
4123
+ getTimeZone: () => g.timeZone.value
4124
+ });
4125
+ zn({
4126
+ dates: C
4127
+ }), Kn(), Cn({
4128
+ api: D,
4129
+ auth: g,
4130
+ navigation: f
4131
+ });
4132
+ }
4133
+ };
4134
+ }
4135
+ const qa = /* @__PURE__ */ jt({
4110
4136
  inheritAttrs: !1,
4111
4137
  __name: "BT-Field-String",
4112
4138
  props: {
@@ -4152,45 +4178,20 @@ const Qn = /* @__PURE__ */ jt({
4152
4178
  }, 8, ["lg", "md", "sm", "cols"]));
4153
4179
  }
4154
4180
  });
4155
- function qa(e) {
4156
- return {
4157
- install(t, a) {
4158
- var _;
4159
- t.component("bt-field-string", Qn), e.vuetifyInstance ?? (e.vuetifyInstance = a.vuetifyInstance), _n(e.urls), Gn(e);
4160
- const S = Vn(), f = Zn(e);
4161
- jn(e), (_ = e.auth).demo ?? (_.demo = S), e.auth.getAuthItem = f.findItem;
4162
- const g = Bn(e.auth);
4163
- Jn(e.menu);
4164
- const D = Ln({
4165
- auth: g,
4166
- findPath: f.findPath,
4167
- useBearerToken: !0
4168
- }), C = qn({
4169
- getTimeZone: () => g.timeZone.value
4170
- });
4171
- zn({
4172
- dates: C
4173
- }), Kn(), Cn({
4174
- api: D,
4175
- auth: g,
4176
- navigation: f
4177
- });
4178
- }
4179
- };
4180
- }
4181
4181
  export {
4182
- Ea as DataURIToBlob,
4183
- ga as addWeekday,
4182
+ qa as BTFieldString,
4183
+ Aa as DataURIToBlob,
4184
+ va as addWeekday,
4184
4185
  Ue as appendUrl,
4185
4186
  hn as capitalizeWords,
4186
- sa as checkImage,
4187
+ fa as checkImage,
4187
4188
  bn as containsSearch,
4188
- va as containsWeekday,
4189
+ ha as containsWeekday,
4189
4190
  Br as copyDeep,
4190
4191
  wn as copyItemByAlphabet,
4191
4192
  Ln as createApi,
4192
4193
  Bn as createAuth,
4193
- qa as createCore,
4194
+ Wa as createCore,
4194
4195
  Gn as createCosmetics,
4195
4196
  qn as createDates,
4196
4197
  Vn as createDemo,
@@ -4204,33 +4205,33 @@ export {
4204
4205
  _n as createUrl,
4205
4206
  Hr as createWholeLastUpdateStoreDefinition,
4206
4207
  yn as csvContains,
4207
- Ma as csvDefaults,
4208
+ Pa as csvDefaults,
4208
4209
  at as deepSelect,
4209
- aa as distinct,
4210
- la as extensionExists,
4210
+ na as distinct,
4211
+ aa as extensionExists,
4211
4212
  Sn as extractErrorDescription,
4212
4213
  mn as fromCamelCase,
4213
- ua as getAreaAround,
4214
- ia as getAreaToLeft,
4215
- ca as getAreaToRight,
4216
- fa as getGoogleMapsLocationLine,
4217
- oa as getImageData,
4214
+ la as getAreaAround,
4215
+ ua as getAreaToLeft,
4216
+ ia as getAreaToRight,
4217
+ ca as getGoogleMapsLocationLine,
4218
+ sa as getImageData,
4218
4219
  nt as getLocationLine,
4219
- ba as getMinDate,
4220
+ wa as getMinDate,
4220
4221
  gn as getMinDateString,
4221
4222
  An as getRandomColor,
4222
4223
  En as hasSearch,
4223
- wa as isArrayOfLength,
4224
+ ya as isArrayOfLength,
4224
4225
  _e as isLengthyArray,
4225
4226
  vn as isMinDate,
4226
4227
  Er as nestedValue,
4227
- ya as removeWeekday,
4228
- Sa as roundTo,
4228
+ ga as removeWeekday,
4229
+ ba as roundTo,
4229
4230
  Dn as singularize,
4230
- da as toCamelCase,
4231
- Ia as toCompareString,
4232
- Aa as toggleCSV,
4233
- Da as twiddleThumbs,
4231
+ oa as toCamelCase,
4232
+ Ea as toCompareString,
4233
+ Sa as toggleCSV,
4234
+ Ia as twiddleThumbs,
4234
4235
  ct as useActions,
4235
4236
  on as useActionsTracker,
4236
4237
  Dr as useApi,
@@ -4238,32 +4239,32 @@ export {
4238
4239
  Vr as useAuthUrl,
4239
4240
  kn as useBlade,
4240
4241
  Wn as useCSV,
4241
- Ca as useCosmetics,
4242
+ _a as useCosmetics,
4242
4243
  Tn as useDataUrl,
4243
- Na as useDates,
4244
+ Ma as useDates,
4244
4245
  it as useDbName,
4245
- La as useDemo,
4246
- Ra as useDocumentMeta,
4246
+ Na as useDemo,
4247
+ La as useDocumentMeta,
4247
4248
  Un as useDraggable,
4248
- Ba as useFilters,
4249
+ Ra as useFilters,
4249
4250
  fn as useId,
4250
- Ua as useItem,
4251
- $a as useList,
4252
- Ta as useLocalCache,
4253
- Pa as useLocalCosmetics,
4251
+ Ba as useItem,
4252
+ Ua as useList,
4253
+ xa as useLocalCache,
4254
+ Ca as useLocalCosmetics,
4254
4255
  ve as useLocalDb,
4255
- Fa as useMenu,
4256
+ $a as useMenu,
4256
4257
  ft as useNavigation,
4257
- Ga as usePWA,
4258
- ka as usePresets,
4258
+ ka as usePWA,
4259
+ Fa as usePresets,
4259
4260
  Fn as useResizable,
4260
- Wa as useRules,
4261
- _a as useStore,
4261
+ Ga as useRules,
4262
+ Ta as useStore,
4262
4263
  Le as useStoreDefinition,
4263
4264
  Yn as useTracker,
4264
- xa as useUrls,
4265
+ Da as useUrls,
4265
4266
  In as validEmail,
4266
4267
  Ye as weekdayPairs,
4267
- ha as weekdayShortName,
4268
- ma as weekdayValue
4268
+ ma as weekdayShortName,
4269
+ da as weekdayValue
4269
4270
  };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { App } from 'vue';
2
+ import { default as BTFieldString } from './components/BT-Field-String.vue';
2
3
  import { ComponentPublicInstance } from 'vue';
3
4
  import { ComputedRef } from 'vue';
4
5
  import { DateTime } from 'luxon';
@@ -186,6 +187,8 @@ export declare interface BTDocumentMeta {
186
187
  updateMeta: (to: RouteLocationNormalized) => void;
187
188
  }
188
189
 
190
+ export { BTFieldString }
191
+
189
192
  export declare interface BTFilters {
190
193
  findFilter: (mFilter: string | undefined) => Function;
191
194
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bt-core-app",
3
- "version": "1.4.78",
3
+ "version": "1.4.80",
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": {