import { ReactNode, CSSProperties } from 'react'; import type { AxiosRequestConfig } from 'axios'; export interface BaseStyleConfig { className?: string; style?: CSSProperties; } export interface TextTruncationConfig extends BaseStyleConfig { enabled?: boolean; lines?: number; maxExpandedHeight?: string; viewMoreLabel?: ReactNode; viewLessLabel?: ReactNode; } export type RowClickHelpers = { isExpanded: boolean; expand: () => void; collapse: () => void; toggle: () => void; }; export interface ApiEndpointConfig { baseUrl: string; endpoint: string; configId?: string; method?: 'GET' | 'POST'; baseQuery?: Record; headers?: Record; } export interface IterationToneConfig { tone: string; style: string; } export interface LogContentBlock extends BaseStyleConfig { label?: ReactNode; content: string | ReactNode; truncation?: TextTruncationConfig; } export interface ImpactConfig extends BaseStyleConfig { label?: ReactNode; severity?: ReactNode; severityClassName?: string; severityStyle?: CSSProperties; description: string | ReactNode; truncation?: TextTruncationConfig; } export interface AuditLogEntry extends BaseStyleConfig { id: string | number; actionType: string; icon?: ReactNode; iconBgColor?: string; title: ReactNode; subtitle?: ReactNode; timestamp?: ReactNode; iterationTone?: IterationToneConfig | ReactNode; impact?: ImpactConfig; contentBlocks?: LogContentBlock[]; isInitiallyExpanded?: boolean; tags?: string[]; rawPayload?: any; customExpandedContent?: ReactNode; renderHeaderLeft?: () => ReactNode; renderHeaderRight?: (isExpanded: boolean, helpers: RowClickHelpers) => ReactNode; renderExpandedBody?: (helpers: RowClickHelpers) => ReactNode; [key: string]: any; } export interface ComparisonContextData extends BaseStyleConfig { title?: ReactNode; latestTextLabel?: ReactNode; originalTextLabel?: ReactNode; latestText?: string | ReactNode; originalText?: string | ReactNode; isInitiallyExpanded?: boolean; truncation?: TextTruncationConfig; renderHeaderLeft?: () => ReactNode; renderHeaderRight?: (isExpanded: boolean, helpers: RowClickHelpers) => ReactNode; renderExpandedBody?: (helpers: RowClickHelpers) => ReactNode; renderHeaderControl?: (helpers: RowClickHelpers) => ReactNode; rawPayload?: any; } export type FilterType = 'text' | 'select' | 'multi-select' | 'date-range' | 'impact-range' | 'custom'; export interface FilterOption { label: string; value: any; } export interface FilterItemConfig extends BaseStyleConfig { id: string; type: FilterType; label?: ReactNode; hint?: ReactNode; placeholder?: string; options?: FilterOption[]; dynamicOptionKey?: string; min?: number; max?: number; visible?: boolean; renderCustomFilter?: (value: any, onChange: (newValue: any) => void) => ReactNode; showSelectAll?: boolean; } export interface FilterToggleConfig { showFilterButton?: boolean; showSearch?: boolean; showSort?: boolean; showDateFilter?: boolean; showAnalystFilter?: boolean; showChangeTitleFilter?: boolean; showImpactPercentage?: boolean; sortOptions?: { latest?: boolean; oldest?: boolean; impactHighToLow?: boolean; impactLowToHigh?: boolean; }; showApplyButton?: boolean; } export type FiltersProp = FilterItemConfig[] | { config?: FilterToggleConfig; items?: FilterItemConfig[]; labels?: FilterLabels; impactRangeLimits: { min: number; max: number; }; }; export interface AuditLogIcons { close?: ReactNode; chevronUp?: ReactNode; chevronDown?: ReactNode; actionTypes?: Record; } export interface FilterLabels { title?: ReactNode; applyBtn?: ReactNode; clearBtn?: ReactNode; selectAll?: string; searchLabel?: string; searchPlaceholder?: string; searchHint?: ReactNode; sortLabel?: string; sortHint?: ReactNode; sortLatestFirst?: string; sortOldestFirst?: string; sortImpactHighToLow?: string; sortImpactLowToHigh?: string; multiSelectLabel?: string; analystsHint?: ReactNode; changeTitleLabel?: string; changeTitleHint?: ReactNode; dateLabel?: string; dateHint?: ReactNode; impactPercentageTitle?: string; impactHintLabel?: ReactNode; minPlaceholder?: string; maxPlaceholder?: string; } export interface AuditLogLabels { loadingMore?: ReactNode; emptyState?: ReactNode; impactSectionTitle?: string; changedToSuffix?: string; fromSuffix?: string; comparisonTitle?: ReactNode; comparisonLatestLabel?: ReactNode; comparisonOriginalLabel?: ReactNode; } export interface PanelClassNames { overlay?: string; root?: string; panelOpen?: string; panelClosed?: string; header?: string; title?: string; subtitle?: string; closeBtn?: string; scrollArea?: string; emptyState?: string; loadingText?: string; skeletonPulse?: string; skeletonBase?: string; skeletonLinePrimary?: string; skeletonLineSecondary?: string; skeletonLineTimestamp?: string; } export interface ComparisonClassNames { root?: string; header?: string; title?: string; control?: string; icon?: string; body?: string; sectionLabel?: string; latestText?: string; originalText?: string; truncateContainer?: string; truncateText?: string; toggleBtn?: string; } export interface LogItemClassNames { root?: string; header?: string; headerClickable?: string; headerDefault?: string; leftArea?: string; iconWrapper?: string; title?: string; subtitle?: string; rightArea?: string; timestamp?: string; chevron?: string; expandedArea?: string; tagsChip?: string; tagSeparator?: string; impactContainer?: string; impactHeader?: string; impactLabel?: string; severityBadge?: string; severityHigh?: string; severityMedium?: string; severityLow?: string; severityOther?: string; impactDescription?: string; impactTruncateContainer?: string; impactTruncateText?: string; impactToggleBtn?: string; divider?: string; contentBlock?: string; contentBlockLabel?: string; contentBlockText?: string; contentBlockTruncateContainer?: string; contentBlockTruncateText?: string; contentBlockToggleBtn?: string; } export interface CommonUIClassNames { markdown?: string; truncateContainer?: string; truncateText?: string; truncateExpandedScrollable?: string; toggleBtn?: string; } export interface FilterClassNames { root?: string; inputWrapper?: string; input?: string; inputWithIcon?: string; select?: string; multiSelectWrapper?: string; formGrid?: string; field?: string; label?: string; hint?: string; clearBtn?: string; applyBtn?: string; iconTriggerBtn?: string; iconTriggerBadge?: string; modalBackdrop?: string; modalContainer?: string; modalHeader?: string; modalTitle?: string; modalCloseBtn?: string; modalBody?: string; modalFooter?: string; accordionContainer?: string; accordionHeader?: string; accordionHeaderExpanded?: string; accordionTitle?: string; accordionBody?: string; accordionFooter?: string; } export interface AuditLogClassNames { panel?: PanelClassNames; comparison?: ComparisonClassNames; logItem?: LogItemClassNames; common?: CommonUIClassNames; filter?: FilterClassNames; } export interface AuditLogStyles { panel?: { [K in keyof PanelClassNames]?: CSSProperties; }; comparison?: { [K in keyof ComparisonClassNames]?: CSSProperties; }; logItem?: { [K in keyof LogItemClassNames]?: CSSProperties; }; common?: { [K in keyof CommonUIClassNames]?: CSSProperties; }; filter?: { [K in keyof FilterClassNames]?: CSSProperties; }; } export interface AuditLogPanelProps extends BaseStyleConfig { isOpen: boolean; onClose: () => void; closeOnOutsideClick?: boolean; logs?: AuditLogEntry[]; getData?: ApiEndpointConfig; distinctValuesApi?: ApiEndpointConfig; /** * Merged into the axios instance this panel uses for every request. Pass * `adapter` here to route requests through a custom transport. Memoize it — * a new object each render rebuilds the instance. */ axiosConfig?: AxiosRequestConfig; loading?: boolean; loadingMore?: boolean; hasMore?: boolean; onLoadMore?: () => void; title?: ReactNode; subtitle?: ReactNode; emptyState?: ReactNode; dataSourceMode?: 'external' | 'internal'; comparisonContext?: ComparisonContextData; showComparisonCard?: boolean; filters?: FiltersProp; filterValues?: Record; onFilterChange?: (newValues: Record) => void; autoFilter?: boolean; filterDisplayMode?: 'inline' | 'accordion' | 'popup'; showApplyButton?: boolean; labels?: AuditLogLabels; filterLabels?: FilterLabels; onRowClick?: (log: AuditLogEntry, helpers: RowClickHelpers) => void; itemConfig?: { getTone?: (log: AuditLogEntry, rawPayload?: any) => IterationToneConfig | undefined; getIcon?: (log: AuditLogEntry, rawPayload?: any) => ReactNode | undefined; getIconBg?: (log: AuditLogEntry, rawPayload?: any) => string | undefined; getStyle?: (log: AuditLogEntry, rawPayload?: any) => CSSProperties | undefined; getSeverityClass?: (severity: string, log: AuditLogEntry, rawPayload?: any) => string | undefined; getSeverityStyle?: (severity: string, log: AuditLogEntry, rawPayload?: any) => CSSProperties | undefined; }; renderCustomFilterSection?: () => ReactNode; renderHeaderControls?: () => ReactNode; renderCustomLogEntry?: (log: AuditLogEntry, index: number) => ReactNode; renderItemHeaderLeft?: (log: AuditLogEntry) => ReactNode; renderItemHeaderRight?: (log: AuditLogEntry, isExpanded: boolean, helpers: RowClickHelpers) => ReactNode; renderItemExpandedBody?: (log: AuditLogEntry, helpers: RowClickHelpers) => ReactNode; globalIcons?: AuditLogIcons; classNames?: AuditLogClassNames; styles?: AuditLogStyles; query?: { externalResourceId?: string[]; paginationLimit?: number; }; truncationConfig?: TextTruncationConfig; } //# sourceMappingURL=AuditLogPanel.types.d.ts.map