@authing/ng-ui-components 3.0.0 → 3.0.12
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/authing-ng-ui-components.d.ts +4 -0
- package/authing-ng-ui-components.metadata.json +1 -0
- package/bundles/authing-ng-ui-components.umd.js +428 -0
- package/bundles/authing-ng-ui-components.umd.js.map +1 -0
- package/bundles/authing-ng-ui-components.umd.min.js +2 -0
- package/bundles/authing-ng-ui-components.umd.min.js.map +1 -0
- package/esm2015/authing-ng-ui-components.js +5 -0
- package/esm2015/lib/AuthingGuard/authing-guard.component.js +78 -0
- package/esm2015/lib/AuthingGuard/authing-guard.module.js +14 -0
- package/esm2015/lib/AuthingGuard/authing-guard.service.js +13 -0
- package/esm2015/lib/Guard/guard.component.js +79 -0
- package/esm2015/lib/Guard/guard.module.js +14 -0
- package/esm2015/lib/Guard/guard.service.js +13 -0
- package/esm2015/public-api.js +12 -0
- package/fesm2015/authing-ng-ui-components.js +213 -0
- package/fesm2015/authing-ng-ui-components.js.map +1 -0
- package/lib/AuthingGuard/authing-guard.component.d.ts +26 -0
- package/lib/AuthingGuard/authing-guard.module.d.ts +3 -0
- package/lib/AuthingGuard/authing-guard.service.d.ts +3 -0
- package/lib/Guard/guard.component.d.ts +26 -0
- package/lib/Guard/guard.module.d.ts +3 -0
- package/lib/Guard/guard.service.d.ts +3 -0
- package/package.json +10 -2
- package/public-api.d.ts +9 -0
- package/karma.conf.js +0 -32
- package/ng-package.json +0 -8
- package/src/lib/AuthingGuard/authing-guard.component.scss +0 -1
- package/src/lib/AuthingGuard/authing-guard.component.spec.ts +0 -24
- package/src/lib/AuthingGuard/authing-guard.component.ts +0 -110
- package/src/lib/AuthingGuard/authing-guard.module.ts +0 -11
- package/src/lib/AuthingGuard/authing-guard.service.spec.ts +0 -16
- package/src/lib/AuthingGuard/authing-guard.service.ts +0 -8
- package/src/lib/Guard/guard.component.scss +0 -1
- package/src/lib/Guard/guard.component.spec.ts +0 -24
- package/src/lib/Guard/guard.component.ts +0 -111
- package/src/lib/Guard/guard.module.ts +0 -11
- package/src/lib/Guard/guard.service.spec.ts +0 -16
- package/src/lib/Guard/guard.service.ts +0 -8
- package/src/public-api.ts +0 -46
- package/src/test.ts +0 -26
- package/tsconfig.lib.json +0 -25
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
- package/tslint.json +0 -17
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authing-ng-ui-components.js","sources":["../../../projects/ng-ui-components/src/lib/AuthingGuard/authing-guard.service.ts","../../../projects/ng-ui-components/src/lib/AuthingGuard/authing-guard.component.ts","../../../projects/ng-ui-components/src/lib/AuthingGuard/authing-guard.module.ts","../../../projects/ng-ui-components/src/lib/Guard/guard.service.ts","../../../projects/ng-ui-components/src/lib/Guard/guard.component.ts","../../../projects/ng-ui-components/src/lib/Guard/guard.module.ts","../../../projects/ng-ui-components/src/public-api.ts","../../../projects/ng-ui-components/src/authing-ng-ui-components.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthingGuardService {\n constructor() {}\n}\n","import {\n OnInit,\n Output,\n Component,\n EventEmitter,\n ViewEncapsulation,\n Input,\n OnChanges,\n} from '@angular/core';\nimport {\n UserConfig,\n AuthingGuard,\n GuardEventsHandler,\n} from '@authing/native-js-ui-components';\n\n@Component({\n selector: 'authing-guard',\n template: `<div id=\"authing_guard_container\"></div>`,\n styles: [],\n styleUrls: ['./authing-guard.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class AuthingGuardComponent implements OnInit, OnChanges {\n constructor() {}\n\n guard: AuthingGuard;\n\n ngOnInit(): void {}\n\n ngOnChanges(v) {\n if (v.visible.currentValue) {\n this.guard?.show();\n } else {\n this.guard.hide();\n }\n }\n\n @Input() appId: string;\n @Input() visible?: boolean;\n @Input() tenantId?: string;\n @Input() config?: UserConfig;\n\n @Output() onLoad = new EventEmitter<\n Parameters<GuardEventsHandler['onLoad']>\n >();\n @Output() onLoadError = new EventEmitter<\n Parameters<GuardEventsHandler['onLoadError']>\n >();\n @Output() onLogin = new EventEmitter<\n Parameters<GuardEventsHandler['onLogin']>\n >();\n @Output() onLoginError = new EventEmitter<\n Parameters<GuardEventsHandler['onLoginError']>\n >();\n @Output() onRegister = new EventEmitter<\n Parameters<GuardEventsHandler['onRegister']>\n >();\n @Output() onRegisterError = new EventEmitter<\n Parameters<GuardEventsHandler['onRegisterError']>\n >();\n @Output() onPwdEmailSend = new EventEmitter<\n Parameters<GuardEventsHandler['onPwdEmailSend']>\n >();\n @Output() onPwdEmailSendError = new EventEmitter<\n Parameters<GuardEventsHandler['onPwdEmailSendError']>\n >();\n @Output() onPwdPhoneSend = new EventEmitter<\n Parameters<GuardEventsHandler['onPwdPhoneSend']>\n >();\n @Output() onPwdPhoneSendError = new EventEmitter<\n Parameters<GuardEventsHandler['onPwdPhoneSendError']>\n >();\n @Output() onPwdReset = new EventEmitter<\n Parameters<GuardEventsHandler['onPwdReset']>\n >();\n @Output() onPwdResetError = new EventEmitter<\n Parameters<GuardEventsHandler['onPwdResetError']>\n >();\n @Output() onClose = new EventEmitter<\n Parameters<GuardEventsHandler['onClose']>\n >();\n\n ngAfterViewInit() {\n const guard = new AuthingGuard(this.appId, this.config, this.tenantId);\n\n guard.on('load', (...rest) => this.onLoad.emit(rest));\n guard.on('load-error', (...rest) => this.onLoadError.emit(rest));\n guard.on('login', (...rest) => this.onLogin.emit(rest));\n guard.on('login-error', (...rest) => this.onLoginError.emit(rest));\n guard.on('register', (...rest) => this.onRegister.emit(rest));\n guard.on('register-error', (...rest) => this.onRegisterError.emit(rest));\n guard.on('pwd-email-send', (...rest) => this.onPwdEmailSend.emit(rest));\n guard.on('pwd-email-send-error', (...rest) =>\n this.onPwdEmailSendError.emit(rest)\n );\n guard.on('pwd-phone-send', (...rest) => this.onPwdPhoneSend.emit(rest));\n guard.on('pwd-phone-send-error', (...rest) =>\n this.onPwdPhoneSendError.emit(rest)\n );\n guard.on('pwd-reset', (...rest) => this.onPwdReset.emit(rest));\n guard.on('pwd-reset-error', (...rest) => this.onPwdResetError.emit(rest));\n guard.on('close', (...rest) => this.onClose.emit(rest));\n\n if (this.visible) {\n guard.show();\n }\n\n this.guard = guard;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { AuthingGuardComponent } from './authing-guard.component';\n\n@NgModule({\n declarations: [AuthingGuardComponent],\n imports: [],\n exports: [AuthingGuardComponent],\n})\nexport class AuthingGuardModule {\n constructor() {}\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class GuardService {\n constructor() {}\n}\n","import {\n OnInit,\n Output,\n Component,\n EventEmitter,\n ViewEncapsulation,\n Input,\n OnChanges,\n} from '@angular/core';\n\nimport {\n Guard,\n GuardEventsHandler,\n GuardLocalConfig,\n} from '@authing/native-js-ui-components';\n\n@Component({\n selector: 'authing-guard',\n template: `<div id=\"authing_guard_container\"></div>`,\n styles: [],\n styleUrls: ['./guard.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class GuardComponent implements OnInit, OnChanges {\n constructor() {}\n\n guard: Guard;\n\n ngOnInit(): void {}\n\n ngOnChanges(v) {\n if (v.visible.currentValue) {\n this.guard?.show();\n } else {\n this.guard.hide();\n }\n }\n\n @Input() appId: string;\n @Input() visible?: boolean;\n @Input() tenantId?: string;\n @Input() config?: Partial<GuardLocalConfig>;\n\n @Output() onLoad = new EventEmitter<\n Parameters<GuardEventsHandler['onLoad']>\n >();\n @Output() onLoadError = new EventEmitter<\n Parameters<GuardEventsHandler['onLoadError']>\n >();\n @Output() onLogin = new EventEmitter<\n Parameters<GuardEventsHandler['onLogin']>\n >();\n @Output() onLoginError = new EventEmitter<\n Parameters<GuardEventsHandler['onLoginError']>\n >();\n @Output() onRegister = new EventEmitter<\n Parameters<GuardEventsHandler['onRegister']>\n >();\n @Output() onRegisterError = new EventEmitter<\n Parameters<GuardEventsHandler['onRegisterError']>\n >();\n @Output() onPwdEmailSend = new EventEmitter<\n Parameters<GuardEventsHandler['onPwdEmailSend']>\n >();\n @Output() onPwdEmailSendError = new EventEmitter<\n Parameters<GuardEventsHandler['onPwdEmailSendError']>\n >();\n @Output() onPwdPhoneSend = new EventEmitter<\n Parameters<GuardEventsHandler['onPwdPhoneSend']>\n >();\n @Output() onPwdPhoneSendError = new EventEmitter<\n Parameters<GuardEventsHandler['onPwdPhoneSendError']>\n >();\n @Output() onPwdReset = new EventEmitter<\n Parameters<GuardEventsHandler['onPwdReset']>\n >();\n @Output() onPwdResetError = new EventEmitter<\n Parameters<GuardEventsHandler['onPwdResetError']>\n >();\n @Output() onClose = new EventEmitter<\n Parameters<GuardEventsHandler['onClose']>\n >();\n\n ngAfterViewInit() {\n // @ts-ignore\n const guard = new Guard(this.appId, this.config);\n\n guard.on('load', (...rest) => this.onLoad.emit(rest));\n guard.on('load-error', (...rest) => this.onLoadError.emit(rest));\n guard.on('login', (...rest) => this.onLogin.emit(rest));\n guard.on('login-error', (...rest) => this.onLoginError.emit(rest));\n guard.on('register', (...rest) => this.onRegister.emit(rest));\n guard.on('register-error', (...rest) => this.onRegisterError.emit(rest));\n guard.on('pwd-email-send', (...rest) => this.onPwdEmailSend.emit(rest));\n guard.on('pwd-email-send-error', (...rest) =>\n this.onPwdEmailSendError.emit(rest)\n );\n guard.on('pwd-phone-send', (...rest) => this.onPwdPhoneSend.emit(rest));\n guard.on('pwd-phone-send-error', (...rest) =>\n this.onPwdPhoneSendError.emit(rest)\n );\n guard.on('pwd-reset', (...rest) => this.onPwdReset.emit(rest));\n guard.on('pwd-reset-error', (...rest) => this.onPwdResetError.emit(rest));\n guard.on('close', (...rest) => this.onClose.emit(rest));\n\n if (this.visible) {\n guard.show();\n }\n\n this.guard = guard;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { GuardComponent } from './guard.component';\n\n@NgModule({\n declarations: [GuardComponent],\n imports: [],\n exports: [GuardComponent],\n})\nexport class GuardModule {\n constructor() {}\n}\n","/*\n * Public API Surface of authing-guard\n */\n\nimport {\n User,\n GuardMode,\n GuardScenes,\n LoginMethods,\n getAuthClient,\n CommonMessage,\n initAuthClient,\n RegisterMethods,\n AuthenticationClient,\n GuardEventsHandlerKebab,\n AuthenticationClientOptions,\n UserConfig,\n GuardEventsHandler,\n} from '@authing/native-js-ui-components';\n\nexport * from './lib/AuthingGuard/authing-guard.service';\nexport * from './lib/AuthingGuard/authing-guard.component';\nexport * from './lib/AuthingGuard/authing-guard.module';\n\nexport * from './lib/Guard/guard.service';\nexport * from './lib/Guard/guard.component';\nexport * from './lib/Guard/guard.module';\n\nexport type {\n User,\n UserConfig,\n CommonMessage,\n GuardEventsHandler,\n AuthenticationClient,\n GuardEventsHandlerKebab,\n AuthenticationClientOptions,\n};\n\nexport {\n GuardMode,\n GuardScenes,\n LoginMethods,\n getAuthClient,\n initAuthClient,\n RegisterMethods,\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAKa,mBAAmB;IAC9B,iBAAgB;;;;YAJjB,UAAU,SAAC;gBACV,UAAU,EAAE,MAAM;aACnB;;;;MCkBY,qBAAqB;IAChC;QAmBU,WAAM,GAAG,IAAI,YAAY,EAEhC,CAAC;QACM,gBAAW,GAAG,IAAI,YAAY,EAErC,CAAC;QACM,YAAO,GAAG,IAAI,YAAY,EAEjC,CAAC;QACM,iBAAY,GAAG,IAAI,YAAY,EAEtC,CAAC;QACM,eAAU,GAAG,IAAI,YAAY,EAEpC,CAAC;QACM,oBAAe,GAAG,IAAI,YAAY,EAEzC,CAAC;QACM,mBAAc,GAAG,IAAI,YAAY,EAExC,CAAC;QACM,wBAAmB,GAAG,IAAI,YAAY,EAE7C,CAAC;QACM,mBAAc,GAAG,IAAI,YAAY,EAExC,CAAC;QACM,wBAAmB,GAAG,IAAI,YAAY,EAE7C,CAAC;QACM,eAAU,GAAG,IAAI,YAAY,EAEpC,CAAC;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thingGuard } from '@authing/native-js-ui-components';
|
|
3
|
+
export declare class AuthingGuardComponent implements OnInit, OnChanges {
|
|
4
|
+
constructor();
|
|
5
|
+
guard: AuthingGuard;
|
|
6
|
+
ngOnInit(): void;
|
|
7
|
+
ngOnChanges(v: any): void;
|
|
8
|
+
appId: string;
|
|
9
|
+
visible?: boolean;
|
|
10
|
+
tenantId?: string;
|
|
11
|
+
config?: UserConfig;
|
|
12
|
+
onLoad: EventEmitter<[authClient: import("@authing/native-js-ui-components").AuthenticationClient]>;
|
|
13
|
+
onLoadError: EventEmitter<[error: import("@authing/native-js-ui-components").CommonMessage]>;
|
|
14
|
+
onLogin: EventEmitter<[user: import("@authing/native-js-ui-components").User, authClient: import("@authing/native-js-ui-components").AuthenticationClient]>;
|
|
15
|
+
onLoginError: EventEmitter<[user: import("@authing/native-js-ui-components").User, authClient: import("@authing/native-js-ui-components").AuthenticationClient]>;
|
|
16
|
+
onRegister: EventEmitter<[user: import("@authing/native-js-ui-components").User, authClient: import("@authing/native-js-ui-components").AuthenticationClient]>;
|
|
17
|
+
onRegisterError: EventEmitter<[user: import("@authing/native-js-ui-components").User, authClient: import("@authing/native-js-ui-components").AuthenticationClient]>;
|
|
18
|
+
onPwdEmailSend: EventEmitter<[authClient: import("@authing/native-js-ui-components").AuthenticationClient]>;
|
|
19
|
+
onPwdEmailSendError: EventEmitter<[error: import("@authing/native-js-ui-components").CommonMessage, authClient: import("@authing/native-js-ui-components").AuthenticationClient]>;
|
|
20
|
+
onPwdPhoneSend: EventEmitter<[authClient: import("@authing/native-js-ui-components").AuthenticationClient]>;
|
|
21
|
+
onPwdPhoneSendError: EventEmitter<[error: import("@authing/native-js-ui-components").CommonMessage, authClient: import("@authing/native-js-ui-components").AuthenticationClient]>;
|
|
22
|
+
onPwdReset: EventEmitter<[authClient: import("@authing/native-js-ui-components").AuthenticationClient]>;
|
|
23
|
+
onPwdResetError: EventEmitter<[error: import("@authing/native-js-ui-components").CommonMessage, authClient: import("@authing/native-js-ui-components").AuthenticationClient]>;
|
|
24
|
+
onClose: EventEmitter<[]>;
|
|
25
|
+
ngAfterViewInit(): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { OnInit, EventEmitter, OnChanges } from '@angular/core';
|
|
2
|
+
import { Guard, GuardLocalConfig } from '@authing/native-js-ui-components';
|
|
3
|
+
export declare class GuardComponent implements OnInit, OnChanges {
|
|
4
|
+
constructor();
|
|
5
|
+
guard: Guard;
|
|
6
|
+
ngOnInit(): void;
|
|
7
|
+
ngOnChanges(v: any): void;
|
|
8
|
+
appId: string;
|
|
9
|
+
visible?: boolean;
|
|
10
|
+
tenantId?: string;
|
|
11
|
+
config?: Partial<GuardLocalConfig>;
|
|
12
|
+
onLoad: EventEmitter<[authClient: import("@authing/native-js-ui-components").AuthenticationClient]>;
|
|
13
|
+
onLoadError: EventEmitter<[error: import("@authing/native-js-ui-components").CommonMessage]>;
|
|
14
|
+
onLogin: EventEmitter<[user: import("@authing/native-js-ui-components").User, authClient: import("@authing/native-js-ui-components").AuthenticationClient]>;
|
|
15
|
+
onLoginError: EventEmitter<[user: import("@authing/native-js-ui-components").User, authClient: import("@authing/native-js-ui-components").AuthenticationClient]>;
|
|
16
|
+
onRegister: EventEmitter<[user: import("@authing/native-js-ui-components").User, authClient: import("@authing/native-js-ui-components").AuthenticationClient]>;
|
|
17
|
+
onRegisterError: EventEmitter<[user: import("@authing/native-js-ui-components").User, authClient: import("@authing/native-js-ui-components").AuthenticationClient]>;
|
|
18
|
+
onPwdEmailSend: EventEmitter<[authClient: import("@authing/native-js-ui-components").AuthenticationClient]>;
|
|
19
|
+
onPwdEmailSendError: EventEmitter<[error: import("@authing/native-js-ui-components").CommonMessage, authClient: import("@authing/native-js-ui-components").AuthenticationClient]>;
|
|
20
|
+
onPwdPhoneSend: EventEmitter<[authClient: import("@authing/native-js-ui-components").AuthenticationClient]>;
|
|
21
|
+
onPwdPhoneSendError: EventEmitter<[error: import("@authing/native-js-ui-components").CommonMessage, authClient: import("@authing/native-js-ui-components").AuthenticationClient]>;
|
|
22
|
+
onPwdReset: EventEmitter<[authClient: import("@authing/native-js-ui-components").AuthenticationClient]>;
|
|
23
|
+
onPwdResetError: EventEmitter<[error: import("@authing/native-js-ui-components").CommonMessage, authClient: import("@authing/native-js-ui-components").AuthenticationClient]>;
|
|
24
|
+
onClose: EventEmitter<[]>;
|
|
25
|
+
ngAfterViewInit(): void;
|
|
26
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@authing/ng-ui-components",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.12",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^10.2.0",
|
|
6
6
|
"@angular/core": "^10.2.0"
|
|
@@ -12,5 +12,13 @@
|
|
|
12
12
|
"access": "public",
|
|
13
13
|
"directory": "../../dist/ng-ui-components",
|
|
14
14
|
"registry": "https://registry.npmjs.org"
|
|
15
|
-
}
|
|
15
|
+
},
|
|
16
|
+
"main": "bundles/authing-ng-ui-components.umd.js",
|
|
17
|
+
"module": "fesm2015/authing-ng-ui-components.js",
|
|
18
|
+
"es2015": "fesm2015/authing-ng-ui-components.js",
|
|
19
|
+
"esm2015": "esm2015/authing-ng-ui-components.js",
|
|
20
|
+
"fesm2015": "fesm2015/authing-ng-ui-components.js",
|
|
21
|
+
"typings": "authing-ng-ui-components.d.ts",
|
|
22
|
+
"metadata": "authing-ng-ui-components.metadata.json",
|
|
23
|
+
"sideEffects": false
|
|
16
24
|
}
|
package/public-api.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { User, GuardMode, GuardScenes, LoginMethods, getAuthClient, CommonMessage, initAuthClient, RegisterMethods, AuthenticationClient, GuardEventsHandlerKebab, AuthenticationClientOptions, UserConfig, GuardEventsHandler } from '@authing/native-js-ui-components';
|
|
2
|
+
export * from './lib/AuthingGuard/authing-guard.service';
|
|
3
|
+
export * from './lib/AuthingGuard/authing-guard.component';
|
|
4
|
+
export * from './lib/AuthingGuard/authing-guard.module';
|
|
5
|
+
export * from './lib/Guard/guard.service';
|
|
6
|
+
export * from './lib/Guard/guard.component';
|
|
7
|
+
export * from './lib/Guard/guard.module';
|
|
8
|
+
export type { User, UserConfig, CommonMessage, GuardEventsHandler, AuthenticationClient, GuardEventsHandlerKebab, AuthenticationClientOptions, };
|
|
9
|
+
export { GuardMode, GuardScenes, LoginMethods, getAuthClient, initAuthClient, RegisterMethods, };
|
package/karma.conf.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
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
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import "~@authing/native-js-ui-components/lib/index.min";
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,110 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import "~@authing/native-js-ui-components/lib/index.min";
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,111 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
-
});
|
package/src/public-api.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
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);
|
package/tsconfig.lib.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
}
|