@raclettejs/core 0.1.20 → 0.1.22

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.
@@ -58,4 +58,4 @@
58
58
  "vue-eslint-parser": "10.2.0",
59
59
  "vue-tsc": "3.0.7"
60
60
  }
61
- }
61
+ }
@@ -101,6 +101,7 @@ import { useDisplay } from "vuetify"
101
101
  import useStateSubscriber from "@racletteOrchestrator/composables/useStateSubscriber"
102
102
  import useRouteState from "@racletteOrchestrator/composables/useRouteState"
103
103
  import { createWidgetLifecycleManager } from "@racletteOrchestrator/composables/useWidgetLifecycle"
104
+ import { isDefined } from "@vueuse/core"
104
105
 
105
106
  const props = withDefaults(
106
107
  defineProps<{
@@ -152,7 +153,7 @@ const routeParams = computed(() => {
152
153
  for (const [key, value] of Object.entries(
153
154
  currentRouteConfig.value.slotParams,
154
155
  )) {
155
- if (value && value !== "undefined") {
156
+ if (isDefined(value) && value !== "undefined") {
156
157
  cleanedParams[key] = value
157
158
  }
158
159
  }
@@ -9,7 +9,7 @@ export default async (
9
9
  const { redirect, redirectQuery } = to.query
10
10
 
11
11
  // check the url for redirect parameter and navigate to it, if set
12
- if (redirect) {
12
+ if (redirect && typeof redirect === "string") {
13
13
  return {
14
14
  path: redirect,
15
15
  query: redirectQuery ? JSON.parse(redirectQuery as string) : undefined,
@@ -1,7 +1,8 @@
1
+ import type { RouteRecordRaw } from "vue-router"
1
2
  import ProductOrchestrator from "../ProductOrchestrator.vue"
2
3
  import useAuthentication from "@racletteOrchestrator/composables/useAuthentication"
3
4
 
4
- const routes = [
5
+ const routes: Readonly<RouteRecordRaw[]> = [
5
6
  {
6
7
  path: "/:pageId(.*)",
7
8
  name: "app.space.page",
@@ -11,6 +12,7 @@ const routes = [
11
12
  {
12
13
  path: "/logout",
13
14
  name: "public.logout",
15
+ component: { template: "<div />" },
14
16
  beforeEnter: () => {
15
17
  const { clearCookies } = useAuthentication()
16
18
 
@@ -21,6 +23,6 @@ const routes = [
21
23
  }
22
24
  },
23
25
  },
24
- ]
26
+ ] as const
25
27
 
26
28
  export default routes