@firestitch/2fa 12.0.0
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.
- package/app/components/current-device/current-device.component.d.ts +5 -0
- package/app/components/trusted-devices/trusted-devices.component.d.ts +26 -0
- package/app/fs-2fa.module.d.ts +19 -0
- package/app/interfaces/trusted-device-account.d.ts +6 -0
- package/app/interfaces/trusted-device-device.d.ts +10 -0
- package/app/interfaces/trusted-device-ip.d.ts +5 -0
- package/app/interfaces/trusted-device.d.ts +14 -0
- package/bundles/firestitch-2fa.umd.js +217 -0
- package/bundles/firestitch-2fa.umd.js.map +1 -0
- package/esm2015/app/components/current-device/current-device.component.js +18 -0
- package/esm2015/app/components/trusted-devices/trusted-devices.component.js +107 -0
- package/esm2015/app/fs-2fa.module.js +68 -0
- package/esm2015/app/interfaces/trusted-device-account.js +2 -0
- package/esm2015/app/interfaces/trusted-device-device.js +2 -0
- package/esm2015/app/interfaces/trusted-device-ip.js +2 -0
- package/esm2015/app/interfaces/trusted-device.js +2 -0
- package/esm2015/firestitch-2fa.js +5 -0
- package/esm2015/public_api.js +4 -0
- package/fesm2015/firestitch-2fa.js +191 -0
- package/fesm2015/firestitch-2fa.js.map +1 -0
- package/firestitch-2fa.d.ts +5 -0
- package/package.json +27 -0
- package/public_api.d.ts +7 -0
- package/styles.scss +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class FsCurrentDeviceComponent {
|
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FsCurrentDeviceComponent, never>;
|
|
4
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FsCurrentDeviceComponent, "fs-current-device", never, {}, {}, never, never>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
removeTrustedDevice: (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"; "removeTrustedDevice": "removeTrustedDevice"; "signOutTrustedDevice": "signOutTrustedDevice"; "showAccount": "showAccount"; }, {}, never, never>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "./components/trusted-devices/trusted-devices.component";
|
|
4
|
+
import * as i2 from "./components/current-device/current-device.component";
|
|
5
|
+
import * as i3 from "@angular/common";
|
|
6
|
+
import * as i4 from "@angular/flex-layout";
|
|
7
|
+
import * as i5 from "@angular/material/icon";
|
|
8
|
+
import * as i6 from "@angular/material/tooltip";
|
|
9
|
+
import * as i7 from "@firestitch/list";
|
|
10
|
+
import * as i8 from "@firestitch/date";
|
|
11
|
+
import * as i9 from "@firestitch/country";
|
|
12
|
+
import * as i10 from "@firestitch/device";
|
|
13
|
+
import * as i11 from "@firestitch/badge";
|
|
14
|
+
export declare class Fs2FaModule {
|
|
15
|
+
static forRoot(): ModuleWithProviders<Fs2FaModule>;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Fs2FaModule, never>;
|
|
17
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<Fs2FaModule, [typeof i1.FsTrustedDevicesComponent, typeof i2.FsCurrentDeviceComponent], [typeof i3.CommonModule, typeof i4.FlexLayoutModule, typeof i5.MatIconModule, typeof i6.MatTooltipModule, typeof i7.FsListModule, typeof i8.FsDateModule, typeof i9.FsCountryModule, typeof i10.FsDeviceModule, typeof i11.FsBadgeModule], [typeof i1.FsTrustedDevicesComponent, typeof i2.FsCurrentDeviceComponent]>;
|
|
18
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<Fs2FaModule>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/flex-layout'), require('@angular/material/icon'), require('@firestitch/list'), require('@firestitch/date'), require('@firestitch/country'), require('@firestitch/device'), require('@angular/material/tooltip'), require('@firestitch/filter'), require('rxjs'), require('rxjs/operators'), require('@firestitch/badge')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@firestitch/2fa', ['exports', '@angular/core', '@angular/common', '@angular/flex-layout', '@angular/material/icon', '@firestitch/list', '@firestitch/date', '@firestitch/country', '@firestitch/device', '@angular/material/tooltip', '@firestitch/filter', 'rxjs', 'rxjs/operators', '@firestitch/badge'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch["2fa"] = {}), global.ng.core, global.ng.common, global.ng.flexLayout, global.ng.material.icon, global.i2$1, global.i7, global.i1$1, global.i5, global.ng.material.tooltip, global.filter, global.rxjs, global.rxjs.operators, global.i3));
|
|
5
|
+
})(this, (function (exports, i0, i6, flexLayout, i1, i2$1, i7, i1$1, i5, i2, filter, rxjs, operators, i3) { 'use strict';
|
|
6
|
+
|
|
7
|
+
function _interopNamespace(e) {
|
|
8
|
+
if (e && e.__esModule) return e;
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return e[k]; }
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
n["default"] = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
+
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
27
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
28
|
+
var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
|
|
29
|
+
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
|
|
30
|
+
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
31
|
+
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
32
|
+
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
33
|
+
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
34
|
+
|
|
35
|
+
var FsCurrentDeviceComponent = /** @class */ (function () {
|
|
36
|
+
function FsCurrentDeviceComponent() {
|
|
37
|
+
}
|
|
38
|
+
return FsCurrentDeviceComponent;
|
|
39
|
+
}());
|
|
40
|
+
FsCurrentDeviceComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsCurrentDeviceComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
41
|
+
FsCurrentDeviceComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsCurrentDeviceComponent, selector: "fs-current-device", ngImport: i0__namespace, 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__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i2__namespace.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
42
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsCurrentDeviceComponent, decorators: [{
|
|
43
|
+
type: i0.Component,
|
|
44
|
+
args: [{
|
|
45
|
+
selector: 'fs-current-device',
|
|
46
|
+
templateUrl: './current-device.component.html',
|
|
47
|
+
styleUrls: ['./current-device.component.scss'],
|
|
48
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
49
|
+
}]
|
|
50
|
+
}] });
|
|
51
|
+
|
|
52
|
+
var FsTrustedDevicesComponent = /** @class */ (function () {
|
|
53
|
+
function FsTrustedDevicesComponent(_fsCountry) {
|
|
54
|
+
this._fsCountry = _fsCountry;
|
|
55
|
+
this.fetchTrustedDevices = function (query) { return new rxjs.Observable(); };
|
|
56
|
+
this.removeTrustedDevice = function (trustedDevice) { return new rxjs.Observable(); };
|
|
57
|
+
this.signOutTrustedDevice = function (trustedDevice) { return new rxjs.Observable(); };
|
|
58
|
+
this.showAccount = true;
|
|
59
|
+
this._destroy$ = new rxjs.Subject();
|
|
60
|
+
}
|
|
61
|
+
FsTrustedDevicesComponent.prototype.ngOnInit = function () {
|
|
62
|
+
var _this = this;
|
|
63
|
+
this._fsCountry.ready$
|
|
64
|
+
.pipe(operators.takeUntil(this._destroy$))
|
|
65
|
+
.subscribe(function () {
|
|
66
|
+
_this._initListConfig();
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
FsTrustedDevicesComponent.prototype.ngOnDestroy = function () {
|
|
70
|
+
this._destroy$.next();
|
|
71
|
+
this._destroy$.complete();
|
|
72
|
+
};
|
|
73
|
+
FsTrustedDevicesComponent.prototype._initListConfig = function () {
|
|
74
|
+
var _this = this;
|
|
75
|
+
this.listConfig = {
|
|
76
|
+
filters: [
|
|
77
|
+
{
|
|
78
|
+
name: 'keyword',
|
|
79
|
+
type: filter.ItemType.Keyword,
|
|
80
|
+
label: 'Search',
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
rowActions: [
|
|
84
|
+
{
|
|
85
|
+
click: function (data) {
|
|
86
|
+
_this.signOutTrustedDevice(data)
|
|
87
|
+
.subscribe(function () {
|
|
88
|
+
_this.reload();
|
|
89
|
+
});
|
|
90
|
+
},
|
|
91
|
+
menu: true,
|
|
92
|
+
label: 'Sign Out',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
click: function (data) {
|
|
96
|
+
_this.removeTrustedDevice(data)
|
|
97
|
+
.subscribe(function () {
|
|
98
|
+
_this.reload();
|
|
99
|
+
});
|
|
100
|
+
},
|
|
101
|
+
remove: {
|
|
102
|
+
title: 'Confirm',
|
|
103
|
+
template: 'Are you sure you would like to delete this record?',
|
|
104
|
+
},
|
|
105
|
+
menu: true,
|
|
106
|
+
label: 'Delete',
|
|
107
|
+
},
|
|
108
|
+
],
|
|
109
|
+
fetch: function (query) {
|
|
110
|
+
return _this.fetchTrustedDevices(query)
|
|
111
|
+
.pipe(operators.map(function (response) {
|
|
112
|
+
return {
|
|
113
|
+
data: response.data,
|
|
114
|
+
paging: response.paging,
|
|
115
|
+
};
|
|
116
|
+
}));
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
FsTrustedDevicesComponent.prototype.reload = function () {
|
|
121
|
+
this.listComponent.reload();
|
|
122
|
+
};
|
|
123
|
+
return FsTrustedDevicesComponent;
|
|
124
|
+
}());
|
|
125
|
+
FsTrustedDevicesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsTrustedDevicesComponent, deps: [{ token: i1__namespace$1.FsCountry }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
126
|
+
FsTrustedDevicesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsTrustedDevicesComponent, selector: "fs-trusted-devices", inputs: { fetchTrustedDevices: "fetchTrustedDevices", removeTrustedDevice: "removeTrustedDevice", signOutTrustedDevice: "signOutTrustedDevice", showAccount: "showAccount" }, viewQueries: [{ propertyName: "listComponent", first: true, predicate: i2$1.FsListComponent, descendants: true }], ngImport: i0__namespace, 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-current-device *ngIf=\"row.currentDevice\"></fs-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 <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__namespace$1.FsListComponent, selector: "fs-list", inputs: ["loaderLines", "config"], outputs: ["filtersReady"] }, { type: i3__namespace.FsBadgeComponent, selector: "fs-badge", inputs: ["text", "shape", "color", "tooltip", "size", "image", "icon", "iconSize", "iconColor", "backgroundSize"] }, { type: FsCurrentDeviceComponent, selector: "fs-current-device" }, { type: i5__namespace.FsDeviceOsComponent, selector: "fs-device-os", inputs: ["type", "os", "showName", "version"] }, { type: i5__namespace.FsDeviceBrowserComponent, selector: "fs-device-browser", inputs: ["type", "version", "showName"] }, { type: i1__namespace$1.FsCountryComponent, selector: "fs-country", inputs: ["showIcon", "showName", "width", "code"] }], directives: [{ type: i2__namespace$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "customize", "title", "name", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "fsDateAgo": i7__namespace.FsDateAgoPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
127
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsTrustedDevicesComponent, decorators: [{
|
|
128
|
+
type: i0.Component,
|
|
129
|
+
args: [{
|
|
130
|
+
selector: 'fs-trusted-devices',
|
|
131
|
+
templateUrl: './trusted-devices.component.html',
|
|
132
|
+
styleUrls: ['./trusted-devices.component.scss'],
|
|
133
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
134
|
+
}]
|
|
135
|
+
}], ctorParameters: function () { return [{ type: i1__namespace$1.FsCountry }]; }, propDecorators: { fetchTrustedDevices: [{
|
|
136
|
+
type: i0.Input
|
|
137
|
+
}], removeTrustedDevice: [{
|
|
138
|
+
type: i0.Input
|
|
139
|
+
}], signOutTrustedDevice: [{
|
|
140
|
+
type: i0.Input
|
|
141
|
+
}], showAccount: [{
|
|
142
|
+
type: i0.Input
|
|
143
|
+
}], listComponent: [{
|
|
144
|
+
type: i0.ViewChild,
|
|
145
|
+
args: [i2$1.FsListComponent]
|
|
146
|
+
}] } });
|
|
147
|
+
|
|
148
|
+
var Fs2FaModule = /** @class */ (function () {
|
|
149
|
+
function Fs2FaModule() {
|
|
150
|
+
}
|
|
151
|
+
Fs2FaModule.forRoot = function () {
|
|
152
|
+
return {
|
|
153
|
+
ngModule: Fs2FaModule,
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
return Fs2FaModule;
|
|
157
|
+
}());
|
|
158
|
+
Fs2FaModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FaModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
159
|
+
Fs2FaModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FaModule, declarations: [FsTrustedDevicesComponent,
|
|
160
|
+
FsCurrentDeviceComponent], imports: [i6.CommonModule,
|
|
161
|
+
flexLayout.FlexLayoutModule,
|
|
162
|
+
i1.MatIconModule,
|
|
163
|
+
i2.MatTooltipModule,
|
|
164
|
+
i2$1.FsListModule,
|
|
165
|
+
i7.FsDateModule,
|
|
166
|
+
i1$1.FsCountryModule,
|
|
167
|
+
i5.FsDeviceModule,
|
|
168
|
+
i3.FsBadgeModule], exports: [FsTrustedDevicesComponent,
|
|
169
|
+
FsCurrentDeviceComponent] });
|
|
170
|
+
Fs2FaModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FaModule, imports: [[
|
|
171
|
+
i6.CommonModule,
|
|
172
|
+
flexLayout.FlexLayoutModule,
|
|
173
|
+
i1.MatIconModule,
|
|
174
|
+
i2.MatTooltipModule,
|
|
175
|
+
i2$1.FsListModule,
|
|
176
|
+
i7.FsDateModule,
|
|
177
|
+
i1$1.FsCountryModule,
|
|
178
|
+
i5.FsDeviceModule,
|
|
179
|
+
i3.FsBadgeModule,
|
|
180
|
+
]] });
|
|
181
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2FaModule, decorators: [{
|
|
182
|
+
type: i0.NgModule,
|
|
183
|
+
args: [{
|
|
184
|
+
imports: [
|
|
185
|
+
i6.CommonModule,
|
|
186
|
+
flexLayout.FlexLayoutModule,
|
|
187
|
+
i1.MatIconModule,
|
|
188
|
+
i2.MatTooltipModule,
|
|
189
|
+
i2$1.FsListModule,
|
|
190
|
+
i7.FsDateModule,
|
|
191
|
+
i1$1.FsCountryModule,
|
|
192
|
+
i5.FsDeviceModule,
|
|
193
|
+
i3.FsBadgeModule,
|
|
194
|
+
],
|
|
195
|
+
exports: [
|
|
196
|
+
FsTrustedDevicesComponent,
|
|
197
|
+
FsCurrentDeviceComponent,
|
|
198
|
+
],
|
|
199
|
+
declarations: [
|
|
200
|
+
FsTrustedDevicesComponent,
|
|
201
|
+
FsCurrentDeviceComponent,
|
|
202
|
+
],
|
|
203
|
+
}]
|
|
204
|
+
}] });
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Generated bundle index. Do not edit.
|
|
208
|
+
*/
|
|
209
|
+
|
|
210
|
+
exports.Fs2FaModule = Fs2FaModule;
|
|
211
|
+
exports.FsCurrentDeviceComponent = FsCurrentDeviceComponent;
|
|
212
|
+
exports.FsTrustedDevicesComponent = FsTrustedDevicesComponent;
|
|
213
|
+
|
|
214
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
215
|
+
|
|
216
|
+
}));
|
|
217
|
+
//# sourceMappingURL=firestitch-2fa.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"firestitch-2fa.umd.js","sources":["../../src/app/components/current-device/current-device.component.ts","../../src/app/components/current-device/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-current-device',\n templateUrl: './current-device.component.html',\n styleUrls: [ './current-device.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FsCurrentDeviceComponent {\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';\nimport { ITrustedDeviceAccount } from '../../interfaces/trusted-device-account';\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 removeTrustedDevice = (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 filters: [\n {\n name: 'keyword',\n type: ItemType.Keyword,\n label: 'Search',\n },\n ],\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.removeTrustedDevice(data)\n .subscribe(() => {\n this.reload();\n });\n },\n remove: {\n title: 'Confirm',\n template: 'Are you sure you would like to delete this record?',\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-current-device *ngIf=\"row.currentDevice\"></fs-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 <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 { FsCurrentDeviceComponent } from './components/current-device/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 FsCurrentDeviceComponent,\n ],\n declarations: [\n FsTrustedDevicesComponent,\n FsCurrentDeviceComponent,\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":["Component","ChangeDetectionStrategy","Observable","Subject","takeUntil","ItemType","map","FsListComponent","Input","ViewChild","CommonModule","FlexLayoutModule","MatIconModule","MatTooltipModule","FsListModule","FsDateModule","FsCountryModule","FsDeviceModule","FsBadgeModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAYA;;;;oJAAa,wBAAwB;6HAAxB,wBAAwB,oECZrC,qMASA;0HDGa,wBAAwB;0BANpCA,YAAS;2BAAC;4BACT,QAAQ,EAAE,mBAAmB;4BAC7B,WAAW,EAAE,iCAAiC;4BAC9C,SAAS,EAAE,CAAE,iCAAiC,CAAE;4BAChD,eAAe,EAAEC,0BAAuB,CAAC,MAAM;yBAChD;;;;YEyCC,mCACU,UAAqB;gBAArB,eAAU,GAAV,UAAU,CAAW;gBAtBxB,wBAAmB,GAAG,UAAC,KAAU,IAAK,OAAA,IAAIC,eAAU,EAGvD,GAAA,CAAC;gBAGE,wBAAmB,GAAG,UAAC,aAA6B,IAAK,OAAA,IAAIA,eAAU,EAAO,GAAA,CAAC;gBAG/E,yBAAoB,GAAG,UAAC,aAA8B,IAAK,OAAA,IAAIA,eAAU,EAAO,GAAA,CAAC;gBAGjF,gBAAW,GAAG,IAAI,CAAC;gBAOlB,cAAS,GAAG,IAAIC,YAAO,EAAE,CAAC;aAI7B;YAEE,4CAAQ,GAAR;gBAAA,iBAQN;gBAPC,IAAI,CAAC,UAAU,CAAC,MAAM;qBACnB,IAAI,CACHC,mBAAS,CAAC,I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4BACD,YAAY,EAAE;gCACZ,yBAAyB;gCACzB,wBAAwB;6BACzB;yBACF;;;QCxCD;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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 FsCurrentDeviceComponent {
|
|
6
|
+
}
|
|
7
|
+
FsCurrentDeviceComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsCurrentDeviceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8
|
+
FsCurrentDeviceComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsCurrentDeviceComponent, selector: "fs-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: FsCurrentDeviceComponent, decorators: [{
|
|
10
|
+
type: Component,
|
|
11
|
+
args: [{
|
|
12
|
+
selector: 'fs-current-device',
|
|
13
|
+
templateUrl: './current-device.component.html',
|
|
14
|
+
styleUrls: ['./current-device.component.scss'],
|
|
15
|
+
changeDetection: ChangeDetectionStr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VycmVudC1kZXZpY2UuY29tcG9uZW50LnNjc3MnIF0sXG4gIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoLFxufSlcbmV4cG9ydCBjbGFzcyBGc0N1cnJlbnREZXZpY2VDb21wb25lbnQge1xufVxuIiwiXG48ZGl2IGNsYXNzPVwiY3VycmVudC1kZXZpY2VcIj5cbiAgPG1hdC1pY29uIGNsYXNzPVwiY2lyY2xlXCI+Y2lyY2xlPC9tYXQtaWNvbj5cbiAgPG1hdC1pY29uIFxuICAgICAgY2xhc3M9XCJjaGVja1wiXG4gICAgICBtYXRUb29sdGlwPVwiVGhpcyBkZXZpY2VcIj5cbiAgICBjaGVja19jaXJjbGVcbiAgPC9tYXQtaWNvbj5cbjwvZGl2PlxuIl19
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { Component, ViewChild, Input, ChangeDetectionStrategy, } from '@angular/core';
|
|
2
|
+
import { FsListComponent } from '@firestitch/list';
|
|
3
|
+
import { ItemType } from '@firestitch/filter';
|
|
4
|
+
import { FsCountry } from '@firestitch/country';
|
|
5
|
+
import { Observable, Subject } from 'rxjs';
|
|
6
|
+
import { map, takeUntil } from 'rxjs/operators';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
import * as i1 from "@firestitch/country";
|
|
9
|
+
import * as i2 from "@firestitch/list";
|
|
10
|
+
import * as i3 from "@firestitch/badge";
|
|
11
|
+
import * as i4 from "../current-device/current-device.component";
|
|
12
|
+
import * as i5 from "@firestitch/device";
|
|
13
|
+
import * as i6 from "@angular/common";
|
|
14
|
+
import * as i7 from "@firestitch/date";
|
|
15
|
+
export class FsTrustedDevicesComponent {
|
|
16
|
+
constructor(_fsCountry) {
|
|
17
|
+
this._fsCountry = _fsCountry;
|
|
18
|
+
this.fetchTrustedDevices = (query) => new Observable();
|
|
19
|
+
this.removeTrustedDevice = (trustedDevice) => new Observable();
|
|
20
|
+
this.signOutTrustedDevice = (trustedDevice) => new Observable();
|
|
21
|
+
this.showAccount = true;
|
|
22
|
+
this._destroy$ = new Subject();
|
|
23
|
+
}
|
|
24
|
+
ngOnInit() {
|
|
25
|
+
this._fsCountry.ready$
|
|
26
|
+
.pipe(takeUntil(this._destroy$))
|
|
27
|
+
.subscribe(() => {
|
|
28
|
+
this._initListConfig();
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
ngOnDestroy() {
|
|
32
|
+
this._destroy$.next();
|
|
33
|
+
this._destroy$.complete();
|
|
34
|
+
}
|
|
35
|
+
_initListConfig() {
|
|
36
|
+
this.listConfig = {
|
|
37
|
+
filters: [
|
|
38
|
+
{
|
|
39
|
+
name: 'keyword',
|
|
40
|
+
type: ItemType.Keyword,
|
|
41
|
+
label: 'Search',
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
rowActions: [
|
|
45
|
+
{
|
|
46
|
+
click: (data) => {
|
|
47
|
+
this.signOutTrustedDevice(data)
|
|
48
|
+
.subscribe(() => {
|
|
49
|
+
this.reload();
|
|
50
|
+
});
|
|
51
|
+
},
|
|
52
|
+
menu: true,
|
|
53
|
+
label: 'Sign Out',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
click: (data) => {
|
|
57
|
+
this.removeTrustedDevice(data)
|
|
58
|
+
.subscribe(() => {
|
|
59
|
+
this.reload();
|
|
60
|
+
});
|
|
61
|
+
},
|
|
62
|
+
remove: {
|
|
63
|
+
title: 'Confirm',
|
|
64
|
+
template: 'Are you sure you would like to delete this record?',
|
|
65
|
+
},
|
|
66
|
+
menu: true,
|
|
67
|
+
label: 'Delete',
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
fetch: (query) => {
|
|
71
|
+
return this.fetchTrustedDevices(query)
|
|
72
|
+
.pipe(map((response) => {
|
|
73
|
+
return {
|
|
74
|
+
data: response.data,
|
|
75
|
+
paging: response.paging,
|
|
76
|
+
};
|
|
77
|
+
}));
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
reload() {
|
|
82
|
+
this.listComponent.reload();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
FsTrustedDevicesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsTrustedDevicesComponent, deps: [{ token: i1.FsCountry }], target: i0.ɵɵFactoryTarget.Component });
|
|
86
|
+
FsTrustedDevicesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsTrustedDevicesComponent, selector: "fs-trusted-devices", inputs: { fetchTrustedDevices: "fetchTrustedDevices", removeTrustedDevice: "removeTrustedDevice", 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-current-device *ngIf=\"row.currentDevice\"></fs-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 <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.FsCurrentDeviceComponent, selector: "fs-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 });
|
|
87
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsTrustedDevicesComponent, decorators: [{
|
|
88
|
+
type: Component,
|
|
89
|
+
args: [{
|
|
90
|
+
selector: 'fs-trusted-devices',
|
|
91
|
+
templateUrl: './trusted-devices.component.html',
|
|
92
|
+
styleUrls: ['./trusted-devices.component.scss'],
|
|
93
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
94
|
+
}]
|
|
95
|
+
}], ctorParameters: function () { return [{ type: i1.FsCountry }]; }, propDecorators: { fetchTrustedDevices: [{
|
|
96
|
+
type: Input
|
|
97
|
+
}], removeTrustedDevice: [{
|
|
98
|
+
type: Input
|
|
99
|
+
}], signOutTrustedDevice: [{
|
|
100
|
+
type: Input
|
|
101
|
+
}], showAccount: [{
|
|
102
|
+
type: Input
|
|
103
|
+
}], listComponent: [{
|
|
104
|
+
type: ViewChild,
|
|
105
|
+
args: [FsListComponent]
|
|
106
|
+
}] } });
|
|
107
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJ1c3RlZC1kZXZpY2VzLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9hcHAvY29tcG9uZW50cy90cnVzdGVkLWRldmljZXMvdHJ1c3RlZC1kZXZpY2VzLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3NyYy9hcHAvY29tcG9uZW50cy90cnVzdGVkLWRldmljZXMvdHJ1c3RlZC1kZXZpY2VzLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxTQUFTLEVBQ1QsU0FBUyxFQUNULEtBQUssRUFHTCx1QkFBdUIsR0FHeEIsTUFBTSxlQUFlLENBQUM7QUFFdkIsT0FBTyxFQUFFLGVBQWUsRUFBZ0IsTUFBTSxrQkFBa0IsQ0FBQztBQUNqRSxPQUFPLEVB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ZXJzOiBbXG4gICAgICAgIHtcbiAgICAgICAgICBuYW1lOiAna2V5d29yZCcsXG4gICAgICAgICAgdHlwZTogSXRlbVR5cGUuS2V5d29yZCxcbiAgICAgICAgICBsYWJlbDogJ1NlYXJjaCcsXG4gICAgICAgIH0sXG4gICAgICBdLFxuICAgICAgcm93QWN0aW9uczogW1xuICAgICAgICB7XG4gICAgICAgICAgY2xpY2s6IChkYXRhKSA9PiB7XG4gICAgICAgICAgICB0aGlzLnNpZ25PdXRUcnVzdGVkRGV2aWNlKGRhdGEpXG4gICAgICAgICAgICAuc3Vic2NyaWJlKCgpID0+IHtcbiAgICAgICAgICAgICAgdGhpcy5yZWxvYWQoKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0sXG4gICAgICAgICAgbWVudTogdHJ1ZSxcbiAgICAgICAgICBsYWJlbDogJ1NpZ24gT3V0JyxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNsaWNrOiAoZGF0YSkgPT4ge1xuICAgICAgICAgICAgdGhpcy5yZW1vdmVUcnVzdGVkRGV2aWNlKGRhdGEpXG4gICAgICAgICAgICAuc3Vic2NyaWJlKCgpID0+IHtcbiAgICAgICAgICAgICAgdGhpcy5yZWxvYWQoKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0sXG4gICAgICAgICAgcmVtb3ZlOiB7XG4gICAgICAgICAgICB0aXRsZTogJ0NvbmZpcm0nLFxuICAgICAgICAgICAgdGVtcGxhdGU6ICdBcmUgeW91IHN1cmUgeW91IHdvdWxkIGxpa2UgdG8gZGVsZXRlIHRoaXMgcmVjb3JkPycsXG4gICAgICAgICAgfSxcbiAgICAgICAgICBtZW51OiB0cnVlLFxuICAgICAgICAgIGxhYmVsOiAnRGVsZXRlJyxcbiAgICAgICAgfSxcbiAgICAgIF0sXG4gICAgICBmZXRjaDogKHF1ZXJ5KSA9PiB7XG4gICAgICAgIHJldHVybiB0aGlzLmZldGNoVHJ1c3RlZERldmljZXMocXVlcnkpXG4gICAgICAgICAgLnBpcGUoXG4gICAgICAgICAgICBtYXAoKHJlc3BvbnNlKSA9PiB7XG4gICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgZGF0YTogcmVzcG9uc2UuZGF0YSxcbiAgICAgICAgICAgICAgICBwYWdpbmc6IHJlc3BvbnNlLnBhZ2luZyxcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICk7XG4gICAgICB9LFxuICAgIH07XG4gIH1cblxuICBwdWJsaWMgcmVsb2FkKCk6IHZvaWQge1xuICAgIHRoaXMubGlzdENvbXBvbmVudC5yZWxvYWQoKTtcbiAgfVxuXG59XG4iLCI8ZnMtbGlzdCBbY29uZmlnXT1cImxpc3RDb25maWdcIj5cbiAgPGZzLWxpc3QtY29sdW1uIHRpdGxlPVwiQWNjb3VudFwiIFtzaG93XT1cInNob3dBY2NvdW50XCI+XG4gICAgPG5nLXRlbXBsYXRlIGZzLWxpc3QtY2VsbCBsZXQtcm93PVwicm93XCIgY2xhc3M9XCJjb2wtYWNjb3VudFwiPlxuICAgICAgPGRpdiAqbmdJZj1cInJvdy5hY2NvdW50XCIgY2xhc3M9XCJyb3dcIj5cbiAgICAgICAgPGZzLWJhZGdlIFxuICAgICAgICAgICpuZ0lmPVwicm93LmFjY291bnQuYXZhdGFyVXJsXCJcbiAgICAgICAgICBzaGFwZT1cImNpcmNsZVwiIFxuICAgICAgICAgIGltYWdlPVwie3sgcm93LmFjY291bnQuYXZhdGFyVXJsIH19XCI+XG4gICAgICAgIDwvZnMtYmFkZ2U+XG4gICAgICAgIDxkaXY+XG4gICAgICAgICAge3sgcm93LmFjY291bnQubmFtZSB9fVxuICAgICAgICAgIDxkaXYgY2xhc3M9XCJzbWFsbFwiICpuZ0lmPVwicm93LmFjY291bnQuZW1haWxcIj57eyByb3cuYWNjb3VudC5lbWFpbCB9fTwvZGl2PiAgXG4gICAgICAgIDwvZGl2PlxuICAgICA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ZT5cbiAgPC9mcy1saXN0LWNvbHVtbj5cbiAgPGZzLWxpc3QtY29sdW1uIHRpdGxlPVwiQWRkZWRcIj5cbiAgICA8bmctdGVtcGxhdGUgZnMtbGlzdC1jZWxsIGxldC1yb3c9XCJyb3dcIj5cbiAgICAgIHt7IHJvdy5jcmVhdGVEYXRlIHwgZnNEYXRlQWdvIH19XG4gICAgPC9uZy10ZW1wbGF0ZT5cbiAgPC9mcy1saXN0LWNvbHVtbj5cbiAgPGZzLWxpc3QtY29sdW1uIHRpdGxlPVwiTG9jYXRpb25cIj5cbiAgICA8bmctdGVtcGxhdGUgZnMtbGlzdC1jZWxsIGxldC1yb3c9XCJyb3dcIj5cbiAgICAgIDxmcy1jb3VudHJ5IFtjb2RlXT1cInJvdy5pcC5jb3VudHJ5XCI+PC9mcy1jb3VudHJ5PlxuICAgICAgPGRpdj48c21hbGw+e3tyb3cuaXAuaXB9fTwvc21hbGw+PC9kaXY+XG4gICAgPC9uZy10ZW1wbGF0ZT5cbiAgPC9mcy1saXN0LWNvbHVtbj5cbiAgPGZzLWxpc3QtY29sdW1uIHRpdGxlPVwiTGFzdCBzaWduZWQgaW5cIj5cbiAgICA8bmctdGVtcGxhdGUgZnMtbGlzdC1jZWxsIGxldC1yb3c9XCJyb3dcIj5cbiAgICAgIHt7IHJvdy5hY3Rpdml0eURhdGUgfCBmc0RhdGVBZ28gfX1cbiAgICA8L25nLXRlbXBsYXRlPlxuICA8L2ZzLWxpc3QtY29sdW1uPlxuPC9mcy1saXN0PlxuIl19
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { FlexLayoutModule } from '@angular/flex-layout';
|
|
4
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
5
|
+
import { FsListModule } from '@firestitch/list';
|
|
6
|
+
import { FsDateModule } from '@firestitch/date';
|
|
7
|
+
import { FsCountryModule } from '@firestitch/country';
|
|
8
|
+
import { FsDeviceModule } from '@firestitch/device';
|
|
9
|
+
import { FsCurrentDeviceComponent } from './components/current-device/current-device.component';
|
|
10
|
+
import { FsTrustedDevicesComponent } from './components/trusted-devices/trusted-devices.component';
|
|
11
|
+
import { FsBadgeModule } from '@firestitch/badge';
|
|
12
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
13
|
+
import * as i0 from "@angular/core";
|
|
14
|
+
export class Fs2FaModule {
|
|
15
|
+
static forRoot() {
|
|
16
|
+
return {
|
|
17
|
+
ngModule: Fs2FaModule,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
Fs2FaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
22
|
+
Fs2FaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FaModule, declarations: [FsTrustedDevicesComponent,
|
|
23
|
+
FsCurrentDeviceComponent], imports: [CommonModule,
|
|
24
|
+
FlexLayoutModule,
|
|
25
|
+
MatIconModule,
|
|
26
|
+
MatTooltipModule,
|
|
27
|
+
FsListModule,
|
|
28
|
+
FsDateModule,
|
|
29
|
+
FsCountryModule,
|
|
30
|
+
FsDeviceModule,
|
|
31
|
+
FsBadgeModule], exports: [FsTrustedDevicesComponent,
|
|
32
|
+
FsCurrentDeviceComponent] });
|
|
33
|
+
Fs2FaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FaModule, imports: [[
|
|
34
|
+
CommonModule,
|
|
35
|
+
FlexLayoutModule,
|
|
36
|
+
MatIconModule,
|
|
37
|
+
MatTooltipModule,
|
|
38
|
+
FsListModule,
|
|
39
|
+
FsDateModule,
|
|
40
|
+
FsCountryModule,
|
|
41
|
+
FsDeviceModule,
|
|
42
|
+
FsBadgeModule,
|
|
43
|
+
]] });
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FaModule, decorators: [{
|
|
45
|
+
type: NgModule,
|
|
46
|
+
args: [{
|
|
47
|
+
imports: [
|
|
48
|
+
CommonModule,
|
|
49
|
+
FlexLayoutModule,
|
|
50
|
+
MatIconModule,
|
|
51
|
+
MatTooltipModule,
|
|
52
|
+
FsListModule,
|
|
53
|
+
FsDateModule,
|
|
54
|
+
FsCountryModule,
|
|
55
|
+
FsDeviceModule,
|
|
56
|
+
FsBadgeModule,
|
|
57
|
+
],
|
|
58
|
+
exports: [
|
|
59
|
+
FsTrustedDevicesComponent,
|
|
60
|
+
FsCurrentDeviceComponent,
|
|
61
|
+
],
|
|
62
|
+
declarations: [
|
|
63
|
+
FsTrustedDevicesComponent,
|
|
64
|
+
FsCurrentDeviceComponent,
|
|
65
|
+
],
|
|
66
|
+
}]
|
|
67
|
+
}] });
|
|
68
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnMtMmZhLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHAvZnMtMmZhLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUF1QixNQUFNLGVBQWUsQ0FBQztBQUM5RCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFFeEQsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBRXZELE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUNoRCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU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zIjpbIi4uLy4uLy4uLy4uL3NyYy9hcHAvaW50ZXJmYWNlcy90cnVzdGVkLWRldmljZS1hY2NvdW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgaW50ZXJmYWNlIElUcnVzdGVkRGV2aWNlQWNjb3VudCB7XG4gIHJlYWRvbmx5IGlkOiBudW1iZXI7XG4gIG5hbWU6IHN0cmluZztcbiAgZW1haWw6IHN0cmluZztcbiAgYXZhdGFyVXJsOiBzdHJpbmc7XG59XG4iXX0=
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJ1c3RlZC1kZXZpY2UtZGV2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2FwcC9pbnRlcmZhY2VzL3RydXN0ZWQtZGV2aWNlLWRldmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgRGV2aWNlVHlwZSwgRGV2aWNlT3MsIERldmljZUJyb3dzZXIgfSBmcm9tICdAZmlyZXN0aXRjaC9kZXZpY2UnO1xuXG5cbmV4cG9ydCBpbnRlcmZhY2UgSVRydXN0ZWREZXZpY2VEZXZpY2Uge1xuICByZWFkb25seSBpZDogbnVtYmVyO1xuICB0eXBlOiBEZXZpY2VUeXBlO1xuICBvc1R5cGU6IERldmljZU9zO1xuICBvc1ZlcnNpb246IHN0cmluZztcbiAgYnJvd3NlclR5cGU6IERldmljZUJyb3dzZXI7XG4gIGJyb3dzZXJWZXJzaW9uOiBzdHJpbmc7XG4gIHVzZXJBZ2VudDogc3RyaW5nO1xufVxuIl19
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base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ydXN0ZWREZXZpY2VJcDtcbiAgYWN0aXZpdHlEYXRlOiBEYXRlO1xuICBjcmVhdGVEYXRlOiBEYXRlO1xuICBndWlkOiBzdHJpbmc7XG4gIHN0YXRlOiAnYWN0aXZlJyB8ICdkZWxldGVkJztcbiAgY3VycmVudERldmljZT86IGJvb2xlYW47XG59XG4iXX0=
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public_api';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlyZXN0aXRjaC0yZmEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZmlyZXN0aXRjaC0yZmEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWNfYXBpJztcbiJdfQ==
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Fs2FaModule } from './app/fs-2fa.module';
|
|
2
|
+
export { FsTrustedDevicesComponent } from './app/components/trusted-devices/trusted-devices.component';
|
|
3
|
+
export { FsCurrentDeviceComponent } from './app/components/current-device/current-device.component';
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wdWJsaWNfYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUVsRCxPQUFPLEVBQUUseUJBQXlCLEVBQUUsTUFBTSw0REFBNEQsQ0FBQztBQUN2RyxPQUFPLEVBQUUsd0JBQXdCLEVBQUUsTUFBTSwwREFBMEQsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB7IEZzMkZhTW9kdWxlIH0gZnJvbSAnLi9hcHAvZnMtMmZhLm1vZHVsZSc7XG5cbmV4cG9ydCB7IEZzVHJ1c3RlZERldmljZXNDb21wb25lbnQgfSBmcm9tICcuL2FwcC9jb21wb25lbnRzL3RydXN0ZWQtZGV2aWNlcy90cnVzdGVkLWRldmljZXMuY29tcG9uZW50JztcbmV4cG9ydCB7IEZzQ3VycmVudERldmljZUNvbXBvbmVudCB9IGZyb20gJy4vYXBwL2NvbXBvbmVudHMvY3VycmVudC1kZXZpY2UvY3VycmVudC1kZXZpY2UuY29tcG9uZW50JztcblxuZXhwb3J0IHsgSVRydXN0ZWREZXZpY2UgfSBmcm9tICcuL2FwcC9pbnRlcmZhY2VzL3RydXN0ZWQtZGV2aWNlJztcbmV4cG9ydCB7IElUcnVzdGVkRGV2aWNlQWNjb3VudCB9IGZyb20gJy4vYXBwL2ludGVyZmFjZXMvdHJ1c3RlZC1kZXZpY2UtYWNjb3VudCc7XG5leHBvcnQgeyBJVHJ1c3RlZERldmljZURldmljZSB9IGZyb20gJy4vYXBwL2ludGVyZmFjZXMvdHJ1c3RlZC1kZXZpY2UtZGV2aWNlJztcbmV4cG9ydCB7IElUcnVzdGVkRGV2aWNlSXAgfSBmcm9tICcuL2FwcC9pbnRlcmZhY2VzL3RydXN0ZWQtZGV2aWNlLWlwJztcbiJdfQ==
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, Input, ViewChild, NgModule } from '@angular/core';
|
|
3
|
+
import * as i6 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import { FlexLayoutModule } from '@angular/flex-layout';
|
|
6
|
+
import * as i1 from '@angular/material/icon';
|
|
7
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
8
|
+
import * as i2$1 from '@firestitch/list';
|
|
9
|
+
import { FsListComponent, FsListModule } from '@firestitch/list';
|
|
10
|
+
import * as i7 from '@firestitch/date';
|
|
11
|
+
import { FsDateModule } from '@firestitch/date';
|
|
12
|
+
import * as i1$1 from '@firestitch/country';
|
|
13
|
+
import { FsCountryModule } from '@firestitch/country';
|
|
14
|
+
import * as i5 from '@firestitch/device';
|
|
15
|
+
import { FsDeviceModule } from '@firestitch/device';
|
|
16
|
+
import * as i2 from '@angular/material/tooltip';
|
|
17
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
18
|
+
import { ItemType } from '@firestitch/filter';
|
|
19
|
+
import { Observable, Subject } from 'rxjs';
|
|
20
|
+
import { takeUntil, map } from 'rxjs/operators';
|
|
21
|
+
import * as i3 from '@firestitch/badge';
|
|
22
|
+
import { FsBadgeModule } from '@firestitch/badge';
|
|
23
|
+
|
|
24
|
+
class FsCurrentDeviceComponent {
|
|
25
|
+
}
|
|
26
|
+
FsCurrentDeviceComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsCurrentDeviceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
27
|
+
FsCurrentDeviceComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsCurrentDeviceComponent, selector: "fs-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 });
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsCurrentDeviceComponent, decorators: [{
|
|
29
|
+
type: Component,
|
|
30
|
+
args: [{
|
|
31
|
+
selector: 'fs-current-device',
|
|
32
|
+
templateUrl: './current-device.component.html',
|
|
33
|
+
styleUrls: ['./current-device.component.scss'],
|
|
34
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
35
|
+
}]
|
|
36
|
+
}] });
|
|
37
|
+
|
|
38
|
+
class FsTrustedDevicesComponent {
|
|
39
|
+
constructor(_fsCountry) {
|
|
40
|
+
this._fsCountry = _fsCountry;
|
|
41
|
+
this.fetchTrustedDevices = (query) => new Observable();
|
|
42
|
+
this.removeTrustedDevice = (trustedDevice) => new Observable();
|
|
43
|
+
this.signOutTrustedDevice = (trustedDevice) => new Observable();
|
|
44
|
+
this.showAccount = true;
|
|
45
|
+
this._destroy$ = new Subject();
|
|
46
|
+
}
|
|
47
|
+
ngOnInit() {
|
|
48
|
+
this._fsCountry.ready$
|
|
49
|
+
.pipe(takeUntil(this._destroy$))
|
|
50
|
+
.subscribe(() => {
|
|
51
|
+
this._initListConfig();
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
ngOnDestroy() {
|
|
55
|
+
this._destroy$.next();
|
|
56
|
+
this._destroy$.complete();
|
|
57
|
+
}
|
|
58
|
+
_initListConfig() {
|
|
59
|
+
this.listConfig = {
|
|
60
|
+
filters: [
|
|
61
|
+
{
|
|
62
|
+
name: 'keyword',
|
|
63
|
+
type: ItemType.Keyword,
|
|
64
|
+
label: 'Search',
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
rowActions: [
|
|
68
|
+
{
|
|
69
|
+
click: (data) => {
|
|
70
|
+
this.signOutTrustedDevice(data)
|
|
71
|
+
.subscribe(() => {
|
|
72
|
+
this.reload();
|
|
73
|
+
});
|
|
74
|
+
},
|
|
75
|
+
menu: true,
|
|
76
|
+
label: 'Sign Out',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
click: (data) => {
|
|
80
|
+
this.removeTrustedDevice(data)
|
|
81
|
+
.subscribe(() => {
|
|
82
|
+
this.reload();
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
remove: {
|
|
86
|
+
title: 'Confirm',
|
|
87
|
+
template: 'Are you sure you would like to delete this record?',
|
|
88
|
+
},
|
|
89
|
+
menu: true,
|
|
90
|
+
label: 'Delete',
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
fetch: (query) => {
|
|
94
|
+
return this.fetchTrustedDevices(query)
|
|
95
|
+
.pipe(map((response) => {
|
|
96
|
+
return {
|
|
97
|
+
data: response.data,
|
|
98
|
+
paging: response.paging,
|
|
99
|
+
};
|
|
100
|
+
}));
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
reload() {
|
|
105
|
+
this.listComponent.reload();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
FsTrustedDevicesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsTrustedDevicesComponent, deps: [{ token: i1$1.FsCountry }], target: i0.ɵɵFactoryTarget.Component });
|
|
109
|
+
FsTrustedDevicesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsTrustedDevicesComponent, selector: "fs-trusted-devices", inputs: { fetchTrustedDevices: "fetchTrustedDevices", removeTrustedDevice: "removeTrustedDevice", 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-current-device *ngIf=\"row.currentDevice\"></fs-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 <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$1.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: FsCurrentDeviceComponent, selector: "fs-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$1.FsCountryComponent, selector: "fs-country", inputs: ["showIcon", "showName", "width", "code"] }], directives: [{ type: i2$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "customize", "title", "name", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$1.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 });
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsTrustedDevicesComponent, decorators: [{
|
|
111
|
+
type: Component,
|
|
112
|
+
args: [{
|
|
113
|
+
selector: 'fs-trusted-devices',
|
|
114
|
+
templateUrl: './trusted-devices.component.html',
|
|
115
|
+
styleUrls: ['./trusted-devices.component.scss'],
|
|
116
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
117
|
+
}]
|
|
118
|
+
}], ctorParameters: function () { return [{ type: i1$1.FsCountry }]; }, propDecorators: { fetchTrustedDevices: [{
|
|
119
|
+
type: Input
|
|
120
|
+
}], removeTrustedDevice: [{
|
|
121
|
+
type: Input
|
|
122
|
+
}], signOutTrustedDevice: [{
|
|
123
|
+
type: Input
|
|
124
|
+
}], showAccount: [{
|
|
125
|
+
type: Input
|
|
126
|
+
}], listComponent: [{
|
|
127
|
+
type: ViewChild,
|
|
128
|
+
args: [FsListComponent]
|
|
129
|
+
}] } });
|
|
130
|
+
|
|
131
|
+
class Fs2FaModule {
|
|
132
|
+
static forRoot() {
|
|
133
|
+
return {
|
|
134
|
+
ngModule: Fs2FaModule,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
Fs2FaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
139
|
+
Fs2FaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FaModule, declarations: [FsTrustedDevicesComponent,
|
|
140
|
+
FsCurrentDeviceComponent], imports: [CommonModule,
|
|
141
|
+
FlexLayoutModule,
|
|
142
|
+
MatIconModule,
|
|
143
|
+
MatTooltipModule,
|
|
144
|
+
FsListModule,
|
|
145
|
+
FsDateModule,
|
|
146
|
+
FsCountryModule,
|
|
147
|
+
FsDeviceModule,
|
|
148
|
+
FsBadgeModule], exports: [FsTrustedDevicesComponent,
|
|
149
|
+
FsCurrentDeviceComponent] });
|
|
150
|
+
Fs2FaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FaModule, imports: [[
|
|
151
|
+
CommonModule,
|
|
152
|
+
FlexLayoutModule,
|
|
153
|
+
MatIconModule,
|
|
154
|
+
MatTooltipModule,
|
|
155
|
+
FsListModule,
|
|
156
|
+
FsDateModule,
|
|
157
|
+
FsCountryModule,
|
|
158
|
+
FsDeviceModule,
|
|
159
|
+
FsBadgeModule,
|
|
160
|
+
]] });
|
|
161
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FaModule, decorators: [{
|
|
162
|
+
type: NgModule,
|
|
163
|
+
args: [{
|
|
164
|
+
imports: [
|
|
165
|
+
CommonModule,
|
|
166
|
+
FlexLayoutModule,
|
|
167
|
+
MatIconModule,
|
|
168
|
+
MatTooltipModule,
|
|
169
|
+
FsListModule,
|
|
170
|
+
FsDateModule,
|
|
171
|
+
FsCountryModule,
|
|
172
|
+
FsDeviceModule,
|
|
173
|
+
FsBadgeModule,
|
|
174
|
+
],
|
|
175
|
+
exports: [
|
|
176
|
+
FsTrustedDevicesComponent,
|
|
177
|
+
FsCurrentDeviceComponent,
|
|
178
|
+
],
|
|
179
|
+
declarations: [
|
|
180
|
+
FsTrustedDevicesComponent,
|
|
181
|
+
FsCurrentDeviceComponent,
|
|
182
|
+
],
|
|
183
|
+
}]
|
|
184
|
+
}] });
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Generated bundle index. Do not edit.
|
|
188
|
+
*/
|
|
189
|
+
|
|
190
|
+
export { Fs2FaModule, FsCurrentDeviceComponent, FsTrustedDevicesComponent };
|
|
191
|
+
//# sourceMappingURL=firestitch-2fa.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"firestitch-2fa.js","sources":["../../src/app/components/current-device/current-device.component.ts","../../src/app/components/current-device/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-current-device',\n templateUrl: './current-device.component.html',\n styleUrls: [ './current-device.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FsCurrentDeviceComponent {\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';\nimport { ITrustedDeviceAccount } from '../../interfaces/trusted-device-account';\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 removeTrustedDevice = (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 filters: [\n {\n name: 'keyword',\n type: ItemType.Keyword,\n label: 'Search',\n },\n ],\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.removeTrustedDevice(data)\n .subscribe(() => {\n this.reload();\n });\n },\n remove: {\n title: 'Confirm',\n template: 'Are you sure you would like to delete this record?',\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-current-device *ngIf=\"row.currentDevice\"></fs-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 <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 { FsCurrentDeviceComponent } from './components/current-device/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 FsCurrentDeviceComponent,\n ],\n declarations: [\n FsTrustedDevicesComponent,\n FsCurrentDeviceComponent,\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,wBAAwB;;sHAAxB,wBAAwB;0GAAxB,wBAAwB,yDCZrC,qMASA;4FDGa,wBAAwB;kBANpC,SAAS;mBAAC;oBACT,QAAQ,EAAE,mBAAmB;oBAC7B,WAAW,EAAE,iCAAiC;oBAC9C,SAAS,EAAE,CAAE,iCAAiC,CAAE;oBAChD,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;;;MEiBY,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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B,wBAAwB;qBACzB;iBACF;;;ACxCD;;;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@firestitch/2fa",
|
|
3
|
+
"version": "12.0.0",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/Firestitch/ngx-2fa"
|
|
7
|
+
},
|
|
8
|
+
"author": {
|
|
9
|
+
"name": "Firestitch",
|
|
10
|
+
"email": "admin@firestitch.com"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"angular"
|
|
14
|
+
],
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"peerDependencies": {},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"tslib": "^2.0.0"
|
|
19
|
+
},
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"main": "bundles/firestitch-2fa.umd.js",
|
|
22
|
+
"module": "fesm2015/firestitch-2fa.js",
|
|
23
|
+
"es2015": "fesm2015/firestitch-2fa.js",
|
|
24
|
+
"esm2015": "esm2015/firestitch-2fa.js",
|
|
25
|
+
"fesm2015": "fesm2015/firestitch-2fa.js",
|
|
26
|
+
"typings": "firestitch-2fa.d.ts"
|
|
27
|
+
}
|
package/public_api.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Fs2FaModule } from './app/fs-2fa.module';
|
|
2
|
+
export { FsTrustedDevicesComponent } from './app/components/trusted-devices/trusted-devices.component';
|
|
3
|
+
export { FsCurrentDeviceComponent } from './app/components/current-device/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';
|
package/styles.scss
ADDED
|
File without changes
|