indas-ui 0.0.1 → 0.1.1
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/index.js +19 -0
- package/dist/cjs/components/chat/multimodal-input.js +119 -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 +18 -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/index.d.ts +5 -0
- package/dist/components/chat/index.js +13 -0
- package/dist/components/chat/multimodal-input.d.ts +12 -0
- package/dist/components/chat/multimodal-input.js +116 -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 +35 -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 +10 -0
- package/dist/components/layout/index.js +7 -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 +187 -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,133 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.SearchHighlighter = SearchHighlighter;
|
|
8
|
+
exports.fuzzyMatch = fuzzyMatch;
|
|
9
|
+
exports.getCellTextContent = getCellTextContent;
|
|
10
|
+
exports.advancedSearch = advancedSearch;
|
|
11
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
12
|
+
const react_1 = __importDefault(require("react"));
|
|
13
|
+
function SearchHighlighter({ text, searchTerm, className = '', highlightClassName = 'border-2 border-primary rounded px-0.5' }) {
|
|
14
|
+
// Don't highlight - just return plain text
|
|
15
|
+
// User requested no yellow highlighting, keep it simple
|
|
16
|
+
return (0, jsx_runtime_1.jsx)("span", { className: className, children: text });
|
|
17
|
+
}
|
|
18
|
+
// Utility function for fuzzy search matching
|
|
19
|
+
function fuzzyMatch(text, searchTerm) {
|
|
20
|
+
if (!searchTerm || !text)
|
|
21
|
+
return false;
|
|
22
|
+
const textLower = text.toLowerCase();
|
|
23
|
+
const searchLower = searchTerm.toLowerCase();
|
|
24
|
+
// Exact match
|
|
25
|
+
if (textLower.includes(searchLower))
|
|
26
|
+
return true;
|
|
27
|
+
// Fuzzy match - check if all characters of searchTerm appear in order in text
|
|
28
|
+
let searchIndex = 0;
|
|
29
|
+
for (let i = 0; i < textLower.length && searchIndex < searchLower.length; i++) {
|
|
30
|
+
if (textLower[i] === searchLower[searchIndex]) {
|
|
31
|
+
searchIndex++;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return searchIndex === searchLower.length;
|
|
35
|
+
}
|
|
36
|
+
// Utility function to get all text content from a cell value
|
|
37
|
+
function getCellTextContent(cellValue) {
|
|
38
|
+
if (cellValue === null || cellValue === undefined)
|
|
39
|
+
return '';
|
|
40
|
+
if (typeof cellValue === 'string')
|
|
41
|
+
return cellValue;
|
|
42
|
+
if (typeof cellValue === 'number')
|
|
43
|
+
return cellValue.toString();
|
|
44
|
+
if (typeof cellValue === 'boolean')
|
|
45
|
+
return cellValue.toString();
|
|
46
|
+
// Handle React elements or complex objects
|
|
47
|
+
if (react_1.default.isValidElement(cellValue)) {
|
|
48
|
+
// Try to extract text from React element
|
|
49
|
+
const extractText = (element) => {
|
|
50
|
+
if (typeof element === 'string' || typeof element === 'number') {
|
|
51
|
+
return element.toString();
|
|
52
|
+
}
|
|
53
|
+
if (react_1.default.isValidElement(element) && element.props?.children) {
|
|
54
|
+
if (Array.isArray(element.props.children)) {
|
|
55
|
+
return element.props.children.map(extractText).join('');
|
|
56
|
+
}
|
|
57
|
+
return extractText(element.props.children);
|
|
58
|
+
}
|
|
59
|
+
return '';
|
|
60
|
+
};
|
|
61
|
+
return extractText(cellValue);
|
|
62
|
+
}
|
|
63
|
+
return JSON.stringify(cellValue);
|
|
64
|
+
}
|
|
65
|
+
// Simple search function - just search and return matches
|
|
66
|
+
function advancedSearch(data, searchTerm, columns, mainColumns) {
|
|
67
|
+
if (!searchTerm.trim()) {
|
|
68
|
+
return {
|
|
69
|
+
matchingRows: data,
|
|
70
|
+
rowIds: data.map((row, index) => row.id || index.toString()),
|
|
71
|
+
columnMatches: {}
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
const results = [];
|
|
75
|
+
const rowIds = [];
|
|
76
|
+
const columnMatches = {};
|
|
77
|
+
// Define searchable columns
|
|
78
|
+
const searchableColumns = columns.filter(col => {
|
|
79
|
+
// Exclude select columns and any column marked to skip search
|
|
80
|
+
if (col.meta?.isSelectColumn || col.meta?.skipSearch || col.id === 'select') {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
if (mainColumns && mainColumns.length > 0) {
|
|
84
|
+
return mainColumns.includes(col.accessorKey || col.id);
|
|
85
|
+
}
|
|
86
|
+
// Default: search in all text-based columns
|
|
87
|
+
return col.accessorKey && typeof col.accessorKey === 'string';
|
|
88
|
+
});
|
|
89
|
+
data.forEach((row, index) => {
|
|
90
|
+
let isMatch = false;
|
|
91
|
+
const rowId = row.id || index.toString();
|
|
92
|
+
const matchingColumns = [];
|
|
93
|
+
// Search in specified columns
|
|
94
|
+
for (const column of searchableColumns) {
|
|
95
|
+
const columnKey = column.accessorKey || column.id;
|
|
96
|
+
const cellValue = row[columnKey];
|
|
97
|
+
const textContent = getCellTextContent(cellValue);
|
|
98
|
+
if (fuzzyMatch(textContent, searchTerm)) {
|
|
99
|
+
isMatch = true;
|
|
100
|
+
matchingColumns.push(columnKey);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
// If no main columns specified, search all columns as fallback
|
|
104
|
+
if (!isMatch && (!mainColumns || mainColumns.length === 0)) {
|
|
105
|
+
for (const column of columns) {
|
|
106
|
+
// Skip select columns in fallback search too
|
|
107
|
+
if (column.meta?.isSelectColumn || column.meta?.skipSearch || column.id === 'select') {
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
const columnKey = column.accessorKey || column.id;
|
|
111
|
+
if (!columnKey)
|
|
112
|
+
continue;
|
|
113
|
+
const cellValue = row[columnKey];
|
|
114
|
+
const textContent = getCellTextContent(cellValue);
|
|
115
|
+
if (fuzzyMatch(textContent, searchTerm)) {
|
|
116
|
+
isMatch = true;
|
|
117
|
+
matchingColumns.push(columnKey);
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (isMatch) {
|
|
123
|
+
results.push(row);
|
|
124
|
+
rowIds.push(rowId);
|
|
125
|
+
columnMatches[rowId] = matchingColumns;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
return {
|
|
129
|
+
matchingRows: results,
|
|
130
|
+
rowIds,
|
|
131
|
+
columnMatches
|
|
132
|
+
};
|
|
133
|
+
}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.SearchNavigator = SearchNavigator;
|
|
38
|
+
exports.useSearchNavigation = useSearchNavigation;
|
|
39
|
+
const react_1 = __importStar(require("react"));
|
|
40
|
+
function SearchNavigator({ navigationState, onNavigate, onSelect, onClear, searchInputRef, enabled }) {
|
|
41
|
+
const { currentIndex, totalResults, highlightedRowId, searchTerm } = navigationState;
|
|
42
|
+
// Keyboard navigation handler - only for arrow keys and special keys
|
|
43
|
+
const handleKeyDown = (0, react_1.useCallback)((event) => {
|
|
44
|
+
if (!enabled || !searchTerm || totalResults === 0) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
// ONLY handle arrow keys and special navigation keys
|
|
48
|
+
switch (event.key) {
|
|
49
|
+
case 'ArrowDown':
|
|
50
|
+
event.preventDefault();
|
|
51
|
+
event.stopPropagation();
|
|
52
|
+
onNavigate('down');
|
|
53
|
+
break;
|
|
54
|
+
case 'ArrowUp':
|
|
55
|
+
event.preventDefault();
|
|
56
|
+
event.stopPropagation();
|
|
57
|
+
onNavigate('up');
|
|
58
|
+
break;
|
|
59
|
+
case 'Enter':
|
|
60
|
+
event.preventDefault();
|
|
61
|
+
event.stopPropagation();
|
|
62
|
+
if (highlightedRowId) {
|
|
63
|
+
onSelect(highlightedRowId);
|
|
64
|
+
// Return focus to search input after selection
|
|
65
|
+
if (searchInputRef?.current) {
|
|
66
|
+
setTimeout(() => {
|
|
67
|
+
searchInputRef.current?.focus();
|
|
68
|
+
}, 100);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
break;
|
|
72
|
+
case 'Escape':
|
|
73
|
+
event.preventDefault();
|
|
74
|
+
event.stopPropagation();
|
|
75
|
+
onClear();
|
|
76
|
+
break;
|
|
77
|
+
default:
|
|
78
|
+
// Do nothing for other keys - let them type normally
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
}, [enabled, searchTerm, totalResults, highlightedRowId, onNavigate, onSelect, onClear, searchInputRef]);
|
|
82
|
+
// Attach keyboard event listeners ONLY to search input
|
|
83
|
+
(0, react_1.useEffect)(() => {
|
|
84
|
+
const searchInput = searchInputRef?.current;
|
|
85
|
+
if (!searchInput)
|
|
86
|
+
return;
|
|
87
|
+
searchInput.addEventListener('keydown', handleKeyDown);
|
|
88
|
+
return () => {
|
|
89
|
+
searchInput.removeEventListener('keydown', handleKeyDown);
|
|
90
|
+
};
|
|
91
|
+
}, [handleKeyDown, searchInputRef]);
|
|
92
|
+
// Scroll handling is now done in useSearchNavigation hook with proper grid scoping
|
|
93
|
+
// No need to handle scroll here - removed to prevent cross-grid search issues
|
|
94
|
+
// Don't render visual navigator - just handle keyboard events
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
// Hook for managing search navigation state
|
|
98
|
+
function useSearchNavigation(scrollContainerRef) {
|
|
99
|
+
const [navigationState, setNavigationState] = react_1.default.useState({
|
|
100
|
+
currentIndex: -1,
|
|
101
|
+
totalResults: 0,
|
|
102
|
+
highlightedRowId: null,
|
|
103
|
+
searchTerm: ''
|
|
104
|
+
});
|
|
105
|
+
const [filteredRowIds, setFilteredRowIds] = react_1.default.useState([]);
|
|
106
|
+
const updateSearchResults = (0, react_1.useCallback)((searchTerm, matchingRowIds) => {
|
|
107
|
+
setFilteredRowIds(matchingRowIds);
|
|
108
|
+
setNavigationState(prev => ({
|
|
109
|
+
...prev,
|
|
110
|
+
searchTerm,
|
|
111
|
+
totalResults: matchingRowIds.length,
|
|
112
|
+
currentIndex: matchingRowIds.length > 0 ? 0 : -1,
|
|
113
|
+
highlightedRowId: matchingRowIds.length > 0 ? matchingRowIds[0] : null
|
|
114
|
+
}));
|
|
115
|
+
}, []);
|
|
116
|
+
const navigate = (0, react_1.useCallback)((direction) => {
|
|
117
|
+
if (filteredRowIds.length === 0) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
setNavigationState(prev => {
|
|
121
|
+
let newIndex = prev.currentIndex;
|
|
122
|
+
if (direction === 'down') {
|
|
123
|
+
newIndex = (prev.currentIndex + 1) % prev.totalResults;
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
newIndex = prev.currentIndex <= 0 ? prev.totalResults - 1 : prev.currentIndex - 1;
|
|
127
|
+
}
|
|
128
|
+
const nextRowId = filteredRowIds[newIndex];
|
|
129
|
+
// Auto-scroll to the new highlighted row - ONLY within THIS grid container
|
|
130
|
+
if (nextRowId && scrollContainerRef?.current) {
|
|
131
|
+
requestAnimationFrame(() => {
|
|
132
|
+
const scrollContainer = scrollContainerRef.current;
|
|
133
|
+
if (!scrollContainer)
|
|
134
|
+
return;
|
|
135
|
+
// CRITICAL FIX: Search within THIS grid only, not globally
|
|
136
|
+
const rowElement = scrollContainer.querySelector(`[data-row-id="${nextRowId}"]`);
|
|
137
|
+
if (rowElement) {
|
|
138
|
+
// Use getBoundingClientRect for accurate positioning
|
|
139
|
+
const containerRect = scrollContainer.getBoundingClientRect();
|
|
140
|
+
const rowRect = rowElement.getBoundingClientRect();
|
|
141
|
+
// Check if row is fully visible within container
|
|
142
|
+
const isRowAboveViewport = rowRect.top < containerRect.top;
|
|
143
|
+
const isRowBelowViewport = rowRect.bottom > containerRect.bottom;
|
|
144
|
+
if (isRowAboveViewport) {
|
|
145
|
+
// Row is above visible area - scroll up
|
|
146
|
+
const scrollOffset = rowRect.top - containerRect.top;
|
|
147
|
+
scrollContainer.scrollTop += scrollOffset - 10; // 10px padding
|
|
148
|
+
}
|
|
149
|
+
else if (isRowBelowViewport) {
|
|
150
|
+
// Row is below visible area - scroll down
|
|
151
|
+
const scrollOffset = rowRect.bottom - containerRect.bottom;
|
|
152
|
+
scrollContainer.scrollTop += scrollOffset + 10; // 10px padding
|
|
153
|
+
}
|
|
154
|
+
// If row is fully visible, don't scroll
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
return {
|
|
159
|
+
...prev,
|
|
160
|
+
currentIndex: newIndex,
|
|
161
|
+
highlightedRowId: nextRowId || null
|
|
162
|
+
};
|
|
163
|
+
});
|
|
164
|
+
}, [filteredRowIds, scrollContainerRef]);
|
|
165
|
+
const selectRow = (0, react_1.useCallback)((rowId) => {
|
|
166
|
+
// This will be handled by the parent component
|
|
167
|
+
return rowId;
|
|
168
|
+
}, []);
|
|
169
|
+
const clearNavigation = (0, react_1.useCallback)(() => {
|
|
170
|
+
setNavigationState({
|
|
171
|
+
currentIndex: -1,
|
|
172
|
+
totalResults: 0,
|
|
173
|
+
highlightedRowId: null,
|
|
174
|
+
searchTerm: ''
|
|
175
|
+
});
|
|
176
|
+
setFilteredRowIds([]);
|
|
177
|
+
}, []);
|
|
178
|
+
return {
|
|
179
|
+
navigationState,
|
|
180
|
+
updateSearchResults,
|
|
181
|
+
navigate,
|
|
182
|
+
selectRow,
|
|
183
|
+
clearNavigation
|
|
184
|
+
};
|
|
185
|
+
}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.SearchNewModal = SearchNewModal;
|
|
38
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
39
|
+
const react_1 = __importStar(require("react"));
|
|
40
|
+
const lucide_react_1 = require("lucide-react");
|
|
41
|
+
const ui_1 = require("../../ui/index.js");
|
|
42
|
+
const ui_2 = require("../../ui/index.js");
|
|
43
|
+
const SearchHighlighter_1 = require("./SearchHighlighter.js");
|
|
44
|
+
function SearchNewModal({ data, columns, mainColumns, onRowSelect, selectedRows = new Set(), className = '', onSearchClear }) {
|
|
45
|
+
const [searchValue, setSearchValue] = (0, react_1.useState)('');
|
|
46
|
+
const [showModal, setShowModal] = (0, react_1.useState)(false);
|
|
47
|
+
const [highlightedIndex, setHighlightedIndex] = (0, react_1.useState)(0);
|
|
48
|
+
const [selectedDuringSearch, setSelectedDuringSearch] = (0, react_1.useState)([]);
|
|
49
|
+
const [searchResults, setSearchResults] = (0, react_1.useState)({
|
|
50
|
+
matchingRows: [],
|
|
51
|
+
rowIds: [],
|
|
52
|
+
columnMatches: {}
|
|
53
|
+
});
|
|
54
|
+
const searchInputRef = (0, react_1.useRef)(null);
|
|
55
|
+
const modalRef = (0, react_1.useRef)(null);
|
|
56
|
+
const highlightedItemRef = (0, react_1.useRef)(null);
|
|
57
|
+
// Parse main columns for search - memoized to prevent infinite re-renders
|
|
58
|
+
const searchColumns = (0, react_1.useMemo)(() => {
|
|
59
|
+
return mainColumns ? mainColumns.split(',').map(col => col.trim()) : undefined;
|
|
60
|
+
}, [mainColumns]);
|
|
61
|
+
// Perform search when search value changes
|
|
62
|
+
(0, react_1.useEffect)(() => {
|
|
63
|
+
if (searchValue.trim()) {
|
|
64
|
+
const results = (0, SearchHighlighter_1.advancedSearch)(data, searchValue, columns, searchColumns);
|
|
65
|
+
setSearchResults(results);
|
|
66
|
+
setHighlightedIndex(0); // Reset highlighted index when search changes
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
setSearchResults({
|
|
70
|
+
matchingRows: [],
|
|
71
|
+
rowIds: [],
|
|
72
|
+
columnMatches: {}
|
|
73
|
+
});
|
|
74
|
+
setHighlightedIndex(0);
|
|
75
|
+
}
|
|
76
|
+
}, [searchValue, data, columns, searchColumns]);
|
|
77
|
+
// Handle search input change
|
|
78
|
+
const handleSearchChange = (0, react_1.useCallback)((value) => {
|
|
79
|
+
setSearchValue(value);
|
|
80
|
+
}, []);
|
|
81
|
+
// Handle row selection
|
|
82
|
+
const handleRowSelection = (0, react_1.useCallback)((rowId, event) => {
|
|
83
|
+
event.preventDefault();
|
|
84
|
+
event.stopPropagation();
|
|
85
|
+
// Mouse click - don't scroll (isKeyboardNav stays false)
|
|
86
|
+
// Intelligent search clearing logic
|
|
87
|
+
if (searchValue.trim()) {
|
|
88
|
+
const newSelected = [...selectedDuringSearch, rowId];
|
|
89
|
+
setSelectedDuringSearch(newSelected);
|
|
90
|
+
// Clear search based on intelligent rules
|
|
91
|
+
const shouldClearSearch =
|
|
92
|
+
// Rule 1: If only 1 search result and user selects it
|
|
93
|
+
(searchResults.matchingRows.length === 1) ||
|
|
94
|
+
// Rule 2: If user selects ALL search results
|
|
95
|
+
(newSelected.length >= searchResults.matchingRows.length);
|
|
96
|
+
if (shouldClearSearch) {
|
|
97
|
+
setShowModal(false);
|
|
98
|
+
setSearchValue('');
|
|
99
|
+
setSelectedDuringSearch([]);
|
|
100
|
+
onSearchClear?.();
|
|
101
|
+
// Don't reset highlightedIndex to prevent scroll jump
|
|
102
|
+
// Ensure input can be focused again
|
|
103
|
+
setTimeout(() => {
|
|
104
|
+
if (searchInputRef.current) {
|
|
105
|
+
searchInputRef.current.focus();
|
|
106
|
+
}
|
|
107
|
+
// Reset highlighted index after modal closes to prevent next search from starting at wrong position
|
|
108
|
+
setHighlightedIndex(0);
|
|
109
|
+
}, 100);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
// Normal selection without search
|
|
114
|
+
setShowModal(false);
|
|
115
|
+
}
|
|
116
|
+
onRowSelect?.(rowId);
|
|
117
|
+
}, [onRowSelect, searchValue, searchResults.matchingRows.length, selectedDuringSearch, onSearchClear]);
|
|
118
|
+
// Handle input focus
|
|
119
|
+
const handleFocus = (0, react_1.useCallback)(() => {
|
|
120
|
+
setShowModal(true);
|
|
121
|
+
}, []);
|
|
122
|
+
// Handle input blur
|
|
123
|
+
const handleBlur = (0, react_1.useCallback)(() => {
|
|
124
|
+
// Delay closing to allow for click interactions
|
|
125
|
+
// Only close if not actively selecting
|
|
126
|
+
setTimeout(() => {
|
|
127
|
+
if (document.activeElement !== searchInputRef.current) {
|
|
128
|
+
setShowModal(false);
|
|
129
|
+
}
|
|
130
|
+
}, 150);
|
|
131
|
+
}, []);
|
|
132
|
+
// Handle keyboard navigation
|
|
133
|
+
(0, react_1.useEffect)(() => {
|
|
134
|
+
const handleKeyDown = (event) => {
|
|
135
|
+
if (!showModal || searchResults.matchingRows.length === 0)
|
|
136
|
+
return;
|
|
137
|
+
switch (event.key) {
|
|
138
|
+
case 'Escape':
|
|
139
|
+
setShowModal(false);
|
|
140
|
+
setSearchValue('');
|
|
141
|
+
setHighlightedIndex(0);
|
|
142
|
+
break;
|
|
143
|
+
case 'ArrowDown':
|
|
144
|
+
event.preventDefault();
|
|
145
|
+
setIsKeyboardNav(true); // Enable scroll for keyboard nav
|
|
146
|
+
setHighlightedIndex(prev => prev < searchResults.matchingRows.length - 1 ? prev + 1 : 0);
|
|
147
|
+
break;
|
|
148
|
+
case 'ArrowUp':
|
|
149
|
+
event.preventDefault();
|
|
150
|
+
setIsKeyboardNav(true); // Enable scroll for keyboard nav
|
|
151
|
+
setHighlightedIndex(prev => prev > 0 ? prev - 1 : searchResults.matchingRows.length - 1);
|
|
152
|
+
break;
|
|
153
|
+
case 'Enter':
|
|
154
|
+
event.preventDefault();
|
|
155
|
+
if (highlightedIndex >= 0 && highlightedIndex < searchResults.matchingRows.length) {
|
|
156
|
+
const row = searchResults.matchingRows[highlightedIndex];
|
|
157
|
+
const rowId = getRowId(row, highlightedIndex);
|
|
158
|
+
// Intelligent search clearing logic (same as click)
|
|
159
|
+
if (searchValue.trim()) {
|
|
160
|
+
const newSelected = [...selectedDuringSearch, rowId];
|
|
161
|
+
setSelectedDuringSearch(newSelected);
|
|
162
|
+
const shouldClearSearch = (searchResults.matchingRows.length === 1) ||
|
|
163
|
+
(newSelected.length >= searchResults.matchingRows.length);
|
|
164
|
+
if (shouldClearSearch) {
|
|
165
|
+
setShowModal(false);
|
|
166
|
+
setSearchValue('');
|
|
167
|
+
setSelectedDuringSearch([]);
|
|
168
|
+
onSearchClear?.();
|
|
169
|
+
// Don't reset highlightedIndex to prevent scroll jump
|
|
170
|
+
setTimeout(() => {
|
|
171
|
+
if (searchInputRef.current) {
|
|
172
|
+
searchInputRef.current.focus();
|
|
173
|
+
}
|
|
174
|
+
// Reset highlighted index after modal closes to prevent next search from starting at wrong position
|
|
175
|
+
setHighlightedIndex(0);
|
|
176
|
+
}, 100);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
setShowModal(false);
|
|
181
|
+
setSearchValue('');
|
|
182
|
+
setHighlightedIndex(0);
|
|
183
|
+
setTimeout(() => {
|
|
184
|
+
if (searchInputRef.current) {
|
|
185
|
+
searchInputRef.current.focus();
|
|
186
|
+
}
|
|
187
|
+
}, 100);
|
|
188
|
+
}
|
|
189
|
+
onRowSelect?.(rowId);
|
|
190
|
+
}
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
if (showModal) {
|
|
195
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
196
|
+
return () => document.removeEventListener('keydown', handleKeyDown);
|
|
197
|
+
}
|
|
198
|
+
}, [showModal, searchResults.matchingRows, highlightedIndex, onRowSelect, onSearchClear, searchValue, selectedDuringSearch]);
|
|
199
|
+
// Track if we're using keyboard navigation (to enable scroll) vs mouse clicks (no scroll)
|
|
200
|
+
const [isKeyboardNav, setIsKeyboardNav] = react_1.default.useState(false);
|
|
201
|
+
// Scroll highlighted item into view (only when using keyboard navigation)
|
|
202
|
+
(0, react_1.useEffect)(() => {
|
|
203
|
+
if (highlightedItemRef.current && showModal && isKeyboardNav) {
|
|
204
|
+
highlightedItemRef.current.scrollIntoView({
|
|
205
|
+
behavior: 'smooth',
|
|
206
|
+
block: 'nearest'
|
|
207
|
+
});
|
|
208
|
+
// Reset after scroll
|
|
209
|
+
setIsKeyboardNav(false);
|
|
210
|
+
}
|
|
211
|
+
}, [highlightedIndex, showModal, isKeyboardNav]);
|
|
212
|
+
// Get display text for a row
|
|
213
|
+
const getRowDisplayText = (0, react_1.useCallback)((row) => {
|
|
214
|
+
// Try to get a meaningful display name from the row
|
|
215
|
+
const rowObj = row;
|
|
216
|
+
return rowObj.name || rowObj.title || rowObj.label ||
|
|
217
|
+
rowObj.firstName || rowObj.email ||
|
|
218
|
+
Object.values(rowObj).find(val => typeof val === 'string') ||
|
|
219
|
+
'Row Item';
|
|
220
|
+
}, []);
|
|
221
|
+
// Get row ID
|
|
222
|
+
const getRowId = (0, react_1.useCallback)((row, index) => {
|
|
223
|
+
const rowObj = row;
|
|
224
|
+
return rowObj.id || rowObj.ID || index.toString();
|
|
225
|
+
}, []);
|
|
226
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: `relative ${className}`, children: [(0, jsx_runtime_1.jsxs)("div", { className: "relative", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Search, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-fg-subtle" }), (0, jsx_runtime_1.jsx)(ui_1.Input, { ref: searchInputRef, placeholder: "Search...", value: searchValue, onChange: (e) => handleSearchChange(e.target.value), onFocus: handleFocus, onBlur: handleBlur, className: "pl-10 pr-10 h-8 text-sm bg-bg-surface border-bd-default focus:border-primary focus:ring-primary" }), searchValue && ((0, jsx_runtime_1.jsx)(ui_2.Button, { variant: "ghost", onClick: () => {
|
|
227
|
+
setSearchValue('');
|
|
228
|
+
setShowModal(false);
|
|
229
|
+
}, className: "absolute right-1 top-1/2 transform -translate-y-1/2 h-6 w-6 p-0 hover:bg-gray-100", children: (0, jsx_runtime_1.jsx)(lucide_react_1.X, { className: "h-3 w-3 text-fg-subtle" }) }))] }), showModal && ((0, jsx_runtime_1.jsx)("div", { ref: modalRef, className: "absolute top-full left-0 right-0 mt-2 z-50 bg-bg-surface rounded-lg shadow-xl border border-bd-default overflow-hidden", style: { minWidth: '320px' }, children: (0, jsx_runtime_1.jsxs)("div", { className: "p-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between mb-3", children: [(0, jsx_runtime_1.jsxs)("h3", { className: "text-sm font-semibold text-fg-default", children: ["Search Results", searchResults.matchingRows.length > 0 && ((0, jsx_runtime_1.jsxs)("span", { className: "ml-2 text-xs text-fg-muted", children: ["(", searchResults.matchingRows.length, " found)"] }))] }), searchResults.matchingRows.length > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "text-xs text-fg-muted", children: [highlightedIndex + 1, " of ", searchResults.matchingRows.length, (0, jsx_runtime_1.jsx)("span", { className: "ml-2 text-fg-subtle", children: "\u2191\u2193 to navigate, Enter to select" })] }))] }), (0, jsx_runtime_1.jsx)("div", { className: "max-h-64 overflow-y-auto", children: searchValue ? (searchResults.matchingRows.length > 0 ? ((0, jsx_runtime_1.jsx)("div", { className: "space-y-1", children: searchResults.matchingRows.map((row, index) => {
|
|
230
|
+
const rowId = getRowId(row, index);
|
|
231
|
+
const isSelected = selectedRows.has(rowId);
|
|
232
|
+
const isHighlighted = index === highlightedIndex;
|
|
233
|
+
const displayText = getRowDisplayText(row);
|
|
234
|
+
return ((0, jsx_runtime_1.jsxs)("div", { ref: isHighlighted ? highlightedItemRef : null, className: `flex items-center p-2.5 rounded-md transition-colors group cursor-pointer ${isHighlighted
|
|
235
|
+
? 'bg-primary-subtle border-2 border-primary/30'
|
|
236
|
+
: 'hover:bg-bg-hover'}`, onClick: (e) => handleRowSelection(rowId, e), children: [(0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center mr-3", children: (0, jsx_runtime_1.jsx)("input", { type: "checkbox", checked: isSelected, onChange: () => { }, className: "w-4 h-4 border border-gray-300 rounded cursor-pointer focus:ring-2 focus:ring-primary" }) }), (0, jsx_runtime_1.jsx)("div", { className: "w-8 h-8 bg-primary-subtle rounded-lg flex items-center justify-center mr-3 group-hover:bg-primary-muted", children: (0, jsx_runtime_1.jsx)("span", { className: "text-xs font-medium text-primary", children: displayText.charAt(0).toUpperCase() }) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex-1", children: [(0, jsx_runtime_1.jsx)("div", { className: "font-medium text-fg-default text-sm", children: (0, jsx_runtime_1.jsx)(SearchHighlighter_1.SearchHighlighter, { text: displayText, searchTerm: searchValue, highlightClassName: "border-2 border-primary rounded px-0.5" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "text-xs text-fg-muted", children: ["Row ID: ", rowId] })] }), isSelected && ((0, jsx_runtime_1.jsx)("div", { className: "text-xs text-green-600 font-medium", children: "Selected" }))] }, rowId));
|
|
237
|
+
}) })) : ((0, jsx_runtime_1.jsxs)("div", { className: "text-center py-6 text-fg-muted text-sm", children: ["No results found for \"", searchValue, "\""] }))) : ((0, jsx_runtime_1.jsx)("div", { className: "text-center py-6 text-fg-subtle text-sm", children: "Type to search..." })) })] }) }))] }));
|
|
238
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.advancedSearch = advancedSearch;
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const SearchHighlighter_1 = require("./SearchHighlighter.js");
|
|
7
|
+
function advancedSearch({ data, columns, mainColumnsArray, enableSearch, totalSearchResults, updateSearchResults, clearNavigation, setGlobalFilter }) {
|
|
8
|
+
const [searchValue, setSearchValue] = (0, react_1.useState)('');
|
|
9
|
+
const [currentSearchTerm, setCurrentSearchTerm] = (0, react_1.useState)('');
|
|
10
|
+
const [selectedDuringSearch, setSelectedDuringSearch] = (0, react_1.useState)([]);
|
|
11
|
+
// Debounce search for better performance (300ms delay)
|
|
12
|
+
const [debouncedSearchValue, setDebouncedSearchValue] = (0, react_1.useState)('');
|
|
13
|
+
(0, react_1.useEffect)(() => {
|
|
14
|
+
const timer = setTimeout(() => {
|
|
15
|
+
setDebouncedSearchValue(searchValue);
|
|
16
|
+
}, 300);
|
|
17
|
+
return () => clearTimeout(timer);
|
|
18
|
+
}, [searchValue]);
|
|
19
|
+
// Enhanced global search with navigation (immediate UI update)
|
|
20
|
+
const handleGlobalSearchChange = (0, react_1.useCallback)((searchTerm) => {
|
|
21
|
+
// Update search value immediately for instant UI feedback
|
|
22
|
+
setSearchValue(searchTerm);
|
|
23
|
+
// Update current search term immediately for navigation to work
|
|
24
|
+
setCurrentSearchTerm(searchTerm);
|
|
25
|
+
// Reset selected during search when search changes
|
|
26
|
+
if (searchTerm !== currentSearchTerm) {
|
|
27
|
+
setSelectedDuringSearch([]);
|
|
28
|
+
}
|
|
29
|
+
// If search is cleared, clear navigation immediately
|
|
30
|
+
if (!searchTerm.trim()) {
|
|
31
|
+
clearNavigation();
|
|
32
|
+
setSelectedDuringSearch([]);
|
|
33
|
+
setGlobalFilter('');
|
|
34
|
+
}
|
|
35
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
36
|
+
}, [currentSearchTerm]);
|
|
37
|
+
// Perform actual search with debounced value for performance
|
|
38
|
+
(0, react_1.useEffect)(() => {
|
|
39
|
+
if (!enableSearch)
|
|
40
|
+
return;
|
|
41
|
+
if (debouncedSearchValue.trim()) {
|
|
42
|
+
// Set global filter to actually filter the table rows
|
|
43
|
+
setGlobalFilter(debouncedSearchValue);
|
|
44
|
+
// Find matching rows using advanced search
|
|
45
|
+
const searchResults = (0, SearchHighlighter_1.advancedSearch)(data, debouncedSearchValue, columns, mainColumnsArray);
|
|
46
|
+
updateSearchResults(debouncedSearchValue, searchResults.rowIds);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
// Clear global filter when search is empty
|
|
50
|
+
setGlobalFilter('');
|
|
51
|
+
clearNavigation();
|
|
52
|
+
}
|
|
53
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
54
|
+
}, [debouncedSearchValue]);
|
|
55
|
+
// Full search reset — also clears the DEBOUNCED value, which otherwise
|
|
56
|
+
// re-applies the old filter 300ms after an external clear.
|
|
57
|
+
const clearSearch = (0, react_1.useCallback)(() => {
|
|
58
|
+
setSearchValue('');
|
|
59
|
+
setDebouncedSearchValue('');
|
|
60
|
+
setCurrentSearchTerm('');
|
|
61
|
+
setSelectedDuringSearch([]);
|
|
62
|
+
setGlobalFilter('');
|
|
63
|
+
clearNavigation();
|
|
64
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
65
|
+
}, [setGlobalFilter, clearNavigation]);
|
|
66
|
+
// Track row selection and auto-clear search when all results selected
|
|
67
|
+
const handleRowSelectionChange = (0, react_1.useCallback)((rowId, isSelected) => {
|
|
68
|
+
if (currentSearchTerm.trim()) {
|
|
69
|
+
if (isSelected) {
|
|
70
|
+
// Track this selection during search
|
|
71
|
+
setSelectedDuringSearch(prev => {
|
|
72
|
+
if (!prev.includes(rowId)) {
|
|
73
|
+
const newSelected = [...prev, rowId];
|
|
74
|
+
// Auto-clear search when ALL search results are selected
|
|
75
|
+
if (newSelected.length >= totalSearchResults && totalSearchResults > 0) {
|
|
76
|
+
// Clear search after a short delay to allow selection to complete
|
|
77
|
+
setTimeout(() => {
|
|
78
|
+
setSearchValue('');
|
|
79
|
+
setGlobalFilter('');
|
|
80
|
+
setCurrentSearchTerm('');
|
|
81
|
+
clearNavigation();
|
|
82
|
+
setSelectedDuringSearch([]);
|
|
83
|
+
}, 100);
|
|
84
|
+
}
|
|
85
|
+
return newSelected;
|
|
86
|
+
}
|
|
87
|
+
return prev;
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
// Track deselection - remove from tracking but don't clear search
|
|
92
|
+
setSelectedDuringSearch(prev => {
|
|
93
|
+
const filtered = prev.filter(id => id !== rowId);
|
|
94
|
+
return filtered;
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
99
|
+
}, [currentSearchTerm, totalSearchResults]);
|
|
100
|
+
return {
|
|
101
|
+
searchValue,
|
|
102
|
+
setSearchValue,
|
|
103
|
+
currentSearchTerm,
|
|
104
|
+
setCurrentSearchTerm,
|
|
105
|
+
selectedDuringSearch,
|
|
106
|
+
setSelectedDuringSearch,
|
|
107
|
+
debouncedSearchValue,
|
|
108
|
+
handleGlobalSearchChange,
|
|
109
|
+
handleRowSelectionChange,
|
|
110
|
+
clearSearch
|
|
111
|
+
};
|
|
112
|
+
}
|