UNPKG

@lxlib/seed

Version:

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.1.

107 lines (101 loc) 3.57 kB
import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, Input, Output, NgModule } from '@angular/core'; import addSeconds from 'date-fns/addSeconds'; import format from 'date-fns/format'; import { CountdownModule } from 'ngx-countdown'; import { __spread } from 'tslib'; import { CommonModule } from '@angular/common'; /** * @fileoverview added by tsickle * Generated from: count-down.component.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var CountDownComponent = /** @class */ (function () { function CountDownComponent() { this.event = new EventEmitter(); } Object.defineProperty(CountDownComponent.prototype, "target", { /** * 目标时间 */ set: /** * 目标时间 * @param {?} value * @return {?} */ function (value) { this.config = { format: "HH:mm:ss", stopTime: typeof value === 'number' ? addSeconds(new Date(), value).valueOf() : +format(value, 'x'), }; }, enumerable: true, configurable: true }); /** * @param {?} e * @return {?} */ CountDownComponent.prototype.handleEvent = /** * @param {?} e * @return {?} */ function (e) { this.event.emit(e); }; CountDownComponent.decorators = [ { type: Component, args: [{ selector: 'count-down', exportAs: 'countDown', template: " <countdown #cd *ngIf=\"config\" [config]=\"config\" (event)=\"handleEvent($event)\"></countdown> ", preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None }] } ]; CountDownComponent.propDecorators = { instance: [{ type: ViewChild, args: ['cd', { static: false },] }], config: [{ type: Input }], target: [{ type: Input }], event: [{ type: Output }] }; return CountDownComponent; }()); if (false) { /** @type {?} */ CountDownComponent.prototype.instance; /** @type {?} */ CountDownComponent.prototype.config; /** @type {?} */ CountDownComponent.prototype.event; } /** * @fileoverview added by tsickle * Generated from: count-down.module.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** @type {?} */ var COMPONENTS = [CountDownComponent]; var CountDownModule = /** @class */ (function () { function CountDownModule() { } CountDownModule.decorators = [ { type: NgModule, args: [{ imports: [CommonModule, CountdownModule], declarations: __spread(COMPONENTS), exports: __spread(COMPONENTS), },] } ]; return CountDownModule; }()); /** * @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: count-down.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ export { CountDownComponent, CountDownModule }; //# sourceMappingURL=count-down.js.map