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,8 @@
|
|
|
1
|
+
interface UseDialogStateInitializationOptions {
|
|
2
|
+
dialogState: any;
|
|
3
|
+
isDialogMode: boolean;
|
|
4
|
+
rows: any[];
|
|
5
|
+
table: any;
|
|
6
|
+
}
|
|
7
|
+
export declare const useDialogStateInitialization: ({ dialogState, isDialogMode, rows, table }: UseDialogStateInitializationOptions) => void;
|
|
8
|
+
export default useDialogStateInitialization;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useFilterSelection - Shared hook for managing multi-select sets in filters.
|
|
3
|
+
* Handles "(Select All)", individual selection, and bulk selection.
|
|
4
|
+
*/
|
|
5
|
+
export declare function useFilterSelection(initialValues: any[] | null, allAvailableValues: any[]): {
|
|
6
|
+
selectedValues: Set<any> | null;
|
|
7
|
+
isAllSelected: boolean;
|
|
8
|
+
handleSelectAll: (checked: boolean) => void;
|
|
9
|
+
handleSelect: (value: any, checked: boolean) => void;
|
|
10
|
+
handleBulkSelect: (values: any[], checked: boolean) => void;
|
|
11
|
+
clearSelection: () => void;
|
|
12
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Table } from '@tanstack/react-table';
|
|
2
|
+
import { EzTableProps } from '../EzTable.types';
|
|
3
|
+
/**
|
|
4
|
+
* Handles filtering and search logic for EzTable.
|
|
5
|
+
* Integrates with useTransition for performance and fires legacy/modern events.
|
|
6
|
+
*
|
|
7
|
+
* @param props - Table properties of type {@link EzTableProps}
|
|
8
|
+
* @param table - The TanStack Table instance
|
|
9
|
+
* @returns Filtering state and handlers
|
|
10
|
+
* @group Hooks
|
|
11
|
+
*/
|
|
12
|
+
export declare const useTableFiltering: <TData extends object>(props: EzTableProps<TData>, table: Table<TData>) => {
|
|
13
|
+
/** Whether a filter/search transition is in progress. @group State */
|
|
14
|
+
isFiltering: boolean;
|
|
15
|
+
/** Handler for column filter changes. @group Events */
|
|
16
|
+
handleColumnFiltersChange: (updater: any) => void;
|
|
17
|
+
/** Handler for global filter changes. @group Events */
|
|
18
|
+
handleGlobalFilterChange: (updater: any) => void;
|
|
19
|
+
/** Programmatically set the filter model. @group Methods */
|
|
20
|
+
setFilterModel: (updater: import('@tanstack/table-core').Updater<import('@tanstack/table-core').ColumnFiltersState>) => void;
|
|
21
|
+
/** Programmatically set the global filter. @group Methods */
|
|
22
|
+
setGlobalFilter: (updater: import('@tanstack/table-core').Updater<any>) => void;
|
|
23
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { SetStateAction } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Supported action types for table history tracking.
|
|
4
|
+
*/
|
|
5
|
+
export type TableActionType = 'ADD_ROW' | 'DELETE_ROW' | 'EDIT_CELL';
|
|
6
|
+
/**
|
|
7
|
+
* Represents a single action in the table history.
|
|
8
|
+
* @group Models
|
|
9
|
+
*/
|
|
10
|
+
export interface TableAction<TData> {
|
|
11
|
+
/** Type of action performed. @group Properties */
|
|
12
|
+
type: TableActionType;
|
|
13
|
+
/** Metadata about the action (row, column, values). @group Properties */
|
|
14
|
+
payload: {
|
|
15
|
+
rowIndex?: number;
|
|
16
|
+
rowId?: string | number;
|
|
17
|
+
columnId?: string;
|
|
18
|
+
oldValue?: any;
|
|
19
|
+
newValue?: any;
|
|
20
|
+
row?: TData;
|
|
21
|
+
};
|
|
22
|
+
/** Execution timestamp. @group Properties */
|
|
23
|
+
timestamp: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* State container for undo/redo history.
|
|
27
|
+
* @group Models
|
|
28
|
+
*/
|
|
29
|
+
export interface HistoryState<TData> {
|
|
30
|
+
/** List of past actions (undo stack). @group Properties */
|
|
31
|
+
past: TableAction<TData>[];
|
|
32
|
+
/** List of future actions (redo stack). @group Properties */
|
|
33
|
+
future: TableAction<TData>[];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Internal state structure for the history hook.
|
|
37
|
+
* @group Models
|
|
38
|
+
*/
|
|
39
|
+
export interface TableHistoryState<TData> {
|
|
40
|
+
/** Current table data. @group Properties */
|
|
41
|
+
data: TData[];
|
|
42
|
+
/** History stacks. @group Properties */
|
|
43
|
+
history: HistoryState<TData>;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Optimized hook for managing table data with undo/redo capabilities.
|
|
47
|
+
* Tracks added, edited, and deleted rows relative to the initial dataset.
|
|
48
|
+
*
|
|
49
|
+
* @param initialData - The baseline data for the table
|
|
50
|
+
* @param idField - Field name used as a unique identifier (default: 'id')
|
|
51
|
+
* @returns State and methods for data manipulation and history tracking
|
|
52
|
+
* @group Hooks
|
|
53
|
+
*/
|
|
54
|
+
export declare const useTableHistory: <TData extends object>(initialData: TData[], idField?: string) => {
|
|
55
|
+
/** Current table data including uncommitted changes. @group State */
|
|
56
|
+
data: TData[];
|
|
57
|
+
/** Programmatically set the table data. @group Methods */
|
|
58
|
+
setData: (action: SetStateAction<TData[]>) => void;
|
|
59
|
+
/** Perform a cell edit at a specific coordinate. @group Methods */
|
|
60
|
+
performEdit: (rowIndex: number, columnId: string, newValue: any) => void;
|
|
61
|
+
/** Add a new row to the data. @group Methods */
|
|
62
|
+
addRow: (newRow: TData, index?: number) => void;
|
|
63
|
+
/** Delete one or more rows by index. @group Methods */
|
|
64
|
+
deleteRows: (rowIndices: number[]) => void;
|
|
65
|
+
/** Undo the last recorded action. @group Methods */
|
|
66
|
+
undo: () => void;
|
|
67
|
+
/** Redo the last undone action. @group Methods */
|
|
68
|
+
redo: () => void;
|
|
69
|
+
/** Whether undo is currently available. @group State */
|
|
70
|
+
canUndo: boolean;
|
|
71
|
+
/** Whether redo is currently available. @group State */
|
|
72
|
+
canRedo: boolean;
|
|
73
|
+
/** Dictionary of change counts (added, edited, deleted) relative to initialData. @group State */
|
|
74
|
+
changes: {
|
|
75
|
+
added: number;
|
|
76
|
+
edited: number;
|
|
77
|
+
deleted: number;
|
|
78
|
+
};
|
|
79
|
+
/** Detailed lists of added, changed, and deleted records. @group State */
|
|
80
|
+
batchChanges: {
|
|
81
|
+
addedRecords: TData[];
|
|
82
|
+
changedRecords: TData[];
|
|
83
|
+
deletedRecords: TData[];
|
|
84
|
+
};
|
|
85
|
+
/** Reset all changes back to the initial state. @group Methods */
|
|
86
|
+
resetData: () => void;
|
|
87
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Table } from '@tanstack/react-table';
|
|
2
|
+
import { EzTableProps, EzTableRef } from '../EzTable.types';
|
|
3
|
+
/**
|
|
4
|
+
* Consolidates the massive imperative API for EzTable using shared factory utilities.
|
|
5
|
+
* Reduces boilerplate and ensures consistent naming conventions.
|
|
6
|
+
*/
|
|
7
|
+
export declare const useTableImperative: <TData extends object>(props: EzTableProps<TData>, table: Table<TData>, data: TData[], methods: {
|
|
8
|
+
refresh: () => void;
|
|
9
|
+
setData: React.Dispatch<React.SetStateAction<TData[]>>;
|
|
10
|
+
performEdit: (rowIndex: number, columnId: string, value: unknown) => void;
|
|
11
|
+
showSpinner: () => void;
|
|
12
|
+
hideSpinner: () => void;
|
|
13
|
+
scrollToIndex: (index: number) => void;
|
|
14
|
+
toggleRowEditing: (rowIndex: number, editing?: boolean) => void;
|
|
15
|
+
forceUpdate: () => void;
|
|
16
|
+
resetData: () => void;
|
|
17
|
+
setPagerMessage: (msg: string | undefined) => void;
|
|
18
|
+
batchChanges: {
|
|
19
|
+
addedRecords: TData[];
|
|
20
|
+
changedRecords: TData[];
|
|
21
|
+
deletedRecords: TData[];
|
|
22
|
+
};
|
|
23
|
+
changes: {
|
|
24
|
+
added: number;
|
|
25
|
+
edited: number;
|
|
26
|
+
deleted: number;
|
|
27
|
+
};
|
|
28
|
+
addRow: (row: TData, index?: number) => void;
|
|
29
|
+
deleteRows: (indices: number[]) => void;
|
|
30
|
+
setFocusedCell: (cell: {
|
|
31
|
+
r: number;
|
|
32
|
+
c: number;
|
|
33
|
+
} | null) => void;
|
|
34
|
+
autoFitColumn: (columnId: string, options?: {
|
|
35
|
+
onlyVisible?: boolean;
|
|
36
|
+
maxWidth?: number;
|
|
37
|
+
}) => void;
|
|
38
|
+
addMutation?: any;
|
|
39
|
+
updateMutation?: any;
|
|
40
|
+
deleteMutation?: any;
|
|
41
|
+
service?: any;
|
|
42
|
+
}, ref: React.Ref<EzTableRef<TData>>, extraApi?: any) => EzTableRef<TData>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Table } from '@tanstack/react-table';
|
|
2
|
+
import { EzTableProps } from '../EzTable.types';
|
|
3
|
+
/**
|
|
4
|
+
* Handles selection logic for EzTable, including range selection.
|
|
5
|
+
* Integrates with TanStack table's selection state for row selection.
|
|
6
|
+
*
|
|
7
|
+
* @param props - Table properties of type {@link EzTableProps}
|
|
8
|
+
* @param table - The TanStack Table instance
|
|
9
|
+
* @returns Selection state and event handlers
|
|
10
|
+
* @group Hooks
|
|
11
|
+
*/
|
|
12
|
+
export declare const useTableSelection: <TData extends object>(props: EzTableProps<TData>, table: Table<TData>) => {
|
|
13
|
+
/** Cell-based range selection state. @group State */
|
|
14
|
+
rangeSelection: {
|
|
15
|
+
start: {
|
|
16
|
+
r: number;
|
|
17
|
+
c: number;
|
|
18
|
+
};
|
|
19
|
+
end: {
|
|
20
|
+
r: number;
|
|
21
|
+
c: number;
|
|
22
|
+
};
|
|
23
|
+
} | null;
|
|
24
|
+
/** Handler for mouse down event on a cell. @group Events */
|
|
25
|
+
onCellMouseDown: (rowIndex: number, colIndex: number) => void;
|
|
26
|
+
/** Handler for mouse enter event on a cell. @group Events */
|
|
27
|
+
onCellMouseEnter: (rowIndex: number, colIndex: number) => void;
|
|
28
|
+
/** Imperatively select a range of rows. @group Methods */
|
|
29
|
+
selectRowByRange: (startIndex: number, endIndex: number) => void;
|
|
30
|
+
/** Whether a selection operation is currently active. @group State */
|
|
31
|
+
isSelecting: boolean;
|
|
32
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { SortingState, ColumnFiltersState, PaginationState, RowSelectionState, GroupingState, ExpandedState, RowPinningState, ColumnPinningState, Table } from '@tanstack/react-table';
|
|
2
|
+
import { EzTableProps, EzGlobalFilterState } from '../EzTable.types';
|
|
3
|
+
/**
|
|
4
|
+
* Core state and TanStack table instance initialization for EzTable.
|
|
5
|
+
* Handles persistence and basic state synchronization via unified useComponentState.
|
|
6
|
+
*/
|
|
7
|
+
export declare const useTableState: <TData extends object>(props: EzTableProps<TData>, currentData: TData[]) => {
|
|
8
|
+
table: Table<TData>;
|
|
9
|
+
states: {
|
|
10
|
+
sorting: SortingState;
|
|
11
|
+
setSorting: (updater: any) => void;
|
|
12
|
+
columnFilters: ColumnFiltersState;
|
|
13
|
+
setColumnFilters: (updater: any) => void;
|
|
14
|
+
globalFilter: EzGlobalFilterState;
|
|
15
|
+
setGlobalFilter: (updater: any) => void;
|
|
16
|
+
rowSelection: RowSelectionState;
|
|
17
|
+
setRowSelection: (updater: any) => void;
|
|
18
|
+
paginationState: PaginationState;
|
|
19
|
+
setPaginationState: (updater: any) => void;
|
|
20
|
+
grouping: GroupingState;
|
|
21
|
+
setGrouping: (updater: any) => void;
|
|
22
|
+
expanded: ExpandedState;
|
|
23
|
+
setExpanded: (updater: any) => void;
|
|
24
|
+
rowPinning: RowPinningState;
|
|
25
|
+
setRowPinning: (updater: any) => void;
|
|
26
|
+
columnPinning: ColumnPinningState;
|
|
27
|
+
setColumnPinning: (updater: any) => void;
|
|
28
|
+
columnVisibility: Record<string, boolean>;
|
|
29
|
+
setColumnVisibility: (updater: any) => void;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Table } from '@tanstack/react-table';
|
|
2
|
+
import { EzTableProps } from '../EzTable.types';
|
|
3
|
+
/**
|
|
4
|
+
* Handles table virtualization using the shared useVirtualization hook.
|
|
5
|
+
* Maps table density and column sizes to virtualization parameters.
|
|
6
|
+
*
|
|
7
|
+
* @param props - Table properties of type {@link EzTableProps}
|
|
8
|
+
* @param table - The TanStack Table instance
|
|
9
|
+
* @returns Virtualization state and scroll methods
|
|
10
|
+
* @group Hooks
|
|
11
|
+
*/
|
|
12
|
+
export declare const useTableVirtualization: <TData extends object>(props: EzTableProps<TData>, table: Table<TData>, dir?: "ltr" | "rtl") => {
|
|
13
|
+
/** Reference to the scrollable container. @group Properties */
|
|
14
|
+
parentRef: import('react').RefObject<HTMLDivElement | null>;
|
|
15
|
+
/** Row virtualizer instance. @group Properties */
|
|
16
|
+
rowVirtualizer: import('@tanstack/virtual-core').Virtualizer<HTMLDivElement, Element>;
|
|
17
|
+
/** Column virtualizer instance (if enabled). @group Properties */
|
|
18
|
+
columnVirtualizer: import('@tanstack/virtual-core').Virtualizer<HTMLDivElement, Element> | undefined;
|
|
19
|
+
/** Scroll to a specific item index. @group Methods */
|
|
20
|
+
scrollToIndex: (index: number, options?: {
|
|
21
|
+
align?: "start" | "center" | "end" | "auto";
|
|
22
|
+
}) => void;
|
|
23
|
+
/** Scroll to a specific row. @group Methods */
|
|
24
|
+
scrollToRow: (index: number, options?: {
|
|
25
|
+
align?: "start" | "center" | "end" | "auto";
|
|
26
|
+
}) => void;
|
|
27
|
+
/** Scroll to a specific column. @group Methods */
|
|
28
|
+
scrollToColumn: ((index: number, options?: {
|
|
29
|
+
align?: "start" | "center" | "end" | "auto";
|
|
30
|
+
}) => void) | undefined;
|
|
31
|
+
/** Calculated row height based on density or props. @group Properties */
|
|
32
|
+
effectiveRowHeight: number;
|
|
33
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { EzTableProps, EzTableRef } from './EzTable.types';
|
|
3
|
+
/**
|
|
4
|
+
* EzTable is a high-performance, enterprise-grade data grid engine.
|
|
5
|
+
* Built on TanStack Table v8, it combines lightweight core logic with powerful
|
|
6
|
+
* features like virtualization, advanced filtering, and modular editing.
|
|
7
|
+
*
|
|
8
|
+
|
|
9
|
+
* ### Core Capabilities
|
|
10
|
+
* - **Superior Performance**: Row and column virtualization for smooth handling of 100k+ records.
|
|
11
|
+
* - **Smart Data Fetching**: Support for infinite scroll, server-side pagination, and caching via React Query.
|
|
12
|
+
* - **Flexible Editing**: Choose between `Normal` (inline), `Dialog` (form-based), or `Batch` editing modes.
|
|
13
|
+
* - **Advanced Interactivity**: Range selection, drag-and-drop column reordering, and context menus.
|
|
14
|
+
* - **Data Intelligence**: Built-in export (Excel/CSV/PDF), column pinning, and grouping.
|
|
15
|
+
*
|
|
16
|
+
* ### Minimal Example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <EzTable
|
|
19
|
+
* data={employees}
|
|
20
|
+
* columns={[
|
|
21
|
+
* { accessorKey: 'name', header: 'Name' },
|
|
22
|
+
* { accessorKey: 'role', header: 'Role' }
|
|
23
|
+
* ]}
|
|
24
|
+
* pagination
|
|
25
|
+
* enableFiltering
|
|
26
|
+
* />
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* ### Advanced Config: Editing & Persistence
|
|
30
|
+
* ```tsx
|
|
31
|
+
* <EzTable
|
|
32
|
+
* data={data}
|
|
33
|
+
* columns={columns}
|
|
34
|
+
* editSettings={{
|
|
35
|
+
* allowEditing: true,
|
|
36
|
+
* mode: 'Batch',
|
|
37
|
+
* primaryKey: 'id'
|
|
38
|
+
* }}
|
|
39
|
+
* enablePersistence
|
|
40
|
+
* persistenceKey="user-table-grid"
|
|
41
|
+
* onBatchSave={(changes) => saveToDatabase(changes)}
|
|
42
|
+
* />
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @group Core Components
|
|
46
|
+
*/
|
|
47
|
+
export declare const EzTable: <TData extends object>(props: EzTableProps<TData> & {
|
|
48
|
+
ref?: React.ForwardedRef<EzTableRef<TData>>;
|
|
49
|
+
}) => React.ReactElement;
|
|
50
|
+
export * from './context/EzTableContext';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from '../../../shared/components/BaseCell';
|
|
2
|
+
export * from '../../../shared/components/PrimitiveRenderer';
|
|
3
|
+
export * from '../../../shared/components/BooleanRenderer';
|
|
4
|
+
export * from '../../../shared/components/SelectRenderer';
|
|
5
|
+
export * from '../../../shared/components/ChartRenderer';
|
|
6
|
+
export * from '../../../shared/components/SearchableSelect';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { RowData } from '@tanstack/react-table';
|
|
2
|
+
import { ITableService, TableParams } from '../EzTable.types';
|
|
3
|
+
/**
|
|
4
|
+
* TableService implementation following the ServiceRegistry pattern.
|
|
5
|
+
* Provides mock server-side operations like sorting, filtering, and pagination.
|
|
6
|
+
*/
|
|
7
|
+
export declare class TableService<T extends RowData = any> implements ITableService<T> {
|
|
8
|
+
name: string;
|
|
9
|
+
init(): Promise<void>;
|
|
10
|
+
cleanup(): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* Seeds the mock database with initial data.
|
|
13
|
+
*/
|
|
14
|
+
initializeWithData(data: T[]): void;
|
|
15
|
+
/**
|
|
16
|
+
* Simulates fetching data from a server with support for sorting, filtering, and pagination.
|
|
17
|
+
*/
|
|
18
|
+
getData(params: TableParams): Promise<{
|
|
19
|
+
data: T[];
|
|
20
|
+
totalCount: number;
|
|
21
|
+
}>;
|
|
22
|
+
createRow(row: Partial<T>): Promise<T>;
|
|
23
|
+
updateRow(id: string | number, updates: Partial<T>): Promise<T>;
|
|
24
|
+
deleteRow(id: string | number): Promise<void>;
|
|
25
|
+
private simulateLatency;
|
|
26
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { EzTableProps, EzTableRef } from './EzTable.types';
|
|
2
|
+
/**
|
|
3
|
+
* Main hook for EzTable that coordinates specialized sub-hooks.
|
|
4
|
+
* Centrally managed via useBaseComponent and modular sub-hooks.
|
|
5
|
+
*
|
|
6
|
+
* Responsibilities:
|
|
7
|
+
* - Data fetching and synchronization
|
|
8
|
+
* - State management (pagination, sorting, filtering)
|
|
9
|
+
* - History tracking (undo/redo)
|
|
10
|
+
* - Editing state and validation
|
|
11
|
+
* - Virtualization setup
|
|
12
|
+
*
|
|
13
|
+
* @param props - Table properties
|
|
14
|
+
* @param ref - Forwarded ref for imperative API
|
|
15
|
+
* @param extraApi - Additional imperative methods
|
|
16
|
+
*/
|
|
17
|
+
export declare const useEzTable: <TData extends object>(props: EzTableProps<TData>, ref?: React.Ref<EzTableRef<TData>>, extraApi?: any) => any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getTextWidth: (text: string, font?: string) => number;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface TruncatedTooltipProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
text?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const TruncatedTooltip: ({ children, text }: TruncatedTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type ColumnType = 'text' | 'longtext' | 'number' | 'boolean' | 'date' | 'datetime' | 'select' | 'multiselect' | 'chart';
|
|
2
|
+
/**
|
|
3
|
+
* detectColumnType - Utility to infer column type from a sample of data
|
|
4
|
+
*/
|
|
5
|
+
export declare function detectColumnType(values: any[]): ColumnType;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './columnTypeDetector';
|