@vc-shell/vc-app-skill 2.0.0-alpha.33 → 2.0.0-alpha.34
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/CHANGELOG.md +78 -54
- package/README.md +42 -12
- package/package.json +4 -4
- package/runtime/VERSION +1 -1
- package/runtime/agents/api-analyzer.md +31 -16
- package/runtime/agents/blade-enhancer.md +15 -9
- package/runtime/agents/details-blade-generator.md +47 -31
- package/runtime/agents/list-blade-generator.md +21 -37
- package/runtime/agents/locales-generator.md +3 -0
- package/runtime/agents/migration-agent.md +18 -7
- package/runtime/agents/module-analyzer.md +2 -0
- package/runtime/agents/module-assembler.md +15 -0
- package/runtime/agents/promote-agent.md +15 -4
- package/runtime/agents/type-checker.md +11 -0
- package/runtime/knowledge/docs/_BUILD_HASH.md +1 -1
- package/runtime/knowledge/docs/core/api/platform.docs.md +30 -30
- package/runtime/knowledge/docs/core/blade-navigation/blade-nav-composables.docs.md +41 -41
- package/runtime/knowledge/docs/core/composables/bladeContext/index.docs.md +12 -10
- package/runtime/knowledge/docs/core/composables/useApiClient/useApiClient.docs.md +11 -14
- package/runtime/knowledge/docs/core/composables/useAppBarMobileButtons/useAppBarMobileButtons.docs.md +35 -35
- package/runtime/knowledge/docs/core/composables/useAppBarWidget/useAppBarWidget.docs.md +35 -35
- package/runtime/knowledge/docs/core/composables/useAppInsights/useAppInsights.docs.md +15 -15
- package/runtime/knowledge/docs/core/composables/useAssets/useAssets.docs.md +21 -18
- package/runtime/knowledge/docs/core/composables/useAssetsManager/useAssetsManager.docs.md +28 -24
- package/runtime/knowledge/docs/core/composables/useAsync/useAsync.docs.md +90 -61
- package/runtime/knowledge/docs/core/composables/useBeforeUnload/useBeforeUnload.docs.md +19 -18
- package/runtime/knowledge/docs/core/composables/useBlade/useBlade.docs.md +89 -68
- package/runtime/knowledge/docs/core/composables/useBladeForm/useBladeForm.docs.md +27 -25
- package/runtime/knowledge/docs/core/composables/useBladeRegistry/useBladeRegistry.docs.md +15 -15
- package/runtime/knowledge/docs/core/composables/useBladeWidgets/index.docs.md +43 -47
- package/runtime/knowledge/docs/core/composables/useBreadcrumbs/useBreadcrumbs.docs.md +11 -11
- package/runtime/knowledge/docs/core/composables/useConnectionStatus/useConnectionStatus.docs.md +27 -15
- package/runtime/knowledge/docs/core/composables/useDashboard/useDashboard.docs.md +30 -30
- package/runtime/knowledge/docs/core/composables/useDynamicProperties/useDynamicProperties.docs.md +34 -36
- package/runtime/knowledge/docs/core/composables/useErrorHandler/useErrorHandler.docs.md +44 -23
- package/runtime/knowledge/docs/core/composables/useFunctions/useFunctions.docs.md +14 -11
- package/runtime/knowledge/docs/core/composables/useKeyboardNavigation/useKeyboardNavigation.docs.md +47 -38
- package/runtime/knowledge/docs/core/composables/useLanguages/useLanguages.docs.md +37 -28
- package/runtime/knowledge/docs/core/composables/useLoading/useLoading.docs.md +23 -17
- package/runtime/knowledge/docs/core/composables/useMenuExpanded/index.docs.md +9 -9
- package/runtime/knowledge/docs/core/composables/useMenuService/useMenuService.docs.md +42 -42
- package/runtime/knowledge/docs/core/composables/useModificationTracker/useModificationTracker.docs.md +22 -12
- package/runtime/knowledge/docs/core/composables/useNotifications/useNotifications.docs.md +33 -41
- package/runtime/knowledge/docs/core/composables/usePermissions/usePermissions.docs.md +16 -16
- package/runtime/knowledge/docs/core/composables/usePlatformLocaleSync/usePlatformLocaleSync.docs.md +28 -0
- package/runtime/knowledge/docs/core/composables/usePopup/usePopup.docs.md +32 -24
- package/runtime/knowledge/docs/core/composables/useResponsive/useResponsive.docs.md +32 -11
- package/runtime/knowledge/docs/core/composables/useSettings/useSettings.docs.md +22 -13
- package/runtime/knowledge/docs/core/composables/useSettingsMenu/useSettingsMenu.docs.md +7 -7
- package/runtime/knowledge/docs/core/composables/useSidebarState/useSidebarState.docs.md +32 -24
- package/runtime/knowledge/docs/core/composables/useSlowNetworkDetection/useSlowNetworkDetection.docs.md +21 -17
- package/runtime/knowledge/docs/core/composables/useTheme/useTheme.docs.md +24 -24
- package/runtime/knowledge/docs/core/composables/useToolbar/useToolbar.docs.md +28 -31
- package/runtime/knowledge/docs/core/composables/useUser/useUser.docs.md +43 -24
- package/runtime/knowledge/docs/core/composables/useUserManagement/useUserManagement.docs.md +68 -48
- package/runtime/knowledge/docs/core/composables/useWebVitals/useWebVitals.docs.md +19 -19
- package/runtime/knowledge/docs/core/composables/useWidgets/useWidgets.docs.md +42 -47
- package/runtime/knowledge/docs/core/directives/autofocus/autofocus.docs.md +10 -4
- package/runtime/knowledge/docs/core/directives/loading/loading.docs.md +35 -20
- package/runtime/knowledge/docs/core/notifications/notifications.docs.md +36 -35
- package/runtime/knowledge/docs/core/plugins/ai-agent/ai-agent.docs.md +38 -38
- package/runtime/knowledge/docs/core/plugins/extension-points/extension-points.docs.md +79 -62
- package/runtime/knowledge/docs/core/plugins/global-error-handler/global-error-handler.docs.md +10 -10
- package/runtime/knowledge/docs/core/plugins/i18n/i18n.docs.md +21 -23
- package/runtime/knowledge/docs/core/plugins/modularity/modularity.docs.md +91 -83
- package/runtime/knowledge/docs/core/plugins/permissions/permissions.docs.md +10 -16
- package/runtime/knowledge/docs/core/plugins/signalR/signalR.docs.md +9 -9
- package/runtime/knowledge/docs/core/plugins/validation/validation.docs.md +65 -22
- package/runtime/knowledge/docs/core/services/services.docs.md +19 -22
- package/runtime/knowledge/docs/core/types/types.docs.md +40 -40
- package/runtime/knowledge/docs/core/utilities/date/date-utilities.docs.md +27 -27
- package/runtime/knowledge/docs/core/utilities/shared-utilities.docs.md +23 -23
- package/runtime/knowledge/docs/core/utilities/thumbnail/thumbnail.docs.md +22 -25
- package/runtime/knowledge/docs/core/utilities/utilities.docs.md +64 -64
- package/runtime/knowledge/docs/injection-keys.docs.md +52 -51
- package/runtime/knowledge/docs/modules/assets-manager/assets-manager.docs.md +9 -9
- package/runtime/knowledge/docs/shell/_internal/popup/common/popup-common.docs.md +23 -43
- package/runtime/knowledge/docs/shell/auth/ChangePasswordPage/change-password-page.docs.md +5 -5
- package/runtime/knowledge/docs/shell/auth/ForgotPasswordPage/forgot-password-page.docs.md +5 -5
- package/runtime/knowledge/docs/shell/auth/InvitePage/invite-page.docs.md +8 -7
- package/runtime/knowledge/docs/shell/auth/LoginPage/login-page.docs.md +7 -7
- package/runtime/knowledge/docs/shell/auth/ResetPasswordPage/reset-password-page.docs.md +8 -7
- package/runtime/knowledge/docs/shell/auth/sign-in/sign-in.docs.md +29 -13
- package/runtime/knowledge/docs/shell/components/change-password/change-password.docs.md +13 -16
- package/runtime/knowledge/docs/shell/components/change-password-button/change-password-button.docs.md +1 -7
- package/runtime/knowledge/docs/shell/components/error-interceptor/error-interceptor.docs.md +5 -5
- package/runtime/knowledge/docs/shell/components/language-selector/language-selector.docs.md +1 -1
- package/runtime/knowledge/docs/shell/components/logout-button/logout-button.docs.md +1 -1
- package/runtime/knowledge/docs/shell/components/notification-template/notification-template.docs.md +17 -9
- package/runtime/knowledge/docs/shell/components/settings-menu/settings-menu.docs.md +11 -17
- package/runtime/knowledge/docs/shell/components/settings-menu-item/settings-menu-item.docs.md +34 -65
- package/runtime/knowledge/docs/shell/components/sidebar/sidebar.docs.md +16 -26
- package/runtime/knowledge/docs/shell/components/theme-selector/theme-selector.docs.md +2 -2
- package/runtime/knowledge/docs/shell/components/user-dropdown-button/user-dropdown-button.docs.md +7 -9
- package/runtime/knowledge/docs/shell/dashboard/dashboard-charts/dashboard-charts.docs.md +30 -40
- package/runtime/knowledge/docs/shell/dashboard/dashboard-widget-card/dashboard-widget-card.docs.md +26 -19
- package/runtime/knowledge/docs/shell/dashboard/draggable-dashboard/draggable-dashboard.docs.md +15 -12
- package/runtime/knowledge/docs/ui/components/atoms/vc-badge/vc-badge.docs.md +15 -26
- package/runtime/knowledge/docs/ui/components/atoms/vc-banner/vc-banner.docs.md +21 -19
- package/runtime/knowledge/docs/ui/components/atoms/vc-button/vc-button.docs.md +83 -67
- package/runtime/knowledge/docs/ui/components/atoms/vc-card/vc-card.docs.md +100 -59
- package/runtime/knowledge/docs/ui/components/atoms/vc-col/vc-col.docs.md +28 -11
- package/runtime/knowledge/docs/ui/components/atoms/vc-container/vc-container.docs.md +20 -17
- package/runtime/knowledge/docs/ui/components/atoms/vc-hint/vc-hint.docs.md +26 -17
- package/runtime/knowledge/docs/ui/components/atoms/vc-icon/vc-icon.docs.md +30 -32
- package/runtime/knowledge/docs/ui/components/atoms/vc-image/vc-image.docs.md +25 -48
- package/runtime/knowledge/docs/ui/components/atoms/vc-label/vc-label.docs.md +29 -24
- package/runtime/knowledge/docs/ui/components/atoms/vc-link/vc-link.docs.md +23 -15
- package/runtime/knowledge/docs/ui/components/atoms/vc-loading/vc-loading.docs.md +22 -13
- package/runtime/knowledge/docs/ui/components/atoms/vc-progress/vc-progress.docs.md +33 -18
- package/runtime/knowledge/docs/ui/components/atoms/vc-row/vc-row.docs.md +56 -15
- package/runtime/knowledge/docs/ui/components/atoms/vc-scrollable-container/vc-scrollable-container.docs.md +28 -15
- package/runtime/knowledge/docs/ui/components/atoms/vc-skeleton/vc-skeleton.docs.md +40 -20
- package/runtime/knowledge/docs/ui/components/atoms/vc-status/vc-status.docs.md +25 -14
- package/runtime/knowledge/docs/ui/components/atoms/vc-status-icon/vc-status-icon.docs.md +40 -14
- package/runtime/knowledge/docs/ui/components/atoms/vc-tooltip/vc-tooltip.docs.md +54 -42
- package/runtime/knowledge/docs/ui/components/atoms/vc-video/vc-video.docs.md +17 -17
- package/runtime/knowledge/docs/ui/components/atoms/vc-widget/vc-widget.docs.md +21 -21
- package/runtime/knowledge/docs/ui/components/molecules/multilanguage-selector/multilanguage-selector.docs.md +23 -10
- package/runtime/knowledge/docs/ui/components/molecules/vc-accordion/vc-accordion.docs.md +55 -44
- package/runtime/knowledge/docs/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.docs.md +23 -20
- package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox/vc-checkbox.docs.md +92 -65
- package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox-group/vc-checkbox-group.docs.md +22 -36
- package/runtime/knowledge/docs/ui/components/molecules/vc-color-input/vc-color-input.docs.md +65 -23
- package/runtime/knowledge/docs/ui/components/molecules/vc-date-picker/vc-date-picker.docs.md +52 -73
- package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown/vc-dropdown.docs.md +91 -85
- package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown-panel/vc-dropdown-panel.docs.md +38 -42
- package/runtime/knowledge/docs/ui/components/molecules/vc-editor/vc-editor.docs.md +56 -73
- package/runtime/knowledge/docs/ui/components/molecules/vc-field/vc-field.docs.md +61 -27
- package/runtime/knowledge/docs/ui/components/molecules/vc-file-upload/vc-file-upload.docs.md +42 -50
- package/runtime/knowledge/docs/ui/components/molecules/vc-form/vc-form.docs.md +35 -64
- package/runtime/knowledge/docs/ui/components/molecules/vc-image-tile/vc-image-tile.docs.md +38 -41
- package/runtime/knowledge/docs/ui/components/molecules/vc-input/vc-input.docs.md +109 -131
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-currency/vc-input-currency.docs.md +47 -88
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.docs.md +50 -64
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-group/vc-input-group.docs.md +29 -24
- package/runtime/knowledge/docs/ui/components/molecules/vc-menu/vc-menu.docs.md +32 -28
- package/runtime/knowledge/docs/ui/components/molecules/vc-multivalue/vc-multivalue.docs.md +57 -65
- package/runtime/knowledge/docs/ui/components/molecules/vc-pagination/vc-pagination.docs.md +28 -26
- package/runtime/knowledge/docs/ui/components/molecules/vc-radio-button/vc-radio-button.docs.md +55 -20
- package/runtime/knowledge/docs/ui/components/molecules/vc-radio-group/vc-radio-group.docs.md +21 -35
- package/runtime/knowledge/docs/ui/components/molecules/vc-rating/vc-rating.docs.md +38 -33
- package/runtime/knowledge/docs/ui/components/molecules/vc-select/vc-select.docs.md +72 -83
- package/runtime/knowledge/docs/ui/components/molecules/vc-slider/vc-slider.docs.md +21 -16
- package/runtime/knowledge/docs/ui/components/molecules/vc-switch/vc-switch.docs.md +55 -64
- package/runtime/knowledge/docs/ui/components/molecules/vc-textarea/vc-textarea.docs.md +51 -70
- package/runtime/knowledge/docs/ui/components/molecules/vc-toast/vc-toast.docs.md +58 -57
- package/runtime/knowledge/docs/ui/components/organisms/vc-app/vc-app.docs.md +49 -26
- package/runtime/knowledge/docs/ui/components/organisms/vc-auth-layout/vc-auth-layout.docs.md +82 -28
- package/runtime/knowledge/docs/ui/components/organisms/vc-blade/vc-blade.docs.md +90 -75
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/composables/table-composables.docs.md +99 -48
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/vc-data-table.docs.md +548 -367
- package/runtime/knowledge/docs/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.docs.md +35 -52
- package/runtime/knowledge/docs/ui/components/organisms/vc-gallery/vc-gallery.docs.md +33 -62
- package/runtime/knowledge/docs/ui/components/organisms/vc-image-upload/vc-image-upload.docs.md +17 -23
- package/runtime/knowledge/docs/ui/components/organisms/vc-popup/vc-popup.docs.md +109 -68
- package/runtime/knowledge/docs/ui/components/organisms/vc-sidebar/vc-sidebar.docs.md +82 -44
- package/runtime/knowledge/docs/ui/composables/ui-composables.docs.md +8 -8
- package/runtime/knowledge/docs/ui/composables/useDataTablePagination.docs.md +164 -0
- package/runtime/knowledge/docs/ui/composables/useDataTableSort.docs.md +34 -26
- package/runtime/knowledge/docs/ui/composables/useTableSelection.docs.md +48 -40
- package/runtime/knowledge/docs/ui/composables/useTableSort.docs.md +30 -17
- package/runtime/knowledge/docs/ui/types/ui-types.docs.md +40 -29
- package/runtime/knowledge/examples/offers-module.md +15 -13
- package/runtime/knowledge/examples/team-module.md +82 -119
- package/runtime/knowledge/examples/videos-module.md +44 -17
- package/runtime/knowledge/index.md +22 -0
- package/runtime/knowledge/migration-prompts/blade-form-migration.md +17 -8
- package/runtime/knowledge/migration-prompts/blade-props-migration.md +1 -2
- package/runtime/knowledge/migration-prompts/datatable-migration.md +801 -0
- package/runtime/knowledge/migration-prompts/icon-migration.md +97 -0
- package/runtime/knowledge/migration-prompts/manual-migration-audit.md +117 -0
- package/runtime/knowledge/migration-prompts/notifications-migration.md +8 -3
- package/runtime/knowledge/migration-prompts/nswag-migration.md +25 -29
- package/runtime/knowledge/migration-prompts/use-assets-migration.md +164 -0
- package/runtime/knowledge/migration-prompts/use-data-table-pagination-migration.md +176 -0
- package/runtime/knowledge/migration-prompts/widgets-migration.md +48 -27
- package/runtime/knowledge/patterns/assets-management.md +20 -20
- package/runtime/knowledge/patterns/blade-navigation.md +7 -14
- package/runtime/knowledge/patterns/blade-widget.md +19 -17
- package/runtime/knowledge/patterns/child-blade-flow.md +19 -7
- package/runtime/knowledge/patterns/composable-details.md +20 -50
- package/runtime/knowledge/patterns/composable-list.md +43 -31
- package/runtime/knowledge/patterns/dashboard-widget.md +14 -16
- package/runtime/knowledge/patterns/datatable-pattern.md +521 -0
- package/runtime/knowledge/patterns/details-blade-pattern.md +78 -116
- package/runtime/knowledge/patterns/extension-points-usage.md +53 -44
- package/runtime/knowledge/patterns/form-validation.md +28 -64
- package/runtime/knowledge/patterns/list-blade-pattern.md +33 -21
- package/runtime/knowledge/patterns/module-structure.md +7 -1
- package/runtime/knowledge/patterns/multilanguage-fields.md +8 -14
- package/runtime/knowledge/patterns/notification-template.md +21 -14
- package/runtime/knowledge/patterns/signalr-notifications.md +30 -32
- package/runtime/knowledge/patterns/toolbar-pattern.md +18 -20
- package/runtime/vc-app.md +241 -62
|
@@ -31,6 +31,7 @@ PushNotification (SignalR)
|
|
|
31
31
|
### `useNotificationStore()`
|
|
32
32
|
|
|
33
33
|
Returns the shared `NotificationStore` singleton. Resolution order:
|
|
34
|
+
|
|
34
35
|
1. Vue `inject()` (inside component setup or `app.runWithContext()`)
|
|
35
36
|
2. Module-level singleton fallback (ensures microfrontend modules share state)
|
|
36
37
|
|
|
@@ -38,20 +39,20 @@ Returns the shared `NotificationStore` singleton. Resolution order:
|
|
|
38
39
|
|
|
39
40
|
### `NotificationStore` Interface
|
|
40
41
|
|
|
41
|
-
| Member
|
|
42
|
-
|
|
43
|
-
| `registry`
|
|
44
|
-
| `history`
|
|
45
|
-
| `realtime`
|
|
46
|
-
| `unreadCount`
|
|
47
|
-
| `hasUnread`
|
|
48
|
-
| `registerType(type, config)` | `(string, NotificationTypeConfig) => void`
|
|
49
|
-
| `ingest(message)`
|
|
50
|
-
| `markAsRead(message)`
|
|
51
|
-
| `markAllAsRead()`
|
|
52
|
-
| `loadHistory(take?)`
|
|
53
|
-
| `subscribe(opts)`
|
|
54
|
-
| `getByType(type)`
|
|
42
|
+
| Member | Type | Description |
|
|
43
|
+
| ---------------------------- | -------------------------------------------- | -------------------------------------------------------------------- |
|
|
44
|
+
| `registry` | `Map<string, NotificationTypeConfig>` | Registered notification type configurations |
|
|
45
|
+
| `history` | `Ref<PushNotification[]>` | All notifications (loaded from API + ingested) |
|
|
46
|
+
| `realtime` | `Ref<PushNotification[]>` | Session-only notifications from SignalR |
|
|
47
|
+
| `unreadCount` | `ComputedRef<number>` | Count of unread notifications in history |
|
|
48
|
+
| `hasUnread` | `ComputedRef<boolean>` | Whether any unread notifications exist |
|
|
49
|
+
| `registerType(type, config)` | `(string, NotificationTypeConfig) => void` | Register a notification type with toast/template config |
|
|
50
|
+
| `ingest(message)` | `(PushNotification) => void` | Process an incoming notification (upsert, toast, notify subscribers) |
|
|
51
|
+
| `markAsRead(message)` | `(PushNotification) => void` | Mark a single notification as read |
|
|
52
|
+
| `markAllAsRead()` | `() => Promise<void>` | Optimistic mark-all-as-read with server sync and rollback on failure |
|
|
53
|
+
| `loadHistory(take?)` | `(number?) => Promise<void>` | Load notification history from the API (default: 10) |
|
|
54
|
+
| `subscribe(opts)` | `({types, filter?, handler?}) => () => void` | Subscribe to notification types; returns unsubscribe function |
|
|
55
|
+
| `getByType(type)` | `(string) => PushNotification[]` | Filter history by `notifyType` |
|
|
55
56
|
|
|
56
57
|
**File:** `store.ts`
|
|
57
58
|
|
|
@@ -65,9 +66,9 @@ Blade-level notification subscription (Level 2). Automatically unsubscribes when
|
|
|
65
66
|
|
|
66
67
|
```typescript
|
|
67
68
|
interface BladeNotificationOptions<T extends PushNotification> {
|
|
68
|
-
types: string[];
|
|
69
|
-
filter?: (msg: T) => boolean;
|
|
70
|
-
onMessage?: (msg: T) => void;
|
|
69
|
+
types: string[]; // Notification types to subscribe to
|
|
70
|
+
filter?: (msg: T) => boolean; // Optional message filter
|
|
71
|
+
onMessage?: (msg: T) => void; // Callback for each matching message
|
|
71
72
|
}
|
|
72
73
|
```
|
|
73
74
|
|
|
@@ -75,9 +76,9 @@ interface BladeNotificationOptions<T extends PushNotification> {
|
|
|
75
76
|
|
|
76
77
|
```typescript
|
|
77
78
|
interface BladeNotificationReturn<T extends PushNotification> {
|
|
78
|
-
messages: ComputedRef<T[]>;
|
|
79
|
+
messages: ComputedRef<T[]>; // Filtered unread messages from realtime
|
|
79
80
|
unreadCount: ComputedRef<number>; // Count of matching unread messages
|
|
80
|
-
markAsRead: (msg: T) => void;
|
|
81
|
+
markAsRead: (msg: T) => void; // Mark a specific message as read
|
|
81
82
|
}
|
|
82
83
|
```
|
|
83
84
|
|
|
@@ -112,26 +113,26 @@ Handles toast popup display based on `NotificationTypeConfig.toast` settings. Cr
|
|
|
112
113
|
|
|
113
114
|
#### Toast Modes
|
|
114
115
|
|
|
115
|
-
| Mode
|
|
116
|
-
|
|
117
|
-
| `"auto"`
|
|
116
|
+
| Mode | Behavior |
|
|
117
|
+
| ------------ | ------------------------------------------------------------------------------------------- |
|
|
118
|
+
| `"auto"` | Single fire-and-forget toast with severity-based timeout |
|
|
118
119
|
| `"progress"` | Persistent toast updated on each message; auto-completes when `isComplete()` returns `true` |
|
|
119
|
-
| `"silent"`
|
|
120
|
+
| `"silent"` | No toast displayed |
|
|
120
121
|
|
|
121
122
|
### Types
|
|
122
123
|
|
|
123
124
|
**File:** `types.ts`
|
|
124
125
|
|
|
125
|
-
| Type
|
|
126
|
-
|
|
127
|
-
| `Severity`
|
|
128
|
-
| `ToastConfig`
|
|
129
|
-
| `NotificationTypeConfig`
|
|
130
|
-
| `ModuleNotificationsConfig`
|
|
131
|
-
| `NotificationAction`
|
|
132
|
-
| `NotificationSubscription`
|
|
133
|
-
| `SEVERITY_TIMEOUTS`
|
|
134
|
-
| `EXCLUDED_NOTIFICATION_TYPES` | Types excluded from ingestion (e.g. `"IndexProgressPushNotification"`)
|
|
126
|
+
| Type | Description |
|
|
127
|
+
| ----------------------------- | --------------------------------------------------------------------------------------- |
|
|
128
|
+
| `Severity` | `"info" \| "warning" \| "error" \| "critical"` |
|
|
129
|
+
| `ToastConfig` | Toast behavior: mode, severity (static or function), timeout, isComplete, completedType |
|
|
130
|
+
| `NotificationTypeConfig` | Per-type config: optional Vue `template` component, `toast` config, `groupBy` field |
|
|
131
|
+
| `ModuleNotificationsConfig` | Record mapping `notifyType` strings to `NotificationTypeConfig` |
|
|
132
|
+
| `NotificationAction` | Action button in notification UI: label, icon, handler, visibility |
|
|
133
|
+
| `NotificationSubscription` | Internal subscriber record: id, types, filter, handler |
|
|
134
|
+
| `SEVERITY_TIMEOUTS` | Default timeouts: info=5s, warning=8s, error=persistent, critical=persistent |
|
|
135
|
+
| `EXCLUDED_NOTIFICATION_TYPES` | Types excluded from ingestion (e.g. `"IndexProgressPushNotification"`) |
|
|
135
136
|
|
|
136
137
|
## Usage Examples
|
|
137
138
|
|
|
@@ -155,9 +156,9 @@ store.registerType("CatalogExportCompleted", {
|
|
|
155
156
|
template: ExportNotificationTemplate,
|
|
156
157
|
toast: {
|
|
157
158
|
mode: "progress",
|
|
158
|
-
severity: (msg) => msg.finished ? "info" : "warning",
|
|
159
|
+
severity: (msg) => (msg.finished ? "info" : "warning"),
|
|
159
160
|
isComplete: (msg) => !!msg.finished,
|
|
160
|
-
completedType: (msg) => msg.errorCount ? "error" : "success",
|
|
161
|
+
completedType: (msg) => (msg.errorCount ? "error" : "success"),
|
|
161
162
|
},
|
|
162
163
|
groupBy: "jobId",
|
|
163
164
|
});
|
|
@@ -36,63 +36,65 @@ app.use(aiAgentPlugin, {
|
|
|
36
36
|
|
|
37
37
|
### Plugin Options: `AiAgentPluginOptions`
|
|
38
38
|
|
|
39
|
-
| Option
|
|
40
|
-
|
|
41
|
-
| `config`
|
|
42
|
-
| `addGlobalToolbarButton` | `boolean`
|
|
39
|
+
| Option | Type | Default | Description |
|
|
40
|
+
| ------------------------ | ------------------------- | ------- | ------------------------------------------ |
|
|
41
|
+
| `config` | `Partial<IAiAgentConfig>` | `{}` | Panel configuration (see below) |
|
|
42
|
+
| `addGlobalToolbarButton` | `boolean` | `true` | Adds an AI button to every blade's toolbar |
|
|
43
43
|
|
|
44
44
|
### `IAiAgentConfig`
|
|
45
45
|
|
|
46
|
-
| Field
|
|
47
|
-
|
|
48
|
-
| `url`
|
|
49
|
-
| `title`
|
|
50
|
-
| `width`
|
|
51
|
-
| `expandedWidth`
|
|
52
|
-
| `allowedOrigins` | `string[]` | `["*"]`
|
|
46
|
+
| Field | Type | Default | Description |
|
|
47
|
+
| ---------------- | ---------- | ------------ | ------------------------------------------ |
|
|
48
|
+
| `url` | `string` | `""` | Chatbot iframe URL (required) |
|
|
49
|
+
| `title` | `string` | `"Virto OZ"` | Panel header title |
|
|
50
|
+
| `width` | `number` | `362` | Panel width in pixels |
|
|
51
|
+
| `expandedWidth` | `number` | `500` | Panel width when expanded |
|
|
52
|
+
| `allowedOrigins` | `string[]` | `["*"]` | Allowed origins for postMessage validation |
|
|
53
53
|
|
|
54
54
|
### Composable: `useAiAgent()`
|
|
55
55
|
|
|
56
56
|
Access the AI agent service from any component within the app.
|
|
57
57
|
|
|
58
|
-
| Return
|
|
59
|
-
|
|
60
|
-
| `panelState`
|
|
61
|
-
| `isOpen`
|
|
62
|
-
| `isExpanded`
|
|
63
|
-
| `totalItemsCount` | `ComputedRef<number>`
|
|
64
|
-
| `config`
|
|
65
|
-
| `context`
|
|
66
|
-
| `openPanel()`
|
|
67
|
-
| `closePanel()`
|
|
68
|
-
| `togglePanel()`
|
|
69
|
-
| `expandPanel()`
|
|
70
|
-
| `collapsePanel()` | `() => void`
|
|
71
|
-
| `setConfig()`
|
|
72
|
-
| `sendMessage()`
|
|
73
|
-
| `onMessage()`
|
|
58
|
+
| Return | Type | Description |
|
|
59
|
+
| ----------------- | ------------------------------------------- | ---------------------------------------------- |
|
|
60
|
+
| `panelState` | `Ref<"closed" \| "open" \| "expanded">` | Current panel state |
|
|
61
|
+
| `isOpen` | `ComputedRef<boolean>` | Whether the panel is visible |
|
|
62
|
+
| `isExpanded` | `ComputedRef<boolean>` | Whether the panel is in expanded mode |
|
|
63
|
+
| `totalItemsCount` | `ComputedRef<number>` | Number of context items |
|
|
64
|
+
| `config` | `Ref<IAiAgentConfig>` | Current configuration |
|
|
65
|
+
| `context` | `ComputedRef<IAiAgentContext>` | Full reactive context |
|
|
66
|
+
| `openPanel()` | `() => void` | Open the AI panel |
|
|
67
|
+
| `closePanel()` | `() => void` | Close the AI panel |
|
|
68
|
+
| `togglePanel()` | `() => void` | Toggle open/close |
|
|
69
|
+
| `expandPanel()` | `() => void` | Expand to larger width |
|
|
70
|
+
| `collapsePanel()` | `() => void` | Collapse to normal width |
|
|
71
|
+
| `setConfig()` | `(config: Partial<IAiAgentConfig>) => void` | Update configuration |
|
|
72
|
+
| `sendMessage()` | `(type, payload) => void` | Send message to chatbot iframe |
|
|
73
|
+
| `onMessage()` | `(handler) => () => void` | Register message handler (returns unsubscribe) |
|
|
74
74
|
|
|
75
75
|
### Composable: `useAiAgentContext(options)`
|
|
76
76
|
|
|
77
77
|
Binds blade data to the AI agent context. Call this in each blade that should participate in AI interactions.
|
|
78
78
|
|
|
79
|
-
| Option
|
|
80
|
-
|
|
81
|
-
| `dataRef`
|
|
82
|
-
| `suggestions` | `ISuggestion[]`
|
|
79
|
+
| Option | Type | Description |
|
|
80
|
+
| ------------- | -------------------- | -------------------------------------------------------- |
|
|
81
|
+
| `dataRef` | `Ref<T> \| Ref<T[]>` | Data to send (single object for details, array for list) |
|
|
82
|
+
| `suggestions` | `ISuggestion[]` | Custom suggestion cards for the chatbot UI |
|
|
83
83
|
|
|
84
|
-
| Return
|
|
85
|
-
|
|
86
|
-
| `previewState.isActive`
|
|
87
|
-
| `previewState.changedFields` | `ComputedRef<string[]>` | List of field names with pending changes
|
|
84
|
+
| Return | Type | Description |
|
|
85
|
+
| ---------------------------- | ----------------------- | ------------------------------------------------ |
|
|
86
|
+
| `previewState.isActive` | `ComputedRef<boolean>` | Whether AI-suggested changes are being previewed |
|
|
87
|
+
| `previewState.changedFields` | `ComputedRef<string[]>` | List of field names with pending changes |
|
|
88
88
|
|
|
89
89
|
### PostMessage Protocol
|
|
90
90
|
|
|
91
91
|
**Shell to Chatbot:**
|
|
92
|
+
|
|
92
93
|
- `INIT_CONTEXT` -- Initial context when chatbot loads (user, blade, items, suggestions, token)
|
|
93
94
|
- `UPDATE_CONTEXT` -- Context updates when blade/items change
|
|
94
95
|
|
|
95
96
|
**Chatbot to Shell:**
|
|
97
|
+
|
|
96
98
|
- `CHAT_READY` -- Chatbot finished loading
|
|
97
99
|
- `NAVIGATE_TO_APP` -- Open a specific blade
|
|
98
100
|
- `PREVIEW_CHANGES` -- Preview data changes in the form
|
|
@@ -110,9 +112,7 @@ Binds blade data to the AI agent context. Call this in each blade that should pa
|
|
|
110
112
|
const product = ref<Product>({});
|
|
111
113
|
const { previewState } = useAiAgentContext({
|
|
112
114
|
dataRef: product,
|
|
113
|
-
suggestions: [
|
|
114
|
-
{ id: "translate", title: "Translate", icon: "translation", prompt: "Translate to English" },
|
|
115
|
-
],
|
|
115
|
+
suggestions: [{ id: "translate", title: "Translate", icon: "translation", prompt: "Translate to English" }],
|
|
116
116
|
});
|
|
117
117
|
|
|
118
118
|
// In a list blade
|
|
@@ -50,7 +50,11 @@ This is how vc-shell achieves its modular architecture: modules can extend each
|
|
|
50
50
|
<form><!-- main form fields --></form>
|
|
51
51
|
|
|
52
52
|
<!-- Other modules can inject components here -->
|
|
53
|
-
<ExtensionPoint
|
|
53
|
+
<ExtensionPoint
|
|
54
|
+
name="seller:commissions"
|
|
55
|
+
separator
|
|
56
|
+
gap="1rem"
|
|
57
|
+
/>
|
|
54
58
|
</VcBlade>
|
|
55
59
|
</template>
|
|
56
60
|
|
|
@@ -74,7 +78,9 @@ add({
|
|
|
74
78
|
priority: 10,
|
|
75
79
|
});
|
|
76
80
|
|
|
77
|
-
export default defineAppModule({
|
|
81
|
+
export default defineAppModule({
|
|
82
|
+
/* ... */
|
|
83
|
+
});
|
|
78
84
|
```
|
|
79
85
|
|
|
80
86
|
When the seller details page renders, `CommissionFields` appears automatically below the main form -- with a separator and 1rem gap.
|
|
@@ -125,7 +131,7 @@ Components are sorted by `priority` (ascending). Lower numbers render first:
|
|
|
125
131
|
```typescript
|
|
126
132
|
add({ id: "a", component: A, priority: 20 }); // Renders second
|
|
127
133
|
add({ id: "b", component: B, priority: 10 }); // Renders first
|
|
128
|
-
add({ id: "c", component: C });
|
|
134
|
+
add({ id: "c", component: C }); // priority=0, renders first (tie)
|
|
129
135
|
```
|
|
130
136
|
|
|
131
137
|
Default priority is `0`. Components with the same priority render in registration order.
|
|
@@ -171,7 +177,10 @@ Use in templates:
|
|
|
171
177
|
|
|
172
178
|
```vue
|
|
173
179
|
<template>
|
|
174
|
-
<div
|
|
180
|
+
<div
|
|
181
|
+
v-if="hasComponents"
|
|
182
|
+
class="extensions-area"
|
|
183
|
+
>
|
|
175
184
|
<component
|
|
176
185
|
v-for="ext in components"
|
|
177
186
|
:key="ext.id"
|
|
@@ -208,10 +217,12 @@ remove("my-unique-id");
|
|
|
208
217
|
```
|
|
209
218
|
|
|
210
219
|
**`add()` behavior:**
|
|
220
|
+
|
|
211
221
|
- If a component with the same `id` already exists, it is **replaced** (not duplicated).
|
|
212
222
|
- This makes `add()` idempotent -- safe to call multiple times.
|
|
213
223
|
|
|
214
224
|
**`remove()` behavior:**
|
|
225
|
+
|
|
215
226
|
- Removes the component by `id`. No-op if not found.
|
|
216
227
|
|
|
217
228
|
### ExtensionPoint Component (Declarative)
|
|
@@ -230,14 +241,14 @@ import { ExtensionPoint } from "@vc-shell/framework";
|
|
|
230
241
|
|
|
231
242
|
**Props:**
|
|
232
243
|
|
|
233
|
-
| Prop
|
|
234
|
-
|
|
235
|
-
| `name`
|
|
236
|
-
| `separator`
|
|
237
|
-
| `separatorClass` | `string`
|
|
238
|
-
| `wrapperClass`
|
|
239
|
-
| `gap`
|
|
240
|
-
| `filter`
|
|
244
|
+
| Prop | Type | Default | Description |
|
|
245
|
+
| ---------------- | ------------------------- | ------------- | ------------------------------------------ |
|
|
246
|
+
| `name` | `string` | required | Extension point name |
|
|
247
|
+
| `separator` | `boolean` | `false` | Adds an `<hr>` before components |
|
|
248
|
+
| `separatorClass` | `string` | default style | Custom CSS class for the `<hr>` |
|
|
249
|
+
| `wrapperClass` | `string` | none | CSS class for the wrapper `<div>` |
|
|
250
|
+
| `gap` | `string` | none | CSS gap between components (e.g. `"1rem"`) |
|
|
251
|
+
| `filter` | `Record<string, unknown>` | none | Filter components by `meta` fields |
|
|
241
252
|
|
|
242
253
|
**Rendering modes:**
|
|
243
254
|
|
|
@@ -249,12 +260,7 @@ The component has three rendering modes, chosen automatically:
|
|
|
249
260
|
|
|
250
261
|
```vue
|
|
251
262
|
<!-- Layout mode: separator + gap -->
|
|
252
|
-
<ExtensionPoint
|
|
253
|
-
name="seller:commissions"
|
|
254
|
-
separator
|
|
255
|
-
gap="1rem"
|
|
256
|
-
wrapper-class="tw-p-4"
|
|
257
|
-
/>
|
|
263
|
+
<ExtensionPoint name="seller:commissions" separator gap="1rem" wrapper-class="tw-p-4" />
|
|
258
264
|
|
|
259
265
|
<!-- Plain mode: no wrapper -->
|
|
260
266
|
<ExtensionPoint name="seller:commissions" />
|
|
@@ -266,8 +272,14 @@ When you need full control over how extensions are rendered, use the scoped slot
|
|
|
266
272
|
|
|
267
273
|
```vue
|
|
268
274
|
<template>
|
|
269
|
-
<ExtensionPoint
|
|
270
|
-
|
|
275
|
+
<ExtensionPoint
|
|
276
|
+
name="order:actions"
|
|
277
|
+
v-slot="{ components, hasComponents }"
|
|
278
|
+
>
|
|
279
|
+
<div
|
|
280
|
+
v-if="hasComponents"
|
|
281
|
+
class="action-bar tw-flex tw-gap-2"
|
|
282
|
+
>
|
|
271
283
|
<component
|
|
272
284
|
v-for="ext in components"
|
|
273
285
|
:key="ext.id"
|
|
@@ -281,10 +293,10 @@ When you need full control over how extensions are rendered, use the scoped slot
|
|
|
281
293
|
|
|
282
294
|
The scoped slot receives:
|
|
283
295
|
|
|
284
|
-
| Slot prop
|
|
285
|
-
|
|
286
|
-
| `components`
|
|
287
|
-
| `hasComponents` | `boolean`
|
|
296
|
+
| Slot prop | Type | Description |
|
|
297
|
+
| --------------- | ---------------------- | ----------------------------- |
|
|
298
|
+
| `components` | `ExtensionComponent[]` | Sorted, filtered list |
|
|
299
|
+
| `hasComponents` | `boolean` | Whether the list is non-empty |
|
|
288
300
|
|
|
289
301
|
### Metadata Filtering
|
|
290
302
|
|
|
@@ -293,8 +305,8 @@ The `<ExtensionPoint>` component supports filtering by metadata fields. Only com
|
|
|
293
305
|
```typescript
|
|
294
306
|
// Plugin registers two components with different meta
|
|
295
307
|
const { add } = useExtensionPoint("order:details");
|
|
296
|
-
add({ id: "info-panel",
|
|
297
|
-
add({ id: "action-btn",
|
|
308
|
+
add({ id: "info-panel", component: InfoPanel, meta: { type: "info" } });
|
|
309
|
+
add({ id: "action-btn", component: ActionBtn, meta: { type: "action" } });
|
|
298
310
|
```
|
|
299
311
|
|
|
300
312
|
```vue
|
|
@@ -318,8 +330,8 @@ const { add } = useExtensionPoint(ExtensionPoints.AUTH_AFTER_FORM);
|
|
|
318
330
|
|
|
319
331
|
Currently defined constants:
|
|
320
332
|
|
|
321
|
-
| Constant
|
|
322
|
-
|
|
333
|
+
| Constant | Value | Location |
|
|
334
|
+
| --------------------------------- | ------------------- | ---------------------------------- |
|
|
323
335
|
| `ExtensionPoints.AUTH_AFTER_FORM` | `"auth:after-form"` | Login page, below the sign-in form |
|
|
324
336
|
|
|
325
337
|
App-level extension point names (e.g., `"seller:commissions"`) are the app's responsibility to define. Consider creating a shared constants file in your application.
|
|
@@ -377,7 +389,11 @@ export default defineAppModule({ locales: { en } });
|
|
|
377
389
|
<template>
|
|
378
390
|
<div class="commission-fields">
|
|
379
391
|
<h3>{{ $t("COMMISSIONS.TITLE") }}</h3>
|
|
380
|
-
<VcInput
|
|
392
|
+
<VcInput
|
|
393
|
+
v-if="editable"
|
|
394
|
+
v-model="rate"
|
|
395
|
+
label="Commission Rate (%)"
|
|
396
|
+
/>
|
|
381
397
|
<span v-else>{{ rate }}%</span>
|
|
382
398
|
</div>
|
|
383
399
|
</template>
|
|
@@ -452,9 +468,9 @@ Use metadata to categorize extensions and filter them in different locations:
|
|
|
452
468
|
```typescript
|
|
453
469
|
// Plugin registers multiple components with different categories
|
|
454
470
|
const { add } = useExtensionPoint("product:details");
|
|
455
|
-
add({ id: "specs-tab",
|
|
456
|
-
add({ id: "review-tab",
|
|
457
|
-
add({ id: "quick-action",
|
|
471
|
+
add({ id: "specs-tab", component: SpecsTab, meta: { zone: "tabs" }, priority: 10 });
|
|
472
|
+
add({ id: "review-tab", component: ReviewTab, meta: { zone: "tabs" }, priority: 20 });
|
|
473
|
+
add({ id: "quick-action", component: QuickAction, meta: { zone: "toolbar" } });
|
|
458
474
|
```
|
|
459
475
|
|
|
460
476
|
```vue
|
|
@@ -462,11 +478,17 @@ add({ id: "quick-action", component: QuickAction, meta: { zone: "toolbar" } }
|
|
|
462
478
|
<template>
|
|
463
479
|
<VcBlade title="Product Details">
|
|
464
480
|
<div class="toolbar">
|
|
465
|
-
<ExtensionPoint
|
|
481
|
+
<ExtensionPoint
|
|
482
|
+
name="product:details"
|
|
483
|
+
:filter="{ zone: 'toolbar' }"
|
|
484
|
+
/>
|
|
466
485
|
</div>
|
|
467
486
|
|
|
468
487
|
<div class="tabs">
|
|
469
|
-
<ExtensionPoint
|
|
488
|
+
<ExtensionPoint
|
|
489
|
+
name="product:details"
|
|
490
|
+
:filter="{ zone: 'tabs' }"
|
|
491
|
+
/>
|
|
470
492
|
</div>
|
|
471
493
|
</VcBlade>
|
|
472
494
|
</template>
|
|
@@ -488,6 +510,7 @@ add({ id: "my-fields", component: MyFields });
|
|
|
488
510
|
The dev-mode console warning (`Extension point "seller:comissions" is not declared`) will alert you to this. Always check the console in development.
|
|
489
511
|
|
|
490
512
|
> **Tip:** Define constants for your extension point names in a shared file:
|
|
513
|
+
>
|
|
491
514
|
> ```typescript
|
|
492
515
|
> // shared/extension-points.ts
|
|
493
516
|
> export const EP = {
|
|
@@ -547,10 +570,7 @@ function someUtility() {
|
|
|
547
570
|
Declares an extension point (host-side). Returns reactive computed refs.
|
|
548
571
|
|
|
549
572
|
```typescript
|
|
550
|
-
function defineExtensionPoint<M = Record<string, unknown>>(
|
|
551
|
-
name: string,
|
|
552
|
-
options?: ExtensionPointOptions,
|
|
553
|
-
): DefineExtensionPointReturn<M>;
|
|
573
|
+
function defineExtensionPoint<M = Record<string, unknown>>(name: string, options?: ExtensionPointOptions): DefineExtensionPointReturn<M>;
|
|
554
574
|
|
|
555
575
|
interface DefineExtensionPointReturn<M> {
|
|
556
576
|
/** Sorted list of registered components (by priority, ascending) */
|
|
@@ -603,23 +623,20 @@ interface ExtensionComponent {
|
|
|
603
623
|
|
|
604
624
|
### `<ExtensionPoint>` Component
|
|
605
625
|
|
|
606
|
-
| Prop
|
|
607
|
-
|
|
608
|
-
| `name`
|
|
609
|
-
| `separator`
|
|
610
|
-
| `separatorClass` | `string`
|
|
611
|
-
| `wrapperClass`
|
|
612
|
-
| `gap`
|
|
613
|
-
| `filter`
|
|
626
|
+
| Prop | Type | Default | Description |
|
|
627
|
+
| ---------------- | ------------------------- | -------------- | ----------------------------- |
|
|
628
|
+
| `name` | `string` | required | Extension point name |
|
|
629
|
+
| `separator` | `boolean` | `false` | Adds `<hr>` before components |
|
|
630
|
+
| `separatorClass` | `string` | built-in style | CSS class for the separator |
|
|
631
|
+
| `wrapperClass` | `string` | none | CSS class for the wrapper div |
|
|
632
|
+
| `gap` | `string` | none | CSS gap value (e.g. `"1rem"`) |
|
|
633
|
+
| `filter` | `Record<string, unknown>` | none | Filter by meta field equality |
|
|
614
634
|
|
|
615
635
|
**Scoped slot:**
|
|
616
636
|
|
|
617
637
|
```typescript
|
|
618
638
|
defineSlots<{
|
|
619
|
-
default?: (props: {
|
|
620
|
-
components: ExtensionComponent[];
|
|
621
|
-
hasComponents: boolean;
|
|
622
|
-
}) => any;
|
|
639
|
+
default?: (props: { components: ExtensionComponent[]; hasComponents: boolean }) => any;
|
|
623
640
|
}>();
|
|
624
641
|
```
|
|
625
642
|
|
|
@@ -641,20 +658,20 @@ type ExtensionPointName = "auth:after-form";
|
|
|
641
658
|
|
|
642
659
|
These are used internally by `defineExtensionPoint` and `useExtensionPoint`. You typically do not call them directly, but they are available for testing and dev tools:
|
|
643
660
|
|
|
644
|
-
| Function
|
|
645
|
-
|
|
646
|
-
| `declarePoint(name, options)` | Declare a point. No-op if already declared.
|
|
647
|
-
| `getPoint(name)`
|
|
648
|
-
| `getRegistry()`
|
|
661
|
+
| Function | Description |
|
|
662
|
+
| ----------------------------- | -------------------------------------------------------- |
|
|
663
|
+
| `declarePoint(name, options)` | Declare a point. No-op if already declared. |
|
|
664
|
+
| `getPoint(name)` | Get reactive state. Creates undeclared entry if missing. |
|
|
665
|
+
| `getRegistry()` | Get the full reactive registry (for dev tools). |
|
|
649
666
|
|
|
650
667
|
---
|
|
651
668
|
|
|
652
669
|
## Related
|
|
653
670
|
|
|
654
|
-
| Resource
|
|
655
|
-
|
|
656
|
-
| Modularity Plugin
|
|
657
|
-
| Extension Point Store
|
|
658
|
-
| ExtensionPoint Component
|
|
659
|
-
| Types
|
|
660
|
-
| Seller Details (usage example) | `apps/vendor-portal/src/modules/seller-details/`
|
|
671
|
+
| Resource | Path | Description |
|
|
672
|
+
| ------------------------------ | -------------------------------------------------- | --------------------------------------------- |
|
|
673
|
+
| Modularity Plugin | `core/plugins/modularity/` | Module definition and registration |
|
|
674
|
+
| Extension Point Store | `core/plugins/extension-points/store.ts` | Reactive registry implementation |
|
|
675
|
+
| ExtensionPoint Component | `core/plugins/extension-points/ExtensionPoint.vue` | Declarative render component |
|
|
676
|
+
| Types | `core/plugins/extension-points/types.ts` | `ExtensionComponent`, `ExtensionPointOptions` |
|
|
677
|
+
| Seller Details (usage example) | `apps/vendor-portal/src/modules/seller-details/` | Real-world extension point host |
|
package/runtime/knowledge/docs/core/plugins/global-error-handler/global-error-handler.docs.md
CHANGED
|
@@ -38,14 +38,14 @@ Module developers do not need to call this function. It is invoked once during t
|
|
|
38
38
|
|
|
39
39
|
Installs all error handlers on the given Vue app instance.
|
|
40
40
|
|
|
41
|
-
| Behavior
|
|
42
|
-
|
|
43
|
-
| Chains to existing `errorHandler` | Does not replace a previously registered Vue error handler; calls it after processing
|
|
44
|
-
| Idempotent for window listeners
|
|
45
|
-
| Deduplication
|
|
46
|
-
| Notification IDs
|
|
47
|
-
| SSR-safe
|
|
48
|
-
| Map cleanup
|
|
41
|
+
| Behavior | Description |
|
|
42
|
+
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
43
|
+
| Chains to existing `errorHandler` | Does not replace a previously registered Vue error handler; calls it after processing |
|
|
44
|
+
| Idempotent for window listeners | Uses `__VC_GLOBAL_ERROR_HANDLERS_INSTALLED__` guard to prevent duplicate listeners |
|
|
45
|
+
| Deduplication | Same error (by `name:message` key) is suppressed for 3 seconds |
|
|
46
|
+
| Notification IDs | Each toast gets a unique `notificationId` prefixed by source (`global-vue-`, `global-rejection-`, `global-error-`) |
|
|
47
|
+
| SSR-safe | Skips `window` event listeners when `typeof window === "undefined"` |
|
|
48
|
+
| Map cleanup | The deduplication map auto-prunes entries older than 3 seconds when it exceeds 50 entries |
|
|
49
49
|
|
|
50
50
|
## Usage
|
|
51
51
|
|
|
@@ -112,8 +112,8 @@ try {
|
|
|
112
112
|
await apiClient.updateOrder(order);
|
|
113
113
|
} catch (err) {
|
|
114
114
|
const parsed = parseError(err);
|
|
115
|
-
console.log(parsed.message);
|
|
116
|
-
console.log(parsed.details);
|
|
115
|
+
console.log(parsed.message); // Human-readable message
|
|
116
|
+
console.log(parsed.details); // Additional details (e.g., validation errors)
|
|
117
117
|
}
|
|
118
118
|
```
|
|
119
119
|
|