@ts-core/oauth 3.0.20 → 3.0.21

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.
@@ -1,3 +1,3 @@
1
1
  import { IOAuthPopUpDto, OAuthBase } from '../OAuthBase';
2
- export declare const backendPropertiesSet: (item: OAuthBase, redirectUri: string, method: IOAuthBackendMethod, timeout?: number) => void;
2
+ export declare const OAuthBackendPropertiesSet: (item: OAuthBase, redirectUri: string, method: IOAuthBackendMethod, timeout?: number) => void;
3
3
  export type IOAuthBackendMethod = (state: string) => Promise<IOAuthPopUpDto>;
@@ -9,12 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.backendPropertiesSet = void 0;
12
+ exports.OAuthBackendPropertiesSet = void 0;
13
13
  const common_1 = require("@ts-core/common");
14
14
  const rxjs_1 = require("rxjs");
15
- const backendPropertiesSet = (item, redirectUri, method, timeout = common_1.DateUtil.MILLISECONDS_SECOND) => {
15
+ const OAuthBackendPropertiesSet = (item, redirectUri, method, timeout = common_1.DateUtil.MILLISECONDS_SECOND) => {
16
16
  item.redirectUri = redirectUri;
17
17
  item.popUpIsCheckClose = false;
18
- item.popUpOpened.pipe((0, rxjs_1.delay)(timeout), (0, rxjs_1.takeUntil)(item.destroyed)).subscribe(() => __awaiter(void 0, void 0, void 0, function* () { return item.parsePopUpResult(yield method(item.state)); }));
18
+ item.popUpOpened.pipe((0, rxjs_1.delay)(timeout), (0, rxjs_1.takeUntil)(item.destroyed)).subscribe(() => __awaiter(void 0, void 0, void 0, function* () { return item.parsePopUpResult(yield method.call(this, item.state)); }));
19
19
  };
20
- exports.backendPropertiesSet = backendPropertiesSet;
20
+ exports.OAuthBackendPropertiesSet = OAuthBackendPropertiesSet;
@@ -1,2 +1,2 @@
1
1
  import { OAuthBase } from '../OAuthBase';
2
- export declare const cordovaPropertiesSet: (item: OAuthBase, packageName: string) => void;
2
+ export declare const OAuthCordovaPropertiesSet: (item: OAuthBase, packageName: string) => void;
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.cordovaPropertiesSet = void 0;
3
+ exports.OAuthCordovaPropertiesSet = void 0;
4
4
  const OAuthParser_1 = require("../OAuthParser");
5
5
  const _ = require("lodash");
6
- const cordovaPropertiesSet = (item, packageName) => {
6
+ const OAuthCordovaPropertiesSet = (item, packageName) => {
7
7
  item.popUpTarget = 'oauth:cordova';
8
8
  item.redirectUri = `${packageName}://oauth_callback`;
9
9
  item.popUpIsCheckClose = false;
10
10
  item.popUpMessageParser = cordovaPopUpMessageParser;
11
11
  };
12
- exports.cordovaPropertiesSet = cordovaPropertiesSet;
12
+ exports.OAuthCordovaPropertiesSet = OAuthCordovaPropertiesSet;
13
13
  function cordovaPopUpMessageParser(event) {
14
14
  let data = event.data;
15
15
  let prefix = 'oauth::';
@@ -1,3 +1,3 @@
1
1
  import { IOAuthPopUpDto, OAuthBase } from '../OAuthBase';
2
- export declare const backendPropertiesSet: (item: OAuthBase, redirectUri: string, method: IOAuthBackendMethod, timeout?: number) => void;
2
+ export declare const OAuthBackendPropertiesSet: (item: OAuthBase, redirectUri: string, method: IOAuthBackendMethod, timeout?: number) => void;
3
3
  export type IOAuthBackendMethod = (state: string) => Promise<IOAuthPopUpDto>;
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { DateUtil } from '@ts-core/common';
11
11
  import { delay, takeUntil } from 'rxjs';
12
- export const backendPropertiesSet = (item, redirectUri, method, timeout = DateUtil.MILLISECONDS_SECOND) => {
12
+ export const OAuthBackendPropertiesSet = (item, redirectUri, method, timeout = DateUtil.MILLISECONDS_SECOND) => {
13
13
  item.redirectUri = redirectUri;
14
14
  item.popUpIsCheckClose = false;
15
- item.popUpOpened.pipe(delay(timeout), takeUntil(item.destroyed)).subscribe(() => __awaiter(void 0, void 0, void 0, function* () { return item.parsePopUpResult(yield method(item.state)); }));
15
+ item.popUpOpened.pipe(delay(timeout), takeUntil(item.destroyed)).subscribe(() => __awaiter(void 0, void 0, void 0, function* () { return item.parsePopUpResult(yield method.call(this, item.state)); }));
16
16
  };
@@ -1,2 +1,2 @@
1
1
  import { OAuthBase } from '../OAuthBase';
2
- export declare const cordovaPropertiesSet: (item: OAuthBase, packageName: string) => void;
2
+ export declare const OAuthCordovaPropertiesSet: (item: OAuthBase, packageName: string) => void;
@@ -1,6 +1,6 @@
1
1
  import { OAuthParser } from '../OAuthParser';
2
2
  import * as _ from 'lodash';
3
- export const cordovaPropertiesSet = (item, packageName) => {
3
+ export const OAuthCordovaPropertiesSet = (item, packageName) => {
4
4
  item.popUpTarget = 'oauth:cordova';
5
5
  item.redirectUri = `${packageName}://oauth_callback`;
6
6
  item.popUpIsCheckClose = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ts-core/oauth",
3
- "version": "3.0.20",
3
+ "version": "3.0.21",
4
4
  "description": "Classes and utils for oauth",
5
5
  "main": "./cjs/public-api.js",
6
6
  "module": "./esm/public-api.js",