@vc-shell/vc-app-skill 2.0.0-alpha.32 → 2.0.0-alpha.33-pr220.455e322

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 (195) hide show
  1. package/CHANGELOG.md +59 -47
  2. package/README.md +18 -12
  3. package/package.json +4 -4
  4. package/runtime/VERSION +1 -1
  5. package/runtime/agents/api-analyzer.md +31 -16
  6. package/runtime/agents/blade-enhancer.md +15 -9
  7. package/runtime/agents/details-blade-generator.md +47 -31
  8. package/runtime/agents/list-blade-generator.md +21 -37
  9. package/runtime/agents/locales-generator.md +3 -0
  10. package/runtime/agents/migration-agent.md +94 -0
  11. package/runtime/agents/module-analyzer.md +2 -0
  12. package/runtime/agents/module-assembler.md +15 -0
  13. package/runtime/agents/promote-agent.md +15 -4
  14. package/runtime/agents/type-checker.md +11 -0
  15. package/runtime/knowledge/docs/_BUILD_HASH.md +1 -1
  16. package/runtime/knowledge/docs/core/api/platform.docs.md +30 -30
  17. package/runtime/knowledge/docs/core/blade-navigation/blade-nav-composables.docs.md +41 -41
  18. package/runtime/knowledge/docs/core/composables/bladeContext/index.docs.md +12 -10
  19. package/runtime/knowledge/docs/core/composables/useApiClient/useApiClient.docs.md +11 -14
  20. package/runtime/knowledge/docs/core/composables/useAppBarMobileButtons/useAppBarMobileButtons.docs.md +35 -35
  21. package/runtime/knowledge/docs/core/composables/useAppBarWidget/useAppBarWidget.docs.md +35 -35
  22. package/runtime/knowledge/docs/core/composables/useAppInsights/useAppInsights.docs.md +15 -15
  23. package/runtime/knowledge/docs/core/composables/useAssets/useAssets.docs.md +21 -18
  24. package/runtime/knowledge/docs/core/composables/useAssetsManager/useAssetsManager.docs.md +31 -27
  25. package/runtime/knowledge/docs/core/composables/useAsync/useAsync.docs.md +90 -61
  26. package/runtime/knowledge/docs/core/composables/useBeforeUnload/useBeforeUnload.docs.md +19 -18
  27. package/runtime/knowledge/docs/core/composables/useBlade/useBlade.docs.md +89 -68
  28. package/runtime/knowledge/docs/core/composables/useBladeForm/useBladeForm.docs.md +75 -19
  29. package/runtime/knowledge/docs/core/composables/useBladeRegistry/useBladeRegistry.docs.md +15 -15
  30. package/runtime/knowledge/docs/core/composables/useBladeWidgets/index.docs.md +74 -78
  31. package/runtime/knowledge/docs/core/composables/useBreadcrumbs/useBreadcrumbs.docs.md +11 -11
  32. package/runtime/knowledge/docs/core/composables/useConnectionStatus/useConnectionStatus.docs.md +27 -15
  33. package/runtime/knowledge/docs/core/composables/useDashboard/useDashboard.docs.md +30 -30
  34. package/runtime/knowledge/docs/core/composables/useDynamicProperties/useDynamicProperties.docs.md +34 -36
  35. package/runtime/knowledge/docs/core/composables/useErrorHandler/useErrorHandler.docs.md +44 -23
  36. package/runtime/knowledge/docs/core/composables/useFunctions/useFunctions.docs.md +14 -11
  37. package/runtime/knowledge/docs/core/composables/useKeyboardNavigation/useKeyboardNavigation.docs.md +47 -38
  38. package/runtime/knowledge/docs/core/composables/useLanguages/useLanguages.docs.md +37 -28
  39. package/runtime/knowledge/docs/core/composables/useLoading/useLoading.docs.md +23 -17
  40. package/runtime/knowledge/docs/core/composables/useMenuExpanded/index.docs.md +10 -10
  41. package/runtime/knowledge/docs/core/composables/useMenuService/useMenuService.docs.md +42 -42
  42. package/runtime/knowledge/docs/core/composables/useModificationTracker/useModificationTracker.docs.md +22 -12
  43. package/runtime/knowledge/docs/core/composables/useNotifications/useNotifications.docs.md +33 -41
  44. package/runtime/knowledge/docs/core/composables/usePermissions/usePermissions.docs.md +16 -16
  45. package/runtime/knowledge/docs/core/composables/usePopup/usePopup.docs.md +32 -24
  46. package/runtime/knowledge/docs/core/composables/useResponsive/useResponsive.docs.md +32 -11
  47. package/runtime/knowledge/docs/core/composables/useSettings/useSettings.docs.md +24 -15
  48. package/runtime/knowledge/docs/core/composables/useSettingsMenu/useSettingsMenu.docs.md +7 -7
  49. package/runtime/knowledge/docs/core/composables/useSidebarState/useSidebarState.docs.md +32 -24
  50. package/runtime/knowledge/docs/core/composables/useSlowNetworkDetection/useSlowNetworkDetection.docs.md +21 -17
  51. package/runtime/knowledge/docs/core/composables/useTheme/useTheme.docs.md +24 -24
  52. package/runtime/knowledge/docs/core/composables/useToolbar/useToolbar.docs.md +28 -31
  53. package/runtime/knowledge/docs/core/composables/useUser/useUser.docs.md +43 -24
  54. package/runtime/knowledge/docs/core/composables/useUserManagement/useUserManagement.docs.md +68 -48
  55. package/runtime/knowledge/docs/core/composables/useWebVitals/useWebVitals.docs.md +19 -19
  56. package/runtime/knowledge/docs/core/composables/useWidgets/useWidgets.docs.md +42 -47
  57. package/runtime/knowledge/docs/core/directives/autofocus/autofocus.docs.md +10 -4
  58. package/runtime/knowledge/docs/core/directives/loading/loading.docs.md +35 -20
  59. package/runtime/knowledge/docs/core/notifications/notifications.docs.md +36 -35
  60. package/runtime/knowledge/docs/core/plugins/ai-agent/ai-agent.docs.md +38 -38
  61. package/runtime/knowledge/docs/core/plugins/extension-points/extension-points.docs.md +107 -91
  62. package/runtime/knowledge/docs/core/plugins/global-error-handler/global-error-handler.docs.md +10 -10
  63. package/runtime/knowledge/docs/core/plugins/i18n/i18n.docs.md +21 -23
  64. package/runtime/knowledge/docs/core/plugins/modularity/modularity.docs.md +98 -90
  65. package/runtime/knowledge/docs/core/plugins/permissions/permissions.docs.md +10 -16
  66. package/runtime/knowledge/docs/core/plugins/signalR/signalR.docs.md +9 -9
  67. package/runtime/knowledge/docs/core/plugins/validation/validation.docs.md +65 -22
  68. package/runtime/knowledge/docs/core/services/services.docs.md +19 -22
  69. package/runtime/knowledge/docs/core/types/types.docs.md +40 -40
  70. package/runtime/knowledge/docs/core/utilities/date/date-utilities.docs.md +27 -27
  71. package/runtime/knowledge/docs/core/utilities/shared-utilities.docs.md +23 -23
  72. package/runtime/knowledge/docs/core/utilities/thumbnail/thumbnail.docs.md +22 -25
  73. package/runtime/knowledge/docs/core/utilities/utilities.docs.md +64 -64
  74. package/runtime/knowledge/docs/injection-keys.docs.md +52 -51
  75. package/runtime/knowledge/docs/modules/assets-manager/assets-manager.docs.md +9 -9
  76. package/runtime/knowledge/docs/shell/_internal/popup/common/popup-common.docs.md +23 -43
  77. package/runtime/knowledge/docs/shell/auth/ChangePasswordPage/change-password-page.docs.md +102 -0
  78. package/runtime/knowledge/docs/shell/auth/ForgotPasswordPage/forgot-password-page.docs.md +5 -5
  79. package/runtime/knowledge/docs/shell/auth/InvitePage/invite-page.docs.md +8 -7
  80. package/runtime/knowledge/docs/shell/auth/LoginPage/login-page.docs.md +7 -7
  81. package/runtime/knowledge/docs/shell/auth/ResetPasswordPage/reset-password-page.docs.md +8 -7
  82. package/runtime/knowledge/docs/shell/auth/sign-in/sign-in.docs.md +29 -13
  83. package/runtime/knowledge/docs/shell/components/change-password/change-password.docs.md +13 -16
  84. package/runtime/knowledge/docs/shell/components/change-password-button/change-password-button.docs.md +1 -7
  85. package/runtime/knowledge/docs/shell/components/error-interceptor/error-interceptor.docs.md +5 -5
  86. package/runtime/knowledge/docs/shell/components/language-selector/language-selector.docs.md +1 -1
  87. package/runtime/knowledge/docs/shell/components/logout-button/logout-button.docs.md +1 -1
  88. package/runtime/knowledge/docs/shell/components/notification-template/notification-template.docs.md +17 -9
  89. package/runtime/knowledge/docs/shell/components/settings-menu/settings-menu.docs.md +12 -18
  90. package/runtime/knowledge/docs/shell/components/settings-menu-item/settings-menu-item.docs.md +34 -65
  91. package/runtime/knowledge/docs/shell/components/sidebar/sidebar.docs.md +16 -26
  92. package/runtime/knowledge/docs/shell/components/theme-selector/theme-selector.docs.md +2 -2
  93. package/runtime/knowledge/docs/shell/components/user-dropdown-button/user-dropdown-button.docs.md +7 -9
  94. package/runtime/knowledge/docs/shell/dashboard/dashboard-charts/dashboard-charts.docs.md +30 -40
  95. package/runtime/knowledge/docs/shell/dashboard/dashboard-widget-card/dashboard-widget-card.docs.md +26 -19
  96. package/runtime/knowledge/docs/shell/dashboard/draggable-dashboard/draggable-dashboard.docs.md +15 -12
  97. package/runtime/knowledge/docs/ui/components/atoms/vc-badge/vc-badge.docs.md +15 -26
  98. package/runtime/knowledge/docs/ui/components/atoms/vc-banner/vc-banner.docs.md +21 -19
  99. package/runtime/knowledge/docs/ui/components/atoms/vc-button/vc-button.docs.md +83 -67
  100. package/runtime/knowledge/docs/ui/components/atoms/vc-card/vc-card.docs.md +104 -59
  101. package/runtime/knowledge/docs/ui/components/atoms/vc-col/vc-col.docs.md +28 -11
  102. package/runtime/knowledge/docs/ui/components/atoms/vc-container/vc-container.docs.md +20 -17
  103. package/runtime/knowledge/docs/ui/components/atoms/vc-hint/vc-hint.docs.md +26 -17
  104. package/runtime/knowledge/docs/ui/components/atoms/vc-icon/vc-icon.docs.md +30 -32
  105. package/runtime/knowledge/docs/ui/components/atoms/vc-image/vc-image.docs.md +25 -48
  106. package/runtime/knowledge/docs/ui/components/atoms/vc-label/vc-label.docs.md +29 -24
  107. package/runtime/knowledge/docs/ui/components/atoms/vc-link/vc-link.docs.md +23 -15
  108. package/runtime/knowledge/docs/ui/components/atoms/vc-loading/vc-loading.docs.md +22 -13
  109. package/runtime/knowledge/docs/ui/components/atoms/vc-progress/vc-progress.docs.md +33 -18
  110. package/runtime/knowledge/docs/ui/components/atoms/vc-row/vc-row.docs.md +56 -15
  111. package/runtime/knowledge/docs/ui/components/atoms/vc-scrollable-container/vc-scrollable-container.docs.md +28 -15
  112. package/runtime/knowledge/docs/ui/components/atoms/vc-skeleton/vc-skeleton.docs.md +40 -20
  113. package/runtime/knowledge/docs/ui/components/atoms/vc-status/vc-status.docs.md +25 -14
  114. package/runtime/knowledge/docs/ui/components/atoms/vc-status-icon/vc-status-icon.docs.md +40 -14
  115. package/runtime/knowledge/docs/ui/components/atoms/vc-tooltip/vc-tooltip.docs.md +54 -42
  116. package/runtime/knowledge/docs/ui/components/atoms/vc-video/vc-video.docs.md +17 -17
  117. package/runtime/knowledge/docs/ui/components/atoms/vc-widget/vc-widget.docs.md +21 -21
  118. package/runtime/knowledge/docs/ui/components/molecules/multilanguage-selector/multilanguage-selector.docs.md +23 -10
  119. package/runtime/knowledge/docs/ui/components/molecules/vc-accordion/vc-accordion.docs.md +59 -44
  120. package/runtime/knowledge/docs/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.docs.md +23 -20
  121. package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox/vc-checkbox.docs.md +96 -64
  122. package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox-group/vc-checkbox-group.docs.md +26 -35
  123. package/runtime/knowledge/docs/ui/components/molecules/vc-color-input/vc-color-input.docs.md +69 -22
  124. package/runtime/knowledge/docs/ui/components/molecules/vc-date-picker/vc-date-picker.docs.md +58 -72
  125. package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown/vc-dropdown.docs.md +91 -85
  126. package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown-panel/vc-dropdown-panel.docs.md +38 -42
  127. package/runtime/knowledge/docs/ui/components/molecules/vc-editor/vc-editor.docs.md +60 -72
  128. package/runtime/knowledge/docs/ui/components/molecules/vc-field/vc-field.docs.md +65 -26
  129. package/runtime/knowledge/docs/ui/components/molecules/vc-file-upload/vc-file-upload.docs.md +46 -49
  130. package/runtime/knowledge/docs/ui/components/molecules/vc-form/vc-form.docs.md +35 -64
  131. package/runtime/knowledge/docs/ui/components/molecules/vc-image-tile/vc-image-tile.docs.md +38 -41
  132. package/runtime/knowledge/docs/ui/components/molecules/vc-input/vc-input.docs.md +115 -130
  133. package/runtime/knowledge/docs/ui/components/molecules/vc-input-currency/vc-input-currency.docs.md +53 -87
  134. package/runtime/knowledge/docs/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.docs.md +56 -63
  135. package/runtime/knowledge/docs/ui/components/molecules/vc-input-group/vc-input-group.docs.md +29 -24
  136. package/runtime/knowledge/docs/ui/components/molecules/vc-menu/vc-menu.docs.md +32 -28
  137. package/runtime/knowledge/docs/ui/components/molecules/vc-multivalue/vc-multivalue.docs.md +63 -64
  138. package/runtime/knowledge/docs/ui/components/molecules/vc-pagination/vc-pagination.docs.md +28 -26
  139. package/runtime/knowledge/docs/ui/components/molecules/vc-radio-button/vc-radio-button.docs.md +59 -19
  140. package/runtime/knowledge/docs/ui/components/molecules/vc-radio-group/vc-radio-group.docs.md +25 -34
  141. package/runtime/knowledge/docs/ui/components/molecules/vc-rating/vc-rating.docs.md +42 -32
  142. package/runtime/knowledge/docs/ui/components/molecules/vc-select/vc-select.docs.md +78 -82
  143. package/runtime/knowledge/docs/ui/components/molecules/vc-slider/vc-slider.docs.md +25 -15
  144. package/runtime/knowledge/docs/ui/components/molecules/vc-switch/vc-switch.docs.md +59 -63
  145. package/runtime/knowledge/docs/ui/components/molecules/vc-textarea/vc-textarea.docs.md +57 -69
  146. package/runtime/knowledge/docs/ui/components/molecules/vc-toast/vc-toast.docs.md +58 -57
  147. package/runtime/knowledge/docs/ui/components/organisms/vc-app/vc-app.docs.md +49 -26
  148. package/runtime/knowledge/docs/ui/components/organisms/vc-auth-layout/vc-auth-layout.docs.md +82 -28
  149. package/runtime/knowledge/docs/ui/components/organisms/vc-blade/vc-blade.docs.md +120 -75
  150. package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/composables/table-composables.docs.md +30 -44
  151. package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/vc-data-table.docs.md +536 -365
  152. package/runtime/knowledge/docs/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.docs.md +35 -52
  153. package/runtime/knowledge/docs/ui/components/organisms/vc-gallery/vc-gallery.docs.md +33 -62
  154. package/runtime/knowledge/docs/ui/components/organisms/vc-image-upload/vc-image-upload.docs.md +17 -23
  155. package/runtime/knowledge/docs/ui/components/organisms/vc-popup/vc-popup.docs.md +109 -68
  156. package/runtime/knowledge/docs/ui/components/organisms/vc-sidebar/vc-sidebar.docs.md +82 -44
  157. package/runtime/knowledge/docs/ui/composables/ui-composables.docs.md +8 -8
  158. package/runtime/knowledge/docs/ui/composables/useDataTablePagination.docs.md +164 -0
  159. package/runtime/knowledge/docs/ui/composables/useDataTableSort.docs.md +34 -26
  160. package/runtime/knowledge/docs/ui/composables/useTableSelection.docs.md +48 -40
  161. package/runtime/knowledge/docs/ui/composables/useTableSort.docs.md +30 -17
  162. package/runtime/knowledge/docs/ui/types/ui-types.docs.md +40 -29
  163. package/runtime/knowledge/examples/offers-module.md +15 -13
  164. package/runtime/knowledge/examples/team-module.md +82 -119
  165. package/runtime/knowledge/examples/videos-module.md +44 -17
  166. package/runtime/knowledge/index.md +22 -0
  167. package/runtime/knowledge/migration-prompts/blade-form-migration.md +255 -0
  168. package/runtime/knowledge/migration-prompts/blade-props-migration.md +194 -0
  169. package/runtime/knowledge/migration-prompts/datatable-migration.md +801 -0
  170. package/runtime/knowledge/migration-prompts/icon-migration.md +97 -0
  171. package/runtime/knowledge/migration-prompts/manual-migration-audit.md +117 -0
  172. package/runtime/knowledge/migration-prompts/notifications-migration.md +223 -0
  173. package/runtime/knowledge/migration-prompts/nswag-migration.md +244 -0
  174. package/runtime/knowledge/migration-prompts/use-assets-migration.md +164 -0
  175. package/runtime/knowledge/migration-prompts/use-data-table-pagination-migration.md +176 -0
  176. package/runtime/knowledge/migration-prompts/widgets-migration.md +178 -0
  177. package/runtime/knowledge/patterns/assets-management.md +20 -20
  178. package/runtime/knowledge/patterns/blade-navigation.md +7 -14
  179. package/runtime/knowledge/patterns/blade-widget.md +19 -17
  180. package/runtime/knowledge/patterns/child-blade-flow.md +19 -7
  181. package/runtime/knowledge/patterns/composable-details.md +20 -50
  182. package/runtime/knowledge/patterns/composable-list.md +43 -31
  183. package/runtime/knowledge/patterns/dashboard-widget.md +14 -16
  184. package/runtime/knowledge/patterns/datatable-pattern.md +521 -0
  185. package/runtime/knowledge/patterns/details-blade-pattern.md +78 -116
  186. package/runtime/knowledge/patterns/extension-points-usage.md +53 -44
  187. package/runtime/knowledge/patterns/form-validation.md +28 -64
  188. package/runtime/knowledge/patterns/list-blade-pattern.md +33 -21
  189. package/runtime/knowledge/patterns/module-structure.md +7 -1
  190. package/runtime/knowledge/patterns/multilanguage-fields.md +8 -14
  191. package/runtime/knowledge/patterns/notification-template.md +21 -14
  192. package/runtime/knowledge/patterns/signalr-notifications.md +30 -32
  193. package/runtime/knowledge/patterns/toolbar-pattern.md +18 -20
  194. package/runtime/vc-app.md +354 -49
  195. package/runtime/knowledge/docs/core/constants/constants.docs.md +0 -185
@@ -15,7 +15,12 @@ A slide-over panel for contextual workflows, settings, and detail views. Support
15
15
  <template>
16
16
  <VcButton @click="open = true">Open Sidebar</VcButton>
17
17
 
18
- <VcSidebar v-model="open" title="Settings" position="right" size="md">
18
+ <VcSidebar
19
+ v-model="open"
20
+ title="Settings"
21
+ position="right"
22
+ size="md"
23
+ >
19
24
  <div class="tw-p-4">Sidebar content</div>
20
25
 
21
26
  <template #footer>
@@ -34,41 +39,41 @@ const open = ref(false);
34
39
 
35
40
  ## Props
36
41
 
37
- | Prop | Type | Default | Description |
38
- |------|------|---------|-------------|
39
- | `modelValue` | `boolean` | *required* | Open/close state (v-model). |
40
- | `position` | `"left" \| "right" \| "bottom"` | `"right"` | Slide-in direction. |
41
- | `size` | `"sm" \| "md" \| "lg" \| "full"` | `"sm"` | Panel size preset (300/380/520px or full viewport). |
42
- | `variant` | `"default" \| "elevated" \| "minimal"` | `"default"` | Visual style. |
43
- | `width` | `number \| string` | -- | Custom width override (left/right positions). |
44
- | `height` | `number \| string` | -- | Custom height override (bottom position). |
45
- | `title` | `string` | `""` | Header title text. |
46
- | `subtitle` | `string` | `""` | Header subtitle text. |
47
- | `showOverlay` | `boolean` | `true` | Show backdrop overlay. |
48
- | `closeOnOverlay` | `boolean` | `true` | Close when clicking overlay. |
49
- | `closeOnEscape` | `boolean` | `true` | Close on Escape key. |
50
- | `closeButton` | `boolean` | `true` | Show close button in header. |
51
- | `trapFocus` | `boolean` | `true` | Trap keyboard focus inside panel. |
52
- | `lockScroll` | `boolean` | `true` | Prevent body scroll while open. |
53
- | `inset` | `boolean` | `true` | Add rounded inset gap from viewport edges. |
54
- | `draggable` | `boolean` | `false` | Enable swipe-to-dismiss (bottom only). |
55
- | `dragHandle` | `boolean` | `false` | Show iOS-style drag handle bar. |
42
+ | Prop | Type | Default | Description |
43
+ | ---------------- | -------------------------------------- | ----------- | --------------------------------------------------- |
44
+ | `modelValue` | `boolean` | _required_ | Open/close state (v-model). |
45
+ | `position` | `"left" \| "right" \| "bottom"` | `"right"` | Slide-in direction. |
46
+ | `size` | `"sm" \| "md" \| "lg" \| "full"` | `"sm"` | Panel size preset (300/380/520px or full viewport). |
47
+ | `variant` | `"default" \| "elevated" \| "minimal"` | `"default"` | Visual style. |
48
+ | `width` | `number \| string` | -- | Custom width override (left/right positions). |
49
+ | `height` | `number \| string` | -- | Custom height override (bottom position). |
50
+ | `title` | `string` | `""` | Header title text. |
51
+ | `subtitle` | `string` | `""` | Header subtitle text. |
52
+ | `showOverlay` | `boolean` | `true` | Show backdrop overlay. |
53
+ | `closeOnOverlay` | `boolean` | `true` | Close when clicking overlay. |
54
+ | `closeOnEscape` | `boolean` | `true` | Close on Escape key. |
55
+ | `closeButton` | `boolean` | `true` | Show close button in header. |
56
+ | `trapFocus` | `boolean` | `true` | Trap keyboard focus inside panel. |
57
+ | `lockScroll` | `boolean` | `true` | Prevent body scroll while open. |
58
+ | `inset` | `boolean` | `true` | Add rounded inset gap from viewport edges. |
59
+ | `draggable` | `boolean` | `false` | Enable swipe-to-dismiss (bottom only). |
60
+ | `dragHandle` | `boolean` | `false` | Show iOS-style drag handle bar. |
56
61
 
57
62
  ## Events
58
63
 
59
- | Event | Payload | Description |
60
- |-------|---------|-------------|
61
- | `update:modelValue` | `boolean` | v-model update. |
62
- | `close` | `SidebarCloseReason` | Reason: `"overlay"`, `"escape"`, or `"action"`. |
64
+ | Event | Payload | Description |
65
+ | ------------------- | -------------------- | ----------------------------------------------- |
66
+ | `update:modelValue` | `boolean` | v-model update. |
67
+ | `close` | `SidebarCloseReason` | Reason: `"overlay"`, `"escape"`, or `"action"`. |
63
68
 
64
69
  ## Slots
65
70
 
66
- | Slot | Props | Description |
67
- |------|-------|-------------|
68
- | `default` | -- | Main content area. |
69
- | `header` | `{ close }` | Custom header replacing title + close button. |
70
- | `actions` | `{ close }` | Extra buttons in the header actions area. |
71
- | `footer` | -- | Sticky footer area. |
71
+ | Slot | Props | Description |
72
+ | --------- | ----------- | --------------------------------------------- |
73
+ | `default` | -- | Main content area. |
74
+ | `header` | `{ close }` | Custom header replacing title + close button. |
75
+ | `actions` | `{ close }` | Extra buttons in the header actions area. |
76
+ | `footer` | -- | Sticky footer area. |
72
77
 
73
78
  ## Features
74
79
 
@@ -86,11 +91,11 @@ When `position="bottom"` and `draggable` is true, users can swipe the panel down
86
91
 
87
92
  ### Size Presets
88
93
 
89
- | Size | Width/Height |
90
- |------|-------------|
91
- | `sm` | 300px |
92
- | `md` | 380px |
93
- | `lg` | 520px |
94
+ | Size | Width/Height |
95
+ | ------ | ------------- |
96
+ | `sm` | 300px |
97
+ | `md` | 380px |
98
+ | `lg` | 520px |
94
99
  | `full` | Full viewport |
95
100
 
96
101
  Override with the `width` or `height` prop for custom dimensions.
@@ -138,20 +143,53 @@ function resetFilters() {
138
143
  </script>
139
144
 
140
145
  <template>
141
- <VcButton icon="lucide-filter" @click="showFilters = true">Filters</VcButton>
142
-
143
- <VcSidebar v-model="showFilters" title="Filters" position="right" size="sm">
146
+ <VcButton
147
+ icon="lucide-filter"
148
+ @click="showFilters = true"
149
+ >Filters</VcButton
150
+ >
151
+
152
+ <VcSidebar
153
+ v-model="showFilters"
154
+ title="Filters"
155
+ position="right"
156
+ size="sm"
157
+ >
144
158
  <div class="tw-p-4 tw-space-y-4">
145
- <VcSelect label="Status" v-model="filters.status" :options="statusOptions" />
146
- <VcInput label="Date From" v-model="filters.dateFrom" type="date" />
147
- <VcInput label="Date To" v-model="filters.dateTo" type="date" />
148
- <VcSelect label="Category" v-model="filters.category" :options="categoryOptions" />
159
+ <VcSelect
160
+ label="Status"
161
+ v-model="filters.status"
162
+ :options="statusOptions"
163
+ />
164
+ <VcInput
165
+ label="Date From"
166
+ v-model="filters.dateFrom"
167
+ type="date"
168
+ />
169
+ <VcInput
170
+ label="Date To"
171
+ v-model="filters.dateTo"
172
+ type="date"
173
+ />
174
+ <VcSelect
175
+ label="Category"
176
+ v-model="filters.category"
177
+ :options="categoryOptions"
178
+ />
149
179
  </div>
150
180
 
151
181
  <template #footer>
152
182
  <div class="tw-flex tw-gap-2 tw-p-4">
153
- <VcButton variant="primary" @click="applyFilters">Apply</VcButton>
154
- <VcButton variant="outline" @click="resetFilters">Reset</VcButton>
183
+ <VcButton
184
+ variant="primary"
185
+ @click="applyFilters"
186
+ >Apply</VcButton
187
+ >
188
+ <VcButton
189
+ variant="outline"
190
+ @click="resetFilters"
191
+ >Reset</VcButton
192
+ >
155
193
  </div>
156
194
  </template>
157
195
  </VcSidebar>
@@ -8,14 +8,14 @@ All composables are exported from `framework/ui/composables/index.ts` and availa
8
8
 
9
9
  ## Exports
10
10
 
11
- | Composable | Purpose |
12
- |---|---|
13
- | `useAdaptiveItems` | Measures and distributes items into visible/hidden groups based on container width |
14
- | `useScrollArrows` | Tracks scroll overflow state and provides animated scroll-by-arrow controls |
15
- | `useFloatingPosition` | Wrapper around `@floating-ui/vue` with sensible defaults for dropdowns/tooltips |
16
- | `useTeleportTarget` | Resolves a consistent teleport target (explicit target, app root, or body) |
17
- | `useFormField` | Shared form field logic: unique IDs, ARIA attributes, InputGroup integration |
18
- | `useCollapsible` | Expand/collapse panel with measured content height and CSS transitions |
11
+ | Composable | Purpose |
12
+ | --------------------- | ---------------------------------------------------------------------------------- |
13
+ | `useAdaptiveItems` | Measures and distributes items into visible/hidden groups based on container width |
14
+ | `useScrollArrows` | Tracks scroll overflow state and provides animated scroll-by-arrow controls |
15
+ | `useFloatingPosition` | Wrapper around `@floating-ui/vue` with sensible defaults for dropdowns/tooltips |
16
+ | `useTeleportTarget` | Resolves a consistent teleport target (explicit target, app root, or body) |
17
+ | `useFormField` | Shared form field logic: unique IDs, ARIA attributes, InputGroup integration |
18
+ | `useCollapsible` | Expand/collapse panel with measured content height and CSS transitions |
19
19
 
20
20
  ## API Details
21
21
 
@@ -0,0 +1,164 @@
1
+ # useDataTablePagination
2
+
3
+ Manages page-level pagination state for `VcDataTable`. Derives `pages`, `skip`, `totalCount` from a reactive input, and fires an optional `onPageChange` callback when the page changes. Returns a `reactive()` object — all properties are plain values (no `.value` needed), and the object is directly passable as the VcDataTable `:pagination` prop.
4
+
5
+ Follows the same event-callback pattern as VueUse's `useOffsetPagination`.
6
+
7
+ ## When to Use
8
+
9
+ - You are using `VcDataTable` with `:pagination` prop and `@pagination-click` event
10
+ - You want to eliminate the `Math.ceil` / `Math.floor` pagination boilerplate from data composables
11
+ - You want a single object to bind as `:pagination`, `:total-count`, and `@pagination-click`
12
+
13
+ ## When NOT to Use
14
+
15
+ - You are using infinite scroll (`infiniteScroll` prop) — no pagination needed
16
+ - The table is client-side only with all items loaded — VcDataTable handles display internally
17
+
18
+ ## Basic Usage
19
+
20
+ ```typescript
21
+ import { useDataTablePagination } from "@vc-shell/framework";
22
+
23
+ const pagination = useDataTablePagination({
24
+ pageSize: 20,
25
+ totalCount: computed(() => searchResult.value?.totalCount ?? 0),
26
+ onPageChange: ({ skip }) => loadItems({ ...searchQuery.value, skip }),
27
+ });
28
+ ```
29
+
30
+ ```vue
31
+ <VcDataTable :items="items" :total-count="pagination.totalCount" :pagination="pagination" @pagination-click="pagination.goToPage" />
32
+ ```
33
+
34
+ ## API
35
+
36
+ ### Parameters (Options)
37
+
38
+ | Option | Type | Default | Description |
39
+ | -------------- | ------------------------------------------------- | ----------- | ------------------------------------------------ |
40
+ | `totalCount` | `MaybeRefOrGetter<number>` | _required_ | Total item count from API response |
41
+ | `pageSize` | `MaybeRefOrGetter<number>` | `20` | Items per page |
42
+ | `onPageChange` | `(state: { page: number; skip: number }) => void` | `undefined` | Event callback fired when `goToPage()` is called |
43
+
44
+ ### Returns (`reactive()` object)
45
+
46
+ | Property | Type | Description |
47
+ | ------------- | ------------------------ | --------------------------------------------- |
48
+ | `currentPage` | `number` | Current 1-based page number (writable) |
49
+ | `pages` | `number` (readonly) | Total number of pages |
50
+ | `skip` | `number` (readonly) | Current skip offset for API calls |
51
+ | `pageSize` | `number` (readonly) | Resolved page size |
52
+ | `totalCount` | `number` (readonly) | Resolved total item count |
53
+ | `goToPage` | `(page: number) => void` | Navigate to page; fires `onPageChange` |
54
+ | `reset` | `() => void` | Reset to page 1; does NOT fire `onPageChange` |
55
+
56
+ All properties are auto-unwrapped by `reactive()` — no `.value` access needed in script or template.
57
+
58
+ ## Recipe: Server-Side Paginated Table
59
+
60
+ ```vue
61
+ <script setup lang="ts">
62
+ import { ref, computed } from "vue";
63
+ import { useDataTablePagination, useDataTableSort } from "@vc-shell/framework";
64
+
65
+ // Data layer
66
+ const searchResult = ref<{ results: Item[]; totalCount: number }>();
67
+ const searchQuery = ref({ take: 20, skip: 0 });
68
+
69
+ async function loadItems(query?: Partial<typeof searchQuery.value>) {
70
+ searchQuery.value = { ...searchQuery.value, ...query };
71
+ searchResult.value = await api.search(searchQuery.value);
72
+ }
73
+
74
+ // Pagination state
75
+ const pagination = useDataTablePagination({
76
+ pageSize: 20,
77
+ totalCount: computed(() => searchResult.value?.totalCount ?? 0),
78
+ onPageChange: ({ skip }) => loadItems({ skip }),
79
+ });
80
+
81
+ // Sort state
82
+ const { sortField, sortOrder, sortExpression } = useDataTableSort({
83
+ initialField: "createdDate",
84
+ initialDirection: "DESC",
85
+ });
86
+ </script>
87
+
88
+ <template>
89
+ <VcDataTable
90
+ :items="searchResult?.results ?? []"
91
+ :total-count="pagination.totalCount"
92
+ :pagination="pagination"
93
+ @pagination-click="pagination.goToPage"
94
+ v-model:sort-field="sortField"
95
+ v-model:sort-order="sortOrder"
96
+ >
97
+ <VcColumn
98
+ id="name"
99
+ header="Name"
100
+ sortable
101
+ />
102
+ <VcColumn
103
+ id="createdDate"
104
+ header="Created"
105
+ sortable
106
+ />
107
+ </VcDataTable>
108
+ </template>
109
+ ```
110
+
111
+ ## Recipe: Inside a Data Composable
112
+
113
+ ```typescript
114
+ // useOffers.ts
115
+ export function useOffers() {
116
+ const searchResult = ref<SearchOffersResult>();
117
+ const searchQuery = ref<SearchOffersQuery>({ take: 20 });
118
+
119
+ const { action: loadOffers } = useAsync(async (query) => {
120
+ searchQuery.value = { ...searchQuery.value, ...query };
121
+ searchResult.value = await client.searchOffers(searchQuery.value);
122
+ });
123
+
124
+ const pagination = useDataTablePagination({
125
+ pageSize: 20,
126
+ totalCount: computed(() => searchResult.value?.totalCount ?? 0),
127
+ onPageChange: ({ skip }) => loadOffers({ ...searchQuery.value, skip }),
128
+ });
129
+
130
+ return {
131
+ offers: computed(() => searchResult.value?.results ?? []),
132
+ pagination,
133
+ loadOffers,
134
+ };
135
+ }
136
+ ```
137
+
138
+ Blade then simply binds:
139
+
140
+ ```vue
141
+ <VcDataTable :total-count="pagination.totalCount" :pagination="pagination" @pagination-click="pagination.goToPage" />
142
+ ```
143
+
144
+ ## Details
145
+
146
+ - **`reactive()` return**: The composable wraps its return in `reactive()`, so all `Ref`/`ComputedRef` properties are auto-unwrapped. Access with `pagination.pages` (not `pagination.pages.value`). This allows the object to be passed directly as `:pagination` prop to VcDataTable without intermediate conversion.
147
+ - **Event callback, not load**: `onPageChange` is an event notification (like VueUse's `useOffsetPagination`). The composable does not know about data fetching — it just notifies.
148
+ - **No auto-clamp**: When `totalCount` decreases (e.g. after deletion), `currentPage` is NOT automatically clamped. Call `reset()` or `goToPage(1)` explicitly after mutations.
149
+ - **reset() is silent**: `reset()` sets `currentPage = 1` but does NOT fire `onPageChange`. This prevents accidental double-fetches when the consumer resets pagination during a reload.
150
+ - **Pure without callback**: Omit `onPageChange` and the composable works as pure state — useful for unit tests or when the consumer prefers to watch properties reactively.
151
+ - **Why `reactive()` and not `ref()`**: Pagination is a cohesive group of properties always used together (`pagination.xxx`). `reactive()` is the Vue-idiomatic choice for such objects. `useDataTableSort` returns `ref()`s because its properties are destructured and used with `v-model` individually.
152
+
153
+ ## Tips
154
+
155
+ - Call `pagination.reset()` alongside search/filter changes to return to page 1.
156
+ - Pair with `useDataTableSort` for the complete table state management story.
157
+ - The `skip` property can be used directly in API queries when not using `onPageChange`.
158
+ - Do NOT destructure properties: `const { pages } = pagination` loses reactivity. Always access via `pagination.pages`.
159
+
160
+ ## Related
161
+
162
+ - [`useDataTableSort`](./useDataTableSort.docs.md) — sort state composable for VcDataTable
163
+ - `VcDataTable` `:pagination` prop — accepts `DataTablePagination` object
164
+ - `DataTablePagination` type — defined in `vc-data-table/types.ts`
@@ -21,20 +21,16 @@ The sort expression is formatted as `"field:DIRECTION"` (e.g., `"createdDate:DES
21
21
  ## Basic Usage
22
22
 
23
23
  ```typescript
24
- import { useDataTableSort } from '@vc-shell/framework';
24
+ import { useDataTableSort } from "@vc-shell/framework";
25
25
 
26
26
  const { sortField, sortOrder, sortExpression, resetSort } = useDataTableSort({
27
- initialField: 'createdDate',
28
- initialDirection: 'DESC',
27
+ initialField: "createdDate",
28
+ initialDirection: "DESC",
29
29
  });
30
30
  ```
31
31
 
32
32
  ```vue
33
- <VcDataTable
34
- v-model:sort-field="sortField"
35
- v-model:sort-order="sortOrder"
36
- :items="items"
37
- >
33
+ <VcDataTable v-model:sort-field="sortField" v-model:sort-order="sortOrder" :items="items">
38
34
  <VcColumn id="name" header="Name" sortable />
39
35
  <VcColumn id="createdDate" header="Created" sortable />
40
36
  </VcDataTable>
@@ -44,27 +40,27 @@ const { sortField, sortOrder, sortExpression, resetSort } = useDataTableSort({
44
40
 
45
41
  ### Parameters (Options)
46
42
 
47
- | Option | Type | Default | Description |
48
- |---|---|---|---|
49
- | `initialField` | `string` | `undefined` | Column field to sort by initially |
50
- | `initialDirection` | `"ASC" \| "DESC"` | `undefined` | Initial sort direction |
43
+ | Option | Type | Default | Description |
44
+ | ------------------ | ----------------- | ----------- | --------------------------------- |
45
+ | `initialField` | `string` | `undefined` | Column field to sort by initially |
46
+ | `initialDirection` | `"ASC" \| "DESC"` | `undefined` | Initial sort direction |
51
47
 
52
48
  ### Returns
53
49
 
54
- | Property | Type | Description |
55
- |---|---|---|
56
- | `sortField` | `Ref<string \| undefined>` | Current sort field; bind with `v-model:sort-field` |
57
- | `sortOrder` | `Ref<number>` | Numeric sort order: `1` = ASC, `-1` = DESC, `0` = none; bind with `v-model:sort-order` |
58
- | `sortExpression` | `ComputedRef<string \| undefined>` | Formatted string (e.g., `"name:ASC"`) or `undefined` when no sort is active |
59
- | `resetSort` | `() => void` | Reset to the initial field/direction passed to the composable |
50
+ | Property | Type | Description |
51
+ | ---------------- | ---------------------------------- | -------------------------------------------------------------------------------------- |
52
+ | `sortField` | `Ref<string \| undefined>` | Current sort field; bind with `v-model:sort-field` |
53
+ | `sortOrder` | `Ref<number>` | Numeric sort order: `1` = ASC, `-1` = DESC, `0` = none; bind with `v-model:sort-order` |
54
+ | `sortExpression` | `ComputedRef<string \| undefined>` | Formatted string (e.g., `"name:ASC"`) or `undefined` when no sort is active |
55
+ | `resetSort` | `() => void` | Reset to the initial field/direction passed to the composable |
60
56
 
61
57
  ## Direction Mapping
62
58
 
63
59
  | `sortOrder` value | Direction | `sortExpression` |
64
- |---|---|---|
65
- | `1` | ASC | `"field:ASC"` |
66
- | `-1` | DESC | `"field:DESC"` |
67
- | `0` | none | `undefined` |
60
+ | ----------------- | --------- | ---------------- |
61
+ | `1` | ASC | `"field:ASC"` |
62
+ | `-1` | DESC | `"field:DESC"` |
63
+ | `0` | none | `undefined` |
68
64
 
69
65
  When `sortOrder` is `0`, `sortExpression` returns `undefined` regardless of `sortField`.
70
66
 
@@ -87,7 +83,7 @@ async function loadItems() {
87
83
  loading.value = true;
88
84
  try {
89
85
  const response = await api.searchProducts({
90
- sort: sortExpression.value, // e.g. "createdDate:DESC" or undefined
86
+ sort: sortExpression.value, // e.g. "createdDate:DESC" or undefined
91
87
  skip: 0,
92
88
  take: 20,
93
89
  });
@@ -108,9 +104,21 @@ watch(sortExpression, () => loadItems(), { immediate: true });
108
104
  :items="items"
109
105
  :loading="loading"
110
106
  >
111
- <VcColumn id="name" header="Name" sortable />
112
- <VcColumn id="createdDate" header="Created" sortable />
113
- <VcColumn id="price" header="Price" sortable />
107
+ <VcColumn
108
+ id="name"
109
+ header="Name"
110
+ sortable
111
+ />
112
+ <VcColumn
113
+ id="createdDate"
114
+ header="Created"
115
+ sortable
116
+ />
117
+ <VcColumn
118
+ id="price"
119
+ header="Price"
120
+ sortable
121
+ />
114
122
  </VcDataTable>
115
123
  </template>
116
124
  ```
@@ -14,18 +14,14 @@ Selection state is tracked by item objects and their extracted IDs, making it ea
14
14
  ## Basic Usage
15
15
 
16
16
  ```typescript
17
- import { useTableSelection } from '@vc-shell/framework';
17
+ import { useTableSelection } from "@vc-shell/framework";
18
18
 
19
- interface Product { id: string; name: string; }
19
+ interface Product {
20
+ id: string;
21
+ name: string;
22
+ }
20
23
 
21
- const {
22
- selectedItems,
23
- selectedIds,
24
- hasSelection,
25
- handleSelectionChange,
26
- handleSelectAll,
27
- resetSelection,
28
- } = useTableSelection<Product>();
24
+ const { selectedItems, selectedIds, hasSelection, handleSelectionChange, handleSelectAll, resetSelection } = useTableSelection<Product>();
29
25
 
30
26
  // Wire to VcTable events
31
27
  // <VcTable @selection-changed="handleSelectionChange" @select:all="handleSelectAll" />
@@ -41,25 +37,25 @@ async function deleteSelected() {
41
37
 
42
38
  ### Parameters (Options)
43
39
 
44
- | Option | Type | Default | Description |
45
- |---|---|---|---|
46
- | `idField` | `keyof T \| (item: T) => string` | `"id"` | Field or function to extract item IDs |
40
+ | Option | Type | Default | Description |
41
+ | --------- | -------------------------------- | ------- | ------------------------------------- |
42
+ | `idField` | `keyof T \| (item: T) => string` | `"id"` | Field or function to extract item IDs |
47
43
 
48
44
  ### Returns
49
45
 
50
- | Property | Type | Description |
51
- |---|---|---|
52
- | `selectedItems` | `Ref<T[]>` | Currently selected item objects |
53
- | `selectedIds` | `ComputedRef<string[]>` | IDs extracted from selected items |
54
- | `allSelected` | `Ref<boolean>` | Whether "select all" (across pages) is active |
55
- | `selectionCount` | `ComputedRef<number>` | Number of selected items |
56
- | `hasSelection` | `ComputedRef<boolean>` | Whether any items are selected |
57
- | `handleSelectionChange` | `(items: T[]) => void` | Handler for `@selection-changed` |
58
- | `handleSelectAll` | `(selected: boolean) => void` | Handler for `@select:all` |
59
- | `resetSelection` | `() => void` | Clear all selection state |
60
- | `isSelected` | `(item: T) => boolean` | Check if a specific item is selected |
61
- | `selectItems` | `(items: T[]) => void` | Programmatically select items |
62
- | `deselectByIds` | `(ids: string[]) => void` | Remove items from selection by ID |
46
+ | Property | Type | Description |
47
+ | ----------------------- | ----------------------------- | --------------------------------------------- |
48
+ | `selectedItems` | `Ref<T[]>` | Currently selected item objects |
49
+ | `selectedIds` | `ComputedRef<string[]>` | IDs extracted from selected items |
50
+ | `allSelected` | `Ref<boolean>` | Whether "select all" (across pages) is active |
51
+ | `selectionCount` | `ComputedRef<number>` | Number of selected items |
52
+ | `hasSelection` | `ComputedRef<boolean>` | Whether any items are selected |
53
+ | `handleSelectionChange` | `(items: T[]) => void` | Handler for `@selection-changed` |
54
+ | `handleSelectAll` | `(selected: boolean) => void` | Handler for `@select:all` |
55
+ | `resetSelection` | `() => void` | Clear all selection state |
56
+ | `isSelected` | `(item: T) => boolean` | Check if a specific item is selected |
57
+ | `selectItems` | `(items: T[]) => void` | Programmatically select items |
58
+ | `deselectByIds` | `(ids: string[]) => void` | Remove items from selection by ID |
63
59
 
64
60
  ## Recipe: Bulk Action Toolbar
65
61
 
@@ -70,16 +66,13 @@ A common list blade pattern is showing a toolbar with bulk actions when items ar
70
66
  import { useTableSelection } from "@vc-shell/framework";
71
67
  import { notification } from "@vc-shell/framework";
72
68
 
73
- interface Order { id: string; number: string; status: string; }
69
+ interface Order {
70
+ id: string;
71
+ number: string;
72
+ status: string;
73
+ }
74
74
 
75
- const {
76
- selectedItems,
77
- selectedIds,
78
- hasSelection,
79
- selectionCount,
80
- handleSelectionChange,
81
- resetSelection,
82
- } = useTableSelection<Order>();
75
+ const { selectedItems, selectedIds, hasSelection, selectionCount, handleSelectionChange, resetSelection } = useTableSelection<Order>();
83
76
 
84
77
  async function bulkChangeStatus(newStatus: string) {
85
78
  await api.bulkUpdateStatus(selectedIds.value, newStatus);
@@ -95,7 +88,10 @@ async function bulkExport() {
95
88
  </script>
96
89
 
97
90
  <template>
98
- <div v-if="hasSelection" class="tw-flex tw-gap-2 tw-p-2 tw-bg-blue-50">
91
+ <div
92
+ v-if="hasSelection"
93
+ class="tw-flex tw-gap-2 tw-p-2 tw-bg-blue-50"
94
+ >
99
95
  <span>{{ selectionCount }} selected</span>
100
96
  <button @click="bulkChangeStatus('Approved')">Approve</button>
101
97
  <button @click="bulkExport">Export CSV</button>
@@ -107,8 +103,14 @@ async function bulkExport() {
107
103
  multiselect
108
104
  @selection-changed="handleSelectionChange"
109
105
  >
110
- <VcColumn id="number" header="Order #" />
111
- <VcColumn id="status" header="Status" />
106
+ <VcColumn
107
+ id="number"
108
+ header="Order #"
109
+ />
110
+ <VcColumn
111
+ id="status"
112
+ header="Status"
113
+ />
112
114
  </VcTable>
113
115
  </template>
114
116
  ```
@@ -118,13 +120,19 @@ async function bulkExport() {
118
120
  When items use a non-standard identifier field, pass a custom `idField` option:
119
121
 
120
122
  ```typescript
121
- interface LegacyItem { code: string; name: string; }
123
+ interface LegacyItem {
124
+ code: string;
125
+ name: string;
126
+ }
122
127
 
123
128
  // Using a field name
124
129
  const selection = useTableSelection<LegacyItem>({ idField: "code" });
125
130
 
126
131
  // Using a function for composite keys
127
- interface CompositeItem { orgId: string; itemId: string; }
132
+ interface CompositeItem {
133
+ orgId: string;
134
+ itemId: string;
135
+ }
128
136
 
129
137
  const selection2 = useTableSelection<CompositeItem>({
130
138
  idField: (item) => `${item.orgId}:${item.itemId}`,