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.
Files changed (293) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +56 -0
  3. package/dist/EzEventModal-DtpvYwGr.js +684 -0
  4. package/dist/EzGroupingPanel-CFwKUrF_.js +59 -0
  5. package/dist/EzTableEditDialog-BIk_mNpI.js +60 -0
  6. package/dist/components/EzKanban/EzKanban.types.d.ts +789 -0
  7. package/dist/components/EzKanban/components/CardEditorModal.d.ts +23 -0
  8. package/dist/components/EzKanban/components/EzKanbanErrorFallback.d.ts +1 -0
  9. package/dist/components/EzKanban/components/FilterPopover.d.ts +10 -0
  10. package/dist/components/EzKanban/components/KanbanBoard.d.ts +62 -0
  11. package/dist/components/EzKanban/components/KanbanCard.d.ts +38 -0
  12. package/dist/components/EzKanban/components/KanbanColumn.d.ts +55 -0
  13. package/dist/components/EzKanban/components/KanbanSwimlane.d.ts +46 -0
  14. package/dist/components/EzKanban/components/KanbanToolbar.d.ts +41 -0
  15. package/dist/components/EzKanban/exports.d.ts +4 -0
  16. package/dist/components/EzKanban/hooks/useKanbanCards.d.ts +36 -0
  17. package/dist/components/EzKanban/hooks/useKanbanColumns.d.ts +27 -0
  18. package/dist/components/EzKanban/hooks/useKanbanDragDrop.d.ts +31 -0
  19. package/dist/components/EzKanban/hooks/useKanbanFilters.d.ts +23 -0
  20. package/dist/components/EzKanban/hooks/useKanbanState.d.ts +79 -0
  21. package/dist/components/EzKanban/hooks/useKanbanSwimlanes.d.ts +27 -0
  22. package/dist/components/EzKanban/hooks/useKanbanVirtualization.d.ts +16 -0
  23. package/dist/components/EzKanban/index.d.ts +45 -0
  24. package/dist/components/EzKanban/services/KanbanService.d.ts +30 -0
  25. package/dist/components/EzKanban/state/kanban.store.d.ts +33 -0
  26. package/dist/components/EzKanban/useEzKanban.d.ts +162 -0
  27. package/dist/components/EzKanban/views/KanbanTimelineView.d.ts +15 -0
  28. package/dist/components/EzLayout/Authentication/AuthSlider.d.ts +13 -0
  29. package/dist/components/EzLayout/Authentication/InputPassword.d.ts +7 -0
  30. package/dist/components/EzLayout/Authentication/SignInForm.d.ts +21 -0
  31. package/dist/components/EzLayout/Authentication/SignUpForm.d.ts +20 -0
  32. package/dist/components/EzLayout/EzHeader.d.ts +33 -0
  33. package/dist/components/EzLayout/EzLanguageSwitcher.d.ts +4 -0
  34. package/dist/components/EzLayout/EzLayout.types.d.ts +223 -0
  35. package/dist/components/EzLayout/EzSidebar.d.ts +14 -0
  36. package/dist/components/EzLayout/EzThemeColorChanger.d.ts +9 -0
  37. package/dist/components/EzLayout/EzThemeSwitcher.d.ts +8 -0
  38. package/dist/components/EzLayout/EzUserProfile.d.ts +23 -0
  39. package/dist/components/EzLayout/components/MainContent.d.ts +13 -0
  40. package/dist/components/EzLayout/hooks/useLayoutImperative.d.ts +17 -0
  41. package/dist/components/EzLayout/hooks/useLayoutState.d.ts +25 -0
  42. package/dist/components/EzLayout/index.d.ts +19 -0
  43. package/dist/components/EzLayout/useEzLayout.d.ts +26 -0
  44. package/dist/components/EzScheduler/EzScheduler.types.d.ts +1658 -0
  45. package/dist/components/EzScheduler/EzSchedulerToolbar.d.ts +117 -0
  46. package/dist/components/EzScheduler/components/EzEventModal.d.ts +17 -0
  47. package/dist/components/EzScheduler/components/EzOverlapAlert.d.ts +12 -0
  48. package/dist/components/EzScheduler/components/EzQuickInfoPopup.d.ts +22 -0
  49. package/dist/components/EzScheduler/components/EzResourceSidebar.d.ts +33 -0
  50. package/dist/components/EzScheduler/components/EzSchedulerContent.d.ts +123 -0
  51. package/dist/components/EzScheduler/components/EzSchedulerQuickAdd.d.ts +17 -0
  52. package/dist/components/EzScheduler/components/RecurrenceEditor.d.ts +7 -0
  53. package/dist/components/EzScheduler/components/SchedulerLoadingSpinner.d.ts +2 -0
  54. package/dist/components/EzScheduler/components/dnd/DraggableEvent.d.ts +21 -0
  55. package/dist/components/EzScheduler/components/dnd/DroppableSlot.d.ts +19 -0
  56. package/dist/components/EzScheduler/hooks/useRecurrence.d.ts +2 -0
  57. package/dist/components/EzScheduler/hooks/useSchedulerEventHandlers.d.ts +11 -0
  58. package/dist/components/EzScheduler/hooks/useSchedulerEvents.d.ts +26 -0
  59. package/dist/components/EzScheduler/hooks/useSchedulerImperative.d.ts +15 -0
  60. package/dist/components/EzScheduler/hooks/useSchedulerNavigation.d.ts +9 -0
  61. package/dist/components/EzScheduler/hooks/useSchedulerResources.d.ts +10 -0
  62. package/dist/components/EzScheduler/hooks/useSchedulerState.d.ts +14 -0
  63. package/dist/components/EzScheduler/hooks/useSchedulerVirtualization.d.ts +9 -0
  64. package/dist/components/EzScheduler/index.d.ts +41 -0
  65. package/dist/components/EzScheduler/models/EventSettings.d.ts +11 -0
  66. package/dist/components/EzScheduler/models/View.d.ts +49 -0
  67. package/dist/components/EzScheduler/models/index.d.ts +2 -0
  68. package/dist/components/EzScheduler/services/AttendeeService.d.ts +15 -0
  69. package/dist/components/EzScheduler/services/AuditService.d.ts +15 -0
  70. package/dist/components/EzScheduler/services/CollisionDetectionService.d.ts +19 -0
  71. package/dist/components/EzScheduler/services/DragAndDropService.d.ts +16 -0
  72. package/dist/components/EzScheduler/services/HistoryService.d.ts +31 -0
  73. package/dist/components/EzScheduler/services/ICalendarImportService.d.ts +16 -0
  74. package/dist/components/EzScheduler/services/PrintService.d.ts +7 -0
  75. package/dist/components/EzScheduler/services/RecurrenceEngine.d.ts +7 -0
  76. package/dist/components/EzScheduler/services/ReminderService.d.ts +17 -0
  77. package/dist/components/EzScheduler/services/SchedulerService.d.ts +69 -0
  78. package/dist/components/EzScheduler/services/SearchService.d.ts +11 -0
  79. package/dist/components/EzScheduler/services/SecurityService.d.ts +25 -0
  80. package/dist/components/EzScheduler/services/TimezoneService.d.ts +20 -0
  81. package/dist/components/EzScheduler/services/VirtualScrollingService.d.ts +34 -0
  82. package/dist/components/EzScheduler/state/scheduler.store.d.ts +27 -0
  83. package/dist/components/EzScheduler/templates/CellTemplate.d.ts +42 -0
  84. package/dist/components/EzScheduler/templates/EditorTemplate.d.ts +32 -0
  85. package/dist/components/EzScheduler/templates/HeaderTemplate.d.ts +36 -0
  86. package/dist/components/EzScheduler/tests/phase1_rendering.spec.d.ts +1 -0
  87. package/dist/components/EzScheduler/tests/phase2_events.spec.d.ts +1 -0
  88. package/dist/components/EzScheduler/tests/phase3_templates.spec.d.ts +1 -0
  89. package/dist/components/EzScheduler/tests/phase4_export.spec.d.ts +1 -0
  90. package/dist/components/EzScheduler/tests/phase5_advanced.spec.d.ts +1 -0
  91. package/dist/components/EzScheduler/tests/phase6_security.spec.d.ts +1 -0
  92. package/dist/components/EzScheduler/tests/phase7_regression.spec.d.ts +1 -0
  93. package/dist/components/EzScheduler/useEzScheduler.d.ts +152 -0
  94. package/dist/components/EzScheduler/utils/createDragConstraint.d.ts +7 -0
  95. package/dist/components/EzScheduler/utils/getWeekNumber.d.ts +8 -0
  96. package/dist/components/EzScheduler/utils/sanitizeHtml.d.ts +17 -0
  97. package/dist/components/EzScheduler/views/AgendaView.d.ts +33 -0
  98. package/dist/components/EzScheduler/views/DayWeekView.d.ts +182 -0
  99. package/dist/components/EzScheduler/views/MonthView.d.ts +65 -0
  100. package/dist/components/EzScheduler/views/TimelineView.d.ts +121 -0
  101. package/dist/components/EzSignature/EzSignature.d.ts +42 -0
  102. package/dist/components/EzSignature/EzSignature.test.d.ts +1 -0
  103. package/dist/components/EzSignature/EzSignature.types.d.ts +132 -0
  104. package/dist/components/EzSignature/index.d.ts +2 -0
  105. package/dist/components/EzTable/EzColumnMenu.d.ts +7 -0
  106. package/dist/components/EzTable/EzDateFilterTree.d.ts +7 -0
  107. package/dist/components/EzTable/EzExcelFilter.d.ts +6 -0
  108. package/dist/components/EzTable/EzFilterBuilder.d.ts +12 -0
  109. package/dist/components/EzTable/EzGroupingPanel.d.ts +9 -0
  110. package/dist/components/EzTable/EzHeaderContextMenu.d.ts +8 -0
  111. package/dist/components/EzTable/EzPagination.d.ts +19 -0
  112. package/dist/components/EzTable/EzTable.types.d.ts +1481 -0
  113. package/dist/components/EzTable/EzTableEditDialog.d.ts +15 -0
  114. package/dist/components/EzTable/EzTableFooter.d.ts +10 -0
  115. package/dist/components/EzTable/EzTableOverlays.d.ts +11 -0
  116. package/dist/components/EzTable/EzTableStatusBar.d.ts +6 -0
  117. package/dist/components/EzTable/EzTableToolbar.d.ts +58 -0
  118. package/dist/components/EzTable/SmartCell.d.ts +7 -0
  119. package/dist/components/EzTable/__tests__/EzTableDX.test.d.ts +0 -0
  120. package/dist/components/EzTable/__tests__/EzTableEnterprise.test.d.ts +1 -0
  121. package/dist/components/EzTable/__tests__/useEzTable.test.d.ts +1 -0
  122. package/dist/components/EzTable/components/AdvancedColumnFilter.d.ts +16 -0
  123. package/dist/components/EzTable/components/BooleanFilterSection.d.ts +7 -0
  124. package/dist/components/EzTable/components/DraggableHeader.d.ts +10 -0
  125. package/dist/components/EzTable/components/EzTableBodySection.d.ts +70 -0
  126. package/dist/components/EzTable/components/EzTableCell.d.ts +46 -0
  127. package/dist/components/EzTable/components/EzTableHeaderSection.d.ts +22 -0
  128. package/dist/components/EzTable/components/EzTablePaginationSection.d.ts +31 -0
  129. package/dist/components/EzTable/components/EzTableRow.d.ts +56 -0
  130. package/dist/components/EzTable/components/FilterActionButtons.d.ts +16 -0
  131. package/dist/components/EzTable/components/FilterRuleSelect.d.ts +26 -0
  132. package/dist/components/EzTable/components/SelectAllCheckbox.d.ts +21 -0
  133. package/dist/components/EzTable/components/SelectFilterSection.d.ts +18 -0
  134. package/dist/components/EzTable/components/VirtualizedFilterList.d.ts +21 -0
  135. package/dist/components/EzTable/constants/filterOptions.d.ts +47 -0
  136. package/dist/components/EzTable/context/EzTableContext.d.ts +10 -0
  137. package/dist/components/EzTable/context/TableConfigContext.d.ts +13 -0
  138. package/dist/components/EzTable/context/TableStore.d.ts +17 -0
  139. package/dist/components/EzTable/filterUtils.d.ts +5 -0
  140. package/dist/components/EzTable/hooks/useAutoFit.d.ts +4 -0
  141. package/dist/components/EzTable/hooks/useCellEventHandlers.d.ts +16 -0
  142. package/dist/components/EzTable/hooks/useColumnSizeVars.d.ts +6 -0
  143. package/dist/components/EzTable/hooks/useContainerResize.d.ts +11 -0
  144. package/dist/components/EzTable/hooks/useDialogStateInitialization.d.ts +8 -0
  145. package/dist/components/EzTable/hooks/useFilterSelection.d.ts +12 -0
  146. package/dist/components/EzTable/hooks/useTableFiltering.d.ts +23 -0
  147. package/dist/components/EzTable/hooks/useTableHistory.d.ts +87 -0
  148. package/dist/components/EzTable/hooks/useTableImperative.d.ts +42 -0
  149. package/dist/components/EzTable/hooks/useTableSelection.d.ts +32 -0
  150. package/dist/components/EzTable/hooks/useTableState.d.ts +31 -0
  151. package/dist/components/EzTable/hooks/useTableVirtualization.d.ts +33 -0
  152. package/dist/components/EzTable/index.d.ts +50 -0
  153. package/dist/components/EzTable/renderers/index.d.ts +6 -0
  154. package/dist/components/EzTable/services/TableService.d.ts +26 -0
  155. package/dist/components/EzTable/useEzTable.d.ts +17 -0
  156. package/dist/components/EzTable/utils/TextMeasurer.d.ts +1 -0
  157. package/dist/components/EzTable/utils/TruncatedTooltip.d.ts +7 -0
  158. package/dist/components/EzTable/utils/columnTypeDetector.d.ts +5 -0
  159. package/dist/components/EzTable/utils/filterTypeGuards.d.ts +3 -0
  160. package/dist/components/EzTable/utils/index.d.ts +1 -0
  161. package/dist/components/EzTreeView/EzTreeView.types.d.ts +395 -0
  162. package/dist/components/EzTreeView/EzTreeViewItem.d.ts +77 -0
  163. package/dist/components/EzTreeView/EzVirtualTree.d.ts +72 -0
  164. package/dist/components/EzTreeView/components/EzTreeViewLoadingSpinner.d.ts +2 -0
  165. package/dist/components/EzTreeView/hooks/useTreeDragDrop.d.ts +31 -0
  166. package/dist/components/EzTreeView/hooks/useTreeExpansion.d.ts +21 -0
  167. package/dist/components/EzTreeView/hooks/useTreeImperative.d.ts +28 -0
  168. package/dist/components/EzTreeView/hooks/useTreeSelection.d.ts +31 -0
  169. package/dist/components/EzTreeView/hooks/useTreeState.d.ts +21 -0
  170. package/dist/components/EzTreeView/hooks/useTreeVirtualization.d.ts +18 -0
  171. package/dist/components/EzTreeView/index.d.ts +40 -0
  172. package/dist/components/EzTreeView/services/TreeService.d.ts +11 -0
  173. package/dist/components/EzTreeView/useEzTreeView.d.ts +62 -0
  174. package/dist/components/EzTreeView/utils/treeUtils.d.ts +17 -0
  175. package/dist/components/shared/components/EzErrorBoundary.d.ts +18 -0
  176. package/dist/components/shared/components/EzLayoutErrorFallback.d.ts +2 -0
  177. package/dist/components/shared/components/EzLoadingSpinner.d.ts +8 -0
  178. package/dist/components/shared/components/EzSchedulerErrorFallback.d.ts +2 -0
  179. package/dist/components/shared/components/EzTableErrorFallback.d.ts +2 -0
  180. package/dist/components/shared/components/EzTreeViewErrorFallback.d.ts +2 -0
  181. package/dist/components/ui/avatar.d.ts +5 -0
  182. package/dist/components/ui/badge.d.ts +9 -0
  183. package/dist/components/ui/breadcrumb.d.ts +19 -0
  184. package/dist/components/ui/button.d.ts +12 -0
  185. package/dist/components/ui/calendar.d.ts +15 -0
  186. package/dist/components/ui/card.d.ts +8 -0
  187. package/dist/components/ui/checkbox.d.ts +7 -0
  188. package/dist/components/ui/command.d.ts +78 -0
  189. package/dist/components/ui/context-menu.d.ts +27 -0
  190. package/dist/components/ui/date-time-picker.d.ts +13 -0
  191. package/dist/components/ui/dropdown-menu.d.ts +27 -0
  192. package/dist/components/ui/index.d.ts +26 -0
  193. package/dist/components/ui/input.d.ts +5 -0
  194. package/dist/components/ui/label.d.ts +5 -0
  195. package/dist/components/ui/modal.d.ts +9 -0
  196. package/dist/components/ui/password-input.d.ts +5 -0
  197. package/dist/components/ui/popover.d.ts +4 -0
  198. package/dist/components/ui/progress.d.ts +7 -0
  199. package/dist/components/ui/radio-group.d.ts +5 -0
  200. package/dist/components/ui/scroll-area.d.ts +5 -0
  201. package/dist/components/ui/select.d.ts +24 -0
  202. package/dist/components/ui/skeleton.d.ts +2 -0
  203. package/dist/components/ui/switch.d.ts +4 -0
  204. package/dist/components/ui/table.d.ts +10 -0
  205. package/dist/components/ui/tabs.d.ts +14 -0
  206. package/dist/components/ui/textarea.d.ts +5 -0
  207. package/dist/components/ui/tooltip.d.ts +7 -0
  208. package/dist/ezux.es.js +149 -0
  209. package/dist/ezux.umd.js +68 -0
  210. package/dist/index-DBwoXp4n.js +30656 -0
  211. package/dist/index.d.ts +70 -0
  212. package/dist/lib/perfect-freehand.d.ts +221 -0
  213. package/dist/lib/utils.d.ts +2 -0
  214. package/dist/shared/components/AnimatedText.d.ts +44 -0
  215. package/dist/shared/components/BaseCell.d.ts +14 -0
  216. package/dist/shared/components/BooleanRenderer.d.ts +34 -0
  217. package/dist/shared/components/ChartRenderer.d.ts +19 -0
  218. package/dist/shared/components/DeleteConfirmationModal.d.ts +11 -0
  219. package/dist/shared/components/EzContextMenu.d.ts +12 -0
  220. package/dist/shared/components/EzNotificationDropdown.d.ts +1 -0
  221. package/dist/shared/components/HighlightText.d.ts +4 -0
  222. package/dist/shared/components/Modal.d.ts +13 -0
  223. package/dist/shared/components/NotificationPanel.d.ts +2 -0
  224. package/dist/shared/components/PrimitiveRenderer.d.ts +39 -0
  225. package/dist/shared/components/SearchableSelect.d.ts +13 -0
  226. package/dist/shared/components/SelectRenderer.d.ts +33 -0
  227. package/dist/shared/components/StatusBadge.d.ts +12 -0
  228. package/dist/shared/components/TooltipWrapper.d.ts +12 -0
  229. package/dist/shared/components/index.d.ts +9 -0
  230. package/dist/shared/hooks/index.d.ts +56 -0
  231. package/dist/shared/hooks/useBaseComponent.d.ts +60 -0
  232. package/dist/shared/hooks/useComponentImperativeAPI.d.ts +11 -0
  233. package/dist/shared/hooks/useComponentState.d.ts +39 -0
  234. package/dist/shared/hooks/useCurrentTime.d.ts +6 -0
  235. package/dist/shared/hooks/useDataChangeEvents.d.ts +53 -0
  236. package/dist/shared/hooks/useDebounce.d.ts +10 -0
  237. package/dist/shared/hooks/useDeleteConfirmation.d.ts +9 -0
  238. package/dist/shared/hooks/useDialogState.d.ts +21 -0
  239. package/dist/shared/hooks/useDndHandlers.d.ts +17 -0
  240. package/dist/shared/hooks/useEditing.d.ts +107 -0
  241. package/dist/shared/hooks/useEventHandlers.d.ts +61 -0
  242. package/dist/shared/hooks/useEzTheme.d.ts +22 -0
  243. package/dist/shared/hooks/useFieldValidation.d.ts +24 -0
  244. package/dist/shared/hooks/useHistory.d.ts +13 -0
  245. package/dist/shared/hooks/useI18n.d.ts +9 -0
  246. package/dist/shared/hooks/useImperativeAPI.d.ts +8 -0
  247. package/dist/shared/hooks/useInitCoreServices.d.ts +5 -0
  248. package/dist/shared/hooks/useKeyboardNavigation.d.ts +36 -0
  249. package/dist/shared/hooks/useKeyboardShortcuts.d.ts +14 -0
  250. package/dist/shared/hooks/useLifecycleEvents.d.ts +22 -0
  251. package/dist/shared/hooks/useLoadingState.d.ts +17 -0
  252. package/dist/shared/hooks/useMediaQuery.d.ts +6 -0
  253. package/dist/shared/hooks/useNotificationService.d.ts +8 -0
  254. package/dist/shared/hooks/usePerformanceMonitor.d.ts +15 -0
  255. package/dist/shared/hooks/useRowSelectionEvents.d.ts +44 -0
  256. package/dist/shared/hooks/useSelection.d.ts +73 -0
  257. package/dist/shared/hooks/useService.d.ts +12 -0
  258. package/dist/shared/hooks/useServiceState.d.ts +12 -0
  259. package/dist/shared/hooks/useStateChangeEvents.d.ts +61 -0
  260. package/dist/shared/hooks/useTheme.d.ts +13 -0
  261. package/dist/shared/hooks/useVirtualization.d.ts +85 -0
  262. package/dist/shared/services/BaseService.d.ts +56 -0
  263. package/dist/shared/services/ContextMenuService.d.ts +58 -0
  264. package/dist/shared/services/ExportService.d.ts +35 -0
  265. package/dist/shared/services/FocusManagerService.d.ts +33 -0
  266. package/dist/shared/services/HierarchyService.d.ts +43 -0
  267. package/dist/shared/services/I18nService.d.ts +65 -0
  268. package/dist/shared/services/LayoutService.d.ts +80 -0
  269. package/dist/shared/services/NotificationService.d.ts +44 -0
  270. package/dist/shared/services/PersistenceService.d.ts +69 -0
  271. package/dist/shared/services/ServiceRegistry.d.ts +51 -0
  272. package/dist/shared/services/ThemeService.d.ts +49 -0
  273. package/dist/shared/services/VirtualizationService.d.ts +51 -0
  274. package/dist/shared/state/store.d.ts +10 -0
  275. package/dist/shared/themes.d.ts +25 -0
  276. package/dist/shared/types/BaseProps.d.ts +18 -0
  277. package/dist/shared/types/common.d.ts +292 -0
  278. package/dist/shared/types/commonTypes.d.ts +101 -0
  279. package/dist/shared/types/index.d.ts +2 -0
  280. package/dist/shared/utils/canvasUtils.d.ts +16 -0
  281. package/dist/shared/utils/commonUtils.d.ts +28 -0
  282. package/dist/shared/utils/csvUtils.d.ts +7 -0
  283. package/dist/shared/utils/dateUtils.d.ts +5 -0
  284. package/dist/shared/utils/dndUtils.d.ts +16 -0
  285. package/dist/shared/utils/ezStyleUtils.d.ts +64 -0
  286. package/dist/shared/utils/formatUtils.d.ts +20 -0
  287. package/dist/shared/utils/imperativeApiUtils.d.ts +36 -0
  288. package/dist/shared/utils/index.d.ts +11 -0
  289. package/dist/shared/utils/renderUtils.d.ts +6 -0
  290. package/dist/shared/utils/serviceUtils.d.ts +10 -0
  291. package/dist/shared/utils/styleUtils.d.ts +66 -0
  292. package/dist/shared/utils/validationUtils.d.ts +16 -0
  293. package/package.json +101 -0
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Row selection event callbacks shared across components.
3
+ */
4
+ export interface RowSelectionCallbacks<TData = any> {
5
+ onRowSelect?: (args: {
6
+ row: any;
7
+ data: TData;
8
+ rowIndex: number;
9
+ originalEvent?: React.SyntheticEvent;
10
+ }) => void;
11
+ onRowDeselect?: (args: {
12
+ row: any;
13
+ data: TData;
14
+ rowIndex: number;
15
+ }) => void;
16
+ onSelectionChange?: (selection: {
17
+ selectedIds: (string | number)[];
18
+ mode?: 'single' | 'multiple';
19
+ }) => void;
20
+ }
21
+ /**
22
+ * Row selection state for tracking changes
23
+ */
24
+ export interface RowSelectionState {
25
+ [key: string]: boolean;
26
+ }
27
+ /**
28
+ * Shared hook for row selection events.
29
+ * Tracks selection changes and emits per-row select/deselect events.
30
+ * Used by EzTable, EzScheduler, EzTreeView.
31
+ *
32
+ * @example
33
+ * const { handleSelectionChange } = useRowSelectionEvents(props, getRowData);
34
+ *
35
+ * // On selection state change
36
+ * handleSelectionChange(newSelection, event);
37
+ */
38
+ export declare const useRowSelectionEvents: <TData = any>(callbacks: RowSelectionCallbacks<TData>, getRowData: (rowId: string | number, index: number) => {
39
+ row: any;
40
+ data: TData;
41
+ } | undefined) => {
42
+ handleSelectionChange: (newSelection: RowSelectionState, originalEvent?: React.SyntheticEvent) => void;
43
+ getPreviousSelection: () => RowSelectionState;
44
+ };
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Configuration for the useSelection hook.
3
+ * @group Properties
4
+ */
5
+ export interface SelectionConfig<TData = any> {
6
+ /** Selection mode: single, multiple, or range. @default 'multiple' @group Properties */
7
+ mode?: 'single' | 'multiple' | 'range';
8
+ /** Whether to enable keyboard interaction support. @group Properties */
9
+ enableKeyboardNavigation?: boolean;
10
+ /** Callback triggered when selection changes. @group Events */
11
+ onSelectionChange?: (selectedIds: (string | number)[], selectedItems: TData[]) => void;
12
+ /** Function to extract a unique ID from an item. @group Data */
13
+ getItemId?: (item: TData) => string | number;
14
+ }
15
+ /**
16
+ * Internal selection state.
17
+ * @group State
18
+ */
19
+ export interface SelectionState {
20
+ /** Set of currently selected unique identifiers. @group State */
21
+ selectedIds: Set<string | number>;
22
+ /** ID of the node currently receiving focus. @group State */
23
+ focusedId: string | number | null;
24
+ /** ID of the node acting as the anchor for range selection. @group State */
25
+ anchorId: string | number | null;
26
+ }
27
+ /**
28
+ * Public API for selection management.
29
+ * @group Methods
30
+ */
31
+ export interface SelectionAPI<TData = any> {
32
+ /** Selects a single item by ID. @group Methods */
33
+ selectItem: (id: string | number) => void;
34
+ /** Selects multiple items by ID. @group Methods */
35
+ selectItems: (ids: (string | number)[]) => void;
36
+ /** Deselects a single item by ID. @group Methods */
37
+ deselectItem: (id: string | number) => void;
38
+ /** Deselects multiple items by ID. @group Methods */
39
+ deselectItems: (ids: (string | number)[]) => void;
40
+ /** Toggles the selection state of an item. @group Methods */
41
+ toggleItem: (id: string | number) => void;
42
+ /** Selects all available items (multi-mode only). @group Methods */
43
+ selectAll: () => void;
44
+ /** Clears all current selections. @group Methods */
45
+ clearSelection: () => void;
46
+ /** Selects a range of items between two IDs. @group Methods */
47
+ selectRange: (startId: string | number, endId: string | number) => void;
48
+ /** Checks if a specific ID is selected. @group Methods */
49
+ isSelected: (id: string | number) => boolean;
50
+ /** Returns an array of all selected IDs. @group Methods */
51
+ getSelectedIds: () => (string | number)[];
52
+ /** Returns an array of all selected data items. @group Methods */
53
+ getSelectedItems: () => TData[];
54
+ /** Returns the total number of selected items. @group Methods */
55
+ getSelectionCount: () => number;
56
+ /** Returns whether any items are currently selected. @group Methods */
57
+ hasSelection: () => boolean;
58
+ /** Sets the focused item ID. @group Methods */
59
+ setFocusedId: (id: string | number | null) => void;
60
+ /** Gets the currently focused item ID. @group Methods */
61
+ getFocusedId: () => string | number | null;
62
+ }
63
+ /**
64
+ * Shared selection hook for table, tree, and scheduler components.
65
+ *
66
+ * Provides standardized selection management (single/multiple/range) with support for
67
+ * keyboard navigation and persistent focus.
68
+ *
69
+ * @param items The list of items to manage selection for.
70
+ * @param config Selection behavior configuration.
71
+ * @group Hooks
72
+ */
73
+ export declare const useSelection: <TData = any>(items: TData[], config?: SelectionConfig<TData>) => SelectionAPI<TData>;
@@ -0,0 +1,12 @@
1
+ import { IService, ServiceRegistry } from '../services/ServiceRegistry';
2
+ /**
3
+ * Hook for standardized service access.
4
+ * Abstracts service registration and access patterns.
5
+ * Ensures the service is registered and provides a stable reference.
6
+ *
7
+ * @param serviceName Unique name of the service
8
+ * @param factory Factory function to create the service if not registered
9
+ * @param registry Optional service registry to use (defaults to global)
10
+ * @returns The requested service instance
11
+ */
12
+ export declare const useService: <T extends IService>(serviceName: string, factory: () => T, registry?: ServiceRegistry | null) => T;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Hook for subscribing to a service's state in a reactive way.
3
+ *
4
+ * Automatically handles subscriptions to any service extending `BaseService`.
5
+ * Returns the latest state and triggers re-renders on service updates.
6
+ *
7
+ * @template TState The shape of the service's state.
8
+ * @param serviceName The name of the service to subscribe to.
9
+ * @returns The current state of the service.
10
+ * @group Hooks
11
+ */
12
+ export declare const useServiceState: <TState>(serviceName: string) => TState | undefined;
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Sort/Filter/Page event callbacks shared across components.
3
+ */
4
+ export interface StateChangeCallbacks {
5
+ onSort?: (args: {
6
+ columns: {
7
+ field: string;
8
+ direction: 'asc' | 'desc';
9
+ }[];
10
+ }) => void;
11
+ onPageChange?: (args: {
12
+ currentPage: number;
13
+ pageSize: number;
14
+ }) => void;
15
+ onFilter?: (args: {
16
+ columns: {
17
+ field: string;
18
+ operator: string;
19
+ value: any;
20
+ }[];
21
+ }) => void;
22
+ onSearch?: (term: string) => void;
23
+ }
24
+ /**
25
+ * Sort state from TanStack
26
+ */
27
+ export interface SortingState {
28
+ id: string;
29
+ desc: boolean;
30
+ }
31
+ /**
32
+ * Pagination state from TanStack
33
+ */
34
+ export interface PaginationState {
35
+ pageIndex: number;
36
+ pageSize: number;
37
+ }
38
+ /**
39
+ * Filter state from TanStack
40
+ */
41
+ export interface ColumnFilterState {
42
+ id: string;
43
+ value: any;
44
+ }
45
+ /**
46
+ * Shared hook for state change events (sort, page, filter).
47
+ * Creates wrappers that emit aliased events alongside native TanStack callbacks.
48
+ * Used by EzTable, EzScheduler, EzTreeView.
49
+ *
50
+ * @example
51
+ * const { wrapSortingChange, wrapPaginationChange } = useStateChangeEvents(props);
52
+ *
53
+ * // Use in table config
54
+ * onSortingChange: wrapSortingChange(setSorting)
55
+ */
56
+ export declare const useStateChangeEvents: (callbacks: StateChangeCallbacks) => {
57
+ wrapSortingChange: <T extends (SortingState[] | ((old: SortingState[]) => SortingState[]))>(setter: (updater: T) => void, nativeCallback?: (state: SortingState[]) => void) => (updater: T) => void;
58
+ wrapPaginationChange: (setter: (updater: PaginationState | ((old: PaginationState) => PaginationState)) => void, nativeCallback?: (state: PaginationState) => void) => (updater: PaginationState | ((old: PaginationState) => PaginationState)) => void;
59
+ emitSort: (sorting: SortingState[]) => void;
60
+ emitPageChange: (pagination: PaginationState) => void;
61
+ };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Hook for accessing and managing theme state
3
+ * Integrates with the global UI store for theme management
4
+ */
5
+ export declare const useTheme: () => {
6
+ theme: "light" | "dark" | "system";
7
+ rtl: boolean;
8
+ setTheme: (newTheme: "light" | "dark" | "system") => void;
9
+ toggleTheme: () => void;
10
+ setRTL: (newRtl: boolean) => void;
11
+ isDark: boolean;
12
+ isLight: boolean;
13
+ };
@@ -0,0 +1,85 @@
1
+ import { Virtualizer, Range } from '@tanstack/react-virtual';
2
+ /**
3
+ * Configuration for the useVirtualization hook.
4
+ * @group Properties
5
+ */
6
+ export interface VirtualizationConfig {
7
+ /** Total number of rows in the dataset. @group Data */
8
+ rowCount: number;
9
+ /** Fixed height or dynamic accessor for row height. @group Appearance */
10
+ rowHeight?: number | ((index: number) => number);
11
+ /** Number of rows to render outside the visible area. @group Performance */
12
+ overscanCount?: number;
13
+ /** Whether row virtualization is enabled. @default true @group Properties */
14
+ enableRowVirtualization?: boolean;
15
+ /** Unique ID for service registration. @group Properties */
16
+ id?: string;
17
+ /** Total number of columns (for 2D virtualization). @group Data */
18
+ columnCount?: number;
19
+ /** Fixed width or dynamic accessor for column width. @group Appearance */
20
+ columnWidth?: number | ((index: number) => number);
21
+ /** Whether column virtualization is enabled. @group Properties */
22
+ enableColumnVirtualization?: boolean;
23
+ /** Margin to add to the scroll container's size. @group Appearance */
24
+ scrollMargin?: number;
25
+ /** Padding at the start of the scrollable area. @group Appearance */
26
+ scrollPaddingStart?: number;
27
+ /** Padding at the end of the scrollable area. @group Appearance */
28
+ scrollPaddingEnd?: number;
29
+ /** Reduces overscan during active scrolling for performance. @group Performance */
30
+ progressiveRendering?: boolean;
31
+ /** Distance in rows to trigger pre-fetching. @group Performance */
32
+ prefetchDistance?: number;
33
+ /** Automatically adjusts sizes based on content. @group Performance */
34
+ adaptiveSizing?: boolean;
35
+ /** Text direction (ltr or rtl). @group Appearance */
36
+ languageDirection?: 'ltr' | 'rtl';
37
+ /** Enables debug logging. @group Properties */
38
+ debug?: boolean;
39
+ /** Custom logic to determine which items to render. @group Performance */
40
+ customRangeExtractor?: (range: Range) => number[];
41
+ /** Callback triggered when scroll offset changes. @group Events */
42
+ onScroll?: (offset: number) => void;
43
+ /** Callback triggered when scrolling begins. @group Events */
44
+ onScrollStart?: () => void;
45
+ /** Callback triggered when scrolling stops. @group Events */
46
+ onScrollStop?: () => void;
47
+ }
48
+ /**
49
+ * Result object for the useVirtualization hook.
50
+ * @group Methods
51
+ */
52
+ export interface VirtualizationResult {
53
+ /** Ref to attach to the scroll container. @group Properties */
54
+ parentRef: React.RefObject<HTMLDivElement | null>;
55
+ /** The TanStack virtualizer instance for rows. @group Properties */
56
+ rowVirtualizer: Virtualizer<HTMLDivElement, Element>;
57
+ /** The TanStack virtualizer instance for columns (if enabled). @group Properties */
58
+ columnVirtualizer?: Virtualizer<HTMLDivElement, Element>;
59
+ /** Scrolls to a specific index (alias for scrollToRow). @group Methods */
60
+ scrollToIndex: (index: number, options?: {
61
+ align?: 'start' | 'center' | 'end' | 'auto';
62
+ }) => void;
63
+ /** Scrolls to a specific row index. @group Methods */
64
+ scrollToRow: (index: number, options?: {
65
+ align?: 'start' | 'center' | 'end' | 'auto';
66
+ }) => void;
67
+ /** Scrolls to a specific column index. @group Methods */
68
+ scrollToColumn?: (index: number, options?: {
69
+ align?: 'start' | 'center' | 'end' | 'auto';
70
+ }) => void;
71
+ /** Returns the list of items to currently render. @group Methods */
72
+ getVirtualItems: () => any[];
73
+ /** Current vertical scroll offset. @group State */
74
+ scrollOffset: number;
75
+ }
76
+ /**
77
+ * Shared virtualization hook for table, tree, and scheduler components.
78
+ *
79
+ * Provides standardized row and column virtualization using TanStack Virtual.
80
+ * Includes optimized progressive rendering, service integration, and pre-fetching support.
81
+ *
82
+ * @param config Virtualization configuration.
83
+ * @group Hooks
84
+ */
85
+ export declare const useVirtualization: (config: VirtualizationConfig) => VirtualizationResult;
@@ -0,0 +1,56 @@
1
+ import { IService } from './ServiceRegistry';
2
+ /**
3
+ * Abstract base class for all reactive services in EzUX.
4
+ *
5
+ * Provides built-in reactive state management with debouncing,
6
+ * automatic subscription handling, and a standardized cleanup lifecycle.
7
+ *
8
+ * @template TState The shape of the service's internal state.
9
+ * @group Services
10
+ */
11
+ export declare abstract class BaseService<TState> implements IService {
12
+ abstract name: string;
13
+ protected state: TState;
14
+ private subscribers;
15
+ private isUpdating;
16
+ private updateQueue;
17
+ protected cleanupTasks: (() => void)[];
18
+ constructor(initialState: TState);
19
+ /** Returns the current active state of the service. @group Methods */
20
+ getState(): TState;
21
+ /**
22
+ * Registers a task to be executed during service cleanup.
23
+ * Useful for clearing timers, removing event listeners, or closing connections.
24
+ * @group Methods
25
+ */
26
+ protected registerCleanup(task: () => void): void;
27
+ /**
28
+ * Subscribes to service state changes.
29
+ * @param listener Callback triggered on state updates.
30
+ * @returns Unsubscribe function.
31
+ * @group Methods
32
+ */
33
+ subscribe(listener: (state: TState) => void): () => void;
34
+ /**
35
+ * Updates the service state and notifies subscribers.
36
+ * Supports both partial objects and functional updaters.
37
+ * @group Methods
38
+ */
39
+ protected setState(updater: Partial<TState> | ((prev: TState) => Partial<TState>)): void;
40
+ private debounceTimer;
41
+ protected debounceMs: number;
42
+ /**
43
+ * Sets a debounce time for notifications to prevent rapid re-renders in components.
44
+ * @param ms Delay in milliseconds. Set to 0 to disable (immediate).
45
+ * @group Methods
46
+ */
47
+ setDebounce(ms: number): void;
48
+ private notifySubscribers;
49
+ private broadcast;
50
+ /**
51
+ * Performs final cleanup for the service.
52
+ * Triggers all registered cleanup tasks and clears all subscribers.
53
+ * @group Methods
54
+ */
55
+ cleanup(): void;
56
+ }
@@ -0,0 +1,58 @@
1
+ import { IService } from './ServiceRegistry';
2
+ /**
3
+ * Represents an individual item in a context menu.
4
+ * @group Services
5
+ */
6
+ export interface MenuItem {
7
+ /** Unique identifier for the menu item. @group Data */
8
+ id: string;
9
+ /** Text label to display. @group Data */
10
+ label: string;
11
+ /** Internal action identifier triggered on click. @group Data */
12
+ action: string;
13
+ /** Optional icon element. @group Appearance */
14
+ icon?: React.ReactNode;
15
+ /** Keyboard shortcut hint (e.g., 'Ctrl+C'). @group Appearance */
16
+ shortcut?: string;
17
+ /** Whether the item is non-interactive. @group Properties */
18
+ disabled?: boolean;
19
+ /** Whether to render a visual separator below this item. @group Appearance */
20
+ isSeparator?: boolean;
21
+ /** Custom CSS class for the item. @group Appearance */
22
+ className?: string;
23
+ /** Custom click handler. @group Events */
24
+ onClick?: (data: any) => void;
25
+ }
26
+ /**
27
+ * Functional provider that generates menu items for a specific data context.
28
+ * @group Services
29
+ */
30
+ export type ContextMenuProvider<T = any> = (data: T) => MenuItem[];
31
+ /**
32
+ * Service for managing dynamic, context-aware menus across the application.
33
+ *
34
+ * Supports registration of menu providers by context ID and retrieval
35
+ * of localized, state-dependent menu items for specific data targets.
36
+ *
37
+ * @group Services
38
+ */
39
+ export declare class ContextMenuService implements IService {
40
+ name: string;
41
+ private providers;
42
+ /**
43
+ * Registers a menu provider for a specific context.
44
+ * @param contextId Unique ID for the context (e.g., 'table-row').
45
+ * @param provider function that returns menu items based on the target data.
46
+ * @returns Unsubscribe function to remove the provider.
47
+ * @group Methods
48
+ */
49
+ register<T>(contextId: string, provider: ContextMenuProvider<T>): () => boolean;
50
+ /**
51
+ * Retrieves the list of menu items for a specific context and data target.
52
+ * @param contextId The ID of the context to lookup.
53
+ * @param data The data object the menu is opening for.
54
+ * @group Methods
55
+ */
56
+ getItems(contextId: string, data: any): MenuItem[];
57
+ cleanup(): void;
58
+ }
@@ -0,0 +1,35 @@
1
+ import { IService } from './ServiceRegistry';
2
+ /**
3
+ * Options for configuring data exports.
4
+ * @group Properties
5
+ */
6
+ export interface ExportOptions {
7
+ /** Target filename (without extension). @group Properties */
8
+ fileName?: string;
9
+ /** Internal sheet name (for Excel). @group Properties */
10
+ sheetName?: string;
11
+ /** List of field names to omit from the export. @group Data */
12
+ excludeColumns?: string[];
13
+ }
14
+ /**
15
+ * Service for client-side data exportation in various formats.
16
+ *
17
+ * Provides efficient CSV and Excel generation using `file-saver` and `xlsx`.
18
+ *
19
+ * @group Services
20
+ */
21
+ export declare class ExportService implements IService {
22
+ name: string;
23
+ /**
24
+ * Exports an array of data to a CSV file.
25
+ * @param data The row data to export.
26
+ * @param columns Column definitions for mapping headers and accessors.
27
+ * @param options Export configuration options.
28
+ * @group Methods
29
+ */
30
+ exportToCSV<T>(data: T[], columns: {
31
+ header: string;
32
+ accessorKey?: string;
33
+ id?: string;
34
+ }[], options?: ExportOptions): void;
35
+ }
@@ -0,0 +1,33 @@
1
+ import { IService } from './ServiceRegistry';
2
+ /**
3
+ * Service for managing keyboard focus and accessibility across the application.
4
+ *
5
+ * Handles registration of focusable elements, programmatic focus movement,
6
+ * and standard ARIA focus trapping for modals and popovers.
7
+ *
8
+ * @group Services
9
+ */
10
+ export declare class FocusManagerService implements IService {
11
+ name: string;
12
+ private focusableElements;
13
+ private currentFocusIndex;
14
+ constructor();
15
+ /** Registers an element as focusable and ensures proper tab order. @group Methods */
16
+ registerFocusable(element: HTMLElement): void;
17
+ /** Unregisters an element and updates the current focus tracking. @group Methods */
18
+ unregisterFocusable(element: HTMLElement): void;
19
+ /** Moves focus to the next element in the registration list. @group Methods */
20
+ focusNext(): void;
21
+ /** Moves focus to the previous element in the registration list. @group Methods */
22
+ focusPrevious(): void;
23
+ /**
24
+ * Traps keyboard focus within a specific DOM container.
25
+ * Common for dialogs and side sheets to maintain focus context.
26
+ *
27
+ * @param container The element to trap focus inside.
28
+ * @returns Cleanup function to release the trap.
29
+ * @group Methods
30
+ */
31
+ trapFocus(container: HTMLElement): () => void;
32
+ cleanup(): void;
33
+ }
@@ -0,0 +1,43 @@
1
+ import { IService } from './ServiceRegistry';
2
+ /**
3
+ * Represents a node in a hierarchical data structure.
4
+ * @group Services
5
+ */
6
+ export interface HierarchyNode {
7
+ /** Unique identifier for the node. @group Data */
8
+ id: string;
9
+ /** Array of child node IDs. @group Data */
10
+ children?: string[];
11
+ /** ID of the parent node. @group Data */
12
+ parentId?: string;
13
+ /** Depth level in the hierarchy (0-indexed). @group Data */
14
+ level: number;
15
+ }
16
+ /**
17
+ * Service for managing complex hierarchical relationships between data elements.
18
+ *
19
+ * Provides utility methods for traversing parent-child relationships,
20
+ * finding ancestors/descendants, and managing structural integrity of trees.
21
+ *
22
+ * @group Services
23
+ */
24
+ export declare class HierarchyService implements IService {
25
+ name: string;
26
+ private nodeMap;
27
+ constructor();
28
+ /** Registers a node in the hierarchy map. @group Methods */
29
+ registerNode(node: HierarchyNode): void;
30
+ /** Removes a node and its structural links from the map. @group Methods */
31
+ unregisterNode(id: string): void;
32
+ /** Returns the direct parent node of a given node ID. @group Methods */
33
+ getParent(id: string): HierarchyNode | undefined;
34
+ /** Returns an array of direct child nodes for a given node ID. @group Methods */
35
+ getChildren(id: string): HierarchyNode[];
36
+ /** Returns all descendants (children, grandchildren, etc.) IDs for a node. @group Methods */
37
+ getDescendants(id: string): string[];
38
+ /** Returns all ancestor (parent, grandparent, etc.) IDs for a node. @group Methods */
39
+ getAncestors(id: string): string[];
40
+ /** Retrieves a specific hierarchy node by ID. @group Methods */
41
+ getNode(id: string): HierarchyNode | undefined;
42
+ cleanup(): void;
43
+ }
@@ -0,0 +1,65 @@
1
+ import { BaseService } from './BaseService';
2
+ /**
3
+ * Current state of the internationalization service.
4
+ * @group State
5
+ */
6
+ export interface I18nState {
7
+ /** Current locale code (e.g., 'en', 'fr'). @group Data */
8
+ locale: string;
9
+ /** Text direction associated with the locale (ltr or rtl). @group Data */
10
+ dir: 'ltr' | 'rtl';
11
+ /** Map of all registered translations. @group Data */
12
+ translations: Record<string, Record<string, string>>;
13
+ }
14
+ /**
15
+ * A reactive internationalization service for EzUX.
16
+ *
17
+ * Manages locale changes, text direction (RTL support), and translation lookups.
18
+ * Supports dynamic registration of component-specific translation strings.
19
+ *
20
+ * @group Services
21
+ */
22
+ export declare class I18nService extends BaseService<I18nState> {
23
+ name: string;
24
+ readonly supportedLanguages: {
25
+ code: string;
26
+ name: string;
27
+ country: string;
28
+ }[];
29
+ private initialTranslations;
30
+ private _locale;
31
+ private _translations;
32
+ constructor(defaultLocale?: string);
33
+ get locale(): string;
34
+ get dir(): "ltr" | "rtl";
35
+ /**
36
+ * Formats a date based on the current active locale.
37
+ * @param value The date to format.
38
+ * @param options Formatting options.
39
+ * @group Formatting
40
+ */
41
+ formatDate: (value: Date | string | null | undefined, options?: {
42
+ format?: "short" | "long" | "relative" | "iso";
43
+ }) => string;
44
+ /**
45
+ * Formats a number based on the current active locale.
46
+ * @param value The number to format.
47
+ * @param options Formatting options.
48
+ * @group Formatting
49
+ */
50
+ formatNumber: (value: number | null | undefined, options?: {
51
+ format?: "integer" | "float" | "currency" | "percentage";
52
+ decimals?: number;
53
+ currency?: string;
54
+ }) => string;
55
+ /**
56
+ * Formats a currency based on the current active locale.
57
+ * @param value The amount to format.
58
+ * @param currency The currency code (default: USD).
59
+ * @group Formatting
60
+ */
61
+ formatCurrency: (value: number, currency?: string) => string;
62
+ setLocale(_locale: string): void;
63
+ registerTranslations(_locale: string, _da: Record<string, string>): void;
64
+ t(_key: string): string;
65
+ }