@liturgical-calendar/components-js
Version:
Liturgical calendar components for javascript: an html select populated with liturgical calendars supported by the Liturgical Calendar API; form controls for parameters that are supported by the Liturgical Calendar API; a webcalendar; and liturgy of the d
39 lines • 1.88 kB
TypeScript
export default class LocaleInput extends SelectInput {
static "__#6@#apiLocales": null;
static "__#6@#apiLocalesDisplay": {};
/**
* Constructs a LocaleInput object.
*
* @param {string|Intl.Locale|null} locale - The locale to use for the select element.
* The locale should be a valid string that can be parsed by the
* Intl.getCanonicalLocales function or an instance of Intl.Locale.
* If the locale string contains an underscore, the underscore will be replaced
* with a hyphen.
*
* @throws {Error} If the locale is invalid.
*/
constructor(locale?: string | Intl.Locale | null);
/**
* Updates the options for the calendar locales select input.
*
* This method takes an array of calendar locale identifiers and updates
* the select input with corresponding option elements. Each option element
* is created with the locale identifier as its value and display name.
*
* @param {string[]} calendarLocales - An array of calendar locale identifiers.
* @throws {Error} If the `calendarLocales` array is empty.
*/
setOptionsForCalendarLocales(calendarLocales?: string[]): void;
/**
* Resets the options for this LocaleInput instance.
*
* This method is typically called when the user selects a new calendar.
* It will reset the options to the default locales supported by the API, and
* set the selected value of the input to the value of the `selectedValue` property
* of the LocaleInput instance, or to "la" if no value is set.
*/
resetOptions(): void;
#private;
}
import SelectInput from "./SelectInput.js";
//# sourceMappingURL=LocaleInput.d.ts.map