@attivio/suit
Version:
Attivio SUIT, the Search UI Toolkit, is a library for creating search clients for searching the Attivio platform.
53 lines (39 loc) • 1.67 kB
JavaScript
;
exports.__esModule = true;
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* A placement generated by the Attivio Business Center
* that you can display along with search results.
*/
var SearchPlacement = function () {
function SearchPlacement() {
var label = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
var imageUrl = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var linkText = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
var linkUrl = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
var markup = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
_classCallCheck(this, SearchPlacement);
this.label = label;
this.imageUrl = imageUrl;
this.linkText = linkText;
this.linkUrl = linkUrl;
this.markup = markup;
}
SearchPlacement.fromJson = function fromJson(json) {
var result = new SearchPlacement();
result.label = json.label;
result.imageUrl = json.imageUrl;
result.linkText = json.linkText;
result.linkUrl = json.linkUrl;
result.markup = json.markup;
return result;
};
/** The label to display */
/** The URL of an image to display */
/** The text to display for a hyperlink */
/** The URL that should be the target of the hyperlink */
/** HTML markup for the placement to be displayed as-is */
return SearchPlacement;
}();
exports.default = SearchPlacement;
module.exports = exports["default"];