Update WP and plugins
This commit is contained in:
parent
10a4713229
commit
1fb77fc4ff
864 changed files with 101724 additions and 78262 deletions
219
wp-includes/js/dist/editor.js
vendored
219
wp-includes/js/dist/editor.js
vendored
|
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["editor"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 302);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 303);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
|
|
@ -290,6 +290,12 @@ function _defineProperty(obj, key, value) {
|
|||
|
||||
/***/ }),
|
||||
/* 16 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
(function() { module.exports = this["wp"]["keycodes"]; }());
|
||||
|
||||
/***/ }),
|
||||
/* 17 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
||||
|
|
@ -345,12 +351,6 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|||
}());
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 17 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
(function() { module.exports = this["wp"]["keycodes"]; }());
|
||||
|
||||
/***/ }),
|
||||
/* 18 */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
|
@ -2300,7 +2300,7 @@ g = (function() {
|
|||
|
||||
try {
|
||||
// This works if eval is allowed (see CSP)
|
||||
g = g || Function("return this")() || (1, eval)("this");
|
||||
g = g || new Function("return this")();
|
||||
} catch (e) {
|
||||
// This works if the window reference is available
|
||||
if (typeof window === "object") g = window;
|
||||
|
|
@ -2323,7 +2323,7 @@ module.exports = g;
|
|||
/* 53 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
module.exports = __webpack_require__(269);
|
||||
module.exports = __webpack_require__(270);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
|
@ -2334,7 +2334,7 @@ module.exports = __webpack_require__(269);
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
var TextareaAutosize_1 = __webpack_require__(270);
|
||||
var TextareaAutosize_1 = __webpack_require__(271);
|
||||
exports["default"] = TextareaAutosize_1["default"];
|
||||
|
||||
|
||||
|
|
@ -3239,7 +3239,7 @@ if (typeof Object.create === 'function') {
|
|||
/* 100 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
/* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.3.2 by @mathias */
|
||||
/* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.1 by @mathias */
|
||||
;(function(root) {
|
||||
|
||||
/** Detect free variables */
|
||||
|
|
@ -3305,7 +3305,7 @@ if (typeof Object.create === 'function') {
|
|||
* @returns {Error} Throws a `RangeError` with the applicable error message.
|
||||
*/
|
||||
function error(type) {
|
||||
throw RangeError(errors[type]);
|
||||
throw new RangeError(errors[type]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3452,7 +3452,7 @@ if (typeof Object.create === 'function') {
|
|||
|
||||
/**
|
||||
* Bias adaptation function as per section 3.4 of RFC 3492.
|
||||
* http://tools.ietf.org/html/rfc3492#section-3.4
|
||||
* https://tools.ietf.org/html/rfc3492#section-3.4
|
||||
* @private
|
||||
*/
|
||||
function adapt(delta, numPoints, firstTime) {
|
||||
|
|
@ -3727,7 +3727,7 @@ if (typeof Object.create === 'function') {
|
|||
* @memberOf punycode
|
||||
* @type String
|
||||
*/
|
||||
'version': '1.3.2',
|
||||
'version': '1.4.1',
|
||||
/**
|
||||
* An object of methods to convert from JavaScript's internal character
|
||||
* representation (UCS-2) to Unicode code points, and back.
|
||||
|
|
@ -7035,7 +7035,8 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) {
|
|||
/* 266 */,
|
||||
/* 267 */,
|
||||
/* 268 */,
|
||||
/* 269 */
|
||||
/* 269 */,
|
||||
/* 270 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
@ -7200,7 +7201,7 @@ function separateState(state) {
|
|||
}
|
||||
|
||||
/***/ }),
|
||||
/* 270 */
|
||||
/* 271 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
@ -7235,8 +7236,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|||
exports.__esModule = true;
|
||||
var React = __webpack_require__(26);
|
||||
var PropTypes = __webpack_require__(29);
|
||||
var autosize = __webpack_require__(271);
|
||||
var _getLineHeight = __webpack_require__(272);
|
||||
var autosize = __webpack_require__(272);
|
||||
var _getLineHeight = __webpack_require__(273);
|
||||
var getLineHeight = _getLineHeight;
|
||||
var UPDATE = 'autosize:update';
|
||||
var DESTROY = 'autosize:destroy';
|
||||
|
|
@ -7328,7 +7329,7 @@ exports["default"] = TextareaAutosize;
|
|||
|
||||
|
||||
/***/ }),
|
||||
/* 271 */
|
||||
/* 272 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
||||
|
|
@ -7616,11 +7617,11 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|||
});
|
||||
|
||||
/***/ }),
|
||||
/* 272 */
|
||||
/* 273 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// Load in dependencies
|
||||
var computedStyle = __webpack_require__(273);
|
||||
var computedStyle = __webpack_require__(274);
|
||||
|
||||
/**
|
||||
* Calculate the `line-height` of a given node
|
||||
|
|
@ -7719,7 +7720,7 @@ module.exports = lineHeight;
|
|||
|
||||
|
||||
/***/ }),
|
||||
/* 273 */
|
||||
/* 274 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// This code has been refactored for 140 bytes
|
||||
|
|
@ -7752,7 +7753,6 @@ module.exports = computedStyle;
|
|||
|
||||
|
||||
/***/ }),
|
||||
/* 274 */,
|
||||
/* 275 */,
|
||||
/* 276 */,
|
||||
/* 277 */,
|
||||
|
|
@ -7780,7 +7780,8 @@ module.exports = computedStyle;
|
|||
/* 299 */,
|
||||
/* 300 */,
|
||||
/* 301 */,
|
||||
/* 302 */
|
||||
/* 302 */,
|
||||
/* 303 */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
@ -8731,7 +8732,7 @@ var reducer_withSaveReusableBlock = function withSaveReusableBlock(reducer) {
|
|||
*/
|
||||
|
||||
|
||||
var reducer_editor = Object(external_lodash_["flow"])([external_this_wp_data_["combineReducers"], reducer_withInnerBlocksRemoveCascade, // Track undo history, starting at editor initialization.
|
||||
var editor = Object(external_lodash_["flow"])([external_this_wp_data_["combineReducers"], reducer_withInnerBlocksRemoveCascade, // Track undo history, starting at editor initialization.
|
||||
with_history({
|
||||
resetTypes: ['SETUP_EDITOR_STATE'],
|
||||
ignoreTypes: ['RECEIVE_BLOCKS', 'RESET_POST', 'UPDATE_POST'],
|
||||
|
|
@ -9746,7 +9747,7 @@ function reducer_previewLink() {
|
|||
return state;
|
||||
}
|
||||
/* harmony default export */ var store_reducer = (redux_optimist_default()(Object(external_this_wp_data_["combineReducers"])({
|
||||
editor: reducer_editor,
|
||||
editor: editor,
|
||||
initialEdits: initialEdits,
|
||||
currentPost: currentPost,
|
||||
isTyping: reducer_isTyping,
|
||||
|
|
@ -14068,7 +14069,7 @@ var esm_extends = __webpack_require__(18);
|
|||
var external_this_wp_element_ = __webpack_require__(0);
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
||||
var classnames = __webpack_require__(16);
|
||||
var classnames = __webpack_require__(17);
|
||||
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
||||
|
||||
// EXTERNAL MODULE: external {"this":["wp","compose"]}
|
||||
|
|
@ -14877,7 +14878,7 @@ BlockFormatControls.Slot = block_format_controls_Slot;
|
|||
/* harmony default export */ var block_format_controls = (BlockFormatControls);
|
||||
|
||||
// EXTERNAL MODULE: external {"this":["wp","keycodes"]}
|
||||
var external_this_wp_keycodes_ = __webpack_require__(17);
|
||||
var external_this_wp_keycodes_ = __webpack_require__(16);
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/block-navigation/index.js
|
||||
|
||||
|
|
@ -20529,23 +20530,15 @@ function (_Component) {
|
|||
custom_undo_redo_levels: 1,
|
||||
lists_indent_on_tab: false
|
||||
};
|
||||
|
||||
if (multilineTag === 'li') {
|
||||
settings.plugins.push('lists');
|
||||
}
|
||||
|
||||
external_tinymce_default.a.init(Object(objectSpread["a" /* default */])({}, settings, {
|
||||
target: this.editorNode,
|
||||
setup: function setup(editor) {
|
||||
_this3.editor = editor;
|
||||
|
||||
_this3.props.onSetup(editor); // TinyMCE resets the element content on initialization, even
|
||||
_this3.editor = editor; // TinyMCE resets the element content on initialization, even
|
||||
// when it's already identical to what exists currently. This
|
||||
// behavior clobbers a selection which exists at the time of
|
||||
// initialization, thus breaking writing flow navigation. The
|
||||
// hack here neutralizes setHTML during initialization.
|
||||
|
||||
|
||||
var setHTML;
|
||||
editor.on('preinit', function () {
|
||||
setHTML = editor.dom.setHTML;
|
||||
|
|
@ -20845,103 +20838,156 @@ function (_Component) {
|
|||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
var _window$Node = window.Node,
|
||||
list_edit_TEXT_NODE = _window$Node.TEXT_NODE,
|
||||
ELEMENT_NODE = _window$Node.ELEMENT_NODE;
|
||||
/**
|
||||
* Gets the selected list node, which is the closest list node to the start of
|
||||
* the selection.
|
||||
*
|
||||
* @return {?Element} The selected list node, or undefined if none is selected.
|
||||
*/
|
||||
|
||||
function isListRootSelected(editor) {
|
||||
return !editor.selection || editor.selection.getNode().closest('ol,ul') === editor.getBody();
|
||||
}
|
||||
function getSelectedListNode() {
|
||||
var selection = window.getSelection();
|
||||
|
||||
function isActiveListType(editor, tagName, rootTagName) {
|
||||
if (document.activeElement !== editor.getBody()) {
|
||||
return tagName === rootTagName;
|
||||
}
|
||||
|
||||
var listItem = editor.selection.getNode();
|
||||
var list = listItem.closest('ol,ul');
|
||||
|
||||
if (!list) {
|
||||
if (selection.rangeCount === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
return list.nodeName.toLowerCase() === tagName;
|
||||
var _selection$getRangeAt = selection.getRangeAt(0),
|
||||
startContainer = _selection$getRangeAt.startContainer;
|
||||
|
||||
if (startContainer.nodeType === list_edit_TEXT_NODE) {
|
||||
startContainer = startContainer.parentNode;
|
||||
}
|
||||
|
||||
if (startContainer.nodeType !== ELEMENT_NODE) {
|
||||
return;
|
||||
}
|
||||
|
||||
var rootNode = startContainer.closest('*[contenteditable]');
|
||||
|
||||
if (!rootNode || !rootNode.contains(startContainer)) {
|
||||
return;
|
||||
}
|
||||
|
||||
return startContainer.closest('ol,ul');
|
||||
}
|
||||
/**
|
||||
* Whether or not the root list is selected.
|
||||
*
|
||||
* @return {boolean} True if the root list or nothing is selected, false if an
|
||||
* inner list is selected.
|
||||
*/
|
||||
|
||||
|
||||
function isListRootSelected() {
|
||||
var listNode = getSelectedListNode(); // Consider the root list selected if nothing is selected.
|
||||
|
||||
return !listNode || listNode.contentEditable === 'true';
|
||||
}
|
||||
/**
|
||||
* Wether or not the selected list has the given tag name.
|
||||
*
|
||||
* @param {string} tagName The tag name the list should have.
|
||||
* @param {string} rootTagName The current root tag name, to compare with in
|
||||
* case nothing is selected.
|
||||
*
|
||||
* @return {boolean} [description]
|
||||
*/
|
||||
|
||||
|
||||
function isActiveListType(tagName, rootTagName) {
|
||||
var listNode = getSelectedListNode();
|
||||
|
||||
if (!listNode) {
|
||||
return tagName === rootTagName;
|
||||
}
|
||||
|
||||
return listNode.nodeName.toLowerCase() === tagName;
|
||||
}
|
||||
|
||||
var list_edit_ListEdit = function ListEdit(_ref) {
|
||||
var editor = _ref.editor,
|
||||
onTagNameChange = _ref.onTagNameChange,
|
||||
var onTagNameChange = _ref.onTagNameChange,
|
||||
tagName = _ref.tagName,
|
||||
onSyncDOM = _ref.onSyncDOM;
|
||||
value = _ref.value,
|
||||
onChange = _ref.onChange;
|
||||
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(shortcut_RichTextShortcut, {
|
||||
type: "primary",
|
||||
character: "[",
|
||||
onUse: function onUse() {
|
||||
editor.execCommand('Outdent');
|
||||
onSyncDOM();
|
||||
onChange(Object(external_this_wp_richText_["outdentListItems"])(value));
|
||||
}
|
||||
}), Object(external_this_wp_element_["createElement"])(shortcut_RichTextShortcut, {
|
||||
type: "primary",
|
||||
character: "]",
|
||||
onUse: function onUse() {
|
||||
editor.execCommand('Indent');
|
||||
onSyncDOM();
|
||||
onChange(Object(external_this_wp_richText_["indentListItems"])(value, {
|
||||
type: tagName
|
||||
}));
|
||||
}
|
||||
}), Object(external_this_wp_element_["createElement"])(shortcut_RichTextShortcut, {
|
||||
type: "primary",
|
||||
character: "m",
|
||||
onUse: function onUse() {
|
||||
editor.execCommand('Indent');
|
||||
onSyncDOM();
|
||||
onChange(Object(external_this_wp_richText_["indentListItems"])(value, {
|
||||
type: tagName
|
||||
}));
|
||||
}
|
||||
}), Object(external_this_wp_element_["createElement"])(shortcut_RichTextShortcut, {
|
||||
type: "primaryShift",
|
||||
character: "m",
|
||||
onUse: function onUse() {
|
||||
editor.execCommand('Outdent');
|
||||
onSyncDOM();
|
||||
onChange(Object(external_this_wp_richText_["outdentListItems"])(value));
|
||||
}
|
||||
}), Object(external_this_wp_element_["createElement"])(block_format_controls, null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Toolbar"], {
|
||||
controls: [{
|
||||
icon: 'editor-ul',
|
||||
title: Object(external_this_wp_i18n_["__"])('Convert to unordered list'),
|
||||
isActive: isActiveListType(editor, 'ul', tagName),
|
||||
isActive: isActiveListType('ul', tagName),
|
||||
onClick: function onClick() {
|
||||
if (isListRootSelected(editor)) {
|
||||
onChange(Object(external_this_wp_richText_["changeListType"])(value, {
|
||||
type: 'ul'
|
||||
}));
|
||||
|
||||
if (isListRootSelected()) {
|
||||
onTagNameChange('ul');
|
||||
} else {
|
||||
editor.execCommand('InsertUnorderedList');
|
||||
onSyncDOM();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
icon: 'editor-ol',
|
||||
title: Object(external_this_wp_i18n_["__"])('Convert to ordered list'),
|
||||
isActive: isActiveListType(editor, 'ol', tagName),
|
||||
isActive: isActiveListType('ol', tagName),
|
||||
onClick: function onClick() {
|
||||
if (isListRootSelected(editor)) {
|
||||
onChange(Object(external_this_wp_richText_["changeListType"])(value, {
|
||||
type: 'ol'
|
||||
}));
|
||||
|
||||
if (isListRootSelected()) {
|
||||
onTagNameChange('ol');
|
||||
} else {
|
||||
editor.execCommand('InsertOrderedList');
|
||||
onSyncDOM();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
icon: 'editor-outdent',
|
||||
title: Object(external_this_wp_i18n_["__"])('Outdent list item'),
|
||||
onClick: function onClick() {
|
||||
editor.execCommand('Outdent');
|
||||
onSyncDOM();
|
||||
onChange(Object(external_this_wp_richText_["outdentListItems"])(value));
|
||||
}
|
||||
}, {
|
||||
icon: 'editor-indent',
|
||||
title: Object(external_this_wp_i18n_["__"])('Indent list item'),
|
||||
onClick: function onClick() {
|
||||
editor.execCommand('Indent');
|
||||
onSyncDOM();
|
||||
onChange(Object(external_this_wp_richText_["indentListItems"])(value, {
|
||||
type: tagName
|
||||
}));
|
||||
}
|
||||
}]
|
||||
})));
|
||||
|
|
@ -21166,7 +21212,6 @@ function (_Component) {
|
|||
_this.onSplit = _this.props.unstableOnSplit;
|
||||
}
|
||||
|
||||
_this.onSetup = _this.onSetup.bind(Object(assertThisInitialized["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this)));
|
||||
_this.onFocus = _this.onFocus.bind(Object(assertThisInitialized["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this)));
|
||||
_this.onBlur = _this.onBlur.bind(Object(assertThisInitialized["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this)));
|
||||
_this.onChange = _this.onChange.bind(Object(assertThisInitialized["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this)));
|
||||
|
|
@ -21215,17 +21260,6 @@ function (_Component) {
|
|||
value: function setRef(node) {
|
||||
this.editableRef = node;
|
||||
}
|
||||
/**
|
||||
* Sets a reference to the TinyMCE editor instance.
|
||||
*
|
||||
* @param {Editor} editor The editor instance as passed by TinyMCE.
|
||||
*/
|
||||
|
||||
}, {
|
||||
key: "onSetup",
|
||||
value: function onSetup(editor) {
|
||||
this.editor = editor;
|
||||
}
|
||||
}, {
|
||||
key: "setFocusedElement",
|
||||
value: function setFocusedElement() {
|
||||
|
|
@ -21984,13 +22018,11 @@ function (_Component) {
|
|||
return Object(external_this_wp_element_["createElement"])("div", {
|
||||
className: classes,
|
||||
onFocus: this.setFocusedElement
|
||||
}, isSelected && this.editor && this.multilineTag === 'li' && Object(external_this_wp_element_["createElement"])(list_edit_ListEdit, {
|
||||
editor: this.editor,
|
||||
}, isSelected && this.multilineTag === 'li' && Object(external_this_wp_element_["createElement"])(list_edit_ListEdit, {
|
||||
onTagNameChange: onTagNameChange,
|
||||
tagName: Tagname,
|
||||
onSyncDOM: function onSyncDOM() {
|
||||
return _this3.onChange(_this3.createRecord());
|
||||
}
|
||||
value: record,
|
||||
onChange: this.onChange
|
||||
}), isSelected && !inlineToolbar && Object(external_this_wp_element_["createElement"])(block_format_controls, null, Object(external_this_wp_element_["createElement"])(format_toolbar, {
|
||||
controls: formattingControls
|
||||
})), isSelected && inlineToolbar && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["IsolatedEventContainer"], {
|
||||
|
|
@ -22007,7 +22039,6 @@ function (_Component) {
|
|||
activeId = _ref6.activeId;
|
||||
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(tinymce_TinyMCE, Object(esm_extends["a" /* default */])({
|
||||
tagName: Tagname,
|
||||
onSetup: _this3.onSetup,
|
||||
style: style,
|
||||
record: record,
|
||||
valueToEditableHTML: _this3.valueToEditableHTML,
|
||||
|
|
@ -23238,7 +23269,7 @@ function (_Component) {
|
|||
if (this.state.selectedSuggestion !== null) {
|
||||
this.selectLink(post); // Announce a link has been selected when tabbing away from the input field.
|
||||
|
||||
this.props.speak(Object(external_this_wp_i18n_["__"])('Link selected'));
|
||||
this.props.speak(Object(external_this_wp_i18n_["__"])('Link selected.'));
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue