Edit File by line
/home/barbar84/www/wp-inclu.../js/dist
File: reusable-blocks.js
this["wp"] = this["wp"] || {}; this["wp"]["reusableBlocks"] =
[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 = "iqm2");
[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
/***/ "GRId":
[96] Fix | Delete
/***/ (function(module, exports) {
[97] Fix | Delete
[98] Fix | Delete
(function() { module.exports = window["wp"]["element"]; }());
[99] Fix | Delete
[100] Fix | Delete
/***/ }),
[101] Fix | Delete
[102] Fix | Delete
/***/ "HSyU":
[103] Fix | Delete
/***/ (function(module, exports) {
[104] Fix | Delete
[105] Fix | Delete
(function() { module.exports = window["wp"]["blocks"]; }());
[106] Fix | Delete
[107] Fix | Delete
/***/ }),
[108] Fix | Delete
[109] Fix | Delete
/***/ "HaE+":
[110] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[111] Fix | Delete
[112] Fix | Delete
"use strict";
[113] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _asyncToGenerator; });
[114] Fix | Delete
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
[115] Fix | Delete
try {
[116] Fix | Delete
var info = gen[key](arg);
[117] Fix | Delete
var value = info.value;
[118] Fix | Delete
} catch (error) {
[119] Fix | Delete
reject(error);
[120] Fix | Delete
return;
[121] Fix | Delete
}
[122] Fix | Delete
[123] Fix | Delete
if (info.done) {
[124] Fix | Delete
resolve(value);
[125] Fix | Delete
} else {
[126] Fix | Delete
Promise.resolve(value).then(_next, _throw);
[127] Fix | Delete
}
[128] Fix | Delete
}
[129] Fix | Delete
[130] Fix | Delete
function _asyncToGenerator(fn) {
[131] Fix | Delete
return function () {
[132] Fix | Delete
var self = this,
[133] Fix | Delete
args = arguments;
[134] Fix | Delete
return new Promise(function (resolve, reject) {
[135] Fix | Delete
var gen = fn.apply(self, args);
[136] Fix | Delete
[137] Fix | Delete
function _next(value) {
[138] Fix | Delete
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
[139] Fix | Delete
}
[140] Fix | Delete
[141] Fix | Delete
function _throw(err) {
[142] Fix | Delete
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
[143] Fix | Delete
}
[144] Fix | Delete
[145] Fix | Delete
_next(undefined);
[146] Fix | Delete
});
[147] Fix | Delete
};
[148] Fix | Delete
}
[149] Fix | Delete
[150] Fix | Delete
/***/ }),
[151] Fix | Delete
[152] Fix | Delete
/***/ "Mmq9":
[153] Fix | Delete
/***/ (function(module, exports) {
[154] Fix | Delete
[155] Fix | Delete
(function() { module.exports = window["wp"]["url"]; }());
[156] Fix | Delete
[157] Fix | Delete
/***/ }),
[158] Fix | Delete
[159] Fix | Delete
/***/ "Tqx9":
[160] Fix | Delete
/***/ (function(module, exports) {
[161] Fix | Delete
[162] Fix | Delete
(function() { module.exports = window["wp"]["primitives"]; }());
[163] Fix | Delete
[164] Fix | Delete
/***/ }),
[165] Fix | Delete
[166] Fix | Delete
/***/ "YLtl":
[167] Fix | Delete
/***/ (function(module, exports) {
[168] Fix | Delete
[169] Fix | Delete
(function() { module.exports = window["lodash"]; }());
[170] Fix | Delete
[171] Fix | Delete
/***/ }),
[172] Fix | Delete
[173] Fix | Delete
/***/ "axFQ":
[174] Fix | Delete
/***/ (function(module, exports) {
[175] Fix | Delete
[176] Fix | Delete
(function() { module.exports = window["wp"]["blockEditor"]; }());
[177] Fix | Delete
[178] Fix | Delete
/***/ }),
[179] Fix | Delete
[180] Fix | Delete
/***/ "dvlR":
[181] Fix | Delete
/***/ (function(module, exports) {
[182] Fix | Delete
[183] Fix | Delete
(function() { module.exports = window["regeneratorRuntime"]; }());
[184] Fix | Delete
[185] Fix | Delete
/***/ }),
[186] Fix | Delete
[187] Fix | Delete
/***/ "iqm2":
[188] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[189] Fix | Delete
[190] Fix | Delete
"use strict";
[191] Fix | Delete
// ESM COMPAT FLAG
[192] Fix | Delete
__webpack_require__.r(__webpack_exports__);
[193] Fix | Delete
[194] Fix | Delete
// EXPORTS
[195] Fix | Delete
__webpack_require__.d(__webpack_exports__, "store", function() { return /* reexport */ store; });
[196] Fix | Delete
__webpack_require__.d(__webpack_exports__, "ReusableBlocksMenuItems", function() { return /* reexport */ reusable_blocks_menu_items; });
[197] Fix | Delete
[198] Fix | Delete
// NAMESPACE OBJECT: ./node_modules/@wordpress/reusable-blocks/build-module/store/actions.js
[199] Fix | Delete
var actions_namespaceObject = {};
[200] Fix | Delete
__webpack_require__.r(actions_namespaceObject);
[201] Fix | Delete
__webpack_require__.d(actions_namespaceObject, "__experimentalConvertBlockToStatic", function() { return __experimentalConvertBlockToStatic; });
[202] Fix | Delete
__webpack_require__.d(actions_namespaceObject, "__experimentalConvertBlocksToReusable", function() { return __experimentalConvertBlocksToReusable; });
[203] Fix | Delete
__webpack_require__.d(actions_namespaceObject, "__experimentalDeleteReusableBlock", function() { return __experimentalDeleteReusableBlock; });
[204] Fix | Delete
__webpack_require__.d(actions_namespaceObject, "__experimentalSetEditingReusableBlock", function() { return __experimentalSetEditingReusableBlock; });
[205] Fix | Delete
[206] Fix | Delete
// NAMESPACE OBJECT: ./node_modules/@wordpress/reusable-blocks/build-module/store/selectors.js
[207] Fix | Delete
var selectors_namespaceObject = {};
[208] Fix | Delete
__webpack_require__.r(selectors_namespaceObject);
[209] Fix | Delete
__webpack_require__.d(selectors_namespaceObject, "__experimentalIsEditingReusableBlock", function() { return __experimentalIsEditingReusableBlock; });
[210] Fix | Delete
[211] Fix | Delete
// EXTERNAL MODULE: external ["wp","blockEditor"]
[212] Fix | Delete
var external_wp_blockEditor_ = __webpack_require__("axFQ");
[213] Fix | Delete
[214] Fix | Delete
// EXTERNAL MODULE: external ["wp","coreData"]
[215] Fix | Delete
var external_wp_coreData_ = __webpack_require__("jZUy");
[216] Fix | Delete
[217] Fix | Delete
// EXTERNAL MODULE: external ["wp","data"]
[218] Fix | Delete
var external_wp_data_ = __webpack_require__("1ZqX");
[219] Fix | Delete
[220] Fix | Delete
// EXTERNAL MODULE: external "regeneratorRuntime"
[221] Fix | Delete
var external_regeneratorRuntime_ = __webpack_require__("dvlR");
[222] Fix | Delete
var external_regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(external_regeneratorRuntime_);
[223] Fix | Delete
[224] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
[225] Fix | Delete
var asyncToGenerator = __webpack_require__("HaE+");
[226] Fix | Delete
[227] Fix | Delete
// EXTERNAL MODULE: external "lodash"
[228] Fix | Delete
var external_lodash_ = __webpack_require__("YLtl");
[229] Fix | Delete
[230] Fix | Delete
// EXTERNAL MODULE: external ["wp","blocks"]
[231] Fix | Delete
var external_wp_blocks_ = __webpack_require__("HSyU");
[232] Fix | Delete
[233] Fix | Delete
// EXTERNAL MODULE: external ["wp","i18n"]
[234] Fix | Delete
var external_wp_i18n_ = __webpack_require__("l3Sj");
[235] Fix | Delete
[236] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/reusable-blocks/build-module/store/controls.js
[237] Fix | Delete
[238] Fix | Delete
[239] Fix | Delete
[240] Fix | Delete
/**
[241] Fix | Delete
* External dependencies
[242] Fix | Delete
*/
[243] Fix | Delete
[244] Fix | Delete
/**
[245] Fix | Delete
* WordPress dependencies
[246] Fix | Delete
*/
[247] Fix | Delete
[248] Fix | Delete
[249] Fix | Delete
[250] Fix | Delete
[251] Fix | Delete
/**
[252] Fix | Delete
* Internal dependencies
[253] Fix | Delete
*/
[254] Fix | Delete
[255] Fix | Delete
[256] Fix | Delete
/**
[257] Fix | Delete
* Convert a reusable block to a static block effect handler
[258] Fix | Delete
*
[259] Fix | Delete
* @param {string} clientId Block ID.
[260] Fix | Delete
* @return {Object} control descriptor.
[261] Fix | Delete
*/
[262] Fix | Delete
[263] Fix | Delete
function convertBlockToStatic(clientId) {
[264] Fix | Delete
return {
[265] Fix | Delete
type: 'CONVERT_BLOCK_TO_STATIC',
[266] Fix | Delete
clientId: clientId
[267] Fix | Delete
};
[268] Fix | Delete
}
[269] Fix | Delete
/**
[270] Fix | Delete
* Convert a static block to a reusable block effect handler
[271] Fix | Delete
*
[272] Fix | Delete
* @param {Array} clientIds Block IDs.
[273] Fix | Delete
* @return {Object} control descriptor.
[274] Fix | Delete
*/
[275] Fix | Delete
[276] Fix | Delete
function controls_convertBlocksToReusable(clientIds) {
[277] Fix | Delete
return {
[278] Fix | Delete
type: 'CONVERT_BLOCKS_TO_REUSABLE',
[279] Fix | Delete
clientIds: clientIds
[280] Fix | Delete
};
[281] Fix | Delete
}
[282] Fix | Delete
/**
[283] Fix | Delete
* Deletes a reusable block.
[284] Fix | Delete
*
[285] Fix | Delete
* @param {string} id Reusable block ID.
[286] Fix | Delete
* @return {Object} control descriptor.
[287] Fix | Delete
*/
[288] Fix | Delete
[289] Fix | Delete
function deleteReusableBlock(id) {
[290] Fix | Delete
return {
[291] Fix | Delete
type: 'DELETE_REUSABLE_BLOCK',
[292] Fix | Delete
id: id
[293] Fix | Delete
};
[294] Fix | Delete
}
[295] Fix | Delete
var controls = {
[296] Fix | Delete
CONVERT_BLOCK_TO_STATIC: Object(external_wp_data_["createRegistryControl"])(function (registry) {
[297] Fix | Delete
return function (_ref) {
[298] Fix | Delete
var clientId = _ref.clientId;
[299] Fix | Delete
var oldBlock = registry.select('core/block-editor').getBlock(clientId);
[300] Fix | Delete
var reusableBlock = registry.select('core').getEditedEntityRecord('postType', 'wp_block', oldBlock.attributes.ref);
[301] Fix | Delete
var newBlocks = Object(external_wp_blocks_["parse"])(Object(external_lodash_["isFunction"])(reusableBlock.content) ? reusableBlock.content(reusableBlock) : reusableBlock.content);
[302] Fix | Delete
registry.dispatch('core/block-editor').replaceBlocks(oldBlock.clientId, newBlocks);
[303] Fix | Delete
};
[304] Fix | Delete
}),
[305] Fix | Delete
CONVERT_BLOCKS_TO_REUSABLE: Object(external_wp_data_["createRegistryControl"])(function (registry) {
[306] Fix | Delete
return /*#__PURE__*/function () {
[307] Fix | Delete
var _ref3 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/external_regeneratorRuntime_default.a.mark(function _callee(_ref2) {
[308] Fix | Delete
var clientIds, reusableBlock, updatedRecord, newBlock;
[309] Fix | Delete
return external_regeneratorRuntime_default.a.wrap(function _callee$(_context) {
[310] Fix | Delete
while (1) {
[311] Fix | Delete
switch (_context.prev = _context.next) {
[312] Fix | Delete
case 0:
[313] Fix | Delete
clientIds = _ref2.clientIds;
[314] Fix | Delete
reusableBlock = {
[315] Fix | Delete
title: Object(external_wp_i18n_["__"])('Untitled Reusable Block'),
[316] Fix | Delete
content: Object(external_wp_blocks_["serialize"])(registry.select('core/block-editor').getBlocksByClientId(clientIds)),
[317] Fix | Delete
status: 'publish'
[318] Fix | Delete
};
[319] Fix | Delete
_context.next = 4;
[320] Fix | Delete
return registry.dispatch('core').saveEntityRecord('postType', 'wp_block', reusableBlock);
[321] Fix | Delete
[322] Fix | Delete
case 4:
[323] Fix | Delete
updatedRecord = _context.sent;
[324] Fix | Delete
newBlock = Object(external_wp_blocks_["createBlock"])('core/block', {
[325] Fix | Delete
ref: updatedRecord.id
[326] Fix | Delete
});
[327] Fix | Delete
registry.dispatch('core/block-editor').replaceBlocks(clientIds, newBlock);
[328] Fix | Delete
[329] Fix | Delete
registry.dispatch(store).__experimentalSetEditingReusableBlock(newBlock.clientId, true);
[330] Fix | Delete
[331] Fix | Delete
case 8:
[332] Fix | Delete
case "end":
[333] Fix | Delete
return _context.stop();
[334] Fix | Delete
}
[335] Fix | Delete
}
[336] Fix | Delete
}, _callee);
[337] Fix | Delete
}));
[338] Fix | Delete
[339] Fix | Delete
return function (_x) {
[340] Fix | Delete
return _ref3.apply(this, arguments);
[341] Fix | Delete
};
[342] Fix | Delete
}();
[343] Fix | Delete
}),
[344] Fix | Delete
DELETE_REUSABLE_BLOCK: Object(external_wp_data_["createRegistryControl"])(function (registry) {
[345] Fix | Delete
return /*#__PURE__*/function () {
[346] Fix | Delete
var _ref5 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/external_regeneratorRuntime_default.a.mark(function _callee2(_ref4) {
[347] Fix | Delete
var id, reusableBlock, allBlocks, associatedBlocks, associatedBlockClientIds;
[348] Fix | Delete
return external_regeneratorRuntime_default.a.wrap(function _callee2$(_context2) {
[349] Fix | Delete
while (1) {
[350] Fix | Delete
switch (_context2.prev = _context2.next) {
[351] Fix | Delete
case 0:
[352] Fix | Delete
id = _ref4.id;
[353] Fix | Delete
reusableBlock = registry.select('core').getEditedEntityRecord('postType', 'wp_block', id); // Don't allow a reusable block with a temporary ID to be deleted
[354] Fix | Delete
[355] Fix | Delete
if (reusableBlock) {
[356] Fix | Delete
_context2.next = 4;
[357] Fix | Delete
break;
[358] Fix | Delete
}
[359] Fix | Delete
[360] Fix | Delete
return _context2.abrupt("return");
[361] Fix | Delete
[362] Fix | Delete
case 4:
[363] Fix | Delete
// Remove any other blocks that reference this reusable block
[364] Fix | Delete
allBlocks = registry.select('core/block-editor').getBlocks();
[365] Fix | Delete
associatedBlocks = allBlocks.filter(function (block) {
[366] Fix | Delete
return Object(external_wp_blocks_["isReusableBlock"])(block) && block.attributes.ref === id;
[367] Fix | Delete
});
[368] Fix | Delete
associatedBlockClientIds = associatedBlocks.map(function (block) {
[369] Fix | Delete
return block.clientId;
[370] Fix | Delete
}); // Remove the parsed block.
[371] Fix | Delete
[372] Fix | Delete
if (associatedBlockClientIds.length) {
[373] Fix | Delete
registry.dispatch('core/block-editor').removeBlocks(associatedBlockClientIds);
[374] Fix | Delete
}
[375] Fix | Delete
[376] Fix | Delete
_context2.next = 10;
[377] Fix | Delete
return registry.dispatch('core').deleteEntityRecord('postType', 'wp_block', id);
[378] Fix | Delete
[379] Fix | Delete
case 10:
[380] Fix | Delete
case "end":
[381] Fix | Delete
return _context2.stop();
[382] Fix | Delete
}
[383] Fix | Delete
}
[384] Fix | Delete
}, _callee2);
[385] Fix | Delete
}));
[386] Fix | Delete
[387] Fix | Delete
return function (_x2) {
[388] Fix | Delete
return _ref5.apply(this, arguments);
[389] Fix | Delete
};
[390] Fix | Delete
}();
[391] Fix | Delete
})
[392] Fix | Delete
};
[393] Fix | Delete
/* harmony default export */ var store_controls = (controls);
[394] Fix | Delete
[395] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/reusable-blocks/build-module/store/actions.js
[396] Fix | Delete
[397] Fix | Delete
[398] Fix | Delete
var _marked = /*#__PURE__*/external_regeneratorRuntime_default.a.mark(__experimentalConvertBlockToStatic),
[399] Fix | Delete
_marked2 = /*#__PURE__*/external_regeneratorRuntime_default.a.mark(__experimentalConvertBlocksToReusable),
[400] Fix | Delete
_marked3 = /*#__PURE__*/external_regeneratorRuntime_default.a.mark(__experimentalDeleteReusableBlock);
[401] Fix | Delete
[402] Fix | Delete
/**
[403] Fix | Delete
* Internal dependencies
[404] Fix | Delete
*/
[405] Fix | Delete
[406] Fix | Delete
/**
[407] Fix | Delete
* Returns a generator converting a reusable block into a static block.
[408] Fix | Delete
*
[409] Fix | Delete
* @param {string} clientId The client ID of the block to attach.
[410] Fix | Delete
*/
[411] Fix | Delete
[412] Fix | Delete
function __experimentalConvertBlockToStatic(clientId) {
[413] Fix | Delete
return external_regeneratorRuntime_default.a.wrap(function __experimentalConvertBlockToStatic$(_context) {
[414] Fix | Delete
while (1) {
[415] Fix | Delete
switch (_context.prev = _context.next) {
[416] Fix | Delete
case 0:
[417] Fix | Delete
_context.next = 2;
[418] Fix | Delete
return convertBlockToStatic(clientId);
[419] Fix | Delete
[420] Fix | Delete
case 2:
[421] Fix | Delete
case "end":
[422] Fix | Delete
return _context.stop();
[423] Fix | Delete
}
[424] Fix | Delete
}
[425] Fix | Delete
}, _marked);
[426] Fix | Delete
}
[427] Fix | Delete
/**
[428] Fix | Delete
* Returns a generator converting one or more static blocks into a reusable block.
[429] Fix | Delete
*
[430] Fix | Delete
* @param {string[]} clientIds The client IDs of the block to detach.
[431] Fix | Delete
*/
[432] Fix | Delete
[433] Fix | Delete
function __experimentalConvertBlocksToReusable(clientIds) {
[434] Fix | Delete
return external_regeneratorRuntime_default.a.wrap(function __experimentalConvertBlocksToReusable$(_context2) {
[435] Fix | Delete
while (1) {
[436] Fix | Delete
switch (_context2.prev = _context2.next) {
[437] Fix | Delete
case 0:
[438] Fix | Delete
_context2.next = 2;
[439] Fix | Delete
return controls_convertBlocksToReusable(clientIds);
[440] Fix | Delete
[441] Fix | Delete
case 2:
[442] Fix | Delete
case "end":
[443] Fix | Delete
return _context2.stop();
[444] Fix | Delete
}
[445] Fix | Delete
}
[446] Fix | Delete
}, _marked2);
[447] Fix | Delete
}
[448] Fix | Delete
/**
[449] Fix | Delete
* Returns a generator deleting a reusable block.
[450] Fix | Delete
*
[451] Fix | Delete
* @param {string} id The ID of the reusable block to delete.
[452] Fix | Delete
*/
[453] Fix | Delete
[454] Fix | Delete
function __experimentalDeleteReusableBlock(id) {
[455] Fix | Delete
return external_regeneratorRuntime_default.a.wrap(function __experimentalDeleteReusableBlock$(_context3) {
[456] Fix | Delete
while (1) {
[457] Fix | Delete
switch (_context3.prev = _context3.next) {
[458] Fix | Delete
case 0:
[459] Fix | Delete
_context3.next = 2;
[460] Fix | Delete
return deleteReusableBlock(id);
[461] Fix | Delete
[462] Fix | Delete
case 2:
[463] Fix | Delete
case "end":
[464] Fix | Delete
return _context3.stop();
[465] Fix | Delete
}
[466] Fix | Delete
}
[467] Fix | Delete
}, _marked3);
[468] Fix | Delete
}
[469] Fix | Delete
/**
[470] Fix | Delete
* Returns an action descriptor for SET_EDITING_REUSABLE_BLOCK action.
[471] Fix | Delete
*
[472] Fix | Delete
* @param {string} clientId The clientID of the reusable block to target.
[473] Fix | Delete
* @param {boolean} isEditing Whether the block should be in editing state.
[474] Fix | Delete
* @return {Object} Action descriptor.
[475] Fix | Delete
*/
[476] Fix | Delete
[477] Fix | Delete
function __experimentalSetEditingReusableBlock(clientId, isEditing) {
[478] Fix | Delete
return {
[479] Fix | Delete
type: 'SET_EDITING_REUSABLE_BLOCK',
[480] Fix | Delete
clientId: clientId,
[481] Fix | Delete
isEditing: isEditing
[482] Fix | Delete
};
[483] Fix | Delete
}
[484] Fix | Delete
[485] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
[486] Fix | Delete
var defineProperty = __webpack_require__("rePB");
[487] Fix | Delete
[488] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/reusable-blocks/build-module/store/reducer.js
[489] Fix | Delete
[490] Fix | Delete
[491] Fix | Delete
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
[492] Fix | Delete
[493] Fix | Delete
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
[494] Fix | Delete
[495] Fix | Delete
/**
[496] Fix | Delete
* WordPress dependencies
[497] Fix | Delete
*/
[498] Fix | Delete
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function