@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
|
@@ -36,13 +36,13 @@ With custom branding:
|
|
|
36
36
|
|
|
37
37
|
## Key Props
|
|
38
38
|
|
|
39
|
-
| Prop
|
|
40
|
-
|
|
41
|
-
| `userId`
|
|
42
|
-
| `userName`
|
|
43
|
-
| `token`
|
|
44
|
-
| `logo`
|
|
45
|
-
| `background` | `string` | `/assets/background.jpg` | Background image URL
|
|
39
|
+
| Prop | Type | Default | Description |
|
|
40
|
+
| ------------ | -------- | ------------------------ | ------------------------------------------- |
|
|
41
|
+
| `userId` | `string` | **required** | User ID from the reset link |
|
|
42
|
+
| `userName` | `string` | **required** | Username/email for auto-sign-in after reset |
|
|
43
|
+
| `token` | `string` | **required** | Reset token from the email link |
|
|
44
|
+
| `logo` | `string` | `/assets/logo-white.svg` | Logo image URL |
|
|
45
|
+
| `background` | `string` | `/assets/background.jpg` | Background image URL |
|
|
46
46
|
|
|
47
47
|
## Recipe: Router Configuration
|
|
48
48
|
|
|
@@ -67,6 +67,7 @@ const routes = [
|
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
The reset email link typically looks like:
|
|
70
|
+
|
|
70
71
|
```
|
|
71
72
|
https://your-app.com/reset-password?userId=abc123&userName=jane@example.com&token=xyz789...
|
|
72
73
|
```
|
|
@@ -34,18 +34,18 @@ onMounted(async () => {
|
|
|
34
34
|
|
|
35
35
|
## Components
|
|
36
36
|
|
|
37
|
-
| Component
|
|
38
|
-
|
|
37
|
+
| Component | Props | Description |
|
|
38
|
+
| ------------------- | ----------------------------------------- | ----------------------------------------------- |
|
|
39
39
|
| `ExternalProviders` | `providers: ExternalSignInProviderInfo[]` | Renders a vertical list of SSO provider buttons |
|
|
40
40
|
|
|
41
41
|
## API (`useExternalProvider`)
|
|
42
42
|
|
|
43
|
-
| Method
|
|
44
|
-
|
|
45
|
-
| `getProviders` | `() => Promise<ExternalSignInProviderInfo[]>`
|
|
46
|
-
| `signIn`
|
|
47
|
-
| `signOut`
|
|
48
|
-
| `storage`
|
|
43
|
+
| Method | Signature | Description |
|
|
44
|
+
| -------------- | ----------------------------------------------- | ------------------------------------------------------- |
|
|
45
|
+
| `getProviders` | `() => Promise<ExternalSignInProviderInfo[]>` | Fetch available SSO providers from the platform API |
|
|
46
|
+
| `signIn` | `(authenticationType: string) => Promise<void>` | Redirect to external provider login |
|
|
47
|
+
| `signOut` | `(authenticationType: string) => Promise<void>` | Redirect to external provider logout |
|
|
48
|
+
| `storage` | `Ref<{ providerType?: string }>` | Persisted localStorage ref tracking the active provider |
|
|
49
49
|
|
|
50
50
|
## Recipe: Custom Login Page with SSO and Credentials
|
|
51
51
|
|
|
@@ -67,18 +67,31 @@ onMounted(async () => {
|
|
|
67
67
|
<VcAuthLayout>
|
|
68
68
|
<!-- Standard credentials form -->
|
|
69
69
|
<form @submit.prevent="handleLogin">
|
|
70
|
-
<VcInput
|
|
71
|
-
|
|
70
|
+
<VcInput
|
|
71
|
+
v-model="username"
|
|
72
|
+
label="Email"
|
|
73
|
+
/>
|
|
74
|
+
<VcInput
|
|
75
|
+
v-model="password"
|
|
76
|
+
label="Password"
|
|
77
|
+
type="password"
|
|
78
|
+
/>
|
|
72
79
|
<VcButton type="submit">Sign In</VcButton>
|
|
73
80
|
</form>
|
|
74
81
|
|
|
75
82
|
<!-- Divider between credentials and SSO -->
|
|
76
|
-
<div
|
|
83
|
+
<div
|
|
84
|
+
v-if="hasProviders"
|
|
85
|
+
class="tw-my-4 tw-text-center tw-text-gray-400"
|
|
86
|
+
>
|
|
77
87
|
or continue with
|
|
78
88
|
</div>
|
|
79
89
|
|
|
80
90
|
<!-- SSO provider buttons -->
|
|
81
|
-
<ExternalProviders
|
|
91
|
+
<ExternalProviders
|
|
92
|
+
v-if="hasProviders"
|
|
93
|
+
:providers="providers"
|
|
94
|
+
/>
|
|
82
95
|
</VcAuthLayout>
|
|
83
96
|
</template>
|
|
84
97
|
```
|
|
@@ -89,7 +102,10 @@ When the platform is configured for SSO-only authentication, use the `LoginPage`
|
|
|
89
102
|
|
|
90
103
|
```vue
|
|
91
104
|
<template>
|
|
92
|
-
<Login
|
|
105
|
+
<Login
|
|
106
|
+
sso-only
|
|
107
|
+
title="Sign in with your corporate account"
|
|
108
|
+
/>
|
|
93
109
|
</template>
|
|
94
110
|
```
|
|
95
111
|
|
|
@@ -8,20 +8,21 @@ The `ChangePassword` component renders a `VcPopup` with three validated input fi
|
|
|
8
8
|
|
|
9
9
|
## Props
|
|
10
10
|
|
|
11
|
-
| Prop
|
|
12
|
-
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
| -------- | --------- | ------- | -------------------------------------------------------------------------------------------- |
|
|
13
13
|
| `forced` | `boolean` | `false` | When true, the user cannot dismiss the dialog -- cancelling signs out and redirects to login |
|
|
14
|
-
| `login`
|
|
14
|
+
| `login` | `string` | -- | The current user's login name (for context) |
|
|
15
15
|
|
|
16
16
|
## Events
|
|
17
17
|
|
|
18
|
-
| Event
|
|
19
|
-
|
|
18
|
+
| Event | Description |
|
|
19
|
+
| ------- | -------------------------------------------------------------------------------------------- |
|
|
20
20
|
| `close` | Emitted when the dialog should close (cancel in non-forced mode, or after successful change) |
|
|
21
21
|
|
|
22
22
|
## Behavior
|
|
23
23
|
|
|
24
24
|
### Normal mode (`forced: false`)
|
|
25
|
+
|
|
25
26
|
- User fills in current password, new password, and confirmation.
|
|
26
27
|
- Real-time validation runs on each keystroke (via `validatePassword` API call).
|
|
27
28
|
- Errors are shown inline (field-level) and below the footer (API errors like password policy violations).
|
|
@@ -29,6 +30,7 @@ The `ChangePassword` component renders a `VcPopup` with three validated input fi
|
|
|
29
30
|
- Save button calls `changeUserPassword()`. On success, emits `close`.
|
|
30
31
|
|
|
31
32
|
### Forced mode (`forced: true`)
|
|
33
|
+
|
|
32
34
|
- An info banner explains that a password change is required.
|
|
33
35
|
- Cancel button signs the user out and redirects to `/login`.
|
|
34
36
|
- Save button changes the password and redirects to `/` on success.
|
|
@@ -43,12 +45,7 @@ The `ChangePassword` component renders a `VcPopup` with three validated input fi
|
|
|
43
45
|
## Usage
|
|
44
46
|
|
|
45
47
|
```vue
|
|
46
|
-
<ChangePassword
|
|
47
|
-
v-if="showChangePassword"
|
|
48
|
-
:forced="mustChangePassword"
|
|
49
|
-
:login="currentUser.userName"
|
|
50
|
-
@close="showChangePassword = false"
|
|
51
|
-
/>
|
|
48
|
+
<ChangePassword v-if="showChangePassword" :forced="mustChangePassword" :login="currentUser.userName" @close="showChangePassword = false" />
|
|
52
49
|
```
|
|
53
50
|
|
|
54
51
|
### Typical trigger locations
|
|
@@ -58,11 +55,11 @@ The `ChangePassword` component renders a `VcPopup` with three validated input fi
|
|
|
58
55
|
|
|
59
56
|
## Form Fields
|
|
60
57
|
|
|
61
|
-
| Field
|
|
62
|
-
|
|
63
|
-
| Current Password | `required`, `min:6`
|
|
64
|
-
| New Password
|
|
65
|
-
| Confirm Password | `required`, `min:6`, must match new
|
|
58
|
+
| Field | Validation | Description |
|
|
59
|
+
| ---------------- | ------------------------------------ | ---------------------------------------------- |
|
|
60
|
+
| Current Password | `required`, `min:6` | Verifies the user knows their current password |
|
|
61
|
+
| New Password | `required`, `min:6`, platform policy | The desired new password |
|
|
62
|
+
| Confirm Password | `required`, `min:6`, must match new | Confirmation of the new password |
|
|
66
63
|
|
|
67
64
|
## Error Codes
|
|
68
65
|
|
|
@@ -45,13 +45,7 @@ Combine with other account-related settings entries in a module setup:
|
|
|
45
45
|
|
|
46
46
|
```ts
|
|
47
47
|
// my-module/index.ts
|
|
48
|
-
import {
|
|
49
|
-
useSettingsMenu,
|
|
50
|
-
ChangePasswordButton,
|
|
51
|
-
LogoutButton,
|
|
52
|
-
ThemeSelector,
|
|
53
|
-
LanguageSelector,
|
|
54
|
-
} from "@vc-shell/framework";
|
|
48
|
+
import { useSettingsMenu, ChangePasswordButton, LogoutButton, ThemeSelector, LanguageSelector } from "@vc-shell/framework";
|
|
55
49
|
|
|
56
50
|
export default {
|
|
57
51
|
install() {
|
|
@@ -17,16 +17,16 @@ The component is renderless -- it renders its default slot and passes the curren
|
|
|
17
17
|
|
|
18
18
|
## Props
|
|
19
19
|
|
|
20
|
-
| Prop
|
|
21
|
-
|
|
20
|
+
| Prop | Type | Default | Description |
|
|
21
|
+
| --------- | --------- | ------- | ------------------------------------------------ |
|
|
22
22
|
| `capture` | `boolean` | `false` | Force error capture even outside a blade context |
|
|
23
23
|
|
|
24
24
|
## Slot Props
|
|
25
25
|
|
|
26
|
-
| Prop
|
|
27
|
-
|
|
26
|
+
| Prop | Type | Description |
|
|
27
|
+
| ------- | -------------------------- | --------------------------------------- |
|
|
28
28
|
| `error` | `DisplayableError \| null` | The captured error, or null if no error |
|
|
29
|
-
| `reset` | `() => void`
|
|
29
|
+
| `reset` | `() => void` | Clears the error state |
|
|
30
30
|
|
|
31
31
|
## Usage
|
|
32
32
|
|
|
@@ -87,7 +87,7 @@ async function onLogin(user) {
|
|
|
87
87
|
## Tips
|
|
88
88
|
|
|
89
89
|
- The component only shows locales that have been registered with vue-i18n. If a locale file is missing, the language will not appear in the selector.
|
|
90
|
-
- Use the `check
|
|
90
|
+
- Use the `check:locales` script (`yarn check:locales`) to validate that all locale files have the same keys. Missing keys fall back to the `fallbackLocale`.
|
|
91
91
|
- The `LanguageSelector` changes the UI language. To let users switch the content editing language for multilingual fields (e.g., product names), use the `MultilanguageSelector` component instead.
|
|
92
92
|
|
|
93
93
|
## Related Components
|
package/runtime/knowledge/docs/shell/components/notification-template/notification-template.docs.md
CHANGED
|
@@ -31,13 +31,13 @@ const notification = computed(() => notificationRef.value);
|
|
|
31
31
|
|
|
32
32
|
## Key Props
|
|
33
33
|
|
|
34
|
-
| Prop
|
|
35
|
-
|
|
36
|
-
| `title`
|
|
37
|
-
| `notification` | `IPushNotification` | --
|
|
38
|
-
| `icon`
|
|
39
|
-
| `color`
|
|
40
|
-
| `severity`
|
|
34
|
+
| Prop | Type | Default | Description |
|
|
35
|
+
| -------------- | ------------------- | ----------- | ------------------------------------------------- |
|
|
36
|
+
| `title` | `string` | -- | Notification headline text |
|
|
37
|
+
| `notification` | `IPushNotification` | -- | Full notification object (required for timestamp) |
|
|
38
|
+
| `icon` | `string` | `undefined` | Icon name displayed in a circular badge |
|
|
39
|
+
| `color` | `string` | `undefined` | Background color for the icon badge |
|
|
40
|
+
| `severity` | `string` | `undefined` | Semantic severity level |
|
|
41
41
|
|
|
42
42
|
## Recipe: Custom Notification for Order Events
|
|
43
43
|
|
|
@@ -129,7 +129,10 @@ const isRunning = computed(() => (notification.value as any).isRunning ?? false)
|
|
|
129
129
|
icon="lucide-upload"
|
|
130
130
|
color="var(--info-500)"
|
|
131
131
|
>
|
|
132
|
-
<div
|
|
132
|
+
<div
|
|
133
|
+
v-if="isRunning"
|
|
134
|
+
class="tw-mt-1"
|
|
135
|
+
>
|
|
133
136
|
<div class="tw-h-2 tw-bg-gray-200 tw-rounded">
|
|
134
137
|
<div
|
|
135
138
|
class="tw-h-full tw-bg-blue-500 tw-rounded tw-transition-all"
|
|
@@ -138,7 +141,12 @@ const isRunning = computed(() => (notification.value as any).isRunning ?? false)
|
|
|
138
141
|
</div>
|
|
139
142
|
<span class="tw-text-xs tw-text-gray-500">{{ progress }}% complete</span>
|
|
140
143
|
</div>
|
|
141
|
-
<p
|
|
144
|
+
<p
|
|
145
|
+
v-else
|
|
146
|
+
class="tw-text-sm tw-text-green-600"
|
|
147
|
+
>
|
|
148
|
+
Import completed.
|
|
149
|
+
</p>
|
|
142
150
|
</NotificationTemplate>
|
|
143
151
|
</template>
|
|
144
152
|
```
|
|
@@ -48,13 +48,7 @@ A typical module registers all its settings entries during the module install ph
|
|
|
48
48
|
```ts
|
|
49
49
|
// vendor-portal-module/index.ts
|
|
50
50
|
import { markRaw } from "vue";
|
|
51
|
-
import {
|
|
52
|
-
useSettingsMenu,
|
|
53
|
-
ThemeSelector,
|
|
54
|
-
LanguageSelector,
|
|
55
|
-
ChangePasswordButton,
|
|
56
|
-
LogoutButton,
|
|
57
|
-
} from "@vc-shell/framework";
|
|
51
|
+
import { useSettingsMenu, ThemeSelector, LanguageSelector, ChangePasswordButton, LogoutButton } from "@vc-shell/framework";
|
|
58
52
|
|
|
59
53
|
export default {
|
|
60
54
|
install() {
|
|
@@ -97,21 +91,21 @@ export default {
|
|
|
97
91
|
|
|
98
92
|
### Registration options
|
|
99
93
|
|
|
100
|
-
| Option
|
|
101
|
-
|
|
102
|
-
| `id`
|
|
103
|
-
| `group`
|
|
104
|
-
| `order`
|
|
105
|
-
| `component` | `Component` | Yes
|
|
94
|
+
| Option | Type | Required | Description |
|
|
95
|
+
| ----------- | ----------- | -------- | ---------------------------------------------------------- |
|
|
96
|
+
| `id` | `string` | Yes | Unique identifier for the entry |
|
|
97
|
+
| `group` | `string` | Yes | Group name (entries are grouped and separated by dividers) |
|
|
98
|
+
| `order` | `number` | Yes | Sort order within the group (lower = higher position) |
|
|
99
|
+
| `component` | `Component` | Yes | Vue component to render as the menu item |
|
|
106
100
|
|
|
107
101
|
### Group rendering
|
|
108
102
|
|
|
109
103
|
Groups are separated by a horizontal divider and items within each group are sorted by `order`. Common group names used by convention:
|
|
110
104
|
|
|
111
|
-
| Group
|
|
112
|
-
|
|
113
|
-
| `"preferences"` | User preferences (theme, language)
|
|
114
|
-
| `"account"`
|
|
105
|
+
| Group | Description | Typical order range |
|
|
106
|
+
| --------------- | ----------------------------------------- | ------------------- |
|
|
107
|
+
| `"preferences"` | User preferences (theme, language) | 10-29 |
|
|
108
|
+
| `"account"` | Account actions (change password, logout) | 30-100 |
|
|
115
109
|
|
|
116
110
|
## Details
|
|
117
111
|
|
package/runtime/knowledge/docs/shell/components/settings-menu-item/settings-menu-item.docs.md
CHANGED
|
@@ -44,34 +44,34 @@ import { SettingsMenuItem } from "@vc-shell/framework";
|
|
|
44
44
|
|
|
45
45
|
## Key Props
|
|
46
46
|
|
|
47
|
-
| Prop
|
|
48
|
-
|
|
49
|
-
| `title`
|
|
50
|
-
| `icon`
|
|
51
|
-
| `image`
|
|
52
|
-
| `value`
|
|
53
|
-
| `showChevron`
|
|
54
|
-
| `isActive`
|
|
55
|
-
| `disabled`
|
|
56
|
-
| `triggerAction` | `"click" \| "hover" \| "none"` | `"click"`
|
|
47
|
+
| Prop | Type | Default | Description |
|
|
48
|
+
| --------------- | ------------------------------ | ----------- | -------------------------------------------------------------------------------- |
|
|
49
|
+
| `title` | `string` | `undefined` | Menu item label |
|
|
50
|
+
| `icon` | `string \| Component` | `undefined` | Icon name or component |
|
|
51
|
+
| `image` | `string` | `undefined` | Image URL (alternative to icon) |
|
|
52
|
+
| `value` | `string` | `undefined` | Current value displayed on the right |
|
|
53
|
+
| `showChevron` | `boolean` | `false` | Shows right chevron for sub-menus (auto-enabled when `submenu` slot is provided) |
|
|
54
|
+
| `isActive` | `boolean` | `false` | Highlights the item (auto-managed when `submenu` slot is provided) |
|
|
55
|
+
| `disabled` | `boolean` | `false` | Disables click interaction |
|
|
56
|
+
| `triggerAction` | `"click" \| "hover" \| "none"` | `"click"` | What interaction opens the item |
|
|
57
57
|
|
|
58
58
|
## Events
|
|
59
59
|
|
|
60
|
-
| Event
|
|
61
|
-
|
|
62
|
-
| `trigger:click` | --
|
|
63
|
-
| `trigger:hover` | --
|
|
60
|
+
| Event | Payload | Description |
|
|
61
|
+
| --------------- | ------- | -------------------------------------------------------------------- |
|
|
62
|
+
| `trigger:click` | -- | Emitted when the item is clicked (only when `triggerAction="click"`) |
|
|
63
|
+
| `trigger:hover` | -- | Emitted when hovered (only when `triggerAction="hover"`) |
|
|
64
64
|
|
|
65
65
|
## Slots
|
|
66
66
|
|
|
67
|
-
| Slot
|
|
68
|
-
|
|
69
|
-
| `trigger`
|
|
70
|
-
| `icon`
|
|
71
|
-
| `title`
|
|
72
|
-
| `additional` | Custom right-side content (replaces `value` display)
|
|
73
|
-
| `submenu`
|
|
74
|
-
| `content`
|
|
67
|
+
| Slot | Description |
|
|
68
|
+
| ------------ | --------------------------------------------------------------------------------------------- |
|
|
69
|
+
| `trigger` | Custom trigger content (replaces the entire row) |
|
|
70
|
+
| `icon` | Custom icon area |
|
|
71
|
+
| `title` | Custom title content |
|
|
72
|
+
| `additional` | Custom right-side content (replaces `value` display) |
|
|
73
|
+
| `submenu` | **Sub-menu items.** Desktop: floating dropdown. Mobile: inline accordion. Chevron auto-shown. |
|
|
74
|
+
| `content` | Legacy slot for arbitrary content below the trigger |
|
|
75
75
|
|
|
76
76
|
## Common Patterns
|
|
77
77
|
|
|
@@ -95,7 +95,7 @@ const currentTheme = ref("light");
|
|
|
95
95
|
<SettingsMenuItem
|
|
96
96
|
icon="lucide-palette"
|
|
97
97
|
title="Theme"
|
|
98
|
-
:value="themes.find(t => t.key === currentTheme)?.name"
|
|
98
|
+
:value="themes.find((t) => t.key === currentTheme)?.name"
|
|
99
99
|
>
|
|
100
100
|
<template #submenu>
|
|
101
101
|
<VcDropdownItem
|
|
@@ -112,42 +112,27 @@ const currentTheme = ref("light");
|
|
|
112
112
|
|
|
113
113
|
**What happens on each platform:**
|
|
114
114
|
|
|
115
|
-
| Platform | Behavior
|
|
116
|
-
|
|
117
|
-
| Desktop
|
|
118
|
-
| Mobile
|
|
115
|
+
| Platform | Behavior |
|
|
116
|
+
| -------- | ----------------------------------------------------------------- |
|
|
117
|
+
| Desktop | Click triggers a floating panel to the right of the item |
|
|
118
|
+
| Mobile | Click expands an inline list below the item with chevron rotation |
|
|
119
119
|
|
|
120
120
|
### Simple action item (no sub-menu)
|
|
121
121
|
|
|
122
122
|
```vue
|
|
123
|
-
<SettingsMenuItem
|
|
124
|
-
icon="lucide-log-out"
|
|
125
|
-
title="Sign Out"
|
|
126
|
-
@trigger:click="handleSignOut"
|
|
127
|
-
/>
|
|
123
|
+
<SettingsMenuItem icon="lucide-log-out" title="Sign Out" @trigger:click="handleSignOut" />
|
|
128
124
|
```
|
|
129
125
|
|
|
130
126
|
### Item with user avatar image
|
|
131
127
|
|
|
132
128
|
```vue
|
|
133
|
-
<SettingsMenuItem
|
|
134
|
-
:image="user.avatarUrl"
|
|
135
|
-
:title="user.displayName"
|
|
136
|
-
:value="user.roleName"
|
|
137
|
-
:show-chevron="true"
|
|
138
|
-
@trigger:click="openUserMenu"
|
|
139
|
-
/>
|
|
129
|
+
<SettingsMenuItem :image="user.avatarUrl" :title="user.displayName" :value="user.roleName" :show-chevron="true" @trigger:click="openUserMenu" />
|
|
140
130
|
```
|
|
141
131
|
|
|
142
132
|
### Disabled item
|
|
143
133
|
|
|
144
134
|
```vue
|
|
145
|
-
<SettingsMenuItem
|
|
146
|
-
icon="lucide-shield"
|
|
147
|
-
title="Security Settings"
|
|
148
|
-
disabled
|
|
149
|
-
value="Admin only"
|
|
150
|
-
/>
|
|
135
|
+
<SettingsMenuItem icon="lucide-shield" title="Security Settings" disabled value="Admin only" />
|
|
151
136
|
```
|
|
152
137
|
|
|
153
138
|
### Custom submenu content
|
|
@@ -169,21 +154,8 @@ The `submenu` slot can contain any content, not just `VcDropdownItem`:
|
|
|
169
154
|
Before (manual dropdown management):
|
|
170
155
|
|
|
171
156
|
```vue
|
|
172
|
-
<SettingsMenuItem
|
|
173
|
-
|
|
174
|
-
icon="lucide-palette"
|
|
175
|
-
title="Theme"
|
|
176
|
-
:value="currentTheme"
|
|
177
|
-
:show-chevron="true"
|
|
178
|
-
:is-active="isOpen"
|
|
179
|
-
@trigger:click="isOpen = !isOpen"
|
|
180
|
-
/>
|
|
181
|
-
<VcDropdownPanel
|
|
182
|
-
v-model:show="isOpen"
|
|
183
|
-
:anchor-ref="menuItemRef?.triggerRef ?? null"
|
|
184
|
-
placement="right-start"
|
|
185
|
-
width="180px"
|
|
186
|
-
>
|
|
157
|
+
<SettingsMenuItem ref="menuItemRef" icon="lucide-palette" title="Theme" :value="currentTheme" :show-chevron="true" :is-active="isOpen" @trigger:click="isOpen = !isOpen" />
|
|
158
|
+
<VcDropdownPanel v-model:show="isOpen" :anchor-ref="menuItemRef?.triggerRef ?? null" placement="right-start" width="180px">
|
|
187
159
|
<!-- options -->
|
|
188
160
|
</VcDropdownPanel>
|
|
189
161
|
```
|
|
@@ -191,11 +163,7 @@ Before (manual dropdown management):
|
|
|
191
163
|
After (submenu slot):
|
|
192
164
|
|
|
193
165
|
```vue
|
|
194
|
-
<SettingsMenuItem
|
|
195
|
-
icon="lucide-palette"
|
|
196
|
-
title="Theme"
|
|
197
|
-
:value="currentTheme"
|
|
198
|
-
>
|
|
166
|
+
<SettingsMenuItem icon="lucide-palette" title="Theme" :value="currentTheme">
|
|
199
167
|
<template #submenu>
|
|
200
168
|
<!-- same options, no wrapper needed -->
|
|
201
169
|
</template>
|
|
@@ -203,6 +171,7 @@ After (submenu slot):
|
|
|
203
171
|
```
|
|
204
172
|
|
|
205
173
|
**What changes:**
|
|
174
|
+
|
|
206
175
|
- Remove `ref`, `isOpen`, `:show-chevron`, `:is-active`, `@trigger:click` toggle -- all auto-managed
|
|
207
176
|
- Remove `VcDropdownPanel` wrapper entirely
|
|
208
177
|
- Move dropdown content into `#submenu` slot
|
|
@@ -10,37 +10,31 @@ On mobile, the sidebar teleports itself out of the normal DOM flow to overlay th
|
|
|
10
10
|
|
|
11
11
|
## Props
|
|
12
12
|
|
|
13
|
-
| Prop
|
|
14
|
-
|
|
15
|
-
| `isExpanded` | `boolean`
|
|
16
|
-
| `position`
|
|
17
|
-
| `render`
|
|
18
|
-
| `title`
|
|
19
|
-
| `closeCross` | `boolean`
|
|
13
|
+
| Prop | Type | Default | Description |
|
|
14
|
+
| ------------ | ----------------------------------- | ---------- | ------------------------------------------ |
|
|
15
|
+
| `isExpanded` | `boolean` | (required) | Whether the sidebar is currently open |
|
|
16
|
+
| `position` | `"left" \| "right"` | `"right"` | Slide-in direction |
|
|
17
|
+
| `render` | `"always" \| "mobile" \| "desktop"` | `"always"` | When to render as a sidebar vs. inline |
|
|
18
|
+
| `title` | `string` | -- | Optional title shown in the sidebar header |
|
|
19
|
+
| `closeCross` | `boolean` | `true` | Whether to show the close button |
|
|
20
20
|
|
|
21
21
|
## Events
|
|
22
22
|
|
|
23
|
-
| Event
|
|
24
|
-
|
|
25
|
-
| `close` | --
|
|
23
|
+
| Event | Payload | Description |
|
|
24
|
+
| ------- | ------- | ---------------------------------------- |
|
|
25
|
+
| `close` | -- | Emitted when the user closes the sidebar |
|
|
26
26
|
|
|
27
27
|
## Slots
|
|
28
28
|
|
|
29
|
-
| Slot
|
|
30
|
-
|
|
31
|
-
| `header`
|
|
32
|
-
| `content` | --
|
|
29
|
+
| Slot | Scope | Description |
|
|
30
|
+
| --------- | ----------------------- | -------------------------------------------------- |
|
|
31
|
+
| `header` | `{ close: () => void }` | Custom header content; receives a `close` function |
|
|
32
|
+
| `content` | -- | The main sidebar body content |
|
|
33
33
|
|
|
34
34
|
## Usage
|
|
35
35
|
|
|
36
36
|
```vue
|
|
37
|
-
<Sidebar
|
|
38
|
-
:is-expanded="showFilters"
|
|
39
|
-
position="right"
|
|
40
|
-
render="always"
|
|
41
|
-
title="Filters"
|
|
42
|
-
@close="showFilters = false"
|
|
43
|
-
>
|
|
37
|
+
<Sidebar :is-expanded="showFilters" position="right" render="always" title="Filters" @close="showFilters = false">
|
|
44
38
|
<template #content>
|
|
45
39
|
<FilterPanel />
|
|
46
40
|
</template>
|
|
@@ -50,11 +44,7 @@ On mobile, the sidebar teleports itself out of the normal DOM flow to overlay th
|
|
|
50
44
|
### Mobile-only sidebar
|
|
51
45
|
|
|
52
46
|
```vue
|
|
53
|
-
<Sidebar
|
|
54
|
-
:is-expanded="showDetails"
|
|
55
|
-
render="mobile"
|
|
56
|
-
@close="showDetails = false"
|
|
57
|
-
>
|
|
47
|
+
<Sidebar :is-expanded="showDetails" render="mobile" @close="showDetails = false">
|
|
58
48
|
<template #content>
|
|
59
49
|
<DetailView />
|
|
60
50
|
</template>
|
|
@@ -50,8 +50,8 @@ const { register, setTheme, currentTheme } = useTheme();
|
|
|
50
50
|
|
|
51
51
|
// Register available themes during app initialization
|
|
52
52
|
register([
|
|
53
|
-
{ key: "light" },
|
|
54
|
-
{ key: "dark" },
|
|
53
|
+
{ key: "light" }, // Default light theme
|
|
54
|
+
{ key: "dark" }, // Dark mode
|
|
55
55
|
{ key: "contrast" }, // High-contrast accessibility theme
|
|
56
56
|
]);
|
|
57
57
|
|
package/runtime/knowledge/docs/shell/components/user-dropdown-button/user-dropdown-button.docs.md
CHANGED
|
@@ -26,12 +26,12 @@ import { UserDropdownButton } from "@vc-shell/framework";
|
|
|
26
26
|
|
|
27
27
|
## Key Props
|
|
28
28
|
|
|
29
|
-
| Prop
|
|
30
|
-
|
|
31
|
-
| `name`
|
|
32
|
-
| `role`
|
|
33
|
-
| `avatarUrl` | `string`
|
|
34
|
-
| `disabled`
|
|
29
|
+
| Prop | Type | Default | Description |
|
|
30
|
+
| ----------- | --------- | ----------- | ----------------------------- |
|
|
31
|
+
| `name` | `string` | `undefined` | User display name |
|
|
32
|
+
| `role` | `string` | `undefined` | User role label |
|
|
33
|
+
| `avatarUrl` | `string` | `undefined` | URL for the user avatar image |
|
|
34
|
+
| `disabled` | `boolean` | `false` | Prevents menu from opening |
|
|
35
35
|
|
|
36
36
|
## Recipe: Wiring to User Management Composable
|
|
37
37
|
|
|
@@ -45,9 +45,7 @@ import { useUserManagement } from "@vc-shell/framework";
|
|
|
45
45
|
|
|
46
46
|
const { currentUser } = useUserManagement();
|
|
47
47
|
|
|
48
|
-
const displayName = computed(() =>
|
|
49
|
-
currentUser.value ? `${currentUser.value.firstName} ${currentUser.value.lastName}` : ""
|
|
50
|
-
);
|
|
48
|
+
const displayName = computed(() => (currentUser.value ? `${currentUser.value.firstName} ${currentUser.value.lastName}` : ""));
|
|
51
49
|
const role = computed(() => currentUser.value?.roles?.[0]?.name ?? "");
|
|
52
50
|
const avatarUrl = computed(() => currentUser.value?.photoUrl);
|
|
53
51
|
</script>
|