Edit File by line
/home/barbar84/public_h.../wp-inclu.../js/dist
File: data-controls.js
this["wp"] = this["wp"] || {}; this["wp"]["dataControls"] =
[0] Fix | Delete
/******/ (function(modules) { // webpackBootstrap
[1] Fix | Delete
/******/ // The module cache
[2] Fix | Delete
/******/ var installedModules = {};
[3] Fix | Delete
/******/
[4] Fix | Delete
/******/ // The require function
[5] Fix | Delete
/******/ function __webpack_require__(moduleId) {
[6] Fix | Delete
/******/
[7] Fix | Delete
/******/ // Check if module is in cache
[8] Fix | Delete
/******/ if(installedModules[moduleId]) {
[9] Fix | Delete
/******/ return installedModules[moduleId].exports;
[10] Fix | Delete
/******/ }
[11] Fix | Delete
/******/ // Create a new module (and put it into the cache)
[12] Fix | Delete
/******/ var module = installedModules[moduleId] = {
[13] Fix | Delete
/******/ i: moduleId,
[14] Fix | Delete
/******/ l: false,
[15] Fix | Delete
/******/ exports: {}
[16] Fix | Delete
/******/ };
[17] Fix | Delete
/******/
[18] Fix | Delete
/******/ // Execute the module function
[19] Fix | Delete
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
[20] Fix | Delete
/******/
[21] Fix | Delete
/******/ // Flag the module as loaded
[22] Fix | Delete
/******/ module.l = true;
[23] Fix | Delete
/******/
[24] Fix | Delete
/******/ // Return the exports of the module
[25] Fix | Delete
/******/ return module.exports;
[26] Fix | Delete
/******/ }
[27] Fix | Delete
/******/
[28] Fix | Delete
/******/
[29] Fix | Delete
/******/ // expose the modules object (__webpack_modules__)
[30] Fix | Delete
/******/ __webpack_require__.m = modules;
[31] Fix | Delete
/******/
[32] Fix | Delete
/******/ // expose the module cache
[33] Fix | Delete
/******/ __webpack_require__.c = installedModules;
[34] Fix | Delete
/******/
[35] Fix | Delete
/******/ // define getter function for harmony exports
[36] Fix | Delete
/******/ __webpack_require__.d = function(exports, name, getter) {
[37] Fix | Delete
/******/ if(!__webpack_require__.o(exports, name)) {
[38] Fix | Delete
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
[39] Fix | Delete
/******/ }
[40] Fix | Delete
/******/ };
[41] Fix | Delete
/******/
[42] Fix | Delete
/******/ // define __esModule on exports
[43] Fix | Delete
/******/ __webpack_require__.r = function(exports) {
[44] Fix | Delete
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
[45] Fix | Delete
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
[46] Fix | Delete
/******/ }
[47] Fix | Delete
/******/ Object.defineProperty(exports, '__esModule', { value: true });
[48] Fix | Delete
/******/ };
[49] Fix | Delete
/******/
[50] Fix | Delete
/******/ // create a fake namespace object
[51] Fix | Delete
/******/ // mode & 1: value is a module id, require it
[52] Fix | Delete
/******/ // mode & 2: merge all properties of value into the ns
[53] Fix | Delete
/******/ // mode & 4: return value when already ns object
[54] Fix | Delete
/******/ // mode & 8|1: behave like require
[55] Fix | Delete
/******/ __webpack_require__.t = function(value, mode) {
[56] Fix | Delete
/******/ if(mode & 1) value = __webpack_require__(value);
[57] Fix | Delete
/******/ if(mode & 8) return value;
[58] Fix | Delete
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
[59] Fix | Delete
/******/ var ns = Object.create(null);
[60] Fix | Delete
/******/ __webpack_require__.r(ns);
[61] Fix | Delete
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
[62] Fix | Delete
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
[63] Fix | Delete
/******/ return ns;
[64] Fix | Delete
/******/ };
[65] Fix | Delete
/******/
[66] Fix | Delete
/******/ // getDefaultExport function for compatibility with non-harmony modules
[67] Fix | Delete
/******/ __webpack_require__.n = function(module) {
[68] Fix | Delete
/******/ var getter = module && module.__esModule ?
[69] Fix | Delete
/******/ function getDefault() { return module['default']; } :
[70] Fix | Delete
/******/ function getModuleExports() { return module; };
[71] Fix | Delete
/******/ __webpack_require__.d(getter, 'a', getter);
[72] Fix | Delete
/******/ return getter;
[73] Fix | Delete
/******/ };
[74] Fix | Delete
/******/
[75] Fix | Delete
/******/ // Object.prototype.hasOwnProperty.call
[76] Fix | Delete
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
[77] Fix | Delete
/******/
[78] Fix | Delete
/******/ // __webpack_public_path__
[79] Fix | Delete
/******/ __webpack_require__.p = "";
[80] Fix | Delete
/******/
[81] Fix | Delete
/******/
[82] Fix | Delete
/******/ // Load entry module and return exports
[83] Fix | Delete
/******/ return __webpack_require__(__webpack_require__.s = "71Oy");
[84] Fix | Delete
/******/ })
[85] Fix | Delete
/************************************************************************/
[86] Fix | Delete
/******/ ({
[87] Fix | Delete
[88] Fix | Delete
/***/ "1ZqX":
[89] Fix | Delete
/***/ (function(module, exports) {
[90] Fix | Delete
[91] Fix | Delete
(function() { module.exports = window["wp"]["data"]; }());
[92] Fix | Delete
[93] Fix | Delete
/***/ }),
[94] Fix | Delete
[95] Fix | Delete
/***/ "71Oy":
[96] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[97] Fix | Delete
[98] Fix | Delete
"use strict";
[99] Fix | Delete
__webpack_require__.r(__webpack_exports__);
[100] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apiFetch", function() { return apiFetch; });
[101] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "select", function() { return select; });
[102] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "syncSelect", function() { return syncSelect; });
[103] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return dispatch; });
[104] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__unstableAwaitPromise", function() { return __unstableAwaitPromise; });
[105] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "controls", function() { return controls; });
[106] Fix | Delete
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ywyh");
[107] Fix | Delete
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0__);
[108] Fix | Delete
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("1ZqX");
[109] Fix | Delete
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);
[110] Fix | Delete
/* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("NMb1");
[111] Fix | Delete
/* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_2__);
[112] Fix | Delete
/**
[113] Fix | Delete
* WordPress dependencies
[114] Fix | Delete
*/
[115] Fix | Delete
[116] Fix | Delete
[117] Fix | Delete
[118] Fix | Delete
/**
[119] Fix | Delete
* Dispatches a control action for triggering an api fetch call.
[120] Fix | Delete
*
[121] Fix | Delete
* @param {Object} request Arguments for the fetch request.
[122] Fix | Delete
*
[123] Fix | Delete
* @example
[124] Fix | Delete
* ```js
[125] Fix | Delete
* import { apiFetch } from '@wordpress/data-controls';
[126] Fix | Delete
*
[127] Fix | Delete
* // Action generator using apiFetch
[128] Fix | Delete
* export function* myAction() {
[129] Fix | Delete
* const path = '/v2/my-api/items';
[130] Fix | Delete
* const items = yield apiFetch( { path } );
[131] Fix | Delete
* // do something with the items.
[132] Fix | Delete
* }
[133] Fix | Delete
* ```
[134] Fix | Delete
*
[135] Fix | Delete
* @return {Object} The control descriptor.
[136] Fix | Delete
*/
[137] Fix | Delete
[138] Fix | Delete
function apiFetch(request) {
[139] Fix | Delete
return {
[140] Fix | Delete
type: 'API_FETCH',
[141] Fix | Delete
request: request
[142] Fix | Delete
};
[143] Fix | Delete
}
[144] Fix | Delete
/**
[145] Fix | Delete
* Control for resolving a selector in a registered data store.
[146] Fix | Delete
* Alias for the `resolveSelect` built-in control in the `@wordpress/data` package.
[147] Fix | Delete
*
[148] Fix | Delete
* @param {Array} args Arguments passed without change to the `@wordpress/data` control.
[149] Fix | Delete
*/
[150] Fix | Delete
[151] Fix | Delete
function select() {
[152] Fix | Delete
_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_2___default()('`select` control in `@wordpress/data-controls`', {
[153] Fix | Delete
alternative: 'built-in `resolveSelect` control in `@wordpress/data`'
[154] Fix | Delete
});
[155] Fix | Delete
return _wordpress_data__WEBPACK_IMPORTED_MODULE_1__["controls"].resolveSelect.apply(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__["controls"], arguments);
[156] Fix | Delete
}
[157] Fix | Delete
/**
[158] Fix | Delete
* Control for calling a selector in a registered data store.
[159] Fix | Delete
* Alias for the `select` built-in control in the `@wordpress/data` package.
[160] Fix | Delete
*
[161] Fix | Delete
* @param {Array} args Arguments passed without change to the `@wordpress/data` control.
[162] Fix | Delete
*/
[163] Fix | Delete
[164] Fix | Delete
function syncSelect() {
[165] Fix | Delete
_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_2___default()('`syncSelect` control in `@wordpress/data-controls`', {
[166] Fix | Delete
alternative: 'built-in `select` control in `@wordpress/data`'
[167] Fix | Delete
});
[168] Fix | Delete
return _wordpress_data__WEBPACK_IMPORTED_MODULE_1__["controls"].select.apply(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__["controls"], arguments);
[169] Fix | Delete
}
[170] Fix | Delete
/**
[171] Fix | Delete
* Control for dispatching an action in a registered data store.
[172] Fix | Delete
* Alias for the `dispatch` control in the `@wordpress/data` package.
[173] Fix | Delete
*
[174] Fix | Delete
* @param {Array} args Arguments passed without change to the `@wordpress/data` control.
[175] Fix | Delete
*/
[176] Fix | Delete
[177] Fix | Delete
function dispatch() {
[178] Fix | Delete
_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_2___default()('`dispatch` control in `@wordpress/data-controls`', {
[179] Fix | Delete
alternative: 'built-in `dispatch` control in `@wordpress/data`'
[180] Fix | Delete
});
[181] Fix | Delete
return _wordpress_data__WEBPACK_IMPORTED_MODULE_1__["controls"].dispatch.apply(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__["controls"], arguments);
[182] Fix | Delete
}
[183] Fix | Delete
/**
[184] Fix | Delete
* Dispatches a control action for awaiting on a promise to be resolved.
[185] Fix | Delete
*
[186] Fix | Delete
* @param {Object} promise Promise to wait for.
[187] Fix | Delete
*
[188] Fix | Delete
* @example
[189] Fix | Delete
* ```js
[190] Fix | Delete
* import { __unstableAwaitPromise } from '@wordpress/data-controls';
[191] Fix | Delete
*
[192] Fix | Delete
* // Action generator using apiFetch
[193] Fix | Delete
* export function* myAction() {
[194] Fix | Delete
* const promise = getItemsAsync();
[195] Fix | Delete
* const items = yield __unstableAwaitPromise( promise );
[196] Fix | Delete
* // do something with the items.
[197] Fix | Delete
* }
[198] Fix | Delete
* ```
[199] Fix | Delete
*
[200] Fix | Delete
* @return {Object} The control descriptor.
[201] Fix | Delete
*/
[202] Fix | Delete
[203] Fix | Delete
var __unstableAwaitPromise = function __unstableAwaitPromise(promise) {
[204] Fix | Delete
return {
[205] Fix | Delete
type: 'AWAIT_PROMISE',
[206] Fix | Delete
promise: promise
[207] Fix | Delete
};
[208] Fix | Delete
};
[209] Fix | Delete
/**
[210] Fix | Delete
* The default export is what you use to register the controls with your custom
[211] Fix | Delete
* store.
[212] Fix | Delete
*
[213] Fix | Delete
* @param paths
[214] Fix | Delete
* @example
[215] Fix | Delete
* ```js
[216] Fix | Delete
* // WordPress dependencies
[217] Fix | Delete
* import { controls } from '@wordpress/data-controls';
[218] Fix | Delete
* import { registerStore } from '@wordpress/data';
[219] Fix | Delete
*
[220] Fix | Delete
* // Internal dependencies
[221] Fix | Delete
* import reducer from './reducer';
[222] Fix | Delete
* import * as selectors from './selectors';
[223] Fix | Delete
* import * as actions from './actions';
[224] Fix | Delete
* import * as resolvers from './resolvers';
[225] Fix | Delete
*
[226] Fix | Delete
* registerStore( 'my-custom-store', {
[227] Fix | Delete
* reducer,
[228] Fix | Delete
* controls,
[229] Fix | Delete
* actions,
[230] Fix | Delete
* selectors,
[231] Fix | Delete
* resolvers,
[232] Fix | Delete
* } );
[233] Fix | Delete
* ```
[234] Fix | Delete
* @return {Object} An object for registering the default controls with the
[235] Fix | Delete
* store.
[236] Fix | Delete
*/
[237] Fix | Delete
[238] Fix | Delete
var controls = {
[239] Fix | Delete
AWAIT_PROMISE: function AWAIT_PROMISE(_ref) {
[240] Fix | Delete
var promise = _ref.promise;
[241] Fix | Delete
return promise;
[242] Fix | Delete
},
[243] Fix | Delete
API_FETCH: function API_FETCH(_ref2) {
[244] Fix | Delete
var request = _ref2.request;
[245] Fix | Delete
return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default()(request);
[246] Fix | Delete
}
[247] Fix | Delete
};
[248] Fix | Delete
[249] Fix | Delete
[250] Fix | Delete
/***/ }),
[251] Fix | Delete
[252] Fix | Delete
/***/ "NMb1":
[253] Fix | Delete
/***/ (function(module, exports) {
[254] Fix | Delete
[255] Fix | Delete
(function() { module.exports = window["wp"]["deprecated"]; }());
[256] Fix | Delete
[257] Fix | Delete
/***/ }),
[258] Fix | Delete
[259] Fix | Delete
/***/ "ywyh":
[260] Fix | Delete
/***/ (function(module, exports) {
[261] Fix | Delete
[262] Fix | Delete
(function() { module.exports = window["wp"]["apiFetch"]; }());
[263] Fix | Delete
[264] Fix | Delete
/***/ })
[265] Fix | Delete
[266] Fix | Delete
/******/ });
[267] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function