import type { CSSResultGroup } from 'lit'; import { QueryController } from '../../controllers/query.controller.js'; import { MutationController } from '../../controllers/mutation.controller.js'; import TerraElement from '../../internal/terra-element.js'; import { AuthController } from '../../auth/auth.controller.js'; import type { SubsetJobStatus, SubsetJobLink } from '../../apis/harmony.api.js'; import '../../events/terra-harmony-job-select.js'; import '../../events/terra-harmony-job-delete.js'; declare const TerraHarmonyHistory_base: typeof TerraElement & import("../../mixins/query-client.mixin.js").Constructor; /** * @summary Displays a horizontal scrolling strip of a user's recent Harmony job requests, * fetching additional pages on demand as the user scrolls. * @documentation https://terra-ui.netlify.app/components/harmony-history * @status stable * @since 1.0 * * @dependency terra-loader * @dependency terra-tooltip * @dependency terra-icon * * @event {{ job: SubsetJobStatus }} terra-harmony-job-select - Emitted when a thumbnail is clicked. * @event {{ jobId: string }} terra-harmony-job-delete - Emitted when the delete button on a thumbnail is clicked (only when `removeLabelsOnDelete` is false). * * @csspart nav-button - The left/right navigation arrow buttons. * @csspart viewport - The overflow-hidden container that clips the thumbnail track. * @csspart track - The inner flex container that translates to implement scrolling. * @csspart thumbnail - Each individual job thumbnail wrapper. */ export default class TerraHarmonyHistory extends TerraHarmonyHistory_base { static styles: CSSResultGroup; static dependencies: Record; bearerToken?: string; limit: number; filterByLabels?: string; /** * When true and `filter-by-labels` is set, clicking the delete button on a thumbnail * will call the Harmony /labels DELETE endpoint to remove the active filter labels from * that job (causing it to disappear from the filtered list). When false, a * `terra-harmony-job-delete` event is emitted instead and the consumer handles deletion. */ removeLabelsOnDelete: boolean; private _boundDataChangeHandler; private _scrollIndex; private _totalCount; private _loadedPages; private _pendingPages; private _viewportEl?; private _tooltip?; private _hideTooltipTimer?; private _showTooltipTimer?; private _refreshPage1Timer?; private _resizeObserver?; _authController: AuthController; _removeLabelsOnDeleteMutation: MutationController; /** * Page 1 is always managed by this QueryController (includes polling for non-final jobs). * Other pages are fetched imperatively via _fetchPage(). */ jobsQuery: QueryController<{ count: number; jobs: SubsetJobStatus[]; links: SubsetJobLink[]; }, Error, { count: number; jobs: SubsetJobStatus[]; links: SubsetJobLink[]; }, { count: number; jobs: SubsetJobStatus[]; links: SubsetJobLink[]; }, readonly unknown[]>; /** Cached reference to the last page-1 result to avoid redundant state updates */ private _lastPage1Data?; private get _visibleCount(); /** Returns all jobs as a sparse array — null slots represent not-yet-loaded pages */ private get _allJobs(); connectedCallback(): void; firstUpdated(): void; disconnectedCallback(): void; updated(changedProperties: Map): void; private _refreshPage1; private _fetchPage; private _checkPagesInView; private _scrollLeft; private _scrollRight; private _handleWheel; refresh(): Promise; private _showTooltip; private _hideTooltip; private _handleThumbnailClick; private _handleDeleteClick; /** Removes a single job from the local page cache and decrements the total count. */ private _optimisticallyRemoveJob; private _renderThumbnail; render(): import("lit-html").TemplateResult<1>; } export {};