@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
81 lines • 3.21 kB
TypeScript
export default class HolydaysOfObligationInput extends SelectInput {
static BASE_OPTIONS: readonly (Readonly<{
value: "Christmas";
label: "Christmas";
selected: true;
}> | Readonly<{
value: "Epiphany";
label: "Epiphany";
selected: true;
}> | Readonly<{
value: "Ascension";
label: "Ascension";
selected: true;
}> | Readonly<{
value: "CorpusChristi";
label: "Corpus Christi";
selected: true;
}> | Readonly<{
value: "MaryMotherOfGod";
label: "Mary, Mother of God";
selected: true;
}> | Readonly<{
value: "ImmaculateConception";
label: "Immaculate Conception";
selected: true;
}> | Readonly<{
value: "Assumption";
label: "Assumption";
selected: true;
}> | Readonly<{
value: "StJoseph";
label: "St. Joseph";
selected: true;
}> | Readonly<{
value: "StsPeterPaulAp";
label: "Sts. Peter and Paul, Apostles";
selected: true;
}> | Readonly<{
value: "AllSaints";
label: "All Saints";
selected: true;
}>)[];
static mergeOptions(customOptions: any): any[];
/**
* Constructs a HolydaysOfObligationInput object.
*
* @param {Array<{value:string,label:string,selected:boolean}>} options - An array of objects where each object has the following properties:
* - value: The value attribute for the option element.
* - label: The text content for the option element.
* - selected: A boolean indicating whether the option is selected by default (i.e. whether the liturgical event is celebrated as a holy day of obligation or not).
*
* This constructor initializes the holy days of obligation input select element, setting its name, id, and
* label text content, with the multiple attribute set to true.
* It also populates the select options with a minimal set of base options merged with any provided custom options,
* which can override the base options. The options are immutable and each option's
* selected state is determined by the `selected` boolean property for each option.
*/
constructor(options?: Array<{
value: string;
label: string;
selected: boolean;
}>);
setOptions(options: any): void;
get _options(): null;
/**
* Override the general Input disabled method.
*
* If set to true, the input element will be readonly and each of its options will be disabled, and the user will not be able to interact with it.
* If set to false, the input element and each of its options will be enabled and the user will be able to interact with it.
*
* If no parameter is provided, defaults to true.
*
* @param {boolean} [boolValue=true] - Whether the input element should be disabled.
* @returns {Input} The current instance for method chaining.
* @throws {Error} If the type of boolValue is not a boolean.
*/
disabled(boolValue?: boolean): Input;
#private;
}
import SelectInput from "./SelectInput.js";
//# sourceMappingURL=HolydaysOfObligationInput.d.ts.map