Editor: Update @wordpress npm packages

Update @wordpress npm packages to the latest published versions. This includes
block editor bug fixes for WordPress 5.7 RC 2.

Fixes #52680.

Built from https://develop.svn.wordpress.org/branches/5.7@50467


git-svn-id: http://core.svn.wordpress.org/branches/5.7@50078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
noisysocks 2021-03-02 00:46:20 +00:00
parent 23f58f8af4
commit 9588f78d86
21 changed files with 242 additions and 60 deletions

File diff suppressed because one or more lines are too long

View File

@ -33,7 +33,12 @@ function render_block_core_social_link( $attributes, $content, $block ) {
} }
$icon = block_core_social_link_get_icon( $service ); $icon = block_core_social_link_get_icon( $service );
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => 'wp-social-link wp-social-link-' . $service . $class_name ) ); $wrapper_attributes = get_block_wrapper_attributes(
array(
'class' => 'wp-social-link wp-social-link-' . $service . $class_name,
'style' => block_core_social_link_get_color_styles( $block->context ),
)
);
return '<li ' . $wrapper_attributes . '><a href="' . esc_url( $url ) . '" aria-label="' . esc_attr( $label ) . '" ' . $attribute . ' class="wp-block-social-link-anchor"> ' . $icon . '</a></li>'; return '<li ' . $wrapper_attributes . '><a href="' . esc_url( $url ) . '" aria-label="' . esc_attr( $label ) . '" ' . $attribute . ' class="wp-block-social-link-anchor"> ' . $icon . '</a></li>';
} }
@ -280,3 +285,24 @@ function block_core_social_link_services( $service = '', $field = '' ) {
return $services_data; return $services_data;
} }
/**
* Returns CSS styles for icon and icon background colors.
*
* @param array $context Block context passed to Social Link.
*
* @return string Inline CSS styles for link's icon and background colors.
*/
function block_core_social_link_get_color_styles( $context ) {
$styles = array();
if ( array_key_exists( 'iconColorValue', $context ) ) {
$styles[] = 'color: ' . $context['iconColorValue'] . '; ';
}
if ( array_key_exists( 'iconBackgroundColorValue', $context ) ) {
$styles[] = 'background-color: ' . $context['iconBackgroundColorValue'] . '; ';
}
return implode( '', $styles );
}

View File

@ -17,7 +17,9 @@
} }
}, },
"usesContext": [ "usesContext": [
"openInNewTab" "openInNewTab",
"iconColorValue",
"iconBackgroundColorValue"
], ],
"supports": { "supports": {
"reusable": false, "reusable": false,

View File

@ -30,7 +30,9 @@
} }
}, },
"providesContext": { "providesContext": {
"openInNewTab": "openInNewTab" "openInNewTab": "openInNewTab",
"iconColorValue": "iconColorValue",
"iconBackgroundColorValue": "iconBackgroundColorValue"
}, },
"supports": { "supports": {
"align": [ "align": [

View File

@ -168,6 +168,9 @@ div[data-type="core/button"] {
flex-wrap: wrap; flex-wrap: wrap;
} }
.wp-block-buttons {
/* stylelint-disable indentation */
}
.wp-block-buttons > .wp-block { .wp-block-buttons > .wp-block {
margin-right: 0; margin-right: 0;
margin-top: 0.5em; margin-top: 0.5em;
@ -183,6 +186,22 @@ div[data-type="core/button"] {
.wp-block-buttons > .wp-block-button:focus { .wp-block-buttons > .wp-block-button:focus {
box-shadow: none; box-shadow: none;
} }
.wp-block-buttons:not(.is-content-justification-space-between,
.is-content-justification-right,
.is-content-justification-left,
.is-content-justification-center) .wp-block[data-align=center] {
/* stylelint-enable indentation */
margin-right: auto;
margin-left: auto;
margin-top: 0;
width: 100%;
}
.wp-block-buttons:not(.is-content-justification-space-between,
.is-content-justification-right,
.is-content-justification-left,
.is-content-justification-center) .wp-block[data-align=center] .wp-block-button {
margin-bottom: 0;
}
.wp-block[data-align=center] > .wp-block-buttons { .wp-block[data-align=center] > .wp-block-buttons {
align-items: center; align-items: center;

File diff suppressed because one or more lines are too long

View File

@ -169,6 +169,9 @@ div[data-type="core/button"] {
flex-wrap: wrap; flex-wrap: wrap;
} }
.wp-block-buttons {
/* stylelint-disable indentation */
}
.wp-block-buttons > .wp-block { .wp-block-buttons > .wp-block {
margin-left: 0; margin-left: 0;
margin-top: 0.5em; margin-top: 0.5em;
@ -184,6 +187,22 @@ div[data-type="core/button"] {
.wp-block-buttons > .wp-block-button:focus { .wp-block-buttons > .wp-block-button:focus {
box-shadow: none; box-shadow: none;
} }
.wp-block-buttons:not(.is-content-justification-space-between,
.is-content-justification-right,
.is-content-justification-left,
.is-content-justification-center) .wp-block[data-align=center] {
/* stylelint-enable indentation */
margin-left: auto;
margin-right: auto;
margin-top: 0;
width: 100%;
}
.wp-block-buttons:not(.is-content-justification-space-between,
.is-content-justification-right,
.is-content-justification-left,
.is-content-justification-center) .wp-block[data-align=center] .wp-block-button {
margin-bottom: 0;
}
.wp-block[data-align=center] > .wp-block-buttons { .wp-block[data-align=center] > .wp-block-buttons {
align-items: center; align-items: center;

File diff suppressed because one or more lines are too long

View File

@ -158,6 +158,7 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: wrap; flex-wrap: wrap;
/* stylelint-disable indentation */
} }
.wp-block-buttons.is-vertical { .wp-block-buttons.is-vertical {
flex-direction: column; flex-direction: column;
@ -202,6 +203,9 @@
.wp-block-buttons.is-content-justification-right.is-vertical { .wp-block-buttons.is-content-justification-right.is-vertical {
align-items: flex-end; align-items: flex-end;
} }
.wp-block-buttons.is-content-justification-space-between {
justify-content: space-between;
}
.wp-block-buttons.aligncenter { .wp-block-buttons.aligncenter {
text-align: center; text-align: center;
} }
@ -219,6 +223,16 @@
.wp-block-buttons.alignright .wp-block-button:first-child { .wp-block-buttons.alignright .wp-block-button:first-child {
margin-left: 0; margin-left: 0;
} }
.wp-block-buttons:not(.is-content-justification-space-between,
.is-content-justification-right,
.is-content-justification-left,
.is-content-justification-center) .wp-block-button.aligncenter {
/* stylelint-enable indentation */
margin-right: auto;
margin-left: auto;
margin-bottom: 0.5em;
width: 100%;
}
.wp-block-calendar { .wp-block-calendar {
text-align: center; text-align: center;
@ -1837,12 +1851,6 @@ p:empty::before {
.wp-block-social-links.alignright { .wp-block-social-links.alignright {
justify-content: flex-end; justify-content: flex-end;
} }
.wp-block-social-links.has-icon-color.has-icon-color > .wp-social-link {
color: var(--wp--social-links--icon-color);
}
.wp-block-social-links.has-icon-background-color.has-icon-background-color > .wp-social-link {
background-color: var(--wp--social-links--icon-background-color);
}
.wp-social-link { .wp-social-link {
display: block; display: block;

File diff suppressed because one or more lines are too long

View File

@ -159,6 +159,7 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: wrap; flex-wrap: wrap;
/* stylelint-disable indentation */
} }
.wp-block-buttons.is-vertical { .wp-block-buttons.is-vertical {
flex-direction: column; flex-direction: column;
@ -210,6 +211,9 @@
.wp-block-buttons.is-content-justification-right.is-vertical { .wp-block-buttons.is-content-justification-right.is-vertical {
align-items: flex-end; align-items: flex-end;
} }
.wp-block-buttons.is-content-justification-space-between {
justify-content: space-between;
}
.wp-block-buttons.aligncenter { .wp-block-buttons.aligncenter {
text-align: center; text-align: center;
} }
@ -233,6 +237,16 @@
/*rtl:ignore*/ /*rtl:ignore*/
margin-left: 0; margin-left: 0;
} }
.wp-block-buttons:not(.is-content-justification-space-between,
.is-content-justification-right,
.is-content-justification-left,
.is-content-justification-center) .wp-block-button.aligncenter {
/* stylelint-enable indentation */
margin-left: auto;
margin-right: auto;
margin-bottom: 0.5em;
width: 100%;
}
.wp-block-calendar { .wp-block-calendar {
text-align: center; text-align: center;
@ -1877,12 +1891,6 @@ p:empty::before {
.wp-block-social-links.alignright { .wp-block-social-links.alignright {
justify-content: flex-end; justify-content: flex-end;
} }
.wp-block-social-links.has-icon-color.has-icon-color > .wp-social-link {
color: var(--wp--social-links--icon-color);
}
.wp-block-social-links.has-icon-background-color.has-icon-background-color > .wp-social-link {
background-color: var(--wp--social-links--icon-background-color);
}
.wp-social-link { .wp-social-link {
display: block; display: block;

File diff suppressed because one or more lines are too long

View File

@ -26496,6 +26496,78 @@ var share = Object(external_wp_element_["createElement"])(external_wp_primitives
})); }));
/* harmony default export */ var library_share = (share); /* harmony default export */ var library_share = (share);
// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-links/deprecated.js
/**
* External dependencies
*/
/**
* WordPress dependencies
*/
// Social Links block deprecations.
var social_links_deprecated_deprecated = [// V1. Remove CSS variable use for colors.
{
attributes: {
iconColor: {
type: 'string'
},
customIconColor: {
type: 'string'
},
iconColorValue: {
type: 'string'
},
iconBackgroundColor: {
type: 'string'
},
customIconBackgroundColor: {
type: 'string'
},
iconBackgroundColorValue: {
type: 'string'
},
openInNewTab: {
type: 'boolean',
default: false
},
size: {
type: 'string'
}
},
providesContext: {
openInNewTab: 'openInNewTab'
},
supports: {
align: ['left', 'center', 'right'],
anchor: true
},
save: function save(props) {
var _props$attributes = props.attributes,
iconBackgroundColorValue = _props$attributes.iconBackgroundColorValue,
iconColorValue = _props$attributes.iconColorValue,
itemsJustification = _props$attributes.itemsJustification,
size = _props$attributes.size;
var className = classnames_default()(size, Object(defineProperty["a" /* default */])({
'has-icon-color': iconColorValue,
'has-icon-background-color': iconBackgroundColorValue
}, "items-justified-".concat(itemsJustification), itemsJustification));
var style = {
'--wp--social-links--icon-color': iconColorValue,
'--wp--social-links--icon-background-color': iconBackgroundColorValue
};
return Object(external_wp_element_["createElement"])("ul", external_wp_blockEditor_["useBlockProps"].save({
className: className,
style: style
}), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null));
}
}];
/* harmony default export */ var social_links_deprecated = (social_links_deprecated_deprecated);
// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-links/edit.js // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/social-links/edit.js
@ -26570,13 +26642,8 @@ function SocialLinksEdit(props) {
'has-icon-color': iconColor.color || iconColorValue, 'has-icon-color': iconColor.color || iconColorValue,
'has-icon-background-color': iconBackgroundColor.color || iconBackgroundColorValue 'has-icon-background-color': iconBackgroundColor.color || iconBackgroundColorValue
}); });
var style = {
'--wp--social-links--icon-color': iconColor.color || iconColorValue,
'--wp--social-links--icon-background-color': iconBackgroundColor.color || iconBackgroundColorValue
};
var blockProps = Object(external_wp_blockEditor_["useBlockProps"])({ var blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
className: className, className: className
style: style
}); });
var innerBlocksProps = Object(external_wp_blockEditor_["__experimentalUseInnerBlocksProps"])(blockProps, { var innerBlocksProps = Object(external_wp_blockEditor_["__experimentalUseInnerBlocksProps"])(blockProps, {
allowedBlocks: social_links_edit_ALLOWED_BLOCKS, allowedBlocks: social_links_edit_ALLOWED_BLOCKS,
@ -26630,8 +26697,7 @@ function SocialLinksEdit(props) {
// switching themes to a new theme that does not have a matching named color. // switching themes to a new theme that does not have a matching named color.
value: iconColor.color || iconColorValue, value: iconColor.color || iconColorValue,
onChange: function onChange(colorValue) { onChange: function onChange(colorValue) {
setIconColor(colorValue); // Set explicit color value used to add CSS variable in save.js setIconColor(colorValue);
setAttributes({ setAttributes({
iconColorValue: colorValue iconColorValue: colorValue
}); });
@ -26642,8 +26708,7 @@ function SocialLinksEdit(props) {
// switching themes to a new theme that does not have a matching named color. // switching themes to a new theme that does not have a matching named color.
value: iconBackgroundColor.color || iconBackgroundColorValue, value: iconBackgroundColor.color || iconBackgroundColorValue,
onChange: function onChange(colorValue) { onChange: function onChange(colorValue) {
setIconBackgroundColor(colorValue); // Set explicit color value used to add CSS variable in save.js setIconBackgroundColor(colorValue);
setAttributes({ setAttributes({
iconBackgroundColorValue: colorValue iconBackgroundColorValue: colorValue
}); });
@ -26684,13 +26749,8 @@ function social_links_save_save(props) {
'has-icon-color': iconColorValue, 'has-icon-color': iconColorValue,
'has-icon-background-color': iconBackgroundColorValue 'has-icon-background-color': iconBackgroundColorValue
}); });
var style = {
'--wp--social-links--icon-color': iconColorValue,
'--wp--social-links--icon-background-color': iconBackgroundColorValue
};
return Object(external_wp_element_["createElement"])("ul", external_wp_blockEditor_["useBlockProps"].save({ return Object(external_wp_element_["createElement"])("ul", external_wp_blockEditor_["useBlockProps"].save({
className: className, className: className
style: style
}), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)); }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null));
} }
@ -26705,6 +26765,7 @@ function social_links_save_save(props) {
*/ */
var social_links_metadata = { var social_links_metadata = {
apiVersion: 2, apiVersion: 2,
name: "core/social-links", name: "core/social-links",
@ -26737,7 +26798,9 @@ var social_links_metadata = {
} }
}, },
providesContext: { providesContext: {
openInNewTab: "openInNewTab" openInNewTab: "openInNewTab",
iconColorValue: "iconColorValue",
iconBackgroundColorValue: "iconBackgroundColorValue"
}, },
supports: { supports: {
align: ["left", "center", "right"], align: ["left", "center", "right"],
@ -26787,7 +26850,8 @@ var social_links_settings = {
}], }],
icon: library_share, icon: library_share,
edit: social_links_edit, edit: social_links_edit,
save: social_links_save_save save: social_links_save_save,
deprecated: social_links_deprecated
}; };
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/keyboard-return.js // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/keyboard-return.js
@ -27944,11 +28008,14 @@ var social_list_getNameBySite = function getNameBySite(name) {
var edit_SocialLinkEdit = function SocialLinkEdit(_ref) { var edit_SocialLinkEdit = function SocialLinkEdit(_ref) {
var attributes = _ref.attributes, var attributes = _ref.attributes,
setAttributes = _ref.setAttributes, context = _ref.context,
isSelected = _ref.isSelected; isSelected = _ref.isSelected,
setAttributes = _ref.setAttributes;
var url = attributes.url, var url = attributes.url,
service = attributes.service, service = attributes.service,
label = attributes.label; label = attributes.label;
var iconColorValue = context.iconColorValue,
iconBackgroundColorValue = context.iconBackgroundColorValue;
var _useState = Object(external_wp_element_["useState"])(false), var _useState = Object(external_wp_element_["useState"])(false),
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
@ -27961,7 +28028,11 @@ var edit_SocialLinkEdit = function SocialLinkEdit(_ref) {
var IconComponent = social_list_getIconBySite(service); var IconComponent = social_list_getIconBySite(service);
var socialLinkName = social_list_getNameBySite(service); var socialLinkName = social_list_getNameBySite(service);
var blockProps = Object(external_wp_blockEditor_["useBlockProps"])({ var blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
className: classes className: classes,
style: {
color: iconColorValue,
backgroundColor: iconBackgroundColorValue
}
}); });
return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
title: Object(external_wp_i18n_["sprintf"])( title: Object(external_wp_i18n_["sprintf"])(
@ -28038,7 +28109,7 @@ var social_link_metadata = {
type: "string" type: "string"
} }
}, },
usesContext: ["openInNewTab"], usesContext: ["openInNewTab", "iconColorValue", "iconBackgroundColorValue"],
supports: { supports: {
reusable: false, reusable: false,
html: false html: false

File diff suppressed because one or more lines are too long

View File

@ -7347,7 +7347,21 @@ var serverSideBlockDefinitions = {};
// eslint-disable-next-line camelcase // eslint-disable-next-line camelcase
function unstable__bootstrapServerSideBlockDefinitions(definitions) { function unstable__bootstrapServerSideBlockDefinitions(definitions) {
serverSideBlockDefinitions = registration_objectSpread(registration_objectSpread({}, serverSideBlockDefinitions), definitions); for (var _i = 0, _Object$keys = Object.keys(definitions); _i < _Object$keys.length; _i++) {
var blockName = _Object$keys[_i];
// Don't overwrite if already set. It covers the case when metadata
// was initialized from the server.
if (serverSideBlockDefinitions[blockName]) {
continue;
}
serverSideBlockDefinitions[blockName] = Object(external_lodash_["mapKeys"])(Object(external_lodash_["pickBy"])(definitions[blockName], function (value) {
return !Object(external_lodash_["isNil"])(value);
}), function (value, key) {
return Object(external_lodash_["camelCase"])(key);
});
}
} }
/** /**
* Registers a new block provided a unique name and an object defining its * Registers a new block provided a unique name and an object defining its
@ -7374,9 +7388,7 @@ function registerBlockType(name, settings) {
save: function save() { save: function save() {
return null; return null;
} }
}, Object(external_lodash_["pickBy"])(Object(external_lodash_["get"])(serverSideBlockDefinitions, name, {}), function (value) { }, serverSideBlockDefinitions === null || serverSideBlockDefinitions === void 0 ? void 0 : serverSideBlockDefinitions[name]), settings);
return !Object(external_lodash_["isNil"])(value);
})), settings);
if (typeof name !== 'string') { if (typeof name !== 'string') {
console.error('Block names must be strings.'); console.error('Block names must be strings.');

File diff suppressed because one or more lines are too long

View File

@ -12506,7 +12506,7 @@ function useBlockEditorSettings(settings, hasTemplate) {
return { return {
canUseUnfilteredHTML: canUserUseUnfilteredHTML(), canUseUnfilteredHTML: canUserUseUnfilteredHTML(),
reusableBlocks: select('core').getEntityRecords('postType', 'wp_block', reusableBlocks: select(external_wp_coreData_["store"]).getEntityRecords('postType', 'wp_block',
/** /**
* Unbounded queries are not supported on native so as a workaround we set per_page with the maximum value. * Unbounded queries are not supported on native so as a workaround we set per_page with the maximum value.
* Related issue: https://github.com/wordpress-mobile/gutenberg-mobile/issues/2661 * Related issue: https://github.com/wordpress-mobile/gutenberg-mobile/issues/2661
@ -12531,7 +12531,7 @@ function useBlockEditorSettings(settings, hasTemplate) {
undo = _useDispatch.undo; undo = _useDispatch.undo;
return Object(external_wp_element_["useMemo"])(function () { return Object(external_wp_element_["useMemo"])(function () {
return use_block_editor_settings_objectSpread(use_block_editor_settings_objectSpread({}, Object(external_lodash_["pick"])(settings, ['__experimentalBlockDirectory', '__experimentalBlockPatterns', '__experimentalBlockPatternCategories', '__experimentalFeatures', '__experimentalGlobalStylesUserEntityId', '__experimentalGlobalStylesBaseStyles', '__experimentalPreferredStyleVariations', '__experimentalSetIsInserterOpened', 'alignWide', 'allowedBlockTypes', 'availableLegacyWidgets', 'bodyPlaceholder', 'codeEditingEnabled', 'colors', 'disableCustomColors', 'disableCustomFontSizes', 'disableCustomGradients', 'enableCustomUnits', 'enableCustomLineHeight', 'focusMode', 'fontSizes', 'gradients', 'hasFixedToolbar', 'hasReducedUI', 'imageEditing', 'imageSizes', 'imageDimensions', 'isRTL', 'keepCaretInsideBlock', 'maxWidth', 'onUpdateDefaultBlockStyles', 'styles', 'template', 'templateLock', 'titlePlaceholder'])), {}, { return use_block_editor_settings_objectSpread(use_block_editor_settings_objectSpread({}, Object(external_lodash_["pick"])(settings, ['__experimentalBlockDirectory', '__experimentalBlockPatternCategories', '__experimentalBlockPatterns', '__experimentalFeatures', '__experimentalGlobalStylesBaseStyles', '__experimentalGlobalStylesUserEntityId', '__experimentalPreferredStyleVariations', '__experimentalSetIsInserterOpened', 'alignWide', 'allowedBlockTypes', 'availableLegacyWidgets', 'bodyPlaceholder', 'codeEditingEnabled', 'colors', 'disableCustomColors', 'disableCustomFontSizes', 'disableCustomGradients', 'enableCustomLineHeight', 'enableCustomSpacing', 'enableCustomUnits', 'focusMode', 'fontSizes', 'gradients', 'hasFixedToolbar', 'hasReducedUI', 'imageDimensions', 'imageEditing', 'imageSizes', 'isRTL', 'keepCaretInsideBlock', 'maxWidth', 'onUpdateDefaultBlockStyles', 'styles', 'template', 'templateLock', 'titlePlaceholder'])), {}, {
mediaUpload: hasUploadPermissions ? mediaUpload : undefined, mediaUpload: hasUploadPermissions ? mediaUpload : undefined,
__experimentalReusableBlocks: reusableBlocks, __experimentalReusableBlocks: reusableBlocks,
__experimentalFetchLinkSuggestions: Object(external_lodash_["partialRight"])(fetchLinkSuggestions, settings), __experimentalFetchLinkSuggestions: Object(external_lodash_["partialRight"])(fetchLinkSuggestions, settings),

File diff suppressed because one or more lines are too long

View File

@ -108,6 +108,13 @@ this["wp"] = this["wp"] || {}; this["wp"]["reusableBlocks"] =
/***/ }), /***/ }),
/***/ 2:
/***/ (function(module, exports) {
(function() { module.exports = window["lodash"]; }());
/***/ }),
/***/ 3: /***/ 3:
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -169,6 +176,9 @@ var external_regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(ext
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(47); var asyncToGenerator = __webpack_require__(47);
// EXTERNAL MODULE: external "lodash"
var external_lodash_ = __webpack_require__(2);
// EXTERNAL MODULE: external ["wp","blocks"] // EXTERNAL MODULE: external ["wp","blocks"]
var external_wp_blocks_ = __webpack_require__(9); var external_wp_blocks_ = __webpack_require__(9);
@ -179,12 +189,17 @@ var external_wp_i18n_ = __webpack_require__(1);
/**
* External dependencies
*/
/** /**
* WordPress dependencies * WordPress dependencies
*/ */
/** /**
* Internal dependencies * Internal dependencies
*/ */
@ -235,7 +250,7 @@ var controls = {
var clientId = _ref.clientId; var clientId = _ref.clientId;
var oldBlock = registry.select('core/block-editor').getBlock(clientId); var oldBlock = registry.select('core/block-editor').getBlock(clientId);
var reusableBlock = registry.select('core').getEditedEntityRecord('postType', 'wp_block', oldBlock.attributes.ref); var reusableBlock = registry.select('core').getEditedEntityRecord('postType', 'wp_block', oldBlock.attributes.ref);
var newBlocks = Object(external_wp_blocks_["parse"])(reusableBlock.content); var newBlocks = Object(external_wp_blocks_["parse"])(Object(external_lodash_["isFunction"])(reusableBlock.content) ? reusableBlock.content(reusableBlock) : reusableBlock.content);
registry.dispatch('core/block-editor').replaceBlocks(oldBlock.clientId, newBlocks); registry.dispatch('core/block-editor').replaceBlocks(oldBlock.clientId, newBlocks);
}; };
}), }),

File diff suppressed because one or more lines are too long

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.7-RC1-50464'; $wp_version = '5.7-RC1-50467';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.