@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.
Files changed (195) hide show
  1. package/CHANGELOG.md +78 -54
  2. package/README.md +42 -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 +18 -7
  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 +28 -24
  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 +27 -25
  29. package/runtime/knowledge/docs/core/composables/useBladeRegistry/useBladeRegistry.docs.md +15 -15
  30. package/runtime/knowledge/docs/core/composables/useBladeWidgets/index.docs.md +43 -47
  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 +9 -9
  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/usePlatformLocaleSync/usePlatformLocaleSync.docs.md +28 -0
  46. package/runtime/knowledge/docs/core/composables/usePopup/usePopup.docs.md +32 -24
  47. package/runtime/knowledge/docs/core/composables/useResponsive/useResponsive.docs.md +32 -11
  48. package/runtime/knowledge/docs/core/composables/useSettings/useSettings.docs.md +22 -13
  49. package/runtime/knowledge/docs/core/composables/useSettingsMenu/useSettingsMenu.docs.md +7 -7
  50. package/runtime/knowledge/docs/core/composables/useSidebarState/useSidebarState.docs.md +32 -24
  51. package/runtime/knowledge/docs/core/composables/useSlowNetworkDetection/useSlowNetworkDetection.docs.md +21 -17
  52. package/runtime/knowledge/docs/core/composables/useTheme/useTheme.docs.md +24 -24
  53. package/runtime/knowledge/docs/core/composables/useToolbar/useToolbar.docs.md +28 -31
  54. package/runtime/knowledge/docs/core/composables/useUser/useUser.docs.md +43 -24
  55. package/runtime/knowledge/docs/core/composables/useUserManagement/useUserManagement.docs.md +68 -48
  56. package/runtime/knowledge/docs/core/composables/useWebVitals/useWebVitals.docs.md +19 -19
  57. package/runtime/knowledge/docs/core/composables/useWidgets/useWidgets.docs.md +42 -47
  58. package/runtime/knowledge/docs/core/directives/autofocus/autofocus.docs.md +10 -4
  59. package/runtime/knowledge/docs/core/directives/loading/loading.docs.md +35 -20
  60. package/runtime/knowledge/docs/core/notifications/notifications.docs.md +36 -35
  61. package/runtime/knowledge/docs/core/plugins/ai-agent/ai-agent.docs.md +38 -38
  62. package/runtime/knowledge/docs/core/plugins/extension-points/extension-points.docs.md +79 -62
  63. package/runtime/knowledge/docs/core/plugins/global-error-handler/global-error-handler.docs.md +10 -10
  64. package/runtime/knowledge/docs/core/plugins/i18n/i18n.docs.md +21 -23
  65. package/runtime/knowledge/docs/core/plugins/modularity/modularity.docs.md +91 -83
  66. package/runtime/knowledge/docs/core/plugins/permissions/permissions.docs.md +10 -16
  67. package/runtime/knowledge/docs/core/plugins/signalR/signalR.docs.md +9 -9
  68. package/runtime/knowledge/docs/core/plugins/validation/validation.docs.md +65 -22
  69. package/runtime/knowledge/docs/core/services/services.docs.md +19 -22
  70. package/runtime/knowledge/docs/core/types/types.docs.md +40 -40
  71. package/runtime/knowledge/docs/core/utilities/date/date-utilities.docs.md +27 -27
  72. package/runtime/knowledge/docs/core/utilities/shared-utilities.docs.md +23 -23
  73. package/runtime/knowledge/docs/core/utilities/thumbnail/thumbnail.docs.md +22 -25
  74. package/runtime/knowledge/docs/core/utilities/utilities.docs.md +64 -64
  75. package/runtime/knowledge/docs/injection-keys.docs.md +52 -51
  76. package/runtime/knowledge/docs/modules/assets-manager/assets-manager.docs.md +9 -9
  77. package/runtime/knowledge/docs/shell/_internal/popup/common/popup-common.docs.md +23 -43
  78. package/runtime/knowledge/docs/shell/auth/ChangePasswordPage/change-password-page.docs.md +5 -5
  79. package/runtime/knowledge/docs/shell/auth/ForgotPasswordPage/forgot-password-page.docs.md +5 -5
  80. package/runtime/knowledge/docs/shell/auth/InvitePage/invite-page.docs.md +8 -7
  81. package/runtime/knowledge/docs/shell/auth/LoginPage/login-page.docs.md +7 -7
  82. package/runtime/knowledge/docs/shell/auth/ResetPasswordPage/reset-password-page.docs.md +8 -7
  83. package/runtime/knowledge/docs/shell/auth/sign-in/sign-in.docs.md +29 -13
  84. package/runtime/knowledge/docs/shell/components/change-password/change-password.docs.md +13 -16
  85. package/runtime/knowledge/docs/shell/components/change-password-button/change-password-button.docs.md +1 -7
  86. package/runtime/knowledge/docs/shell/components/error-interceptor/error-interceptor.docs.md +5 -5
  87. package/runtime/knowledge/docs/shell/components/language-selector/language-selector.docs.md +1 -1
  88. package/runtime/knowledge/docs/shell/components/logout-button/logout-button.docs.md +1 -1
  89. package/runtime/knowledge/docs/shell/components/notification-template/notification-template.docs.md +17 -9
  90. package/runtime/knowledge/docs/shell/components/settings-menu/settings-menu.docs.md +11 -17
  91. package/runtime/knowledge/docs/shell/components/settings-menu-item/settings-menu-item.docs.md +34 -65
  92. package/runtime/knowledge/docs/shell/components/sidebar/sidebar.docs.md +16 -26
  93. package/runtime/knowledge/docs/shell/components/theme-selector/theme-selector.docs.md +2 -2
  94. package/runtime/knowledge/docs/shell/components/user-dropdown-button/user-dropdown-button.docs.md +7 -9
  95. package/runtime/knowledge/docs/shell/dashboard/dashboard-charts/dashboard-charts.docs.md +30 -40
  96. package/runtime/knowledge/docs/shell/dashboard/dashboard-widget-card/dashboard-widget-card.docs.md +26 -19
  97. package/runtime/knowledge/docs/shell/dashboard/draggable-dashboard/draggable-dashboard.docs.md +15 -12
  98. package/runtime/knowledge/docs/ui/components/atoms/vc-badge/vc-badge.docs.md +15 -26
  99. package/runtime/knowledge/docs/ui/components/atoms/vc-banner/vc-banner.docs.md +21 -19
  100. package/runtime/knowledge/docs/ui/components/atoms/vc-button/vc-button.docs.md +83 -67
  101. package/runtime/knowledge/docs/ui/components/atoms/vc-card/vc-card.docs.md +100 -59
  102. package/runtime/knowledge/docs/ui/components/atoms/vc-col/vc-col.docs.md +28 -11
  103. package/runtime/knowledge/docs/ui/components/atoms/vc-container/vc-container.docs.md +20 -17
  104. package/runtime/knowledge/docs/ui/components/atoms/vc-hint/vc-hint.docs.md +26 -17
  105. package/runtime/knowledge/docs/ui/components/atoms/vc-icon/vc-icon.docs.md +30 -32
  106. package/runtime/knowledge/docs/ui/components/atoms/vc-image/vc-image.docs.md +25 -48
  107. package/runtime/knowledge/docs/ui/components/atoms/vc-label/vc-label.docs.md +29 -24
  108. package/runtime/knowledge/docs/ui/components/atoms/vc-link/vc-link.docs.md +23 -15
  109. package/runtime/knowledge/docs/ui/components/atoms/vc-loading/vc-loading.docs.md +22 -13
  110. package/runtime/knowledge/docs/ui/components/atoms/vc-progress/vc-progress.docs.md +33 -18
  111. package/runtime/knowledge/docs/ui/components/atoms/vc-row/vc-row.docs.md +56 -15
  112. package/runtime/knowledge/docs/ui/components/atoms/vc-scrollable-container/vc-scrollable-container.docs.md +28 -15
  113. package/runtime/knowledge/docs/ui/components/atoms/vc-skeleton/vc-skeleton.docs.md +40 -20
  114. package/runtime/knowledge/docs/ui/components/atoms/vc-status/vc-status.docs.md +25 -14
  115. package/runtime/knowledge/docs/ui/components/atoms/vc-status-icon/vc-status-icon.docs.md +40 -14
  116. package/runtime/knowledge/docs/ui/components/atoms/vc-tooltip/vc-tooltip.docs.md +54 -42
  117. package/runtime/knowledge/docs/ui/components/atoms/vc-video/vc-video.docs.md +17 -17
  118. package/runtime/knowledge/docs/ui/components/atoms/vc-widget/vc-widget.docs.md +21 -21
  119. package/runtime/knowledge/docs/ui/components/molecules/multilanguage-selector/multilanguage-selector.docs.md +23 -10
  120. package/runtime/knowledge/docs/ui/components/molecules/vc-accordion/vc-accordion.docs.md +55 -44
  121. package/runtime/knowledge/docs/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.docs.md +23 -20
  122. package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox/vc-checkbox.docs.md +92 -65
  123. package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox-group/vc-checkbox-group.docs.md +22 -36
  124. package/runtime/knowledge/docs/ui/components/molecules/vc-color-input/vc-color-input.docs.md +65 -23
  125. package/runtime/knowledge/docs/ui/components/molecules/vc-date-picker/vc-date-picker.docs.md +52 -73
  126. package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown/vc-dropdown.docs.md +91 -85
  127. package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown-panel/vc-dropdown-panel.docs.md +38 -42
  128. package/runtime/knowledge/docs/ui/components/molecules/vc-editor/vc-editor.docs.md +56 -73
  129. package/runtime/knowledge/docs/ui/components/molecules/vc-field/vc-field.docs.md +61 -27
  130. package/runtime/knowledge/docs/ui/components/molecules/vc-file-upload/vc-file-upload.docs.md +42 -50
  131. package/runtime/knowledge/docs/ui/components/molecules/vc-form/vc-form.docs.md +35 -64
  132. package/runtime/knowledge/docs/ui/components/molecules/vc-image-tile/vc-image-tile.docs.md +38 -41
  133. package/runtime/knowledge/docs/ui/components/molecules/vc-input/vc-input.docs.md +109 -131
  134. package/runtime/knowledge/docs/ui/components/molecules/vc-input-currency/vc-input-currency.docs.md +47 -88
  135. package/runtime/knowledge/docs/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.docs.md +50 -64
  136. package/runtime/knowledge/docs/ui/components/molecules/vc-input-group/vc-input-group.docs.md +29 -24
  137. package/runtime/knowledge/docs/ui/components/molecules/vc-menu/vc-menu.docs.md +32 -28
  138. package/runtime/knowledge/docs/ui/components/molecules/vc-multivalue/vc-multivalue.docs.md +57 -65
  139. package/runtime/knowledge/docs/ui/components/molecules/vc-pagination/vc-pagination.docs.md +28 -26
  140. package/runtime/knowledge/docs/ui/components/molecules/vc-radio-button/vc-radio-button.docs.md +55 -20
  141. package/runtime/knowledge/docs/ui/components/molecules/vc-radio-group/vc-radio-group.docs.md +21 -35
  142. package/runtime/knowledge/docs/ui/components/molecules/vc-rating/vc-rating.docs.md +38 -33
  143. package/runtime/knowledge/docs/ui/components/molecules/vc-select/vc-select.docs.md +72 -83
  144. package/runtime/knowledge/docs/ui/components/molecules/vc-slider/vc-slider.docs.md +21 -16
  145. package/runtime/knowledge/docs/ui/components/molecules/vc-switch/vc-switch.docs.md +55 -64
  146. package/runtime/knowledge/docs/ui/components/molecules/vc-textarea/vc-textarea.docs.md +51 -70
  147. package/runtime/knowledge/docs/ui/components/molecules/vc-toast/vc-toast.docs.md +58 -57
  148. package/runtime/knowledge/docs/ui/components/organisms/vc-app/vc-app.docs.md +49 -26
  149. package/runtime/knowledge/docs/ui/components/organisms/vc-auth-layout/vc-auth-layout.docs.md +82 -28
  150. package/runtime/knowledge/docs/ui/components/organisms/vc-blade/vc-blade.docs.md +90 -75
  151. package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/composables/table-composables.docs.md +99 -48
  152. package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/vc-data-table.docs.md +548 -367
  153. package/runtime/knowledge/docs/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.docs.md +35 -52
  154. package/runtime/knowledge/docs/ui/components/organisms/vc-gallery/vc-gallery.docs.md +33 -62
  155. package/runtime/knowledge/docs/ui/components/organisms/vc-image-upload/vc-image-upload.docs.md +17 -23
  156. package/runtime/knowledge/docs/ui/components/organisms/vc-popup/vc-popup.docs.md +109 -68
  157. package/runtime/knowledge/docs/ui/components/organisms/vc-sidebar/vc-sidebar.docs.md +82 -44
  158. package/runtime/knowledge/docs/ui/composables/ui-composables.docs.md +8 -8
  159. package/runtime/knowledge/docs/ui/composables/useDataTablePagination.docs.md +164 -0
  160. package/runtime/knowledge/docs/ui/composables/useDataTableSort.docs.md +34 -26
  161. package/runtime/knowledge/docs/ui/composables/useTableSelection.docs.md +48 -40
  162. package/runtime/knowledge/docs/ui/composables/useTableSort.docs.md +30 -17
  163. package/runtime/knowledge/docs/ui/types/ui-types.docs.md +40 -29
  164. package/runtime/knowledge/examples/offers-module.md +15 -13
  165. package/runtime/knowledge/examples/team-module.md +82 -119
  166. package/runtime/knowledge/examples/videos-module.md +44 -17
  167. package/runtime/knowledge/index.md +22 -0
  168. package/runtime/knowledge/migration-prompts/blade-form-migration.md +17 -8
  169. package/runtime/knowledge/migration-prompts/blade-props-migration.md +1 -2
  170. package/runtime/knowledge/migration-prompts/datatable-migration.md +801 -0
  171. package/runtime/knowledge/migration-prompts/icon-migration.md +97 -0
  172. package/runtime/knowledge/migration-prompts/manual-migration-audit.md +117 -0
  173. package/runtime/knowledge/migration-prompts/notifications-migration.md +8 -3
  174. package/runtime/knowledge/migration-prompts/nswag-migration.md +25 -29
  175. package/runtime/knowledge/migration-prompts/use-assets-migration.md +164 -0
  176. package/runtime/knowledge/migration-prompts/use-data-table-pagination-migration.md +176 -0
  177. package/runtime/knowledge/migration-prompts/widgets-migration.md +48 -27
  178. package/runtime/knowledge/patterns/assets-management.md +20 -20
  179. package/runtime/knowledge/patterns/blade-navigation.md +7 -14
  180. package/runtime/knowledge/patterns/blade-widget.md +19 -17
  181. package/runtime/knowledge/patterns/child-blade-flow.md +19 -7
  182. package/runtime/knowledge/patterns/composable-details.md +20 -50
  183. package/runtime/knowledge/patterns/composable-list.md +43 -31
  184. package/runtime/knowledge/patterns/dashboard-widget.md +14 -16
  185. package/runtime/knowledge/patterns/datatable-pattern.md +521 -0
  186. package/runtime/knowledge/patterns/details-blade-pattern.md +78 -116
  187. package/runtime/knowledge/patterns/extension-points-usage.md +53 -44
  188. package/runtime/knowledge/patterns/form-validation.md +28 -64
  189. package/runtime/knowledge/patterns/list-blade-pattern.md +33 -21
  190. package/runtime/knowledge/patterns/module-structure.md +7 -1
  191. package/runtime/knowledge/patterns/multilanguage-fields.md +8 -14
  192. package/runtime/knowledge/patterns/notification-template.md +21 -14
  193. package/runtime/knowledge/patterns/signalr-notifications.md +30 -32
  194. package/runtime/knowledge/patterns/toolbar-pattern.md +18 -20
  195. package/runtime/vc-app.md +241 -62
@@ -20,12 +20,12 @@ Columns are defined as `<VcColumn>` child components -- no configuration objects
20
20
 
21
21
  ## When to Use
22
22
 
23
- | Scenario | Component |
24
- |----------|-----------|
25
- | Tabular data with sorting, selection, pagination | **VcDataTable** |
26
- | Simple short list without table features | `v-for` with custom markup |
27
- | Image/card grid layout | [VcGallery](../vc-gallery) |
28
- | Key-value detail display | [VcField](../../molecules/vc-field) or [VcCard](../../atoms/vc-card) |
23
+ | Scenario | Component |
24
+ | ------------------------------------------------ | -------------------------------------------------------------------- |
25
+ | Tabular data with sorting, selection, pagination | **VcDataTable** |
26
+ | Simple short list without table features | `v-for` with custom markup |
27
+ | Image/card grid layout | [VcGallery](../vc-gallery) |
28
+ | Key-value detail display | [VcField](../../molecules/vc-field) or [VcCard](../../atoms/vc-card) |
29
29
 
30
30
  Use VcDataTable whenever you need structured rows and columns with any combination of sorting, filtering, inline editing, or column management. **Do not use** VcDataTable for simple lists of 5-10 items that need no table features -- a plain `v-for` loop is lighter. For thumbnail/card grids, prefer VcGallery.
31
31
 
@@ -68,10 +68,28 @@ The simplest possible table -- pass an array and declare columns:
68
68
  ```vue
69
69
  <template>
70
70
  <VcDataTable :items="products">
71
- <VcColumn id="name" field="name" title="Name" />
72
- <VcColumn id="price" field="price" title="Price" type="money" />
73
- <VcColumn id="stock" field="stock" title="Stock" type="number" />
74
- <VcColumn id="status" field="status" title="Status" />
71
+ <VcColumn
72
+ id="name"
73
+ field="name"
74
+ title="Name"
75
+ />
76
+ <VcColumn
77
+ id="price"
78
+ field="price"
79
+ title="Price"
80
+ type="money"
81
+ />
82
+ <VcColumn
83
+ id="stock"
84
+ field="stock"
85
+ title="Stock"
86
+ type="number"
87
+ />
88
+ <VcColumn
89
+ id="status"
90
+ field="status"
91
+ title="Status"
92
+ />
75
93
  </VcDataTable>
76
94
  </template>
77
95
 
@@ -82,7 +100,7 @@ import { VcDataTable, VcColumn } from "@vc-shell/framework";
82
100
  const products = ref([
83
101
  { id: "1", name: "Laptop", price: 1299.99, currency: "USD", stock: 45, status: "In Stock" },
84
102
  { id: "2", name: "Mouse", price: 49.99, currency: "USD", stock: 120, status: "In Stock" },
85
- { id: "3", name: "Monitor", price: 599.00, currency: "USD", stock: 0, status: "Out of Stock" },
103
+ { id: "3", name: "Monitor", price: 599.0, currency: "USD", stock: 0, status: "Out of Stock" },
86
104
  ]);
87
105
  </script>
88
106
  ```
@@ -201,9 +219,25 @@ Mark columns as sortable and bind the sort state:
201
219
  v-model:sort-order="sortOrder"
202
220
  @sort="handleSort"
203
221
  >
204
- <VcColumn id="name" field="name" title="Name" sortable />
205
- <VcColumn id="price" field="price" title="Price" type="money" sortable />
206
- <VcColumn id="stock" field="stock" title="Stock" type="number" />
222
+ <VcColumn
223
+ id="name"
224
+ field="name"
225
+ title="Name"
226
+ sortable
227
+ />
228
+ <VcColumn
229
+ id="price"
230
+ field="price"
231
+ title="Price"
232
+ type="money"
233
+ sortable
234
+ />
235
+ <VcColumn
236
+ id="stock"
237
+ field="stock"
238
+ title="Stock"
239
+ type="number"
240
+ />
207
241
  </VcDataTable>
208
242
  </template>
209
243
 
@@ -235,12 +269,7 @@ Allow users to remove sorting entirely (3-state cycle: asc -> desc -> none):
235
269
  Hold Shift and click additional columns to sort by multiple fields:
236
270
 
237
271
  ```vue
238
- <VcDataTable
239
- :items="products"
240
- sort-mode="multiple"
241
- v-model:multi-sort-meta="multiSort"
242
- @sort="handleSort"
243
- >
272
+ <VcDataTable :items="products" sort-mode="multiple" v-model:multi-sort-meta="multiSort" @sort="handleSort">
244
273
  <VcColumn id="category" field="category" title="Category" sortable />
245
274
  <VcColumn id="name" field="name" title="Name" sortable />
246
275
  <VcColumn id="price" field="price" title="Price" type="money" sortable />
@@ -273,8 +302,17 @@ When the backend sort field differs from the column id:
273
302
  v-model:selection="selected"
274
303
  selection-mode="multiple"
275
304
  >
276
- <VcColumn id="name" field="name" title="Name" />
277
- <VcColumn id="price" field="price" title="Price" type="money" />
305
+ <VcColumn
306
+ id="name"
307
+ field="name"
308
+ title="Name"
309
+ />
310
+ <VcColumn
311
+ id="price"
312
+ field="price"
313
+ title="Price"
314
+ type="money"
315
+ />
278
316
  </VcDataTable>
279
317
 
280
318
  <p>{{ selected.length }} items selected</p>
@@ -290,11 +328,7 @@ A checkbox column is automatically prepended. A "Select All" banner appears when
290
328
  ### Single Selection (radio)
291
329
 
292
330
  ```vue
293
- <VcDataTable
294
- :items="products"
295
- v-model:selection="selectedProduct"
296
- selection-mode="single"
297
- >
331
+ <VcDataTable :items="products" v-model:selection="selectedProduct" selection-mode="single">
298
332
  <VcColumn id="name" field="name" title="Name" />
299
333
  </VcDataTable>
300
334
  ```
@@ -313,12 +347,7 @@ For explicit control over checkbox column placement:
313
347
  ### Disabling Selection on Specific Rows
314
348
 
315
349
  ```vue
316
- <VcDataTable
317
- :items="products"
318
- v-model:selection="selected"
319
- selection-mode="multiple"
320
- :is-row-selectable="(item) => item.stock > 0"
321
- >
350
+ <VcDataTable :items="products" v-model:selection="selected" selection-mode="multiple" :is-row-selectable="(item) => item.stock > 0">
322
351
  <VcColumn id="name" field="name" title="Name" />
323
352
  </VcDataTable>
324
353
  ```
@@ -330,14 +359,7 @@ Out-of-stock rows will have a disabled (grayed-out) checkbox.
330
359
  For server-side "select all" that includes items not currently visible:
331
360
 
332
361
  ```vue
333
- <VcDataTable
334
- :items="products"
335
- v-model:selection="selected"
336
- v-model:select-all-active="allSelected"
337
- selection-mode="multiple"
338
- :total-count="totalCount"
339
- @select-all="handleSelectAll"
340
- >
362
+ <VcDataTable :items="products" v-model:selection="selected" v-model:select-all-active="allSelected" selection-mode="multiple" :total-count="totalCount" @select-all="handleSelectAll">
341
363
  <VcColumn id="name" field="name" title="Name" />
342
364
  </VcDataTable>
343
365
  ```
@@ -365,8 +387,17 @@ function handleSelectAll(event: { selected: boolean }) {
365
387
  :total-count="totalCount"
366
388
  @pagination-click="onPageChange"
367
389
  >
368
- <VcColumn id="name" field="name" title="Name" />
369
- <VcColumn id="price" field="price" title="Price" type="money" />
390
+ <VcColumn
391
+ id="name"
392
+ field="name"
393
+ title="Name"
394
+ />
395
+ <VcColumn
396
+ id="price"
397
+ field="price"
398
+ title="Price"
399
+ type="money"
400
+ />
370
401
  </VcDataTable>
371
402
  </template>
372
403
 
@@ -398,10 +429,30 @@ Click any editable cell to activate its editor. Press Enter or click away to com
398
429
 
399
430
  ```vue
400
431
  <template>
401
- <VcDataTable :items="products" edit-mode="cell" @cell-edit-complete="onCellSave">
402
- <VcColumn id="name" field="name" title="Name" editable />
403
- <VcColumn id="price" field="price" title="Price" type="money" editable />
404
- <VcColumn id="stock" field="stock" title="Stock" type="number" />
432
+ <VcDataTable
433
+ :items="products"
434
+ edit-mode="cell"
435
+ @cell-edit-complete="onCellSave"
436
+ >
437
+ <VcColumn
438
+ id="name"
439
+ field="name"
440
+ title="Name"
441
+ editable
442
+ />
443
+ <VcColumn
444
+ id="price"
445
+ field="price"
446
+ title="Price"
447
+ type="money"
448
+ editable
449
+ />
450
+ <VcColumn
451
+ id="stock"
452
+ field="stock"
453
+ title="Stock"
454
+ type="number"
455
+ />
405
456
  </VcDataTable>
406
457
  </template>
407
458
 
@@ -439,12 +490,7 @@ function onRowSave(event: { data: Product; newData: Product; index: number }) {
439
490
  All editable cells are active at once -- useful for price lists, inventory grids, or spreadsheet-like UIs.
440
491
 
441
492
  ```vue
442
- <VcDataTable
443
- :items="products"
444
- edit-mode="inline"
445
- :validation-rules="validationRules"
446
- @edit-save="onBulkSave"
447
- >
493
+ <VcDataTable :items="products" edit-mode="inline" :validation-rules="validationRules" @edit-save="onBulkSave">
448
494
  <VcColumn id="name" field="name" title="Name" editable />
449
495
  <VcColumn id="price" field="price" title="Price" type="money" editable />
450
496
  <VcColumn id="stock" field="stock" title="Stock" type="number" editable />
@@ -505,6 +551,40 @@ Columns are reorderable by default. Drag a column header to a new position. Disa
505
551
  </VcDataTable>
506
552
  ```
507
553
 
554
+ ### Column Width Model
555
+
556
+ VcDataTable uses a **weight-based engine** to compute exact pixel widths for every column deterministically, based on the container's available width.
557
+
558
+ **How it works:**
559
+
560
+ 1. Developer declares initial widths via the `VcColumn` `width` prop (px, %, or omitted for auto).
561
+ 2. At runtime, these declarations become proportional weights. The engine converts weights to exact pixel values by distributing `availableWidth` proportionally.
562
+ 3. When a user resizes a column, only the weights change — the engine recomputes all pixel widths from the new weights on the next render.
563
+ 4. Clicking **Reset columns** returns all columns to their declarative hints.
564
+
565
+ **`fitMode` prop** controls what happens to leftover space:
566
+
567
+ | Value | Behavior |
568
+ | ----------------- | ----------------------------------------------------------------------------- |
569
+ | `"gap"` (default) | A filler pseudo-element absorbs unused space at the right end. |
570
+ | `"fit"` | All column weights are normalized so columns fill the entire container width. |
571
+
572
+ **Width prop contract:**
573
+
574
+ | Declaration | Meaning |
575
+ | ------------------------------- | ------------------------------------------------------------ |
576
+ | `width="200"` or `:width="200"` | Initial 200 px hint |
577
+ | `width="20%"` | Initial hint based on 20% of available width |
578
+ | `width` omitted | Auto — splits remaining space equally among all auto columns |
579
+
580
+ After initialization the column lives in the weight model. Container resizes recompute px values without changing weights.
581
+
582
+ **`minWidth` / `maxWidth`:**
583
+
584
+ - `minWidth` and `maxWidth` are enforced by the engine on every computation pass.
585
+ - Default `minWidth` is 40 px when not specified.
586
+ - In crisis (sum of all `minWidth` values exceeds available width), the engine squeezes columns below their minimums and emits a console warning rather than breaking layout.
587
+
508
588
  ### Column Switcher
509
589
 
510
590
  A built-in panel lets users show/hide columns. Enabled by default when `column-switcher` is truthy.
@@ -558,9 +638,22 @@ Enable drag-and-drop row reordering with a drag handle column:
558
638
  :reorderable-rows="true"
559
639
  @row-reorder="onReorder"
560
640
  >
561
- <VcColumn id="drag" :row-reorder="true" :width="40" />
562
- <VcColumn id="name" field="name" title="Name" />
563
- <VcColumn id="priority" field="priority" title="Priority" type="number" />
641
+ <VcColumn
642
+ id="drag"
643
+ :row-reorder="true"
644
+ :width="40"
645
+ />
646
+ <VcColumn
647
+ id="name"
648
+ field="name"
649
+ title="Name"
650
+ />
651
+ <VcColumn
652
+ id="priority"
653
+ field="priority"
654
+ title="Priority"
655
+ type="number"
656
+ />
564
657
  </VcDataTable>
565
658
  </template>
566
659
 
@@ -583,16 +676,35 @@ Show additional detail below a row when the user clicks the expand toggle:
583
676
 
584
677
  ```vue
585
678
  <template>
586
- <VcDataTable :items="orders" v-model:expanded-rows="expandedRows">
587
- <VcColumn id="expand" :expander="true" :width="40" />
588
- <VcColumn id="orderNumber" field="number" title="Order #" />
589
- <VcColumn id="total" field="total" title="Total" type="money" />
679
+ <VcDataTable
680
+ :items="orders"
681
+ v-model:expanded-rows="expandedRows"
682
+ >
683
+ <VcColumn
684
+ id="expand"
685
+ :expander="true"
686
+ :width="40"
687
+ />
688
+ <VcColumn
689
+ id="orderNumber"
690
+ field="number"
691
+ title="Order #"
692
+ />
693
+ <VcColumn
694
+ id="total"
695
+ field="total"
696
+ title="Total"
697
+ type="money"
698
+ />
590
699
 
591
700
  <template #expansion="{ data }">
592
701
  <div class="tw-p-4">
593
702
  <h4 class="tw-font-semibold tw-mb-2">Order Items</h4>
594
703
  <ul>
595
- <li v-for="item in data.lineItems" :key="item.id">
704
+ <li
705
+ v-for="item in data.lineItems"
706
+ :key="item.id"
707
+ >
596
708
  {{ item.name }} x{{ item.quantity }} -- {{ item.price }}
597
709
  </li>
598
710
  </ul>
@@ -609,12 +721,7 @@ const expandedRows = ref<Order[]>([]);
609
721
  Customize expand/collapse icons:
610
722
 
611
723
  ```vue
612
- <VcDataTable
613
- :items="orders"
614
- v-model:expanded-rows="expandedRows"
615
- expanded-row-icon="lucide-minus-circle"
616
- collapsed-row-icon="lucide-plus-circle"
617
- >
724
+ <VcDataTable :items="orders" v-model:expanded-rows="expandedRows" expanded-row-icon="lucide-minus-circle" collapsed-row-icon="lucide-plus-circle">
618
725
  ...
619
726
  </VcDataTable>
620
727
  ```
@@ -630,12 +737,25 @@ Use `isRowExpandable` to control which rows show the expand toggle. Rows that fa
630
737
  v-model:expanded-rows="expandedRows"
631
738
  :is-row-expandable="(order) => order.lineItems.length > 0"
632
739
  >
633
- <VcColumn id="expand" :expander="true" :width="40" />
634
- <VcColumn id="orderNumber" field="number" title="Order #" />
740
+ <VcColumn
741
+ id="expand"
742
+ :expander="true"
743
+ :width="40"
744
+ />
745
+ <VcColumn
746
+ id="orderNumber"
747
+ field="number"
748
+ title="Order #"
749
+ />
635
750
 
636
751
  <template #expansion="{ data }">
637
752
  <div class="tw-p-4">
638
- <p v-for="item in data.lineItems" :key="item.id">{{ item.name }}</p>
753
+ <p
754
+ v-for="item in data.lineItems"
755
+ :key="item.id"
756
+ >
757
+ {{ item.name }}
758
+ </p>
639
759
  </div>
640
760
  </template>
641
761
  </VcDataTable>
@@ -660,8 +780,17 @@ Group rows by a field value. Each group gets a subheader row.
660
780
  :expandable-row-groups="true"
661
781
  v-model:expanded-row-groups="expandedGroups"
662
782
  >
663
- <VcColumn id="name" field="name" title="Name" />
664
- <VcColumn id="price" field="price" title="Price" type="money" />
783
+ <VcColumn
784
+ id="name"
785
+ field="name"
786
+ title="Name"
787
+ />
788
+ <VcColumn
789
+ id="price"
790
+ field="price"
791
+ title="Price"
792
+ type="money"
793
+ />
665
794
 
666
795
  <template #groupheader="{ data }">
667
796
  <strong>{{ data.category }}</strong> ({{ getCategoryCount(data.category) }} items)
@@ -728,13 +857,7 @@ Add the `filter` prop to a VcColumn to render a filter control in its header.
728
857
  **Date range filter** -- start/end date pickers:
729
858
 
730
859
  ```vue
731
- <VcColumn
732
- id="createdDate"
733
- field="createdDate"
734
- title="Created"
735
- type="datetime"
736
- :filter="{ range: ['startDate', 'endDate'] }"
737
- />
860
+ <VcColumn id="createdDate" field="createdDate" title="Created" type="datetime" :filter="{ range: ['startDate', 'endDate'] }" />
738
861
  ```
739
862
 
740
863
  The `range` tuple specifies the two backend field names emitted in the `@filter` event payload.
@@ -809,11 +932,7 @@ A filter icon button appears in the toolbar. Clicking it opens the global filter
809
932
  Column filters and global filters work together. The `@filter` event merges all active filter values into a single flat object:
810
933
 
811
934
  ```vue
812
- <VcDataTable
813
- :items="products"
814
- :global-filters="globalFilters"
815
- @filter="handleFilter"
816
- >
935
+ <VcDataTable :items="products" :global-filters="globalFilters" @filter="handleFilter">
817
936
  <VcColumn id="name" field="name" title="Name" :filter="true" />
818
937
  <VcColumn id="status" field="status" title="Status" :filter="{ options: statusOptions }" />
819
938
  </VcDataTable>
@@ -831,14 +950,7 @@ function handleFilter(event: { filters: Record<string, unknown> }) {
831
950
  ## Search Bar
832
951
 
833
952
  ```vue
834
- <VcDataTable
835
- :items="products"
836
- searchable
837
- v-model:search-value="searchQuery"
838
- search-placeholder="Search products..."
839
- :search-debounce="300"
840
- @search="onSearch"
841
- >
953
+ <VcDataTable :items="products" searchable v-model:search-value="searchQuery" search-placeholder="Search products..." :search-debounce="300" @search="onSearch">
842
954
  <VcColumn id="name" field="name" title="Name" />
843
955
  </VcDataTable>
844
956
  ```
@@ -870,8 +982,17 @@ Load more data as the user scrolls down:
870
982
  scroll-height="500px"
871
983
  @load-more="loadNextPage"
872
984
  >
873
- <VcColumn id="name" field="name" title="Name" />
874
- <VcColumn id="price" field="price" title="Price" type="money" />
985
+ <VcColumn
986
+ id="name"
987
+ field="name"
988
+ title="Name"
989
+ />
990
+ <VcColumn
991
+ id="price"
992
+ field="price"
993
+ title="Price"
994
+ type="money"
995
+ />
875
996
  </VcDataTable>
876
997
  </template>
877
998
 
@@ -897,10 +1018,7 @@ async function loadNextPage() {
897
1018
  Persist column widths, column order, hidden columns, sort, and filters across page reloads:
898
1019
 
899
1020
  ```vue
900
- <VcDataTable
901
- :items="products"
902
- state-key="product-list"
903
- >
1021
+ <VcDataTable :items="products" state-key="product-list">
904
1022
  <VcColumn id="name" field="name" title="Name" sortable />
905
1023
  <VcColumn id="price" field="price" title="Price" type="money" sortable />
906
1024
  </VcDataTable>
@@ -908,6 +1026,10 @@ Persist column widths, column order, hidden columns, sort, and filters across pa
908
1026
 
909
1027
  **Storage key format:** `VC_DATATABLE_PRODUCT-LIST` (uppercased `state-key`).
910
1028
 
1029
+ **Schema version:** The persisted state uses the **v2 schema**, which stores column weights, column order, and hidden/shown column IDs. `containerWidth` is no longer stored because weights are container-independent — the engine recomputes pixel values from weights on every mount.
1030
+
1031
+ If an older browser tab wrote **v1** state (pixel-based widths), it is automatically migrated to v2 on first load. No manual migration is needed.
1032
+
911
1033
  Use sessionStorage instead of localStorage:
912
1034
 
913
1035
  ```vue
@@ -919,12 +1041,7 @@ Use sessionStorage instead of localStorage:
919
1041
  Listen to state events:
920
1042
 
921
1043
  ```vue
922
- <VcDataTable
923
- :items="products"
924
- state-key="product-list"
925
- @state-save="onStateSave"
926
- @state-restore="onStateRestore"
927
- >
1044
+ <VcDataTable :items="products" state-key="product-list" @state-save="onStateSave" @state-restore="onStateRestore">
928
1045
  ...
929
1046
  </VcDataTable>
930
1047
  ```
@@ -942,13 +1059,7 @@ Per-row action buttons that appear on hover or in a dropdown menu.
942
1059
  Quick action buttons appear on the right side of the row on hover. Extra actions overflow into a dropdown.
943
1060
 
944
1061
  ```vue
945
- <VcDataTable
946
- :items="products"
947
- :row-actions="getActions"
948
- row-actions-mode="inline"
949
- :max-quick-actions="3"
950
- @row-action="onAction"
951
- >
1062
+ <VcDataTable :items="products" :row-actions="getActions" row-actions-mode="inline" :max-quick-actions="3" @row-action="onAction">
952
1063
  <VcColumn id="name" field="name" title="Name" />
953
1064
  <VcColumn id="price" field="price" title="Price" type="money" />
954
1065
  </VcDataTable>
@@ -974,11 +1085,7 @@ function onAction(event: { action: TableAction; item: Product; index: number })
974
1085
  All actions in a three-dot dropdown menu:
975
1086
 
976
1087
  ```vue
977
- <VcDataTable
978
- :items="products"
979
- :row-actions="getActions"
980
- row-actions-mode="dropdown"
981
- >
1088
+ <VcDataTable :items="products" :row-actions="getActions" row-actions-mode="dropdown">
982
1089
  ...
983
1090
  </VcDataTable>
984
1091
  ```
@@ -988,11 +1095,7 @@ All actions in a three-dot dropdown menu:
988
1095
  Render actions in a dedicated column (always visible, not overlay):
989
1096
 
990
1097
  ```vue
991
- <VcDataTable
992
- :items="products"
993
- :row-actions="getActions"
994
- row-actions-position="column"
995
- >
1098
+ <VcDataTable :items="products" :row-actions="getActions" row-actions-position="column">
996
1099
  ...
997
1100
  </VcDataTable>
998
1101
  ```
@@ -1029,22 +1132,17 @@ On mobile screens, VcDataTable automatically switches from a table to a card lay
1029
1132
 
1030
1133
  **Mobile roles:**
1031
1134
 
1032
- | Role | Description | Max count |
1033
- |------|-------------|-----------|
1034
- | `"title"` | Bold heading at the top of the card | 1 |
1035
- | `"image"` | Thumbnail on the left side | 1 |
1036
- | `"field"` | Label + value pair in a 2x2 grid | 4 |
1037
- | `"status"` | Badge/chip at the bottom | Multiple |
1135
+ | Role | Description | Max count |
1136
+ | ---------- | ----------------------------------- | --------- |
1137
+ | `"title"` | Bold heading at the top of the card | 1 |
1138
+ | `"image"` | Thumbnail on the left side | 1 |
1139
+ | `"field"` | Label + value pair in a 2x2 grid | 4 |
1140
+ | `"status"` | Badge/chip at the bottom | Multiple |
1038
1141
 
1039
1142
  ### Pull-to-Refresh (mobile)
1040
1143
 
1041
1144
  ```vue
1042
- <VcDataTable
1043
- :items="products"
1044
- :pull-to-refresh="true"
1045
- :pull-to-refresh-text="{ pull: 'Pull down', release: 'Release to refresh', refreshing: 'Loading...' }"
1046
- @pull-refresh="reload"
1047
- >
1145
+ <VcDataTable :items="products" :pull-to-refresh="true" :pull-to-refresh-text="{ pull: 'Pull down', release: 'Release to refresh', refreshing: 'Loading...' }" @pull-refresh="reload">
1048
1146
  ...
1049
1147
  </VcDataTable>
1050
1148
  ```
@@ -1122,9 +1220,26 @@ For inline editing mode, enable adding/removing rows directly in the table:
1122
1220
  @row-remove="onRowRemove"
1123
1221
  @edit-save="onBulkSave"
1124
1222
  >
1125
- <VcColumn id="name" field="name" title="Name" editable />
1126
- <VcColumn id="price" field="price" title="Price" type="money" editable />
1127
- <VcColumn id="stock" field="stock" title="Stock" type="number" editable />
1223
+ <VcColumn
1224
+ id="name"
1225
+ field="name"
1226
+ title="Name"
1227
+ editable
1228
+ />
1229
+ <VcColumn
1230
+ id="price"
1231
+ field="price"
1232
+ title="Price"
1233
+ type="money"
1234
+ editable
1235
+ />
1236
+ <VcColumn
1237
+ id="stock"
1238
+ field="stock"
1239
+ title="Stock"
1240
+ type="number"
1241
+ editable
1242
+ />
1128
1243
  </VcDataTable>
1129
1244
  </template>
1130
1245
 
@@ -1146,11 +1261,11 @@ function onRowRemove(event: { data: Product; index: number; cancel: () => void }
1146
1261
 
1147
1262
  **Add button positions:**
1148
1263
 
1149
- | Position | Description |
1150
- |----------|-------------|
1151
- | `"header"` | Above the table body |
1152
- | `"footer"` | Below the table body |
1153
- | `"none"` | No built-in button (trigger via external button or slot) |
1264
+ | Position | Description |
1265
+ | ---------- | -------------------------------------------------------- |
1266
+ | `"header"` | Above the table body |
1267
+ | `"footer"` | Below the table body |
1268
+ | `"none"` | No built-in button (trigger via external button or slot) |
1154
1269
 
1155
1270
  ---
1156
1271
 
@@ -1158,47 +1273,47 @@ function onRowRemove(event: { data: Product; index: number; cancel: () => void }
1158
1273
 
1159
1274
  ### Props
1160
1275
 
1161
- | Prop | Type | Default | Description |
1162
- |------|------|---------|-------------|
1163
- | `id` | `string` | **required** | Unique column identifier. Must be unique within the table. |
1164
- | `field` | `string` | same as `id` | Data field path to read from each row item. |
1165
- | `title` | `string` | -- | Header text displayed in the column header. |
1166
- | `type` | `CellType` | `"text"` | Cell formatter: `"text"`, `"number"`, `"money"`, `"date"`, `"datetime"`, `"date-ago"`, `"time"`, `"image"`, `"link"`, `"html"`, `"status"`, `"status-icon"`. |
1167
- | `currencyField` | `string` | `"currency"` | Field to read currency code from (for `type="money"`). |
1168
- | `format` | `string` | -- | Date/number format string (e.g. `"DD.MM.YYYY"`). |
1169
- | `width` | `string \| number` | -- | Column width in px or CSS value (e.g. `200`, `"150px"`). |
1170
- | `minWidth` | `string \| number` | `60` | Minimum column width during resize. |
1171
- | `maxWidth` | `string \| number` | -- | Maximum column width during resize. |
1172
- | `align` | `"start" \| "center" \| "end"` | -- | Cell text alignment. |
1173
- | `headerAlign` | `"start" \| "center" \| "end"` | same as `align` | Header text alignment. |
1174
- | `sortable` | `boolean` | `false` | Enable sorting on this column. |
1175
- | `sortField` | `string` | same as `id` | Backend field name used in sort events. |
1176
- | `filter` | `ColumnFilterConfig` | -- | Filter config: `true` (text), `"field"` (text with custom field), `{ options }` (select), `{ range }` (date range). |
1177
- | `filterField` | `string` | same as `id` | Backend field name used in filter events. |
1178
- | `filterPlaceholder` | `string` | -- | Placeholder text for the filter input. |
1179
- | `visible` | `boolean` | `true` | Initial visibility. Hidden columns can be toggled via column switcher. |
1180
- | `alwaysVisible` | `boolean` | `false` | Keep visible when `showAllColumns=false` (blade narrows). |
1181
- | `editable` | `boolean` | `false` | Enable inline editing for this column's cells. |
1182
- | `rules` | `Record<string, unknown>` | -- | Validation rules for the editable cell. |
1183
- | `class` | `string` | -- | CSS class applied to header and body cells. |
1184
- | `headerClass` | `string` | -- | CSS class applied only to the header cell. |
1185
- | `bodyClass` | `string` | -- | CSS class applied only to body cells. |
1186
- | `lineClamp` | `number` | `2` | Max lines to display before truncating. `0` = no clamp. |
1187
- | `selectionMode` | `"single" \| "multiple"` | -- | Renders a selection checkbox/radio column. |
1188
- | `rowEditor` | `boolean` | `false` | Renders save/cancel buttons for row edit mode. |
1189
- | `rowReorder` | `boolean` | `false` | Renders a drag handle for row reordering. |
1190
- | `expander` | `boolean` | `false` | Renders an expand/collapse toggle. |
1191
- | `mobileRole` | `"title" \| "image" \| "field" \| "status"` | -- | Role in mobile card layout. |
1192
- | `mobileVisible` | `boolean` | `false` | Whether column is visible on mobile (hidden unless `mobileRole` set). |
1276
+ | Prop | Type | Default | Description |
1277
+ | ------------------- | ------------------------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1278
+ | `id` | `string` | **required** | Unique column identifier. Must be unique within the table. |
1279
+ | `field` | `string` | same as `id` | Data field path to read from each row item. |
1280
+ | `title` | `string` | -- | Header text displayed in the column header. |
1281
+ | `type` | `CellType` | `"text"` | Cell formatter: `"text"`, `"number"`, `"money"`, `"date"`, `"datetime"`, `"date-ago"`, `"time"`, `"image"`, `"link"`, `"html"`, `"status"`, `"status-icon"`. |
1282
+ | `currencyField` | `string` | `"currency"` | Field to read currency code from (for `type="money"`). |
1283
+ | `format` | `string` | -- | Date/number format string (e.g. `"DD.MM.YYYY"`). |
1284
+ | `width` | `string \| number` | -- | Column width in px or CSS value (e.g. `200`, `"150px"`). |
1285
+ | `minWidth` | `string \| number` | `60` | Minimum column width during resize. |
1286
+ | `maxWidth` | `string \| number` | -- | Maximum column width during resize. |
1287
+ | `align` | `"start" \| "center" \| "end"` | -- | Cell text alignment. |
1288
+ | `headerAlign` | `"start" \| "center" \| "end"` | same as `align` | Header text alignment. |
1289
+ | `sortable` | `boolean` | `false` | Enable sorting on this column. |
1290
+ | `sortField` | `string` | same as `id` | Backend field name used in sort events. |
1291
+ | `filter` | `ColumnFilterConfig` | -- | Filter config: `true` (text), `"field"` (text with custom field), `{ options }` (select), `{ range }` (date range). |
1292
+ | `filterField` | `string` | same as `id` | Backend field name used in filter events. |
1293
+ | `filterPlaceholder` | `string` | -- | Placeholder text for the filter input. |
1294
+ | `visible` | `boolean` | `true` | Initial visibility. Hidden columns can be toggled via column switcher. |
1295
+ | `alwaysVisible` | `boolean` | `false` | Keep visible when `showAllColumns=false` (blade narrows). |
1296
+ | `editable` | `boolean` | `false` | Enable inline editing for this column's cells. |
1297
+ | `rules` | `Record<string, unknown>` | -- | Validation rules for the editable cell. |
1298
+ | `class` | `string` | -- | CSS class applied to header and body cells. |
1299
+ | `headerClass` | `string` | -- | CSS class applied only to the header cell. |
1300
+ | `bodyClass` | `string` | -- | CSS class applied only to body cells. |
1301
+ | `lineClamp` | `number` | `2` | Max lines to display before truncating. `0` = no clamp. |
1302
+ | `selectionMode` | `"single" \| "multiple"` | -- | Renders a selection checkbox/radio column. |
1303
+ | `rowEditor` | `boolean` | `false` | Renders save/cancel buttons for row edit mode. |
1304
+ | `rowReorder` | `boolean` | `false` | Renders a drag handle for row reordering. |
1305
+ | `expander` | `boolean` | `false` | Renders an expand/collapse toggle. |
1306
+ | `mobileRole` | `"title" \| "image" \| "field" \| "status"` | -- | Role in mobile card layout. |
1307
+ | `mobileVisible` | `boolean` | `false` | Whether column is visible on mobile (hidden unless `mobileRole` set). |
1193
1308
 
1194
1309
  ### Slots
1195
1310
 
1196
- | Slot | Props | Description |
1197
- |------|-------|-------------|
1198
- | `#body` | `{ data: T, field: string, index: number }` | Custom cell rendering. |
1199
- | `#editor` | `{ data: T, field: string, index: number, editorCallback: Function }` | Custom inline editor. |
1200
- | `#header` | `{ column: VcColumnProps }` | Custom header cell content. |
1201
- | `#filter` | `{ field, value, updateValue, applyFilter, clearFilter, startDate, endDate, ... }` | Custom filter UI. |
1311
+ | Slot | Props | Description |
1312
+ | --------- | ---------------------------------------------------------------------------------- | --------------------------- |
1313
+ | `#body` | `{ data: T, field: string, index: number }` | Custom cell rendering. |
1314
+ | `#editor` | `{ data: T, field: string, index: number, editorCallback: Function }` | Custom inline editor. |
1315
+ | `#header` | `{ column: VcColumnProps }` | Custom header cell content. |
1316
+ | `#filter` | `{ field, value, updateValue, applyFilter, clearFilter, startDate, endDate, ... }` | Custom filter UI. |
1202
1317
 
1203
1318
  ---
1204
1319
 
@@ -1206,146 +1321,146 @@ function onRowRemove(event: { data: Product; index: number; cancel: () => void }
1206
1321
 
1207
1322
  ### Data
1208
1323
 
1209
- | Prop | Type | Default | Description |
1210
- |------|------|---------|-------------|
1211
- | `items` | `T[]` | `[]` | Array of data items to display. |
1212
- | `dataKey` | `string` | `"id"` | Field name used as unique row identifier. |
1213
- | `loading` | `boolean` | `false` | Show loading overlay. |
1214
- | `skeletonRows` | `number` | -- | Number of skeleton rows during initial loading. |
1324
+ | Prop | Type | Default | Description |
1325
+ | -------------- | --------- | ------- | ----------------------------------------------- |
1326
+ | `items` | `T[]` | `[]` | Array of data items to display. |
1327
+ | `dataKey` | `string` | `"id"` | Field name used as unique row identifier. |
1328
+ | `loading` | `boolean` | `false` | Show loading overlay. |
1329
+ | `skeletonRows` | `number` | -- | Number of skeleton rows during initial loading. |
1215
1330
 
1216
1331
  ### Selection
1217
1332
 
1218
- | Prop | Type | Default | Description |
1219
- |------|------|---------|-------------|
1220
- | `selection` | `T \| T[]` | -- | Selected item(s). Use with `v-model:selection`. |
1221
- | `selectionMode` | `"single" \| "multiple"` | -- | Row selection mode. |
1222
- | `isRowSelectable` | `(data: T) => boolean` | -- | Per-row function to disable selection. |
1223
- | `compareSelectionBy` | `"equals" \| "field"` | -- | Compare items by deep equality or by `dataKey` field. |
1224
- | `selectAll` | `boolean` | `false` | Enable "select all" header checkbox. |
1225
- | `selectAllActive` | `boolean` | `false` | Whether "select all" (including non-visible items) is active. Use with `v-model:selectAllActive`. |
1226
- | `activeItemId` | `string` | -- | ID of the highlighted row. Use with `v-model:activeItemId`. |
1333
+ | Prop | Type | Default | Description |
1334
+ | -------------------- | ------------------------ | ------- | ------------------------------------------------------------------------------------------------- |
1335
+ | `selection` | `T \| T[]` | -- | Selected item(s). Use with `v-model:selection`. |
1336
+ | `selectionMode` | `"single" \| "multiple"` | -- | Row selection mode. |
1337
+ | `isRowSelectable` | `(data: T) => boolean` | -- | Per-row function to disable selection. |
1338
+ | `compareSelectionBy` | `"equals" \| "field"` | -- | Compare items by deep equality or by `dataKey` field. |
1339
+ | `selectAll` | `boolean` | `false` | Enable "select all" header checkbox. |
1340
+ | `selectAllActive` | `boolean` | `false` | Whether "select all" (including non-visible items) is active. Use with `v-model:selectAllActive`. |
1341
+ | `activeItemId` | `string` | -- | ID of the highlighted row. Use with `v-model:activeItemId`. |
1227
1342
 
1228
1343
  ### Sorting
1229
1344
 
1230
- | Prop | Type | Default | Description |
1231
- |------|------|---------|-------------|
1232
- | `sortField` | `string` | -- | Currently sorted field. Use with `v-model:sortField`. |
1233
- | `sortOrder` | `1 \| -1 \| 0` | `0` | Sort direction. Use with `v-model:sortOrder`. |
1234
- | `sortMode` | `"single" \| "multiple"` | `"single"` | Single or multi-column sort. |
1235
- | `multiSortMeta` | `SortMeta[]` | `[]` | Multi-sort metadata. Use with `v-model:multiSortMeta`. |
1236
- | `removableSort` | `boolean` | `false` | Allow 3-state sort cycle (asc -> desc -> none). |
1345
+ | Prop | Type | Default | Description |
1346
+ | --------------- | ------------------------ | ---------- | ------------------------------------------------------ |
1347
+ | `sortField` | `string` | -- | Currently sorted field. Use with `v-model:sortField`. |
1348
+ | `sortOrder` | `1 \| -1 \| 0` | `0` | Sort direction. Use with `v-model:sortOrder`. |
1349
+ | `sortMode` | `"single" \| "multiple"` | `"single"` | Single or multi-column sort. |
1350
+ | `multiSortMeta` | `SortMeta[]` | `[]` | Multi-sort metadata. Use with `v-model:multiSortMeta`. |
1351
+ | `removableSort` | `boolean` | `false` | Allow 3-state sort cycle (asc -> desc -> none). |
1237
1352
 
1238
1353
  ### Editing
1239
1354
 
1240
- | Prop | Type | Default | Description |
1241
- |------|------|---------|-------------|
1242
- | `editMode` | `"cell" \| "row" \| "inline"` | -- | Inline editing mode. |
1243
- | `editingRows` | `T[]` | -- | Currently editing rows. Use with `v-model:editingRows`. |
1244
- | `addRow` | `AddRowConfig` | -- | Add-row button configuration for inline edit mode. |
1245
- | `validationRules` | `Record<string, (value, row) => string \| true>` | -- | Field-level validators for inline editing. |
1355
+ | Prop | Type | Default | Description |
1356
+ | ----------------- | ------------------------------------------------ | ------- | ------------------------------------------------------- |
1357
+ | `editMode` | `"cell" \| "row" \| "inline"` | -- | Inline editing mode. |
1358
+ | `editingRows` | `T[]` | -- | Currently editing rows. Use with `v-model:editingRows`. |
1359
+ | `addRow` | `AddRowConfig` | -- | Add-row button configuration for inline edit mode. |
1360
+ | `validationRules` | `Record<string, (value, row) => string \| true>` | -- | Field-level validators for inline editing. |
1246
1361
 
1247
1362
  ### Visual
1248
1363
 
1249
- | Prop | Type | Default | Description |
1250
- |------|------|---------|-------------|
1251
- | `striped` | `boolean` | `false` | Alternate row backgrounds. |
1252
- | `bordered` | `boolean` | `false` | Border around the table. |
1253
- | `showGridlines` | `boolean` | `false` | Grid lines between cells. |
1254
- | `rowHover` | `boolean` | `true` | Highlight rows on hover. |
1255
- | `size` | `"small" \| "normal" \| "large"` | `"normal"` | Row density. |
1256
- | `variant` | `"default" \| "striped" \| "bordered"` | `"default"` | Visual variant. |
1257
- | `rowClass` | `(data: T) => string \| object` | -- | Per-row CSS class function. |
1258
- | `rowStyle` | `(data: T) => object` | -- | Per-row inline style function. |
1364
+ | Prop | Type | Default | Description |
1365
+ | --------------- | -------------------------------------- | ----------- | ------------------------------ |
1366
+ | `striped` | `boolean` | `false` | Alternate row backgrounds. |
1367
+ | `bordered` | `boolean` | `false` | Border around the table. |
1368
+ | `showGridlines` | `boolean` | `false` | Grid lines between cells. |
1369
+ | `rowHover` | `boolean` | `true` | Highlight rows on hover. |
1370
+ | `size` | `"small" \| "normal" \| "large"` | `"normal"` | Row density. |
1371
+ | `variant` | `"default" \| "striped" \| "bordered"` | `"default"` | Visual variant. |
1372
+ | `rowClass` | `(data: T) => string \| object` | -- | Per-row CSS class function. |
1373
+ | `rowStyle` | `(data: T) => object` | -- | Per-row inline style function. |
1259
1374
 
1260
1375
  ### Column Management
1261
1376
 
1262
- | Prop | Type | Default | Description |
1263
- |------|------|---------|-------------|
1264
- | `resizableColumns` | `boolean` | `true` | Allow column resize by dragging header borders. |
1265
- | `reorderableColumns` | `boolean` | `true` | Allow column reorder by dragging headers. |
1266
- | `showAllColumns` | `boolean` | `true` | When `false`, only `alwaysVisible` columns are shown. |
1267
- | `columnSwitcher` | `boolean \| "auto" \| "defined"` | `true` | Column visibility toggle panel. |
1377
+ | Prop | Type | Default | Description |
1378
+ | -------------------- | -------------------------------- | ------- | ----------------------------------------------------- |
1379
+ | `resizableColumns` | `boolean` | `true` | Allow column resize by dragging header borders. |
1380
+ | `reorderableColumns` | `boolean` | `true` | Allow column reorder by dragging headers. |
1381
+ | `showAllColumns` | `boolean` | `true` | When `false`, only `alwaysVisible` columns are shown. |
1382
+ | `columnSwitcher` | `boolean \| "auto" \| "defined"` | `true` | Column visibility toggle panel. |
1268
1383
 
1269
1384
  ### Scrolling
1270
1385
 
1271
- | Prop | Type | Default | Description |
1272
- |------|------|---------|-------------|
1273
- | `scrollable` | `boolean` | `false` | Enable scroll within the table container. |
1274
- | `scrollHeight` | `string` | -- | Fixed height for the scroll container (e.g. `"400px"`). |
1275
- | `infiniteScroll` | `boolean` | `false` | Enable infinite scroll. |
1276
- | `infiniteScrollDistance` | `number` | `100` | Distance in px from bottom to trigger `@load-more`. |
1386
+ | Prop | Type | Default | Description |
1387
+ | ------------------------ | --------- | ------- | ------------------------------------------------------- |
1388
+ | `scrollable` | `boolean` | `false` | Enable scroll within the table container. |
1389
+ | `scrollHeight` | `string` | -- | Fixed height for the scroll container (e.g. `"400px"`). |
1390
+ | `infiniteScroll` | `boolean` | `false` | Enable infinite scroll. |
1391
+ | `infiniteScrollDistance` | `number` | `100` | Distance in px from bottom to trigger `@load-more`. |
1277
1392
 
1278
1393
  ### Row Actions
1279
1394
 
1280
- | Prop | Type | Default | Description |
1281
- |------|------|---------|-------------|
1282
- | `rowActions` | `(item: T) => TableAction[]` | -- | Per-row action items. |
1283
- | `rowActionsMode` | `"inline" \| "dropdown"` | `"inline"` | Action display mode. |
1284
- | `rowActionsPosition` | `"overlay" \| "column"` | `"overlay"` | Float over row or fixed column. |
1285
- | `maxQuickActions` | `number` | `4` | Max quick actions before overflow dropdown. |
1395
+ | Prop | Type | Default | Description |
1396
+ | -------------------- | ---------------------------- | ----------- | ------------------------------------------- |
1397
+ | `rowActions` | `(item: T) => TableAction[]` | -- | Per-row action items. |
1398
+ | `rowActionsMode` | `"inline" \| "dropdown"` | `"inline"` | Action display mode. |
1399
+ | `rowActionsPosition` | `"overlay" \| "column"` | `"overlay"` | Float over row or fixed column. |
1400
+ | `maxQuickActions` | `number` | `4` | Max quick actions before overflow dropdown. |
1286
1401
 
1287
1402
  ### Expandable Rows
1288
1403
 
1289
- | Prop | Type | Default | Description |
1290
- |------|------|---------|-------------|
1291
- | `expandedRows` | `T[]` | `[]` | Expanded rows. Use with `v-model:expandedRows`. |
1292
- | `expandedRowIcon` | `string` | `"lucide-chevron-down"` | Icon for expanded state. |
1293
- | `collapsedRowIcon` | `string` | `"lucide-chevron-right"` | Icon for collapsed state. |
1294
- | `isRowExpandable` | `(data: T) => boolean` | -- | Per-row predicate to hide the expand toggle. |
1404
+ | Prop | Type | Default | Description |
1405
+ | ------------------ | ---------------------- | ------------------------ | ----------------------------------------------- |
1406
+ | `expandedRows` | `T[]` | `[]` | Expanded rows. Use with `v-model:expandedRows`. |
1407
+ | `expandedRowIcon` | `string` | `"lucide-chevron-down"` | Icon for expanded state. |
1408
+ | `collapsedRowIcon` | `string` | `"lucide-chevron-right"` | Icon for collapsed state. |
1409
+ | `isRowExpandable` | `(data: T) => boolean` | -- | Per-row predicate to hide the expand toggle. |
1295
1410
 
1296
1411
  ### Row Grouping
1297
1412
 
1298
- | Prop | Type | Default | Description |
1299
- |------|------|---------|-------------|
1300
- | `groupRowsBy` | `string \| string[]` | -- | Field(s) to group rows by. |
1301
- | `rowGroupMode` | `"subheader" \| "rowspan"` | `"subheader"` | Group display mode. |
1302
- | `expandableRowGroups` | `boolean` | `false` | Allow collapsing/expanding groups. |
1303
- | `expandedRowGroups` | `string[]` | -- | Expanded group keys. Use with `v-model:expandedRowGroups`. |
1413
+ | Prop | Type | Default | Description |
1414
+ | --------------------- | -------------------------- | ------------- | ---------------------------------------------------------- |
1415
+ | `groupRowsBy` | `string \| string[]` | -- | Field(s) to group rows by. |
1416
+ | `rowGroupMode` | `"subheader" \| "rowspan"` | `"subheader"` | Group display mode. |
1417
+ | `expandableRowGroups` | `boolean` | `false` | Allow collapsing/expanding groups. |
1418
+ | `expandedRowGroups` | `string[]` | -- | Expanded group keys. Use with `v-model:expandedRowGroups`. |
1304
1419
 
1305
1420
  ### Pagination
1306
1421
 
1307
- | Prop | Type | Default | Description |
1308
- |------|------|---------|-------------|
1309
- | `pagination` | `DataTablePagination` | -- | `{ currentPage, pages, pageSize?, variant? }`. Omit to hide. |
1310
- | `totalCount` | `number` | -- | Total item count (for "Showing X of Y" and select-all). |
1311
- | `totalLabel` | `string` | -- | Label for the total counter. |
1422
+ | Prop | Type | Default | Description |
1423
+ | ------------ | --------------------- | ------- | ------------------------------------------------------------ |
1424
+ | `pagination` | `DataTablePagination` | -- | `{ currentPage, pages, pageSize?, variant? }`. Omit to hide. |
1425
+ | `totalCount` | `number` | -- | Total item count (for "Showing X of Y" and select-all). |
1426
+ | `totalLabel` | `string` | -- | Label for the total counter. |
1312
1427
 
1313
1428
  ### Search
1314
1429
 
1315
- | Prop | Type | Default | Description |
1316
- |------|------|---------|-------------|
1317
- | `searchable` | `boolean` | `false` | Show search bar. |
1318
- | `searchValue` | `string` | -- | Search input value. Use with `v-model:searchValue`. |
1319
- | `searchPlaceholder` | `string` | `"Search..."` | Placeholder text. |
1320
- | `searchDebounce` | `number` | `300` | Debounce delay in ms. |
1430
+ | Prop | Type | Default | Description |
1431
+ | ------------------- | --------- | ------------- | --------------------------------------------------- |
1432
+ | `searchable` | `boolean` | `false` | Show search bar. |
1433
+ | `searchValue` | `string` | -- | Search input value. Use with `v-model:searchValue`. |
1434
+ | `searchPlaceholder` | `string` | `"Search..."` | Placeholder text. |
1435
+ | `searchDebounce` | `number` | `300` | Debounce delay in ms. |
1321
1436
 
1322
1437
  ### Filters
1323
1438
 
1324
- | Prop | Type | Default | Description |
1325
- |------|------|---------|-------------|
1326
- | `globalFilters` | `GlobalFilterConfig[]` | -- | Global filter panel configuration. |
1439
+ | Prop | Type | Default | Description |
1440
+ | --------------- | ---------------------- | ------- | ---------------------------------- |
1441
+ | `globalFilters` | `GlobalFilterConfig[]` | -- | Global filter panel configuration. |
1327
1442
 
1328
1443
  ### State Persistence
1329
1444
 
1330
- | Prop | Type | Default | Description |
1331
- |------|------|---------|-------------|
1332
- | `stateKey` | `string` | -- | Key for persisting state. Omit to disable persistence. |
1333
- | `stateStorage` | `"local" \| "session"` | `"local"` | Storage backend. |
1445
+ | Prop | Type | Default | Description |
1446
+ | -------------- | ---------------------- | --------- | ------------------------------------------------------ |
1447
+ | `stateKey` | `string` | -- | Key for persisting state. Omit to disable persistence. |
1448
+ | `stateStorage` | `"local" \| "session"` | `"local"` | Storage backend. |
1334
1449
 
1335
1450
  ### Empty States
1336
1451
 
1337
- | Prop | Type | Default | Description |
1338
- |------|------|---------|-------------|
1339
- | `emptyState` | `TableStateConfig` | -- | `{ icon?, title?, description?, actionLabel?, actionHandler? }` |
1340
- | `notFoundState` | `TableStateConfig` | -- | Same shape, shown when search/filters are active. |
1452
+ | Prop | Type | Default | Description |
1453
+ | --------------- | ------------------ | ------- | --------------------------------------------------------------- |
1454
+ | `emptyState` | `TableStateConfig` | -- | `{ icon?, title?, description?, actionLabel?, actionHandler? }` |
1455
+ | `notFoundState` | `TableStateConfig` | -- | Same shape, shown when search/filters are active. |
1341
1456
 
1342
1457
  ### Mobile
1343
1458
 
1344
- | Prop | Type | Default | Description |
1345
- |------|------|---------|-------------|
1346
- | `pullToRefresh` | `boolean` | `false` | Enable pull-to-refresh on mobile. |
1347
- | `pullToRefreshText` | `PullToRefreshTextConfig` | -- | Custom text for pull/release/refreshing states. |
1348
- | `reorderableRows` | `boolean` | `false` | Enable row drag-and-drop. |
1459
+ | Prop | Type | Default | Description |
1460
+ | ------------------- | ------------------------- | ------- | ----------------------------------------------- |
1461
+ | `pullToRefresh` | `boolean` | `false` | Enable pull-to-refresh on mobile. |
1462
+ | `pullToRefreshText` | `PullToRefreshTextConfig` | -- | Custom text for pull/release/refreshing states. |
1463
+ | `reorderableRows` | `boolean` | `false` | Enable row drag-and-drop. |
1349
1464
 
1350
1465
  ---
1351
1466
 
@@ -1353,105 +1468,105 @@ function onRowRemove(event: { data: Product; index: number; cancel: () => void }
1353
1468
 
1354
1469
  ### Selection Events
1355
1470
 
1356
- | Event | Payload | Description |
1357
- |-------|---------|-------------|
1358
- | `update:selection` | `T \| T[]` | v-model update for selection. |
1359
- | `update:selectAll` | `boolean` | v-model update for select-all checkbox. |
1360
- | `update:selectAllActive` | `boolean` | v-model update for "select all" active state. |
1361
- | `row-select` | `{ data: T, originalEvent: Event }` | Row selected. |
1362
- | `row-unselect` | `{ data: T, originalEvent: Event }` | Row deselected. |
1363
- | `row-select-all` | `{ data: T[], originalEvent: Event }` | All visible rows selected. |
1364
- | `row-unselect-all` | `{ data: T[], originalEvent: Event }` | All visible rows deselected. |
1365
- | `select-all` | `{ selected: boolean }` | "Select all" banner toggle (includes non-visible). |
1471
+ | Event | Payload | Description |
1472
+ | ------------------------ | ------------------------------------- | -------------------------------------------------- |
1473
+ | `update:selection` | `T \| T[]` | v-model update for selection. |
1474
+ | `update:selectAll` | `boolean` | v-model update for select-all checkbox. |
1475
+ | `update:selectAllActive` | `boolean` | v-model update for "select all" active state. |
1476
+ | `row-select` | `{ data: T, originalEvent: Event }` | Row selected. |
1477
+ | `row-unselect` | `{ data: T, originalEvent: Event }` | Row deselected. |
1478
+ | `row-select-all` | `{ data: T[], originalEvent: Event }` | All visible rows selected. |
1479
+ | `row-unselect-all` | `{ data: T[], originalEvent: Event }` | All visible rows deselected. |
1480
+ | `select-all` | `{ selected: boolean }` | "Select all" banner toggle (includes non-visible). |
1366
1481
 
1367
1482
  ### Editing Events
1368
1483
 
1369
- | Event | Payload | Description |
1370
- |-------|---------|-------------|
1371
- | `update:editingRows` | `T[]` | v-model update for currently editing rows. |
1372
- | `cell-edit-init` | `{ data: T, field: string, index: number }` | Cell entered edit mode. |
1373
- | `cell-edit-complete` | `{ data: T, field: string, newValue: unknown, index: number }` | Cell edit committed. |
1374
- | `cell-edit-cancel` | `{ data: T, field: string, index: number }` | Cell edit cancelled. |
1375
- | `row-edit-init` | `{ data: T, index: number }` | Row entered edit mode. |
1376
- | `row-edit-save` | `{ data: T, newData: T, index: number }` | Row edits saved. |
1377
- | `row-edit-cancel` | `{ data: T, index: number }` | Row edits cancelled. |
1378
- | `edit-save` | `{ changes: EditChange<T>[] }` | Bulk inline edits saved. |
1379
- | `edit-cancel` | -- | Bulk inline editing cancelled. |
1380
- | `row-add` | `{ defaults: Record<string, unknown>, cancel: () => void }` | New row being added. |
1381
- | `row-remove` | `{ data: T, index: number, cancel: () => void }` | Row being removed. |
1484
+ | Event | Payload | Description |
1485
+ | -------------------- | -------------------------------------------------------------- | ------------------------------------------ |
1486
+ | `update:editingRows` | `T[]` | v-model update for currently editing rows. |
1487
+ | `cell-edit-init` | `{ data: T, field: string, index: number }` | Cell entered edit mode. |
1488
+ | `cell-edit-complete` | `{ data: T, field: string, newValue: unknown, index: number }` | Cell edit committed. |
1489
+ | `cell-edit-cancel` | `{ data: T, field: string, index: number }` | Cell edit cancelled. |
1490
+ | `row-edit-init` | `{ data: T, index: number }` | Row entered edit mode. |
1491
+ | `row-edit-save` | `{ data: T, newData: T, index: number }` | Row edits saved. |
1492
+ | `row-edit-cancel` | `{ data: T, index: number }` | Row edits cancelled. |
1493
+ | `edit-save` | `{ changes: EditChange<T>[] }` | Bulk inline edits saved. |
1494
+ | `edit-cancel` | -- | Bulk inline editing cancelled. |
1495
+ | `row-add` | `{ defaults: Record<string, unknown>, cancel: () => void }` | New row being added. |
1496
+ | `row-remove` | `{ data: T, index: number, cancel: () => void }` | Row being removed. |
1382
1497
 
1383
1498
  ### Sorting Events
1384
1499
 
1385
- | Event | Payload | Description |
1386
- |-------|---------|-------------|
1387
- | `update:sortField` | `string` | v-model update for sorted field. |
1388
- | `update:sortOrder` | `number` | v-model update for sort direction. |
1389
- | `update:multiSortMeta` | `SortMeta[]` | v-model update for multi-sort. |
1390
- | `sort` | `{ sortField?, sortOrder?, multiSortMeta? }` | Sort changed -- use for server-side sorting. |
1500
+ | Event | Payload | Description |
1501
+ | ---------------------- | -------------------------------------------- | -------------------------------------------- |
1502
+ | `update:sortField` | `string` | v-model update for sorted field. |
1503
+ | `update:sortOrder` | `number` | v-model update for sort direction. |
1504
+ | `update:multiSortMeta` | `SortMeta[]` | v-model update for multi-sort. |
1505
+ | `sort` | `{ sortField?, sortOrder?, multiSortMeta? }` | Sort changed -- use for server-side sorting. |
1391
1506
 
1392
1507
  ### Filtering Events
1393
1508
 
1394
- | Event | Payload | Description |
1395
- |-------|---------|-------------|
1509
+ | Event | Payload | Description |
1510
+ | -------- | ---------------------------------------------------------- | ------------------------- |
1396
1511
  | `filter` | `{ filters: Record<string, unknown>, filteredValue: T[] }` | Any filter value changed. |
1397
1512
 
1398
1513
  ### Row Interaction Events
1399
1514
 
1400
- | Event | Payload | Description |
1401
- |-------|---------|-------------|
1402
- | `row-click` | `{ data: T, index: number, originalEvent: Event }` | Row clicked. |
1403
- | `row-action` | `{ action: TableAction, item: T, index: number }` | Row action triggered. |
1515
+ | Event | Payload | Description |
1516
+ | ------------ | -------------------------------------------------- | --------------------- |
1517
+ | `row-click` | `{ data: T, index: number, originalEvent: Event }` | Row clicked. |
1518
+ | `row-action` | `{ action: TableAction, item: T, index: number }` | Row action triggered. |
1404
1519
 
1405
1520
  ### Reorder Events
1406
1521
 
1407
- | Event | Payload | Description |
1408
- |-------|---------|-------------|
1409
- | `row-reorder` | `{ dragIndex, dropIndex, value: T[] }` | Row drag-and-drop completed. |
1410
- | `column-resize-end` | `{ columns: { id, width }[] }` | Column resize completed. |
1411
- | `column-reorder` | `{ columns: { id, ... }[] }` | Column reorder completed. |
1522
+ | Event | Payload | Description |
1523
+ | ------------------- | -------------------------------------- | ---------------------------- |
1524
+ | `row-reorder` | `{ dragIndex, dropIndex, value: T[] }` | Row drag-and-drop completed. |
1525
+ | `column-resize-end` | `{ columns: { id, width }[] }` | Column resize completed. |
1526
+ | `column-reorder` | `{ columns: { id, ... }[] }` | Column reorder completed. |
1412
1527
 
1413
1528
  ### Expansion Events
1414
1529
 
1415
- | Event | Payload | Description |
1416
- |-------|---------|-------------|
1417
- | `update:expandedRows` | `T[]` | v-model update for expanded rows. |
1418
- | `row-expand` | `{ data: T, originalEvent: Event }` | Row expanded. |
1419
- | `row-collapse` | `{ data: T, originalEvent: Event }` | Row collapsed. |
1420
- | `update:expandedRowGroups` | `string[]` | v-model update for expanded groups. |
1421
- | `rowgroup-expand` | `{ data: string, originalEvent: Event }` | Row group expanded. |
1422
- | `rowgroup-collapse` | `{ data: string, originalEvent: Event }` | Row group collapsed. |
1530
+ | Event | Payload | Description |
1531
+ | -------------------------- | ---------------------------------------- | ----------------------------------- |
1532
+ | `update:expandedRows` | `T[]` | v-model update for expanded rows. |
1533
+ | `row-expand` | `{ data: T, originalEvent: Event }` | Row expanded. |
1534
+ | `row-collapse` | `{ data: T, originalEvent: Event }` | Row collapsed. |
1535
+ | `update:expandedRowGroups` | `string[]` | v-model update for expanded groups. |
1536
+ | `rowgroup-expand` | `{ data: string, originalEvent: Event }` | Row group expanded. |
1537
+ | `rowgroup-collapse` | `{ data: string, originalEvent: Event }` | Row group collapsed. |
1423
1538
 
1424
1539
  ### Other Events
1425
1540
 
1426
- | Event | Payload | Description |
1427
- |-------|---------|-------------|
1428
- | `pagination-click` | `number` | Page button clicked. |
1429
- | `update:searchValue` | `string` | v-model update for search input. |
1430
- | `search` | `string` | Debounced search value. |
1431
- | `load-more` | -- | Infinite scroll threshold reached. |
1432
- | `pull-refresh` | -- | Mobile pull-to-refresh triggered. |
1433
- | `state-save` | `DataTablePersistedState` | State saved to storage. |
1434
- | `state-restore` | `DataTablePersistedState` | State restored from storage. |
1435
- | `update:activeItemId` | `string \| undefined` | v-model update for active row. |
1541
+ | Event | Payload | Description |
1542
+ | --------------------- | ------------------------- | ---------------------------------- |
1543
+ | `pagination-click` | `number` | Page button clicked. |
1544
+ | `update:searchValue` | `string` | v-model update for search input. |
1545
+ | `search` | `string` | Debounced search value. |
1546
+ | `load-more` | -- | Infinite scroll threshold reached. |
1547
+ | `pull-refresh` | -- | Mobile pull-to-refresh triggered. |
1548
+ | `state-save` | `DataTablePersistedState` | State saved to storage. |
1549
+ | `state-restore` | `DataTablePersistedState` | State restored from storage. |
1550
+ | `update:activeItemId` | `string \| undefined` | v-model update for active row. |
1436
1551
 
1437
1552
  ---
1438
1553
 
1439
1554
  ## VcDataTable Slots Reference
1440
1555
 
1441
- | Slot | Props | Description |
1442
- |------|-------|-------------|
1443
- | `default` | -- | VcColumn declarations (required). |
1444
- | `header` | -- | Custom header content above the table. |
1445
- | `footer` | -- | Custom footer content below the table body. |
1446
- | `search-header-actions` | -- | Extra buttons in the search toolbar (beside filter icon). |
1447
- | `selection-banner` | `{ count, totalCount, isSelectAll, selectAll, clearSelection }` | Custom selection banner. |
1448
- | `expansion` | `{ data: T, index: number }` | Content rendered below an expanded row. |
1449
- | `empty` | -- | Custom empty state (no items, no search). |
1450
- | `not-found` | -- | Custom not-found state (no items + active search/filters). |
1451
- | `loading` | -- | Custom loading state. |
1452
- | `groupheader` | `{ data: T, index: number }` | Custom row group header. |
1453
- | `groupfooter` | `{ data: T, index: number }` | Custom row group footer. |
1454
- | `pagination` | `{ pages, currentPage, onPageClick }` | Custom pagination replacing built-in VcPagination. |
1556
+ | Slot | Props | Description |
1557
+ | ----------------------- | --------------------------------------------------------------- | ---------------------------------------------------------- |
1558
+ | `default` | -- | VcColumn declarations (required). |
1559
+ | `header` | -- | Custom header content above the table. |
1560
+ | `footer` | -- | Custom footer content below the table body. |
1561
+ | `search-header-actions` | -- | Extra buttons in the search toolbar (beside filter icon). |
1562
+ | `selection-banner` | `{ count, totalCount, isSelectAll, selectAll, clearSelection }` | Custom selection banner. |
1563
+ | `expansion` | `{ data: T, index: number }` | Content rendered below an expanded row. |
1564
+ | `empty` | -- | Custom empty state (no items, no search). |
1565
+ | `not-found` | -- | Custom not-found state (no items + active search/filters). |
1566
+ | `loading` | -- | Custom loading state. |
1567
+ | `groupheader` | `{ data: T, index: number }` | Custom row group header. |
1568
+ | `groupfooter` | `{ data: T, index: number }` | Custom row group footer. |
1569
+ | `pagination` | `{ pages, currentPage, onPageClick }` | Custom pagination replacing built-in VcPagination. |
1455
1570
 
1456
1571
  ---
1457
1572
 
@@ -1497,7 +1612,9 @@ A typical list blade with search, pagination, row actions, and empty states -- m
1497
1612
  icon: 'lucide-search-x',
1498
1613
  title: $t('PRODUCTS.LIST.NOT_FOUND'),
1499
1614
  actionLabel: $t('PRODUCTS.LIST.CLEAR_SEARCH'),
1500
- actionHandler: () => { searchValue = ''; },
1615
+ actionHandler: () => {
1616
+ searchValue = '';
1617
+ },
1501
1618
  }"
1502
1619
  @search="onSearch"
1503
1620
  @row-click="onRowClick"
@@ -1597,10 +1714,34 @@ Handle sorting and paging entirely on the backend:
1597
1714
  @sort="onSort"
1598
1715
  @pagination-click="onPage"
1599
1716
  >
1600
- <VcColumn id="number" field="number" title="Order #" sortable />
1601
- <VcColumn id="customer" field="customerName" title="Customer" sortable sort-field="customer.name" />
1602
- <VcColumn id="total" field="total" title="Total" type="money" sortable align="end" />
1603
- <VcColumn id="date" field="createdDate" title="Date" type="datetime" sortable />
1717
+ <VcColumn
1718
+ id="number"
1719
+ field="number"
1720
+ title="Order #"
1721
+ sortable
1722
+ />
1723
+ <VcColumn
1724
+ id="customer"
1725
+ field="customerName"
1726
+ title="Customer"
1727
+ sortable
1728
+ sort-field="customer.name"
1729
+ />
1730
+ <VcColumn
1731
+ id="total"
1732
+ field="total"
1733
+ title="Total"
1734
+ type="money"
1735
+ sortable
1736
+ align="end"
1737
+ />
1738
+ <VcColumn
1739
+ id="date"
1740
+ field="createdDate"
1741
+ title="Date"
1742
+ type="datetime"
1743
+ sortable
1744
+ />
1604
1745
  </VcDataTable>
1605
1746
  </template>
1606
1747
 
@@ -1611,7 +1752,11 @@ const page = ref(1);
1611
1752
 
1612
1753
  async function fetchOrders() {
1613
1754
  loading.value = true;
1614
- const { items, totalCount: total, pages } = await api.searchOrders({
1755
+ const {
1756
+ items,
1757
+ totalCount: total,
1758
+ pages,
1759
+ } = await api.searchOrders({
1615
1760
  sort: sortOrder.value !== 0 ? `${sortField.value}:${sortOrder.value === 1 ? "ASC" : "DESC"}` : undefined,
1616
1761
  skip: (page.value - 1) * 20,
1617
1762
  take: 20,
@@ -1622,8 +1767,14 @@ async function fetchOrders() {
1622
1767
  loading.value = false;
1623
1768
  }
1624
1769
 
1625
- function onSort() { page.value = 1; fetchOrders(); }
1626
- function onPage(p: number) { page.value = p; fetchOrders(); }
1770
+ function onSort() {
1771
+ page.value = 1;
1772
+ fetchOrders();
1773
+ }
1774
+ function onPage(p: number) {
1775
+ page.value = p;
1776
+ fetchOrders();
1777
+ }
1627
1778
  </script>
1628
1779
  ```
1629
1780
 
@@ -1640,11 +1791,42 @@ function onPage(p: number) { page.value = p; fetchOrders(); }
1640
1791
  @row-add="onRowAdd"
1641
1792
  @row-remove="onRowRemove"
1642
1793
  >
1643
- <VcColumn id="sku" field="sku" title="SKU" editable />
1644
- <VcColumn id="name" field="name" title="Product Name" editable />
1645
- <VcColumn id="listPrice" field="listPrice" title="List Price" type="money" editable align="end" />
1646
- <VcColumn id="salePrice" field="salePrice" title="Sale Price" type="money" editable align="end" />
1647
- <VcColumn id="minQuantity" field="minQuantity" title="Min Qty" type="number" editable align="end" />
1794
+ <VcColumn
1795
+ id="sku"
1796
+ field="sku"
1797
+ title="SKU"
1798
+ editable
1799
+ />
1800
+ <VcColumn
1801
+ id="name"
1802
+ field="name"
1803
+ title="Product Name"
1804
+ editable
1805
+ />
1806
+ <VcColumn
1807
+ id="listPrice"
1808
+ field="listPrice"
1809
+ title="List Price"
1810
+ type="money"
1811
+ editable
1812
+ align="end"
1813
+ />
1814
+ <VcColumn
1815
+ id="salePrice"
1816
+ field="salePrice"
1817
+ title="Sale Price"
1818
+ type="money"
1819
+ editable
1820
+ align="end"
1821
+ />
1822
+ <VcColumn
1823
+ id="minQuantity"
1824
+ field="minQuantity"
1825
+ title="Min Qty"
1826
+ type="number"
1827
+ editable
1828
+ align="end"
1829
+ />
1648
1830
  </VcDataTable>
1649
1831
  </template>
1650
1832
 
@@ -1653,8 +1835,7 @@ const rules = {
1653
1835
  sku: (v: unknown) => (v ? true : "SKU is required"),
1654
1836
  name: (v: unknown) => (v ? true : "Name is required"),
1655
1837
  listPrice: (v: unknown) => (Number(v) > 0 ? true : "Must be greater than 0"),
1656
- salePrice: (v: unknown, row: any) =>
1657
- Number(v) <= Number(row.listPrice) ? true : "Sale price cannot exceed list price",
1838
+ salePrice: (v: unknown, row: any) => (Number(v) <= Number(row.listPrice) ? true : "Sale price cannot exceed list price"),
1658
1839
  };
1659
1840
 
1660
1841
  function onSave(event: { changes: EditChange[] }) {
@@ -1798,13 +1979,13 @@ const isSelectable = (item) => item.stock > 0;
1798
1979
 
1799
1980
  ## Related Components
1800
1981
 
1801
- | Component | Description |
1802
- |-----------|-------------|
1982
+ | Component | Description |
1983
+ | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
1803
1984
  | **VcTableAdapter** (`VcTable`) | Legacy API wrapper around VcDataTable. Exported as `VcTable` for backward compatibility. Use VcDataTable directly for new code. |
1804
- | **VcColumn** | Renderless column definition component. Must be a direct child of VcDataTable. |
1805
- | **TableColumnSwitcher** | Column visibility panel -- built into VcDataTable, no separate usage needed. |
1806
- | **VcPagination** | Pagination molecule -- used internally when the `pagination` prop is set. Can be used standalone. |
1807
- | **TableSearchHeader** | Search bar + toolbar -- built into VcDataTable when `searchable` is `true`. |
1985
+ | **VcColumn** | Renderless column definition component. Must be a direct child of VcDataTable. |
1986
+ | **TableColumnSwitcher** | Column visibility panel -- built into VcDataTable, no separate usage needed. |
1987
+ | **VcPagination** | Pagination molecule -- used internally when the `pagination` prop is set. Can be used standalone. |
1988
+ | **TableSearchHeader** | Search bar + toolbar -- built into VcDataTable when `searchable` is `true`. |
1808
1989
 
1809
1990
  ---
1810
1991