ezux 1.0.0
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/LICENSE +21 -0
- package/README.md +56 -0
- package/dist/EzEventModal-DtpvYwGr.js +684 -0
- package/dist/EzGroupingPanel-CFwKUrF_.js +59 -0
- package/dist/EzTableEditDialog-BIk_mNpI.js +60 -0
- package/dist/components/EzKanban/EzKanban.types.d.ts +789 -0
- package/dist/components/EzKanban/components/CardEditorModal.d.ts +23 -0
- package/dist/components/EzKanban/components/EzKanbanErrorFallback.d.ts +1 -0
- package/dist/components/EzKanban/components/FilterPopover.d.ts +10 -0
- package/dist/components/EzKanban/components/KanbanBoard.d.ts +62 -0
- package/dist/components/EzKanban/components/KanbanCard.d.ts +38 -0
- package/dist/components/EzKanban/components/KanbanColumn.d.ts +55 -0
- package/dist/components/EzKanban/components/KanbanSwimlane.d.ts +46 -0
- package/dist/components/EzKanban/components/KanbanToolbar.d.ts +41 -0
- package/dist/components/EzKanban/exports.d.ts +4 -0
- package/dist/components/EzKanban/hooks/useKanbanCards.d.ts +36 -0
- package/dist/components/EzKanban/hooks/useKanbanColumns.d.ts +27 -0
- package/dist/components/EzKanban/hooks/useKanbanDragDrop.d.ts +31 -0
- package/dist/components/EzKanban/hooks/useKanbanFilters.d.ts +23 -0
- package/dist/components/EzKanban/hooks/useKanbanState.d.ts +79 -0
- package/dist/components/EzKanban/hooks/useKanbanSwimlanes.d.ts +27 -0
- package/dist/components/EzKanban/hooks/useKanbanVirtualization.d.ts +16 -0
- package/dist/components/EzKanban/index.d.ts +45 -0
- package/dist/components/EzKanban/services/KanbanService.d.ts +30 -0
- package/dist/components/EzKanban/state/kanban.store.d.ts +33 -0
- package/dist/components/EzKanban/useEzKanban.d.ts +162 -0
- package/dist/components/EzKanban/views/KanbanTimelineView.d.ts +15 -0
- package/dist/components/EzLayout/Authentication/AuthSlider.d.ts +13 -0
- package/dist/components/EzLayout/Authentication/InputPassword.d.ts +7 -0
- package/dist/components/EzLayout/Authentication/SignInForm.d.ts +21 -0
- package/dist/components/EzLayout/Authentication/SignUpForm.d.ts +20 -0
- package/dist/components/EzLayout/EzHeader.d.ts +33 -0
- package/dist/components/EzLayout/EzLanguageSwitcher.d.ts +4 -0
- package/dist/components/EzLayout/EzLayout.types.d.ts +223 -0
- package/dist/components/EzLayout/EzSidebar.d.ts +14 -0
- package/dist/components/EzLayout/EzThemeColorChanger.d.ts +9 -0
- package/dist/components/EzLayout/EzThemeSwitcher.d.ts +8 -0
- package/dist/components/EzLayout/EzUserProfile.d.ts +23 -0
- package/dist/components/EzLayout/components/MainContent.d.ts +13 -0
- package/dist/components/EzLayout/hooks/useLayoutImperative.d.ts +17 -0
- package/dist/components/EzLayout/hooks/useLayoutState.d.ts +25 -0
- package/dist/components/EzLayout/index.d.ts +19 -0
- package/dist/components/EzLayout/useEzLayout.d.ts +26 -0
- package/dist/components/EzScheduler/EzScheduler.types.d.ts +1658 -0
- package/dist/components/EzScheduler/EzSchedulerToolbar.d.ts +117 -0
- package/dist/components/EzScheduler/components/EzEventModal.d.ts +17 -0
- package/dist/components/EzScheduler/components/EzOverlapAlert.d.ts +12 -0
- package/dist/components/EzScheduler/components/EzQuickInfoPopup.d.ts +22 -0
- package/dist/components/EzScheduler/components/EzResourceSidebar.d.ts +33 -0
- package/dist/components/EzScheduler/components/EzSchedulerContent.d.ts +123 -0
- package/dist/components/EzScheduler/components/EzSchedulerQuickAdd.d.ts +17 -0
- package/dist/components/EzScheduler/components/RecurrenceEditor.d.ts +7 -0
- package/dist/components/EzScheduler/components/SchedulerLoadingSpinner.d.ts +2 -0
- package/dist/components/EzScheduler/components/dnd/DraggableEvent.d.ts +21 -0
- package/dist/components/EzScheduler/components/dnd/DroppableSlot.d.ts +19 -0
- package/dist/components/EzScheduler/hooks/useRecurrence.d.ts +2 -0
- package/dist/components/EzScheduler/hooks/useSchedulerEventHandlers.d.ts +11 -0
- package/dist/components/EzScheduler/hooks/useSchedulerEvents.d.ts +26 -0
- package/dist/components/EzScheduler/hooks/useSchedulerImperative.d.ts +15 -0
- package/dist/components/EzScheduler/hooks/useSchedulerNavigation.d.ts +9 -0
- package/dist/components/EzScheduler/hooks/useSchedulerResources.d.ts +10 -0
- package/dist/components/EzScheduler/hooks/useSchedulerState.d.ts +14 -0
- package/dist/components/EzScheduler/hooks/useSchedulerVirtualization.d.ts +9 -0
- package/dist/components/EzScheduler/index.d.ts +41 -0
- package/dist/components/EzScheduler/models/EventSettings.d.ts +11 -0
- package/dist/components/EzScheduler/models/View.d.ts +49 -0
- package/dist/components/EzScheduler/models/index.d.ts +2 -0
- package/dist/components/EzScheduler/services/AttendeeService.d.ts +15 -0
- package/dist/components/EzScheduler/services/AuditService.d.ts +15 -0
- package/dist/components/EzScheduler/services/CollisionDetectionService.d.ts +19 -0
- package/dist/components/EzScheduler/services/DragAndDropService.d.ts +16 -0
- package/dist/components/EzScheduler/services/HistoryService.d.ts +31 -0
- package/dist/components/EzScheduler/services/ICalendarImportService.d.ts +16 -0
- package/dist/components/EzScheduler/services/PrintService.d.ts +7 -0
- package/dist/components/EzScheduler/services/RecurrenceEngine.d.ts +7 -0
- package/dist/components/EzScheduler/services/ReminderService.d.ts +17 -0
- package/dist/components/EzScheduler/services/SchedulerService.d.ts +69 -0
- package/dist/components/EzScheduler/services/SearchService.d.ts +11 -0
- package/dist/components/EzScheduler/services/SecurityService.d.ts +25 -0
- package/dist/components/EzScheduler/services/TimezoneService.d.ts +20 -0
- package/dist/components/EzScheduler/services/VirtualScrollingService.d.ts +34 -0
- package/dist/components/EzScheduler/state/scheduler.store.d.ts +27 -0
- package/dist/components/EzScheduler/templates/CellTemplate.d.ts +42 -0
- package/dist/components/EzScheduler/templates/EditorTemplate.d.ts +32 -0
- package/dist/components/EzScheduler/templates/HeaderTemplate.d.ts +36 -0
- package/dist/components/EzScheduler/tests/phase1_rendering.spec.d.ts +1 -0
- package/dist/components/EzScheduler/tests/phase2_events.spec.d.ts +1 -0
- package/dist/components/EzScheduler/tests/phase3_templates.spec.d.ts +1 -0
- package/dist/components/EzScheduler/tests/phase4_export.spec.d.ts +1 -0
- package/dist/components/EzScheduler/tests/phase5_advanced.spec.d.ts +1 -0
- package/dist/components/EzScheduler/tests/phase6_security.spec.d.ts +1 -0
- package/dist/components/EzScheduler/tests/phase7_regression.spec.d.ts +1 -0
- package/dist/components/EzScheduler/useEzScheduler.d.ts +152 -0
- package/dist/components/EzScheduler/utils/createDragConstraint.d.ts +7 -0
- package/dist/components/EzScheduler/utils/getWeekNumber.d.ts +8 -0
- package/dist/components/EzScheduler/utils/sanitizeHtml.d.ts +17 -0
- package/dist/components/EzScheduler/views/AgendaView.d.ts +33 -0
- package/dist/components/EzScheduler/views/DayWeekView.d.ts +182 -0
- package/dist/components/EzScheduler/views/MonthView.d.ts +65 -0
- package/dist/components/EzScheduler/views/TimelineView.d.ts +121 -0
- package/dist/components/EzSignature/EzSignature.d.ts +42 -0
- package/dist/components/EzSignature/EzSignature.test.d.ts +1 -0
- package/dist/components/EzSignature/EzSignature.types.d.ts +132 -0
- package/dist/components/EzSignature/index.d.ts +2 -0
- package/dist/components/EzTable/EzColumnMenu.d.ts +7 -0
- package/dist/components/EzTable/EzDateFilterTree.d.ts +7 -0
- package/dist/components/EzTable/EzExcelFilter.d.ts +6 -0
- package/dist/components/EzTable/EzFilterBuilder.d.ts +12 -0
- package/dist/components/EzTable/EzGroupingPanel.d.ts +9 -0
- package/dist/components/EzTable/EzHeaderContextMenu.d.ts +8 -0
- package/dist/components/EzTable/EzPagination.d.ts +19 -0
- package/dist/components/EzTable/EzTable.types.d.ts +1481 -0
- package/dist/components/EzTable/EzTableEditDialog.d.ts +15 -0
- package/dist/components/EzTable/EzTableFooter.d.ts +10 -0
- package/dist/components/EzTable/EzTableOverlays.d.ts +11 -0
- package/dist/components/EzTable/EzTableStatusBar.d.ts +6 -0
- package/dist/components/EzTable/EzTableToolbar.d.ts +58 -0
- package/dist/components/EzTable/SmartCell.d.ts +7 -0
- package/dist/components/EzTable/__tests__/EzTableDX.test.d.ts +0 -0
- package/dist/components/EzTable/__tests__/EzTableEnterprise.test.d.ts +1 -0
- package/dist/components/EzTable/__tests__/useEzTable.test.d.ts +1 -0
- package/dist/components/EzTable/components/AdvancedColumnFilter.d.ts +16 -0
- package/dist/components/EzTable/components/BooleanFilterSection.d.ts +7 -0
- package/dist/components/EzTable/components/DraggableHeader.d.ts +10 -0
- package/dist/components/EzTable/components/EzTableBodySection.d.ts +70 -0
- package/dist/components/EzTable/components/EzTableCell.d.ts +46 -0
- package/dist/components/EzTable/components/EzTableHeaderSection.d.ts +22 -0
- package/dist/components/EzTable/components/EzTablePaginationSection.d.ts +31 -0
- package/dist/components/EzTable/components/EzTableRow.d.ts +56 -0
- package/dist/components/EzTable/components/FilterActionButtons.d.ts +16 -0
- package/dist/components/EzTable/components/FilterRuleSelect.d.ts +26 -0
- package/dist/components/EzTable/components/SelectAllCheckbox.d.ts +21 -0
- package/dist/components/EzTable/components/SelectFilterSection.d.ts +18 -0
- package/dist/components/EzTable/components/VirtualizedFilterList.d.ts +21 -0
- package/dist/components/EzTable/constants/filterOptions.d.ts +47 -0
- package/dist/components/EzTable/context/EzTableContext.d.ts +10 -0
- package/dist/components/EzTable/context/TableConfigContext.d.ts +13 -0
- package/dist/components/EzTable/context/TableStore.d.ts +17 -0
- package/dist/components/EzTable/filterUtils.d.ts +5 -0
- package/dist/components/EzTable/hooks/useAutoFit.d.ts +4 -0
- package/dist/components/EzTable/hooks/useCellEventHandlers.d.ts +16 -0
- package/dist/components/EzTable/hooks/useColumnSizeVars.d.ts +6 -0
- package/dist/components/EzTable/hooks/useContainerResize.d.ts +11 -0
- package/dist/components/EzTable/hooks/useDialogStateInitialization.d.ts +8 -0
- package/dist/components/EzTable/hooks/useFilterSelection.d.ts +12 -0
- package/dist/components/EzTable/hooks/useTableFiltering.d.ts +23 -0
- package/dist/components/EzTable/hooks/useTableHistory.d.ts +87 -0
- package/dist/components/EzTable/hooks/useTableImperative.d.ts +42 -0
- package/dist/components/EzTable/hooks/useTableSelection.d.ts +32 -0
- package/dist/components/EzTable/hooks/useTableState.d.ts +31 -0
- package/dist/components/EzTable/hooks/useTableVirtualization.d.ts +33 -0
- package/dist/components/EzTable/index.d.ts +50 -0
- package/dist/components/EzTable/renderers/index.d.ts +6 -0
- package/dist/components/EzTable/services/TableService.d.ts +26 -0
- package/dist/components/EzTable/useEzTable.d.ts +17 -0
- package/dist/components/EzTable/utils/TextMeasurer.d.ts +1 -0
- package/dist/components/EzTable/utils/TruncatedTooltip.d.ts +7 -0
- package/dist/components/EzTable/utils/columnTypeDetector.d.ts +5 -0
- package/dist/components/EzTable/utils/filterTypeGuards.d.ts +3 -0
- package/dist/components/EzTable/utils/index.d.ts +1 -0
- package/dist/components/EzTreeView/EzTreeView.types.d.ts +395 -0
- package/dist/components/EzTreeView/EzTreeViewItem.d.ts +77 -0
- package/dist/components/EzTreeView/EzVirtualTree.d.ts +72 -0
- package/dist/components/EzTreeView/components/EzTreeViewLoadingSpinner.d.ts +2 -0
- package/dist/components/EzTreeView/hooks/useTreeDragDrop.d.ts +31 -0
- package/dist/components/EzTreeView/hooks/useTreeExpansion.d.ts +21 -0
- package/dist/components/EzTreeView/hooks/useTreeImperative.d.ts +28 -0
- package/dist/components/EzTreeView/hooks/useTreeSelection.d.ts +31 -0
- package/dist/components/EzTreeView/hooks/useTreeState.d.ts +21 -0
- package/dist/components/EzTreeView/hooks/useTreeVirtualization.d.ts +18 -0
- package/dist/components/EzTreeView/index.d.ts +40 -0
- package/dist/components/EzTreeView/services/TreeService.d.ts +11 -0
- package/dist/components/EzTreeView/useEzTreeView.d.ts +62 -0
- package/dist/components/EzTreeView/utils/treeUtils.d.ts +17 -0
- package/dist/components/shared/components/EzErrorBoundary.d.ts +18 -0
- package/dist/components/shared/components/EzLayoutErrorFallback.d.ts +2 -0
- package/dist/components/shared/components/EzLoadingSpinner.d.ts +8 -0
- package/dist/components/shared/components/EzSchedulerErrorFallback.d.ts +2 -0
- package/dist/components/shared/components/EzTableErrorFallback.d.ts +2 -0
- package/dist/components/shared/components/EzTreeViewErrorFallback.d.ts +2 -0
- package/dist/components/ui/avatar.d.ts +5 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/breadcrumb.d.ts +19 -0
- package/dist/components/ui/button.d.ts +12 -0
- package/dist/components/ui/calendar.d.ts +15 -0
- package/dist/components/ui/card.d.ts +8 -0
- package/dist/components/ui/checkbox.d.ts +7 -0
- package/dist/components/ui/command.d.ts +78 -0
- package/dist/components/ui/context-menu.d.ts +27 -0
- package/dist/components/ui/date-time-picker.d.ts +13 -0
- package/dist/components/ui/dropdown-menu.d.ts +27 -0
- package/dist/components/ui/index.d.ts +26 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/modal.d.ts +9 -0
- package/dist/components/ui/password-input.d.ts +5 -0
- package/dist/components/ui/popover.d.ts +4 -0
- package/dist/components/ui/progress.d.ts +7 -0
- package/dist/components/ui/radio-group.d.ts +5 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/select.d.ts +24 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/tabs.d.ts +14 -0
- package/dist/components/ui/textarea.d.ts +5 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/ezux.es.js +149 -0
- package/dist/ezux.umd.js +68 -0
- package/dist/index-DBwoXp4n.js +30656 -0
- package/dist/index.d.ts +70 -0
- package/dist/lib/perfect-freehand.d.ts +221 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/shared/components/AnimatedText.d.ts +44 -0
- package/dist/shared/components/BaseCell.d.ts +14 -0
- package/dist/shared/components/BooleanRenderer.d.ts +34 -0
- package/dist/shared/components/ChartRenderer.d.ts +19 -0
- package/dist/shared/components/DeleteConfirmationModal.d.ts +11 -0
- package/dist/shared/components/EzContextMenu.d.ts +12 -0
- package/dist/shared/components/EzNotificationDropdown.d.ts +1 -0
- package/dist/shared/components/HighlightText.d.ts +4 -0
- package/dist/shared/components/Modal.d.ts +13 -0
- package/dist/shared/components/NotificationPanel.d.ts +2 -0
- package/dist/shared/components/PrimitiveRenderer.d.ts +39 -0
- package/dist/shared/components/SearchableSelect.d.ts +13 -0
- package/dist/shared/components/SelectRenderer.d.ts +33 -0
- package/dist/shared/components/StatusBadge.d.ts +12 -0
- package/dist/shared/components/TooltipWrapper.d.ts +12 -0
- package/dist/shared/components/index.d.ts +9 -0
- package/dist/shared/hooks/index.d.ts +56 -0
- package/dist/shared/hooks/useBaseComponent.d.ts +60 -0
- package/dist/shared/hooks/useComponentImperativeAPI.d.ts +11 -0
- package/dist/shared/hooks/useComponentState.d.ts +39 -0
- package/dist/shared/hooks/useCurrentTime.d.ts +6 -0
- package/dist/shared/hooks/useDataChangeEvents.d.ts +53 -0
- package/dist/shared/hooks/useDebounce.d.ts +10 -0
- package/dist/shared/hooks/useDeleteConfirmation.d.ts +9 -0
- package/dist/shared/hooks/useDialogState.d.ts +21 -0
- package/dist/shared/hooks/useDndHandlers.d.ts +17 -0
- package/dist/shared/hooks/useEditing.d.ts +107 -0
- package/dist/shared/hooks/useEventHandlers.d.ts +61 -0
- package/dist/shared/hooks/useEzTheme.d.ts +22 -0
- package/dist/shared/hooks/useFieldValidation.d.ts +24 -0
- package/dist/shared/hooks/useHistory.d.ts +13 -0
- package/dist/shared/hooks/useI18n.d.ts +9 -0
- package/dist/shared/hooks/useImperativeAPI.d.ts +8 -0
- package/dist/shared/hooks/useInitCoreServices.d.ts +5 -0
- package/dist/shared/hooks/useKeyboardNavigation.d.ts +36 -0
- package/dist/shared/hooks/useKeyboardShortcuts.d.ts +14 -0
- package/dist/shared/hooks/useLifecycleEvents.d.ts +22 -0
- package/dist/shared/hooks/useLoadingState.d.ts +17 -0
- package/dist/shared/hooks/useMediaQuery.d.ts +6 -0
- package/dist/shared/hooks/useNotificationService.d.ts +8 -0
- package/dist/shared/hooks/usePerformanceMonitor.d.ts +15 -0
- package/dist/shared/hooks/useRowSelectionEvents.d.ts +44 -0
- package/dist/shared/hooks/useSelection.d.ts +73 -0
- package/dist/shared/hooks/useService.d.ts +12 -0
- package/dist/shared/hooks/useServiceState.d.ts +12 -0
- package/dist/shared/hooks/useStateChangeEvents.d.ts +61 -0
- package/dist/shared/hooks/useTheme.d.ts +13 -0
- package/dist/shared/hooks/useVirtualization.d.ts +85 -0
- package/dist/shared/services/BaseService.d.ts +56 -0
- package/dist/shared/services/ContextMenuService.d.ts +58 -0
- package/dist/shared/services/ExportService.d.ts +35 -0
- package/dist/shared/services/FocusManagerService.d.ts +33 -0
- package/dist/shared/services/HierarchyService.d.ts +43 -0
- package/dist/shared/services/I18nService.d.ts +65 -0
- package/dist/shared/services/LayoutService.d.ts +80 -0
- package/dist/shared/services/NotificationService.d.ts +44 -0
- package/dist/shared/services/PersistenceService.d.ts +69 -0
- package/dist/shared/services/ServiceRegistry.d.ts +51 -0
- package/dist/shared/services/ThemeService.d.ts +49 -0
- package/dist/shared/services/VirtualizationService.d.ts +51 -0
- package/dist/shared/state/store.d.ts +10 -0
- package/dist/shared/themes.d.ts +25 -0
- package/dist/shared/types/BaseProps.d.ts +18 -0
- package/dist/shared/types/common.d.ts +292 -0
- package/dist/shared/types/commonTypes.d.ts +101 -0
- package/dist/shared/types/index.d.ts +2 -0
- package/dist/shared/utils/canvasUtils.d.ts +16 -0
- package/dist/shared/utils/commonUtils.d.ts +28 -0
- package/dist/shared/utils/csvUtils.d.ts +7 -0
- package/dist/shared/utils/dateUtils.d.ts +5 -0
- package/dist/shared/utils/dndUtils.d.ts +16 -0
- package/dist/shared/utils/ezStyleUtils.d.ts +64 -0
- package/dist/shared/utils/formatUtils.d.ts +20 -0
- package/dist/shared/utils/imperativeApiUtils.d.ts +36 -0
- package/dist/shared/utils/index.d.ts +11 -0
- package/dist/shared/utils/renderUtils.d.ts +6 -0
- package/dist/shared/utils/serviceUtils.d.ts +10 -0
- package/dist/shared/utils/styleUtils.d.ts +66 -0
- package/dist/shared/utils/validationUtils.d.ts +16 -0
- package/package.json +101 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { BaseService } from './BaseService';
|
|
2
|
+
type LayoutMode = 'dashboard' | 'auth' | 'minimal';
|
|
3
|
+
/**
|
|
4
|
+
* Reactive state for the application layout system.
|
|
5
|
+
* @group State
|
|
6
|
+
*/
|
|
7
|
+
export interface LayoutState {
|
|
8
|
+
/** Whether the primary sidebar is visible. @group State */
|
|
9
|
+
sidebarOpen: boolean;
|
|
10
|
+
/** Current high-level layout mode. @group Properties */
|
|
11
|
+
mode: LayoutMode;
|
|
12
|
+
/** Fixed height of the application header. @group Appearance */
|
|
13
|
+
headerHeight: number;
|
|
14
|
+
/** Fixed width of the application sidebar. @group Appearance */
|
|
15
|
+
sidebarWidth: number;
|
|
16
|
+
/** Viewport width threshold for mobile behavior (in px). @group Properties */
|
|
17
|
+
breakpoint: number;
|
|
18
|
+
/** Current tracked height of the viewport. @group State */
|
|
19
|
+
viewportHeight: number;
|
|
20
|
+
/** Whether the current viewport is considered mobile. @group State */
|
|
21
|
+
isMobile: boolean;
|
|
22
|
+
/** Active page in the auth flow. @group State */
|
|
23
|
+
authPage: 'signin' | 'signup';
|
|
24
|
+
/** Dynamic overlay or side panels currently active. @group State */
|
|
25
|
+
panels: {
|
|
26
|
+
id: string;
|
|
27
|
+
content: any;
|
|
28
|
+
position: 'left' | 'right' | 'bottom';
|
|
29
|
+
}[];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Service for managing the application's shell, responsiveness, and dynamic panels.
|
|
33
|
+
*
|
|
34
|
+
* Centralizes layout configuration, viewport tracking, and provides a reactive
|
|
35
|
+
* API for controlling the UI frame from anywhere in the application.
|
|
36
|
+
*
|
|
37
|
+
* @group Services
|
|
38
|
+
*/
|
|
39
|
+
export declare class LayoutService extends BaseService<LayoutState> {
|
|
40
|
+
name: string;
|
|
41
|
+
constructor();
|
|
42
|
+
private handleResize;
|
|
43
|
+
/**
|
|
44
|
+
* Updates the core layout dimensions and breakpoints.
|
|
45
|
+
* @group Methods
|
|
46
|
+
*/
|
|
47
|
+
updateConfig(config: {
|
|
48
|
+
headerHeight?: number;
|
|
49
|
+
sidebarWidth?: number;
|
|
50
|
+
breakpoint?: number;
|
|
51
|
+
}): void;
|
|
52
|
+
/**
|
|
53
|
+
* Toggles the sidebar visibility.
|
|
54
|
+
* @param open Optional explicit state to set.
|
|
55
|
+
* @group Methods
|
|
56
|
+
*/
|
|
57
|
+
toggleSidebar(open?: boolean): void;
|
|
58
|
+
/** Sets the active layout mode. @group Methods */
|
|
59
|
+
setMode(mode: LayoutMode): void;
|
|
60
|
+
/** Switches the active auth page view. @group Methods */
|
|
61
|
+
setAuthPage(page: 'signin' | 'signup'): void;
|
|
62
|
+
/** Registers a new floating or docked panel. @group Methods */
|
|
63
|
+
addPanel(panel: {
|
|
64
|
+
id: string;
|
|
65
|
+
content: any;
|
|
66
|
+
position: 'left' | 'right' | 'bottom';
|
|
67
|
+
}): void;
|
|
68
|
+
/** Removes a registered panel by ID. @group Methods */
|
|
69
|
+
removePanel(id: string): void;
|
|
70
|
+
/**
|
|
71
|
+
* Helper to get CSS styles for the main content area based on layout state.
|
|
72
|
+
* @group Methods
|
|
73
|
+
*/
|
|
74
|
+
getMainContentStyle(): {
|
|
75
|
+
height: string;
|
|
76
|
+
marginLeft: string;
|
|
77
|
+
transition: string;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { IService } from './ServiceRegistry';
|
|
2
|
+
/**
|
|
3
|
+
* Represents a single user notification item.
|
|
4
|
+
* @group Services
|
|
5
|
+
*/
|
|
6
|
+
export interface Notification {
|
|
7
|
+
/** Unique identifier for the notification. @group Data */
|
|
8
|
+
id: string;
|
|
9
|
+
/** The alert level: info, success, warning, or error. @group Data */
|
|
10
|
+
type: 'info' | 'success' | 'warning' | 'error';
|
|
11
|
+
/** The message content to display. @group Data */
|
|
12
|
+
message: string;
|
|
13
|
+
/** Optional auto-dismiss duration in milliseconds (0 for persistent). @group Properties */
|
|
14
|
+
duration?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A central service for managing application-wide alerts and feedback.
|
|
18
|
+
*
|
|
19
|
+
* Supports multiple concurrent notifications with automatic dismissal and
|
|
20
|
+
* reactive state synchronization for UI panels.
|
|
21
|
+
*
|
|
22
|
+
* @group Services
|
|
23
|
+
*/
|
|
24
|
+
export declare class NotificationService implements IService {
|
|
25
|
+
name: string;
|
|
26
|
+
private subscribers;
|
|
27
|
+
private notifications;
|
|
28
|
+
/** Adds a new notification to the active queue. @group Methods */
|
|
29
|
+
add(notification: Omit<Notification, 'id'>): void;
|
|
30
|
+
/** Direct alias for `add`. @group Methods */
|
|
31
|
+
show(notification: Omit<Notification, 'id'>): void;
|
|
32
|
+
/** Manually removes a notification by its ID. @group Methods */
|
|
33
|
+
remove(id: string): void;
|
|
34
|
+
/** Clears all active notifications. @group Methods */
|
|
35
|
+
clearAll(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Subscribes to notifications queue changes.
|
|
38
|
+
* @param callback Callback triggered when notifications are added or removed.
|
|
39
|
+
* @returns Unsubscribe function.
|
|
40
|
+
* @group Methods
|
|
41
|
+
*/
|
|
42
|
+
subscribe(callback: (notifications: Notification[]) => void): () => boolean;
|
|
43
|
+
private notify;
|
|
44
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { BaseService } from './BaseService';
|
|
2
|
+
/**
|
|
3
|
+
* Data structure for persisting complex component states.
|
|
4
|
+
* @group State
|
|
5
|
+
*/
|
|
6
|
+
export interface EzTableStatePersistence {
|
|
7
|
+
/** Active sorting criteria. @group Data */
|
|
8
|
+
sorting?: any[];
|
|
9
|
+
/** Applied column filters. @group Data */
|
|
10
|
+
columnFilters?: any[];
|
|
11
|
+
/** Visibility state of columns. @group Appearance */
|
|
12
|
+
columnVisibility?: Record<string, boolean>;
|
|
13
|
+
/** Current display order of columns. @group Appearance */
|
|
14
|
+
columnOrder?: string[];
|
|
15
|
+
/** Pinning configuration for columns. @group Appearance */
|
|
16
|
+
columnPinning?: {
|
|
17
|
+
left?: string[];
|
|
18
|
+
right?: string[];
|
|
19
|
+
};
|
|
20
|
+
/** Data grouping configuration. @group Data */
|
|
21
|
+
grouping?: string[];
|
|
22
|
+
/** Pagination state. @group Data */
|
|
23
|
+
pagination?: {
|
|
24
|
+
pageIndex: number;
|
|
25
|
+
pageSize: number;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Service for handling local browser persistence of application state.
|
|
30
|
+
*
|
|
31
|
+
* Provides a standardized way to save and load serialized state objects to
|
|
32
|
+
* `localStorage` with error handling and reactive access tracking.
|
|
33
|
+
*
|
|
34
|
+
* @group Services
|
|
35
|
+
*/
|
|
36
|
+
/**
|
|
37
|
+
* Internal state for the Persistence Service.
|
|
38
|
+
* @group State
|
|
39
|
+
*/
|
|
40
|
+
interface PersistenceState {
|
|
41
|
+
/** The key of the last state object saved or loaded. @group Data */
|
|
42
|
+
lastAccessedKey: string | null;
|
|
43
|
+
}
|
|
44
|
+
export declare class PersistenceService extends BaseService<PersistenceState> {
|
|
45
|
+
name: string;
|
|
46
|
+
constructor();
|
|
47
|
+
/**
|
|
48
|
+
* Saves a state object to the local storage with a specific key.
|
|
49
|
+
* @param key Unique key for the storage entry.
|
|
50
|
+
* @param state The state object to persist.
|
|
51
|
+
* @group Methods
|
|
52
|
+
*/
|
|
53
|
+
saveState(key: string, state: EzTableStatePersistence): void;
|
|
54
|
+
/**
|
|
55
|
+
* Loads a state object from local storage.
|
|
56
|
+
* @param key Unique key for the storage entry.
|
|
57
|
+
* @returns The parsed state object or null if not found.
|
|
58
|
+
* @group Methods
|
|
59
|
+
*/
|
|
60
|
+
loadState(key: string): EzTableStatePersistence | null;
|
|
61
|
+
/**
|
|
62
|
+
* Removes a state entry from local storage.
|
|
63
|
+
* @param key Unique key to clear.
|
|
64
|
+
* @group Methods
|
|
65
|
+
*/
|
|
66
|
+
clearState(key: string): void;
|
|
67
|
+
}
|
|
68
|
+
export declare const globalPersistenceService: PersistenceService;
|
|
69
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { BaseService } from './BaseService';
|
|
2
|
+
/**
|
|
3
|
+
* Base interface for all services in the EzUX ecosystem.
|
|
4
|
+
* @group Services
|
|
5
|
+
*/
|
|
6
|
+
export interface IService {
|
|
7
|
+
/** Unique name of the service for registration and lookup. @group Data */
|
|
8
|
+
name: string;
|
|
9
|
+
/** Optional cleanup logic to run when the service is unregistered. @group Methods */
|
|
10
|
+
cleanup?: () => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Interface for a service repository that manages service lifecycles and dependency injection.
|
|
14
|
+
* @group Services
|
|
15
|
+
*/
|
|
16
|
+
export interface ServiceRegistry {
|
|
17
|
+
/** Registers a service instance by name. @group Methods */
|
|
18
|
+
register<T extends IService>(name: string, service: T): void;
|
|
19
|
+
/** Retrieves a service instance by name, if it exists. @group Methods */
|
|
20
|
+
get<T extends IService>(name: string): T | undefined;
|
|
21
|
+
/** Retrieves a service or throws an error if not found. @group Methods */
|
|
22
|
+
getOrThrow<T extends IService>(name: string): T;
|
|
23
|
+
/** Removes a service from the registry and triggers its cleanup. @group Methods */
|
|
24
|
+
unregister(name: string): void;
|
|
25
|
+
/** Triggers cleanup for all registered services. @group Methods */
|
|
26
|
+
cleanupAll(): void;
|
|
27
|
+
}
|
|
28
|
+
interface ServiceRegistryState {
|
|
29
|
+
serviceNames: string[];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A central repository for managing and accessing shared services.
|
|
33
|
+
*
|
|
34
|
+
* Supports dependency injection patterns across components and ensures
|
|
35
|
+
* proper singleton management and cleanup of library resources.
|
|
36
|
+
*
|
|
37
|
+
* @group Services
|
|
38
|
+
*/
|
|
39
|
+
export declare class EzServiceRegistry extends BaseService<ServiceRegistryState> implements ServiceRegistry {
|
|
40
|
+
name: string;
|
|
41
|
+
private services;
|
|
42
|
+
constructor();
|
|
43
|
+
register<T extends IService>(name: string, service: T): void;
|
|
44
|
+
get<T extends IService>(name: string): T | undefined;
|
|
45
|
+
getOrThrow<T extends IService>(name: string): T;
|
|
46
|
+
unregister(name: string): void;
|
|
47
|
+
cleanupAll(): void;
|
|
48
|
+
private updateState;
|
|
49
|
+
}
|
|
50
|
+
export declare const globalServiceRegistry: EzServiceRegistry;
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { IService } from './ServiceRegistry';
|
|
2
|
+
import { ThemeName, ThemeMode } from '../themes';
|
|
3
|
+
export type { ThemeMode, ThemeName as ThemeColor };
|
|
4
|
+
/**
|
|
5
|
+
* A reactive service for managing the library's visual theme.
|
|
6
|
+
*
|
|
7
|
+
* Handles switching between light, dark, and system modes, as well as applying
|
|
8
|
+
* custom color palettes and UI scaling (radius). Persists settings to local storage.
|
|
9
|
+
*
|
|
10
|
+
* @group Services
|
|
11
|
+
*/
|
|
12
|
+
export declare class ThemeService implements IService {
|
|
13
|
+
name: string;
|
|
14
|
+
private listeners;
|
|
15
|
+
private state;
|
|
16
|
+
/**
|
|
17
|
+
* Directly applies a color theme to the document root bypassing the service instance.
|
|
18
|
+
* Useful for initial hydration or static branding.
|
|
19
|
+
*
|
|
20
|
+
* @param mode Theme mode (light or dark).
|
|
21
|
+
* @param color The name of the color palette to apply.
|
|
22
|
+
* @group Methods
|
|
23
|
+
*/
|
|
24
|
+
static setGlobalColorTheme(mode: ThemeMode, color: ThemeName): void;
|
|
25
|
+
constructor();
|
|
26
|
+
/** Toggles between light and dark modes. @group Methods */
|
|
27
|
+
toggleMode(): void;
|
|
28
|
+
/** Sets the explicit theme mode. @group Methods */
|
|
29
|
+
setMode(mode: ThemeMode): void;
|
|
30
|
+
/** Updates the primary color palette. @group Methods */
|
|
31
|
+
setThemeColor(color: ThemeName): void;
|
|
32
|
+
/** Sets the global UI border radius (in rem). @group Methods */
|
|
33
|
+
setRadius(radius: number): void;
|
|
34
|
+
/** Returns the current active theme state. @group Methods */
|
|
35
|
+
getState(): {
|
|
36
|
+
mode: ThemeMode;
|
|
37
|
+
themeColor: ThemeName;
|
|
38
|
+
radius: number;
|
|
39
|
+
};
|
|
40
|
+
private applyTheme;
|
|
41
|
+
/**
|
|
42
|
+
* Subscribes to theme changes.
|
|
43
|
+
* @param listener Callback triggered on state updates.
|
|
44
|
+
* @returns Unsubscribe function.
|
|
45
|
+
* @group Methods
|
|
46
|
+
*/
|
|
47
|
+
subscribe(listener: (state: any) => void): () => void;
|
|
48
|
+
private notify;
|
|
49
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { IService } from './ServiceRegistry';
|
|
2
|
+
import { Virtualizer } from '@tanstack/virtual-core';
|
|
3
|
+
/**
|
|
4
|
+
* Options for creating a new virtualizer instance.
|
|
5
|
+
* @group Properties
|
|
6
|
+
*/
|
|
7
|
+
export interface VirtualizationOptions {
|
|
8
|
+
/** Total number of items to virtualize. @group Data */
|
|
9
|
+
count: number;
|
|
10
|
+
/** Function to retrieve the scroll container element. @group Data */
|
|
11
|
+
getScrollElement: () => Element | Window | null;
|
|
12
|
+
/** Function to estimate the size of an item by index. @group Appearance */
|
|
13
|
+
estimateSize: (index: number) => number;
|
|
14
|
+
/** Number of items to render outside the visible range. @default 5 @group Performance */
|
|
15
|
+
overscan?: number;
|
|
16
|
+
/** Whether virtualization is horizontal (default is vertical). @default false @group Appearance */
|
|
17
|
+
horizontal?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A central service for managing high-performance virtualization across the library.
|
|
21
|
+
*
|
|
22
|
+
* Provides a standardized way to create and register TanStack virtualizers,
|
|
23
|
+
* enabling coordinated scroll management and performance monitoring.
|
|
24
|
+
*
|
|
25
|
+
* @group Services
|
|
26
|
+
*/
|
|
27
|
+
export declare class VirtualizationService implements IService {
|
|
28
|
+
name: string;
|
|
29
|
+
private virtualizers;
|
|
30
|
+
/**
|
|
31
|
+
* Creates and registers a new virtualizer instance.
|
|
32
|
+
* @param id Unique identifier for the virtualizer.
|
|
33
|
+
* @param options Configuration for the virtualizer.
|
|
34
|
+
* @returns The newly created virtualizer instance.
|
|
35
|
+
* @group Methods
|
|
36
|
+
*/
|
|
37
|
+
createVirtualizer(id: string, options: VirtualizationOptions): Virtualizer<Element | Window, Element>;
|
|
38
|
+
/**
|
|
39
|
+
* Registers an existing virtualizer instance with the service.
|
|
40
|
+
* @param id Unique identifier for the virtualizer.
|
|
41
|
+
* @param virtualizer The virtualizer instance to register.
|
|
42
|
+
* @group Methods
|
|
43
|
+
*/
|
|
44
|
+
registerVirtualizer(id: string, virtualizer: Virtualizer<any, any>): void;
|
|
45
|
+
/**
|
|
46
|
+
* Retrieves a registered virtualizer instance by its ID.
|
|
47
|
+
* @group Methods
|
|
48
|
+
*/
|
|
49
|
+
getVirtualizer(id: string): Virtualizer<Element | Window, Element> | undefined;
|
|
50
|
+
cleanup(): void;
|
|
51
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Store } from '@tanstack/store';
|
|
2
|
+
export interface UIState {
|
|
3
|
+
theme: 'light' | 'dark' | 'system';
|
|
4
|
+
rtl: boolean;
|
|
5
|
+
locale: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const uiStore: Store<UIState, (cb: UIState) => UIState>;
|
|
8
|
+
export declare const updateTheme: (theme: UIState["theme"]) => void;
|
|
9
|
+
export declare const toggleRTL: () => void;
|
|
10
|
+
export declare const setLocale: (locale: string) => void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type ThemeMode = 'light' | 'dark';
|
|
2
|
+
export interface ThemeVariables {
|
|
3
|
+
"background": string;
|
|
4
|
+
"foreground": string;
|
|
5
|
+
"card": string;
|
|
6
|
+
"card-foreground": string;
|
|
7
|
+
"popover": string;
|
|
8
|
+
"popover-foreground": string;
|
|
9
|
+
"primary": string;
|
|
10
|
+
"primary-foreground": string;
|
|
11
|
+
"secondary": string;
|
|
12
|
+
"secondary-foreground": string;
|
|
13
|
+
"muted": string;
|
|
14
|
+
"muted-foreground": string;
|
|
15
|
+
"accent": string;
|
|
16
|
+
"accent-foreground": string;
|
|
17
|
+
"destructive": string;
|
|
18
|
+
"destructive-foreground": string;
|
|
19
|
+
"border": string;
|
|
20
|
+
"input": string;
|
|
21
|
+
"ring": string;
|
|
22
|
+
"radius"?: string;
|
|
23
|
+
}
|
|
24
|
+
export type ThemeName = 'Orange' | 'Blue' | 'Green' | 'Rose' | 'Zinc';
|
|
25
|
+
export declare const themes: Record<ThemeName, Record<ThemeMode, Partial<ThemeVariables>>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ServiceRegistry } from '../services/ServiceRegistry';
|
|
2
|
+
import { BaseComponentProps } from './commonTypes';
|
|
3
|
+
import { ComponentEventCallbacks } from './common';
|
|
4
|
+
export interface SharedBaseProps extends BaseComponentProps, ComponentEventCallbacks {
|
|
5
|
+
/**
|
|
6
|
+
* The shared service registry instance.
|
|
7
|
+
* This is required to access shared services like HierarchyService, FocusManagerService, etc.
|
|
8
|
+
* @group Services
|
|
9
|
+
*/
|
|
10
|
+
serviceRegistry?: ServiceRegistry;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Base interface for data that can be rendered in a table or tree.
|
|
14
|
+
*/
|
|
15
|
+
export interface TableRowData {
|
|
16
|
+
id: string;
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
}
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared type definitions used across components
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Common class names for component styling
|
|
6
|
+
*/
|
|
7
|
+
export interface ComponentClassNames {
|
|
8
|
+
root?: string;
|
|
9
|
+
header?: string;
|
|
10
|
+
body?: string;
|
|
11
|
+
footer?: string;
|
|
12
|
+
toolbar?: string;
|
|
13
|
+
row?: string | ((row: any) => string);
|
|
14
|
+
cell?: string | ((cell: any) => string);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Common slots for component customization
|
|
18
|
+
*/
|
|
19
|
+
export interface ComponentSlots<TData = any> {
|
|
20
|
+
header?: React.ComponentType<{
|
|
21
|
+
data?: TData;
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}>;
|
|
24
|
+
footer?: React.ComponentType<{
|
|
25
|
+
data?: TData;
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
}>;
|
|
28
|
+
toolbar?: React.ComponentType<{
|
|
29
|
+
data?: TData;
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
}>;
|
|
32
|
+
noData?: React.ComponentType<{
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
}>;
|
|
35
|
+
loading?: React.ComponentType<{
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
}>;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Common localization strings
|
|
41
|
+
*/
|
|
42
|
+
export interface ComponentLocalization {
|
|
43
|
+
noData?: string;
|
|
44
|
+
loading?: string;
|
|
45
|
+
search?: string;
|
|
46
|
+
filter?: string;
|
|
47
|
+
sort?: string;
|
|
48
|
+
export?: string;
|
|
49
|
+
print?: string;
|
|
50
|
+
refresh?: string;
|
|
51
|
+
add?: string;
|
|
52
|
+
edit?: string;
|
|
53
|
+
delete?: string;
|
|
54
|
+
save?: string;
|
|
55
|
+
cancel?: string;
|
|
56
|
+
selectAll?: string;
|
|
57
|
+
clearSelection?: string;
|
|
58
|
+
[key: string]: string | undefined;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Common density options
|
|
62
|
+
*/
|
|
63
|
+
export type Density = 'compact' | 'standard' | 'comfortable';
|
|
64
|
+
/**
|
|
65
|
+
* Common alignment options
|
|
66
|
+
*/
|
|
67
|
+
export type Alignment = 'left' | 'center' | 'right';
|
|
68
|
+
/**
|
|
69
|
+
* Common pinned positions
|
|
70
|
+
*/
|
|
71
|
+
export type PinnedPosition = 'left' | 'right' | false;
|
|
72
|
+
/**
|
|
73
|
+
* Common sort direction
|
|
74
|
+
*/
|
|
75
|
+
export type SortDirection = 'asc' | 'desc' | false;
|
|
76
|
+
/**
|
|
77
|
+
* Common filter operator
|
|
78
|
+
*/
|
|
79
|
+
export type FilterOperator = 'equals' | 'notEquals' | 'contains' | 'notContains' | 'startsWith' | 'endsWith' | 'greaterThan' | 'lessThan' | 'greaterThanOrEqual' | 'lessThanOrEqual' | 'between' | 'in' | 'notIn';
|
|
80
|
+
/**
|
|
81
|
+
* Common filter model
|
|
82
|
+
*/
|
|
83
|
+
export interface FilterModel {
|
|
84
|
+
field: string;
|
|
85
|
+
operator: FilterOperator;
|
|
86
|
+
value: any;
|
|
87
|
+
condition?: 'and' | 'or';
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Common sort model
|
|
91
|
+
*/
|
|
92
|
+
export interface SortModel {
|
|
93
|
+
field: string;
|
|
94
|
+
direction: SortDirection;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Common pagination model
|
|
98
|
+
*/
|
|
99
|
+
export interface PaginationModel {
|
|
100
|
+
pageIndex: number;
|
|
101
|
+
pageSize: number;
|
|
102
|
+
totalRows?: number;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Common selection model
|
|
106
|
+
*/
|
|
107
|
+
export interface SelectionModel {
|
|
108
|
+
selectedIds: (string | number)[];
|
|
109
|
+
mode?: 'single' | 'multiple';
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Common edit mode
|
|
113
|
+
*/
|
|
114
|
+
export type EditMode = 'inline' | 'dialog' | 'batch';
|
|
115
|
+
/**
|
|
116
|
+
* Common edit settings
|
|
117
|
+
*/
|
|
118
|
+
export interface EditSettings {
|
|
119
|
+
mode?: EditMode;
|
|
120
|
+
allowAdding?: boolean;
|
|
121
|
+
allowEditing?: boolean;
|
|
122
|
+
allowDeleting?: boolean;
|
|
123
|
+
showDeleteConfirm?: boolean;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Common validation result
|
|
127
|
+
*/
|
|
128
|
+
export interface ValidationResult {
|
|
129
|
+
isValid: boolean;
|
|
130
|
+
errors?: Record<string, string>;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Common event callback types
|
|
134
|
+
* Contains ONLY events that are truly shared across components with identical signatures.
|
|
135
|
+
* Component-specific events (onCellClick, onRowClick, etc) should be defined in each component's types.
|
|
136
|
+
*/
|
|
137
|
+
export interface ComponentEventCallbacks<TData = any> {
|
|
138
|
+
/**
|
|
139
|
+
* Callback when component is created.
|
|
140
|
+
* @group Events
|
|
141
|
+
*/
|
|
142
|
+
onCreated?: () => void;
|
|
143
|
+
/**
|
|
144
|
+
* Callback when component is destroyed.
|
|
145
|
+
* @group Events
|
|
146
|
+
*/
|
|
147
|
+
onDestroyed?: () => void;
|
|
148
|
+
/**
|
|
149
|
+
* Callback when grid/component render starts.
|
|
150
|
+
* @group Events
|
|
151
|
+
*/
|
|
152
|
+
onGridRenderStart?: () => void;
|
|
153
|
+
/**
|
|
154
|
+
* Callback when grid/component render completes.
|
|
155
|
+
* @group Events
|
|
156
|
+
*/
|
|
157
|
+
onGridRenderComplete?: () => void;
|
|
158
|
+
/**
|
|
159
|
+
* Callback when data changes.
|
|
160
|
+
* @group Events
|
|
161
|
+
*/
|
|
162
|
+
onDataChange?: (data: TData[]) => void;
|
|
163
|
+
/**
|
|
164
|
+
* Callback when data loads.
|
|
165
|
+
* @group Events
|
|
166
|
+
*/
|
|
167
|
+
onDataLoad?: (data: TData[]) => void;
|
|
168
|
+
/**
|
|
169
|
+
* Callback when data is requested.
|
|
170
|
+
* @group Events
|
|
171
|
+
*/
|
|
172
|
+
onDataRequest?: (query: any) => void;
|
|
173
|
+
/**
|
|
174
|
+
* Callback when data change starts.
|
|
175
|
+
* @group Events
|
|
176
|
+
*/
|
|
177
|
+
onDataChangeStart?: (args: {
|
|
178
|
+
action: 'add' | 'edit' | 'delete';
|
|
179
|
+
data: TData | TData[];
|
|
180
|
+
}) => void;
|
|
181
|
+
/**
|
|
182
|
+
* Callback when data change completes.
|
|
183
|
+
* @group Events
|
|
184
|
+
*/
|
|
185
|
+
onDataChangeComplete?: (args: {
|
|
186
|
+
action: 'add' | 'edit' | 'delete';
|
|
187
|
+
data: TData | TData[];
|
|
188
|
+
}) => void;
|
|
189
|
+
/**
|
|
190
|
+
* Callback when data change is cancelled.
|
|
191
|
+
* @group Events
|
|
192
|
+
*/
|
|
193
|
+
onDataChangeCancel?: (args: {
|
|
194
|
+
action: 'add' | 'edit' | 'delete';
|
|
195
|
+
row?: any;
|
|
196
|
+
}) => void;
|
|
197
|
+
/**
|
|
198
|
+
* Callback when data change is requested.
|
|
199
|
+
* @group Events
|
|
200
|
+
*/
|
|
201
|
+
onDataChangeRequest?: (args: {
|
|
202
|
+
action: 'add' | 'edit' | 'delete';
|
|
203
|
+
data: TData;
|
|
204
|
+
}) => void;
|
|
205
|
+
/**
|
|
206
|
+
* Callback on error.
|
|
207
|
+
* @group Events
|
|
208
|
+
*/
|
|
209
|
+
onError?: (error: any) => void;
|
|
210
|
+
/**
|
|
211
|
+
* Callback on refresh.
|
|
212
|
+
* @group Events
|
|
213
|
+
*/
|
|
214
|
+
onRefresh?: () => void;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Common export options
|
|
218
|
+
*/
|
|
219
|
+
export interface ExportOptions {
|
|
220
|
+
filename?: string;
|
|
221
|
+
format?: 'csv' | 'excel' | 'pdf';
|
|
222
|
+
includeHeaders?: boolean;
|
|
223
|
+
selectedOnly?: boolean;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Common clipboard data
|
|
227
|
+
*/
|
|
228
|
+
export interface ClipboardData<TData = any> {
|
|
229
|
+
data: TData;
|
|
230
|
+
action: 'copy' | 'cut';
|
|
231
|
+
timestamp: number;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Common drag and drop data
|
|
235
|
+
*/
|
|
236
|
+
export interface DragDropData<TData = any> {
|
|
237
|
+
item: TData;
|
|
238
|
+
sourceIndex: number;
|
|
239
|
+
targetIndex?: number;
|
|
240
|
+
position?: 'before' | 'after' | 'inside';
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Common context menu item
|
|
244
|
+
*/
|
|
245
|
+
export interface ContextMenuItem {
|
|
246
|
+
id: string;
|
|
247
|
+
label: string;
|
|
248
|
+
icon?: React.ReactNode;
|
|
249
|
+
disabled?: boolean;
|
|
250
|
+
separator?: boolean;
|
|
251
|
+
children?: ContextMenuItem[];
|
|
252
|
+
onClick?: () => void;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Common keyboard shortcut
|
|
256
|
+
*/
|
|
257
|
+
export interface KeyboardShortcut {
|
|
258
|
+
key: string;
|
|
259
|
+
ctrl?: boolean;
|
|
260
|
+
shift?: boolean;
|
|
261
|
+
alt?: boolean;
|
|
262
|
+
meta?: boolean;
|
|
263
|
+
handler: (event: KeyboardEvent) => void;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Common theme configuration
|
|
267
|
+
*/
|
|
268
|
+
export interface ThemeConfig {
|
|
269
|
+
mode?: 'light' | 'dark' | 'system';
|
|
270
|
+
primaryColor?: string;
|
|
271
|
+
accentColor?: string;
|
|
272
|
+
borderRadius?: 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Common responsive breakpoints
|
|
276
|
+
*/
|
|
277
|
+
export interface ResponsiveBreakpoints {
|
|
278
|
+
mobile: number;
|
|
279
|
+
tablet: number;
|
|
280
|
+
desktop: number;
|
|
281
|
+
wide: number;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Common viewport state
|
|
285
|
+
*/
|
|
286
|
+
export interface ViewportState {
|
|
287
|
+
width: number;
|
|
288
|
+
height: number;
|
|
289
|
+
isMobile: boolean;
|
|
290
|
+
isTablet: boolean;
|
|
291
|
+
isDesktop: boolean;
|
|
292
|
+
}
|