@vc-shell/framework 1.2.3-beta.0 → 1.2.3
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.
- package/core/composables/index.ts +0 -2
- package/core/composables/useAssets/index.ts +28 -72
- package/core/composables/useAsync/index.ts +1 -4
- package/core/composables/useBladeRegistry/index.ts +5 -6
- package/core/composables/useBreadcrumbs/index.ts +1 -4
- package/core/composables/useErrorHandler/index.ts +1 -4
- package/core/composables/useFunctions/debounce.ts +1 -0
- package/core/composables/useFunctions/delay.ts +1 -0
- package/core/composables/useFunctions/index.ts +1 -0
- package/core/composables/useFunctions/once.ts +1 -0
- package/core/composables/useFunctions/sleep.ts +1 -0
- package/core/composables/useFunctions/throttle.ts +1 -0
- package/core/composables/useGlobalSearch/index.ts +3 -3
- package/core/composables/useMenuService/index.ts +12 -7
- package/core/composables/useNotifications/index.ts +2 -5
- package/core/composables/useTheme/index.ts +1 -4
- package/core/composables/useUser/index.ts +20 -189
- package/core/composables/useWidgets/index.ts +2 -5
- package/core/constants/index.ts +0 -2
- package/core/interceptors/index.ts +2 -5
- package/core/plugins/modularity/index.ts +6 -8
- package/core/plugins/modularity/loader.ts +33 -36
- package/core/plugins/signalR/index.ts +3 -6
- package/core/services/app-bar-menu-service.ts +1 -4
- package/core/services/dashboard-service.ts +1 -4
- package/core/services/global-search-service.ts +36 -0
- package/core/services/index.ts +0 -2
- package/core/services/menu-service.ts +41 -5
- package/core/services/settings-menu-service.ts +1 -4
- package/core/services/toolbar-service.ts +3 -18
- package/core/services/widget-service.ts +4 -7
- package/core/types/index.ts +47 -3
- package/core/utilities/index.ts +0 -2
- package/dist/core/composables/useAssets/index.d.ts.map +1 -1
- package/dist/core/composables/useAsync/index.d.ts.map +1 -1
- package/dist/core/composables/useBladeRegistry/index.d.ts.map +1 -1
- package/dist/core/composables/useBreadcrumbs/index.d.ts.map +1 -1
- package/dist/core/composables/useErrorHandler/index.d.ts.map +1 -1
- package/dist/core/composables/useFunctions/debounce.d.ts.map +1 -1
- package/dist/core/composables/useFunctions/delay.d.ts.map +1 -1
- package/dist/core/composables/useFunctions/index.d.ts.map +1 -1
- package/dist/core/composables/useFunctions/once.d.ts.map +1 -1
- package/dist/core/composables/useFunctions/sleep.d.ts.map +1 -1
- package/dist/core/composables/useFunctions/throttle.d.ts.map +1 -1
- package/dist/core/composables/useGlobalSearch/index.d.ts.map +1 -1
- package/dist/core/composables/useMenuService/index.d.ts +2 -2
- package/dist/core/composables/useMenuService/index.d.ts.map +1 -1
- package/dist/core/composables/useNotifications/index.d.ts.map +1 -1
- package/dist/core/composables/useTheme/index.d.ts.map +1 -1
- package/dist/core/composables/useUser/index.d.ts +0 -8
- package/dist/core/composables/useUser/index.d.ts.map +1 -1
- package/dist/core/composables/useWidgets/index.d.ts.map +1 -1
- package/dist/core/constants/index.d.ts +0 -2
- package/dist/core/constants/index.d.ts.map +1 -1
- package/dist/core/interceptors/index.d.ts.map +1 -1
- package/dist/core/plugins/modularity/index.d.ts.map +1 -1
- package/dist/core/plugins/modularity/loader.d.ts.map +1 -1
- package/dist/core/plugins/signalR/index.d.ts.map +1 -1
- package/dist/core/services/app-bar-menu-service.d.ts.map +1 -1
- package/dist/core/services/dashboard-service.d.ts.map +1 -1
- package/dist/core/services/global-search-service.d.ts +10 -0
- package/dist/core/services/global-search-service.d.ts.map +1 -0
- package/dist/core/services/menu-service.d.ts +24 -1
- package/dist/core/services/menu-service.d.ts.map +1 -1
- package/dist/core/services/settings-menu-service.d.ts.map +1 -1
- package/dist/core/services/toolbar-service.d.ts.map +1 -1
- package/dist/core/services/widget-service.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +34 -0
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/core/utilities/index.d.ts +0 -2
- package/dist/core/utilities/index.d.ts.map +1 -1
- package/dist/framework.js +8664 -9720
- package/dist/index.css +1 -1
- package/dist/index.d.ts +0 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/injection-keys.d.ts +6 -21
- package/dist/injection-keys.d.ts.map +1 -1
- package/dist/shared/components/app-switcher/composables/useAppSwitcher/index.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/internal/bladeActions.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/internal/bladeRouteResolver.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/internal/routerUtils.d.ts.map +1 -1
- package/dist/shared/components/draggable-dashboard/composables/useDashboardDragAndDrop.d.ts.map +1 -1
- package/dist/shared/components/draggable-dashboard/composables/useLayoutPersistence.d.ts.map +1 -1
- package/dist/shared/components/notifications/composables/useContainer/index.d.ts.map +1 -1
- package/dist/shared/components/notifications/composables/useInstance/index.d.ts.map +1 -1
- package/dist/shared/components/notifications/core/notification.d.ts.map +1 -1
- package/dist/shared/components/popup-handler/components/vc-popup-container/vc-popup-container.vue.d.ts.map +1 -1
- package/dist/shared/components/sign-in/useExternalProvider.d.ts.map +1 -1
- package/dist/shared/composables/useExternalWidgets.d.ts.map +1 -1
- package/dist/shared/composables/useMenuExpanded.d.ts.map +1 -1
- package/dist/shared/composables/useTableSelection.d.ts.map +1 -1
- package/dist/shared/composables/useTableSort.d.ts.map +1 -1
- package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts.map +1 -1
- package/dist/shared/pages/LoginPage/components/login/Login.vue.d.ts.map +1 -1
- package/dist/shared/utilities/colorUtils.d.ts +6 -0
- package/dist/shared/utilities/colorUtils.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts +3 -0
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-banner/vc-banner.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts +15 -0
- package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-container/vc-container.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-lucide-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-image/vc-image.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-link/vc-link.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-loading/vc-loading.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts +5 -0
- package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-tooltip/vc-tooltip.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-video/vc-video.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-widget/vc-widget.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-pagination/vc-pagination.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-toast/vc-toast.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/useBadge.d.ts +18 -0
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/useBadge.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue.d.ts +4 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts +4 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-login-form/vc-login-form.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/composables/useTableActions.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/composables/useTableColumnResize.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/composables/useTableRowReorder.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/composables/useTableSelection.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/composables/useTableState.d.ts.map +1 -1
- package/dist/{vendor-lodash-es-SgOIjJF8.js → vendor-lodash-es-BqkGj3Jl.js} +0 -2
- package/package.json +5 -5
- package/shared/components/app-switcher/composables/useAppSwitcher/index.ts +1 -4
- package/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue +4 -67
- package/shared/components/blade-navigation/composables/useBladeNavigation/index.ts +10 -13
- package/shared/components/blade-navigation/composables/useBladeNavigation/internal/bladeActions.ts +4 -7
- package/shared/components/blade-navigation/composables/useBladeNavigation/internal/bladeRouteResolver.ts +1 -4
- package/shared/components/blade-navigation/composables/useBladeNavigation/internal/routerUtils.ts +1 -4
- package/shared/components/change-password/change-password.vue +1 -1
- package/shared/components/draggable-dashboard/composables/useDashboardDragAndDrop.ts +5 -14
- package/shared/components/draggable-dashboard/composables/useLayoutPersistence.ts +2 -5
- package/shared/components/index.ts +0 -2
- package/shared/components/notifications/composables/useContainer/index.ts +6 -8
- package/shared/components/notifications/composables/useInstance/index.ts +1 -4
- package/shared/components/notifications/core/notification.ts +7 -10
- package/shared/components/popup-handler/components/vc-popup-container/vc-popup-container.vue +1 -20
- package/shared/components/sign-in/useExternalProvider.ts +4 -6
- package/shared/composables/useExternalWidgets.ts +4 -7
- package/shared/composables/useMenuExpanded.ts +1 -15
- package/shared/composables/useTableSelection.ts +0 -6
- package/shared/composables/useTableSort.ts +4 -4
- package/shared/modules/assets-manager/components/assets-manager/assets-manager.vue +3 -6
- package/shared/pages/LoginPage/components/login/Login.vue +1 -4
- package/shared/utilities/colorUtils.ts +12 -5
- package/ui/components/atoms/vc-badge/vc-badge.vue +59 -0
- package/ui/components/atoms/vc-banner/vc-banner.vue +1 -4
- package/ui/components/atoms/vc-button/vc-button.vue +25 -2
- package/ui/components/atoms/vc-container/vc-container.vue +3 -12
- package/ui/components/atoms/vc-icon/vc-icon.vue +10 -0
- package/ui/components/atoms/vc-icon/vc-lucide-icon.vue +2 -5
- package/ui/components/atoms/vc-image/vc-image.vue +1 -4
- package/ui/components/atoms/vc-link/vc-link.vue +54 -59
- package/ui/components/atoms/vc-loading/vc-loading.vue +0 -4
- package/ui/components/atoms/vc-status/vc-status.vue +5 -0
- package/ui/components/atoms/vc-status-icon/vc-status-icon.vue +4 -4
- package/ui/components/atoms/vc-tooltip/vc-tooltip.vue +1 -8
- package/ui/components/atoms/vc-video/vc-video.vue +2 -4
- package/ui/components/atoms/vc-widget/vc-widget.vue +1 -4
- package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue +2 -7
- package/ui/components/molecules/vc-input/vc-input.vue +1 -0
- package/ui/components/molecules/vc-pagination/vc-pagination.vue +1 -6
- package/ui/components/molecules/vc-rating/vc-rating.vue +1 -1
- package/ui/components/molecules/vc-textarea/vc-textarea.vue +1 -1
- package/ui/components/molecules/vc-toast/vc-toast.vue +1 -11
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/useBadge.ts +80 -0
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +53 -10
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue +10 -1
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +3 -0
- package/ui/components/organisms/vc-app/vc-app.vue +3 -22
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue +1 -4
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +14 -14
- package/ui/components/organisms/vc-blade/vc-blade.vue +1 -3
- package/ui/components/organisms/vc-login-form/vc-login-form.vue +1 -3
- package/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue +2 -34
- package/ui/components/organisms/vc-table/composables/useTableActions.ts +10 -7
- package/ui/components/organisms/vc-table/composables/useTableColumnResize.ts +1 -4
- package/ui/components/organisms/vc-table/composables/useTableRowReorder.ts +2 -5
- package/ui/components/organisms/vc-table/composables/useTableSelection.ts +18 -26
- package/ui/components/organisms/vc-table/composables/useTableState.ts +1 -4
- package/core/constants/defaults.ts +0 -76
- package/core/constants/ui.ts +0 -68
- package/core/plugins/ai-agent/README.md +0 -336
- package/core/plugins/ai-agent/components/VcAiAgentPanel.vue +0 -125
- package/core/plugins/ai-agent/components/_internal/VcAiAgentHeader.vue +0 -182
- package/core/plugins/ai-agent/components/_internal/VcAiAgentIframe.vue +0 -77
- package/core/plugins/ai-agent/components/index.ts +0 -1
- package/core/plugins/ai-agent/composables/index.ts +0 -4
- package/core/plugins/ai-agent/composables/useAiAgent.ts +0 -231
- package/core/plugins/ai-agent/composables/useAiAgentContext.ts +0 -280
- package/core/plugins/ai-agent/constants.ts +0 -89
- package/core/plugins/ai-agent/index.ts +0 -91
- package/core/plugins/ai-agent/services/ai-agent-service.ts +0 -598
- package/core/plugins/ai-agent/types.ts +0 -310
- package/core/types/services.ts +0 -194
- package/core/utilities/errorTypes.ts +0 -126
- package/core/utilities/logger.ts +0 -120
- package/dist/core/constants/defaults.d.ts +0 -63
- package/dist/core/constants/defaults.d.ts.map +0 -1
- package/dist/core/constants/ui.d.ts +0 -50
- package/dist/core/constants/ui.d.ts.map +0 -1
- package/dist/core/plugins/ai-agent/components/VcAiAgentPanel.vue.d.ts +0 -3
- package/dist/core/plugins/ai-agent/components/VcAiAgentPanel.vue.d.ts.map +0 -1
- package/dist/core/plugins/ai-agent/components/_internal/VcAiAgentHeader.vue.d.ts +0 -15
- package/dist/core/plugins/ai-agent/components/_internal/VcAiAgentHeader.vue.d.ts.map +0 -1
- package/dist/core/plugins/ai-agent/components/_internal/VcAiAgentIframe.vue.d.ts +0 -10
- package/dist/core/plugins/ai-agent/components/_internal/VcAiAgentIframe.vue.d.ts.map +0 -1
- package/dist/core/plugins/ai-agent/components/index.d.ts +0 -2
- package/dist/core/plugins/ai-agent/components/index.d.ts.map +0 -1
- package/dist/core/plugins/ai-agent/composables/index.d.ts +0 -4
- package/dist/core/plugins/ai-agent/composables/index.d.ts.map +0 -1
- package/dist/core/plugins/ai-agent/composables/useAiAgent.d.ts +0 -95
- package/dist/core/plugins/ai-agent/composables/useAiAgent.d.ts.map +0 -1
- package/dist/core/plugins/ai-agent/composables/useAiAgentContext.d.ts +0 -55
- package/dist/core/plugins/ai-agent/composables/useAiAgentContext.d.ts.map +0 -1
- package/dist/core/plugins/ai-agent/constants.d.ts +0 -47
- package/dist/core/plugins/ai-agent/constants.d.ts.map +0 -1
- package/dist/core/plugins/ai-agent/index.d.ts +0 -48
- package/dist/core/plugins/ai-agent/index.d.ts.map +0 -1
- package/dist/core/plugins/ai-agent/services/ai-agent-service.d.ts +0 -45
- package/dist/core/plugins/ai-agent/services/ai-agent-service.d.ts.map +0 -1
- package/dist/core/plugins/ai-agent/types.d.ts +0 -258
- package/dist/core/plugins/ai-agent/types.d.ts.map +0 -1
- package/dist/core/types/services.d.ts +0 -169
- package/dist/core/types/services.d.ts.map +0 -1
- package/dist/core/utilities/errorTypes.d.ts +0 -61
- package/dist/core/utilities/errorTypes.d.ts.map +0 -1
- package/dist/core/utilities/logger.d.ts +0 -259
- package/dist/core/utilities/logger.d.ts.map +0 -1
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
import { ComputedRef, Ref } from "vue";
|
|
2
|
-
|
|
3
|
-
// ============================================
|
|
4
|
-
// Core Types
|
|
5
|
-
// ============================================
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Context type for AI agent - determines UI behavior in chatbot
|
|
9
|
-
* - 'list': Multiple selected items from a list blade (shows "X items selected" badge)
|
|
10
|
-
* - 'details': Single item being edited in details blade (shows suggestions UI)
|
|
11
|
-
*/
|
|
12
|
-
export type AiAgentContextType = "list" | "details";
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Suggestion card for AI agent
|
|
16
|
-
*/
|
|
17
|
-
export interface ISuggestion {
|
|
18
|
-
/** Unique identifier */
|
|
19
|
-
id: string;
|
|
20
|
-
/** Display title */
|
|
21
|
-
title: string;
|
|
22
|
-
/** Icon name */
|
|
23
|
-
icon: string;
|
|
24
|
-
/** Icon color (optional) */
|
|
25
|
-
iconColor?: string;
|
|
26
|
-
/** Prompt text to send when clicked */
|
|
27
|
-
prompt: string;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Options for useAiAgentContext composable
|
|
32
|
-
*/
|
|
33
|
-
export interface UseAiAgentContextOptions<T = Record<string, unknown>> {
|
|
34
|
-
/**
|
|
35
|
-
* Ref with data - accepts both formats:
|
|
36
|
-
* - Ref<T> for DETAILS blade (single object, will be wrapped in array internally)
|
|
37
|
-
* - Ref<T[]> for LIST blade (array of selected objects)
|
|
38
|
-
*
|
|
39
|
-
* When AI agent sends changes back, they will be applied to:
|
|
40
|
-
* - The object directly (for single-object refs)
|
|
41
|
-
* - The first item in array (for array refs)
|
|
42
|
-
*/
|
|
43
|
-
dataRef: Ref<T> | Ref<T[]>;
|
|
44
|
-
|
|
45
|
-
/** Custom suggestions for this blade */
|
|
46
|
-
suggestions?: ISuggestion[];
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Return type for useAiAgentContext composable
|
|
51
|
-
*/
|
|
52
|
-
export interface UseAiAgentContextReturn {
|
|
53
|
-
/** Preview state (for details blades) */
|
|
54
|
-
previewState: {
|
|
55
|
-
isActive: ComputedRef<boolean>;
|
|
56
|
-
changedFields: ComputedRef<string[]>;
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// ============================================
|
|
61
|
-
// AI Agent Panel Types
|
|
62
|
-
// ============================================
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* State of the AI agent panel
|
|
66
|
-
*/
|
|
67
|
-
export type AiAgentPanelState = "closed" | "open" | "expanded";
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Configuration for the AI agent panel
|
|
71
|
-
*/
|
|
72
|
-
export interface IAiAgentConfig {
|
|
73
|
-
/** URL of the AI agent iframe */
|
|
74
|
-
url: string;
|
|
75
|
-
/** Panel title (default: "Virto OZ") */
|
|
76
|
-
title?: string;
|
|
77
|
-
/** Panel width in pixels when open (default: 350) */
|
|
78
|
-
width?: number;
|
|
79
|
-
/** Panel width in pixels when expanded (default: 500) */
|
|
80
|
-
expandedWidth?: number;
|
|
81
|
-
/** Allowed origins for postMessage (default: ["*"]) */
|
|
82
|
-
allowedOrigins?: string[];
|
|
83
|
-
/**
|
|
84
|
-
* Tenant identifier for the platform instance.
|
|
85
|
-
* This should be a static value identifying the platform installation (e.g., "virto", "acme-corp").
|
|
86
|
-
* Configured by the host application via VirtoShellFramework options.
|
|
87
|
-
*
|
|
88
|
-
*/
|
|
89
|
-
tenantId?: string;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Current blade information for AI context
|
|
94
|
-
*/
|
|
95
|
-
export interface IAiAgentBladeContext {
|
|
96
|
-
/** Blade identifier */
|
|
97
|
-
id: string;
|
|
98
|
-
/** Blade component name */
|
|
99
|
-
name: string;
|
|
100
|
-
/** Blade display title */
|
|
101
|
-
title?: string;
|
|
102
|
-
/** Route parameter (e.g., item ID being edited) */
|
|
103
|
-
param?: string;
|
|
104
|
-
/** Additional blade options */
|
|
105
|
-
options?: Record<string, unknown>;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* User information for AI context
|
|
110
|
-
*/
|
|
111
|
-
export interface IAiAgentUserContext {
|
|
112
|
-
id?: string;
|
|
113
|
-
userName?: string;
|
|
114
|
-
isAdministrator?: boolean;
|
|
115
|
-
permissions?: string[];
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Full context passed to the AI agent
|
|
120
|
-
*/
|
|
121
|
-
export interface IAiAgentContext {
|
|
122
|
-
/** Current user information */
|
|
123
|
-
user: IAiAgentUserContext | undefined;
|
|
124
|
-
/** Current active blade information */
|
|
125
|
-
currentBlade: IAiAgentBladeContext | null;
|
|
126
|
-
/** Data items (from useAiAgentContext) */
|
|
127
|
-
items: Record<string, unknown>[];
|
|
128
|
-
/** Timestamp of context generation */
|
|
129
|
-
timestamp: number;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Service for managing AI agent state and communication
|
|
134
|
-
*/
|
|
135
|
-
export interface IAiAgentService {
|
|
136
|
-
/** Current panel state */
|
|
137
|
-
panelState: Ref<AiAgentPanelState>;
|
|
138
|
-
/** Panel configuration */
|
|
139
|
-
config: Ref<IAiAgentConfig>;
|
|
140
|
-
/** Current context (reactive) */
|
|
141
|
-
context: ComputedRef<IAiAgentContext>;
|
|
142
|
-
/** Whether panel is open (not closed) */
|
|
143
|
-
isOpen: ComputedRef<boolean>;
|
|
144
|
-
/** Whether panel is in expanded state */
|
|
145
|
-
isExpanded: ComputedRef<boolean>;
|
|
146
|
-
/** Total count of items in current context */
|
|
147
|
-
totalItemsCount: ComputedRef<number>;
|
|
148
|
-
|
|
149
|
-
/** Open the AI panel */
|
|
150
|
-
openPanel: () => void;
|
|
151
|
-
/** Close the AI panel */
|
|
152
|
-
closePanel: () => void;
|
|
153
|
-
/** Toggle panel open/close */
|
|
154
|
-
togglePanel: () => void;
|
|
155
|
-
/** Expand the panel to larger width */
|
|
156
|
-
expandPanel: () => void;
|
|
157
|
-
/** Collapse panel to normal width */
|
|
158
|
-
collapsePanel: () => void;
|
|
159
|
-
|
|
160
|
-
/** Update configuration */
|
|
161
|
-
setConfig: (config: Partial<IAiAgentConfig>) => void;
|
|
162
|
-
|
|
163
|
-
/** Send message to AI agent iframe */
|
|
164
|
-
sendMessage: (type: AiAgentMessageType, payload: unknown) => void;
|
|
165
|
-
/** Register message handler, returns unsubscribe function */
|
|
166
|
-
onMessage: (handler: (event: IAiAgentMessage) => void) => () => void;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
// ============================================
|
|
170
|
-
// PostMessage Protocol Types
|
|
171
|
-
// ============================================
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* Message types sent from Shell to Chatbot
|
|
175
|
-
*/
|
|
176
|
-
export type ShellToChatMessageType =
|
|
177
|
-
| "INIT_CONTEXT" // Initial context when chatbot loads
|
|
178
|
-
| "UPDATE_CONTEXT"; // Context updates (items, blade changes)
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Message types sent from Chatbot to Shell
|
|
182
|
-
*/
|
|
183
|
-
export type ChatToShellMessageType =
|
|
184
|
-
| "CHAT_READY" // Chatbot is loaded and ready
|
|
185
|
-
| "NAVIGATE_TO_APP" // Request to navigate to a blade
|
|
186
|
-
| "EXPAND_IN_CHAT" // Request to expand item in chat
|
|
187
|
-
| "RELOAD_BLADE" // Request to reload current blade
|
|
188
|
-
| "PREVIEW_CHANGES" // Request to preview changes in form
|
|
189
|
-
| "APPLY_CHANGES" // Request to apply data changes
|
|
190
|
-
| "DOWNLOAD_FILE" // Request to download file
|
|
191
|
-
| "SHOW_MORE" // Request for more results
|
|
192
|
-
| "CHAT_ERROR"; // Error notification
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Combined message types
|
|
196
|
-
*/
|
|
197
|
-
export type AiAgentMessageType = ShellToChatMessageType | ChatToShellMessageType;
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* Generic message type (for handlers)
|
|
201
|
-
*/
|
|
202
|
-
export interface IAiAgentMessage<T = unknown> {
|
|
203
|
-
/** Message type identifier */
|
|
204
|
-
type: AiAgentMessageType;
|
|
205
|
-
/** Message payload */
|
|
206
|
-
payload?: T;
|
|
207
|
-
/** Message timestamp (optional) */
|
|
208
|
-
timestamp?: number;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
// ============================================
|
|
212
|
-
// Specific Message Payloads
|
|
213
|
-
// ============================================
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* Blade context for chatbot (simplified for chat use)
|
|
217
|
-
*/
|
|
218
|
-
export interface IChatBladeContext {
|
|
219
|
-
/** Blade identifier */
|
|
220
|
-
id: string;
|
|
221
|
-
/** Blade component name */
|
|
222
|
-
name: string;
|
|
223
|
-
/** Blade display title */
|
|
224
|
-
title: string;
|
|
225
|
-
/** Route parameter (e.g., item ID being edited) */
|
|
226
|
-
param?: string;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
/** Payload for INIT_CONTEXT message (Shell -> Chat) */
|
|
230
|
-
export interface IInitContextPayload {
|
|
231
|
-
/** Current user ID */
|
|
232
|
-
userId: string;
|
|
233
|
-
/** User locale */
|
|
234
|
-
locale: string;
|
|
235
|
-
/** Tenant identifier (from JWT or host app) */
|
|
236
|
-
tenantId?: string;
|
|
237
|
-
/** Current blade context */
|
|
238
|
-
blade: IChatBladeContext;
|
|
239
|
-
/** Context type - determines chatbot UI behavior */
|
|
240
|
-
contextType: AiAgentContextType;
|
|
241
|
-
/** Data items - always array (1 for details, N for list) */
|
|
242
|
-
items: Record<string, unknown>[];
|
|
243
|
-
/** Custom suggestions (if any) */
|
|
244
|
-
suggestions?: ISuggestion[];
|
|
245
|
-
/** Access token for API calls (automatically refreshed) */
|
|
246
|
-
accessToken?: string;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
/** Payload for UPDATE_CONTEXT message (Shell -> Chat) */
|
|
250
|
-
export interface IUpdateContextPayload {
|
|
251
|
-
/** Updated blade context (if changed) */
|
|
252
|
-
blade?: IChatBladeContext;
|
|
253
|
-
/** Tenant identifier (from JWT or host app) */
|
|
254
|
-
tenantId?: string;
|
|
255
|
-
/** Context type - determines chatbot UI behavior */
|
|
256
|
-
contextType: AiAgentContextType;
|
|
257
|
-
/** Data items - always array of full objects */
|
|
258
|
-
items: Record<string, unknown>[];
|
|
259
|
-
/** Custom suggestions (if changed) */
|
|
260
|
-
suggestions?: ISuggestion[];
|
|
261
|
-
/** Updated user locale (if changed) */
|
|
262
|
-
locale?: string;
|
|
263
|
-
/** Access token for API calls (automatically refreshed) */
|
|
264
|
-
accessToken?: string;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
/** Payload for NAVIGATE_TO_APP message (Chat -> Shell) */
|
|
268
|
-
export interface INavigateToAppPayload {
|
|
269
|
-
/** Blade name to open */
|
|
270
|
-
bladeName: string;
|
|
271
|
-
/** Entity ID */
|
|
272
|
-
param?: string;
|
|
273
|
-
/** Additional options */
|
|
274
|
-
options?: Record<string, unknown>;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
/** Payload for PREVIEW_CHANGES message (Chat -> Shell) */
|
|
278
|
-
export interface IPreviewChangesPayload {
|
|
279
|
-
/** Updated data to preview */
|
|
280
|
-
data: Record<string, unknown>;
|
|
281
|
-
/** List of changed field names */
|
|
282
|
-
changedFields?: string[];
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
/** Payload for APPLY_CHANGES message (Chat -> Shell) */
|
|
286
|
-
export interface IApplyChangesPayload {
|
|
287
|
-
changes: Array<{
|
|
288
|
-
entityId: string;
|
|
289
|
-
entityType: string;
|
|
290
|
-
field: string;
|
|
291
|
-
oldValue: unknown;
|
|
292
|
-
newValue: unknown;
|
|
293
|
-
}>;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
/** Payload for DOWNLOAD_FILE message (Chat -> Shell) */
|
|
297
|
-
export interface IDownloadFilePayload {
|
|
298
|
-
/** Filename for download */
|
|
299
|
-
filename: string;
|
|
300
|
-
/** MIME type */
|
|
301
|
-
contentType: string;
|
|
302
|
-
/** Base64 encoded content */
|
|
303
|
-
content: string;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
/** Payload for CHAT_ERROR message (Chat -> Shell) */
|
|
307
|
-
export interface IChatErrorPayload {
|
|
308
|
-
code: string;
|
|
309
|
-
message: string;
|
|
310
|
-
}
|
package/core/types/services.ts
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import type { App, Ref } from "vue";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Service lifecycle interface for managing service creation and cleanup
|
|
5
|
-
*/
|
|
6
|
-
export interface ServiceLifecycle<T> {
|
|
7
|
-
/**
|
|
8
|
-
* Creates a new instance of the service
|
|
9
|
-
*/
|
|
10
|
-
create(): T;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Provides the service to the Vue application
|
|
14
|
-
*/
|
|
15
|
-
provide(app: App): void;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Cleanup function called when the service is no longer needed
|
|
19
|
-
*/
|
|
20
|
-
cleanup(): void;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Interface for services that support pre-registration of items
|
|
25
|
-
* before the service is fully initialized
|
|
26
|
-
*/
|
|
27
|
-
export interface PreregistrationQueue<T> {
|
|
28
|
-
/**
|
|
29
|
-
* Items waiting to be registered
|
|
30
|
-
*/
|
|
31
|
-
readonly items: readonly T[];
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Register an item to be processed when the service initializes
|
|
35
|
-
*/
|
|
36
|
-
register(item: T): void;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Flush all pending items and return them for processing
|
|
40
|
-
*/
|
|
41
|
-
flush(): T[];
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Clear the queue without processing
|
|
45
|
-
*/
|
|
46
|
-
clear(): void;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Base interface for registry-type services
|
|
51
|
-
*/
|
|
52
|
-
export interface RegistryService<TKey, TItem> {
|
|
53
|
-
/**
|
|
54
|
-
* Register a new item in the registry
|
|
55
|
-
*/
|
|
56
|
-
register(key: TKey, item: TItem): void;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Unregister an item from the registry
|
|
60
|
-
*/
|
|
61
|
-
unregister(key: TKey): boolean;
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Get an item by its key
|
|
65
|
-
*/
|
|
66
|
-
get(key: TKey): TItem | undefined;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Check if an item exists in the registry
|
|
70
|
-
*/
|
|
71
|
-
has(key: TKey): boolean;
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Get all registered items
|
|
75
|
-
*/
|
|
76
|
-
getAll(): Map<TKey, TItem>;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Clear all items from the registry
|
|
80
|
-
*/
|
|
81
|
-
clear(): void;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Interface for services that provide reactive lists
|
|
86
|
-
*/
|
|
87
|
-
export interface ListService<T> {
|
|
88
|
-
/**
|
|
89
|
-
* Reactive reference to the list items
|
|
90
|
-
*/
|
|
91
|
-
items: Ref<T[]>;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Add an item to the list
|
|
95
|
-
*/
|
|
96
|
-
add(item: T): void;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Remove an item from the list
|
|
100
|
-
*/
|
|
101
|
-
remove(item: T): boolean;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Find an item in the list
|
|
105
|
-
*/
|
|
106
|
-
find(predicate: (item: T) => boolean): T | undefined;
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Filter items in the list
|
|
110
|
-
*/
|
|
111
|
-
filter(predicate: (item: T) => boolean): T[];
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Interface for services with ordered items
|
|
116
|
-
*/
|
|
117
|
-
export interface OrderedListService<T> extends ListService<T> {
|
|
118
|
-
/**
|
|
119
|
-
* Reorder an item to a new position
|
|
120
|
-
*/
|
|
121
|
-
reorder(fromIndex: number, toIndex: number): void;
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Get items sorted by priority
|
|
125
|
-
*/
|
|
126
|
-
getSorted(): T[];
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Result type for async service operations
|
|
131
|
-
*/
|
|
132
|
-
export interface ServiceResult<T> {
|
|
133
|
-
success: boolean;
|
|
134
|
-
data?: T;
|
|
135
|
-
error?: {
|
|
136
|
-
code: string;
|
|
137
|
-
message: string;
|
|
138
|
-
details?: Record<string, unknown>;
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Interface for services that support subscription to changes
|
|
144
|
-
*/
|
|
145
|
-
export interface ObservableService<T> {
|
|
146
|
-
/**
|
|
147
|
-
* Subscribe to changes
|
|
148
|
-
*/
|
|
149
|
-
subscribe(callback: (value: T) => void): () => void;
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Get the current value
|
|
153
|
-
*/
|
|
154
|
-
getValue(): T;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Type for widget registration
|
|
159
|
-
*/
|
|
160
|
-
export interface WidgetRegistration<TProps = Record<string, unknown>> {
|
|
161
|
-
id: string;
|
|
162
|
-
component: unknown;
|
|
163
|
-
props?: TProps;
|
|
164
|
-
order?: number;
|
|
165
|
-
isVisible?: boolean | (() => boolean);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Type for menu item registration
|
|
170
|
-
*/
|
|
171
|
-
export interface MenuItemRegistration {
|
|
172
|
-
id: string;
|
|
173
|
-
title: string;
|
|
174
|
-
icon?: string;
|
|
175
|
-
priority?: number;
|
|
176
|
-
permissions?: string | string[];
|
|
177
|
-
routeId?: string;
|
|
178
|
-
url?: string;
|
|
179
|
-
group?: string;
|
|
180
|
-
children?: MenuItemRegistration[];
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Type for toolbar item registration
|
|
185
|
-
*/
|
|
186
|
-
export interface ToolbarItemRegistration {
|
|
187
|
-
id: string;
|
|
188
|
-
title: string;
|
|
189
|
-
icon?: string;
|
|
190
|
-
order?: number;
|
|
191
|
-
disabled?: boolean;
|
|
192
|
-
clickHandler?: () => void;
|
|
193
|
-
permissions?: string | string[];
|
|
194
|
-
}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Base error class for VC-Shell framework
|
|
3
|
-
* Provides structured error handling with error codes and context
|
|
4
|
-
*/
|
|
5
|
-
export class FrameworkError extends Error {
|
|
6
|
-
constructor(
|
|
7
|
-
message: string,
|
|
8
|
-
public readonly code: string,
|
|
9
|
-
public readonly context?: Record<string, unknown>,
|
|
10
|
-
) {
|
|
11
|
-
super(message);
|
|
12
|
-
this.name = "FrameworkError";
|
|
13
|
-
|
|
14
|
-
// Maintains proper stack trace for where our error was thrown (only available on V8)
|
|
15
|
-
if (Error.captureStackTrace) {
|
|
16
|
-
Error.captureStackTrace(this, FrameworkError);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
toJSON() {
|
|
21
|
-
return {
|
|
22
|
-
name: this.name,
|
|
23
|
-
code: this.code,
|
|
24
|
-
message: this.message,
|
|
25
|
-
context: this.context,
|
|
26
|
-
stack: this.stack,
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Error thrown when validation fails
|
|
33
|
-
*/
|
|
34
|
-
export class ValidationError extends FrameworkError {
|
|
35
|
-
constructor(message: string, context?: Record<string, unknown>) {
|
|
36
|
-
super(message, "VALIDATION_ERROR", context);
|
|
37
|
-
this.name = "ValidationError";
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Error thrown when a service operation fails
|
|
43
|
-
*/
|
|
44
|
-
export class ServiceError extends FrameworkError {
|
|
45
|
-
constructor(message: string, context?: Record<string, unknown>) {
|
|
46
|
-
super(message, "SERVICE_ERROR", context);
|
|
47
|
-
this.name = "ServiceError";
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Error thrown when a required dependency is not provided
|
|
53
|
-
*/
|
|
54
|
-
export class InjectionError extends FrameworkError {
|
|
55
|
-
constructor(serviceName: string, context?: Record<string, unknown>) {
|
|
56
|
-
super(`${serviceName} not provided. Make sure to call the corresponding 'provide' function.`, "INJECTION_ERROR", {
|
|
57
|
-
serviceName,
|
|
58
|
-
...context,
|
|
59
|
-
});
|
|
60
|
-
this.name = "InjectionError";
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Error thrown when component registration fails
|
|
66
|
-
*/
|
|
67
|
-
export class RegistrationError extends FrameworkError {
|
|
68
|
-
constructor(componentName: string, reason: string, context?: Record<string, unknown>) {
|
|
69
|
-
super(`Failed to register '${componentName}': ${reason}`, "REGISTRATION_ERROR", {
|
|
70
|
-
componentName,
|
|
71
|
-
...context,
|
|
72
|
-
});
|
|
73
|
-
this.name = "RegistrationError";
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Error thrown when a blade operation fails
|
|
79
|
-
*/
|
|
80
|
-
export class BladeError extends FrameworkError {
|
|
81
|
-
constructor(message: string, bladeId?: string, context?: Record<string, unknown>) {
|
|
82
|
-
super(message, "BLADE_ERROR", {
|
|
83
|
-
bladeId,
|
|
84
|
-
...context,
|
|
85
|
-
});
|
|
86
|
-
this.name = "BladeError";
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Error thrown when module loading fails
|
|
92
|
-
*/
|
|
93
|
-
export class ModuleLoadError extends FrameworkError {
|
|
94
|
-
constructor(moduleId: string, reason: string, context?: Record<string, unknown>) {
|
|
95
|
-
super(`Failed to load module '${moduleId}': ${reason}`, "MODULE_LOAD_ERROR", {
|
|
96
|
-
moduleId,
|
|
97
|
-
...context,
|
|
98
|
-
});
|
|
99
|
-
this.name = "ModuleLoadError";
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Type guard to check if an error is a FrameworkError
|
|
105
|
-
*/
|
|
106
|
-
export function isFrameworkError(error: unknown): error is FrameworkError {
|
|
107
|
-
return error instanceof FrameworkError;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Wraps an unknown error into a FrameworkError
|
|
112
|
-
*/
|
|
113
|
-
export function wrapError(error: unknown, code = "UNKNOWN_ERROR"): FrameworkError {
|
|
114
|
-
if (isFrameworkError(error)) {
|
|
115
|
-
return error;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
if (error instanceof Error) {
|
|
119
|
-
return new FrameworkError(error.message, code, {
|
|
120
|
-
originalError: error.name,
|
|
121
|
-
stack: error.stack,
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
return new FrameworkError(String(error), code);
|
|
126
|
-
}
|