External Libraries: Update `clipboard` and `polyfill-library`.

This updates the Clipboard.js and `polyfill-library` dependencies to their latest versions (`2.0.11` and `4.4.0`, respectively).

Fixes #56670.
Built from https://develop.svn.wordpress.org/trunk@54386


git-svn-id: http://core.svn.wordpress.org/trunk@53945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj 2022-10-04 15:55:23 +00:00
parent 335ecfdca9
commit 436bf77300
8 changed files with 64 additions and 36 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*!
* clipboard.js v2.0.10
* clipboard.js v2.0.11
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
@ -94,6 +94,21 @@ function createFakeElement(value) {
/**
* Create fake copy action wrapper using a fake element.
* @param {String} target
* @param {Object} options
* @return {String}
*/
var fakeCopyAction = function fakeCopyAction(value, options) {
var fakeElement = createFakeElement(value);
options.container.appendChild(fakeElement);
var selectedText = select_default()(fakeElement);
command('copy');
fakeElement.remove();
return selectedText;
};
/**
* Copy action wrapper.
* @param {String|HTMLElement} target
@ -101,6 +116,7 @@ function createFakeElement(value) {
* @return {String}
*/
var ClipboardActionCopy = function ClipboardActionCopy(target) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
container: document.body
@ -108,11 +124,10 @@ var ClipboardActionCopy = function ClipboardActionCopy(target) {
var selectedText = '';
if (typeof target === 'string') {
var fakeElement = createFakeElement(target);
options.container.appendChild(fakeElement);
selectedText = select_default()(fakeElement);
command('copy');
fakeElement.remove();
selectedText = fakeCopyAction(target, options);
} else if (target instanceof HTMLInputElement && !['text', 'search', 'url', 'tel', 'password'].includes(target === null || target === void 0 ? void 0 : target.type)) {
// If input type doesn't support `setSelectionRange`. Simulate it. https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
selectedText = fakeCopyAction(target.value, options);
} else {
selectedText = select_default()(target);
command('copy');
@ -304,7 +319,6 @@ var Clipboard = /*#__PURE__*/function (_Emitter) {
trigger.focus();
}
document.activeElement.blur();
window.getSelection().removeAllRanges();
}
});

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
/***/ (function(module) {
/*!
* clipboard.js v2.0.10
* clipboard.js v2.0.11
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
@ -95,6 +95,21 @@ function createFakeElement(value) {
/**
* Create fake copy action wrapper using a fake element.
* @param {String} target
* @param {Object} options
* @return {String}
*/
var fakeCopyAction = function fakeCopyAction(value, options) {
var fakeElement = createFakeElement(value);
options.container.appendChild(fakeElement);
var selectedText = select_default()(fakeElement);
command('copy');
fakeElement.remove();
return selectedText;
};
/**
* Copy action wrapper.
* @param {String|HTMLElement} target
@ -102,6 +117,7 @@ function createFakeElement(value) {
* @return {String}
*/
var ClipboardActionCopy = function ClipboardActionCopy(target) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
container: document.body
@ -109,11 +125,10 @@ var ClipboardActionCopy = function ClipboardActionCopy(target) {
var selectedText = '';
if (typeof target === 'string') {
var fakeElement = createFakeElement(target);
options.container.appendChild(fakeElement);
selectedText = select_default()(fakeElement);
command('copy');
fakeElement.remove();
selectedText = fakeCopyAction(target, options);
} else if (target instanceof HTMLInputElement && !['text', 'search', 'url', 'tel', 'password'].includes(target === null || target === void 0 ? void 0 : target.type)) {
// If input type doesn't support `setSelectionRange`. Simulate it. https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
selectedText = fakeCopyAction(target.value, options);
} else {
selectedText = select_default()(target);
command('copy');
@ -305,7 +320,6 @@ var Clipboard = /*#__PURE__*/function (_Emitter) {
trigger.focus();
}
document.activeElement.blur();
window.getSelection().removeAllRanges();
}
});
@ -446,9 +460,9 @@ module.exports = closest;
/***/ }),
/***/ 438:
/***/ (function(module, __unused_webpack_exports, __nested_webpack_require_15133__) {
/***/ (function(module, __unused_webpack_exports, __nested_webpack_require_15749__) {
var closest = __nested_webpack_require_15133__(828);
var closest = __nested_webpack_require_15749__(828);
/**
* Delegates event to a selector.
@ -587,10 +601,10 @@ exports.fn = function(value) {
/***/ }),
/***/ 370:
/***/ (function(module, __unused_webpack_exports, __nested_webpack_require_18497__) {
/***/ (function(module, __unused_webpack_exports, __nested_webpack_require_19113__) {
var is = __nested_webpack_require_18497__(879);
var delegate = __nested_webpack_require_18497__(438);
var is = __nested_webpack_require_19113__(879);
var delegate = __nested_webpack_require_19113__(438);
/**
* Validates all params and calls the right
@ -818,7 +832,7 @@ module.exports.TinyEmitter = E;
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __nested_webpack_require_23879__(moduleId) {
/******/ function __nested_webpack_require_24495__(moduleId) {
/******/ // Check if module is in cache
/******/ if(__webpack_module_cache__[moduleId]) {
/******/ return __webpack_module_cache__[moduleId].exports;
@ -831,7 +845,7 @@ module.exports.TinyEmitter = E;
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_23879__);
/******/ __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_24495__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
@ -841,11 +855,11 @@ module.exports.TinyEmitter = E;
/******/ /* webpack/runtime/compat get default export */
/******/ !function() {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __nested_webpack_require_23879__.n = function(module) {
/******/ __nested_webpack_require_24495__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function() { return module['default']; } :
/******/ function() { return module; };
/******/ __nested_webpack_require_23879__.d(getter, { a: getter });
/******/ __nested_webpack_require_24495__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ }();
@ -853,9 +867,9 @@ module.exports.TinyEmitter = E;
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __nested_webpack_require_23879__.d = function(exports, definition) {
/******/ __nested_webpack_require_24495__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__nested_webpack_require_23879__.o(definition, key) && !__nested_webpack_require_23879__.o(exports, key)) {
/******/ if(__nested_webpack_require_24495__.o(definition, key) && !__nested_webpack_require_24495__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
@ -864,14 +878,14 @@ module.exports.TinyEmitter = E;
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __nested_webpack_require_23879__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ __nested_webpack_require_24495__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/************************************************************************/
/******/ // module exports must be returned from runtime so entry inlining is disabled
/******/ // startup
/******/ // Load entry module and return exports
/******/ return __nested_webpack_require_23879__(686);
/******/ return __nested_webpack_require_24495__(686);
/******/ })()
.default;
});

File diff suppressed because one or more lines are too long

View File

@ -110,9 +110,9 @@ function wp_default_packages_vendor( $scripts ) {
'lodash' => '4.17.19',
'wp-polyfill-fetch' => '3.6.2',
'wp-polyfill-formdata' => '4.0.10',
'wp-polyfill-node-contains' => '4.0.0',
'wp-polyfill-node-contains' => '4.4.0',
'wp-polyfill-url' => '3.6.4',
'wp-polyfill-dom-rect' => '4.0.0',
'wp-polyfill-dom-rect' => '4.4.0',
'wp-polyfill-element-closest' => '2.0.2',
'wp-polyfill-object-fit' => '2.3.5',
'wp-polyfill' => '3.15.0',
@ -740,7 +740,7 @@ function wp_default_scripts( $scripts ) {
$scripts->add( 'editor', "/wp-admin/js/editor$suffix.js", array( 'utils', 'jquery' ), false, 1 );
$scripts->add( 'clipboard', "/wp-includes/js/clipboard$suffix.js", array(), '2.0.10', 1 );
$scripts->add( 'clipboard', "/wp-includes/js/clipboard$suffix.js", array(), '2.0.11', 1 );
$scripts->add( 'wp-ajax-response', "/wp-includes/js/wp-ajax-response$suffix.js", array( 'jquery', 'wp-a11y' ), false, 1 );
did_action( 'init' ) && $scripts->localize(

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.1-beta2-54385';
$wp_version = '6.1-beta2-54386';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.