mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-04 00:13:06 +08:00
fix(app-rate): add missing types for onButtonClicked callback (#3616)
This commit is contained in:
parent
3d7b777b19
commit
4fb07fa809
@ -14,7 +14,7 @@ export enum AppRateReviewTypeIos {
|
||||
/**
|
||||
* Open the store using the openUrl preference (defaults to InAppBrowser). Be advised that WKWebView might not open the app store links
|
||||
*/
|
||||
InAppBrowser = 'InAppBrowser'
|
||||
InAppBrowser = 'InAppBrowser',
|
||||
}
|
||||
|
||||
export enum AppRateReviewTypeAndroid {
|
||||
@ -28,6 +28,23 @@ export enum AppRateReviewTypeAndroid {
|
||||
InAppBrowser = 'InAppBrowser',
|
||||
}
|
||||
|
||||
export enum AppRatePromptType {
|
||||
/**
|
||||
* Prompt asking to rate the app.
|
||||
*/
|
||||
AppRatingPrompt = 'AppRatingPrompt',
|
||||
|
||||
/**
|
||||
* Prompt asking to rate the app within the store.
|
||||
*/
|
||||
StoreRatingPrompt = 'StoreRatingPrompt',
|
||||
|
||||
/**
|
||||
* Prompt asking to give feedback.
|
||||
*/
|
||||
FeedbackPrompt = 'FeedbackPrompt',
|
||||
}
|
||||
|
||||
export interface AppRatePreferences {
|
||||
/**
|
||||
* Custom BCP 47 language tag
|
||||
@ -54,13 +71,13 @@ export interface AppRatePreferences {
|
||||
* the type of review display to show the user on iOS
|
||||
* Default: AppStoreReview
|
||||
*/
|
||||
ios?: AppRateReviewTypeIos
|
||||
ios?: AppRateReviewTypeIos;
|
||||
/**
|
||||
* the type of review display to show the user on Android
|
||||
* Default: InAppBrowser
|
||||
*/
|
||||
android?: AppRateReviewTypeAndroid
|
||||
}
|
||||
android?: AppRateReviewTypeAndroid;
|
||||
};
|
||||
|
||||
/**
|
||||
* Simple Mode to display the rate dialog directly and bypass negative feedback filtering flow
|
||||
@ -139,18 +156,18 @@ export interface AppRateCustomLocale {
|
||||
}
|
||||
|
||||
export interface AppRateLocales {
|
||||
addLocale(localeObject: AppRateCustomLocale): AppRateCustomLocale
|
||||
addLocale(localeObject: AppRateCustomLocale): AppRateCustomLocale;
|
||||
|
||||
getLocale(language: string, applicationTitle?: string, customLocale?: AppRateCustomLocale)
|
||||
getLocale(language: string, applicationTitle?: string, customLocale?: AppRateCustomLocale);
|
||||
|
||||
getLocalesNames(): { [prop: string]: AppRateCustomLocale; }
|
||||
getLocalesNames(): { [prop: string]: AppRateCustomLocale };
|
||||
}
|
||||
|
||||
export interface AppRateCallbacks {
|
||||
/**
|
||||
* call back function. called when user clicked on rate-dialog buttons
|
||||
*/
|
||||
onButtonClicked?: (buttonIndex: number) => void;
|
||||
onButtonClicked?: (buttonIndex: number, buttonLabel: string, promptType: AppRatePromptType) => void;
|
||||
|
||||
/**
|
||||
* call back function. called when rate-dialog showing
|
||||
@ -284,11 +301,9 @@ export class AppRate extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Immediately send the user to the app store rating page
|
||||
*/
|
||||
@Cordova()
|
||||
navigateToAppStore(): void {
|
||||
}
|
||||
navigateToAppStore(): void {}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user