Edit File by line
/home/barbar84/public_h.../wp-inclu.../js/dist
File: keyboard-shortcuts.js
this["wp"] = this["wp"] || {}; this["wp"]["keyboardShortcuts"] =
[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 = "cFS5");
[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
/***/ "25BE":
[96] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[97] Fix | Delete
[98] Fix | Delete
"use strict";
[99] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
[100] Fix | Delete
function _iterableToArray(iter) {
[101] Fix | Delete
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
[102] Fix | Delete
}
[103] Fix | Delete
[104] Fix | Delete
/***/ }),
[105] Fix | Delete
[106] Fix | Delete
/***/ "BsWD":
[107] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[108] Fix | Delete
[109] Fix | Delete
"use strict";
[110] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
[111] Fix | Delete
/* harmony import */ var _babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a3WO");
[112] Fix | Delete
[113] Fix | Delete
function _unsupportedIterableToArray(o, minLen) {
[114] Fix | Delete
if (!o) return;
[115] Fix | Delete
if (typeof o === "string") return Object(_babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
[116] Fix | Delete
var n = Object.prototype.toString.call(o).slice(8, -1);
[117] Fix | Delete
if (n === "Object" && o.constructor) n = o.constructor.name;
[118] Fix | Delete
if (n === "Map" || n === "Set") return Array.from(o);
[119] Fix | Delete
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
[120] Fix | Delete
}
[121] Fix | Delete
[122] Fix | Delete
/***/ }),
[123] Fix | Delete
[124] Fix | Delete
/***/ "DSFK":
[125] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[126] Fix | Delete
[127] Fix | Delete
"use strict";
[128] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; });
[129] Fix | Delete
function _arrayWithHoles(arr) {
[130] Fix | Delete
if (Array.isArray(arr)) return arr;
[131] Fix | Delete
}
[132] Fix | Delete
[133] Fix | Delete
/***/ }),
[134] Fix | Delete
[135] Fix | Delete
/***/ "K9lf":
[136] Fix | Delete
/***/ (function(module, exports) {
[137] Fix | Delete
[138] Fix | Delete
(function() { module.exports = window["wp"]["compose"]; }());
[139] Fix | Delete
[140] Fix | Delete
/***/ }),
[141] Fix | Delete
[142] Fix | Delete
/***/ "KQm4":
[143] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[144] Fix | Delete
[145] Fix | Delete
"use strict";
[146] Fix | Delete
[147] Fix | Delete
// EXPORTS
[148] Fix | Delete
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; });
[149] Fix | Delete
[150] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
[151] Fix | Delete
var arrayLikeToArray = __webpack_require__("a3WO");
[152] Fix | Delete
[153] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
[154] Fix | Delete
[155] Fix | Delete
function _arrayWithoutHoles(arr) {
[156] Fix | Delete
if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
[157] Fix | Delete
}
[158] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
[159] Fix | Delete
var iterableToArray = __webpack_require__("25BE");
[160] Fix | Delete
[161] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
[162] Fix | Delete
var unsupportedIterableToArray = __webpack_require__("BsWD");
[163] Fix | Delete
[164] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
[165] Fix | Delete
function _nonIterableSpread() {
[166] Fix | Delete
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
[167] Fix | Delete
}
[168] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
[169] Fix | Delete
[170] Fix | Delete
[171] Fix | Delete
[172] Fix | Delete
[173] Fix | Delete
function _toConsumableArray(arr) {
[174] Fix | Delete
return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
[175] Fix | Delete
}
[176] Fix | Delete
[177] Fix | Delete
/***/ }),
[178] Fix | Delete
[179] Fix | Delete
/***/ "ODXe":
[180] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[181] Fix | Delete
[182] Fix | Delete
"use strict";
[183] Fix | Delete
[184] Fix | Delete
// EXPORTS
[185] Fix | Delete
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; });
[186] Fix | Delete
[187] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
[188] Fix | Delete
var arrayWithHoles = __webpack_require__("DSFK");
[189] Fix | Delete
[190] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
[191] Fix | Delete
function _iterableToArrayLimit(arr, i) {
[192] Fix | Delete
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
[193] Fix | Delete
var _arr = [];
[194] Fix | Delete
var _n = true;
[195] Fix | Delete
var _d = false;
[196] Fix | Delete
var _e = undefined;
[197] Fix | Delete
[198] Fix | Delete
try {
[199] Fix | Delete
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
[200] Fix | Delete
_arr.push(_s.value);
[201] Fix | Delete
[202] Fix | Delete
if (i && _arr.length === i) break;
[203] Fix | Delete
}
[204] Fix | Delete
} catch (err) {
[205] Fix | Delete
_d = true;
[206] Fix | Delete
_e = err;
[207] Fix | Delete
} finally {
[208] Fix | Delete
try {
[209] Fix | Delete
if (!_n && _i["return"] != null) _i["return"]();
[210] Fix | Delete
} finally {
[211] Fix | Delete
if (_d) throw _e;
[212] Fix | Delete
}
[213] Fix | Delete
}
[214] Fix | Delete
[215] Fix | Delete
return _arr;
[216] Fix | Delete
}
[217] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
[218] Fix | Delete
var unsupportedIterableToArray = __webpack_require__("BsWD");
[219] Fix | Delete
[220] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
[221] Fix | Delete
var nonIterableRest = __webpack_require__("PYwp");
[222] Fix | Delete
[223] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
[224] Fix | Delete
[225] Fix | Delete
[226] Fix | Delete
[227] Fix | Delete
[228] Fix | Delete
function _slicedToArray(arr, i) {
[229] Fix | Delete
return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || Object(nonIterableRest["a" /* default */])();
[230] Fix | Delete
}
[231] Fix | Delete
[232] Fix | Delete
/***/ }),
[233] Fix | Delete
[234] Fix | Delete
/***/ "PYwp":
[235] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[236] Fix | Delete
[237] Fix | Delete
"use strict";
[238] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; });
[239] Fix | Delete
function _nonIterableRest() {
[240] Fix | Delete
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
[241] Fix | Delete
}
[242] Fix | Delete
[243] Fix | Delete
/***/ }),
[244] Fix | Delete
[245] Fix | Delete
/***/ "RxS6":
[246] Fix | Delete
/***/ (function(module, exports) {
[247] Fix | Delete
[248] Fix | Delete
(function() { module.exports = window["wp"]["keycodes"]; }());
[249] Fix | Delete
[250] Fix | Delete
/***/ }),
[251] Fix | Delete
[252] Fix | Delete
/***/ "YLtl":
[253] Fix | Delete
/***/ (function(module, exports) {
[254] Fix | Delete
[255] Fix | Delete
(function() { module.exports = window["lodash"]; }());
[256] Fix | Delete
[257] Fix | Delete
/***/ }),
[258] Fix | Delete
[259] Fix | Delete
/***/ "a3WO":
[260] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[261] Fix | Delete
[262] Fix | Delete
"use strict";
[263] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
[264] Fix | Delete
function _arrayLikeToArray(arr, len) {
[265] Fix | Delete
if (len == null || len > arr.length) len = arr.length;
[266] Fix | Delete
[267] Fix | Delete
for (var i = 0, arr2 = new Array(len); i < len; i++) {
[268] Fix | Delete
arr2[i] = arr[i];
[269] Fix | Delete
}
[270] Fix | Delete
[271] Fix | Delete
return arr2;
[272] Fix | Delete
}
[273] Fix | Delete
[274] Fix | Delete
/***/ }),
[275] Fix | Delete
[276] Fix | Delete
/***/ "cFS5":
[277] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[278] Fix | Delete
[279] Fix | Delete
"use strict";
[280] Fix | Delete
// ESM COMPAT FLAG
[281] Fix | Delete
__webpack_require__.r(__webpack_exports__);
[282] Fix | Delete
[283] Fix | Delete
// EXPORTS
[284] Fix | Delete
__webpack_require__.d(__webpack_exports__, "store", function() { return /* reexport */ store; });
[285] Fix | Delete
__webpack_require__.d(__webpack_exports__, "useShortcut", function() { return /* reexport */ use_shortcut; });
[286] Fix | Delete
[287] Fix | Delete
// NAMESPACE OBJECT: ./node_modules/@wordpress/keyboard-shortcuts/build-module/store/actions.js
[288] Fix | Delete
var actions_namespaceObject = {};
[289] Fix | Delete
__webpack_require__.r(actions_namespaceObject);
[290] Fix | Delete
__webpack_require__.d(actions_namespaceObject, "registerShortcut", function() { return registerShortcut; });
[291] Fix | Delete
__webpack_require__.d(actions_namespaceObject, "unregisterShortcut", function() { return unregisterShortcut; });
[292] Fix | Delete
[293] Fix | Delete
// NAMESPACE OBJECT: ./node_modules/@wordpress/keyboard-shortcuts/build-module/store/selectors.js
[294] Fix | Delete
var selectors_namespaceObject = {};
[295] Fix | Delete
__webpack_require__.r(selectors_namespaceObject);
[296] Fix | Delete
__webpack_require__.d(selectors_namespaceObject, "getShortcutKeyCombination", function() { return getShortcutKeyCombination; });
[297] Fix | Delete
__webpack_require__.d(selectors_namespaceObject, "getShortcutRepresentation", function() { return getShortcutRepresentation; });
[298] Fix | Delete
__webpack_require__.d(selectors_namespaceObject, "getShortcutDescription", function() { return getShortcutDescription; });
[299] Fix | Delete
__webpack_require__.d(selectors_namespaceObject, "getShortcutAliases", function() { return getShortcutAliases; });
[300] Fix | Delete
__webpack_require__.d(selectors_namespaceObject, "getAllShortcutRawKeyCombinations", function() { return getAllShortcutRawKeyCombinations; });
[301] Fix | Delete
__webpack_require__.d(selectors_namespaceObject, "getCategoryShortcuts", function() { return getCategoryShortcuts; });
[302] Fix | Delete
[303] Fix | Delete
// EXTERNAL MODULE: external ["wp","data"]
[304] Fix | Delete
var external_wp_data_ = __webpack_require__("1ZqX");
[305] Fix | Delete
[306] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
[307] Fix | Delete
var defineProperty = __webpack_require__("rePB");
[308] Fix | Delete
[309] Fix | Delete
// EXTERNAL MODULE: external "lodash"
[310] Fix | Delete
var external_lodash_ = __webpack_require__("YLtl");
[311] Fix | Delete
[312] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/keyboard-shortcuts/build-module/store/reducer.js
[313] Fix | Delete
[314] Fix | Delete
[315] 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; }
[316] Fix | Delete
[317] 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; }
[318] Fix | Delete
[319] Fix | Delete
/**
[320] Fix | Delete
* External dependencies
[321] Fix | Delete
*/
[322] Fix | Delete
[323] Fix | Delete
/**
[324] Fix | Delete
* Reducer returning the registered shortcuts
[325] Fix | Delete
*
[326] Fix | Delete
* @param {Object} state Current state.
[327] Fix | Delete
* @param {Object} action Dispatched action.
[328] Fix | Delete
*
[329] Fix | Delete
* @return {Object} Updated state.
[330] Fix | Delete
*/
[331] Fix | Delete
[332] Fix | Delete
function reducer() {
[333] Fix | Delete
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
[334] Fix | Delete
var action = arguments.length > 1 ? arguments[1] : undefined;
[335] Fix | Delete
[336] Fix | Delete
switch (action.type) {
[337] Fix | Delete
case 'REGISTER_SHORTCUT':
[338] Fix | Delete
return _objectSpread(_objectSpread({}, state), {}, Object(defineProperty["a" /* default */])({}, action.name, {
[339] Fix | Delete
category: action.category,
[340] Fix | Delete
keyCombination: action.keyCombination,
[341] Fix | Delete
aliases: action.aliases,
[342] Fix | Delete
description: action.description
[343] Fix | Delete
}));
[344] Fix | Delete
[345] Fix | Delete
case 'UNREGISTER_SHORTCUT':
[346] Fix | Delete
return Object(external_lodash_["omit"])(state, action.name);
[347] Fix | Delete
}
[348] Fix | Delete
[349] Fix | Delete
return state;
[350] Fix | Delete
}
[351] Fix | Delete
[352] Fix | Delete
/* harmony default export */ var store_reducer = (reducer);
[353] Fix | Delete
[354] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/keyboard-shortcuts/build-module/store/actions.js
[355] Fix | Delete
/** @typedef {import('@wordpress/keycodes').WPKeycodeModifier} WPKeycodeModifier */
[356] Fix | Delete
[357] Fix | Delete
/**
[358] Fix | Delete
* Keyboard key combination.
[359] Fix | Delete
*
[360] Fix | Delete
* @typedef {Object} WPShortcutKeyCombination
[361] Fix | Delete
*
[362] Fix | Delete
* @property {string} character Character.
[363] Fix | Delete
* @property {WPKeycodeModifier|undefined} modifier Modifier.
[364] Fix | Delete
*/
[365] Fix | Delete
[366] Fix | Delete
/**
[367] Fix | Delete
* Configuration of a registered keyboard shortcut.
[368] Fix | Delete
*
[369] Fix | Delete
* @typedef {Object} WPShortcutConfig
[370] Fix | Delete
*
[371] Fix | Delete
* @property {string} name Shortcut name.
[372] Fix | Delete
* @property {string} category Shortcut category.
[373] Fix | Delete
* @property {string} description Shortcut description.
[374] Fix | Delete
* @property {WPShortcutKeyCombination} keyCombination Shortcut key combination.
[375] Fix | Delete
* @property {WPShortcutKeyCombination[]} [aliases] Shortcut aliases.
[376] Fix | Delete
*/
[377] Fix | Delete
[378] Fix | Delete
/**
[379] Fix | Delete
* Returns an action object used to register a new keyboard shortcut.
[380] Fix | Delete
*
[381] Fix | Delete
* @param {WPShortcutConfig} config Shortcut config.
[382] Fix | Delete
*
[383] Fix | Delete
* @return {Object} action.
[384] Fix | Delete
*/
[385] Fix | Delete
function registerShortcut(_ref) {
[386] Fix | Delete
var name = _ref.name,
[387] Fix | Delete
category = _ref.category,
[388] Fix | Delete
description = _ref.description,
[389] Fix | Delete
keyCombination = _ref.keyCombination,
[390] Fix | Delete
aliases = _ref.aliases;
[391] Fix | Delete
return {
[392] Fix | Delete
type: 'REGISTER_SHORTCUT',
[393] Fix | Delete
name: name,
[394] Fix | Delete
category: category,
[395] Fix | Delete
keyCombination: keyCombination,
[396] Fix | Delete
aliases: aliases,
[397] Fix | Delete
description: description
[398] Fix | Delete
};
[399] Fix | Delete
}
[400] Fix | Delete
/**
[401] Fix | Delete
* Returns an action object used to unregister a keyboard shortcut.
[402] Fix | Delete
*
[403] Fix | Delete
* @param {string} name Shortcut name.
[404] Fix | Delete
*
[405] Fix | Delete
* @return {Object} action.
[406] Fix | Delete
*/
[407] Fix | Delete
[408] Fix | Delete
function unregisterShortcut(name) {
[409] Fix | Delete
return {
[410] Fix | Delete
type: 'UNREGISTER_SHORTCUT',
[411] Fix | Delete
name: name
[412] Fix | Delete
};
[413] Fix | Delete
}
[414] Fix | Delete
[415] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
[416] Fix | Delete
var slicedToArray = __webpack_require__("ODXe");
[417] Fix | Delete
[418] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
[419] Fix | Delete
var toConsumableArray = __webpack_require__("KQm4");
[420] Fix | Delete
[421] Fix | Delete
// EXTERNAL MODULE: ./node_modules/rememo/es/rememo.js
[422] Fix | Delete
var rememo = __webpack_require__("pPDe");
[423] Fix | Delete
[424] Fix | Delete
// EXTERNAL MODULE: external ["wp","keycodes"]
[425] Fix | Delete
var external_wp_keycodes_ = __webpack_require__("RxS6");
[426] Fix | Delete
[427] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/keyboard-shortcuts/build-module/store/selectors.js
[428] Fix | Delete
[429] Fix | Delete
[430] Fix | Delete
[431] Fix | Delete
/**
[432] Fix | Delete
* External dependencies
[433] Fix | Delete
*/
[434] Fix | Delete
[435] Fix | Delete
[436] Fix | Delete
/**
[437] Fix | Delete
* WordPress dependencies
[438] Fix | Delete
*/
[439] Fix | Delete
[440] Fix | Delete
[441] Fix | Delete
/** @typedef {import('./actions').WPShortcutKeyCombination} WPShortcutKeyCombination */
[442] Fix | Delete
[443] Fix | Delete
/** @typedef {import('@wordpress/keycodes').WPKeycodeHandlerByModifier} WPKeycodeHandlerByModifier */
[444] Fix | Delete
[445] Fix | Delete
/**
[446] Fix | Delete
* Shared reference to an empty array for cases where it is important to avoid
[447] Fix | Delete
* returning a new array reference on every invocation.
[448] Fix | Delete
*
[449] Fix | Delete
* @type {Array<any>}
[450] Fix | Delete
*/
[451] Fix | Delete
[452] Fix | Delete
var EMPTY_ARRAY = [];
[453] Fix | Delete
/**
[454] Fix | Delete
* Shortcut formatting methods.
[455] Fix | Delete
*
[456] Fix | Delete
* @property {WPKeycodeHandlerByModifier} display Display formatting.
[457] Fix | Delete
* @property {WPKeycodeHandlerByModifier} rawShortcut Raw shortcut formatting.
[458] Fix | Delete
* @property {WPKeycodeHandlerByModifier} ariaLabel ARIA label formatting.
[459] Fix | Delete
*/
[460] Fix | Delete
[461] Fix | Delete
var FORMATTING_METHODS = {
[462] Fix | Delete
display: external_wp_keycodes_["displayShortcut"],
[463] Fix | Delete
raw: external_wp_keycodes_["rawShortcut"],
[464] Fix | Delete
ariaLabel: external_wp_keycodes_["shortcutAriaLabel"]
[465] Fix | Delete
};
[466] Fix | Delete
/**
[467] Fix | Delete
* Returns a string representing the key combination.
[468] Fix | Delete
*
[469] Fix | Delete
* @param {?WPShortcutKeyCombination} shortcut Key combination.
[470] Fix | Delete
* @param {keyof FORMATTING_METHODS} representation Type of representation
[471] Fix | Delete
* (display, raw, ariaLabel).
[472] Fix | Delete
*
[473] Fix | Delete
* @return {string?} Shortcut representation.
[474] Fix | Delete
*/
[475] Fix | Delete
[476] Fix | Delete
function getKeyCombinationRepresentation(shortcut, representation) {
[477] Fix | Delete
if (!shortcut) {
[478] Fix | Delete
return null;
[479] Fix | Delete
}
[480] Fix | Delete
[481] Fix | Delete
return shortcut.modifier ? FORMATTING_METHODS[representation][shortcut.modifier](shortcut.character) : shortcut.character;
[482] Fix | Delete
}
[483] Fix | Delete
/**
[484] Fix | Delete
* Returns the main key combination for a given shortcut name.
[485] Fix | Delete
*
[486] Fix | Delete
* @param {Object} state Global state.
[487] Fix | Delete
* @param {string} name Shortcut name.
[488] Fix | Delete
*
[489] Fix | Delete
* @return {WPShortcutKeyCombination?} Key combination.
[490] Fix | Delete
*/
[491] Fix | Delete
[492] Fix | Delete
[493] Fix | Delete
function getShortcutKeyCombination(state, name) {
[494] Fix | Delete
return state[name] ? state[name].keyCombination : null;
[495] Fix | Delete
}
[496] Fix | Delete
/**
[497] Fix | Delete
* Returns a string representing the main key combination for a given shortcut name.
[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