ezux 1.1.13 → 1.1.18
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/README.md +58 -15
- package/dist/DeleteConfirmationModal-CukNDgtX.cjs +1 -0
- package/dist/DeleteConfirmationModal-p8XGDGIw.js +38 -0
- package/dist/EzContextMenu-BCUoEQp5.cjs +1 -0
- package/dist/EzContextMenu-srLxujt8.js +287 -0
- package/dist/EzErrorBoundary-C7a6VisX.js +74 -0
- package/dist/EzErrorBoundary-d_2g-_EK.cjs +1 -0
- package/dist/EzEventModal-C079wLjP.js +725 -0
- package/dist/EzEventModal-CAA9cAM0.cjs +1 -0
- package/dist/EzFlow-C74NbZA9.js +2545 -0
- package/dist/EzFlow-CQFeY7DL.cjs +5 -0
- package/dist/EzGroupingPanel-BVaAJaVU.js +107 -0
- package/dist/EzGroupingPanel-BwWDWEuW.cjs +1 -0
- package/dist/EzKanban-BlJWybKe.js +1575 -0
- package/dist/EzKanban-DdKODRRv.cjs +2 -0
- package/dist/EzLayout-BGnqFtvO.cjs +1 -0
- package/dist/EzLayout-CiaPLniV.js +7005 -0
- package/dist/EzProvider-AlmsYIDk.js +982 -0
- package/dist/EzProvider-L2qQMq-v.cjs +1 -0
- package/dist/EzScheduler-C1Jtvvju.js +2700 -0
- package/dist/EzScheduler-CkqTngI6.cjs +1 -0
- package/dist/EzSchedulerQuickAdd-BIC8xbSn.js +124 -0
- package/dist/EzSchedulerQuickAdd-BeNfGdWs.cjs +1 -0
- package/dist/EzSchedulerToolbar-BJwTpgas.cjs +1 -0
- package/dist/EzSchedulerToolbar-Ba4gbvUg.js +305 -0
- package/dist/EzSignature-7UHO5lSP.js +386 -0
- package/dist/EzSignature-Df7UZ-IS.cjs +1 -0
- package/dist/EzTable-CEXvJR1t.cjs +3 -0
- package/dist/EzTable-D2p1IWHc.js +4290 -0
- package/dist/EzTableEditDialog-BXnnYSSy.cjs +1 -0
- package/dist/EzTableEditDialog-Ccd5XoHm.js +84 -0
- package/dist/EzTableFooter-CtexeDAC.cjs +1 -0
- package/dist/EzTableFooter-DrLoWelo.js +35 -0
- package/dist/EzTableToolbar-BH5z9fSJ.js +160 -0
- package/dist/EzTableToolbar-DwuumvWP.cjs +1 -0
- package/dist/EzTreeView-D1G0Aomc.js +818 -0
- package/dist/EzTreeView-KMGlU4ax.cjs +1 -0
- package/dist/HighlightText-BViuwe03.cjs +1 -0
- package/dist/HighlightText-DNA2R2uf.js +56 -0
- package/dist/KanbanBoard-B7_Z5sh1.js +1697 -0
- package/dist/KanbanBoard-CyitudI1.cjs +1 -0
- package/dist/Modal-BmX1C448.cjs +1 -0
- package/dist/Modal-CrzpKyjK.js +74 -0
- package/dist/NotificationPanel-BzpDc10Q.js +54 -0
- package/dist/NotificationPanel-CFME00wq.cjs +1 -0
- package/dist/TooltipWrapper-BSAmUx9H.js +44 -0
- package/dist/TooltipWrapper-DfbFAZ1U.cjs +1 -0
- package/dist/advanced.cjs +10 -0
- package/dist/advanced.d.ts +44 -0
- package/dist/advanced.es.js +400 -0
- package/dist/avatar-BSdRHETK.cjs +1 -0
- package/dist/avatar-BvCUJ-_r.js +27 -0
- package/dist/button-BBMwzUtG.cjs +1 -0
- package/dist/button-CYyNwV8S.js +44 -0
- package/dist/calendar-DEHX32Cp.cjs +1 -0
- package/dist/calendar-DOIPGsyI.js +112 -0
- package/dist/card-CPlRZxbq.cjs +1 -0
- package/dist/card-ZUNxcdIM.js +60 -0
- package/dist/checkbox-BrCh_Iid.cjs +1 -0
- package/dist/checkbox-DRkQuB4W.js +21 -0
- package/dist/components/EzFlow/EzConnectionLine.d.ts +5 -0
- package/dist/components/EzFlow/EzFlow.examples.d.ts +5 -0
- package/dist/components/EzFlow/EzFlow.types.d.ts +260 -0
- package/dist/components/EzFlow/EzFlowBackground.d.ts +5 -0
- package/dist/components/EzFlow/EzFlowCanvas.d.ts +3 -0
- package/dist/components/EzFlow/EzFlowControls.d.ts +5 -0
- package/dist/components/EzFlow/EzFlowEdge.d.ts +5 -0
- package/dist/components/EzFlow/EzFlowHeader.d.ts +6 -0
- package/dist/components/EzFlow/EzFlowToolbox.d.ts +6 -0
- package/dist/components/EzFlow/EzWorkflow.d.ts +5 -0
- package/dist/components/EzFlow/EzWorkflowPerformance.d.ts +3 -0
- package/dist/components/EzFlow/EzWorkflowServiceAdapters.d.ts +24 -0
- package/dist/components/EzFlow/EzWorkflowValidation.d.ts +95 -0
- package/dist/components/EzFlow/index.d.ts +13 -0
- package/dist/components/EzFlow/nodes/ActionNode.d.ts +3 -0
- package/dist/components/EzFlow/nodes/ApprovalNode.d.ts +3 -0
- package/dist/components/EzFlow/nodes/DecisionNode.d.ts +3 -0
- package/dist/components/EzFlow/nodes/DelayNode.d.ts +3 -0
- package/dist/components/EzFlow/nodes/EndNode.d.ts +3 -0
- package/dist/components/EzFlow/nodes/GroupNode.d.ts +3 -0
- package/dist/components/EzFlow/nodes/LoopNode.d.ts +3 -0
- package/dist/components/EzFlow/nodes/RequestNode.d.ts +3 -0
- package/dist/components/EzFlow/nodes/StartNode.d.ts +3 -0
- package/dist/components/EzFlow/nodes/index.d.ts +9 -0
- package/dist/components/EzKanban/EzKanban.types.d.ts +808 -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 +59 -0
- package/dist/components/EzKanban/components/KanbanCard.d.ts +46 -0
- package/dist/components/EzKanban/components/KanbanColumn.d.ts +55 -0
- package/dist/components/EzKanban/components/KanbanSwimlane.d.ts +45 -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 +51 -0
- package/dist/components/EzKanban/services/KanbanService.d.ts +31 -0
- package/dist/components/EzKanban/state/kanban.store.d.ts +33 -0
- package/dist/components/EzKanban/useEzKanban.d.ts +87 -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 +48 -0
- package/dist/components/EzLayout/EzLanguageSwitcher.d.ts +4 -0
- package/dist/components/EzLayout/EzLayout.types.d.ts +261 -0
- package/dist/components/EzLayout/EzOrganizationSwitcher.d.ts +14 -0
- package/dist/components/EzLayout/EzSidebar.d.ts +24 -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 +27 -0
- package/dist/components/EzLayout/components/EzSidebarFooter.d.ts +8 -0
- package/dist/components/EzLayout/components/EzSidebarNav.d.ts +10 -0
- package/dist/components/EzLayout/components/EzSidebarNavItem.d.ts +11 -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 +23 -0
- package/dist/components/EzLayout/useEzLayout.d.ts +34 -0
- package/dist/components/EzScheduler/EzScheduler.types.d.ts +1252 -0
- package/dist/components/EzScheduler/EzSchedulerToolbar.d.ts +117 -0
- package/dist/components/EzScheduler/components/EzEventModal.d.ts +23 -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 +111 -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 +24 -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 +15 -0
- package/dist/components/EzScheduler/hooks/useSchedulerEvents.d.ts +27 -0
- package/dist/components/EzScheduler/hooks/useSchedulerImperative.d.ts +19 -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 +43 -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 +71 -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/useEzScheduler.d.ts +104 -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 +18 -0
- package/dist/components/EzScheduler/views/AgendaView.d.ts +28 -0
- package/dist/components/EzScheduler/views/DayWeekView.d.ts +177 -0
- package/dist/components/EzScheduler/views/MonthView.d.ts +60 -0
- package/dist/components/EzScheduler/views/TimelineView.d.ts +116 -0
- package/dist/components/EzSignature/EzSignature.d.ts +42 -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 +8 -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 +1 -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 +10 -0
- package/dist/components/EzTable/EzTableToolbar.d.ts +60 -0
- package/dist/components/EzTable/SmartCell.d.ts +7 -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/EzDraggableHeader.d.ts +10 -0
- package/dist/components/EzTable/components/EzHeaderDragPreview.d.ts +7 -0
- package/dist/components/EzTable/components/EzTableBodySection.d.ts +72 -0
- package/dist/components/EzTable/components/EzTableCell.d.ts +46 -0
- package/dist/components/EzTable/components/EzTableHeaderSection.d.ts +23 -0
- package/dist/components/EzTable/components/EzTablePaginationSection.d.ts +31 -0
- package/dist/components/EzTable/components/EzTableRow.d.ts +58 -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 +33 -0
- package/dist/components/EzTable/hooks/useTableVirtualization.d.ts +35 -0
- package/dist/components/EzTable/index.d.ts +54 -0
- package/dist/components/EzTable/renderers/index.d.ts +6 -0
- package/dist/components/EzTable/services/TableService.d.ts +29 -0
- package/dist/components/EzTable/types/EzTableColumn.types.d.ts +146 -0
- package/dist/components/EzTable/types/EzTableEdit.types.d.ts +58 -0
- package/dist/components/EzTable/types/EzTableFilter.types.d.ts +50 -0
- package/dist/components/EzTable/types/EzTableProps.d.ts +750 -0
- package/dist/components/EzTable/types/index.d.ts +4 -0
- package/dist/components/EzTable/useEzTable.d.ts +17 -0
- package/dist/components/EzTable/utils/SizingUtils.d.ts +11 -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 +364 -0
- package/dist/components/EzTreeView/EzTreeViewItem.d.ts +89 -0
- package/dist/components/EzTreeView/EzVirtualTree.d.ts +84 -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 +50 -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/EzSortableList.d.ts +12 -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 +10 -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 +13 -0
- package/dist/components/ui/calendar.d.ts +15 -0
- package/dist/components/ui/card.d.ts +10 -0
- package/dist/components/ui/checkbox.d.ts +7 -0
- package/dist/components/ui/combobox.d.ts +19 -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 +14 -0
- package/dist/components/ui/dropdown-menu.d.ts +31 -0
- package/dist/components/ui/index.d.ts +27 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/label.d.ts +9 -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 +10 -0
- package/dist/components/ui/progress.d.ts +7 -0
- package/dist/components/ui/radio-group.d.ts +5 -0
- package/dist/components/ui/resizable.d.ts +8 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/select.d.ts +26 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/switch.d.ts +6 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/tabs.d.ts +22 -0
- package/dist/components/ui/textarea.d.ts +5 -0
- package/dist/components/ui/tooltip.d.ts +10 -0
- package/dist/date-time-picker-Bs-7XzHD.cjs +1 -0
- package/dist/date-time-picker-fUzf4TnU.js +127 -0
- package/dist/dropdown-menu-BRP0tyR_.cjs +1 -0
- package/dist/dropdown-menu-B_7_K13o.js +78 -0
- package/dist/ezux.css +2 -1
- package/dist/flow.cjs +1 -0
- package/dist/flow.d.ts +2 -0
- package/dist/flow.es.js +2 -0
- package/dist/index.cjs +3 -12
- package/dist/index.d.ts +66 -6404
- package/dist/index.es.js +229 -1041
- package/dist/input-CYlvlbF7.cjs +1 -0
- package/dist/input-Cj3sQK3M.js +14 -0
- package/dist/kanban.cjs +1 -1
- package/dist/kanban.d.ts +2 -1343
- package/dist/kanban.es.js +4 -17
- package/dist/label-BGgvoZWD.cjs +1 -0
- package/dist/label-DWEV--5W.js +16 -0
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +2 -690
- package/dist/layout.es.js +2 -20
- package/dist/lib/perfect-freehand.d.ts +221 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/mock-services.cjs +1 -0
- package/dist/mock-services.d.ts +8 -0
- package/dist/mock-services.es.js +161 -0
- package/dist/popover-D1akYj0W.js +17 -0
- package/dist/popover-wZKNvYM5.cjs +1 -0
- package/dist/scheduler.cjs +1 -1
- package/dist/scheduler.d.ts +2 -1430
- package/dist/scheduler.es.js +2 -11
- package/dist/scroll-area-BJs87d45.js +35 -0
- package/dist/scroll-area-DSkE2KB_.cjs +1 -0
- package/dist/select-D4tFaSai.js +43 -0
- package/dist/select-sVieKbLu.cjs +1 -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 +2 -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 +21 -0
- package/dist/shared/components/TooltipWrapper.d.ts +12 -0
- package/dist/shared/components/index.d.ts +9 -0
- package/dist/shared/contexts/EzProvider.d.ts +56 -0
- package/dist/shared/hooks/index.d.ts +56 -0
- package/dist/shared/hooks/useBaseComponent.d.ts +59 -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 +19 -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 +8 -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 +22 -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 +1 -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 +57 -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 +84 -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 +52 -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 +17 -0
- package/dist/shared/types/common.d.ts +373 -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/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 +121 -0
- package/dist/shared/utils/validationUtils.d.ts +16 -0
- package/dist/signature.cjs +1 -1
- package/dist/signature.d.ts +2 -410
- package/dist/signature.es.js +2 -4
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts +2 -1059
- package/dist/table.es.js +2 -17
- package/dist/theme-vars.css +143 -135
- package/dist/tooltip-B1wC9m05.js +16 -0
- package/dist/tooltip-Qmzrg5u5.cjs +1 -0
- package/dist/treeview.cjs +1 -1
- package/dist/treeview.d.ts +2 -656
- package/dist/treeview.es.js +2 -954
- package/dist/useComponentState-DiSFLYju.js +57 -0
- package/dist/useComponentState-Wcz6pjd6.cjs +1 -0
- package/dist/useImperativeAPI-Dbx2hMTb.js +7 -0
- package/dist/useImperativeAPI-VrgLwXEO.cjs +1 -0
- package/dist/useInitCoreServices-CuBrviDM.js +40 -0
- package/dist/useInitCoreServices-DlALVDNx.cjs +1 -0
- package/dist/useService-CnCBGG3G.js +10 -0
- package/dist/useService-CyF782jv.cjs +1 -0
- package/dist/useServiceState-CkrJZm1D.js +21 -0
- package/dist/useServiceState-PyYQWxHi.cjs +1 -0
- package/package.json +76 -56
- package/dist/EzContextMenu-B6HBUjWv.cjs +0 -5
- package/dist/EzContextMenu-BSA_B6Pr.js +0 -3500
- package/dist/EzErrorBoundary-CEdz_hDo.cjs +0 -41
- package/dist/EzErrorBoundary-D4NBadES.js +0 -3727
- package/dist/EzEventModal-BUMp_BFi.js +0 -689
- package/dist/EzEventModal-xzHfzi0O.cjs +0 -1
- package/dist/EzGroupingPanel-BUsIYDRi.js +0 -143
- package/dist/EzGroupingPanel-D0HdSomF.cjs +0 -1
- package/dist/EzSchedulerQuickAdd-C653LTGh.js +0 -118
- package/dist/EzSchedulerQuickAdd-UnOWCpJd.cjs +0 -1
- package/dist/EzSchedulerToolbar-C-5OdRY6.cjs +0 -1
- package/dist/EzSchedulerToolbar-CO5jjDQg.js +0 -240
- package/dist/EzSignature-BaNesxwC.cjs +0 -1
- package/dist/EzSignature-D4EYwo9W.js +0 -419
- package/dist/EzTableEditDialog-Cd948V1C.js +0 -63
- package/dist/EzTableEditDialog-NiOubaMT.cjs +0 -1
- package/dist/EzTableFooter-CWjfGCjL.cjs +0 -1
- package/dist/EzTableFooter-DveD12RC.js +0 -54
- package/dist/EzTableToolbar-Bz8UWv6j.js +0 -246
- package/dist/EzTableToolbar-DHE7Bb1R.cjs +0 -1
- package/dist/HighlightText-8D6KEyBw.js +0 -68
- package/dist/HighlightText-LtZmzCle.cjs +0 -1
- package/dist/NotificationPanel-D2Y-_ahk.js +0 -68
- package/dist/NotificationPanel-zLxrtTGf.cjs +0 -1
- package/dist/TooltipWrapper-BrRTi5EJ.js +0 -2021
- package/dist/TooltipWrapper-DWts4bAI.cjs +0 -1
- package/dist/avatar-BeK0E4mn.js +0 -41
- package/dist/avatar-DZAaTK2f.cjs +0 -1
- package/dist/bell-DAz8P0BR.js +0 -14
- package/dist/bell-DOX2y38e.cjs +0 -1
- package/dist/calendar-BMZ8ddOf.cjs +0 -1
- package/dist/calendar-Dy3rVMW2.js +0 -90
- package/dist/checkbox-B0lGHUyy.cjs +0 -1
- package/dist/checkbox-boJRxICT.js +0 -46
- package/dist/chevron-down-C3s8jU6B.js +0 -5
- package/dist/chevron-down-DZVL7VHW.cjs +0 -1
- package/dist/chevron-left-BFr8XZyF.js +0 -5
- package/dist/chevron-left-HWhRo6IH.cjs +0 -1
- package/dist/circle-alert-77QqFR-z.cjs +0 -1
- package/dist/circle-alert-B2AMDd8N.js +0 -9
- package/dist/circle-x-Cv7bfIC_.js +0 -9
- package/dist/circle-x-DwVXxhXr.cjs +0 -1
- package/dist/date-time-picker-DTxHdPgQ.cjs +0 -1
- package/dist/date-time-picker-Dj2eftJI.js +0 -1636
- package/dist/download-0ZhO2XaW.cjs +0 -1
- package/dist/download-panVHmk6.js +0 -9
- package/dist/ellipsis-CuqNthAj.js +0 -9
- package/dist/ellipsis-CzlqJf-i.cjs +0 -1
- package/dist/grip-vertical-CSyDKBul.js +0 -12
- package/dist/grip-vertical-DZNBW1Dn.cjs +0 -1
- package/dist/index-B3ipEEhH.cjs +0 -2
- package/dist/index-BPPb7bcs.js +0 -3220
- package/dist/index-BQKw_Vho.js +0 -9604
- package/dist/index-C5STgBSy.js +0 -5203
- package/dist/index-C6NfgycP.js +0 -4644
- package/dist/index-D4f2ZdrG.cjs +0 -2
- package/dist/index-DUY1SqMo.cjs +0 -1
- package/dist/index-c1Zg--dt.cjs +0 -7
- package/dist/input-BgM_la4k.cjs +0 -1
- package/dist/input-jYQ5VKNR.js +0 -21
- package/dist/isBefore-C3Y_wbk3.js +0 -15
- package/dist/isBefore-Cp1ttk6q.cjs +0 -1
- package/dist/label-ClOW9UCt.js +0 -55
- package/dist/label-Dx6oDB-X.cjs +0 -1
- package/dist/layers-BA4i1fYX.js +0 -27
- package/dist/layers-xSPd-hz3.cjs +0 -1
- package/dist/popover-BJq1CKmi.cjs +0 -1
- package/dist/popover-Cmlb7w3R.js +0 -341
- package/dist/scroll-area-9fwpVNxT.js +0 -573
- package/dist/scroll-area-CwwZSSA4.cjs +0 -1
- package/dist/select-GxA46anr.cjs +0 -1
- package/dist/select-mDCun_IR.js +0 -35
- package/dist/settings-CvyjK75A.js +0 -31
- package/dist/settings-DKPknrt8.cjs +0 -1
- package/dist/sortable.esm-CsRPuXyD.cjs +0 -1
- package/dist/sortable.esm-CzMCDPet.js +0 -477
- package/dist/tooltip-B41iztKT.cjs +0 -1
- package/dist/tooltip-BCtrEe0z.js +0 -490
- package/dist/useComponentState-C87xXa5d.js +0 -64
- package/dist/useComponentState-DDgGbBXv.cjs +0 -1
- package/dist/useImperativeAPI-DXmCQvPL.js +0 -7
- package/dist/useImperativeAPI-DbZ3owSV.cjs +0 -1
- package/dist/useInitCoreServices-CwXv2p4S.cjs +0 -1
- package/dist/useInitCoreServices-D1WaWlaI.js +0 -3929
- package/dist/useService-8OoezWr8.cjs +0 -1
- package/dist/useService-BUi3uAqE.js +0 -10
- package/dist/useServiceState-BjpCjUn2.cjs +0 -1
- package/dist/useServiceState-VE-viK8b.js +0 -24
|
@@ -0,0 +1,818 @@
|
|
|
1
|
+
import { _ as e, n as t } from "./EzProvider-AlmsYIDk.js";
|
|
2
|
+
import { n, t as r } from "./EzErrorBoundary-C7a6VisX.js";
|
|
3
|
+
import { t as i } from "./useService-CnCBGG3G.js";
|
|
4
|
+
import { t as a } from "./useComponentState-DiSFLYju.js";
|
|
5
|
+
import { n as o, t as s } from "./useInitCoreServices-CuBrviDM.js";
|
|
6
|
+
import { t as c } from "./useServiceState-CkrJZm1D.js";
|
|
7
|
+
import { a as l, i as u, t as d } from "./HighlightText-DNA2R2uf.js";
|
|
8
|
+
import { _ as f, t as p } from "./EzContextMenu-srLxujt8.js";
|
|
9
|
+
import { memo as m, useCallback as h, useEffect as g, useMemo as _, useRef as v, useState as y } from "react";
|
|
10
|
+
import { AlertTriangle as b, Check as x, ChevronDown as S, ChevronRight as C, Loader2 as w, RefreshCw as T } from "lucide-react";
|
|
11
|
+
import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
12
|
+
import { DndContext as k, PointerSensor as A, closestCenter as j, useSensor as M, useSensors as N } from "@dnd-kit/core";
|
|
13
|
+
import { CSS as P } from "@dnd-kit/utilities";
|
|
14
|
+
import { SortableContext as F, useSortable as I, verticalListSortingStrategy as L } from "@dnd-kit/sortable";
|
|
15
|
+
//#region src/shared/services/HierarchyService.ts
|
|
16
|
+
var R = class {
|
|
17
|
+
name = "HierarchyService";
|
|
18
|
+
nodeMap = /* @__PURE__ */ new Map();
|
|
19
|
+
constructor() {}
|
|
20
|
+
registerNode(e) {
|
|
21
|
+
this.nodeMap.set(e.id, e);
|
|
22
|
+
}
|
|
23
|
+
unregisterNode(e) {
|
|
24
|
+
this.nodeMap.delete(e);
|
|
25
|
+
}
|
|
26
|
+
getParent(e) {
|
|
27
|
+
let t = this.nodeMap.get(e);
|
|
28
|
+
if (t && t.parentId) return this.nodeMap.get(t.parentId);
|
|
29
|
+
}
|
|
30
|
+
getChildren(e) {
|
|
31
|
+
let t = this.nodeMap.get(e);
|
|
32
|
+
return t && t.children ? t.children.map((e) => this.nodeMap.get(e)).filter((e) => !!e) : [];
|
|
33
|
+
}
|
|
34
|
+
getDescendants(e) {
|
|
35
|
+
let t = [], n = [...this.nodeMap.get(e)?.children || []];
|
|
36
|
+
for (; n.length > 0;) {
|
|
37
|
+
let e = n.pop();
|
|
38
|
+
t.push(e);
|
|
39
|
+
let r = this.nodeMap.get(e);
|
|
40
|
+
r?.children && n.push(...r.children);
|
|
41
|
+
}
|
|
42
|
+
return t;
|
|
43
|
+
}
|
|
44
|
+
getAncestors(e) {
|
|
45
|
+
let t = [], n = this.nodeMap.get(e)?.parentId;
|
|
46
|
+
for (; n;) t.push(n), n = this.nodeMap.get(n)?.parentId;
|
|
47
|
+
return t;
|
|
48
|
+
}
|
|
49
|
+
getNode(e) {
|
|
50
|
+
return this.nodeMap.get(e);
|
|
51
|
+
}
|
|
52
|
+
cleanup() {
|
|
53
|
+
this.nodeMap.clear();
|
|
54
|
+
}
|
|
55
|
+
}, z = (e, t) => t ? {
|
|
56
|
+
id: t.id ? e[t.id] : e.id,
|
|
57
|
+
label: t.text ? e[t.text] : e.label,
|
|
58
|
+
children: t.children ? e[t.children] : e.children,
|
|
59
|
+
icon: t.icon ? e[t.icon] : e.icon,
|
|
60
|
+
...e
|
|
61
|
+
} : e, B = (e, t) => !t || t === "None" ? e : [...e].sort((e, n) => {
|
|
62
|
+
let r = e.label.localeCompare(n.label);
|
|
63
|
+
return t === "Ascending" ? r : -r;
|
|
64
|
+
}).map((e) => ({
|
|
65
|
+
...e,
|
|
66
|
+
children: e.children ? B(e.children, t) : void 0
|
|
67
|
+
})), V = u, H = l, U = (e) => {
|
|
68
|
+
let { data: t, fields: n, sortOrder: r, onDataSourceChanged: i, onDataBound: o } = e, { state: s, setState: c } = a({ initialState: {
|
|
69
|
+
internalTreeData: t,
|
|
70
|
+
loadingNodes: /* @__PURE__ */ new Set()
|
|
71
|
+
} }), l = v(!1), u = h((e) => {
|
|
72
|
+
c((t) => ({
|
|
73
|
+
...t,
|
|
74
|
+
internalTreeData: typeof e == "function" ? e(t.internalTreeData) : e
|
|
75
|
+
}));
|
|
76
|
+
}, [c]), d = h((e) => {
|
|
77
|
+
c((t) => ({
|
|
78
|
+
...t,
|
|
79
|
+
loadingNodes: typeof e == "function" ? e(t.loadingNodes) : e
|
|
80
|
+
}));
|
|
81
|
+
}, [c]), { internalTreeData: f, loadingNodes: p } = s, m = _(() => {
|
|
82
|
+
let e = f;
|
|
83
|
+
if (n) {
|
|
84
|
+
let t = (e) => e.map((e) => {
|
|
85
|
+
let r = z(e, n);
|
|
86
|
+
return r.children &&= t(r.children), r;
|
|
87
|
+
});
|
|
88
|
+
e = t(e);
|
|
89
|
+
}
|
|
90
|
+
return r && (e = B(e, r)), e;
|
|
91
|
+
}, [
|
|
92
|
+
f,
|
|
93
|
+
n,
|
|
94
|
+
r
|
|
95
|
+
]), y = v(t);
|
|
96
|
+
return g(() => {
|
|
97
|
+
y.current !== t && (u(t), i?.(), y.current = t);
|
|
98
|
+
}, [t, i]), g(() => {
|
|
99
|
+
l.current && o?.();
|
|
100
|
+
}, [m, o]), g(() => (l.current = !0, () => {
|
|
101
|
+
l.current = !1;
|
|
102
|
+
}), []), {
|
|
103
|
+
treeData: m,
|
|
104
|
+
setInternalTreeData: u,
|
|
105
|
+
loadingNodes: p,
|
|
106
|
+
setLoadingNodes: d,
|
|
107
|
+
updateNode: h((e, t) => {
|
|
108
|
+
u((n) => H(n, e, t));
|
|
109
|
+
}, [u])
|
|
110
|
+
};
|
|
111
|
+
}, ee = (e, t, n, r, i) => {
|
|
112
|
+
let { expandedNodes: a, onNodeExpanding: o, onNodeExpanded: s, onNodeCollapsing: c, onNodeCollapsed: l, onNodeExpand: u, onLoadChildren: d, onActionFailure: f } = e, [p, m] = y(/* @__PURE__ */ new Set()), g = a ? new Set(a) : p;
|
|
113
|
+
return {
|
|
114
|
+
expandedNodes: g,
|
|
115
|
+
setInternalExpandedNodes: m,
|
|
116
|
+
toggleExpand: h(async (e) => {
|
|
117
|
+
let p = g.has(e), h = !p;
|
|
118
|
+
if (h) {
|
|
119
|
+
if (o?.(e) === !1) return;
|
|
120
|
+
} else if (c?.(e) === !1) return;
|
|
121
|
+
if (h && (d || i)) {
|
|
122
|
+
let a = V(t, e);
|
|
123
|
+
if (a && !a.isLoaded && !a.isLeaf) {
|
|
124
|
+
r((t) => new Set(t).add(e));
|
|
125
|
+
try {
|
|
126
|
+
n(e, {
|
|
127
|
+
children: i ? await i.loadNodes(e) : await d(e),
|
|
128
|
+
isLoaded: !0
|
|
129
|
+
});
|
|
130
|
+
} catch (e) {
|
|
131
|
+
f?.(e);
|
|
132
|
+
return;
|
|
133
|
+
} finally {
|
|
134
|
+
r((t) => {
|
|
135
|
+
let n = new Set(t);
|
|
136
|
+
return n.delete(e), n;
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
let _ = new Set(g);
|
|
142
|
+
p ? _.delete(e) : _.add(e), a || m(_), u?.(e, h), h ? s?.(e) : l?.(e);
|
|
143
|
+
}, [
|
|
144
|
+
g,
|
|
145
|
+
t,
|
|
146
|
+
d,
|
|
147
|
+
u,
|
|
148
|
+
a,
|
|
149
|
+
o,
|
|
150
|
+
c,
|
|
151
|
+
s,
|
|
152
|
+
l,
|
|
153
|
+
f,
|
|
154
|
+
n,
|
|
155
|
+
r,
|
|
156
|
+
i
|
|
157
|
+
])
|
|
158
|
+
};
|
|
159
|
+
}, W = (e, t, n) => {
|
|
160
|
+
let { selectedNodes: r, checkedNodes: i, selectionMode: a = "single", onSelectionChange: o, onCheckedChange: s, onNodeSelecting: c, onNodeSelected: l, onNodeChecking: u, onNodeChecked: d, autoCheck: f = !0 } = e, [p, m] = y(/* @__PURE__ */ new Set()), _ = r ? new Set(r) : p, [v, b] = y(/* @__PURE__ */ new Set()), x = i ? new Set(i) : v, [S, C] = y(/* @__PURE__ */ new Set()), w = h((e) => {
|
|
161
|
+
if (c?.(e) === !1) return;
|
|
162
|
+
let t = new Set(a === "multiple" ? _ : []);
|
|
163
|
+
t.has(e) ? t.delete(e) : t.add(e), r || m(t), o?.(Array.from(t)), l?.(e);
|
|
164
|
+
}, [
|
|
165
|
+
_,
|
|
166
|
+
a,
|
|
167
|
+
o,
|
|
168
|
+
r,
|
|
169
|
+
c,
|
|
170
|
+
l
|
|
171
|
+
]), T = h((e, n) => {
|
|
172
|
+
let r = new Set(x), a = new Set(S), o = t.getDescendants(e), c = t.getAncestors(e);
|
|
173
|
+
n ? (r.add(e), a.delete(e), f && o.forEach((e) => {
|
|
174
|
+
r.add(e), a.delete(e);
|
|
175
|
+
})) : (r.delete(e), a.delete(e), f && o.forEach((e) => {
|
|
176
|
+
r.delete(e), a.delete(e);
|
|
177
|
+
})), f && c.forEach((e) => {
|
|
178
|
+
let n = t.getChildren(e), i = n.every((e) => r.has(e.id)), o = n.every((e) => !r.has(e.id) && !a.has(e.id));
|
|
179
|
+
i ? (r.add(e), a.delete(e)) : o ? (r.delete(e), a.delete(e)) : (r.delete(e), a.add(e));
|
|
180
|
+
}), C(a), i || b(r), s?.(Array.from(r)), d?.(e, n);
|
|
181
|
+
}, [
|
|
182
|
+
x,
|
|
183
|
+
S,
|
|
184
|
+
t,
|
|
185
|
+
s,
|
|
186
|
+
f,
|
|
187
|
+
i,
|
|
188
|
+
d
|
|
189
|
+
]), E = h((e) => {
|
|
190
|
+
let t = x.has(e);
|
|
191
|
+
u?.(e, !t) !== !1 && T(e, !t);
|
|
192
|
+
}, [
|
|
193
|
+
x,
|
|
194
|
+
T,
|
|
195
|
+
u
|
|
196
|
+
]);
|
|
197
|
+
return g(() => {
|
|
198
|
+
if (!f || !t || !n.length) return;
|
|
199
|
+
let e = /* @__PURE__ */ new Set(), r = new Set(x), a = (t) => {
|
|
200
|
+
if (!(t.children && t.children.length > 0)) return {
|
|
201
|
+
isChecked: r.has(t.id),
|
|
202
|
+
isIndeterminate: !1
|
|
203
|
+
};
|
|
204
|
+
let n = t.children.map((e) => a(e)), i = n.every((e) => !e.isChecked && !e.isIndeterminate);
|
|
205
|
+
return n.every((e) => e.isChecked && !e.isIndeterminate) ? (r.add(t.id), {
|
|
206
|
+
isChecked: !0,
|
|
207
|
+
isIndeterminate: !1
|
|
208
|
+
}) : i ? (r.delete(t.id), {
|
|
209
|
+
isChecked: !1,
|
|
210
|
+
isIndeterminate: !1
|
|
211
|
+
}) : (r.delete(t.id), e.add(t.id), {
|
|
212
|
+
isChecked: !1,
|
|
213
|
+
isIndeterminate: !0
|
|
214
|
+
});
|
|
215
|
+
};
|
|
216
|
+
n.forEach((e) => a(e)), Array.from(S).sort().join(",") !== Array.from(e).sort().join(",") && C(e), Array.from(x).sort().join(",") !== Array.from(r).sort().join(",") && (i || b(r), s?.(Array.from(r)));
|
|
217
|
+
}, [
|
|
218
|
+
x,
|
|
219
|
+
t,
|
|
220
|
+
f,
|
|
221
|
+
n,
|
|
222
|
+
i,
|
|
223
|
+
s,
|
|
224
|
+
b
|
|
225
|
+
]), {
|
|
226
|
+
selectedNodes: _,
|
|
227
|
+
setInternalSelectedNodes: m,
|
|
228
|
+
toggleSelect: w,
|
|
229
|
+
checkedNodes: x,
|
|
230
|
+
setInternalCheckedNodes: b,
|
|
231
|
+
indeterminateNodes: S,
|
|
232
|
+
setIndeterminateNodes: C,
|
|
233
|
+
toggleCheck: E,
|
|
234
|
+
updateCheckState: T
|
|
235
|
+
};
|
|
236
|
+
}, G = (e, t, n = "") => {
|
|
237
|
+
let r = n.toLowerCase(), i = _(() => {
|
|
238
|
+
if (!r) return null;
|
|
239
|
+
let t = /* @__PURE__ */ new Map(), n = (e) => {
|
|
240
|
+
if (t.has(e.id)) return t.get(e.id);
|
|
241
|
+
let i = (e.label || "").toLowerCase().includes(r), a = !1;
|
|
242
|
+
if (e.children) for (let t of e.children) n(t).matches && (a = !0);
|
|
243
|
+
let o = {
|
|
244
|
+
matches: i || a,
|
|
245
|
+
hasChildMatch: a
|
|
246
|
+
};
|
|
247
|
+
return t.set(e.id, o), o;
|
|
248
|
+
};
|
|
249
|
+
return e.forEach((e) => n(e)), t;
|
|
250
|
+
}, [e, r]);
|
|
251
|
+
return { flattenedNodes: _(() => {
|
|
252
|
+
let n = [], r = (e, a = 0) => {
|
|
253
|
+
e.forEach((e) => {
|
|
254
|
+
let o = i ? i.get(e.id) : void 0;
|
|
255
|
+
if ((i ? o?.matches : !0) === !1) return;
|
|
256
|
+
n.push({
|
|
257
|
+
node: e,
|
|
258
|
+
level: a
|
|
259
|
+
});
|
|
260
|
+
let s = i && o?.hasChildMatch;
|
|
261
|
+
(t.has(e.id) || s) && e.children && r(e.children, a + 1);
|
|
262
|
+
});
|
|
263
|
+
};
|
|
264
|
+
return r(e), n;
|
|
265
|
+
}, [
|
|
266
|
+
e,
|
|
267
|
+
t,
|
|
268
|
+
i
|
|
269
|
+
]) };
|
|
270
|
+
}, K = (e, r, i, a, o, s, c, l, u, d, f, p, m, h, g = {}) => {
|
|
271
|
+
let v = t(), { expandedNodes: y, checkedNodes: b, selectedNodes: x, onNodeExpand: S, onCheckedChange: C, onSelectionChange: w, onNodeEditing: T } = e;
|
|
272
|
+
n(h, _(() => {
|
|
273
|
+
let e = {
|
|
274
|
+
expandAll: () => {
|
|
275
|
+
let e = Array.from(p.nodeMap.keys());
|
|
276
|
+
y ? S?.(e[0], !0) : o(new Set(e));
|
|
277
|
+
},
|
|
278
|
+
collapseAll: () => {
|
|
279
|
+
y ? S?.("", !1) : o(/* @__PURE__ */ new Set());
|
|
280
|
+
},
|
|
281
|
+
checkAll: () => {
|
|
282
|
+
let e = Array.from(p.nodeMap.keys());
|
|
283
|
+
b ? C?.(e) : (c(new Set(e)), u(/* @__PURE__ */ new Set()));
|
|
284
|
+
},
|
|
285
|
+
uncheckAll: () => {
|
|
286
|
+
b ? C?.([]) : (c(/* @__PURE__ */ new Set()), u(/* @__PURE__ */ new Set()));
|
|
287
|
+
},
|
|
288
|
+
selectNode: (e) => {
|
|
289
|
+
x ? w?.([e]) : l(/* @__PURE__ */ new Set([e]));
|
|
290
|
+
},
|
|
291
|
+
expandNode: (e, t = !0) => {
|
|
292
|
+
y ? S?.(e, t) : o((n) => {
|
|
293
|
+
let r = new Set(n);
|
|
294
|
+
return t ? r.add(e) : r.delete(e), r;
|
|
295
|
+
});
|
|
296
|
+
},
|
|
297
|
+
checkNode: (e, t = !0) => d(e, t),
|
|
298
|
+
getFlattenedNodes: () => f,
|
|
299
|
+
addNodes: (e, t, n) => {
|
|
300
|
+
if (!t) i((t) => {
|
|
301
|
+
let r = [...t];
|
|
302
|
+
return n === void 0 ? r.push(...e) : r.splice(n, 0, ...e), r;
|
|
303
|
+
});
|
|
304
|
+
else {
|
|
305
|
+
let r = (i) => i.map((i) => {
|
|
306
|
+
if (i.id === t) {
|
|
307
|
+
let t = [...i.children || []];
|
|
308
|
+
return n === void 0 ? t.push(...e) : t.splice(n, 0, ...e), {
|
|
309
|
+
...i,
|
|
310
|
+
children: t
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
return i.children ? {
|
|
314
|
+
...i,
|
|
315
|
+
children: r(i.children)
|
|
316
|
+
} : i;
|
|
317
|
+
});
|
|
318
|
+
i((e) => r(e));
|
|
319
|
+
}
|
|
320
|
+
v.get("NotificationService")?.show({
|
|
321
|
+
type: "success",
|
|
322
|
+
message: `${e.length} Node(s) Added`,
|
|
323
|
+
duration: 2e3
|
|
324
|
+
});
|
|
325
|
+
},
|
|
326
|
+
removeNodes: (e) => {
|
|
327
|
+
let t = new Set(e), n = (e) => e.filter((e) => !t.has(e.id)).map((e) => ({
|
|
328
|
+
...e,
|
|
329
|
+
children: e.children ? n(e.children) : void 0
|
|
330
|
+
}));
|
|
331
|
+
i((e) => n(e)), v.get("NotificationService")?.show({
|
|
332
|
+
type: "success",
|
|
333
|
+
message: `${e.length} Node(s) Removed`,
|
|
334
|
+
duration: 2e3
|
|
335
|
+
});
|
|
336
|
+
},
|
|
337
|
+
updateNode: (e, t) => {
|
|
338
|
+
i((n) => H(n, e, t)), v.get("NotificationService")?.show({
|
|
339
|
+
type: "success",
|
|
340
|
+
message: "Node Updated Successfully",
|
|
341
|
+
duration: 2e3
|
|
342
|
+
});
|
|
343
|
+
},
|
|
344
|
+
moveNodes: (e, t, n) => {
|
|
345
|
+
let a = [], o = new Set(e), s = (e) => e.filter((e) => o.has(e.id) ? (a.push(e), !1) : !0).map((e) => ({
|
|
346
|
+
...e,
|
|
347
|
+
children: e.children ? s(e.children) : void 0
|
|
348
|
+
})), c = s(r), l = (e) => e.map((e) => {
|
|
349
|
+
if (e.id === t) {
|
|
350
|
+
let t = [...e.children || []];
|
|
351
|
+
return n === void 0 ? t.push(...a) : t.splice(n, 0, ...a), {
|
|
352
|
+
...e,
|
|
353
|
+
children: t
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
return e.children ? {
|
|
357
|
+
...e,
|
|
358
|
+
children: l(e.children)
|
|
359
|
+
} : e;
|
|
360
|
+
});
|
|
361
|
+
i(l(c)), v.get("NotificationService")?.show({
|
|
362
|
+
type: "success",
|
|
363
|
+
message: "Nodes Moved Successfully",
|
|
364
|
+
duration: 2e3
|
|
365
|
+
});
|
|
366
|
+
},
|
|
367
|
+
getNode: (e) => V(r, e),
|
|
368
|
+
getTreeData: () => r,
|
|
369
|
+
ensureVisible: (e) => {
|
|
370
|
+
let t = p.getAncestors(e);
|
|
371
|
+
y ? (t.forEach((e) => S?.(e, !0)), S?.(e, !0)) : o((n) => {
|
|
372
|
+
let r = new Set(n);
|
|
373
|
+
return t.forEach((e) => r.add(e)), r.add(e), r;
|
|
374
|
+
});
|
|
375
|
+
},
|
|
376
|
+
beginEdit: (e) => {
|
|
377
|
+
V(r, e) && T?.(e) !== !1 && m(e);
|
|
378
|
+
},
|
|
379
|
+
disableNodes: (e, t = !0) => {
|
|
380
|
+
e.forEach((e) => {
|
|
381
|
+
i((n) => H(n, e, { disabled: t }));
|
|
382
|
+
});
|
|
383
|
+
},
|
|
384
|
+
enableNodes: (e) => {
|
|
385
|
+
e.forEach((e) => {
|
|
386
|
+
i((t) => H(t, e, { disabled: !1 }));
|
|
387
|
+
});
|
|
388
|
+
},
|
|
389
|
+
getAllCheckedNodes: () => Array.from(s),
|
|
390
|
+
getDisabledNodes: () => {
|
|
391
|
+
let e = [], t = (n) => {
|
|
392
|
+
n.forEach((n) => {
|
|
393
|
+
n.disabled && e.push(n.id), n.children && t(n.children);
|
|
394
|
+
});
|
|
395
|
+
};
|
|
396
|
+
return t(r), e;
|
|
397
|
+
}
|
|
398
|
+
};
|
|
399
|
+
return {
|
|
400
|
+
...g,
|
|
401
|
+
...e
|
|
402
|
+
};
|
|
403
|
+
}, [
|
|
404
|
+
p,
|
|
405
|
+
r,
|
|
406
|
+
a,
|
|
407
|
+
s,
|
|
408
|
+
y,
|
|
409
|
+
b,
|
|
410
|
+
x,
|
|
411
|
+
S,
|
|
412
|
+
C,
|
|
413
|
+
w,
|
|
414
|
+
T,
|
|
415
|
+
i,
|
|
416
|
+
o,
|
|
417
|
+
c,
|
|
418
|
+
l,
|
|
419
|
+
u,
|
|
420
|
+
d,
|
|
421
|
+
f,
|
|
422
|
+
m,
|
|
423
|
+
g
|
|
424
|
+
]));
|
|
425
|
+
}, q = (e) => {
|
|
426
|
+
let n = t(), r = c("I18nService")?.dir || "ltr", { serviceRegistry: a, api: s } = o(e), { dir: l, apiRef: u, searchTerm: d } = e, f = l === "auto" || !l ? r : l, { treeData: p, setInternalTreeData: m, loadingNodes: v, setLoadingNodes: b, updateNode: x } = U(e), S = _(() => e.service ? e.service : e.serviceName ? n.get(e.serviceName) : null, [e.service, e.serviceName]);
|
|
427
|
+
g(() => {
|
|
428
|
+
S && S.loadNodes().then((e) => {
|
|
429
|
+
m(e);
|
|
430
|
+
});
|
|
431
|
+
}, [S, m]);
|
|
432
|
+
let C = i("HierarchyService", () => new R(), a || n), w = h((e, t = 0, n) => {
|
|
433
|
+
e.forEach((e) => {
|
|
434
|
+
let r = {
|
|
435
|
+
id: e.id,
|
|
436
|
+
level: t,
|
|
437
|
+
parentId: n,
|
|
438
|
+
children: e.children?.map((e) => e.id)
|
|
439
|
+
};
|
|
440
|
+
C.registerNode(r), e.children && w(e.children, t + 1, e.id);
|
|
441
|
+
});
|
|
442
|
+
}, [C]);
|
|
443
|
+
g(() => {
|
|
444
|
+
C && (C.cleanup(), w(p));
|
|
445
|
+
}, [
|
|
446
|
+
p,
|
|
447
|
+
C,
|
|
448
|
+
w
|
|
449
|
+
]);
|
|
450
|
+
let { selectedNodes: T, setInternalSelectedNodes: E, toggleSelect: D, checkedNodes: O, setInternalCheckedNodes: k, indeterminateNodes: A, setIndeterminateNodes: j, toggleCheck: M, updateCheckState: N } = W(e, C, p), { expandedNodes: P, setInternalExpandedNodes: F, toggleExpand: I } = ee(e, p, x, b, S), { flattenedNodes: L } = G(p, P, d), [z, B] = y(null), V = h((t, n) => {
|
|
451
|
+
x(t, { label: n }), e.onNodeRename?.(t, n);
|
|
452
|
+
}, [x, e.onNodeRename]);
|
|
453
|
+
return K(e, p, m, P, F, O, k, E, j, N, L, C, B, u, s), {
|
|
454
|
+
state: {
|
|
455
|
+
treeData: p,
|
|
456
|
+
expandedNodes: P,
|
|
457
|
+
selectedNodes: T,
|
|
458
|
+
checkedNodes: O,
|
|
459
|
+
indeterminateNodes: A,
|
|
460
|
+
loadingNodes: v,
|
|
461
|
+
flattenedNodes: L,
|
|
462
|
+
editingNodeId: z
|
|
463
|
+
},
|
|
464
|
+
actions: {
|
|
465
|
+
toggleExpand: I,
|
|
466
|
+
toggleSelect: D,
|
|
467
|
+
toggleCheck: M,
|
|
468
|
+
handleNodeRename: V,
|
|
469
|
+
setEditingNodeId: B
|
|
470
|
+
},
|
|
471
|
+
config: {
|
|
472
|
+
allowTextWrap: e.allowTextWrap,
|
|
473
|
+
animation: e.animation,
|
|
474
|
+
checkOnClick: e.checkOnClick,
|
|
475
|
+
fullRowSelect: e.fullRowSelect,
|
|
476
|
+
fullRowNavigable: e.fullRowNavigable,
|
|
477
|
+
onKeyPress: e.onKeyPress,
|
|
478
|
+
onNodeClicked: e.onNodeClicked,
|
|
479
|
+
onDrawNode: e.onDrawNode
|
|
480
|
+
},
|
|
481
|
+
dir: f,
|
|
482
|
+
baseApi: s
|
|
483
|
+
};
|
|
484
|
+
}, J = () => /* @__PURE__ */ D("div", {
|
|
485
|
+
className: "flex flex-col items-center justify-center min-h-screen p-4",
|
|
486
|
+
children: /* @__PURE__ */ O("div", {
|
|
487
|
+
className: "flex flex-col items-center gap-4 max-w-md w-full",
|
|
488
|
+
children: [
|
|
489
|
+
/* @__PURE__ */ D("div", {
|
|
490
|
+
className: "flex items-center justify-center w-16 h-16 rounded-full bg-destructive/10",
|
|
491
|
+
children: /* @__PURE__ */ D(b, { className: "w-8 h-8 text-destructive" })
|
|
492
|
+
}),
|
|
493
|
+
/* @__PURE__ */ O("div", {
|
|
494
|
+
className: "flex flex-col items-center gap-2 text-center",
|
|
495
|
+
children: [/* @__PURE__ */ D("h2", {
|
|
496
|
+
className: "text-lg font-semibold",
|
|
497
|
+
children: "Tree View Error"
|
|
498
|
+
}), /* @__PURE__ */ D("p", {
|
|
499
|
+
className: "text-sm text-muted-foreground",
|
|
500
|
+
children: "Something went wrong with the tree view. Please refresh the page or try again."
|
|
501
|
+
})]
|
|
502
|
+
}),
|
|
503
|
+
/* @__PURE__ */ O("button", {
|
|
504
|
+
onClick: () => window.location.reload(),
|
|
505
|
+
className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-primary hover:bg-primary/10 rounded-md transition-colors",
|
|
506
|
+
children: [/* @__PURE__ */ D(T, { className: "w-4 h-4" }), "Refresh Page"]
|
|
507
|
+
})
|
|
508
|
+
]
|
|
509
|
+
})
|
|
510
|
+
}), Y = m(({ node: t, level: n, isExpanded: r, isSelected: i, isChecked: a, isIndeterminate: o, isLoading: s, onToggleExpand: c, onToggleSelect: l, onToggleCheck: u, onRename: f, showCheckboxes: m, allowEditing: h, searchTerm: _, style: b, onKeyDown: T, tabIndex: k, autoFocus: A, slots: j, slotProps: M, allowTextWrap: N, animation: F, checkOnClick: L, fullRowSelect: R, fullRowNavigable: z, onNodeClicked: B, onDrawNode: V, isEditing: H, onEditingChange: U, dir: ee }) => {
|
|
511
|
+
let [W, G] = y(!1), [K, q] = y(t.label);
|
|
512
|
+
g(() => {
|
|
513
|
+
H !== void 0 && H !== W && (G(H), H && q(t.label));
|
|
514
|
+
}, [
|
|
515
|
+
H,
|
|
516
|
+
W,
|
|
517
|
+
t.label
|
|
518
|
+
]), g(() => {
|
|
519
|
+
V?.(t);
|
|
520
|
+
}, [t, V]);
|
|
521
|
+
let { setNodeRef: J, transform: Y, isDragging: X, attributes: te, listeners: Z, transition: ne } = I({
|
|
522
|
+
id: t.id,
|
|
523
|
+
data: {
|
|
524
|
+
node: t,
|
|
525
|
+
type: "tree-item",
|
|
526
|
+
level: n
|
|
527
|
+
}
|
|
528
|
+
}), Q = v(null), re = (e) => {
|
|
529
|
+
J(e), Q.current = e;
|
|
530
|
+
};
|
|
531
|
+
g(() => {
|
|
532
|
+
A && Q.current && !W && Q.current.focus({ preventScroll: !0 });
|
|
533
|
+
}, [A, W]);
|
|
534
|
+
let ie = () => {
|
|
535
|
+
h && (G(!0), q(t.label), U?.(!0));
|
|
536
|
+
}, ae = (e) => {
|
|
537
|
+
e.key === "Enter" ? (f(t.id, K), G(!1), U?.(!1)) : e.key === "Escape" && (q(t.label), G(!1), U?.(!1));
|
|
538
|
+
}, $ = t.children && t.children.length > 0 || t.children && !t.isLeaf || !t.isLoaded && !t.isLeaf, oe = n * 20 + ($ ? 0 : 20), se = {
|
|
539
|
+
...b,
|
|
540
|
+
transform: P.Translate.toString(Y) ? `${b.transform || ""} ${P.Translate.toString(Y)}` : b.transform,
|
|
541
|
+
transition: ne || b.transition,
|
|
542
|
+
opacity: X ? .3 : 1,
|
|
543
|
+
zIndex: X ? 999 : "auto"
|
|
544
|
+
}, ce = j?.node, le = j?.expandIcon, ue = j?.checkbox, de = () => s ? /* @__PURE__ */ D(w, { className: "w-3.5 h-3.5 animate-spin" }) : $ ? le ? /* @__PURE__ */ D(le, {
|
|
545
|
+
isExpanded: r,
|
|
546
|
+
isLoading: s,
|
|
547
|
+
...M?.expandIcon
|
|
548
|
+
}) : D(r ? S : C, { className: "w-4 h-4" }) : null, fe = () => m ? ue ? /* @__PURE__ */ D(ue, {
|
|
549
|
+
checked: a,
|
|
550
|
+
indeterminate: o,
|
|
551
|
+
onChange: () => u(t.id),
|
|
552
|
+
...M?.checkbox
|
|
553
|
+
}) : /* @__PURE__ */ O("div", {
|
|
554
|
+
"data-testid": `tree-checkbox-${t.id}`,
|
|
555
|
+
onClick: (e) => {
|
|
556
|
+
e.stopPropagation(), u(t.id);
|
|
557
|
+
},
|
|
558
|
+
className: e("w-4 h-4 me-2 flex items-center justify-center rounded border-2 transition-all cursor-pointer", a ? "bg-primary border-primary text-primary-foreground" : o ? "bg-background border-primary shadow-[0_0_0_1px_inset_rgba(var(--primary),0.1)]" : "bg-background border-slate-500 dark:border-slate-400 hover:border-primary/50"),
|
|
559
|
+
children: [a && /* @__PURE__ */ D(x, { className: "w-3.5 h-3.5 stroke-[3]" }), o && /* @__PURE__ */ D("div", { className: "w-2.5 h-0.5 bg-primary rounded-full" })]
|
|
560
|
+
}) : null;
|
|
561
|
+
return /* @__PURE__ */ D(p, {
|
|
562
|
+
contextId: "tree-node",
|
|
563
|
+
data: t,
|
|
564
|
+
onAction: (e) => {
|
|
565
|
+
e === "edit" && h && (G(!0), q(t.label));
|
|
566
|
+
},
|
|
567
|
+
children: /* @__PURE__ */ D("div", {
|
|
568
|
+
ref: re,
|
|
569
|
+
...te,
|
|
570
|
+
...Z,
|
|
571
|
+
role: "treeitem",
|
|
572
|
+
"data-testid": `tree-item-${t.id}`,
|
|
573
|
+
"aria-expanded": $ ? r : void 0,
|
|
574
|
+
"aria-selected": i,
|
|
575
|
+
tabIndex: k,
|
|
576
|
+
onKeyDown: (e) => {
|
|
577
|
+
h && e.key === "F2" && (e.stopPropagation(), G(!0), q(t.label)), Z?.onKeyDown && Z.onKeyDown(e), T(e, t.id);
|
|
578
|
+
},
|
|
579
|
+
onClick: () => {
|
|
580
|
+
l(t.id), B?.(t.id), L && m && u(t.id);
|
|
581
|
+
},
|
|
582
|
+
className: e("flex items-center py-1.5 px-2 cursor-pointer hover:bg-muted/50 rounded-md w-full group outline-none focus:ring-1 focus:ring-primary/30 select-none", i ? "bg-primary/10 text-primary" : "text-foreground", X ? "bg-primary/5" : "", F ? "transition-all duration-200" : ""),
|
|
583
|
+
style: {
|
|
584
|
+
...se,
|
|
585
|
+
paddingInlineStart: `${oe}px`
|
|
586
|
+
},
|
|
587
|
+
children: ce ? /* @__PURE__ */ D(ce, {
|
|
588
|
+
node: t,
|
|
589
|
+
level: n,
|
|
590
|
+
isExpanded: r,
|
|
591
|
+
isSelected: i,
|
|
592
|
+
isChecked: a,
|
|
593
|
+
isIndeterminate: o,
|
|
594
|
+
onToggleExpand: () => c(t.id),
|
|
595
|
+
onToggleSelect: () => l(t.id),
|
|
596
|
+
onToggleCheck: () => u(t.id),
|
|
597
|
+
...M?.node || {}
|
|
598
|
+
}) : /* @__PURE__ */ O(E, { children: [
|
|
599
|
+
$ || s ? /* @__PURE__ */ D("button", {
|
|
600
|
+
"data-testid": "expand-button",
|
|
601
|
+
onClick: (e) => {
|
|
602
|
+
e.stopPropagation(), c(t.id);
|
|
603
|
+
},
|
|
604
|
+
onPointerDown: (e) => e.stopPropagation(),
|
|
605
|
+
className: "w-5 h-5 flex items-center justify-center me-1 text-muted-foreground hover:text-foreground hover:bg-muted rounded focus:outline-none transition-colors",
|
|
606
|
+
tabIndex: -1,
|
|
607
|
+
children: de()
|
|
608
|
+
}) : null,
|
|
609
|
+
fe(),
|
|
610
|
+
t.icon && /* @__PURE__ */ D("span", {
|
|
611
|
+
className: "me-2 flex-shrink-0 text-muted-foreground group-hover:text-foreground transition-colors",
|
|
612
|
+
children: t.icon
|
|
613
|
+
}),
|
|
614
|
+
W ? /* @__PURE__ */ D("input", {
|
|
615
|
+
"data-testid": "tree-item-edit-input",
|
|
616
|
+
autoFocus: !0,
|
|
617
|
+
value: K,
|
|
618
|
+
onChange: (e) => q(e.target.value),
|
|
619
|
+
onKeyDown: ae,
|
|
620
|
+
onBlur: () => G(!1),
|
|
621
|
+
onClick: (e) => e.stopPropagation(),
|
|
622
|
+
className: "flex-1 bg-background border border-primary rounded px-1 text-sm outline-none"
|
|
623
|
+
}) : /* @__PURE__ */ D("span", {
|
|
624
|
+
className: `text-base font-semibold flex-1 ${N ? "whitespace-normal" : "truncate"}`,
|
|
625
|
+
onDoubleClick: (e) => {
|
|
626
|
+
e.stopPropagation(), ie();
|
|
627
|
+
},
|
|
628
|
+
children: /* @__PURE__ */ D(d, {
|
|
629
|
+
text: t.label,
|
|
630
|
+
highlight: _
|
|
631
|
+
})
|
|
632
|
+
})
|
|
633
|
+
] })
|
|
634
|
+
})
|
|
635
|
+
});
|
|
636
|
+
});
|
|
637
|
+
Y.displayName = "EzTreeViewItem";
|
|
638
|
+
//#endregion
|
|
639
|
+
//#region src/components/EzTreeView/EzVirtualTree.tsx
|
|
640
|
+
var X = m(({ items: t, expandedNodes: n, selectedNodes: r, checkedNodes: i, indeterminateNodes: a, loadingNodes: o, onToggleExpand: s, onToggleSelect: c, onToggleCheck: l, onNodeRename: u, className: d, dir: p, showCheckboxes: m, allowEditing: g, searchTerm: v, slots: b, slotProps: x, allowTextWrap: S, animation: C, checkOnClick: w, fullRowSelect: T, fullRowNavigable: E, onKeyPress: O, onNodeClicked: k, onDrawNode: A, editingNodeId: j, setEditingNodeId: M }) => {
|
|
641
|
+
let { rowVirtualizer: N, parentRef: P, getVirtualItems: I } = f({
|
|
642
|
+
rowCount: t.length,
|
|
643
|
+
rowHeight: 32,
|
|
644
|
+
overscanCount: 10,
|
|
645
|
+
progressiveRendering: !0
|
|
646
|
+
}), [R, z] = y(0), B = _(() => {
|
|
647
|
+
let e = /* @__PURE__ */ new Map();
|
|
648
|
+
return t.forEach((t, n) => e.set(t.node.id, n)), e;
|
|
649
|
+
}, [t]), V = h((e, r, i) => {
|
|
650
|
+
let a = p === "rtl", o = a ? "ArrowLeft" : "ArrowRight", u = a ? "ArrowRight" : "ArrowLeft";
|
|
651
|
+
if (e.key === "ArrowDown") {
|
|
652
|
+
e.preventDefault();
|
|
653
|
+
let n = Math.min(t.length - 1, r + 1);
|
|
654
|
+
z(n), N.scrollToIndex(n);
|
|
655
|
+
} else if (e.key === "ArrowUp") {
|
|
656
|
+
e.preventDefault();
|
|
657
|
+
let t = Math.max(0, r - 1);
|
|
658
|
+
z(t), N.scrollToIndex(t);
|
|
659
|
+
} else if (e.key === o) e.preventDefault(), (i.children?.length || i.children && !i.isLeaf || !i.isLoaded && !i.isLeaf) && !n.has(i.id) ? s(i.id) : i.children?.length && n.has(i.id) && r + 1 < t.length && t[r + 1].level > (i.level ?? 0) && (z(r + 1), N.scrollToIndex(r + 1));
|
|
660
|
+
else if (e.key === u) {
|
|
661
|
+
if (e.preventDefault(), n.has(i.id)) s(i.id);
|
|
662
|
+
else if (i.parentId) {
|
|
663
|
+
let e = B.get(i.parentId);
|
|
664
|
+
e !== void 0 && (z(e), N.scrollToIndex(e));
|
|
665
|
+
}
|
|
666
|
+
} else (e.key === "Enter" || e.key === " ") && (e.preventDefault(), m ? l(i.id) : c(i.id));
|
|
667
|
+
}, [
|
|
668
|
+
t,
|
|
669
|
+
n,
|
|
670
|
+
s,
|
|
671
|
+
c,
|
|
672
|
+
l,
|
|
673
|
+
m,
|
|
674
|
+
B,
|
|
675
|
+
N
|
|
676
|
+
]);
|
|
677
|
+
return /* @__PURE__ */ D("div", {
|
|
678
|
+
ref: P,
|
|
679
|
+
className: e("absolute inset-0 overflow-y-auto bg-background border rounded-lg shadow-sm focus:outline-none focus:ring-1 focus:ring-primary/20", d),
|
|
680
|
+
dir: p,
|
|
681
|
+
role: "tree",
|
|
682
|
+
onKeyDown: (e) => O?.(e),
|
|
683
|
+
children: /* @__PURE__ */ D("div", {
|
|
684
|
+
style: {
|
|
685
|
+
height: `${N.getTotalSize()}px`,
|
|
686
|
+
width: "100%",
|
|
687
|
+
position: "relative"
|
|
688
|
+
},
|
|
689
|
+
children: /* @__PURE__ */ D(F, {
|
|
690
|
+
items: t.map((e) => e.node.id),
|
|
691
|
+
strategy: L,
|
|
692
|
+
children: I().map((e) => {
|
|
693
|
+
let { node: d, level: f } = t[e.index], h = R === e.index;
|
|
694
|
+
return /* @__PURE__ */ D(Y, {
|
|
695
|
+
node: d,
|
|
696
|
+
level: f,
|
|
697
|
+
isExpanded: n.has(d.id),
|
|
698
|
+
isSelected: r.has(d.id),
|
|
699
|
+
isChecked: i.has(d.id),
|
|
700
|
+
isIndeterminate: a.has(d.id),
|
|
701
|
+
isLoading: o.has(d.id),
|
|
702
|
+
hasChildren: !!d.children?.length || d.children && !d.isLeaf || !d.isLoaded && !d.isLeaf,
|
|
703
|
+
onToggleExpand: s,
|
|
704
|
+
onToggleSelect: c,
|
|
705
|
+
onToggleCheck: l,
|
|
706
|
+
onRename: u,
|
|
707
|
+
showCheckboxes: m,
|
|
708
|
+
allowEditing: g,
|
|
709
|
+
searchTerm: v,
|
|
710
|
+
onKeyDown: (t) => V(t, e.index, d),
|
|
711
|
+
style: {
|
|
712
|
+
position: "absolute",
|
|
713
|
+
top: `${e.start}px`,
|
|
714
|
+
left: 0,
|
|
715
|
+
width: "100%",
|
|
716
|
+
height: `${e.size}px`
|
|
717
|
+
},
|
|
718
|
+
tabIndex: h ? 0 : -1,
|
|
719
|
+
autoFocus: h,
|
|
720
|
+
slots: b,
|
|
721
|
+
slotProps: x,
|
|
722
|
+
allowTextWrap: S,
|
|
723
|
+
animation: C,
|
|
724
|
+
checkOnClick: w,
|
|
725
|
+
fullRowSelect: T,
|
|
726
|
+
fullRowNavigable: E,
|
|
727
|
+
onNodeClicked: k,
|
|
728
|
+
onDrawNode: A,
|
|
729
|
+
isEditing: j === d.id,
|
|
730
|
+
onEditingChange: (e) => M(e ? d.id : null),
|
|
731
|
+
dir: p
|
|
732
|
+
}, d.id);
|
|
733
|
+
})
|
|
734
|
+
})
|
|
735
|
+
})
|
|
736
|
+
});
|
|
737
|
+
});
|
|
738
|
+
X.displayName = "EzVirtualTree";
|
|
739
|
+
//#endregion
|
|
740
|
+
//#region src/components/EzTreeView/hooks/useTreeDragDrop.ts
|
|
741
|
+
var te = ({ onDragEnd: e, onDragStart: t }) => {
|
|
742
|
+
let [n, r] = y(null), [i, a] = y(null), [o, s] = y("inside");
|
|
743
|
+
return {
|
|
744
|
+
sensors: N(M(A, { activationConstraint: { distance: 8 } })),
|
|
745
|
+
activeNode: n,
|
|
746
|
+
dragOverNode: i,
|
|
747
|
+
dragPosition: o,
|
|
748
|
+
handleDragStart: h((e) => {
|
|
749
|
+
let { active: n } = e, i = n.data.current?.node;
|
|
750
|
+
i && (r(i), t?.(i));
|
|
751
|
+
}, [t]),
|
|
752
|
+
handleDragOver: h((e) => {
|
|
753
|
+
e.preventDefault();
|
|
754
|
+
let { active: t, over: n } = e;
|
|
755
|
+
if (!n) return;
|
|
756
|
+
let r = t.data.current?.node, i = n.data.current?.node;
|
|
757
|
+
if (r && i && r.id !== i.id) {
|
|
758
|
+
let e = n.rect, t = e.top + e.height / 2;
|
|
759
|
+
t < e.top + 10 ? s("before") : t > e.bottom - 10 ? s("after") : s("inside"), a(i);
|
|
760
|
+
}
|
|
761
|
+
}, []),
|
|
762
|
+
handleDragEnd: h((t) => {
|
|
763
|
+
let { active: c, over: l } = t;
|
|
764
|
+
c && l && n && i && e(n, i, o), r(null), a(null), s("inside");
|
|
765
|
+
}, [
|
|
766
|
+
n,
|
|
767
|
+
i,
|
|
768
|
+
o,
|
|
769
|
+
e
|
|
770
|
+
])
|
|
771
|
+
};
|
|
772
|
+
}, Z = (t) => {
|
|
773
|
+
s();
|
|
774
|
+
let { state: { expandedNodes: n, selectedNodes: i, checkedNodes: a, indeterminateNodes: o, loadingNodes: c, flattenedNodes: l, editingNodeId: u }, actions: { toggleExpand: d, toggleSelect: f, toggleCheck: p, handleNodeRename: m, setEditingNodeId: h }, config: { allowTextWrap: g, animation: _, checkOnClick: v, fullRowSelect: y, fullRowNavigable: b, onKeyPress: x, onNodeClicked: S, onDrawNode: C }, dir: w } = q(t), { handleDragEnd: T, sensors: E } = te({ onDragEnd: (e, n, r) => {
|
|
775
|
+
t.onNodeDrop && t.onNodeDrop(e, n, r);
|
|
776
|
+
} });
|
|
777
|
+
return /* @__PURE__ */ D(r, {
|
|
778
|
+
fallback: /* @__PURE__ */ D(J, {}),
|
|
779
|
+
children: /* @__PURE__ */ D("div", {
|
|
780
|
+
className: e("relative flex-1 w-full h-full min-h-0", t.className),
|
|
781
|
+
children: /* @__PURE__ */ D(k, {
|
|
782
|
+
sensors: E,
|
|
783
|
+
collisionDetection: j,
|
|
784
|
+
onDragEnd: T,
|
|
785
|
+
children: /* @__PURE__ */ D(X, {
|
|
786
|
+
items: l,
|
|
787
|
+
expandedNodes: n,
|
|
788
|
+
selectedNodes: i,
|
|
789
|
+
checkedNodes: a,
|
|
790
|
+
indeterminateNodes: o,
|
|
791
|
+
loadingNodes: c,
|
|
792
|
+
onToggleExpand: d,
|
|
793
|
+
onToggleSelect: f,
|
|
794
|
+
onToggleCheck: p,
|
|
795
|
+
onNodeRename: m,
|
|
796
|
+
dir: w,
|
|
797
|
+
showCheckboxes: t.showCheckboxes,
|
|
798
|
+
allowEditing: t.allowEditing,
|
|
799
|
+
searchTerm: t.searchTerm,
|
|
800
|
+
slots: t.slots,
|
|
801
|
+
slotProps: t.slotProps,
|
|
802
|
+
allowTextWrap: g,
|
|
803
|
+
animation: _,
|
|
804
|
+
checkOnClick: v,
|
|
805
|
+
fullRowSelect: y,
|
|
806
|
+
fullRowNavigable: b,
|
|
807
|
+
onKeyPress: x,
|
|
808
|
+
onNodeClicked: S,
|
|
809
|
+
onDrawNode: C,
|
|
810
|
+
editingNodeId: u,
|
|
811
|
+
setEditingNodeId: h
|
|
812
|
+
})
|
|
813
|
+
})
|
|
814
|
+
})
|
|
815
|
+
});
|
|
816
|
+
};
|
|
817
|
+
//#endregion
|
|
818
|
+
export { Z as t };
|