UNPKG

text-marker

Version:
110 lines (103 loc) 4.21 kB
import { Injectable, ɵɵdefineInjectable, Component, ViewChild, Input, NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; /** * @fileoverview added by tsickle * Generated from: lib/text-marker.service.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var TextMarkerService = /** @class */ (function () { function TextMarkerService() { } TextMarkerService.decorators = [ { type: Injectable, args: [{ providedIn: 'root' },] } ]; /** @nocollapse */ TextMarkerService.ctorParameters = function () { return []; }; /** @nocollapse */ TextMarkerService.ngInjectableDef = ɵɵdefineInjectable({ factory: function TextMarkerService_Factory() { return new TextMarkerService(); }, token: TextMarkerService, providedIn: "root" }); return TextMarkerService; }()); /** * @fileoverview added by tsickle * Generated from: lib/text-marker.component.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var TextMarkerComponent = /** @class */ (function () { function TextMarkerComponent() { } Object.defineProperty(TextMarkerComponent.prototype, "inputQuery", { set: /** * @param {?} value * @return {?} */ function (value) { this.innerHtmlContent = this.originalContent; this.innerHtmlContent = value ? this.innerHtmlContent && this.innerHtmlContent.replace(new RegExp(value, 'g'), "<span class=\"" + this.styleClass + "\">" + value + "</span>") : this.innerHtmlContent; }, enumerable: true, configurable: true }); /** * @return {?} */ TextMarkerComponent.prototype.ngOnInit = /** * @return {?} */ function () { this.innerHtmlContent = this.originalContent = this.content ? this.content.nativeElement.textContent : ''; }; TextMarkerComponent.decorators = [ { type: Component, args: [{ selector: 'jk-text-marker', template: "\n <div #content [hidden]=\"true\">\n <ng-content></ng-content>\n </div>\n <div [innerHTML]=\"innerHtmlContent\"></div>\n " }] } ]; /** @nocollapse */ TextMarkerComponent.ctorParameters = function () { return []; }; TextMarkerComponent.propDecorators = { content: [{ type: ViewChild, args: ['content', null,] }], styleClass: [{ type: Input }], inputQuery: [{ type: Input }] }; return TextMarkerComponent; }()); if (false) { /** @type {?} */ TextMarkerComponent.prototype.content; /** @type {?} */ TextMarkerComponent.prototype.styleClass; /** @type {?} */ TextMarkerComponent.prototype.innerHtmlContent; /** @type {?} */ TextMarkerComponent.prototype.originalContent; } /** * @fileoverview added by tsickle * Generated from: lib/text-marker.module.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var TextMarkerModule = /** @class */ (function () { function TextMarkerModule() { } TextMarkerModule.decorators = [ { type: NgModule, args: [{ declarations: [TextMarkerComponent], imports: [CommonModule], exports: [TextMarkerComponent] },] } ]; return TextMarkerModule; }()); /** * @fileoverview added by tsickle * Generated from: public-api.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * @fileoverview added by tsickle * Generated from: text-marker.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ export { TextMarkerComponent, TextMarkerModule, TextMarkerService }; //# sourceMappingURL=text-marker.js.map