UNPKG

@akveo/nga-theme

Version:
45 lines 2.18 kB
/** * @license * Copyright Akveo. All Rights Reserved. * Licensed under the MIT License. See License.txt in the project root for license information. */ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; import { Injectable } from '@angular/core'; import { Subject } from 'rxjs/Subject'; import 'rxjs/add/operator/share'; var NgaSuperSearchService = (function () { function NgaSuperSearchService() { this.searchSubmittings$ = new Subject(); this.searchActivations$ = new Subject(); this.searchDeactivations$ = new Subject(); } NgaSuperSearchService.prototype.activateSearch = function (searchType, tag) { this.searchActivations$.next({ searchType: searchType, tag: tag }); }; NgaSuperSearchService.prototype.deactivateSearch = function (searchType, tag) { this.searchDeactivations$.next({ searchType: searchType, tag: tag }); }; NgaSuperSearchService.prototype.submitSearch = function (term, tag) { this.searchSubmittings$.next({ term: term, tag: tag }); }; NgaSuperSearchService.prototype.onSearchActivate = function () { return this.searchActivations$.share(); }; NgaSuperSearchService.prototype.onSearchDeactivate = function () { return this.searchDeactivations$.share(); }; NgaSuperSearchService.prototype.onSearchSubmit = function () { return this.searchSubmittings$.share(); }; return NgaSuperSearchService; }()); NgaSuperSearchService = __decorate([ Injectable() ], NgaSuperSearchService); export { NgaSuperSearchService }; //# sourceMappingURL=search.service.js.map