bt-core-app 1.4.171 → 1.4.172

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.
@@ -29790,6 +29790,32 @@ function sy(e, t) {
29790
29790
  toggleMode: Q
29791
29791
  };
29792
29792
  }
29793
+ function q_(e) {
29794
+ const t = [];
29795
+ function n() {
29796
+ t.every((r) => r.loaded) && e.onAllLoaded();
29797
+ }
29798
+ function a(r) {
29799
+ const l = {
29800
+ nav: r.nav ?? r.bladeName ?? "",
29801
+ loaded: !1
29802
+ };
29803
+ if (t.push(l), r.onFinished == null)
29804
+ r.onFinished = () => {
29805
+ l.loaded = !0, n();
29806
+ };
29807
+ else {
29808
+ const i = r.onFinished;
29809
+ r.onFinished = () => {
29810
+ l.loaded = !0, n(), i();
29811
+ };
29812
+ }
29813
+ return r;
29814
+ }
29815
+ return {
29816
+ registerList: a
29817
+ };
29818
+ }
29793
29819
  let Fr;
29794
29820
  function TM(e) {
29795
29821
  const t = U((e == null ? void 0 : e.default) ?? "Admin"), n = U((e == null ? void 0 : e.groups) ?? []);
@@ -29836,7 +29862,7 @@ function MM() {
29836
29862
  let lf, sf, of, uf = !1;
29837
29863
  const so = U(!1), oo = U(!1), cf = U(), ki = U();
29838
29864
  let Go;
29839
- function q_() {
29865
+ function G_() {
29840
29866
  return Go;
29841
29867
  }
29842
29868
  function _M() {
@@ -29870,7 +29896,7 @@ function _M() {
29870
29896
  }, Go;
29871
29897
  }
29872
29898
  const oy = Symbol(), AM = Symbol(), uy = Symbol(), cy = Symbol();
29873
- function G_(e, t, n) {
29899
+ function Z_(e, t, n) {
29874
29900
  const a = Ne(oy), r = Ne(cy), l = Ne(uy), i = a.findItem(e.meta.nav ?? e.name) ?? void 0, s = e.meta.requiresAuth !== !1 || i != null && i.requiresAuth !== !1, u = e.query.isDemo === "true";
29875
29901
  if (!s)
29876
29902
  a.updateNavigationChange(e, t);
@@ -29886,7 +29912,7 @@ function G_(e, t, n) {
29886
29912
  } else
29887
29913
  return r.login(window.location.pathname), n;
29888
29914
  }
29889
- function Z_(e) {
29915
+ function j_(e) {
29890
29916
  const t = [];
29891
29917
  return (e == null ? void 0 : e.required) == !0 && t.push((n) => !!n || "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((n) => !!n || "Password is required"), t.push((n) => n != null && n.length > 9 || "Password must be 10 or more characters"), t.push((n) => /^(.*[a-z].*)$/.test(n) || "Password must contain a lowercase letter"), t.push((n) => /^(.*[A-Z].*)$/.test(n) || "Password must contain an uppercase letter"), t.push((n) => /^(.*\d.*)$/.test(n) || "Password must contain a number")), (e == null ? void 0 : e.forEmail) == !0 && (t.push((n) => !!n || "Email is required"), t.push((n) => C0(n) || "Email must be valid")), t;
29892
29918
  }
@@ -31874,7 +31900,7 @@ const DM = { key: 0 }, IM = /* @__PURE__ */ tt({
31874
31900
  return (r, l) => (R(), ie("span", null, We(r.prefix) + We(a.value) + We(r.suffix), 1));
31875
31901
  }
31876
31902
  });
31877
- function j_(e) {
31903
+ function K_(e) {
31878
31904
  return {
31879
31905
  install(t, n) {
31880
31906
  var d, h;
@@ -31915,7 +31941,7 @@ export {
31915
31941
  b0 as copyItemByAlphabet,
31916
31942
  V0 as createApi,
31917
31943
  P0 as createAuth,
31918
- j_ as createCore,
31944
+ K_ as createCore,
31919
31945
  R0 as createCosmetics,
31920
31946
  O0 as createDates,
31921
31947
  z0 as createDemo,
@@ -31946,7 +31972,7 @@ export {
31946
31972
  A_ as getMinDate,
31947
31973
  y0 as getMinDateString,
31948
31974
  S0 as getRandomColor,
31949
- G_ as guardRoute,
31975
+ Z_ as guardRoute,
31950
31976
  k0 as hasSearch,
31951
31977
  M_ as isArrayOfLength,
31952
31978
  Sn as isLengthyArray,
@@ -31983,16 +32009,17 @@ export {
31983
32009
  L_ as useImageUrl,
31984
32010
  sy as useItem,
31985
32011
  Fu as useList,
32012
+ q_ as useLists,
31986
32013
  N_ as useLocalCache,
31987
32014
  R_ as useLocalCosmetics,
31988
32015
  wn as useLocalDb,
31989
32016
  MM as useMenu,
31990
32017
  gh as useNavBack,
31991
32018
  ei as useNavigation,
31992
- q_ as usePWA,
32019
+ G_ as usePWA,
31993
32020
  vs as usePresets,
31994
32021
  N0 as useResizable,
31995
- Z_ as useRules,
32022
+ j_ as useRules,
31996
32023
  z_ as useSelectDate,
31997
32024
  O_ as useSelectItem,
31998
32025
  Y_ as useSelectNumber,
package/dist/index.d.ts CHANGED
@@ -1363,6 +1363,14 @@ declare interface UseListOptions {
1363
1363
  onFinished?: () => void;
1364
1364
  }
1365
1365
 
1366
+ export declare function useLists(options: UseListsOptions): {
1367
+ registerList: (listOptions: ListProps) => ListProps;
1368
+ };
1369
+
1370
+ declare interface UseListsOptions {
1371
+ onAllLoaded: () => void;
1372
+ }
1373
+
1366
1374
  export declare function useLocalCache(): {
1367
1375
  clearAsync: (storeName: string) => Promise<void>;
1368
1376
  getAsync: <T>(key: string) => Promise<T | null>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bt-core-app",
3
- "version": "1.4.171",
3
+ "version": "1.4.172",
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": {