File Editor
Directories:
.. (Back)
development
vendor
Files:
a11y.js
a11y.min.js
annotations.js
annotations.min.js
api-fetch.js
api-fetch.min.js
autop.js
autop.min.js
blob.js
blob.min.js
block-directory.js
block-directory.min.js
block-editor.js
block-editor.min.js
block-library.js
block-library.min.js
block-serialization-default-parser.js
block-serialization-default-parser.min.js
blocks.js
blocks.min.js
commands.js
commands.min.js
components.js
components.min.js
compose.js
compose.min.js
core-commands.js
core-commands.min.js
core-data.js
core-data.min.js
customize-widgets.js
customize-widgets.min.js
data-controls.js
data-controls.min.js
data.js
data.min.js
date.js
date.min.js
deprecated.js
deprecated.min.js
dom-ready.js
dom-ready.min.js
dom.js
dom.min.js
edit-post.js
edit-post.min.js
edit-site.js
edit-site.min.js
edit-widgets.js
edit-widgets.min.js
editor.js
editor.min.js
element.js
element.min.js
escape-html.js
escape-html.min.js
format-library.js
format-library.min.js
hooks.js
hooks.min.js
html-entities.js
html-entities.min.js
i18n.js
i18n.min.js
interactivity-router.asset.php
interactivity-router.js
interactivity-router.min.asset.php
interactivity-router.min.js
interactivity.js
interactivity.min.js
is-shallow-equal.js
is-shallow-equal.min.js
keyboard-shortcuts.js
keyboard-shortcuts.min.js
keycodes.js
keycodes.min.js
list-reusable-blocks.js
list-reusable-blocks.min.js
media-utils.js
media-utils.min.js
notices.js
notices.min.js
nux.js
nux.min.js
patterns.js
patterns.min.js
plugins.js
plugins.min.js
preferences-persistence.js
preferences-persistence.min.js
preferences.js
preferences.min.js
primitives.js
primitives.min.js
priority-queue.js
priority-queue.min.js
private-apis.js
private-apis.min.js
redux-routine.js
redux-routine.min.js
reusable-blocks.js
reusable-blocks.min.js
rich-text.js
rich-text.min.js
router.js
router.min.js
server-side-render.js
server-side-render.min.js
shortcode.js
shortcode.min.js
style-engine.js
style-engine.min.js
token-list.js
token-list.min.js
undo-manager.js
undo-manager.min.js
url.js
url.min.js
viewport.js
viewport.min.js
warning.js
warning.min.js
widgets.js
widgets.min.js
wordcount.js
wordcount.min.js
Create New File
Create
Edit File: data-controls.js
/******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ // The require scope /******/ var __webpack_require__ = {}; /******/ /************************************************************************/ /******/ /* webpack/runtime/compat get default export */ /******/ (() => { /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = (module) => { /******/ var getter = module && module.__esModule ? /******/ () => (module['default']) : /******/ () => (module); /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ (() => { /******/ // define __esModule on exports /******/ __webpack_require__.r = (exports) => { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { __unstableAwaitPromise: () => (/* binding */ __unstableAwaitPromise), apiFetch: () => (/* binding */ apiFetch), controls: () => (/* binding */ controls), dispatch: () => (/* binding */ dispatch), select: () => (/* binding */ build_module_select), syncSelect: () => (/* binding */ syncSelect) }); ;// CONCATENATED MODULE: external ["wp","apiFetch"] const external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"]; var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject); ;// CONCATENATED MODULE: external ["wp","data"] const external_wp_data_namespaceObject = window["wp"]["data"]; ;// CONCATENATED MODULE: external ["wp","deprecated"] const external_wp_deprecated_namespaceObject = window["wp"]["deprecated"]; var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject); ;// CONCATENATED MODULE: ./node_modules/@wordpress/data-controls/build-module/index.js /** * WordPress dependencies */ /** * Dispatches a control action for triggering an api fetch call. * * @param {Object} request Arguments for the fetch request. * * @example * ```js * import { apiFetch } from '@wordpress/data-controls'; * * // Action generator using apiFetch * export function* myAction() { * const path = '/v2/my-api/items'; * const items = yield apiFetch( { path } ); * // do something with the items. * } * ``` * * @return {Object} The control descriptor. */ function apiFetch(request) { return { type: 'API_FETCH', request }; } /** * Control for resolving a selector in a registered data store. * Alias for the `resolveSelect` built-in control in the `@wordpress/data` package. * * @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(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(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 storeNameOrDescriptor The store object or identifier. * @param selectorName The selector name. * @param args Arguments passed without change to the `@wordpress/data` control. */ 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(storeNameOrDescriptor, selectorName, ...args); } /** * Control for dispatching an action in a registered data store. * Alias for the `dispatch` control in the `@wordpress/data` package. * * @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(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(storeNameOrDescriptor, actionName, ...args); } /** * Dispatches a control action for awaiting on a promise to be resolved. * * @param {Object} promise Promise to wait for. * * @example * ```js * import { __unstableAwaitPromise } from '@wordpress/data-controls'; * * // Action generator using apiFetch * export function* myAction() { * const promise = getItemsAsync(); * const items = yield __unstableAwaitPromise( promise ); * // do something with the items. * } * ``` * * @return {Object} The control descriptor. */ const __unstableAwaitPromise = function (promise) { return { type: 'AWAIT_PROMISE', promise }; }; /** * The default export is what you use to register the controls with your custom * store. * * @example * ```js * // WordPress dependencies * import { controls } from '@wordpress/data-controls'; * import { registerStore } from '@wordpress/data'; * * // Internal dependencies * import reducer from './reducer'; * import * as selectors from './selectors'; * import * as actions from './actions'; * import * as resolvers from './resolvers'; * * registerStore( 'my-custom-store', { * reducer, * controls, * actions, * selectors, * resolvers, * } ); * ``` * @return {Object} An object for registering the default controls with the * store. */ const controls = { AWAIT_PROMISE: ({ promise }) => promise, API_FETCH({ request }) { return external_wp_apiFetch_default()(request); } }; (window.wp = window.wp || {}).dataControls = __webpack_exports__; /******/ })() ;
Save Changes
Rename File
Rename