@vc-shell/framework 1.1.31 → 1.1.35

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 (35) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/core/composables/useErrorHandler/index.ts +12 -1
  3. package/dist/core/composables/useErrorHandler/index.d.ts.map +1 -1
  4. package/dist/framework.js +1 -1
  5. package/dist/{index-Bxzy9NzM.js → index-BKf0fZTf.js} +1 -1
  6. package/dist/{index-Dxs7WOw2.js → index-BkUjYKvR.js} +1 -1
  7. package/dist/{index-Yu2Xrty9.js → index-CSvI0g-3.js} +1 -1
  8. package/dist/{index-Bo-tMcwW.js → index-CT2orLVN.js} +1 -1
  9. package/dist/{index-jKOJ5dxS.js → index-CY4rQpKI.js} +1 -1
  10. package/dist/{index-0JXtGXkU.js → index-CsWhyro_.js} +1 -1
  11. package/dist/{index-B4vlCcFR.js → index-Csqb5hrT.js} +1 -1
  12. package/dist/{index-lJ-eV6nh.js → index-DKzBUQy1.js} +1 -1
  13. package/dist/{index-CIYNhqa0.js → index-DPWorAyL.js} +1 -1
  14. package/dist/{index-NFZ0riWN.js → index-DXEquEr8.js} +1 -1
  15. package/dist/{index-DWkmlYj4.js → index-Da3hS7OH.js} +1 -1
  16. package/dist/{index-uOSH3WBg.js → index-DdCbIqjR.js} +1 -1
  17. package/dist/{index-DKAEB9Q6.js → index-DhuupW8j.js} +1 -1
  18. package/dist/{index-D2ktcdHl.js → index-DrVlbA9k.js} +182 -177
  19. package/dist/{index-C0HMg87C.js → index-DsurL8Xm.js} +1 -1
  20. package/dist/{index-C34EKuYz.js → index-aC11cxfU.js} +1 -1
  21. package/dist/{index-W3dvhLJ3.js → index-muqinQeC.js} +1 -1
  22. package/dist/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.d.ts +4 -3
  23. package/dist/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.d.ts.map +1 -1
  24. package/dist/shared/components/blade-navigation/types/index.d.ts +2 -1
  25. package/dist/shared/components/blade-navigation/types/index.d.ts.map +1 -1
  26. package/dist/shared/components/error-interceptor/index.d.ts +2 -1
  27. package/dist/shared/components/error-interceptor/index.d.ts.map +1 -1
  28. package/dist/shared/components/error-interceptor/interceptor.d.ts +4 -7
  29. package/dist/shared/components/error-interceptor/interceptor.d.ts.map +1 -1
  30. package/dist/tsconfig.tsbuildinfo +1 -1
  31. package/package.json +5 -6
  32. package/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.ts +3 -2
  33. package/shared/components/blade-navigation/types/index.ts +2 -1
  34. package/shared/components/error-interceptor/index.ts +2 -1
  35. package/shared/components/error-interceptor/interceptor.ts +4 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vc-shell/framework",
3
- "version": "1.1.31",
3
+ "version": "1.1.35",
4
4
  "type": "module",
5
5
  "main": "./dist/framework.js",
6
6
  "types": "./dist/index.d.ts",
@@ -70,9 +70,9 @@
70
70
  "devDependencies": {
71
71
  "@fullhuman/postcss-purgecss": "^7.0.2",
72
72
  "@types/dompurify": "^3.0.5",
73
- "@vc-shell/api-client-generator": "^1.1.31",
74
- "@vc-shell/config-generator": "^1.1.31",
75
- "@vc-shell/ts-config": "^1.1.31",
73
+ "@vc-shell/api-client-generator": "^1.1.35",
74
+ "@vc-shell/config-generator": "^1.1.35",
75
+ "@vc-shell/ts-config": "^1.1.35",
76
76
  "@vitejs/plugin-vue": "^5.2.3",
77
77
  "@vue/test-utils": "^2.4.5",
78
78
  "cypress-signalr-mock": "^1.5.0",
@@ -90,6 +90,5 @@
90
90
  "publishConfig": {
91
91
  "access": "public",
92
92
  "registry": "https://registry.npmjs.org/"
93
- },
94
- "npmTag": "next"
93
+ }
95
94
  }
@@ -17,6 +17,7 @@ import { BladeInstance, navigationViewLocation, BLADE_BACK_BUTTON } from "./../.
17
17
  import { BladeVNode, CoreBladeExposed, IBladeInstance } from "../../types";
18
18
  import { toRef, watchTriggerable } from "@vueuse/core";
19
19
  import { Breadcrumbs, FALLBACK_BLADE_ID } from "../../../../..";
20
+ import { DisplayableError } from "../../../../../core/utilities/error";
20
21
 
21
22
  /**
22
23
  * Normalizes slot content
@@ -34,7 +35,7 @@ function normalizeSlot(slot: Slot | undefined, data: { Component: VNode }): VNod
34
35
  interface BladeViewProps {
35
36
  blade?: BladeVNode;
36
37
  expandable?: boolean;
37
- error?: string | Error | null | undefined;
38
+ error?: DisplayableError | Error | null | undefined;
38
39
  breadcrumbs?: Breadcrumbs[];
39
40
  backButton?: Component;
40
41
  }
@@ -50,7 +51,7 @@ export const VcBladeView = defineComponent({
50
51
  type: Boolean,
51
52
  },
52
53
  error: {
53
- type: Object as PropType<string | Error | null | undefined>,
54
+ type: Object as PropType<DisplayableError | Error | null | undefined>,
54
55
  default: null,
55
56
  },
56
57
  breadcrumbs: {
@@ -13,6 +13,7 @@ import {
13
13
  import { ComponentPublicInstanceConstructor } from "../../../utilities/vueUtils";
14
14
  import { MenuItemConfig } from "../../../../core/types";
15
15
  import { Breadcrumbs } from "../../../../ui/types";
16
+ import { DisplayableError } from "../../../../core/utilities/error";
16
17
 
17
18
  export type CoreBladeComponentProps = {
18
19
  expanded?: boolean;
@@ -46,7 +47,7 @@ export interface IBladeInstance {
46
47
  id: string;
47
48
  expandable: boolean;
48
49
  maximized: boolean;
49
- error: Error | string | null | undefined;
50
+ error: DisplayableError | Error | string | null | undefined;
50
51
  navigation: BladeVNode["props"]["navigation"] | undefined;
51
52
  breadcrumbs: Breadcrumbs[] | undefined;
52
53
  title?: string;
@@ -1,10 +1,11 @@
1
1
  import { VNode } from "vue";
2
2
  import _Interceptor from "./interceptor";
3
+ import { DisplayableError } from "../../../core/utilities/error";
3
4
 
4
5
  export const ErrorInterceptor = _Interceptor as typeof _Interceptor & {
5
6
  new (): {
6
7
  $slots: {
7
- default: (args: { error: string; reset: () => void }) => VNode[];
8
+ default: (args: { error: DisplayableError | null; reset: () => void }) => VNode[];
8
9
  };
9
10
  };
10
11
  };
@@ -1,22 +1,18 @@
1
1
  import { useErrorHandler } from "./../../../core/composables";
2
2
  import { defineComponent, VNode } from "vue";
3
3
 
4
- // This is an internal type used within useErrorHandler now.
5
- // We are re-exporting a similar structure for clarity in components that use it.
6
- export type DisplayableError = Error & { details?: string };
7
-
8
4
  export interface Props {
9
5
  capture?: boolean;
10
6
  }
11
7
 
12
8
  export interface Emits {
13
- (event: "error", value: DisplayableError): void;
9
+ (event: "error", value: Error | string): void;
14
10
  (event: "reset"): void;
15
11
  }
16
12
 
17
13
  export type Slots = {
18
14
  slots: {
19
- default: (args: { error: DisplayableError | null; reset: () => void }) => VNode[];
15
+ default: (args: { error: Error | string | null; reset: () => void }) => VNode[];
20
16
  };
21
17
  };
22
18
 
@@ -29,8 +25,8 @@ export default defineComponent({
29
25
  },
30
26
  },
31
27
  emits: {
32
- error(value: Error) {
33
- return value instanceof Error;
28
+ error(value: Error | string) {
29
+ return (value && value instanceof Error) || typeof value === "string";
34
30
  },
35
31
  reset(): boolean {
36
32
  return true;