indas-ui 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/auth/ProtectedRoute.js +48 -0
- package/dist/cjs/components/auth/UnauthorizedPage.js +19 -0
- package/dist/cjs/components/auth/index.js +9 -0
- package/dist/cjs/components/chat/ai-messages.js +271 -0
- package/dist/cjs/components/chat/chat-prompt-navigator.js +110 -0
- package/dist/cjs/components/chat/chat.js +1032 -0
- package/dist/cjs/components/chat/multimodal-input.js +117 -0
- package/dist/cjs/components/dashboard/DrillDownModal.js +36 -0
- package/dist/cjs/components/dashboard/FilterBar.js +434 -0
- package/dist/cjs/components/dashboard/Tooltip.js +86 -0
- package/dist/cjs/components/dashboard/charts/Area.js +127 -0
- package/dist/cjs/components/dashboard/charts/Bar.js +111 -0
- package/dist/cjs/components/dashboard/charts/BoxPlot.js +118 -0
- package/dist/cjs/components/dashboard/charts/Bubble.js +102 -0
- package/dist/cjs/components/dashboard/charts/DashboardCard.js +12 -0
- package/dist/cjs/components/dashboard/charts/Donut.js +130 -0
- package/dist/cjs/components/dashboard/charts/FlowMap.js +238 -0
- package/dist/cjs/components/dashboard/charts/Funnel.js +38 -0
- package/dist/cjs/components/dashboard/charts/Gantt.js +271 -0
- package/dist/cjs/components/dashboard/charts/Gauge.js +143 -0
- package/dist/cjs/components/dashboard/charts/GeoMap.js +164 -0
- package/dist/cjs/components/dashboard/charts/Heatmap.js +116 -0
- package/dist/cjs/components/dashboard/charts/Line.js +75 -0
- package/dist/cjs/components/dashboard/charts/Pareto.js +110 -0
- package/dist/cjs/components/dashboard/charts/Radar.js +94 -0
- package/dist/cjs/components/dashboard/charts/Sankey.js +92 -0
- package/dist/cjs/components/dashboard/charts/Scatter.js +128 -0
- package/dist/cjs/components/dashboard/charts/Sparkline.js +134 -0
- package/dist/cjs/components/dashboard/charts/Treemap.js +104 -0
- package/dist/cjs/components/dashboard/charts/index.js +45 -0
- package/dist/cjs/components/dashboard/charts/india-map.js +464 -0
- package/dist/cjs/components/dashboard/charts/theme.js +132 -0
- package/dist/cjs/components/dashboard/config.js +118 -0
- package/dist/cjs/components/dashboard/index.js +39 -0
- package/dist/cjs/components/dashboard/kpi/KpiBeforeAfter.js +16 -0
- package/dist/cjs/components/dashboard/kpi/KpiBreakdown.js +42 -0
- package/dist/cjs/components/dashboard/kpi/KpiComparison.js +41 -0
- package/dist/cjs/components/dashboard/kpi/KpiQuickStats.js +41 -0
- package/dist/cjs/components/dashboard/kpi/KpiRating.js +38 -0
- package/dist/cjs/components/dashboard/kpi/KpiScroll.js +83 -0
- package/dist/cjs/components/dashboard/kpi/KpiTrend.js +37 -0
- package/dist/cjs/components/dashboard/kpi/index.js +22 -0
- package/dist/cjs/components/dashboard/kpi/kpi-shell.js +113 -0
- package/dist/cjs/components/dashboard/time-range.js +126 -0
- package/dist/cjs/components/datagrid/DataGrid.js +1613 -0
- package/dist/cjs/components/datagrid/cells/BooleanCell.js +42 -0
- package/dist/cjs/components/datagrid/cells/CellRenderer.js +142 -0
- package/dist/cjs/components/datagrid/cells/EditableCell.js +217 -0
- package/dist/cjs/components/datagrid/cells/SelectionCell.js +60 -0
- package/dist/cjs/components/datagrid/cells/index.js +6 -0
- package/dist/cjs/components/datagrid/columns/ActionsColumn.js +485 -0
- package/dist/cjs/components/datagrid/columns/ColumnContextMenu.js +341 -0
- package/dist/cjs/components/datagrid/columns/DraggableColumnHeader.js +150 -0
- package/dist/cjs/components/datagrid/controls/AutoResizeButton.js +10 -0
- package/dist/cjs/components/datagrid/controls/PaginationControls.js +38 -0
- package/dist/cjs/components/datagrid/controls/SummaryControls.js +30 -0
- package/dist/cjs/components/datagrid/controls/menu/ActionsMenu.js +16 -0
- package/dist/cjs/components/datagrid/controls/menu/column/ColumnChooserModal.js +25 -0
- package/dist/cjs/components/datagrid/controls/menu/column/ColumnSection.js +10 -0
- package/dist/cjs/components/datagrid/controls/menu/export/ExportSection.js +19 -0
- package/dist/cjs/components/datagrid/controls/menu/export/export.js +227 -0
- package/dist/cjs/components/datagrid/controls/menu/filter/AdvancedFilterModal.js +405 -0
- package/dist/cjs/components/datagrid/controls/menu/filter/FilterSection.js +9 -0
- package/dist/cjs/components/datagrid/controls/menu/grouping/GroupingSection.js +23 -0
- package/dist/cjs/components/datagrid/controls/menu/grouping/index.js +6 -0
- package/dist/cjs/components/datagrid/controls/menu/import/ImportSection.js +75 -0
- package/dist/cjs/components/datagrid/controls/menu/import/import.js +232 -0
- package/dist/cjs/components/datagrid/controls/menu/index.js +24 -0
- package/dist/cjs/components/datagrid/controls/menu/view/CardView.js +176 -0
- package/dist/cjs/components/datagrid/controls/menu/view/ChartView.js +401 -0
- package/dist/cjs/components/datagrid/controls/menu/view/ViewSection.js +12 -0
- package/dist/cjs/components/datagrid/hooks/useCellRangeSelection.js +127 -0
- package/dist/cjs/components/datagrid/hooks/useClipboard.js +154 -0
- package/dist/cjs/components/datagrid/hooks/useDataGridState.js +115 -0
- package/dist/cjs/components/datagrid/hooks/useKeyboardNavigation.js +120 -0
- package/dist/cjs/components/datagrid/index.js +90 -0
- package/dist/cjs/components/datagrid/rows/DraggableRow.js +34 -0
- package/dist/cjs/components/datagrid/rows/ExpandableRow.js +184 -0
- package/dist/cjs/components/datagrid/rows/FilterRow.js +188 -0
- package/dist/cjs/components/datagrid/rows/SelectColumn.js +34 -0
- package/dist/cjs/components/datagrid/rows/SummaryRow.js +34 -0
- package/dist/cjs/components/datagrid/rows/summary.js +67 -0
- package/dist/cjs/components/datagrid/search/InlineSearchCell.js +99 -0
- package/dist/cjs/components/datagrid/search/SearchHighlighter.js +133 -0
- package/dist/cjs/components/datagrid/search/SearchNavigator.js +185 -0
- package/dist/cjs/components/datagrid/search/SearchNewModal.js +238 -0
- package/dist/cjs/components/datagrid/search/advancedSearch.js +112 -0
- package/dist/cjs/components/datagrid/utils/grid-helpers.js +102 -0
- package/dist/cjs/components/datagrid/utils/grid-types.js +3 -0
- package/dist/cjs/components/draft/AutoSaveIndicator.js +70 -0
- package/dist/cjs/components/draft/DraftModal.js +220 -0
- package/dist/cjs/components/forms/date-picker/CalendarView.js +82 -0
- package/dist/cjs/components/forms/date-picker/DatePicker.js +748 -0
- package/dist/cjs/components/forms/date-picker/DateTimePicker.js +174 -0
- package/dist/cjs/components/forms/date-picker/index.js +21 -0
- package/dist/cjs/components/forms/date-picker/shared-utils.js +24 -0
- package/dist/cjs/components/forms/dropdown/Dropdown.js +427 -0
- package/dist/cjs/components/forms/dropdown/MultiSelect.js +136 -0
- package/dist/cjs/components/forms/dropdown/SingleSelect.js +254 -0
- package/dist/cjs/components/forms/dropdown/hooks/useDropdownCreate.js +88 -0
- package/dist/cjs/components/forms/dropdown/hooks/useDropdownFiltering.js +87 -0
- package/dist/cjs/components/forms/dropdown/hooks/useDropdownState.js +63 -0
- package/dist/cjs/components/forms/dropdown/index.js +6 -0
- package/dist/cjs/components/forms/dropdown/types.js +3 -0
- package/dist/cjs/components/forms/file-attachment/EmailPreview.js +419 -0
- package/dist/cjs/components/forms/file-attachment/FileAttachment.js +966 -0
- package/dist/cjs/components/forms/file-attachment/index.js +6 -0
- package/dist/cjs/components/forms/index.js +16 -0
- package/dist/cjs/components/forms/quantity-input-popup.js +135 -0
- package/dist/cjs/components/forms/remark-input/RemarkInput.js +263 -0
- package/dist/cjs/components/forms/remark-input/index.js +8 -0
- package/dist/cjs/components/forms/unified-currency-dropdown.js +202 -0
- package/dist/cjs/components/index.js +41 -0
- package/dist/cjs/components/layout/SidebarContextMenu.js +179 -0
- package/dist/cjs/components/layout/app-shell.js +81 -0
- package/dist/cjs/components/layout/bottom-nav.js +262 -0
- package/dist/cjs/components/layout/floating-action-button.js +77 -0
- package/dist/cjs/components/layout/footer.js +60 -0
- package/dist/cjs/components/layout/index.js +16 -0
- package/dist/cjs/components/layout/mobile-menu-sheet.js +195 -0
- package/dist/cjs/components/layout/side-panel.js +118 -0
- package/dist/cjs/components/layout/sidebar.js +581 -0
- package/dist/cjs/components/layout/top-header.js +270 -0
- package/dist/cjs/components/layout/userprofile-dropdown.js +100 -0
- package/dist/cjs/components/master/editable-cells/EditableCell.js +106 -0
- package/dist/cjs/components/master/editable-cells/index.js +17 -0
- package/dist/cjs/components/master/index.js +9 -0
- package/dist/cjs/components/messaging/conversation-list.js +109 -0
- package/dist/cjs/components/messaging/create-conversation-modal.js +112 -0
- package/dist/cjs/components/messaging/message-bubble.js +69 -0
- package/dist/cjs/components/messaging/message-input.js +154 -0
- package/dist/cjs/components/messaging/message-thread.js +124 -0
- package/dist/cjs/components/messaging/messaging-panel-content.js +69 -0
- package/dist/cjs/components/messaging/thread-panel.js +50 -0
- package/dist/cjs/components/modals/3DModal.js +35 -0
- package/dist/cjs/components/modals/ImageModal.js +587 -0
- package/dist/cjs/components/modals/Modal.js +311 -0
- package/dist/cjs/components/modals/StandardModal.js +28 -0
- package/dist/cjs/components/modals/api-config-modal.js +120 -0
- package/dist/cjs/components/modals/global-api-config-modal.js +127 -0
- package/dist/cjs/components/modals/index.js +17 -0
- package/dist/cjs/components/modals/logout-modal.js +45 -0
- package/dist/cjs/components/modals/modal-alert.js +295 -0
- package/dist/cjs/components/modals/password-reset-modal.js +112 -0
- package/dist/cjs/components/modals/session-expiry-warning.js +18 -0
- package/dist/cjs/components/providers/api-provider.js +19 -0
- package/dist/cjs/components/providers/query-provider.js +29 -0
- package/dist/cjs/components/providers/session-provider.js +119 -0
- package/dist/cjs/components/theme/ThemeCustomizer.js +184 -0
- package/dist/cjs/components/ui/buttons/button.js +264 -0
- package/dist/cjs/components/ui/card.js +58 -0
- package/dist/cjs/components/ui/chart.js +160 -0
- package/dist/cjs/components/ui/display/boolean-badge.js +29 -0
- package/dist/cjs/components/ui/display/card.js +20 -0
- package/dist/cjs/components/ui/display/collapsible.js +44 -0
- package/dist/cjs/components/ui/display/separator.js +44 -0
- package/dist/cjs/components/ui/display/stats-card.js +29 -0
- package/dist/cjs/components/ui/display/text.js +94 -0
- package/dist/cjs/components/ui/feedback/alert.js +61 -0
- package/dist/cjs/components/ui/feedback/badge.js +93 -0
- package/dist/cjs/components/ui/feedback/progress.js +44 -0
- package/dist/cjs/components/ui/feedback/reminder-button.js +111 -0
- package/dist/cjs/components/ui/feedback/skeleton-table.js +20 -0
- package/dist/cjs/components/ui/feedback/skeleton.js +53 -0
- package/dist/cjs/components/ui/feedback/tooltip.js +54 -0
- package/dist/cjs/components/ui/form-toggle.js +47 -0
- package/dist/cjs/components/ui/forms/checkbox.js +24 -0
- package/dist/cjs/components/ui/forms/input.js +111 -0
- package/dist/cjs/components/ui/forms/label.js +10 -0
- package/dist/cjs/components/ui/forms/switch.js +58 -0
- package/dist/cjs/components/ui/forms/textarea.js +49 -0
- package/dist/cjs/components/ui/index.js +157 -0
- package/dist/cjs/components/ui/navigation/dropdown-menu.js +84 -0
- package/dist/cjs/components/ui/navigation/header-steps.js +51 -0
- package/dist/cjs/components/ui/navigation/tabs.js +97 -0
- package/dist/cjs/components/ui/overlays/loading.js +169 -0
- package/dist/cjs/components/ui/select.js +72 -0
- package/dist/cjs/config/api.js +65 -0
- package/dist/cjs/contexts/AppConfigContext.js +37 -0
- package/dist/cjs/contexts/CurrencyContext.js +336 -0
- package/dist/cjs/contexts/DeviceContext.js +106 -0
- package/dist/cjs/contexts/EmailContext.js +727 -0
- package/dist/cjs/contexts/GlobalAlertContext.js +232 -0
- package/dist/cjs/contexts/ImpactAnalysisContext.js +60 -0
- package/dist/cjs/contexts/LanguageContext.js +104 -0
- package/dist/cjs/contexts/MessagingContext.js +726 -0
- package/dist/cjs/contexts/ModuleAuthContext.js +316 -0
- package/dist/cjs/contexts/NavigationContext.js +182 -0
- package/dist/cjs/contexts/NetworkStatusContext.js +95 -0
- package/dist/cjs/contexts/NotificationContext.js +169 -0
- package/dist/cjs/contexts/PageTitleContext.js +28 -0
- package/dist/cjs/contexts/SearchPreferencesContext.js +42 -0
- package/dist/cjs/contexts/SessionAdapterContext.js +24 -0
- package/dist/cjs/contexts/SidebarPreferencesContext.js +116 -0
- package/dist/cjs/contexts/ThemeContext.js +193 -0
- package/dist/cjs/hooks/index.js +50 -0
- package/dist/cjs/hooks/useApproval.js +250 -0
- package/dist/cjs/hooks/useBacchaSearch.js +257 -0
- package/dist/cjs/hooks/useBusinessAudit.js +54 -0
- package/dist/cjs/hooks/useColumnFreezing.js +204 -0
- package/dist/cjs/hooks/useColumnMetadata.js +48 -0
- package/dist/cjs/hooks/useConditionalFormatting.js +197 -0
- package/dist/cjs/hooks/useDebounce.js +49 -0
- package/dist/cjs/hooks/useDraft.js +181 -0
- package/dist/cjs/hooks/useFormValidation.js +68 -0
- package/dist/cjs/hooks/useGridSettings.js +85 -0
- package/dist/cjs/hooks/useGridTheme.js +204 -0
- package/dist/cjs/hooks/useId.js +21 -0
- package/dist/cjs/hooks/useIntelligentColumnSizing.js +315 -0
- package/dist/cjs/hooks/useKeyboardNavigation.js +192 -0
- package/dist/cjs/hooks/useNotifications.js +63 -0
- package/dist/cjs/hooks/usePrevious.js +20 -0
- package/dist/cjs/hooks/useRowSelection.js +150 -0
- package/dist/cjs/hooks/useSignalR.js +53 -0
- package/dist/cjs/hooks/useTheme.js +268 -0
- package/dist/cjs/hooks/useTranslation.js +20 -0
- package/dist/cjs/hooks/useUnsavedChanges.js +88 -0
- package/dist/cjs/index.js +21 -0
- package/dist/cjs/lib/api/activity/audit/audit.js +51 -0
- package/dist/cjs/lib/api/activity/audit/index.js +29 -0
- package/dist/cjs/lib/api/activity/audit/send.js +434 -0
- package/dist/cjs/lib/api/activity/email/client.js +467 -0
- package/dist/cjs/lib/api/activity/email/index.js +31 -0
- package/dist/cjs/lib/api/activity/email/password-reset.js +58 -0
- package/dist/cjs/lib/api/activity/email/templates.js +537 -0
- package/dist/cjs/lib/api/activity/email/types.js +24 -0
- package/dist/cjs/lib/api/activity/index.js +48 -0
- package/dist/cjs/lib/api/activity/messaging/messaging.js +254 -0
- package/dist/cjs/lib/api/activity/notifications/index.js +43 -0
- package/dist/cjs/lib/api/activity/notifications/notifications.js +224 -0
- package/dist/cjs/lib/api/activity/notifications/reminders.js +30 -0
- package/dist/cjs/lib/api/activity/notifications/send.js +267 -0
- package/dist/cjs/lib/api/activity/notifications/types.js +66 -0
- package/dist/cjs/lib/api/activity/notify-and-log.js +63 -0
- package/dist/cjs/lib/api/activity/remarks/index.js +6 -0
- package/dist/cjs/lib/api/activity/remarks/remarks.js +186 -0
- package/dist/cjs/lib/api/activity/storage.js +83 -0
- package/dist/cjs/lib/api/ai/chat.js +227 -0
- package/dist/cjs/lib/api/ai/types.js +6 -0
- package/dist/cjs/lib/api/approval/approvals.js +210 -0
- package/dist/cjs/lib/api/approval/index.js +13 -0
- package/dist/cjs/lib/api/auth/auth.js +154 -0
- package/dist/cjs/lib/api/auth/index.js +11 -0
- package/dist/cjs/lib/api/auth/password-reset-otp.js +192 -0
- package/dist/cjs/lib/api/auth/two-factor-auth.js +94 -0
- package/dist/cjs/lib/api/auth/two-factor.js +186 -0
- package/dist/cjs/lib/api/core/auth-helpers.js +141 -0
- package/dist/cjs/lib/api/core/client.js +305 -0
- package/dist/cjs/lib/api/core/config.js +248 -0
- package/dist/cjs/lib/api/core/index.js +43 -0
- package/dist/cjs/lib/api/core/session-validator.js +98 -0
- package/dist/cjs/lib/api/core/types.js +4 -0
- package/dist/cjs/lib/api/core/utils.js +70 -0
- package/dist/cjs/lib/api/dashboard/costing.js +15 -0
- package/dist/cjs/lib/api/dashboard/management.js +11 -0
- package/dist/cjs/lib/api/dashboard/sales.js +11 -0
- package/dist/cjs/lib/api/draft/drafts.js +279 -0
- package/dist/cjs/lib/api/draft/index.js +13 -0
- package/dist/cjs/lib/api/enquiry/enquiry.js +624 -0
- package/dist/cjs/lib/api/enquiry/index.js +20 -0
- package/dist/cjs/lib/api/enquiry/rate-enquiry.js +78 -0
- package/dist/cjs/lib/api/estimation/categories.js +113 -0
- package/dist/cjs/lib/api/estimation/category-defaults.js +47 -0
- package/dist/cjs/lib/api/estimation/company-config.js +26 -0
- package/dist/cjs/lib/api/estimation/content.js +210 -0
- package/dist/cjs/lib/api/estimation/freight.js +25 -0
- package/dist/cjs/lib/api/estimation/grid-costing-drafts.js +30 -0
- package/dist/cjs/lib/api/estimation/grid-costing.js +176 -0
- package/dist/cjs/lib/api/estimation/index.js +58 -0
- package/dist/cjs/lib/api/estimation/legacy-costing.js +51 -0
- package/dist/cjs/lib/api/estimation/machines.js +74 -0
- package/dist/cjs/lib/api/estimation/planning.js +403 -0
- package/dist/cjs/lib/api/estimation/qualities.js +245 -0
- package/dist/cjs/lib/api/estimation/quotation-load.js +52 -0
- package/dist/cjs/lib/api/estimation/quotation-save.js +109 -0
- package/dist/cjs/lib/api/estimation/quote-check.js +34 -0
- package/dist/cjs/lib/api/estimation/quotepanel.js +496 -0
- package/dist/cjs/lib/api/estimation/shipper-planning.js +220 -0
- package/dist/cjs/lib/api/estimation/wastage.js +47 -0
- package/dist/cjs/lib/api/index.js +33 -0
- package/dist/cjs/lib/api/integration/proxy.js +40 -0
- package/dist/cjs/lib/api/master/category.js +215 -0
- package/dist/cjs/lib/api/master/company.js +389 -0
- package/dist/cjs/lib/api/master/hsn.js +61 -0
- package/dist/cjs/lib/api/master/index.js +47 -0
- package/dist/cjs/lib/api/master/item.js +142 -0
- package/dist/cjs/lib/api/master/ledger.js +398 -0
- package/dist/cjs/lib/api/master/logistics.js +119 -0
- package/dist/cjs/lib/api/master/machine.js +579 -0
- package/dist/cjs/lib/api/master/material-group.js +103 -0
- package/dist/cjs/lib/api/master/other.js +63 -0
- package/dist/cjs/lib/api/master/process-types.js +5 -0
- package/dist/cjs/lib/api/master/process.js +131 -0
- package/dist/cjs/lib/api/master/production-units.js +22 -0
- package/dist/cjs/lib/api/master/rate.js +203 -0
- package/dist/cjs/lib/api/master/tool.js +88 -0
- package/dist/cjs/lib/api/master/user.js +154 -0
- package/dist/cjs/lib/api/settings/erp-parameters.js +69 -0
- package/dist/cjs/lib/api/utility/index.js +11 -0
- package/dist/cjs/lib/api/utility/menu.js +136 -0
- package/dist/cjs/lib/auth.js +10 -0
- package/dist/cjs/lib/pwa.js +59 -0
- package/dist/cjs/lib/react-query-config.js +134 -0
- package/dist/cjs/lib/security/audit-logger.js +177 -0
- package/dist/cjs/lib/security/rate-limiter.js +122 -0
- package/dist/cjs/lib/server-url.js +76 -0
- package/dist/cjs/lib/svg-utils.js +213 -0
- package/dist/cjs/lib/theme/types.js +235 -0
- package/dist/cjs/lib/theme/utils.js +363 -0
- package/dist/cjs/lib/types/index.js +3 -0
- package/dist/cjs/lib/utils/attachment-loader.js +82 -0
- package/dist/cjs/lib/utils/client-lead-utils.js +61 -0
- package/dist/cjs/lib/utils/device-detection.js +110 -0
- package/dist/cjs/lib/utils/logout-cleanup.js +312 -0
- package/dist/cjs/lib/utils/planning-prefs.js +31 -0
- package/dist/cjs/lib/utils.js +70 -0
- package/dist/cjs/lib/vision/dieline-extractor.js +321 -0
- package/dist/cjs/lib/vision/reference-grid.js +245 -0
- package/dist/cjs/locales/de.json +79 -0
- package/dist/cjs/locales/en.json +2217 -0
- package/dist/cjs/locales/es.json +79 -0
- package/dist/cjs/locales/fr.json +78 -0
- package/dist/cjs/locales/hi.json +1599 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/providers.js +43 -0
- package/dist/cjs/services/GlobalLoadingService.js +220 -0
- package/{src → dist/cjs}/styles/grid-themes.css +345 -345
- package/{src → dist/cjs}/styles/sidebar-scrollbar.css +45 -45
- package/{src → dist/cjs}/styles/tokens.css +712 -711
- package/dist/cjs/types/approval.js +22 -0
- package/dist/cjs/types/audit.js +50 -0
- package/dist/cjs/types/draft.js +22 -0
- package/dist/cjs/types/master.js +4 -0
- package/dist/cjs/types/shipper-planning.js +7 -0
- package/dist/components/auth/ProtectedRoute.d.ts +6 -0
- package/dist/components/auth/ProtectedRoute.js +45 -0
- package/dist/components/auth/UnauthorizedPage.d.ts +6 -0
- package/dist/components/auth/UnauthorizedPage.js +15 -0
- package/dist/components/auth/index.d.ts +2 -0
- package/dist/components/auth/index.js +3 -0
- package/dist/components/chat/ai-messages.d.ts +32 -0
- package/dist/components/chat/ai-messages.js +265 -0
- package/dist/components/chat/chat-prompt-navigator.d.ts +9 -0
- package/dist/components/chat/chat-prompt-navigator.js +107 -0
- package/dist/components/chat/chat.d.ts +46 -0
- package/dist/components/chat/chat.js +1029 -0
- package/dist/components/chat/multimodal-input.d.ts +12 -0
- package/dist/components/chat/multimodal-input.js +114 -0
- package/dist/components/dashboard/DrillDownModal.d.ts +15 -0
- package/dist/components/dashboard/DrillDownModal.js +33 -0
- package/dist/components/dashboard/FilterBar.d.ts +108 -0
- package/dist/components/dashboard/FilterBar.js +428 -0
- package/dist/components/dashboard/Tooltip.d.ts +24 -0
- package/dist/components/dashboard/Tooltip.js +50 -0
- package/dist/components/dashboard/charts/Area.d.ts +28 -0
- package/dist/components/dashboard/charts/Area.js +121 -0
- package/dist/components/dashboard/charts/Bar.d.ts +27 -0
- package/dist/components/dashboard/charts/Bar.js +105 -0
- package/dist/components/dashboard/charts/BoxPlot.d.ts +23 -0
- package/dist/components/dashboard/charts/BoxPlot.js +112 -0
- package/dist/components/dashboard/charts/Bubble.d.ts +36 -0
- package/dist/components/dashboard/charts/Bubble.js +96 -0
- package/dist/components/dashboard/charts/DashboardCard.d.ts +12 -0
- package/dist/components/dashboard/charts/DashboardCard.js +9 -0
- package/dist/components/dashboard/charts/Donut.d.ts +23 -0
- package/dist/components/dashboard/charts/Donut.js +124 -0
- package/dist/components/dashboard/charts/FlowMap.d.ts +38 -0
- package/dist/components/dashboard/charts/FlowMap.js +199 -0
- package/dist/components/dashboard/charts/Funnel.d.ts +30 -0
- package/dist/components/dashboard/charts/Funnel.js +35 -0
- package/dist/components/dashboard/charts/Gantt.d.ts +26 -0
- package/dist/components/dashboard/charts/Gantt.js +265 -0
- package/dist/components/dashboard/charts/Gauge.d.ts +25 -0
- package/dist/components/dashboard/charts/Gauge.js +137 -0
- package/dist/components/dashboard/charts/GeoMap.d.ts +38 -0
- package/dist/components/dashboard/charts/GeoMap.js +125 -0
- package/dist/components/dashboard/charts/Heatmap.d.ts +31 -0
- package/dist/components/dashboard/charts/Heatmap.js +110 -0
- package/dist/components/dashboard/charts/Line.d.ts +33 -0
- package/dist/components/dashboard/charts/Line.js +69 -0
- package/dist/components/dashboard/charts/Pareto.d.ts +21 -0
- package/dist/components/dashboard/charts/Pareto.js +104 -0
- package/dist/components/dashboard/charts/Radar.d.ts +32 -0
- package/dist/components/dashboard/charts/Radar.js +88 -0
- package/dist/components/dashboard/charts/Sankey.d.ts +43 -0
- package/dist/components/dashboard/charts/Sankey.js +86 -0
- package/dist/components/dashboard/charts/Scatter.d.ts +38 -0
- package/dist/components/dashboard/charts/Scatter.js +122 -0
- package/dist/components/dashboard/charts/Sparkline.d.ts +37 -0
- package/dist/components/dashboard/charts/Sparkline.js +128 -0
- package/dist/components/dashboard/charts/Treemap.d.ts +30 -0
- package/dist/components/dashboard/charts/Treemap.js +98 -0
- package/dist/components/dashboard/charts/index.d.ts +38 -0
- package/dist/components/dashboard/charts/index.js +23 -0
- package/dist/components/dashboard/charts/india-map.d.ts +22 -0
- package/dist/components/dashboard/charts/india-map.js +461 -0
- package/dist/components/dashboard/charts/theme.d.ts +107 -0
- package/dist/components/dashboard/charts/theme.js +124 -0
- package/dist/components/dashboard/config.d.ts +96 -0
- package/dist/components/dashboard/config.js +113 -0
- package/dist/components/dashboard/index.d.ts +10 -0
- package/dist/components/dashboard/index.js +13 -0
- package/dist/components/dashboard/kpi/KpiBeforeAfter.d.ts +31 -0
- package/dist/components/dashboard/kpi/KpiBeforeAfter.js +13 -0
- package/dist/components/dashboard/kpi/KpiBreakdown.d.ts +31 -0
- package/dist/components/dashboard/kpi/KpiBreakdown.js +39 -0
- package/dist/components/dashboard/kpi/KpiComparison.d.ts +36 -0
- package/dist/components/dashboard/kpi/KpiComparison.js +38 -0
- package/dist/components/dashboard/kpi/KpiQuickStats.d.ts +30 -0
- package/dist/components/dashboard/kpi/KpiQuickStats.js +38 -0
- package/dist/components/dashboard/kpi/KpiRating.d.ts +46 -0
- package/dist/components/dashboard/kpi/KpiRating.js +35 -0
- package/dist/components/dashboard/kpi/KpiScroll.d.ts +63 -0
- package/dist/components/dashboard/kpi/KpiScroll.js +80 -0
- package/dist/components/dashboard/kpi/KpiTrend.d.ts +28 -0
- package/dist/components/dashboard/kpi/KpiTrend.js +34 -0
- package/dist/components/dashboard/kpi/index.d.ts +16 -0
- package/dist/components/dashboard/kpi/index.js +10 -0
- package/dist/components/dashboard/kpi/kpi-shell.d.ts +44 -0
- package/dist/components/dashboard/kpi/kpi-shell.js +108 -0
- package/dist/components/dashboard/time-range.d.ts +12 -0
- package/dist/components/dashboard/time-range.js +118 -0
- package/dist/components/datagrid/DataGrid.d.ts +126 -0
- package/dist/components/datagrid/DataGrid.js +1577 -0
- package/dist/components/datagrid/cells/BooleanCell.d.ts +15 -0
- package/dist/components/datagrid/cells/BooleanCell.js +39 -0
- package/dist/components/datagrid/cells/CellRenderer.d.ts +25 -0
- package/dist/components/datagrid/cells/CellRenderer.js +139 -0
- package/dist/components/datagrid/cells/EditableCell.d.ts +35 -0
- package/dist/components/datagrid/cells/EditableCell.js +179 -0
- package/dist/components/datagrid/cells/SelectionCell.d.ts +11 -0
- package/dist/components/datagrid/cells/SelectionCell.js +58 -0
- package/dist/components/datagrid/cells/index.d.ts +1 -0
- package/dist/components/datagrid/cells/index.js +2 -0
- package/dist/components/datagrid/columns/ActionsColumn.d.ts +174 -0
- package/dist/components/datagrid/columns/ActionsColumn.js +448 -0
- package/dist/components/datagrid/columns/ColumnContextMenu.d.ts +16 -0
- package/dist/components/datagrid/columns/ColumnContextMenu.js +338 -0
- package/dist/components/datagrid/columns/DraggableColumnHeader.d.ts +19 -0
- package/dist/components/datagrid/columns/DraggableColumnHeader.js +147 -0
- package/dist/components/datagrid/controls/AutoResizeButton.d.ts +8 -0
- package/dist/components/datagrid/controls/AutoResizeButton.js +7 -0
- package/dist/components/datagrid/controls/PaginationControls.d.ts +13 -0
- package/dist/components/datagrid/controls/PaginationControls.js +34 -0
- package/dist/components/datagrid/controls/SummaryControls.d.ts +10 -0
- package/dist/components/datagrid/controls/SummaryControls.js +27 -0
- package/dist/components/datagrid/controls/menu/ActionsMenu.d.ts +31 -0
- package/dist/components/datagrid/controls/menu/ActionsMenu.js +13 -0
- package/dist/components/datagrid/controls/menu/column/ColumnChooserModal.d.ts +13 -0
- package/dist/components/datagrid/controls/menu/column/ColumnChooserModal.js +22 -0
- package/dist/components/datagrid/controls/menu/column/ColumnSection.d.ts +9 -0
- package/dist/components/datagrid/controls/menu/column/ColumnSection.js +7 -0
- package/dist/components/datagrid/controls/menu/export/ExportSection.d.ts +7 -0
- package/dist/components/datagrid/controls/menu/export/ExportSection.js +16 -0
- package/dist/components/datagrid/controls/menu/export/export.d.ts +21 -0
- package/dist/components/datagrid/controls/menu/export/export.js +187 -0
- package/dist/components/datagrid/controls/menu/filter/AdvancedFilterModal.d.ts +29 -0
- package/dist/components/datagrid/controls/menu/filter/AdvancedFilterModal.js +369 -0
- package/dist/components/datagrid/controls/menu/filter/FilterSection.d.ts +12 -0
- package/dist/components/datagrid/controls/menu/filter/FilterSection.js +6 -0
- package/dist/components/datagrid/controls/menu/grouping/GroupingSection.d.ts +10 -0
- package/dist/components/datagrid/controls/menu/grouping/GroupingSection.js +20 -0
- package/dist/components/datagrid/controls/menu/grouping/index.d.ts +1 -0
- package/dist/components/datagrid/controls/menu/grouping/index.js +2 -0
- package/dist/components/datagrid/controls/menu/import/ImportSection.d.ts +6 -0
- package/dist/components/datagrid/controls/menu/import/ImportSection.js +72 -0
- package/dist/components/datagrid/controls/menu/import/import.d.ts +27 -0
- package/dist/components/datagrid/controls/menu/import/import.js +193 -0
- package/dist/components/datagrid/controls/menu/index.d.ts +10 -0
- package/dist/components/datagrid/controls/menu/index.js +11 -0
- package/dist/components/datagrid/controls/menu/view/CardView.d.ts +17 -0
- package/dist/components/datagrid/controls/menu/view/CardView.js +173 -0
- package/dist/components/datagrid/controls/menu/view/ChartView.d.ts +9 -0
- package/dist/components/datagrid/controls/menu/view/ChartView.js +363 -0
- package/dist/components/datagrid/controls/menu/view/ViewSection.d.ts +7 -0
- package/dist/components/datagrid/controls/menu/view/ViewSection.js +9 -0
- package/dist/components/datagrid/hooks/useCellRangeSelection.d.ts +20 -0
- package/dist/components/datagrid/hooks/useCellRangeSelection.js +124 -0
- package/dist/components/datagrid/hooks/useClipboard.d.ts +15 -0
- package/dist/components/datagrid/hooks/useClipboard.js +151 -0
- package/dist/components/datagrid/hooks/useDataGridState.d.ts +46 -0
- package/dist/components/datagrid/hooks/useDataGridState.js +112 -0
- package/dist/components/datagrid/hooks/useKeyboardNavigation.d.ts +18 -0
- package/dist/components/datagrid/hooks/useKeyboardNavigation.js +117 -0
- package/dist/components/datagrid/index.d.ts +34 -0
- package/dist/components/datagrid/index.js +41 -0
- package/dist/components/datagrid/rows/DraggableRow.d.ts +33 -0
- package/dist/components/datagrid/rows/DraggableRow.js +31 -0
- package/dist/components/datagrid/rows/ExpandableRow.d.ts +48 -0
- package/dist/components/datagrid/rows/ExpandableRow.js +178 -0
- package/dist/components/datagrid/rows/FilterRow.d.ts +10 -0
- package/dist/components/datagrid/rows/FilterRow.js +185 -0
- package/dist/components/datagrid/rows/SelectColumn.d.ts +2 -0
- package/dist/components/datagrid/rows/SelectColumn.js +31 -0
- package/dist/components/datagrid/rows/SummaryRow.d.ts +12 -0
- package/dist/components/datagrid/rows/SummaryRow.js +31 -0
- package/dist/components/datagrid/rows/summary.d.ts +9 -0
- package/dist/components/datagrid/rows/summary.js +63 -0
- package/dist/components/datagrid/search/InlineSearchCell.d.ts +13 -0
- package/dist/components/datagrid/search/InlineSearchCell.js +96 -0
- package/dist/components/datagrid/search/SearchHighlighter.d.ts +16 -0
- package/dist/components/datagrid/search/SearchHighlighter.js +124 -0
- package/dist/components/datagrid/search/SearchNavigator.d.ts +24 -0
- package/dist/components/datagrid/search/SearchNavigator.js +148 -0
- package/dist/components/datagrid/search/SearchNewModal.d.ts +12 -0
- package/dist/components/datagrid/search/SearchNewModal.js +202 -0
- package/dist/components/datagrid/search/advancedSearch.d.ts +23 -0
- package/dist/components/datagrid/search/advancedSearch.js +109 -0
- package/dist/components/datagrid/utils/grid-helpers.d.ts +34 -0
- package/dist/components/datagrid/utils/grid-helpers.js +94 -0
- package/dist/components/datagrid/utils/grid-types.d.ts +157 -0
- package/dist/components/datagrid/utils/grid-types.js +2 -0
- package/dist/components/draft/AutoSaveIndicator.d.ts +28 -0
- package/dist/components/draft/AutoSaveIndicator.js +67 -0
- package/dist/components/draft/DraftModal.d.ts +27 -0
- package/dist/components/draft/DraftModal.js +184 -0
- package/dist/components/forms/date-picker/CalendarView.d.ts +17 -0
- package/dist/components/forms/date-picker/CalendarView.js +46 -0
- package/dist/components/forms/date-picker/DatePicker.d.ts +31 -0
- package/dist/components/forms/date-picker/DatePicker.js +712 -0
- package/dist/components/forms/date-picker/DateTimePicker.d.ts +15 -0
- package/dist/components/forms/date-picker/DateTimePicker.js +138 -0
- package/dist/components/forms/date-picker/index.d.ts +7 -0
- package/dist/components/forms/date-picker/index.js +9 -0
- package/dist/components/forms/date-picker/shared-utils.d.ts +6 -0
- package/dist/components/forms/date-picker/shared-utils.js +19 -0
- package/dist/components/forms/dropdown/Dropdown.d.ts +144 -0
- package/dist/components/forms/dropdown/Dropdown.js +384 -0
- package/dist/components/forms/dropdown/MultiSelect.d.ts +29 -0
- package/dist/components/forms/dropdown/MultiSelect.js +100 -0
- package/dist/components/forms/dropdown/SingleSelect.d.ts +39 -0
- package/dist/components/forms/dropdown/SingleSelect.js +218 -0
- package/dist/components/forms/dropdown/hooks/useDropdownCreate.d.ts +8 -0
- package/dist/components/forms/dropdown/hooks/useDropdownCreate.js +52 -0
- package/dist/components/forms/dropdown/hooks/useDropdownFiltering.d.ts +5 -0
- package/dist/components/forms/dropdown/hooks/useDropdownFiltering.js +51 -0
- package/dist/components/forms/dropdown/hooks/useDropdownState.d.ts +7 -0
- package/dist/components/forms/dropdown/hooks/useDropdownState.js +27 -0
- package/dist/components/forms/dropdown/index.d.ts +2 -0
- package/dist/components/forms/dropdown/index.js +2 -0
- package/dist/components/forms/dropdown/types.d.ts +67 -0
- package/dist/components/forms/dropdown/types.js +2 -0
- package/dist/components/forms/file-attachment/EmailPreview.d.ts +5 -0
- package/dist/components/forms/file-attachment/EmailPreview.js +383 -0
- package/dist/components/forms/file-attachment/FileAttachment.d.ts +30 -0
- package/dist/components/forms/file-attachment/FileAttachment.js +930 -0
- package/dist/components/forms/file-attachment/index.d.ts +2 -0
- package/dist/components/forms/file-attachment/index.js +2 -0
- package/dist/components/forms/index.d.ts +9 -0
- package/dist/components/forms/index.js +7 -0
- package/dist/components/forms/quantity-input-popup.d.ts +10 -0
- package/dist/components/forms/quantity-input-popup.js +99 -0
- package/dist/components/forms/remark-input/RemarkInput.d.ts +58 -0
- package/dist/components/forms/remark-input/RemarkInput.js +258 -0
- package/dist/components/forms/remark-input/index.d.ts +1 -0
- package/dist/components/forms/remark-input/index.js +2 -0
- package/dist/components/forms/unified-currency-dropdown.d.ts +26 -0
- package/dist/components/forms/unified-currency-dropdown.js +166 -0
- package/dist/components/index.d.ts +14 -0
- package/dist/components/index.js +15 -0
- package/dist/components/layout/SidebarContextMenu.d.ts +18 -0
- package/dist/components/layout/SidebarContextMenu.js +142 -0
- package/dist/components/layout/app-shell.d.ts +32 -0
- package/dist/components/layout/app-shell.js +43 -0
- package/dist/components/layout/bottom-nav.d.ts +28 -0
- package/dist/components/layout/bottom-nav.js +219 -0
- package/dist/components/layout/floating-action-button.d.ts +10 -0
- package/dist/components/layout/floating-action-button.js +74 -0
- package/dist/components/layout/footer.d.ts +37 -0
- package/dist/components/layout/footer.js +56 -0
- package/dist/components/layout/index.d.ts +8 -0
- package/dist/components/layout/index.js +6 -0
- package/dist/components/layout/mobile-menu-sheet.d.ts +7 -0
- package/dist/components/layout/mobile-menu-sheet.js +159 -0
- package/dist/components/layout/side-panel.d.ts +50 -0
- package/dist/components/layout/side-panel.js +115 -0
- package/dist/components/layout/sidebar.d.ts +12 -0
- package/dist/components/layout/sidebar.js +542 -0
- package/dist/components/layout/top-header.d.ts +8 -0
- package/dist/components/layout/top-header.js +234 -0
- package/dist/components/layout/userprofile-dropdown.d.ts +1 -0
- package/dist/components/layout/userprofile-dropdown.js +97 -0
- package/dist/components/master/editable-cells/EditableCell.d.ts +43 -0
- package/dist/components/master/editable-cells/EditableCell.js +66 -0
- package/dist/components/master/editable-cells/index.d.ts +9 -0
- package/dist/components/master/editable-cells/index.js +10 -0
- package/dist/components/master/index.d.ts +1 -0
- package/dist/components/master/index.js +3 -0
- package/dist/components/messaging/conversation-list.d.ts +13 -0
- package/dist/components/messaging/conversation-list.js +103 -0
- package/dist/components/messaging/create-conversation-modal.d.ts +9 -0
- package/dist/components/messaging/create-conversation-modal.js +109 -0
- package/dist/components/messaging/message-bubble.d.ts +15 -0
- package/dist/components/messaging/message-bubble.js +66 -0
- package/dist/components/messaging/message-input.d.ts +17 -0
- package/dist/components/messaging/message-input.js +151 -0
- package/dist/components/messaging/message-thread.d.ts +10 -0
- package/dist/components/messaging/message-thread.js +121 -0
- package/dist/components/messaging/messaging-panel-content.d.ts +5 -0
- package/dist/components/messaging/messaging-panel-content.js +66 -0
- package/dist/components/messaging/thread-panel.d.ts +10 -0
- package/dist/components/messaging/thread-panel.js +47 -0
- package/dist/components/modals/3DModal.d.ts +39 -0
- package/dist/components/modals/3DModal.js +32 -0
- package/dist/components/modals/ImageModal.d.ts +28 -0
- package/dist/components/modals/ImageModal.js +551 -0
- package/dist/components/modals/Modal.d.ts +92 -0
- package/dist/components/modals/Modal.js +264 -0
- package/dist/components/modals/StandardModal.d.ts +27 -0
- package/dist/components/modals/StandardModal.js +25 -0
- package/dist/components/modals/api-config-modal.d.ts +7 -0
- package/dist/components/modals/api-config-modal.js +117 -0
- package/dist/components/modals/global-api-config-modal.d.ts +7 -0
- package/dist/components/modals/global-api-config-modal.js +124 -0
- package/dist/components/modals/index.d.ts +7 -0
- package/dist/components/modals/index.js +8 -0
- package/dist/components/modals/logout-modal.d.ts +32 -0
- package/dist/components/modals/logout-modal.js +42 -0
- package/dist/components/modals/modal-alert.d.ts +139 -0
- package/dist/components/modals/modal-alert.js +250 -0
- package/dist/components/modals/password-reset-modal.d.ts +11 -0
- package/dist/components/modals/password-reset-modal.js +109 -0
- package/dist/components/modals/session-expiry-warning.d.ts +12 -0
- package/dist/components/modals/session-expiry-warning.js +15 -0
- package/dist/components/providers/api-provider.d.ts +10 -0
- package/dist/components/providers/api-provider.js +15 -0
- package/dist/components/providers/query-provider.d.ts +3 -0
- package/dist/components/providers/query-provider.js +26 -0
- package/dist/components/providers/session-provider.d.ts +7 -0
- package/dist/components/providers/session-provider.js +116 -0
- package/dist/components/theme/ThemeCustomizer.d.ts +37 -0
- package/dist/components/theme/ThemeCustomizer.js +178 -0
- package/dist/components/ui/buttons/button.d.ts +59 -0
- package/dist/components/ui/buttons/button.js +228 -0
- package/dist/components/ui/card.d.ts +8 -0
- package/dist/components/ui/card.js +17 -0
- package/dist/components/ui/chart.d.ts +83 -0
- package/dist/components/ui/chart.js +113 -0
- package/dist/components/ui/display/boolean-badge.d.ts +7 -0
- package/dist/components/ui/display/boolean-badge.js +23 -0
- package/dist/components/ui/display/card.d.ts +10 -0
- package/dist/components/ui/display/card.js +11 -0
- package/dist/components/ui/display/collapsible.d.ts +6 -0
- package/dist/components/ui/display/collapsible.js +6 -0
- package/dist/components/ui/display/separator.d.ts +4 -0
- package/dist/components/ui/display/separator.js +8 -0
- package/dist/components/ui/display/stats-card.d.ts +22 -0
- package/dist/components/ui/display/stats-card.js +25 -0
- package/dist/components/ui/display/text.d.ts +14 -0
- package/dist/components/ui/display/text.js +57 -0
- package/dist/components/ui/feedback/alert.d.ts +8 -0
- package/dist/components/ui/feedback/alert.js +23 -0
- package/dist/components/ui/feedback/badge.d.ts +49 -0
- package/dist/components/ui/feedback/badge.js +87 -0
- package/dist/components/ui/feedback/progress.d.ts +4 -0
- package/dist/components/ui/feedback/progress.js +8 -0
- package/dist/components/ui/feedback/reminder-button.d.ts +22 -0
- package/dist/components/ui/feedback/reminder-button.js +75 -0
- package/dist/components/ui/feedback/skeleton-table.d.ts +18 -0
- package/dist/components/ui/feedback/skeleton-table.js +17 -0
- package/dist/components/ui/feedback/skeleton.d.ts +53 -0
- package/dist/components/ui/feedback/skeleton.js +48 -0
- package/dist/components/ui/feedback/tooltip.d.ts +15 -0
- package/dist/components/ui/feedback/tooltip.js +14 -0
- package/dist/components/ui/form-toggle.d.ts +57 -0
- package/dist/components/ui/form-toggle.js +44 -0
- package/dist/components/ui/forms/checkbox.d.ts +6 -0
- package/dist/components/ui/forms/checkbox.js +17 -0
- package/dist/components/ui/forms/input.d.ts +18 -0
- package/dist/components/ui/forms/input.js +75 -0
- package/dist/components/ui/forms/label.d.ts +5 -0
- package/dist/components/ui/forms/label.js +6 -0
- package/dist/components/ui/forms/switch.d.ts +10 -0
- package/dist/components/ui/forms/switch.js +22 -0
- package/dist/components/ui/forms/textarea.d.ts +8 -0
- package/dist/components/ui/forms/textarea.js +13 -0
- package/dist/components/ui/index.d.ts +49 -0
- package/dist/components/ui/index.js +62 -0
- package/dist/components/ui/navigation/dropdown-menu.d.ts +27 -0
- package/dist/components/ui/navigation/dropdown-menu.js +34 -0
- package/dist/components/ui/navigation/header-steps.d.ts +16 -0
- package/dist/components/ui/navigation/header-steps.js +15 -0
- package/dist/components/ui/navigation/tabs.d.ts +40 -0
- package/dist/components/ui/navigation/tabs.js +59 -0
- package/dist/components/ui/overlays/loading.d.ts +47 -0
- package/dist/components/ui/overlays/loading.js +131 -0
- package/dist/components/ui/select.d.ts +13 -0
- package/dist/components/ui/select.js +27 -0
- package/dist/config/api.d.ts +30 -0
- package/dist/config/api.js +58 -0
- package/dist/contexts/AppConfigContext.d.ts +13 -0
- package/dist/contexts/AppConfigContext.js +33 -0
- package/dist/contexts/CurrencyContext.d.ts +43 -0
- package/dist/contexts/CurrencyContext.js +331 -0
- package/dist/contexts/DeviceContext.d.ts +12 -0
- package/dist/contexts/DeviceContext.js +69 -0
- package/dist/contexts/EmailContext.d.ts +112 -0
- package/dist/contexts/EmailContext.js +720 -0
- package/dist/contexts/GlobalAlertContext.d.ts +67 -0
- package/dist/contexts/GlobalAlertContext.js +192 -0
- package/dist/contexts/ImpactAnalysisContext.d.ts +11 -0
- package/dist/contexts/ImpactAnalysisContext.js +23 -0
- package/dist/contexts/LanguageContext.d.ts +21 -0
- package/dist/contexts/LanguageContext.js +66 -0
- package/dist/contexts/MessagingContext.d.ts +70 -0
- package/dist/contexts/MessagingContext.js +722 -0
- package/dist/contexts/ModuleAuthContext.d.ts +42 -0
- package/dist/contexts/ModuleAuthContext.js +278 -0
- package/dist/contexts/NavigationContext.d.ts +26 -0
- package/dist/contexts/NavigationContext.js +143 -0
- package/dist/contexts/NetworkStatusContext.d.ts +18 -0
- package/dist/contexts/NetworkStatusContext.js +87 -0
- package/dist/contexts/NotificationContext.d.ts +47 -0
- package/dist/contexts/NotificationContext.js +165 -0
- package/dist/contexts/PageTitleContext.d.ts +11 -0
- package/dist/contexts/PageTitleContext.js +23 -0
- package/dist/contexts/SearchPreferencesContext.d.ts +11 -0
- package/dist/contexts/SearchPreferencesContext.js +38 -0
- package/dist/contexts/SessionAdapterContext.d.ts +39 -0
- package/dist/contexts/SessionAdapterContext.js +20 -0
- package/dist/contexts/SidebarPreferencesContext.d.ts +19 -0
- package/dist/contexts/SidebarPreferencesContext.js +112 -0
- package/dist/contexts/ThemeContext.d.ts +63 -0
- package/dist/contexts/ThemeContext.js +153 -0
- package/dist/hooks/index.d.ts +23 -0
- package/dist/hooks/index.js +18 -0
- package/dist/hooks/useApproval.d.ts +47 -0
- package/dist/hooks/useApproval.js +247 -0
- package/dist/hooks/useBacchaSearch.d.ts +57 -0
- package/dist/hooks/useBacchaSearch.js +254 -0
- package/dist/hooks/useBusinessAudit.d.ts +24 -0
- package/dist/hooks/useBusinessAudit.js +51 -0
- package/dist/hooks/useColumnFreezing.d.ts +85 -0
- package/dist/hooks/useColumnFreezing.js +201 -0
- package/dist/hooks/useColumnMetadata.d.ts +20 -0
- package/dist/hooks/useColumnMetadata.js +44 -0
- package/dist/hooks/useConditionalFormatting.d.ts +43 -0
- package/dist/hooks/useConditionalFormatting.js +193 -0
- package/dist/hooks/useDebounce.d.ts +14 -0
- package/dist/hooks/useDebounce.js +45 -0
- package/dist/hooks/useDraft.d.ts +46 -0
- package/dist/hooks/useDraft.js +178 -0
- package/dist/hooks/useFormValidation.d.ts +37 -0
- package/dist/hooks/useFormValidation.js +65 -0
- package/dist/hooks/useGridSettings.d.ts +26 -0
- package/dist/hooks/useGridSettings.js +82 -0
- package/dist/hooks/useGridTheme.d.ts +59 -0
- package/dist/hooks/useGridTheme.js +199 -0
- package/dist/hooks/useId.d.ts +2 -0
- package/dist/hooks/useId.js +17 -0
- package/dist/hooks/useIntelligentColumnSizing.d.ts +71 -0
- package/dist/hooks/useIntelligentColumnSizing.js +310 -0
- package/dist/hooks/useKeyboardNavigation.d.ts +33 -0
- package/dist/hooks/useKeyboardNavigation.js +189 -0
- package/dist/hooks/useNotifications.d.ts +7 -0
- package/dist/hooks/useNotifications.js +56 -0
- package/dist/hooks/usePrevious.d.ts +9 -0
- package/dist/hooks/usePrevious.js +17 -0
- package/dist/hooks/useRowSelection.d.ts +45 -0
- package/dist/hooks/useRowSelection.js +147 -0
- package/dist/hooks/useSignalR.d.ts +13 -0
- package/dist/hooks/useSignalR.js +50 -0
- package/dist/hooks/useTheme.d.ts +59 -0
- package/dist/hooks/useTheme.js +261 -0
- package/dist/hooks/useTranslation.d.ts +5 -0
- package/dist/hooks/useTranslation.js +17 -0
- package/dist/hooks/useUnsavedChanges.d.ts +40 -0
- package/dist/hooks/useUnsavedChanges.js +83 -0
- package/dist/index.d.ts +2 -3173
- package/dist/index.js +4 -25937
- package/dist/lib/api/activity/audit/audit.d.ts +34 -0
- package/dist/lib/api/activity/audit/audit.js +44 -0
- package/dist/lib/api/activity/audit/index.d.ts +6 -0
- package/dist/lib/api/activity/audit/index.js +7 -0
- package/dist/lib/api/activity/audit/send.d.ts +152 -0
- package/dist/lib/api/activity/audit/send.js +403 -0
- package/dist/lib/api/activity/email/client.d.ts +167 -0
- package/dist/lib/api/activity/email/client.js +455 -0
- package/dist/lib/api/activity/email/index.d.ts +7 -0
- package/dist/lib/api/activity/email/index.js +10 -0
- package/dist/lib/api/activity/email/password-reset.d.ts +8 -0
- package/dist/lib/api/activity/email/password-reset.js +55 -0
- package/dist/lib/api/activity/email/templates.d.ts +10 -0
- package/dist/lib/api/activity/email/templates.js +531 -0
- package/dist/lib/api/activity/email/types.d.ts +237 -0
- package/dist/lib/api/activity/email/types.js +21 -0
- package/dist/lib/api/activity/index.d.ts +12 -0
- package/dist/lib/api/activity/index.js +15 -0
- package/dist/lib/api/activity/messaging/messaging.d.ts +149 -0
- package/dist/lib/api/activity/messaging/messaging.js +245 -0
- package/dist/lib/api/activity/notifications/index.d.ts +9 -0
- package/dist/lib/api/activity/notifications/index.js +9 -0
- package/dist/lib/api/activity/notifications/notifications.d.ts +59 -0
- package/dist/lib/api/activity/notifications/notifications.js +218 -0
- package/dist/lib/api/activity/notifications/reminders.d.ts +35 -0
- package/dist/lib/api/activity/notifications/reminders.js +25 -0
- package/dist/lib/api/activity/notifications/send.d.ts +122 -0
- package/dist/lib/api/activity/notifications/send.js +252 -0
- package/dist/lib/api/activity/notifications/types.d.ts +119 -0
- package/dist/lib/api/activity/notifications/types.js +62 -0
- package/dist/lib/api/activity/notify-and-log.d.ts +50 -0
- package/dist/lib/api/activity/notify-and-log.js +60 -0
- package/dist/lib/api/activity/remarks/index.d.ts +2 -0
- package/dist/lib/api/activity/remarks/index.js +2 -0
- package/dist/lib/api/activity/remarks/remarks.d.ts +83 -0
- package/dist/lib/api/activity/remarks/remarks.js +179 -0
- package/dist/lib/api/activity/storage.d.ts +28 -0
- package/dist/lib/api/activity/storage.js +79 -0
- package/dist/lib/api/ai/chat.d.ts +67 -0
- package/dist/lib/api/ai/chat.js +212 -0
- package/dist/lib/api/ai/types.d.ts +69 -0
- package/dist/lib/api/ai/types.js +5 -0
- package/dist/lib/api/approval/approvals.d.ts +66 -0
- package/dist/lib/api/approval/approvals.js +205 -0
- package/dist/lib/api/approval/index.d.ts +5 -0
- package/dist/lib/api/approval/index.js +6 -0
- package/dist/lib/api/auth/auth.d.ts +12 -0
- package/dist/lib/api/auth/auth.js +148 -0
- package/dist/lib/api/auth/index.d.ts +1 -0
- package/dist/lib/api/auth/index.js +4 -0
- package/dist/lib/api/auth/password-reset-otp.d.ts +49 -0
- package/dist/lib/api/auth/password-reset-otp.js +185 -0
- package/dist/lib/api/auth/two-factor-auth.d.ts +55 -0
- package/dist/lib/api/auth/two-factor-auth.js +84 -0
- package/dist/lib/api/auth/two-factor.d.ts +41 -0
- package/dist/lib/api/auth/two-factor.js +180 -0
- package/dist/lib/api/core/auth-helpers.d.ts +13 -0
- package/dist/lib/api/core/auth-helpers.js +137 -0
- package/dist/lib/api/core/client.d.ts +37 -0
- package/dist/lib/api/core/client.js +301 -0
- package/dist/lib/api/core/config.d.ts +46 -0
- package/dist/lib/api/core/config.js +238 -0
- package/dist/lib/api/core/index.d.ts +6 -0
- package/dist/lib/api/core/index.js +11 -0
- package/dist/lib/api/core/session-validator.d.ts +55 -0
- package/dist/lib/api/core/session-validator.js +94 -0
- package/dist/lib/api/core/types.d.ts +192 -0
- package/dist/lib/api/core/types.js +3 -0
- package/dist/lib/api/core/utils.d.ts +15 -0
- package/dist/lib/api/core/utils.js +64 -0
- package/dist/lib/api/dashboard/costing.d.ts +129 -0
- package/dist/lib/api/dashboard/costing.js +8 -0
- package/dist/lib/api/dashboard/management.d.ts +91 -0
- package/dist/lib/api/dashboard/management.js +5 -0
- package/dist/lib/api/dashboard/sales.d.ts +87 -0
- package/dist/lib/api/dashboard/sales.js +5 -0
- package/dist/lib/api/draft/drafts.d.ts +49 -0
- package/dist/lib/api/draft/drafts.js +274 -0
- package/dist/lib/api/draft/index.d.ts +5 -0
- package/dist/lib/api/draft/index.js +6 -0
- package/dist/lib/api/enquiry/enquiry.d.ts +324 -0
- package/dist/lib/api/enquiry/enquiry.js +617 -0
- package/dist/lib/api/enquiry/index.d.ts +2 -0
- package/dist/lib/api/enquiry/index.js +4 -0
- package/dist/lib/api/enquiry/rate-enquiry.d.ts +97 -0
- package/dist/lib/api/enquiry/rate-enquiry.js +69 -0
- package/dist/lib/api/estimation/categories.d.ts +28 -0
- package/dist/lib/api/estimation/categories.js +104 -0
- package/dist/lib/api/estimation/category-defaults.d.ts +56 -0
- package/dist/lib/api/estimation/category-defaults.js +41 -0
- package/dist/lib/api/estimation/company-config.d.ts +59 -0
- package/dist/lib/api/estimation/company-config.js +19 -0
- package/dist/lib/api/estimation/content.d.ts +103 -0
- package/dist/lib/api/estimation/content.js +203 -0
- package/dist/lib/api/estimation/freight.d.ts +34 -0
- package/dist/lib/api/estimation/freight.js +18 -0
- package/dist/lib/api/estimation/grid-costing-drafts.d.ts +38 -0
- package/dist/lib/api/estimation/grid-costing-drafts.js +21 -0
- package/dist/lib/api/estimation/grid-costing.d.ts +353 -0
- package/dist/lib/api/estimation/grid-costing.js +126 -0
- package/dist/lib/api/estimation/index.d.ts +10 -0
- package/dist/lib/api/estimation/index.js +22 -0
- package/dist/lib/api/estimation/legacy-costing.d.ts +42 -0
- package/dist/lib/api/estimation/legacy-costing.js +46 -0
- package/dist/lib/api/estimation/machines.d.ts +32 -0
- package/dist/lib/api/estimation/machines.js +67 -0
- package/dist/lib/api/estimation/planning.d.ts +479 -0
- package/dist/lib/api/estimation/planning.js +385 -0
- package/dist/lib/api/estimation/qualities.d.ts +128 -0
- package/dist/lib/api/estimation/qualities.js +229 -0
- package/dist/lib/api/estimation/quotation-load.d.ts +30 -0
- package/dist/lib/api/estimation/quotation-load.js +46 -0
- package/dist/lib/api/estimation/quotation-save.d.ts +88 -0
- package/dist/lib/api/estimation/quotation-save.js +101 -0
- package/dist/lib/api/estimation/quote-check.d.ts +19 -0
- package/dist/lib/api/estimation/quote-check.js +28 -0
- package/dist/lib/api/estimation/quotepanel.d.ts +304 -0
- package/dist/lib/api/estimation/quotepanel.js +489 -0
- package/dist/lib/api/estimation/shipper-planning.d.ts +71 -0
- package/dist/lib/api/estimation/shipper-planning.js +208 -0
- package/dist/lib/api/estimation/wastage.d.ts +40 -0
- package/dist/lib/api/estimation/wastage.js +40 -0
- package/dist/lib/api/index.d.ts +7 -0
- package/dist/lib/api/index.js +17 -0
- package/dist/lib/api/integration/proxy.d.ts +7 -0
- package/dist/lib/api/integration/proxy.js +34 -0
- package/dist/lib/api/master/category.d.ts +126 -0
- package/dist/lib/api/master/category.js +208 -0
- package/dist/lib/api/master/company.d.ts +167 -0
- package/dist/lib/api/master/company.js +368 -0
- package/dist/lib/api/master/hsn.d.ts +36 -0
- package/dist/lib/api/master/hsn.js +54 -0
- package/dist/lib/api/master/index.d.ts +12 -0
- package/dist/lib/api/master/index.js +27 -0
- package/dist/lib/api/master/item.d.ts +158 -0
- package/dist/lib/api/master/item.js +135 -0
- package/dist/lib/api/master/ledger.d.ts +173 -0
- package/dist/lib/api/master/ledger.js +391 -0
- package/dist/lib/api/master/logistics.d.ts +117 -0
- package/dist/lib/api/master/logistics.js +107 -0
- package/dist/lib/api/master/machine.d.ts +406 -0
- package/dist/lib/api/master/machine.js +570 -0
- package/dist/lib/api/master/material-group.d.ts +97 -0
- package/dist/lib/api/master/material-group.js +96 -0
- package/dist/lib/api/master/other.d.ts +65 -0
- package/dist/lib/api/master/other.js +56 -0
- package/dist/lib/api/master/process-types.d.ts +178 -0
- package/dist/lib/api/master/process-types.js +4 -0
- package/dist/lib/api/master/process.d.ts +94 -0
- package/dist/lib/api/master/process.js +124 -0
- package/dist/lib/api/master/production-units.d.ts +10 -0
- package/dist/lib/api/master/production-units.js +15 -0
- package/dist/lib/api/master/rate.d.ts +174 -0
- package/dist/lib/api/master/rate.js +196 -0
- package/dist/lib/api/master/tool.d.ts +48 -0
- package/dist/lib/api/master/tool.js +80 -0
- package/dist/lib/api/master/user.d.ts +473 -0
- package/dist/lib/api/master/user.js +147 -0
- package/dist/lib/api/settings/erp-parameters.d.ts +33 -0
- package/dist/lib/api/settings/erp-parameters.js +61 -0
- package/dist/lib/api/utility/index.d.ts +1 -0
- package/dist/lib/api/utility/index.js +5 -0
- package/dist/lib/api/utility/menu.d.ts +32 -0
- package/dist/lib/api/utility/menu.js +128 -0
- package/dist/lib/auth.d.ts +3 -0
- package/dist/lib/auth.js +7 -0
- package/dist/lib/pwa.d.ts +8 -0
- package/dist/lib/pwa.js +53 -0
- package/dist/lib/react-query-config.d.ts +140 -0
- package/dist/lib/react-query-config.js +131 -0
- package/dist/lib/security/audit-logger.d.ts +71 -0
- package/dist/lib/security/audit-logger.js +173 -0
- package/dist/lib/security/rate-limiter.d.ts +28 -0
- package/dist/lib/security/rate-limiter.js +118 -0
- package/dist/lib/server-url.d.ts +18 -0
- package/dist/lib/server-url.js +70 -0
- package/dist/lib/svg-utils.d.ts +62 -0
- package/dist/lib/svg-utils.js +206 -0
- package/dist/lib/theme/types.d.ts +109 -0
- package/dist/lib/theme/types.js +231 -0
- package/dist/lib/theme/utils.d.ts +73 -0
- package/dist/lib/theme/utils.js +343 -0
- package/dist/lib/types/index.d.ts +58 -0
- package/dist/lib/types/index.js +2 -0
- package/dist/lib/utils/attachment-loader.d.ts +27 -0
- package/dist/lib/utils/attachment-loader.js +79 -0
- package/dist/lib/utils/client-lead-utils.d.ts +24 -0
- package/dist/lib/utils/client-lead-utils.js +56 -0
- package/dist/lib/utils/device-detection.d.ts +19 -0
- package/dist/lib/utils/device-detection.js +105 -0
- package/dist/lib/utils/logout-cleanup.d.ts +63 -0
- package/dist/lib/utils/logout-cleanup.js +297 -0
- package/dist/lib/utils/planning-prefs.d.ts +10 -0
- package/dist/lib/utils/planning-prefs.js +27 -0
- package/dist/lib/utils.d.ts +20 -0
- package/dist/lib/utils.js +60 -0
- package/dist/lib/vision/dieline-extractor.d.ts +38 -0
- package/dist/lib/vision/dieline-extractor.js +313 -0
- package/dist/lib/vision/reference-grid.d.ts +52 -0
- package/dist/lib/vision/reference-grid.js +241 -0
- package/dist/locales/de.json +79 -0
- package/dist/locales/en.json +2217 -0
- package/dist/locales/es.json +79 -0
- package/dist/locales/fr.json +78 -0
- package/dist/locales/hi.json +1599 -0
- package/dist/providers.d.ts +14 -0
- package/dist/providers.js +15 -0
- package/dist/services/GlobalLoadingService.d.ts +216 -0
- package/dist/services/GlobalLoadingService.js +216 -0
- package/dist/styles/grid-themes.css +346 -0
- package/dist/styles/index.css +5 -0
- package/dist/{sidebar-scrollbar-NBCB2OO2.css → styles/sidebar-scrollbar.css} +45 -45
- package/dist/styles/tokens.css +713 -0
- package/dist/types/approval.d.ts +201 -0
- package/dist/types/approval.js +19 -0
- package/dist/types/audit.d.ts +87 -0
- package/dist/types/audit.js +47 -0
- package/dist/types/draft.d.ts +142 -0
- package/dist/types/draft.js +19 -0
- package/dist/types/master.d.ts +154 -0
- package/dist/types/master.js +3 -0
- package/dist/types/shipper-planning.d.ts +277 -0
- package/dist/types/shipper-planning.js +6 -0
- package/package.json +182 -119
- package/dist/chunk-4PEFU7N7.js +0 -16
- package/dist/chunk-4PEFU7N7.js.map +0 -1
- package/dist/de-EKT7SUK5.js +0 -106
- package/dist/de-EKT7SUK5.js.map +0 -1
- package/dist/en-QRFSIEHD.js +0 -1685
- package/dist/en-QRFSIEHD.js.map +0 -1
- package/dist/es-KHZMWGUI.js +0 -106
- package/dist/es-KHZMWGUI.js.map +0 -1
- package/dist/fr-X2XUXSHK.js +0 -105
- package/dist/fr-X2XUXSHK.js.map +0 -1
- package/dist/hi-YRATOE5Q.js +0 -415
- package/dist/hi-YRATOE5Q.js.map +0 -1
- package/dist/index.cjs +0 -28216
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -3173
- package/dist/index.js.map +0 -1
- /package/{src → dist/cjs}/styles/index.css +0 -0
|
@@ -0,0 +1,581 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.DynamicSidebar = DynamicSidebar;
|
|
41
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
42
|
+
const React = __importStar(require("react"));
|
|
43
|
+
const link_1 = __importDefault(require("next/link"));
|
|
44
|
+
const navigation_1 = require("next/navigation");
|
|
45
|
+
const lucide_react_1 = require("lucide-react");
|
|
46
|
+
const utils_1 = require("../../lib/utils.js");
|
|
47
|
+
const useTranslation_1 = require("../../hooks/useTranslation.js");
|
|
48
|
+
const ui_1 = require("../ui/index.js");
|
|
49
|
+
const api_1 = require("../../lib/api/index.js");
|
|
50
|
+
const utils_2 = require("../../lib/utils.js");
|
|
51
|
+
require("../../styles/sidebar-scrollbar.css");
|
|
52
|
+
const react_dom_1 = require("react-dom");
|
|
53
|
+
const SidebarContextMenu_1 = require("./SidebarContextMenu.js");
|
|
54
|
+
const SidebarPreferencesContext_1 = require("../../contexts/SidebarPreferencesContext.js");
|
|
55
|
+
// Route mapping imported from shared utility: getModuleRoutePath
|
|
56
|
+
// Routes that support quick-create via sidebar "+" button.
|
|
57
|
+
// When clicked, navigates to {route}?create=true — the page opens its create modal.
|
|
58
|
+
// Add routes here as pages implement ?create=true support.
|
|
59
|
+
const QUICK_CREATE_ROUTES = new Set([
|
|
60
|
+
'/enquiry',
|
|
61
|
+
'/enquiry/rate-enquiry',
|
|
62
|
+
'/master/tool',
|
|
63
|
+
'/master/user',
|
|
64
|
+
'/master/item',
|
|
65
|
+
'/master/machine',
|
|
66
|
+
'/master/process',
|
|
67
|
+
'/master/ledger',
|
|
68
|
+
'/master/material-group',
|
|
69
|
+
'/master/category',
|
|
70
|
+
'/synthia',
|
|
71
|
+
]);
|
|
72
|
+
// Icon mapping for group names with more intelligent and specific icons
|
|
73
|
+
const getGroupIcon = (groupName) => {
|
|
74
|
+
const name = groupName.toLowerCase();
|
|
75
|
+
// Dashboard & Home
|
|
76
|
+
if (name.includes('dashboard') || name.includes('home')) {
|
|
77
|
+
return lucide_react_1.Gauge;
|
|
78
|
+
}
|
|
79
|
+
// Sales & Enquiry
|
|
80
|
+
else if (name.includes('sales')) {
|
|
81
|
+
return lucide_react_1.TrendingUp;
|
|
82
|
+
}
|
|
83
|
+
else if (name.includes('enquiry') || name.includes('inquiry') || name.includes('lead')) {
|
|
84
|
+
return lucide_react_1.MessageSquare;
|
|
85
|
+
}
|
|
86
|
+
// Estimation & Quotation
|
|
87
|
+
else if (name.includes('estimation') || name.includes('estimate') || name.includes('costing')) {
|
|
88
|
+
return lucide_react_1.Calculator;
|
|
89
|
+
}
|
|
90
|
+
else if (name.includes('quotation') || name.includes('quote')) {
|
|
91
|
+
return lucide_react_1.Receipt;
|
|
92
|
+
}
|
|
93
|
+
// Master Data Management
|
|
94
|
+
else if (name.includes('masters') || name.includes('master')) {
|
|
95
|
+
return lucide_react_1.Database;
|
|
96
|
+
}
|
|
97
|
+
else if (name.includes('user') && name.includes('management')) {
|
|
98
|
+
return lucide_react_1.UserCog;
|
|
99
|
+
}
|
|
100
|
+
else if (name.includes('company') || name.includes('branch')) {
|
|
101
|
+
return lucide_react_1.Building;
|
|
102
|
+
}
|
|
103
|
+
else if (name.includes('category') || name.includes('tag')) {
|
|
104
|
+
return lucide_react_1.Tag;
|
|
105
|
+
}
|
|
106
|
+
else if (name.includes('process')) {
|
|
107
|
+
return lucide_react_1.Layers;
|
|
108
|
+
}
|
|
109
|
+
else if (name.includes('machine') || name.includes('equipment')) {
|
|
110
|
+
return lucide_react_1.Cog;
|
|
111
|
+
}
|
|
112
|
+
else if (name.includes('item') || name.includes('product') || name.includes('inventory')) {
|
|
113
|
+
return lucide_react_1.Boxes;
|
|
114
|
+
}
|
|
115
|
+
else if (name.includes('ledger') || name.includes('account')) {
|
|
116
|
+
return lucide_react_1.BookOpen;
|
|
117
|
+
}
|
|
118
|
+
// Reports & Analytics
|
|
119
|
+
else if (name.includes('mis') || name.includes('report')) {
|
|
120
|
+
return lucide_react_1.PieChart;
|
|
121
|
+
}
|
|
122
|
+
else if (name.includes('analytics') || name.includes('analysis')) {
|
|
123
|
+
return lucide_react_1.BarChart3;
|
|
124
|
+
}
|
|
125
|
+
// Operations
|
|
126
|
+
else if (name.includes('order') || name.includes('purchase')) {
|
|
127
|
+
return lucide_react_1.ShoppingCart;
|
|
128
|
+
}
|
|
129
|
+
else if (name.includes('price') || name.includes('material')) {
|
|
130
|
+
return lucide_react_1.DollarSign;
|
|
131
|
+
}
|
|
132
|
+
else if (name.includes('quality') || name.includes('control')) {
|
|
133
|
+
return lucide_react_1.Shield;
|
|
134
|
+
}
|
|
135
|
+
else if (name.includes('production') || name.includes('manufacturing')) {
|
|
136
|
+
return lucide_react_1.Factory;
|
|
137
|
+
}
|
|
138
|
+
// General
|
|
139
|
+
else if (name.includes('customer') || name.includes('client')) {
|
|
140
|
+
return lucide_react_1.Users;
|
|
141
|
+
}
|
|
142
|
+
else if (name.includes('setting') || name.includes('config')) {
|
|
143
|
+
return lucide_react_1.Settings;
|
|
144
|
+
}
|
|
145
|
+
else if (name.includes('target') || name.includes('goal')) {
|
|
146
|
+
return lucide_react_1.Target;
|
|
147
|
+
}
|
|
148
|
+
// Activity & User Tasks
|
|
149
|
+
else if (name.includes('activity') || name.includes('email') || name.includes('notification') || name.includes('audit')) {
|
|
150
|
+
return lucide_react_1.Activity;
|
|
151
|
+
}
|
|
152
|
+
// Default icon
|
|
153
|
+
return lucide_react_1.ClipboardCheck;
|
|
154
|
+
};
|
|
155
|
+
function DynamicSidebar({ isCollapsed = false, onMenuItemClick, onToggleSidebar, onQuickCreate, className, companyId, userId }) {
|
|
156
|
+
const pathname = (0, navigation_1.usePathname)();
|
|
157
|
+
const router = (0, navigation_1.useRouter)();
|
|
158
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
159
|
+
const { favorites, hiddenItems, isFavorite, isHidden } = (0, SidebarPreferencesContext_1.useSidebarPreferences)();
|
|
160
|
+
const [groupedModules, setGroupedModules] = React.useState([]);
|
|
161
|
+
const [openItems, setOpenItems] = React.useState([]);
|
|
162
|
+
const [expandedSubModules, setExpandedSubModules] = React.useState([]);
|
|
163
|
+
const [loading, setLoading] = React.useState(true);
|
|
164
|
+
const [error, setError] = React.useState(null);
|
|
165
|
+
const [needsScroll, setNeedsScroll] = React.useState(false);
|
|
166
|
+
const navRef = React.useRef(null);
|
|
167
|
+
const [hoveredGroup, setHoveredGroup] = React.useState(null);
|
|
168
|
+
const [hoverPosition, setHoverPosition] = React.useState({ x: 0, y: 0 });
|
|
169
|
+
const hoverTimeoutRef = React.useRef(null);
|
|
170
|
+
const [isMounted, setIsMounted] = React.useState(false);
|
|
171
|
+
const previousCollapsedRef = React.useRef(isCollapsed);
|
|
172
|
+
const disableHoverRef = React.useRef(false);
|
|
173
|
+
// Filter out hidden items and collect favorites
|
|
174
|
+
const filteredGroupedModules = React.useMemo(() => {
|
|
175
|
+
return groupedModules.map(group => ({
|
|
176
|
+
...group,
|
|
177
|
+
modules: group.modules.filter(module => {
|
|
178
|
+
const modulePath = (0, utils_2.getModuleRoutePath)(module.ModuleName);
|
|
179
|
+
return !isHidden(modulePath);
|
|
180
|
+
})
|
|
181
|
+
})).filter(group => group.modules.length > 0);
|
|
182
|
+
}, [groupedModules, hiddenItems, isHidden]);
|
|
183
|
+
// Collect favorite modules across all groups
|
|
184
|
+
const favoriteModules = React.useMemo(() => {
|
|
185
|
+
const favs = [];
|
|
186
|
+
groupedModules.forEach(group => {
|
|
187
|
+
group.modules.forEach(module => {
|
|
188
|
+
const modulePath = (0, utils_2.getModuleRoutePath)(module.ModuleName);
|
|
189
|
+
if (isFavorite(modulePath) && !isHidden(modulePath)) {
|
|
190
|
+
favs.push({ module, groupName: group.groupName });
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
return favs;
|
|
195
|
+
}, [groupedModules, favorites, isFavorite, isHidden]);
|
|
196
|
+
// Ensure component is mounted before using portal
|
|
197
|
+
React.useEffect(() => {
|
|
198
|
+
setIsMounted(true);
|
|
199
|
+
}, []);
|
|
200
|
+
// Smart navigation loading with caching
|
|
201
|
+
React.useEffect(() => {
|
|
202
|
+
// Don't fetch if companyId or userId are not available yet
|
|
203
|
+
if (!companyId || !userId) {
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
let isCancelled = false;
|
|
207
|
+
const fetchNavigation = async () => {
|
|
208
|
+
// Check cache first - include session start time to invalidate cache across logins
|
|
209
|
+
const sessionKey = sessionStorage.getItem('session_start_time') || Date.now().toString();
|
|
210
|
+
if (!sessionStorage.getItem('session_start_time')) {
|
|
211
|
+
sessionStorage.setItem('session_start_time', sessionKey);
|
|
212
|
+
}
|
|
213
|
+
const cacheKey = `nav_${companyId}_${userId}_${sessionKey}`;
|
|
214
|
+
const cachedNav = localStorage.getItem(cacheKey);
|
|
215
|
+
const cacheTime = localStorage.getItem(`${cacheKey}_time`);
|
|
216
|
+
// Use cache if less than 5 minutes old
|
|
217
|
+
if (cachedNav && cacheTime && Date.now() - parseInt(cacheTime) < 300000) {
|
|
218
|
+
try {
|
|
219
|
+
const navigation = JSON.parse(cachedNav);
|
|
220
|
+
setGroupedModules(navigation);
|
|
221
|
+
setLoading(false);
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
catch {
|
|
225
|
+
// Invalid cache, proceed to fetch
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
try {
|
|
229
|
+
setLoading(true);
|
|
230
|
+
setError(null);
|
|
231
|
+
const navigation = await (0, api_1.getDynamicNavigation)(companyId, userId);
|
|
232
|
+
if (!isCancelled) {
|
|
233
|
+
setGroupedModules(navigation);
|
|
234
|
+
// Cache the result
|
|
235
|
+
localStorage.setItem(cacheKey, JSON.stringify(navigation));
|
|
236
|
+
localStorage.setItem(`${cacheKey}_time`, Date.now().toString());
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
catch (err) {
|
|
240
|
+
if (!isCancelled) {
|
|
241
|
+
const errorMessage = err instanceof Error ? err.message : 'Failed to load navigation menu';
|
|
242
|
+
setError(errorMessage);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
finally {
|
|
246
|
+
if (!isCancelled) {
|
|
247
|
+
setLoading(false);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
fetchNavigation();
|
|
252
|
+
// Cleanup function to prevent memory leaks
|
|
253
|
+
return () => {
|
|
254
|
+
isCancelled = true;
|
|
255
|
+
if (hoverTimeoutRef.current) {
|
|
256
|
+
clearTimeout(hoverTimeoutRef.current);
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
}, [companyId, userId]);
|
|
260
|
+
// Auto-open parent items based on current path (optimized)
|
|
261
|
+
React.useEffect(() => {
|
|
262
|
+
if (groupedModules.length === 0)
|
|
263
|
+
return;
|
|
264
|
+
const groupsToOpen = groupedModules
|
|
265
|
+
.filter(group => group.modules && group.modules.some(module => {
|
|
266
|
+
const modulePath = (0, utils_2.getModuleRoutePath)(module.ModuleName);
|
|
267
|
+
return modulePath !== '#' && pathname && (pathname === modulePath || pathname.startsWith(modulePath + '/'));
|
|
268
|
+
}))
|
|
269
|
+
.map(group => group.groupName);
|
|
270
|
+
if (groupsToOpen.length > 0) {
|
|
271
|
+
setOpenItems(prev => {
|
|
272
|
+
// Only update if there are actually new items to open
|
|
273
|
+
const newItems = groupsToOpen.filter(item => !prev.includes(item));
|
|
274
|
+
return newItems.length > 0 ? [...prev, ...newItems] : prev;
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
}, [pathname, groupedModules]);
|
|
278
|
+
const toggleItem = React.useCallback((itemName) => {
|
|
279
|
+
setOpenItems(prev => {
|
|
280
|
+
const isCurrentlyOpen = prev.includes(itemName);
|
|
281
|
+
if (isCurrentlyOpen) {
|
|
282
|
+
return prev.filter(id => id !== itemName);
|
|
283
|
+
}
|
|
284
|
+
else {
|
|
285
|
+
return [...prev, itemName];
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
}, []);
|
|
289
|
+
const toggleSubModule = React.useCallback((moduleName) => {
|
|
290
|
+
setExpandedSubModules(prev => {
|
|
291
|
+
const isCurrentlyExpanded = prev.includes(moduleName);
|
|
292
|
+
if (isCurrentlyExpanded) {
|
|
293
|
+
return prev.filter(name => name !== moduleName);
|
|
294
|
+
}
|
|
295
|
+
else {
|
|
296
|
+
return [...prev, moduleName];
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
}, []);
|
|
300
|
+
// Collect all module paths for specificity check
|
|
301
|
+
const allModulePaths = React.useMemo(() => {
|
|
302
|
+
const paths = [];
|
|
303
|
+
const collectPaths = (modules) => {
|
|
304
|
+
for (const mod of modules) {
|
|
305
|
+
const p = (0, utils_2.getModuleRoutePath)(mod.ModuleName);
|
|
306
|
+
if (p !== '#')
|
|
307
|
+
paths.push(p);
|
|
308
|
+
if (mod.children)
|
|
309
|
+
collectPaths(mod.children);
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
for (const group of groupedModules) {
|
|
313
|
+
collectPaths(group.modules);
|
|
314
|
+
}
|
|
315
|
+
return paths;
|
|
316
|
+
}, [groupedModules]);
|
|
317
|
+
const isModuleActive = React.useCallback((module) => {
|
|
318
|
+
const modulePath = (0, utils_2.getModuleRoutePath)(module.ModuleName);
|
|
319
|
+
// Can't be active if it's a non-clickable path
|
|
320
|
+
if (modulePath === '#' || !pathname) {
|
|
321
|
+
return false;
|
|
322
|
+
}
|
|
323
|
+
// Exact match for the module path
|
|
324
|
+
if (pathname === modulePath) {
|
|
325
|
+
return true;
|
|
326
|
+
}
|
|
327
|
+
// Check if current path is a sub-route of this module
|
|
328
|
+
// But only if no OTHER module is a more specific (longer) match
|
|
329
|
+
if (pathname.startsWith(modulePath + '/')) {
|
|
330
|
+
const hasMoreSpecificMatch = allModulePaths.some(p => p !== modulePath && p.length > modulePath.length && pathname.startsWith(p) && p.startsWith(modulePath + '/'));
|
|
331
|
+
return !hasMoreSpecificMatch;
|
|
332
|
+
}
|
|
333
|
+
return false;
|
|
334
|
+
}, [pathname, allModulePaths]);
|
|
335
|
+
const handleModuleClick = (module) => {
|
|
336
|
+
// Clear hover state and disable hover for 600ms (enough for collapse + cooldown)
|
|
337
|
+
setHoveredGroup(null);
|
|
338
|
+
disableHoverRef.current = true;
|
|
339
|
+
setTimeout(() => {
|
|
340
|
+
disableHoverRef.current = false;
|
|
341
|
+
}, 600);
|
|
342
|
+
onMenuItemClick?.();
|
|
343
|
+
};
|
|
344
|
+
// Clear hover state when sidebar expands/collapses and track previous state
|
|
345
|
+
React.useEffect(() => {
|
|
346
|
+
// If transitioning from expanded to collapsed (user clicked menu item)
|
|
347
|
+
if (!previousCollapsedRef.current && isCollapsed) {
|
|
348
|
+
// Clear hover immediately and prevent it from showing during transition
|
|
349
|
+
setHoveredGroup(null);
|
|
350
|
+
}
|
|
351
|
+
previousCollapsedRef.current = isCollapsed;
|
|
352
|
+
}, [isCollapsed]);
|
|
353
|
+
// Check if scrolling is needed
|
|
354
|
+
React.useEffect(() => {
|
|
355
|
+
const checkScrollNeeded = () => {
|
|
356
|
+
if (navRef.current) {
|
|
357
|
+
const { scrollHeight, clientHeight } = navRef.current;
|
|
358
|
+
setNeedsScroll(scrollHeight > clientHeight);
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
checkScrollNeeded();
|
|
362
|
+
window.addEventListener('resize', checkScrollNeeded);
|
|
363
|
+
return () => window.removeEventListener('resize', checkScrollNeeded);
|
|
364
|
+
}, [groupedModules, openItems, isCollapsed]);
|
|
365
|
+
// Clean up hover timeout on unmount
|
|
366
|
+
React.useEffect(() => {
|
|
367
|
+
return () => {
|
|
368
|
+
if (hoverTimeoutRef.current) {
|
|
369
|
+
clearTimeout(hoverTimeoutRef.current);
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
}, []);
|
|
373
|
+
if (loading) {
|
|
374
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)("flex flex-col h-full bg-primary-hover border-r border-primary/20 transition-all duration-300 shadow-lg", isCollapsed ? "w-14" : "w-56 sm:w-60 md:w-64", className) }));
|
|
375
|
+
}
|
|
376
|
+
if (error) {
|
|
377
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)("flex flex-col h-full bg-primary-hover border-r border-primary/20 transition-all duration-300 shadow-lg", isCollapsed ? "w-14" : "w-56 sm:w-60 md:w-64", className), children: (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-center justify-center h-full text-muted-foreground p-4 text-center", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.AlertCircle, { className: "w-8 h-8 mb-2 opacity-50" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm", children: t("Failed to load navigation menu") }), (0, jsx_runtime_1.jsx)("button", { onClick: () => window.location.reload(), className: "mt-4 text-xs text-primary hover:underline", children: t("Retry") })] }) }));
|
|
378
|
+
}
|
|
379
|
+
// Recursive rendering for modules with sub-modules
|
|
380
|
+
const renderModuleWithChildren = (module, depth) => {
|
|
381
|
+
const modulePath = (0, utils_2.getModuleRoutePath)(module.ModuleName);
|
|
382
|
+
const isActive = isModuleActive(module);
|
|
383
|
+
const hasChildren = module.children && module.children.length > 0;
|
|
384
|
+
const isExpanded = expandedSubModules.includes(module.ModuleName);
|
|
385
|
+
const paddingLeft = depth > 0 ? `${1 + depth * 0.75}rem` : '1rem';
|
|
386
|
+
if (hasChildren) {
|
|
387
|
+
// Module with children - render as expandable
|
|
388
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "space-y-0.5", children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("flex items-center justify-between py-2.5 pr-4 text-sm transition-all duration-200 pointer-events-auto rounded-lg mx-2 cursor-pointer", isActive
|
|
389
|
+
? "bg-white/25 text-white border-l-2 border-white"
|
|
390
|
+
: "text-white/70 hover:bg-white/15 hover:text-white"), style: { paddingLeft }, onClick: () => toggleSubModule(module.ModuleName), children: [(0, jsx_runtime_1.jsx)("span", { className: "truncate flex-1", children: module.ModuleDisplayName }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: (0, utils_1.cn)("h-3.5 w-3.5 transition-transform duration-200 flex-shrink-0 ml-2", isExpanded && "rotate-90") })] }), isExpanded && module.children && ((0, jsx_runtime_1.jsx)("div", { className: "space-y-0.5", children: module.children.map(child => renderModuleWithChildren(child, depth + 1)) }))] }, module.ModuleDisplayName));
|
|
391
|
+
}
|
|
392
|
+
// Leaf module - render as link with optional quick-create
|
|
393
|
+
const eligible = QUICK_CREATE_ROUTES.has(modulePath);
|
|
394
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "group/leaf flex items-center", children: [(0, jsx_runtime_1.jsxs)(link_1.default, { href: modulePath, className: (0, utils_1.cn)("flex items-center py-2.5 pr-4 text-sm transition-all duration-200 pointer-events-auto rounded-lg mx-2 flex-1", isActive
|
|
395
|
+
? "bg-white/25 text-white border-l-2 border-white"
|
|
396
|
+
: "text-white/70 hover:bg-white/15 hover:text-white hover:translate-x-1"), style: { paddingLeft }, onClick: () => {
|
|
397
|
+
setHoveredGroup(null);
|
|
398
|
+
onMenuItemClick?.();
|
|
399
|
+
}, children: [(0, jsx_runtime_1.jsx)("span", { className: "truncate", children: module.ModuleDisplayName }), isActive && ((0, jsx_runtime_1.jsx)("div", { className: "ml-auto w-1.5 h-1.5 bg-white rounded-full" }))] }), eligible && ((0, jsx_runtime_1.jsx)("button", { type: "button", className: "opacity-0 group-hover/leaf:opacity-100 flex-shrink-0 p-1.5 rounded-md text-white/70 hover:text-white hover:bg-white/25 transition-all duration-200 mr-2", title: t('Create new'), onClick: (e) => {
|
|
400
|
+
e.preventDefault();
|
|
401
|
+
e.stopPropagation();
|
|
402
|
+
if (onQuickCreate) {
|
|
403
|
+
onQuickCreate(modulePath, module.ModuleDisplayName);
|
|
404
|
+
}
|
|
405
|
+
else {
|
|
406
|
+
router.push(`${modulePath}?create=true`);
|
|
407
|
+
}
|
|
408
|
+
setHoveredGroup(null);
|
|
409
|
+
onMenuItemClick?.();
|
|
410
|
+
}, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Plus, { className: "h-4 w-4", strokeWidth: 2.5 }) }))] }, module.ModuleDisplayName));
|
|
411
|
+
};
|
|
412
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("flex flex-col h-full bg-primary-hover border-r border-primary/20 transition-all duration-300 shadow-lg", isCollapsed ? "w-14 overflow-visible" : "w-56 sm:w-60 md:w-64", className), children: [(0, jsx_runtime_1.jsx)("nav", { ref: navRef, className: "flex-1 p-4 custom-scrollbar overflow-y-auto overflow-x-visible", children: (0, jsx_runtime_1.jsxs)("ul", { className: "space-y-2", children: [favoriteModules.length > 0 && !isCollapsed && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [favoriteModules.map(({ module, groupName }) => ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(SidebarContextMenu_1.SidebarContextMenu, { modulePath: (0, utils_2.getModuleRoutePath)(module.ModuleName), moduleDisplayName: module.ModuleDisplayName, children: (0, jsx_runtime_1.jsx)(NavigationLink, { module: module, isActive: isModuleActive(module), isCollapsed: isCollapsed, onQuickCreate: onQuickCreate, isQuickCreateEligible: QUICK_CREATE_ROUTES.has((0, utils_2.getModuleRoutePath)(module.ModuleName)), onMenuItemClick: () => {
|
|
413
|
+
setHoveredGroup(null);
|
|
414
|
+
disableHoverRef.current = true;
|
|
415
|
+
setTimeout(() => { disableHoverRef.current = false; }, 600);
|
|
416
|
+
onMenuItemClick?.();
|
|
417
|
+
}, groupName: module.ModuleDisplayName, isFavorite: true }) }) }, `fav-${module.ModuleDisplayName}`))), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("div", { className: "border-b border-white/10 my-2 mx-3" }) })] })), filteredGroupedModules.length === 0 && !loading && !error ? ((0, jsx_runtime_1.jsx)("li", { className: "flex items-center justify-center py-8", children: !isCollapsed ? ((0, jsx_runtime_1.jsx)("p", { className: "text-sm text-white/60 text-center", children: t("No navigation items available") })) : ((0, jsx_runtime_1.jsx)("div", { className: "w-2 h-2 bg-white/30 rounded-full" })) })) : (filteredGroupedModules.map((group) => ((0, jsx_runtime_1.jsx)("li", { children: group.modules.filter((module) => {
|
|
418
|
+
if (group.modules.length === 1 &&
|
|
419
|
+
module.ModuleDisplayName.toLowerCase().trim() === group.groupName.toLowerCase().trim()) {
|
|
420
|
+
return false;
|
|
421
|
+
}
|
|
422
|
+
return true;
|
|
423
|
+
}).length > 0 ? ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)("relative overflow-visible", isCollapsed && "group"), children: (0, jsx_runtime_1.jsxs)(ui_1.Collapsible, { open: openItems.includes(group.groupName) && !isCollapsed, children: [(0, jsx_runtime_1.jsx)(SidebarContextMenu_1.SidebarGroupContextMenu, { groupName: group.groupName, modulePaths: group.modules.map(m => (0, utils_2.getModuleRoutePath)(m.ModuleName)), children: (0, jsx_runtime_1.jsxs)("button", { type: "button", className: (0, utils_1.cn)("flex w-full items-center rounded-md px-3 py-2 text-sm font-medium transition-all duration-200 relative overflow-visible cursor-pointer", "text-white/70 hover:bg-white/20 hover:text-white hover:shadow-md active:bg-white/25", "focus:outline-none focus:ring-2 focus:ring-white/30 focus:bg-white/20", isCollapsed && "justify-center px-2 hover:bg-white/20 hover:text-white", !isCollapsed && group.modules.some(module => isModuleActive(module)) && "bg-white/10 text-white"), "aria-expanded": openItems.includes(group.groupName) && !isCollapsed, "aria-label": isCollapsed ? t("Expand {{groupName}} menu", { groupName: group.groupName }) : t("Toggle {{groupName}} menu", { groupName: group.groupName }), onMouseEnter: (e) => {
|
|
424
|
+
// Only show hover if sidebar is collapsed, was already collapsed, and hover is not disabled
|
|
425
|
+
if (isCollapsed && previousCollapsedRef.current && !disableHoverRef.current) {
|
|
426
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
427
|
+
// Position overlay to the right of the sidebar with some spacing
|
|
428
|
+
setHoverPosition({
|
|
429
|
+
x: rect.right + 12,
|
|
430
|
+
y: Math.max(rect.top - 8, 8) // Ensure it doesn't go off screen
|
|
431
|
+
});
|
|
432
|
+
// Clear any existing timeout
|
|
433
|
+
if (hoverTimeoutRef.current) {
|
|
434
|
+
clearTimeout(hoverTimeoutRef.current);
|
|
435
|
+
}
|
|
436
|
+
// Set hover immediately
|
|
437
|
+
setHoveredGroup(group.groupName);
|
|
438
|
+
}
|
|
439
|
+
}, onMouseLeave: () => {
|
|
440
|
+
if (isCollapsed) {
|
|
441
|
+
// Add delay before hiding to allow mouse movement to overlay
|
|
442
|
+
hoverTimeoutRef.current = setTimeout(() => {
|
|
443
|
+
setHoveredGroup(null);
|
|
444
|
+
}, 200);
|
|
445
|
+
}
|
|
446
|
+
}, onClick: (e) => {
|
|
447
|
+
if (isCollapsed) {
|
|
448
|
+
// When collapsed, prevent default and expand sidebar
|
|
449
|
+
e.preventDefault();
|
|
450
|
+
e.stopPropagation();
|
|
451
|
+
if (onMenuItemClick) {
|
|
452
|
+
onMenuItemClick();
|
|
453
|
+
}
|
|
454
|
+
// Auto-open the submenu when expanding from collapsed
|
|
455
|
+
setTimeout(() => {
|
|
456
|
+
if (!openItems.includes(group.groupName)) {
|
|
457
|
+
setOpenItems(prev => [...prev, group.groupName]);
|
|
458
|
+
}
|
|
459
|
+
}, 100);
|
|
460
|
+
}
|
|
461
|
+
else {
|
|
462
|
+
// When expanded, manually toggle the submenu
|
|
463
|
+
e.preventDefault();
|
|
464
|
+
e.stopPropagation();
|
|
465
|
+
// Manually toggle the open state
|
|
466
|
+
const isCurrentlyOpen = openItems.includes(group.groupName);
|
|
467
|
+
if (isCurrentlyOpen) {
|
|
468
|
+
setOpenItems(prev => prev.filter(item => item !== group.groupName));
|
|
469
|
+
}
|
|
470
|
+
else {
|
|
471
|
+
setOpenItems(prev => [...prev, group.groupName]);
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}, onKeyDown: (e) => {
|
|
475
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
476
|
+
if (isCollapsed) {
|
|
477
|
+
e.preventDefault();
|
|
478
|
+
if (onMenuItemClick) {
|
|
479
|
+
onMenuItemClick();
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
// When expanded, let the Collapsible handle keyboard events naturally
|
|
483
|
+
}
|
|
484
|
+
else if (e.key === 'ArrowRight' && isCollapsed) {
|
|
485
|
+
// Show hover overlay on arrow right when collapsed
|
|
486
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
487
|
+
setHoverPosition({
|
|
488
|
+
x: rect.right + 12,
|
|
489
|
+
y: Math.max(rect.top - 8, 8)
|
|
490
|
+
});
|
|
491
|
+
setHoveredGroup(group.groupName);
|
|
492
|
+
}
|
|
493
|
+
else if (e.key === 'Escape') {
|
|
494
|
+
// Hide hover overlay on escape
|
|
495
|
+
setHoveredGroup(null);
|
|
496
|
+
}
|
|
497
|
+
}, children: [(() => {
|
|
498
|
+
const GroupIcon = getGroupIcon(group.groupName);
|
|
499
|
+
return (0, jsx_runtime_1.jsx)(GroupIcon, { className: (0, utils_1.cn)("flex-shrink-0 h-5 w-5", "text-white/60 group-hover:text-white", !isCollapsed && "mr-3") });
|
|
500
|
+
})(), !isCollapsed && ((0, jsx_runtime_1.jsx)("span", { className: "truncate", children: group.groupName })), !isCollapsed && ((0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: (0, utils_1.cn)("ml-auto h-4 w-4 transition-all duration-300 ease-in-out", openItems.includes(group.groupName) && "rotate-180 text-white") }))] }) }), (0, jsx_runtime_1.jsx)(ui_1.CollapsibleContent, { className: "space-y-1 transition-all duration-300 ease-in-out", children: (0, jsx_runtime_1.jsx)("ul", { className: "mt-2 ml-6 space-y-1 border-l-2 border-primary/40 pl-3", children: group.modules.filter((module) => {
|
|
501
|
+
if (group.modules.length === 1 &&
|
|
502
|
+
module.ModuleDisplayName.toLowerCase().trim() === group.groupName.toLowerCase().trim()) {
|
|
503
|
+
return false;
|
|
504
|
+
}
|
|
505
|
+
return true;
|
|
506
|
+
}).map((module) => ((0, jsx_runtime_1.jsx)("li", { className: "pl-1 transition-all duration-200 hover:translate-x-1", children: (0, jsx_runtime_1.jsx)(SidebarContextMenu_1.SidebarContextMenu, { modulePath: (0, utils_2.getModuleRoutePath)(module.ModuleName), moduleDisplayName: module.ModuleDisplayName, children: (0, jsx_runtime_1.jsx)(NavigationLink, { module: module, isActive: isModuleActive(module), isChild: true, onQuickCreate: onQuickCreate, isQuickCreateEligible: QUICK_CREATE_ROUTES.has((0, utils_2.getModuleRoutePath)(module.ModuleName)), onMenuItemClick: () => {
|
|
507
|
+
setHoveredGroup(null);
|
|
508
|
+
disableHoverRef.current = true;
|
|
509
|
+
setTimeout(() => { disableHoverRef.current = false; }, 600);
|
|
510
|
+
onMenuItemClick?.();
|
|
511
|
+
} }) }) }, module.ModuleDisplayName))) }) })] }) })) : (
|
|
512
|
+
/* Regular navigation link without children */
|
|
513
|
+
(0, jsx_runtime_1.jsx)(SidebarContextMenu_1.SidebarContextMenu, { modulePath: (0, utils_2.getModuleRoutePath)(group.modules[0].ModuleName), moduleDisplayName: group.modules[0].ModuleDisplayName, children: (0, jsx_runtime_1.jsx)(NavigationLink, { module: group.modules[0], isActive: isModuleActive(group.modules[0]), isCollapsed: isCollapsed, onQuickCreate: onQuickCreate, isQuickCreateEligible: QUICK_CREATE_ROUTES.has((0, utils_2.getModuleRoutePath)(group.modules[0].ModuleName)), onMenuItemClick: () => {
|
|
514
|
+
setHoveredGroup(null);
|
|
515
|
+
disableHoverRef.current = true;
|
|
516
|
+
setTimeout(() => { disableHoverRef.current = false; }, 600);
|
|
517
|
+
onMenuItemClick?.();
|
|
518
|
+
}, groupName: group.groupName }) })) }, group.groupName))))] }) }), (0, jsx_runtime_1.jsx)("div", { className: "p-4 border-t border-primary/20", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [onToggleSidebar && ((0, jsx_runtime_1.jsx)("button", { onClick: (e) => {
|
|
519
|
+
e.stopPropagation();
|
|
520
|
+
onToggleSidebar();
|
|
521
|
+
}, className: (0, utils_1.cn)("p-2 text-white/60 hover:text-white transition-colors hover:bg-transparent focus:outline-none", isCollapsed ? "w-full flex justify-center" : "flex-shrink-0"), title: isCollapsed ? t("Expand sidebar") : t("Collapse sidebar"), children: isCollapsed ? ((0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-5 w-5" })) : ((0, jsx_runtime_1.jsx)(lucide_react_1.ChevronLeft, { className: "h-5 w-5" })) })), !isCollapsed && ((0, jsx_runtime_1.jsx)("div", { className: "text-xs text-[rgb(var(--fg-muted))] ml-3", children: "Estimo v3.0.18" }))] }) })] }), hoveredGroup && isCollapsed && isMounted && (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)("div", { className: "fixed z-40 transition-all duration-200 ease-out transform scale-100", style: {
|
|
522
|
+
left: hoverPosition.x,
|
|
523
|
+
top: hoverPosition.y,
|
|
524
|
+
pointerEvents: 'auto'
|
|
525
|
+
}, onMouseEnter: () => {
|
|
526
|
+
// Clear any pending hide timeout when entering the overlay
|
|
527
|
+
if (hoverTimeoutRef.current) {
|
|
528
|
+
clearTimeout(hoverTimeoutRef.current);
|
|
529
|
+
}
|
|
530
|
+
setHoveredGroup(hoveredGroup);
|
|
531
|
+
}, onMouseLeave: () => {
|
|
532
|
+
// Immediate hide when leaving the overlay
|
|
533
|
+
setHoveredGroup(null);
|
|
534
|
+
}, children: (0, jsx_runtime_1.jsxs)("div", { className: "bg-primary-hover rounded-xl shadow-2xl border border-primary/30 py-3 w-[85vw] sm:min-w-[220px] sm:max-w-[280px] sm:w-auto backdrop-blur-sm ring-2 ring-white/20 max-h-[calc(100vh-10rem)] sm:max-h-[calc(100vh-15rem)] flex flex-col", children: [(0, jsx_runtime_1.jsx)("div", { className: "px-4 py-2 text-sm font-semibold text-white border-b border-primary/30 mb-2 flex-shrink-0", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center", children: [(() => {
|
|
535
|
+
const GroupIcon = getGroupIcon(hoveredGroup);
|
|
536
|
+
return (0, jsx_runtime_1.jsx)(GroupIcon, { className: "h-4 w-4 mr-3 text-white" });
|
|
537
|
+
})(), (0, jsx_runtime_1.jsx)("span", { className: "truncate", children: hoveredGroup })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-1 overflow-y-auto flex-1 custom-scrollbar", children: groupedModules
|
|
538
|
+
.find(group => group.groupName === hoveredGroup)
|
|
539
|
+
?.modules.filter((module) => {
|
|
540
|
+
const group = groupedModules.find(g => g.groupName === hoveredGroup);
|
|
541
|
+
if (group && group.modules.length === 1 &&
|
|
542
|
+
module.ModuleDisplayName.toLowerCase().trim() === hoveredGroup.toLowerCase().trim()) {
|
|
543
|
+
return false;
|
|
544
|
+
}
|
|
545
|
+
return true;
|
|
546
|
+
}).map((module) => {
|
|
547
|
+
return renderModuleWithChildren(module, 0);
|
|
548
|
+
}) }), (0, jsx_runtime_1.jsx)("div", { className: "absolute top-6 left-0 transform -translate-x-1 w-2 h-2 bg-primary-hover border-l border-t border-primary/30 rotate-45" })] }) }), document.body)] }));
|
|
549
|
+
}
|
|
550
|
+
function NavigationLink({ module, isActive, isCollapsed = false, isChild = false, onMenuItemClick, onQuickCreate, isQuickCreateEligible = false, groupName, isFavorite = false }) {
|
|
551
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
552
|
+
const router = (0, navigation_1.useRouter)();
|
|
553
|
+
// Get the route path using shared utility
|
|
554
|
+
const modulePath = (0, utils_2.getModuleRoutePath)(module.ModuleName);
|
|
555
|
+
// Use group name for display if this is a single module group
|
|
556
|
+
const displayName = groupName || module.ModuleDisplayName;
|
|
557
|
+
// Show quick-create button only for registered modules (not collapsed)
|
|
558
|
+
const showQuickCreate = !isCollapsed && isQuickCreateEligible;
|
|
559
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "group/nav flex items-center", children: [(0, jsx_runtime_1.jsxs)(link_1.default, { href: modulePath, className: (0, utils_1.cn)("flex items-center rounded-md px-3 py-2 text-sm font-medium transition-all duration-200 w-full relative overflow-hidden", isActive
|
|
560
|
+
? "bg-white/25 text-white hover:bg-white/30 shadow-sm border-l-2 border-white"
|
|
561
|
+
: "text-white/70 hover:bg-white/20 hover:text-white hover:shadow-sm hover:scale-[1.02]", isChild && "text-xs pl-3 py-1.5 hover:bg-white/15", isCollapsed && "justify-center px-2"), onClick: (e) => {
|
|
562
|
+
// Always call onMenuItemClick to close/collapse sidebar
|
|
563
|
+
onMenuItemClick?.();
|
|
564
|
+
}, children: [isFavorite && !isCollapsed && ((0, jsx_runtime_1.jsx)(lucide_react_1.Star, { className: "h-3 w-3 mr-2 fill-yellow-400 text-yellow-400 flex-shrink-0" })), !isChild && !isFavorite && (() => {
|
|
565
|
+
const GroupIcon = getGroupIcon(groupName || module.ModuleDisplayName);
|
|
566
|
+
return (0, jsx_runtime_1.jsx)(GroupIcon, { className: (0, utils_1.cn)("flex-shrink-0", isChild ? "h-3 w-3" : "h-5 w-5", isActive
|
|
567
|
+
? "text-white"
|
|
568
|
+
: "text-white/60 group-hover/nav:text-white", !isCollapsed && "mr-3") });
|
|
569
|
+
})(), !isCollapsed && ((0, jsx_runtime_1.jsx)("span", { className: "truncate", children: displayName })), !isCollapsed && ((0, jsx_runtime_1.jsx)("div", { className: "ml-auto flex items-center gap-1", children: isActive && ((0, jsx_runtime_1.jsx)("span", { className: "inline-block rounded-full px-2 py-0.5 text-xs font-medium bg-white/20 text-white", children: t("Active") })) }))] }), showQuickCreate && ((0, jsx_runtime_1.jsx)("button", { type: "button", className: "opacity-0 group-hover/nav:opacity-100 flex-shrink-0 p-1.5 rounded-md text-white/70 hover:text-white hover:bg-white/25 transition-all duration-200 mr-1", title: t('Create new'), onClick: (e) => {
|
|
570
|
+
e.preventDefault();
|
|
571
|
+
e.stopPropagation();
|
|
572
|
+
if (onQuickCreate) {
|
|
573
|
+
onQuickCreate(modulePath, module.ModuleDisplayName);
|
|
574
|
+
}
|
|
575
|
+
else {
|
|
576
|
+
// Default: navigate to the module with ?create=true
|
|
577
|
+
router.push(`${modulePath}?create=true`);
|
|
578
|
+
}
|
|
579
|
+
onMenuItemClick?.();
|
|
580
|
+
}, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Plus, { className: "h-4 w-4", strokeWidth: 2.5 }) }))] }));
|
|
581
|
+
}
|