ngx-clamp
Version:
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.0.
83 lines (73 loc) • 4.24 kB
JavaScript
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('clamp.ts')) :
typeof define === 'function' && define.amd ? define('ngx-clamp', ['exports', '@angular/core', 'clamp.ts'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["ngx-clamp"] = {}, global.ng.core, global.clamp.ts));
})(this, (function (exports, i0, clamp_ts) { 'use strict';
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
var NgxClampDirective = /** @class */ (function () {
function NgxClampDirective(contentElementRef) {
this.contentElementRef = contentElementRef;
this.ngxClampOptions = { clamp: 2 };
this.ngxClampResponse = new i0.EventEmitter();
}
NgxClampDirective.prototype.ngOnInit = function () {
var ngxClampResponse = clamp_ts.clamp(this.contentElementRef.nativeElement, this.ngxClampOptions);
this.ngxClampResponse.emit(ngxClampResponse);
};
return NgxClampDirective;
}());
NgxClampDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: NgxClampDirective, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
NgxClampDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: NgxClampDirective, selector: "[ngx-clamp]", inputs: { ngxClampOptions: "ngxClampOptions" }, outputs: { ngxClampResponse: "ngxClampResponse" }, ngImport: i0__namespace });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: NgxClampDirective, decorators: [{
type: i0.Directive,
args: [{
selector: '[ngx-clamp]'
}]
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { ngxClampOptions: [{
type: i0.Input
}], ngxClampResponse: [{
type: i0.Output
}] } });
var NgxClampModule = /** @class */ (function () {
function NgxClampModule() {
}
return NgxClampModule;
}());
NgxClampModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: NgxClampModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
NgxClampModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: NgxClampModule, declarations: [NgxClampDirective], exports: [NgxClampDirective] });
NgxClampModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: NgxClampModule });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: NgxClampModule, decorators: [{
type: i0.NgModule,
args: [{
declarations: [NgxClampDirective],
exports: [NgxClampDirective]
}]
}] });
/*
* Public API Surface of ngx-clamp
*/
/**
* Generated bundle index. Do not edit.
*/
exports.NgxClampDirective = NgxClampDirective;
exports.NgxClampModule = NgxClampModule;
Object.defineProperty(exports, '__esModule', { value: true });
}));
//# sourceMappingURL=ngx-clamp.umd.js.map