UNPKG

flysh

Version:

DOM Document Object Artifact Collector

77 lines 2.87 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NavPane = void 0; const FlyshException_1 = require("../exception/FlyshException"); const DomElement_1 = require("./DomElement"); /** * 'NavPane' Model Class Definition (`Paginator`) */ class NavPane extends DomElement_1.DomElement { /** * Public class constants */ static EXCEPTION_ID_5100000100_MESSAGE_VALUE = "A 'Paginator' must have a filter selector value, i.e : 'table tr td'"; static EXCEPTION_ID_5100000200_MESSAGE_VALUE = "A 'Paginator' filter selector must have 2 elements at least"; static EXCEPTION_ID_5100000300_MESSAGE_VALUE = "A 'Paginator' must have an attribute, i.e : 'href'"; /** * Private class constants */ static DOM_ELEMENT_PRIMITIVE_IDENTIFICATION_NAME_VALUE = "navpane"; static DOM_VALIDATION_FILTER_SELECTOR_MIN_PARAMETERS_VALUE = 2; /** * Class properties */ _attribute; _filterselectorsignature; /** * Constructor * * @param fsignature Defines the filter signature * @param attribute Contains the attribute (i.e : 'href') */ constructor(fsignature, attribute) { super(NavPane.DOM_ELEMENT_PRIMITIVE_IDENTIFICATION_NAME_VALUE, ''); this._filterselectorsignature = fsignature; this._attribute = attribute; } /** * Getter 'attribute' property string * * @returns Returns the '_attribute' class property */ get attribute() { return this._attribute; } /** * Get the object properties (overridden) * * @returns Returns a 'string' that contains all the class properties */ get getEntry() { return super.getEntry + "Filter Selector Signature : " + this._filterselectorsignature + "\n" + "Attribute : " + this._attribute + "\n"; } /** * Getter 'filterSelectorSignature' property 'string' * * @returns Returns the '_filterselectorsignature' class property */ get getFilterSelectorSignature() { return this._filterselectorsignature; } /** * Validates the current class instance */ validate() { super.validate(); if (this.getFilterSelectorSignature == '') throw new FlyshException_1.FlyshException(5100000100, new Error, NavPane.EXCEPTION_ID_5100000100_MESSAGE_VALUE); if (this.getFilterSelectorSignature.split(" ").length < NavPane.DOM_VALIDATION_FILTER_SELECTOR_MIN_PARAMETERS_VALUE) throw new FlyshException_1.FlyshException(5100000200, new Error, NavPane.EXCEPTION_ID_5100000200_MESSAGE_VALUE); if (this.attribute == '') throw new FlyshException_1.FlyshException(5100000300, new Error, NavPane.EXCEPTION_ID_5100000300_MESSAGE_VALUE); } } exports.NavPane = NavPane; //# sourceMappingURL=NavPane.js.map