@authing/ng-ui-components 2.4.62-rc.6 → 3.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/karma.conf.js +32 -0
- package/ng-package.json +8 -0
- package/package.json +2 -14
- package/src/lib/AuthingGuard/authing-guard.component.scss +1 -0
- package/src/lib/AuthingGuard/authing-guard.component.spec.ts +24 -0
- package/src/lib/AuthingGuard/authing-guard.component.ts +110 -0
- package/src/lib/AuthingGuard/authing-guard.module.ts +11 -0
- package/src/lib/AuthingGuard/authing-guard.service.spec.ts +16 -0
- package/src/lib/AuthingGuard/authing-guard.service.ts +8 -0
- package/src/lib/Guard/guard.component.scss +1 -0
- package/src/lib/Guard/guard.component.spec.ts +24 -0
- package/src/lib/Guard/guard.component.ts +111 -0
- package/src/lib/Guard/guard.module.ts +11 -0
- package/src/lib/Guard/guard.service.spec.ts +16 -0
- package/src/lib/Guard/guard.service.ts +8 -0
- package/src/public-api.ts +46 -0
- package/src/test.ts +26 -0
- package/tsconfig.lib.json +25 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +17 -0
- package/tslint.json +17 -0
- package/authing-ng-ui-components.d.ts +0 -4
- package/authing-ng-ui-components.metadata.json +0 -1
- package/bundles/authing-ng-ui-components.umd.js +0 -12129
- package/bundles/authing-ng-ui-components.umd.js.map +0 -1
- package/bundles/authing-ng-ui-components.umd.min.js +0 -2
- package/bundles/authing-ng-ui-components.umd.min.js.map +0 -1
- package/esm2015/authing-ng-ui-components.js +0 -5
- package/esm2015/lib/authing-guard.component.js +0 -79
- package/esm2015/lib/authing-guard.module.js +0 -12
- package/esm2015/lib/authing-guard.service.js +0 -13
- package/esm2015/public-api.js +0 -7
- package/fesm2015/authing-ng-ui-components.js +0 -111
- package/fesm2015/authing-ng-ui-components.js.map +0 -1
- package/lib/authing-guard.component.d.ts +0 -28
- package/lib/authing-guard.module.d.ts +0 -2
- package/lib/authing-guard.service.d.ts +0 -3
- package/public-api.d.ts +0 -3
package/karma.conf.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Karma configuration file, see link for more information
|
|
2
|
+
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
3
|
+
|
|
4
|
+
module.exports = function (config) {
|
|
5
|
+
config.set({
|
|
6
|
+
basePath: '',
|
|
7
|
+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
8
|
+
plugins: [
|
|
9
|
+
require('karma-jasmine'),
|
|
10
|
+
require('karma-chrome-launcher'),
|
|
11
|
+
require('karma-jasmine-html-reporter'),
|
|
12
|
+
require('karma-coverage-istanbul-reporter'),
|
|
13
|
+
require('@angular-devkit/build-angular/plugins/karma'),
|
|
14
|
+
],
|
|
15
|
+
client: {
|
|
16
|
+
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
17
|
+
},
|
|
18
|
+
coverageIstanbulReporter: {
|
|
19
|
+
dir: require('path').join(__dirname, '../../coverage/ng-ui-components'),
|
|
20
|
+
reports: ['html', 'lcovonly', 'text-summary'],
|
|
21
|
+
fixWebpackSourcePaths: true,
|
|
22
|
+
},
|
|
23
|
+
reporters: ['progress', 'kjhtml'],
|
|
24
|
+
port: 9876,
|
|
25
|
+
colors: true,
|
|
26
|
+
logLevel: config.LOG_INFO,
|
|
27
|
+
autoWatch: true,
|
|
28
|
+
browsers: ['Chrome'],
|
|
29
|
+
singleRun: false,
|
|
30
|
+
restartOnFileChange: true,
|
|
31
|
+
})
|
|
32
|
+
}
|
package/ng-package.json
ADDED
package/package.json
CHANGED
|
@@ -1,28 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@authing/ng-ui-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^10.2.0",
|
|
6
6
|
"@angular/core": "^10.2.0"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@authing/native-js-ui-components": "^2.4.62-rc.6",
|
|
10
9
|
"tslib": "^2.0.0"
|
|
11
10
|
},
|
|
12
|
-
"bundledDependencies": [
|
|
13
|
-
"@authing/native-js-ui-components"
|
|
14
|
-
],
|
|
15
11
|
"publishConfig": {
|
|
16
12
|
"access": "public",
|
|
17
13
|
"directory": "../../dist/ng-ui-components",
|
|
18
14
|
"registry": "https://registry.npmjs.org"
|
|
19
|
-
}
|
|
20
|
-
"main": "bundles/authing-ng-ui-components.umd.js",
|
|
21
|
-
"module": "fesm2015/authing-ng-ui-components.js",
|
|
22
|
-
"es2015": "fesm2015/authing-ng-ui-components.js",
|
|
23
|
-
"esm2015": "esm2015/authing-ng-ui-components.js",
|
|
24
|
-
"fesm2015": "fesm2015/authing-ng-ui-components.js",
|
|
25
|
-
"typings": "authing-ng-ui-components.d.ts",
|
|
26
|
-
"metadata": "authing-ng-ui-components.metadata.json",
|
|
27
|
-
"sideEffects": false
|
|
15
|
+
}
|
|
28
16
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "~@authing/native-js-ui-components/lib/index.min";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { AuthingGuardComponent } from './authing-guard.component';
|
|
4
|
+
|
|
5
|
+
describe('AuthingGuardComponent', () => {
|
|
6
|
+
let component: AuthingGuardComponent;
|
|
7
|
+
let fixture: ComponentFixture<AuthingGuardComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [AuthingGuardComponent],
|
|
12
|
+
}).compileComponents();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
beforeEach(() => {
|
|
16
|
+
fixture = TestBed.createComponent(AuthingGuardComponent);
|
|
17
|
+
component = fixture.componentInstance;
|
|
18
|
+
fixture.detectChanges();
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('should create', () => {
|
|
22
|
+
expect(component).toBeTruthy();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import {
|
|
2
|
+
OnInit,
|
|
3
|
+
Output,
|
|
4
|
+
Component,
|
|
5
|
+
EventEmitter,
|
|
6
|
+
ViewEncapsulation,
|
|
7
|
+
Input,
|
|
8
|
+
OnChanges,
|
|
9
|
+
} from '@angular/core';
|
|
10
|
+
import {
|
|
11
|
+
UserConfig,
|
|
12
|
+
AuthingGuard,
|
|
13
|
+
GuardEventsHandler,
|
|
14
|
+
} from '@authing/native-js-ui-components';
|
|
15
|
+
|
|
16
|
+
@Component({
|
|
17
|
+
selector: 'authing-guard',
|
|
18
|
+
template: `<div id="authing_guard_container"></div>`,
|
|
19
|
+
styles: [],
|
|
20
|
+
styleUrls: ['./authing-guard.component.scss'],
|
|
21
|
+
encapsulation: ViewEncapsulation.None,
|
|
22
|
+
})
|
|
23
|
+
export class AuthingGuardComponent implements OnInit, OnChanges {
|
|
24
|
+
constructor() {}
|
|
25
|
+
|
|
26
|
+
guard: AuthingGuard;
|
|
27
|
+
|
|
28
|
+
ngOnInit(): void {}
|
|
29
|
+
|
|
30
|
+
ngOnChanges(v) {
|
|
31
|
+
if (v.visible.currentValue) {
|
|
32
|
+
this.guard?.show();
|
|
33
|
+
} else {
|
|
34
|
+
this.guard.hide();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@Input() appId: string;
|
|
39
|
+
@Input() visible?: boolean;
|
|
40
|
+
@Input() tenantId?: string;
|
|
41
|
+
@Input() config?: UserConfig;
|
|
42
|
+
|
|
43
|
+
@Output() onLoad = new EventEmitter<
|
|
44
|
+
Parameters<GuardEventsHandler['onLoad']>
|
|
45
|
+
>();
|
|
46
|
+
@Output() onLoadError = new EventEmitter<
|
|
47
|
+
Parameters<GuardEventsHandler['onLoadError']>
|
|
48
|
+
>();
|
|
49
|
+
@Output() onLogin = new EventEmitter<
|
|
50
|
+
Parameters<GuardEventsHandler['onLogin']>
|
|
51
|
+
>();
|
|
52
|
+
@Output() onLoginError = new EventEmitter<
|
|
53
|
+
Parameters<GuardEventsHandler['onLoginError']>
|
|
54
|
+
>();
|
|
55
|
+
@Output() onRegister = new EventEmitter<
|
|
56
|
+
Parameters<GuardEventsHandler['onRegister']>
|
|
57
|
+
>();
|
|
58
|
+
@Output() onRegisterError = new EventEmitter<
|
|
59
|
+
Parameters<GuardEventsHandler['onRegisterError']>
|
|
60
|
+
>();
|
|
61
|
+
@Output() onPwdEmailSend = new EventEmitter<
|
|
62
|
+
Parameters<GuardEventsHandler['onPwdEmailSend']>
|
|
63
|
+
>();
|
|
64
|
+
@Output() onPwdEmailSendError = new EventEmitter<
|
|
65
|
+
Parameters<GuardEventsHandler['onPwdEmailSendError']>
|
|
66
|
+
>();
|
|
67
|
+
@Output() onPwdPhoneSend = new EventEmitter<
|
|
68
|
+
Parameters<GuardEventsHandler['onPwdPhoneSend']>
|
|
69
|
+
>();
|
|
70
|
+
@Output() onPwdPhoneSendError = new EventEmitter<
|
|
71
|
+
Parameters<GuardEventsHandler['onPwdPhoneSendError']>
|
|
72
|
+
>();
|
|
73
|
+
@Output() onPwdReset = new EventEmitter<
|
|
74
|
+
Parameters<GuardEventsHandler['onPwdReset']>
|
|
75
|
+
>();
|
|
76
|
+
@Output() onPwdResetError = new EventEmitter<
|
|
77
|
+
Parameters<GuardEventsHandler['onPwdResetError']>
|
|
78
|
+
>();
|
|
79
|
+
@Output() onClose = new EventEmitter<
|
|
80
|
+
Parameters<GuardEventsHandler['onClose']>
|
|
81
|
+
>();
|
|
82
|
+
|
|
83
|
+
ngAfterViewInit() {
|
|
84
|
+
const guard = new AuthingGuard(this.appId, this.config, this.tenantId);
|
|
85
|
+
|
|
86
|
+
guard.on('load', (...rest) => this.onLoad.emit(rest));
|
|
87
|
+
guard.on('load-error', (...rest) => this.onLoadError.emit(rest));
|
|
88
|
+
guard.on('login', (...rest) => this.onLogin.emit(rest));
|
|
89
|
+
guard.on('login-error', (...rest) => this.onLoginError.emit(rest));
|
|
90
|
+
guard.on('register', (...rest) => this.onRegister.emit(rest));
|
|
91
|
+
guard.on('register-error', (...rest) => this.onRegisterError.emit(rest));
|
|
92
|
+
guard.on('pwd-email-send', (...rest) => this.onPwdEmailSend.emit(rest));
|
|
93
|
+
guard.on('pwd-email-send-error', (...rest) =>
|
|
94
|
+
this.onPwdEmailSendError.emit(rest)
|
|
95
|
+
);
|
|
96
|
+
guard.on('pwd-phone-send', (...rest) => this.onPwdPhoneSend.emit(rest));
|
|
97
|
+
guard.on('pwd-phone-send-error', (...rest) =>
|
|
98
|
+
this.onPwdPhoneSendError.emit(rest)
|
|
99
|
+
);
|
|
100
|
+
guard.on('pwd-reset', (...rest) => this.onPwdReset.emit(rest));
|
|
101
|
+
guard.on('pwd-reset-error', (...rest) => this.onPwdResetError.emit(rest));
|
|
102
|
+
guard.on('close', (...rest) => this.onClose.emit(rest));
|
|
103
|
+
|
|
104
|
+
if (this.visible) {
|
|
105
|
+
guard.show();
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
this.guard = guard;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { AuthingGuardComponent } from './authing-guard.component';
|
|
3
|
+
|
|
4
|
+
@NgModule({
|
|
5
|
+
declarations: [AuthingGuardComponent],
|
|
6
|
+
imports: [],
|
|
7
|
+
exports: [AuthingGuardComponent],
|
|
8
|
+
})
|
|
9
|
+
export class AuthingGuardModule {
|
|
10
|
+
constructor() {}
|
|
11
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { AuthingGuardService } from './authing-guard.service';
|
|
4
|
+
|
|
5
|
+
describe('AuthingGuardService', () => {
|
|
6
|
+
let service: AuthingGuardService;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
TestBed.configureTestingModule({});
|
|
10
|
+
service = TestBed.inject(AuthingGuardService);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it('should be created', () => {
|
|
14
|
+
expect(service).toBeTruthy();
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "~@authing/native-js-ui-components/lib/index.min";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { GuardComponent } from './guard.component';
|
|
4
|
+
|
|
5
|
+
describe('GuardComponent', () => {
|
|
6
|
+
let component: GuardComponent;
|
|
7
|
+
let fixture: ComponentFixture<GuardComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [GuardComponent],
|
|
12
|
+
}).compileComponents();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
beforeEach(() => {
|
|
16
|
+
fixture = TestBed.createComponent(GuardComponent);
|
|
17
|
+
component = fixture.componentInstance;
|
|
18
|
+
fixture.detectChanges();
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('should create', () => {
|
|
22
|
+
expect(component).toBeTruthy();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import {
|
|
2
|
+
OnInit,
|
|
3
|
+
Output,
|
|
4
|
+
Component,
|
|
5
|
+
EventEmitter,
|
|
6
|
+
ViewEncapsulation,
|
|
7
|
+
Input,
|
|
8
|
+
OnChanges,
|
|
9
|
+
} from '@angular/core';
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
Guard,
|
|
13
|
+
GuardEventsHandler,
|
|
14
|
+
GuardLocalConfig,
|
|
15
|
+
} from '@authing/native-js-ui-components';
|
|
16
|
+
|
|
17
|
+
@Component({
|
|
18
|
+
selector: 'authing-guard',
|
|
19
|
+
template: `<div id="authing_guard_container"></div>`,
|
|
20
|
+
styles: [],
|
|
21
|
+
styleUrls: ['./guard.component.scss'],
|
|
22
|
+
encapsulation: ViewEncapsulation.None,
|
|
23
|
+
})
|
|
24
|
+
export class GuardComponent implements OnInit, OnChanges {
|
|
25
|
+
constructor() {}
|
|
26
|
+
|
|
27
|
+
guard: Guard;
|
|
28
|
+
|
|
29
|
+
ngOnInit(): void {}
|
|
30
|
+
|
|
31
|
+
ngOnChanges(v) {
|
|
32
|
+
if (v.visible.currentValue) {
|
|
33
|
+
this.guard?.show();
|
|
34
|
+
} else {
|
|
35
|
+
this.guard.hide();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@Input() appId: string;
|
|
40
|
+
@Input() visible?: boolean;
|
|
41
|
+
@Input() tenantId?: string;
|
|
42
|
+
@Input() config?: Partial<GuardLocalConfig>;
|
|
43
|
+
|
|
44
|
+
@Output() onLoad = new EventEmitter<
|
|
45
|
+
Parameters<GuardEventsHandler['onLoad']>
|
|
46
|
+
>();
|
|
47
|
+
@Output() onLoadError = new EventEmitter<
|
|
48
|
+
Parameters<GuardEventsHandler['onLoadError']>
|
|
49
|
+
>();
|
|
50
|
+
@Output() onLogin = new EventEmitter<
|
|
51
|
+
Parameters<GuardEventsHandler['onLogin']>
|
|
52
|
+
>();
|
|
53
|
+
@Output() onLoginError = new EventEmitter<
|
|
54
|
+
Parameters<GuardEventsHandler['onLoginError']>
|
|
55
|
+
>();
|
|
56
|
+
@Output() onRegister = new EventEmitter<
|
|
57
|
+
Parameters<GuardEventsHandler['onRegister']>
|
|
58
|
+
>();
|
|
59
|
+
@Output() onRegisterError = new EventEmitter<
|
|
60
|
+
Parameters<GuardEventsHandler['onRegisterError']>
|
|
61
|
+
>();
|
|
62
|
+
@Output() onPwdEmailSend = new EventEmitter<
|
|
63
|
+
Parameters<GuardEventsHandler['onPwdEmailSend']>
|
|
64
|
+
>();
|
|
65
|
+
@Output() onPwdEmailSendError = new EventEmitter<
|
|
66
|
+
Parameters<GuardEventsHandler['onPwdEmailSendError']>
|
|
67
|
+
>();
|
|
68
|
+
@Output() onPwdPhoneSend = new EventEmitter<
|
|
69
|
+
Parameters<GuardEventsHandler['onPwdPhoneSend']>
|
|
70
|
+
>();
|
|
71
|
+
@Output() onPwdPhoneSendError = new EventEmitter<
|
|
72
|
+
Parameters<GuardEventsHandler['onPwdPhoneSendError']>
|
|
73
|
+
>();
|
|
74
|
+
@Output() onPwdReset = new EventEmitter<
|
|
75
|
+
Parameters<GuardEventsHandler['onPwdReset']>
|
|
76
|
+
>();
|
|
77
|
+
@Output() onPwdResetError = new EventEmitter<
|
|
78
|
+
Parameters<GuardEventsHandler['onPwdResetError']>
|
|
79
|
+
>();
|
|
80
|
+
@Output() onClose = new EventEmitter<
|
|
81
|
+
Parameters<GuardEventsHandler['onClose']>
|
|
82
|
+
>();
|
|
83
|
+
|
|
84
|
+
ngAfterViewInit() {
|
|
85
|
+
const guard = new Guard(this.appId, this.config);
|
|
86
|
+
|
|
87
|
+
guard.on('load', (...rest) => this.onLoad.emit(rest));
|
|
88
|
+
guard.on('load-error', (...rest) => this.onLoadError.emit(rest));
|
|
89
|
+
guard.on('login', (...rest) => this.onLogin.emit(rest));
|
|
90
|
+
guard.on('login-error', (...rest) => this.onLoginError.emit(rest));
|
|
91
|
+
guard.on('register', (...rest) => this.onRegister.emit(rest));
|
|
92
|
+
guard.on('register-error', (...rest) => this.onRegisterError.emit(rest));
|
|
93
|
+
guard.on('pwd-email-send', (...rest) => this.onPwdEmailSend.emit(rest));
|
|
94
|
+
guard.on('pwd-email-send-error', (...rest) =>
|
|
95
|
+
this.onPwdEmailSendError.emit(rest)
|
|
96
|
+
);
|
|
97
|
+
guard.on('pwd-phone-send', (...rest) => this.onPwdPhoneSend.emit(rest));
|
|
98
|
+
guard.on('pwd-phone-send-error', (...rest) =>
|
|
99
|
+
this.onPwdPhoneSendError.emit(rest)
|
|
100
|
+
);
|
|
101
|
+
guard.on('pwd-reset', (...rest) => this.onPwdReset.emit(rest));
|
|
102
|
+
guard.on('pwd-reset-error', (...rest) => this.onPwdResetError.emit(rest));
|
|
103
|
+
guard.on('close', (...rest) => this.onClose.emit(rest));
|
|
104
|
+
|
|
105
|
+
if (this.visible) {
|
|
106
|
+
guard.show();
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
this.guard = guard;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { GuardService } from './guard.service';
|
|
4
|
+
|
|
5
|
+
describe('GuardService', () => {
|
|
6
|
+
let service: GuardService;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
TestBed.configureTestingModule({});
|
|
10
|
+
service = TestBed.inject(GuardService);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it('should be created', () => {
|
|
14
|
+
expect(service).toBeTruthy();
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Public API Surface of authing-guard
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
User,
|
|
7
|
+
GuardMode,
|
|
8
|
+
GuardScenes,
|
|
9
|
+
LoginMethods,
|
|
10
|
+
getAuthClient,
|
|
11
|
+
CommonMessage,
|
|
12
|
+
initAuthClient,
|
|
13
|
+
RegisterMethods,
|
|
14
|
+
AuthenticationClient,
|
|
15
|
+
GuardEventsHandlerKebab,
|
|
16
|
+
AuthenticationClientOptions,
|
|
17
|
+
UserConfig,
|
|
18
|
+
GuardEventsHandler,
|
|
19
|
+
} from '@authing/native-js-ui-components';
|
|
20
|
+
|
|
21
|
+
// export * from './lib/AuthingGuard/authing-guard.service';
|
|
22
|
+
// export * from './lib/AuthingGuard/authing-guard.component';
|
|
23
|
+
// export * from './lib/AuthingGuard/authing-guard.module';
|
|
24
|
+
|
|
25
|
+
export * from './lib/Guard/guard.service';
|
|
26
|
+
export * from './lib/Guard/guard.component';
|
|
27
|
+
export * from './lib/Guard/guard.module';
|
|
28
|
+
|
|
29
|
+
export type {
|
|
30
|
+
User,
|
|
31
|
+
UserConfig,
|
|
32
|
+
CommonMessage,
|
|
33
|
+
GuardEventsHandler,
|
|
34
|
+
AuthenticationClient,
|
|
35
|
+
GuardEventsHandlerKebab,
|
|
36
|
+
AuthenticationClientOptions,
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export {
|
|
40
|
+
GuardMode,
|
|
41
|
+
GuardScenes,
|
|
42
|
+
LoginMethods,
|
|
43
|
+
getAuthClient,
|
|
44
|
+
initAuthClient,
|
|
45
|
+
RegisterMethods,
|
|
46
|
+
};
|
package/src/test.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
2
|
+
|
|
3
|
+
import 'zone.js/dist/zone';
|
|
4
|
+
import 'zone.js/dist/zone-testing';
|
|
5
|
+
import { getTestBed } from '@angular/core/testing';
|
|
6
|
+
import {
|
|
7
|
+
BrowserDynamicTestingModule,
|
|
8
|
+
platformBrowserDynamicTesting
|
|
9
|
+
} from '@angular/platform-browser-dynamic/testing';
|
|
10
|
+
|
|
11
|
+
declare const require: {
|
|
12
|
+
context(path: string, deep?: boolean, filter?: RegExp): {
|
|
13
|
+
keys(): string[];
|
|
14
|
+
<T>(id: string): T;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// First, initialize the Angular testing environment.
|
|
19
|
+
getTestBed().initTestEnvironment(
|
|
20
|
+
BrowserDynamicTestingModule,
|
|
21
|
+
platformBrowserDynamicTesting()
|
|
22
|
+
);
|
|
23
|
+
// Then we find all the tests.
|
|
24
|
+
const context = require.context('./', true, /\.spec\.ts$/);
|
|
25
|
+
// And load the modules.
|
|
26
|
+
context.keys().map(context);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
+
{
|
|
3
|
+
"extends": "../../tsconfig.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"outDir": "../../out-tsc/lib",
|
|
6
|
+
"target": "es2015",
|
|
7
|
+
"declaration": true,
|
|
8
|
+
"declarationMap": true,
|
|
9
|
+
"inlineSources": true,
|
|
10
|
+
"types": [],
|
|
11
|
+
"lib": [
|
|
12
|
+
"dom",
|
|
13
|
+
"es2018"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"angularCompilerOptions": {
|
|
17
|
+
"skipTemplateCodegen": true,
|
|
18
|
+
"strictMetadataEmit": true,
|
|
19
|
+
"enableResourceInlining": true
|
|
20
|
+
},
|
|
21
|
+
"exclude": [
|
|
22
|
+
"src/test.ts",
|
|
23
|
+
"**/*.spec.ts"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
+
{
|
|
3
|
+
"extends": "../../tsconfig.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"outDir": "../../out-tsc/spec",
|
|
6
|
+
"types": [
|
|
7
|
+
"jasmine"
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"src/test.ts"
|
|
12
|
+
],
|
|
13
|
+
"include": [
|
|
14
|
+
"**/*.spec.ts",
|
|
15
|
+
"**/*.d.ts"
|
|
16
|
+
]
|
|
17
|
+
}
|
package/tslint.json
ADDED