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,219 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { usePathname, useRouter } from 'next/navigation';
|
|
5
|
+
import { Home, MessageSquare, ClipboardCheck, Calculator, Menu, Receipt, Database, Cog, Layers, Boxes, BookOpen, Activity, TrendingUp, Users, Settings, Tag, BarChart3, Bell, Sparkles, FileText, FileCheck, Mail, Building, } from 'lucide-react';
|
|
6
|
+
import { cn, getModuleRoutePath } from '../../lib/utils.js';
|
|
7
|
+
import { useTranslation } from '../../hooks/useTranslation.js';
|
|
8
|
+
import { useNavigation } from '../../contexts/NavigationContext.js';
|
|
9
|
+
// ── Icon name registry — maps lucide-react icon name strings to components ──
|
|
10
|
+
// Add new icons here as the DB starts referencing them.
|
|
11
|
+
const ICON_NAME_MAP = {
|
|
12
|
+
Home, MessageSquare, ClipboardCheck, Calculator, Menu,
|
|
13
|
+
Receipt, Database, Cog, Layers, Boxes, BookOpen,
|
|
14
|
+
Activity, TrendingUp, Users, Settings,
|
|
15
|
+
Tag, BarChart3, Bell, Sparkles, FileText, FileCheck, Mail, Building,
|
|
16
|
+
};
|
|
17
|
+
/** Resolve a lucide-react icon by name string (from DB IconName column). */
|
|
18
|
+
export function getIconByName(name) {
|
|
19
|
+
if (!name)
|
|
20
|
+
return null;
|
|
21
|
+
return ICON_NAME_MAP[name] || null;
|
|
22
|
+
}
|
|
23
|
+
// ── Path-based fallback (used when DB IconName is missing) ──
|
|
24
|
+
const MODULE_ICON_MAP = {
|
|
25
|
+
'/home': Home,
|
|
26
|
+
'/synthia': Sparkles,
|
|
27
|
+
'/enquiry': FileText,
|
|
28
|
+
'/enquiry/sales': FileText,
|
|
29
|
+
'/enquiry/rate': TrendingUp,
|
|
30
|
+
'/costing/estimation': Calculator,
|
|
31
|
+
'/costing/quote-panel': FileCheck,
|
|
32
|
+
'/costing/price-approval': Receipt,
|
|
33
|
+
'/costing/grid-costing': BarChart3,
|
|
34
|
+
'/activity/notifications': Bell,
|
|
35
|
+
'/activity/email': Mail,
|
|
36
|
+
'/activity/auditlogs': Activity,
|
|
37
|
+
'/activity/messages': MessageSquare,
|
|
38
|
+
'/master/user': Users,
|
|
39
|
+
'/master/customer': Users,
|
|
40
|
+
'/master/item': Boxes,
|
|
41
|
+
'/master/machine': Cog,
|
|
42
|
+
'/master/process': Layers,
|
|
43
|
+
'/master/ledger': BookOpen,
|
|
44
|
+
'/master/category': Tag,
|
|
45
|
+
'/master/material-group': Database,
|
|
46
|
+
'/master/rate': TrendingUp,
|
|
47
|
+
'/master/tool': Settings,
|
|
48
|
+
'/master/company': Building,
|
|
49
|
+
'/report': BarChart3,
|
|
50
|
+
'/dashboard': BarChart3,
|
|
51
|
+
'/dashboard/sales': BarChart3,
|
|
52
|
+
'/settings': Settings,
|
|
53
|
+
};
|
|
54
|
+
export function getIconForPath(path) {
|
|
55
|
+
return MODULE_ICON_MAP[path] || ClipboardCheck;
|
|
56
|
+
}
|
|
57
|
+
// ── Canonical short names for bottom nav display ──
|
|
58
|
+
const MODULE_NAME_MAP = {
|
|
59
|
+
'/home': 'Home',
|
|
60
|
+
'/synthia': 'Parkbuddy',
|
|
61
|
+
'/enquiry': 'Enquiry',
|
|
62
|
+
'/enquiry/sales': 'Enquiry',
|
|
63
|
+
'/enquiry/rate': 'Rate Enquiry',
|
|
64
|
+
'/costing/estimation': 'Estimation',
|
|
65
|
+
'/costing/quote-panel': 'Approvals',
|
|
66
|
+
'/costing/price-approval': 'Price Appr.',
|
|
67
|
+
'/costing/grid-costing': 'Grid Costing',
|
|
68
|
+
'/activity/notifications': 'Alerts',
|
|
69
|
+
'/activity/email': 'Email',
|
|
70
|
+
'/activity/auditlogs': 'Audit Logs',
|
|
71
|
+
'/activity/messages': 'Messages',
|
|
72
|
+
'/master/user': 'Users',
|
|
73
|
+
'/master/customer': 'Customers',
|
|
74
|
+
'/master/item': 'Items',
|
|
75
|
+
'/master/machine': 'Machines',
|
|
76
|
+
'/master/process': 'Processes',
|
|
77
|
+
'/master/ledger': 'Ledgers',
|
|
78
|
+
'/master/category': 'Categories',
|
|
79
|
+
'/master/material-group': 'Materials',
|
|
80
|
+
'/master/rate': 'Rates',
|
|
81
|
+
'/master/tool': 'Tools',
|
|
82
|
+
'/master/company': 'Company',
|
|
83
|
+
'/report': 'Reports',
|
|
84
|
+
'/dashboard': 'Dashboard',
|
|
85
|
+
'/dashboard/sales': 'Sales',
|
|
86
|
+
'/settings': 'Settings',
|
|
87
|
+
};
|
|
88
|
+
export function getNameForPath(path, fallback) {
|
|
89
|
+
return MODULE_NAME_MAP[path] || fallback;
|
|
90
|
+
}
|
|
91
|
+
// ── Default middle 3 tabs ──
|
|
92
|
+
const DEFAULT_QUICK_TABS = [
|
|
93
|
+
{ name: 'Enquiry', path: '/enquiry/sales' },
|
|
94
|
+
{ name: 'Parkbuddy', path: '/synthia' },
|
|
95
|
+
{ name: 'Approvals', path: '/costing/quote-panel' },
|
|
96
|
+
];
|
|
97
|
+
const STORAGE_KEY = 'bottom-nav-quick-tabs-v4';
|
|
98
|
+
/** Read saved quick tabs from localStorage */
|
|
99
|
+
export function getQuickTabs() {
|
|
100
|
+
if (typeof window === 'undefined')
|
|
101
|
+
return DEFAULT_QUICK_TABS;
|
|
102
|
+
try {
|
|
103
|
+
const stored = localStorage.getItem(STORAGE_KEY);
|
|
104
|
+
if (stored) {
|
|
105
|
+
const parsed = JSON.parse(stored);
|
|
106
|
+
if (Array.isArray(parsed) && parsed.length === 3)
|
|
107
|
+
return parsed;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
catch { }
|
|
111
|
+
return DEFAULT_QUICK_TABS;
|
|
112
|
+
}
|
|
113
|
+
/** Save quick tabs to localStorage */
|
|
114
|
+
export function setQuickTabs(tabs) {
|
|
115
|
+
localStorage.setItem(STORAGE_KEY, JSON.stringify(tabs.slice(0, 3)));
|
|
116
|
+
window.dispatchEvent(new CustomEvent('quick-tabs-changed'));
|
|
117
|
+
}
|
|
118
|
+
/** Reset to defaults */
|
|
119
|
+
export function resetQuickTabs() {
|
|
120
|
+
localStorage.removeItem(STORAGE_KEY);
|
|
121
|
+
window.dispatchEvent(new CustomEvent('quick-tabs-changed'));
|
|
122
|
+
}
|
|
123
|
+
// Export icon map + defaults for the home page settings section
|
|
124
|
+
export { MODULE_ICON_MAP, DEFAULT_QUICK_TABS };
|
|
125
|
+
export function BottomNav({ onOpenMenu, navRef }) {
|
|
126
|
+
const pathname = usePathname();
|
|
127
|
+
const router = useRouter();
|
|
128
|
+
const { t } = useTranslation();
|
|
129
|
+
const { groupedModules } = useNavigation();
|
|
130
|
+
const [quickTabs, setQuickTabsState] = React.useState(DEFAULT_QUICK_TABS);
|
|
131
|
+
// Build a path → module lookup so we can resolve IconName / DisplayName from DB
|
|
132
|
+
const moduleByPath = React.useMemo(() => {
|
|
133
|
+
const map = new Map();
|
|
134
|
+
const visit = (mod) => {
|
|
135
|
+
const path = getModuleRoutePath(mod.ModuleName);
|
|
136
|
+
if (path && path !== '#') {
|
|
137
|
+
map.set(path, { displayName: mod.ModuleDisplayName, iconName: mod.IconName });
|
|
138
|
+
}
|
|
139
|
+
if (Array.isArray(mod.children))
|
|
140
|
+
for (const c of mod.children)
|
|
141
|
+
visit(c);
|
|
142
|
+
};
|
|
143
|
+
for (const g of groupedModules)
|
|
144
|
+
for (const m of g.modules)
|
|
145
|
+
visit(m);
|
|
146
|
+
return map;
|
|
147
|
+
}, [groupedModules]);
|
|
148
|
+
// Load from localStorage on mount + listen for changes
|
|
149
|
+
React.useEffect(() => {
|
|
150
|
+
setQuickTabsState(getQuickTabs());
|
|
151
|
+
const handleChange = () => setQuickTabsState(getQuickTabs());
|
|
152
|
+
window.addEventListener('quick-tabs-changed', handleChange);
|
|
153
|
+
window.addEventListener('storage', handleChange);
|
|
154
|
+
return () => {
|
|
155
|
+
window.removeEventListener('quick-tabs-changed', handleChange);
|
|
156
|
+
window.removeEventListener('storage', handleChange);
|
|
157
|
+
};
|
|
158
|
+
}, []);
|
|
159
|
+
const isActive = (path) => {
|
|
160
|
+
if (path === '/home')
|
|
161
|
+
return pathname === '/home' || pathname === '/';
|
|
162
|
+
return pathname === path || pathname?.startsWith(path + '/');
|
|
163
|
+
};
|
|
164
|
+
// Fixed tabs — always present. Filter them out of quickTabs to prevent duplicate keys.
|
|
165
|
+
const FIXED_PATHS = new Set(['/home']);
|
|
166
|
+
const filteredQuickTabs = quickTabs.filter(t => !FIXED_PATHS.has(t.path));
|
|
167
|
+
// Resolve current pathname to a known module path
|
|
168
|
+
const currentModulePath = React.useMemo(() => {
|
|
169
|
+
if (!pathname)
|
|
170
|
+
return null;
|
|
171
|
+
// Try exact match first, then progressively shorter prefixes
|
|
172
|
+
const candidates = Object.keys(MODULE_NAME_MAP);
|
|
173
|
+
// Exact match
|
|
174
|
+
if (candidates.includes(pathname))
|
|
175
|
+
return pathname;
|
|
176
|
+
// Prefix match — longest wins (e.g. /enquiry/sales before /enquiry)
|
|
177
|
+
const sorted = candidates.sort((a, b) => b.length - a.length);
|
|
178
|
+
for (const c of sorted) {
|
|
179
|
+
if (pathname === c || pathname.startsWith(c + '/'))
|
|
180
|
+
return c;
|
|
181
|
+
}
|
|
182
|
+
return null;
|
|
183
|
+
}, [pathname]);
|
|
184
|
+
const baseTabs = [
|
|
185
|
+
{ name: 'Home', path: '/home' },
|
|
186
|
+
...filteredQuickTabs,
|
|
187
|
+
];
|
|
188
|
+
// If user is on a page not in their tabs, show it as a dynamic 5th tab
|
|
189
|
+
const isCurrentInTabs = baseTabs.some(tab => {
|
|
190
|
+
if (tab.path === '/home')
|
|
191
|
+
return pathname === '/home' || pathname === '/';
|
|
192
|
+
return pathname === tab.path || pathname?.startsWith(tab.path + '/');
|
|
193
|
+
});
|
|
194
|
+
const dynamicTab = (!isCurrentInTabs && currentModulePath)
|
|
195
|
+
? (() => {
|
|
196
|
+
const mod = moduleByPath.get(currentModulePath);
|
|
197
|
+
return {
|
|
198
|
+
name: mod?.displayName || getNameForPath(currentModulePath, currentModulePath.split('/').pop() || ''),
|
|
199
|
+
path: currentModulePath,
|
|
200
|
+
iconName: mod?.iconName,
|
|
201
|
+
isDynamic: true,
|
|
202
|
+
};
|
|
203
|
+
})()
|
|
204
|
+
: null;
|
|
205
|
+
const allTabs = [
|
|
206
|
+
...baseTabs.map(t => ({ ...t, isDynamic: false })),
|
|
207
|
+
...(dynamicTab ? [dynamicTab] : []),
|
|
208
|
+
];
|
|
209
|
+
return (_jsx("nav", { ref: navRef, id: "mobile-bottom-nav", className: "fixed bottom-0 left-0 right-0 z-50 lg:hidden bg-[rgb(var(--bg-surface))] border-t border-[rgb(var(--bd-default))] transition-transform duration-200", style: { paddingBottom: 'env(safe-area-inset-bottom, 0px)' }, children: _jsxs("div", { className: "relative flex h-14 px-1", children: [allTabs.map((tab) => {
|
|
210
|
+
const active = isActive(tab.path);
|
|
211
|
+
const mod = moduleByPath.get(tab.path);
|
|
212
|
+
const Icon = getIconByName(tab.iconName) || getIconByName(mod?.iconName) || getIconForPath(tab.path);
|
|
213
|
+
return (_jsxs("button", { onClick: () => router.push(tab.path), className: cn('relative flex items-center justify-center flex-1 transition-all duration-200 touch-manipulation mx-0.5', active
|
|
214
|
+
? 'flex-col gap-1 -mt-3 h-[68px] rounded-t-2xl border border-b-0 border-[rgb(var(--bd-default))] bg-[rgb(var(--bg-surface))]'
|
|
215
|
+
: 'flex-col gap-1 h-14 bg-transparent hover:bg-[rgb(var(--bg-hover))]'), children: [active && (_jsxs(_Fragment, { children: [_jsx("div", { className: "absolute -left-2 bottom-0 w-2 h-2 pointer-events-none", children: _jsx("svg", { width: "8", height: "8", viewBox: "0 0 8 8", className: "absolute bottom-0 right-0", children: _jsx("path", { d: "M8,0 Q8,8 0,8 L0,0 Z", fill: "rgb(var(--bg-surface))" }) }) }), _jsx("div", { className: "absolute -right-2 bottom-0 w-2 h-2 pointer-events-none", children: _jsx("svg", { width: "8", height: "8", viewBox: "0 0 8 8", className: "absolute bottom-0 left-0", children: _jsx("path", { d: "M0,0 Q0,8 8,8 L8,0 Z", fill: "rgb(var(--bg-surface))" }) }) })] })), tab.isDynamic && !active && (_jsx("div", { className: "absolute top-1.5 w-1 h-1 rounded-full bg-[rgb(var(--color-primary))]" })), tab.path === '/synthia' && !mod?.iconName ? (_jsx("img", { src: "/app/synthia-logo.png", alt: "", className: cn('transition-all duration-200 shrink-0 h-5 w-5 rounded object-contain', active && 'h-6 w-6') })) : (_jsx(Icon, { className: cn('transition-all duration-200 shrink-0', active
|
|
216
|
+
? 'h-5 w-5 text-[rgb(var(--color-error-hover))] stroke-[2.5]'
|
|
217
|
+
: 'h-5 w-5 text-[rgb(var(--fg-muted))]') })), _jsx("span", { className: cn('text-[0.6rem] leading-none mt-0.5 truncate max-w-full px-0.5', active ? 'font-semibold text-[rgb(var(--color-error-hover))]' : 'font-medium text-[rgb(var(--fg-muted))]'), children: t(mod?.displayName || tab.name) })] }, tab.path));
|
|
218
|
+
}), _jsxs("button", { onClick: onOpenMenu, className: "relative flex flex-col items-center justify-center gap-1 flex-1 h-14 bg-transparent hover:bg-[rgb(var(--bg-hover))] transition-colors touch-manipulation mx-0.5", children: [_jsx(Menu, { className: "h-5 w-5 text-[rgb(var(--fg-muted))]" }), _jsx("span", { className: "text-[0.6rem] leading-none font-medium text-[rgb(var(--fg-muted))]", children: t('Menu') })] })] }) }));
|
|
219
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface FABAction {
|
|
2
|
+
label: string;
|
|
3
|
+
onClick: () => void;
|
|
4
|
+
}
|
|
5
|
+
interface FloatingActionButtonProps {
|
|
6
|
+
actions: FABAction[];
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function FloatingActionButton({ actions, className }: FloatingActionButtonProps): import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useRef, useEffect, useCallback } from 'react';
|
|
4
|
+
import { MoreHorizontal, X } from 'lucide-react';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
|
+
export function FloatingActionButton({ actions, className }) {
|
|
7
|
+
const [open, setOpen] = useState(false);
|
|
8
|
+
const [pos, setPos] = useState(null);
|
|
9
|
+
const dragging = useRef(false);
|
|
10
|
+
const hasMoved = useRef(false);
|
|
11
|
+
const startPointer = useRef({ x: 0, y: 0 });
|
|
12
|
+
const startPos = useRef({ x: 0, y: 0 });
|
|
13
|
+
const fabRef = useRef(null);
|
|
14
|
+
// Initialise position from saved value or default bottom-right
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
const saved = localStorage.getItem('fabPos');
|
|
17
|
+
if (saved) {
|
|
18
|
+
try {
|
|
19
|
+
setPos(JSON.parse(saved));
|
|
20
|
+
}
|
|
21
|
+
catch { /* ignore */ }
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
setPos({ x: window.innerWidth - 64, y: window.innerHeight - 100 });
|
|
25
|
+
}
|
|
26
|
+
}, []);
|
|
27
|
+
const clamp = (value, min, max) => Math.min(Math.max(value, min), max);
|
|
28
|
+
const onPointerDown = useCallback((e) => {
|
|
29
|
+
if (!fabRef.current)
|
|
30
|
+
return;
|
|
31
|
+
dragging.current = true;
|
|
32
|
+
hasMoved.current = false;
|
|
33
|
+
startPointer.current = { x: e.clientX, y: e.clientY };
|
|
34
|
+
const rect = fabRef.current.getBoundingClientRect();
|
|
35
|
+
startPos.current = { x: rect.left, y: rect.top };
|
|
36
|
+
fabRef.current.setPointerCapture(e.pointerId);
|
|
37
|
+
e.preventDefault();
|
|
38
|
+
}, []);
|
|
39
|
+
const onPointerMove = useCallback((e) => {
|
|
40
|
+
if (!dragging.current || !fabRef.current)
|
|
41
|
+
return;
|
|
42
|
+
const dx = e.clientX - startPointer.current.x;
|
|
43
|
+
const dy = e.clientY - startPointer.current.y;
|
|
44
|
+
if (Math.abs(dx) > 4 || Math.abs(dy) > 4)
|
|
45
|
+
hasMoved.current = true;
|
|
46
|
+
const size = 48;
|
|
47
|
+
const newX = clamp(startPos.current.x + dx, 0, window.innerWidth - size);
|
|
48
|
+
const newY = clamp(startPos.current.y + dy, 0, window.innerHeight - size);
|
|
49
|
+
setPos({ x: newX, y: newY });
|
|
50
|
+
}, []);
|
|
51
|
+
const onPointerUp = useCallback((e) => {
|
|
52
|
+
if (!dragging.current)
|
|
53
|
+
return;
|
|
54
|
+
dragging.current = false;
|
|
55
|
+
if (pos)
|
|
56
|
+
localStorage.setItem('fabPos', JSON.stringify(pos));
|
|
57
|
+
// Only toggle open if it was a tap, not a drag
|
|
58
|
+
if (!hasMoved.current)
|
|
59
|
+
setOpen(prev => !prev);
|
|
60
|
+
e.preventDefault();
|
|
61
|
+
}, [pos]);
|
|
62
|
+
const handleAction = (action) => {
|
|
63
|
+
setOpen(false);
|
|
64
|
+
action.onClick();
|
|
65
|
+
};
|
|
66
|
+
if (!pos)
|
|
67
|
+
return null;
|
|
68
|
+
const actionsAbove = pos.y > window.innerHeight / 2;
|
|
69
|
+
return (_jsxs("div", { ref: fabRef, style: { left: pos.x, top: pos.y, touchAction: 'none' }, className: cn('fixed z-50 lg:hidden', className), onPointerDown: onPointerDown, onPointerMove: onPointerMove, onPointerUp: onPointerUp, children: [open && (_jsx("div", { className: cn('absolute right-0 flex flex-col gap-2 w-48 animate-in fade-in duration-200', actionsAbove
|
|
70
|
+
? 'bottom-full mb-4 slide-in-from-bottom-4'
|
|
71
|
+
: 'top-full mt-4 slide-in-from-top-4'), onPointerDown: e => e.stopPropagation(), children: actions.map((action, idx) => (_jsx("button", { onClick: () => handleAction(action), className: cn('w-full justify-start px-4 py-2.5 rounded-xl text-sm font-semibold text-left', 'bg-[rgb(var(--bg-surface))]/95 hover:bg-[rgb(var(--bg-surface))]', 'text-[rgb(var(--color-primary))]', 'border-2 border-[rgb(var(--color-success))]/60 hover:border-[rgb(var(--color-success))]', 'shadow-md hover:shadow-lg backdrop-blur-sm', 'transition-all duration-200 hover:scale-105 active:scale-95', 'whitespace-nowrap'), children: action.label }, idx))) })), _jsx("button", { className: cn('h-12 w-12 rounded-xl flex items-center justify-center', 'bg-[rgb(var(--color-primary))]/50 hover:bg-[rgb(var(--color-primary))]/65', 'border-2 border-[rgb(var(--color-primary))]/60 hover:border-[rgb(var(--color-primary))]/75', 'shadow-lg', 'transition-all duration-300 ease-out', 'hover:scale-110 active:scale-95', open && 'rotate-45'), "aria-label": open ? 'Close actions' : 'Open actions', "aria-expanded": open, onPointerDown: e => e.stopPropagation(), onClick: () => !hasMoved.current && setOpen(prev => !prev), children: open
|
|
72
|
+
? _jsx(X, { className: "h-8 w-8 text-[rgb(var(--color-primary-foreground))] stroke-[3] transition-transform duration-300" })
|
|
73
|
+
: _jsx(MoreHorizontal, { className: "h-8 w-8 text-[rgb(var(--color-primary-foreground))] stroke-[3] transition-transform duration-300" }) })] }));
|
|
74
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { LucideIcon } from "lucide-react";
|
|
3
|
+
export interface FooterKPI {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
value: string | number;
|
|
7
|
+
trend?: {
|
|
8
|
+
value: number;
|
|
9
|
+
direction: 'up' | 'down';
|
|
10
|
+
};
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
}
|
|
13
|
+
export interface FooterIconButton {
|
|
14
|
+
id: string;
|
|
15
|
+
icon: LucideIcon;
|
|
16
|
+
label: string;
|
|
17
|
+
onClick: () => void;
|
|
18
|
+
variant?: 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info';
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface FooterProps {
|
|
22
|
+
kpis?: FooterKPI[];
|
|
23
|
+
actions?: React.ReactNode;
|
|
24
|
+
iconButtons?: FooterIconButton[];
|
|
25
|
+
leftContent?: React.ReactNode;
|
|
26
|
+
className?: string;
|
|
27
|
+
sticky?: boolean;
|
|
28
|
+
compact?: boolean;
|
|
29
|
+
padding?: 'compact' | 'normal' | 'medium';
|
|
30
|
+
variant?: 'page' | 'modal';
|
|
31
|
+
gradient?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare function Footer({ kpis, actions, iconButtons, leftContent, className, sticky, compact, padding, variant, gradient }: FooterProps): React.JSX.Element;
|
|
34
|
+
export declare function CompactFooter({ className, children }: {
|
|
35
|
+
className?: string;
|
|
36
|
+
children?: React.ReactNode;
|
|
37
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
import { useTranslation } from "../../hooks/useTranslation.js";
|
|
5
|
+
export function Footer({ kpis, actions, iconButtons, leftContent, className, sticky = false, compact = false, padding, variant = 'page', gradient = false }) {
|
|
6
|
+
if (!kpis && !actions && !leftContent && !iconButtons) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
const isModal = variant === 'modal';
|
|
10
|
+
// Get variant colors — CSS variables only (theme-safe)
|
|
11
|
+
const getVariantColors = (variant = 'default') => {
|
|
12
|
+
switch (variant) {
|
|
13
|
+
case 'primary':
|
|
14
|
+
return 'bg-[rgb(var(--color-primary))]/10 hover:bg-[rgb(var(--color-primary))]/20 text-[rgb(var(--color-primary))]';
|
|
15
|
+
case 'success':
|
|
16
|
+
return 'bg-[rgb(var(--color-success))]/10 hover:bg-[rgb(var(--color-success))]/20 text-[rgb(var(--color-success))]';
|
|
17
|
+
case 'warning':
|
|
18
|
+
return 'bg-[rgb(var(--color-warning))]/10 hover:bg-[rgb(var(--color-warning))]/20 text-[rgb(var(--color-warning))]';
|
|
19
|
+
case 'error':
|
|
20
|
+
return 'bg-[rgb(var(--color-error))]/10 hover:bg-[rgb(var(--color-error))]/20 text-[rgb(var(--color-error))]';
|
|
21
|
+
case 'info':
|
|
22
|
+
return 'bg-[rgb(var(--color-info))]/10 hover:bg-[rgb(var(--color-info))]/20 text-[rgb(var(--color-info))]';
|
|
23
|
+
default:
|
|
24
|
+
return 'bg-[rgb(var(--bg-subtle))] hover:bg-[rgb(var(--bg-surface))] text-[rgb(var(--fg-default))]';
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
return (_jsx("footer", { className: cn("border-t border-[rgb(var(--bd-default))]",
|
|
28
|
+
// Background variants
|
|
29
|
+
!gradient && "bg-[rgb(var(--bg-surface))]",
|
|
30
|
+
// Shadow
|
|
31
|
+
!isModal && "shadow-lg",
|
|
32
|
+
// Mobile (< lg): sit ABOVE the fixed bottom nav (h-16, lg:hidden) and span the
|
|
33
|
+
// full width — there is no sidebar, so no left offset. Desktop: bottom edge,
|
|
34
|
+
// left margin for the collapsed sidebar.
|
|
35
|
+
sticky && "fixed right-0 z-[25] bottom-16 lg:bottom-0", sticky && !isModal && "left-0 lg:left-14",
|
|
36
|
+
// Shrink behavior for modal
|
|
37
|
+
isModal && "flex-shrink-0", className), children: _jsxs("div", { className: cn("flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2 sm:gap-4",
|
|
38
|
+
// Responsive padding
|
|
39
|
+
isModal ? "px-3 sm:px-4 md:px-6" : "px-2 sm:px-4", padding === 'compact' ? "py-1" :
|
|
40
|
+
padding === 'medium' ? "py-1.5 sm:py-2" :
|
|
41
|
+
padding === 'normal' ? "py-3 sm:py-4" :
|
|
42
|
+
compact ? "py-1" :
|
|
43
|
+
isModal ? "py-1.5 sm:py-2" : "py-3 sm:py-4"), children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2 sm:gap-4 w-full sm:w-auto", children: [leftContent, kpis && kpis.length > 0 && (_jsx("div", { className: "flex flex-wrap items-center gap-3 sm:gap-6 md:gap-8", children: kpis.map((kpi) => (_jsxs("div", { className: cn("flex items-center gap-1.5 sm:gap-2 text-xs sm:text-sm", kpi.onClick && "cursor-pointer hover:text-[rgb(var(--color-primary-hover))] transition-colors"), onClick: kpi.onClick, children: [_jsxs("span", { className: "text-[rgb(var(--fg-muted))] whitespace-nowrap", children: [kpi.label, ":"] }), _jsx("span", { className: "font-medium text-[rgb(var(--fg-default))]", children: typeof kpi.value === 'number'
|
|
44
|
+
? kpi.value.toLocaleString()
|
|
45
|
+
: kpi.value }), kpi.trend && (_jsxs("span", { className: cn("text-xs font-medium", kpi.trend.direction === 'up'
|
|
46
|
+
? "text-[rgb(var(--color-success))]"
|
|
47
|
+
: "text-[rgb(var(--color-error))]"), children: [kpi.trend.direction === 'up' ? '↑' : '↓', Math.abs(kpi.trend.value), "%"] }))] }, kpi.id))) }))] }), iconButtons && iconButtons.length > 0 && (_jsx("div", { className: "flex flex-wrap items-center gap-1.5 sm:gap-2", children: iconButtons.map((button) => {
|
|
48
|
+
const Icon = button.icon;
|
|
49
|
+
return (_jsxs("button", { onClick: button.onClick, disabled: button.disabled, className: cn("group relative flex flex-col items-center justify-center gap-0.5 sm:gap-1 rounded-lg sm:rounded-xl p-1.5 sm:p-2.5 min-w-[48px] sm:min-w-[64px] transition-all duration-200", getVariantColors(button.variant), button.disabled && "opacity-50 cursor-not-allowed", !button.disabled && "hover:scale-105 active:scale-95"), title: button.label, children: [_jsx(Icon, { className: "h-4 w-4 sm:h-5 sm:w-5" }), _jsx("span", { className: "text-[9px] sm:text-[10px] font-medium", children: button.label })] }, button.id));
|
|
50
|
+
}) })), actions && (_jsx("div", { className: "flex flex-wrap items-center gap-1.5 sm:gap-2 md:gap-3 w-full sm:w-auto justify-end", children: actions }))] }) }));
|
|
51
|
+
}
|
|
52
|
+
// Compact footer variant for minimal footprints
|
|
53
|
+
export function CompactFooter({ className, children }) {
|
|
54
|
+
const { t } = useTranslation();
|
|
55
|
+
return (_jsx("footer", { className: cn("bg-[rgb(var(--bg-subtle))] border-t border-[rgb(var(--bd-default))] py-2 px-4", className), children: _jsx("div", { className: "flex items-center justify-center", children: _jsx("div", { className: "text-xs text-[rgb(var(--fg-muted))]", children: children || t("Indas Estimo 3.0 ©2025") }) }) }));
|
|
56
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { DynamicSidebar } from './sidebar.js';
|
|
2
|
+
export type { DynamicSidebarProps } from './sidebar.js';
|
|
3
|
+
export { Footer, CompactFooter } from './footer.js';
|
|
4
|
+
export type { FooterProps, FooterKPI } from './footer.js';
|
|
5
|
+
export { AppShell, Page, Grid } from './app-shell.js';
|
|
6
|
+
export type { AppShellProps, PageProps, GridProps } from './app-shell.js';
|
|
7
|
+
export { FloatingActionButton } from './floating-action-button.js';
|
|
8
|
+
export type { FABAction } from './floating-action-button.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// Layout Components - Centralized exports
|
|
3
|
+
export { DynamicSidebar } from './sidebar.js';
|
|
4
|
+
export { Footer, CompactFooter } from './footer.js';
|
|
5
|
+
export { AppShell, Page, Grid } from './app-shell.js';
|
|
6
|
+
export { FloatingActionButton } from './floating-action-button.js';
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { usePathname, useRouter } from 'next/navigation';
|
|
5
|
+
import { useSessionAdapter } from '../../contexts/SessionAdapterContext.js';
|
|
6
|
+
import { X, Search, ChevronRight, MessageSquare, Calculator, Receipt, Database, Cog, Layers, Boxes, BookOpen, PieChart, Activity, ClipboardCheck, TrendingUp, DollarSign, Factory, Users, Settings, Tag, Shield, Target, ShoppingCart, BarChart3, UserCog, Building, Gauge } from 'lucide-react';
|
|
7
|
+
import { cn } from '../../lib/utils.js';
|
|
8
|
+
import { useNavigation } from '../../contexts/NavigationContext.js';
|
|
9
|
+
import { useModuleAuth } from '../../contexts/ModuleAuthContext.js';
|
|
10
|
+
import { useTranslation } from '../../hooks/useTranslation.js';
|
|
11
|
+
import { useNotifications } from '../../hooks/useNotifications.js';
|
|
12
|
+
import { getModuleRoutePath } from '../../lib/utils.js';
|
|
13
|
+
// Reuse sidebar icon mapping
|
|
14
|
+
function getGroupIcon(groupName) {
|
|
15
|
+
const name = groupName.toLowerCase();
|
|
16
|
+
if (name.includes('dashboard') || name.includes('home'))
|
|
17
|
+
return Gauge;
|
|
18
|
+
if (name.includes('sales'))
|
|
19
|
+
return TrendingUp;
|
|
20
|
+
if (name.includes('enquiry') || name.includes('inquiry') || name.includes('lead'))
|
|
21
|
+
return MessageSquare;
|
|
22
|
+
if (name.includes('estimation') || name.includes('estimate') || name.includes('costing'))
|
|
23
|
+
return Calculator;
|
|
24
|
+
if (name.includes('quotation') || name.includes('quote'))
|
|
25
|
+
return Receipt;
|
|
26
|
+
if (name.includes('masters') || name.includes('master'))
|
|
27
|
+
return Database;
|
|
28
|
+
if (name.includes('user') && name.includes('management'))
|
|
29
|
+
return UserCog;
|
|
30
|
+
if (name.includes('company') || name.includes('branch'))
|
|
31
|
+
return Building;
|
|
32
|
+
if (name.includes('category') || name.includes('tag'))
|
|
33
|
+
return Tag;
|
|
34
|
+
if (name.includes('process'))
|
|
35
|
+
return Layers;
|
|
36
|
+
if (name.includes('machine') || name.includes('equipment'))
|
|
37
|
+
return Cog;
|
|
38
|
+
if (name.includes('item') || name.includes('product') || name.includes('inventory'))
|
|
39
|
+
return Boxes;
|
|
40
|
+
if (name.includes('ledger') || name.includes('account'))
|
|
41
|
+
return BookOpen;
|
|
42
|
+
if (name.includes('mis') || name.includes('report'))
|
|
43
|
+
return PieChart;
|
|
44
|
+
if (name.includes('analytics') || name.includes('analysis'))
|
|
45
|
+
return BarChart3;
|
|
46
|
+
if (name.includes('order') || name.includes('purchase'))
|
|
47
|
+
return ShoppingCart;
|
|
48
|
+
if (name.includes('price') || name.includes('material'))
|
|
49
|
+
return DollarSign;
|
|
50
|
+
if (name.includes('quality') || name.includes('control'))
|
|
51
|
+
return Shield;
|
|
52
|
+
if (name.includes('production') || name.includes('manufacturing'))
|
|
53
|
+
return Factory;
|
|
54
|
+
if (name.includes('customer') || name.includes('client'))
|
|
55
|
+
return Users;
|
|
56
|
+
if (name.includes('setting') || name.includes('config'))
|
|
57
|
+
return Settings;
|
|
58
|
+
if (name.includes('target') || name.includes('goal'))
|
|
59
|
+
return Target;
|
|
60
|
+
if (name.includes('activity') || name.includes('email') || name.includes('notification') || name.includes('audit'))
|
|
61
|
+
return Activity;
|
|
62
|
+
return ClipboardCheck;
|
|
63
|
+
}
|
|
64
|
+
export function MobileMenuSheet({ open, onClose }) {
|
|
65
|
+
const pathname = usePathname();
|
|
66
|
+
const router = useRouter();
|
|
67
|
+
const { data: session } = useSessionAdapter();
|
|
68
|
+
const { t } = useTranslation();
|
|
69
|
+
const { mobileModules } = useNavigation();
|
|
70
|
+
const { hasAccess } = useModuleAuth();
|
|
71
|
+
const { getUnreadCount } = useNotifications(session);
|
|
72
|
+
const [searchQuery, setSearchQuery] = React.useState('');
|
|
73
|
+
const [expandedGroups, setExpandedGroups] = React.useState([]);
|
|
74
|
+
const searchRef = React.useRef(null);
|
|
75
|
+
// Reset search when sheet opens — expand only the active group
|
|
76
|
+
React.useEffect(() => {
|
|
77
|
+
if (open) {
|
|
78
|
+
setSearchQuery('');
|
|
79
|
+
const activeGroups = mobileModules
|
|
80
|
+
.filter(group => group.modules.some(mod => {
|
|
81
|
+
const path = getModuleRoutePath(mod.ModuleName);
|
|
82
|
+
return pathname === path || pathname?.startsWith(path + '/');
|
|
83
|
+
}))
|
|
84
|
+
.map(g => g.groupName);
|
|
85
|
+
setExpandedGroups(activeGroups.length > 0 ? activeGroups : [mobileModules[0]?.groupName].filter(Boolean));
|
|
86
|
+
}
|
|
87
|
+
}, [open, mobileModules, pathname]);
|
|
88
|
+
// Prevent body scroll when open
|
|
89
|
+
React.useEffect(() => {
|
|
90
|
+
if (open) {
|
|
91
|
+
document.body.style.overflow = 'hidden';
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
document.body.style.overflow = '';
|
|
95
|
+
}
|
|
96
|
+
return () => { document.body.style.overflow = ''; };
|
|
97
|
+
}, [open]);
|
|
98
|
+
const toggleGroup = (groupName) => {
|
|
99
|
+
setExpandedGroups(prev => prev.includes(groupName)
|
|
100
|
+
? prev.filter(g => g !== groupName)
|
|
101
|
+
: [...prev, groupName]);
|
|
102
|
+
};
|
|
103
|
+
// Filter modules by search query and permissions
|
|
104
|
+
const filteredGroups = React.useMemo(() => {
|
|
105
|
+
const query = searchQuery.toLowerCase().trim();
|
|
106
|
+
return mobileModules
|
|
107
|
+
.map(group => ({
|
|
108
|
+
...group,
|
|
109
|
+
modules: group.modules.filter(mod => {
|
|
110
|
+
const path = getModuleRoutePath(mod.ModuleName);
|
|
111
|
+
if (path === '#')
|
|
112
|
+
return false;
|
|
113
|
+
if (!hasAccess(path))
|
|
114
|
+
return false;
|
|
115
|
+
if (!query)
|
|
116
|
+
return true;
|
|
117
|
+
const displayName = (mod.ModuleDisplayName || mod.ModuleName).toLowerCase();
|
|
118
|
+
return displayName.includes(query) || group.groupName.toLowerCase().includes(query);
|
|
119
|
+
}),
|
|
120
|
+
}))
|
|
121
|
+
.filter(group => group.modules.length > 0);
|
|
122
|
+
}, [mobileModules, searchQuery, hasAccess]);
|
|
123
|
+
// When searching, expand all matching groups
|
|
124
|
+
React.useEffect(() => {
|
|
125
|
+
if (searchQuery.trim()) {
|
|
126
|
+
setExpandedGroups(filteredGroups.map(g => g.groupName));
|
|
127
|
+
}
|
|
128
|
+
}, [searchQuery, filteredGroups]);
|
|
129
|
+
const handleNavigate = (path) => {
|
|
130
|
+
onClose();
|
|
131
|
+
router.push(path);
|
|
132
|
+
};
|
|
133
|
+
const userName = session?.user?.name || 'User';
|
|
134
|
+
const userRole = session?.user?.RoleName || session?.user?.roleName || '';
|
|
135
|
+
const notifCount = getUnreadCount();
|
|
136
|
+
const isModuleActive = (path) => {
|
|
137
|
+
if (!pathname)
|
|
138
|
+
return false;
|
|
139
|
+
if (pathname === path)
|
|
140
|
+
return true;
|
|
141
|
+
return pathname.startsWith(path + '/');
|
|
142
|
+
};
|
|
143
|
+
const getInitials = (name) => {
|
|
144
|
+
return name.split(' ').map(n => n[0]).join('').toUpperCase().slice(0, 2);
|
|
145
|
+
};
|
|
146
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: cn('fixed inset-0 z-[60] bg-black/50 transition-opacity duration-300 lg:hidden', open ? 'opacity-100' : 'opacity-0 pointer-events-none'), onClick: onClose }), _jsxs("div", { className: cn('fixed inset-x-0 bottom-0 z-[61] lg:hidden', 'bg-[rgb(var(--bg-surface))] rounded-t-2xl shadow-2xl', 'transform transition-transform duration-300 ease-out', 'max-h-[85vh] flex flex-col', open ? 'translate-y-0' : 'translate-y-full'), children: [_jsx("div", { className: "flex justify-center pt-2.5 pb-1", children: _jsx("div", { className: "w-9 h-1 rounded-full bg-[rgb(var(--bd-default))]" }) }), _jsxs("div", { className: "flex items-center gap-3 px-4 py-2.5 border-b border-[rgb(var(--bd-default))]", children: [_jsx("div", { className: "w-8 h-8 rounded-full bg-[rgb(var(--bg-subtle))] border border-[rgb(var(--bd-default))] flex items-center justify-center flex-shrink-0", children: _jsx("span", { className: "text-xs font-semibold text-[rgb(var(--fg-muted))]", children: getInitials(userName) }) }), _jsxs("div", { className: "flex-1 min-w-0", children: [_jsx("p", { className: "text-sm font-semibold text-[rgb(var(--fg-default))] truncate leading-tight", children: userName }), userRole && (_jsx("p", { className: "text-[0.65rem] text-[rgb(var(--fg-muted))] truncate", children: userRole }))] }), _jsx("button", { onClick: onClose, className: "p-2 -mr-1 rounded-lg text-[rgb(var(--fg-muted))] hover:bg-[rgb(var(--bg-hover))] transition-colors", children: _jsx(X, { className: "h-4.5 w-4.5" }) })] }), _jsx("div", { className: "px-4 py-2.5", children: _jsxs("div", { className: "relative", children: [_jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-[rgb(var(--fg-muted))]" }), _jsx("input", { ref: searchRef, type: "text", placeholder: t('Search modules...'), value: searchQuery, onChange: e => setSearchQuery(e.target.value), className: "w-full pl-9 pr-8 py-2 text-sm rounded-lg border border-[rgb(var(--bd-default))] bg-[rgb(var(--bg-subtle))] text-[rgb(var(--fg-default))] placeholder:text-[rgb(var(--fg-muted))] focus:outline-none focus:border-[rgb(var(--color-primary))] transition-colors" }), searchQuery && (_jsx("button", { onClick: () => { setSearchQuery(''); searchRef.current?.focus(); }, className: "absolute right-2.5 top-1/2 -translate-y-1/2 p-0.5 rounded text-[rgb(var(--fg-muted))] hover:text-[rgb(var(--fg-default))]", children: _jsx(X, { className: "h-3.5 w-3.5" }) }))] }) }), _jsx("div", { className: "flex-1 overflow-y-auto px-2 pb-2", children: filteredGroups.length === 0 ? (_jsxs("div", { className: "py-12 text-center", children: [_jsx(Search, { className: "h-8 w-8 mx-auto mb-2 text-[rgb(var(--fg-muted))] opacity-30" }), _jsx("p", { className: "text-sm text-[rgb(var(--fg-muted))]", children: t('No modules found') })] })) : (filteredGroups.map(group => {
|
|
147
|
+
const GroupIcon = getGroupIcon(group.groupName);
|
|
148
|
+
const isExpanded = expandedGroups.includes(group.groupName);
|
|
149
|
+
return (_jsxs("div", { className: "mb-0.5", children: [_jsxs("button", { onClick: () => toggleGroup(group.groupName), className: "w-full flex items-center gap-2.5 px-3 py-2.5 rounded-lg text-left hover:bg-[rgb(var(--bg-hover))] transition-colors min-h-[2.75rem]", children: [_jsx(GroupIcon, { className: "h-4 w-4 text-[rgb(var(--fg-muted))] flex-shrink-0" }), _jsx("span", { className: "text-xs font-semibold text-[rgb(var(--fg-muted))] uppercase tracking-wide flex-1", children: t(group.groupName) }), _jsx(ChevronRight, { className: cn('h-3.5 w-3.5 text-[rgb(var(--fg-muted))]/50 transition-transform duration-200', isExpanded && 'rotate-90') })] }), isExpanded && (_jsx("div", { className: "ml-5 pl-3 border-l-2 border-[rgb(var(--bd-default))]/50 mb-1", children: group.modules.map(mod => {
|
|
150
|
+
const path = getModuleRoutePath(mod.ModuleName);
|
|
151
|
+
const displayName = mod.ModuleDisplayName || mod.ModuleName;
|
|
152
|
+
const isActive = isModuleActive(path);
|
|
153
|
+
const isNotif = path === '/activity/notifications';
|
|
154
|
+
return (_jsxs("button", { onClick: () => handleNavigate(path), className: cn('w-full flex items-center gap-2.5 px-3 py-2 rounded-lg text-left transition-colors min-h-[2.5rem]', isActive
|
|
155
|
+
? 'bg-[rgb(var(--bg-subtle))] font-semibold'
|
|
156
|
+
: 'hover:bg-[rgb(var(--bg-hover))]'), children: [_jsx("span", { className: cn('text-sm flex-1 text-[rgb(var(--fg-default))]', isActive && 'font-semibold'), children: t(displayName) }), isActive && (_jsx("div", { className: "w-1.5 h-1.5 rounded-full bg-[rgb(var(--fg-default))] flex-shrink-0" })), isNotif && notifCount > 0 && (_jsx("span", { className: "min-w-[1.25rem] h-5 px-1 text-[10px] font-bold rounded-full bg-[rgb(var(--color-error))] text-white flex items-center justify-center", children: notifCount > 99 ? '99+' : notifCount }))] }, mod.ModuleName));
|
|
157
|
+
}) }))] }, group.groupName));
|
|
158
|
+
})) }), _jsx("div", { className: "border-t border-[rgb(var(--bd-default))] px-4", style: { paddingBottom: 'env(safe-area-inset-bottom, 0px)' }, children: _jsxs("button", { onClick: () => handleNavigate('/settings'), className: "w-full flex items-center gap-2.5 px-3 py-3 text-[rgb(var(--fg-muted))] hover:bg-[rgb(var(--bg-hover))] rounded-lg transition-colors min-h-[2.75rem]", children: [_jsx(Settings, { className: "h-4 w-4" }), _jsx("span", { className: "text-sm font-medium", children: t('Settings') })] }) })] })] }));
|
|
159
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
|
+
export interface SidePanelItem {
|
|
4
|
+
id: string;
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
/** Plain string used for search filter when label is a ReactNode */
|
|
7
|
+
searchText?: string;
|
|
8
|
+
/** Disable row click (e.g. during inline edit so onItemSelect doesn't fire) */
|
|
9
|
+
disableSelect?: boolean;
|
|
10
|
+
icon?: LucideIcon | React.ElementType;
|
|
11
|
+
badge?: number | string;
|
|
12
|
+
onContextMenu?: (e: React.MouseEvent) => void;
|
|
13
|
+
}
|
|
14
|
+
export interface SidePanelCategory {
|
|
15
|
+
id: string;
|
|
16
|
+
label: string;
|
|
17
|
+
icon?: LucideIcon | React.ElementType;
|
|
18
|
+
items: SidePanelItem[];
|
|
19
|
+
}
|
|
20
|
+
export interface SidePanelProps {
|
|
21
|
+
title: React.ReactNode;
|
|
22
|
+
icon?: LucideIcon | React.ElementType;
|
|
23
|
+
categories: SidePanelCategory[];
|
|
24
|
+
activeItemId: string;
|
|
25
|
+
onItemSelect: (id: string) => void;
|
|
26
|
+
className?: string;
|
|
27
|
+
defaultOpenCategories?: string[];
|
|
28
|
+
actionButton?: {
|
|
29
|
+
label: string;
|
|
30
|
+
icon?: LucideIcon | React.ElementType;
|
|
31
|
+
onClick: () => void;
|
|
32
|
+
};
|
|
33
|
+
isOpen?: boolean;
|
|
34
|
+
onClose?: () => void;
|
|
35
|
+
showSearch?: boolean;
|
|
36
|
+
itemContextMenu?: (itemId: string, close: () => void) => React.ReactNode;
|
|
37
|
+
collapsible?: boolean;
|
|
38
|
+
defaultCollapsed?: boolean;
|
|
39
|
+
onCollapseChange?: (collapsed: boolean) => void;
|
|
40
|
+
showItemIcons?: boolean;
|
|
41
|
+
/** Optional footer content (e.g. KPI stats, summary cards). Hidden when collapsed. */
|
|
42
|
+
footer?: React.ReactNode;
|
|
43
|
+
/** When provided, replaces the category/item list with arbitrary content.
|
|
44
|
+
* Use this when the panel hosts a form or custom UI instead of a nav list. */
|
|
45
|
+
children?: React.ReactNode;
|
|
46
|
+
/** Optional element rendered on the right side of the "Recents" header row.
|
|
47
|
+
* Used by chat to host a grouping-mode toggle next to the section label. */
|
|
48
|
+
recentsAction?: React.ReactNode;
|
|
49
|
+
}
|
|
50
|
+
export declare function SidePanel({ title, icon: Icon, categories, activeItemId, onItemSelect, className, defaultOpenCategories, actionButton, isOpen, onClose, showSearch, itemContextMenu, collapsible, defaultCollapsed, onCollapseChange, showItemIcons, footer, children, recentsAction }: SidePanelProps): React.JSX.Element;
|