UNPKG

@netgrif/components

Version:

Netgrif Application Engine frontend Angular components

26 lines 7.41 kB
import { Component } from '@angular/core'; import * as i0 from "@angular/core"; import * as i1 from "@angular/material/dialog"; import * as i2 from "@netgrif/components-core"; import * as i3 from "@angular/material/button"; import * as i4 from "@ngbracket/ngx-layout"; import * as i5 from "@angular/common"; import * as i6 from "@ngx-translate/core"; export class PopupSessionIdleComponent { dialogRef; sessionTimer; constructor(dialogRef, sessionTimer) { this.dialogRef = dialogRef; this.sessionTimer = sessionTimer; } getTime() { return this.sessionTimer.remainSeconds$; } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PopupSessionIdleComponent, deps: [{ token: i1.MatDialogRef }, { token: i2.SessionIdleTimerService }], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: PopupSessionIdleComponent, selector: "nc-popup-session-idle", ngImport: i0, template: "<div mat-dialog-title>{{ 'session.expireTitle' | translate}}</div>\n<div mat-dialog-content>\n <p class=\"white-space\">\n {{ 'session.expireDetail' | translate: {time: getTime() | async} }}\n </p>\n</div>\n<div mat-dialog-actions fxLayout=\"row\" fxLayoutAlign=\"space-between stretch\">\n <button mat-button [mat-dialog-close]=\"true\">{{ 'session.exitButton' | translate}}</button>\n <button mat-raised-button color=\"primary\" [mat-dialog-close]=\"false\"\n cdkFocusInitial>{{ 'session.refreshButton' | translate}}</button>\n</div>\n", styles: [".white-space{white-space:pre-line}\n"], dependencies: [{ kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i4.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i4.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PopupSessionIdleComponent, decorators: [{ type: Component, args: [{ selector: 'nc-popup-session-idle', template: "<div mat-dialog-title>{{ 'session.expireTitle' | translate}}</div>\n<div mat-dialog-content>\n <p class=\"white-space\">\n {{ 'session.expireDetail' | translate: {time: getTime() | async} }}\n </p>\n</div>\n<div mat-dialog-actions fxLayout=\"row\" fxLayoutAlign=\"space-between stretch\">\n <button mat-button [mat-dialog-close]=\"true\">{{ 'session.exitButton' | translate}}</button>\n <button mat-raised-button color=\"primary\" [mat-dialog-close]=\"false\"\n cdkFocusInitial>{{ 'session.refreshButton' | translate}}</button>\n</div>\n", styles: [".white-space{white-space:pre-line}\n"] }] }], ctorParameters: () => [{ type: i1.MatDialogRef }, { type: i2.SessionIdleTimerService }] }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9wdXAtc2Vzc2lvbi1pZGxlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25ldGdyaWYtY29tcG9uZW50cy9zcmMvbGliL2F1dGhlbnRpY2F0aW9uL3Nlc3Npb24taWRsZS9wb3B1cC1zZXNzaW9uLWlkbGUvcG9wdXAtc2Vzc2lvbi1pZGxlLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25ldGdyaWYtY29tcG9uZW50cy9zcmMvbGliL2F1dGhlbnRpY2F0aW9uL3Nlc3Npb24taWRsZS9wb3B1cC1zZXNzaW9uLWlkbGUvcG9wdXAtc2Vzc2lvbi1pZGxlLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxTQUFTLEVBQUMsTUFBTSxlQUFlLENBQUM7Ozs7Ozs7O0FBU3hDLE1B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