nativescript-oauth2
Advanced tools
Comparing version 1.4.3 to 1.5.3
{ | ||
"name": "nativescript-oauth2", | ||
"version": "1.4.3", | ||
"version": "1.5.3", | ||
"description": "OAuth 2 generic authorization plugin for NativeScript that doesn't install third party native libraries", | ||
@@ -38,3 +38,3 @@ "main": "oauth", | ||
"demo-custom-provider.reset": "cd ../demo-custom-provider && npx rimraf -- hooks node_modules platforms package-lock.json", | ||
"plugin.prepare": "npm run build && cd ../demo && tns plugin remove nativescript-oauth && tns plugin add ../src", | ||
"plugin.prepare": "npm run build && cd ../demo && tns plugin remove nativescript-oauth2 && tns plugin add ../src", | ||
"clean": "npm run demo.reset && npm run demo-angular.reset && npm run demo-vue.reset && npm run demo-custom-provider.reset && npx rimraf -- node_modules package-lock.json && npm i", | ||
@@ -75,3 +75,3 @@ "ci.tslint": "npm i && tslint '**/*.ts' --config '../tslint.json' --exclude '**/node_modules/**'" | ||
"rimraf": "^2.6.2", | ||
"tslint": "^5.11.0", | ||
"tslint": "5.18.0", | ||
"semver": "^5.5.0" | ||
@@ -78,0 +78,0 @@ }, |
@@ -6,2 +6,6 @@ "use strict"; | ||
var tns_oauth_login_sub_controller_1 = require("./tns-oauth-login-sub-controller"); | ||
function useAndroidX() { | ||
return global.androidx && global.androidx.appcompat; | ||
} | ||
var customtabs = useAndroidX() ? androidx.browser.customtabs : android.support.customtabs; | ||
var TnsOAuthLoginNativeViewController = (function () { | ||
@@ -23,3 +27,3 @@ function TnsOAuthLoginNativeViewController() { | ||
TnsOAuthLoginNativeViewController.prototype.loginInternalWithParametersCompletion = function (fullUrl, frame) { | ||
var builder = new android.support.customtabs.CustomTabsIntent.Builder(); | ||
var builder = new customtabs.CustomTabsIntent.Builder(); | ||
builder.setToolbarColor(new colorModule.Color("#335da0").android); | ||
@@ -26,0 +30,0 @@ builder.setShowTitle(true); |
@@ -34,3 +34,3 @@ declare namespace android { | ||
export class CustomTabsSession {} | ||
export class CustomTabsSession { } | ||
@@ -50,1 +50,50 @@ export class CustomTabsClient { | ||
} | ||
declare namespace androidx { | ||
export namespace browser { | ||
export namespace customtabs { | ||
export class CustomTabsIntent { | ||
launchUrl(context: android.content.Context, url: android.net.Uri): void; | ||
} | ||
namespace CustomTabsIntent { | ||
export class Builder { | ||
constructor(); | ||
constructor(session: CustomTabsSession); | ||
build(): androidx.browser.customtabs.CustomTabsIntent; | ||
setShowTitle(showTitle: boolean): this; | ||
setToolbarColor(color: number): this; | ||
addDefaultShareMenuItem(): this; | ||
enableUrlBarHiding(): this; | ||
} | ||
} | ||
interface ICustomTabsServiceConnection { | ||
onCustomTabsServiceConnected( | ||
name: android.content.ComponentName, | ||
client: CustomTabsClient | ||
): void; | ||
onServiceDisconnected(name: android.content.ComponentName): void; | ||
} | ||
export class CustomTabsServiceConnection { | ||
constructor(); | ||
static extend<T extends typeof CustomTabsServiceConnection>( | ||
implementation: ICustomTabsServiceConnection | ||
): T; | ||
} | ||
export class CustomTabsSession { } | ||
export class CustomTabsClient { | ||
warmup(flags: number): boolean; | ||
newSession(callback: any): CustomTabsSession; | ||
static bindCustomTabsService( | ||
context: android.content.Context, | ||
packageName: String, | ||
connection: CustomTabsServiceConnection | ||
): boolean; | ||
} | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
105360
1191