UNPKG

@lovebowls/leagueelements

Version:

League Elements package for LoveBowls

60 lines 2.41 kB
export default LeagueMatchesUpcoming; /** * Custom element to display upcoming fixtures with paging and optional date filtering. * * @element league-matches-upcoming * @attr {string} data - JSON stringified array of match objects * @attr {string} [filter-date] - ISO date string (YYYY-MM-DD) to filter fixtures by date * @attr {boolean} [is-mobile] - Whether to use mobile styles * @attr {string} [team-mapping] - JSON stringified array of {value, label} objects mapping team values to display names * * Emits 'league-matches-upcoming-event' with detail { type: 'matchClick', match } */ declare class LeagueMatchesUpcoming extends HTMLElement { static get observedAttributes(): string[]; shadow: ShadowRoot; matches: any[]; currentPage: number; itemsPerPage: number; _filterDate: Date | null; teamMapping: {}; connectedCallback(): void; attributeChangedCallback(name: any, oldValue: any, newValue: any): void; _setFilterDate(dateString: any): void; _setTeamMapping(mappingData: any): void; /** * Loads and parses the matches data. * @param {string|Array} data */ loadData(data: string | any[]): Promise<void>; /** * Shows an error message in the component. * @param {string} message */ showError(message: string): void; /** * Returns the filtered list of fixtures. * If a `_filterDate` (from filter-date attribute) is set, it returns unplayed matches for that specific date. * Otherwise (no `_filterDate`), it returns unplayed matches scheduled for strictly after the current day. * The returned matches are sorted by date. * @returns {Array<Object>} An array of match objects. * @private */ private _upcomingFixturesList; _hasNextPage(): boolean; getTeamDisplayName(teamValue: any): any; /** * Gets the team ID and display name from match data. * @param {Object} match - The match object * @param {string} teamType - Either 'home' or 'away' * @returns {Object} An object with id and displayName */ getTeamDataFromMatch(match: Object, teamType?: string): Object; renderUpcomingFixtures(): string; _fillTemplate(template: any): any; render(): void; setupEventListeners(): void; setPage(pageNumber: any): void; escapeHtml(unsafe?: string): string; } //# sourceMappingURL=LeagueMatchesUpcoming.d.ts.map