UNPKG

ngx-animate-css-grid

Version:
138 lines (131 loc) 4.11 kB
import { EventEmitter, Directive, ElementRef, Input, Output, NgModule } from '@angular/core'; import { wrapGrid } from 'animate-css-grid'; /** * @fileoverview added by tsickle * Generated from: lib/ngx-animate-css-grid.directive.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ class NgxAnimateCssGridDirective { /** * @param {?} elementRef */ constructor(elementRef) { this.elementRef = elementRef; this.ngxAnimateCssGrid = {}; this.onStart = new EventEmitter(); this.onEnd = new EventEmitter(); } /** * @return {?} */ ngAfterViewInit() { /** @type {?} */ const config = Object.assign({}, this.ngxAnimateCssGrid, { onStart: (/** * @param {?} animatedChildren * @return {?} */ (animatedChildren) => this.onStart.emit(animatedChildren)), onEnd: (/** * @param {?} animatedChildren * @return {?} */ (animatedChildren) => this.onEnd.emit(animatedChildren)) }); this.gridWrapper = wrapGrid(this.elementRef.nativeElement, config); } /** * @return {?} */ unwrapGrid() { if (this.gridWrapper) { this.gridWrapper.unwrapGrid(); } } /** * @return {?} */ forceGridAnimation() { if (this.gridWrapper) { this.gridWrapper.forceGridAnimation(); } } /** * @return {?} */ ngOnDestroy() { this.unwrapGrid(); } } NgxAnimateCssGridDirective.decorators = [ { type: Directive, args: [{ selector: '[ngxAnimateCssGrid]' },] } ]; /** @nocollapse */ NgxAnimateCssGridDirective.ctorParameters = () => [ { type: ElementRef } ]; NgxAnimateCssGridDirective.propDecorators = { ngxAnimateCssGrid: [{ type: Input }], onStart: [{ type: Output }], onEnd: [{ type: Output }] }; if (false) { /** @type {?} */ NgxAnimateCssGridDirective.prototype.ngxAnimateCssGrid; /** @type {?} */ NgxAnimateCssGridDirective.prototype.onStart; /** @type {?} */ NgxAnimateCssGridDirective.prototype.onEnd; /** * @type {?} * @private */ NgxAnimateCssGridDirective.prototype.gridWrapper; /** * @type {?} * @private */ NgxAnimateCssGridDirective.prototype.elementRef; } /** * @fileoverview added by tsickle * Generated from: lib/ngx-animate-css-grid.module.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ class NgxAnimateCssGridModule { } NgxAnimateCssGridModule.decorators = [ { type: NgModule, args: [{ declarations: [NgxAnimateCssGridDirective], imports: [], exports: [NgxAnimateCssGridDirective] },] } ]; /** * @fileoverview added by tsickle * Generated from: lib/wrap-grid-config.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * @record */ function WrapGridConfig() { } if (false) { /** @type {?|undefined} */ WrapGridConfig.prototype.duration; /** @type {?|undefined} */ WrapGridConfig.prototype.stagger; /** @type {?|undefined} */ WrapGridConfig.prototype.easing; } /** * @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: ngx-animate-css-grid.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ export { NgxAnimateCssGridDirective, NgxAnimateCssGridModule }; //# sourceMappingURL=ngx-animate-css-grid.js.map