UNPKG

ngx-academia-uniandes-library

Version:

This library is used for Academia-Uniandes system.

53 lines 8.22 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_combo_box_generic_model_1 = require("../search-combo-box-generic/search-combo-box-generic.model"); var service_locator_1 = require("../../service-locator"); var search_academy_combo_box_component_1 = require("../search-academy-combo-box/search-academy-combo-box.component"); var search_combo_box_service_1 = require("../search-combo-box.service"); var core_2 = require("@ngx-translate/core"); var titlecase_academia_pipe_1 = require("../../utils/titlecase-academia.pipe"); var SearchProductComboBoxComponent = /** @class */ (function (_super) { __extends(SearchProductComboBoxComponent, _super); function SearchProductComboBoxComponent(urlService, searchBoxUtils, transService, titlecasePipe) { var _this = _super.call(this, urlService, searchBoxUtils, transService, new search_combo_box_generic_model_1.SearchComboBoxGenericModel(urlService.getProductUrl(), [{ "name": "limit", "value": 10 }], null, "products", "title", "Search Products"), titlecasePipe) || this; _this.urlService = urlService; _this.searchBoxUtils = searchBoxUtils; _this.transService = transService; _this.titlecasePipe = titlecasePipe; return _this; } SearchProductComboBoxComponent.prototype.ngOnInit = function () { _super.prototype.ngOnInit.call(this); if (this.debugFlag) { this.model.urlService = this.urlService.getProductUrl(this.debugFlag); } }; SearchProductComboBoxComponent.decorators = [ { type: core_1.Component, args: [{ selector: 'search-product-combo-box', template: "\n <ng-template #customItemTemplate let-model=\"item\" let-index=\"index\">\n <div class=\"card-container\">\n <div class=\"item\"><p><b>Título:</b></p></div>\n <div class=\"item\"><p><span>{{model.title}}</span></p></div>\n <div class=\"item\"><b>Tipo:</b></div>\n <div class=\"item\" *ngIf=\"model.type\">{{model.type}}</div>\n <div class=\"item\"><b>Año:</b></div>\n <div class=\"item\" *ngIf=\"model.year\">{{model.year}}</div>\n <div class=\"item\"><b>Ref:</b></div>\n <div class=\"item\" *ngIf=\"model.reference\"><p><span [innerHTML]=\"model.reference\"></span></p></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: 70px minmax(auto,400px);\n grid-template-rows: 40% 20% 20% 20%;\n min-height: 0; /* NEW */\n min-width: 0; /* NEW; needed for Firefox */\n }\n\n .item{\n align-self: center;\n overflow: hidden;\n }\n\n p span \n {\n display: block;\n white-space: pre-line;\n }\n /*Common Styles*/\n /*Buttons*/\n\n .btn-uniandes-main { \n color: #000000; \n background-color: #FFFF00; \n border-color: none; \n } \n \n .btn-uniandes-main:hover, \n .btn-uniandes-main:focus, \n .btn-uniandes-main:active, \n .btn-uniandes-main.active, \n .open .dropdown-toggle.btn-uniandes-main { \n color: #000000; \n background-color: #DBD000; \n border-color: none ; \n } \n \n .btn-uniandes-main:active, \n .btn-uniandes-main.active, \n .open .dropdown-toggle.btn-uniandes-main { \n background-image: none; \n } \n \n .btn-uniandes-main.disabled, \n .btn-uniandes-main[disabled], \n fieldset[disabled] .btn-uniandes-main, \n .btn-uniandes-main.disabled:hover, \n .btn-uniandes-main[disabled]:hover, \n fieldset[disabled] .btn-uniandes-main:hover, \n .btn-uniandes-main.disabled:focus, \n .btn-uniandes-main[disabled]:focus, \n fieldset[disabled] .btn-uniandes-main:focus, \n .btn-uniandes-main.disabled:active, \n .btn-uniandes-main[disabled]:active, \n fieldset[disabled] .btn-uniandes-main:active, \n .btn-uniandes-main.disabled.active, \n .btn-uniandes-main[disabled].active, \n fieldset[disabled] .btn-uniandes-main.active { \n background-color: #FFFF00; \n border-color: none; \n } \n \n .btn-uniandes-main .badge { \n color: #FFFF00; \n background-color: #000000; \n }\n\n\n .btn-uniandes-secondary { \n color: #ffffff; \n background-color: #000000; \n border-color: none; \n } \n \n .btn-uniandes-secondary:hover, \n .btn-uniandes-secondary:focus, \n .btn-uniandes-secondary:active, \n .btn-uniandes-secondary.active, \n .open .dropdown-toggle.btn-uniandes-secondary { \n color: #ffffff; \n background-color: #707070; \n border-color: none; \n } \n \n .btn-uniandes-secondary:active, \n .btn-uniandes-secondary.active, \n .open .dropdown-toggle.btn-uniandes-secondary { \n background-image: none; \n } \n \n .btn-uniandes-secondary.disabled, \n .btn-uniandes-secondary[disabled], \n fieldset[disabled] .btn-uniandes-secondary, \n .btn-uniandes-secondary.disabled:hover, \n .btn-uniandes-secondary[disabled]:hover, \n fieldset[disabled] .btn-uniandes-secondary:hover, \n .btn-uniandes-secondary.disabled:focus, \n .btn-uniandes-secondary[disabled]:focus, \n fieldset[disabled] .btn-uniandes-secondary:focus, \n .btn-uniandes-secondary.disabled:active, \n .btn-uniandes-secondary[disabled]:active, \n fieldset[disabled] .btn-uniandes-secondary:active, \n .btn-uniandes-secondary.disabled.active, \n .btn-uniandes-secondary[disabled].active, \n fieldset[disabled] .btn-uniandes-secondary.active { \n background-color: #000000; \n border-color: none; \n } \n \n .btn-uniandes-secondary .badge { \n color: #000000; \n background-color: #ffffff; \n }\n\n /*Dialogs*/\n .modal-header{\n padding: 0px;\n border: 0px;\n background-color: #FFFF00;\n }\n\n .modal-header table{\n margin: 0px;\n border: 0px; \n width: 100%;\n }\n\n .modal-header table tr td{\n padding: 10px;\n \n }\n .modal-body{\n padding-bottom: 20px;\n margin-left: 20px;\n margin-right: 20px;\n }\n\n .title-element{\n padding-top: 5px;\n padding-bottom: 5px;\n }\n .modal-content{\n border-radius: 0px;\n border: 0px;\n }\n\n .modal-header{\n border-radius: 0;\n }\n "] },] }, ]; /** @nocollapse */ SearchProductComboBoxComponent.ctorParameters = function () { return [ { type: service_locator_1.ServiceLocator, }, { type: search_combo_box_service_1.SearchComboBoxService, }, { type: core_2.TranslateService, }, { type: titlecase_academia_pipe_1.TitleCaseAcademiaPipe, }, ]; }; return SearchProductComboBoxComponent; }(search_academy_combo_box_component_1.SearchAcademyComboBoxComponent)); exports.SearchProductComboBoxComponent = SearchProductComboBoxComponent; //# sourceMappingURL=search-product-combo-box.component.js.map