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
package/dist/treeview.es.js
CHANGED
|
@@ -1,954 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { u as se, a as pe, c as G, b as Ne } from "./useInitCoreServices-D1WaWlaI.js";
|
|
4
|
-
import { u as we, f as ve, H as ye } from "./HighlightText-8D6KEyBw.js";
|
|
5
|
-
import { u as xe } from "./useComponentState-C87xXa5d.js";
|
|
6
|
-
import { K as Ce, T as be, M as ke, z as Se, C as Ee, x as Me, N as Re } from "./EzErrorBoundary-D4NBadES.js";
|
|
7
|
-
import { u as De } from "./useService-BUi3uAqE.js";
|
|
8
|
-
import { u as Ae } from "./useServiceState-VE-viK8b.js";
|
|
9
|
-
import { C as ne, E as Te, o as Ie, k as ze, l as Pe, P as Ve, D as Ke, m as $e } from "./EzContextMenu-BSA_B6Pr.js";
|
|
10
|
-
import { u as Le, S as je, v as Fe } from "./sortable.esm-CzMCDPet.js";
|
|
11
|
-
import { C as _e } from "./chevron-down-C3s8jU6B.js";
|
|
12
|
-
class Be {
|
|
13
|
-
name = "HierarchyService";
|
|
14
|
-
nodeMap = /* @__PURE__ */ new Map();
|
|
15
|
-
constructor() {
|
|
16
|
-
}
|
|
17
|
-
/** Registers a node in the hierarchy map. @group Methods */
|
|
18
|
-
registerNode(t) {
|
|
19
|
-
this.nodeMap.set(t.id, t);
|
|
20
|
-
}
|
|
21
|
-
/** Removes a node and its structural links from the map. @group Methods */
|
|
22
|
-
unregisterNode(t) {
|
|
23
|
-
this.nodeMap.delete(t);
|
|
24
|
-
}
|
|
25
|
-
/** Returns the direct parent node of a given node ID. @group Methods */
|
|
26
|
-
getParent(t) {
|
|
27
|
-
const o = this.nodeMap.get(t);
|
|
28
|
-
if (o && o.parentId)
|
|
29
|
-
return this.nodeMap.get(o.parentId);
|
|
30
|
-
}
|
|
31
|
-
/** Returns an array of direct child nodes for a given node ID. @group Methods */
|
|
32
|
-
getChildren(t) {
|
|
33
|
-
const o = this.nodeMap.get(t);
|
|
34
|
-
return o && o.children ? o.children.map((i) => this.nodeMap.get(i)).filter((i) => !!i) : [];
|
|
35
|
-
}
|
|
36
|
-
/** Returns all descendants (children, grandchildren, etc.) IDs for a node. @group Methods */
|
|
37
|
-
getDescendants(t) {
|
|
38
|
-
const o = [], i = [...this.nodeMap.get(t)?.children || []];
|
|
39
|
-
for (; i.length > 0; ) {
|
|
40
|
-
const d = i.pop();
|
|
41
|
-
o.push(d);
|
|
42
|
-
const w = this.nodeMap.get(d);
|
|
43
|
-
w?.children && i.push(...w.children);
|
|
44
|
-
}
|
|
45
|
-
return o;
|
|
46
|
-
}
|
|
47
|
-
/** Returns all ancestor (parent, grandparent, etc.) IDs for a node. @group Methods */
|
|
48
|
-
getAncestors(t) {
|
|
49
|
-
const o = [];
|
|
50
|
-
let i = this.nodeMap.get(t)?.parentId;
|
|
51
|
-
for (; i; )
|
|
52
|
-
o.push(i), i = this.nodeMap.get(i)?.parentId;
|
|
53
|
-
return o;
|
|
54
|
-
}
|
|
55
|
-
/** Retrieves a specific hierarchy node by ID. @group Methods */
|
|
56
|
-
getNode(t) {
|
|
57
|
-
return this.nodeMap.get(t);
|
|
58
|
-
}
|
|
59
|
-
cleanup() {
|
|
60
|
-
this.nodeMap.clear();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
const He = (e, t) => t ? {
|
|
64
|
-
id: t.id ? e[t.id] : e.id,
|
|
65
|
-
label: t.text ? e[t.text] : e.label,
|
|
66
|
-
children: t.children ? e[t.children] : e.children,
|
|
67
|
-
icon: t.icon ? e[t.icon] : e.icon,
|
|
68
|
-
...e
|
|
69
|
-
} : e, oe = (e, t) => !t || t === "None" ? e : [...e].sort((i, d) => {
|
|
70
|
-
const w = i.label.localeCompare(d.label);
|
|
71
|
-
return t === "Ascending" ? w : -w;
|
|
72
|
-
}).map((i) => ({
|
|
73
|
-
...i,
|
|
74
|
-
children: i.children ? oe(i.children, t) : void 0
|
|
75
|
-
})), X = ve, q = we, Oe = (e) => {
|
|
76
|
-
const {
|
|
77
|
-
data: t,
|
|
78
|
-
fields: o,
|
|
79
|
-
sortOrder: i,
|
|
80
|
-
onDataSourceChanged: d,
|
|
81
|
-
onDataBound: w
|
|
82
|
-
} = e, { state: m, setState: h } = xe({
|
|
83
|
-
initialState: {
|
|
84
|
-
internalTreeData: t,
|
|
85
|
-
loadingNodes: /* @__PURE__ */ new Set()
|
|
86
|
-
}
|
|
87
|
-
}), p = Q(!1), E = F((f) => {
|
|
88
|
-
h((s) => ({
|
|
89
|
-
...s,
|
|
90
|
-
internalTreeData: typeof f == "function" ? f(s.internalTreeData) : f
|
|
91
|
-
}));
|
|
92
|
-
}, [h]), v = F((f) => {
|
|
93
|
-
h((s) => ({
|
|
94
|
-
...s,
|
|
95
|
-
loadingNodes: typeof f == "function" ? f(s.loadingNodes) : f
|
|
96
|
-
}));
|
|
97
|
-
}, [h]), { internalTreeData: g, loadingNodes: N } = m, A = W(() => {
|
|
98
|
-
let f = g;
|
|
99
|
-
if (o) {
|
|
100
|
-
const s = (x) => x.map((M) => {
|
|
101
|
-
const T = He(M, o);
|
|
102
|
-
return T.children && (T.children = s(T.children)), T;
|
|
103
|
-
});
|
|
104
|
-
f = s(f);
|
|
105
|
-
}
|
|
106
|
-
return i && (f = oe(f, i)), f;
|
|
107
|
-
}, [g, o, i]), k = Q(t);
|
|
108
|
-
U(() => {
|
|
109
|
-
k.current !== t && (E(t), d?.(), k.current = t);
|
|
110
|
-
}, [t, d]), U(() => {
|
|
111
|
-
p.current && w?.();
|
|
112
|
-
}, [A, w]), U(() => (p.current = !0, () => {
|
|
113
|
-
p.current = !1;
|
|
114
|
-
}), []);
|
|
115
|
-
const C = F((f, s) => {
|
|
116
|
-
E((x) => q(x, f, s));
|
|
117
|
-
}, [E]);
|
|
118
|
-
return {
|
|
119
|
-
/** The processed tree data structure. @group State */
|
|
120
|
-
treeData: A,
|
|
121
|
-
/** Update the internal tree data. @group Methods */
|
|
122
|
-
setInternalTreeData: E,
|
|
123
|
-
/** Set of node IDs currently in a loading state. @group State */
|
|
124
|
-
loadingNodes: N,
|
|
125
|
-
/** Update the loading state of nodes. @group Methods */
|
|
126
|
-
setLoadingNodes: v,
|
|
127
|
-
/** Update a specific node by ID. @group Methods */
|
|
128
|
-
updateNode: C
|
|
129
|
-
};
|
|
130
|
-
}, Ue = (e, t, o, i, d) => {
|
|
131
|
-
const {
|
|
132
|
-
expandedNodes: w,
|
|
133
|
-
onNodeExpanding: m,
|
|
134
|
-
onNodeExpanded: h,
|
|
135
|
-
onNodeCollapsing: p,
|
|
136
|
-
onNodeCollapsed: E,
|
|
137
|
-
onNodeExpand: v,
|
|
138
|
-
onLoadChildren: g,
|
|
139
|
-
onActionFailure: N
|
|
140
|
-
} = e, [A, k] = H(/* @__PURE__ */ new Set()), C = w ? new Set(w) : A, f = F(async (s) => {
|
|
141
|
-
const x = C.has(s), M = !x;
|
|
142
|
-
if (M) {
|
|
143
|
-
if (m?.(s) === !1) return;
|
|
144
|
-
} else if (p?.(s) === !1) return;
|
|
145
|
-
if (M && (g || d)) {
|
|
146
|
-
const K = X(t, s);
|
|
147
|
-
if (K && !K.isLoaded && !K.isLeaf) {
|
|
148
|
-
i((P) => new Set(P).add(s));
|
|
149
|
-
try {
|
|
150
|
-
const P = d ? await d.loadNodes(s) : await g(s);
|
|
151
|
-
o(s, { children: P, isLoaded: !0 });
|
|
152
|
-
} catch (P) {
|
|
153
|
-
N?.(P);
|
|
154
|
-
return;
|
|
155
|
-
} finally {
|
|
156
|
-
i((P) => {
|
|
157
|
-
const L = new Set(P);
|
|
158
|
-
return L.delete(s), L;
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
const T = new Set(C);
|
|
164
|
-
x ? T.delete(s) : T.add(s), w || k(T), v?.(s, M), M ? h?.(s) : E?.(s);
|
|
165
|
-
}, [
|
|
166
|
-
C,
|
|
167
|
-
t,
|
|
168
|
-
g,
|
|
169
|
-
v,
|
|
170
|
-
w,
|
|
171
|
-
m,
|
|
172
|
-
p,
|
|
173
|
-
h,
|
|
174
|
-
E,
|
|
175
|
-
N,
|
|
176
|
-
o,
|
|
177
|
-
i,
|
|
178
|
-
d
|
|
179
|
-
]);
|
|
180
|
-
return {
|
|
181
|
-
/** Set of IDs for currently expanded nodes. @group State */
|
|
182
|
-
expandedNodes: C,
|
|
183
|
-
/** Manually set the set of expanded node IDs. @group Methods */
|
|
184
|
-
setInternalExpandedNodes: k,
|
|
185
|
-
/** Toggle the expansion state of a specific node. @group Methods */
|
|
186
|
-
toggleExpand: f
|
|
187
|
-
};
|
|
188
|
-
}, We = (e, t, o) => {
|
|
189
|
-
const {
|
|
190
|
-
selectedNodes: i,
|
|
191
|
-
checkedNodes: d,
|
|
192
|
-
selectionMode: w = "single",
|
|
193
|
-
onSelectionChange: m,
|
|
194
|
-
onCheckedChange: h,
|
|
195
|
-
onNodeSelecting: p,
|
|
196
|
-
onNodeSelected: E,
|
|
197
|
-
onNodeChecking: v,
|
|
198
|
-
onNodeChecked: g,
|
|
199
|
-
autoCheck: N = !0
|
|
200
|
-
} = e, [A, k] = H(/* @__PURE__ */ new Set()), C = i ? new Set(i) : A, [f, s] = H(/* @__PURE__ */ new Set()), x = d ? new Set(d) : f, [M, T] = H(/* @__PURE__ */ new Set()), K = F((R) => {
|
|
201
|
-
if (p?.(R) === !1) return;
|
|
202
|
-
const n = new Set(w === "multiple" ? C : []);
|
|
203
|
-
n.has(R) ? n.delete(R) : n.add(R), i || k(n), m?.(Array.from(n)), E?.(R);
|
|
204
|
-
}, [C, w, m, i, p, E]), P = F((R, n) => {
|
|
205
|
-
const a = new Set(x), c = new Set(M), u = t.getDescendants(R), D = t.getAncestors(R);
|
|
206
|
-
n ? (a.add(R), c.delete(R), N && u.forEach((b) => {
|
|
207
|
-
a.add(b), c.delete(b);
|
|
208
|
-
})) : (a.delete(R), c.delete(R), N && u.forEach((b) => {
|
|
209
|
-
a.delete(b), c.delete(b);
|
|
210
|
-
})), N && D.forEach((b) => {
|
|
211
|
-
const y = t.getChildren(b), V = y.every((r) => a.has(r.id)), $ = y.every((r) => !a.has(r.id) && !c.has(r.id));
|
|
212
|
-
V ? (a.add(b), c.delete(b)) : $ ? (a.delete(b), c.delete(b)) : (a.delete(b), c.add(b));
|
|
213
|
-
}), T(c), d || s(a), h?.(Array.from(a)), g?.(R, n);
|
|
214
|
-
}, [x, M, t, h, N, d, g]), L = F((R) => {
|
|
215
|
-
const n = x.has(R);
|
|
216
|
-
v?.(R, !n) !== !1 && P(R, !n);
|
|
217
|
-
}, [x, P, v]);
|
|
218
|
-
return U(() => {
|
|
219
|
-
if (!N || !t || !o.length) return;
|
|
220
|
-
const R = /* @__PURE__ */ new Set(), n = new Set(x), a = (y) => {
|
|
221
|
-
if (!(y.children && y.children.length > 0))
|
|
222
|
-
return { isChecked: n.has(y.id), isIndeterminate: !1 };
|
|
223
|
-
const $ = y.children.map((l) => a(l)), r = $.every((l) => !l.isChecked && !l.isIndeterminate);
|
|
224
|
-
return $.every((l) => l.isChecked && !l.isIndeterminate) ? (n.add(y.id), { isChecked: !0, isIndeterminate: !1 }) : r ? (n.delete(y.id), { isChecked: !1, isIndeterminate: !1 }) : (n.delete(y.id), R.add(y.id), { isChecked: !1, isIndeterminate: !0 });
|
|
225
|
-
};
|
|
226
|
-
o.forEach((y) => a(y));
|
|
227
|
-
const c = Array.from(M).sort().join(","), u = Array.from(R).sort().join(",");
|
|
228
|
-
c !== u && T(R);
|
|
229
|
-
const D = Array.from(x).sort().join(","), b = Array.from(n).sort().join(",");
|
|
230
|
-
D !== b && (d || s(n), h?.(Array.from(n)));
|
|
231
|
-
}, [x, t, N, o, d, h, s]), {
|
|
232
|
-
/** Set of IDs for currently selected nodes. @group State */
|
|
233
|
-
selectedNodes: C,
|
|
234
|
-
/** Manually set the set of selected node IDs. @group Methods */
|
|
235
|
-
setInternalSelectedNodes: k,
|
|
236
|
-
/** Toggle selection state of a node. @group Methods */
|
|
237
|
-
toggleSelect: K,
|
|
238
|
-
/** Set of IDs for currently checked nodes. @group State */
|
|
239
|
-
checkedNodes: x,
|
|
240
|
-
/** Manually set the set of checked node IDs. @group Methods */
|
|
241
|
-
setInternalCheckedNodes: s,
|
|
242
|
-
/** Set of IDs for nodes with indeterminate check state. @group State */
|
|
243
|
-
indeterminateNodes: M,
|
|
244
|
-
/** Manually set the set of indeterminate node IDs. @group Methods */
|
|
245
|
-
setIndeterminateNodes: T,
|
|
246
|
-
/** Toggle check state of a node. @group Methods */
|
|
247
|
-
toggleCheck: L,
|
|
248
|
-
/** Core logic to update check state and propagate changes. @group Methods */
|
|
249
|
-
updateCheckState: P
|
|
250
|
-
};
|
|
251
|
-
}, Ye = (e, t, o = "") => {
|
|
252
|
-
const i = o.toLowerCase(), d = W(() => {
|
|
253
|
-
if (!i) return null;
|
|
254
|
-
const m = /* @__PURE__ */ new Map(), h = (p) => {
|
|
255
|
-
if (m.has(p.id)) return m.get(p.id);
|
|
256
|
-
let E = p.label.toLowerCase().includes(i), v = !1;
|
|
257
|
-
if (p.children)
|
|
258
|
-
for (const N of p.children)
|
|
259
|
-
h(N).matches && (v = !0);
|
|
260
|
-
const g = { matches: E || v, hasChildMatch: v };
|
|
261
|
-
return m.set(p.id, g), g;
|
|
262
|
-
};
|
|
263
|
-
return e.forEach((p) => h(p)), m;
|
|
264
|
-
}, [e, i]);
|
|
265
|
-
return {
|
|
266
|
-
/** The flattened list of visible nodes and their levels. @group State */
|
|
267
|
-
flattenedNodes: W(() => {
|
|
268
|
-
const m = [], h = (p, E = 0) => {
|
|
269
|
-
p.forEach((v) => {
|
|
270
|
-
const g = d ? d.get(v.id) : void 0;
|
|
271
|
-
if ((d ? g?.matches : !0) === !1) return;
|
|
272
|
-
m.push({ node: v, level: E });
|
|
273
|
-
const A = d && g?.hasChildMatch;
|
|
274
|
-
(t.has(v.id) || A) && v.children && h(v.children, E + 1);
|
|
275
|
-
});
|
|
276
|
-
};
|
|
277
|
-
return h(e), m;
|
|
278
|
-
}, [e, t, d])
|
|
279
|
-
};
|
|
280
|
-
}, qe = (e, t, o, i, d, w, m, h, p, E, v, g, N, A, k = {}) => {
|
|
281
|
-
const C = se(), {
|
|
282
|
-
expandedNodes: f,
|
|
283
|
-
checkedNodes: s,
|
|
284
|
-
selectedNodes: x,
|
|
285
|
-
onNodeExpand: M,
|
|
286
|
-
onCheckedChange: T,
|
|
287
|
-
onSelectionChange: K,
|
|
288
|
-
onNodeEditing: P
|
|
289
|
-
} = e, L = W(() => ({ ...k, ...{
|
|
290
|
-
expandAll: () => {
|
|
291
|
-
const n = Array.from(g.nodeMap.keys());
|
|
292
|
-
f ? M?.(n[0], !0) : d(new Set(n));
|
|
293
|
-
},
|
|
294
|
-
collapseAll: () => {
|
|
295
|
-
f ? M?.("", !1) : d(/* @__PURE__ */ new Set());
|
|
296
|
-
},
|
|
297
|
-
checkAll: () => {
|
|
298
|
-
const n = Array.from(g.nodeMap.keys());
|
|
299
|
-
s ? T?.(n) : (m(new Set(n)), p(/* @__PURE__ */ new Set()));
|
|
300
|
-
},
|
|
301
|
-
uncheckAll: () => {
|
|
302
|
-
s ? T?.([]) : (m(/* @__PURE__ */ new Set()), p(/* @__PURE__ */ new Set()));
|
|
303
|
-
},
|
|
304
|
-
selectNode: (n) => {
|
|
305
|
-
x ? K?.([n]) : h(/* @__PURE__ */ new Set([n]));
|
|
306
|
-
},
|
|
307
|
-
expandNode: (n, a = !0) => {
|
|
308
|
-
f ? M?.(n, a) : d((c) => {
|
|
309
|
-
const u = new Set(c);
|
|
310
|
-
return a ? u.add(n) : u.delete(n), u;
|
|
311
|
-
});
|
|
312
|
-
},
|
|
313
|
-
checkNode: (n, a = !0) => E(n, a),
|
|
314
|
-
getFlattenedNodes: () => v,
|
|
315
|
-
addNodes: (n, a, c) => {
|
|
316
|
-
if (!a)
|
|
317
|
-
o((u) => {
|
|
318
|
-
const D = [...u];
|
|
319
|
-
return c !== void 0 ? D.splice(c, 0, ...n) : D.push(...n), D;
|
|
320
|
-
});
|
|
321
|
-
else {
|
|
322
|
-
const u = (D) => D.map((b) => {
|
|
323
|
-
if (b.id === a) {
|
|
324
|
-
const y = [...b.children || []];
|
|
325
|
-
return c !== void 0 ? y.splice(c, 0, ...n) : y.push(...n), { ...b, children: y };
|
|
326
|
-
}
|
|
327
|
-
return b.children ? { ...b, children: u(b.children) } : b;
|
|
328
|
-
});
|
|
329
|
-
o((D) => u(D));
|
|
330
|
-
}
|
|
331
|
-
C.get("NotificationService")?.show({
|
|
332
|
-
type: "success",
|
|
333
|
-
message: `${n.length} Node(s) Added`,
|
|
334
|
-
duration: 2e3
|
|
335
|
-
});
|
|
336
|
-
},
|
|
337
|
-
removeNodes: (n) => {
|
|
338
|
-
const a = new Set(n), c = (u) => u.filter((D) => !a.has(D.id)).map((D) => ({
|
|
339
|
-
...D,
|
|
340
|
-
children: D.children ? c(D.children) : void 0
|
|
341
|
-
}));
|
|
342
|
-
o((u) => c(u)), C.get("NotificationService")?.show({
|
|
343
|
-
type: "success",
|
|
344
|
-
message: `${n.length} Node(s) Removed`,
|
|
345
|
-
duration: 2e3
|
|
346
|
-
});
|
|
347
|
-
},
|
|
348
|
-
updateNode: (n, a) => {
|
|
349
|
-
o((c) => q(c, n, a)), C.get("NotificationService")?.show({
|
|
350
|
-
type: "success",
|
|
351
|
-
message: "Node Updated Successfully",
|
|
352
|
-
duration: 2e3
|
|
353
|
-
});
|
|
354
|
-
},
|
|
355
|
-
moveNodes: (n, a, c) => {
|
|
356
|
-
const u = [], D = new Set(n), b = ($) => $.filter((r) => D.has(r.id) ? (u.push(r), !1) : !0).map((r) => ({
|
|
357
|
-
...r,
|
|
358
|
-
children: r.children ? b(r.children) : void 0
|
|
359
|
-
})), y = b(t), V = ($) => $.map((r) => {
|
|
360
|
-
if (r.id === a) {
|
|
361
|
-
const z = [...r.children || []];
|
|
362
|
-
return c !== void 0 ? z.splice(c, 0, ...u) : z.push(...u), { ...r, children: z };
|
|
363
|
-
}
|
|
364
|
-
return r.children ? { ...r, children: V(r.children) } : r;
|
|
365
|
-
});
|
|
366
|
-
o(V(y)), C.get("NotificationService")?.show({
|
|
367
|
-
type: "success",
|
|
368
|
-
message: "Nodes Moved Successfully",
|
|
369
|
-
duration: 2e3
|
|
370
|
-
});
|
|
371
|
-
},
|
|
372
|
-
getNode: (n) => X(t, n),
|
|
373
|
-
getTreeData: () => t,
|
|
374
|
-
ensureVisible: (n) => {
|
|
375
|
-
const a = g.getAncestors(n);
|
|
376
|
-
f ? (a.forEach((c) => M?.(c, !0)), M?.(n, !0)) : d((c) => {
|
|
377
|
-
const u = new Set(c);
|
|
378
|
-
return a.forEach((D) => u.add(D)), u.add(n), u;
|
|
379
|
-
});
|
|
380
|
-
},
|
|
381
|
-
beginEdit: (n) => {
|
|
382
|
-
X(t, n) && P?.(n) !== !1 && N(n);
|
|
383
|
-
},
|
|
384
|
-
disableNodes: (n, a = !0) => {
|
|
385
|
-
n.forEach((c) => {
|
|
386
|
-
o((u) => q(u, c, { disabled: a }));
|
|
387
|
-
});
|
|
388
|
-
},
|
|
389
|
-
enableNodes: (n) => {
|
|
390
|
-
n.forEach((a) => {
|
|
391
|
-
o((c) => q(c, a, { disabled: !1 }));
|
|
392
|
-
});
|
|
393
|
-
},
|
|
394
|
-
getAllCheckedNodes: () => Array.from(w),
|
|
395
|
-
getDisabledNodes: () => {
|
|
396
|
-
const n = [], a = (c) => {
|
|
397
|
-
c.forEach((u) => {
|
|
398
|
-
u.disabled && n.push(u.id), u.children && a(u.children);
|
|
399
|
-
});
|
|
400
|
-
};
|
|
401
|
-
return a(t), n;
|
|
402
|
-
}
|
|
403
|
-
} }), [
|
|
404
|
-
g,
|
|
405
|
-
t,
|
|
406
|
-
i,
|
|
407
|
-
w,
|
|
408
|
-
f,
|
|
409
|
-
s,
|
|
410
|
-
x,
|
|
411
|
-
M,
|
|
412
|
-
T,
|
|
413
|
-
K,
|
|
414
|
-
P,
|
|
415
|
-
o,
|
|
416
|
-
d,
|
|
417
|
-
m,
|
|
418
|
-
h,
|
|
419
|
-
p,
|
|
420
|
-
E,
|
|
421
|
-
v,
|
|
422
|
-
N,
|
|
423
|
-
k
|
|
424
|
-
]);
|
|
425
|
-
Ce(A, L);
|
|
426
|
-
}, Ge = (e) => {
|
|
427
|
-
const t = se(), i = Ae("I18nService")?.dir || "ltr", d = pe(e), { serviceRegistry: w, api: m } = d, { dir: h, apiRef: p, searchTerm: E } = e, v = h === "auto" || !h ? i : h, {
|
|
428
|
-
treeData: g,
|
|
429
|
-
setInternalTreeData: N,
|
|
430
|
-
loadingNodes: A,
|
|
431
|
-
setLoadingNodes: k,
|
|
432
|
-
updateNode: C
|
|
433
|
-
} = Oe(e), f = W(() => e.service ? e.service : e.serviceName ? t.get(e.serviceName) : null, [e.service, e.serviceName]);
|
|
434
|
-
U(() => {
|
|
435
|
-
f && f.loadNodes().then((z) => {
|
|
436
|
-
N(z);
|
|
437
|
-
});
|
|
438
|
-
}, [f, N]);
|
|
439
|
-
const s = De(
|
|
440
|
-
"HierarchyService",
|
|
441
|
-
() => new Be(),
|
|
442
|
-
w || t
|
|
443
|
-
), x = F((z, l = 0, O) => {
|
|
444
|
-
z.forEach((_) => {
|
|
445
|
-
const B = {
|
|
446
|
-
id: _.id,
|
|
447
|
-
level: l,
|
|
448
|
-
parentId: O,
|
|
449
|
-
children: _.children?.map((j) => j.id)
|
|
450
|
-
};
|
|
451
|
-
s.registerNode(B), _.children && x(_.children, l + 1, _.id);
|
|
452
|
-
});
|
|
453
|
-
}, [s]);
|
|
454
|
-
U(() => {
|
|
455
|
-
s && (s.cleanup(), x(g));
|
|
456
|
-
}, [g, s, x]);
|
|
457
|
-
const {
|
|
458
|
-
selectedNodes: M,
|
|
459
|
-
setInternalSelectedNodes: T,
|
|
460
|
-
toggleSelect: K,
|
|
461
|
-
checkedNodes: P,
|
|
462
|
-
setInternalCheckedNodes: L,
|
|
463
|
-
indeterminateNodes: R,
|
|
464
|
-
setIndeterminateNodes: n,
|
|
465
|
-
toggleCheck: a,
|
|
466
|
-
updateCheckState: c
|
|
467
|
-
} = We(e, s, g), {
|
|
468
|
-
expandedNodes: u,
|
|
469
|
-
setInternalExpandedNodes: D,
|
|
470
|
-
toggleExpand: b
|
|
471
|
-
} = Ue(e, g, C, k, f), { flattenedNodes: y } = Ye(g, u, E), [V, $] = H(null), r = F((z, l) => {
|
|
472
|
-
C(z, { label: l }), e.onNodeRename?.(z, l);
|
|
473
|
-
}, [C, e.onNodeRename]);
|
|
474
|
-
return qe(
|
|
475
|
-
e,
|
|
476
|
-
g,
|
|
477
|
-
N,
|
|
478
|
-
u,
|
|
479
|
-
D,
|
|
480
|
-
P,
|
|
481
|
-
L,
|
|
482
|
-
T,
|
|
483
|
-
n,
|
|
484
|
-
c,
|
|
485
|
-
y,
|
|
486
|
-
s,
|
|
487
|
-
$,
|
|
488
|
-
p,
|
|
489
|
-
// Cast to any to avoid complex ref types mismatch
|
|
490
|
-
m
|
|
491
|
-
), {
|
|
492
|
-
state: {
|
|
493
|
-
treeData: g,
|
|
494
|
-
expandedNodes: u,
|
|
495
|
-
selectedNodes: M,
|
|
496
|
-
checkedNodes: P,
|
|
497
|
-
indeterminateNodes: R,
|
|
498
|
-
loadingNodes: A,
|
|
499
|
-
flattenedNodes: y,
|
|
500
|
-
editingNodeId: V
|
|
501
|
-
},
|
|
502
|
-
actions: {
|
|
503
|
-
toggleExpand: b,
|
|
504
|
-
toggleSelect: K,
|
|
505
|
-
toggleCheck: a,
|
|
506
|
-
handleNodeRename: r,
|
|
507
|
-
setEditingNodeId: $
|
|
508
|
-
},
|
|
509
|
-
config: {
|
|
510
|
-
allowTextWrap: e.allowTextWrap,
|
|
511
|
-
animation: e.animation,
|
|
512
|
-
checkOnClick: e.checkOnClick,
|
|
513
|
-
fullRowSelect: e.fullRowSelect,
|
|
514
|
-
fullRowNavigable: e.fullRowNavigable,
|
|
515
|
-
onKeyPress: e.onKeyPress,
|
|
516
|
-
onNodeClicked: e.onNodeClicked,
|
|
517
|
-
onDrawNode: e.onDrawNode
|
|
518
|
-
},
|
|
519
|
-
dir: v,
|
|
520
|
-
baseApi: m
|
|
521
|
-
};
|
|
522
|
-
}, Je = () => /* @__PURE__ */ S("div", { className: "flex flex-col items-center justify-center min-h-screen p-4", children: /* @__PURE__ */ Y("div", { className: "flex flex-col items-center gap-4 max-w-md w-full", children: [
|
|
523
|
-
/* @__PURE__ */ S("div", { className: "flex items-center justify-center w-16 h-16 rounded-full bg-destructive/10", children: /* @__PURE__ */ S(be, { className: "w-8 h-8 text-destructive" }) }),
|
|
524
|
-
/* @__PURE__ */ Y("div", { className: "flex flex-col items-center gap-2 text-center", children: [
|
|
525
|
-
/* @__PURE__ */ S("h2", { className: "text-lg font-semibold", children: "Tree View Error" }),
|
|
526
|
-
/* @__PURE__ */ S("p", { className: "text-sm text-muted-foreground", children: "Something went wrong with the tree view. Please refresh the page or try again." })
|
|
527
|
-
] }),
|
|
528
|
-
/* @__PURE__ */ Y(
|
|
529
|
-
"button",
|
|
530
|
-
{
|
|
531
|
-
onClick: () => window.location.reload(),
|
|
532
|
-
className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-primary hover:bg-primary/10 rounded-md transition-colors",
|
|
533
|
-
children: [
|
|
534
|
-
/* @__PURE__ */ S(ke, { className: "w-4 h-4" }),
|
|
535
|
-
"Refresh Page"
|
|
536
|
-
]
|
|
537
|
-
}
|
|
538
|
-
)
|
|
539
|
-
] }) }), ie = re(({
|
|
540
|
-
node: e,
|
|
541
|
-
level: t,
|
|
542
|
-
isExpanded: o,
|
|
543
|
-
isSelected: i,
|
|
544
|
-
isChecked: d,
|
|
545
|
-
isIndeterminate: w,
|
|
546
|
-
isLoading: m,
|
|
547
|
-
hasChildren: h,
|
|
548
|
-
onToggleExpand: p,
|
|
549
|
-
onToggleSelect: E,
|
|
550
|
-
onToggleCheck: v,
|
|
551
|
-
onRename: g,
|
|
552
|
-
showCheckboxes: N,
|
|
553
|
-
allowEditing: A,
|
|
554
|
-
searchTerm: k,
|
|
555
|
-
style: C,
|
|
556
|
-
onKeyDown: f,
|
|
557
|
-
tabIndex: s,
|
|
558
|
-
autoFocus: x,
|
|
559
|
-
slots: M,
|
|
560
|
-
slotProps: T,
|
|
561
|
-
allowTextWrap: K,
|
|
562
|
-
animation: P,
|
|
563
|
-
checkOnClick: L,
|
|
564
|
-
fullRowSelect: R,
|
|
565
|
-
fullRowNavigable: n,
|
|
566
|
-
onNodeClicked: a,
|
|
567
|
-
onDrawNode: c,
|
|
568
|
-
isEditing: u,
|
|
569
|
-
onEditingChange: D,
|
|
570
|
-
dir: b
|
|
571
|
-
}) => {
|
|
572
|
-
const [y, V] = H(!1), [$, r] = H(e.label);
|
|
573
|
-
U(() => {
|
|
574
|
-
u !== void 0 && u !== y && (V(u), u && r(e.label));
|
|
575
|
-
}, [u, y, e.label]), U(() => {
|
|
576
|
-
c?.(e);
|
|
577
|
-
}, [e, c]);
|
|
578
|
-
const {
|
|
579
|
-
setNodeRef: z,
|
|
580
|
-
transform: l,
|
|
581
|
-
isDragging: O,
|
|
582
|
-
attributes: _,
|
|
583
|
-
listeners: B,
|
|
584
|
-
transition: j
|
|
585
|
-
} = Le({
|
|
586
|
-
id: e.id,
|
|
587
|
-
data: { node: e, type: "tree-item", level: t }
|
|
588
|
-
}), J = Q(null), ae = (I) => {
|
|
589
|
-
z(I), J.current = I;
|
|
590
|
-
};
|
|
591
|
-
U(() => {
|
|
592
|
-
x && J.current && !y && J.current.focus({ preventScroll: !0 });
|
|
593
|
-
}, [x, y]);
|
|
594
|
-
const le = () => {
|
|
595
|
-
A && (V(!0), r(e.label), D?.(!0));
|
|
596
|
-
}, de = (I) => {
|
|
597
|
-
I.key === "Enter" ? (g(e.id, $), V(!1), D?.(!1)) : I.key === "Escape" && (r(e.label), V(!1), D?.(!1));
|
|
598
|
-
}, ue = t * 20 + (h ? 0 : 20), he = {
|
|
599
|
-
...C,
|
|
600
|
-
transform: ne.Translate.toString(l) ? `${C.transform || ""} ${ne.Translate.toString(l)}` : C.transform,
|
|
601
|
-
transition: j || C.transition,
|
|
602
|
-
opacity: O ? 0.3 : 1,
|
|
603
|
-
zIndex: O ? 999 : "auto"
|
|
604
|
-
}, Z = M?.node, ee = M?.expandIcon, te = M?.checkbox, fe = () => m ? /* @__PURE__ */ S(Se, { className: "w-3.5 h-3.5 animate-spin" }) : h ? ee ? /* @__PURE__ */ S(ee, { isExpanded: o, isLoading: m, ...T?.expandIcon }) : o ? /* @__PURE__ */ S(_e, { className: "w-4 h-4" }) : /* @__PURE__ */ S(Ee, { className: "w-4 h-4" }) : null, me = () => N ? te ? /* @__PURE__ */ S(te, { checked: d, indeterminate: w, onChange: () => v(e.id), ...T?.checkbox }) : /* @__PURE__ */ Y(
|
|
605
|
-
"div",
|
|
606
|
-
{
|
|
607
|
-
"data-testid": `tree-checkbox-${e.id}`,
|
|
608
|
-
onClick: (I) => {
|
|
609
|
-
I.stopPropagation(), v(e.id);
|
|
610
|
-
},
|
|
611
|
-
className: G(
|
|
612
|
-
"w-4 h-4 me-2 flex items-center justify-center rounded border-2 transition-all cursor-pointer",
|
|
613
|
-
d ? "bg-primary border-primary text-primary-foreground" : w ? "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"
|
|
614
|
-
),
|
|
615
|
-
children: [
|
|
616
|
-
d && /* @__PURE__ */ S(Me, { className: "w-3.5 h-3.5 stroke-[3]" }),
|
|
617
|
-
w && /* @__PURE__ */ S("div", { className: "w-2.5 h-0.5 bg-primary rounded-full" })
|
|
618
|
-
]
|
|
619
|
-
}
|
|
620
|
-
) : null;
|
|
621
|
-
return /* @__PURE__ */ S(Te, { contextId: "tree-node", data: e, onAction: (I) => {
|
|
622
|
-
I === "edit" && A && (V(!0), r(e.label));
|
|
623
|
-
}, children: /* @__PURE__ */ S(
|
|
624
|
-
"div",
|
|
625
|
-
{
|
|
626
|
-
ref: ae,
|
|
627
|
-
..._,
|
|
628
|
-
...B,
|
|
629
|
-
role: "treeitem",
|
|
630
|
-
"data-testid": `tree-item-${e.id}`,
|
|
631
|
-
"aria-expanded": h ? o : void 0,
|
|
632
|
-
"aria-selected": i,
|
|
633
|
-
tabIndex: s,
|
|
634
|
-
onKeyDown: (I) => {
|
|
635
|
-
A && I.key === "F2" && (I.stopPropagation(), V(!0), r(e.label)), B?.onKeyDown && B.onKeyDown(I), f(I, e.id);
|
|
636
|
-
},
|
|
637
|
-
onClick: () => {
|
|
638
|
-
E(e.id), a?.(e.id), L && N && v(e.id);
|
|
639
|
-
},
|
|
640
|
-
className: G(
|
|
641
|
-
"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",
|
|
642
|
-
i ? "bg-primary/10 text-primary" : "text-foreground",
|
|
643
|
-
O ? "bg-primary/5" : "",
|
|
644
|
-
P ? "transition-all duration-200" : ""
|
|
645
|
-
),
|
|
646
|
-
style: { ...he, paddingInlineStart: `${ue}px` },
|
|
647
|
-
children: Z ? /* @__PURE__ */ S(
|
|
648
|
-
Z,
|
|
649
|
-
{
|
|
650
|
-
node: e,
|
|
651
|
-
level: t,
|
|
652
|
-
isExpanded: o,
|
|
653
|
-
isSelected: i,
|
|
654
|
-
isChecked: d,
|
|
655
|
-
isIndeterminate: w,
|
|
656
|
-
onToggleExpand: () => p(e.id),
|
|
657
|
-
onToggleSelect: () => E(e.id),
|
|
658
|
-
onToggleCheck: () => v(e.id),
|
|
659
|
-
...T?.node || {}
|
|
660
|
-
}
|
|
661
|
-
) : /* @__PURE__ */ Y(ge, { children: [
|
|
662
|
-
h || m ? /* @__PURE__ */ S(
|
|
663
|
-
"button",
|
|
664
|
-
{
|
|
665
|
-
"data-testid": "expand-button",
|
|
666
|
-
onClick: (I) => {
|
|
667
|
-
I.stopPropagation(), p(e.id);
|
|
668
|
-
},
|
|
669
|
-
onPointerDown: (I) => I.stopPropagation(),
|
|
670
|
-
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",
|
|
671
|
-
tabIndex: -1,
|
|
672
|
-
children: fe()
|
|
673
|
-
}
|
|
674
|
-
) : null,
|
|
675
|
-
me(),
|
|
676
|
-
e.icon && /* @__PURE__ */ S("span", { className: "me-2 flex-shrink-0 text-muted-foreground group-hover:text-foreground transition-colors", children: e.icon }),
|
|
677
|
-
y ? /* @__PURE__ */ S(
|
|
678
|
-
"input",
|
|
679
|
-
{
|
|
680
|
-
"data-testid": "tree-item-edit-input",
|
|
681
|
-
autoFocus: !0,
|
|
682
|
-
value: $,
|
|
683
|
-
onChange: (I) => r(I.target.value),
|
|
684
|
-
onKeyDown: de,
|
|
685
|
-
onBlur: () => V(!1),
|
|
686
|
-
onClick: (I) => I.stopPropagation(),
|
|
687
|
-
className: "flex-1 bg-background border border-primary rounded px-1 text-sm outline-none"
|
|
688
|
-
}
|
|
689
|
-
) : /* @__PURE__ */ S(
|
|
690
|
-
"span",
|
|
691
|
-
{
|
|
692
|
-
className: `text-base font-semibold flex-1 ${K ? "whitespace-normal" : "truncate"}`,
|
|
693
|
-
onDoubleClick: (I) => {
|
|
694
|
-
I.stopPropagation(), le();
|
|
695
|
-
},
|
|
696
|
-
children: /* @__PURE__ */ S(ye, { text: e.label, highlight: k })
|
|
697
|
-
}
|
|
698
|
-
)
|
|
699
|
-
] })
|
|
700
|
-
}
|
|
701
|
-
) });
|
|
702
|
-
});
|
|
703
|
-
ie.displayName = "EzTreeViewItem";
|
|
704
|
-
const ce = re(({
|
|
705
|
-
items: e,
|
|
706
|
-
expandedNodes: t,
|
|
707
|
-
selectedNodes: o,
|
|
708
|
-
checkedNodes: i,
|
|
709
|
-
indeterminateNodes: d,
|
|
710
|
-
loadingNodes: w,
|
|
711
|
-
onToggleExpand: m,
|
|
712
|
-
onToggleSelect: h,
|
|
713
|
-
onToggleCheck: p,
|
|
714
|
-
onNodeRename: E,
|
|
715
|
-
className: v,
|
|
716
|
-
dir: g,
|
|
717
|
-
showCheckboxes: N,
|
|
718
|
-
allowEditing: A,
|
|
719
|
-
searchTerm: k,
|
|
720
|
-
slots: C,
|
|
721
|
-
slotProps: f,
|
|
722
|
-
allowTextWrap: s,
|
|
723
|
-
animation: x,
|
|
724
|
-
checkOnClick: M,
|
|
725
|
-
fullRowSelect: T,
|
|
726
|
-
fullRowNavigable: K,
|
|
727
|
-
onKeyPress: P,
|
|
728
|
-
onNodeClicked: L,
|
|
729
|
-
onDrawNode: R,
|
|
730
|
-
editingNodeId: n,
|
|
731
|
-
setEditingNodeId: a
|
|
732
|
-
}) => {
|
|
733
|
-
const { rowVirtualizer: c, parentRef: u, getVirtualItems: D } = Ie({
|
|
734
|
-
rowCount: e.length,
|
|
735
|
-
rowHeight: 32,
|
|
736
|
-
overscanCount: 10,
|
|
737
|
-
progressiveRendering: !0
|
|
738
|
-
// Default to true for tree as well
|
|
739
|
-
}), [b, y] = H(0), V = W(() => {
|
|
740
|
-
const r = /* @__PURE__ */ new Map();
|
|
741
|
-
return e.forEach((z, l) => r.set(z.node.id, l)), r;
|
|
742
|
-
}, [e]), $ = F((r, z, l) => {
|
|
743
|
-
const O = g === "rtl", _ = O ? "ArrowLeft" : "ArrowRight", B = O ? "ArrowRight" : "ArrowLeft";
|
|
744
|
-
if (r.key === "ArrowDown") {
|
|
745
|
-
r.preventDefault();
|
|
746
|
-
const j = Math.min(e.length - 1, z + 1);
|
|
747
|
-
y(j), c.scrollToIndex(j);
|
|
748
|
-
} else if (r.key === "ArrowUp") {
|
|
749
|
-
r.preventDefault();
|
|
750
|
-
const j = Math.max(0, z - 1);
|
|
751
|
-
y(j), c.scrollToIndex(j);
|
|
752
|
-
} else if (r.key === _)
|
|
753
|
-
r.preventDefault(), (l.children?.length || !l.isLoaded && !l.isLeaf) && !t.has(l.id) ? m(l.id) : l.children?.length && t.has(l.id) && z + 1 < e.length && e[z + 1].level > (l.level ?? 0) && (y(z + 1), c.scrollToIndex(z + 1));
|
|
754
|
-
else if (r.key === B) {
|
|
755
|
-
if (r.preventDefault(), t.has(l.id))
|
|
756
|
-
m(l.id);
|
|
757
|
-
else if (l.parentId) {
|
|
758
|
-
const j = V.get(l.parentId);
|
|
759
|
-
j !== void 0 && (y(j), c.scrollToIndex(j));
|
|
760
|
-
}
|
|
761
|
-
} else (r.key === "Enter" || r.key === " ") && (r.preventDefault(), N ? p(l.id) : h(l.id));
|
|
762
|
-
}, [e, t, m, h, p, N, V, c]);
|
|
763
|
-
return /* @__PURE__ */ S(
|
|
764
|
-
"div",
|
|
765
|
-
{
|
|
766
|
-
ref: u,
|
|
767
|
-
className: G("absolute inset-0 overflow-y-auto bg-background border rounded-lg shadow-sm focus:outline-none focus:ring-1 focus:ring-primary/20", v),
|
|
768
|
-
dir: g,
|
|
769
|
-
role: "tree",
|
|
770
|
-
onKeyDown: (r) => P?.(r),
|
|
771
|
-
children: /* @__PURE__ */ S(
|
|
772
|
-
"div",
|
|
773
|
-
{
|
|
774
|
-
style: {
|
|
775
|
-
height: `${c.getTotalSize()}px`,
|
|
776
|
-
width: "100%",
|
|
777
|
-
position: "relative"
|
|
778
|
-
},
|
|
779
|
-
children: /* @__PURE__ */ S(
|
|
780
|
-
je,
|
|
781
|
-
{
|
|
782
|
-
items: e.map((r) => r.node.id),
|
|
783
|
-
strategy: Fe,
|
|
784
|
-
children: D().map((r) => {
|
|
785
|
-
const z = e[r.index], { node: l, level: O } = z, _ = b === r.index;
|
|
786
|
-
return /* @__PURE__ */ S(
|
|
787
|
-
ie,
|
|
788
|
-
{
|
|
789
|
-
node: l,
|
|
790
|
-
level: O,
|
|
791
|
-
isExpanded: t.has(l.id),
|
|
792
|
-
isSelected: o.has(l.id),
|
|
793
|
-
isChecked: i.has(l.id),
|
|
794
|
-
isIndeterminate: d.has(l.id),
|
|
795
|
-
isLoading: w.has(l.id),
|
|
796
|
-
hasChildren: !!l.children?.length || !l.isLoaded && !l.isLeaf,
|
|
797
|
-
onToggleExpand: m,
|
|
798
|
-
onToggleSelect: h,
|
|
799
|
-
onToggleCheck: p,
|
|
800
|
-
onRename: E,
|
|
801
|
-
showCheckboxes: N,
|
|
802
|
-
allowEditing: A,
|
|
803
|
-
searchTerm: k,
|
|
804
|
-
onKeyDown: (B) => $(B, r.index, l),
|
|
805
|
-
style: {
|
|
806
|
-
position: "absolute",
|
|
807
|
-
top: `${r.start}px`,
|
|
808
|
-
left: 0,
|
|
809
|
-
width: "100%",
|
|
810
|
-
height: `${r.size}px`
|
|
811
|
-
},
|
|
812
|
-
tabIndex: _ ? 0 : -1,
|
|
813
|
-
autoFocus: _,
|
|
814
|
-
slots: C,
|
|
815
|
-
slotProps: f,
|
|
816
|
-
allowTextWrap: s,
|
|
817
|
-
animation: x,
|
|
818
|
-
checkOnClick: M,
|
|
819
|
-
fullRowSelect: T,
|
|
820
|
-
fullRowNavigable: K,
|
|
821
|
-
onNodeClicked: L,
|
|
822
|
-
onDrawNode: R,
|
|
823
|
-
isEditing: n === l.id,
|
|
824
|
-
onEditingChange: (B) => a(B ? l.id : null),
|
|
825
|
-
dir: g
|
|
826
|
-
},
|
|
827
|
-
l.id
|
|
828
|
-
);
|
|
829
|
-
})
|
|
830
|
-
}
|
|
831
|
-
)
|
|
832
|
-
}
|
|
833
|
-
)
|
|
834
|
-
}
|
|
835
|
-
);
|
|
836
|
-
});
|
|
837
|
-
ce.displayName = "EzVirtualTree";
|
|
838
|
-
const Qe = ({ onDragEnd: e, onDragStart: t }) => {
|
|
839
|
-
const [o, i] = H(null), [d, w] = H(null), [m, h] = H("inside"), p = ze(
|
|
840
|
-
Pe(Ve, {
|
|
841
|
-
activationConstraint: {
|
|
842
|
-
distance: 8
|
|
843
|
-
}
|
|
844
|
-
})
|
|
845
|
-
), E = F((N) => {
|
|
846
|
-
const { active: A } = N, k = A.data.current?.node;
|
|
847
|
-
k && (i(k), t?.(k));
|
|
848
|
-
}, [t]), v = F((N) => {
|
|
849
|
-
N.preventDefault();
|
|
850
|
-
const { active: A, over: k } = N;
|
|
851
|
-
if (!k) return;
|
|
852
|
-
const C = A.data.current?.node, f = k.data.current?.node;
|
|
853
|
-
if (C && f && C.id !== f.id) {
|
|
854
|
-
const s = k.rect, x = s.top + s.height / 2;
|
|
855
|
-
x < s.top + 10 ? h("before") : x > s.bottom - 10 ? h("after") : h("inside"), w(f);
|
|
856
|
-
}
|
|
857
|
-
}, []), g = F((N) => {
|
|
858
|
-
const { active: A, over: k } = N;
|
|
859
|
-
A && k && o && d && e(o, d, m), i(null), w(null), h("inside");
|
|
860
|
-
}, [o, d, m, e]);
|
|
861
|
-
return {
|
|
862
|
-
/** Sensors for dnd-kit interaction. @group Properties */
|
|
863
|
-
sensors: p,
|
|
864
|
-
/** The node currently being dragged. @group State */
|
|
865
|
-
activeNode: o,
|
|
866
|
-
/** The node currently being dragged over. @group State */
|
|
867
|
-
dragOverNode: d,
|
|
868
|
-
/** The relative drop position (before/after/inside). @group State */
|
|
869
|
-
dragPosition: m,
|
|
870
|
-
/** Internal handler for drag start. @group Events */
|
|
871
|
-
handleDragStart: E,
|
|
872
|
-
/** Internal handler for drag over. @group Events */
|
|
873
|
-
handleDragOver: v,
|
|
874
|
-
/** Internal handler for drag end. @group Events */
|
|
875
|
-
handleDragEnd: g
|
|
876
|
-
};
|
|
877
|
-
}, dt = (e) => {
|
|
878
|
-
Ne();
|
|
879
|
-
const t = Ge(e), {
|
|
880
|
-
state: {
|
|
881
|
-
expandedNodes: o,
|
|
882
|
-
selectedNodes: i,
|
|
883
|
-
checkedNodes: d,
|
|
884
|
-
indeterminateNodes: w,
|
|
885
|
-
loadingNodes: m,
|
|
886
|
-
flattenedNodes: h,
|
|
887
|
-
editingNodeId: p
|
|
888
|
-
},
|
|
889
|
-
actions: {
|
|
890
|
-
toggleExpand: E,
|
|
891
|
-
toggleSelect: v,
|
|
892
|
-
toggleCheck: g,
|
|
893
|
-
handleNodeRename: N,
|
|
894
|
-
setEditingNodeId: A
|
|
895
|
-
},
|
|
896
|
-
config: {
|
|
897
|
-
allowTextWrap: k,
|
|
898
|
-
animation: C,
|
|
899
|
-
checkOnClick: f,
|
|
900
|
-
fullRowSelect: s,
|
|
901
|
-
fullRowNavigable: x,
|
|
902
|
-
onKeyPress: M,
|
|
903
|
-
onNodeClicked: T,
|
|
904
|
-
onDrawNode: K
|
|
905
|
-
},
|
|
906
|
-
dir: P
|
|
907
|
-
} = t, { handleDragEnd: L, sensors: R } = Qe({
|
|
908
|
-
onDragEnd: (n, a, c) => {
|
|
909
|
-
e.onNodeDrop && e.onNodeDrop(n, a, c);
|
|
910
|
-
}
|
|
911
|
-
});
|
|
912
|
-
return /* @__PURE__ */ S(Re, { fallback: /* @__PURE__ */ S(Je, {}), children: /* @__PURE__ */ S("div", { className: G("relative flex-1 w-full h-full min-h-0", e.className), children: /* @__PURE__ */ S(
|
|
913
|
-
Ke,
|
|
914
|
-
{
|
|
915
|
-
sensors: R,
|
|
916
|
-
collisionDetection: $e,
|
|
917
|
-
onDragEnd: L,
|
|
918
|
-
children: /* @__PURE__ */ S(
|
|
919
|
-
ce,
|
|
920
|
-
{
|
|
921
|
-
items: h,
|
|
922
|
-
expandedNodes: o,
|
|
923
|
-
selectedNodes: i,
|
|
924
|
-
checkedNodes: d,
|
|
925
|
-
indeterminateNodes: w,
|
|
926
|
-
loadingNodes: m,
|
|
927
|
-
onToggleExpand: E,
|
|
928
|
-
onToggleSelect: v,
|
|
929
|
-
onToggleCheck: g,
|
|
930
|
-
onNodeRename: N,
|
|
931
|
-
dir: P,
|
|
932
|
-
showCheckboxes: e.showCheckboxes,
|
|
933
|
-
allowEditing: e.allowEditing,
|
|
934
|
-
searchTerm: e.searchTerm,
|
|
935
|
-
slots: e.slots,
|
|
936
|
-
slotProps: e.slotProps,
|
|
937
|
-
allowTextWrap: k,
|
|
938
|
-
animation: C,
|
|
939
|
-
checkOnClick: f,
|
|
940
|
-
fullRowSelect: s,
|
|
941
|
-
fullRowNavigable: x,
|
|
942
|
-
onKeyPress: M,
|
|
943
|
-
onNodeClicked: T,
|
|
944
|
-
onDrawNode: K,
|
|
945
|
-
editingNodeId: p,
|
|
946
|
-
setEditingNodeId: A
|
|
947
|
-
}
|
|
948
|
-
)
|
|
949
|
-
}
|
|
950
|
-
) }) });
|
|
951
|
-
};
|
|
952
|
-
export {
|
|
953
|
-
dt as EzTreeView
|
|
954
|
-
};
|
|
1
|
+
import { t as e } from "./EzTreeView-D1G0Aomc.js";
|
|
2
|
+
export { e as EzTreeView };
|