mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-04-26 12:50:19 +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
|
* 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 {
|
export enum AppRateReviewTypeAndroid {
|
||||||
@ -28,6 +28,23 @@ export enum AppRateReviewTypeAndroid {
|
|||||||
InAppBrowser = 'InAppBrowser',
|
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 {
|
export interface AppRatePreferences {
|
||||||
/**
|
/**
|
||||||
* Custom BCP 47 language tag
|
* Custom BCP 47 language tag
|
||||||
@ -54,14 +71,14 @@ export interface AppRatePreferences {
|
|||||||
* the type of review display to show the user on iOS
|
* the type of review display to show the user on iOS
|
||||||
* Default: AppStoreReview
|
* Default: AppStoreReview
|
||||||
*/
|
*/
|
||||||
ios?: AppRateReviewTypeIos
|
ios?: AppRateReviewTypeIos;
|
||||||
/**
|
/**
|
||||||
* the type of review display to show the user on Android
|
* the type of review display to show the user on Android
|
||||||
* Default: InAppBrowser
|
* Default: InAppBrowser
|
||||||
*/
|
*/
|
||||||
android?: AppRateReviewTypeAndroid
|
android?: AppRateReviewTypeAndroid;
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple Mode to display the rate dialog directly and bypass negative feedback filtering flow
|
* Simple Mode to display the rate dialog directly and bypass negative feedback filtering flow
|
||||||
*/
|
*/
|
||||||
@ -71,7 +88,7 @@ export interface AppRatePreferences {
|
|||||||
* Disabling would skip displaying a rate dialog if in app review is set and available. Defaults to `true`
|
* Disabling would skip displaying a rate dialog if in app review is set and available. Defaults to `true`
|
||||||
*/
|
*/
|
||||||
showPromptForInAppReview?: boolean;
|
showPromptForInAppReview?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* leave app or no when application page opened in app store (now supported only for iOS). Defaults to `false`
|
* leave app or no when application page opened in app store (now supported only for iOS). Defaults to `false`
|
||||||
*/
|
*/
|
||||||
@ -139,18 +156,18 @@ export interface AppRateCustomLocale {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface AppRateLocales {
|
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 {
|
export interface AppRateCallbacks {
|
||||||
/**
|
/**
|
||||||
* call back function. called when user clicked on rate-dialog buttons
|
* 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
|
* call back function. called when rate-dialog showing
|
||||||
@ -284,11 +301,9 @@ export class AppRate extends IonicNativePlugin {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Immediately send the user to the app store rating page
|
* Immediately send the user to the app store rating page
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
navigateToAppStore(): void {
|
navigateToAppStore(): void {}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user