@ts-core/oauth 3.0.14 → 3.0.15
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/cjs/OAuthBase.d.ts +3 -2
- package/cjs/OAuthBase.js +2 -1
- package/esm/OAuthBase.d.ts +3 -2
- package/esm/OAuthBase.js +2 -1
- package/package.json +1 -1
package/cjs/OAuthBase.d.ts
CHANGED
|
@@ -3,13 +3,14 @@ export declare abstract class OAuthBase<T = any> extends LoggerWrapper {
|
|
|
3
3
|
protected applicationId: string;
|
|
4
4
|
protected window?: Window;
|
|
5
5
|
static ERROR_WINDOW_CLOSED: string;
|
|
6
|
+
popUpWidth: number;
|
|
7
|
+
popUpHeight: number;
|
|
8
|
+
popUpTarget: string;
|
|
6
9
|
redirectUri: string;
|
|
7
10
|
protected http: TransportHttp;
|
|
8
11
|
protected timer: any;
|
|
9
12
|
protected popUp: Window;
|
|
10
13
|
protected promise: PromiseHandler<IOAuthDto>;
|
|
11
|
-
protected popUpWidth: number;
|
|
12
|
-
protected popUpHeight: number;
|
|
13
14
|
protected responseType: string;
|
|
14
15
|
protected _urlParams: Map<string, string>;
|
|
15
16
|
constructor(logger: ILogger, applicationId: string, window?: Window);
|
package/cjs/OAuthBase.js
CHANGED
|
@@ -19,6 +19,7 @@ class OAuthBase extends common_1.LoggerWrapper {
|
|
|
19
19
|
this.window = window;
|
|
20
20
|
this.popUpWidth = 430;
|
|
21
21
|
this.popUpHeight = 520;
|
|
22
|
+
this.popUpTarget = '_blank';
|
|
22
23
|
this.checkPopUp = () => {
|
|
23
24
|
if (_.isNil(this.popUp) || this.popUp.closed) {
|
|
24
25
|
this.close();
|
|
@@ -62,7 +63,7 @@ class OAuthBase extends common_1.LoggerWrapper {
|
|
|
62
63
|
let window = this.window;
|
|
63
64
|
let top = (window.screen.height - this.popUpHeight) / 2;
|
|
64
65
|
let left = (window.screen.width - this.popUpWidth) / 2;
|
|
65
|
-
let item = window.open(this.getUrl(),
|
|
66
|
+
let item = window.open(this.getUrl(), this.popUpTarget, `scrollbars=yes,width=${this.popUpWidth},height=${this.popUpHeight},top=${top},left=${left}`);
|
|
66
67
|
item.focus();
|
|
67
68
|
return item;
|
|
68
69
|
}
|
package/esm/OAuthBase.d.ts
CHANGED
|
@@ -3,13 +3,14 @@ export declare abstract class OAuthBase<T = any> extends LoggerWrapper {
|
|
|
3
3
|
protected applicationId: string;
|
|
4
4
|
protected window?: Window;
|
|
5
5
|
static ERROR_WINDOW_CLOSED: string;
|
|
6
|
+
popUpWidth: number;
|
|
7
|
+
popUpHeight: number;
|
|
8
|
+
popUpTarget: string;
|
|
6
9
|
redirectUri: string;
|
|
7
10
|
protected http: TransportHttp;
|
|
8
11
|
protected timer: any;
|
|
9
12
|
protected popUp: Window;
|
|
10
13
|
protected promise: PromiseHandler<IOAuthDto>;
|
|
11
|
-
protected popUpWidth: number;
|
|
12
|
-
protected popUpHeight: number;
|
|
13
14
|
protected responseType: string;
|
|
14
15
|
protected _urlParams: Map<string, string>;
|
|
15
16
|
constructor(logger: ILogger, applicationId: string, window?: Window);
|
package/esm/OAuthBase.js
CHANGED
|
@@ -16,6 +16,7 @@ export class OAuthBase extends LoggerWrapper {
|
|
|
16
16
|
this.window = window;
|
|
17
17
|
this.popUpWidth = 430;
|
|
18
18
|
this.popUpHeight = 520;
|
|
19
|
+
this.popUpTarget = '_blank';
|
|
19
20
|
this.checkPopUp = () => {
|
|
20
21
|
if (_.isNil(this.popUp) || this.popUp.closed) {
|
|
21
22
|
this.close();
|
|
@@ -59,7 +60,7 @@ export class OAuthBase extends LoggerWrapper {
|
|
|
59
60
|
let window = this.window;
|
|
60
61
|
let top = (window.screen.height - this.popUpHeight) / 2;
|
|
61
62
|
let left = (window.screen.width - this.popUpWidth) / 2;
|
|
62
|
-
let item = window.open(this.getUrl(),
|
|
63
|
+
let item = window.open(this.getUrl(), this.popUpTarget, `scrollbars=yes,width=${this.popUpWidth},height=${this.popUpHeight},top=${top},left=${left}`);
|
|
63
64
|
item.focus();
|
|
64
65
|
return item;
|
|
65
66
|
}
|