woocommerce/plugins/woocommerce-admin/client/typings/global.d.ts

87 lines
2.1 KiB
TypeScript
Raw Normal View History

declare global {
interface Window {
location: Location;
pagenow: string;
adminpage: string;
wcSettings: {
preloadOptions: Record< string, unknown >;
adminUrl: string;
currentUserId: number;
currentThemeIsFSETheme: boolean;
admin: {
wcpay_welcome_page_connect_nonce: string;
currentUserData: {
first_name: string;
};
wcpayWelcomePageIncentive: {
id: string;
description: string;
cta_label: string;
tc_url: string;
};
currency?: {
symbol: string;
};
currentUserId: number;
};
};
wcAdminFeatures: {
'activity-panels': boolean;
analytics: boolean;
coupons: boolean;
homescreen: boolean;
marketing: boolean;
'minified-js': boolean;
'mobile-app-banner': boolean;
navigation: boolean;
onboarding: boolean;
'onboarding-tasks': boolean;
'payment-gateway-suggestions': boolean;
'pattern-toolkit-full-composability': boolean;
'product-pre-publish-modal': boolean;
'product-custom-fields': boolean;
'remote-inbox-notifications': boolean;
'remote-free-extensions': boolean;
settings: boolean;
'shipping-label-banner': boolean;
subscriptions: boolean;
'store-alerts': boolean;
'transient-notices': boolean;
'wc-pay-promotion': boolean;
'wc-pay-welcome-page': boolean;
'woo-mobile-welcome': boolean;
'shipping-smart-defaults': boolean;
'shipping-setting-tour': boolean;
'launch-your-store': boolean;
};
wp: {
My subscription product updates (#40752) * Marketplace: Populate the table rows with components * Marketplace: add links to dropdown menu and fix fallback product icons * Marketplace: fix popover width * Add My subscriptions install (#40630) * Marketplace: add plugin install from the subscriptions page Co-authored-by: berislav grgičak <berislav.grgicak@gmail.com> * Marketplace: Use the activation function to show install button --------- Co-authored-by: raicem <unalancem@gmail.com> * Add WP updates script to the extensions page * Add update button * Add update data to subscriptions * Update plugins * Prevent update if license unavailable * Add changefile(s) from automation for the following project(s): woocommerce * Remove all data from API * Linter fixes * Linter fixes * Remove merge string * Update link style * Add comment for updates.js * Prevent updates if required data is missing * Return removed slug code * My subscriptions action modals (#40934) * Add renew modal * Update install to run until new data loaded * Add activate modal * Add connect modal * Add renew button * Renewal button * Rename activate to connect * Add subscribe button * Add action buttons * Remove unused const * Add changefile(s) from automation for the following project(s): woocommerce * Update plugins/woocommerce-admin/client/marketplace/components/my-subscriptions/my-subscriptions.scss Co-authored-by: And Finally <andfinally@users.noreply.github.com> * Update import path --------- Co-authored-by: And Finally <andfinally@users.noreply.github.com> Co-authored-by: github-actions <github-actions@github.com> --------- Co-authored-by: raicem <unalancem@gmail.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: And Finally <andfinally@users.noreply.github.com>
2023-10-27 04:08:27 +00:00
updates?: {
ajax: ( action, data: {
Update/my subscriptions wp installer (#40990) * Marketplace: Populate the table rows with components * Marketplace: add links to dropdown menu and fix fallback product icons * Marketplace: fix popover width * Add My subscriptions install (#40630) * Marketplace: add plugin install from the subscriptions page Co-authored-by: berislav grgičak <berislav.grgicak@gmail.com> * Marketplace: Use the activation function to show install button --------- Co-authored-by: raicem <unalancem@gmail.com> * Add WP updates script to the extensions page * Add update button * Add update data to subscriptions * Update plugins * Prevent update if license unavailable * Add changefile(s) from automation for the following project(s): woocommerce * Remove all data from API * Linter fixes * Linter fixes * Remove merge string * Update link style * Add comment for updates.js * Prevent updates if required data is missing * Return removed slug code * Add renew modal * Update install to run until new data loaded * Add activate modal * Add connect modal * Add renew button * Renewal button * Rename activate to connect * Add subscribe button * Add action buttons * Remove unused const * Add changefile(s) from automation for the following project(s): woocommerce * Switch to WP installer * Use WP installer * Remove install endpoint * Fix php warning * Add download_link if subscription exists * My subscriptions action modals (#40934) * Add renew modal * Update install to run until new data loaded * Add activate modal * Add connect modal * Add renew button * Renewal button * Rename activate to connect * Add subscribe button * Add action buttons * Remove unused const * Add changefile(s) from automation for the following project(s): woocommerce * Update plugins/woocommerce-admin/client/marketplace/components/my-subscriptions/my-subscriptions.scss Co-authored-by: And Finally <andfinally@users.noreply.github.com> * Update import path --------- Co-authored-by: And Finally <andfinally@users.noreply.github.com> Co-authored-by: github-actions <github-actions@github.com> * Use product slugs for installing * Add store for installing state * Add theme install support * Product activate endpoint * Activate after install * PHP warning * Update context * Debugging * Install context * Linter * Simplify context * Use Redux instead of context * Add changefile(s) from automation for the following project(s): woocommerce * Replace ~ with relative paths * Remove unnecessary is_null check --------- Co-authored-by: raicem <unalancem@gmail.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: And Finally <andfinally@users.noreply.github.com>
2023-11-06 08:35:43 +00:00
slug?: string;
My subscription product updates (#40752) * Marketplace: Populate the table rows with components * Marketplace: add links to dropdown menu and fix fallback product icons * Marketplace: fix popover width * Add My subscriptions install (#40630) * Marketplace: add plugin install from the subscriptions page Co-authored-by: berislav grgičak <berislav.grgicak@gmail.com> * Marketplace: Use the activation function to show install button --------- Co-authored-by: raicem <unalancem@gmail.com> * Add WP updates script to the extensions page * Add update button * Add update data to subscriptions * Update plugins * Prevent update if license unavailable * Add changefile(s) from automation for the following project(s): woocommerce * Remove all data from API * Linter fixes * Linter fixes * Remove merge string * Update link style * Add comment for updates.js * Prevent updates if required data is missing * Return removed slug code * My subscriptions action modals (#40934) * Add renew modal * Update install to run until new data loaded * Add activate modal * Add connect modal * Add renew button * Renewal button * Rename activate to connect * Add subscribe button * Add action buttons * Remove unused const * Add changefile(s) from automation for the following project(s): woocommerce * Update plugins/woocommerce-admin/client/marketplace/components/my-subscriptions/my-subscriptions.scss Co-authored-by: And Finally <andfinally@users.noreply.github.com> * Update import path --------- Co-authored-by: And Finally <andfinally@users.noreply.github.com> Co-authored-by: github-actions <github-actions@github.com> --------- Co-authored-by: raicem <unalancem@gmail.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: And Finally <andfinally@users.noreply.github.com>
2023-10-27 04:08:27 +00:00
plugin?: string;
theme?: string;
success?: function;
error?: function;
} ) => JQuery.Promise;
};
autosave?: {
server: {
postChanged: () => boolean;
};
};
};
tinymce?: {
get: ( name: string ) => {
isHidden: () => boolean;
isDirty: () => boolean;
};
};
getUserSetting?: ( name: string ) => string | undefined;
setUserSetting?: ( name: string, value: string ) => void;
deleteUserSetting?: ( name: string ) => void;
}
}
/*~ If your module exports nothing, you'll need this line. Otherwise, delete it */
export {};