UNPKG

ngx-academia-uniandes-library

Version:

This library is used for Academia-Uniandes system.

56 lines 4.1 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = require("@angular/core"); var search_academy_combo_box_component_1 = require("../search-academy-combo-box/search-academy-combo-box.component"); var utils_1 = require("../../utils/utils"); var service_locator_1 = require("../../service-locator"); var core_2 = require("@ngx-translate/core"); var search_combo_box_service_1 = require("../search-combo-box.service"); var search_combo_box_generic_model_1 = require("../search-combo-box-generic/search-combo-box-generic.model"); var SearchResearchLineComboBoxComponent = /** @class */ (function (_super) { __extends(SearchResearchLineComboBoxComponent, _super); function SearchResearchLineComboBoxComponent(urlService, searchBoxUtils, transService, titlecasePipe) { var _this = _super.call(this, urlService, searchBoxUtils, transService, new search_combo_box_generic_model_1.SearchComboBoxGenericModel(urlService.getResearchLinesUrl(), [{ "name": "limit", "value": 10 }], null, "invLines", "name", 'linesInvestigation'), titlecasePipe) || this; _this.urlService = urlService; _this.searchBoxUtils = searchBoxUtils; _this.transService = transService; _this.titlecasePipe = titlecasePipe; return _this; } SearchResearchLineComboBoxComponent.prototype.ngOnInit = function () { _super.prototype.ngOnInit.call(this); this.setUrlServiceHost(); }; SearchResearchLineComboBoxComponent.prototype.setUrlServiceHost = function () { if (this.debugFlag) { this.model.urlService = this.urlService.getResearchLinesUrl(this.debugFlag); } }; SearchResearchLineComboBoxComponent.decorators = [ { type: core_1.Component, args: [{ selector: 'search-research-line-combo-box', template: "\n <ng-template #customItemTemplate let-model=\"item\" let-index=\"index\">\n <div class=\"card-container\">\n <div class=\"item\"><p><span>{{model.name | titleCaseAcademia}}</span></p></div>\n <div class=\"item\"><b>({{model.external_id}})</b></div>\n </div>\n </ng-template>\n\n <app-search-combo-box-generic [customTemplate]=\"customItemTemplate\" [preSelectedValue]= \"preSelectedValue\" [componentModel]=\"model\" [itemControl]=\"itemControl\" [isScrollable]=\"isScrollable\" (noResults)=\"sendNoResults($event)\" (itemSelected)=\"sendItemSelectedEvent($event)\"></app-search-combo-box-generic>\n ", styles: ["\n .card-container{\n display: grid;\n grid-template-columns: minmax(150px, 300px) minmax(100px, 1fr);\n }\n\n .item{\n align-self: center;\n justify-content: center;\n overflow: hidden;\n }\n\n p{\n margin: 0;\n }\n\n p span \n {\n display: block;\n white-space: pre-line;\n }\n "] },] }, ]; /** @nocollapse */ SearchResearchLineComboBoxComponent.ctorParameters = function () { return [ { type: service_locator_1.ServiceLocator, }, { type: search_combo_box_service_1.SearchComboBoxService, }, { type: core_2.TranslateService, }, { type: utils_1.TitleCaseAcademiaPipe, }, ]; }; return SearchResearchLineComboBoxComponent; }(search_academy_combo_box_component_1.SearchAcademyComboBoxComponent)); exports.SearchResearchLineComboBoxComponent = SearchResearchLineComboBoxComponent; //# sourceMappingURL=search-research-line-combo-box.component.js.map