UNPKG

text-marker

Version:
107 lines (100 loc) 4.65 kB
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common')) : typeof define === 'function' && define.amd ? define('text-marker', ['exports', '@angular/core', '@angular/common'], factory) : (global = global || self, factory(global['text-marker'] = {}, global.ng.core, global.ng.common)); }(this, (function (exports, core, common) { 'use strict'; /** * @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: core.Injectable, args: [{ providedIn: 'root' },] } ]; /** @nocollapse */ TextMarkerService.ctorParameters = function () { return []; }; /** @nocollapse */ TextMarkerService.ngInjectableDef = core.ɵɵ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: core.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: core.ViewChild, args: ['content', null,] }], styleClass: [{ type: core.Input }], inputQuery: [{ type: core.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: core.NgModule, args: [{ declarations: [TextMarkerComponent], imports: [common.CommonModule], exports: [TextMarkerComponent] },] } ]; return TextMarkerModule; }()); exports.TextMarkerComponent = TextMarkerComponent; exports.TextMarkerModule = TextMarkerModule; exports.TextMarkerService = TextMarkerService; Object.defineProperty(exports, '__esModule', { value: true }); }))); //# sourceMappingURL=text-marker.umd.js.map