UNPKG

flysh

Version:

DOM Document Object Artifact Collector

71 lines 2.71 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' ('Paginator') class model */ class NavPane extends DomElement_1.DomElement { /** * 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() { 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; /** * Public class constants */ NavPane.EXCEPTION_ID_5100000100_MESSAGE_VALUE = "A 'Paginator' must have a filter selector value, i.e : 'table tr td'"; NavPane.EXCEPTION_ID_5100000200_MESSAGE_VALUE = "A 'Paginator' filter selector must have 2 elements at least"; NavPane.EXCEPTION_ID_5100000300_MESSAGE_VALUE = "A 'Paginator' must have an attribute, i.e : 'href'"; /** * Private class constants */ NavPane.DOM_ELEMENT_PRIMITIVE_IDENTIFICATION_NAME_VALUE = "navpane"; NavPane.DOM_VALIDATION_FILTER_SELECTOR_MIN_PARAMETERS_VALUE = 2; //# sourceMappingURL=NavPane.js.map