@vc-shell/vc-app-skill 2.1.0-pr255.4dc5c0d → 2.1.0-pr256.0fe3abb
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/runtime/knowledge/docs/core/api/platform.docs.md +20 -18
- package/runtime/knowledge/docs/core/blade-navigation/blade-nav-composables.docs.md +43 -34
- package/runtime/knowledge/docs/core/blade-navigation/table-query-state/useTableQueryState.docs.md +95 -0
- package/runtime/knowledge/docs/core/composables/useAppBarMobileButtons/useAppBarMobileButtons.docs.md +5 -3
- package/runtime/knowledge/docs/core/composables/useAppBarWidget/useAppBarWidget.docs.md +12 -10
- package/runtime/knowledge/docs/core/composables/useAppInsights/useAppInsights.docs.md +7 -5
- package/runtime/knowledge/docs/core/composables/useAssets/useAssets.docs.md +8 -6
- package/runtime/knowledge/docs/core/composables/useAssetsManager/useAssetsManager.docs.md +3 -1
- package/runtime/knowledge/docs/core/composables/useAsync/useAsync.docs.md +1 -1
- package/runtime/knowledge/docs/core/composables/useBladeRegistry/useBladeRegistry.docs.md +8 -5
- package/runtime/knowledge/docs/core/composables/useBladeWidgets/index.docs.md +12 -12
- package/runtime/knowledge/docs/core/composables/useBreadcrumbs/useBreadcrumbs.docs.md +3 -3
- package/runtime/knowledge/docs/core/composables/useConnectionStatus/useConnectionStatus.docs.md +4 -3
- package/runtime/knowledge/docs/core/composables/useDynamicProperties/useDynamicProperties.docs.md +1 -0
- package/runtime/knowledge/docs/core/composables/useFunctions/useFunctions.docs.md +3 -3
- package/runtime/knowledge/docs/core/composables/useKeyboardNavigation/useKeyboardNavigation.docs.md +5 -4
- package/runtime/knowledge/docs/core/composables/useLanguages/useLanguages.docs.md +3 -3
- package/runtime/knowledge/docs/core/composables/useLoading/useLoading.docs.md +2 -0
- package/runtime/knowledge/docs/core/composables/useModificationTracker/useModificationTracker.docs.md +1 -2
- package/runtime/knowledge/docs/core/composables/useNotifications/useNotifications.docs.md +1 -1
- package/runtime/knowledge/docs/core/composables/usePermissions/usePermissions.docs.md +3 -3
- package/runtime/knowledge/docs/core/composables/usePlatformLocaleSync/usePlatformLocaleSync.docs.md +35 -0
- package/runtime/knowledge/docs/core/composables/usePopup/usePopup.docs.md +1 -1
- package/runtime/knowledge/docs/core/composables/useResponsive/useResponsive.docs.md +2 -2
- package/runtime/knowledge/docs/core/composables/useSettings/useSettings.docs.md +2 -1
- package/runtime/knowledge/docs/core/composables/useSettingsMenu/useSettingsMenu.docs.md +18 -18
- package/runtime/knowledge/docs/core/composables/useSidebarState/useSidebarState.docs.md +3 -3
- package/runtime/knowledge/docs/core/composables/useSlowNetworkDetection/useSlowNetworkDetection.docs.md +10 -7
- package/runtime/knowledge/docs/core/composables/useTheme/useTheme.docs.md +7 -7
- package/runtime/knowledge/docs/core/composables/useToolbar/useToolbar.docs.md +18 -12
- package/runtime/knowledge/docs/core/composables/useUser/useUser.docs.md +2 -2
- package/runtime/knowledge/docs/core/composables/useUserManagement/useUserManagement.docs.md +20 -20
- package/runtime/knowledge/docs/core/composables/useWidgets/useWidgets.docs.md +15 -24
- package/runtime/knowledge/docs/core/directives/loading/loading.docs.md +2 -2
- package/runtime/knowledge/docs/core/notifications/composables/useBladeNotifications.docs.md +183 -0
- package/runtime/knowledge/docs/core/notifications/composables/useBroadcastFilter.docs.md +117 -0
- package/runtime/knowledge/docs/core/notifications/composables/useNotificationContext.docs.md +150 -0
- package/runtime/knowledge/docs/core/notifications/composables/useNotificationStore.docs.md +114 -0
- package/runtime/knowledge/docs/core/notifications/notifications.docs.md +50 -30
- package/runtime/knowledge/docs/core/plugins/ai-agent/ai-agent.docs.md +30 -11
- package/runtime/knowledge/docs/core/plugins/extension-points/extension-points.docs.md +1 -1
- package/runtime/knowledge/docs/core/plugins/global-error-handler/global-error-handler.docs.md +2 -3
- package/runtime/knowledge/docs/core/plugins/modularity/modularity.docs.md +26 -26
- package/runtime/knowledge/docs/core/plugins/permissions/permissions.docs.md +2 -3
- package/runtime/knowledge/docs/core/plugins/signalR/signalR.docs.md +11 -50
- package/runtime/knowledge/docs/core/plugins/validation/validation.docs.md +9 -6
- package/runtime/knowledge/docs/core/services/services.docs.md +15 -13
- package/runtime/knowledge/docs/core/types/types.docs.md +37 -40
- package/runtime/knowledge/docs/core/utilities/date/date-utilities.docs.md +1 -2
- package/runtime/knowledge/docs/core/utilities/shared-utilities.docs.md +21 -30
- package/runtime/knowledge/docs/core/utilities/thumbnail/thumbnail.docs.md +2 -2
- package/runtime/knowledge/docs/core/utilities/utilities.docs.md +9 -8
- package/runtime/knowledge/docs/injection-keys.docs.md +6 -11
- package/runtime/knowledge/docs/modules/assets/assets-details.docs.md +123 -0
- package/runtime/knowledge/docs/modules/assets-manager/assets-manager.docs.md +1 -1
- package/runtime/knowledge/docs/shell/_internal/popup/common/popup-common.docs.md +20 -12
- package/runtime/knowledge/docs/shell/auth/ChangePasswordPage/change-password-page.docs.md +10 -10
- package/runtime/knowledge/docs/shell/auth/ForgotPasswordPage/forgot-password-page.docs.md +6 -6
- package/runtime/knowledge/docs/shell/auth/InvitePage/invite-page.docs.md +4 -4
- package/runtime/knowledge/docs/shell/auth/LoginPage/login-page.docs.md +16 -14
- package/runtime/knowledge/docs/shell/auth/ResetPasswordPage/reset-password-page.docs.md +1 -1
- package/runtime/knowledge/docs/shell/auth/sign-in/sign-in.docs.md +12 -11
- package/runtime/knowledge/docs/shell/components/change-password/change-password.docs.md +10 -3
- package/runtime/knowledge/docs/shell/components/change-password-button/change-password-button.docs.md +3 -3
- package/runtime/knowledge/docs/shell/components/error-interceptor/error-interceptor.docs.md +9 -2
- package/runtime/knowledge/docs/shell/components/language-selector/language-selector.docs.md +4 -2
- package/runtime/knowledge/docs/shell/components/logout-button/logout-button.docs.md +1 -1
- package/runtime/knowledge/docs/shell/components/notification-dropdown/notification-dropdown.docs.md +35 -31
- package/runtime/knowledge/docs/shell/components/notification-template/notification-template.docs.md +17 -11
- package/runtime/knowledge/docs/shell/components/settings-menu/settings-menu.docs.md +8 -7
- package/runtime/knowledge/docs/shell/components/settings-menu-item/settings-menu-item.docs.md +23 -21
- package/runtime/knowledge/docs/shell/components/sidebar/sidebar.docs.md +5 -3
- package/runtime/knowledge/docs/shell/components/theme-selector/theme-selector.docs.md +7 -7
- package/runtime/knowledge/docs/shell/components/user-dropdown-button/user-dropdown-button.docs.md +11 -11
- package/runtime/knowledge/docs/shell/dashboard/dashboard-charts/dashboard-charts.docs.md +28 -16
- package/runtime/knowledge/docs/shell/dashboard/dashboard-widget-card/dashboard-widget-card.docs.md +17 -19
- package/runtime/knowledge/docs/shell/dashboard/draggable-dashboard/dashboard-widget-skeleton.docs.md +33 -0
- package/runtime/knowledge/docs/shell/dashboard/draggable-dashboard/draggable-dashboard.docs.md +21 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-badge/vc-badge.docs.md +2 -1
- package/runtime/knowledge/docs/ui/components/atoms/vc-banner/vc-banner.docs.md +2 -2
- package/runtime/knowledge/docs/ui/components/atoms/vc-button/vc-button.docs.md +15 -14
- package/runtime/knowledge/docs/ui/components/atoms/vc-container/vc-container.docs.md +9 -6
- package/runtime/knowledge/docs/ui/components/atoms/vc-environment-banner/vc-environment-banner.docs.md +42 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-hint/vc-hint.docs.md +1 -1
- package/runtime/knowledge/docs/ui/components/atoms/vc-icon/vc-icon.docs.md +10 -9
- package/runtime/knowledge/docs/ui/components/atoms/vc-image/vc-image.docs.md +19 -4
- package/runtime/knowledge/docs/ui/components/atoms/vc-label/vc-label.docs.md +2 -2
- package/runtime/knowledge/docs/ui/components/atoms/vc-link/vc-link.docs.md +5 -4
- package/runtime/knowledge/docs/ui/components/atoms/vc-loading/vc-loading.docs.md +5 -4
- package/runtime/knowledge/docs/ui/components/atoms/vc-progress/vc-progress.docs.md +9 -8
- package/runtime/knowledge/docs/ui/components/atoms/vc-scrollable-container/vc-scrollable-container.docs.md +7 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-skeleton/vc-skeleton.docs.md +1 -1
- package/runtime/knowledge/docs/ui/components/atoms/vc-status/vc-status.docs.md +2 -2
- package/runtime/knowledge/docs/ui/components/atoms/vc-status-icon/vc-status-icon.docs.md +1 -1
- package/runtime/knowledge/docs/ui/components/atoms/vc-tooltip/vc-tooltip.docs.md +11 -10
- package/runtime/knowledge/docs/ui/components/atoms/vc-video/vc-video.docs.md +28 -8
- package/runtime/knowledge/docs/ui/components/atoms/vc-widget/vc-widget.docs.md +22 -19
- package/runtime/knowledge/docs/ui/components/molecules/multilanguage-selector/multilanguage-selector.docs.md +8 -8
- package/runtime/knowledge/docs/ui/components/molecules/vc-accordion/vc-accordion.docs.md +16 -6
- package/runtime/knowledge/docs/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.docs.md +9 -8
- package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox/vc-checkbox.docs.md +42 -34
- package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox-group/vc-checkbox-group.docs.md +1 -1
- package/runtime/knowledge/docs/ui/components/molecules/vc-color-input/vc-color-input.docs.md +14 -1
- package/runtime/knowledge/docs/ui/components/molecules/vc-date-picker/vc-date-picker.docs.md +3 -1
- package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown/vc-dropdown.docs.md +34 -33
- package/runtime/knowledge/docs/ui/components/molecules/vc-editor/vc-editor.docs.md +26 -24
- package/runtime/knowledge/docs/ui/components/molecules/vc-field/vc-field.docs.md +12 -14
- package/runtime/knowledge/docs/ui/components/molecules/vc-file-upload/vc-file-upload.docs.md +30 -30
- package/runtime/knowledge/docs/ui/components/molecules/vc-input/vc-input.docs.md +2 -2
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-currency/vc-input-currency.docs.md +1 -1
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.docs.md +34 -31
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-group/vc-input-group.docs.md +14 -12
- package/runtime/knowledge/docs/ui/components/molecules/vc-menu/vc-menu.docs.md +1 -1
- package/runtime/knowledge/docs/ui/components/molecules/vc-multivalue/vc-multivalue.docs.md +36 -27
- package/runtime/knowledge/docs/ui/components/molecules/vc-pagination/vc-pagination.docs.md +5 -1
- package/runtime/knowledge/docs/ui/components/molecules/{vc-dropdown-panel/vc-dropdown-panel.docs.md → vc-popover/vc-popover.docs.md} +26 -25
- package/runtime/knowledge/docs/ui/components/molecules/vc-radio-button/vc-radio-button.docs.md +10 -9
- package/runtime/knowledge/docs/ui/components/molecules/vc-select/vc-select.docs.md +44 -19
- package/runtime/knowledge/docs/ui/components/molecules/vc-slider/vc-slider.docs.md +11 -11
- package/runtime/knowledge/docs/ui/components/molecules/vc-switch/vc-switch.docs.md +15 -14
- package/runtime/knowledge/docs/ui/components/molecules/vc-textarea/vc-textarea.docs.md +15 -15
- package/runtime/knowledge/docs/ui/components/molecules/vc-toast/vc-toast.docs.md +15 -13
- package/runtime/knowledge/docs/ui/components/organisms/vc-app/vc-app.docs.md +5 -1
- package/runtime/knowledge/docs/ui/components/organisms/vc-auth-layout/vc-auth-layout.docs.md +18 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-blade/vc-blade.docs.md +48 -78
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/composables/table-composables.docs.md +9 -11
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/vc-data-table.docs.md +71 -43
- package/runtime/knowledge/docs/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.docs.md +27 -20
- package/runtime/knowledge/docs/ui/components/organisms/vc-gallery/vc-gallery.docs.md +2 -2
- package/runtime/knowledge/docs/ui/components/organisms/vc-image-upload/vc-image-upload.docs.md +12 -12
- package/runtime/knowledge/docs/ui/components/organisms/vc-popup/vc-popup.docs.md +33 -24
- package/runtime/knowledge/docs/ui/components/organisms/vc-scheduler/vc-scheduler.docs.md +412 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-sidebar/vc-sidebar.docs.md +43 -26
- package/runtime/knowledge/docs/ui/composables/ui-composables.docs.md +15 -9
- package/runtime/knowledge/docs/ui/composables/useDataTableSort.docs.md +8 -6
- package/runtime/knowledge/docs/ui/composables/useTableSearch.docs.md +130 -0
- package/runtime/knowledge/docs/ui/composables/useTableSelection.docs.md +4 -4
- package/runtime/knowledge/docs/ui/composables/useTableSort.docs.md +2 -3
|
@@ -19,7 +19,7 @@ Columns are defined as `<VcColumn>` child components -- no configuration objects
|
|
|
19
19
|
|
|
20
20
|
**Key facts:**
|
|
21
21
|
|
|
22
|
-
-
|
|
22
|
+
- 90 Storybook stories covering every feature permutation
|
|
23
23
|
- Automatic mobile card view on small screens
|
|
24
24
|
- State persistence (column widths, order, sort, filters) to localStorage/sessionStorage
|
|
25
25
|
- Full TypeScript generics -- `VcDataTable<Product>` propagates types to events and slots
|
|
@@ -266,10 +266,10 @@ Clicking a sortable column header cycles: unsorted -> ascending -> descending.
|
|
|
266
266
|
|
|
267
267
|
### Removable Sort
|
|
268
268
|
|
|
269
|
-
|
|
269
|
+
Enabled by default: the sort cycle is 3-state (asc -> desc -> none), so users can remove sorting entirely. Set `:removable-sort="false"` to force the 2-state cycle (asc -> desc):
|
|
270
270
|
|
|
271
271
|
```vue
|
|
272
|
-
<VcDataTable :items="products" :removable-sort="
|
|
272
|
+
<VcDataTable :items="products" :removable-sort="false">
|
|
273
273
|
<VcColumn id="name" field="name" title="Name" sortable />
|
|
274
274
|
</VcDataTable>
|
|
275
275
|
```
|
|
@@ -1109,8 +1109,14 @@ async function load() {
|
|
|
1109
1109
|
});
|
|
1110
1110
|
}
|
|
1111
1111
|
|
|
1112
|
+
// The initial load reads the values already restored from the URL.
|
|
1112
1113
|
onMounted(() => load());
|
|
1113
|
-
|
|
1114
|
+
|
|
1115
|
+
// Reset to page 1 when the search changes, BEFORE the reload watcher fires.
|
|
1116
|
+
watch(searchValue, () => pagination.setPage(1));
|
|
1117
|
+
|
|
1118
|
+
// Reload whenever any query dimension changes.
|
|
1119
|
+
watch([sortExpression, searchValue, () => pagination.skip], () => load());
|
|
1114
1120
|
</script>
|
|
1115
1121
|
|
|
1116
1122
|
<template>
|
|
@@ -1140,6 +1146,12 @@ watch(sortExpression, () => load());
|
|
|
1140
1146
|
|
|
1141
1147
|
The `state-key` on `VcDataTable` here persists column layout to localStorage; the `stateKey` passed to the composables persists query state to the URL. Both use the same string value but serve different purposes.
|
|
1142
1148
|
|
|
1149
|
+
!!! warning "Reset the page to 1 when the search changes"
|
|
1150
|
+
`watch(searchValue, () => pagination.setPage(1))` is required, not optional. Without it, searching while on a later page leaves a stale `<stateKey>_page` in the URL. On the next reload the list requests that page of the **filtered** result set — `skip` overshoots the (smaller) result count and the table renders an empty "nothing found" state even though matches exist on page 1. Resetting to page 1 drops `_page` from the URL and keeps the `(search, page)` pair consistent. Apply the same reset whenever a filter changes.
|
|
1151
|
+
|
|
1152
|
+
!!! tip "Composable-owned pagination"
|
|
1153
|
+
When `useDataTablePagination` lives inside a list composable (so `onPageChange` can drive the fetch), thread the `stateKey` through as a composable option (`useOffersList({ stateKey })`) instead of hard-coding it — the blade still owns the key. Make sure the **initial** load passes `skip: pagination.skip` so a restored page is applied on first paint.
|
|
1154
|
+
|
|
1143
1155
|
---
|
|
1144
1156
|
|
|
1145
1157
|
## Row Actions
|
|
@@ -1365,38 +1377,39 @@ function onRowRemove(event: { data: Product; index: number; cancel: () => void }
|
|
|
1365
1377
|
|
|
1366
1378
|
### Props
|
|
1367
1379
|
|
|
1368
|
-
| Prop | Type
|
|
1369
|
-
| ------------------- |
|
|
1370
|
-
| `id` | `string`
|
|
1371
|
-
| `field` | `string`
|
|
1372
|
-
| `title` | `string`
|
|
1373
|
-
| `type` | `CellType`
|
|
1374
|
-
| `currencyField` | `string`
|
|
1375
|
-
| `format` | `string`
|
|
1376
|
-
| `width` | `string \| number`
|
|
1377
|
-
| `minWidth` | `string \| number`
|
|
1378
|
-
| `maxWidth` | `string \| number`
|
|
1379
|
-
| `align` | `"start" \| "center" \| "end"`
|
|
1380
|
-
| `headerAlign` | `"start" \| "center" \| "end"`
|
|
1381
|
-
| `sortable` | `boolean`
|
|
1382
|
-
| `sortField` | `string`
|
|
1383
|
-
| `filter` | `ColumnFilterConfig`
|
|
1384
|
-
| `filterField` | `string`
|
|
1385
|
-
| `filterPlaceholder` | `string`
|
|
1386
|
-
| `visible` | `boolean`
|
|
1387
|
-
| `alwaysVisible` | `boolean`
|
|
1388
|
-
| `editable` | `boolean`
|
|
1389
|
-
| `rules` | `Record<string, unknown>`
|
|
1390
|
-
| `class` | `string`
|
|
1391
|
-
| `headerClass` | `string`
|
|
1392
|
-
| `bodyClass` | `string`
|
|
1393
|
-
| `lineClamp` | `number`
|
|
1394
|
-
| `selectionMode` | `"single" \| "multiple"`
|
|
1395
|
-
| `rowEditor` | `boolean`
|
|
1396
|
-
| `rowReorder` | `boolean`
|
|
1397
|
-
| `expander` | `boolean`
|
|
1398
|
-
| `mobileRole` | `"title" \| "image" \| "field" \| "status"`
|
|
1399
|
-
| `
|
|
1380
|
+
| Prop | Type | Default | Description |
|
|
1381
|
+
| ------------------- | -------------------------------------------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1382
|
+
| `id` | `string` | **required** | Unique column identifier. Must be unique within the table. |
|
|
1383
|
+
| `field` | `string` | same as `id` | Data field path to read from each row item. |
|
|
1384
|
+
| `title` | `string` | -- | Header text displayed in the column header. |
|
|
1385
|
+
| `type` | `CellType` | `"text"` | Cell formatter: `"text"`, `"number"`, `"money"`, `"date"`, `"datetime"`, `"date-ago"`, `"time"`, `"image"`, `"link"`, `"html"`, `"status"`, `"status-icon"`. |
|
|
1386
|
+
| `currencyField` | `string` | `"currency"` | Field to read currency code from (for `type="money"`). |
|
|
1387
|
+
| `format` | `string` | -- | Date/number format string (e.g. `"DD.MM.YYYY"`). |
|
|
1388
|
+
| `width` | `string \| number` | -- | Column width in px or CSS value (e.g. `200`, `"150px"`). |
|
|
1389
|
+
| `minWidth` | `string \| number` | -- | Minimum column width during resize. When unset, the engine applies a 40px minimum. |
|
|
1390
|
+
| `maxWidth` | `string \| number` | -- | Maximum column width during resize. |
|
|
1391
|
+
| `align` | `"start" \| "center" \| "end"` | -- | Cell text alignment. |
|
|
1392
|
+
| `headerAlign` | `"start" \| "center" \| "end"` | same as `align` | Header text alignment. |
|
|
1393
|
+
| `sortable` | `boolean` | `false` | Enable sorting on this column. |
|
|
1394
|
+
| `sortField` | `string` | same as `id` | Backend field name used in sort events. |
|
|
1395
|
+
| `filter` | `ColumnFilterConfig` | -- | Filter config: `true` (text), `"field"` (text with custom field), `{ options }` (select), `{ range }` (date range). |
|
|
1396
|
+
| `filterField` | `string` | same as `id` | Backend field name used in filter events. |
|
|
1397
|
+
| `filterPlaceholder` | `string` | -- | Placeholder text for the filter input. |
|
|
1398
|
+
| `visible` | `boolean` | `true` | Initial visibility. Hidden columns can be toggled via column switcher. |
|
|
1399
|
+
| `alwaysVisible` | `boolean` | `false` | Keep visible when `showAllColumns=false` (blade narrows). |
|
|
1400
|
+
| `editable` | `boolean` | `false` | Enable inline editing for this column's cells. |
|
|
1401
|
+
| `rules` | `Record<string, unknown>` | -- | Validation rules for the editable cell. |
|
|
1402
|
+
| `class` | `string` | -- | CSS class applied to header and body cells. |
|
|
1403
|
+
| `headerClass` | `string` | -- | CSS class applied only to the header cell. |
|
|
1404
|
+
| `bodyClass` | `string` | -- | CSS class applied only to body cells. |
|
|
1405
|
+
| `lineClamp` | `number` | `2` | Max lines to display before truncating. `0` = no clamp. |
|
|
1406
|
+
| `selectionMode` | `"single" \| "multiple"` | -- | Renders a selection checkbox/radio column. |
|
|
1407
|
+
| `rowEditor` | `boolean` | `false` | Renders save/cancel buttons for row edit mode. |
|
|
1408
|
+
| `rowReorder` | `boolean` | `false` | Renders a drag handle for row reordering. |
|
|
1409
|
+
| `expander` | `boolean` | `false` | Renders an expand/collapse toggle. |
|
|
1410
|
+
| `mobileRole` | `"title" \| "image" \| "field" \| "status"` | -- | Role in mobile card layout. |
|
|
1411
|
+
| `mobilePosition` | `"top-left" \| "top-right" \| "bottom-left" \| "bottom-right"` | -- | Explicit grid position for the mobile card layout. |
|
|
1412
|
+
| `mobileVisible` | `boolean` | `true` | Whether column is visible on mobile. |
|
|
1400
1413
|
|
|
1401
1414
|
### Slots
|
|
1402
1415
|
|
|
@@ -1434,13 +1447,13 @@ function onRowRemove(event: { data: Product; index: number; cancel: () => void }
|
|
|
1434
1447
|
|
|
1435
1448
|
### Sorting
|
|
1436
1449
|
|
|
1437
|
-
| Prop | Type | Default | Description
|
|
1438
|
-
| --------------- | ------------------------ | ---------- |
|
|
1439
|
-
| `sortField` | `string` | -- | Currently sorted field. Use with `v-model:sortField`.
|
|
1440
|
-
| `sortOrder` | `1 \| -1 \| 0` | `0` | Sort direction. Use with `v-model:sortOrder`.
|
|
1441
|
-
| `sortMode` | `"single" \| "multiple"` | `"single"` | Single or multi-column sort.
|
|
1442
|
-
| `multiSortMeta` | `SortMeta[]` | `[]` | Multi-sort metadata. Use with `v-model:multiSortMeta`.
|
|
1443
|
-
| `removableSort` | `boolean` | `
|
|
1450
|
+
| Prop | Type | Default | Description |
|
|
1451
|
+
| --------------- | ------------------------ | ---------- | -------------------------------------------------------------------------- |
|
|
1452
|
+
| `sortField` | `string` | -- | Currently sorted field. Use with `v-model:sortField`. |
|
|
1453
|
+
| `sortOrder` | `1 \| -1 \| 0` | `0` | Sort direction. Use with `v-model:sortOrder`. |
|
|
1454
|
+
| `sortMode` | `"single" \| "multiple"` | `"single"` | Single or multi-column sort. |
|
|
1455
|
+
| `multiSortMeta` | `SortMeta[]` | `[]` | Multi-sort metadata. Use with `v-model:multiSortMeta`. |
|
|
1456
|
+
| `removableSort` | `boolean` | `true` | 3-state sort cycle (asc -> desc -> none). Set `false` for a 2-state cycle. |
|
|
1444
1457
|
|
|
1445
1458
|
### Editing
|
|
1446
1459
|
|
|
@@ -2070,6 +2083,21 @@ const isSelectable = (item) => item.stock > 0;
|
|
|
2070
2083
|
<VcDataTable :items="orders" state-key="orders-list">...</VcDataTable>
|
|
2071
2084
|
```
|
|
2072
2085
|
|
|
2086
|
+
### 9. Not resetting the page when the search changes
|
|
2087
|
+
|
|
2088
|
+
```ts
|
|
2089
|
+
// WRONG: search persists, but the page is not reset.
|
|
2090
|
+
// On a later page, the URL keeps `_page=3`; reloading a narrow search
|
|
2091
|
+
// requests page 3 of the filtered set → empty "nothing found" on reload.
|
|
2092
|
+
const { searchValue } = useTableSearch({ stateKey: "products_list" });
|
|
2093
|
+
watch([sortExpression, searchValue, () => pagination.skip], load);
|
|
2094
|
+
|
|
2095
|
+
// CORRECT: reset to page 1 before reloading on a new keyword.
|
|
2096
|
+
const { searchValue } = useTableSearch({ stateKey: "products_list" });
|
|
2097
|
+
watch(searchValue, () => pagination.setPage(1));
|
|
2098
|
+
watch([sortExpression, searchValue, () => pagination.skip], load);
|
|
2099
|
+
```
|
|
2100
|
+
|
|
2073
2101
|
---
|
|
2074
2102
|
|
|
2075
2103
|
## Related Components
|
|
@@ -46,20 +46,25 @@ The prop names match the `DynamicObjectProperty` shape returned by the platform
|
|
|
46
46
|
|
|
47
47
|
## Key Props
|
|
48
48
|
|
|
49
|
-
| Prop | Type
|
|
50
|
-
| -------------------- |
|
|
51
|
-
| `property` | `T`
|
|
52
|
-
| `modelValue` | `any`
|
|
53
|
-
| `valueType` | `string`
|
|
54
|
-
| `name` | `string`
|
|
55
|
-
| `required` | `boolean`
|
|
56
|
-
| `disabled` | `boolean`
|
|
57
|
-
| `dictionary` | `boolean`
|
|
58
|
-
| `multivalue` | `boolean`
|
|
59
|
-
| `multilanguage` | `boolean`
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
49
|
+
| Prop | Type | Default | Description |
|
|
50
|
+
| -------------------- | ---------------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
51
|
+
| `property` | `T` | _required_ | Property object with `id` and metadata |
|
|
52
|
+
| `modelValue` | `any` | _required_ | Current property value (v-model) |
|
|
53
|
+
| `valueType` | `string` | _required_ | Type: ShortText, LongText, Number, Integer, DateTime, Boolean, Measure, Color |
|
|
54
|
+
| `name` | `string` | _required_ | Property name for display and field identification |
|
|
55
|
+
| `required` | `boolean` | _required_ | Whether the field is required |
|
|
56
|
+
| `disabled` | `boolean` | `false` | Disables the input |
|
|
57
|
+
| `dictionary` | `boolean` | `false` | Uses VcSelect/VcMultivalue with options |
|
|
58
|
+
| `multivalue` | `boolean` | `false` | Supports multiple values |
|
|
59
|
+
| `multilanguage` | `boolean` | `false` | Supports localized values |
|
|
60
|
+
| `currentLanguage` | `string` | - | Active locale used for localized values |
|
|
61
|
+
| `optionsGetter` | `Function` | _required_ | Async loader for dictionary options, called as `(propertyId, keyword?, locale?)` |
|
|
62
|
+
| `measurementsGetter` | `Function` | - | Async loader for measurement units |
|
|
63
|
+
| `optionsValue` | `string` | `"id"` | Field on each option used as its value (VcSelect mapping) |
|
|
64
|
+
| `optionsLabel` | `string` | `"value"` | Inert. The option label is fixed to `"value"` when `multilanguage` is true and `"alias"` otherwise; only `optionsValue` is honored for VcSelect mapping. |
|
|
65
|
+
| `displayNames` | `{ name?; languageCode? }[]` | - | Localized display names used to resolve the field label per locale |
|
|
66
|
+
| `placeholder` | `string` | - | Placeholder text for the input |
|
|
67
|
+
| `rules` | `object` | - | Validation rules: `{ min, max, regex }` |
|
|
63
68
|
|
|
64
69
|
::storybook id="data-display-vcdynamicproperty--property-form" height="500"
|
|
65
70
|
|
|
@@ -99,8 +104,8 @@ async function loadProperties() {
|
|
|
99
104
|
properties.value = result;
|
|
100
105
|
}
|
|
101
106
|
|
|
102
|
-
async function loadDictionaryOptions(propertyId: string, keyword?: string) {
|
|
103
|
-
return await api.searchDictionaryItems(propertyId, keyword);
|
|
107
|
+
async function loadDictionaryOptions(propertyId: string, keyword?: string, locale?: string) {
|
|
108
|
+
return await api.searchDictionaryItems(propertyId, keyword, locale);
|
|
104
109
|
}
|
|
105
110
|
|
|
106
111
|
function handlePropertyUpdate(property: any, newValue: any) {
|
|
@@ -121,25 +126,27 @@ function handlePropertyUpdate(property: any, newValue: any) {
|
|
|
121
126
|
:dictionary="prop.isDictionary"
|
|
122
127
|
:multivalue="prop.isMultivalue"
|
|
123
128
|
:multilanguage="prop.isMultilanguage"
|
|
124
|
-
:options-getter="
|
|
125
|
-
@update:model-value="(
|
|
129
|
+
:options-getter="loadDictionaryOptions"
|
|
130
|
+
@update:model-value="(payload) => handlePropertyUpdate(prop, payload.value)"
|
|
126
131
|
/>
|
|
127
132
|
</div>
|
|
128
133
|
</template>
|
|
129
134
|
```
|
|
130
135
|
|
|
136
|
+
`update:model-value` emits an object, not a raw value: `{ value, dictionary?, locale?, unitOfMeasureId?, colorCode? }`. Read `payload.value` for the primary value; the other keys carry dictionary items, the active locale, the selected measure unit, and a color code where applicable. `optionsGetter` is invoked as `(propertyId, keyword?, locale?)` — bind it directly rather than wrapping the property id into the first argument.
|
|
137
|
+
|
|
131
138
|
::storybook id="data-display-vcdynamicproperty--required-with-validation" height="300"
|
|
132
139
|
|
|
133
140
|
## Recipe: Dynamic Property with Validation
|
|
134
141
|
|
|
135
142
|
```vue
|
|
136
|
-
<VcDynamicProperty :property="skuProperty" :model-value="skuProperty.values?.[0]?.value" value-type="ShortText" name="SKU" :required="true" :rules="{ regex: '^[A-Z0-9-]+$', min: 3, max: 50 }" @update:model-value="(
|
|
143
|
+
<VcDynamicProperty :property="skuProperty" :model-value="skuProperty.values?.[0]?.value" value-type="ShortText" name="SKU" :required="true" :rules="{ regex: '^[A-Z0-9-]+$', min: 3, max: 50 }" @update:model-value="(payload) => updateProperty(skuProperty, payload.value)" />
|
|
137
144
|
```
|
|
138
145
|
|
|
139
146
|
## Recipe: Measurement Property with Units
|
|
140
147
|
|
|
141
148
|
```vue
|
|
142
|
-
<VcDynamicProperty :property="weightProperty" :model-value="weightProperty.values?.[0]?.value" value-type="Measure" name="Weight" :measurements-getter="loadMeasurementUnits" @update:model-value="(
|
|
149
|
+
<VcDynamicProperty :property="weightProperty" :model-value="weightProperty.values?.[0]?.value" value-type="Measure" name="Weight" :measurements-getter="loadMeasurementUnits" @update:model-value="(payload) => updateProperty(weightProperty, payload.value)" />
|
|
143
150
|
```
|
|
144
151
|
|
|
145
152
|
## Common Mistakes
|
|
@@ -29,7 +29,7 @@ A responsive multi-image gallery with drag-and-drop reorder, file upload, lightb
|
|
|
29
29
|
| `multiple` | `boolean` | `false` | Allow selecting multiple files in upload dialog. |
|
|
30
30
|
| `loading` | `boolean` | `false` | Shows a loading overlay with spinner on the gallery. |
|
|
31
31
|
| `itemActions` | `{ preview?: boolean; edit?: boolean; remove?: boolean }` | `{ preview: true, edit: true, remove: true }` | Per-tile action visibility. |
|
|
32
|
-
| `rules` | `IValidationRules`
|
|
32
|
+
| `rules` | `keyof IValidationRules \| IValidationRules` | `undefined` | Validation rules for uploaded files. |
|
|
33
33
|
| `name` | `string` | `"Gallery"` | Field name for validation messages. |
|
|
34
34
|
| `accept` | `string` | `"image/*"` | Accepted file MIME types / extensions. Gallery is image-only by default — non-image files dropped from the OS are filtered out. Override (e.g. `"image/png,image/jpeg"`) to narrow further. |
|
|
35
35
|
| `size` | `"sm" \| "md" \| "lg"` | `"md"` | Tile size preset. Sizes are smaller on mobile. |
|
|
@@ -190,6 +190,6 @@ function handleRemove(image: ICommonAsset) {
|
|
|
190
190
|
## Related Components
|
|
191
191
|
|
|
192
192
|
- **VcImageUpload** -- single-image upload component
|
|
193
|
-
- **
|
|
193
|
+
- **VcGalleryItem** -- the internal tile component (`_internal/vc-gallery-item`) rendered for each image (topbar with name + drag handle, bottom tray with actions)
|
|
194
194
|
- **VcFileUpload** -- the file upload drop zone used in empty gallery state
|
|
195
195
|
- **VcLabel** -- used internally when `label` prop is set
|
package/runtime/knowledge/docs/ui/components/organisms/vc-image-upload/vc-image-upload.docs.md
CHANGED
|
@@ -19,18 +19,18 @@ A single-image upload organism that displays either a drag-and-drop upload zone
|
|
|
19
19
|
|
|
20
20
|
## Props
|
|
21
21
|
|
|
22
|
-
| Prop | Type
|
|
23
|
-
| ------------- |
|
|
24
|
-
| `image` | `ICommonAsset`
|
|
25
|
-
| `disabled` | `boolean`
|
|
26
|
-
| `loading` | `boolean`
|
|
27
|
-
| `accept` | `string`
|
|
28
|
-
| `rules` | `IValidationRules`
|
|
29
|
-
| `name` | `string`
|
|
30
|
-
| `icon` | `string`
|
|
31
|
-
| `placeholder` | `{ text: string; link: string }`
|
|
32
|
-
| `previewable` | `boolean`
|
|
33
|
-
| `removable` | `boolean`
|
|
22
|
+
| Prop | Type | Default | Description |
|
|
23
|
+
| ------------- | -------------------------------------------- | ---------------------------------- | ------------------------------------------------------------------- |
|
|
24
|
+
| `image` | `ICommonAsset` | `undefined` | The currently displayed image asset. |
|
|
25
|
+
| `disabled` | `boolean` | `false` | Disables upload and remove actions. |
|
|
26
|
+
| `loading` | `boolean` | `false` | Shows a loading spinner on the upload zone. |
|
|
27
|
+
| `accept` | `string` | `.jpg,.png,.jpeg,.webp,.heic,.svg` | Accepted file extensions. |
|
|
28
|
+
| `rules` | `keyof IValidationRules \| IValidationRules` | `undefined` | Validation rules (rule name or object, e.g. `{ fileWeight: 300 }`). |
|
|
29
|
+
| `name` | `string` | `"Image"` | Field name for validation messages. |
|
|
30
|
+
| `icon` | `string` | `"lucide-cloud-upload"` | Upload zone placeholder icon. |
|
|
31
|
+
| `placeholder` | `{ text: string; link: string }` | `undefined` | Custom text for the upload zone. |
|
|
32
|
+
| `previewable` | `boolean` | `true` | Enables lightbox preview on click. |
|
|
33
|
+
| `removable` | `boolean` | `true` | Shows the remove action on the image tile. |
|
|
34
34
|
|
|
35
35
|
## Events
|
|
36
36
|
|
|
@@ -74,12 +74,14 @@ The `variant` prop adds a semantic icon and color to the popup. Available values
|
|
|
74
74
|
|
|
75
75
|
When `variant` is anything other than `"default"`, a large icon is rendered to the left of the content area:
|
|
76
76
|
|
|
77
|
-
| Variant | Icon | Color token
|
|
78
|
-
| --------- | ----------------------- |
|
|
79
|
-
| `warning` | `lucide-triangle-alert` | `--warning-500` |
|
|
80
|
-
| `error` | `lucide-circle-alert` | `--danger-500`
|
|
81
|
-
| `success` | `lucide-circle-check` | `--success-500` |
|
|
82
|
-
| `info` | `lucide-info` | `--info-500`
|
|
77
|
+
| Variant | Icon | Color token (default value) |
|
|
78
|
+
| --------- | ----------------------- | ---------------------------------------------- |
|
|
79
|
+
| `warning` | `lucide-triangle-alert` | `--popup-warning-icon-color` (`--warning-500`) |
|
|
80
|
+
| `error` | `lucide-circle-alert` | `--popup-error-icon-color` (`--danger-500`) |
|
|
81
|
+
| `success` | `lucide-circle-check` | `--popup-success-icon-color` (`--success-500`) |
|
|
82
|
+
| `info` | `lucide-info` | `--popup-info-icon-color` (`--info-500`) |
|
|
83
|
+
|
|
84
|
+
The icon color is overridable per variant via `--popup-<variant>-icon-color`.
|
|
83
85
|
|
|
84
86
|
### Title
|
|
85
87
|
|
|
@@ -140,10 +142,9 @@ The `close` event carries a `PopupCloseReason` string so you can react different
|
|
|
140
142
|
</VcPopup>
|
|
141
143
|
|
|
142
144
|
<script setup lang="ts">
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
function onClose(reason?:
|
|
146
|
-
// reason is "overlay" | "escape" | "action"
|
|
145
|
+
// The reason is the union `"overlay" | "escape" | "action"`.
|
|
146
|
+
// (`PopupCloseReason` is internal to vc-popup.vue and is not re-exported from the framework entry.)
|
|
147
|
+
function onClose(reason?: "overlay" | "escape" | "action") {
|
|
147
148
|
if (reason === "action") {
|
|
148
149
|
// User clicked a button
|
|
149
150
|
}
|
|
@@ -238,10 +239,10 @@ The `modalWidth` prop accepts a Tailwind CSS max-width class. The default is `"t
|
|
|
238
239
|
|
|
239
240
|
Two props control fullscreen behavior:
|
|
240
241
|
|
|
241
|
-
| Prop | Effect
|
|
242
|
-
| -------------------- |
|
|
243
|
-
| `isFullscreen` | Full viewport on **all** screen sizes
|
|
244
|
-
| `isMobileFullscreen` | Full viewport on **mobile only** (detected via `
|
|
242
|
+
| Prop | Effect |
|
|
243
|
+
| -------------------- | ---------------------------------------------------------------------------- |
|
|
244
|
+
| `isFullscreen` | Full viewport on **all** screen sizes |
|
|
245
|
+
| `isMobileFullscreen` | Full viewport on **mobile only** (detected via `useResponsive()` `isMobile`) |
|
|
245
246
|
|
|
246
247
|
```vue
|
|
247
248
|
<VcPopup v-model="open" title="Image Editor" is-fullscreen>
|
|
@@ -546,16 +547,24 @@ Or display a richer error popup in-template:
|
|
|
546
547
|
|
|
547
548
|
## CSS Custom Properties
|
|
548
549
|
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
|
552
|
-
|
|
|
553
|
-
| `--popup-
|
|
554
|
-
| `--popup-
|
|
555
|
-
| `--popup-
|
|
556
|
-
| `--popup-
|
|
557
|
-
| `--popup-
|
|
558
|
-
| `--popup-
|
|
550
|
+
> **Note:** New themes should override `--vc-popup-border-radius`, `--vc-popup-shadow`, and `--vc-popup-overlay-blur`. The `--popup-*` variables below are deprecated aliases kept for backward compatibility (the `--vc-popup-*` vars fall back to them).
|
|
551
|
+
|
|
552
|
+
| Variable | Default | Description |
|
|
553
|
+
| ---------------------------- | -------------------------------------------------------- | ------------------------------------ |
|
|
554
|
+
| `--popup-border-radius` | `6px` | Border radius of the dialog panel |
|
|
555
|
+
| `--popup-shadow` | `var(--shadow-md)` | Box shadow around the panel |
|
|
556
|
+
| `--popup-overlay-blur` | `var(--overlay-blur)` | Backdrop blur amount |
|
|
557
|
+
| `--popup-bg` | `var(--additional-50)` | Background color of the dialog panel |
|
|
558
|
+
| `--popup-header-color` | `var(--primary-700)` | Title text color |
|
|
559
|
+
| `--popup-content-text-color` | `var(--primary-700)` | Content text color |
|
|
560
|
+
| `--popup-footer-separator` | `var(--neutrals-200)` | Footer top border color |
|
|
561
|
+
| `--popup-overlay` | `var(--overlay-bg)` | Overlay background color |
|
|
562
|
+
| `--popup-close-btn-bg` | `var(--neutrals-100)` | Close button (X) background |
|
|
563
|
+
| `--popup-close-btn-bg-hover` | `color-mix(in srgb, var(--popup-close-btn-bg), #000 5%)` | Close button background on hover |
|
|
564
|
+
| `--popup-warning-icon-color` | `var(--warning-500)` | Warning variant icon color |
|
|
565
|
+
| `--popup-error-icon-color` | `var(--danger-500)` | Error variant icon color |
|
|
566
|
+
| `--popup-success-icon-color` | `var(--success-500)` | Success variant icon color |
|
|
567
|
+
| `--popup-info-icon-color` | `var(--info-500)` | Info variant icon color |
|
|
559
568
|
|
|
560
569
|
## Accessibility
|
|
561
570
|
|