/*! * @preserve * Add to Calendar Button * Public type declarations (generated from src - do not edit) * Creator: Jens Kuerschner (https://jekuer.com) * Project: https://github.com/add2cal/add-to-calendar-button * License: Elastic License 2.0 (ELv2) (https://github.com/add2cal/add-to-calendar-button/blob/main/LICENSE.txt) * Version: 3.6.0 * Note: DO NOT REMOVE THE COPYRIGHT NOTICE ABOVE! */ /** * Shared internal types for the add-to-calendar-button source. * * Two config shapes flow through the code: * - ATCBInputConfig: what users provide (attributes arrive as strings, flags may be * string-y booleans, options may be JSON strings). Aligned with the public * AddToCalendarButtonType in index.d.ts (asserted by the type compatibility test). * - ATCBConfig: the decorated shape produced by decorate_data (flags coerced to * real booleans, options normalized, dates array populated, internal fields added). * * Decorated fields stay optional on purpose: the decoration pipeline fills them at * runtime and consuming functions guard or assert presence where needed. Tightening * them to required fields would be a type-only change with a large diff surface - * a candidate for a later minor release, not something to mix into feature work. */ export type ATCBOptionName = "apple" | "google" | "ical" | "ms365" | "msteams" | "outlookcom" | "yahoo"; /** * Legacy v2 option spellings. Still fully supported as aliases: the runtime * normalizes any casing (plus the "Microsoft ..." / "Outlook.com" long forms) * to the official lowercase keys above. */ export type ATCBOptionNameLegacy = "Apple" | "Google" | "iCal" | "Microsoft365" | "MicrosoftTeams" | "Outlook.com" | "Yahoo"; export type ATCBEventStatus = "tentative" | "confirmed" | "cancelled"; /** * Legacy v2 status spelling. Still fully supported: status input is * case-insensitive and normalized to lowercase during decoration. */ export type ATCBEventStatusLegacy = Uppercase; /** * Button style options. List style options. Light mode options. Custom Labels. Normalized during decoration, but the input accepts any string (for forward compatibility with new styles). */ export type ATCBButtonStyle = "default" | "simple" | "3d" | "flat" | "round" | "neumorphism" | "text" | "date" | "custom" | "none"; export type ATCBListStyle = "dropdown" | "dropdown-static" | "dropup-static" | "overlay" | "modal"; export type ATCBLightMode = "system" | "dark" | "light" | "bodyScheme"; export type CustomLabelsObject = { [key: string]: string | null | undefined; }; export interface ATCBGroupOverviewConfig { "years-only"?: boolean; type?: "list" | "cards" | "compact"; from?: string; to?: string; "no-details"?: boolean; "no-add"?: boolean; "no-subscribe-button"?: boolean; "custom-domain"?: string; "add-via-list"?: boolean; } /** * One event date entry (multi-date configs carry several). * Post-decoration, entries also carry computed internals (e.g. overdue). */ export interface ATCBDateEntryInput { name?: string; description?: string; startDate?: string; startTime?: string; endDate?: string; endTime?: string; timeZone?: string; useUserTZ?: boolean; location?: string; status?: ATCBEventStatus | ATCBEventStatusLegacy | string; sequence?: number | string; uid?: string; organizer?: string; attendee?: string; icsReminder?: number | string; icsUrl?: string; icsCategories?: string[] | string; icsClass?: string; icsPriority?: number | string; icsGeo?: string; icsAttach?: string[] | string; icsCreated?: string; icsUpdated?: string; } /** * Decorated date entry: input fields plus computed internals and the dynamic-access * escape hatch the decoration pipeline relies on. The input variant stays CLOSED * (no index signature) so public closed interfaces like EventDate remain assignable. */ export interface ATCBDateEntry extends ATCBDateEntryInput { overdue?: boolean; timeZoneDisplay?: string; [key: string]: unknown; } /** * Raw input config (web component attributes or atcb_action argument). * Attribute values arrive as strings; boolean-ish fields accept both. */ export interface ATCBInputConfig { prokey?: string; groupOverview?: boolean | string; groupOverviewConfig?: ATCBGroupOverviewConfig | string; name?: string; dates?: ATCBDateEntryInput[] | string; description?: string; startDate?: string; startTime?: string; endDate?: string; endTime?: string; timeZone?: string; useUserTZ?: boolean | string; location?: string; status?: ATCBEventStatus | ATCBEventStatusLegacy | string; sequence?: number | string; uid?: string; organizer?: string; attendee?: string; icsFile?: string; images?: string[] | string; recurrence?: string; recurrence_interval?: number | string; recurrence_until?: string; recurrence_count?: number | string; recurrence_byDay?: string[] | string; recurrence_byMonth?: string[] | string | number[] | number; recurrence_byMonthDay?: string[] | string | number[] | number; recurrence_weekstart?: string; availability?: "busy" | "free" | string; icsCreated?: string; icsUpdated?: string; identifier?: string; subscribe?: boolean | string; options?: (ATCBOptionName | ATCBOptionNameLegacy)[] | string[] | string; optionsMobile?: (ATCBOptionName | ATCBOptionNameLegacy)[] | string[] | string; optionsIOS?: (ATCBOptionName | ATCBOptionNameLegacy)[] | string[] | string; iCalFileName?: string; listStyle?: ATCBListStyle | string; buttonStyle?: ATCBButtonStyle | string; trigger?: "hover" | "click" | string; inline?: boolean | string; inlineRsvp?: string; buttonsList?: boolean | string; hideIconButton?: boolean | string; hideIconList?: boolean | string; hideIconModal?: boolean | string; hideTextLabelButton?: boolean | string; hideTextLabelList?: boolean | string; hideBackground?: boolean | string; hideCheckmark?: boolean | string; hideBranding?: boolean | string; hideButton?: boolean | string; hideRichData?: boolean | string; size?: string; label?: string; customLabels?: CustomLabelsObject | string; customCss?: string; lightMode?: ATCBLightMode | string; language?: string; ty?: object | string; rsvp?: object | string; bypassWebViewCheck?: boolean | string; debug?: boolean | string; cspnonce?: string; blockInteraction?: boolean | string; styleLight?: string; styleDark?: string; styleSource?: string; loadAllStyles?: boolean | string; icsReminder?: number | string; icsUrl?: string; icsCategories?: string[] | string; icsClass?: string; icsPriority?: number | string; icsGeo?: string; icsAttach?: string[] | string; icsExdate?: string[] | string; disabled?: boolean | string; hidden?: boolean | string; pastDateHandling?: string; proxy?: boolean | string; fakeMobile?: boolean | string; fakeIOS?: boolean | string; fakeAndroid?: boolean | string; proOverride?: boolean | string; forceOverlay?: boolean | string; instance?: number | string; customVar?: CustomLabelsObject | string; domain?: string; dev?: boolean | string; } /** * Decorated config as produced by decorate_data and consumed by * validation, generation, links, and control code. */ export interface ATCBConfig { proKey?: string; public_event_overview?: boolean; groupOverview?: boolean; groupOverviewConfig?: ATCBGroupOverviewConfig; name?: string; dates?: ATCBDateEntry[]; description?: string; descriptionHtmlFree?: string; startDate?: string; startTime?: string; endDate?: string; endTime?: string; timeZone?: string; useUserTZ?: boolean; location?: string; onlineEvent?: boolean; status?: string; sequence?: number | string; uid?: string; organizer?: string; attendee?: string; icsFile?: string; images?: string[]; recurrence?: string; recurrence_interval?: number | string; recurrence_until?: string; recurrence_count?: number | string; recurrence_byDay?: string; recurrence_byMonth?: string; recurrence_byMonthDay?: string; recurrence_weekstart?: string; recurrence_frequency?: string; recurrence_simplified?: boolean; availability?: string; icsCreated?: string; icsUpdated?: string; identifier?: string; subscribe?: boolean; options?: string[]; optionsMobile?: string[]; optionsIOS?: string[]; iCalFileName?: string; listStyle?: ATCBListStyle | string; buttonStyle?: ATCBButtonStyle | string; trigger?: "hover" | "click" | string; inline?: boolean; inlineRsvp?: string; inlineRSVP?: boolean; buttonsList?: boolean; hideIconButton?: boolean; hideIconList?: boolean; hideIconModal?: boolean; hideTextLabelButton?: boolean; hideTextLabelList?: boolean; hideBackground?: boolean; hideCheckmark?: boolean; hideBranding?: boolean; hideButton?: boolean; hideRichData?: boolean; size?: string; sizes?: { [key: string]: number | string; }; label?: string; customLabels?: CustomLabelsObject; customCss?: string; lightMode?: string; language?: string; formatLocale?: string; translationLocale?: string; rtl?: boolean; ty?: { [key: string]: unknown; }; rsvp?: { [key: string]: unknown; }; bypassWebViewCheck?: boolean; debug?: boolean; cspnonce?: string; blockInteraction?: boolean; styleLight?: string; styleDark?: string; styleSource?: string; loadAllStyles?: boolean; icsExdate?: string[] | string; disabled?: boolean; hidden?: boolean; pastDateHandling?: string; proxy?: boolean; fakeMobile?: boolean; fakeIOS?: boolean; fakeAndroid?: boolean; proOverride?: boolean; forceOverlay?: boolean; instance?: number | string; customVar?: CustomLabelsObject; dev?: boolean; landingpage?: { [key: string]: unknown; }; domain?: string; allOverdue?: boolean; allCancelled?: boolean; js?: boolean; [key: string]: unknown; } declare function generate_timestring(dates: ATCBDateEntryInput[], language?: string, subEvent?: "all" | number, decorate?: boolean, browserTimeOverride?: boolean, enforceYear?: boolean, hideTimeZone?: boolean): string[]; declare function decorate_data_dates(data: ATCBConfig | ATCBInputConfig): ATCBConfig; export { decorate_data_dates as atcb_decorate_data_dates, generate_timestring as atcb_generate_timestring, }; export {};