woltlab-compiler
Version:
A compiler for WoltLab-Package Archives and WoltLab-Package Components
133 lines (132 loc) • 3.88 kB
TypeScript
import { Localization } from "../Globalization/Localization";
import { ICategory } from "./ICategory";
import { IOptionOptions } from "./IOptionOptions";
import { OptionItem } from "./OptionItem";
import { OptionType } from "./OptionType";
/**
* Represents an option.
*/
export declare abstract class Option {
/**
* The id of the option.
*/
private id;
/**
* The name of the option.
*/
private name;
/**
* The human-readable name of the option.
*/
private displayName;
/**
* The description of the option.
*/
private description;
/**
* The category of the option.
*/
private category;
/**
* The type of the option.
*/
private type;
/**
* The default value of the option.
*/
private defaultValue;
/**
* The show-order of the option.
*/
private showOrder;
/**
* The validation-pattern of the option.
*/
private validationPattern;
/**
* The items of the option.
*/
private items;
/**
* A list of options of which at least one needs to be enabled for the option to be shown.
*/
private options;
/**
* A list of options which should be visually enabled when this option is enabled.
*
* A leading exclamation mark (`!`, `U+0021`) will disable the specified option when this option is enabled.
* For `ComboBox` and `RadioButton` types the list should be prefixed by the name of the `selectoption`s followed by a colon (`:`, `U+003A`).
*
* This setting is a visual helper for the administrator only.
* It does not have an effect on the server side processing of the option.
*/
private enableOptions;
/**
* A set of additional properties of the option.
*/
private additionalProperties;
/**
* Initializes a new instance of the `Option` class.
*/
constructor(category: ICategory, options: IOptionOptions);
/**
* Gets or sets the id of the option.
*/
ID: string;
/**
* Gets or sets the name of the option.
*/
Name: string;
/**
* Gets the human-readable name of the option.
*/
readonly DisplayName: Localization;
/**
* Gets the description of the option.
*/
readonly Description: Localization;
/**
* Gets the category of the option.
*/
readonly Category: ICategory;
/**
* Gets or sets the type of the option.
*/
Type: OptionType | string;
/**
* Gets or sets the default value of the option.
*/
DefaultValue: any;
/**
* Gets or sets the show-order of the option.
*/
ShowOrder: number;
/**
* Gets or sets the validation-pattern of the option.
*/
ValidationPattern: RegExp;
/**
* Gets the items of the option.
*/
readonly Items: OptionItem[];
/**
* Gets or sets a list of options of which at least one needs to be enabled for the option to be shown.
*/
Options: string[];
/**
* Gets or sets a list of options which should be visually enabled when this option is enabled.
*
* A leading exclamation mark (`!`, `U+0021`) will disable the specified option when this option is enabled.
* For `ComboBox` and `RadioButton` types the list should be prefixed by the name of the `selectoption`s followed by a colon (`:`, `U+003A`).
*
* This setting is a visual helper for the administrator only.
* It does not have an effect on the server side processing of the option.
*/
EnableOptions: string[];
/**
* Gets or sets a set of additional properties of the option.
*/
AdditionalProperties: {
[key: string]: any;
};
}