@vc-shell/vc-app-skill 2.0.0-alpha.32 → 2.0.0-alpha.33-pr220.455e322
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +59 -47
- package/README.md +18 -12
- package/package.json +4 -4
- package/runtime/VERSION +1 -1
- package/runtime/agents/api-analyzer.md +31 -16
- package/runtime/agents/blade-enhancer.md +15 -9
- package/runtime/agents/details-blade-generator.md +47 -31
- package/runtime/agents/list-blade-generator.md +21 -37
- package/runtime/agents/locales-generator.md +3 -0
- package/runtime/agents/migration-agent.md +94 -0
- package/runtime/agents/module-analyzer.md +2 -0
- package/runtime/agents/module-assembler.md +15 -0
- package/runtime/agents/promote-agent.md +15 -4
- package/runtime/agents/type-checker.md +11 -0
- package/runtime/knowledge/docs/_BUILD_HASH.md +1 -1
- package/runtime/knowledge/docs/core/api/platform.docs.md +30 -30
- package/runtime/knowledge/docs/core/blade-navigation/blade-nav-composables.docs.md +41 -41
- package/runtime/knowledge/docs/core/composables/bladeContext/index.docs.md +12 -10
- package/runtime/knowledge/docs/core/composables/useApiClient/useApiClient.docs.md +11 -14
- package/runtime/knowledge/docs/core/composables/useAppBarMobileButtons/useAppBarMobileButtons.docs.md +35 -35
- package/runtime/knowledge/docs/core/composables/useAppBarWidget/useAppBarWidget.docs.md +35 -35
- package/runtime/knowledge/docs/core/composables/useAppInsights/useAppInsights.docs.md +15 -15
- package/runtime/knowledge/docs/core/composables/useAssets/useAssets.docs.md +21 -18
- package/runtime/knowledge/docs/core/composables/useAssetsManager/useAssetsManager.docs.md +31 -27
- package/runtime/knowledge/docs/core/composables/useAsync/useAsync.docs.md +90 -61
- package/runtime/knowledge/docs/core/composables/useBeforeUnload/useBeforeUnload.docs.md +19 -18
- package/runtime/knowledge/docs/core/composables/useBlade/useBlade.docs.md +89 -68
- package/runtime/knowledge/docs/core/composables/useBladeForm/useBladeForm.docs.md +75 -19
- package/runtime/knowledge/docs/core/composables/useBladeRegistry/useBladeRegistry.docs.md +15 -15
- package/runtime/knowledge/docs/core/composables/useBladeWidgets/index.docs.md +74 -78
- package/runtime/knowledge/docs/core/composables/useBreadcrumbs/useBreadcrumbs.docs.md +11 -11
- package/runtime/knowledge/docs/core/composables/useConnectionStatus/useConnectionStatus.docs.md +27 -15
- package/runtime/knowledge/docs/core/composables/useDashboard/useDashboard.docs.md +30 -30
- package/runtime/knowledge/docs/core/composables/useDynamicProperties/useDynamicProperties.docs.md +34 -36
- package/runtime/knowledge/docs/core/composables/useErrorHandler/useErrorHandler.docs.md +44 -23
- package/runtime/knowledge/docs/core/composables/useFunctions/useFunctions.docs.md +14 -11
- package/runtime/knowledge/docs/core/composables/useKeyboardNavigation/useKeyboardNavigation.docs.md +47 -38
- package/runtime/knowledge/docs/core/composables/useLanguages/useLanguages.docs.md +37 -28
- package/runtime/knowledge/docs/core/composables/useLoading/useLoading.docs.md +23 -17
- package/runtime/knowledge/docs/core/composables/useMenuExpanded/index.docs.md +10 -10
- package/runtime/knowledge/docs/core/composables/useMenuService/useMenuService.docs.md +42 -42
- package/runtime/knowledge/docs/core/composables/useModificationTracker/useModificationTracker.docs.md +22 -12
- package/runtime/knowledge/docs/core/composables/useNotifications/useNotifications.docs.md +33 -41
- package/runtime/knowledge/docs/core/composables/usePermissions/usePermissions.docs.md +16 -16
- package/runtime/knowledge/docs/core/composables/usePopup/usePopup.docs.md +32 -24
- package/runtime/knowledge/docs/core/composables/useResponsive/useResponsive.docs.md +32 -11
- package/runtime/knowledge/docs/core/composables/useSettings/useSettings.docs.md +24 -15
- package/runtime/knowledge/docs/core/composables/useSettingsMenu/useSettingsMenu.docs.md +7 -7
- package/runtime/knowledge/docs/core/composables/useSidebarState/useSidebarState.docs.md +32 -24
- package/runtime/knowledge/docs/core/composables/useSlowNetworkDetection/useSlowNetworkDetection.docs.md +21 -17
- package/runtime/knowledge/docs/core/composables/useTheme/useTheme.docs.md +24 -24
- package/runtime/knowledge/docs/core/composables/useToolbar/useToolbar.docs.md +28 -31
- package/runtime/knowledge/docs/core/composables/useUser/useUser.docs.md +43 -24
- package/runtime/knowledge/docs/core/composables/useUserManagement/useUserManagement.docs.md +68 -48
- package/runtime/knowledge/docs/core/composables/useWebVitals/useWebVitals.docs.md +19 -19
- package/runtime/knowledge/docs/core/composables/useWidgets/useWidgets.docs.md +42 -47
- package/runtime/knowledge/docs/core/directives/autofocus/autofocus.docs.md +10 -4
- package/runtime/knowledge/docs/core/directives/loading/loading.docs.md +35 -20
- package/runtime/knowledge/docs/core/notifications/notifications.docs.md +36 -35
- package/runtime/knowledge/docs/core/plugins/ai-agent/ai-agent.docs.md +38 -38
- package/runtime/knowledge/docs/core/plugins/extension-points/extension-points.docs.md +107 -91
- package/runtime/knowledge/docs/core/plugins/global-error-handler/global-error-handler.docs.md +10 -10
- package/runtime/knowledge/docs/core/plugins/i18n/i18n.docs.md +21 -23
- package/runtime/knowledge/docs/core/plugins/modularity/modularity.docs.md +98 -90
- package/runtime/knowledge/docs/core/plugins/permissions/permissions.docs.md +10 -16
- package/runtime/knowledge/docs/core/plugins/signalR/signalR.docs.md +9 -9
- package/runtime/knowledge/docs/core/plugins/validation/validation.docs.md +65 -22
- package/runtime/knowledge/docs/core/services/services.docs.md +19 -22
- package/runtime/knowledge/docs/core/types/types.docs.md +40 -40
- package/runtime/knowledge/docs/core/utilities/date/date-utilities.docs.md +27 -27
- package/runtime/knowledge/docs/core/utilities/shared-utilities.docs.md +23 -23
- package/runtime/knowledge/docs/core/utilities/thumbnail/thumbnail.docs.md +22 -25
- package/runtime/knowledge/docs/core/utilities/utilities.docs.md +64 -64
- package/runtime/knowledge/docs/injection-keys.docs.md +52 -51
- package/runtime/knowledge/docs/modules/assets-manager/assets-manager.docs.md +9 -9
- package/runtime/knowledge/docs/shell/_internal/popup/common/popup-common.docs.md +23 -43
- package/runtime/knowledge/docs/shell/auth/ChangePasswordPage/change-password-page.docs.md +102 -0
- package/runtime/knowledge/docs/shell/auth/ForgotPasswordPage/forgot-password-page.docs.md +5 -5
- package/runtime/knowledge/docs/shell/auth/InvitePage/invite-page.docs.md +8 -7
- package/runtime/knowledge/docs/shell/auth/LoginPage/login-page.docs.md +7 -7
- package/runtime/knowledge/docs/shell/auth/ResetPasswordPage/reset-password-page.docs.md +8 -7
- package/runtime/knowledge/docs/shell/auth/sign-in/sign-in.docs.md +29 -13
- package/runtime/knowledge/docs/shell/components/change-password/change-password.docs.md +13 -16
- package/runtime/knowledge/docs/shell/components/change-password-button/change-password-button.docs.md +1 -7
- package/runtime/knowledge/docs/shell/components/error-interceptor/error-interceptor.docs.md +5 -5
- package/runtime/knowledge/docs/shell/components/language-selector/language-selector.docs.md +1 -1
- package/runtime/knowledge/docs/shell/components/logout-button/logout-button.docs.md +1 -1
- package/runtime/knowledge/docs/shell/components/notification-template/notification-template.docs.md +17 -9
- package/runtime/knowledge/docs/shell/components/settings-menu/settings-menu.docs.md +12 -18
- package/runtime/knowledge/docs/shell/components/settings-menu-item/settings-menu-item.docs.md +34 -65
- package/runtime/knowledge/docs/shell/components/sidebar/sidebar.docs.md +16 -26
- package/runtime/knowledge/docs/shell/components/theme-selector/theme-selector.docs.md +2 -2
- package/runtime/knowledge/docs/shell/components/user-dropdown-button/user-dropdown-button.docs.md +7 -9
- package/runtime/knowledge/docs/shell/dashboard/dashboard-charts/dashboard-charts.docs.md +30 -40
- package/runtime/knowledge/docs/shell/dashboard/dashboard-widget-card/dashboard-widget-card.docs.md +26 -19
- package/runtime/knowledge/docs/shell/dashboard/draggable-dashboard/draggable-dashboard.docs.md +15 -12
- package/runtime/knowledge/docs/ui/components/atoms/vc-badge/vc-badge.docs.md +15 -26
- package/runtime/knowledge/docs/ui/components/atoms/vc-banner/vc-banner.docs.md +21 -19
- package/runtime/knowledge/docs/ui/components/atoms/vc-button/vc-button.docs.md +83 -67
- package/runtime/knowledge/docs/ui/components/atoms/vc-card/vc-card.docs.md +104 -59
- package/runtime/knowledge/docs/ui/components/atoms/vc-col/vc-col.docs.md +28 -11
- package/runtime/knowledge/docs/ui/components/atoms/vc-container/vc-container.docs.md +20 -17
- package/runtime/knowledge/docs/ui/components/atoms/vc-hint/vc-hint.docs.md +26 -17
- package/runtime/knowledge/docs/ui/components/atoms/vc-icon/vc-icon.docs.md +30 -32
- package/runtime/knowledge/docs/ui/components/atoms/vc-image/vc-image.docs.md +25 -48
- package/runtime/knowledge/docs/ui/components/atoms/vc-label/vc-label.docs.md +29 -24
- package/runtime/knowledge/docs/ui/components/atoms/vc-link/vc-link.docs.md +23 -15
- package/runtime/knowledge/docs/ui/components/atoms/vc-loading/vc-loading.docs.md +22 -13
- package/runtime/knowledge/docs/ui/components/atoms/vc-progress/vc-progress.docs.md +33 -18
- package/runtime/knowledge/docs/ui/components/atoms/vc-row/vc-row.docs.md +56 -15
- package/runtime/knowledge/docs/ui/components/atoms/vc-scrollable-container/vc-scrollable-container.docs.md +28 -15
- package/runtime/knowledge/docs/ui/components/atoms/vc-skeleton/vc-skeleton.docs.md +40 -20
- package/runtime/knowledge/docs/ui/components/atoms/vc-status/vc-status.docs.md +25 -14
- package/runtime/knowledge/docs/ui/components/atoms/vc-status-icon/vc-status-icon.docs.md +40 -14
- package/runtime/knowledge/docs/ui/components/atoms/vc-tooltip/vc-tooltip.docs.md +54 -42
- package/runtime/knowledge/docs/ui/components/atoms/vc-video/vc-video.docs.md +17 -17
- package/runtime/knowledge/docs/ui/components/atoms/vc-widget/vc-widget.docs.md +21 -21
- package/runtime/knowledge/docs/ui/components/molecules/multilanguage-selector/multilanguage-selector.docs.md +23 -10
- package/runtime/knowledge/docs/ui/components/molecules/vc-accordion/vc-accordion.docs.md +59 -44
- package/runtime/knowledge/docs/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.docs.md +23 -20
- package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox/vc-checkbox.docs.md +96 -64
- package/runtime/knowledge/docs/ui/components/molecules/vc-checkbox-group/vc-checkbox-group.docs.md +26 -35
- package/runtime/knowledge/docs/ui/components/molecules/vc-color-input/vc-color-input.docs.md +69 -22
- package/runtime/knowledge/docs/ui/components/molecules/vc-date-picker/vc-date-picker.docs.md +58 -72
- package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown/vc-dropdown.docs.md +91 -85
- package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown-panel/vc-dropdown-panel.docs.md +38 -42
- package/runtime/knowledge/docs/ui/components/molecules/vc-editor/vc-editor.docs.md +60 -72
- package/runtime/knowledge/docs/ui/components/molecules/vc-field/vc-field.docs.md +65 -26
- package/runtime/knowledge/docs/ui/components/molecules/vc-file-upload/vc-file-upload.docs.md +46 -49
- package/runtime/knowledge/docs/ui/components/molecules/vc-form/vc-form.docs.md +35 -64
- package/runtime/knowledge/docs/ui/components/molecules/vc-image-tile/vc-image-tile.docs.md +38 -41
- package/runtime/knowledge/docs/ui/components/molecules/vc-input/vc-input.docs.md +115 -130
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-currency/vc-input-currency.docs.md +53 -87
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.docs.md +56 -63
- package/runtime/knowledge/docs/ui/components/molecules/vc-input-group/vc-input-group.docs.md +29 -24
- package/runtime/knowledge/docs/ui/components/molecules/vc-menu/vc-menu.docs.md +32 -28
- package/runtime/knowledge/docs/ui/components/molecules/vc-multivalue/vc-multivalue.docs.md +63 -64
- package/runtime/knowledge/docs/ui/components/molecules/vc-pagination/vc-pagination.docs.md +28 -26
- package/runtime/knowledge/docs/ui/components/molecules/vc-radio-button/vc-radio-button.docs.md +59 -19
- package/runtime/knowledge/docs/ui/components/molecules/vc-radio-group/vc-radio-group.docs.md +25 -34
- package/runtime/knowledge/docs/ui/components/molecules/vc-rating/vc-rating.docs.md +42 -32
- package/runtime/knowledge/docs/ui/components/molecules/vc-select/vc-select.docs.md +78 -82
- package/runtime/knowledge/docs/ui/components/molecules/vc-slider/vc-slider.docs.md +25 -15
- package/runtime/knowledge/docs/ui/components/molecules/vc-switch/vc-switch.docs.md +59 -63
- package/runtime/knowledge/docs/ui/components/molecules/vc-textarea/vc-textarea.docs.md +57 -69
- package/runtime/knowledge/docs/ui/components/molecules/vc-toast/vc-toast.docs.md +58 -57
- package/runtime/knowledge/docs/ui/components/organisms/vc-app/vc-app.docs.md +49 -26
- package/runtime/knowledge/docs/ui/components/organisms/vc-auth-layout/vc-auth-layout.docs.md +82 -28
- package/runtime/knowledge/docs/ui/components/organisms/vc-blade/vc-blade.docs.md +120 -75
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/composables/table-composables.docs.md +30 -44
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/vc-data-table.docs.md +536 -365
- package/runtime/knowledge/docs/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.docs.md +35 -52
- package/runtime/knowledge/docs/ui/components/organisms/vc-gallery/vc-gallery.docs.md +33 -62
- package/runtime/knowledge/docs/ui/components/organisms/vc-image-upload/vc-image-upload.docs.md +17 -23
- package/runtime/knowledge/docs/ui/components/organisms/vc-popup/vc-popup.docs.md +109 -68
- package/runtime/knowledge/docs/ui/components/organisms/vc-sidebar/vc-sidebar.docs.md +82 -44
- package/runtime/knowledge/docs/ui/composables/ui-composables.docs.md +8 -8
- package/runtime/knowledge/docs/ui/composables/useDataTablePagination.docs.md +164 -0
- package/runtime/knowledge/docs/ui/composables/useDataTableSort.docs.md +34 -26
- package/runtime/knowledge/docs/ui/composables/useTableSelection.docs.md +48 -40
- package/runtime/knowledge/docs/ui/composables/useTableSort.docs.md +30 -17
- package/runtime/knowledge/docs/ui/types/ui-types.docs.md +40 -29
- package/runtime/knowledge/examples/offers-module.md +15 -13
- package/runtime/knowledge/examples/team-module.md +82 -119
- package/runtime/knowledge/examples/videos-module.md +44 -17
- package/runtime/knowledge/index.md +22 -0
- package/runtime/knowledge/migration-prompts/blade-form-migration.md +255 -0
- package/runtime/knowledge/migration-prompts/blade-props-migration.md +194 -0
- package/runtime/knowledge/migration-prompts/datatable-migration.md +801 -0
- package/runtime/knowledge/migration-prompts/icon-migration.md +97 -0
- package/runtime/knowledge/migration-prompts/manual-migration-audit.md +117 -0
- package/runtime/knowledge/migration-prompts/notifications-migration.md +223 -0
- package/runtime/knowledge/migration-prompts/nswag-migration.md +244 -0
- package/runtime/knowledge/migration-prompts/use-assets-migration.md +164 -0
- package/runtime/knowledge/migration-prompts/use-data-table-pagination-migration.md +176 -0
- package/runtime/knowledge/migration-prompts/widgets-migration.md +178 -0
- package/runtime/knowledge/patterns/assets-management.md +20 -20
- package/runtime/knowledge/patterns/blade-navigation.md +7 -14
- package/runtime/knowledge/patterns/blade-widget.md +19 -17
- package/runtime/knowledge/patterns/child-blade-flow.md +19 -7
- package/runtime/knowledge/patterns/composable-details.md +20 -50
- package/runtime/knowledge/patterns/composable-list.md +43 -31
- package/runtime/knowledge/patterns/dashboard-widget.md +14 -16
- package/runtime/knowledge/patterns/datatable-pattern.md +521 -0
- package/runtime/knowledge/patterns/details-blade-pattern.md +78 -116
- package/runtime/knowledge/patterns/extension-points-usage.md +53 -44
- package/runtime/knowledge/patterns/form-validation.md +28 -64
- package/runtime/knowledge/patterns/list-blade-pattern.md +33 -21
- package/runtime/knowledge/patterns/module-structure.md +7 -1
- package/runtime/knowledge/patterns/multilanguage-fields.md +8 -14
- package/runtime/knowledge/patterns/notification-template.md +21 -14
- package/runtime/knowledge/patterns/signalr-notifications.md +30 -32
- package/runtime/knowledge/patterns/toolbar-pattern.md +18 -20
- package/runtime/vc-app.md +354 -49
- package/runtime/knowledge/docs/core/constants/constants.docs.md +0 -185
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
# Framework Constants
|
|
2
|
-
|
|
3
|
-
Default values and configuration constants exported from `@vc-shell/framework` via `core/constants/index.ts`.
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
Magic numbers scattered across a codebase make maintenance difficult and create inconsistencies. The vc-shell framework centralizes all layout dimensions, timing values, breakpoints, z-index layers, and component default props into a single constants module.
|
|
8
|
-
|
|
9
|
-
These constants are organized into three categories:
|
|
10
|
-
- **Top-level exports** -- standalone constants like `FALLBACK_BLADE_ID`
|
|
11
|
-
- **`UI_CONSTANTS`** -- layout, timing, and threshold values used by the framework's UI layer
|
|
12
|
-
- **`COMPONENT_DEFAULTS`** -- default prop values for each component type, accessible via `getComponentDefaults()`
|
|
13
|
-
- **`languageToCountryMap`** -- locale-to-country code mapping for flag resolution
|
|
14
|
-
|
|
15
|
-
All constants are importable from `@vc-shell/framework`.
|
|
16
|
-
|
|
17
|
-
## Top-Level Exports
|
|
18
|
-
|
|
19
|
-
| Constant | Value | Description |
|
|
20
|
-
|----------|-------|-------------|
|
|
21
|
-
| `FALLBACK_BLADE_ID` | `"fallback-blade-id"` | Default blade identifier when no ID is provided |
|
|
22
|
-
|
|
23
|
-
## UI Constants (`UI_CONSTANTS`)
|
|
24
|
-
|
|
25
|
-
Centralized magic numbers for layout, timing, and thresholds.
|
|
26
|
-
|
|
27
|
-
| Key | Value | Description |
|
|
28
|
-
|-----|-------|-------------|
|
|
29
|
-
| `GRID_COLUMNS` | `12` | Dashboard grid column count |
|
|
30
|
-
| `CELL_HEIGHT` | `80` | Dashboard cell height (px) |
|
|
31
|
-
| `WIDGET_GAP` | `20` | Dashboard widget gap (px) |
|
|
32
|
-
| `DEBOUNCE_DEFAULT_MS` | `500` | Default debounce delay |
|
|
33
|
-
| `HOVER_DELAY_MS` | `200` | Hover intent delay |
|
|
34
|
-
| `TOOLTIP_DELAY_MS` | `300` | Tooltip show delay |
|
|
35
|
-
| `RESIZE_DEBOUNCE_MS` | `100` | Window resize debounce |
|
|
36
|
-
| `ANIMATION_DURATION_MS` | `200` | Default animation duration |
|
|
37
|
-
| `TRANSITION_DURATION_MS` | `150` | Default CSS transition duration |
|
|
38
|
-
| `DRAG_THRESHOLD_PX` | `3` | Min px movement to start drag |
|
|
39
|
-
| `MAX_COLLISION_ITERATIONS` | `50` | Grid collision resolution limit |
|
|
40
|
-
| `MIN_COLUMN_WIDTH_PX` | `15` | Minimum table column width |
|
|
41
|
-
| `OVERFLOW_THRESHOLD` | `100` | Overflow detection threshold (px) |
|
|
42
|
-
| `PAGINATION_VISIBLE_PAGES` | `5` | Visible page buttons in paginator |
|
|
43
|
-
| `PAGINATION_EDGE_PAGES` | `3` | Edge page buttons shown |
|
|
44
|
-
| `TABLE_ROW_HEIGHT` | `48` | Table row height (px) |
|
|
45
|
-
| `TABLE_HEADER_HEIGHT` | `56` | Table header height (px) |
|
|
46
|
-
| `DEFAULT_MAXLENGTH` | `1024` | Default input maxlength |
|
|
47
|
-
| `DEFAULT_TEXTAREA_ROWS` | `3` | Default textarea rows |
|
|
48
|
-
| `MENU_COLLAPSED_WIDTH` | `76` | Sidebar collapsed width (px) |
|
|
49
|
-
| `MENU_EXPANDED_WIDTH` | `246` | Sidebar expanded width (px) |
|
|
50
|
-
| `MENU_ITEM_HEIGHT` | `38` | Menu item height (px) |
|
|
51
|
-
| `Z_INDEX.DROPDOWN` | `100` | Dropdown z-index |
|
|
52
|
-
| `Z_INDEX.TOOLTIP` | `9999` | Tooltip z-index |
|
|
53
|
-
| `Z_INDEX.POPUP` | `10000` | Popup z-index |
|
|
54
|
-
| `Z_INDEX.MODAL` | `10001` | Modal z-index |
|
|
55
|
-
| `Z_INDEX.DRAG` | `1000` | Drag overlay z-index |
|
|
56
|
-
| `Z_INDEX.SIDEBAR` | `50` | Sidebar z-index |
|
|
57
|
-
| `Z_INDEX.HEADER` | `40` | Header z-index |
|
|
58
|
-
| `BREAKPOINTS.XS` | `0` | Extra small breakpoint |
|
|
59
|
-
| `BREAKPOINTS.SM` | `576` | Small breakpoint |
|
|
60
|
-
| `BREAKPOINTS.MD` | `768` | Medium breakpoint |
|
|
61
|
-
| `BREAKPOINTS.LG` | `992` | Large breakpoint |
|
|
62
|
-
| `BREAKPOINTS.XL` | `1200` | Extra large breakpoint |
|
|
63
|
-
| `BREAKPOINTS.XXL` | `1400` | Extra extra large breakpoint |
|
|
64
|
-
|
|
65
|
-
## Component Defaults (`COMPONENT_DEFAULTS`)
|
|
66
|
-
|
|
67
|
-
Default prop values per component type. Access via `getComponentDefaults(name)`.
|
|
68
|
-
|
|
69
|
-
| Component | Property | Default | Description |
|
|
70
|
-
|-----------|----------|---------|-------------|
|
|
71
|
-
| `input` | `maxlength` | `1024` | Max input length |
|
|
72
|
-
| `input` | `debounce` | `0` | Input debounce (ms) |
|
|
73
|
-
| `input` | `type` | `"text"` | Input type attribute |
|
|
74
|
-
| `input` | `autocomplete` | `"off"` | Autocomplete attribute |
|
|
75
|
-
| `select` | `debounce` | `500` | Search debounce (ms) |
|
|
76
|
-
| `select` | `pageSize` | `20` | Items per page |
|
|
77
|
-
| `select` | `searchable` | `true` | Enable search |
|
|
78
|
-
| `select` | `clearable` | `true` | Show clear button |
|
|
79
|
-
| `table` | `pageSize` | `20` | Rows per page |
|
|
80
|
-
| `table` | `pageSizes` | `[10, 20, 50, 100]` | Page size options |
|
|
81
|
-
| `table` | `selectable` | `false` | Row selection |
|
|
82
|
-
| `table` | `multiselect` | `false` | Multi-row selection |
|
|
83
|
-
| `table` | `stickyHeader` | `true` | Sticky header |
|
|
84
|
-
| `pagination` | `pageSize` | `20` | Default page size |
|
|
85
|
-
| `pagination` | `visiblePages` | `5` | Visible page buttons |
|
|
86
|
-
| `textarea` | `rows` | `3` | Default rows |
|
|
87
|
-
| `textarea` | `maxlength` | `4096` | Max textarea length |
|
|
88
|
-
| `editor` | `minHeight` | `200` | Editor min height (px) |
|
|
89
|
-
| `editor` | `maxHeight` | `500` | Editor max height (px) |
|
|
90
|
-
| `tooltip` | `delay` | `300` | Show delay (ms) |
|
|
91
|
-
| `tooltip` | `placement` | `"top"` | Default placement |
|
|
92
|
-
| `modal` | `closeOnEscape` | `true` | Close on Esc key |
|
|
93
|
-
| `modal` | `closeOnOverlayClick` | `true` | Close on backdrop click |
|
|
94
|
-
| `notification` | `duration` | `5000` | Auto-dismiss (ms) |
|
|
95
|
-
| `notification` | `position` | `"top-right"` | Toast position |
|
|
96
|
-
| `dashboard` | `columns` | `12` | Grid columns |
|
|
97
|
-
| `dashboard` | `rowHeight` | `80` | Row height (px) |
|
|
98
|
-
| `dashboard` | `gap` | `20` | Widget gap (px) |
|
|
99
|
-
|
|
100
|
-
## Locale Constants (`languageToCountryMap`)
|
|
101
|
-
|
|
102
|
-
A `Record<string, string>` mapping ISO 639-1 language codes to ISO 3166-1 alpha-2 country codes. Contains 57 entries (e.g. `"en" -> "us"`, `"de" -> "de"`, `"ja" -> "jp"`). Used for flag icon resolution and locale fallback.
|
|
103
|
-
|
|
104
|
-
| Helper | Signature | Description |
|
|
105
|
-
|--------|-----------|-------------|
|
|
106
|
-
| `getComponentDefaults` | `<K extends keyof ComponentDefaults>(componentName: K) => ComponentDefaults[K]` | Type-safe accessor for component default values |
|
|
107
|
-
|
|
108
|
-
## Usage Examples
|
|
109
|
-
|
|
110
|
-
### Using UI constants in a composable
|
|
111
|
-
|
|
112
|
-
```typescript
|
|
113
|
-
import { UI_CONSTANTS } from "@vc-shell/framework";
|
|
114
|
-
|
|
115
|
-
function useCustomDebounce() {
|
|
116
|
-
// Use the framework's standard debounce delay
|
|
117
|
-
const debouncedSearch = useDebounceFn(
|
|
118
|
-
(query: string) => performSearch(query),
|
|
119
|
-
UI_CONSTANTS.DEBOUNCE_DEFAULT_MS,
|
|
120
|
-
);
|
|
121
|
-
return { debouncedSearch };
|
|
122
|
-
}
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
### Using component defaults
|
|
126
|
-
|
|
127
|
-
```typescript
|
|
128
|
-
import { getComponentDefaults } from "@vc-shell/framework";
|
|
129
|
-
|
|
130
|
-
// Get all default props for a select component
|
|
131
|
-
const selectDefaults = getComponentDefaults("select");
|
|
132
|
-
console.log(selectDefaults.debounce); // 500
|
|
133
|
-
console.log(selectDefaults.pageSize); // 20
|
|
134
|
-
console.log(selectDefaults.searchable); // true
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
### Using z-index layers in custom components
|
|
138
|
-
|
|
139
|
-
```typescript
|
|
140
|
-
import { UI_CONSTANTS } from "@vc-shell/framework";
|
|
141
|
-
|
|
142
|
-
// Ensure custom dropdowns sit at the right z-index layer
|
|
143
|
-
const dropdownStyle = computed(() => ({
|
|
144
|
-
zIndex: UI_CONSTANTS.Z_INDEX.DROPDOWN,
|
|
145
|
-
}));
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
### Using breakpoints for responsive logic
|
|
149
|
-
|
|
150
|
-
```typescript
|
|
151
|
-
import { UI_CONSTANTS } from "@vc-shell/framework";
|
|
152
|
-
|
|
153
|
-
const isMobile = computed(() =>
|
|
154
|
-
windowWidth.value < UI_CONSTANTS.BREAKPOINTS.MD,
|
|
155
|
-
);
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### Using the language-to-country map
|
|
159
|
-
|
|
160
|
-
```typescript
|
|
161
|
-
import { languageToCountryMap } from "@vc-shell/framework";
|
|
162
|
-
|
|
163
|
-
function getFlagUrl(locale: string): string {
|
|
164
|
-
const country = languageToCountryMap[locale] ?? "us";
|
|
165
|
-
return `https://flagcdn.com/w20/${country}.png`;
|
|
166
|
-
}
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
## Tip: Override Defaults at the Component Level
|
|
170
|
-
|
|
171
|
-
Component defaults serve as fallback values. Any prop explicitly set on a component instance takes precedence over `COMPONENT_DEFAULTS`. You do not need to modify the constants to change behavior for a single instance:
|
|
172
|
-
|
|
173
|
-
```vue
|
|
174
|
-
<!-- Uses default pageSize of 20 -->
|
|
175
|
-
<VcDataTable :items="items" :columns="columns" />
|
|
176
|
-
|
|
177
|
-
<!-- Overrides to 50 rows per page -->
|
|
178
|
-
<VcDataTable :items="items" :columns="columns" :page-size="50" />
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
## Related
|
|
182
|
-
|
|
183
|
-
- `framework/core/constants/ui.ts` -- UI_CONSTANTS definition
|
|
184
|
-
- `framework/core/constants/defaults.ts` -- COMPONENT_DEFAULTS and getComponentDefaults
|
|
185
|
-
- `framework/core/constants/locale.ts` -- languageToCountryMap
|