meyi-insight-ui-dev 1.0.0 → 1.0.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.
Files changed (70) hide show
  1. package/dist/InsightPage.d.ts +2 -1
  2. package/dist/components/common/AssignUsersDialog.d.ts +8 -0
  3. package/dist/components/common/AssigneeSelect.d.ts +7 -0
  4. package/dist/components/data-table/bulk-actions.d.ts +18 -0
  5. package/dist/components/data-table/column-header.d.ts +7 -0
  6. package/dist/components/data-table/faceted-filter.d.ts +15 -0
  7. package/dist/components/data-table/index.d.ts +6 -0
  8. package/dist/components/data-table/pagination.d.ts +7 -0
  9. package/dist/components/data-table/toolbar.d.ts +18 -0
  10. package/dist/components/data-table/view-options.d.ts +6 -0
  11. package/dist/components/ui/command.d.ts +18 -0
  12. package/dist/components/ui/dropdown-menu.d.ts +22 -18
  13. package/dist/components/ui/popover.d.ts +7 -0
  14. package/dist/components/ui/select.d.ts +15 -0
  15. package/dist/components/ui/textarea.d.ts +5 -0
  16. package/dist/components/ui/tooltip.d.ts +7 -0
  17. package/dist/context.d.ts +14 -0
  18. package/dist/features/alerts/components/AlertForm.d.ts +15 -0
  19. package/dist/features/alerts/components/{PromoteDialog.d.ts → ConvertDialog.d.ts} +2 -2
  20. package/dist/features/alerts/components/InsightAlertCard.d.ts +5 -2
  21. package/dist/features/alerts/components/alerts-columns.d.ts +11 -0
  22. package/dist/features/alerts/components/alerts-table.d.ts +25 -0
  23. package/dist/features/connectors/cloudwatch-wizard/CloudWatchConnectorWizard.d.ts +8 -0
  24. package/dist/features/connectors/components/ConnectorAwsOnboardingDialog.d.ts +41 -0
  25. package/dist/features/connectors/components/ConnectorDatadogSetupDialog.d.ts +21 -0
  26. package/dist/features/connectors/components/ConnectorDetailsDialog.d.ts +8 -0
  27. package/dist/features/connectors/components/ConnectorFilters.d.ts +18 -0
  28. package/dist/features/connectors/components/ConnectorGrafanaSetupDialog.d.ts +25 -0
  29. package/dist/features/connectors/components/ConnectorPrometheusSetupDialog.d.ts +10 -0
  30. package/dist/features/connectors/components/ConnectorTokenPolicyDialog.d.ts +11 -0
  31. package/dist/features/connectors/components/InsightConnectorCard.d.ts +7 -1
  32. package/dist/features/connectors/components/InsightConnectorForm.d.ts +2 -1
  33. package/dist/features/connectors/grafana-wizard/GrafanaConnectorWizard.d.ts +7 -0
  34. package/dist/features/connectors/prometheus-wizard/PrometheusConnectorWizard.d.ts +5 -0
  35. package/dist/features/connectors/source-selection/ConnectorSourcePickerDialog.d.ts +6 -0
  36. package/dist/features/incidents/components/IncidentComments.d.ts +9 -0
  37. package/dist/features/incidents/components/IncidentDeleteDialog.d.ts +8 -0
  38. package/dist/features/incidents/components/IncidentFilters.d.ts +18 -0
  39. package/dist/features/incidents/components/IncidentForm.d.ts +15 -0
  40. package/dist/features/incidents/components/IncidentTimeline.d.ts +4 -0
  41. package/dist/features/incidents/components/InsightIncidentCard.d.ts +2 -1
  42. package/dist/features/incidents/components/InsightRcaResult.d.ts +2 -1
  43. package/dist/features/incidents/components/incidents-columns.d.ts +7 -0
  44. package/dist/features/incidents/components/incidents-table.d.ts +18 -0
  45. package/dist/features/projects/components/projects-columns.d.ts +8 -0
  46. package/dist/features/projects/components/projects-table.d.ts +15 -0
  47. package/dist/features/sop/components/SopAiDialog.d.ts +8 -0
  48. package/dist/features/sop/components/SopCard.d.ts +9 -0
  49. package/dist/features/sop/components/SopDeleteDialog.d.ts +6 -0
  50. package/dist/features/sop/components/SopForm.d.ts +20 -0
  51. package/dist/features/sop/components/sop-columns.d.ts +6 -0
  52. package/dist/features/sop/components/sop-table.d.ts +20 -0
  53. package/dist/features/sop/detail.d.ts +5 -0
  54. package/dist/features/sop/index.d.ts +4 -0
  55. package/dist/hooks/use-table-url-state.d.ts +54 -0
  56. package/dist/hooks/useInsightPolling.d.ts +1 -0
  57. package/dist/hooks/useInsightUsers.d.ts +10 -0
  58. package/dist/index.d.ts +1 -1
  59. package/dist/index.js +176 -29
  60. package/dist/index.mjs +63176 -10489
  61. package/dist/lib/clipboard.d.ts +1 -0
  62. package/dist/router.d.ts +1 -1
  63. package/dist/services/insight.d.ts +136 -3
  64. package/dist/services/sop.d.ts +38 -0
  65. package/dist/style.css +1 -1
  66. package/dist/types.d.ts +370 -10
  67. package/package.json +7 -1
  68. package/dist/features/alerts/components/InsightAlertTable.d.ts +0 -10
  69. package/dist/features/incidents/components/InsightIncidentTable.d.ts +0 -8
  70. package/dist/features/projects/components/InsightProjectTable.d.ts +0 -8
@@ -0,0 +1,7 @@
1
+ import { ColumnDef } from '@tanstack/react-table';
2
+ import { InsightIncident } from '../../../types.js';
3
+ export declare const getIncidentsColumns: (actions: {
4
+ onAssignClick: (incident: InsightIncident) => void;
5
+ onEdit: (incident: InsightIncident) => void;
6
+ onDelete: (id: string) => void;
7
+ }) => ColumnDef<InsightIncident>[];
@@ -0,0 +1,18 @@
1
+ import { InsightIncident } from '../../../types.js';
2
+ interface IncidentsTableProps {
3
+ data: InsightIncident[];
4
+ total: number;
5
+ page: number;
6
+ limit: number;
7
+ loading?: boolean;
8
+ onPageChange: (page: number) => void;
9
+ onLimitChange: (limit: number) => void;
10
+ onViewResult: (id: string) => void;
11
+ onAssignClick: (incident: InsightIncident) => void;
12
+ onEdit: (incident: InsightIncident) => void;
13
+ onDelete: (id: string) => void;
14
+ search: string;
15
+ onSearchChange: (search: string) => void;
16
+ }
17
+ export declare function IncidentsTable({ data, total, page, limit, loading, onPageChange, onLimitChange, onViewResult, onAssignClick, onEdit, onDelete, search, onSearchChange, }: IncidentsTableProps): import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -0,0 +1,8 @@
1
+ import { ColumnDef } from '@tanstack/react-table';
2
+ import { InsightProject } from '../../../types.js';
3
+ interface GetColumnsProps {
4
+ onEdit: (project: InsightProject) => void;
5
+ onDelete: (project: InsightProject) => void;
6
+ }
7
+ export declare function getProjectsColumns({ onEdit, onDelete, }: GetColumnsProps): ColumnDef<InsightProject>[];
8
+ export {};
@@ -0,0 +1,15 @@
1
+ import { InsightProject } from '../../../types.js';
2
+ interface ProjectsTableProps {
3
+ data: InsightProject[];
4
+ total: number;
5
+ page: number;
6
+ limit: number;
7
+ onPageChange: (page: number) => void;
8
+ onLimitChange: (limit: number) => void;
9
+ onEdit: (project: InsightProject) => void;
10
+ onDelete: (project: InsightProject) => void;
11
+ search: string;
12
+ onSearchChange: (search: string) => void;
13
+ }
14
+ export declare function ProjectsTable({ data, total, page, limit, onPageChange, onLimitChange, onEdit, onDelete, search, onSearchChange, }: ProjectsTableProps): import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,8 @@
1
+ interface SopAiDialogProps {
2
+ open: boolean;
3
+ submitting: boolean;
4
+ onSubmit: (prompt: string) => void;
5
+ onCancel: () => void;
6
+ }
7
+ export declare function SopAiDialog({ open, submitting, onSubmit, onCancel }: SopAiDialogProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,9 @@
1
+ import { InsightSop } from '../../../types.js';
2
+ interface SopCardProps {
3
+ sop: InsightSop;
4
+ onEdit: (sop: InsightSop) => void;
5
+ onDelete: (sop: InsightSop) => void;
6
+ onView: (sop: InsightSop) => void;
7
+ }
8
+ export declare function SopCard({ sop, onEdit, onDelete, onView }: SopCardProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,6 @@
1
+ export declare function SopDeleteDialog({ open, onConfirm, onCancel, deleting, }: {
2
+ open: boolean;
3
+ onConfirm: () => void;
4
+ onCancel: () => void;
5
+ deleting: boolean;
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,20 @@
1
+ import { InsightSop } from '../../../types.js';
2
+ interface SopFormProps {
3
+ open: boolean;
4
+ editing: InsightSop | null;
5
+ submitting: boolean;
6
+ onSubmit: (data: SopFormData) => void;
7
+ onCancel: () => void;
8
+ }
9
+ export interface SopFormData {
10
+ title: string;
11
+ alertType: string;
12
+ service: string;
13
+ severity: string;
14
+ status: string;
15
+ description: string;
16
+ steps: string;
17
+ prompt?: string;
18
+ }
19
+ export declare function SopForm({ open, editing, submitting, onSubmit, onCancel }: SopFormProps): import("react/jsx-runtime").JSX.Element;
20
+ export {};
@@ -0,0 +1,6 @@
1
+ import { ColumnDef } from '@tanstack/react-table';
2
+ import { InsightSop } from '../../../types.js';
3
+ export declare const getSopColumns: (actions: {
4
+ onEdit: (sop: InsightSop) => void;
5
+ onDelete: (sop: InsightSop) => void;
6
+ }) => ColumnDef<InsightSop>[];
@@ -0,0 +1,20 @@
1
+ import { InsightSop } from '../../../types.js';
2
+ interface SopTableProps {
3
+ data: InsightSop[];
4
+ total: number;
5
+ page: number;
6
+ limit: number;
7
+ onPageChange: (page: number) => void;
8
+ onLimitChange: (limit: number) => void;
9
+ onView: (id: string) => void;
10
+ onEdit: (sop: InsightSop) => void;
11
+ onDelete: (sop: InsightSop) => void;
12
+ search: string;
13
+ onSearchChange: (search: string) => void;
14
+ severityFilter: string;
15
+ onSeverityChange: (severity: string) => void;
16
+ statusFilter: string;
17
+ onStatusChange: (status: string) => void;
18
+ }
19
+ export declare function SopTable({ data, total, page, limit, onPageChange, onLimitChange, onView, onEdit, onDelete, search, onSearchChange, severityFilter, onSeverityChange, statusFilter, onStatusChange, }: SopTableProps): import("react/jsx-runtime").JSX.Element;
20
+ export {};
@@ -0,0 +1,5 @@
1
+ export interface InsightSopDetailPageProps {
2
+ sopId: string;
3
+ onBack: () => void;
4
+ }
5
+ export declare function InsightSopDetailPage({ sopId, onBack }: InsightSopDetailPageProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export interface InsightSopPageProps {
2
+ onViewSop: (id: string) => void;
3
+ }
4
+ export declare function InsightSopPage({ onViewSop }: InsightSopPageProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,54 @@
1
+ import { ColumnFiltersState, OnChangeFn, PaginationState, SortingState } from '@tanstack/react-table';
2
+ type SearchRecord = Record<string, unknown>;
3
+ export type NavigateFn = (opts: {
4
+ search: true | SearchRecord | ((prev: SearchRecord) => Partial<SearchRecord> | SearchRecord);
5
+ replace?: boolean;
6
+ }) => void;
7
+ type UseTableUrlStateParams = {
8
+ search: SearchRecord;
9
+ navigate: NavigateFn;
10
+ pagination?: {
11
+ pageKey?: string;
12
+ pageSizeKey?: string;
13
+ defaultPage?: number;
14
+ defaultPageSize?: number;
15
+ };
16
+ sorting?: {
17
+ sortByKey?: string;
18
+ sortOrderKey?: string;
19
+ defaultSorting?: SortingState;
20
+ };
21
+ globalFilter?: {
22
+ enabled?: boolean;
23
+ key?: string;
24
+ trim?: boolean;
25
+ };
26
+ columnFilters?: Array<{
27
+ columnId: string;
28
+ searchKey: string;
29
+ type?: 'string';
30
+ serialize?: (value: unknown) => unknown;
31
+ deserialize?: (value: unknown) => unknown;
32
+ } | {
33
+ columnId: string;
34
+ searchKey: string;
35
+ type: 'array';
36
+ serialize?: (value: unknown) => unknown;
37
+ deserialize?: (value: unknown) => unknown;
38
+ }>;
39
+ };
40
+ type UseTableUrlStateReturn = {
41
+ globalFilter?: string;
42
+ onGlobalFilterChange?: OnChangeFn<string>;
43
+ columnFilters: ColumnFiltersState;
44
+ onColumnFiltersChange: OnChangeFn<ColumnFiltersState>;
45
+ pagination: PaginationState;
46
+ onPaginationChange: OnChangeFn<PaginationState>;
47
+ sorting: SortingState;
48
+ onSortingChange: OnChangeFn<SortingState>;
49
+ ensurePageInRange: (pageCount: number, opts?: {
50
+ resetTo?: 'first' | 'last';
51
+ }) => void;
52
+ };
53
+ export declare function useTableUrlState(params: UseTableUrlStateParams): UseTableUrlStateReturn;
54
+ export {};
@@ -15,4 +15,5 @@ export declare function useInsightPolling(incidentId: string | null, autoStart:
15
15
  isComplete: boolean;
16
16
  isFailed: boolean;
17
17
  optimisticTrigger: () => void;
18
+ markFailed: () => void;
18
19
  };
@@ -0,0 +1,10 @@
1
+ export interface InsightUser {
2
+ id: string;
3
+ email: string;
4
+ full_name?: string;
5
+ role?: string;
6
+ }
7
+ export declare function useInsightUsers(): {
8
+ users: InsightUser[];
9
+ loading: boolean;
10
+ };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { InsightPage, type InsightPageProps } from './InsightPage.js';
2
2
  export { configureApi, api } from './api.js';
3
3
  export { createRouteTree } from './router.js';
4
- export type { InsightIncident, InsightAnalysisResult, NewInsightAnalysisResult, InsightConnector, InsightConnectorType, InsightAlert, InsightAlertSeverity, InsightAlertStatus, InsightProject, } from './types.js';
4
+ export type { InsightIncident, InsightAnalysisResult, NewInsightAnalysisResult, InsightConnector, InsightConnectorType, InsightAlert, InsightAlertSeverity, InsightAlertStatus, InsightProject, InsightSop, InsightSopSeverity, InsightSopStatus, } from './types.js';
5
5
  export declare const insightNavItems: {
6
6
  title: string;
7
7
  url: string;