@vc-shell/vc-app-skill 2.0.3-pr227.0c4f2c3 → 2.0.4-pr228.1e79eae
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 +4 -0
- package/package.json +1 -1
- package/runtime/VERSION +1 -1
- package/runtime/knowledge/docs/_BUILD_HASH.md +1 -1
- package/runtime/knowledge/docs/core/api/platform.docs.md +7 -0
- package/runtime/knowledge/docs/core/blade-navigation/blade-nav-composables.docs.md +20 -4
- package/runtime/knowledge/docs/core/composables/bladeContext/index.docs.md +15 -3
- package/runtime/knowledge/docs/core/composables/useApiClient/useApiClient.docs.md +13 -4
- package/runtime/knowledge/docs/core/composables/useAppBarMobileButtons/useAppBarMobileButtons.docs.md +10 -0
- package/runtime/knowledge/docs/core/composables/useAppBarWidget/useAppBarWidget.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useAppInsights/useAppInsights.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useAssets/useAssets.docs.md +8 -1
- package/runtime/knowledge/docs/core/composables/useAssetsManager/useAssetsManager.docs.md +15 -4
- package/runtime/knowledge/docs/core/composables/useAsync/useAsync.docs.md +13 -0
- package/runtime/knowledge/docs/core/composables/useBeforeUnload/useBeforeUnload.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useBlade/useBlade.docs.md +13 -0
- package/runtime/knowledge/docs/core/composables/useBladeForm/useBladeForm.docs.md +12 -2
- package/runtime/knowledge/docs/core/composables/useBladeRegistry/useBladeRegistry.docs.md +14 -4
- package/runtime/knowledge/docs/core/composables/useBladeWidgets/index.docs.md +23 -9
- package/runtime/knowledge/docs/core/composables/useBreadcrumbs/useBreadcrumbs.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useConnectionStatus/useConnectionStatus.docs.md +10 -0
- package/runtime/knowledge/docs/core/composables/useDashboard/useDashboard.docs.md +9 -0
- package/runtime/knowledge/docs/core/composables/useDynamicProperties/useDynamicProperties.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useErrorHandler/useErrorHandler.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useFunctions/useFunctions.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useKeyboardNavigation/useKeyboardNavigation.docs.md +10 -0
- package/runtime/knowledge/docs/core/composables/useLanguages/useLanguages.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useLoading/useLoading.docs.md +10 -0
- package/runtime/knowledge/docs/core/composables/useMenuExpanded/index.docs.md +10 -0
- package/runtime/knowledge/docs/core/composables/useMenuService/useMenuService.docs.md +9 -0
- package/runtime/knowledge/docs/core/composables/useModificationTracker/useModificationTracker.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useNotifications/useNotifications.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/usePermissions/usePermissions.docs.md +9 -0
- package/runtime/knowledge/docs/core/composables/usePopup/usePopup.docs.md +9 -0
- package/runtime/knowledge/docs/core/composables/useResponsive/useResponsive.docs.md +10 -0
- package/runtime/knowledge/docs/core/composables/useSettings/useSettings.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useSettingsMenu/useSettingsMenu.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useSidebarState/useSidebarState.docs.md +10 -0
- package/runtime/knowledge/docs/core/composables/useSlowNetworkDetection/useSlowNetworkDetection.docs.md +9 -0
- package/runtime/knowledge/docs/core/composables/useTheme/useTheme.docs.md +9 -0
- package/runtime/knowledge/docs/core/composables/useToolbar/useToolbar.docs.md +9 -0
- package/runtime/knowledge/docs/core/composables/useUser/useUser.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useUserManagement/useUserManagement.docs.md +7 -0
- package/runtime/knowledge/docs/core/composables/useWebVitals/useWebVitals.docs.md +6 -0
- package/runtime/knowledge/docs/core/composables/useWidgets/useWidgets.docs.md +10 -0
- package/runtime/knowledge/docs/core/directives/autofocus/autofocus.docs.md +7 -0
- package/runtime/knowledge/docs/core/directives/loading/loading.docs.md +7 -0
- package/runtime/knowledge/docs/core/notifications/notifications.docs.md +21 -0
- package/runtime/knowledge/docs/core/plugins/ai-agent/ai-agent.docs.md +7 -0
- package/runtime/knowledge/docs/core/plugins/extension-points/extension-points.docs.md +10 -0
- package/runtime/knowledge/docs/core/plugins/global-error-handler/global-error-handler.docs.md +7 -0
- package/runtime/knowledge/docs/core/plugins/i18n/i18n.docs.md +10 -0
- package/runtime/knowledge/docs/core/plugins/modularity/modularity.docs.md +10 -0
- package/runtime/knowledge/docs/core/plugins/permissions/permissions.docs.md +8 -1
- package/runtime/knowledge/docs/core/plugins/signalR/signalR.docs.md +7 -0
- package/runtime/knowledge/docs/core/plugins/validation/validation.docs.md +10 -0
- package/runtime/knowledge/docs/core/services/services.docs.md +16 -1
- package/runtime/knowledge/docs/core/types/types.docs.md +7 -0
- package/runtime/knowledge/docs/core/utilities/date/date-utilities.docs.md +7 -0
- package/runtime/knowledge/docs/core/utilities/shared-utilities.docs.md +7 -0
- package/runtime/knowledge/docs/core/utilities/thumbnail/thumbnail.docs.md +7 -0
- package/runtime/knowledge/docs/core/utilities/utilities.docs.md +7 -0
- package/runtime/knowledge/docs/injection-keys.docs.md +11 -0
- package/runtime/knowledge/docs/modules/assets-manager/assets-manager.docs.md +89 -12
- package/runtime/knowledge/docs/shell/_internal/popup/common/popup-common.docs.md +7 -0
- package/runtime/knowledge/docs/shell/auth/ChangePasswordPage/change-password-page.docs.md +7 -0
- package/runtime/knowledge/docs/shell/auth/ForgotPasswordPage/forgot-password-page.docs.md +7 -0
- package/runtime/knowledge/docs/shell/auth/InvitePage/invite-page.docs.md +7 -0
- package/runtime/knowledge/docs/shell/auth/LoginPage/login-page.docs.md +7 -0
- package/runtime/knowledge/docs/shell/auth/ResetPasswordPage/reset-password-page.docs.md +7 -0
- package/runtime/knowledge/docs/shell/auth/sign-in/sign-in.docs.md +7 -0
- package/runtime/knowledge/docs/shell/components/change-password/change-password.docs.md +7 -0
- package/runtime/knowledge/docs/shell/components/change-password-button/change-password-button.docs.md +7 -0
- package/runtime/knowledge/docs/shell/components/error-interceptor/error-interceptor.docs.md +7 -0
- package/runtime/knowledge/docs/shell/components/language-selector/language-selector.docs.md +7 -0
- package/runtime/knowledge/docs/shell/components/logout-button/logout-button.docs.md +7 -0
- package/runtime/knowledge/docs/shell/components/notification-dropdown/notification-dropdown.docs.md +7 -0
- package/runtime/knowledge/docs/shell/components/notification-template/notification-template.docs.md +7 -0
- package/runtime/knowledge/docs/shell/components/settings-menu/settings-menu.docs.md +7 -0
- package/runtime/knowledge/docs/shell/components/settings-menu-item/settings-menu-item.docs.md +7 -0
- package/runtime/knowledge/docs/shell/components/sidebar/sidebar.docs.md +7 -0
- package/runtime/knowledge/docs/shell/components/theme-selector/theme-selector.docs.md +7 -0
- package/runtime/knowledge/docs/shell/components/user-dropdown-button/user-dropdown-button.docs.md +7 -0
- package/runtime/knowledge/docs/shell/dashboard/dashboard-charts/dashboard-charts.docs.md +7 -0
- package/runtime/knowledge/docs/shell/dashboard/dashboard-widget-card/dashboard-widget-card.docs.md +7 -0
- package/runtime/knowledge/docs/shell/dashboard/draggable-dashboard/draggable-dashboard.docs.md +7 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-badge/vc-badge.docs.md +24 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-banner/vc-banner.docs.md +20 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-button/vc-button.docs.md +32 -5
- package/runtime/knowledge/docs/ui/components/atoms/vc-card/vc-card.docs.md +15 -2
- package/runtime/knowledge/docs/ui/components/atoms/vc-col/vc-col.docs.md +11 -1
- package/runtime/knowledge/docs/ui/components/atoms/vc-container/vc-container.docs.md +10 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-hint/vc-hint.docs.md +20 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-icon/vc-icon.docs.md +24 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-image/vc-image.docs.md +26 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-label/vc-label.docs.md +24 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-link/vc-link.docs.md +22 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-loading/vc-loading.docs.md +21 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-progress/vc-progress.docs.md +20 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-row/vc-row.docs.md +11 -1
- package/runtime/knowledge/docs/ui/components/atoms/vc-scrollable-container/vc-scrollable-container.docs.md +11 -1
- package/runtime/knowledge/docs/ui/components/atoms/vc-skeleton/vc-skeleton.docs.md +20 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-status/vc-status.docs.md +20 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-status-icon/vc-status-icon.docs.md +20 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-tooltip/vc-tooltip.docs.md +25 -1
- package/runtime/knowledge/docs/ui/components/atoms/vc-video/vc-video.docs.md +25 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-widget/vc-widget.docs.md +22 -0
- package/runtime/knowledge/docs/ui/components/molecules/multilanguage-selector/multilanguage-selector.docs.md +10 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-accordion/vc-accordion.docs.md +17 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.docs.md +27 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox/vc-checkbox.docs.md +27 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox-group/vc-checkbox-group.docs.md +23 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-color-input/vc-color-input.docs.md +24 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-date-picker/vc-date-picker.docs.md +27 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown/vc-dropdown.docs.md +27 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown-panel/vc-dropdown-panel.docs.md +22 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-editor/vc-editor.docs.md +17 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-field/vc-field.docs.md +17 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-file-upload/vc-file-upload.docs.md +17 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-form/vc-form.docs.md +15 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-image-tile/vc-image-tile.docs.md +12 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-input/vc-input.docs.md +30 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-currency/vc-input-currency.docs.md +27 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.docs.md +26 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-group/vc-input-group.docs.md +21 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-menu/vc-menu.docs.md +24 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-multivalue/vc-multivalue.docs.md +28 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-pagination/vc-pagination.docs.md +25 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-radio-button/vc-radio-button.docs.md +25 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-radio-group/vc-radio-group.docs.md +22 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-rating/vc-rating.docs.md +17 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-select/vc-select.docs.md +32 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-slider/vc-slider.docs.md +22 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-switch/vc-switch.docs.md +25 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-textarea/vc-textarea.docs.md +27 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-toast/vc-toast.docs.md +28 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-app/vc-app.docs.md +19 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-auth-layout/vc-auth-layout.docs.md +13 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-blade/vc-blade.docs.md +22 -1
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/composables/table-composables.docs.md +30 -5
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/vc-data-table.docs.md +18 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.docs.md +12 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-gallery/vc-gallery.docs.md +14 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-image-upload/vc-image-upload.docs.md +12 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-popup/vc-popup.docs.md +14 -1
- package/runtime/knowledge/docs/ui/components/organisms/vc-sidebar/vc-sidebar.docs.md +13 -0
- package/runtime/knowledge/docs/ui/composables/ui-composables.docs.md +7 -0
- package/runtime/knowledge/docs/ui/composables/useDataTablePagination.docs.md +9 -3
- package/runtime/knowledge/docs/ui/composables/useDataTableSort.docs.md +6 -0
- package/runtime/knowledge/docs/ui/composables/useTableSelection.docs.md +6 -0
- package/runtime/knowledge/docs/ui/composables/useTableSort.docs.md +6 -0
- package/runtime/knowledge/docs/ui/types/ui-types.docs.md +7 -0
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: useMenuService
|
|
3
|
+
category: composables
|
|
4
|
+
group: services
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
!!! tip "Long page"
|
|
8
|
+
Use the section headings to jump directly to what you need: [Quick Start](#quick-start), [Grouping Menu Items](#grouping-menu-items), [Badges and Indicators](#badges-and-indicators), or [API Reference](#api-reference).
|
|
9
|
+
|
|
1
10
|
# useMenuService
|
|
2
11
|
|
|
3
12
|
Accesses the navigation menu service for adding, removing, and badging menu items in the application sidebar. The service supports a pre-registration pattern that allows modules to declare menu items before the service is initialized, and a grouping system that organizes items into collapsible sections.
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: useModificationTracker
|
|
3
|
+
category: composables
|
|
4
|
+
group: forms
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# useModificationTracker
|
|
2
8
|
|
|
3
9
|
Tracks deep changes to a value and reports whether it has been modified compared to its original (pristine) state. This is the core composable behind the "unsaved changes" detection pattern in vc-shell blades. It handles complex nested objects, arrays, and the common API quirk where `null`, `undefined`, and `""` should be treated as equivalent empty values.
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: useNotifications
|
|
3
|
+
category: composables
|
|
4
|
+
group: notifications
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# useNotifications
|
|
2
8
|
|
|
3
9
|
Provides access to the push-notification system: reading notification history, filtering by type, marking as read, and registering handlers for real-time notifications. This composable wraps the Pinia-based `useNotificationStore` and adds type-based filtering and subscription management. It subscribes to specific notification types via the store's pub/sub system and automatically unsubscribes when the component scope is disposed.
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: usePermissions
|
|
3
|
+
category: composables
|
|
4
|
+
group: user
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# usePermissions
|
|
2
8
|
|
|
3
9
|
Checks whether the current user has specific platform permissions. This composable reads the authenticated user's permission list and provides a `hasAccess` function for conditional UI rendering and access control. It is client-side only -- it does not enforce server-side authorization.
|
|
4
10
|
|
|
11
|
+
!!! warning "Client-side only"
|
|
12
|
+
`usePermissions` is a UI guard, not a security boundary. Always enforce authorization on the server side as well.
|
|
13
|
+
|
|
5
14
|
## When to Use
|
|
6
15
|
|
|
7
16
|
- Conditionally show or hide UI elements (buttons, toolbar items, sections) based on the current user's permissions
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: usePopup
|
|
3
|
+
category: composables
|
|
4
|
+
group: notifications
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# usePopup
|
|
2
8
|
|
|
3
9
|
Programmatic popup management for modal dialogs. Returns methods to open confirmation, error, and info dialogs, as well as fully custom popup components with typed props and emits. Popups are rendered in a dedicated container at the app root level, ensuring they overlay all other content including blades and sidebars.
|
|
4
10
|
|
|
11
|
+
!!! tip "Always await showConfirmation"
|
|
12
|
+
`showConfirmation` returns a `Promise<boolean>`. Always `await` it before executing the guarded action, or the action will run before the user responds.
|
|
13
|
+
|
|
5
14
|
## When to Use
|
|
6
15
|
|
|
7
16
|
- Show confirmation dialogs before destructive actions (delete, discard, bulk operations)
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: useResponsive
|
|
3
|
+
category: composables
|
|
4
|
+
group: ui-state
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# useResponsive
|
|
2
8
|
|
|
3
9
|
Reactive breakpoint state for building responsive blade UIs. Returns refs that indicate the current viewport category (phone, tablet, mobile, desktop) and whether the device supports touch input. Replaces the legacy `$isMobile.value` global properties in templates and `inject(IsMobileKey)` in script setup with a single, consistent API.
|
|
@@ -53,12 +59,16 @@ Breakpoint thresholds: phone < 480px, tablet 480–1023px, desktop >= 1024px. Th
|
|
|
53
59
|
|
|
54
60
|
Note: `isMobile` is the union of `isPhone` and `isTablet` — it covers all viewports below the desktop threshold.
|
|
55
61
|
|
|
62
|
+
<!-- internal:start -->
|
|
63
|
+
|
|
56
64
|
## How It Works
|
|
57
65
|
|
|
58
66
|
Under the hood, `useResponsive()` calls `inject()` for each breakpoint key (`IsMobileKey`, `IsDesktopKey`, etc.) with sensible defaults. The framework's root `VcApp` component provides these refs during app initialization using VueUse's `useBreakpoints`. Because the return values are the same `Ref<boolean>` instances provided at the app level, they are reactive and shared across all components.
|
|
59
67
|
|
|
60
68
|
The defaults ensure the composable works even outside the VcApp provider tree (e.g., in unit tests or Storybook), defaulting to desktop mode.
|
|
61
69
|
|
|
70
|
+
<!-- internal:end -->
|
|
71
|
+
|
|
62
72
|
## Recipe: Responsive Blade with Mobile Card Layout
|
|
63
73
|
|
|
64
74
|
```vue
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: useSidebarState
|
|
3
|
+
category: composables
|
|
4
|
+
group: ui-state
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# useSidebarState
|
|
2
8
|
|
|
3
9
|
Controls the sidebar (left navigation panel) expansion, pinning, hover, and mobile menu state. This composable exposes a unified API for reading and toggling all sidebar states from any component within the VcApp tree. The sidebar has three independent dimensions: **pinned** (user explicitly locked it open, persisted to localStorage), **hover-expanded** (mouse is hovering over the collapsed sidebar on desktop), and **mobile menu** (overlay drawer on small screens). The derived `isExpanded` computed combines pinned and hover states for convenience.
|
|
@@ -61,6 +67,8 @@ const { isExpanded, isPinned, togglePin, openMenu, closeMenu } = useSidebarState
|
|
|
61
67
|
| `openMenu` | `() => void` | Show the mobile menu overlay. |
|
|
62
68
|
| `closeMenu` | `() => void` | Hide the mobile menu overlay. |
|
|
63
69
|
|
|
70
|
+
<!-- internal:start -->
|
|
71
|
+
|
|
64
72
|
## Setup
|
|
65
73
|
|
|
66
74
|
`provideSidebarState()` must be called once in VcApp's setup. It is idempotent -- if called multiple times in the same injection tree, it returns the existing instance. All descendant components then call `useSidebarState()` to access the shared state.
|
|
@@ -72,6 +80,8 @@ import { provideSidebarState } from "@vc-shell/framework";
|
|
|
72
80
|
provideSidebarState();
|
|
73
81
|
```
|
|
74
82
|
|
|
83
|
+
<!-- internal:end -->
|
|
84
|
+
|
|
75
85
|
## Recipe: Auto-Close Mobile Menu After Navigation
|
|
76
86
|
|
|
77
87
|
```vue
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: useSlowNetworkDetection
|
|
3
|
+
category: composables
|
|
4
|
+
group: ui-state
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# useSlowNetworkDetection
|
|
2
8
|
|
|
3
9
|
Detects slow network conditions and shows a persistent warning notification so users know why the UI is unresponsive. Two detection channels work together: a **proactive** channel reads `navigator.connection.effectiveType` to catch weak connections before any request is made, and a **reactive** channel flags API requests that have been pending for more than 10 seconds. The notification auto-dismisses with a 3-second delay after conditions clear, preventing flicker. When the browser goes fully offline, the slow-network notification is suppressed in favor of the existing offline notification from `useConnectionStatus`.
|
|
@@ -56,6 +62,8 @@ const { isSlowNetwork } = useSlowNetworkDetection();
|
|
|
56
62
|
| `DISMISS_DELAY_MS` | `3000` | Delay before hiding the notification after recovery |
|
|
57
63
|
| `SLOW_EFFECTIVE_TYPES` | `["slow-2g", "2g"]` | Connection types flagged as slow |
|
|
58
64
|
|
|
65
|
+
<!-- internal:start -->
|
|
66
|
+
|
|
59
67
|
## How It Works
|
|
60
68
|
|
|
61
69
|
### Channel 1: effectiveType (proactive)
|
|
@@ -73,6 +81,7 @@ The fetch interceptor in `framework/core/interceptors/index.ts` calls `trackRequ
|
|
|
73
81
|
3. If `isSlowNetwork` goes back to `true` within those 3 seconds → cancel dismiss, notification stays
|
|
74
82
|
4. If the browser goes offline → immediately hide the slow notification (the offline notification takes over)
|
|
75
83
|
5. If the browser comes back online and `isSlowNetwork` is still `true` → re-show
|
|
84
|
+
<!-- internal:end -->
|
|
76
85
|
|
|
77
86
|
## Recipe: Custom Slow-Network Behavior in a Blade
|
|
78
87
|
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: useTheme
|
|
3
|
+
category: composables
|
|
4
|
+
group: ui-state
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# useTheme
|
|
2
8
|
|
|
3
9
|
Manages color theme registration, switching, and persistence. Themes are applied via a `data-theme` attribute on `<html>`, and the active theme key is persisted to localStorage via `@vueuse/core`'s `useColorMode`. The composable maintains a global registry of theme definitions, supports runtime registration/unregistration from modules, and provides both explicit (`setTheme`) and sequential (`next`) theme switching. A default `"light"` theme is always registered out of the box.
|
|
@@ -63,6 +69,8 @@ next();
|
|
|
63
69
|
| `key` | `string` | Theme identifier |
|
|
64
70
|
| `name` | `string` | Localized display name, resolved from `localizationKey` or capitalized `key` |
|
|
65
71
|
|
|
72
|
+
<!-- internal:start -->
|
|
73
|
+
|
|
66
74
|
## How It Works
|
|
67
75
|
|
|
68
76
|
1. **Registration**: Themes are stored in a module-level `Ref<ThemeDefinition[]>` array. `register()` appends new definitions (skipping duplicates), and `unregister()` removes by key.
|
|
@@ -72,6 +80,7 @@ next();
|
|
|
72
80
|
3. **Reactivity**: A `watchEffect` syncs the cycle-list state to `useColorMode`'s mode whenever the active theme changes.
|
|
73
81
|
|
|
74
82
|
4. **Localization**: Display names are resolved via `vue-i18n`'s `t()` function using the `localizationKey`. If no key is provided, the theme's `key` is capitalized with lodash.
|
|
83
|
+
<!-- internal:end -->
|
|
75
84
|
|
|
76
85
|
## Recipe: Module That Registers a Theme on Install
|
|
77
86
|
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: useToolbar
|
|
3
|
+
category: composables
|
|
4
|
+
group: services
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
!!! tip "Long page"
|
|
8
|
+
Use the section headings to jump directly to what you need: [Quick Start](#quick-start), [Updating Button State Dynamically](#updating-button-state-dynamically), [Visibility and Permissions](#visibility-and-permissions), or [API Reference](#api-reference).
|
|
9
|
+
|
|
1
10
|
# useToolbar
|
|
2
11
|
|
|
3
12
|
Manages toolbar buttons for blades. Each blade in the application has its own toolbar area at the top of the blade header. `useToolbar` provides a scoped API to register, update, and remove buttons within that toolbar. It automatically resolves the current blade context and cleans up registered items when the component unmounts.
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: useUser
|
|
3
|
+
category: composables
|
|
4
|
+
group: user
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# useUser
|
|
2
8
|
|
|
3
9
|
Shared composable providing read-only access to the current user's session state. Returns reactive user details, authentication status, and core session operations (load, sign out, get access token). This is the primary composable for user-related reads in regular blades and components. It deliberately exposes a narrow API surface -- no sign-in, password reset, or admin operations -- to encourage separation of concerns between user consumption and user management.
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: useUserManagement
|
|
3
|
+
category: composables
|
|
4
|
+
group: user
|
|
5
|
+
internal: true
|
|
6
|
+
---
|
|
7
|
+
|
|
1
8
|
# useUserManagement
|
|
2
9
|
|
|
3
10
|
Shared composable exposing the full user management API: sign-in, sign-out, password reset, token validation, and login type discovery. This composable extends the same internal logic as `useUser` but surfaces the administrative and authentication-flow methods that `useUser` intentionally hides. The separation ensures that regular blades only have access to read-only user state, while auth pages and admin screens get the full API.
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: useWebVitals
|
|
3
|
+
category: composables
|
|
4
|
+
group: utilities
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# useWebVitals
|
|
2
8
|
|
|
3
9
|
Registers Core Web Vitals observers (FCP, LCP, CLS, INP, TTFB) and reports metrics via a callback. Core Web Vitals are Google's standardized set of real-user performance metrics that measure loading speed, interactivity, and visual stability. This composable wraps the `web-vitals` npm package and normalizes its output into a simple `{ name, value, rating }` shape. In development mode, metrics are logged to the console by default so you can catch performance regressions early without setting up external analytics.
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: useWidgets
|
|
3
|
+
category: composables
|
|
4
|
+
group: services
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# useWidgets
|
|
2
8
|
|
|
3
9
|
Provides access to the `IWidgetService` singleton for managing blade widget registrations, activation state, and external widgets. This is the low-level composable for direct widget service interaction. It exposes the full widget lifecycle API: registering widgets to specific blades, querying registered widgets, tracking active widget state, and managing external (cross-module) widget registrations.
|
|
@@ -59,6 +65,8 @@ None.
|
|
|
59
65
|
| `registerWidget(widget, bladeId)` | Global pre-registration. Widgets registered this way are picked up when `provideWidgetService()` creates the service. Use in module `install()`. |
|
|
60
66
|
| `registerExternalWidget(registration)` | Global pre-registration for cross-module widgets. These widgets are rendered in blades owned by other modules. |
|
|
61
67
|
|
|
68
|
+
<!-- internal:start -->
|
|
69
|
+
|
|
62
70
|
## How It Works
|
|
63
71
|
|
|
64
72
|
The widget system has three layers:
|
|
@@ -71,6 +79,8 @@ The widget system has three layers:
|
|
|
71
79
|
|
|
72
80
|
The service tracks active widgets (which widget is currently expanded/focused) separately from registrations, enabling the widget panel to highlight the active widget and call its update function.
|
|
73
81
|
|
|
82
|
+
<!-- internal:end -->
|
|
83
|
+
|
|
74
84
|
## Recipe: Pre-Registering a Widget from a Module
|
|
75
85
|
|
|
76
86
|
```typescript
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: v-loading
|
|
3
|
+
category: reference
|
|
4
|
+
group: api/directives
|
|
5
|
+
slug: v-loading
|
|
6
|
+
---
|
|
7
|
+
|
|
1
8
|
# v-loading Directive
|
|
2
9
|
|
|
3
10
|
Displays a loading overlay with a spinner on any element. Supports size variants, custom color, blur backdrop, fullscreen mode, and z-index control.
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Notifications
|
|
3
|
+
category: plugins
|
|
4
|
+
group: root
|
|
5
|
+
slug: notifications
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
!!! info "Two-level architecture"
|
|
9
|
+
Level 1 (module-level, always-on toasts) and Level 2 (blade-level, auto-cleanup subscriptions).
|
|
10
|
+
|
|
1
11
|
# Notification System
|
|
2
12
|
|
|
3
13
|
Centralized push notification handling for the vc-shell framework. Provides a two-level architecture: **Level 1** (module-level, always-on toasts and dropdown) and **Level 2** (blade-level, scoped subscriptions that auto-cleanup on unmount).
|
|
@@ -234,3 +244,14 @@ await store.markAllAsRead(); // optimistic update with rollback on failure
|
|
|
234
244
|
- `framework/injection-keys.ts` -- `NotificationStoreKey`, `NotificationTemplatesKey`
|
|
235
245
|
- `framework/shared/components/notifications/` -- Notification dropdown UI
|
|
236
246
|
- `framework/core/api/platform.ts` -- `PushNotification`, `PushNotificationClient`
|
|
247
|
+
|
|
248
|
+
<!-- internal:start -->
|
|
249
|
+
|
|
250
|
+
## Internal Files
|
|
251
|
+
|
|
252
|
+
- `framework/core/notifications/store.ts` -- `NotificationStore` implementation
|
|
253
|
+
- `framework/core/notifications/toast-controller.ts` -- Toast lifecycle management
|
|
254
|
+
- `framework/core/notifications/composables/` -- `useNotificationStore`, `useBladeNotifications`, `useNotificationContext`, `useBroadcastFilter`
|
|
255
|
+
- `framework/core/notifications/types.ts` -- All notification type definitions
|
|
256
|
+
|
|
257
|
+
<!-- internal:end -->
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: AI Agent
|
|
3
|
+
category: plugins
|
|
4
|
+
group: root
|
|
5
|
+
slug: ai-agent
|
|
6
|
+
---
|
|
7
|
+
|
|
1
8
|
# AI Agent Plugin
|
|
2
9
|
|
|
3
10
|
Integrates an AI assistant panel (chatbot iframe) into the vc-shell application. Provides blade-aware context passing, bidirectional postMessage communication, and preview/apply workflows.
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Extension Points
|
|
3
|
+
category: plugins
|
|
4
|
+
group: root
|
|
5
|
+
slug: extension-points
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
!!! tip "Navigation"
|
|
9
|
+
This page is long. Use the [Table of Contents](#table-of-contents) to jump to the section you need.
|
|
10
|
+
|
|
1
11
|
# Extension Points Plugin
|
|
2
12
|
|
|
3
13
|
Extension points enable **cross-module UI composition** without direct imports. One module declares a named slot ("I accept plugins here"), and other modules inject components into that slot -- at any time, in any order. The system is fully reactive and order-independent.
|
package/runtime/knowledge/docs/core/plugins/global-error-handler/global-error-handler.docs.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Global Error Handler
|
|
3
|
+
category: plugins
|
|
4
|
+
group: root
|
|
5
|
+
slug: global-error-handler
|
|
6
|
+
---
|
|
7
|
+
|
|
1
8
|
# Global Error Handler Plugin
|
|
2
9
|
|
|
3
10
|
Catches unhandled errors across the application and displays user-facing toast notifications. Covers Vue component errors, unhandled promise rejections, and uncaught JavaScript errors.
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Internationalization
|
|
3
|
+
category: plugins
|
|
4
|
+
group: root
|
|
5
|
+
slug: i18n
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
!!! tip "Module integration"
|
|
9
|
+
Modules provide translations via `defineAppModule({ locales })` — no direct plugin installation needed.
|
|
10
|
+
|
|
1
11
|
# i18n Plugin
|
|
2
12
|
|
|
3
13
|
Vue-i18n integration for the vc-shell framework. Provides a pre-configured i18n instance used by all modules for localization.
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Modularity
|
|
3
|
+
category: plugins
|
|
4
|
+
group: root
|
|
5
|
+
slug: modularity
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
!!! tip "Navigation"
|
|
9
|
+
This page is long. Use the [Table of Contents](#table-of-contents) to jump to the section you need.
|
|
10
|
+
|
|
1
11
|
# Modularity Plugin
|
|
2
12
|
|
|
3
13
|
The modularity plugin is the backbone of every vc-shell application. It defines how features are packaged as **modules**, how those modules are registered at runtime, and how they integrate with the framework's blade navigation, localization, menu, and notification systems.
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
title: Permissions
|
|
3
|
+
category: plugins
|
|
4
|
+
group: root
|
|
5
|
+
slug: permissions
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Permissions
|
|
2
9
|
|
|
3
10
|
Permission-based access control plugin. Exposes a global `$hasAccess` helper for checking user permissions throughout the application.
|
|
4
11
|
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: SignalR
|
|
3
|
+
category: plugins
|
|
4
|
+
group: root
|
|
5
|
+
slug: signalr
|
|
6
|
+
---
|
|
7
|
+
|
|
1
8
|
# SignalR Plugin
|
|
2
9
|
|
|
3
10
|
Real-time push notification transport via ASP.NET SignalR. Connects to the platform's `/pushNotificationHub` and routes incoming messages to the notification store.
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Validation
|
|
3
|
+
category: plugins
|
|
4
|
+
group: root
|
|
5
|
+
slug: validation
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
!!! tip "Zero setup"
|
|
9
|
+
All vee-validate standard rules plus custom vc-shell rules are registered automatically — no per-component imports needed.
|
|
10
|
+
|
|
1
11
|
# Validation Plugin
|
|
2
12
|
|
|
3
13
|
Form validation integration using vee-validate. Registers all standard validation rules plus custom vc-shell rules for image dimensions, file weight, date comparisons, and BigInt safety.
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Services
|
|
3
|
+
category: composables
|
|
4
|
+
group: services
|
|
5
|
+
placement: index
|
|
6
|
+
---
|
|
7
|
+
|
|
1
8
|
# Core Services
|
|
2
9
|
|
|
3
10
|
Singleton service layer for registering and querying application-level entities: menu items, widgets, toolbar buttons, dashboard widgets, settings panels, app-bar items, and more.
|
|
@@ -11,6 +18,8 @@ Every service follows the same architecture:
|
|
|
11
18
|
3. **Module-level helper** (e.g., `addMenuItem()`, `registerWidget()`) -- lets modules register items at import time, before the Vue app mounts.
|
|
12
19
|
4. **Corresponding `use*` composable** (in `core/composables/`) -- injects the service instance via provide/inject for use inside components.
|
|
13
20
|
|
|
21
|
+
<!-- internal:start -->
|
|
22
|
+
|
|
14
23
|
### Internal Building Blocks (`_internal/`)
|
|
15
24
|
|
|
16
25
|
| Helper | Purpose |
|
|
@@ -19,6 +28,8 @@ Every service follows the same architecture:
|
|
|
19
28
|
| `createBladeScopedRegistry` | Reactive `Map<bladeId, Item[]>` with register/unregister/update/clear. Used by WidgetService and ToolbarService. |
|
|
20
29
|
| `createSimpleMapRegistry` | Reactive `Map<id, Item>` with sorted computed output. Used by SettingsMenuService and AppBarMenuService. |
|
|
21
30
|
|
|
31
|
+
<!-- internal:end -->
|
|
32
|
+
|
|
22
33
|
## Services
|
|
23
34
|
|
|
24
35
|
| Service | Factory | Module-level API | Key Type |
|
|
@@ -78,8 +89,12 @@ removeMenuBadge("OrdersList");
|
|
|
78
89
|
- `MenuService` builds a tree from flat items: items with `group` or `groupConfig` are nested under group nodes, sorted by `priority`.
|
|
79
90
|
- `DashboardService` accepts a `hasAccess` callback for permission-based widget filtering.
|
|
80
91
|
|
|
81
|
-
|
|
92
|
+
<!-- internal:start -->
|
|
93
|
+
|
|
94
|
+
## Related (internal paths)
|
|
82
95
|
|
|
83
96
|
- `framework/core/composables/` -- `useMenu`, `useToolbar`, `useWidgets`, `useDashboard`, etc.
|
|
84
97
|
- `framework/core/services/_internal/` -- shared registry and bus implementations
|
|
85
98
|
- `framework/core/plugins/` -- services are created and provided during plugin installation
|
|
99
|
+
|
|
100
|
+
<!-- internal:end -->
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Date Utilities
|
|
3
|
+
category: reference
|
|
4
|
+
group: api
|
|
5
|
+
slug: date-utilities
|
|
6
|
+
---
|
|
7
|
+
|
|
1
8
|
# Date Utilities
|
|
2
9
|
|
|
3
10
|
Pure functions for date formatting, relative time display, and Moment.js-to-date-fns format conversion. Built on `date-fns` with locale-aware output.
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Thumbnail Utility
|
|
3
|
+
category: reference
|
|
4
|
+
group: api
|
|
5
|
+
slug: thumbnail
|
|
6
|
+
---
|
|
7
|
+
|
|
1
8
|
# Thumbnail URL Utility
|
|
2
9
|
|
|
3
10
|
Transforms full-size image URLs into thumbnail variants by appending size suffixes before the file extension. VirtoCommerce backend generates thumbnails automatically with these suffixes.
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Injection Keys
|
|
3
|
+
category: reference
|
|
4
|
+
group: api
|
|
5
|
+
slug: injection-keys
|
|
6
|
+
---
|
|
7
|
+
|
|
1
8
|
# Injection Keys
|
|
2
9
|
|
|
3
10
|
Centralized Vue `InjectionKey` symbols for the vc-shell framework's provide/inject dependency injection system. All keys are typed via `InjectionKey<T>` for full TypeScript safety.
|
|
@@ -76,6 +83,8 @@ This centralized approach has several advantages:
|
|
|
76
83
|
| `IsTabletKey` | `Ref<boolean>` | Tablet breakpoint |
|
|
77
84
|
| `IsTouchKey` | `boolean` | Touch device detection |
|
|
78
85
|
|
|
86
|
+
<!-- internal:start -->
|
|
87
|
+
|
|
79
88
|
### Legacy Aliases (Deprecated)
|
|
80
89
|
|
|
81
90
|
| Deprecated | Use Instead |
|
|
@@ -96,6 +105,8 @@ These keys existed in v1.2.3 but have been removed from the framework entirely.
|
|
|
96
105
|
| `NotificationTemplatesSymbol` | Template system replaced by `NotificationStoreKey` + `useBladeNotifications()` |
|
|
97
106
|
| `GlobalSearchKey` | Internal concern now — no public replacement |
|
|
98
107
|
|
|
108
|
+
<!-- internal:end -->
|
|
109
|
+
|
|
99
110
|
## Usage Examples
|
|
100
111
|
|
|
101
112
|
### Injecting a service in a component
|