PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.9
GiveWP – Donation Plugin and Fundraising Platform v4.16.9
4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 All 255 releases
give / src / Campaigns / resources / types.ts

types.ts in GiveWP – Donation Plugin and Fundraising Platform 4.16.9, at src/Campaigns/resources/types.ts

63 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * @since 4.0.0
3 */
4 export type Notification = {
5 id: string;
6 content: string | JSX.Element | Function;
7 notificationType?: 'notice' | 'snackbar';
8 type?: 'error' | 'warning' | 'info' | 'success';
9 isDismissible?: boolean;
10 autoHide?: boolean;
11 onDismiss?: () => void;
12 duration?: number,
13 }
14
15 /**
16 * @since 4.0.0
17 */
18 declare module "@wordpress/data" {
19 export function select(key: 'givewp/campaign-notifications'): {
20 getNotifications(): Notification[],
21 getNotificationsByType(type: 'snackbar' | 'notice'): Notification[]
22 };
23
24 export function dispatch(key: 'givewp/campaign-notifications'): {
25 addSnackbarNotice(notification: Notification): void,
26 addNotice(notification: Notification): void,
27 dismissNotification(id: string): void
28 };
29 }
30
31 /**
32 * @since 4.0.0
33 */
34 export type GiveCampaignOptions = {
35 isAdmin: boolean;
36 adminUrl: string;
37 apiRoot: string;
38 apiNonce: string;
39 campaignsAdminUrl: string;s
40 currency: string;
41 isRecurringEnabled: boolean;
42 defaultForm: string;
43 admin: {
44 showCampaignInteractionNotice: boolean
45 showFormGoalNotice: boolean
46 showExistingUserIntroNotice: boolean
47 showCampaignListTableNotice: boolean
48 showCampaignFormNotice: boolean
49 showCampaignSettingsNotice: boolean
50 }
51 }
52
53 /**
54 * @since 4.0.0
55 */
56 export type GoalType =
57 'amount'
58 | 'donations'
59 | 'donors'
60 | 'amountFromSubscriptions'
61 | 'subscriptions'
62 | 'donorsFromSubscriptions';
63