import { ILiftStatusWebComponentError } from '../../utils/types'; import { IEnergyUsageRow } from './ls-energy-usage.utils'; /** * @slot - Additional content, rendered at the end of the component. * @slot loading - Replaces the built-in loading message. * * @part container - The outer wrapper. * @part title - The component heading. * @part chart - The element the chart is rendered into. * @part loading - The loading message. * @part empty - The message shown when the period holds no energy usage. */ export declare class LsEnergyUsage { /** The unique key that is used to identify store data. */ readonly idKey: string; /** Whether or not to show the title of the component. */ readonly hideTitle: boolean; /** Start of the period, ISO 8601. A date without a time covers the whole day. */ readonly from?: string; /** End of the period, ISO 8601. Defaults to now, or the end of today when `from` is a date. */ readonly to?: string; /** Height of the chart in pixels. */ readonly height: number; /** * Fill of the bars. A colour, not a custom property, because the bars are * SVG attributes that CSS custom properties cannot reach. */ readonly barColor: string; rows: IEnergyUsageRow[]; isLoading: boolean; isRefreshing: boolean; /** Centralized error state for tracking component errors. */ errorState: ILiftStatusWebComponentError; private store; private isComponentMounted; private storeUnsubscribes; private containerElement; private chartElement; private chartHost; /** * Scopes the chart's SVG ids (clip paths, gradients) to this instance. The * DOM adapter, unlike TanStack's framework adapters, does not generate one. */ private readonly chartIdPrefix; /** Bumped per request, so a slow response cannot overwrite a newer one. */ private requestSequence; private hadStoreError; private warnedPeriodProps; private readonly scheduleLoad; handlePeriodPropChange(): void; componentWillLoad(): Promise; componentDidRender(): void; disconnectedCallback(): void; private get locale(); private logError; private setErrorState; private updateErrorState; private applyErrorOverlay; /** * The period is resolved on every load, so the same unusable props are only * reported the first time they are seen. */ private readonly warnAboutPeriod; private resolveCustomPeriod; private resolvePeriod; /** Whether the component unmounted or a newer request started in the meantime. */ private isStale; private loadData; private formatNumber; private buildChartOptions; /** * Mounts, updates or tears down the chart to match the render. The chart is * not part of the virtual DOM, so it is reconciled here instead. */ private syncChart; private destroyChart; render(): any; }