bt-core-app 1.4.157 → 1.4.158

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.
@@ -29835,14 +29835,18 @@ function MM() {
29835
29835
  }
29836
29836
  const sy = Symbol(), _M = Symbol(), oy = Symbol(), uy = Symbol();
29837
29837
  function U_(e, t, n) {
29838
- const a = Ne(sy), r = Ne(uy), l = Ne(oy), i = a.findItem(e.meta.nav ?? e.name) ?? void 0, s = e.meta.requiresAuth !== !1 || (i == null ? void 0 : i.requiresAuth) !== !1, u = e.query.isTraining === "true";
29838
+ const a = Ne(sy), r = Ne(uy), l = Ne(oy), 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";
29839
29839
  if (a.updateHistory(e, t), !s)
29840
- return a.updateNavigationProperties(i), e;
29841
- if (u)
29842
- return r.logout(), l.startDemo(), e;
29843
- if (l.endDemo(), r.tryLogin()) {
29840
+ a.updateNavigationProperties(i);
29841
+ else if (u)
29842
+ r.isLoggedIn.value && r.logout(), l.isDemoing.value || l.startDemo();
29843
+ else if (l.isDemoing.value && l.endDemo(), r.tryLogin()) {
29844
29844
  const c = (i == null ? void 0 : i.subscriptions) ?? [], h = (i == null ? void 0 : i.permissions) ?? [];
29845
- return r.doShow(c, h, "view") ? (a.updateNavigationProperties(i), e) : n;
29845
+ if (r.doShow(c, h, "view")) {
29846
+ a.updateNavigationProperties(i);
29847
+ return;
29848
+ } else
29849
+ return n;
29846
29850
  } else
29847
29851
  return r.login(window.location.pathname), a.updateNavigationProperties(i), n;
29848
29852
  }
package/dist/index.d.ts CHANGED
@@ -556,7 +556,7 @@ export declare interface GroupedHeaderOption {
556
556
  values: TableColumn[];
557
557
  }
558
558
 
559
- export declare function guardRoute(to: RouteLocationNormalized, from: RouteLocationNormalized, restrictedRoute: RouteLocationRaw): RouteLocationRaw | RouteLocationNormalized;
559
+ export declare function guardRoute(to: RouteLocationNormalized, from: RouteLocationNormalized, restrictedRoute: RouteLocationRaw): RouteLocationRaw | undefined;
560
560
 
561
561
  /**tests for whether string is contains in any of the given props of the given value */
562
562
  export declare function hasSearch(value: any, str?: string, props?: string[]): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bt-core-app",
3
- "version": "1.4.157",
3
+ "version": "1.4.158",
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": {