UNPKG

flysh

Version:

DOM Document Object Artifact Collector

119 lines 4.66 kB
import { DomElement } from "./DomElement"; import { Sibling } from "./Sibling"; /** * 'SPC' Model Class Definition * * Handles the 'Scope', 'Parent' and 'Children' DOM objects. This element is direclty involved with the * 'Filter Selector' functionality. * * Contains : - A scope/parent filter selector signature * - Children 'Sibling' elements * - Fields record order * * TODO : Verifying annotations syntax in case of [] array () * */ export declare class SPC extends DomElement { /** * Public class constants */ static readonly EXCEPTION_ID_5200000100_MESSAGE_VALUE = "Empty filter selector, i.e : 'table tr td'"; static readonly EXCEPTION_ID_5200000200_MESSAGE_VALUE = "A filter selector must have 2 elements at least"; static readonly EXCEPTION_ID_5200000300_MESSAGE_VALUE = "A previous similar field has already been added"; /** * Private class constants */ private static readonly DOM_ELEMENT_PRIMITIVE_IDENTIFICATION_NAME_VALUE; private readonly DOM_VALIDATION_FILTER_SELECTOR_MIN_PARAMETERS_VALUE; /** * Class constants */ private readonly NUMBER_ARGUMENTS_FILTER_SELECTOR_MAX_VALUE; /** * Property that defines the full filter selector ('scope'/'parent'/'children') * * NOTE : This property might be fully defined or not. If not full, this signature must be completed by the other ' * Sibling' element(s) * */ private _filterselectorsignature; /** * Contains all the children 'Sibling' (fields) class instances */ private _siblings; /** * Constructor * * @param filterselectorsignature 'String' that contains the filter selector signature * @param siblings Array of 'Sibling' (field) instances that contains the current instance */ constructor(filterselectorsignature: string, siblings: Sibling[]); /** * Getter field(s) array property * * @returns Returns a 'String' that contains all the class properties */ get getFields(): string[]; /** * Getter '_filterSelectorSignature' string property * * @returns Returns a 'String' that contains the '_filterselectorsignature' class property */ get getFilterSelector(): string; /** * Getter 'sibling(s)' array property * * @returns Returns an array that contains all the children 'Sibling' (fields) class instances */ get getSiblings(): Sibling[]; /** * List all the sibling(s) * * @returns Returns a 'String' that contains all the 'Sibling' entrie(s) */ get getListAllSiblingEntries(): string; /** * Gets the object properties (overridden) * * @returns Returns a 'String' that contains the class filter selector with all the 'Sibling' entrie(s) (field(s)) */ get getEntry(): string; /** * Adds a 'Sibling' class instance and returns the current 'SPC' class itself [deprecated] * * @deprecated this method is now deprecated, please use 'addField()' method instead * * @param fieldName Contains the name of the field * @param tagName Defines the name of the tag (dom element) * @param className Has the name of the element class property (<x class=''></x>) * @param regEx Defines the regular expression following the field * @returns Returns the 'SPC' class instance itself */ addSibling(fieldName: string, tagName: string, className: string, regEx: string): SPC; /** * Adds a field ('Sibling') and returns the current 'SPC' class itself * * Note : For the sake of good reading and interpretation, this function has been publicly renamed (cf. 'addSbling()') * * @param fieldName Contains the name of the field * @param tagName Defines the name of the tag (dom element) * @param className Has the name of the element class property (<x class=''></x>) * @param regEx Defines the regular expression following the field [optional] * @returns Returns the 'field' ('SPC') class instance itself */ addField(fieldName: string, tagName: string, className: string, regEx?: string): SPC; /** * Verifies that the filter selector is 'full'. A 'true' value is returned if the filter selector is having 3 'SPC' members * (Scope/Iterator, Parent and Child). Filter can't be more than 3 arguments */ hasFullFilter(): boolean; /** * Validates the current 'DOM' element type */ validate(): void; /** * Validates the 'Sibling' (field) stack content */ private validateSiblings; } //# sourceMappingURL=SPC.d.ts.map