@meyicloud/meyi-cost-ui 1.5.5 → 1.5.7

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.
@@ -8,5 +8,7 @@ export interface CostPageProps {
8
8
  basePath?: string;
9
9
  /** The current user's role */
10
10
  userRole?: string;
11
+ /** Stable tenant identifier used to isolate persisted account selection. */
12
+ tenantId?: string;
11
13
  }
12
- export declare function CostPage({ apiBase, token, basePath, userRole }: CostPageProps): React.JSX.Element;
14
+ export declare function CostPage({ apiBase, token, basePath, userRole, tenantId }: CostPageProps): React.JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function ManagementAccountSelect(): import("react").JSX.Element | null;
@@ -1,2 +1,17 @@
1
+ import { ReactNode } from 'react';
2
+ import { CostAwsSource } from './types.js';
1
3
  export declare const CostRoleProvider: import('react').Provider<string>;
2
4
  export declare const useCostRole: () => string;
5
+ interface CostAccountContextValue {
6
+ sources: CostAwsSource[];
7
+ managementAccountId: string;
8
+ loading: boolean;
9
+ selectManagementAccount: (accountId: string) => void;
10
+ refreshSources: () => Promise<void>;
11
+ }
12
+ export declare function CostAccountProvider({ tenantId, children }: {
13
+ tenantId?: string;
14
+ children: ReactNode;
15
+ }): import("react").JSX.Element;
16
+ export declare function useCostAccount(): CostAccountContextValue;
17
+ export {};
@@ -1,4 +1,4 @@
1
- import { CostAwsSource, CostOverview, CurDataStatus } from '../../../types.js';
1
+ import { CostOverview, CurDataStatus } from '../../../types.js';
2
2
  export declare function useCostOverview(): {
3
3
  data: CostOverview | null;
4
4
  dataStatus: CurDataStatus | null;
@@ -10,9 +10,6 @@ export declare function useCostOverview(): {
10
10
  value: string;
11
11
  label: string;
12
12
  }[];
13
- sources: CostAwsSource[];
14
- managementAccountId: string;
15
- changeManagementAccount: import('react').Dispatch<import('react').SetStateAction<string>>;
16
13
  changePeriod: (value: "monthly" | "yearly") => void;
17
14
  changeMonth: (value: string) => void;
18
15
  refresh: () => Promise<void>;