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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),k=require("react"),F=require("@tanstack/react-form"),D=require("react-dom"),c=require("./tooltip-B41iztKT.cjs"),b=require("./input-BgM_la4k.cjs"),i=require("./label-Dx6oDB-X.cjs"),x=require("./useInitCoreServices-CwXv2p4S.cjs"),m=require("./date-time-picker-DTxHdPgQ.cjs"),E=require("./calendar-BMZ8ddOf.cjs"),A=[{label:"S",value:"SU"},{label:"M",value:"MO"},{label:"T",value:"TU"},{label:"W",value:"WE"},{label:"T",value:"TH"},{label:"F",value:"FR"},{label:"S",value:"SA"}],z=({isOpen:h,onClose:u,mode:d,event:n,onSave:C,onDelete:v,locale:p,editorTemplate:f,headerTemplate:j,footerTemplate:y})=>{const a=F.useForm({defaultValues:{title:n?.title||"",start:n?.start,end:n?.end,resourceIds:n?.resourceIds||(n?.resourceId?[n.resourceId]:[])||[],location:n?.location||"",isAllDay:!!n?.allDay||!!n?.isAllDay||!1,description:n?.description||"",isTimezoneEnabled:!!n?.timezone,startTimezone:n?.timezone?.start||"Asia/Calcutta",endTimezone:n?.timezone?.end||"Asia/Calcutta",repeatFrequency:n?.recurrence?.frequency||"Never",repeatInterval:n?.recurrence?.interval||1,repeatDays:n?.recurrence?.days||[],repeatBy:n?.recurrence?.repeatBy||"day",repeatEndLevel:n?.recurrence?.end||"Never",repeatEndCount:n?.recurrence?.endCount||1,repeatEndUntil:n?.recurrence?.endUntil,attachments:n?.attachments||[]},onSubmit:async({value:r})=>{C({...n,title:r.title,start:r.start,end:r.end,resourceId:r.resourceIds[0],resourceIds:r.resourceIds,location:r.location,allDay:r.isAllDay,description:r.description,timezone:r.isTimezoneEnabled?{start:r.startTimezone,end:r.endTimezone}:void 0,recurrence:r.repeatFrequency!=="Never"?{frequency:r.repeatFrequency,interval:r.repeatInterval,unit:r.repeatFrequency.replace("ly","")+"(s)",end:r.repeatEndLevel,endCount:r.repeatEndLevel==="Count"?r.repeatEndCount:void 0,endUntil:r.repeatEndLevel==="Until"?r.repeatEndUntil:void 0,days:r.repeatFrequency==="Weekly"?r.repeatDays:void 0,repeatBy:r.repeatFrequency==="Monthly"||r.repeatFrequency==="Yearly"?r.repeatBy:void 0}:void 0,attachments:r.attachments}),u()}});if(k.useEffect(()=>{h&&a.reset()},[h,n,a]),!h)return null;const N=r=>{r.preventDefault(),r.stopPropagation(),a.handleSubmit()},o=d==="view",w=e.jsxs("div",{"data-testid":"ez-event-modal",style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:1e4,backgroundColor:"rgba(0, 0, 0, 0.4)",backdropFilter:"blur(2px)",pointerEvents:"auto"},children:[e.jsx("div",{style:{position:"absolute",inset:0},onClick:u}),e.jsxs("div",{className:x.cn("bg-background rounded-xl shadow-2xl flex flex-col border border-border overflow-hidden","animate-in zoom-in-95 fade-in duration-300 ease-out"),style:{backgroundColor:"white",width:"650px",maxWidth:"95vw",maxHeight:"92vh",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:10001},children:[e.jsx("div",{className:"flex items-center justify-between shrink-0 bg-background",style:{padding:"16px 40px"},children:j?j(n||{},d):e.jsxs(e.Fragment,{children:[e.jsxs("h2",{className:"text-xl font-bold tracking-tight text-foreground",children:[d==="create"&&"New Event",d==="edit"&&"Edit Event",d==="view"&&"Event Details"]}),e.jsx(c.Button,{variant:"ghost",size:"icon",className:"h-9 w-9 rounded-full hover:bg-muted text-muted-foreground mr-[-8px]",onClick:u,children:e.jsx(c.X,{className:"w-5 h-5"})})]})}),f?e.jsx("div",{className:"overflow-y-auto custom-scrollbar flex-1 bg-background",style:{padding:"8px 40px 32px 40px"},children:f(n||{})}):e.jsxs("form",{onSubmit:N,className:"space-y-6 overflow-y-auto custom-scrollbar flex-1 bg-background",style:{padding:"8px 40px 32px 40px"},children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsx(a.Field,{name:"title",validators:{onChange:({value:r})=>r?void 0:"Title is required"},children:r=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(i.Label,{htmlFor:"title",className:"text-[13px] font-semibold text-foreground/70",children:"Title"}),e.jsx(b.Input,{id:"title",placeholder:"Add title",value:r.state.value,onChange:t=>r.handleChange(t.target.value),onBlur:r.handleBlur,disabled:o,className:x.cn("h-10 rounded-md border-border focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20 bg-background transition-all",r.state.meta.errors.length>0&&"border-destructive focus-visible:border-destructive ring-destructive/20")}),r.state.meta.errors.length>0&&e.jsx("p",{className:"text-[12px] font-medium text-destructive mt-1.5 animate-in fade-in slide-in-from-top-1",children:r.state.meta.errors.join(", ")})]})}),e.jsx(a.Field,{name:"location",children:r=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(i.Label,{htmlFor:"location",className:"text-[13px] font-semibold text-foreground/70",children:"Location"}),e.jsx(b.Input,{id:"location",placeholder:"Add location",value:r.state.value,onChange:t=>r.handleChange(t.target.value),disabled:o,className:"h-10 rounded-md border-border focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20 bg-background transition-all"})]})})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsx(a.Field,{name:"start",validators:{onChange:({value:r})=>r?void 0:"Start date is required"},children:r=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(i.Label,{className:"text-[13px] font-semibold text-foreground/70",children:"Start"}),e.jsx(m.DateTimePicker,{date:r.state.value,setDate:t=>r.handleChange(t),disabled:o,required:!0,locale:p,mode:a.getFieldValue("isAllDay")?"date":"datetime",className:"border-border focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20"}),r.state.meta.errors.length>0&&e.jsx("p",{className:"text-[12px] font-medium text-destructive mt-1.5",children:r.state.meta.errors.join(", ")})]})}),e.jsx(a.Field,{name:"end",validators:{onChange:({value:r,fieldApi:t})=>{if(!r)return"End date is required";const s=t.form.getFieldValue("start");if(s&&r<=s)return"End time must be after start time"}},children:r=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(i.Label,{className:"text-[13px] font-semibold text-foreground/70",children:"End"}),e.jsx(m.DateTimePicker,{date:r.state.value,setDate:t=>r.handleChange(t),disabled:o,required:!0,locale:p,mode:a.getFieldValue("isAllDay")?"date":"datetime",minDate:a.getFieldValue("start"),className:x.cn("border-border focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20",r.state.meta.errors.length>0&&"border-destructive focus-visible:border-destructive ring-destructive/20")}),r.state.meta.errors.length>0&&e.jsx("p",{className:"text-[12px] font-medium text-destructive mt-1.5 animate-in fade-in slide-in-from-top-1",children:r.state.meta.errors.join(", ")})]})})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsx(a.Field,{name:"isAllDay",children:r=>e.jsx("div",{className:"flex items-center h-10",children:e.jsxs("label",{className:"flex items-center space-x-3 cursor-pointer group select-none",children:[e.jsx("input",{type:"checkbox",checked:r.state.value,onChange:t=>r.handleChange(t.target.checked),disabled:o,className:"h-4 w-4 rounded border-border/50 text-primary focus:ring-primary/30 accent-primary transition-all cursor-pointer"}),e.jsx("span",{className:"text-[14px] font-medium text-foreground/70 group-hover:text-foreground",children:"All day event"})]})})}),e.jsx(a.Field,{name:"isTimezoneEnabled",children:r=>e.jsx("div",{className:"flex items-center h-10",children:e.jsxs("label",{className:"flex items-center space-x-3 cursor-pointer group select-none",children:[e.jsx("input",{type:"checkbox",checked:r.state.value,onChange:t=>r.handleChange(t.target.checked),disabled:o,className:"h-4 w-4 rounded border-border/50 text-primary focus:ring-primary/30 accent-primary transition-all cursor-pointer"}),e.jsx("span",{className:"text-[14px] font-medium text-foreground/70 group-hover:text-foreground",children:"Enable timezone"})]})})})]}),e.jsx(a.Subscribe,{selector:r=>[r.values.isTimezoneEnabled],children:([r])=>r&&e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 p-6 bg-highlight/50 rounded-lg border border-border animate-in slide-in-from-top-2 duration-300",children:[e.jsx(a.Field,{name:"startTimezone",children:t=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(i.Label,{className:"text-[13px] font-semibold text-foreground/70",children:"Start Timezone"}),e.jsxs("select",{className:"w-full h-10 px-3 rounded-md border-border bg-background text-sm focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/20 focus-visible:border-primary appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xlmns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20fill%3D%27none%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20stroke%3D%27%236b7280%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%20stroke-width%3D%271.5%27%20d%3D%27m6%208%204%204%204-4%27%2F%3E%3C%2Fsvg%3E')] bg-[length:20px] bg-[right_8px_center] bg-no-repeat transition-all",value:t.state.value,onChange:s=>t.handleChange(s.target.value),children:[e.jsx("option",{value:"Asia/Calcutta",children:"Asia/Calcutta"}),e.jsx("option",{value:"UTC",children:"UTC"}),e.jsx("option",{value:"America/New_York",children:"America/New_York"})]})]})}),e.jsx(a.Field,{name:"endTimezone",children:t=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(i.Label,{className:"text-[13px] font-semibold text-foreground/70",children:"End Timezone"}),e.jsxs("select",{className:"w-full h-10 px-3 rounded-md border-border bg-background text-sm focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/20 focus-visible:border-primary appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xlmns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20fill%3D%27none%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20stroke%3D%27%236b7280%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%20stroke-width%3D%271.5%27%20d%3D%27m6%208%204%204%204-4%27%2F%3E%3C%2Fsvg%3E')] bg-[length:20px] bg-[right_8px_center] bg-no-repeat transition-all",value:t.state.value,onChange:s=>t.handleChange(s.target.value),children:[e.jsx("option",{value:"Asia/Calcutta",children:"Asia/Calcutta"}),e.jsx("option",{value:"UTC",children:"UTC"}),e.jsx("option",{value:"America/New_York",children:"America/New_York"})]})]})})]})}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsx(a.Field,{name:"repeatFrequency",children:r=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(i.Label,{className:"text-[13px] font-semibold text-foreground/70",children:"Repeat"}),e.jsxs("select",{className:"w-full h-10 px-3 rounded-md border-border bg-background text-sm focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/20 focus-visible:border-primary appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xlmns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20fill%3D%27none%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20stroke%3D%27%236b7280%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%20stroke-width%3D%271.5%27%20d%3D%27m6%208%204%204%204-4%27%2F%3E%3C%2Fsvg%3E')] bg-[length:20px] bg-[right_8px_center] bg-no-repeat transition-all",value:r.state.value,onChange:t=>r.handleChange(t.target.value),children:[e.jsx("option",{value:"Never",children:"Never"}),e.jsx("option",{value:"Daily",children:"Daily"}),e.jsx("option",{value:"Weekly",children:"Weekly"}),e.jsx("option",{value:"Monthly",children:"Monthly"}),e.jsx("option",{value:"Yearly",children:"Yearly"})]})]})}),e.jsx(a.Subscribe,{selector:r=>[r.values.repeatFrequency],children:([r])=>r!=="Never"&&e.jsx(a.Field,{name:"repeatEndLevel",children:t=>e.jsxs("div",{className:"space-y-2 animate-in slide-in-from-top-2 duration-300",children:[e.jsx(i.Label,{className:"text-[13px] font-semibold text-foreground/70",children:"End"}),e.jsxs("select",{className:"w-full h-10 px-3 rounded-md border-border bg-background text-sm focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/20 focus-visible:border-primary appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xlmns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20fill%3D%27none%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20stroke%3D%27%236b7280%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%20stroke-width%3D%271.5%27%20d%3D%27m6%208%204%204%204-4%27%2F%3E%3C%2Fsvg%3E')] bg-[length:20px] bg-[right_8px_center] bg-no-repeat transition-all",value:t.state.value,onChange:s=>t.handleChange(s.target.value),children:[e.jsx("option",{value:"Never",children:"Never"}),e.jsx("option",{value:"Until",children:"Until"}),e.jsx("option",{value:"Count",children:"Count"})]})]})})})]}),e.jsx(a.Subscribe,{selector:r=>[r.values.repeatFrequency,r.values.repeatEndLevel],children:([r,t])=>r!=="Never"&&e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 animate-in slide-in-from-top-2 duration-300",children:[e.jsx(a.Field,{name:"repeatInterval",children:s=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(i.Label,{className:"text-[13px] font-semibold text-foreground/70",children:"Repeat every"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("select",{className:"flex-1 h-10 px-3 rounded-md border-border bg-background text-sm focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/20 focus-visible:border-primary appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xlmns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20fill%3D%27none%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20stroke%3D%27%236b7280%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%20stroke-width%3D%271.5%27%20d%3D%27m6%208%204%204%204-4%27%2F%3E%3C%2Fsvg%3E')] bg-[length:20px] bg-[right_8px_center] bg-no-repeat transition-all",value:s.state.value,onChange:l=>s.handleChange(parseInt(l.target.value)),children:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,20,30].map(l=>e.jsx("option",{value:l,children:l},l))}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:r==="Daily"?"Day(s)":r.replace("ly","")+"(s)"})]})]})}),t==="Until"&&e.jsx(a.Field,{name:"repeatEndUntil",children:s=>e.jsxs("div",{className:"space-y-2 animate-in slide-in-from-top-1",children:[e.jsx(i.Label,{className:"text-[13px] font-semibold text-foreground/70",children:"Until"}),e.jsx(m.DateTimePicker,{date:s.state.value,setDate:l=>s.handleChange(l),disabled:o,locale:p,mode:"date",minDate:a.getFieldValue("start"),className:"border-border focus:border-primary"})]})}),t==="Count"&&e.jsx(a.Field,{name:"repeatEndCount",children:s=>e.jsxs("div",{className:"space-y-2 animate-in slide-in-from-top-1",children:[e.jsx(i.Label,{className:"text-[13px] font-semibold text-foreground/70",children:"Occurrences"}),e.jsx(b.Input,{type:"number",min:1,value:s.state.value,onChange:l=>s.handleChange(parseInt(l.target.value)),className:"h-10 rounded-md border-border focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20 bg-background transition-all"})]})})]})}),e.jsx(a.Subscribe,{selector:r=>[r.values.repeatFrequency],children:([r])=>r==="Weekly"&&e.jsx(a.Field,{name:"repeatDays",children:t=>e.jsxs("div",{className:"space-y-3 animate-in fade-in duration-300",children:[e.jsx(i.Label,{className:"text-[13px] font-semibold text-foreground/70",children:"Repeat On"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:A.map(s=>e.jsx("button",{type:"button",onClick:()=>{const l=t.state.value||[];l.includes(s.value)?t.handleChange(l.filter(g=>g!==s.value)):t.handleChange([...l,s.value])},className:x.cn("w-9 h-9 rounded-full flex items-center justify-center text-sm font-bold transition-all border",(t.state.value||[]).includes(s.value)?"bg-primary text-white border-primary shadow-sm":"bg-background text-foreground/60 border-border/60 hover:border-primary/40 hover:text-primary"),children:s.label},s.value))})]})})}),e.jsx(a.Subscribe,{selector:r=>[r.values.repeatFrequency],children:([r])=>(r==="Monthly"||r==="Yearly")&&e.jsx(a.Field,{name:"repeatBy",children:t=>e.jsxs("div",{className:"space-y-4 animate-in fade-in duration-300",children:[e.jsx(i.Label,{className:"text-[13px] font-semibold text-foreground/70",children:"Repeat On"}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("label",{className:"flex items-center space-x-3 cursor-pointer group",children:[e.jsx("input",{type:"radio",name:"repeatBy",checked:t.state.value==="day",onChange:()=>t.handleChange("day"),className:"h-4 w-4 border-border text-primary focus:ring-primary"}),e.jsx("span",{className:"text-sm text-foreground/80",children:"Day of the month"})]}),e.jsxs("label",{className:"flex items-center space-x-3 cursor-pointer group",children:[e.jsx("input",{type:"radio",name:"repeatBy",checked:t.state.value==="ordinal",onChange:()=>t.handleChange("ordinal"),className:"h-4 w-4 border-border text-primary focus:ring-primary"}),e.jsx("span",{className:"text-sm text-foreground/80",children:"Ordinal position"})]})]})]})})}),e.jsx(a.Field,{name:"description",children:r=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(i.Label,{htmlFor:"description",className:"text-[13px] font-semibold text-foreground/70",children:"Description"}),e.jsx("textarea",{id:"description",placeholder:"Add description",className:"flex min-h-[100px] w-full rounded-md border-border bg-background px-4 py-3 text-sm placeholder:text-muted-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/20 focus-visible:border-primary disabled:cursor-not-allowed disabled:opacity-50 resize-none transition-all hover:border-border",value:r.state.value,onChange:t=>r.handleChange(t.target.value),disabled:o})]})}),e.jsx(a.Field,{name:"attachments",children:r=>e.jsxs("div",{className:"space-y-4 pt-4 pb-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(i.Label,{className:"text-[13px] font-semibold text-foreground/70 flex items-center gap-2",children:[e.jsx(m.Paperclip,{className:"w-4 h-4"})," Attachments"]}),e.jsx("input",{type:"file",id:"file-upload",multiple:!0,className:"hidden",onChange:t=>{t.target.files&&r.handleChange([...r.state.value||[],...Array.from(t.target.files)])}}),e.jsxs(c.Button,{type:"button",variant:"outline",size:"sm",className:"h-8 text-xs font-semibold gap-2 border-dashed border-border/50 hover:border-primary/40 hover:text-primary transition-all",onClick:()=>document.getElementById("file-upload")?.click(),children:[e.jsx(m.Paperclip,{className:"w-3 h-3"})," Add Files"]})]}),(r.state.value||[]).length>0&&e.jsx("div",{className:"grid grid-cols-1 gap-3",children:(r.state.value||[]).map((t,s)=>e.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-highlight border border-border group hover:border-border transition-all",children:[e.jsxs("div",{className:"flex items-center gap-3 overflow-hidden",children:[e.jsx("div",{className:"w-9 h-9 rounded-md bg-white border border-border flex items-center justify-center shrink-0 shadow-sm",children:e.jsx(m.Paperclip,{className:"w-4 h-4 text-muted-foreground"})}),e.jsxs("div",{className:"flex flex-col overflow-hidden",children:[e.jsx("span",{className:"text-[13px] font-medium text-foreground truncate",children:t.name}),e.jsxs("span",{className:"text-[11px] text-muted-foreground font-medium",children:[(t.size/1024).toFixed(1)," KB"]})]})]}),e.jsx(c.Button,{type:"button",variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground/50 hover:text-destructive hover:bg-destructive/10 opacity-0 group-hover:opacity-100 transition-all",onClick:()=>r.handleChange((r.state.value||[]).filter((l,g)=>g!==s)),children:e.jsx(E.Trash2,{className:"w-4 h-4"})})]},s))})]})})]}),y?y(n||{},d,()=>N({}),u):e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"24px 40px",backgroundColor:"var(--highlight)",gap:"12px",width:"100%",flexShrink:0},children:[!o&&v&&d==="edit"&&e.jsx(c.Button,{type:"button",variant:"ghost",className:"text-destructive hover:bg-destructive/10 hover:text-destructive h-10 px-5 font-bold mr-auto",onClick:()=>{v(n?.id),u()},children:"Delete"}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[!o&&e.jsx(a.Subscribe,{selector:r=>[r.canSubmit,r.isSubmitting],children:([r,t])=>e.jsx(c.Button,{type:"submit",variant:"default",className:"h-10 px-10 font-bold rounded-md shrink-0 flex items-center justify-center transition-all hover:opacity-90",style:{minWidth:"120px"},disabled:!r||t,onClick:s=>{s.preventDefault(),s.stopPropagation(),a.handleSubmit()},children:t?"Saving...":"Save"})}),e.jsx(c.Button,{type:"button",variant:"outline",className:"h-10 px-8 font-bold border border-border hover:bg-highlight text-foreground shrink-0 rounded-md transition-all",style:{minWidth:"100px"},onClick:u,children:"Cancel"})]})]})]})]});return D.createPortal(w,document.body)};exports.EzEventModal=z;
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import { k as b, l as f, D as v, m as N, n as S, P as y, c as w, C } from "./EzContextMenu-BSA_B6Pr.js";
|
|
3
|
-
import { S as D, v as G, a as L, s as R, h as k, u as z } from "./sortable.esm-CzMCDPet.js";
|
|
4
|
-
import { c as g } from "./useInitCoreServices-D1WaWlaI.js";
|
|
5
|
-
import { L as E } from "./layers-BA4i1fYX.js";
|
|
6
|
-
import { C as P } from "./EzErrorBoundary-D4NBadES.js";
|
|
7
|
-
import { G as j } from "./grip-vertical-CSyDKBul.js";
|
|
8
|
-
import { X as I } from "./tooltip-BCtrEe0z.js";
|
|
9
|
-
function K({
|
|
10
|
-
items: t,
|
|
11
|
-
onReorder: i,
|
|
12
|
-
renderItem: l,
|
|
13
|
-
getId: s,
|
|
14
|
-
strategy: a = G,
|
|
15
|
-
className: c
|
|
16
|
-
}) {
|
|
17
|
-
const r = b(
|
|
18
|
-
f(y, {
|
|
19
|
-
activationConstraint: {
|
|
20
|
-
distance: 8
|
|
21
|
-
// Avoid accidental drags on clicks
|
|
22
|
-
}
|
|
23
|
-
}),
|
|
24
|
-
f(S, {
|
|
25
|
-
coordinateGetter: R
|
|
26
|
-
})
|
|
27
|
-
);
|
|
28
|
-
function d(o) {
|
|
29
|
-
const { active: n, over: m } = o;
|
|
30
|
-
if (m && n.id !== m.id) {
|
|
31
|
-
const h = t.findIndex((u) => s(u) === n.id), x = t.findIndex((u) => s(u) === m.id);
|
|
32
|
-
i(L(t, h, x));
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return /* @__PURE__ */ e(
|
|
36
|
-
v,
|
|
37
|
-
{
|
|
38
|
-
sensors: r,
|
|
39
|
-
collisionDetection: N,
|
|
40
|
-
onDragEnd: d,
|
|
41
|
-
children: /* @__PURE__ */ e(
|
|
42
|
-
D,
|
|
43
|
-
{
|
|
44
|
-
items: t.map(s),
|
|
45
|
-
strategy: a,
|
|
46
|
-
children: /* @__PURE__ */ e("div", { className: c, children: t.map((o, n) => l(o, n)) })
|
|
47
|
-
}
|
|
48
|
-
)
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
const B = ({ id: t, label: i, onRemove: l, showSeparator: s }) => {
|
|
53
|
-
const {
|
|
54
|
-
attributes: a,
|
|
55
|
-
listeners: c,
|
|
56
|
-
setNodeRef: r,
|
|
57
|
-
transform: d,
|
|
58
|
-
transition: o,
|
|
59
|
-
isDragging: n
|
|
60
|
-
} = z({ id: t }), m = {
|
|
61
|
-
transform: C.Transform.toString(d),
|
|
62
|
-
transition: o,
|
|
63
|
-
zIndex: n ? 50 : void 0
|
|
64
|
-
};
|
|
65
|
-
return /* @__PURE__ */ p("div", { ref: r, style: m, className: "flex items-center", children: [
|
|
66
|
-
s && /* @__PURE__ */ e("div", { className: "flex items-center text-muted-foreground mr-2", children: /* @__PURE__ */ e(P, { className: "w-4 h-4" }) }),
|
|
67
|
-
/* @__PURE__ */ p(
|
|
68
|
-
"div",
|
|
69
|
-
{
|
|
70
|
-
className: g(
|
|
71
|
-
"flex items-center gap-1.5 px-2 py-1 bg-card border border-border rounded-md shadow-sm transition-all duration-200",
|
|
72
|
-
n ? "opacity-50 scale-105 border-primary shadow-lg" : "hover:border-primary/50"
|
|
73
|
-
),
|
|
74
|
-
children: [
|
|
75
|
-
/* @__PURE__ */ e("div", { ...a, ...c, className: "cursor-grab active:cursor-grabbing text-muted-foreground/50 hover:text-primary transition-colors", children: /* @__PURE__ */ e(j, { className: "w-3.5 h-3.5" }) }),
|
|
76
|
-
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children: i }),
|
|
77
|
-
/* @__PURE__ */ e(
|
|
78
|
-
"button",
|
|
79
|
-
{
|
|
80
|
-
onClick: (h) => {
|
|
81
|
-
h.stopPropagation(), l();
|
|
82
|
-
},
|
|
83
|
-
className: "p-0.5 hover:bg-muted rounded transition-colors",
|
|
84
|
-
children: /* @__PURE__ */ e(I, { className: "w-3 h-3 text-muted-foreground hover:text-destructive" })
|
|
85
|
-
}
|
|
86
|
-
)
|
|
87
|
-
]
|
|
88
|
-
}
|
|
89
|
-
)
|
|
90
|
-
] });
|
|
91
|
-
}, F = ({
|
|
92
|
-
grouping: t,
|
|
93
|
-
onGroupingChange: i,
|
|
94
|
-
columns: l
|
|
95
|
-
}) => {
|
|
96
|
-
const { setNodeRef: s, isOver: a } = w({
|
|
97
|
-
id: "grouping-panel"
|
|
98
|
-
}), c = (r) => l.find((o) => o.id === r)?.columnDef.header || r;
|
|
99
|
-
return /* @__PURE__ */ p(
|
|
100
|
-
"div",
|
|
101
|
-
{
|
|
102
|
-
ref: s,
|
|
103
|
-
className: g(
|
|
104
|
-
"flex items-center gap-2 p-2 min-h-[40px] border rounded-md transition-all duration-200",
|
|
105
|
-
"bg-muted/40 border-dashed border-border",
|
|
106
|
-
a && "bg-highlight border-selection ring-1 ring-selection"
|
|
107
|
-
),
|
|
108
|
-
children: [
|
|
109
|
-
/* @__PURE__ */ p("div", { className: "flex items-center gap-2 text-muted-foreground mr-2", children: [
|
|
110
|
-
/* @__PURE__ */ e(E, { className: "w-4 h-4" }),
|
|
111
|
-
/* @__PURE__ */ e("span", { className: "text-[10px] font-black uppercase tracking-wider", children: "Group By" })
|
|
112
|
-
] }),
|
|
113
|
-
/* @__PURE__ */ p("div", { className: "flex flex-wrap gap-2", children: [
|
|
114
|
-
t.length === 0 && !a && /* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground/70 italic", children: "Drag columns here to group" }),
|
|
115
|
-
/* @__PURE__ */ e(
|
|
116
|
-
K,
|
|
117
|
-
{
|
|
118
|
-
items: t,
|
|
119
|
-
onReorder: i,
|
|
120
|
-
getId: (r) => r,
|
|
121
|
-
strategy: k,
|
|
122
|
-
className: "flex flex-wrap gap-y-2",
|
|
123
|
-
renderItem: (r, d) => /* @__PURE__ */ e(
|
|
124
|
-
B,
|
|
125
|
-
{
|
|
126
|
-
id: r,
|
|
127
|
-
label: c(r),
|
|
128
|
-
onRemove: () => i(t.filter((o) => o !== r)),
|
|
129
|
-
showSeparator: d > 0
|
|
130
|
-
},
|
|
131
|
-
r
|
|
132
|
-
)
|
|
133
|
-
}
|
|
134
|
-
),
|
|
135
|
-
a && /* @__PURE__ */ e("div", { className: "px-2 py-1 border border-selection border-dashed bg-highlight/50 rounded-md text-sm text-selection animate-pulse", children: "Drop to Group" })
|
|
136
|
-
] })
|
|
137
|
-
]
|
|
138
|
-
}
|
|
139
|
-
);
|
|
140
|
-
};
|
|
141
|
-
export {
|
|
142
|
-
F as EzGroupingPanel
|
|
143
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("./EzContextMenu-B6HBUjWv.cjs"),l=require("./sortable.esm-CsRPuXyD.cjs"),p=require("./useInitCoreServices-CwXv2p4S.cjs"),f=require("./layers-xSPd-hz3.cjs"),v=require("./EzErrorBoundary-CEdz_hDo.cjs"),j=require("./grip-vertical-DZNBW1Dn.cjs"),y=require("./tooltip-B41iztKT.cjs");function S({items:t,onReorder:d,renderItem:u,getId:n,strategy:i=l.verticalListSortingStrategy,className:m}){const r=o.useSensors(o.useSensor(o.PointerSensor,{activationConstraint:{distance:8}}),o.useSensor(o.KeyboardSensor,{coordinateGetter:l.sortableKeyboardCoordinates}));function c(s){const{active:a,over:x}=s;if(x&&a.id!==x.id){const g=t.findIndex(h=>n(h)===a.id),b=t.findIndex(h=>n(h)===x.id);d(l.arrayMove(t,g,b))}}return e.jsx(o.DndContext,{sensors:r,collisionDetection:o.closestCenter,onDragEnd:c,children:e.jsx(l.SortableContext,{items:t.map(n),strategy:i,children:e.jsx("div",{className:m,children:t.map((s,a)=>u(s,a))})})})}const N=({id:t,label:d,onRemove:u,showSeparator:n})=>{const{attributes:i,listeners:m,setNodeRef:r,transform:c,transition:s,isDragging:a}=l.useSortable({id:t}),x={transform:o.CSS.Transform.toString(c),transition:s,zIndex:a?50:void 0};return e.jsxs("div",{ref:r,style:x,className:"flex items-center",children:[n&&e.jsx("div",{className:"flex items-center text-muted-foreground mr-2",children:e.jsx(v.ChevronRight,{className:"w-4 h-4"})}),e.jsxs("div",{className:p.cn("flex items-center gap-1.5 px-2 py-1 bg-card border border-border rounded-md shadow-sm transition-all duration-200",a?"opacity-50 scale-105 border-primary shadow-lg":"hover:border-primary/50"),children:[e.jsx("div",{...i,...m,className:"cursor-grab active:cursor-grabbing text-muted-foreground/50 hover:text-primary transition-colors",children:e.jsx(j.GripVertical,{className:"w-3.5 h-3.5"})}),e.jsx("span",{className:"text-sm font-medium text-foreground",children:d}),e.jsx("button",{onClick:g=>{g.stopPropagation(),u()},className:"p-0.5 hover:bg-muted rounded transition-colors",children:e.jsx(y.X,{className:"w-3 h-3 text-muted-foreground hover:text-destructive"})})]})]})},w=({grouping:t,onGroupingChange:d,columns:u})=>{const{setNodeRef:n,isOver:i}=o.useDroppable({id:"grouping-panel"}),m=r=>u.find(s=>s.id===r)?.columnDef.header||r;return e.jsxs("div",{ref:n,className:p.cn("flex items-center gap-2 p-2 min-h-[40px] border rounded-md transition-all duration-200","bg-muted/40 border-dashed border-border",i&&"bg-highlight border-selection ring-1 ring-selection"),children:[e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground mr-2",children:[e.jsx(f.Layers,{className:"w-4 h-4"}),e.jsx("span",{className:"text-[10px] font-black uppercase tracking-wider",children:"Group By"})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.length===0&&!i&&e.jsx("span",{className:"text-sm text-muted-foreground/70 italic",children:"Drag columns here to group"}),e.jsx(S,{items:t,onReorder:d,getId:r=>r,strategy:l.horizontalListSortingStrategy,className:"flex flex-wrap gap-y-2",renderItem:(r,c)=>e.jsx(N,{id:r,label:m(r),onRemove:()=>d(t.filter(s=>s!==r)),showSeparator:c>0},r)}),i&&e.jsx("div",{className:"px-2 py-1 border border-selection border-dashed bg-highlight/50 rounded-md text-sm text-selection animate-pulse",children:"Drop to Group"})]})]})};exports.EzGroupingPanel=w;
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useState as E, useRef as p, useEffect as x } from "react";
|
|
3
|
-
import { B as i, X as C } from "./tooltip-BCtrEe0z.js";
|
|
4
|
-
import { I as z } from "./input-jYQ5VKNR.js";
|
|
5
|
-
import { c as M } from "./useInitCoreServices-D1WaWlaI.js";
|
|
6
|
-
import { i as j, C as S } from "./isBefore-C3Y_wbk3.js";
|
|
7
|
-
import { f as m, C as A } from "./index-C6NfgycP.js";
|
|
8
|
-
import { C as B } from "./circle-alert-B2AMDd8N.js";
|
|
9
|
-
import { E as D } from "./ellipsis-CuqNthAj.js";
|
|
10
|
-
const P = ({
|
|
11
|
-
start: s,
|
|
12
|
-
end: o,
|
|
13
|
-
resourceId: l,
|
|
14
|
-
resources: g,
|
|
15
|
-
onSave: v,
|
|
16
|
-
onCancel: a,
|
|
17
|
-
onMoreOptions: w,
|
|
18
|
-
position: h
|
|
19
|
-
}) => {
|
|
20
|
-
const [n, b] = E(""), u = p(null), d = p(null);
|
|
21
|
-
x(() => {
|
|
22
|
-
u.current?.focus();
|
|
23
|
-
}, []), x(() => {
|
|
24
|
-
const t = (y) => {
|
|
25
|
-
d.current && !d.current.contains(y.target) && a();
|
|
26
|
-
};
|
|
27
|
-
return document.addEventListener("mousedown", t), () => document.removeEventListener("mousedown", t);
|
|
28
|
-
}, [a]);
|
|
29
|
-
const f = () => {
|
|
30
|
-
n.trim() && v({
|
|
31
|
-
title: n,
|
|
32
|
-
start: s,
|
|
33
|
-
end: o,
|
|
34
|
-
resourceId: l
|
|
35
|
-
});
|
|
36
|
-
}, N = (t) => {
|
|
37
|
-
t.key === "Enter" && f(), t.key === "Escape" && a();
|
|
38
|
-
}, c = g?.find((t) => t.id === l), k = j(s, /* @__PURE__ */ new Date());
|
|
39
|
-
return /* @__PURE__ */ r(
|
|
40
|
-
"div",
|
|
41
|
-
{
|
|
42
|
-
ref: d,
|
|
43
|
-
className: M(
|
|
44
|
-
"fixed z-[100] w-[320px] p-4 rounded-xl shadow-2xl animate-in fade-in zoom-in duration-200",
|
|
45
|
-
"bg-background/80 backdrop-blur-xl border border-white/20 dark:border-white/10",
|
|
46
|
-
"shadow-[0_8px_32px_rgba(0,0,0,0.12)]"
|
|
47
|
-
),
|
|
48
|
-
style: {
|
|
49
|
-
left: Math.min(h.x, window.innerWidth - 340),
|
|
50
|
-
top: Math.min(h.y, window.innerHeight - 200)
|
|
51
|
-
},
|
|
52
|
-
children: [
|
|
53
|
-
/* @__PURE__ */ r("div", { className: "flex items-center justify-between mb-4", children: [
|
|
54
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
55
|
-
/* @__PURE__ */ e("div", { className: "w-2 h-2 rounded-full bg-primary animate-pulse" }),
|
|
56
|
-
/* @__PURE__ */ e("span", { className: "text-xs font-bold uppercase tracking-wider text-muted-foreground", children: "Quick Add" })
|
|
57
|
-
] }),
|
|
58
|
-
/* @__PURE__ */ e(i, { variant: "ghost", size: "icon", className: "h-6 w-6 rounded-full", onClick: a, children: /* @__PURE__ */ e(C, { className: "h-3 w-3" }) })
|
|
59
|
-
] }),
|
|
60
|
-
/* @__PURE__ */ e(
|
|
61
|
-
z,
|
|
62
|
-
{
|
|
63
|
-
ref: u,
|
|
64
|
-
placeholder: "What's the plan?",
|
|
65
|
-
value: n,
|
|
66
|
-
onChange: (t) => b(t.target.value),
|
|
67
|
-
onKeyDown: N,
|
|
68
|
-
className: "mb-4 bg-transparent border-none text-lg font-bold p-0 focus-visible:ring-0 placeholder:text-muted-foreground/50 h-auto"
|
|
69
|
-
}
|
|
70
|
-
),
|
|
71
|
-
/* @__PURE__ */ r("div", { className: "space-y-2 mb-6", children: [
|
|
72
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
73
|
-
/* @__PURE__ */ e(S, { className: "h-3.5 w-3.5" }),
|
|
74
|
-
/* @__PURE__ */ e("span", { children: m(s, "EEE, MMM d") })
|
|
75
|
-
] }),
|
|
76
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
77
|
-
/* @__PURE__ */ e(A, { className: "h-3.5 w-3.5" }),
|
|
78
|
-
/* @__PURE__ */ r("span", { children: [
|
|
79
|
-
m(s, "h:mm a"),
|
|
80
|
-
" - ",
|
|
81
|
-
m(o, "h:mm a")
|
|
82
|
-
] })
|
|
83
|
-
] }),
|
|
84
|
-
c && /* @__PURE__ */ r("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
85
|
-
/* @__PURE__ */ e("div", { className: "w-3.5 h-3.5 rounded-full", style: { backgroundColor: c.color || "hsl(var(--primary))" } }),
|
|
86
|
-
/* @__PURE__ */ e("span", { children: c.name })
|
|
87
|
-
] }),
|
|
88
|
-
k && /* @__PURE__ */ r("div", { className: "flex items-center gap-2 text-xs text-warning-foreground font-medium", children: [
|
|
89
|
-
/* @__PURE__ */ e(B, { className: "h-3 w-3" }),
|
|
90
|
-
/* @__PURE__ */ e("span", { children: "This event is in the past" })
|
|
91
|
-
] })
|
|
92
|
-
] }),
|
|
93
|
-
/* @__PURE__ */ r("div", { className: "flex items-center justify-between pt-2 border-t border-border/50", children: [
|
|
94
|
-
/* @__PURE__ */ r(
|
|
95
|
-
i,
|
|
96
|
-
{
|
|
97
|
-
variant: "ghost",
|
|
98
|
-
size: "sm",
|
|
99
|
-
className: "h-8 gap-2 text-muted-foreground hover:text-foreground",
|
|
100
|
-
onClick: () => w({ title: n, start: s, end: o, resourceId: l }),
|
|
101
|
-
children: [
|
|
102
|
-
/* @__PURE__ */ e(D, { className: "h-4 w-4" }),
|
|
103
|
-
"More"
|
|
104
|
-
]
|
|
105
|
-
}
|
|
106
|
-
),
|
|
107
|
-
/* @__PURE__ */ r("div", { className: "flex gap-2", children: [
|
|
108
|
-
/* @__PURE__ */ e(i, { variant: "ghost", size: "sm", onClick: a, className: "h-8", children: "Cancel" }),
|
|
109
|
-
/* @__PURE__ */ e(i, { size: "sm", onClick: f, className: "h-8 px-4", disabled: !n.trim(), children: "Save" })
|
|
110
|
-
] })
|
|
111
|
-
] })
|
|
112
|
-
]
|
|
113
|
-
}
|
|
114
|
-
);
|
|
115
|
-
};
|
|
116
|
-
export {
|
|
117
|
-
P as EzSchedulerQuickAdd
|
|
118
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("react"),a=require("./tooltip-B41iztKT.cjs"),k=require("./input-BgM_la4k.cjs"),y=require("./useInitCoreServices-CwXv2p4S.cjs"),f=require("./isBefore-Cp1ttk6q.cjs"),l=require("./index-B3ipEEhH.cjs"),E=require("./circle-alert-77QqFR-z.cjs"),q=require("./ellipsis-CzlqJf-i.cjs"),z=({start:t,end:c,resourceId:o,resources:p,onSave:g,onCancel:r,onMoreOptions:j,position:m})=>{const[n,v]=i.useState(""),x=i.useRef(null),d=i.useRef(null);i.useEffect(()=>{x.current?.focus()},[]),i.useEffect(()=>{const s=N=>{d.current&&!d.current.contains(N.target)&&r()};return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[r]);const h=()=>{n.trim()&&g({title:n,start:t,end:c,resourceId:o})},b=s=>{s.key==="Enter"&&h(),s.key==="Escape"&&r()},u=p?.find(s=>s.id===o),w=f.isBefore(t,new Date);return e.jsxs("div",{ref:d,className:y.cn("fixed z-[100] w-[320px] p-4 rounded-xl shadow-2xl animate-in fade-in zoom-in duration-200","bg-background/80 backdrop-blur-xl border border-white/20 dark:border-white/10","shadow-[0_8px_32px_rgba(0,0,0,0.12)]"),style:{left:Math.min(m.x,window.innerWidth-340),top:Math.min(m.y,window.innerHeight-200)},children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-primary animate-pulse"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Quick Add"})]}),e.jsx(a.Button,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded-full",onClick:r,children:e.jsx(a.X,{className:"h-3 w-3"})})]}),e.jsx(k.Input,{ref:x,placeholder:"What's the plan?",value:n,onChange:s=>v(s.target.value),onKeyDown:b,className:"mb-4 bg-transparent border-none text-lg font-bold p-0 focus-visible:ring-0 placeholder:text-muted-foreground/50 h-auto"}),e.jsxs("div",{className:"space-y-2 mb-6",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(f.Calendar,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:l.format(t,"EEE, MMM d")})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(l.Clock,{className:"h-3.5 w-3.5"}),e.jsxs("span",{children:[l.format(t,"h:mm a")," - ",l.format(c,"h:mm a")]})]}),u&&e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx("div",{className:"w-3.5 h-3.5 rounded-full",style:{backgroundColor:u.color||"hsl(var(--primary))"}}),e.jsx("span",{children:u.name})]}),w&&e.jsxs("div",{className:"flex items-center gap-2 text-xs text-warning-foreground font-medium",children:[e.jsx(E.CircleAlert,{className:"h-3 w-3"}),e.jsx("span",{children:"This event is in the past"})]})]}),e.jsxs("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[e.jsxs(a.Button,{variant:"ghost",size:"sm",className:"h-8 gap-2 text-muted-foreground hover:text-foreground",onClick:()=>j({title:n,start:t,end:c,resourceId:o}),children:[e.jsx(q.Ellipsis,{className:"h-4 w-4"}),"More"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(a.Button,{variant:"ghost",size:"sm",onClick:r,className:"h-8",children:"Cancel"}),e.jsx(a.Button,{size:"sm",onClick:h,className:"h-8 px-4",disabled:!n.trim(),children:"Save"})]})]})]})};exports.EzSchedulerQuickAdd=z;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),x=require("react"),r=require("./tooltip-B41iztKT.cjs"),D=require("./input-BgM_la4k.cjs"),P=require("./useInitCoreServices-CwXv2p4S.cjs"),s=require("./select-GxA46anr.cjs"),l=require("./popover-BJq1CKmi.cjs"),M=require("./calendar-BMZ8ddOf.cjs"),_=require("./scroll-area-CwwZSSA4.cjs"),I=require("./bell-DOX2y38e.cjs"),g=require("./settings-DKPknrt8.cjs"),m=require("./EzErrorBoundary-CEdz_hDo.cjs"),L=require("./circle-alert-77QqFR-z.cjs"),z=require("./chevron-left-HWhRo6IH.cjs"),A=require("./isBefore-Cp1ttk6q.cjs"),k=require("./index-B3ipEEhH.cjs"),R=require("./download-0ZhO2XaW.cjs"),V=()=>{const n=P.useEzServiceRegistry(),[o,v]=x.useState([]),[j,p]=x.useState(!1);x.useEffect(()=>{let t;const i=()=>{const h=n.get("NotificationService");h&&!t&&(t=h.subscribe(w=>v(w)))};i();const u=n.subscribe(()=>{i()});return()=>{t&&t(),u()}},[]);const f=()=>{n.get("NotificationService")?.clearAll()},N=(t,i)=>{i.stopPropagation(),n.get("NotificationService")?.remove(t)},b=t=>{switch(t){case"success":return e.jsx(g.CircleCheckBig,{className:"h-4 w-4 text-green-600"});case"error":return e.jsx(L.CircleAlert,{className:"h-4 w-4 text-red-600"});case"warning":return e.jsx(m.TriangleAlert,{className:"h-4 w-4 text-amber-600"});default:return e.jsx(g.Info,{className:"h-4 w-4 text-blue-600"})}};return e.jsxs(l.Popover,{open:j,onOpenChange:p,children:[e.jsx(l.PopoverTrigger,{asChild:!0,children:e.jsxs(r.Button,{variant:"ghost",size:"icon",className:"h-9 w-9 text-muted-foreground hover:text-foreground relative",children:[e.jsx(I.Bell,{className:"w-5 h-5"}),o.length>0&&e.jsx("span",{className:"absolute -top-1 -right-1 flex h-4 w-4 items-center justify-center rounded-full bg-red-500 text-[10px] font-bold text-white ring-2 ring-background animate-in zoom-in duration-300",children:o.length>9?"9+":o.length})]})}),e.jsxs(l.PopoverContent,{className:"w-80 p-0 mr-4",align:"end",children:[e.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[e.jsx("h4",{className:"font-semibold text-sm",children:"Notifications"}),o.length>0&&e.jsxs(r.Button,{variant:"ghost",size:"sm",className:"h-auto px-2 py-1 text-xs text-muted-foreground hover:text-destructive",onClick:f,children:[e.jsx(M.Trash2,{className:"w-3 h-3 mr-1"}),"Clear all"]})]}),e.jsx(_.ScrollArea,{className:"h-[300px]",children:o.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center h-[200px] text-muted-foreground",children:[e.jsx(I.Bell,{className:"w-8 h-8 mb-2 opacity-20"}),e.jsx("p",{className:"text-xs",children:"No notifications"})]}):e.jsx("div",{className:"flex flex-col divide-y",children:o.map(t=>e.jsx("div",{className:"p-4 hover:bg-muted/50 transition-colors relative group",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"shrink-0 mt-0.5",children:b(t.type)}),e.jsxs("div",{className:"space-y-1 flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs leading-relaxed text-foreground/90 break-words",children:t.message}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Just now"})]}),e.jsx("button",{onClick:i=>N(t.id,i),className:"opacity-0 group-hover:opacity-100 transition-opacity absolute top-2 right-2 p-1 hover:bg-background rounded-md text-muted-foreground hover:text-foreground",children:e.jsx(r.X,{className:"w-3 h-3"})})]})},t.id))})})]})]})},$=n=>n.replace(/([A-Z])/g," $1").trim(),G=(n,o)=>k.format(n,"MMMM yyyy"),B=x.memo(({currentDate:n,next:o,prev:v,today:j,slotDuration:p,setSlotDuration:f,setCurrentDate:N,onPrev:b,onNext:t,onToday:i,currentView:u,onViewChange:h,views:w=[],onExportExcel:T,onExportCSV:q,onExportICS:E,dir:O})=>{const S=O==="rtl",C=(c,a)=>{if(typeof c=="string")switch(c){case"Previous":return e.jsx(r.Button,{variant:"ghost",size:"icon",onClick:b,children:e.jsx(z.ChevronLeft,{className:"h-4 w-4"})},a);case"Next":return e.jsx(r.Button,{variant:"ghost",size:"icon",onClick:t,children:e.jsx(m.ChevronRight,{className:"h-4 w-4"})},a);case"Today":return e.jsx(r.Button,{variant:"outline",onClick:i,children:"Today"},a);case"DateRange":return e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"text-lg font-semibold min-w-[200px] text-center",children:G(n)})},a);case"Search":return e.jsxs("div",{className:"relative w-48 hidden md:block",children:[e.jsx(s.Search,{className:P.cn("absolute top-2.5 h-4 w-4 text-muted-foreground",S?"right-2":"left-2")}),e.jsx(D.Input,{placeholder:"Search...",className:"ps-8 h-9"})]},a);case"Timezone":return e.jsxs(r.Button,{variant:"ghost",size:"sm",className:"hidden lg:flex gap-1 text-xs text-muted-foreground",children:[e.jsx(g.Globe,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"UTC"})]},a);case"ActiveView":return e.jsxs(s.Select,{value:u,onValueChange:d=>h(d),children:[e.jsx(s.SelectTrigger,{className:"w-[140px]",children:e.jsx(s.SelectValue,{placeholder:"Select view"})}),e.jsx(s.SelectContent,{children:w.map(d=>{const y=typeof d=="string"?d:d.option;return e.jsx(s.SelectItem,{value:y,children:$(y)},y)})})]});default:return null}return e.jsx("div",{className:c.cssClass,children:c.text},a)};return e.jsxs("div",{"data-testid":"scheduler-toolbar",className:"flex items-center justify-between p-4 border-b border-border shrink-0 bg-background h-16",children:[e.jsxs("div",{className:"flex items-center gap-6",children:[e.jsxs("div",{className:"flex items-center gap-1.5 ",children:[e.jsx(r.Button,{variant:"ghost",size:"icon",onClick:v,className:"h-8 w-8 text-muted-foreground hover:text-foreground hover:bg-muted",children:S?e.jsx(m.ChevronRight,{className:"w-5 h-5"}):e.jsx(z.ChevronLeft,{className:"w-5 h-5"})}),e.jsx(r.Button,{variant:"ghost",size:"icon",onClick:o,className:"h-8 w-8 text-muted-foreground hover:text-foreground hover:bg-muted",children:S?e.jsx(z.ChevronLeft,{className:"w-5 h-5"}):e.jsx(m.ChevronRight,{className:"w-5 h-5"})}),e.jsxs(l.Popover,{children:[e.jsx(l.PopoverTrigger,{asChild:!0,children:e.jsx(r.Button,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-foreground hover:bg-muted",children:e.jsx(A.Calendar,{className:"h-4 w-4"})})}),e.jsx(l.PopoverContent,{className:"w-auto p-0",align:"start",children:e.jsx(M.Calendar,{selected:n,onSelect:c=>c&&N(c)})})]})]}),e.jsx("div",{className:"text-xl font-bold tracking-tight text-foreground cursor-pointer hover:text-primary transition-colors ms-4",onClick:()=>{},children:k.format(n,"EEEE, MMM d yyyy")})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[C("Search",0)," ",C("Timezone",1)," ",C("ActiveView",2),e.jsx(r.Button,{variant:"outline",onClick:j,className:"h-9 px-4 text-xs font-bold uppercase tracking-wider border-border hover:bg-muted transition-colors rounded-md",children:"TODAY"}),e.jsxs("div",{className:"flex items-center gap-2 bg-muted/30 px-2 py-1 rounded-lg border border-border/50",children:[e.jsx(k.Clock,{className:"w-3.5 h-3.5 text-muted-foreground"}),e.jsxs(s.Select,{value:String(p),onValueChange:c=>f(Number(c)),children:[e.jsx(s.SelectTrigger,{className:"h-7 w-[90px] text-[10px] font-bold uppercase tracking-tight bg-transparent border-none shadow-none focus:ring-0",children:e.jsx(s.SelectValue,{placeholder:"Interval"})}),e.jsxs(s.SelectContent,{children:[e.jsx(s.SelectItem,{value:"5",children:"5 minutes"}),e.jsx(s.SelectItem,{value:"10",children:"10 minutes"}),e.jsx(s.SelectItem,{value:"15",children:"15 minutes"}),e.jsx(s.SelectItem,{value:"30",children:"30 minutes"}),e.jsx(s.SelectItem,{value:"45",children:"45 minutes"}),e.jsx(s.SelectItem,{value:"60",children:"1 hour"})]})]})]}),e.jsx(V,{}),e.jsxs("div",{className:"flex items-center gap-1 border-s border-border ps-2",children:[T&&e.jsx(r.Button,{variant:"ghost",size:"icon",onClick:T,title:"Export to Excel",children:e.jsx(R.Download,{className:"w-4 h-4"})}),q&&e.jsx(r.Button,{variant:"ghost",size:"icon",onClick:q,title:"Export to CSV",children:e.jsx(R.Download,{className:"w-4 h-4 text-primary"})}),E&&e.jsx(r.Button,{variant:"ghost",size:"icon",onClick:E,title:"Export to ICS",children:e.jsx(A.Calendar,{className:"w-4 h-4"})})]}),e.jsx(r.Button,{variant:"ghost",size:"icon",className:"h-9 w-9 text-muted-foreground hover:text-foreground rounded-full",children:e.jsx(g.Settings,{className:"w-5 h-5"})})]})]})});B.displayName="EzSchedulerToolbar";const J=Object.freeze(Object.defineProperty({__proto__:null,EzSchedulerToolbar:B},Symbol.toStringTag,{value:"Module"}));exports.EzNotificationDropdown=V;exports.EzSchedulerToolbar=B;exports.EzSchedulerToolbar$1=J;
|
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useState as E, useEffect as J, memo as L } from "react";
|
|
3
|
-
import { B as s, X as U } from "./tooltip-BCtrEe0z.js";
|
|
4
|
-
import { I as X } from "./input-jYQ5VKNR.js";
|
|
5
|
-
import { u as Y, c as Z } from "./useInitCoreServices-D1WaWlaI.js";
|
|
6
|
-
import { S as A, a as j, b as M, c as I, d as l, e as q } from "./select-mDCun_IR.js";
|
|
7
|
-
import { P as R, a as B, b as _ } from "./popover-Cmlb7w3R.js";
|
|
8
|
-
import { T as F, C as H } from "./calendar-Dy3rVMW2.js";
|
|
9
|
-
import { S as K } from "./scroll-area-9fwpVNxT.js";
|
|
10
|
-
import { B as P } from "./bell-DAz8P0BR.js";
|
|
11
|
-
import { I as Q, C as W, S as ee, G as re } from "./settings-CvyjK75A.js";
|
|
12
|
-
import { T as te, C as y } from "./EzErrorBoundary-D4NBadES.js";
|
|
13
|
-
import { C as se } from "./circle-alert-B2AMDd8N.js";
|
|
14
|
-
import { C as S } from "./chevron-left-BFr8XZyF.js";
|
|
15
|
-
import { C as V } from "./isBefore-C3Y_wbk3.js";
|
|
16
|
-
import { f as D, C as ae } from "./index-C6NfgycP.js";
|
|
17
|
-
import { D as O } from "./download-panVHmk6.js";
|
|
18
|
-
const oe = () => {
|
|
19
|
-
const a = Y(), [o, u] = E([]), [g, p] = E(!1);
|
|
20
|
-
J(() => {
|
|
21
|
-
let t;
|
|
22
|
-
const n = () => {
|
|
23
|
-
const m = a.get("NotificationService");
|
|
24
|
-
m && !t && (t = m.subscribe((N) => u(N)));
|
|
25
|
-
};
|
|
26
|
-
n();
|
|
27
|
-
const h = a.subscribe(() => {
|
|
28
|
-
n();
|
|
29
|
-
});
|
|
30
|
-
return () => {
|
|
31
|
-
t && t(), h();
|
|
32
|
-
};
|
|
33
|
-
}, []);
|
|
34
|
-
const f = () => {
|
|
35
|
-
a.get("NotificationService")?.clearAll();
|
|
36
|
-
}, v = (t, n) => {
|
|
37
|
-
n.stopPropagation(), a.get("NotificationService")?.remove(t);
|
|
38
|
-
}, x = (t) => {
|
|
39
|
-
switch (t) {
|
|
40
|
-
case "success":
|
|
41
|
-
return /* @__PURE__ */ e(W, { className: "h-4 w-4 text-green-600" });
|
|
42
|
-
case "error":
|
|
43
|
-
return /* @__PURE__ */ e(se, { className: "h-4 w-4 text-red-600" });
|
|
44
|
-
case "warning":
|
|
45
|
-
return /* @__PURE__ */ e(te, { className: "h-4 w-4 text-amber-600" });
|
|
46
|
-
default:
|
|
47
|
-
return /* @__PURE__ */ e(Q, { className: "h-4 w-4 text-blue-600" });
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
return /* @__PURE__ */ r(R, { open: g, onOpenChange: p, children: [
|
|
51
|
-
/* @__PURE__ */ e(B, { asChild: !0, children: /* @__PURE__ */ r(s, { variant: "ghost", size: "icon", className: "h-9 w-9 text-muted-foreground hover:text-foreground relative", children: [
|
|
52
|
-
/* @__PURE__ */ e(P, { className: "w-5 h-5" }),
|
|
53
|
-
o.length > 0 && /* @__PURE__ */ e("span", { className: "absolute -top-1 -right-1 flex h-4 w-4 items-center justify-center rounded-full bg-red-500 text-[10px] font-bold text-white ring-2 ring-background animate-in zoom-in duration-300", children: o.length > 9 ? "9+" : o.length })
|
|
54
|
-
] }) }),
|
|
55
|
-
/* @__PURE__ */ r(_, { className: "w-80 p-0 mr-4", align: "end", children: [
|
|
56
|
-
/* @__PURE__ */ r("div", { className: "flex items-center justify-between p-4 border-b", children: [
|
|
57
|
-
/* @__PURE__ */ e("h4", { className: "font-semibold text-sm", children: "Notifications" }),
|
|
58
|
-
o.length > 0 && /* @__PURE__ */ r(
|
|
59
|
-
s,
|
|
60
|
-
{
|
|
61
|
-
variant: "ghost",
|
|
62
|
-
size: "sm",
|
|
63
|
-
className: "h-auto px-2 py-1 text-xs text-muted-foreground hover:text-destructive",
|
|
64
|
-
onClick: f,
|
|
65
|
-
children: [
|
|
66
|
-
/* @__PURE__ */ e(F, { className: "w-3 h-3 mr-1" }),
|
|
67
|
-
"Clear all"
|
|
68
|
-
]
|
|
69
|
-
}
|
|
70
|
-
)
|
|
71
|
-
] }),
|
|
72
|
-
/* @__PURE__ */ e(K, { className: "h-[300px]", children: o.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center h-[200px] text-muted-foreground", children: [
|
|
73
|
-
/* @__PURE__ */ e(P, { className: "w-8 h-8 mb-2 opacity-20" }),
|
|
74
|
-
/* @__PURE__ */ e("p", { className: "text-xs", children: "No notifications" })
|
|
75
|
-
] }) : /* @__PURE__ */ e("div", { className: "flex flex-col divide-y", children: o.map((t) => /* @__PURE__ */ e("div", { className: "p-4 hover:bg-muted/50 transition-colors relative group", children: /* @__PURE__ */ r("div", { className: "flex gap-3", children: [
|
|
76
|
-
/* @__PURE__ */ e("div", { className: "shrink-0 mt-0.5", children: x(t.type) }),
|
|
77
|
-
/* @__PURE__ */ r("div", { className: "space-y-1 flex-1 min-w-0", children: [
|
|
78
|
-
/* @__PURE__ */ e("p", { className: "text-xs leading-relaxed text-foreground/90 break-words", children: t.message }),
|
|
79
|
-
/* @__PURE__ */ e("p", { className: "text-[10px] text-muted-foreground", children: "Just now" })
|
|
80
|
-
] }),
|
|
81
|
-
/* @__PURE__ */ e(
|
|
82
|
-
"button",
|
|
83
|
-
{
|
|
84
|
-
onClick: (n) => v(t.id, n),
|
|
85
|
-
className: "opacity-0 group-hover:opacity-100 transition-opacity absolute top-2 right-2 p-1 hover:bg-background rounded-md text-muted-foreground hover:text-foreground",
|
|
86
|
-
children: /* @__PURE__ */ e(U, { className: "w-3 h-3" })
|
|
87
|
-
}
|
|
88
|
-
)
|
|
89
|
-
] }) }, t.id)) }) })
|
|
90
|
-
] })
|
|
91
|
-
] });
|
|
92
|
-
}, ie = (a) => a.replace(/([A-Z])/g, " $1").trim(), ne = (a, o) => D(a, "MMMM yyyy"), $ = L(({
|
|
93
|
-
currentDate: a,
|
|
94
|
-
next: o,
|
|
95
|
-
prev: u,
|
|
96
|
-
today: g,
|
|
97
|
-
slotDuration: p,
|
|
98
|
-
setSlotDuration: f,
|
|
99
|
-
setCurrentDate: v,
|
|
100
|
-
// view, // Unused in this component logic currently, kept in interface for compatibility
|
|
101
|
-
// Destructure new props
|
|
102
|
-
onPrev: x,
|
|
103
|
-
onNext: t,
|
|
104
|
-
onToday: n,
|
|
105
|
-
currentView: h,
|
|
106
|
-
onViewChange: m,
|
|
107
|
-
views: N = [],
|
|
108
|
-
// Default to empty array
|
|
109
|
-
onExportExcel: k,
|
|
110
|
-
onExportCSV: z,
|
|
111
|
-
onExportICS: T,
|
|
112
|
-
dir: G
|
|
113
|
-
}) => {
|
|
114
|
-
const b = G === "rtl", w = (i, c) => {
|
|
115
|
-
if (typeof i == "string")
|
|
116
|
-
switch (i) {
|
|
117
|
-
case "Previous":
|
|
118
|
-
return /* @__PURE__ */ e(s, { variant: "ghost", size: "icon", onClick: x, children: /* @__PURE__ */ e(S, { className: "h-4 w-4" }) }, c);
|
|
119
|
-
case "Next":
|
|
120
|
-
return /* @__PURE__ */ e(s, { variant: "ghost", size: "icon", onClick: t, children: /* @__PURE__ */ e(y, { className: "h-4 w-4" }) }, c);
|
|
121
|
-
case "Today":
|
|
122
|
-
return /* @__PURE__ */ e(s, { variant: "outline", onClick: n, children: "Today" }, c);
|
|
123
|
-
case "DateRange":
|
|
124
|
-
return /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e("span", { className: "text-lg font-semibold min-w-[200px] text-center", children: ne(a) }) }, c);
|
|
125
|
-
case "Search":
|
|
126
|
-
return /* @__PURE__ */ r("div", { className: "relative w-48 hidden md:block", children: [
|
|
127
|
-
/* @__PURE__ */ e(q, { className: Z("absolute top-2.5 h-4 w-4 text-muted-foreground", b ? "right-2" : "left-2") }),
|
|
128
|
-
/* @__PURE__ */ e(X, { placeholder: "Search...", className: "ps-8 h-9" })
|
|
129
|
-
] }, c);
|
|
130
|
-
case "Timezone":
|
|
131
|
-
return /* @__PURE__ */ r(s, { variant: "ghost", size: "sm", className: "hidden lg:flex gap-1 text-xs text-muted-foreground", children: [
|
|
132
|
-
/* @__PURE__ */ e(re, { className: "h-3.5 w-3.5" }),
|
|
133
|
-
/* @__PURE__ */ e("span", { children: "UTC" })
|
|
134
|
-
] }, c);
|
|
135
|
-
case "ActiveView":
|
|
136
|
-
return /* @__PURE__ */ r(A, { value: h, onValueChange: (d) => m(d), children: [
|
|
137
|
-
/* @__PURE__ */ e(j, { className: "w-[140px]", children: /* @__PURE__ */ e(M, { placeholder: "Select view" }) }),
|
|
138
|
-
/* @__PURE__ */ e(I, { children: N.map((d) => {
|
|
139
|
-
const C = typeof d == "string" ? d : d.option;
|
|
140
|
-
return /* @__PURE__ */ e(l, { value: C, children: ie(C) }, C);
|
|
141
|
-
}) })
|
|
142
|
-
] });
|
|
143
|
-
default:
|
|
144
|
-
return null;
|
|
145
|
-
}
|
|
146
|
-
return /* @__PURE__ */ e("div", { className: i.cssClass, children: i.text }, c);
|
|
147
|
-
};
|
|
148
|
-
return /* @__PURE__ */ r("div", { "data-testid": "scheduler-toolbar", className: "flex items-center justify-between p-4 border-b border-border shrink-0 bg-background h-16", children: [
|
|
149
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-6", children: [
|
|
150
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 ", children: [
|
|
151
|
-
/* @__PURE__ */ e(
|
|
152
|
-
s,
|
|
153
|
-
{
|
|
154
|
-
variant: "ghost",
|
|
155
|
-
size: "icon",
|
|
156
|
-
onClick: u,
|
|
157
|
-
className: "h-8 w-8 text-muted-foreground hover:text-foreground hover:bg-muted",
|
|
158
|
-
children: b ? /* @__PURE__ */ e(y, { className: "w-5 h-5" }) : /* @__PURE__ */ e(S, { className: "w-5 h-5" })
|
|
159
|
-
}
|
|
160
|
-
),
|
|
161
|
-
/* @__PURE__ */ e(
|
|
162
|
-
s,
|
|
163
|
-
{
|
|
164
|
-
variant: "ghost",
|
|
165
|
-
size: "icon",
|
|
166
|
-
onClick: o,
|
|
167
|
-
className: "h-8 w-8 text-muted-foreground hover:text-foreground hover:bg-muted",
|
|
168
|
-
children: b ? /* @__PURE__ */ e(S, { className: "w-5 h-5" }) : /* @__PURE__ */ e(y, { className: "w-5 h-5" })
|
|
169
|
-
}
|
|
170
|
-
),
|
|
171
|
-
/* @__PURE__ */ r(R, { children: [
|
|
172
|
-
/* @__PURE__ */ e(B, { asChild: !0, children: /* @__PURE__ */ e(s, { variant: "ghost", size: "icon", className: "h-8 w-8 text-muted-foreground hover:text-foreground hover:bg-muted", children: /* @__PURE__ */ e(V, { className: "h-4 w-4" }) }) }),
|
|
173
|
-
/* @__PURE__ */ e(_, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ e(
|
|
174
|
-
H,
|
|
175
|
-
{
|
|
176
|
-
selected: a,
|
|
177
|
-
onSelect: (i) => i && v(i)
|
|
178
|
-
}
|
|
179
|
-
) })
|
|
180
|
-
] })
|
|
181
|
-
] }),
|
|
182
|
-
/* @__PURE__ */ e(
|
|
183
|
-
"div",
|
|
184
|
-
{
|
|
185
|
-
className: "text-xl font-bold tracking-tight text-foreground cursor-pointer hover:text-primary transition-colors ms-4",
|
|
186
|
-
onClick: () => {
|
|
187
|
-
},
|
|
188
|
-
children: D(a, "EEEE, MMM d yyyy")
|
|
189
|
-
}
|
|
190
|
-
)
|
|
191
|
-
] }),
|
|
192
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-4", children: [
|
|
193
|
-
w("Search", 0),
|
|
194
|
-
" ",
|
|
195
|
-
w("Timezone", 1),
|
|
196
|
-
" ",
|
|
197
|
-
w("ActiveView", 2),
|
|
198
|
-
/* @__PURE__ */ e(
|
|
199
|
-
s,
|
|
200
|
-
{
|
|
201
|
-
variant: "outline",
|
|
202
|
-
onClick: g,
|
|
203
|
-
className: "h-9 px-4 text-xs font-bold uppercase tracking-wider border-border hover:bg-muted transition-colors rounded-md",
|
|
204
|
-
children: "TODAY"
|
|
205
|
-
}
|
|
206
|
-
),
|
|
207
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-2 bg-muted/30 px-2 py-1 rounded-lg border border-border/50", children: [
|
|
208
|
-
/* @__PURE__ */ e(ae, { className: "w-3.5 h-3.5 text-muted-foreground" }),
|
|
209
|
-
/* @__PURE__ */ r(A, { value: String(p), onValueChange: (i) => f(Number(i)), children: [
|
|
210
|
-
/* @__PURE__ */ e(j, { className: "h-7 w-[90px] text-[10px] font-bold uppercase tracking-tight bg-transparent border-none shadow-none focus:ring-0", children: /* @__PURE__ */ e(M, { placeholder: "Interval" }) }),
|
|
211
|
-
/* @__PURE__ */ r(I, { children: [
|
|
212
|
-
/* @__PURE__ */ e(l, { value: "5", children: "5 minutes" }),
|
|
213
|
-
/* @__PURE__ */ e(l, { value: "10", children: "10 minutes" }),
|
|
214
|
-
/* @__PURE__ */ e(l, { value: "15", children: "15 minutes" }),
|
|
215
|
-
/* @__PURE__ */ e(l, { value: "30", children: "30 minutes" }),
|
|
216
|
-
/* @__PURE__ */ e(l, { value: "45", children: "45 minutes" }),
|
|
217
|
-
/* @__PURE__ */ e(l, { value: "60", children: "1 hour" })
|
|
218
|
-
] })
|
|
219
|
-
] })
|
|
220
|
-
] }),
|
|
221
|
-
/* @__PURE__ */ e(oe, {}),
|
|
222
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-1 border-s border-border ps-2", children: [
|
|
223
|
-
k && /* @__PURE__ */ e(s, { variant: "ghost", size: "icon", onClick: k, title: "Export to Excel", children: /* @__PURE__ */ e(O, { className: "w-4 h-4" }) }),
|
|
224
|
-
z && /* @__PURE__ */ e(s, { variant: "ghost", size: "icon", onClick: z, title: "Export to CSV", children: /* @__PURE__ */ e(O, { className: "w-4 h-4 text-primary" }) }),
|
|
225
|
-
T && /* @__PURE__ */ e(s, { variant: "ghost", size: "icon", onClick: T, title: "Export to ICS", children: /* @__PURE__ */ e(V, { className: "w-4 h-4" }) })
|
|
226
|
-
] }),
|
|
227
|
-
/* @__PURE__ */ e(s, { variant: "ghost", size: "icon", className: "h-9 w-9 text-muted-foreground hover:text-foreground rounded-full", children: /* @__PURE__ */ e(ee, { className: "w-5 h-5" }) })
|
|
228
|
-
] })
|
|
229
|
-
] });
|
|
230
|
-
});
|
|
231
|
-
$.displayName = "EzSchedulerToolbar";
|
|
232
|
-
const ke = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
233
|
-
__proto__: null,
|
|
234
|
-
EzSchedulerToolbar: $
|
|
235
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
236
|
-
export {
|
|
237
|
-
oe as E,
|
|
238
|
-
$ as a,
|
|
239
|
-
ke as b
|
|
240
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const ne=require("react/jsx-runtime"),D=require("react"),re=require("./useInitCoreServices-CwXv2p4S.cjs"),me=require("./useServiceState-BjpCjUn2.cjs"),ye=require("./useImperativeAPI-DbZ3owSV.cjs");function Pe(e){return[-e[0],-e[1]]}function U(e,t){return[e[0]+t[0],e[1]+t[1]]}function k(e,t){return[e[0]-t[0],e[1]-t[1]]}function j(e,t){return[e[0]*t,e[1]*t]}function xe(e,t){return[e[0]/t,e[1]/t]}function A(e){return[e[1],-e[0]]}function ae(e,t){return e[0]*t[0]+e[1]*t[1]}function ue(e,t){return e[0]===t[0]&&e[1]===t[1]}function Ee(e){return Math.hypot(e[0],e[1])}function we(e){return e[0]*e[0]+e[1]*e[1]}function le(e,t){return we(k(e,t))}function ce(e){return xe(e,Ee(e))}function fe(e,t){return Math.hypot(e[1]-t[1],e[0]-t[0])}function ee(e,t,o){const v=Math.sin(o),S=Math.cos(o),g=e[0]-t[0],s=e[1]-t[1],h=g*S-s*v,m=g*v+s*S;return[h+t[0],m+t[1]]}function se(e,t,o){return U(e,j(k(t,e),o))}function he(e,t,o){return U(e,j(t,o))}function pe(e,t,o,v=S=>S){return e*v(.5-t*(.5-o))}function Ce(e,t={}){const{streamline:o=.5,size:v=16,last:S=!1}=t;if(e.length===0)return[];const g=.15+(1-o)*.85;let s=Array.isArray(e[0])?e:e.map(({x:u,y:x,pressure:R=.5})=>[u,x,R]);if(s.length===2){const u=s[1];s=s.slice(0,-1);for(let x=1;x<5;x++)s.push(se(s[0],u,x/4))}s.length===1&&(s=[...s,[...U(s[0],[1,1]),...s[0].slice(2)]]);const h=[{point:[s[0][0],s[0][1]],pressure:s[0][2]>=0?s[0][2]:.25,vector:[1,1],distance:0,runningLength:0}];let m=!1,q=0,E=h[0];const T=s.length-1;for(let u=1;u<s.length;u++){const x=S&&u===T?s[u].slice(0,2):se(E.point,s[u],g);if(ue(E.point,x))continue;const R=fe(x,E.point);if(q+=R,u<T&&!m){if(q<v)continue;m=!0;let p=h[h.length-1],w=p.runningLength;for(let F=1;F<=u;F++){const C=s[F],I=se(p.point,C,g);if(ue(p.point,I))continue;const J=fe(I,p.point);w+=J,p={point:I,pressure:C[2]>=0?C[2]:.5,vector:ce(k(p.point,I)),distance:J,runningLength:w},h.push(p)}E=p,q=w;continue}E={point:x,pressure:s[u][2]>=0?s[u][2]:.5,vector:ce(k(E.point,x)),distance:R,runningLength:q},h.push(E)}return h[0].vector=h[1]?.vector||[0,0],h}const{min:Q,PI:Ie}=Math,ge=.275,te=Ie+1e-4;function Me(e,t={}){const{size:o=16,smoothing:v=.5,thinning:S=.5,simulatePressure:g=!0,easing:s=n=>n,start:h={},end:m={},last:q=!1}=t,{cap:E=!0,easing:T=n=>n*(2-n)}=h,{cap:u=!0,easing:x=n=>--n*n*n+1}=m;if(e.length===0||o<=0)return[];const R=e[e.length-1].runningLength,p=h.taper===!1?0:h.taper===!0?Math.max(o,R):h.taper,w=m.taper===!1?0:m.taper===!0?Math.max(o,R):m.taper,F=Math.pow(o*v,2),C=[],I=[];let J=e.slice(0,10).reduce((n,f)=>{let i=f.pressure;if(g){const c=Q(1,f.distance/o),K=Q(1,1-c);i=Q(1,n+(K-n)*(c*ge))}return(n+i)/2},e[0].pressure),d=pe(o,S,e[e.length-1].pressure,s),Z,b=e[0].vector,O=e[0].point,z=O,y=O,P=z,$=!1;for(let n=0;n<e.length;n++){let{pressure:f}=e[n];const{point:i,vector:c,distance:K,runningLength:V}=e[n];if(n<e.length-1&&R-V<3)continue;if(S){if(g){const H=Q(1,K/o),G=Q(1,1-H);f=Q(1,J+(G-J)*(H*ge))}d=pe(o,S,f,s)}else d=o/2;Z===void 0&&(Z=d);const oe=V<p?T(V/p):1,ie=R-V<w?x((R-V)/w):1;d=Math.max(.01,d*Math.min(oe,ie));const r=(n<e.length-1?e[n+1]:e[n]).vector,a=n<e.length-1?ae(c,r):1,Y=ae(c,b)<0&&!$,W=a!==null&&a<0;if(Y||W){const H=j(A(b),d);for(let G=1/13,N=0;N<=1;N+=G)y=ee(k(i,H),i,te*N),C.push(y),P=ee(U(i,H),i,te*-N),I.push(P);O=y,z=P,W&&($=!0);continue}if($=!1,n===e.length-1){const H=j(A(c),d);C.push(k(i,H)),I.push(U(i,H));continue}const B=j(A(se(r,c,a)),d);y=k(i,B),(n<=1||le(O,y)>F)&&(C.push(y),O=y),P=U(i,B),(n<=1||le(z,P)>F)&&(I.push(P),z=P),J=f,b=c}const l=e[0].point.slice(0,2),M=e.length>1?e[e.length-1].point.slice(0,2):U(e[0].point,[1,1]),X=[],_=[];if(e.length===1){if(!(p||w)||q){const n=he(l,ce(A(k(l,M))),-(Z||d)),f=[];for(let i=1/13,c=i;c<=1;c+=i)f.push(ee(n,l,te*2*c));return f}}else{if(!(p||w&&e.length===1))if(E)for(let f=1/13,i=f;i<=1;i+=f){const c=ee(I[0],l,te*i);X.push(c)}else{const f=k(C[0],I[0]),i=j(f,.5),c=j(f,.51);X.push(k(l,i),k(l,c),U(l,c),U(l,i))}const n=A(Pe(e[e.length-1].vector));if(w||p&&e.length===1)_.push(M);else if(u){const f=he(M,n,d);for(let i=1/29,c=i;c<1;c+=i)_.push(ee(f,M,te*3*c))}else _.push(U(M,j(n,d)),U(M,j(n,d*.99)),k(M,j(n,d*.99)),k(M,j(n,d)))}return C.concat(_,I.reverse(),X)}function de(e,t={}){return Me(Ce(e,t),t)}function ve(e){if(!e.length)return"";const t=e.reduce((o,[v,S],g,s)=>{const[h,m]=s[(g+1)%s.length];return o.push(v,S,(v+h)/2,(S+m)/2),o},["M",...e[0],"Q"]);return t.push("Z"),t.join(" ")}const ke=D.memo(({stroke:e,options:t,color:o})=>{const v=de(e,t);return ne.jsx("path",{d:ve(v),fill:o})}),Se=D.forwardRef((e,t)=>{const o=re.useEzServiceRegistry(),{width:v="100%",height:S=300,backgroundColor:g="transparent",strokeColor:s,minStrokeWidth:h=2.5,maxStrokeWidth:m=5,smoothing:q=.5,thinning:E=0,readOnly:T=!1,disabled:u=!1,className:x,style:R,onEnd:p,onChange:w,onSave:F,dir:C,...I}=e,d=me.useServiceState("I18nService")?.dir||"ltr",Z=C==="auto"||!C?d:C;re.useBaseComponent(e),re.useInitCoreServices();const[b,O]=D.useState([]),[z,y]=D.useState([]),[P,$]=D.useState([]),[l,M]=D.useState(-1),X=D.useRef(null),_=s||"#0321ab",n=D.useCallback(r=>{const a=P.slice(0,l+1);a.push(r),$(a),M(a.length-1),w&&w(r.map(L=>JSON.stringify(L)))},[P,l,w]),f=r=>{if(T||u)return;r.currentTarget.setPointerCapture(r.pointerId);const a=[r.nativeEvent.offsetX,r.nativeEvent.offsetY,r.pressure];O([a])},i=r=>{if(T||u||r.buttons!==1)return;const a=[r.nativeEvent.offsetX,r.nativeEvent.offsetY,r.pressure];O(L=>[...L,a])},c=r=>{if(!(T||u)&&b.length>0){const a=[...z,b];y(a),n(a),O([]),p&&p(r)}},K=D.useMemo(()=>({clear:()=>{y([]),O([]),n([]),o.get("NotificationService")?.show({type:"info",message:"Signature Cleared",duration:2e3})},undo:()=>{if(l>0){const r=l-1;M(r),y(P[r])}else l===0&&(M(-1),y([]))},redo:()=>{if(l<P.length-1){const r=l+1;M(r),y(P[r])}},canUndo:()=>l>=0,canRedo:()=>l<P.length-1,isEmpty:()=>z.length===0&&b.length===0,getSignature:()=>z,load:r=>{if(typeof r=="string"){try{const a=JSON.parse(r);Array.isArray(a)&&(y(a),n(a))}catch(a){console.error("Failed to parse signature data",a)}return}Array.isArray(r)&&(y(r),n(r))},save:async(r="png")=>{if(!X.current)return"";const a=new XMLSerializer().serializeToString(X.current),L=document.createElement("canvas"),Y=L.getContext("2d"),W=new Image,B=X.current.getBoundingClientRect();return L.width=B.width,L.height=B.height,new Promise((H,G)=>{W.onload=()=>{if(Y){g&&g!=="transparent"&&(Y.fillStyle=g,Y.fillRect(0,0,L.width,L.height)),Y.drawImage(W,0,0);const N=L.toDataURL(`image/${r}`);F&&F(N,r),o.get("NotificationService")?.show({type:"success",message:"Signature Saved Successfully",duration:3e3}),H(N)}else{const N=new Error("Canvas context not defined");o.get("NotificationService")?.show({type:"error",message:"Failed to Save Signature",duration:3e3}),G(N)}},W.onerror=N=>{o.get("NotificationService")?.show({type:"error",message:"Failed to Process Signature Image",duration:3e3}),G(N)},W.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))})}}),[P,l,z,b,g,F,n]);ye.useImperativeAPI(t,K);const V=D.useMemo(()=>({size:m,thinning:E,smoothing:q,start:{cap:!0,taper:!1},end:{cap:!0,taper:10}}),[m,E,q]),oe=D.useMemo(()=>z.map((r,a)=>ne.jsx(ke,{stroke:r,options:V,color:_},a)),[z,V,_]),ie=b.length>0&&ne.jsx("path",{d:ve(de(b,{size:m,thinning:E,smoothing:q,start:{cap:!0,taper:!1},end:{cap:!0,taper:10},simulatePressure:b.length>2})),fill:_,opacity:.8});return ne.jsx("div",{className:re.cn("ez-signature-container relative overflow-hidden select-none touch-none",x),style:{width:v,height:S,...R},dir:Z,...I,children:ne.jsxs("svg",{ref:X,className:"w-full h-full",style:{backgroundColor:g,touchAction:"none"},onPointerDown:f,onPointerMove:i,onPointerUp:c,onPointerLeave:c,children:[oe,ie]})})});Se.displayName="EzSignature";exports.EzSignature=Se;
|