@vc-shell/vc-app-skill 2.0.3-pr227.0c4f2c3 → 2.0.4-pr228.833ff5f

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/package.json +1 -1
  3. package/runtime/VERSION +1 -1
  4. package/runtime/knowledge/docs/_BUILD_HASH.md +1 -1
  5. package/runtime/knowledge/docs/core/api/platform.docs.md +7 -0
  6. package/runtime/knowledge/docs/core/blade-navigation/blade-nav-composables.docs.md +20 -4
  7. package/runtime/knowledge/docs/core/composables/bladeContext/index.docs.md +15 -3
  8. package/runtime/knowledge/docs/core/composables/useApiClient/useApiClient.docs.md +13 -4
  9. package/runtime/knowledge/docs/core/composables/useAppBarMobileButtons/useAppBarMobileButtons.docs.md +10 -0
  10. package/runtime/knowledge/docs/core/composables/useAppBarWidget/useAppBarWidget.docs.md +6 -0
  11. package/runtime/knowledge/docs/core/composables/useAppInsights/useAppInsights.docs.md +6 -0
  12. package/runtime/knowledge/docs/core/composables/useAssets/useAssets.docs.md +8 -1
  13. package/runtime/knowledge/docs/core/composables/useAssetsManager/useAssetsManager.docs.md +15 -4
  14. package/runtime/knowledge/docs/core/composables/useAsync/useAsync.docs.md +13 -0
  15. package/runtime/knowledge/docs/core/composables/useBeforeUnload/useBeforeUnload.docs.md +6 -0
  16. package/runtime/knowledge/docs/core/composables/useBlade/useBlade.docs.md +13 -0
  17. package/runtime/knowledge/docs/core/composables/useBladeForm/useBladeForm.docs.md +12 -2
  18. package/runtime/knowledge/docs/core/composables/useBladeRegistry/useBladeRegistry.docs.md +14 -4
  19. package/runtime/knowledge/docs/core/composables/useBladeWidgets/index.docs.md +23 -9
  20. package/runtime/knowledge/docs/core/composables/useBreadcrumbs/useBreadcrumbs.docs.md +6 -0
  21. package/runtime/knowledge/docs/core/composables/useConnectionStatus/useConnectionStatus.docs.md +10 -0
  22. package/runtime/knowledge/docs/core/composables/useDashboard/useDashboard.docs.md +9 -0
  23. package/runtime/knowledge/docs/core/composables/useDynamicProperties/useDynamicProperties.docs.md +6 -0
  24. package/runtime/knowledge/docs/core/composables/useErrorHandler/useErrorHandler.docs.md +6 -0
  25. package/runtime/knowledge/docs/core/composables/useFunctions/useFunctions.docs.md +6 -0
  26. package/runtime/knowledge/docs/core/composables/useKeyboardNavigation/useKeyboardNavigation.docs.md +10 -0
  27. package/runtime/knowledge/docs/core/composables/useLanguages/useLanguages.docs.md +6 -0
  28. package/runtime/knowledge/docs/core/composables/useLoading/useLoading.docs.md +10 -0
  29. package/runtime/knowledge/docs/core/composables/useMenuExpanded/index.docs.md +10 -0
  30. package/runtime/knowledge/docs/core/composables/useMenuService/useMenuService.docs.md +9 -0
  31. package/runtime/knowledge/docs/core/composables/useModificationTracker/useModificationTracker.docs.md +6 -0
  32. package/runtime/knowledge/docs/core/composables/useNotifications/useNotifications.docs.md +6 -0
  33. package/runtime/knowledge/docs/core/composables/usePermissions/usePermissions.docs.md +9 -0
  34. package/runtime/knowledge/docs/core/composables/usePopup/usePopup.docs.md +9 -0
  35. package/runtime/knowledge/docs/core/composables/useResponsive/useResponsive.docs.md +10 -0
  36. package/runtime/knowledge/docs/core/composables/useSettings/useSettings.docs.md +6 -0
  37. package/runtime/knowledge/docs/core/composables/useSettingsMenu/useSettingsMenu.docs.md +6 -0
  38. package/runtime/knowledge/docs/core/composables/useSidebarState/useSidebarState.docs.md +10 -0
  39. package/runtime/knowledge/docs/core/composables/useSlowNetworkDetection/useSlowNetworkDetection.docs.md +9 -0
  40. package/runtime/knowledge/docs/core/composables/useTheme/useTheme.docs.md +9 -0
  41. package/runtime/knowledge/docs/core/composables/useToolbar/useToolbar.docs.md +9 -0
  42. package/runtime/knowledge/docs/core/composables/useUser/useUser.docs.md +6 -0
  43. package/runtime/knowledge/docs/core/composables/useUserManagement/useUserManagement.docs.md +7 -0
  44. package/runtime/knowledge/docs/core/composables/useWebVitals/useWebVitals.docs.md +6 -0
  45. package/runtime/knowledge/docs/core/composables/useWidgets/useWidgets.docs.md +10 -0
  46. package/runtime/knowledge/docs/core/directives/autofocus/autofocus.docs.md +7 -0
  47. package/runtime/knowledge/docs/core/directives/loading/loading.docs.md +7 -0
  48. package/runtime/knowledge/docs/core/notifications/notifications.docs.md +21 -0
  49. package/runtime/knowledge/docs/core/plugins/ai-agent/ai-agent.docs.md +7 -0
  50. package/runtime/knowledge/docs/core/plugins/extension-points/extension-points.docs.md +10 -0
  51. package/runtime/knowledge/docs/core/plugins/global-error-handler/global-error-handler.docs.md +7 -0
  52. package/runtime/knowledge/docs/core/plugins/i18n/i18n.docs.md +10 -0
  53. package/runtime/knowledge/docs/core/plugins/modularity/modularity.docs.md +10 -0
  54. package/runtime/knowledge/docs/core/plugins/permissions/permissions.docs.md +8 -1
  55. package/runtime/knowledge/docs/core/plugins/signalR/signalR.docs.md +7 -0
  56. package/runtime/knowledge/docs/core/plugins/validation/validation.docs.md +10 -0
  57. package/runtime/knowledge/docs/core/services/services.docs.md +16 -1
  58. package/runtime/knowledge/docs/core/types/types.docs.md +7 -0
  59. package/runtime/knowledge/docs/core/utilities/date/date-utilities.docs.md +7 -0
  60. package/runtime/knowledge/docs/core/utilities/shared-utilities.docs.md +7 -0
  61. package/runtime/knowledge/docs/core/utilities/thumbnail/thumbnail.docs.md +7 -0
  62. package/runtime/knowledge/docs/core/utilities/utilities.docs.md +7 -0
  63. package/runtime/knowledge/docs/injection-keys.docs.md +11 -0
  64. package/runtime/knowledge/docs/modules/assets-manager/assets-manager.docs.md +89 -12
  65. package/runtime/knowledge/docs/shell/_internal/popup/common/popup-common.docs.md +7 -0
  66. package/runtime/knowledge/docs/shell/auth/ChangePasswordPage/change-password-page.docs.md +7 -0
  67. package/runtime/knowledge/docs/shell/auth/ForgotPasswordPage/forgot-password-page.docs.md +7 -0
  68. package/runtime/knowledge/docs/shell/auth/InvitePage/invite-page.docs.md +7 -0
  69. package/runtime/knowledge/docs/shell/auth/LoginPage/login-page.docs.md +7 -0
  70. package/runtime/knowledge/docs/shell/auth/ResetPasswordPage/reset-password-page.docs.md +7 -0
  71. package/runtime/knowledge/docs/shell/auth/sign-in/sign-in.docs.md +7 -0
  72. package/runtime/knowledge/docs/shell/components/change-password/change-password.docs.md +7 -0
  73. package/runtime/knowledge/docs/shell/components/change-password-button/change-password-button.docs.md +7 -0
  74. package/runtime/knowledge/docs/shell/components/error-interceptor/error-interceptor.docs.md +7 -0
  75. package/runtime/knowledge/docs/shell/components/language-selector/language-selector.docs.md +7 -0
  76. package/runtime/knowledge/docs/shell/components/logout-button/logout-button.docs.md +7 -0
  77. package/runtime/knowledge/docs/shell/components/notification-dropdown/notification-dropdown.docs.md +7 -0
  78. package/runtime/knowledge/docs/shell/components/notification-template/notification-template.docs.md +7 -0
  79. package/runtime/knowledge/docs/shell/components/settings-menu/settings-menu.docs.md +7 -0
  80. package/runtime/knowledge/docs/shell/components/settings-menu-item/settings-menu-item.docs.md +7 -0
  81. package/runtime/knowledge/docs/shell/components/sidebar/sidebar.docs.md +7 -0
  82. package/runtime/knowledge/docs/shell/components/theme-selector/theme-selector.docs.md +7 -0
  83. package/runtime/knowledge/docs/shell/components/user-dropdown-button/user-dropdown-button.docs.md +7 -0
  84. package/runtime/knowledge/docs/shell/dashboard/dashboard-charts/dashboard-charts.docs.md +7 -0
  85. package/runtime/knowledge/docs/shell/dashboard/dashboard-widget-card/dashboard-widget-card.docs.md +7 -0
  86. package/runtime/knowledge/docs/shell/dashboard/draggable-dashboard/draggable-dashboard.docs.md +7 -0
  87. package/runtime/knowledge/docs/ui/components/atoms/vc-badge/vc-badge.docs.md +24 -0
  88. package/runtime/knowledge/docs/ui/components/atoms/vc-banner/vc-banner.docs.md +20 -0
  89. package/runtime/knowledge/docs/ui/components/atoms/vc-button/vc-button.docs.md +32 -5
  90. package/runtime/knowledge/docs/ui/components/atoms/vc-card/vc-card.docs.md +15 -2
  91. package/runtime/knowledge/docs/ui/components/atoms/vc-col/vc-col.docs.md +11 -1
  92. package/runtime/knowledge/docs/ui/components/atoms/vc-container/vc-container.docs.md +10 -0
  93. package/runtime/knowledge/docs/ui/components/atoms/vc-hint/vc-hint.docs.md +20 -0
  94. package/runtime/knowledge/docs/ui/components/atoms/vc-icon/vc-icon.docs.md +24 -0
  95. package/runtime/knowledge/docs/ui/components/atoms/vc-image/vc-image.docs.md +26 -0
  96. package/runtime/knowledge/docs/ui/components/atoms/vc-label/vc-label.docs.md +24 -0
  97. package/runtime/knowledge/docs/ui/components/atoms/vc-link/vc-link.docs.md +22 -0
  98. package/runtime/knowledge/docs/ui/components/atoms/vc-loading/vc-loading.docs.md +21 -0
  99. package/runtime/knowledge/docs/ui/components/atoms/vc-progress/vc-progress.docs.md +20 -0
  100. package/runtime/knowledge/docs/ui/components/atoms/vc-row/vc-row.docs.md +11 -1
  101. package/runtime/knowledge/docs/ui/components/atoms/vc-scrollable-container/vc-scrollable-container.docs.md +11 -1
  102. package/runtime/knowledge/docs/ui/components/atoms/vc-skeleton/vc-skeleton.docs.md +20 -0
  103. package/runtime/knowledge/docs/ui/components/atoms/vc-status/vc-status.docs.md +20 -0
  104. package/runtime/knowledge/docs/ui/components/atoms/vc-status-icon/vc-status-icon.docs.md +20 -0
  105. package/runtime/knowledge/docs/ui/components/atoms/vc-tooltip/vc-tooltip.docs.md +25 -1
  106. package/runtime/knowledge/docs/ui/components/atoms/vc-video/vc-video.docs.md +25 -0
  107. package/runtime/knowledge/docs/ui/components/atoms/vc-widget/vc-widget.docs.md +22 -0
  108. package/runtime/knowledge/docs/ui/components/molecules/multilanguage-selector/multilanguage-selector.docs.md +10 -0
  109. package/runtime/knowledge/docs/ui/components/molecules/vc-accordion/vc-accordion.docs.md +17 -0
  110. package/runtime/knowledge/docs/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.docs.md +27 -0
  111. package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox/vc-checkbox.docs.md +27 -0
  112. package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox-group/vc-checkbox-group.docs.md +23 -0
  113. package/runtime/knowledge/docs/ui/components/molecules/vc-color-input/vc-color-input.docs.md +24 -0
  114. package/runtime/knowledge/docs/ui/components/molecules/vc-date-picker/vc-date-picker.docs.md +27 -0
  115. package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown/vc-dropdown.docs.md +27 -0
  116. package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown-panel/vc-dropdown-panel.docs.md +22 -0
  117. package/runtime/knowledge/docs/ui/components/molecules/vc-editor/vc-editor.docs.md +17 -0
  118. package/runtime/knowledge/docs/ui/components/molecules/vc-field/vc-field.docs.md +17 -0
  119. package/runtime/knowledge/docs/ui/components/molecules/vc-file-upload/vc-file-upload.docs.md +17 -0
  120. package/runtime/knowledge/docs/ui/components/molecules/vc-form/vc-form.docs.md +15 -0
  121. package/runtime/knowledge/docs/ui/components/molecules/vc-image-tile/vc-image-tile.docs.md +12 -0
  122. package/runtime/knowledge/docs/ui/components/molecules/vc-input/vc-input.docs.md +30 -0
  123. package/runtime/knowledge/docs/ui/components/molecules/vc-input-currency/vc-input-currency.docs.md +27 -0
  124. package/runtime/knowledge/docs/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.docs.md +26 -0
  125. package/runtime/knowledge/docs/ui/components/molecules/vc-input-group/vc-input-group.docs.md +21 -0
  126. package/runtime/knowledge/docs/ui/components/molecules/vc-menu/vc-menu.docs.md +24 -0
  127. package/runtime/knowledge/docs/ui/components/molecules/vc-multivalue/vc-multivalue.docs.md +28 -0
  128. package/runtime/knowledge/docs/ui/components/molecules/vc-pagination/vc-pagination.docs.md +25 -0
  129. package/runtime/knowledge/docs/ui/components/molecules/vc-radio-button/vc-radio-button.docs.md +25 -0
  130. package/runtime/knowledge/docs/ui/components/molecules/vc-radio-group/vc-radio-group.docs.md +22 -0
  131. package/runtime/knowledge/docs/ui/components/molecules/vc-rating/vc-rating.docs.md +17 -0
  132. package/runtime/knowledge/docs/ui/components/molecules/vc-select/vc-select.docs.md +32 -0
  133. package/runtime/knowledge/docs/ui/components/molecules/vc-slider/vc-slider.docs.md +22 -0
  134. package/runtime/knowledge/docs/ui/components/molecules/vc-switch/vc-switch.docs.md +25 -0
  135. package/runtime/knowledge/docs/ui/components/molecules/vc-textarea/vc-textarea.docs.md +27 -0
  136. package/runtime/knowledge/docs/ui/components/molecules/vc-toast/vc-toast.docs.md +28 -0
  137. package/runtime/knowledge/docs/ui/components/organisms/vc-app/vc-app.docs.md +19 -0
  138. package/runtime/knowledge/docs/ui/components/organisms/vc-auth-layout/vc-auth-layout.docs.md +13 -0
  139. package/runtime/knowledge/docs/ui/components/organisms/vc-blade/vc-blade.docs.md +22 -1
  140. package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/composables/table-composables.docs.md +30 -5
  141. package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/vc-data-table.docs.md +18 -0
  142. package/runtime/knowledge/docs/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.docs.md +12 -0
  143. package/runtime/knowledge/docs/ui/components/organisms/vc-gallery/vc-gallery.docs.md +14 -0
  144. package/runtime/knowledge/docs/ui/components/organisms/vc-image-upload/vc-image-upload.docs.md +12 -0
  145. package/runtime/knowledge/docs/ui/components/organisms/vc-popup/vc-popup.docs.md +14 -1
  146. package/runtime/knowledge/docs/ui/components/organisms/vc-sidebar/vc-sidebar.docs.md +13 -0
  147. package/runtime/knowledge/docs/ui/composables/ui-composables.docs.md +7 -0
  148. package/runtime/knowledge/docs/ui/composables/useDataTablePagination.docs.md +9 -3
  149. package/runtime/knowledge/docs/ui/composables/useDataTableSort.docs.md +6 -0
  150. package/runtime/knowledge/docs/ui/composables/useTableSelection.docs.md +6 -0
  151. package/runtime/knowledge/docs/ui/composables/useTableSort.docs.md +6 -0
  152. package/runtime/knowledge/docs/ui/types/ui-types.docs.md +7 -0
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: Assets Manager
3
+ category: reference
4
+ group: modules
5
+ slug: assets-manager
6
+ ---
7
+
1
8
  # Assets Manager Module
2
9
 
3
10
  A built-in blade module for managing file assets (images, documents, archives). Provides upload, delete, reorder, and preview functionality via a table-based UI.
@@ -32,17 +39,27 @@ The blade reads its configuration from `options` via `useBlade<AssetsManagerOpti
32
39
 
33
40
  ## Usage
34
41
 
35
- Open the Assets Manager as a child blade:
42
+ The canonical pattern is to bind the manager to a writable `computed` over a field of the parent entity, so that uploads/removes/reorders propagate back into the form. `confirmRemove` is wired to the framework's popup service rather than `window.confirm`.
36
43
 
37
44
  ```typescript
38
- import { markRaw } from "vue";
39
- import { useBlade, useAssetsManager } from "@vc-shell/framework";
45
+ import { computed, markRaw } from "vue";
46
+ import { useBlade, useAssetsManager, usePopup } from "@vc-shell/framework";
40
47
 
41
48
  const { openBlade } = useBlade();
49
+ const { showConfirmation } = usePopup();
50
+
51
+ // Two-way binding: the manager mutates `productAssets.value`, which writes
52
+ // straight back to `item.value.productData.assets`.
53
+ const productAssets = computed({
54
+ get: () => item.value?.productData?.assets ?? [],
55
+ set: (val) => {
56
+ if (item.value?.productData) item.value.productData.assets = val;
57
+ },
58
+ });
42
59
 
43
- const assetsManager = useAssetsManager(product.assets, {
44
- uploadPath: () => `/catalog/${product.id}`,
45
- confirmRemove: () => confirm("Delete selected assets?"),
60
+ const assetsManager = useAssetsManager(productAssets, {
61
+ uploadPath: () => `/catalog/${item.value?.id}`,
62
+ confirmRemove: () => showConfirmation("Are you sure you want to delete the selected assets?"),
46
63
  });
47
64
 
48
65
  openBlade({
@@ -54,7 +71,6 @@ openBlade({
54
71
  // manager.items.value and manager.loading.value access.
55
72
  manager: markRaw(assetsManager),
56
73
  disabled: !canEdit.value,
57
- hiddenFields: ["sortOrder"],
58
74
  },
59
75
  });
60
76
  ```
@@ -66,8 +82,8 @@ openBlade({
66
82
  - **Delete**: Toolbar delete button (requires selection) and per-row action button.
67
83
  - **Reorder**: Drag-and-drop row reordering when not in readonly mode.
68
84
  - **Detail view**: Clicking a row opens an `AssetsDetails` child blade for single-asset editing.
69
- - **Mobile**: Responsive card layout for mobile viewports.
70
- - **Empty state**: Shows upload prompt when no assets exist (or "No assets" in readonly mode).
85
+ - **Non-image assets**: Files without an image extension render a colored badge with the uppercased extension (`PDF`, `DOCX`, `ZIP`, ...) instead of a thumbnail.
86
+ - **Empty state**: Shows upload prompt when no assets exist; the empty-state action button opens the file picker.
71
87
 
72
88
  ## Toolbar
73
89
 
@@ -81,11 +97,72 @@ openBlade({
81
97
  - **Always use `markRaw()` when passing manager through blade options.** Blade descriptors are stored in `ref<BladeDescriptor[]>()`, which creates a deep reactive proxy. Vue auto-unwraps `Ref` values inside reactive objects, so `manager.items` would become a plain array instead of `Ref<AssetLike[]>` — breaking `.value` access. `markRaw()` prevents this by telling Vue not to make the manager reactive.
82
98
  - The `manager` object (from `useAssetsManager()`) owns the reactive asset list and all mutation methods. The blade reads `manager.items` and calls `manager.upload()`, `manager.remove()`, `manager.removeMany()`, `manager.reorder()`, and `manager.updateItem()`.
83
99
  - The `disabled` prop makes the entire blade readonly: no upload, no delete, no reorder.
84
- - Asset thumbnails use `isImage()` from shared utilities to determine if an image preview or a file-type icon should be shown.
100
+ - Asset thumbnails use `isImage()` from `@core/utilities/assets` to decide between an image preview (`VcImage`) and a colored extension badge (`getExtensionColor` + `getExtensionLabel`).
85
101
  - The module uses `useBlade()` internally to open the detail sub-blade.
102
+ - The `manager` instance can be reused as a `useBladeWidgets` badge source — its `items.value.length` updates reactively as uploads/removes happen inside the blade, so a parent widget showing the asset count refreshes without an extra round-trip.
103
+
104
+ ## Recipes
105
+
106
+ ### Open from a blade widget
107
+
108
+ Most callers don't open `AssetsManager` directly — they expose it as one of the parent blade's widgets. The widget shows the asset count as a live badge and opens the manager on click. The manager is created once per parent blade and reused across openings.
109
+
110
+ ```typescript
111
+ import { computed, markRaw, type Ref, type ComputedRef } from "vue";
112
+ import { useBlade, useBladeWidgets, useAssetsManager, usePopup } from "@vc-shell/framework";
113
+
114
+ interface Entity {
115
+ id?: string;
116
+ productData?: { assets?: Asset[] };
117
+ }
118
+
119
+ export function useEntityWidgets(opts: { item: Ref<Entity | undefined>; disabled: ComputedRef<boolean>; isVisible: ComputedRef<boolean> }) {
120
+ const { item, disabled, isVisible } = opts;
121
+ const { openBlade } = useBlade();
122
+ const { showConfirmation } = usePopup();
123
+
124
+ const entityAssets = computed({
125
+ get: () => item.value?.productData?.assets ?? [],
126
+ set: (val) => {
127
+ if (item.value?.productData) item.value.productData.assets = val;
128
+ },
129
+ });
130
+
131
+ const assetsManager = useAssetsManager(entityAssets, {
132
+ uploadPath: () => `/catalog/${item.value?.id}`,
133
+ confirmRemove: () => showConfirmation("Are you sure you want to delete the selected assets?"),
134
+ });
135
+
136
+ const assetsCount = computed(() => entityAssets.value.length);
137
+
138
+ return useBladeWidgets([
139
+ {
140
+ id: "AssetsWidget",
141
+ icon: "lucide-file",
142
+ title: "WIDGETS.ASSETS",
143
+ badge: assetsCount,
144
+ isVisible,
145
+ onClick: () =>
146
+ openBlade({
147
+ name: "AssetsManager",
148
+ options: {
149
+ manager: markRaw(assetsManager),
150
+ disabled: disabled.value,
151
+ },
152
+ }),
153
+ },
154
+ ]);
155
+ }
156
+ ```
157
+
158
+ Key points:
159
+
160
+ - `useAssetsManager` is invoked once at widget-setup time, not inside `onClick`. Recreating it per click would lose pending state and break optimistic updates.
161
+ - `disabled.value` is unwrapped at click time. Passing the raw `ComputedRef` would work too, but the blade reads `options.value?.disabled` as a plain value.
162
+ - `assetsCount` reads from the source array (not from `assetsManager.items`), but both stay in sync because the manager mutates the same array via the setter.
86
163
 
87
164
  ## Related
88
165
 
89
166
  - `framework/core/composables/useAssetsManager/` -- `useAssetsManager`, `AssetLike`, `UseAssetsManagerReturn`
90
- - `framework/shared/utilities/assets.ts` -- `isImage`, `getFileThumbnail`, `readableSize`
91
- - `framework/core/utilities/date/` -- `formatDateRelative` for creation dates
167
+ - `framework/core/utilities/assets.ts` -- `isImage`, `readableSize`, `getExtensionColor`, `getExtensionLabel`
168
+ - `framework/modules/assets/components/assets-details/` -- `AssetsDetails` child blade opened on row click
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: PopupCommon
3
+ category: composables
4
+ group: utilities
5
+ internal: true
6
+ ---
7
+
1
8
  # Popup Common Components
2
9
 
3
10
  Pre-configured popup variants for warning, error, and info dialogs. Built on a shared `VcPopupBase` component that wraps the `VcPopup` organism.
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: ChangePasswordPage
3
+ category: composables
4
+ group: utilities
5
+ internal: true
6
+ ---
7
+
1
8
  # ChangePasswordPage
2
9
 
3
10
  Change password page with current, new, and confirm password fields. Supports a `forced` mode for expired passwords that displays an info banner and is triggered by post-login redirect. This full-page variant is used when the user must change their password before accessing the application (e.g., expired password policy). For voluntary password changes from within the app, the `ChangePasswordButton` in the settings menu opens a popup instead.
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: ForgotPasswordPage
3
+ category: composables
4
+ group: utilities
5
+ internal: true
6
+ ---
7
+
1
8
  # ForgotPasswordPage
2
9
 
3
10
  Password recovery page where the user enters their email to receive a reset link. Shows a masked-email confirmation on success. This page is part of the standard authentication flow in vc-shell and handles the first step of password recovery: collecting the user's email address and dispatching a reset email through the platform API.
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: InvitePage
3
+ category: composables
4
+ group: utilities
5
+ internal: true
6
+ ---
7
+
1
8
  # InvitePage
2
9
 
3
10
  Invitation acceptance page where an invited user sets their password. Validates the invitation token on mount, displays the pre-filled email, and provides password/confirm fields. On successful acceptance, the user is automatically signed in and redirected to the main application. This page is the final step in the user invitation flow initiated from the VirtoCommerce Platform admin.
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: LoginPage
3
+ category: composables
4
+ group: utilities
5
+ internal: true
6
+ ---
7
+
1
8
  # LoginPage
2
9
 
3
10
  Full-page login screen with username/password form, SSO external provider support, and forgot-password navigation. Wraps `VcAuthLayout` and uses `useUserManagement` for authentication. This is the primary entry point for user authentication in vc-shell applications, supporting both standard credential-based login and SSO/external provider authentication.
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: ResetPasswordPage
3
+ category: composables
4
+ group: utilities
5
+ internal: true
6
+ ---
7
+
1
8
  # ResetPasswordPage
2
9
 
3
10
  Password reset page reached via an email link containing a token. Validates the token on mount, then shows password and confirm-password fields. On success, the user is automatically signed in and redirected to the main application. This page is the second step of the password recovery flow, following the `ForgotPasswordPage` which dispatches the reset email.
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: SignIn
3
+ category: composables
4
+ group: utilities
5
+ internal: true
6
+ ---
7
+
1
8
  # SignIn (External Providers)
2
9
 
3
10
  Components and composable for SSO / external authentication provider integration. Renders provider buttons on the login page and handles the external sign-in redirect flow. This module supports any OAuth2/OpenID Connect provider configured on the VirtoCommerce Platform (Google, Azure AD, ADFS, Okta, etc.) and provides a clean abstraction over the redirect-based authentication flow.
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: ChangePassword
3
+ category: composables
4
+ group: utilities
5
+ internal: true
6
+ ---
7
+
1
8
  # Change Password Component
2
9
 
3
10
  A modal dialog for changing the current user's password, with real-time validation and forced-change support.
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: ChangePasswordButton
3
+ category: composables
4
+ group: utilities
5
+ internal: true
6
+ ---
7
+
1
8
  # ChangePasswordButton
2
9
 
3
10
  Settings menu action that opens the change-password popup through the popup handler system. This component bridges the settings menu and the password change form: it injects `CloseSettingsMenuKey` to dismiss the parent menu before showing the password popup, ensuring a clean transition. The popup itself renders a form with current password, new password, and confirm password fields, with real-time password policy validation.
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: ErrorInterceptor
3
+ category: composables
4
+ group: utilities
5
+ internal: true
6
+ ---
7
+
1
8
  # Error Interceptor
2
9
 
3
10
  A renderless component that captures Vue `onErrorCaptured` errors and surfaces them to child slots or the blade error banner.
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: LanguageSelector
3
+ category: composables
4
+ group: utilities
5
+ internal: true
6
+ ---
7
+
1
8
  # LanguageSelector
2
9
 
3
10
  Settings menu entry that displays the current UI language and opens a cascading submenu for switching between available locales. Uses the framework `useLanguages` composable and the global vue-i18n locale list. When the user selects a different language, the entire application UI updates immediately without a page reload.
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: LogoutButton
3
+ category: composables
4
+ group: utilities
5
+ internal: true
6
+ ---
7
+
1
8
  # LogoutButton
2
9
 
3
10
  Settings menu action that signs the user out, closes all open blades, and redirects to the login page. This component encapsulates the full sign-out flow: it injects `CloseSettingsMenuKey` to dismiss the parent menu before navigation, calls `useUserManagement().signOut()` to clear the authentication token, and uses `useBladeStack()` to close open child blades so the user does not return to stale blade state on next login.
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: NotificationDropdown
3
+ category: composables
4
+ group: utilities
5
+ internal: true
6
+ ---
7
+
1
8
  # NotificationDropdown
2
9
 
3
10
  Dropdown panel that displays the push notification history in reverse chronological order. This component renders a scrollable list of all received push notifications, backed by the `useNotifications()` composable. It automatically marks unread notifications as read when the dropdown is closed (unmounted), updating the unread badge count in the toolbar.
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: NotificationTemplate
3
+ category: composables
4
+ group: utilities
5
+ internal: true
6
+ ---
7
+
1
8
  # NotificationTemplate
2
9
 
3
10
  Base template for rendering a single push notification with title, relative timestamp, optional icon, and a default slot for extra detail content. This component provides the standard layout that all notification types share, while allowing domain-specific content to be injected through the default slot.
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: SettingsMenu
3
+ category: composables
4
+ group: utilities
5
+ internal: true
6
+ ---
7
+
1
8
  # SettingsMenu
2
9
 
3
10
  Container component that renders registered settings menu items grouped by category and sorted by order. Items are registered through the `useSettingsMenu` service, not through component props. This decoupled architecture allows any module in the application to contribute settings entries without modifying the menu component itself.
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: SettingsMenuItem
3
+ category: composables
4
+ group: utilities
5
+ internal: true
6
+ ---
7
+
1
8
  # SettingsMenuItem
2
9
 
3
10
  Individual menu row used inside the settings menu. Displays an icon, title, optional current value, and a chevron indicator for sub-menus. Supports click and hover trigger actions.
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: Sidebar
3
+ category: composables
4
+ group: utilities
5
+ internal: true
6
+ ---
7
+
1
8
  # Sidebar Component
2
9
 
3
10
  A responsive sidebar wrapper that conditionally renders content inside a `VcSidebar` panel or inline, based on viewport and expansion state.
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: ThemeSelector
3
+ category: composables
4
+ group: utilities
5
+ internal: true
6
+ ---
7
+
1
8
  # ThemeSelector
2
9
 
3
10
  Settings menu entry that shows the current theme and opens a cascading submenu to switch between registered themes. Uses the `useTheme()` composable for theme management and shows a toast notification when the theme changes, confirming the switch to the user.
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: UserDropdownButton
3
+ category: composables
4
+ group: utilities
5
+ internal: true
6
+ ---
7
+
1
8
  # UserDropdownButton
2
9
 
3
10
  User account trigger displayed in the shell sidebar footer. Shows the user's avatar, display name, and role. On desktop it opens a floating settings menu dropdown anchored to the button; on mobile it opens a full sidebar panel that slides in from the left. The component automatically adapts its layout based on the sidebar's expanded/collapsed state.
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: DashboardCharts
3
+ category: composables
4
+ group: utilities
5
+ internal: true
6
+ ---
7
+
1
8
  # DashboardCharts
2
9
 
3
10
  Suite of dashboard chart components (line, bar, donut) built on Unovis. Each chart accepts a generic data array, a `ChartConfig` for series colors/labels, and supports hover tooltips, legends, and optional range filtering.
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: DashboardWidgetCard
3
+ category: composables
4
+ group: utilities
5
+ internal: true
6
+ ---
7
+
1
8
  # DashboardWidgetCard
2
9
 
3
10
  Modern dashboard widget card with header, optional KPI stats area, action buttons, content body, and footer. Used within the GridStack dashboard layout for displaying metrics, feeds, and charts.
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: DraggableDashboard
3
+ category: composables
4
+ group: utilities
5
+ internal: true
6
+ ---
7
+
1
8
  # DraggableDashboard
2
9
 
3
10
  Gridstack.js-powered dashboard container that renders registered widgets in a drag-and-drop grid layout. Automatically persists layout changes to localStorage and supports widget resizing. This is the main dashboard component used as the landing page in vc-shell applications, providing a customizable overview with KPI widgets, charts, quick actions, and data summaries.
@@ -1,7 +1,15 @@
1
+ ---
2
+ title: VcBadge
3
+ category: components
4
+ group: misc
5
+ ---
6
+
1
7
  # VcBadge
2
8
 
3
9
  A small indicator component for displaying counts, status dots, or short text labels. Supports two rendering modes: **positioned overlay** on a slotted element (e.g., notification count on a bell icon), or **standalone inline** badge (e.g., a tag/pill label in a list). Inline badges use a softer color palette with tinted backgrounds, while overlay badges use solid fills for maximum contrast.
4
10
 
11
+ ::storybook id="data-display-vcbadge--default"
12
+
5
13
  ## When to Use
6
14
 
7
15
  - Show unread notification counts on icons or buttons
@@ -18,6 +26,8 @@ A small indicator component for displaying counts, status dots, or short text la
18
26
  </VcBadge>
19
27
  ```
20
28
 
29
+ ::storybook id="data-display-vcbadge--variants" height="300"
30
+
21
31
  ## Key Props
22
32
 
23
33
  | Prop | Type | Default | Description |
@@ -34,6 +44,8 @@ A small indicator component for displaying counts, status dots, or short text la
34
44
  | `right` | `string` | -- | Custom right offset (requires `customPosition`) |
35
45
  | `ariaLabel` | `string` | -- | Custom accessible label for the badge |
36
46
 
47
+ ::storybook id="data-display-vcbadge--use-cases" height="350"
48
+
37
49
  ## Common Patterns
38
50
 
39
51
  ### Notification Count on an Icon
@@ -125,3 +137,15 @@ Fine-tune the badge position relative to its parent:
125
137
  - [VcIcon](../vc-icon/) -- commonly used as slotted content inside badges
126
138
  - [VcBanner](../vc-banner/) -- for longer contextual messages and alerts
127
139
  - [VcStatus](../vc-status/) -- labeled multi-variant status indicator
140
+
141
+ <!-- internal:start -->
142
+
143
+ ## Architecture notes
144
+
145
+ - VcBadge lives in `framework/ui/components/atoms/vc-badge/`.
146
+ - Overlay mode uses `position: absolute` on the badge element; the parent slot wrapper is set to `position: relative` via the `.vc-badge` CSS class.
147
+ - The `inline` prop switches the root element from `<span class="vc-badge">` (overlay) to `<span class="vc-badge--inline">` with no position context.
148
+ - Color palette tokens: overlay uses `--{variant}-500` fills; inline uses `--{variant}-50` background + `--{variant}-700` text, defined in `framework/assets/styles/theme/colors.scss`.
149
+ - Clickable mode integrates `role="button"` and keyboard handlers directly in the component — no separate button wrapper — to preserve the overlay stacking context.
150
+
151
+ <!-- internal:end -->
@@ -1,7 +1,15 @@
1
+ ---
2
+ title: VcBanner
3
+ category: components
4
+ group: feedback
5
+ ---
6
+
1
7
  # VcBanner
2
8
 
3
9
  A contextual alert component for displaying important messages, warnings, or status information. VcBanner supports four semantic variants (`info`, `warning`, `danger`, `success`), each with a distinct accent color and left border stripe. Long content is automatically collapsed behind a "Show more" toggle, keeping the blade layout clean while still giving users access to the full message.
4
10
 
11
+ ::storybook id="action-vcbanner--default"
12
+
5
13
  ## When to Use
6
14
 
7
15
  - Display validation errors or decline reasons on detail blades
@@ -19,6 +27,8 @@ A contextual alert component for displaying important messages, warnings, or sta
19
27
  </VcBanner>
20
28
  ```
21
29
 
30
+ ::storybook id="action-vcbanner--all-variants" height="500"
31
+
22
32
  ## Key Props
23
33
 
24
34
  | Prop | Type | Default | Description |
@@ -157,3 +167,13 @@ Override the default "Show more" button with a custom trigger:
157
167
  - [VcCard](../vc-card/) -- for general-purpose content containers
158
168
  - [VcIcon](../vc-icon/) -- used internally for the leading icon
159
169
  - [VcBadge](../vc-badge/) -- for inline status pill labels
170
+
171
+ <!-- internal:start -->
172
+
173
+ ## Architecture notes
174
+
175
+ - Legacy variants `"light-danger"`, `"info-dark"`, and `"primary"` are mapped in `vc-banner.vue` via a computed `resolvedVariant`. A `console.warn` is emitted in development mode only.
176
+ - The collapse animation is driven by `max-height` CSS transition with a JS-measured `scrollHeight`. The `--vc-banner-collapsed-height` CSS variable is injected inline as a style binding.
177
+ - Source: `framework/ui/components/atoms/vc-banner/vc-banner.vue`
178
+
179
+ <!-- internal:end -->
@@ -1,6 +1,14 @@
1
+ ---
2
+ title: VcButton
3
+ category: components
4
+ group: misc
5
+ ---
6
+
1
7
  # VcButton
2
8
 
3
- A versatile button component supporting 9 style variants, 5 size options, loading state, and icon integration. VcButton is the primary interactive element for triggering actions throughout the application -- from toolbar buttons and form submissions to inline table actions and navigation.
9
+ A versatile button component supporting 9 style variants, 5 size options, loading state, and icon integration. VcButton is the primary interactive element for triggering actions throughout the application from toolbar buttons and form submissions to inline table actions and navigation.
10
+
11
+ ::storybook id="action-vcbutton--primary"
4
12
 
5
13
  ## When to Use
6
14
 
@@ -33,6 +41,8 @@ import { VcButton } from "@vc-shell/framework";
33
41
 
34
42
  VcButton provides 9 visual variants organized into three emphasis levels.
35
43
 
44
+ ::storybook id="action-vcbutton--all-variants" height="500"
45
+
36
46
  ### Filled Variants (High Emphasis)
37
47
 
38
48
  Solid background colors for primary and prominent actions.
@@ -85,6 +95,8 @@ No border or background, used for inline or de-emphasized actions.
85
95
 
86
96
  Five size options cover all common use cases from toolbar icons to prominent CTAs.
87
97
 
98
+ ::storybook id="action-vcbutton--all-sizes"
99
+
88
100
  ```vue
89
101
  <VcButton size="sm">Small</VcButton>
90
102
  <VcButton size="default">Default</VcButton>
@@ -101,7 +113,8 @@ Five size options cover all common use cases from toolbar icons to prominent CTA
101
113
  | `icon` | 36x36px | 0 (square) | Toolbar icon buttons |
102
114
  | `icon-sm` | 24x24px | 0 (square) | Table cell actions, inline controls |
103
115
 
104
- > **Note:** Legacy aliases `xs` (maps to `sm`) and `base` (maps to `default`) are supported for backward compatibility.
116
+ !!! note "Legacy size aliases"
117
+ `xs` (maps to `sm`) and `base` (maps to `default`) are supported for backward compatibility but should not be used in new code.
105
118
 
106
119
  ## Icons
107
120
 
@@ -122,6 +135,8 @@ The `icon` prop accepts a string (icon identifier like `lucide-plus`) or a Vue c
122
135
 
123
136
  ## Loading State
124
137
 
138
+ ::storybook id="action-vcbutton--loading"
139
+
125
140
  When `loading` is `true`, the button shows a spinner in place of its icon and becomes non-interactive:
126
141
 
127
142
  ```vue
@@ -213,6 +228,9 @@ VcButton integrates with `VcButtonGroup` via provide/inject. The group can set a
213
228
  </template>
214
229
  ```
215
230
 
231
+ !!! warning "Don't disable buttons during async actions"
232
+ Use the `loading` prop, not `disabled`. A disabled button gives no progress feedback; a loading button shows a spinner and announces busy state via `aria-busy`.
233
+
216
234
  ## Common Mistakes
217
235
 
218
236
  ### Missing aria-label on icon-only buttons
@@ -300,6 +318,15 @@ All visual properties are customizable through CSS custom properties. Each varia
300
318
 
301
319
  ## Related Components
302
320
 
303
- - [VcIcon](../vc-icon/) -- used internally for button icons
304
- - [VcBadge](../vc-badge/) -- can wrap a button to show notification counts
305
- - [VcButtonGroup](./vc-button-group.vue) -- groups buttons with shared size context
321
+ - [VcIcon](../vc-icon/) used internally for button icons
322
+ - [VcBadge](../vc-badge/) can wrap a button to show notification counts
323
+ - `VcButtonGroup` groups buttons with shared size context (see component source for usage)
324
+
325
+ <!-- internal:start -->
326
+
327
+ ## Architecture notes
328
+
329
+ - VcButton calls `e.preventDefault()` on click to support `link` variant pattern. Form submit buttons must use `type="submit"` to bypass this.
330
+ - `VcButtonGroup` integration is via provide/inject (`vcButtonGroupSize` injection key in `framework/injection-keys.ts`).
331
+ - Size aliases `xs`/`base` are kept for vendor-portal backward compatibility — slated for removal in v3.
332
+ <!-- internal:end -->
@@ -1,6 +1,14 @@
1
+ ---
2
+ title: VcCard
3
+ category: components
4
+ group: layout
5
+ ---
6
+
1
7
  # VcCard
2
8
 
3
- A bordered container with an optional header, icon, action buttons, and collapsible body. VcCard groups related content into visually distinct sections on blades and detail views. It supports three color variants for semantic meaning and smooth animated collapse/expand.
9
+ A bordered container with an optional header, icon, action buttons, and collapsible body.
10
+
11
+ ::storybook id="data-display-vccard--default" VcCard groups related content into visually distinct sections on blades and detail views. It supports three color variants for semantic meaning and smooth animated collapse/expand.
4
12
 
5
13
  ## When to Use
6
14
 
@@ -45,6 +53,8 @@ The icon renders at `xl` size using the `VcIcon` component. It inherits the head
45
53
 
46
54
  ## Variants
47
55
 
56
+ ::storybook id="data-display-vccard--all-variants" height="400"
57
+
48
58
  Three variants control the header's background and text color to communicate semantic meaning.
49
59
 
50
60
  ```vue
@@ -74,6 +84,8 @@ Three variants control the header's background and text color to communicate sem
74
84
 
75
85
  ## Collapsible Sections
76
86
 
87
+ ::storybook id="data-display-vccard--collapsable" height="300"
88
+
77
89
  Enable collapse/expand behavior by setting `is-collapsable`. The card header becomes clickable and shows a chevron indicator.
78
90
 
79
91
  ```vue
@@ -173,7 +185,8 @@ Replace the entire header content using the `#header` slot. This overrides the d
173
185
  </VcCard>
174
186
  ```
175
187
 
176
- > **Note:** The `header` prop must be set (even to an empty string) for the header section to render. If neither `header` prop nor `#header` slot is provided, no header is displayed.
188
+ !!! note "Header required for header section"
189
+ The `header` prop must be set (even to an empty string) for the header section to render. If neither `header` prop nor `#header` slot is provided, no header is displayed.
177
190
 
178
191
  ## Fill Mode
179
192
 
@@ -1,6 +1,14 @@
1
+ ---
2
+ title: VcCol
3
+ category: components
4
+ group: layout
5
+ ---
6
+
1
7
  # VcCol
2
8
 
3
- A flexbox column layout primitive that stacks its children vertically. Designed to work with `VcRow` for proportional multi-column layouts. The `size` prop maps directly to `flex-grow`, so columns with higher values consume more horizontal space relative to their siblings.
9
+ A flexbox column layout primitive that stacks its children vertically.
10
+
11
+ ::storybook id="layout-vccol--default" Designed to work with `VcRow` for proportional multi-column layouts. The `size` prop maps directly to `flex-grow`, so columns with higher values consume more horizontal space relative to their siblings.
4
12
 
5
13
  ## When to Use
6
14
 
@@ -68,6 +76,8 @@ A flexbox column layout primitive that stacks its children vertically. Designed
68
76
  </VcCol>
69
77
  ```
70
78
 
79
+ ::storybook id="layout-vccol--content-layout" height="400"
80
+
71
81
  ## Recipe: Blade Detail Form with Sidebar
72
82
 
73
83
  A common blade layout places metadata in a narrow sidebar column and form fields in the wider main column: