meyi-insight-ui-dev 1.0.21 → 1.0.23

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.
@@ -4,5 +4,7 @@ export interface InsightPageProps {
4
4
  basePath?: string;
5
5
  userRole?: string;
6
6
  userId?: string;
7
+ /** Host navigation callback for the Cost source workflow. */
8
+ onOpenCostSources?: () => void;
7
9
  }
8
- export declare function InsightPage({ apiBase, token, basePath, userRole, userId }: InsightPageProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function InsightPage({ apiBase, token, basePath, userRole, userId, onOpenCostSources }: InsightPageProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { ComponentType } from 'react';
2
+ export type FilterOption = {
3
+ label: string;
4
+ value: string;
5
+ icon?: ComponentType<{
6
+ className?: string;
7
+ }>;
8
+ };
9
+ export declare function FacetedFilter({ title, options, selected, onChange, }: {
10
+ title: string;
11
+ options: FilterOption[];
12
+ selected: string[];
13
+ onChange: (values: string[]) => void;
14
+ }): import("react/jsx-runtime").JSX.Element;
package/dist/context.d.ts CHANGED
@@ -4,11 +4,13 @@ interface InsightContextValue {
4
4
  userId: string;
5
5
  isAdmin: boolean;
6
6
  isReadOnly: boolean;
7
+ openCostSources?: () => void;
7
8
  }
8
9
  export declare const useInsightContext: () => InsightContextValue;
9
- export declare function InsightProvider({ role, userId, children }: {
10
+ export declare function InsightProvider({ role, userId, openCostSources, children }: {
10
11
  role: string;
11
12
  userId: string;
13
+ openCostSources?: () => void;
12
14
  children: React.ReactNode;
13
15
  }): import("react/jsx-runtime").JSX.Element;
14
16
  export {};
@@ -0,0 +1,6 @@
1
+ interface CategoryPageProps {
2
+ category: "operations" | "security" | "cost";
3
+ onViewResult: (id: string) => void;
4
+ }
5
+ export declare function IncidentCategoryPage({ category, onViewResult }: CategoryPageProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -2,6 +2,7 @@ export type IncidentFiltersState = {
2
2
  statuses: string[];
3
3
  assigneeIds: string[];
4
4
  priorities: string[];
5
+ assignedToMe: boolean;
5
6
  };
6
7
  interface Props {
7
8
  search: string;
@@ -16,6 +17,7 @@ export declare function getDefaultIncidentFilters(): {
16
17
  statuses: string[];
17
18
  assigneeIds: string[];
18
19
  priorities: string[];
20
+ assignedToMe: boolean;
19
21
  };
20
22
  export declare function IncidentFilters({ search, filters, loading, onSearchChange, onFiltersChange, onRefresh, children, }: Props): import("react/jsx-runtime").JSX.Element;
21
23
  export {};
@@ -2,5 +2,4 @@ import { ColumnDef } from '@tanstack/react-table';
2
2
  import { InsightIncident } from '../../../types.js';
3
3
  export declare const getIncidentsColumns: (actions: {
4
4
  onEdit: (incident: InsightIncident) => void;
5
- onDelete: (id: string) => void;
6
5
  }) => ColumnDef<InsightIncident>[];
@@ -10,8 +10,7 @@ interface IncidentsTableProps {
10
10
  onLimitChange: (limit: number) => void;
11
11
  onViewResult: (id: string) => void;
12
12
  onEdit: (incident: InsightIncident) => void;
13
- onDelete: (id: string) => void;
14
13
  renderFilters?: (table: any) => React.ReactNode;
15
14
  }
16
- export declare function IncidentsTable({ data, total, page, limit, loading, onPageChange, onLimitChange, onViewResult, onEdit, onDelete, renderFilters, }: IncidentsTableProps): import("react/jsx-runtime").JSX.Element;
15
+ export declare function IncidentsTable({ data, total, page, limit, loading, onPageChange, onLimitChange, onViewResult, onEdit, renderFilters, }: IncidentsTableProps): import("react/jsx-runtime").JSX.Element;
17
16
  export {};
@@ -1,5 +1,6 @@
1
- export declare function InsightIncidentDashboardPage({ initialView, onViewIncident, onViewList, }: {
1
+ export declare function InsightIncidentDashboardPage({ initialView, onViewIncident, onViewList, sourceTypes, }: {
2
2
  initialView?: "overview" | "analytics";
3
3
  onViewIncident?: (id: string) => void;
4
4
  onViewList?: () => void;
5
+ sourceTypes?: string[];
5
6
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,6 @@
1
1
  interface Props {
2
2
  onViewResult: (id: string) => void;
3
+ sourceTypes?: string[];
3
4
  }
4
- export declare function InsightIncidentsPage({ onViewResult }: Props): import("react/jsx-runtime").JSX.Element;
5
+ export declare function InsightIncidentsPage({ onViewResult, sourceTypes }: Props): import("react/jsx-runtime").JSX.Element;
5
6
  export {};
@@ -1,5 +1,5 @@
1
- import { InsightSourceType } from '../../../types.js';
1
+ import { AddSourceType } from './add-source-options.js';
2
2
  export declare function AddSourceSourceStep({ selected, onSelect, }: {
3
- selected: InsightSourceType;
4
- onSelect: (type: InsightSourceType) => void;
3
+ selected: AddSourceType;
4
+ onSelect: (type: AddSourceType) => void;
5
5
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,6 @@
1
- export declare function AddSourceWizard({ open, onOpenChange, onCreated, }: {
1
+ export declare function AddSourceWizard({ open, onOpenChange, onCreated, onOpenCostSources, }: {
2
2
  open: boolean;
3
3
  onOpenChange: (open: boolean) => void;
4
4
  onCreated: () => void;
5
+ onOpenCostSources?: () => void;
5
6
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,12 @@
1
1
  import { InsightSourceType } from '../../../types.js';
2
2
  export type AddSourceSourceOption = {
3
- type: InsightSourceType;
3
+ type: AddSourceType;
4
4
  label: string;
5
5
  description: string;
6
6
  mono: string;
7
7
  color: string;
8
8
  };
9
+ export type AddSourceType = InsightSourceType | "cost";
9
10
  export declare const ADD_CONNECTOR_SOURCES: AddSourceSourceOption[];
10
- export declare function getSourceSourceOption(type: InsightSourceType): AddSourceSourceOption;
11
+ export declare function getSourceSourceOption(type: AddSourceType): AddSourceSourceOption;
11
12
  export declare const DEPLOYMENT_SUMMARY: Record<InsightSourceType, string[]>;
@@ -11,7 +11,7 @@ type SourceCallbacks = {
11
11
  onDatadogSetup: (source: InsightSource) => void;
12
12
  };
13
13
  export declare function sourceRegionFilterValue(source: InsightSource): string;
14
- export declare function sourceRowStatus(source: InsightSource): "active" | "disabled" | "degraded" | "error";
14
+ export declare function sourceRowStatus(source: InsightSource): "disabled" | "error" | "active" | "degraded";
15
15
  export declare function SourceGroupedList({ sources, ...callbacks }: {
16
16
  sources: InsightSource[];
17
17
  } & SourceCallbacks): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function useOpenIncidentCount(intervalMs?: number): number | undefined;
package/dist/index.d.ts CHANGED
@@ -1,22 +1,59 @@
1
1
  export { InsightPage, type InsightPageProps } from './InsightPage.js';
2
2
  export { configureApi, api } from './api.js';
3
+ export { useOpenIncidentCount } from './hooks/useOpenIncidentCount.js';
3
4
  export { createRouteTree } from './router.js';
4
5
  export type { InsightIncident, InsightAnalysisResult, NewInsightAnalysisResult, InsightSource, InsightSourceType, InsightAlert, InsightAlertSeverity, InsightAlertStatus, InsightProject, InsightSop, InsightSopSeverity, InsightSopStatus, InsightWorkflow, InsightWorkflowExecution, } from './types.js';
5
- export declare const insightNavItems: ({
6
+ export declare function getInsightNavItems(openIncidentCount?: number): ({
6
7
  title: string;
7
8
  url: string;
8
9
  icon: string;
9
10
  roles: string[];
10
- items?: undefined;
11
+ items: ({
12
+ title: string;
13
+ url: string;
14
+ icon: string;
15
+ roles: string[];
16
+ badge: string | undefined;
17
+ disabled?: undefined;
18
+ } | {
19
+ title: string;
20
+ url: string;
21
+ icon: string;
22
+ roles: string[];
23
+ disabled: boolean;
24
+ badge?: undefined;
25
+ })[];
11
26
  } | {
12
27
  title: string;
13
28
  url: string;
14
29
  icon: string;
15
30
  roles: string[];
16
- items: {
31
+ items?: undefined;
32
+ })[];
33
+ export declare const insightNavItems: ({
34
+ title: string;
35
+ url: string;
36
+ icon: string;
37
+ roles: string[];
38
+ items: ({
39
+ title: string;
40
+ url: string;
41
+ icon: string;
42
+ roles: string[];
43
+ badge: string | undefined;
44
+ disabled?: undefined;
45
+ } | {
17
46
  title: string;
18
47
  url: string;
19
48
  icon: string;
20
49
  roles: string[];
21
- }[];
50
+ disabled: boolean;
51
+ badge?: undefined;
52
+ })[];
53
+ } | {
54
+ title: string;
55
+ url: string;
56
+ icon: string;
57
+ roles: string[];
58
+ items?: undefined;
22
59
  })[];