@firestitch/2fa 12.0.2 → 12.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/app/components/2fa-verification/2fa-verification.component.d.ts +17 -0
  2. package/app/components/2fa-verification-code/2fa-verification-code.component.d.ts +11 -0
  3. package/app/components/2fa-verification-form/2fa-verification-form.component.d.ts +21 -0
  4. package/app/components/2fa-verification-methods/2fa-verification-methods.component.d.ts +24 -0
  5. package/app/components/2fa-verification-otp/2fa-verification-otp.component.d.ts +12 -0
  6. package/app/enums/verification-method-type.enum.d.ts +6 -0
  7. package/app/fs-2fa.module.d.ts +23 -19
  8. package/app/interfaces/verification-method.interface.d.ts +11 -0
  9. package/app/interfaces/verification-provider.interface.d.ts +8 -0
  10. package/app/tokens/verification.token.d.ts +3 -0
  11. package/bundles/firestitch-2fa.umd.js +364 -196
  12. package/bundles/firestitch-2fa.umd.js.map +1 -1
  13. package/esm2015/app/components/2fa-verification/2fa-verification.component.js +49 -0
  14. package/esm2015/app/components/2fa-verification-code/2fa-verification-code.component.js +45 -0
  15. package/esm2015/app/components/2fa-verification-form/2fa-verification-form.component.js +69 -0
  16. package/esm2015/app/components/2fa-verification-methods/2fa-verification-methods.component.js +74 -0
  17. package/esm2015/app/components/2fa-verification-otp/2fa-verification-otp.component.js +33 -0
  18. package/esm2015/app/enums/verification-method-type.enum.js +8 -0
  19. package/esm2015/app/fs-2fa.module.js +90 -68
  20. package/esm2015/app/interfaces/verification-method.interface.js +2 -0
  21. package/esm2015/app/interfaces/verification-provider.interface.js +2 -0
  22. package/esm2015/app/tokens/verification.token.js +3 -0
  23. package/esm2015/firestitch-2fa.js +4 -4
  24. package/esm2015/public_api.js +9 -4
  25. package/fesm2015/firestitch-2fa.js +332 -171
  26. package/fesm2015/firestitch-2fa.js.map +1 -1
  27. package/firestitch-2fa.d.ts +5 -5
  28. package/package.json +1 -2
  29. package/public_api.d.ts +6 -7
  30. package/app/components/trusted-current-device/trusted-current-device.component.d.ts +0 -5
  31. package/app/components/trusted-devices/trusted-devices.component.d.ts +0 -26
  32. package/app/interfaces/trusted-device-account.d.ts +0 -6
  33. package/app/interfaces/trusted-device-device.d.ts +0 -10
  34. package/app/interfaces/trusted-device-ip.d.ts +0 -8
  35. package/app/interfaces/trusted-device.d.ts +0 -14
  36. package/esm2015/app/components/trusted-current-device/trusted-current-device.component.js +0 -18
  37. package/esm2015/app/components/trusted-devices/trusted-devices.component.js +0 -99
  38. package/esm2015/app/interfaces/trusted-device-account.js +0 -2
  39. package/esm2015/app/interfaces/trusted-device-device.js +0 -2
  40. package/esm2015/app/interfaces/trusted-device-ip.js +0 -2
  41. package/esm2015/app/interfaces/trusted-device.js +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"firestitch-2fa.js","sources":["../../src/app/components/trusted-current-device/trusted-current-device.component.ts","../../src/app/components/trusted-current-device/trusted-current-device.component.html","../../src/app/components/trusted-devices/trusted-devices.component.ts","../../src/app/components/trusted-devices/trusted-devices.component.html","../../src/app/fs-2fa.module.ts","../../src/firestitch-2fa.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\n\n@Component({\n selector: 'fs-trusted-current-device',\n templateUrl: './trusted-current-device.component.html',\n styleUrls: [ './trusted-current-device.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FsTrustedCurrentDeviceComponent {\n}\n","\n<div class=\"current-device\">\n <mat-icon class=\"circle\">circle</mat-icon>\n <mat-icon \n class=\"check\"\n matTooltip=\"This device\">\n check_circle\n </mat-icon>\n</div>\n","import {\n Component,\n ViewChild,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n OnInit,\n OnDestroy,\n} from '@angular/core';\n\nimport { FsListComponent, FsListConfig } from '@firestitch/list';\nimport { ItemType } from '@firestitch/filter';\nimport { FsCountry } from '@firestitch/country';\n\nimport { Observable, Subject } from 'rxjs';\nimport { map, takeUntil } from 'rxjs/operators';\n\nimport { ITrustedDevice } from '../../interfaces/trusted-device';\n\n\n@Component({\n selector: 'fs-trusted-devices',\n templateUrl: './trusted-devices.component.html',\n styleUrls: [ './trusted-devices.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FsTrustedDevicesComponent implements OnInit, OnDestroy {\n\n @Input()\n public fetchTrustedDevices = (query: any) => new Observable<{\n data: ITrustedDevice[];\n paging?: any;\n }>();\n\n @Input()\n public deleteTrustedDevice = (trustedDevice: ITrustedDevice) => new Observable<any>();\n\n @Input()\n public signOutTrustedDevice = (trustedDevice: ITrustedDevice) => new Observable<any>();\n\n @Input()\n public showAccount = true;\n\n @ViewChild(FsListComponent)\n public listComponent: FsListComponent;\n\n public listConfig: FsListConfig;\n\n private _destroy$ = new Subject();\n\n constructor(\n private _fsCountry: FsCountry,\n ) { }\n\n public ngOnInit(): void {\n this._fsCountry.ready$\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe(() => {\n this._initListConfig();\n });\n }\n\n public ngOnDestroy(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n private _initListConfig(): void {\n this.listConfig = {\n rowActions: [\n {\n click: (data) => {\n this.signOutTrustedDevice(data)\n .subscribe(() => {\n this.reload();\n });\n },\n menu: true,\n label: 'Sign Out',\n },\n {\n click: (data) => {\n this.deleteTrustedDevice(data)\n .subscribe(() => {\n this.reload();\n });\n },\n remove: {\n title: 'Confirm',\n template: 'Are you sure you would like to delete this trusted device?',\n },\n menu: true,\n label: 'Delete',\n },\n ],\n fetch: (query) => {\n return this.fetchTrustedDevices(query)\n .pipe(\n map((response) => {\n return {\n data: response.data,\n paging: response.paging,\n };\n }),\n );\n },\n };\n }\n\n public reload(): void {\n this.listComponent.reload();\n }\n\n}\n","<fs-list [config]=\"listConfig\">\n <fs-list-column title=\"Account\" [show]=\"showAccount\">\n <ng-template fs-list-cell let-row=\"row\" class=\"col-account\">\n <div *ngIf=\"row.account\" class=\"row\">\n <fs-badge \n *ngIf=\"row.account.avatarUrl\"\n shape=\"circle\" \n image=\"{{ row.account.avatarUrl }}\">\n </fs-badge>\n <div>\n {{ row.account.name }}\n <div class=\"small\" *ngIf=\"row.account.email\">{{ row.account.email }}</div> \n </div>\n </div>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Device\">\n <ng-template fs-list-cell let-row=\"row\" class=\"col-device\">\n <div class=\"device\" *ngIf=\"row.device\">\n <fs-trusted-current-device *ngIf=\"row.currentDevice\"></fs-trusted-current-device>\n <fs-device-os\n [type]=\"row.device.type\"\n [os]=\"row.device.osType\"\n [version]=\"row.device.osVersion\">\n </fs-device-os>\n </div> \n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Browser\">\n <ng-template fs-list-cell let-row=\"row\">\n <fs-device-browser\n *ngIf=\"row.device\"\n [type]=\"row.device.browserType\"\n [version]=\"row.device.browserVersion\"\n [showName]=\"true\"\n ></fs-device-browser>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Added\">\n <ng-template fs-list-cell let-row=\"row\">\n {{ row.createDate | fsDateAgo }}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Location\">\n <ng-template fs-list-cell let-row=\"row\">\n <!-- Use FsIp and pass in region, country, lat and lng -->\n <fs-country [code]=\"row.ip.country\"></fs-country>\n <div><small>{{row.ip.ip}}</small></div>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Last signed in\">\n <ng-template fs-list-cell let-row=\"row\">\n {{ row.activityDate | fsDateAgo }}\n </ng-template>\n </fs-list-column>\n</fs-list>\n","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FlexLayoutModule } from '@angular/flex-layout';\n\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { FsListModule } from '@firestitch/list';\nimport { FsDateModule } from '@firestitch/date';\nimport { FsCountryModule } from '@firestitch/country';\nimport { FsDeviceModule } from '@firestitch/device';\n\nimport { FsTrustedCurrentDeviceComponent } from './components/trusted-current-device/trusted-current-device.component';\nimport { FsTrustedDevicesComponent } from './components/trusted-devices/trusted-devices.component';\n\nimport { FsBadgeModule } from '@firestitch/badge';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\n\n@NgModule({\n imports: [\n CommonModule,\n FlexLayoutModule,\n\n MatIconModule,\n MatTooltipModule,\n\n FsListModule,\n FsDateModule,\n FsCountryModule,\n FsDeviceModule,\n FsBadgeModule,\n ],\n exports: [\n FsTrustedDevicesComponent,\n FsTrustedCurrentDeviceComponent,\n ],\n declarations: [\n FsTrustedDevicesComponent,\n FsTrustedCurrentDeviceComponent,\n ],\n})\nexport class Fs2FaModule {\n static forRoot(): ModuleWithProviders<Fs2FaModule> {\n return {\n ngModule: Fs2FaModule,\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;MAYa,+BAA+B;;6HAA/B,+BAA+B;iHAA/B,+BAA+B,iECZ5C,qMASA;4FDGa,+BAA+B;kBAN3C,SAAS;mBAAC;oBACT,QAAQ,EAAE,2BAA2B;oBACrC,WAAW,EAAE,yCAAyC;oBACtD,SAAS,EAAE,CAAE,yCAAyC,CAAE;oBACxD,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;;;MEgBY,yBAAyB;IAwBpC,YACU,UAAqB;QAArB,eAAU,GAAV,UAAU,CAAW;QAtBxB,wBAAmB,GAAG,CAAC,KAAU,KAAK,IAAI,UAAU,EAGvD,CAAC;QAGE,wBAAmB,GAAG,CAAC,aAA6B,KAAK,IAAI,UAAU,EAAO,CAAC;QAG/E,yBAAoB,GAAG,CAAC,aAA8B,KAAK,IAAI,UAAU,EAAO,CAAC;QAGjF,gBAAW,GAAG,IAAI,CAAC;QAOlB,cAAS,GAAG,IAAI,OAAO,EAAE,CAAC;KAI7B;IAEE,QAAQ;QACb,IAAI,CAAC,UAAU,CAAC,MAAM;aACnB,IAAI,CACH,SAAS,CAAC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SAAS;mBAAC;oBACT,QAAQ,EAAE,oBAAoB;oBAC9B,WAAW,EAAE,kCAAkC;oBAC/C,SAAS,EAAE,CAAE,kCAAkC,CAAE;oBACjD,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;kGAIQ,mBAAmB;sBADzB,KAAK;gBAOC,mBAAmB;sBADzB,KAAK;gBAIC,oBAAoB;sBAD1B,KAAK;gBAIC,WAAW;sBADjB,KAAK;gBAIC,aAAa;sBADnB,SAAS;uBAAC,eAAe;;;MEHf,WAAW;IACtB,OAAO,OAAO;QACZ,OAAO;YACL,QAAQ,EAAE,WAAW;SACtB,CAAC;KACH;;yGALU,WAAW;0GAAX,WAAW,iBAJpB,yBAAyB;QACzB,+BAA+B,aAlB/B,YAAY;QACZ,gBAAgB;QAEhB,aAAa;QACb,gBAAgB;QAEhB,YAAY;QACZ,YAAY;QACZ,eAAe;QACf,cAAc;QACd,aAAa,aAGb,yBAAyB;QACzB,+BAA+B;0GAOtB,WAAW,YAtBb;YACP,YAAY;YACZ,gBAAgB;YAEhB,aAAa;YACb,gBAAgB;YAEhB,YAAY;YACZ,YAAY;YACZ,eAAe;YACf,cAAc;YACd,aAAa;SACd;4FAUU,WAAW;kBAvBvB,QAAQ;mBAAC;oBACR,OAAO,EAAE;wBACP,YAAY;wBACZ,gBAAgB;wBAEhB,aAAa;wBACb,gBAAgB;wBAEhB,YAAY;wBACZ,YAAY;wBACZ,eAAe;wBACf,cAAc;wBACd,aAAa;qBACd;oBACD,OAAO,EAAE;wBACP,yBAAyB;wBACzB,+BAA+B;qBAChC;oBACD,YAAY,EAAE;wBACZ,yBAAyB;wBACzB,+BAA+B;qBAChC;iBACF;;;ACxCD;;;;;;"}
1
+ {"version":3,"file":"firestitch-2fa.js","sources":["../../src/app/tokens/verification.token.ts","../../src/app/components/2fa-verification-otp/2fa-verification-otp.component.ts","../../src/app/components/2fa-verification-otp/2fa-verification-otp.component.html","../../src/app/components/2fa-verification-code/2fa-verification-code.component.ts","../../src/app/components/2fa-verification-code/2fa-verification-code.component.html","../../src/app/components/2fa-verification-form/2fa-verification-form.component.ts","../../src/app/components/2fa-verification-form/2fa-verification-form.component.html","../../src/app/enums/verification-method-type.enum.ts","../../src/app/components/2fa-verification-methods/2fa-verification-methods.component.ts","../../src/app/components/2fa-verification-methods/2fa-verification-methods.component.html","../../src/app/components/2fa-verification/2fa-verification.component.ts","../../src/app/components/2fa-verification/2fa-verification.component.html","../../src/app/fs-2fa.module.ts","../../src/public_api.ts","../../src/firestitch-2fa.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nimport { IFsVerificationProvider } from '../interfaces/verification-provider.interface';\n\nexport const FS_2FA_VERIFICATION_PROVIDER = new InjectionToken<IFsVerificationProvider>(\n 'Provider for Verification service',\n);\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Output,\n} from '@angular/core';\n\nimport { FsFormDirective } from '@firestitch/form';\n\n\n@Component({\n selector: 'fs-2fa-verification-otp',\n templateUrl: './2fa-verification-otp.component.html',\n styleUrls: [\n './2fa-verification-otp.component.scss'\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Fs2FAVerificationOTPComponent {\n\n @Output()\n public codeChange = new EventEmitter<string>();\n\n constructor(\n public form: FsFormDirective,\n ) {}\n\n public codeChanged(event: string): void {\n this.codeChange.emit(event);\n this.form.dirty();\n }\n\n public codeCompleted(): void {\n this.form.triggerSubmit();\n }\n}\n","<p class=\"description\">\n Enter the verification code generated by your 2 factor authenticator\n app to verify it's you\n</p>\n\n<!--\n<code-input [initialFocusField]=\"0\"\n [codeLength]=\"6\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted()\">>\n</code-input>\n-->\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n} from '@angular/core';\nimport { ControlContainer, NgForm } from '@angular/forms';\n\nimport { IFsVerificationMethod } from '../../interfaces/verification-method.interface';\n\n\n@Component({\n selector: 'fs-2fa-verification-code',\n templateUrl: './2fa-verification-code.component.html',\n styleUrls: [\n './2fa-verification-code.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n viewProviders: [\n {\n provide: ControlContainer,\n useExisting: NgForm,\n },\n ],\n})\nexport class Fs2FAVerificationSMSComponent {\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Output()\n public codeChange = new EventEmitter<string>();\n\n public code: string;\n\n public codeChanged(): void {\n this.codeChange.emit(this.code);\n }\n\n}\n","<p class=\"description\">\n <ng-container *ngIf=\"method.phoneCode && method.phoneNumber && method.type === 'sms'\">\n A text message with a verification code was just\n sent to <span style=\"white-space: nowrap;\">+{{ method.phoneCode }} {{ method.phoneNumber }}</span> to verify it's you.\n </ng-container>\n\n <ng-container *ngIf=\"method.type === 'email'\">\n A email with a verification code was just sent to {{ method.email }} to verify it's you.\n </ng-container>\n\n <ng-container *ngIf=\"false\">\n Enter the one time code generated by the app administrator to verify it's you.\n </ng-container>\n</p>\n\n<mat-form-field>\n <mat-label>Code</mat-label>\n <input type=\"text\"\n matInput\n name=\"code\"\n autocomplete=\"one-time-code\"\n [(ngModel)]=\"code\"\n (ngModelChange)=\"codeChanged()\"\n required\n placeholder=\"Enter the code\"\n inputmode=\"numeric\">\n</mat-form-field>\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input, OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\n\nimport { Subject } from 'rxjs';\nimport { takeUntil, tap } from 'rxjs/operators';\n\nimport { IFsVerificationMethod } from '../../interfaces/verification-method.interface';\nimport { FS_2FA_VERIFICATION_PROVIDER } from '../../tokens/verification.token';\nimport { IFsVerificationProvider } from '../../interfaces/verification-provider.interface';\n\n\n@Component({\n selector: 'fs-2fa-verification-form',\n templateUrl: './2fa-verification-form.component.html',\n styleUrls: [\n './2fa-verification-form.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Fs2FAVerificationFormComponent implements OnDestroy {\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Output()\n public verified = new EventEmitter<unknown>();\n\n public resendInProgress = false;\n public trustedDevice = false;\n\n private _code: string;\n private _destroy$ = new Subject<void>();\n\n constructor(\n @Inject(FS_2FA_VERIFICATION_PROVIDER)\n public verificationProvider: IFsVerificationProvider,\n private _cdRef: ChangeDetectorRef,\n ) {}\n\n public ngOnDestroy(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n public verify = () => {\n return this.verificationProvider\n .verify(this._code, this.trustedDevice)\n .pipe(\n tap((response) => {\n this.verified.emit(response);\n }),\n );\n };\n\n public codeChanged(code: string): void {\n this._code = code;\n }\n\n public resend(): void {\n this.resendInProgress = true;\n\n this.verificationProvider\n .resend()\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe(() => {\n this.resendInProgress = false;\n\n this._cdRef.markForCheck();\n })\n }\n\n}\n","<form fsForm [submit]=\"verify\">\n <h2>2-Step Verification</h2>\n\n <div class=\"code-container\">\n <ng-container *ngIf=\"method.type === 'authenticator' else code\">\n <fs-2fa-verification-otp class=\"otp\"></fs-2fa-verification-otp>\n </ng-container>\n\n <ng-template #code>\n <fs-2fa-verification-code\n [method]=\"method\"\n (codeChange)=\"codeChanged($event)\">\n </fs-2fa-verification-code>\n </ng-template>\n </div>\n\n <div class=\"additional\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustedDevice\">\n Trust this device\n </mat-checkbox>\n\n <span matSuffix>\n <button mat-button\n type=\"button\"\n color=\"primary\"\n (click)=\"resend()\"\n [disabled]=\"resendInProgress\"\n class=\"resend-code-btn\">\n <ng-container *ngIf=\"!resendInProgress else sending\">\n Resend Code\n </ng-container>\n <ng-template #sending>\n <mat-spinner [diameter]=\"12\"></mat-spinner> Sending\n </ng-template>\n </button>\n </span>\n </div>\n\n <div class=\"actions\">\n <button mat-raised-button\n color=\"primary\"\n type=\"submit\">\n Verify\n </button>\n\n <ng-content></ng-content>\n </div>\n</form>\n","export enum FsVerificationMethodType {\n Sms = 'sms',\n Email = 'email',\n Authenticator = 'authenticator',\n Code = 'code',\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnInit,\n Output,\n} from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { map, shareReplay, tap } from 'rxjs/operators';\n\nimport { FS_2FA_VERIFICATION_PROVIDER } from '../../tokens/verification.token';\nimport { FsVerificationMethodType } from '../../enums/verification-method-type.enum';\nimport { IFsVerificationProvider } from '../../interfaces/verification-provider.interface';\nimport { IFsVerificationMethod } from '../../interfaces/verification-method.interface';\n\n\n@Component({\n selector: 'fs-2fa-verification-methods',\n templateUrl: './2fa-verification-methods.component.html',\n styleUrls: [\n './2fa-verification-methods.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Fs2FaVerificationMethodsComponent implements OnInit {\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Output()\n public methodChange = new EventEmitter<IFsVerificationMethod>();\n\n @Output()\n public cancelled = new EventEmitter<void>();\n\n public phone: string;\n public code: string;\n public methods$: Observable<Record<string, IFsVerificationMethod[]>>;\n public readonly verificationMethodType = FsVerificationMethodType;\n\n constructor(\n @Inject(FS_2FA_VERIFICATION_PROVIDER)\n private _verificationProvider: IFsVerificationProvider,\n ) {\n this._initMethods();\n }\n\n public ngOnInit(): void {\n }\n\n public compareWith(o1, o2) {\n return o1 && o2 && o1.id === o2.id\n }\n\n public cancel(): void {\n this.cancelled.emit();\n }\n\n public setVerificationMethod = () => {\n return this._verificationProvider\n .updateVerificationMethod(this.method.id)\n .pipe(\n tap((method: IFsVerificationMethod) => {\n this.methodChange.emit(method);\n })\n );\n };\n\n private _initMethods(): void {\n this.methods$ = this._verificationProvider\n .methods()\n .pipe(\n map((methods) => {\n return methods\n .reduce((acc, method) => {\n if (!acc[method.type]) {\n acc[method.type] = [];\n }\n\n acc[method.type].push(method);\n\n return acc;\n }, {});\n }),\n shareReplay(1),\n );\n }\n}\n","<h2>\n Verification Methods\n</h2>\n<form fsForm [submit]=\"setVerificationMethod\">\n <ng-container *fsSkeleton=\"methods$ | async as methods\">\n <fs-radio-group [(ngModel)]=\"method\" name=\"method\" [compareWith]=\"compareWith\">\n <ng-container *ngFor=\"let methodMap of methods | keyvalue\">\n <div class=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n smartphone\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Text Message</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following mobile number\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n mail\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Email</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following email\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n + {{ method.phoneCode }} {{ method.phoneNumber }}\n </mat-radio-button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n {{ method.email }}\n </mat-radio-button>\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n </fs-radio-group>\n </ng-container>\n\n <div class=\"actions\">\n <ng-container *ngIf=\"methods$ | async\">\n <button mat-button type=\"submit\" color=\"primary\">Next</button>\n </ng-container>\n <button mat-button type=\"button\" (click)=\"cancel()\">Cancel</button>\n </div>\n</form>\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n} from '@angular/core';\n\nimport { IFsVerificationMethod } from '../../interfaces/verification-method.interface';\n\n\n@Component({\n selector: 'fs-2fa-verification',\n templateUrl: './2fa-verification.component.html',\n styleUrls: [\n './2fa-verification.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Fs2FAVerificationComponent {\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Output()\n public verified = new EventEmitter<unknown>();\n\n @Output()\n public backToSignIn = new EventEmitter<void>();\n\n private _view: 'code' | 'methods' = 'code';\n\n constructor() {}\n\n public get view(): 'code' | 'methods' {\n return this._view;\n }\n\n public switchVerificationMethod(method: 'code' | 'methods'): void {\n this._view = method;\n }\n\n public setActiveMethod(method: IFsVerificationMethod): void {\n this.method = method;\n this.switchVerificationMethod('code');\n }\n\n public cancel(): void {\n this.switchVerificationMethod('code');\n }\n\n public toSignIn(): void {\n this.backToSignIn.emit();\n }\n\n}\n","<ng-container [ngSwitch]=\"view\">\n <ng-container *ngSwitchCase=\"'code'\">\n <fs-2fa-verification-form [method]=\"method\" (verified)=\"verified.emit($event)\">\n <button mat-button type=\"button\" (click)=\"switchVerificationMethod('methods')\">\n Try other ways to verify\n </button>\n\n <a mat-button (click)=\"toSignIn()\">\n Back to signin\n </a>\n </fs-2fa-verification-form>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'methods'\">\n <fs-2fa-verification-methods\n [method]=\"method\"\n (methodChange)=\"setActiveMethod($event)\"\n (cancelled)=\"cancel()\">\n </fs-2fa-verification-methods>\n </ng-container>\n</ng-container>\n","import { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\n\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\nimport { FsFormModule } from '@firestitch/form';\nimport { FsSkeletonModule } from '@firestitch/skeleton';\nimport { FsRadioGroupModule } from '@firestitch/radiogroup';\n\n// import { CodeInputModule } from 'angular-code-input';\n\nimport { Fs2FAVerificationComponent } from './components/2fa-verification/2fa-verification.component';\nimport { Fs2FAVerificationSMSComponent } from './components/2fa-verification-code/2fa-verification-code.component';\nimport { Fs2FAVerificationOTPComponent } from './components/2fa-verification-otp/2fa-verification-otp.component';\nimport { Fs2FAVerificationFormComponent } from './components/2fa-verification-form/2fa-verification-form.component';\nimport { Fs2FaVerificationMethodsComponent } from './components/2fa-verification-methods/2fa-verification-methods.component';\n\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n\n MatFormFieldModule,\n MatInputModule,\n MatButtonModule,\n\n FsFormModule,\n\n // CodeInputModule,\n MatCheckboxModule,\n MatProgressSpinnerModule,\n FsSkeletonModule,\n FsSkeletonModule,\n MatIconModule,\n MatRadioModule,\n FsRadioGroupModule,\n ],\n declarations: [\n Fs2FAVerificationComponent,\n\n Fs2FAVerificationFormComponent,\n Fs2FAVerificationSMSComponent,\n Fs2FAVerificationOTPComponent,\n Fs2FaVerificationMethodsComponent,\n ],\n exports: [\n Fs2FAVerificationComponent,\n ],\n providers: [],\n})\nexport class Fs2FaModule {}\n","/*\n * Public API Surface of fs-2fa\n */\n\nexport { Fs2FaModule } from './app/fs-2fa.module';\n\n// Components\nexport { Fs2FAVerificationComponent } from './app/components/2fa-verification/2fa-verification.component';\n\nexport { IFsVerificationProvider } from './app/interfaces/verification-provider.interface';\nexport { IFsVerificationMethod } from './app/interfaces/verification-method.interface';\n\nexport { FsVerificationMethodType } from './app/enums/verification-method-type.enum';\n\nexport { FS_2FA_VERIFICATION_PROVIDER } from './app/tokens/verification.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAIa,4BAA4B,GAAG,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,5 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@firestitch/2fa" />
5
- export * from './public_api';
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@firestitch/2fa" />
5
+ export * from './public_api';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestitch/2fa",
3
- "version": "12.0.2",
3
+ "version": "12.0.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/Firestitch/ngx-2fa"
@@ -13,7 +13,6 @@
13
13
  "angular"
14
14
  ],
15
15
  "license": "MIT",
16
- "peerDependencies": {},
17
16
  "dependencies": {
18
17
  "tslib": "^2.0.0"
19
18
  },
package/public_api.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- export { Fs2FaModule } from './app/fs-2fa.module';
2
- export { FsTrustedDevicesComponent } from './app/components/trusted-devices/trusted-devices.component';
3
- export { FsTrustedCurrentDeviceComponent } from './app/components/trusted-current-device/trusted-current-device.component';
4
- export { ITrustedDevice } from './app/interfaces/trusted-device';
5
- export { ITrustedDeviceAccount } from './app/interfaces/trusted-device-account';
6
- export { ITrustedDeviceDevice } from './app/interfaces/trusted-device-device';
7
- export { ITrustedDeviceIp } from './app/interfaces/trusted-device-ip';
1
+ export { Fs2FaModule } from './app/fs-2fa.module';
2
+ export { Fs2FAVerificationComponent } from './app/components/2fa-verification/2fa-verification.component';
3
+ export { IFsVerificationProvider } from './app/interfaces/verification-provider.interface';
4
+ export { IFsVerificationMethod } from './app/interfaces/verification-method.interface';
5
+ export { FsVerificationMethodType } from './app/enums/verification-method-type.enum';
6
+ export { FS_2FA_VERIFICATION_PROVIDER } from './app/tokens/verification.token';
@@ -1,5 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class FsTrustedCurrentDeviceComponent {
3
- static ɵfac: i0.ɵɵFactoryDeclaration<FsTrustedCurrentDeviceComponent, never>;
4
- static ɵcmp: i0.ɵɵComponentDeclaration<FsTrustedCurrentDeviceComponent, "fs-trusted-current-device", never, {}, {}, never, never>;
5
- }
@@ -1,26 +0,0 @@
1
- import { OnInit, OnDestroy } from '@angular/core';
2
- import { FsListComponent, FsListConfig } from '@firestitch/list';
3
- import { FsCountry } from '@firestitch/country';
4
- import { Observable } from 'rxjs';
5
- import { ITrustedDevice } from '../../interfaces/trusted-device';
6
- import * as i0 from "@angular/core";
7
- export declare class FsTrustedDevicesComponent implements OnInit, OnDestroy {
8
- private _fsCountry;
9
- fetchTrustedDevices: (query: any) => Observable<{
10
- data: ITrustedDevice[];
11
- paging?: any;
12
- }>;
13
- deleteTrustedDevice: (trustedDevice: ITrustedDevice) => Observable<any>;
14
- signOutTrustedDevice: (trustedDevice: ITrustedDevice) => Observable<any>;
15
- showAccount: boolean;
16
- listComponent: FsListComponent;
17
- listConfig: FsListConfig;
18
- private _destroy$;
19
- constructor(_fsCountry: FsCountry);
20
- ngOnInit(): void;
21
- ngOnDestroy(): void;
22
- private _initListConfig;
23
- reload(): void;
24
- static ɵfac: i0.ɵɵFactoryDeclaration<FsTrustedDevicesComponent, never>;
25
- static ɵcmp: i0.ɵɵComponentDeclaration<FsTrustedDevicesComponent, "fs-trusted-devices", never, { "fetchTrustedDevices": "fetchTrustedDevices"; "deleteTrustedDevice": "deleteTrustedDevice"; "signOutTrustedDevice": "signOutTrustedDevice"; "showAccount": "showAccount"; }, {}, never, never>;
26
- }
@@ -1,6 +0,0 @@
1
- export interface ITrustedDeviceAccount {
2
- readonly id: number;
3
- name: string;
4
- email: string;
5
- avatarUrl: string;
6
- }
@@ -1,10 +0,0 @@
1
- import { DeviceType, DeviceOs, DeviceBrowser } from '@firestitch/device';
2
- export interface ITrustedDeviceDevice {
3
- readonly id: number;
4
- type: DeviceType;
5
- osType: DeviceOs;
6
- osVersion: string;
7
- browserType: DeviceBrowser;
8
- browserVersion: string;
9
- userAgent: string;
10
- }
@@ -1,8 +0,0 @@
1
- export interface ITrustedDeviceIp {
2
- id?: number;
3
- country?: string;
4
- ip?: string;
5
- region?: string;
6
- lat?: string;
7
- lng?: string;
8
- }
@@ -1,14 +0,0 @@
1
- import { ITrustedDeviceAccount } from './trusted-device-account';
2
- import { ITrustedDeviceDevice } from './trusted-device-device';
3
- import { ITrustedDeviceIp } from './trusted-device-ip';
4
- export interface ITrustedDevice {
5
- readonly id: number;
6
- account: ITrustedDeviceAccount;
7
- device: ITrustedDeviceDevice;
8
- ip: ITrustedDeviceIp;
9
- activityDate: Date;
10
- createDate: Date;
11
- guid: string;
12
- state: 'active' | 'deleted';
13
- currentDevice?: boolean;
14
- }
@@ -1,18 +0,0 @@
1
- import { Component, ChangeDetectionStrategy, } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "@angular/material/icon";
4
- import * as i2 from "@angular/material/tooltip";
5
- export class FsTrustedCurrentDeviceComponent {
6
- }
7
- FsTrustedCurrentDeviceComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsTrustedCurrentDeviceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8
- FsTrustedCurrentDeviceComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsTrustedCurrentDeviceComponent, selector: "fs-trusted-current-device", ngImport: i0, template: "\n<div class=\"current-device\">\n <mat-icon class=\"circle\">circle</mat-icon>\n <mat-icon \n class=\"check\"\n matTooltip=\"This device\">\n check_circle\n </mat-icon>\n</div>\n", styles: [".current-device{transform:scale(.8);z-index:1;position:relative}.current-device .check,.current-device .circle{position:absolute;color:#027db4;top:0}.current-device .circle{color:#fff}\n"], components: [{ type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i2.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsTrustedCurrentDeviceComponent, decorators: [{
10
- type: Component,
11
- args: [{
12
- selector: 'fs-trusted-current-device',
13
- templateUrl: './trusted-current-device.component.html',
14
- styleUrls: ['./trusted-current-device.component.scss'],
15
- changeDetection: ChangeDetectionStrategy.OnPush,
16
- }]
17
- }] });
18
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJ1c3RlZC1jdXJyZW50LWRldmljZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvYXBwL2NvbXBvbmVudHMvdHJ1c3RlZC1jdXJyZW50LWRldmljZS90cnVzdGVkLWN1cnJlbnQtZGV2aWNlLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3NyYy9hcHAvY29tcG9uZW50cy90cnVzdGVkLWN1cnJlbnQtZGV2aWNlL3RydXN0ZWQtY3VycmVudC1kZXZpY2UuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLFNBQVMsRUFDVCx1QkFBdUIsR0FDeEIsTUFBTSxlQUFlLENBQUM7Ozs7QUFTdkIsTUFBTSxPQUFPLCtCQUErQjs7NkhBQS9CLCtCQUErQjtpSEFBL0IsK0JBQStCLGlFQ1o1QyxxTUFTQTs0RkRHYSwrQkFBK0I7a0JBTjNDLFNBQVM7bUJBQUM7b0JBQ1QsUUFBUSxFQUFFLDJCQUEyQjtvQkFDckMsV0FBVyxFQUFFLHlDQUF5QztvQkFDdEQsU0FBUyxFQUFFLENBQUUseUNBQXlDLENBQUU7b0JBQ3hELGVBQWUsRUFBRSx1QkFBdUIsQ0FBQyxNQUFNO2lCQUNoRCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7XG4gIENvbXBvbmVudCxcbiAgQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3ksXG59IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5cbkBDb21wb25lbnQoe1xuICBzZWxlY3RvcjogJ2ZzLXRydXN0ZWQtY3VycmVudC1kZXZpY2UnLFxuICB0ZW1wbGF0ZVVybDogJy4vdHJ1c3RlZC1jdXJyZW50LWRldmljZS5jb21wb25lbnQuaHRtbCcsXG4gIHN0eWxlVXJsczogWyAnLi90cnVzdGVkLWN1cnJlbnQtZGV2aWNlLmNvbXBvbmVudC5zY3NzJyBdLFxuICBjaGFuZ2VEZXRlY3Rpb246IENoYW5nZURldGVjdGlvblN0cmF0ZWd5Lk9uUHVzaCxcbn0pXG5leHBvcnQgY2xhc3MgRnNUcnVzdGVkQ3VycmVudERldmljZUNvbXBvbmVudCB7XG59XG4iLCJcbjxkaXYgY2xhc3M9XCJjdXJyZW50LWRldmljZVwiPlxuICA8bWF0LWljb24gY2xhc3M9XCJjaXJjbGVcIj5jaXJjbGU8L21hdC1pY29uPlxuICA8bWF0LWljb24gXG4gICAgICBjbGFzcz1cImNoZWNrXCJcbiAgICAgIG1hdFRvb2x0aXA9XCJUaGlzIGRldmljZVwiPlxuICAgIGNoZWNrX2NpcmNsZVxuICA8L21hdC1pY29uPlxuPC9kaXY+XG4iXX0=
@@ -1,99 +0,0 @@
1
- import { Component, ViewChild, Input, ChangeDetectionStrategy, } from '@angular/core';
2
- import { FsListComponent } from '@firestitch/list';
3
- import { FsCountry } from '@firestitch/country';
4
- import { Observable, Subject } from 'rxjs';
5
- import { map, takeUntil } from 'rxjs/operators';
6
- import * as i0 from "@angular/core";
7
- import * as i1 from "@firestitch/country";
8
- import * as i2 from "@firestitch/list";
9
- import * as i3 from "@firestitch/badge";
10
- import * as i4 from "../trusted-current-device/trusted-current-device.component";
11
- import * as i5 from "@firestitch/device";
12
- import * as i6 from "@angular/common";
13
- import * as i7 from "@firestitch/date";
14
- export class FsTrustedDevicesComponent {
15
- constructor(_fsCountry) {
16
- this._fsCountry = _fsCountry;
17
- this.fetchTrustedDevices = (query) => new Observable();
18
- this.deleteTrustedDevice = (trustedDevice) => new Observable();
19
- this.signOutTrustedDevice = (trustedDevice) => new Observable();
20
- this.showAccount = true;
21
- this._destroy$ = new Subject();
22
- }
23
- ngOnInit() {
24
- this._fsCountry.ready$
25
- .pipe(takeUntil(this._destroy$))
26
- .subscribe(() => {
27
- this._initListConfig();
28
- });
29
- }
30
- ngOnDestroy() {
31
- this._destroy$.next();
32
- this._destroy$.complete();
33
- }
34
- _initListConfig() {
35
- this.listConfig = {
36
- rowActions: [
37
- {
38
- click: (data) => {
39
- this.signOutTrustedDevice(data)
40
- .subscribe(() => {
41
- this.reload();
42
- });
43
- },
44
- menu: true,
45
- label: 'Sign Out',
46
- },
47
- {
48
- click: (data) => {
49
- this.deleteTrustedDevice(data)
50
- .subscribe(() => {
51
- this.reload();
52
- });
53
- },
54
- remove: {
55
- title: 'Confirm',
56
- template: 'Are you sure you would like to delete this trusted device?',
57
- },
58
- menu: true,
59
- label: 'Delete',
60
- },
61
- ],
62
- fetch: (query) => {
63
- return this.fetchTrustedDevices(query)
64
- .pipe(map((response) => {
65
- return {
66
- data: response.data,
67
- paging: response.paging,
68
- };
69
- }));
70
- },
71
- };
72
- }
73
- reload() {
74
- this.listComponent.reload();
75
- }
76
- }
77
- FsTrustedDevicesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsTrustedDevicesComponent, deps: [{ token: i1.FsCountry }], target: i0.ɵɵFactoryTarget.Component });
78
- FsTrustedDevicesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsTrustedDevicesComponent, selector: "fs-trusted-devices", inputs: { fetchTrustedDevices: "fetchTrustedDevices", deleteTrustedDevice: "deleteTrustedDevice", signOutTrustedDevice: "signOutTrustedDevice", showAccount: "showAccount" }, viewQueries: [{ propertyName: "listComponent", first: true, predicate: FsListComponent, descendants: true }], ngImport: i0, template: "<fs-list [config]=\"listConfig\">\n <fs-list-column title=\"Account\" [show]=\"showAccount\">\n <ng-template fs-list-cell let-row=\"row\" class=\"col-account\">\n <div *ngIf=\"row.account\" class=\"row\">\n <fs-badge \n *ngIf=\"row.account.avatarUrl\"\n shape=\"circle\" \n image=\"{{ row.account.avatarUrl }}\">\n </fs-badge>\n <div>\n {{ row.account.name }}\n <div class=\"small\" *ngIf=\"row.account.email\">{{ row.account.email }}</div> \n </div>\n </div>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Device\">\n <ng-template fs-list-cell let-row=\"row\" class=\"col-device\">\n <div class=\"device\" *ngIf=\"row.device\">\n <fs-trusted-current-device *ngIf=\"row.currentDevice\"></fs-trusted-current-device>\n <fs-device-os\n [type]=\"row.device.type\"\n [os]=\"row.device.osType\"\n [version]=\"row.device.osVersion\">\n </fs-device-os>\n </div> \n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Browser\">\n <ng-template fs-list-cell let-row=\"row\">\n <fs-device-browser\n *ngIf=\"row.device\"\n [type]=\"row.device.browserType\"\n [version]=\"row.device.browserVersion\"\n [showName]=\"true\"\n ></fs-device-browser>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Added\">\n <ng-template fs-list-cell let-row=\"row\">\n {{ row.createDate | fsDateAgo }}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Location\">\n <ng-template fs-list-cell let-row=\"row\">\n <!-- Use FsIp and pass in region, country, lat and lng -->\n <fs-country [code]=\"row.ip.country\"></fs-country>\n <div><small>{{row.ip.ip}}</small></div>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Last signed in\">\n <ng-template fs-list-cell let-row=\"row\">\n {{ row.activityDate | fsDateAgo }}\n </ng-template>\n </fs-list-column>\n</fs-list>\n", styles: [":host ::ng-deep .col-account .row{display:flex;align-items:center}:host ::ng-deep .col-account .row fs-badge{margin-right:5px}:host ::ng-deep .col-device .device{position:relative;display:inline-block}:host ::ng-deep .col-device .device .current-device{right:8px;top:-8px;position:absolute}\n"], components: [{ type: i2.FsListComponent, selector: "fs-list", inputs: ["loaderLines", "config"], outputs: ["filtersReady"] }, { type: i3.FsBadgeComponent, selector: "fs-badge", inputs: ["text", "shape", "color", "tooltip", "size", "image", "icon", "iconSize", "iconColor", "backgroundSize"] }, { type: i4.FsTrustedCurrentDeviceComponent, selector: "fs-trusted-current-device" }, { type: i5.FsDeviceOsComponent, selector: "fs-device-os", inputs: ["type", "os", "showName", "version"] }, { type: i5.FsDeviceBrowserComponent, selector: "fs-device-browser", inputs: ["type", "version", "showName"] }, { type: i1.FsCountryComponent, selector: "fs-country", inputs: ["showIcon", "showName", "width", "code"] }], directives: [{ type: i2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "customize", "title", "name", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "fsDateAgo": i7.FsDateAgoPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
79
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsTrustedDevicesComponent, decorators: [{
80
- type: Component,
81
- args: [{
82
- selector: 'fs-trusted-devices',
83
- templateUrl: './trusted-devices.component.html',
84
- styleUrls: ['./trusted-devices.component.scss'],
85
- changeDetection: ChangeDetectionStrategy.OnPush,
86
- }]
87
- }], ctorParameters: function () { return [{ type: i1.FsCountry }]; }, propDecorators: { fetchTrustedDevices: [{
88
- type: Input
89
- }], deleteTrustedDevice: [{
90
- type: Input
91
- }], signOutTrustedDevice: [{
92
- type: Input
93
- }], showAccount: [{
94
- type: Input
95
- }], listComponent: [{
96
- type: ViewChild,
97
- args: [FsListComponent]
98
- }] } });
99
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJ1c3R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biAgICB0aGlzLl9kZXN0cm95JC5uZXh0KCk7XG4gICAgdGhpcy5fZGVzdHJveSQuY29tcGxldGUoKTtcbiAgfVxuXG4gIHByaXZhdGUgX2luaXRMaXN0Q29uZmlnKCk6IHZvaWQge1xuICAgIHRoaXMubGlzdENvbmZpZyA9IHtcbiAgICAgIHJvd0FjdGlvbnM6IFtcbiAgICAgICAge1xuICAgICAgICAgIGNsaWNrOiAoZGF0YSkgPT4ge1xuICAgICAgICAgICAgdGhpcy5zaWduT3V0VHJ1c3RlZERldmljZShkYXRhKVxuICAgICAgICAgICAgLnN1YnNjcmliZSgoKSA9PiB7XG4gICAgICAgICAgICAgIHRoaXMucmVsb2FkKCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9LFxuICAgICAgICAgIG1lbnU6IHRydWUsXG4gICAgICAgICAgbGFiZWw6ICdTaWduIE91dCcsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjbGljazogKGRhdGEpID0+IHtcbiAgICAgICAgICAgIHRoaXMuZGVsZXRlVHJ1c3RlZERldmljZShkYXRhKVxuICAgICAgICAgICAgLnN1YnNjcmliZSgoKSA9PiB7XG4gICAgICAgICAgICAgIHRoaXMucmVsb2FkKCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9LFxuICAgICAgICAgIHJlbW92ZToge1xuICAgICAgICAgICAgdGl0bGU6ICdDb25maXJtJyxcbiAgICAgICAgICAgIHRlbXBsYXRlOiAnQXJlIHlvdSBzdXJlIHlvdSB3b3VsZCBsaWtlIHRvIGRlbGV0ZSB0aGlzIHRydXN0ZWQgZGV2aWNlPycsXG4gICAgICAgICAgfSxcbiAgICAgICAgICBtZW51OiB0cnVlLFxuICAgICAgICAgIGxhYmVsOiAnRGVsZXRlJyxcbiAgICAgICAgfSxcbiAgICAgIF0sXG4gICAgICBmZXRjaDogKHF1ZXJ5KSA9PiB7XG4gICAgICAgIHJldHVybiB0aGlzLmZldGNoVHJ1c3RlZERldmljZXMocXVlcnkpXG4gICAgICAgICAgLnBpcGUoXG4gICAgICAgICAgICBtYXAoKHJlc3BvbnNlKSA9PiB7XG4gICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgZGF0YTogcmVzcG9uc2UuZGF0YSxcbiAgICAgICAgICAgICAgICBwYWdpbmc6IHJlc3BvbnNlLnBhZ2luZyxcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICk7XG4gICAgICB9LFxuICAgIH07XG4gIH1cblxuICBwdWJsaWMgcmVsb2FkKCk6IHZvaWQge1xuICAgIHRoaXMubGlzdENvbXBvbmVudC5yZWxvYWQoKTtcbiAgfVxuXG59XG4iLCI8ZnMtbGlzdCBbY29uZmlnXT1cImxpc3RDb25maWdcIj5cbiAgPGZzLWxpc3QtY29sdW1uIHRpdGxlPVwiQWNjb3VudFwiIFtzaG93XT1cInNob3dBY2NvdW50XCI+XG4gICAgPG5nLXRlbXBsYXRlIGZzLWxpc3QtY2VsbCBsZXQtcm93PVwicm93XCIgY2xhc3M9XCJjb2wtYWNjb3VudFwiPlxuICAgICAgPGRpdiAqbmdJZj1cInJvdy5hY2NvdW50XCIgY2xhc3M9XCJyb3dcIj5cbiAgICAgICAgPGZzLWJhZGdlIFxuICAgICAgICAgICpuZ0lmPVwicm93LmFjY291bnQuYXZhdGFyVXJsXCJcbiAgICAgICAgICBzaGFwZT1cImNpcmNsZVwiIFxuICAgICAgICAgIGltYWdlPVwie3sgcm93LmFjY291bnQuYXZhdGFyVXJsIH19XCI+XG4gICAgICAgIDwvZnMtYmFkZ2U+XG4gICAgICAgIDxkaXY+XG4gICAgICAgICAge3sgcm93LmFjY291bnQubmFtZSB9fVxuICAgICAgICAgIDxkaXYgY2xhc3M9XCJzbWFsbFwiICpuZ0lmPVwicm93LmFjY291bnQuZW1haWxcIj57eyByb3cuYWNjb3VudC5lbWFpbCB9fTwvZGl2PiAgXG4gICAgICAgIDwvZGl2PlxuICA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LCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9hcHAvaW50ZXJmYWNlcy90cnVzdGVkLWRldmljZS1hY2NvdW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgaW50ZXJmYWNlIElUcnVzdGVkRGV2aWNlQWNjb3VudCB7XG4gIHJlYWRvbmx5IGlkOiBudW1iZXI7XG4gIG5hbWU6IHN0cmluZztcbiAgZW1haWw6IHN0cmluZztcbiAgYXZhdGFyVXJsOiBzdHJpbmc7XG59XG4iXX0=
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJ1c3RlZC1kZXZpY2UtZGV2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2FwcC9pbnRlcmZhY2VzL3RydXN0ZWQtZGV2aWNlLWRldmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgRGV2aWNlVHlwZSwgRGV2aWNlT3MsIERldmljZUJyb3dzZXIgfSBmcm9tICdAZmlyZXN0aXRjaC9kZXZpY2UnO1xuXG5cbmV4cG9ydCBpbnRlcmZhY2UgSVRydXN0ZWREZXZpY2VEZXZpY2Uge1xuICByZWFkb25seSBpZDogbnVtYmVyO1xuICB0eXBlOiBEZXZpY2VUeXBlO1xuICBvc1R5cGU6IERldmljZU9zO1xuICBvc1ZlcnNpb246IHN0cmluZztcbiAgYnJvd3NlclR5cGU6IERldmljZUJyb3dzZXI7XG4gIGJyb3dzZXJWZXJzaW9uOiBzdHJpbmc7XG4gIHVzZXJBZ2VudDogc3RyaW5nO1xufVxuIl19
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIj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