UNPKG

@logo-software/timer

Version:

Timer helps developer to set a specific time for their web apps and doSomething after completed.

373 lines (360 loc) 29.2 kB
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@angular/common'), require('@logo-software/progress-bar')) : typeof define === 'function' && define.amd ? define('@logo-software/timer', ['exports', '@angular/core', 'rxjs', '@angular/common', '@logo-software/progress-bar'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["logo-software"] = global["logo-software"] || {}, global["logo-software"].timer = {}), global.ng.core, global.rxjs, global.ng.common, global.progressBar)); })(this, (function (exports, i0, rxjs, common, progressBar) { '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 TimePipe = /** @class */ (function () { function TimePipe() { } TimePipe.prototype.transform = function (value, local) { var totalSeconds = Math.floor(value / 1000); var totalMinutes = Math.floor(totalSeconds / 60); var totalHours = Math.floor(totalMinutes / 60); var days = Math.floor(totalHours / 24); var hours = Math.floor(totalHours % 24); var minutes = Math.floor(totalMinutes % 60); var seconds = Math.floor(totalSeconds % 60); var convertedTime = ''; if (days > 0) { convertedTime += days < 10 ? "<div>0" + days + "<small>" + local.days + "</small></div>" : "<div>" + days + "<small>" + local.days + "</small></div>"; } if (hours > 0) { convertedTime += hours < 10 ? "<div>0" + hours + "<small>" + local.hours + "</small></div>" : "<div>" + hours + "<small>" + local.hours + "</small></div>"; } if (minutes >= 0) { convertedTime += minutes < 10 ? "<div>0" + minutes + "<small>" + local.minutes + "</small></div>" : "<div>" + minutes + "<small>" + local.minutes + "</small></div>"; } if (seconds >= 0) { convertedTime += seconds < 10 ? "<div>0" + seconds + "<small>" + local.seconds + "</small></div>" : "<div>" + seconds + "<small>" + local.seconds + "</small></div>"; } else if (seconds < 0) { convertedTime = "<div>00<small>" + local.minutes + "</small></div><div>00<small>" + local.seconds + "</small></div>"; } return convertedTime; }; return TimePipe; }()); TimePipe.decorators = [ { type: i0.Pipe, args: [{ name: 'counter', pure: true, },] } ]; /** * @license * Copyright LOGO YAZILIM SANAYİ VE TİCARET A.Ş. All Rights Reserved. * * Save to the extent permitted by law, you may not use, copy, modify, * distribute or create derivative works of this material or any part * of it without the prior written consent of LOGO YAZILIM SANAYİ VE TİCARET A.Ş. Limited. * Any reproduction of this material must contain this notice. */ /** * Timer service lets developers to control timer variables on the go. */ var TimerService = /** @class */ (function () { function TimerService() { /** * Pause time in milliseconds if timer is paused. */ this.pausedTime = 0; this.isEnded = new rxjs.Subject(); } /** * Prepare the timer values and if autoStart option is true, starts the timer. */ TimerService.prototype.prepareTimer = function () { this.timerValue = this.timerCount; this.readableTime = new TimePipe().transform(this.timerCount, this.language); this.autoStart ? this.runTimer() : ''; }; /** * Run timer function which will starts timer with setted values */ TimerService.prototype.runTimer = function () { var _this = this; clearInterval(this.timer); this.timer = setInterval(function () { if (_this.countdown) { _this.timerCount = Math.floor(_this.timerCount - 1000); if (_this.timerCount < 0) { clearInterval(_this.timer); _this.isEnded.next(true); } } else { _this.timerCount = Math.floor(_this.timerCount + 1000); if (_this.timerCount === _this.endTime) { clearInterval(_this.timer); _this.isEnded.next(true); } } _this.pausedTime = 0; _this.readableTime = new TimePipe().transform(_this.timerCount, _this.language); }, 1000); }; /** * Pause the timer. */ TimerService.prototype.pauseTimer = function () { if (this.pausedTime === 0) { this.pausedTime = this.timerCount; clearInterval(this.timer); } }; /** * Resume the paused timer. If the timer isn't paused, resume function will not be worked. */ TimerService.prototype.resumeTimer = function () { var _this = this; setTimeout(function () { if (_this.pausedTime !== 0) { _this.timerCount = _this.pausedTime; _this.runTimer(); } else { _this.pauseTimer(); } }, 1000); }; /** * Sets the timer end point and stops the timer. */ TimerService.prototype.stopTimer = function () { if (this.countdown) { this.timerCount = 0; } else { this.timerCount = this.endTime; } clearInterval(this.timer); this.readableTime = new TimePipe().transform(this.timerCount, this.language); this.isEnded.next(true); }; /** * Revert the timer to the start value */ TimerService.prototype.resetTimer = function () { clearInterval(this.timer); this.timerCount = this.timerValue; this.runTimer(); }; /** * Sets the timer clock. Value must be in milliseconds. * @param ms:number */ TimerService.prototype.setTime = function (ms) { this.timerCount = ms; this.prepareTimer(); }; return TimerService; }()); TimerService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function TimerService_Factory() { return new TimerService(); }, token: TimerService, providedIn: "root" }); TimerService.decorators = [ { type: i0.Injectable, args: [{ providedIn: 'root', },] } ]; /** * @license * Copyright LOGO YAZILIM SANAYİ VE TİCARET A.Ş. All Rights Reserved. * * Save to the extent permitted by law, you may not use, copy, modify, * distribute or create derivative works of this material or any part * of it without the prior written consent of LOGO YAZILIM SANAYİ VE TİCARET A.Ş. Limited. * Any reproduction of this material must contain this notice. */ /** * Timer library lets your users to know their time in your app. * Add the below code to your code stack and give initializer parameters. * * <sub>app.component.html</sub> * * ```html * <logo-timer * [timeInMs]="1234567" * [id]="'myLogoTimer'" * [title]="'Estimated Time'" * [cssClasses]="'my-logo-timer-theme'" * [theme]="'primary'" * [isCountdown]="true" * [showIcon]="true" * [showProgressBar]="true" * [autoStart]="true" * [language]="{days: 'Gün', hours: 'Saat', minutes: 'Dk', seconds: 'Sn'}" * (onTimeCompleted)="sampleOnTimeEnd($event)" * > * </logo-timer> * ``` */ var TimerComponent = /** @class */ (function () { function TimerComponent(timerService) { var _this = this; this.timerService = timerService; /** * If set true, timer works as countdown clock, else timer starts from zero. */ this.isCountdown = true; /** * The Logo Theme based themes of the timer. */ this.theme = 'primary'; /** * Show icon or not before the timer text. */ this.showIcon = false; /** * Show progress bar or not after the title text. */ this.showProgressBar = false; /** * Auto start timer onInit or trigger it by your own function options. If set true, timer will start on init of the library else you need to start by your own trigger function. Default is true. */ this.autoStart = true; /** * Output of the completed timer. It returns the id that setted. */ this.onTimeCompleted = new i0.EventEmitter(); this.watchTimer = this.timerService.isEnded.subscribe(function (x) { x ? _this.onTimeCompleted.emit(_this.id) : ''; }); } TimerComponent.prototype.ngOnInit = function () { if (this.isCountdown) { this.timerService.timerCount = this.timeInMs; } else { this.timerService.timerCount = 0; this.timerService.endTime = this.timeInMs; } this.timerService.autoStart = this.autoStart; this.timerService.language = this.language; this.timerService.countdown = this.isCountdown; this.timerService.prepareTimer(); }; TimerComponent.prototype.ngOnDestroy = function () { this.watchTimer.unsubscribe(); }; return TimerComponent; }()); TimerComponent.decorators = [ { type: i0.Component, args: [{ selector: 'logo-timer', template: "<div class=\"logo-timer {{cssClasses}}\">\n <div *ngIf=\"showIcon\" class=\"icon-base\">\n <span class=\"le-time_clock_three\"></span>\n </div>\n <div class=\"timer-title\">\n <p>{{title}}</p>\n <div *ngIf=\"showProgressBar\" class=\"progress-base\">\n <logo-progress-bar\n [complete]=\"timeInMs\"\n [cssClasses]=\"'timer-progress-bar'\"\n [current]=\"timerService.timerCount\"\n [size]=\"'small'\"\n [theme]=\"theme\"\n >\n </logo-progress-bar>\n </div>\n </div>\n <div class=\"timer-base {{theme}}\">\n <div [innerHTML]=\"timerService.readableTime\" class=\"counter\"></div>\n </div>\n</div>\n", providers: [TimePipe], styles: [".dotted{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.logo-tooltip .tip.on-bottom:after,.logo-tooltip .tip.on-top:after{border-left:7px solid transparent;border-right:7px solid transparent}.logo-tooltip .tip.on-left:after,.logo-tooltip .tip.on-right:after{border-top:7px solid transparent;border-bottom:7px solid transparent}.logo-tooltip{position:relative;color:#e94a34;cursor:pointer}.logo-tooltip .tip{position:absolute;width:180px;color:#fff;font-size:14px;font-style:normal;line-height:1.4;text-align:center;border-radius:3px;background:#333;padding:8px 12px;box-sizing:border-box;cursor:auto;z-index:10;opacity:0;visibility:hidden;transition:all .25s ease-in}.logo-tooltip .tip:after{position:absolute;width:0;height:0;content:\"\"}.logo-tooltip .tip.on-top{bottom:25px;left:0}.logo-tooltip .tip.on-top:after{bottom:-7px;left:10px;border-top:7px solid #333}.logo-tooltip .tip.on-right{top:-5px;left:103%}.logo-tooltip .tip.on-right:after{top:37%;left:-7px;border-right:7px solid #333}.logo-tooltip .tip.on-bottom{top:25px;left:0}.logo-tooltip .tip.on-bottom:after{top:-7px;left:10px;border-bottom:7px solid #333}.logo-tooltip .tip.on-left{top:-100%;right:103%}.logo-tooltip .tip.on-left:after{top:37%;right:-7px;border-left:7px solid #333}.logo-tooltip:hover .tip{opacity:1;visibility:visible}.logo-tooltip:hover .tip.on-top{transform:translateY(-15px)}.logo-tooltip:hover .tip.on-right{transform:translateX(15px)}.logo-tooltip:hover .tip.on-bottom{transform:translateY(15px)}.logo-tooltip:hover .tip.on-left{transform:translateX(-15px)}.test{content:\"a\";content:\"ba\";content:\"aa\";content:\"aade\";content:\"abde\"}:root .basic,:root .gray,:root .secondary{color:var(--leds-contrast-90pct)}:root .danger,:root .info,:root .success,:root .warning{color:var(--white)}:root .outline.primary,:root .outline.primary:active,:root .outline.primary:focus,:root .outline.primary:hover{border-color:var(--light-600)}:root .outline.primary:hover{background-color:rgba(var(--neutral-500-rgb),var(--ghost-hover));color:var(--primary)}:root .outline.primary:active{background-color:rgba(var(--neutral-500-rgb),var(--ghost-active));color:var(--primary)}:root .outline.primary:focus{background-color:rgba(var(--neutral-500-rgb),var(--ghost-focus));color:var(--primary)}:root .outline.secondary{color:var(--leds-contrast-90pct)}:root .outline.secondary,:root .outline.secondary:active,:root .outline.secondary:focus,:root .outline.secondary:hover{border-color:var(--light-600)}:root .outline.secondary:hover{background-color:rgba(var(--neutral-500-rgb),var(--ghost-hover));color:var(--leds-contrast-90pct)}:root .outline.secondary:active{background-color:rgba(var(--neutral-500-rgb),var(--ghost-active));color:var(--leds-contrast-90pct)}:root .outline.secondary:focus{background-color:rgba(var(--neutral-500-rgb),var(--ghost-focus));color:var(--leds-contrast-90pct)}:root .outline.basic{color:var(--leds-contrast-90pct)}:root .outline.basic,:root .outline.basic:active,:root .outline.basic:focus,:root .outline.basic:hover{border-color:var(--light-600)}:root .outline.basic:hover{background-color:rgba(var(--neutral-500-rgb),var(--ghost-hover));color:var(--leds-contrast-90pct)}:root .outline.basic:active{background-color:rgba(var(--neutral-500-rgb),var(--ghost-active));color:var(--leds-contrast-90pct)}:root .outline.basic:focus{background-color:rgba(var(--neutral-500-rgb),var(--ghost-focus));color:var(--leds-contrast-90pct)}:root .outline.neutral,:root .outline.neutral:active,:root .outline.neutral:focus,:root .outline.neutral:hover{border-color:var(--light-600)}:root .outline.neutral:hover{background-color:rgba(var(--neutral-500-rgb),var(--ghost-hover));color:var(--neutral)}:root .outline.neutral:active{background-color:rgba(var(--neutral-500-rgb),var(--ghost-active));color:var(--neutral)}:root .outline.neutral:focus{background-color:rgba(var(--neutral-500-rgb),var(--ghost-focus));color:var(--neutral)}:root .outline.light{border-color:rgba(var(--light-rgb),.5)}:root .outline.light:active,:root .outline.light:focus,:root .outline.light:hover{border-color:var(--light)}:root .outline.light:hover{background-color:rgba(var(--neutral-500-rgb),var(--ghost-hover));color:var(--white)}:root .outline.light:active{background-color:rgba(var(--neutral-500-rgb),var(--ghost-active));color:var(--white)}:root .outline.light:focus{background-color:rgba(var(--neutral-500-rgb),var(--ghost-focus));color:var(--white)}:root .outline.dark,:root .outline.dark:active,:root .outline.dark:focus,:root .outline.dark:hover{border-color:var(--light-600)}:root .outline.dark:hover{background-color:rgba(var(--neutral-500-rgb),var(--ghost-hover));color:var(--dark)}:root .outline.dark:active{background-color:rgba(var(--neutral-500-rgb),var(--ghost-active));color:var(--dark)}:root .outline.dark:focus{background-color:rgba(var(--neutral-500-rgb),var(--ghost-focus));color:var(--dark)}:root .outline.gray{color:var(--leds-contrast-90pct)}:root .outline.gray,:root .outline.gray:active,:root .outline.gray:focus,:root .outline.gray:hover{border-color:var(--light-600)}:root .outline.gray:hover{background-color:rgba(var(--neutral-500-rgb),var(--ghost-hover));color:var(--leds-contrast-90pct)}:root .outline.gray:active{background-color:rgba(var(--neutral-500-rgb),var(--ghost-active));color:var(--leds-contrast-90pct)}:root .outline.gray:focus{background-color:rgba(var(--neutral-500-rgb),var(--ghost-focus));color:var(--leds-contrast-90pct)}:root .outline.info{color:var(--info)}:root .outline.info,:root .outline.info:active,:root .outline.info:focus,:root .outline.info:hover{border-color:var(--light-600)}:root .outline.info:hover{background-color:rgba(var(--neutral-500-rgb),var(--ghost-hover));color:var(--info)}:root .outline.info:active{background-color:rgba(var(--neutral-500-rgb),var(--ghost-active));color:var(--info)}:root .outline.info:focus{background-color:rgba(var(--neutral-500-rgb),var(--ghost-focus));color:var(--info)}:root .outline.danger{color:var(--danger)}:root .outline.danger,:root .outline.danger:active,:root .outline.danger:focus,:root .outline.danger:hover{border-color:var(--light-600)}:root .outline.danger:hover{background-color:rgba(var(--neutral-500-rgb),var(--ghost-hover));color:var(--danger)}:root .outline.danger:active{background-color:rgba(var(--neutral-500-rgb),var(--ghost-active));color:var(--danger)}:root .outline.danger:focus{background-color:rgba(var(--neutral-500-rgb),var(--ghost-focus));color:var(--danger)}:root .outline.warning{color:var(--warning)}:root .outline.warning,:root .outline.warning:active,:root .outline.warning:focus,:root .outline.warning:hover{border-color:var(--light-600)}:root .outline.warning:hover{background-color:rgba(var(--neutral-500-rgb),var(--ghost-hover));color:var(--warning)}:root .outline.warning:active{background-color:rgba(var(--neutral-500-rgb),var(--ghost-active));color:var(--warning)}:root .outline.warning:focus{background-color:rgba(var(--neutral-500-rgb),var(--ghost-focus));color:var(--warning)}:root .outline.success{color:var(--success)}:root .outline.success,:root .outline.success:active,:root .outline.success:focus,:root .outline.success:hover{border-color:var(--light-600)}:root .outline.success:hover{background-color:rgba(var(--neutral-500-rgb),var(--ghost-hover));color:var(--success)}:root .outline.success:active{background-color:rgba(var(--neutral-500-rgb),var(--ghost-active));color:var(--success)}:root .outline.success:focus{background-color:rgba(var(--neutral-500-rgb),var(--ghost-focus));color:var(--success)}:root .ghost.primary:hover{background-color:rgba(var(--neutral-500-rgb),var(--ghost-hover));color:var(--primary)}:root .ghost.primary:active{background-color:rgba(var(--neutral-500-rgb),var(--ghost-active));color:var(--primary)}:root .ghost.primary:focus{background-color:rgba(var(--neutral-500-rgb),var(--ghost-focus));color:var(--primary)}:root .ghost.secondary,:root .ghost.secondary:hover{color:var(--leds-contrast-90pct)}:root .ghost.secondary:hover{background-color:rgba(var(--neutral-500-rgb),var(--ghost-hover))}:root .ghost.secondary:active{background-color:rgba(var(--neutral-500-rgb),var(--ghost-active));color:var(--leds-contrast-90pct)}:root .ghost.secondary:focus{background-color:rgba(var(--neutral-500-rgb),var(--ghost-focus))}:root .ghost.basic,:root .ghost.basic:hover,:root .ghost.secondary:focus{color:var(--leds-contrast-90pct)}:root .ghost.basic:hover{background-color:rgba(var(--neutral-500-rgb),var(--ghost-hover))}:root .ghost.basic:active{background-color:rgba(var(--neutral-500-rgb),var(--ghost-active));color:var(--leds-contrast-90pct)}:root .ghost.basic:focus{background-color:rgba(var(--neutral-500-rgb),var(--ghost-focus));color:var(--leds-contrast-90pct)}:root .ghost.neutral:hover{background-color:rgba(var(--neutral-500-rgb),var(--ghost-hover));color:var(--neutral)}:root .ghost.neutral:active{background-color:rgba(var(--neutral-500-rgb),var(--ghost-active));color:var(--neutral)}:root .ghost.neutral:focus{background-color:rgba(var(--neutral-500-rgb),var(--ghost-focus));color:var(--neutral)}:root .ghost.light:hover{background-color:rgba(var(--neutral-500-rgb),var(--ghost-hover));color:var(--white)}:root .ghost.light:active{background-color:rgba(var(--neutral-500-rgb),var(--ghost-active));color:var(--white)}:root .ghost.light:focus{background-color:rgba(var(--neutral-500-rgb),var(--ghost-focus));color:var(--white)}:root .ghost.dark:hover{background-color:rgba(var(--neutral-500-rgb),var(--ghost-hover));color:var(--dark)}:root .ghost.dark:active{background-color:rgba(var(--neutral-500-rgb),var(--ghost-active));color:var(--dark)}:root .ghost.dark:focus{background-color:rgba(var(--neutral-500-rgb),var(--ghost-focus));color:var(--dark)}:root .ghost.gray,:root .ghost.gray:hover{color:var(--leds-contrast-90pct)}:root .ghost.gray:hover{background-color:rgba(var(--neutral-500-rgb),var(--ghost-hover))}:root .ghost.gray:active{background-color:rgba(var(--neutral-500-rgb),var(--ghost-active));color:var(--leds-contrast-90pct)}:root .ghost.gray:focus{background-color:rgba(var(--neutral-500-rgb),var(--ghost-focus));color:var(--leds-contrast-90pct)}:root .ghost.info{color:var(--info)}:root .ghost.info:hover{background-color:rgba(var(--neutral-500-rgb),var(--ghost-hover));color:var(--info)}:root .ghost.info:active{background-color:rgba(var(--neutral-500-rgb),var(--ghost-active));color:var(--info)}:root .ghost.info:focus{background-color:rgba(var(--neutral-500-rgb),var(--ghost-focus));color:var(--info)}:root .ghost.danger{color:var(--danger)}:root .ghost.danger:hover{background-color:rgba(var(--neutral-500-rgb),var(--ghost-hover));color:var(--danger)}:root .ghost.danger:active{background-color:rgba(var(--neutral-500-rgb),var(--ghost-active));color:var(--danger)}:root .ghost.danger:focus{background-color:rgba(var(--neutral-500-rgb),var(--ghost-focus));color:var(--danger)}:root .ghost.warning{color:var(--warning)}:root .ghost.warning:hover{background-color:rgba(var(--neutral-500-rgb),var(--ghost-hover));color:var(--warning)}:root .ghost.warning:active{background-color:rgba(var(--neutral-500-rgb),var(--ghost-active));color:var(--warning)}:root .ghost.warning:focus{background-color:rgba(var(--neutral-500-rgb),var(--ghost-focus));color:var(--warning)}:root .ghost.success{color:var(--success)}:root .ghost.success:hover{background-color:rgba(var(--neutral-500-rgb),var(--ghost-hover));color:var(--success)}:root .ghost.success:active{background-color:rgba(var(--neutral-500-rgb),var(--ghost-active));color:var(--success)}:root .ghost.success:focus{background-color:rgba(var(--neutral-500-rgb),var(--ghost-focus));color:var(--success)}[class*=\" le-\"],[class^=le-]{position:relative}[class*=\" le-\"]:before,[class^=le-]:before{height:100%;top:0;-webkit-mask-size:20px;mask-size:20px}.le-time_clock_three:before{-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E %3Cg id='time_clock_three'%3E %3Cpath id='Shape' fill-rule='evenodd' clip-rule='evenodd' d='M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C21.994 6.47963 17.5204 2.00597 12 2ZM12 20.3333C7.39763 20.3333 3.66667 16.6024 3.66667 12C3.66667 7.39763 7.39763 3.66667 12 3.66667C16.6024 3.66667 20.3333 7.39763 20.3333 12C20.3283 16.6003 16.6003 20.3283 12 20.3333ZM11.5833 5.75C11.5833 5.51988 11.7699 5.33333 12 5.33333C13.8319 5.3347 15.5824 6.09038 16.8397 7.42262C18.0971 8.75487 18.7503 10.5461 18.6458 12.375C18.6337 12.6075 18.4594 12.7992 18.2292 12.8333H12C11.7699 12.8333 11.5833 12.6468 11.5833 12.4167V5.75Z' fill='%235A5A5A'/%3E %3C/g%3E %3C/svg%3E\");-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;display:inline-block;content:\"\";position:absolute;background:currentColor}:host{display:inline-block}:host .logo-timer{border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;display:flex;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;padding:7px 10px;background:var(--secondary-400);overflow:hidden}:host .logo-timer .icon-base{color:var(--basic-900)}:host .logo-timer .icon-base span{display:inline-block;width:20px;height:20px;margin-right:8px;min-width:20px!important}:host .logo-timer .icon-base span:before{width:20px}:host .logo-timer .timer-title{margin-right:10px}:host .logo-timer .timer-title p{margin-top:0!important;margin-bottom:4px!important}:host .logo-timer .timer-base{margin:-7px -10px -7px 0;flex-grow:1;padding:7px 10px;box-sizing:border-box}:host .logo-timer .timer-base .counter{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;flex-direction:row}:host .logo-timer .timer-base .counter ::ng-deep div{padding-right:12px;position:relative;font-size:16px;line-height:16px;font-weight:700}:host .logo-timer .timer-base .counter ::ng-deep div small{display:block;font-size:12px;line-height:10px;font-weight:400}:host .logo-timer .timer-base .counter ::ng-deep div:after{content:\" : \";font-weight:700;position:absolute;font-size:16px;line-height:13px;top:0;right:4px}:host .logo-timer .timer-base .counter ::ng-deep div:last-child{padding-right:0}:host .logo-timer .timer-base .counter ::ng-deep div:last-child:after{content:\"\";padding:0;display:none}"] },] } ]; TimerComponent.ctorParameters = function () { return [ { type: TimerService } ]; }; TimerComponent.propDecorators = { cssClasses: [{ type: i0.Input }], isCountdown: [{ type: i0.Input }], timeInMs: [{ type: i0.Input }], title: [{ type: i0.Input }], id: [{ type: i0.Input }], theme: [{ type: i0.Input }], showIcon: [{ type: i0.Input }], showProgressBar: [{ type: i0.Input }], language: [{ type: i0.Input }], autoStart: [{ type: i0.Input }], onTimeCompleted: [{ type: i0.Output }] }; var TimeModule = /** @class */ (function () { function TimeModule() { } return TimeModule; }()); TimeModule.decorators = [ { type: i0.NgModule, args: [{ declarations: [TimePipe], imports: [common.CommonModule], exports: [TimePipe], },] } ]; /** * @license * Copyright LOGO YAZILIM SANAYİ VE TİCARET A.Ş. All Rights Reserved. * * Save to the extent permitted by law, you may not use, copy, modify, * distribute or create derivative works of this material or any part * of it without the prior written consent of LOGO YAZILIM SANAYİ VE TİCARET A.Ş. Limited. * Any reproduction of this material must contain this notice. */ /** * Timer helps developer to set a specific time for their web apps and doSomething after completed. * It comes many features * * @stacked-example(TimerComponent, logo/timer-sample/timer-showcase/timer-showcase.component) * * ### Installation * * All public npm packages of Logo Software is at [https://www.npmjs.com/~logofe](https://www.npmjs.com/~logofe). To * install Timer Module: * * ```bash * $ npm set registry https://registry.npmjs.org/ * $ npm install @logo-software/timer -s * ``` * * Just import it to your project of `@NgModule` import section. * * ```typescript * import { TimerModule } from '@logo-software/timer'; * * @NgModule({ * imports: [CommonModule, TimerModule], * }) * export class AppModule { * } * ``` */ var TimerModule = /** @class */ (function () { function TimerModule() { } return TimerModule; }()); TimerModule.decorators = [ { type: i0.NgModule, args: [{ declarations: [TimerComponent], imports: [ TimeModule, common.CommonModule, progressBar.ProgressBarModule, ], exports: [TimerComponent], },] } ]; /* * Public API Surface of timer */ /** * Generated bundle index. Do not edit. */ exports.TimerComponent = TimerComponent; exports.TimerModule = TimerModule; exports.TimerService = TimerService; exports["ɵa"] = TimePipe; exports["ɵb"] = TimeModule; Object.defineProperty(exports, '__esModule', { value: true }); })); //# sourceMappingURL=logo-software-timer.umd.js.map