rebase on oct-10-2023

This commit is contained in:
Rachit Bhargava
2023-10-10 17:23:21 -04:00
parent d37566ffb6
commit d096058d7d
4789 changed files with 254611 additions and 307223 deletions

View File

@@ -74,6 +74,7 @@ var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external
/**
* Dispatches a control action for triggering an api fetch call.
*
@@ -93,7 +94,6 @@ var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external
*
* @return {Object} The control descriptor.
*/
function apiFetch(request) {
return {
type: 'API_FETCH',
@@ -104,43 +104,49 @@ function apiFetch(request) {
* Control for resolving a selector in a registered data store.
* Alias for the `resolveSelect` built-in control in the `@wordpress/data` package.
*
* @param {Array} args Arguments passed without change to the `@wordpress/data` control.
* @param storeNameOrDescriptor The store object or identifier.
* @param selectorName The selector name.
* @param args Arguments passed without change to the `@wordpress/data` control.
*/
function build_module_select() {
function build_module_select(storeNameOrDescriptor, selectorName, ...args) {
external_wp_deprecated_default()('`select` control in `@wordpress/data-controls`', {
since: '5.7',
alternative: 'built-in `resolveSelect` control in `@wordpress/data`'
});
return external_wp_data_namespaceObject.controls.resolveSelect(...arguments);
return external_wp_data_namespaceObject.controls.resolveSelect(storeNameOrDescriptor, selectorName, ...args);
}
/**
* Control for calling a selector in a registered data store.
* Alias for the `select` built-in control in the `@wordpress/data` package.
*
* @param {Array} args Arguments passed without change to the `@wordpress/data` control.
* @param storeNameOrDescriptor The store object or identifier.
* @param selectorName The selector name.
* @param args Arguments passed without change to the `@wordpress/data` control.
*/
function syncSelect() {
function syncSelect(storeNameOrDescriptor, selectorName, ...args) {
external_wp_deprecated_default()('`syncSelect` control in `@wordpress/data-controls`', {
since: '5.7',
alternative: 'built-in `select` control in `@wordpress/data`'
});
return external_wp_data_namespaceObject.controls.select(...arguments);
return external_wp_data_namespaceObject.controls.select(storeNameOrDescriptor, selectorName, ...args);
}
/**
* Control for dispatching an action in a registered data store.
* Alias for the `dispatch` control in the `@wordpress/data` package.
*
* @param {Array} args Arguments passed without change to the `@wordpress/data` control.
* @param storeNameOrDescriptor The store object or identifier.
* @param actionName The action name.
* @param args Arguments passed without change to the `@wordpress/data` control.
*/
function dispatch() {
function dispatch(storeNameOrDescriptor, actionName, ...args) {
external_wp_deprecated_default()('`dispatch` control in `@wordpress/data-controls`', {
since: '5.7',
alternative: 'built-in `dispatch` control in `@wordpress/data`'
});
return external_wp_data_namespaceObject.controls.dispatch(...arguments);
return external_wp_data_namespaceObject.controls.dispatch(storeNameOrDescriptor, actionName, ...args);
}
/**
* Dispatches a control action for awaiting on a promise to be resolved.
@@ -197,17 +203,13 @@ const __unstableAwaitPromise = function (promise) {
*/
const controls = {
AWAIT_PROMISE: _ref => {
let {
promise
} = _ref;
return promise;
},
AWAIT_PROMISE: ({
promise
}) => promise,
API_FETCH(_ref2) {
let {
request
} = _ref2;
API_FETCH({
request
}) {
return external_wp_apiFetch_default()(request);
}